diff --git a/assets/index-0fad9d02.js b/assets/index-0fad9d02.js deleted file mode 100644 index f870ef7..0000000 --- a/assets/index-0fad9d02.js +++ /dev/null @@ -1,2189 +0,0 @@ -function ZY(e,t){for(var r=0;rn[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=r(o);fetch(o.href,i)}})();var Le=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ri(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ll(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var bT={exports:{}},Fm={},wT={exports:{}},_t={};/** - * @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 Bp=Symbol.for("react.element"),JY=Symbol.for("react.portal"),QY=Symbol.for("react.fragment"),eX=Symbol.for("react.strict_mode"),tX=Symbol.for("react.profiler"),rX=Symbol.for("react.provider"),nX=Symbol.for("react.context"),oX=Symbol.for("react.forward_ref"),iX=Symbol.for("react.suspense"),aX=Symbol.for("react.memo"),sX=Symbol.for("react.lazy"),vE=Symbol.iterator;function lX(e){return e===null||typeof e!="object"?null:(e=vE&&e[vE]||e["@@iterator"],typeof e=="function"?e:null)}var xT={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_T=Object.assign,ET={};function Fu(e,t,r){this.props=e,this.context=t,this.refs=ET,this.updater=r||xT}Fu.prototype.isReactComponent={};Fu.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")};Fu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ST(){}ST.prototype=Fu.prototype;function Zx(e,t,r){this.props=e,this.context=t,this.refs=ET,this.updater=r||xT}var Jx=Zx.prototype=new ST;Jx.constructor=Zx;_T(Jx,Fu.prototype);Jx.isPureReactComponent=!0;var gE=Array.isArray,CT=Object.prototype.hasOwnProperty,Qx={current:null},PT={key:!0,ref:!0,__self:!0,__source:!0};function OT(e,t,r){var n,o={},i=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)CT.call(t,n)&&!PT.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(s===1)o.children=r;else if(1>>1,T=L[F];if(0>>1;Fo(te,S))ieo(ce,te)?(L[F]=ce,L[ie]=S,F=ie):(L[F]=te,L[J]=S,F=J);else if(ieo(ce,S))L[F]=ce,L[ie]=S,F=ie;else break e}}return U}function o(L,U){var S=L.sortIndex-U.sortIndex;return S!==0?S:L.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,f=null,d=3,p=!1,h=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(L){for(var U=r(c);U!==null;){if(U.callback===null)n(c);else if(U.startTime<=L)n(c),U.sortIndex=U.expirationTime,t(l,U);else break;U=r(c)}}function A(L){if(y=!1,E(L),!h)if(r(l)!==null)h=!0,B(D);else{var U=r(c);U!==null&&R(A,U.startTime-L)}}function D(L,U){h=!1,y&&(y=!1,b(N),N=-1),p=!0;var S=d;try{for(E(U),f=r(l);f!==null&&(!(f.expirationTime>U)||L&&!W());){var F=f.callback;if(typeof F=="function"){f.callback=null,d=f.priorityLevel;var T=F(f.expirationTime<=U);U=e.unstable_now(),typeof T=="function"?f.callback=T:f===r(l)&&n(l),E(U)}else n(l);f=r(l)}if(f!==null)var q=!0;else{var J=r(c);J!==null&&R(A,J.startTime-U),q=!1}return q}finally{f=null,d=S,p=!1}}var $=!1,g=null,N=-1,V=5,K=-1;function W(){return!(e.unstable_now()-KL||125F?(L.sortIndex=S,t(c,L),r(l)===null&&L===r(c)&&(y?(b(N),N=-1):y=!0,R(A,S-F))):(L.sortIndex=T,t(l,L),h||p||(h=!0,B(D))),L},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(L){var U=d;return function(){var S=d;d=U;try{return L.apply(this,arguments)}finally{d=S}}}})($T);IT.exports=$T;var bX=IT.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 TT=I,Gn=bX;function Ue(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c5=Object.prototype.hasOwnProperty,wX=/^[: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]*$/,yE={},bE={};function xX(e){return c5.call(bE,e)?!0:c5.call(yE,e)?!1:wX.test(e)?bE[e]=!0:(yE[e]=!0,!1)}function _X(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function EX(e,t,r,n){if(t===null||typeof t>"u"||_X(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function wn(e,t,r,n,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var jr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){jr[e]=new wn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];jr[t]=new wn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){jr[e]=new wn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){jr[e]=new wn(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){jr[e]=new wn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){jr[e]=new wn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){jr[e]=new wn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){jr[e]=new wn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){jr[e]=new wn(e,5,!1,e.toLowerCase(),null,!1,!1)});var t6=/[\-:]([a-z])/g;function r6(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(t6,r6);jr[t]=new wn(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(t6,r6);jr[t]=new wn(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(t6,r6);jr[t]=new wn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){jr[e]=new wn(e,1,!1,e.toLowerCase(),null,!1,!1)});jr.xlinkHref=new wn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){jr[e]=new wn(e,1,!1,e.toLowerCase(),null,!0,!0)});function n6(e,t,r,n){var o=jr.hasOwnProperty(t)?jr[t]:null;(o!==null?o.type!==0:n||!(2s||o[a]!==i[s]){var l=` -`+o[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{Hb=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?nd(e):""}function SX(e){switch(e.tag){case 5:return nd(e.type);case 16:return nd("Lazy");case 13:return nd("Suspense");case 19:return nd("SuspenseList");case 0:case 2:case 15:return e=Vb(e.type,!1),e;case 11:return e=Vb(e.type.render,!1),e;case 1:return e=Vb(e.type,!0),e;default:return""}}function p5(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 Cc:return"Fragment";case Sc:return"Portal";case u5:return"Profiler";case o6:return"StrictMode";case f5:return"Suspense";case d5:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case RT:return(e.displayName||"Context")+".Consumer";case MT:return(e._context.displayName||"Context")+".Provider";case i6:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case a6:return t=e.displayName||null,t!==null?t:p5(e.type)||"Memo";case Ya:t=e._payload,e=e._init;try{return p5(e(t))}catch{}}return null}function CX(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 p5(t);case 8:return t===o6?"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 Ts(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function FT(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function PX(e){var t=FT(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Uh(e){e._valueTracker||(e._valueTracker=PX(e))}function BT(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=FT(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function I1(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 h5(e,t){var r=t.checked;return Qt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function xE(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Ts(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function jT(e,t){t=t.checked,t!=null&&n6(e,"checked",t,!1)}function v5(e,t){jT(e,t);var r=Ts(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?g5(e,t.type,r):t.hasOwnProperty("defaultValue")&&g5(e,t.type,Ts(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function _E(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function g5(e,t,r){(t!=="number"||I1(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var od=Array.isArray;function Vc(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Hh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wd(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var ud={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},OX=["Webkit","ms","Moz","O"];Object.keys(ud).forEach(function(e){OX.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ud[t]=ud[e]})});function HT(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||ud.hasOwnProperty(e)&&ud[e]?(""+t).trim():t+"px"}function VT(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=HT(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var AX=Qt({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 b5(e,t){if(t){if(AX[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ue(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ue(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ue(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ue(62))}}function w5(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 x5=null;function s6(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _5=null,Wc=null,qc=null;function CE(e){if(e=zp(e)){if(typeof _5!="function")throw Error(Ue(280));var t=e.stateNode;t&&(t=Um(t),_5(e.stateNode,e.type,t))}}function WT(e){Wc?qc?qc.push(e):qc=[e]:Wc=e}function qT(){if(Wc){var e=Wc,t=qc;if(qc=Wc=null,CE(e),t)for(e=0;e>>=0,e===0?32:31-(jX(e)/LX|0)|0}var Vh=64,Wh=4194304;function id(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 M1(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,a=r&268435455;if(a!==0){var s=a&~o;s!==0?n=id(s):(i&=a,i!==0&&(n=id(i)))}else a=r&~o,a!==0?n=id(a):i!==0&&(n=id(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&o)&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function jp(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Vo(t),e[t]=r}function VX(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=dd),ME=String.fromCharCode(32),RE=!1;function dD(e,t){switch(e){case"keyup":return yZ.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pD(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Pc=!1;function wZ(e,t){switch(e){case"compositionend":return pD(t);case"keypress":return t.which!==32?null:(RE=!0,ME);case"textInput":return e=t.data,e===ME&&RE?null:e;default:return null}}function xZ(e,t){if(Pc)return e==="compositionend"||!v6&&dD(e,t)?(e=uD(),Q0=d6=ns=null,Pc=!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:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=jE(r)}}function mD(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mD(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yD(){for(var e=window,t=I1();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=I1(e.document)}return t}function g6(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 IZ(e){var t=yD(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&mD(r.ownerDocument.documentElement,r)){if(n!==null&&g6(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=LE(r,i);var a=LE(r,n);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Oc=null,A5=null,hd=null,k5=!1;function zE(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;k5||Oc==null||Oc!==I1(n)||(n=Oc,"selectionStart"in n&&g6(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),hd&&Zd(hd,n)||(hd=n,n=F1(A5,"onSelect"),0Ic||(e.current=R5[Ic],R5[Ic]=null,Ic--)}function Lt(e,t){Ic++,R5[Ic]=e.current,e.current=t}var Ds={},on=zs(Ds),On=zs(!1),Il=Ds;function au(e,t){var r=e.type.contextTypes;if(!r)return Ds;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function An(e){return e=e.childContextTypes,e!=null}function j1(){Gt(On),Gt(on)}function KE(e,t,r){if(on.current!==Ds)throw Error(Ue(168));Lt(on,t),Lt(On,r)}function OD(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(Ue(108,CX(e)||"Unknown",o));return Qt({},r,n)}function L1(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ds,Il=on.current,Lt(on,e),Lt(On,On.current),!0}function YE(e,t,r){var n=e.stateNode;if(!n)throw Error(Ue(169));r?(e=OD(e,t,Il),n.__reactInternalMemoizedMergedChildContext=e,Gt(On),Gt(on),Lt(on,e)):Gt(On),Lt(On,r)}var na=null,Hm=!1,o2=!1;function AD(e){na===null?na=[e]:na.push(e)}function UZ(e){Hm=!0,AD(e)}function Us(){if(!o2&&na!==null){o2=!0;var e=0,t=Tt;try{var r=na;for(Tt=1;e>=a,o-=a,sa=1<<32-Vo(t)+o|r<N?(V=g,g=null):V=g.sibling;var K=d(b,g,E[N],A);if(K===null){g===null&&(g=V);break}e&&g&&K.alternate===null&&t(b,g),m=i(K,m,N),$===null?D=K:$.sibling=K,$=K,g=V}if(N===E.length)return r(b,g),Yt&&gl(b,N),D;if(g===null){for(;NN?(V=g,g=null):V=g.sibling;var W=d(b,g,K.value,A);if(W===null){g===null&&(g=V);break}e&&g&&W.alternate===null&&t(b,g),m=i(W,m,N),$===null?D=W:$.sibling=W,$=W,g=V}if(K.done)return r(b,g),Yt&&gl(b,N),D;if(g===null){for(;!K.done;N++,K=E.next())K=f(b,K.value,A),K!==null&&(m=i(K,m,N),$===null?D=K:$.sibling=K,$=K);return Yt&&gl(b,N),D}for(g=n(b,g);!K.done;N++,K=E.next())K=p(g,b,N,K.value,A),K!==null&&(e&&K.alternate!==null&&g.delete(K.key===null?N:K.key),m=i(K,m,N),$===null?D=K:$.sibling=K,$=K);return e&&g.forEach(function(P){return t(b,P)}),Yt&&gl(b,N),D}function _(b,m,E,A){if(typeof E=="object"&&E!==null&&E.type===Cc&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case zh:e:{for(var D=E.key,$=m;$!==null;){if($.key===D){if(D=E.type,D===Cc){if($.tag===7){r(b,$.sibling),m=o($,E.props.children),m.return=b,b=m;break e}}else if($.elementType===D||typeof D=="object"&&D!==null&&D.$$typeof===Ya&&rS(D)===$.type){r(b,$.sibling),m=o($,E.props),m.ref=xf(b,$,E),m.return=b,b=m;break e}r(b,$);break}else t(b,$);$=$.sibling}E.type===Cc?(m=Pl(E.props.children,b.mode,A,E.key),m.return=b,b=m):(A=s1(E.type,E.key,E.props,null,b.mode,A),A.ref=xf(b,m,E),A.return=b,b=A)}return a(b);case Sc:e:{for($=E.key;m!==null;){if(m.key===$)if(m.tag===4&&m.stateNode.containerInfo===E.containerInfo&&m.stateNode.implementation===E.implementation){r(b,m.sibling),m=o(m,E.children||[]),m.return=b,b=m;break e}else{r(b,m);break}else t(b,m);m=m.sibling}m=d2(E,b.mode,A),m.return=b,b=m}return a(b);case Ya:return $=E._init,_(b,m,$(E._payload),A)}if(od(E))return h(b,m,E,A);if(gf(E))return y(b,m,E,A);Jh(b,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,m!==null&&m.tag===6?(r(b,m.sibling),m=o(m,E),m.return=b,b=m):(r(b,m),m=f2(E,b.mode,A),m.return=b,b=m),a(b)):r(b,m)}return _}var lu=ND(!0),FD=ND(!1),Up={},Ei=zs(Up),tp=zs(Up),rp=zs(Up);function _l(e){if(e===Up)throw Error(Ue(174));return e}function C6(e,t){switch(Lt(rp,t),Lt(tp,e),Lt(Ei,Up),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:y5(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=y5(t,e)}Gt(Ei),Lt(Ei,t)}function cu(){Gt(Ei),Gt(tp),Gt(rp)}function BD(e){_l(rp.current);var t=_l(Ei.current),r=y5(t,e.type);t!==r&&(Lt(tp,e),Lt(Ei,r))}function P6(e){tp.current===e&&(Gt(Ei),Gt(tp))}var Zt=zs(0);function q1(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var i2=[];function O6(){for(var e=0;er?r:4,e(!0);var n=a2.transition;a2.transition={};try{e(!1),t()}finally{Tt=r,a2.transition=n}}function eM(){return wo().memoizedState}function qZ(e,t,r){var n=ys(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},tM(e))rM(t,r);else if(r=TD(e,t,r,n),r!==null){var o=gn();Wo(r,e,n,o),nM(r,t,n)}}function GZ(e,t,r){var n=ys(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(tM(e))rM(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,r);if(o.hasEagerState=!0,o.eagerState=s,Zo(s,a)){var l=t.interleaved;l===null?(o.next=o,E6(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}r=TD(e,t,o,n),r!==null&&(o=gn(),Wo(r,e,n,o),nM(r,t,n))}}function tM(e){var t=e.alternate;return e===Jt||t!==null&&t===Jt}function rM(e,t){vd=G1=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function nM(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,c6(e,r)}}var K1={readContext:bo,useCallback:qr,useContext:qr,useEffect:qr,useImperativeHandle:qr,useInsertionEffect:qr,useLayoutEffect:qr,useMemo:qr,useReducer:qr,useRef:qr,useState:qr,useDebugValue:qr,useDeferredValue:qr,useTransition:qr,useMutableSource:qr,useSyncExternalStore:qr,useId:qr,unstable_isNewReconciler:!1},KZ={readContext:bo,useCallback:function(e,t){return pi().memoizedState=[e,t===void 0?null:t],e},useContext:bo,useEffect:oS,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,n1(4194308,4,YD.bind(null,t,e),r)},useLayoutEffect:function(e,t){return n1(4194308,4,e,t)},useInsertionEffect:function(e,t){return n1(4,2,e,t)},useMemo:function(e,t){var r=pi();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=pi();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=qZ.bind(null,Jt,e),[n.memoizedState,e]},useRef:function(e){var t=pi();return e={current:e},t.memoizedState=e},useState:nS,useDebugValue:T6,useDeferredValue:function(e){return pi().memoizedState=e},useTransition:function(){var e=nS(!1),t=e[0];return e=WZ.bind(null,e[1]),pi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Jt,o=pi();if(Yt){if(r===void 0)throw Error(Ue(407));r=r()}else{if(r=t(),Er===null)throw Error(Ue(349));Tl&30||zD(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,oS(HD.bind(null,n,i,e),[e]),n.flags|=2048,ip(9,UD.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=pi(),t=Er.identifierPrefix;if(Yt){var r=la,n=sa;r=(n&~(1<<32-Vo(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=np++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[yi]=t,e[ep]=n,dM(e,t,!1,!1),t.stateNode=e;e:{switch(a=w5(r,n),r){case"dialog":Wt("cancel",e),Wt("close",e),o=n;break;case"iframe":case"object":case"embed":Wt("load",e),o=n;break;case"video":case"audio":for(o=0;ofu&&(t.flags|=128,n=!0,_f(i,!1),t.lanes=4194304)}else{if(!n)if(e=q1(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),_f(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Yt)return Gr(t),null}else 2*ar()-i.renderingStartTime>fu&&r!==1073741824&&(t.flags|=128,n=!0,_f(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(r=i.last,r!==null?r.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ar(),t.sibling=null,r=Zt.current,Lt(Zt,n?r&1|2:r&1),t):(Gr(t),null);case 22:case 23:return B6(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?jn&1073741824&&(Gr(t),t.subtreeFlags&6&&(t.flags|=8192)):Gr(t),null;case 24:return null;case 25:return null}throw Error(Ue(156,t.tag))}function rJ(e,t){switch(y6(t),t.tag){case 1:return An(t.type)&&j1(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return cu(),Gt(On),Gt(on),O6(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return P6(t),null;case 13:if(Gt(Zt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ue(340));su()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Gt(Zt),null;case 4:return cu(),null;case 10:return _6(t.type._context),null;case 22:case 23:return B6(),null;case 24:return null;default:return null}}var e0=!1,Qr=!1,nJ=typeof WeakSet=="function"?WeakSet:Set,ot=null;function Mc(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){rr(e,t,n)}else r.current=null}function G5(e,t,r){try{r()}catch(n){rr(e,t,n)}}var pS=!1;function oJ(e,t){if(I5=R1,e=yD(),g6(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,s=-1,l=-1,c=0,u=0,f=e,d=null;t:for(;;){for(var p;f!==r||o!==0&&f.nodeType!==3||(s=a+o),f!==i||n!==0&&f.nodeType!==3||(l=a+n),f.nodeType===3&&(a+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===r&&++c===o&&(s=a),d===i&&++u===n&&(l=a),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for($5={focusedElem:e,selectionRange:r},R1=!1,ot=t;ot!==null;)if(t=ot,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ot=e;else for(;ot!==null;){t=ot;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var y=h.memoizedProps,_=h.memoizedState,b=t.stateNode,m=b.getSnapshotBeforeUpdate(t.elementType===t.type?y:Ro(t.type,y),_);b.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ue(163))}}catch(A){rr(t,t.return,A)}if(e=t.sibling,e!==null){e.return=t.return,ot=e;break}ot=t.return}return h=pS,pS=!1,h}function gd(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&G5(t,r,i)}o=o.next}while(o!==n)}}function qm(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function K5(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function vM(e){var t=e.alternate;t!==null&&(e.alternate=null,vM(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yi],delete t[ep],delete t[M5],delete t[LZ],delete t[zZ])),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 gM(e){return e.tag===5||e.tag===3||e.tag===4}function hS(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gM(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 Y5(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=B1));else if(n!==4&&(e=e.child,e!==null))for(Y5(e,t,r),e=e.sibling;e!==null;)Y5(e,t,r),e=e.sibling}function X5(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(X5(e,t,r),e=e.sibling;e!==null;)X5(e,t,r),e=e.sibling}var Mr=null,No=!1;function Fa(e,t,r){for(r=r.child;r!==null;)mM(e,t,r),r=r.sibling}function mM(e,t,r){if(_i&&typeof _i.onCommitFiberUnmount=="function")try{_i.onCommitFiberUnmount(Bm,r)}catch{}switch(r.tag){case 5:Qr||Mc(r,t);case 6:var n=Mr,o=No;Mr=null,Fa(e,t,r),Mr=n,No=o,Mr!==null&&(No?(e=Mr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Mr.removeChild(r.stateNode));break;case 18:Mr!==null&&(No?(e=Mr,r=r.stateNode,e.nodeType===8?n2(e.parentNode,r):e.nodeType===1&&n2(e,r),Yd(e)):n2(Mr,r.stateNode));break;case 4:n=Mr,o=No,Mr=r.stateNode.containerInfo,No=!0,Fa(e,t,r),Mr=n,No=o;break;case 0:case 11:case 14:case 15:if(!Qr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&G5(r,t,a),o=o.next}while(o!==n)}Fa(e,t,r);break;case 1:if(!Qr&&(Mc(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){rr(r,t,s)}Fa(e,t,r);break;case 21:Fa(e,t,r);break;case 22:r.mode&1?(Qr=(n=Qr)||r.memoizedState!==null,Fa(e,t,r),Qr=n):Fa(e,t,r);break;default:Fa(e,t,r)}}function vS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new nJ),t.forEach(function(n){var o=pJ.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function Ao(e,t){var r=t.deletions;if(r!==null)for(var n=0;no&&(o=a),n&=~i}if(n=o,n=ar()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*aJ(n/1960))-n,10e?16:e,os===null)var n=!1;else{if(e=os,os=null,Z1=0,Ot&6)throw Error(Ue(331));var o=Ot;for(Ot|=4,ot=e.current;ot!==null;){var i=ot,a=i.child;if(ot.flags&16){var s=i.deletions;if(s!==null){for(var l=0;lar()-N6?Cl(e,0):R6|=r),kn(e,t)}function CM(e,t){t===0&&(e.mode&1?(t=Wh,Wh<<=1,!(Wh&130023424)&&(Wh=4194304)):t=1);var r=gn();e=ma(e,t),e!==null&&(jp(e,t,r),kn(e,r))}function dJ(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),CM(e,r)}function pJ(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(Ue(314))}n!==null&&n.delete(t),CM(e,r)}var PM;PM=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||On.current)Sn=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Sn=!1,eJ(e,t,r);Sn=!!(e.flags&131072)}else Sn=!1,Yt&&t.flags&1048576&&kD(t,U1,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;o1(e,t),e=t.pendingProps;var o=au(t,on.current);Kc(t,r),o=k6(null,t,n,e,o,r);var i=I6();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,An(n)?(i=!0,L1(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,S6(t),o.updater=Vm,t.stateNode=o,o._reactInternals=t,L5(t,n,e,r),t=H5(null,t,n,!0,i,r)):(t.tag=0,Yt&&i&&m6(t),pn(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(o1(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=vJ(n),e=Ro(n,e),o){case 0:t=U5(null,t,n,e,r);break e;case 1:t=uS(null,t,n,e,r);break e;case 11:t=lS(null,t,n,e,r);break e;case 14:t=cS(null,t,n,Ro(n.type,e),r);break e}throw Error(Ue(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ro(n,o),U5(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ro(n,o),uS(e,t,n,o,r);case 3:e:{if(cM(t),e===null)throw Error(Ue(387));n=t.pendingProps,i=t.memoizedState,o=i.element,DD(e,t),W1(t,n,null,r);var a=t.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=uu(Error(Ue(423)),t),t=fS(e,t,n,r,o);break e}else if(n!==o){o=uu(Error(Ue(424)),t),t=fS(e,t,n,r,o);break e}else for(Ln=vs(t.stateNode.containerInfo.firstChild),Un=t,Yt=!0,Lo=null,r=FD(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(su(),n===o){t=ya(e,t,r);break e}pn(e,t,n,r)}t=t.child}return t;case 5:return BD(t),e===null&&F5(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,T5(n,o)?a=null:i!==null&&T5(n,i)&&(t.flags|=32),lM(e,t),pn(e,t,a,r),t.child;case 6:return e===null&&F5(t),null;case 13:return uM(e,t,r);case 4:return C6(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=lu(t,null,n,r):pn(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ro(n,o),lS(e,t,n,o,r);case 7:return pn(e,t,t.pendingProps,r),t.child;case 8:return pn(e,t,t.pendingProps.children,r),t.child;case 12:return pn(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,Lt(H1,n._currentValue),n._currentValue=a,i!==null)if(Zo(i.value,a)){if(i.children===o.children&&!On.current){t=ya(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=da(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),B5(i.return,r,t),s.lanes|=r;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(Ue(341));a.lanes|=r,s=a.alternate,s!==null&&(s.lanes|=r),B5(a,r,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}pn(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,Kc(t,r),o=bo(o),n=n(o),t.flags|=1,pn(e,t,n,r),t.child;case 14:return n=t.type,o=Ro(n,t.pendingProps),o=Ro(n.type,o),cS(e,t,n,o,r);case 15:return aM(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ro(n,o),o1(e,t),t.tag=1,An(n)?(e=!0,L1(t)):e=!1,Kc(t,r),RD(t,n,o),L5(t,n,o,r),H5(null,t,n,!0,e,r);case 19:return fM(e,t,r);case 22:return sM(e,t,r)}throw Error(Ue(156,t.tag))};function OM(e,t){return QT(e,t)}function hJ(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vo(e,t,r,n){return new hJ(e,t,r,n)}function L6(e){return e=e.prototype,!(!e||!e.isReactComponent)}function vJ(e){if(typeof e=="function")return L6(e)?1:0;if(e!=null){if(e=e.$$typeof,e===i6)return 11;if(e===a6)return 14}return 2}function bs(e,t){var r=e.alternate;return r===null?(r=vo(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function s1(e,t,r,n,o,i){var a=2;if(n=e,typeof e=="function")L6(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Cc:return Pl(r.children,o,i,t);case o6:a=8,o|=8;break;case u5:return e=vo(12,r,t,o|2),e.elementType=u5,e.lanes=i,e;case f5:return e=vo(13,r,t,o),e.elementType=f5,e.lanes=i,e;case d5:return e=vo(19,r,t,o),e.elementType=d5,e.lanes=i,e;case NT:return Km(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case MT:a=10;break e;case RT:a=9;break e;case i6:a=11;break e;case a6:a=14;break e;case Ya:a=16,n=null;break e}throw Error(Ue(130,e==null?e:typeof e,""))}return t=vo(a,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function Pl(e,t,r,n){return e=vo(7,e,n,t),e.lanes=r,e}function Km(e,t,r,n){return e=vo(22,e,n,t),e.elementType=NT,e.lanes=r,e.stateNode={isHidden:!1},e}function f2(e,t,r){return e=vo(6,e,null,t),e.lanes=r,e}function d2(e,t,r){return t=vo(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function gJ(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qb(0),this.expirationTimes=qb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qb(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function z6(e,t,r,n,o,i,a,s,l){return e=new gJ(e,t,r,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=vo(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},S6(i),e}function mJ(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($M)}catch(e){console.error(e)}}$M(),kT.exports=Yn;var Hs=kT.exports;const _J=ri(Hs);var ES=Hs;l5.createRoot=ES.createRoot,l5.hydrateRoot=ES.hydrateRoot;var ts=function(){return ts=Object.assign||function(t){for(var r,n=1,o=arguments.length;n"u")return zJ;var t=UJ(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},VJ=MM(),WJ=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),` - .`.concat(CJ,` { - overflow: hidden `).concat(n,`; - padding-right: `).concat(s,"px ").concat(n,`; - } - body { - overflow: hidden `).concat(n,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` - padding-left: `.concat(o,`px; - padding-top: `).concat(i,`px; - padding-right: `).concat(a,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(n,`; - `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),` - } - - .`).concat(l1,` { - right: `).concat(s,"px ").concat(n,`; - } - - .`).concat(c1,` { - margin-right: `).concat(s,"px ").concat(n,`; - } - - .`).concat(l1," .").concat(l1,` { - right: 0 `).concat(n,`; - } - - .`).concat(c1," .").concat(c1,` { - margin-right: 0 `).concat(n,`; - } - - body { - `).concat(PJ,": ").concat(s,`px; - } -`)},qJ=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,i=I.useMemo(function(){return HJ(o)},[o]);return I.createElement(VJ,{styles:WJ(i,!t,o,r?"":"!important")})},t3=!1;if(typeof window<"u")try{var n0=Object.defineProperty({},"passive",{get:function(){return t3=!0,!0}});window.addEventListener("test",n0,n0),window.removeEventListener("test",n0,n0)}catch{t3=!1}var ac=t3?{passive:!1}:!1,GJ=function(e){return e.tagName==="TEXTAREA"},RM=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!GJ(e)&&r[t]==="visible")},KJ=function(e){return RM(e,"overflowY")},YJ=function(e){return RM(e,"overflowX")},CS=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=NM(e,n);if(o){var i=FM(e,n),a=i[1],s=i[2];if(a>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},XJ=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},ZJ=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},NM=function(e,t){return e==="v"?KJ(t):YJ(t)},FM=function(e,t){return e==="v"?XJ(t):ZJ(t)},JJ=function(e,t){return e==="h"&&t==="rtl"?-1:1},QJ=function(e,t,r,n,o){var i=JJ(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),c=!1,u=a>0,f=0,d=0;do{var p=FM(e,s),h=p[0],y=p[1],_=p[2],b=y-_-i*h;(h||b)&&NM(e,s)&&(f+=b,d+=h),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(o&&f===0||!o&&a>f)||!u&&(o&&d===0||!o&&-a>d))&&(c=!0),c},o0=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},PS=function(e){return[e.deltaX,e.deltaY]},OS=function(e){return e&&"current"in e?e.current:e},eQ=function(e,t){return e[0]===t[0]&&e[1]===t[1]},tQ=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},rQ=0,sc=[];function nQ(e){var t=I.useRef([]),r=I.useRef([0,0]),n=I.useRef(),o=I.useState(rQ++)[0],i=I.useState(MM)[0],a=I.useRef(e);I.useEffect(function(){a.current=e},[e]),I.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=SJ([e.lockRef.current],(e.shards||[]).map(OS),!0).filter(Boolean);return y.forEach(function(_){return _.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=I.useCallback(function(y,_){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var b=o0(y),m=r.current,E="deltaX"in y?y.deltaX:m[0]-b[0],A="deltaY"in y?y.deltaY:m[1]-b[1],D,$=y.target,g=Math.abs(E)>Math.abs(A)?"h":"v";if("touches"in y&&g==="h"&&$.type==="range")return!1;var N=CS(g,$);if(!N)return!0;if(N?D=g:(D=g==="v"?"h":"v",N=CS(g,$)),!N)return!1;if(!n.current&&"changedTouches"in y&&(E||A)&&(n.current=D),!D)return!0;var V=n.current||D;return QJ(V,_,y,V==="h"?E:A,!0)},[]),l=I.useCallback(function(y){var _=y;if(!(!sc.length||sc[sc.length-1]!==i)){var b="deltaY"in _?PS(_):o0(_),m=t.current.filter(function(D){return D.name===_.type&&D.target===_.target&&eQ(D.delta,b)})[0];if(m&&m.should){_.cancelable&&_.preventDefault();return}if(!m){var E=(a.current.shards||[]).map(OS).filter(Boolean).filter(function(D){return D.contains(_.target)}),A=E.length>0?s(_,E[0]):!a.current.noIsolation;A&&_.cancelable&&_.preventDefault()}}},[]),c=I.useCallback(function(y,_,b,m){var E={name:y,delta:_,target:b,should:m};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(A){return A!==E})},1)},[]),u=I.useCallback(function(y){r.current=o0(y),n.current=void 0},[]),f=I.useCallback(function(y){c(y.type,PS(y),y.target,s(y,e.lockRef.current))},[]),d=I.useCallback(function(y){c(y.type,o0(y),y.target,s(y,e.lockRef.current))},[]);I.useEffect(function(){return sc.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",l,ac),document.addEventListener("touchmove",l,ac),document.addEventListener("touchstart",u,ac),function(){sc=sc.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,ac),document.removeEventListener("touchmove",l,ac),document.removeEventListener("touchstart",u,ac)}},[]);var p=e.removeScrollBar,h=e.inert;return I.createElement(I.Fragment,null,h?I.createElement(i,{styles:tQ(o)}):null,p?I.createElement(qJ,{gapMode:e.gapMode}):null)}const oQ=MJ(DM,nQ);var BM=I.forwardRef(function(e,t){return I.createElement(Qm,ts({},e,{ref:t,sideCar:oQ}))});BM.classNames=Qm.classNames;const iQ=BM;function tv(e,t){let r=e;for(;(r=r.parentElement)&&!r.matches(t););return r}function aQ(e,t,r){for(let n=e-1;n>=0;n-=1)if(!t[n].disabled)return n;if(r){for(let n=t.length-1;n>-1;n-=1)if(!t[n].disabled)return n}return e}function sQ(e,t,r){for(let n=e+1;n{var l;r==null||r(s);const c=Array.from(((l=tv(s.currentTarget,e))==null?void 0:l.querySelectorAll(t))||[]).filter(y=>lQ(s.currentTarget,y,e)),u=c.findIndex(y=>s.currentTarget===y),f=sQ(u,c,n),d=aQ(u,c,n),p=i==="rtl"?d:f,h=i==="rtl"?f:d;switch(s.key){case"ArrowRight":{a==="horizontal"&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),o&&c[p].click());break}case"ArrowLeft":{a==="horizontal"&&(s.stopPropagation(),s.preventDefault(),c[h].focus(),o&&c[h].click());break}case"ArrowUp":{a==="vertical"&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),o&&c[d].click());break}case"ArrowDown":{a==="vertical"&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),o&&c[f].click());break}case"Home":{s.stopPropagation(),s.preventDefault(),!c[0].disabled&&c[0].focus();break}case"End":{s.stopPropagation(),s.preventDefault();const y=c.length-1;!c[y].disabled&&c[y].focus();break}}}}function uQ(e,t,r){var n;return r?Array.from(((n=tv(r,t))==null?void 0:n.querySelectorAll(e))||[]).findIndex(o=>o===r):null}function Hp(e){const t=I.createContext(null);return[({children:o,value:i})=>ae.createElement(t.Provider,{value:i},o),()=>{const o=I.useContext(t);if(o===null)throw new Error(e);return o}]}function W6(e){return Array.isArray(e)?e:[e]}const fQ=()=>{};function dQ(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||fQ:r=>{var n;r.key==="Escape"&&(e(r),(n=t.onTrigger)==null||n.call(t))}}function ca(e,t){return r=>{e==null||e(r),t==null||t(r)}}function pQ(){const[e,t]=I.useState(-1);return[e,{setHovered:t,resetHovered:()=>t(-1)}]}function hQ({data:e}){const t=[],r=[],n=e.reduce((o,i,a)=>(i.group?o[i.group]?o[i.group].push(a):o[i.group]=[a]:r.push(a),o),{});return Object.keys(n).forEach(o=>{t.push(...n[o].map(i=>e[i]))}),t.push(...r.map(o=>e[o])),t}function Vp(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==ae.Fragment:!1}function jM(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t({fontFamily:e.fontFamily||"sans-serif"})}var mQ=Object.defineProperty,AS=Object.getOwnPropertySymbols,yQ=Object.prototype.hasOwnProperty,bQ=Object.prototype.propertyIsEnumerable,kS=(e,t,r)=>t in e?mQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,IS=(e,t)=>{for(var r in t||(t={}))yQ.call(t,r)&&kS(e,r,t[r]);if(AS)for(var r of AS(t))bQ.call(t,r)&&kS(e,r,t[r]);return e};function wQ(e){return t=>({WebkitTapHighlightColor:"transparent",[t||"&:focus"]:IS({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[t?t.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:IS({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)})}function Wp(e){return t=>typeof e.primaryShade=="number"?e.primaryShade:e.primaryShade[t||e.colorScheme]}function q6(e){const t=Wp(e);return(r,n,o=!0,i=!0)=>{if(typeof r=="string"&&r.includes(".")){const[s,l]=r.split("."),c=parseInt(l,10);if(s in e.colors&&c>=0&&c<10)return e.colors[s][typeof n=="number"&&!i?n:c]}const a=typeof n=="number"?n:t();return r in e.colors?e.colors[r][a]:o?e.colors[e.primaryColor][a]:r}}function zM(e){let t="";for(let r=1;r{const o={from:(n==null?void 0:n.from)||e.defaultGradient.from,to:(n==null?void 0:n.to)||e.defaultGradient.to,deg:(n==null?void 0:n.deg)||e.defaultGradient.deg};return`linear-gradient(${o.deg}deg, ${t(o.from,r(),!1)} 0%, ${t(o.to,r(),!1)} 100%)`}}function HM(e){return t=>{if(typeof t=="number")return`${t/16}${e}`;if(typeof t=="string"){const r=t.replace("px","");if(!Number.isNaN(Number(r)))return`${Number(r)/16}${e}`}return t}}const me=HM("rem"),mn=HM("em");function Re({size:e,sizes:t,units:r}){return e in t?t[e]:typeof e=="number"?r==="em"?mn(e):me(e):e||t.md}function xo(e){return typeof e=="number"?e:typeof e=="string"&&e.includes("rem")?Number(e.replace("rem",""))*16:typeof e=="string"&&e.includes("em")?Number(e.replace("em",""))*16:Number(e)}function EQ(e){return t=>`@media (min-width: ${mn(xo(Re({size:t,sizes:e.breakpoints})))})`}function SQ(e){return t=>`@media (max-width: ${mn(xo(Re({size:t,sizes:e.breakpoints}))-1)})`}function CQ(e){return/^#?([0-9A-F]{3}){1,2}$/i.test(e)}function PQ(e){let t=e.replace("#","");if(t.length===3){const a=t.split("");t=[a[0],a[0],a[1],a[1],a[2],a[2]].join("")}const r=parseInt(t,16),n=r>>16&255,o=r>>8&255,i=r&255;return{r:n,g:o,b:i,a:1}}function OQ(e){const[t,r,n,o]=e.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:t,g:r,b:n,a:o||1}}function G6(e){return CQ(e)?PQ(e):e.startsWith("rgb")?OQ(e):{r:0,g:0,b:0,a:1}}function yc(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(--"))return e;const{r,g:n,b:o}=G6(e);return`rgba(${r}, ${n}, ${o}, ${t})`}function AQ(e=0){return{position:"absolute",top:me(e),right:me(e),left:me(e),bottom:me(e)}}function kQ(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r,g:n,b:o,a:i}=G6(e),a=1-t,s=l=>Math.round(l*a);return`rgba(${s(r)}, ${s(n)}, ${s(o)}, ${i})`}function IQ(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r,g:n,b:o,a:i}=G6(e),a=s=>Math.round(s+(255-s)*t);return`rgba(${a(r)}, ${a(n)}, ${a(o)}, ${i})`}function $Q(e){return t=>{if(typeof t=="number")return me(t);const r=typeof e.defaultRadius=="number"?e.defaultRadius:e.radius[e.defaultRadius]||e.defaultRadius;return e.radius[t]||t||r}}function TQ(e,t){if(typeof e=="string"&&e.includes(".")){const[r,n]=e.split("."),o=parseInt(n,10);if(r in t.colors&&o>=0&&o<10)return{isSplittedColor:!0,key:r,shade:o}}return{isSplittedColor:!1}}function DQ(e){const t=q6(e),r=Wp(e),n=UM(e);return({variant:o,color:i,gradient:a,primaryFallback:s})=>{const l=TQ(i,e);switch(o){case"light":return{border:"transparent",background:yc(t(i,e.colorScheme==="dark"?8:0,s,!1),e.colorScheme==="dark"?.2:1),color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:r("light")),hover:yc(t(i,e.colorScheme==="dark"?7:1,s,!1),e.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:r("light")),hover:yc(t(i,e.colorScheme==="dark"?8:0,s,!1),e.colorScheme==="dark"?.2:1)};case"outline":return{border:t(i,e.colorScheme==="dark"?5:r("light")),background:"transparent",color:t(i,e.colorScheme==="dark"?5:r("light")),hover:e.colorScheme==="dark"?yc(t(i,5,s,!1),.05):yc(t(i,0,s,!1),.35)};case"default":return{border:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4],background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,color:e.colorScheme==="dark"?e.white:e.black,hover:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]};case"white":return{border:"transparent",background:e.white,color:t(i,r()),hover:null};case"transparent":return{border:"transparent",color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:r("light")),background:"transparent",hover:null};case"gradient":return{background:n(a),color:e.white,border:"transparent",hover:null};default:{const c=r(),u=l.isSplittedColor?l.shade:c,f=l.isSplittedColor?l.key:i;return{border:"transparent",background:t(f,u,s),color:e.white,hover:t(f,u===9?8:u+1)}}}}}function MQ(e){return t=>{const r=Wp(e)(t);return e.colors[e.primaryColor][r]}}function RQ(e){return{"@media (hover: hover)":{"&:hover":e},"@media (hover: none)":{"&:active":e}}}function NQ(e){return()=>({userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]})}function FQ(e){return()=>e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}const dr={fontStyles:gQ,themeColor:q6,focusStyles:wQ,linearGradient:xQ,radialGradient:_Q,smallerThan:SQ,largerThan:EQ,rgba:yc,cover:AQ,darken:kQ,lighten:IQ,radius:$Q,variant:DQ,primaryShade:Wp,hover:RQ,gradient:UM,primaryColor:MQ,placeholderStyles:NQ,dimmed:FQ};var BQ=Object.defineProperty,jQ=Object.defineProperties,LQ=Object.getOwnPropertyDescriptors,$S=Object.getOwnPropertySymbols,zQ=Object.prototype.hasOwnProperty,UQ=Object.prototype.propertyIsEnumerable,TS=(e,t,r)=>t in e?BQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,HQ=(e,t)=>{for(var r in t||(t={}))zQ.call(t,r)&&TS(e,r,t[r]);if($S)for(var r of $S(t))UQ.call(t,r)&&TS(e,r,t[r]);return e},VQ=(e,t)=>jQ(e,LQ(t));function VM(e){return VQ(HQ({},e),{fn:{fontStyles:dr.fontStyles(e),themeColor:dr.themeColor(e),focusStyles:dr.focusStyles(e),largerThan:dr.largerThan(e),smallerThan:dr.smallerThan(e),radialGradient:dr.radialGradient,linearGradient:dr.linearGradient,gradient:dr.gradient(e),rgba:dr.rgba,cover:dr.cover,lighten:dr.lighten,darken:dr.darken,primaryShade:dr.primaryShade(e),radius:dr.radius(e),variant:dr.variant(e),hover:dr.hover,primaryColor:dr.primaryColor(e),placeholderStyles:dr.placeholderStyles(e),dimmed:dr.dimmed(e)}})}const WM=["xs","sm","md","lg","xl"],WQ={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:vQ,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:e=>({outlineOffset:"0.125rem",outline:`0.125rem solid ${e.colors[e.primaryColor][e.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:e=>({outline:"none",borderColor:e.colors[e.primaryColor][typeof e.primaryShade=="object"?e.primaryShade[e.colorScheme]:e.primaryShade]})}},K6=VM(WQ);function qQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Nr(Lu,--In):0,du--,lr===10&&(du=1,ty--),lr}function Hn(){return lr=In2||lp(lr)>3?"":" "}function iee(e,t){for(;--t&&Hn()&&!(lr<48||lr>102||lr>57&&lr<65||lr>70&&lr<97););return qp(e,u1()+(t<6&&Si()==32&&Hn()==32))}function n3(e){for(;Hn();)switch(lr){case e:return In;case 34:case 39:e!==34&&e!==39&&n3(lr);break;case 40:e===41&&n3(e);break;case 92:Hn();break}return In}function aee(e,t){for(;Hn()&&e+lr!==47+10;)if(e+lr===42+42&&Si()===47)break;return"/*"+qp(t,In-1)+"*"+ey(e===47?e:Hn())}function see(e){for(;!lp(Si());)Hn();return qp(e,In)}function lee(e){return ZM(d1("",null,null,null,[""],e=XM(e),0,[0],e))}function d1(e,t,r,n,o,i,a,s,l){for(var c=0,u=0,f=a,d=0,p=0,h=0,y=1,_=1,b=1,m=0,E="",A=o,D=i,$=n,g=E;_;)switch(h=m,m=Hn()){case 40:if(h!=108&&Nr(g,f-1)==58){r3(g+=$t(f1(m),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:g+=f1(m);break;case 9:case 10:case 13:case 32:g+=oee(h);break;case 92:g+=iee(u1()-1,7);continue;case 47:switch(Si()){case 42:case 47:i0(cee(aee(Hn(),u1()),t,r),l);break;default:g+="/"}break;case 123*y:s[c++]=gi(g)*b;case 125*y:case 59:case 0:switch(m){case 0:case 125:_=0;case 59+u:b==-1&&(g=$t(g,/\f/g,"")),p>0&&gi(g)-f&&i0(p>32?MS(g+";",n,r,f-1):MS($t(g," ","")+";",n,r,f-2),l);break;case 59:g+=";";default:if(i0($=DS(g,t,r,c,u,o,s,E,A=[],D=[],f),i),m===123)if(u===0)d1(g,t,$,$,A,i,f,s,D);else switch(d===99&&Nr(g,3)===110?100:d){case 100:case 108:case 109:case 115:d1(e,$,$,n&&i0(DS(e,$,$,0,0,o,s,E,o,A=[],f),D),o,D,f,s,n?A:D);break;default:d1(g,$,$,$,[""],D,0,s,D)}}c=u=p=0,y=b=1,E=g="",f=a;break;case 58:f=1+gi(g),p=h;default:if(y<1){if(m==123)--y;else if(m==125&&y++==0&&nee()==125)continue}switch(g+=ey(m),m*y){case 38:b=u>0?1:(g+="\f",-1);break;case 44:s[c++]=(gi(g)-1)*b,b=1;break;case 64:Si()===45&&(g+=f1(Hn())),d=Si(),u=f=gi(E=g+=see(u1())),m++;break;case 45:h===45&&gi(g)==2&&(y=0)}}return i}function DS(e,t,r,n,o,i,a,s,l,c,u){for(var f=o-1,d=o===0?i:[""],p=Z6(d),h=0,y=0,_=0;h0?d[b]+" "+m:$t(m,/&\f/g,d[b])))&&(l[_++]=E);return ry(e,t,r,o===0?Y6:s,l,c,u)}function cee(e,t,r){return ry(e,t,r,qM,ey(ree()),sp(e,2,-2),0)}function MS(e,t,r,n){return ry(e,t,r,X6,sp(e,0,n),sp(e,n+1,-1),n)}function Xc(e,t){for(var r="",n=Z6(e),o=0;o6)switch(Nr(e,t+1)){case 109:if(Nr(e,t+4)!==45)break;case 102:return $t(e,/(.+:)(.+)-([^]+)/,"$1"+It+"$2-$3$1"+rv+(Nr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~r3(e,"stretch")?QM($t(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Nr(e,t+1)!==115)break;case 6444:switch(Nr(e,gi(e)-3-(~r3(e,"!important")&&10))){case 107:return $t(e,":",":"+It)+e;case 101:return $t(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+It+(Nr(e,14)===45?"inline-":"")+"box$3$1"+It+"$2$3$1"+Zr+"$2box$3")+e}break;case 5936:switch(Nr(e,t+11)){case 114:return It+e+Zr+$t(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return It+e+Zr+$t(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return It+e+Zr+$t(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return It+e+Zr+e+e}return e}var yee=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case X6:t.return=QM(t.value,t.length);break;case GM:return Xc([Sf(t,{value:$t(t.value,"@","@"+It)})],o);case Y6:if(t.length)return tee(t.props,function(i){switch(eee(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Xc([Sf(t,{props:[$t(i,/:(read-\w+)/,":"+rv+"$1")]})],o);case"::placeholder":return Xc([Sf(t,{props:[$t(i,/:(plac\w+)/,":"+It+"input-$1")]}),Sf(t,{props:[$t(i,/:(plac\w+)/,":"+rv+"$1")]}),Sf(t,{props:[$t(i,/:(plac\w+)/,Zr+"input-$1")]})],o)}return""})}},bee=[yee],eR=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(y){var _=y.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var o=t.stylisPlugins||bee,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(y){for(var _=y.getAttribute("data-emotion").split(" "),b=1;b<_.length;b++)i[_[b]]=!0;s.push(y)});var l,c=[gee,mee];{var u,f=[uee,dee(function(y){u.insert(y)})],d=fee(c.concat(o,f)),p=function(_){return Xc(lee(_),d)};l=function(_,b,m,E){u=m,p(_?_+"{"+b.styles+"}":b.styles),E&&(h.inserted[b.name]=!0)}}var h={key:r,sheet:new KQ({key:r,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:l};return h.sheet.hydrate(s),h};function Ze(){return Ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Fee={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Bee=/[A-Z]|^ms/g,jee=/_EMO_([^_]+?)_([^]*?)_EMO_/g,aR=function(t){return t.charCodeAt(1)===45},LS=function(t){return t!=null&&typeof t!="boolean"},v2=JM(function(e){return aR(e)?e:e.replace(Bee,"-$&").toLowerCase()}),zS=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(jee,function(n,o,i){return mi={name:o,styles:i,next:mi},o})}return Fee[t]!==1&&!aR(t)&&typeof r=="number"&&r!==0?r+"px":r};function cp(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return mi={name:r.name,styles:r.styles,next:mi},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)mi={name:n.name,styles:n.styles,next:mi},n=n.next;var o=r.styles+";";return o}return Lee(e,t,r)}case"function":{if(e!==void 0){var i=mi,a=r(e);return mi=i,cp(e,t,a)}break}}if(t==null)return r;var s=t[r];return s!==void 0?s:r}function Lee(e,t,r){var n="";if(Array.isArray(r))for(var o=0;ot in e?Gee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jee=(e,t)=>{for(var r in t||(t={}))Xee.call(t,r)&&WS(e,r,t[r]);if(VS)for(var r of VS(t))Zee.call(t,r)&&WS(e,r,t[r]);return e},Qee=(e,t)=>Kee(e,Yee(t));function ete({theme:e}){return ae.createElement(Gp,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:e.colorScheme==="dark"?"dark":"light"},body:Qee(Jee({},e.fn.fontStyles()),{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function Cf(e,t,r,n=me){Object.keys(t).forEach(o=>{e[`--mantine-${r}-${o}`]=n(t[o])})}function tte({theme:e}){const t={"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-transition-timing-function":e.transitionTimingFunction,"--mantine-line-height":`${e.lineHeight}`,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":`${e.headings.fontWeight}`};Cf(t,e.shadows,"shadow"),Cf(t,e.fontSizes,"font-size"),Cf(t,e.radius,"radius"),Cf(t,e.spacing,"spacing"),Cf(t,e.breakpoints,"breakpoints",mn),Object.keys(e.colors).forEach(n=>{e.colors[n].forEach((o,i)=>{t[`--mantine-color-${n}-${i}`]=o})});const r=e.headings.sizes;return Object.keys(r).forEach(n=>{t[`--mantine-${n}-font-size`]=r[n].fontSize,t[`--mantine-${n}-line-height`]=`${r[n].lineHeight}`}),ae.createElement(Gp,{styles:{":root":t}})}var rte=Object.defineProperty,nte=Object.defineProperties,ote=Object.getOwnPropertyDescriptors,qS=Object.getOwnPropertySymbols,ite=Object.prototype.hasOwnProperty,ate=Object.prototype.propertyIsEnumerable,GS=(e,t,r)=>t in e?rte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,li=(e,t)=>{for(var r in t||(t={}))ite.call(t,r)&&GS(e,r,t[r]);if(qS)for(var r of qS(t))ate.call(t,r)&&GS(e,r,t[r]);return e},g2=(e,t)=>nte(e,ote(t));function ste(e,t){var r;if(!t)return e;const n=Object.keys(e).reduce((o,i)=>{if(i==="headings"&&t.headings){const a=t.headings.sizes?Object.keys(e.headings.sizes).reduce((s,l)=>(s[l]=li(li({},e.headings.sizes[l]),t.headings.sizes[l]),s),{}):e.headings.sizes;return g2(li({},o),{headings:g2(li(li({},e.headings),t.headings),{sizes:a})})}if(i==="breakpoints"&&t.breakpoints){const a=li(li({},e.breakpoints),t.breakpoints);return g2(li({},o),{breakpoints:Object.fromEntries(Object.entries(a).sort((s,l)=>xo(s[1])-xo(l[1])))})}return o[i]=typeof t[i]=="object"?li(li({},e[i]),t[i]):typeof t[i]=="number"||typeof t[i]=="boolean"||typeof t[i]=="function"?t[i]:t[i]||e[i],o},{});if(t!=null&&t.fontFamily&&!((r=t==null?void 0:t.headings)!=null&&r.fontFamily)&&(n.headings.fontFamily=t.fontFamily),!(n.primaryColor in n.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return n}function lte(e,t){return VM(ste(e,t))}function lR(e){return Object.keys(e).reduce((t,r)=>(e[r]!==void 0&&(t[r]=e[r]),t),{})}const cte={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:`${me(1)} dotted ButtonText`},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"}};function ute(){return ae.createElement(Gp,{styles:cte})}var fte=Object.defineProperty,KS=Object.getOwnPropertySymbols,dte=Object.prototype.hasOwnProperty,pte=Object.prototype.propertyIsEnumerable,YS=(e,t,r)=>t in e?fte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bd=(e,t)=>{for(var r in t||(t={}))dte.call(t,r)&&YS(e,r,t[r]);if(KS)for(var r of KS(t))pte.call(t,r)&&YS(e,r,t[r]);return e};const nv=I.createContext({theme:K6});function Lr(){var e;return((e=I.useContext(nv))==null?void 0:e.theme)||K6}function hte(e){const t=Lr(),r=n=>{var o,i,a,s;return{styles:((o=t.components[n])==null?void 0:o.styles)||{},classNames:((i=t.components[n])==null?void 0:i.classNames)||{},variants:(a=t.components[n])==null?void 0:a.variants,sizes:(s=t.components[n])==null?void 0:s.sizes}};return Array.isArray(e)?e.map(r):[r(e)]}function cR(){var e;return(e=I.useContext(nv))==null?void 0:e.emotionCache}function et(e,t,r){var n;const o=Lr(),i=(n=o.components[e])==null?void 0:n.defaultProps,a=typeof i=="function"?i(o):i;return bd(bd(bd({},t),a),lR(r))}function uR({theme:e,emotionCache:t,withNormalizeCSS:r=!1,withGlobalStyles:n=!1,withCSSVariables:o=!1,inherit:i=!1,children:a}){const s=I.useContext(nv),l=lte(K6,i?bd(bd({},s.theme),e):e);return ae.createElement(Wee,{theme:l},ae.createElement(nv.Provider,{value:{theme:l,emotionCache:t}},r&&ae.createElement(ute,null),n&&ae.createElement(ete,{theme:l}),o&&ae.createElement(tte,{theme:l}),typeof l.globalStyles=="function"&&ae.createElement(Gp,{styles:l.globalStyles(l)}),a))}uR.displayName="@mantine/core/MantineProvider";const fR=I.createContext(null);function vte(){const e=I.useContext(fR);if(!e)throw new Error("useMantineColorScheme hook was called outside of context, make sure your app is wrapped with ColorSchemeProvider component");return e}function dR({colorScheme:e,toggleColorScheme:t,children:r}){return ae.createElement(fR.Provider,{value:{colorScheme:e,toggleColorScheme:t}},r)}dR.displayName="@mantine/core/ColorSchemeProvider";const gte={app:100,modal:200,popover:300,overlay:400,max:9999};function Vs(e){return gte[e]}function mte(e,t){const r=I.useRef();return(!r.current||t.length!==r.current.prevDeps.length||r.current.prevDeps.map((n,o)=>n===t[o]).indexOf(!1)>=0)&&(r.current={v:e(),prevDeps:[...t]}),r.current.v}const yte=eR({key:"mantine",prepend:!0});function bte(){return cR()||yte}var wte=Object.defineProperty,XS=Object.getOwnPropertySymbols,xte=Object.prototype.hasOwnProperty,_te=Object.prototype.propertyIsEnumerable,ZS=(e,t,r)=>t in e?wte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ete=(e,t)=>{for(var r in t||(t={}))xte.call(t,r)&&ZS(e,r,t[r]);if(XS)for(var r of XS(t))_te.call(t,r)&&ZS(e,r,t[r]);return e};const m2="ref";function Ste(e){let t;if(e.length!==1)return{args:e,ref:t};const[r]=e;if(!(r instanceof Object))return{args:e,ref:t};if(!(m2 in r))return{args:e,ref:t};t=r[m2];const n=Ete({},r);return delete n[m2],{args:[n],ref:t}}const{cssFactory:Cte}=(()=>{function e(r,n,o){const i=[],a=Mee(r,i,o);return i.length<2?o:a+n(i)}function t(r){const{cache:n}=r,o=(...a)=>{const{ref:s,args:l}=Ste(a),c=o_(l,n.registered);return iR(n,c,!1),`${n.key}-${c.name}${s===void 0?"":` ${s}`}`};return{css:o,cx:(...a)=>e(n.registered,o,LM(a))}}return{cssFactory:t}})();function pR(){const e=bte();return mte(()=>Cte({cache:e}),[e])}function Pte({cx:e,classes:t,context:r,classNames:n,name:o,cache:i}){const a=r.reduce((s,l)=>(Object.keys(l.classNames).forEach(c=>{typeof s[c]!="string"?s[c]=`${l.classNames[c]}`:s[c]=`${s[c]} ${l.classNames[c]}`}),s),{});return Object.keys(t).reduce((s,l)=>(s[l]=e(t[l],a[l],n!=null&&n[l],Array.isArray(o)?o.filter(Boolean).map(c=>`${(i==null?void 0:i.key)||"mantine"}-${c}-${l}`).join(" "):o?`${(i==null?void 0:i.key)||"mantine"}-${o}-${l}`:null),s),{})}var Ote=Object.defineProperty,JS=Object.getOwnPropertySymbols,Ate=Object.prototype.hasOwnProperty,kte=Object.prototype.propertyIsEnumerable,QS=(e,t,r)=>t in e?Ote(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y2=(e,t)=>{for(var r in t||(t={}))Ate.call(t,r)&&QS(e,r,t[r]);if(JS)for(var r of JS(t))kte.call(t,r)&&QS(e,r,t[r]);return e};function a3(e,t){return t&&Object.keys(t).forEach(r=>{e[r]?e[r]=y2(y2({},e[r]),t[r]):e[r]=y2({},t[r])}),e}function e9(e,t,r,n){const o=i=>typeof i=="function"?i(t,r||{},n):i||{};return Array.isArray(e)?e.map(i=>o(i.styles)).reduce((i,a)=>a3(i,a),{}):o(e)}function Ite({ctx:e,theme:t,params:r,variant:n,size:o}){return e.reduce((i,a)=>(a.variants&&n in a.variants&&a3(i,a.variants[n](t,r,{variant:n,size:o})),a.sizes&&o in a.sizes&&a3(i,a.sizes[o](t,r,{variant:n,size:o})),i),{})}function at(e){const t=typeof e=="function"?e:()=>e;function r(n,o){const i=Lr(),a=hte(o==null?void 0:o.name),s=cR(),l={variant:o==null?void 0:o.variant,size:o==null?void 0:o.size},{css:c,cx:u}=pR(),f=t(i,n,l),d=e9(o==null?void 0:o.styles,i,n,l),p=e9(a,i,n,l),h=Ite({ctx:a,theme:i,params:n,variant:o==null?void 0:o.variant,size:o==null?void 0:o.size}),y=Object.fromEntries(Object.keys(f).map(_=>{const b=u({[c(f[_])]:!(o!=null&&o.unstyled)},c(h[_]),c(p[_]),c(d[_]));return[_,b]}));return{classes:Pte({cx:u,classes:y,context:a,classNames:o==null?void 0:o.classNames,name:o==null?void 0:o.name,cache:s}),cx:u,theme:i}}return r}function zo(e){return`___ref-${e||""}`}function hR({styles:e}){const t=Lr();return ae.createElement(Gp,{styles:qee(typeof e=="function"?e(t):e)})}var $te=Object.defineProperty,Tte=Object.defineProperties,Dte=Object.getOwnPropertyDescriptors,t9=Object.getOwnPropertySymbols,Mte=Object.prototype.hasOwnProperty,Rte=Object.prototype.propertyIsEnumerable,r9=(e,t,r)=>t in e?$te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Pf=(e,t)=>{for(var r in t||(t={}))Mte.call(t,r)&&r9(e,r,t[r]);if(t9)for(var r of t9(t))Rte.call(t,r)&&r9(e,r,t[r]);return e},Of=(e,t)=>Tte(e,Dte(t));const Af={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${me(10)})`},transitionProperty:"transform, opacity"},a0={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(-${me(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(${me(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${me(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${me(20)}) rotate(5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:Of(Pf({},Af),{common:{transformOrigin:"center center"}}),"pop-bottom-left":Of(Pf({},Af),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":Of(Pf({},Af),{common:{transformOrigin:"bottom right"}}),"pop-top-left":Of(Pf({},Af),{common:{transformOrigin:"top left"}}),"pop-top-right":Of(Pf({},Af),{common:{transformOrigin:"top right"}})},n9=["mousedown","touchstart"];function Nte(e,t,r){const n=I.useRef();return I.useEffect(()=>{const o=i=>{const{target:a}=i??{};if(Array.isArray(r)){const s=(a==null?void 0:a.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(a)&&a.tagName!=="HTML";r.every(c=>!!c&&!i.composedPath().includes(c))&&!s&&e()}else n.current&&!n.current.contains(a)&&e()};return(t||n9).forEach(i=>document.addEventListener(i,o)),()=>{(t||n9).forEach(i=>document.removeEventListener(i,o))}},[n,e,r]),n}function Fte({timeout:e=2e3}={}){const[t,r]=I.useState(null),[n,o]=I.useState(!1),[i,a]=I.useState(null),s=u=>{clearTimeout(i),a(setTimeout(()=>o(!1),e)),o(u)};return{copy:u=>{"clipboard"in navigator?navigator.clipboard.writeText(u).then(()=>s(!0)).catch(f=>r(f)):r(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{o(!1),r(null),clearTimeout(i)},error:t,copied:n}}function Bte(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function jte(e,t){return typeof t=="boolean"?t:typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function Lte(e,t,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){const[n,o]=I.useState(r?t:jte(e,t)),i=I.useRef();return I.useEffect(()=>{if("matchMedia"in window)return i.current=window.matchMedia(e),o(i.current.matches),Bte(i.current,a=>o(a.matches))},[e]),n}function ws(e,t,r){return Math.min(Math.max(e,t),r)}const i_=typeof document<"u"?I.useLayoutEffect:I.useEffect;function Jo(e,t){const r=I.useRef(!1);I.useEffect(()=>()=>{r.current=!1},[]),I.useEffect(()=>{if(r.current)return e();r.current=!0},t)}function vR({opened:e,shouldReturnFocus:t=!0}){const r=I.useRef(),n=()=>{var o;r.current&&"focus"in r.current&&typeof r.current.focus=="function"&&((o=r.current)==null||o.focus({preventScroll:!0}))};return Jo(()=>{let o=-1;const i=a=>{a.key==="Tab"&&window.clearTimeout(o)};return document.addEventListener("keydown",i),e?r.current=document.activeElement:t&&(o=window.setTimeout(n,10)),()=>{window.clearTimeout(o),document.removeEventListener("keydown",i)}},[e,t]),n}const zte=/input|select|textarea|button|object/,gR="a, input, select, textarea, button, object, [tabindex]";function Ute(e){return e.style.display==="none"}function Hte(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let r=e;for(;r&&!(r===document.body||r.nodeType===11);){if(Ute(r))return!1;r=r.parentNode}return!0}function mR(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function s3(e){const t=e.nodeName.toLowerCase(),r=!Number.isNaN(mR(e));return(zte.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||r)&&Hte(e)}function yR(e){const t=mR(e);return(Number.isNaN(t)||t>=0)&&s3(e)}function Vte(e){return Array.from(e.querySelectorAll(gR)).filter(yR)}function Wte(e,t){const r=Vte(e);if(!r.length){t.preventDefault();return}const n=r[t.shiftKey?0:r.length-1],o=e.getRootNode();if(!(n===o.activeElement||e===o.activeElement))return;t.preventDefault();const a=r[t.shiftKey?r.length-1:0];a&&a.focus()}function a_(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function qte(e,t="body > :not(script)"){const r=a_(),n=Array.from(document.querySelectorAll(t)).map(o=>{var i;if((i=o==null?void 0:o.shadowRoot)!=null&&i.contains(e)||o.contains(e))return;const a=o.getAttribute("aria-hidden"),s=o.getAttribute("data-hidden"),l=o.getAttribute("data-focus-id");return o.setAttribute("data-focus-id",r),a===null||a==="false"?o.setAttribute("aria-hidden","true"):!s&&!l&&o.setAttribute("data-hidden",a),{node:o,ariaHidden:s||null}});return()=>{n.forEach(o=>{!o||r!==o.node.getAttribute("data-focus-id")||(o.ariaHidden===null?o.node.removeAttribute("aria-hidden"):o.node.setAttribute("aria-hidden",o.ariaHidden),o.node.removeAttribute("data-focus-id"),o.node.removeAttribute("data-hidden"))})}}function Gte(e=!0){const t=I.useRef(),r=I.useRef(null),n=i=>{let a=i.querySelector("[data-autofocus]");if(!a){const s=Array.from(i.querySelectorAll(gR));a=s.find(yR)||s.find(s3)||null,!a&&s3(i)&&(a=i)}a&&a.focus({preventScroll:!0})},o=I.useCallback(i=>{if(e){if(i===null){r.current&&(r.current(),r.current=null);return}r.current=qte(i),t.current!==i&&(i?(setTimeout(()=>{i.getRootNode()&&n(i)}),t.current=i):t.current=null)}},[e]);return I.useEffect(()=>{if(!e)return;t.current&&setTimeout(()=>n(t.current));const i=a=>{a.key==="Tab"&&t.current&&Wte(t.current,a)};return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i),r.current&&r.current()}},[e]),o}const Kte=ae["useId".toString()]||(()=>{});function Yte(){const e=Kte();return e?`mantine-${e.replace(/:/g,"")}`:""}function Hl(e){const t=Yte(),[r,n]=I.useState(t);return i_(()=>{n(a_())},[]),typeof e=="string"?e:typeof window>"u"?t:r}function up(e,t,r){I.useEffect(()=>(window.addEventListener(e,t,r),()=>window.removeEventListener(e,t,r)),[e,t])}function Xte(e,t){try{return JSON.stringify(e)}catch{throw new Error(`@mantine/hooks ${t}: Failed to serialize the value`)}}function Zte(e){try{return JSON.parse(e)}catch{return e}}function Jte(e,t){const r=e==="localStorage"?"mantine-local-storage":"mantine-session-storage";return function({key:o,defaultValue:i=void 0,getInitialValueInEffect:a=!0,deserialize:s=Zte,serialize:l=c=>Xte(c,t)}){const c=I.useCallback(h=>{if(typeof window>"u"||!(e in window)||window[e]===null||h)return i;const y=window[e].getItem(o);return y!==null?s(y):i},[o,i]),[u,f]=I.useState(c(a)),d=I.useCallback(h=>{h instanceof Function?f(y=>{const _=h(y);return window[e].setItem(o,l(_)),window.dispatchEvent(new CustomEvent(r,{detail:{key:o,value:h(y)}})),_}):(window[e].setItem(o,l(h)),window.dispatchEvent(new CustomEvent(r,{detail:{key:o,value:h}})),f(h))},[o]),p=I.useCallback(()=>{window[e].removeItem(o),window.dispatchEvent(new CustomEvent(r,{detail:{key:o,value:i}}))},[]);return up("storage",h=>{var y;h.storageArea===window[e]&&h.key===o&&f(s((y=h.newValue)!=null?y:void 0))}),up(r,h=>{h.detail.key===o&&f(h.detail.value)}),I.useEffect(()=>{i!==void 0&&u===void 0&&d(i)},[i,u,d]),I.useEffect(()=>{a&&f(c())},[o]),[u===void 0?i:u,d,p]}}function bR(e){return Jte("localStorage","use-local-storage")(e)}function wR(e,t){typeof e=="function"?e(t):typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function xR(...e){return t=>{e.forEach(r=>wR(r,t))}}function Ws(...e){return I.useCallback(xR(...e),e)}function Qte(e,t,r="ltr"){const n=I.useRef(),o=I.useRef(!1),i=I.useRef(!1),a=I.useRef(0),[s,l]=I.useState(!1);return I.useEffect(()=>{o.current=!0},[]),I.useEffect(()=>{const c=({x:m,y:E})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(o.current&&n.current){n.current.style.userSelect="none";const A=n.current.getBoundingClientRect();if(A.width&&A.height){const D=ws((m-A.left)/A.width,0,1);e({x:r==="ltr"?D:1-D,y:ws((E-A.top)/A.height,0,1)})}}})},u=()=>{document.addEventListener("mousemove",y),document.addEventListener("mouseup",p),document.addEventListener("touchmove",b),document.addEventListener("touchend",p)},f=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",p),document.removeEventListener("touchmove",b),document.removeEventListener("touchend",p)},d=()=>{!i.current&&o.current&&(i.current=!0,typeof(t==null?void 0:t.onScrubStart)=="function"&&t.onScrubStart(),l(!0),u())},p=()=>{i.current&&o.current&&(i.current=!1,l(!1),f(),setTimeout(()=>{typeof(t==null?void 0:t.onScrubEnd)=="function"&&t.onScrubEnd()},0))},h=m=>{d(),m.preventDefault(),y(m)},y=m=>c({x:m.clientX,y:m.clientY}),_=m=>{m.cancelable&&m.preventDefault(),d(),b(m)},b=m=>{m.cancelable&&m.preventDefault(),c({x:m.changedTouches[0].clientX,y:m.changedTouches[0].clientY})};return n.current.addEventListener("mousedown",h),n.current.addEventListener("touchstart",_,{passive:!1}),()=>{n.current&&(n.current.removeEventListener("mousedown",h),n.current.removeEventListener("touchstart",_))}},[r,e]),{ref:n,active:s}}function Rl({value:e,defaultValue:t,finalValue:r,onChange:n=()=>{}}){const[o,i]=I.useState(t!==void 0?t:r),a=s=>{i(s),n==null||n(s)};return e!==void 0?[e,n,!0]:[o,a,!1]}function py(e,t){return Lte("(prefers-reduced-motion: reduce)",e,t)}const ere=e=>e<.5?2*e*e:-1+(4-2*e)*e,tre=({axis:e,target:t,parent:r,alignment:n,offset:o,isList:i})=>{if(!t||!r&&typeof document>"u")return 0;const a=!!r,l=(r||document.body).getBoundingClientRect(),c=t.getBoundingClientRect(),u=f=>c[f]-l[f];if(e==="y"){const f=u("top");if(f===0)return 0;if(n==="start"){const p=f-o;return p<=c.height*(i?0:1)||!i?p:0}const d=a?l.height:window.innerHeight;if(n==="end"){const p=f+o-d+c.height;return p>=-c.height*(i?0:1)||!i?p:0}return n==="center"?f-d/2+c.height/2:0}if(e==="x"){const f=u("left");if(f===0)return 0;if(n==="start"){const p=f-o;return p<=c.width||!i?p:0}const d=a?l.width:window.innerWidth;if(n==="end"){const p=f+o-d+c.width;return p>=-c.width||!i?p:0}return n==="center"?f-d/2+c.width/2:0}return 0},rre=({axis:e,parent:t})=>{if(!t&&typeof document>"u")return 0;const r=e==="y"?"scrollTop":"scrollLeft";if(t)return t[r];const{body:n,documentElement:o}=document;return n[r]+o[r]},nre=({axis:e,parent:t,distance:r})=>{if(!t&&typeof document>"u")return;const n=e==="y"?"scrollTop":"scrollLeft";if(t)t[n]=r;else{const{body:o,documentElement:i}=document;o[n]=r,i[n]=r}};function ore({duration:e=1250,axis:t="y",onScrollFinish:r,easing:n=ere,offset:o=0,cancelable:i=!0,isList:a=!1}={}){const s=I.useRef(0),l=I.useRef(0),c=I.useRef(!1),u=I.useRef(null),f=I.useRef(null),d=py(),p=()=>{s.current&&cancelAnimationFrame(s.current)},h=I.useCallback(({alignment:_="start"}={})=>{var b;c.current=!1,s.current&&p();const m=(b=rre({parent:u.current,axis:t}))!=null?b:0,E=tre({parent:u.current,target:f.current,axis:t,alignment:_,offset:o,isList:a})-(u.current?0:m);function A(){l.current===0&&(l.current=performance.now());const $=performance.now()-l.current,g=d||e===0?1:$/e,N=m+E*n(g);nre({parent:u.current,axis:t,distance:N}),!c.current&&g<1?s.current=requestAnimationFrame(A):(typeof r=="function"&&r(),l.current=0,s.current=0,p())}A()},[t,e,n,a,o,r,d]),y=()=>{i&&(c.current=!0)};return up("wheel",y,{passive:!0}),up("touchmove",y,{passive:!0}),I.useEffect(()=>p,[]),{scrollableRef:u,targetRef:f,scrollIntoView:h,cancel:p}}var ire=Object.defineProperty,are=Object.defineProperties,sre=Object.getOwnPropertyDescriptors,o9=Object.getOwnPropertySymbols,lre=Object.prototype.hasOwnProperty,cre=Object.prototype.propertyIsEnumerable,i9=(e,t,r)=>t in e?ire(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ure=(e,t)=>{for(var r in t||(t={}))lre.call(t,r)&&i9(e,r,t[r]);if(o9)for(var r of o9(t))cre.call(t,r)&&i9(e,r,t[r]);return e},fre=(e,t)=>are(e,sre(t));function dre(e){const t=e.toLowerCase().split("+").map(i=>i.trim()),r={alt:t.includes("alt"),ctrl:t.includes("ctrl"),meta:t.includes("meta"),mod:t.includes("mod"),shift:t.includes("shift")},n=["alt","ctrl","meta","shift","mod"],o=t.find(i=>!n.includes(i));return fre(ure({},r),{key:o})}function pre(e,t){const{alt:r,ctrl:n,meta:o,mod:i,shift:a,key:s}=e,{altKey:l,ctrlKey:c,metaKey:u,shiftKey:f,key:d}=t;if(r!==l)return!1;if(i){if(!c&&!u)return!1}else if(n!==c||o!==u)return!1;return a!==f?!1:!!(s&&(d.toLowerCase()===s.toLowerCase()||t.code.replace("Key","").toLowerCase()===s.toLowerCase()))}function hre(e){return t=>pre(dre(e),t)}function vre(e,t,r=!1){return e.target instanceof HTMLElement?(r||!e.target.isContentEditable)&&!t.includes(e.target.tagName):!0}function gre(e,t=["INPUT","TEXTAREA","SELECT"],r=!1){I.useEffect(()=>{const n=o=>{e.forEach(([i,a,s={preventDefault:!0}])=>{hre(i)(o)&&vre(o,t,r)&&(s.preventDefault&&o.preventDefault(),a(o))})};return document.documentElement.addEventListener("keydown",n),()=>document.documentElement.removeEventListener("keydown",n)},[e])}function a9(){if(typeof window>"u")return"undetermined";const{userAgent:e}=window.navigator,t=/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i,r=/(Win32)|(Win64)|(Windows)|(WinCE)/i,n=/(iPhone)|(iPad)|(iPod)/i;return t.test(e)?"macos":n.test(e)?"ios":r.test(e)?"windows":/Android/i.test(e)?"android":/Linux/i.test(e)?"linux":"undetermined"}function mre(e={getValueInEffect:!0}){const[t,r]=I.useState(e.getValueInEffect?"undetermined":a9());return i_(()=>{e.getValueInEffect&&r(a9)},[]),t}function _R(e=!1,t){const{onOpen:r,onClose:n}=t||{},[o,i]=I.useState(e),a=I.useCallback(()=>{i(c=>c||(r==null||r(),!0))},[r]),s=I.useCallback(()=>{i(c=>c&&(n==null||n(),!1))},[n]),l=I.useCallback(()=>{o?s():a()},[s,a,o]);return[o,{open:a,close:s,toggle:l}]}var s9=Object.getOwnPropertySymbols,yre=Object.prototype.hasOwnProperty,bre=Object.prototype.propertyIsEnumerable,wre=(e,t)=>{var r={};for(var n in e)yre.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&s9)for(var n of s9(e))t.indexOf(n)<0&&bre.call(e,n)&&(r[n]=e[n]);return r};function zu(e){const t=e,{m:r,mx:n,my:o,mt:i,mb:a,ml:s,mr:l,p:c,px:u,py:f,pt:d,pb:p,pl:h,pr:y,bg:_,c:b,opacity:m,ff:E,fz:A,fw:D,lts:$,ta:g,lh:N,fs:V,tt:K,td:W,w:P,miw:C,maw:v,h:w,mih:B,mah:R,bgsz:L,bgp:U,bgr:S,bga:F,pos:T,top:q,left:J,bottom:te,right:ie,inset:ce,display:oe}=t,ue=wre(t,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:lR({m:r,mx:n,my:o,mt:i,mb:a,ml:s,mr:l,p:c,px:u,py:f,pt:d,pb:p,pl:h,pr:y,bg:_,c:b,opacity:m,ff:E,fz:A,fw:D,lts:$,ta:g,lh:N,fs:V,tt:K,td:W,w:P,miw:C,maw:v,h:w,mih:B,mah:R,bgsz:L,bgp:U,bgr:S,bga:F,pos:T,top:q,left:J,bottom:te,right:ie,inset:ce,display:oe}),rest:ue}}function xre(e,t){const r=Object.keys(e).filter(n=>n!=="base").sort((n,o)=>xo(Re({size:n,sizes:t.breakpoints}))-xo(Re({size:o,sizes:t.breakpoints})));return"base"in e?["base",...r]:r}function _re({value:e,theme:t,getValue:r,property:n}){if(e==null)return;if(typeof e=="object")return xre(e,t).reduce((a,s)=>{if(s==="base"&&e.base!==void 0){const c=r(e.base,t);return Array.isArray(n)?(n.forEach(u=>{a[u]=c}),a):(a[n]=c,a)}const l=r(e[s],t);return Array.isArray(n)?(a[t.fn.largerThan(s)]={},n.forEach(c=>{a[t.fn.largerThan(s)][c]=l}),a):(a[t.fn.largerThan(s)]={[n]:l},a)},{});const o=r(e,t);return Array.isArray(n)?n.reduce((i,a)=>(i[a]=o,i),{}):{[n]:o}}function Ere(e,t){return e==="dimmed"?t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]:t.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background}function Sre(e){return me(e)}function Cre(e){return e}function Pre(e,t){return Re({size:e,sizes:t.fontSizes})}const Ore=["-xs","-sm","-md","-lg","-xl"];function Are(e,t){return Ore.includes(e)?`calc(${Re({size:e.replace("-",""),sizes:t.spacing})} * -1)`:Re({size:e,sizes:t.spacing})}const kre={identity:Cre,color:Ere,size:Sre,fontSize:Pre,spacing:Are},Ire={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"identity",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"identity",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"}};var $re=Object.defineProperty,l9=Object.getOwnPropertySymbols,Tre=Object.prototype.hasOwnProperty,Dre=Object.prototype.propertyIsEnumerable,c9=(e,t,r)=>t in e?$re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u9=(e,t)=>{for(var r in t||(t={}))Tre.call(t,r)&&c9(e,r,t[r]);if(l9)for(var r of l9(t))Dre.call(t,r)&&c9(e,r,t[r]);return e};function f9(e,t,r=Ire){return Object.keys(r).reduce((o,i)=>(i in e&&e[i]!==void 0&&o.push(_re({value:e[i],getValue:kre[r[i].type],property:r[i].property,theme:t})),o),[]).reduce((o,i)=>(Object.keys(i).forEach(a=>{typeof i[a]=="object"&&i[a]!==null&&a in o?o[a]=u9(u9({},o[a]),i[a]):o[a]=i[a]}),o),{})}function d9(e,t){return typeof e=="function"?e(t):e}function Mre(e,t,r){const n=Lr(),{css:o,cx:i}=pR();return Array.isArray(e)?i(r,o(f9(t,n)),e.map(a=>o(d9(a,n)))):i(r,o(d9(e,n)),o(f9(t,n)))}var Rre=Object.defineProperty,ov=Object.getOwnPropertySymbols,ER=Object.prototype.hasOwnProperty,SR=Object.prototype.propertyIsEnumerable,p9=(e,t,r)=>t in e?Rre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Nre=(e,t)=>{for(var r in t||(t={}))ER.call(t,r)&&p9(e,r,t[r]);if(ov)for(var r of ov(t))SR.call(t,r)&&p9(e,r,t[r]);return e},Fre=(e,t)=>{var r={};for(var n in e)ER.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ov)for(var n of ov(e))t.indexOf(n)<0&&SR.call(e,n)&&(r[n]=e[n]);return r};const CR=I.forwardRef((e,t)=>{var r=e,{className:n,component:o,style:i,sx:a}=r,s=Fre(r,["className","component","style","sx"]);const{systemStyles:l,rest:c}=zu(s),u=o||"div";return ae.createElement(u,Nre({ref:t,className:Mre(a,l,n),style:i},c))});CR.displayName="@mantine/core/Box";const rt=CR;var Bre=Object.defineProperty,jre=Object.defineProperties,Lre=Object.getOwnPropertyDescriptors,h9=Object.getOwnPropertySymbols,zre=Object.prototype.hasOwnProperty,Ure=Object.prototype.propertyIsEnumerable,v9=(e,t,r)=>t in e?Bre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g9=(e,t)=>{for(var r in t||(t={}))zre.call(t,r)&&v9(e,r,t[r]);if(h9)for(var r of h9(t))Ure.call(t,r)&&v9(e,r,t[r]);return e},Hre=(e,t)=>jre(e,Lre(t)),Vre=at(e=>({root:Hre(g9(g9({},e.fn.focusStyles()),e.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"})}));const Wre=Vre;var qre=Object.defineProperty,iv=Object.getOwnPropertySymbols,PR=Object.prototype.hasOwnProperty,OR=Object.prototype.propertyIsEnumerable,m9=(e,t,r)=>t in e?qre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Gre=(e,t)=>{for(var r in t||(t={}))PR.call(t,r)&&m9(e,r,t[r]);if(iv)for(var r of iv(t))OR.call(t,r)&&m9(e,r,t[r]);return e},Kre=(e,t)=>{var r={};for(var n in e)PR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&iv)for(var n of iv(e))t.indexOf(n)<0&&OR.call(e,n)&&(r[n]=e[n]);return r};const AR=I.forwardRef((e,t)=>{const r=et("UnstyledButton",{},e),{className:n,component:o="button",unstyled:i,variant:a}=r,s=Kre(r,["className","component","unstyled","variant"]),{classes:l,cx:c}=Wre(null,{name:"UnstyledButton",unstyled:i,variant:a});return ae.createElement(rt,Gre({component:o,ref:t,className:c(l.root,n),type:o==="button"?"button":void 0},s))});AR.displayName="@mantine/core/UnstyledButton";const Kp=AR;var Yre=Object.defineProperty,Xre=Object.defineProperties,Zre=Object.getOwnPropertyDescriptors,av=Object.getOwnPropertySymbols,kR=Object.prototype.hasOwnProperty,IR=Object.prototype.propertyIsEnumerable,y9=(e,t,r)=>t in e?Yre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tl=(e,t)=>{for(var r in t||(t={}))kR.call(t,r)&&y9(e,r,t[r]);if(av)for(var r of av(t))IR.call(t,r)&&y9(e,r,t[r]);return e},b2=(e,t)=>Xre(e,Zre(t)),Jre=(e,t)=>{var r={};for(var n in e)kR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&av)for(var n of av(e))t.indexOf(n)<0&&IR.call(e,n)&&(r[n]=e[n]);return r};function Qre(e){if(!e||typeof e=="string")return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function w2(e){return e!=null&&e.current?e.current.scrollHeight:"auto"}const s0=typeof window<"u"&&window.requestAnimationFrame;function ene({transitionDuration:e,transitionTimingFunction:t="ease",onTransitionEnd:r=()=>{},opened:n}){const o=I.useRef(null),i=0,a={display:"none",height:0,overflow:"hidden"},[s,l]=I.useState(n?{}:a),c=h=>{Hs.flushSync(()=>l(h))},u=h=>{c(y=>tl(tl({},y),h))};function f(h){return{transition:`height ${e||Qre(h)}ms ${t}`}}Jo(()=>{s0(n?()=>{u({willChange:"height",display:"block",overflow:"hidden"}),s0(()=>{const h=w2(o);u(b2(tl({},f(h)),{height:h}))})}:()=>{const h=w2(o);u(b2(tl({},f(h)),{willChange:"height",height:h})),s0(()=>u({height:i,overflow:"hidden"}))})},[n]);const d=h=>{if(!(h.target!==o.current||h.propertyName!=="height"))if(n){const y=w2(o);y===s.height?c({}):u({height:y}),r()}else s.height===i&&(c(a),r())};function p(h={}){var y=h,{style:_={},refKey:b="ref"}=y,m=Jre(y,["style","refKey"]);const E=m[b];return b2(tl({"aria-hidden":!n},m),{[b]:xR(o,E),onTransitionEnd:d,style:tl(tl({boxSizing:"border-box"},_),s)})}return p}var tne=Object.defineProperty,sv=Object.getOwnPropertySymbols,$R=Object.prototype.hasOwnProperty,TR=Object.prototype.propertyIsEnumerable,b9=(e,t,r)=>t in e?tne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l0=(e,t)=>{for(var r in t||(t={}))$R.call(t,r)&&b9(e,r,t[r]);if(sv)for(var r of sv(t))TR.call(t,r)&&b9(e,r,t[r]);return e},rne=(e,t)=>{var r={};for(var n in e)$R.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&sv)for(var n of sv(e))t.indexOf(n)<0&&TR.call(e,n)&&(r[n]=e[n]);return r};const nne={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},DR=I.forwardRef((e,t)=>{const r=et("Collapse",nne,e),{children:n,in:o,transitionDuration:i,transitionTimingFunction:a,style:s,onTransitionEnd:l,animateOpacity:c}=r,u=rne(r,["children","in","transitionDuration","transitionTimingFunction","style","onTransitionEnd","animateOpacity"]),f=Lr(),d=py(),h=(f.respectReducedMotion?d:!1)?0:i,{systemStyles:y,rest:_}=zu(u),b=ene({opened:o,transitionDuration:h,transitionTimingFunction:a,onTransitionEnd:l});return h===0?o?ae.createElement(rt,l0({},_),n):null:ae.createElement(rt,l0({},b(l0(l0({style:s,ref:t},_),y))),ae.createElement("div",{style:{opacity:o||!c?1:0,transition:c?`opacity ${h}ms ${a}`:"none"}},n))});DR.displayName="@mantine/core/Collapse";var one=Object.defineProperty,ine=Object.defineProperties,ane=Object.getOwnPropertyDescriptors,w9=Object.getOwnPropertySymbols,sne=Object.prototype.hasOwnProperty,lne=Object.prototype.propertyIsEnumerable,x9=(e,t,r)=>t in e?one(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l3=(e,t)=>{for(var r in t||(t={}))sne.call(t,r)&&x9(e,r,t[r]);if(w9)for(var r of w9(t))lne.call(t,r)&&x9(e,r,t[r]);return e},_9=(e,t)=>ine(e,ane(t));const cne=["subtle","filled","outline","light","default","transparent","gradient"],c0={xs:me(18),sm:me(22),md:me(28),lg:me(34),xl:me(44)};function une({variant:e,theme:t,color:r,gradient:n}){const o=t.fn.variant({color:r,variant:e,gradient:n});return e==="gradient"?{border:0,backgroundImage:o.background,color:o.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:cne.includes(e)?l3({border:`${me(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover})):null}var fne=at((e,{radius:t,color:r,gradient:n},{variant:o,size:i})=>({root:_9(l3({position:"relative",borderRadius:e.fn.radius(t),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:Re({size:i,sizes:c0}),minHeight:Re({size:i,sizes:c0}),width:Re({size:i,sizes:c0}),minWidth:Re({size:i,sizes:c0})},une({variant:o,theme:e,color:r,gradient:n})),{"&:active":e.activeStyles,"& [data-action-icon-loader]":{maxWidth:"70%"},"&:disabled, &[data-disabled]":{color:e.colors.gray[e.colorScheme==="dark"?6:4],cursor:"not-allowed",backgroundColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),borderColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":_9(l3({content:'""'},e.fn.cover(me(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}})}));const dne=fne;var pne=Object.defineProperty,lv=Object.getOwnPropertySymbols,MR=Object.prototype.hasOwnProperty,RR=Object.prototype.propertyIsEnumerable,E9=(e,t,r)=>t in e?pne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S9=(e,t)=>{for(var r in t||(t={}))MR.call(t,r)&&E9(e,r,t[r]);if(lv)for(var r of lv(t))RR.call(t,r)&&E9(e,r,t[r]);return e},C9=(e,t)=>{var r={};for(var n in e)MR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&lv)for(var n of lv(e))t.indexOf(n)<0&&RR.call(e,n)&&(r[n]=e[n]);return r};function hne(e){var t=e,{size:r,color:n}=t,o=C9(t,["size","color"]);const i=o,{style:a}=i,s=C9(i,["style"]);return ae.createElement("svg",S9({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:n,style:S9({width:r},a)},s),ae.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},ae.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),ae.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),ae.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},ae.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),ae.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),ae.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},ae.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),ae.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),ae.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},ae.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),ae.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),ae.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},ae.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),ae.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var vne=Object.defineProperty,cv=Object.getOwnPropertySymbols,NR=Object.prototype.hasOwnProperty,FR=Object.prototype.propertyIsEnumerable,P9=(e,t,r)=>t in e?vne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,O9=(e,t)=>{for(var r in t||(t={}))NR.call(t,r)&&P9(e,r,t[r]);if(cv)for(var r of cv(t))FR.call(t,r)&&P9(e,r,t[r]);return e},A9=(e,t)=>{var r={};for(var n in e)NR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&cv)for(var n of cv(e))t.indexOf(n)<0&&FR.call(e,n)&&(r[n]=e[n]);return r};function gne(e){var t=e,{size:r,color:n}=t,o=A9(t,["size","color"]);const i=o,{style:a}=i,s=A9(i,["style"]);return ae.createElement("svg",O9({viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:n,style:O9({width:r,height:r},a)},s),ae.createElement("g",{fill:"none",fillRule:"evenodd"},ae.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},ae.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),ae.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},ae.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var mne=Object.defineProperty,uv=Object.getOwnPropertySymbols,BR=Object.prototype.hasOwnProperty,jR=Object.prototype.propertyIsEnumerable,k9=(e,t,r)=>t in e?mne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I9=(e,t)=>{for(var r in t||(t={}))BR.call(t,r)&&k9(e,r,t[r]);if(uv)for(var r of uv(t))jR.call(t,r)&&k9(e,r,t[r]);return e},$9=(e,t)=>{var r={};for(var n in e)BR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&uv)for(var n of uv(e))t.indexOf(n)<0&&jR.call(e,n)&&(r[n]=e[n]);return r};function yne(e){var t=e,{size:r,color:n}=t,o=$9(t,["size","color"]);const i=o,{style:a}=i,s=$9(i,["style"]);return ae.createElement("svg",I9({viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:n,style:I9({width:r},a)},s),ae.createElement("circle",{cx:"15",cy:"15",r:"15"},ae.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),ae.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),ae.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},ae.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),ae.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),ae.createElement("circle",{cx:"105",cy:"15",r:"15"},ae.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),ae.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var bne=Object.defineProperty,fv=Object.getOwnPropertySymbols,LR=Object.prototype.hasOwnProperty,zR=Object.prototype.propertyIsEnumerable,T9=(e,t,r)=>t in e?bne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wne=(e,t)=>{for(var r in t||(t={}))LR.call(t,r)&&T9(e,r,t[r]);if(fv)for(var r of fv(t))zR.call(t,r)&&T9(e,r,t[r]);return e},xne=(e,t)=>{var r={};for(var n in e)LR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&fv)for(var n of fv(e))t.indexOf(n)<0&&zR.call(e,n)&&(r[n]=e[n]);return r};const x2={bars:hne,oval:gne,dots:yne},_ne={xs:me(18),sm:me(22),md:me(36),lg:me(44),xl:me(58)},Ene={size:"md"};function pu(e){const t=et("Loader",Ene,e),{size:r,color:n,variant:o}=t,i=xne(t,["size","color","variant"]),a=Lr(),s=o in x2?o:a.loader;return ae.createElement(rt,wne({role:"presentation",component:x2[s]||x2.bars,size:Re({size:r,sizes:_ne}),color:a.fn.variant({variant:"filled",primaryFallback:!1,color:n||a.primaryColor}).background},i))}pu.displayName="@mantine/core/Loader";var Sne=Object.defineProperty,dv=Object.getOwnPropertySymbols,UR=Object.prototype.hasOwnProperty,HR=Object.prototype.propertyIsEnumerable,D9=(e,t,r)=>t in e?Sne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M9=(e,t)=>{for(var r in t||(t={}))UR.call(t,r)&&D9(e,r,t[r]);if(dv)for(var r of dv(t))HR.call(t,r)&&D9(e,r,t[r]);return e},Cne=(e,t)=>{var r={};for(var n in e)UR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&dv)for(var n of dv(e))t.indexOf(n)<0&&HR.call(e,n)&&(r[n]=e[n]);return r};const Pne={color:"gray",size:"md",variant:"subtle"},VR=I.forwardRef((e,t)=>{const r=et("ActionIcon",Pne,e),{className:n,color:o,children:i,radius:a,size:s,variant:l,gradient:c,disabled:u,loaderProps:f,loading:d,unstyled:p,__staticSelector:h}=r,y=Cne(r,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:_,cx:b,theme:m}=dne({radius:a,color:o,gradient:c},{name:["ActionIcon",h],unstyled:p,size:s,variant:l}),E=ae.createElement(pu,M9({color:m.fn.variant({color:o,variant:l}).color,size:"100%","data-action-icon-loader":!0},f));return ae.createElement(Kp,M9({className:b(_.root,n),ref:t,disabled:u,"data-disabled":u||void 0,"data-loading":d||void 0,unstyled:p},y),d?E:i)});VR.displayName="@mantine/core/ActionIcon";const pv=VR;var One=Object.defineProperty,Ane=Object.defineProperties,kne=Object.getOwnPropertyDescriptors,hv=Object.getOwnPropertySymbols,WR=Object.prototype.hasOwnProperty,qR=Object.prototype.propertyIsEnumerable,R9=(e,t,r)=>t in e?One(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ine=(e,t)=>{for(var r in t||(t={}))WR.call(t,r)&&R9(e,r,t[r]);if(hv)for(var r of hv(t))qR.call(t,r)&&R9(e,r,t[r]);return e},$ne=(e,t)=>Ane(e,kne(t)),Tne=(e,t)=>{var r={};for(var n in e)WR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&hv)for(var n of hv(e))t.indexOf(n)<0&&qR.call(e,n)&&(r[n]=e[n]);return r};function GR(e){const t=et("Portal",{},e),{children:r,target:n,className:o,innerRef:i}=t,a=Tne(t,["children","target","className","innerRef"]),s=Lr(),[l,c]=I.useState(!1),u=I.useRef();return i_(()=>(c(!0),u.current=n?typeof n=="string"?document.querySelector(n):n:document.createElement("div"),n||document.body.appendChild(u.current),()=>{!n&&document.body.removeChild(u.current)}),[n]),l?Hs.createPortal(ae.createElement("div",$ne(Ine({className:o,dir:s.dir},a),{ref:i}),r),u.current):null}GR.displayName="@mantine/core/Portal";var Dne=Object.defineProperty,vv=Object.getOwnPropertySymbols,KR=Object.prototype.hasOwnProperty,YR=Object.prototype.propertyIsEnumerable,N9=(e,t,r)=>t in e?Dne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Mne=(e,t)=>{for(var r in t||(t={}))KR.call(t,r)&&N9(e,r,t[r]);if(vv)for(var r of vv(t))YR.call(t,r)&&N9(e,r,t[r]);return e},Rne=(e,t)=>{var r={};for(var n in e)KR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&vv)for(var n of vv(e))t.indexOf(n)<0&&YR.call(e,n)&&(r[n]=e[n]);return r};function Yp(e){var t=e,{withinPortal:r=!0,children:n}=t,o=Rne(t,["withinPortal","children"]);return r?ae.createElement(GR,Mne({},o),n):ae.createElement(ae.Fragment,null,n)}Yp.displayName="@mantine/core/OptionalPortal";var Nne=Object.defineProperty,Fne=Object.defineProperties,Bne=Object.getOwnPropertyDescriptors,F9=Object.getOwnPropertySymbols,jne=Object.prototype.hasOwnProperty,Lne=Object.prototype.propertyIsEnumerable,B9=(e,t,r)=>t in e?Nne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_2=(e,t)=>{for(var r in t||(t={}))jne.call(t,r)&&B9(e,r,t[r]);if(F9)for(var r of F9(t))Lne.call(t,r)&&B9(e,r,t[r]);return e},j9=(e,t)=>Fne(e,Bne(t));function zne({variant:e,color:t,theme:r}){if(e==="filled")return{backgroundColor:r.fn.variant({variant:"filled",color:t}).background,color:r.white};if(e==="outline"){const n=r.fn.variant({variant:"outline",color:t});return{color:n.color,borderColor:n.border,backgroundColor:r.colorScheme==="dark"?r.colors.dark[6]:r.white}}if(e==="light"){const n=r.fn.variant({variant:"light",color:t});return{backgroundColor:n.background,color:n.color}}return null}var Une=at((e,{radius:t,color:r},{variant:n})=>({root:_2(j9(_2({},e.fn.fontStyles()),{position:"relative",overflow:"hidden",paddingTop:e.spacing.sm,paddingBottom:e.spacing.sm,paddingLeft:e.spacing.md,paddingRight:e.spacing.sm,borderRadius:e.fn.radius(t),border:`${me(1)} solid transparent`}),zne({variant:n,color:r,theme:e})),wrapper:{display:"flex"},body:{flex:1},title:{boxSizing:"border-box",margin:0,marginBottom:e.spacing.xs,display:"flex",alignItems:"center",justifyContent:"space-between",lineHeight:e.lineHeight,fontSize:e.fontSizes.sm,fontWeight:700,"&[data-with-close-button]":{paddingRight:e.spacing.md}},label:{display:"block",overflow:"hidden",textOverflow:"ellipsis"},icon:{lineHeight:1,width:me(20),height:me(20),display:"flex",alignItems:"center",justifyContent:"flex-start",marginRight:e.spacing.md,marginTop:1},message:j9(_2({},e.fn.fontStyles()),{lineHeight:e.lineHeight,textOverflow:"ellipsis",overflow:"hidden",fontSize:e.fontSizes.sm,color:n==="filled"?e.white:e.colorScheme==="dark"?n==="light"?e.white:e.colors.dark[0]:e.black}),closeButton:{width:me(10),height:me(10),color:n==="filled"?e.white:e.colorScheme==="dark"?n==="light"?e.white:e.colors.dark[0]:e.black}}));const Hne=Une;var Vne=Object.defineProperty,gv=Object.getOwnPropertySymbols,XR=Object.prototype.hasOwnProperty,ZR=Object.prototype.propertyIsEnumerable,L9=(e,t,r)=>t in e?Vne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,z9=(e,t)=>{for(var r in t||(t={}))XR.call(t,r)&&L9(e,r,t[r]);if(gv)for(var r of gv(t))ZR.call(t,r)&&L9(e,r,t[r]);return e},Wne=(e,t)=>{var r={};for(var n in e)XR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&gv)for(var n of gv(e))t.indexOf(n)<0&&ZR.call(e,n)&&(r[n]=e[n]);return r};function JR(e){const t=e,{width:r,height:n,style:o}=t,i=Wne(t,["width","height","style"]);return ae.createElement("svg",z9({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:z9({width:r,height:n},o)},i),ae.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}JR.displayName="@mantine/core/CloseIcon";var qne=Object.defineProperty,mv=Object.getOwnPropertySymbols,QR=Object.prototype.hasOwnProperty,eN=Object.prototype.propertyIsEnumerable,U9=(e,t,r)=>t in e?qne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Gne=(e,t)=>{for(var r in t||(t={}))QR.call(t,r)&&U9(e,r,t[r]);if(mv)for(var r of mv(t))eN.call(t,r)&&U9(e,r,t[r]);return e},Kne=(e,t)=>{var r={};for(var n in e)QR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&mv)for(var n of mv(e))t.indexOf(n)<0&&eN.call(e,n)&&(r[n]=e[n]);return r};const Yne={xs:me(12),sm:me(16),md:me(20),lg:me(28),xl:me(34)},Xne={size:"sm"},tN=I.forwardRef((e,t)=>{const r=et("CloseButton",Xne,e),{iconSize:n,size:o,children:i}=r,a=Kne(r,["iconSize","size","children"]),s=me(n||Yne[o]);return ae.createElement(pv,Gne({ref:t,__staticSelector:"CloseButton",size:o},a),i||ae.createElement(JR,{width:s,height:s}))});tN.displayName="@mantine/core/CloseButton";const s_=tN;var Zne=Object.defineProperty,yv=Object.getOwnPropertySymbols,rN=Object.prototype.hasOwnProperty,nN=Object.prototype.propertyIsEnumerable,H9=(e,t,r)=>t in e?Zne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jne=(e,t)=>{for(var r in t||(t={}))rN.call(t,r)&&H9(e,r,t[r]);if(yv)for(var r of yv(t))nN.call(t,r)&&H9(e,r,t[r]);return e},Qne=(e,t)=>{var r={};for(var n in e)rN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&yv)for(var n of yv(e))t.indexOf(n)<0&&nN.call(e,n)&&(r[n]=e[n]);return r};const eoe={variant:"light"},oN=I.forwardRef((e,t)=>{const r=et("Alert",eoe,e),{id:n,className:o,title:i,variant:a,children:s,color:l,classNames:c,icon:u,styles:f,onClose:d,radius:p,withCloseButton:h,closeButtonLabel:y,unstyled:_}=r,b=Qne(r,["id","className","title","variant","children","color","classNames","icon","styles","onClose","radius","withCloseButton","closeButtonLabel","unstyled"]),{classes:m,cx:E}=Hne({color:l,radius:p},{classNames:c,styles:f,unstyled:_,variant:a,name:"Alert"}),A=Hl(n),D=i&&`${A}-title`,$=`${A}-body`;return ae.createElement(rt,Jne({id:A,role:"alert","aria-labelledby":D,"aria-describedby":$,className:E(m.root,m[a],o),ref:t},b),ae.createElement("div",{className:m.wrapper},u&&ae.createElement("div",{className:m.icon},u),ae.createElement("div",{className:m.body},i&&ae.createElement("div",{className:m.title,"data-with-close-button":h||void 0},ae.createElement("span",{id:D,className:m.label},i)),ae.createElement("div",{id:$,className:m.message},s)),h&&ae.createElement(s_,{className:m.closeButton,onClick:d,variant:"transparent",size:16,iconSize:16,"aria-label":y})))});oN.displayName="@mantine/core/Alert";var toe=Object.defineProperty,roe=Object.defineProperties,noe=Object.getOwnPropertyDescriptors,V9=Object.getOwnPropertySymbols,ooe=Object.prototype.hasOwnProperty,ioe=Object.prototype.propertyIsEnumerable,W9=(e,t,r)=>t in e?toe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u0=(e,t)=>{for(var r in t||(t={}))ooe.call(t,r)&&W9(e,r,t[r]);if(V9)for(var r of V9(t))ioe.call(t,r)&&W9(e,r,t[r]);return e},aoe=(e,t)=>roe(e,noe(t));function soe({underline:e,strikethrough:t}){const r=[];return e&&r.push("underline"),t&&r.push("line-through"),r.length>0?r.join(" "):"none"}function loe({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?e.fn.variant({variant:"filled",color:t}).background:t||"inherit"}function coe(e){return typeof e=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}:null}function uoe({theme:e,truncate:t}){return t==="start"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",direction:e.dir==="ltr"?"rtl":"ltr",textAlign:e.dir==="ltr"?"right":"left"}:t?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:null}var foe=at((e,{color:t,lineClamp:r,truncate:n,inline:o,inherit:i,underline:a,gradient:s,weight:l,transform:c,align:u,strikethrough:f,italic:d},{size:p})=>{const h=e.fn.variant({variant:"gradient",gradient:s});return{root:aoe(u0(u0(u0(u0({},e.fn.fontStyles()),e.fn.focusStyles()),coe(r)),uoe({theme:e,truncate:n})),{color:loe({color:t,theme:e}),fontFamily:i?"inherit":e.fontFamily,fontSize:i||p===void 0?"inherit":Re({size:p,sizes:e.fontSizes}),lineHeight:i?"inherit":o?1:e.lineHeight,textDecoration:soe({underline:a,strikethrough:f}),WebkitTapHighlightColor:"transparent",fontWeight:i?"inherit":l,textTransform:c,textAlign:u,fontStyle:d?"italic":void 0}),gradient:{backgroundImage:h.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}});const doe=foe;var poe=Object.defineProperty,bv=Object.getOwnPropertySymbols,iN=Object.prototype.hasOwnProperty,aN=Object.prototype.propertyIsEnumerable,q9=(e,t,r)=>t in e?poe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hoe=(e,t)=>{for(var r in t||(t={}))iN.call(t,r)&&q9(e,r,t[r]);if(bv)for(var r of bv(t))aN.call(t,r)&&q9(e,r,t[r]);return e},voe=(e,t)=>{var r={};for(var n in e)iN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&bv)for(var n of bv(e))t.indexOf(n)<0&&aN.call(e,n)&&(r[n]=e[n]);return r};const goe={variant:"text"},sN=I.forwardRef((e,t)=>{const r=et("Text",goe,e),{className:n,size:o,weight:i,transform:a,color:s,align:l,variant:c,lineClamp:u,truncate:f,gradient:d,inline:p,inherit:h,underline:y,strikethrough:_,italic:b,classNames:m,styles:E,unstyled:A,span:D,__staticSelector:$}=r,g=voe(r,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:N,cx:V}=doe({color:s,lineClamp:u,truncate:f,inline:p,inherit:h,underline:y,strikethrough:_,italic:b,weight:i,transform:a,align:l,gradient:d},{unstyled:A,name:$||"Text",variant:c,size:o});return ae.createElement(rt,hoe({ref:t,className:V(N.root,{[N.gradient]:c==="gradient"},n),component:D?"span":"div"},g))});sN.displayName="@mantine/core/Text";const St=sN;var moe=Object.defineProperty,G9=Object.getOwnPropertySymbols,yoe=Object.prototype.hasOwnProperty,boe=Object.prototype.propertyIsEnumerable,K9=(e,t,r)=>t in e?moe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,woe=(e,t)=>{for(var r in t||(t={}))yoe.call(t,r)&&K9(e,r,t[r]);if(G9)for(var r of G9(t))boe.call(t,r)&&K9(e,r,t[r]);return e};function xoe({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():e.fn.themeColor(t||e.primaryColor,e.colorScheme==="dark"?4:7,!1,!0)}var _oe=at((e,{color:t,underline:r})=>({root:woe({backgroundColor:"transparent",cursor:"pointer",padding:0,border:0,color:xoe({theme:e,color:t})},e.fn.hover({textDecoration:r?"underline":"none"}))}));const Eoe=_oe;var Soe=Object.defineProperty,wv=Object.getOwnPropertySymbols,lN=Object.prototype.hasOwnProperty,cN=Object.prototype.propertyIsEnumerable,Y9=(e,t,r)=>t in e?Soe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,X9=(e,t)=>{for(var r in t||(t={}))lN.call(t,r)&&Y9(e,r,t[r]);if(wv)for(var r of wv(t))cN.call(t,r)&&Y9(e,r,t[r]);return e},Coe=(e,t)=>{var r={};for(var n in e)lN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&wv)for(var n of wv(e))t.indexOf(n)<0&&cN.call(e,n)&&(r[n]=e[n]);return r};const Poe={underline:!0},uN=I.forwardRef((e,t)=>{const r=et("Anchor",Poe,e),{component:n,className:o,unstyled:i,variant:a,size:s,color:l,underline:c}=r,u=Coe(r,["component","className","unstyled","variant","size","color","underline"]),{classes:f,cx:d}=Eoe({color:l,underline:c},{name:"Anchor",unstyled:i,variant:a,size:s}),p=n==="button"?{type:"button"}:null;return ae.createElement(St,X9(X9({component:n||"a",ref:t,className:d(f.root,o),size:s},p),u))});uN.displayName="@mantine/core/Anchor";const c3=uN,fN=I.createContext({zIndex:1e3,fixed:!1,layout:"default"}),Ooe=fN.Provider;function dN(){return I.useContext(fN)}function hy(e,t){if(!e)return[];const r=Object.keys(e).filter(n=>n!=="base").map(n=>[Re({size:n,sizes:t.breakpoints,units:"em"}),e[n]]);return r.sort((n,o)=>xo(n[0])-xo(o[0])),r}var Aoe=Object.defineProperty,koe=Object.defineProperties,Ioe=Object.getOwnPropertyDescriptors,Z9=Object.getOwnPropertySymbols,$oe=Object.prototype.hasOwnProperty,Toe=Object.prototype.propertyIsEnumerable,J9=(e,t,r)=>t in e?Aoe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f0=(e,t)=>{for(var r in t||(t={}))$oe.call(t,r)&&J9(e,r,t[r]);if(Z9)for(var r of Z9(t))Toe.call(t,r)&&J9(e,r,t[r]);return e},Q9=(e,t)=>koe(e,Ioe(t)),Doe=at((e,{height:t,width:r,fixed:n,position:o,hiddenBreakpoint:i,zIndex:a,section:s,withBorder:l,layout:c})=>{const u=typeof r=="object"&&r!==null?hy(r,e).reduce((d,[p,h])=>(d[`@media (min-width: ${mn(p)})`]={width:me(h),minWidth:me(h)},d),{}):null,f=l?{[s==="navbar"?"borderRight":"borderLeft"]:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`}:{};return{root:Q9(f0(f0(Q9(f0(f0({},e.fn.fontStyles()),o),{top:c==="alt"?0:(o==null?void 0:o.top)||"var(--mantine-header-height)",bottom:0,zIndex:a,height:t?me(t):c==="alt"?"auto":"calc(100vh - var(--mantine-header-height, 0rem) - var(--mantine-footer-height, 0rem))",width:r!=null&&r.base?me(r==null?void 0:r.base):"100%",position:n?"fixed":"static",boxSizing:"border-box",display:"flex",flexDirection:"column",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),f),u),{"&[data-hidden]":{[`@media (max-width: ${mn(xo(Re({size:i,sizes:e.breakpoints}))-1)})`]:{display:"none"}}})}});const Moe=Doe;var Roe=Object.defineProperty,xv=Object.getOwnPropertySymbols,pN=Object.prototype.hasOwnProperty,hN=Object.prototype.propertyIsEnumerable,e7=(e,t,r)=>t in e?Roe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,t7=(e,t)=>{for(var r in t||(t={}))pN.call(t,r)&&e7(e,r,t[r]);if(xv)for(var r of xv(t))hN.call(t,r)&&e7(e,r,t[r]);return e},Noe=(e,t)=>{var r={};for(var n in e)pN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&xv)for(var n of xv(e))t.indexOf(n)<0&&hN.call(e,n)&&(r[n]=e[n]);return r};const vN=I.forwardRef((e,t)=>{var r=e,{width:n,height:o,fixed:i=!1,position:a,zIndex:s,hiddenBreakpoint:l="md",hidden:c=!1,withBorder:u=!0,className:f,classNames:d,styles:p,children:h,section:y,__staticSelector:_,unstyled:b,variant:m}=r,E=Noe(r,["width","height","fixed","position","zIndex","hiddenBreakpoint","hidden","withBorder","className","classNames","styles","children","section","__staticSelector","unstyled","variant"]);const A=dN(),{classes:D,cx:$,theme:g}=Moe({width:n,height:o,fixed:A.fixed||i,position:a,hiddenBreakpoint:l,zIndex:s||A.zIndex||Vs("app"),section:y,withBorder:u,layout:A.layout},{classNames:d,styles:p,name:_,unstyled:b,variant:m}),N=hy(n,g).reduce((V,[K,W])=>(V[`@media (min-width: ${mn(K)})`]={[`--mantine-${y}-width`]:me(W)},V),{});return ae.createElement(rt,t7({component:y==="navbar"?"nav":"aside",ref:t,"data-hidden":c||void 0,className:$(D.root,f)},E),h,ae.createElement(hR,{styles:()=>({":root":t7({[`--mantine-${y}-width`]:n!=null&&n.base?me(n.base):"0rem"},N)})}))});vN.displayName="@mantine/core/HorizontalSection";var Foe=Object.defineProperty,_v=Object.getOwnPropertySymbols,gN=Object.prototype.hasOwnProperty,mN=Object.prototype.propertyIsEnumerable,r7=(e,t,r)=>t in e?Foe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Boe=(e,t)=>{for(var r in t||(t={}))gN.call(t,r)&&r7(e,r,t[r]);if(_v)for(var r of _v(t))mN.call(t,r)&&r7(e,r,t[r]);return e},joe=(e,t)=>{var r={};for(var n in e)gN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&_v)for(var n of _v(e))t.indexOf(n)<0&&mN.call(e,n)&&(r[n]=e[n]);return r};const yN=I.forwardRef((e,t)=>{var r=e,{children:n,grow:o=!1,sx:i}=r,a=joe(r,["children","grow","sx"]);return ae.createElement(rt,Boe({ref:t,sx:[{flex:o?1:0,boxSizing:"border-box"},...W6(i)]},a),n)});yN.displayName="@mantine/core/Section";const Loe=yN;var zoe=Object.defineProperty,n7=Object.getOwnPropertySymbols,Uoe=Object.prototype.hasOwnProperty,Hoe=Object.prototype.propertyIsEnumerable,o7=(e,t,r)=>t in e?zoe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Voe=(e,t)=>{for(var r in t||(t={}))Uoe.call(t,r)&&o7(e,r,t[r]);if(n7)for(var r of n7(t))Hoe.call(t,r)&&o7(e,r,t[r]);return e};const Woe={fixed:!1,position:{top:0,left:0},hiddenBreakpoint:"md",hidden:!1},Ev=I.forwardRef((e,t)=>{const r=et("Navbar",Woe,e);return ae.createElement(vN,Voe({section:"navbar",__staticSelector:"Navbar",ref:t},r))});Ev.Section=Loe;Ev.displayName="@mantine/core/Navbar";var qoe=Object.defineProperty,Goe=Object.defineProperties,Koe=Object.getOwnPropertyDescriptors,i7=Object.getOwnPropertySymbols,Yoe=Object.prototype.hasOwnProperty,Xoe=Object.prototype.propertyIsEnumerable,a7=(e,t,r)=>t in e?qoe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,E2=(e,t)=>{for(var r in t||(t={}))Yoe.call(t,r)&&a7(e,r,t[r]);if(i7)for(var r of i7(t))Xoe.call(t,r)&&a7(e,r,t[r]);return e},s7=(e,t)=>Goe(e,Koe(t)),Zoe=at((e,{height:t,fixed:r,position:n,zIndex:o,borderPosition:i,layout:a})=>{const s=typeof t=="object"&&t!==null?hy(t,e).reduce((l,[c,u])=>(l[`@media (min-width: ${mn(c)})`]={height:me(u),minHeight:me(u)},l),{}):null;return{root:s7(E2(s7(E2(E2({},e.fn.fontStyles()),n),{zIndex:o,left:a==="alt"?"var(--mantine-navbar-width, 0)":0,right:a==="alt"?"var(--mantine-aside-width, 0)":0,height:typeof t=="object"?me(t==null?void 0:t.base)||"100%":me(t),maxHeight:typeof t=="object"?me(t==null?void 0:t.base)||"100%":me(t),position:r?"fixed":"static",boxSizing:"border-box",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),s),{borderBottom:i==="bottom"?`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0,borderTop:i==="top"?`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0})}});const Joe=Zoe;var Qoe=Object.defineProperty,Sv=Object.getOwnPropertySymbols,bN=Object.prototype.hasOwnProperty,wN=Object.prototype.propertyIsEnumerable,l7=(e,t,r)=>t in e?Qoe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c7=(e,t)=>{for(var r in t||(t={}))bN.call(t,r)&&l7(e,r,t[r]);if(Sv)for(var r of Sv(t))wN.call(t,r)&&l7(e,r,t[r]);return e},eie=(e,t)=>{var r={};for(var n in e)bN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Sv)for(var n of Sv(e))t.indexOf(n)<0&&wN.call(e,n)&&(r[n]=e[n]);return r};const l_=I.forwardRef((e,t)=>{var r=e,{children:n,className:o,classNames:i,styles:a,height:s,fixed:l=!1,withBorder:c=!0,position:u,zIndex:f,section:d,unstyled:p,__staticSelector:h,variant:y}=r,_=eie(r,["children","className","classNames","styles","height","fixed","withBorder","position","zIndex","section","unstyled","__staticSelector","variant"]);const b=dN(),m=f||b.zIndex||Vs("app"),{classes:E,cx:A,theme:D}=Joe({height:s,fixed:b.fixed||l,position:u,zIndex:typeof m=="number"&&b.layout==="default"?m+1:m,layout:b.layout,borderPosition:c?d==="header"?"bottom":"top":"none"},{name:h,classNames:i,styles:a,unstyled:p,variant:y}),$=typeof s=="object"&&s!==null?hy(s,D).reduce((g,[N,V])=>(g[`@media (min-width: ${mn(N)})`]={[`--mantine-${d}-height`]:me(V)},g),{}):null;return ae.createElement(rt,c7({component:d==="header"?"header":"footer",className:A(E.root,o),ref:t},_),n,ae.createElement(hR,{styles:()=>({":root":c7({[`--mantine-${d}-height`]:typeof s=="object"?me(s==null?void 0:s.base)||"100%":me(s)},$)})}))});l_.displayName="@mantine/core/VerticalSection";var tie=Object.defineProperty,rie=Object.defineProperties,nie=Object.getOwnPropertyDescriptors,u7=Object.getOwnPropertySymbols,oie=Object.prototype.hasOwnProperty,iie=Object.prototype.propertyIsEnumerable,f7=(e,t,r)=>t in e?tie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,aie=(e,t)=>{for(var r in t||(t={}))oie.call(t,r)&&f7(e,r,t[r]);if(u7)for(var r of u7(t))iie.call(t,r)&&f7(e,r,t[r]);return e},sie=(e,t)=>rie(e,nie(t));const lie={fixed:!1,position:{top:0,left:0,right:0}},xN=I.forwardRef((e,t)=>{const r=et("Header",lie,e);return ae.createElement(l_,sie(aie({section:"header",__staticSelector:"Header"},r),{ref:t}))});xN.displayName="@mantine/core/Header";var cie=Object.defineProperty,uie=Object.defineProperties,fie=Object.getOwnPropertyDescriptors,d7=Object.getOwnPropertySymbols,die=Object.prototype.hasOwnProperty,pie=Object.prototype.propertyIsEnumerable,p7=(e,t,r)=>t in e?cie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hie=(e,t)=>{for(var r in t||(t={}))die.call(t,r)&&p7(e,r,t[r]);if(d7)for(var r of d7(t))pie.call(t,r)&&p7(e,r,t[r]);return e},vie=(e,t)=>uie(e,fie(t));const gie={fixed:!1,position:{bottom:0,left:0,right:0}},_N=I.forwardRef((e,t)=>{const r=et("Footer",gie,e);return ae.createElement(l_,vie(hie({section:"footer",__staticSelector:"Footer"},r),{ref:t}))});_N.displayName="@mantine/core/Footer";var mie=Object.defineProperty,h7=Object.getOwnPropertySymbols,yie=Object.prototype.hasOwnProperty,bie=Object.prototype.propertyIsEnumerable,v7=(e,t,r)=>t in e?mie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,EN=(e,t)=>{for(var r in t||(t={}))yie.call(t,r)&&v7(e,r,t[r]);if(h7)for(var r of h7(t))bie.call(t,r)&&v7(e,r,t[r]);return e};function wie(e,t){const r=Re({size:e.padding,sizes:t.spacing}),n=e.navbarOffsetBreakpoint?Re({size:e.navbarOffsetBreakpoint,sizes:t.breakpoints}):null,o=e.asideOffsetBreakpoint?Re({size:e.asideOffsetBreakpoint,sizes:t.breakpoints}):null;if(!e.fixed)return{padding:r};const i=xo(n),a=xo(o);return EN({minHeight:"100vh",paddingTop:`calc(var(--mantine-header-height, 0px) + ${r})`,paddingBottom:`calc(var(--mantine-footer-height, 0px) + ${r})`,paddingLeft:`calc(var(--mantine-navbar-width, 0px) + ${r})`,paddingRight:`calc(var(--mantine-aside-width, 0px) + ${r})`},i===a?{[`@media (max-width: ${mn(i-1)})`]:{paddingLeft:r,paddingRight:r}}:{[`@media (max-width: ${mn(i-1)})`]:{paddingLeft:r},[`@media (max-width: ${mn(a-1)})`]:{paddingRight:r}})}var xie=at((e,t)=>({root:{boxSizing:"border-box"},body:{display:"flex",boxSizing:"border-box"},main:EN({flex:1,width:"100vw",boxSizing:"border-box"},wie(t,e))}));const _ie=xie;var Eie=Object.defineProperty,Cv=Object.getOwnPropertySymbols,SN=Object.prototype.hasOwnProperty,CN=Object.prototype.propertyIsEnumerable,g7=(e,t,r)=>t in e?Eie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Sie=(e,t)=>{for(var r in t||(t={}))SN.call(t,r)&&g7(e,r,t[r]);if(Cv)for(var r of Cv(t))CN.call(t,r)&&g7(e,r,t[r]);return e},Cie=(e,t)=>{var r={};for(var n in e)SN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Cv)for(var n of Cv(e))t.indexOf(n)<0&&CN.call(e,n)&&(r[n]=e[n]);return r};const Pie={fixed:!0,padding:"md"},PN=I.forwardRef((e,t)=>{const r=et("AppShell",Pie,e),{children:n,navbar:o,header:i,footer:a,aside:s,fixed:l,zIndex:c,padding:u,navbarOffsetBreakpoint:f,asideOffsetBreakpoint:d,className:p,styles:h,classNames:y,unstyled:_,hidden:b,layout:m,variant:E}=r,A=Cie(r,["children","navbar","header","footer","aside","fixed","zIndex","padding","navbarOffsetBreakpoint","asideOffsetBreakpoint","className","styles","classNames","unstyled","hidden","layout","variant"]),{classes:D,cx:$}=_ie({padding:u,fixed:l,navbarOffsetBreakpoint:f,asideOffsetBreakpoint:d},{styles:h,classNames:y,unstyled:_,name:"AppShell",variant:E});return b?ae.createElement(ae.Fragment,null,n):ae.createElement(Ooe,{value:{fixed:l,zIndex:c,layout:m}},ae.createElement(rt,Sie({className:$(D.root,p),ref:t},A),i,ae.createElement("div",{className:D.body},o,ae.createElement("main",{className:D.main},n),s),a))});PN.displayName="@mantine/core/AppShell";const d0={xs:me(1),sm:me(2),md:me(3),lg:me(4),xl:me(5)};function p0(e,t){const r=e.fn.variant({variant:"outline",color:t}).border;return typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?r:t===void 0?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]:t}var Oie=at((e,{color:t},{size:r,variant:n})=>({root:{},withLabel:{borderTop:"0 !important"},left:{"&::before":{display:"none"}},right:{"&::after":{display:"none"}},label:{display:"flex",alignItems:"center","&::before":{content:'""',flex:1,height:me(1),borderTop:`${Re({size:r,sizes:d0})} ${n} ${p0(e,t)}`,marginRight:e.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${Re({size:r,sizes:d0})} ${n} ${p0(e,t)}`,marginLeft:e.spacing.xs}},labelDefaultStyles:{color:t==="dark"?e.colors.dark[1]:e.fn.themeColor(t,e.colorScheme==="dark"?5:e.fn.primaryShade(),!1)},horizontal:{border:0,borderTopWidth:me(Re({size:r,sizes:d0})),borderTopColor:p0(e,t),borderTopStyle:n,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:me(Re({size:r,sizes:d0})),borderLeftColor:p0(e,t),borderLeftStyle:n}}));const Aie=Oie;var kie=Object.defineProperty,Iie=Object.defineProperties,$ie=Object.getOwnPropertyDescriptors,Pv=Object.getOwnPropertySymbols,ON=Object.prototype.hasOwnProperty,AN=Object.prototype.propertyIsEnumerable,m7=(e,t,r)=>t in e?kie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y7=(e,t)=>{for(var r in t||(t={}))ON.call(t,r)&&m7(e,r,t[r]);if(Pv)for(var r of Pv(t))AN.call(t,r)&&m7(e,r,t[r]);return e},Tie=(e,t)=>Iie(e,$ie(t)),Die=(e,t)=>{var r={};for(var n in e)ON.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Pv)for(var n of Pv(e))t.indexOf(n)<0&&AN.call(e,n)&&(r[n]=e[n]);return r};const Mie={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},u3=I.forwardRef((e,t)=>{const r=et("Divider",Mie,e),{className:n,color:o,orientation:i,size:a,label:s,labelPosition:l,labelProps:c,variant:u,styles:f,classNames:d,unstyled:p}=r,h=Die(r,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:y,cx:_}=Aie({color:o},{classNames:d,styles:f,unstyled:p,name:"Divider",variant:u,size:a}),b=i==="vertical",m=i==="horizontal",E=!!s&&m,A=!(c!=null&&c.color);return ae.createElement(rt,y7({ref:t,className:_(y.root,{[y.vertical]:b,[y.horizontal]:m,[y.withLabel]:E},n),role:"separator"},h),E&&ae.createElement(St,Tie(y7({},c),{size:(c==null?void 0:c.size)||"xs",mt:me(2),className:_(y.label,y[l],{[y.labelDefaultStyles]:A})}),s))});u3.displayName="@mantine/core/Divider";var Rie=Object.defineProperty,Nie=Object.defineProperties,Fie=Object.getOwnPropertyDescriptors,b7=Object.getOwnPropertySymbols,Bie=Object.prototype.hasOwnProperty,jie=Object.prototype.propertyIsEnumerable,w7=(e,t,r)=>t in e?Rie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x7=(e,t)=>{for(var r in t||(t={}))Bie.call(t,r)&&w7(e,r,t[r]);if(b7)for(var r of b7(t))jie.call(t,r)&&w7(e,r,t[r]);return e},Lie=(e,t)=>Nie(e,Fie(t)),zie=at((e,t,{size:r})=>({item:Lie(x7({},e.fn.fontStyles()),{boxSizing:"border-box",wordBreak:"break-all",textAlign:"left",width:"100%",padding:`calc(${Re({size:r,sizes:e.spacing})} / 1.5) ${Re({size:r,sizes:e.spacing})}`,cursor:"pointer",fontSize:Re({size:r,sizes:e.fontSizes}),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderRadius:e.fn.radius(),"&[data-hovered]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[1]},"&[data-selected]":x7({backgroundColor:e.fn.variant({variant:"filled"}).background,color:e.fn.variant({variant:"filled"}).color},e.fn.hover({backgroundColor:e.fn.variant({variant:"filled"}).hover})),"&[data-disabled]":{cursor:"default",color:e.colors.dark[2]}}),nothingFound:{boxSizing:"border-box",color:e.colors.gray[6],paddingTop:`calc(${Re({size:r,sizes:e.spacing})} / 2)`,paddingBottom:`calc(${Re({size:r,sizes:e.spacing})} / 2)`,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${Re({size:r,sizes:e.spacing})} / 1.5) ${Re({size:r,sizes:e.spacing})}`},separatorLabel:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}));const Uie=zie;var Hie=Object.defineProperty,_7=Object.getOwnPropertySymbols,Vie=Object.prototype.hasOwnProperty,Wie=Object.prototype.propertyIsEnumerable,E7=(e,t,r)=>t in e?Hie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qie=(e,t)=>{for(var r in t||(t={}))Vie.call(t,r)&&E7(e,r,t[r]);if(_7)for(var r of _7(t))Wie.call(t,r)&&E7(e,r,t[r]);return e};function kN({data:e,hovered:t,classNames:r,styles:n,isItemSelected:o,uuid:i,__staticSelector:a,onItemHover:s,onItemSelect:l,itemsRefs:c,itemComponent:u,size:f,nothingFound:d,creatable:p,createLabel:h,unstyled:y,variant:_}){const{classes:b}=Uie(null,{classNames:r,styles:n,unstyled:y,name:a,variant:_,size:f}),m=[],E=[];let A=null;const D=(g,N)=>{const V=typeof o=="function"?o(g.value):!1;return ae.createElement(u,qie({key:g.value,className:b.item,"data-disabled":g.disabled||void 0,"data-hovered":!g.disabled&&t===N||void 0,"data-selected":!g.disabled&&V||void 0,selected:V,onMouseEnter:()=>s(N),id:`${i}-${N}`,role:"option",tabIndex:-1,"aria-selected":t===N,ref:K=>{c&&c.current&&(c.current[g.value]=K)},onMouseDown:g.disabled?null:K=>{K.preventDefault(),l(g)},disabled:g.disabled,variant:_},g))};let $=null;if(e.forEach((g,N)=>{g.creatable?A=N:g.group?($!==g.group&&($=g.group,E.push(ae.createElement("div",{className:b.separator,key:`__mantine-divider-${N}`},ae.createElement(u3,{classNames:{label:b.separatorLabel},label:g.group})))),E.push(D(g,N))):m.push(D(g,N))}),p){const g=e[A];m.push(ae.createElement("div",{key:a_(),className:b.item,"data-hovered":t===A||void 0,onMouseEnter:()=>s(A),onMouseDown:N=>{N.preventDefault(),l(g)},tabIndex:-1,ref:N=>{c&&c.current&&(c.current[g.value]=N)}},h))}return E.length>0&&m.length>0&&m.unshift(ae.createElement("div",{className:b.separator,key:"empty-group-separator"},ae.createElement(u3,null))),E.length>0||m.length>0?ae.createElement(ae.Fragment,null,E,m):ae.createElement(St,{size:f,unstyled:y,className:b.nothingFound},d)}kN.displayName="@mantine/core/SelectItems";var Gie=Object.defineProperty,Ov=Object.getOwnPropertySymbols,IN=Object.prototype.hasOwnProperty,$N=Object.prototype.propertyIsEnumerable,S7=(e,t,r)=>t in e?Gie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Kie=(e,t)=>{for(var r in t||(t={}))IN.call(t,r)&&S7(e,r,t[r]);if(Ov)for(var r of Ov(t))$N.call(t,r)&&S7(e,r,t[r]);return e},Yie=(e,t)=>{var r={};for(var n in e)IN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ov)for(var n of Ov(e))t.indexOf(n)<0&&$N.call(e,n)&&(r[n]=e[n]);return r};const TN=I.forwardRef((e,t)=>{var r=e,{label:n,value:o}=r,i=Yie(r,["label","value"]);return ae.createElement("div",Kie({ref:t},i),n||o)});TN.displayName="@mantine/core/DefaultItem";function Xie(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function DN(...e){return t=>e.forEach(r=>Xie(r,t))}function Vl(...e){return I.useCallback(DN(...e),e)}const MN=I.forwardRef((e,t)=>{const{children:r,...n}=e,o=I.Children.toArray(r),i=o.find(Jie);if(i){const a=i.props.children,s=o.map(l=>l===i?I.Children.count(a)>1?I.Children.only(null):I.isValidElement(a)?a.props.children:null:l);return I.createElement(f3,Ze({},n,{ref:t}),I.isValidElement(a)?I.cloneElement(a,void 0,s):null)}return I.createElement(f3,Ze({},n,{ref:t}),r)});MN.displayName="Slot";const f3=I.forwardRef((e,t)=>{const{children:r,...n}=e;return I.isValidElement(r)?I.cloneElement(r,{...Qie(n,r.props),ref:DN(t,r.ref)}):I.Children.count(r)>1?I.Children.only(null):null});f3.displayName="SlotClone";const Zie=({children:e})=>I.createElement(I.Fragment,null,e);function Jie(e){return I.isValidElement(e)&&e.type===Zie}function Qie(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const eae=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Xp=eae.reduce((e,t)=>{const r=I.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?MN:t;return I.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),I.createElement(s,Ze({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),d3=globalThis!=null&&globalThis.document?I.useLayoutEffect:()=>{};function tae(e,t){return I.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const Zp=e=>{const{present:t,children:r}=e,n=rae(t),o=typeof r=="function"?r({present:n.isPresent}):I.Children.only(r),i=Vl(n.ref,o.ref);return typeof r=="function"||n.isPresent?I.cloneElement(o,{ref:i}):null};Zp.displayName="Presence";function rae(e){const[t,r]=I.useState(),n=I.useRef({}),o=I.useRef(e),i=I.useRef("none"),a=e?"mounted":"unmounted",[s,l]=tae(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return I.useEffect(()=>{const c=h0(n.current);i.current=s==="mounted"?c:"none"},[s]),d3(()=>{const c=n.current,u=o.current;if(u!==e){const d=i.current,p=h0(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&d!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),d3(()=>{if(t){const c=f=>{const p=h0(n.current).includes(f.animationName);f.target===t&&p&&Hs.flushSync(()=>l("ANIMATION_END"))},u=f=>{f.target===t&&(i.current=h0(n.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:I.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function h0(e){return(e==null?void 0:e.animationName)||"none"}function nae(e,t=[]){let r=[];function n(i,a){const s=I.createContext(a),l=r.length;r=[...r,a];function c(f){const{scope:d,children:p,...h}=f,y=(d==null?void 0:d[e][l])||s,_=I.useMemo(()=>h,Object.values(h));return I.createElement(y.Provider,{value:_},p)}function u(f,d){const p=(d==null?void 0:d[e][l])||s,h=I.useContext(p);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,u]}const o=()=>{const i=r.map(a=>I.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return I.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,oae(o,...t)]}function oae(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...s,...f}},{});return I.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function bl(e){const t=I.useRef(e);return I.useEffect(()=>{t.current=e}),I.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}const iae=I.createContext(void 0);function aae(e){const t=I.useContext(iae);return e||t||"ltr"}function sae(e,[t,r]){return Math.min(r,Math.max(t,e))}function Ol(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function lae(e,t){return I.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const RN="ScrollArea",[NN,HBe]=nae(RN),[cae,So]=NN(RN),uae=I.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:i=600,...a}=e,[s,l]=I.useState(null),[c,u]=I.useState(null),[f,d]=I.useState(null),[p,h]=I.useState(null),[y,_]=I.useState(null),[b,m]=I.useState(0),[E,A]=I.useState(0),[D,$]=I.useState(!1),[g,N]=I.useState(!1),V=Vl(t,W=>l(W)),K=aae(o);return I.createElement(cae,{scope:r,type:n,dir:K,scrollHideDelay:i,scrollArea:s,viewport:c,onViewportChange:u,content:f,onContentChange:d,scrollbarX:p,onScrollbarXChange:h,scrollbarXEnabled:D,onScrollbarXEnabledChange:$,scrollbarY:y,onScrollbarYChange:_,scrollbarYEnabled:g,onScrollbarYEnabledChange:N,onCornerWidthChange:m,onCornerHeightChange:A},I.createElement(Xp.div,Ze({dir:K},a,{ref:V,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})))}),fae="ScrollAreaViewport",dae=I.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,...o}=e,i=So(fae,r),a=I.useRef(null),s=Vl(t,a,i.onViewportChange);return I.createElement(I.Fragment,null,I.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),I.createElement(Xp.div,Ze({"data-radix-scroll-area-viewport":""},o,{ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),I.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},n)))}),Aa="ScrollAreaScrollbar",pae=I.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=So(Aa,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=o,s=e.orientation==="horizontal";return I.useEffect(()=>(s?i(!0):a(!0),()=>{s?i(!1):a(!1)}),[s,i,a]),o.type==="hover"?I.createElement(hae,Ze({},n,{ref:t,forceMount:r})):o.type==="scroll"?I.createElement(vae,Ze({},n,{ref:t,forceMount:r})):o.type==="auto"?I.createElement(FN,Ze({},n,{ref:t,forceMount:r})):o.type==="always"?I.createElement(c_,Ze({},n,{ref:t})):null}),hae=I.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=So(Aa,e.__scopeScrollArea),[i,a]=I.useState(!1);return I.useEffect(()=>{const s=o.scrollArea;let l=0;if(s){const c=()=>{window.clearTimeout(l),a(!0)},u=()=>{l=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),I.createElement(Zp,{present:r||i},I.createElement(FN,Ze({"data-state":i?"visible":"hidden"},n,{ref:t})))}),vae=I.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=So(Aa,e.__scopeScrollArea),i=e.orientation==="horizontal",a=gy(()=>l("SCROLL_END"),100),[s,l]=lae("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return I.useEffect(()=>{if(s==="idle"){const c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[s,o.scrollHideDelay,l]),I.useEffect(()=>{const c=o.viewport,u=i?"scrollLeft":"scrollTop";if(c){let f=c[u];const d=()=>{const p=c[u];f!==p&&(l("SCROLL"),a()),f=p};return c.addEventListener("scroll",d),()=>c.removeEventListener("scroll",d)}},[o.viewport,i,l,a]),I.createElement(Zp,{present:r||s!=="hidden"},I.createElement(c_,Ze({"data-state":s==="hidden"?"hidden":"visible"},n,{ref:t,onPointerEnter:Ol(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Ol(e.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),FN=I.forwardRef((e,t)=>{const r=So(Aa,e.__scopeScrollArea),{forceMount:n,...o}=e,[i,a]=I.useState(!1),s=e.orientation==="horizontal",l=gy(()=>{if(r.viewport){const c=r.viewport.offsetWidth{const{orientation:r="vertical",...n}=e,o=So(Aa,e.__scopeScrollArea),i=I.useRef(null),a=I.useRef(0),[s,l]=I.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=zN(s.viewport,s.content),u={...n,sizes:s,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:d=>i.current=d,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:d=>a.current=d};function f(d,p){return Eae(d,a.current,s,p)}return r==="horizontal"?I.createElement(gae,Ze({},u,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const d=o.viewport.scrollLeft,p=C7(d,s,o.dir);i.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:d=>{o.viewport&&(o.viewport.scrollLeft=d)},onDragScroll:d=>{o.viewport&&(o.viewport.scrollLeft=f(d,o.dir))}})):r==="vertical"?I.createElement(mae,Ze({},u,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const d=o.viewport.scrollTop,p=C7(d,s);i.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:d=>{o.viewport&&(o.viewport.scrollTop=d)},onDragScroll:d=>{o.viewport&&(o.viewport.scrollTop=f(d))}})):null}),gae=I.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=So(Aa,e.__scopeScrollArea),[a,s]=I.useState(),l=I.useRef(null),c=Vl(t,l,i.onScrollbarXChange);return I.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),I.createElement(jN,Ze({"data-orientation":"horizontal"},o,{ref:c,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":vy(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,f)=>{if(i.viewport){const d=i.viewport.scrollLeft+u.deltaX;e.onWheelScroll(d),HN(d,f)&&u.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Av(a.paddingLeft),paddingEnd:Av(a.paddingRight)}})}}))}),mae=I.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=So(Aa,e.__scopeScrollArea),[a,s]=I.useState(),l=I.useRef(null),c=Vl(t,l,i.onScrollbarYChange);return I.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),I.createElement(jN,Ze({"data-orientation":"vertical"},o,{ref:c,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":vy(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,f)=>{if(i.viewport){const d=i.viewport.scrollTop+u.deltaY;e.onWheelScroll(d),HN(d,f)&&u.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Av(a.paddingTop),paddingEnd:Av(a.paddingBottom)}})}}))}),[yae,BN]=NN(Aa),jN=I.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:f,...d}=e,p=So(Aa,r),[h,y]=I.useState(null),_=Vl(t,V=>y(V)),b=I.useRef(null),m=I.useRef(""),E=p.viewport,A=n.content-n.viewport,D=bl(u),$=bl(l),g=gy(f,10);function N(V){if(b.current){const K=V.clientX-b.current.left,W=V.clientY-b.current.top;c({x:K,y:W})}}return I.useEffect(()=>{const V=K=>{const W=K.target;(h==null?void 0:h.contains(W))&&D(K,A)};return document.addEventListener("wheel",V,{passive:!1}),()=>document.removeEventListener("wheel",V,{passive:!1})},[E,h,A,D]),I.useEffect($,[n,$]),hu(h,g),hu(p.content,g),I.createElement(yae,{scope:r,scrollbar:h,hasThumb:o,onThumbChange:bl(i),onThumbPointerUp:bl(a),onThumbPositionChange:$,onThumbPointerDown:bl(s)},I.createElement(Xp.div,Ze({},d,{ref:_,style:{position:"absolute",...d.style},onPointerDown:Ol(e.onPointerDown,V=>{V.button===0&&(V.target.setPointerCapture(V.pointerId),b.current=h.getBoundingClientRect(),m.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",N(V))}),onPointerMove:Ol(e.onPointerMove,N),onPointerUp:Ol(e.onPointerUp,V=>{const K=V.target;K.hasPointerCapture(V.pointerId)&&K.releasePointerCapture(V.pointerId),document.body.style.webkitUserSelect=m.current,b.current=null})})))}),p3="ScrollAreaThumb",bae=I.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=BN(p3,e.__scopeScrollArea);return I.createElement(Zp,{present:r||o.hasThumb},I.createElement(wae,Ze({ref:t},n)))}),wae=I.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,i=So(p3,r),a=BN(p3,r),{onThumbPositionChange:s}=a,l=Vl(t,f=>a.onThumbChange(f)),c=I.useRef(),u=gy(()=>{c.current&&(c.current(),c.current=void 0)},100);return I.useEffect(()=>{const f=i.viewport;if(f){const d=()=>{if(u(),!c.current){const p=Sae(f,s);c.current=p,s()}};return s(),f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[i.viewport,u,s]),I.createElement(Xp.div,Ze({"data-state":a.hasThumb?"visible":"hidden"},o,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:Ol(e.onPointerDownCapture,f=>{const p=f.target.getBoundingClientRect(),h=f.clientX-p.left,y=f.clientY-p.top;a.onThumbPointerDown({x:h,y})}),onPointerUp:Ol(e.onPointerUp,a.onThumbPointerUp)}))}),LN="ScrollAreaCorner",xae=I.forwardRef((e,t)=>{const r=So(LN,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?I.createElement(_ae,Ze({},e,{ref:t})):null}),_ae=I.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=So(LN,r),[i,a]=I.useState(0),[s,l]=I.useState(0),c=!!(i&&s);return hu(o.scrollbarX,()=>{var u;const f=((u=o.scrollbarX)===null||u===void 0?void 0:u.offsetHeight)||0;o.onCornerHeightChange(f),l(f)}),hu(o.scrollbarY,()=>{var u;const f=((u=o.scrollbarY)===null||u===void 0?void 0:u.offsetWidth)||0;o.onCornerWidthChange(f),a(f)}),c?I.createElement(Xp.div,Ze({},n,{ref:t,style:{width:i,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function Av(e){return e?parseInt(e,10):0}function zN(e,t){const r=e/t;return isNaN(r)?0:r}function vy(e){const t=zN(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Eae(e,t,r,n="ltr"){const o=vy(r),i=o/2,a=t||i,s=o-a,l=r.scrollbar.paddingStart+a,c=r.scrollbar.size-r.scrollbar.paddingEnd-s,u=r.content-r.viewport,f=n==="ltr"?[0,u]:[u*-1,0];return UN([l,c],f)(e)}function C7(e,t,r="ltr"){const n=vy(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-n,l=r==="ltr"?[0,a]:[a*-1,0],c=sae(e,l);return UN([0,a],[0,s])(c)}function UN(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function HN(e,t){return e>0&&e{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=r.left!==i.left,s=r.top!==i.top;(a||s)&&t(),r=i,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function gy(e,t){const r=bl(e),n=I.useRef(0);return I.useEffect(()=>()=>window.clearTimeout(n.current),[]),I.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function hu(e,t){const r=bl(t);d3(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}const Cae=uae,Pae=dae,P7=pae,O7=bae,Oae=xae;var Aae=at((e,{scrollbarSize:t,offsetScrollbars:r,scrollbarHovered:n,hidden:o})=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:r?me(t):void 0,paddingBottom:r?me(t):void 0},scrollbar:{display:o?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:`calc(${me(t)} / 5)`,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],[`& .${zo("thumb")}`]:{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.5):e.fn.rgba(e.black,.5)}},'&[data-orientation="vertical"]':{width:me(t)},'&[data-orientation="horizontal"]':{flexDirection:"column",height:me(t)},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:zo("thumb"),flex:1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.4):e.fn.rgba(e.black,.4),borderRadius:me(t),position:"relative",transition:"background-color 150ms ease",display:o?"none":void 0,overflow:"hidden","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:me(44),minHeight:me(44)}},corner:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],transition:"opacity 150ms ease",opacity:n?1:0,display:o?"none":void 0}}));const kae=Aae;var Iae=Object.defineProperty,$ae=Object.defineProperties,Tae=Object.getOwnPropertyDescriptors,kv=Object.getOwnPropertySymbols,VN=Object.prototype.hasOwnProperty,WN=Object.prototype.propertyIsEnumerable,A7=(e,t,r)=>t in e?Iae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h3=(e,t)=>{for(var r in t||(t={}))VN.call(t,r)&&A7(e,r,t[r]);if(kv)for(var r of kv(t))WN.call(t,r)&&A7(e,r,t[r]);return e},qN=(e,t)=>$ae(e,Tae(t)),GN=(e,t)=>{var r={};for(var n in e)VN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&kv)for(var n of kv(e))t.indexOf(n)<0&&WN.call(e,n)&&(r[n]=e[n]);return r};const KN={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},my=I.forwardRef((e,t)=>{const r=et("ScrollArea",KN,e),{children:n,className:o,classNames:i,styles:a,scrollbarSize:s,scrollHideDelay:l,type:c,dir:u,offsetScrollbars:f,viewportRef:d,onScrollPositionChange:p,unstyled:h,variant:y,viewportProps:_}=r,b=GN(r,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[m,E]=I.useState(!1),A=Lr(),{classes:D,cx:$}=kae({scrollbarSize:s,offsetScrollbars:f,scrollbarHovered:m,hidden:c==="never"},{name:"ScrollArea",classNames:i,styles:a,unstyled:h,variant:y});return ae.createElement(Cae,{type:c==="never"?"always":c,scrollHideDelay:l,dir:u||A.dir,ref:t,asChild:!0},ae.createElement(rt,h3({className:$(D.root,o)},b),ae.createElement(Pae,qN(h3({},_),{className:D.viewport,ref:d,onScroll:typeof p=="function"?({currentTarget:g})=>p({x:g.scrollLeft,y:g.scrollTop}):void 0}),n),ae.createElement(P7,{orientation:"horizontal",className:D.scrollbar,forceMount:!0,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1)},ae.createElement(O7,{className:D.thumb})),ae.createElement(P7,{orientation:"vertical",className:D.scrollbar,forceMount:!0,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1)},ae.createElement(O7,{className:D.thumb})),ae.createElement(Oae,{className:D.corner})))}),YN=I.forwardRef((e,t)=>{const r=et("ScrollAreaAutosize",KN,e),{children:n,classNames:o,styles:i,scrollbarSize:a,scrollHideDelay:s,type:l,dir:c,offsetScrollbars:u,viewportRef:f,onScrollPositionChange:d,unstyled:p,sx:h,variant:y,viewportProps:_}=r,b=GN(r,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return ae.createElement(rt,qN(h3({},b),{ref:t,sx:[{display:"flex"},...W6(h)]}),ae.createElement(rt,{sx:{display:"flex",flexDirection:"column",flex:1}},ae.createElement(my,{classNames:o,styles:i,scrollHideDelay:s,scrollbarSize:a,type:l,dir:c,offsetScrollbars:u,viewportRef:f,onScrollPositionChange:d,unstyled:p,variant:y,viewportProps:_},n)))});YN.displayName="@mantine/core/ScrollAreaAutosize";my.displayName="@mantine/core/ScrollArea";my.Autosize=YN;const XN=my;var Dae=Object.defineProperty,Mae=Object.defineProperties,Rae=Object.getOwnPropertyDescriptors,Iv=Object.getOwnPropertySymbols,ZN=Object.prototype.hasOwnProperty,JN=Object.prototype.propertyIsEnumerable,k7=(e,t,r)=>t in e?Dae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I7=(e,t)=>{for(var r in t||(t={}))ZN.call(t,r)&&k7(e,r,t[r]);if(Iv)for(var r of Iv(t))JN.call(t,r)&&k7(e,r,t[r]);return e},Nae=(e,t)=>Mae(e,Rae(t)),Fae=(e,t)=>{var r={};for(var n in e)ZN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Iv)for(var n of Iv(e))t.indexOf(n)<0&&JN.call(e,n)&&(r[n]=e[n]);return r};const u_=I.forwardRef((e,t)=>{var r=e,{style:n}=r,o=Fae(r,["style"]);return ae.createElement(XN,Nae(I7({},o),{style:I7({width:"100%"},n),viewportProps:{tabIndex:-1},viewportRef:t}),o.children)});u_.displayName="@mantine/core/SelectScrollArea";var Bae=at(()=>({dropdown:{},itemsWrapper:{padding:me(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const jae=Bae,Qo=Math.min,en=Math.max,$v=Math.round,v0=Math.floor,Ms=e=>({x:e,y:e}),Lae={left:"right",right:"left",bottom:"top",top:"bottom"},zae={start:"end",end:"start"};function v3(e,t,r){return en(e,Qo(t,r))}function ba(e,t){return typeof e=="function"?e(t):e}function ei(e){return e.split("-")[0]}function Uu(e){return e.split("-")[1]}function f_(e){return e==="x"?"y":"x"}function d_(e){return e==="y"?"height":"width"}function Wl(e){return["top","bottom"].includes(ei(e))?"y":"x"}function p_(e){return f_(Wl(e))}function Uae(e,t,r){r===void 0&&(r=!1);const n=Uu(e),o=p_(e),i=d_(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Tv(a)),[a,Tv(a)]}function Hae(e){const t=Tv(e);return[g3(e),t,g3(t)]}function g3(e){return e.replace(/start|end/g,t=>zae[t])}function Vae(e,t,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?i:a;default:return[]}}function Wae(e,t,r,n){const o=Uu(e);let i=Vae(ei(e),r==="start",n);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(g3)))),i}function Tv(e){return e.replace(/left|right|bottom|top/g,t=>Lae[t])}function qae(e){return{top:0,right:0,bottom:0,left:0,...e}}function h_(e){return typeof e!="number"?qae(e):{top:e,right:e,bottom:e,left:e}}function vu(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function $7(e,t,r){let{reference:n,floating:o}=e;const i=Wl(t),a=p_(t),s=d_(a),l=ei(t),c=i==="y",u=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,d=n[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-o.width,y:f};break;default:p={x:n.x,y:n.y}}switch(Uu(t)){case"start":p[a]-=d*(r&&c?-1:1);break;case"end":p[a]+=d*(r&&c?-1:1);break}return p}const Gae=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=$7(c,n,l),d=n,p={},h=0;for(let y=0;y({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:s}=t,{element:l,padding:c=0}=ba(e,t)||{};if(l==null)return{};const u=h_(c),f={x:r,y:n},d=p_(o),p=d_(d),h=await a.getDimensions(l),y=d==="y",_=y?"top":"left",b=y?"bottom":"right",m=y?"clientHeight":"clientWidth",E=i.reference[p]+i.reference[d]-f[d]-i.floating[p],A=f[d]-i.reference[d],D=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let $=D?D[m]:0;(!$||!await(a.isElement==null?void 0:a.isElement(D)))&&($=s.floating[m]||i.floating[p]);const g=E/2-A/2,N=$/2-h[p]/2-1,V=Qo(u[_],N),K=Qo(u[b],N),W=V,P=$-h[p]-K,C=$/2-h[p]/2+g,v=v3(W,C,P),B=Uu(o)!=null&&C!=v&&i.reference[p]/2-(CW<=0)){var N,V;const W=(((N=o.flip)==null?void 0:N.index)||0)+1,P=A[W];if(P)return{data:{index:W,overflows:g},reset:{placement:P}};let C=(V=g.filter(v=>v.overflows[0]<=0).sort((v,w)=>v.overflows[1]-w.overflows[1])[0])==null?void 0:V.placement;if(!C)switch(d){case"bestFit":{var K;const v=(K=g.map(w=>[w.placement,w.overflows.filter(B=>B>0).reduce((B,R)=>B+R,0)]).sort((w,B)=>w[1]-B[1])[0])==null?void 0:K[0];v&&(C=v);break}case"initialPlacement":C=a;break}if(n!==C)return{reset:{placement:C}}}return{}}}};function eF(e){const t=Qo(...e.map(i=>i.left)),r=Qo(...e.map(i=>i.top)),n=en(...e.map(i=>i.right)),o=en(...e.map(i=>i.bottom));return{x:t,y:r,width:n-t,height:o-r}}function Kae(e){const t=e.slice().sort((o,i)=>o.y-i.y),r=[];let n=null;for(let o=0;on.height/2?r.push([i]):r[r.length-1].push(i),n=i}return r.map(o=>vu(eF(o)))}const tF=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:r,elements:n,rects:o,platform:i,strategy:a}=t,{padding:s=2,x:l,y:c}=ba(e,t),u=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(n.reference))||[]),f=Kae(u),d=vu(eF(u)),p=h_(s);function h(){if(f.length===2&&f[0].left>f[1].right&&l!=null&&c!=null)return f.find(_=>l>_.left-p.left&&l<_.right+p.right&&c>_.top-p.top&&c<_.bottom+p.bottom)||d;if(f.length>=2){if(Wl(r)==="y"){const K=f[0],W=f[f.length-1],P=ei(r)==="top",C=K.top,v=W.bottom,w=P?K.left:W.left,B=P?K.right:W.right,R=B-w,L=v-C;return{top:C,bottom:v,left:w,right:B,width:R,height:L,x:w,y:C}}const _=ei(r)==="left",b=en(...f.map(K=>K.right)),m=Qo(...f.map(K=>K.left)),E=f.filter(K=>_?K.left===m:K.right===b),A=E[0].top,D=E[E.length-1].bottom,$=m,g=b,N=g-$,V=D-A;return{top:A,bottom:D,left:$,right:g,width:N,height:V,x:$,y:A}}return d}const y=await i.getElementRects({reference:{getBoundingClientRect:h},floating:n.floating,strategy:a});return o.reference.x!==y.reference.x||o.reference.y!==y.reference.y||o.reference.width!==y.reference.width||o.reference.height!==y.reference.height?{reset:{rects:y}}:{}}}};async function Yae(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=ei(r),s=Uu(r),l=Wl(r)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,f=ba(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),l?{x:p*u,y:d*c}:{x:d*c,y:p*u}}const rF=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await Yae(t,e);return{x:r+o.x,y:n+o.y,data:o}}}},g_=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:_=>{let{x:b,y:m}=_;return{x:b,y:m}}},...l}=ba(e,t),c={x:r,y:n},u=await v_(t,l),f=Wl(ei(o)),d=f_(f);let p=c[d],h=c[f];if(i){const _=d==="y"?"top":"left",b=d==="y"?"bottom":"right",m=p+u[_],E=p-u[b];p=v3(m,p,E)}if(a){const _=f==="y"?"top":"left",b=f==="y"?"bottom":"right",m=h+u[_],E=h-u[b];h=v3(m,h,E)}const y=s.fn({...t,[d]:p,[f]:h});return{...y,data:{x:y.x-r,y:y.y-n}}}}},Xae=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=ba(e,t),u={x:r,y:n},f=Wl(o),d=f_(f);let p=u[d],h=u[f];const y=ba(s,t),_=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const E=d==="y"?"height":"width",A=i.reference[d]-i.floating[E]+_.mainAxis,D=i.reference[d]+i.reference[E]-_.mainAxis;pD&&(p=D)}if(c){var b,m;const E=d==="y"?"width":"height",A=["top","left"].includes(ei(o)),D=i.reference[f]-i.floating[E]+(A&&((b=a.offset)==null?void 0:b[f])||0)+(A?0:_.crossAxis),$=i.reference[f]+i.reference[E]+(A?0:((m=a.offset)==null?void 0:m[f])||0)-(A?_.crossAxis:0);h$&&(h=$)}return{[d]:p,[f]:h}}}},Zae=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:i}=t,{apply:a=()=>{},...s}=ba(e,t),l=await v_(t,s),c=ei(r),u=Uu(r),f=Wl(r)==="y",{width:d,height:p}=n.floating;let h,y;c==="top"||c==="bottom"?(h=c,y=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(y=c,h=u==="end"?"top":"bottom");const _=p-l[h],b=d-l[y],m=!t.middlewareData.shift;let E=_,A=b;if(f){const $=d-l.left-l.right;A=u||m?Qo(b,$):$}else{const $=p-l.top-l.bottom;E=u||m?Qo(_,$):$}if(m&&!u){const $=en(l.left,0),g=en(l.right,0),N=en(l.top,0),V=en(l.bottom,0);f?A=d-2*($!==0||g!==0?$+g:en(l.left,l.right)):E=p-2*(N!==0||V!==0?N+V:en(l.top,l.bottom))}await a({...t,availableWidth:A,availableHeight:E});const D=await o.getDimensions(i.floating);return d!==D.width||p!==D.height?{reset:{rects:!0}}:{}}}};function Rs(e){return nF(e)?(e.nodeName||"").toLowerCase():"#document"}function Vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ka(e){var t;return(t=(nF(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nF(e){return e instanceof Node||e instanceof Vn(e).Node}function wa(e){return e instanceof Element||e instanceof Vn(e).Element}function $i(e){return e instanceof HTMLElement||e instanceof Vn(e).HTMLElement}function D7(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vn(e).ShadowRoot}function Jp(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=_o(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Jae(e){return["table","td","th"].includes(Rs(e))}function m_(e){const t=y_(),r=_o(e);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Qae(e){let t=gu(e);for(;$i(t)&&!yy(t);){if(m_(t))return t;t=gu(t)}return null}function y_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function yy(e){return["html","body","#document"].includes(Rs(e))}function _o(e){return Vn(e).getComputedStyle(e)}function by(e){return wa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function gu(e){if(Rs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||D7(e)&&e.host||ka(e);return D7(t)?t.host:t}function oF(e){const t=gu(e);return yy(t)?e.ownerDocument?e.ownerDocument.body:e.body:$i(t)&&Jp(t)?t:oF(t)}function xs(e,t){var r;t===void 0&&(t=[]);const n=oF(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=Vn(n);return o?t.concat(i,i.visualViewport||[],Jp(n)?n:[]):t.concat(n,xs(n))}function iF(e){const t=_o(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=$i(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=$v(r)!==i||$v(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function b_(e){return wa(e)?e:e.contextElement}function Zc(e){const t=b_(e);if(!$i(t))return Ms(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=iF(t);let a=(i?$v(r.width):r.width)/n,s=(i?$v(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const ese=Ms(0);function aF(e){const t=Vn(e);return!y_()||!t.visualViewport?ese:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tse(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Vn(e)?!1:t}function Nl(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=b_(e);let a=Ms(1);t&&(n?wa(n)&&(a=Zc(n)):a=Zc(e));const s=tse(i,r,n)?aF(i):Ms(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const d=Vn(i),p=n&&wa(n)?Vn(n):n;let h=d.frameElement;for(;h&&n&&p!==d;){const y=Zc(h),_=h.getBoundingClientRect(),b=_o(h),m=_.left+(h.clientLeft+parseFloat(b.paddingLeft))*y.x,E=_.top+(h.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=m,c+=E,h=Vn(h).frameElement}}return vu({width:u,height:f,x:l,y:c})}function rse(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=$i(r),i=ka(r);if(r===i)return t;let a={scrollLeft:0,scrollTop:0},s=Ms(1);const l=Ms(0);if((o||!o&&n!=="fixed")&&((Rs(r)!=="body"||Jp(i))&&(a=by(r)),$i(r))){const c=Nl(r);s=Zc(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}}function nse(e){return Array.from(e.getClientRects())}function sF(e){return Nl(ka(e)).left+by(e).scrollLeft}function ose(e){const t=ka(e),r=by(e),n=e.ownerDocument.body,o=en(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=en(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+sF(e);const s=-r.scrollTop;return _o(n).direction==="rtl"&&(a+=en(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}function ise(e,t){const r=Vn(e),n=ka(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=y_();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function ase(e,t){const r=Nl(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=$i(e)?Zc(e):Ms(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:a,height:s,x:l,y:c}}function M7(e,t,r){let n;if(t==="viewport")n=ise(e,r);else if(t==="document")n=ose(ka(e));else if(wa(t))n=ase(t,r);else{const o=aF(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return vu(n)}function lF(e,t){const r=gu(e);return r===t||!wa(r)||yy(r)?!1:_o(r).position==="fixed"||lF(r,t)}function sse(e,t){const r=t.get(e);if(r)return r;let n=xs(e).filter(s=>wa(s)&&Rs(s)!=="body"),o=null;const i=_o(e).position==="fixed";let a=i?gu(e):e;for(;wa(a)&&!yy(a);){const s=_o(a),l=m_(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Jp(a)&&!l&&lF(e,a))?n=n.filter(u=>u!==a):o=s,a=gu(a)}return t.set(e,n),n}function lse(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?sse(t,this._c):[].concat(r),n],s=a[0],l=a.reduce((c,u)=>{const f=M7(t,u,o);return c.top=en(f.top,c.top),c.right=Qo(f.right,c.right),c.bottom=Qo(f.bottom,c.bottom),c.left=en(f.left,c.left),c},M7(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function cse(e){return iF(e)}function use(e,t,r){const n=$i(t),o=ka(t),i=r==="fixed",a=Nl(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Ms(0);if(n||!n&&!i)if((Rs(t)!=="body"||Jp(o))&&(s=by(t)),n){const c=Nl(t,!0,i,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else o&&(l.x=sF(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function R7(e,t){return!$i(e)||_o(e).position==="fixed"?null:t?t(e):e.offsetParent}function cF(e,t){const r=Vn(e);if(!$i(e))return r;let n=R7(e,t);for(;n&&Jae(n)&&_o(n).position==="static";)n=R7(n,t);return n&&(Rs(n)==="html"||Rs(n)==="body"&&_o(n).position==="static"&&!m_(n))?r:n||Qae(e)||r}const fse=async function(e){let{reference:t,floating:r,strategy:n}=e;const o=this.getOffsetParent||cF,i=this.getDimensions;return{reference:use(t,await o(r),n),floating:{x:0,y:0,...await i(r)}}};function dse(e){return _o(e).direction==="rtl"}const pse={convertOffsetParentRelativeRectToViewportRelativeRect:rse,getDocumentElement:ka,getClippingRect:lse,getOffsetParent:cF,getElementRects:fse,getClientRects:nse,getDimensions:cse,getScale:Zc,isElement:wa,isRTL:dse};function hse(e,t){let r=null,n;const o=ka(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;const p=v0(u),h=v0(o.clientWidth-(c+f)),y=v0(o.clientHeight-(u+d)),_=v0(c),m={rootMargin:-p+"px "+-h+"px "+-y+"px "+-_+"px",threshold:en(0,Qo(1,l))||1};let E=!0;function A(D){const $=D[0].intersectionRatio;if($!==l){if(!E)return a();$?a(!1,$):n=setTimeout(()=>{a(!1,1e-7)},100)}E=!1}try{r=new IntersectionObserver(A,{...m,root:o.ownerDocument})}catch{r=new IntersectionObserver(A,m)}r.observe(e)}return a(!0),i}function vse(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=b_(e),u=o||i?[...c?xs(c):[],...xs(t)]:[];u.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),i&&b.addEventListener("resize",r)});const f=c&&s?hse(c,r):null;let d=-1,p=null;a&&(p=new ResizeObserver(b=>{let[m]=b;m&&m.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{p&&p.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let h,y=l?Nl(e):null;l&&_();function _(){const b=Nl(e);y&&(b.x!==y.x||b.y!==y.y||b.width!==y.width||b.height!==y.height)&&r(),y=b,h=requestAnimationFrame(_)}return r(),()=>{u.forEach(b=>{o&&b.removeEventListener("scroll",r),i&&b.removeEventListener("resize",r)}),f&&f(),p&&p.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const gse=(e,t,r)=>{const n=new Map,o={platform:pse,...r},i={...o.platform,_c:n};return Gae(e,t,{...o,platform:i})},uF=e=>{const{element:t,padding:r}=e;function n(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return n(t)?t.current!=null?T7({element:t.current,padding:r}).fn(o):{}:t?T7({element:t,padding:r}).fn(o):{}}}};var p1=typeof document<"u"?I.useLayoutEffect:I.useEffect;function Dv(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Dv(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!Dv(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function N7(e){const t=I.useRef(e);return p1(()=>{t.current=e}),t}function mse(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,whileElementsMounted:i,open:a}=e,[s,l]=I.useState({x:null,y:null,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[c,u]=I.useState(n);Dv(c,n)||u(n);const f=I.useRef(null),d=I.useRef(null),p=I.useRef(s),h=N7(i),y=N7(o),[_,b]=I.useState(null),[m,E]=I.useState(null),A=I.useCallback(K=>{f.current!==K&&(f.current=K,b(K))},[]),D=I.useCallback(K=>{d.current!==K&&(d.current=K,E(K))},[]),$=I.useCallback(()=>{if(!f.current||!d.current)return;const K={placement:t,strategy:r,middleware:c};y.current&&(K.platform=y.current),gse(f.current,d.current,K).then(W=>{const P={...W,isPositioned:!0};g.current&&!Dv(p.current,P)&&(p.current=P,Hs.flushSync(()=>{l(P)}))})},[c,t,r,y]);p1(()=>{a===!1&&p.current.isPositioned&&(p.current.isPositioned=!1,l(K=>({...K,isPositioned:!1})))},[a]);const g=I.useRef(!1);p1(()=>(g.current=!0,()=>{g.current=!1}),[]),p1(()=>{if(_&&m){if(h.current)return h.current(_,m,$);$()}},[_,m,$,h]);const N=I.useMemo(()=>({reference:f,floating:d,setReference:A,setFloating:D}),[A,D]),V=I.useMemo(()=>({reference:_,floating:m}),[_,m]);return I.useMemo(()=>({...s,update:$,refs:N,elements:V,reference:A,floating:D}),[s,$,N,V,A,D])}var mu=typeof document<"u"?I.useLayoutEffect:I.useEffect;let S2=!1,yse=0;const F7=()=>"floating-ui-"+yse++;function bse(){const[e,t]=I.useState(()=>S2?F7():void 0);return mu(()=>{e==null&&t(F7())},[]),I.useEffect(()=>{S2||(S2=!0)},[]),e}const wse=Hd["useId".toString()],B7=wse||bse;function xse(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){e.set(t,(e.get(t)||[]).filter(n=>n!==r))}}}const _se=I.createContext(null),Ese=I.createContext(null),fF=()=>{var e;return((e=I.useContext(_se))==null?void 0:e.id)||null},w_=()=>I.useContext(Ese);function is(e){return(e==null?void 0:e.ownerDocument)||document}function Sse(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Cse(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function x_(e){return is(e).defaultView||window}function wi(e){return e?e instanceof x_(e).Element:!1}function dF(e){return e?e instanceof x_(e).HTMLElement:!1}function Pse(e){if(typeof ShadowRoot>"u")return!1;const t=x_(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Ose(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(Sse())||t.test(Cse()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Ase(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function pF(e,t){const r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function j7(e){const t=I.useRef(e);return mu(()=>{t.current=e}),t}const L7="data-floating-ui-safe-polygon";function h1(e,t,r){return r&&!pF(r)?0:typeof e=="number"?e:e==null?void 0:e[t]}const kse=function(e,t){let{enabled:r=!0,delay:n=0,handleClose:o=null,mouseOnly:i=!1,restMs:a=0,move:s=!0}=t===void 0?{}:t;const{open:l,onOpenChange:c,dataRef:u,events:f,elements:{domReference:d,floating:p},refs:h}=e,y=w_(),_=fF(),b=j7(o),m=j7(n),E=I.useRef(),A=I.useRef(),D=I.useRef(),$=I.useRef(),g=I.useRef(!0),N=I.useRef(!1),V=I.useRef(()=>{}),K=I.useCallback(()=>{var v;const w=(v=u.current.openEvent)==null?void 0:v.type;return(w==null?void 0:w.includes("mouse"))&&w!=="mousedown"},[u]);I.useEffect(()=>{if(!r)return;function v(){clearTimeout(A.current),clearTimeout($.current),g.current=!0}return f.on("dismiss",v),()=>{f.off("dismiss",v)}},[r,f]),I.useEffect(()=>{if(!r||!b.current||!l)return;function v(){K()&&c(!1)}const w=is(p).documentElement;return w.addEventListener("mouseleave",v),()=>{w.removeEventListener("mouseleave",v)}},[p,l,c,r,b,u,K]);const W=I.useCallback(function(v){v===void 0&&(v=!0);const w=h1(m.current,"close",E.current);w&&!D.current?(clearTimeout(A.current),A.current=setTimeout(()=>c(!1),w)):v&&(clearTimeout(A.current),c(!1))},[m,c]),P=I.useCallback(()=>{V.current(),D.current=void 0},[]),C=I.useCallback(()=>{if(N.current){const v=is(h.floating.current).body;v.style.pointerEvents="",v.removeAttribute(L7),N.current=!1}},[h]);return I.useEffect(()=>{if(!r)return;function v(){return u.current.openEvent?["click","mousedown"].includes(u.current.openEvent.type):!1}function w(L){if(clearTimeout(A.current),g.current=!1,i&&!pF(E.current)||a>0&&h1(m.current,"open")===0)return;u.current.openEvent=L;const U=h1(m.current,"open",E.current);U?A.current=setTimeout(()=>{c(!0)},U):c(!0)}function B(L){if(v())return;V.current();const U=is(p);if(clearTimeout($.current),b.current){l||clearTimeout(A.current),D.current=b.current({...e,tree:y,x:L.clientX,y:L.clientY,onClose(){C(),P(),W()}});const S=D.current;U.addEventListener("mousemove",S),V.current=()=>{U.removeEventListener("mousemove",S)};return}W()}function R(L){v()||b.current==null||b.current({...e,tree:y,x:L.clientX,y:L.clientY,onClose(){C(),P(),W()}})(L)}if(wi(d)){const L=d;return l&&L.addEventListener("mouseleave",R),p==null||p.addEventListener("mouseleave",R),s&&L.addEventListener("mousemove",w,{once:!0}),L.addEventListener("mouseenter",w),L.addEventListener("mouseleave",B),()=>{l&&L.removeEventListener("mouseleave",R),p==null||p.removeEventListener("mouseleave",R),s&&L.removeEventListener("mousemove",w),L.removeEventListener("mouseenter",w),L.removeEventListener("mouseleave",B)}}},[d,p,r,e,i,a,s,W,P,C,c,l,y,m,b,u]),mu(()=>{var v;if(r&&l&&(v=b.current)!=null&&v.__options.blockPointerEvents&&K()){const R=is(p).body;if(R.setAttribute(L7,""),R.style.pointerEvents="none",N.current=!0,wi(d)&&p){var w,B;const L=d,U=y==null||(w=y.nodesRef.current.find(S=>S.id===_))==null||(B=w.context)==null?void 0:B.elements.floating;return U&&(U.style.pointerEvents=""),L.style.pointerEvents="auto",p.style.pointerEvents="auto",()=>{L.style.pointerEvents="",p.style.pointerEvents=""}}}},[r,l,_,p,d,y,b,u,K]),mu(()=>{l||(E.current=void 0,P(),C())},[l,P,C]),I.useEffect(()=>()=>{P(),clearTimeout(A.current),clearTimeout($.current),C()},[r,P,C]),I.useMemo(()=>{if(!r)return{};function v(w){E.current=w.pointerType}return{reference:{onPointerDown:v,onPointerEnter:v,onMouseMove(){l||a===0||(clearTimeout($.current),$.current=setTimeout(()=>{g.current||c(!0)},a))}},floating:{onMouseEnter(){clearTimeout(A.current)},onMouseLeave(){f.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),W(!1)}}}},[f,r,a,l,c,W])},hF=I.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),vF=()=>I.useContext(hF),Ise=e=>{let{children:t,delay:r,timeoutMs:n=0}=e;const[o,i]=I.useReducer((l,c)=>({...l,...c}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),a=I.useRef(null),s=I.useCallback(l=>{i({currentId:l})},[]);return mu(()=>{o.currentId?a.current===null?a.current=o.currentId:i({isInstantPhase:!0}):(i({isInstantPhase:!1}),a.current=null)},[o.currentId]),I.createElement(hF.Provider,{value:I.useMemo(()=>({...o,setState:i,setCurrentId:s}),[o,i,s])},t)},$se=(e,t)=>{let{open:r,onOpenChange:n}=e,{id:o}=t;const{currentId:i,setCurrentId:a,initialDelay:s,setState:l,timeoutMs:c}=vF();I.useEffect(()=>{i&&(l({delay:{open:1,close:h1(s,"close")}}),i!==o&&n(!1))},[o,n,l,i,s]),I.useEffect(()=>{function u(){n(!1),l({delay:s,currentId:null})}if(!r&&i===o)if(c){const f=window.setTimeout(u,c);return()=>{clearTimeout(f)}}else u()},[r,l,i,o,n,s,c]),I.useEffect(()=>{r&&a(o)},[r,a,o])};function Tse(e){let t=e.activeElement;for(;((r=t)==null||(n=r.shadowRoot)==null?void 0:n.activeElement)!=null;){var r,n;t=t.shadowRoot.activeElement}return t}function z7(e,t){if(!e||!t)return!1;const r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Pse(r)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}function C2(e,t){let r=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)})||[],n=r;for(;n.length;)n=e.filter(o=>{var i;return(i=n)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})})||[],r=r.concat(n);return r}function Dse(e){return"composedPath"in e?e.composedPath()[0]:e.target}const Mse=Hd["useInsertionEffect".toString()],Rse=Mse||(e=>e());function gF(e){const t=I.useRef(()=>{});return Rse(()=>{t.current=e}),I.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o!1),D=typeof d=="function"?A:d,$=I.useRef(!1),{escapeKeyBubbles:g,outsidePressBubbles:N}=Bse(b);return I.useEffect(()=>{if(!r||!u)return;c.current.__escapeKeyBubbles=g,c.current.__outsidePressBubbles=N;function V(v){if(v.key==="Escape"){const w=m?C2(m.nodesRef.current,i):[];if(w.length>0){let B=!0;if(w.forEach(R=>{var L;if((L=R.context)!=null&&L.open&&!R.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1)}}function K(v){const w=$.current;if($.current=!1,w||typeof D=="function"&&!D(v))return;const B=Dse(v);if(dF(B)&&l){const U=l.ownerDocument.defaultView||window,S=B.scrollWidth>B.clientWidth,F=B.scrollHeight>B.clientHeight;let T=F&&v.offsetX>B.clientWidth;if(F&&U.getComputedStyle(B).direction==="rtl"&&(T=v.offsetX<=B.offsetWidth-B.clientWidth),T||S&&v.offsetY>B.clientHeight)return}const R=m&&C2(m.nodesRef.current,i).some(U=>{var S;return v1(v,(S=U.context)==null?void 0:S.elements.floating)});if(v1(v,l)||v1(v,s)||R)return;const L=m?C2(m.nodesRef.current,i):[];if(L.length>0){let U=!0;if(L.forEach(S=>{var F;if((F=S.context)!=null&&F.open&&!S.context.dataRef.current.__outsidePressBubbles){U=!1;return}}),!U)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:E?{preventScroll:!0}:Ose(v)||Ase(v)}}),n(!1)}function W(){n(!1)}const P=is(l);f&&P.addEventListener("keydown",V),D&&P.addEventListener(p,K);let C=[];return _&&(wi(s)&&(C=xs(s)),wi(l)&&(C=C.concat(xs(l))),!wi(a)&&a&&a.contextElement&&(C=C.concat(xs(a.contextElement)))),C=C.filter(v=>{var w;return v!==((w=P.defaultView)==null?void 0:w.visualViewport)}),C.forEach(v=>{v.addEventListener("scroll",W,{passive:!0})}),()=>{f&&P.removeEventListener("keydown",V),D&&P.removeEventListener(p,K),C.forEach(v=>{v.removeEventListener("scroll",W)})}},[c,l,s,a,f,D,p,o,m,i,r,n,_,u,g,N,E]),I.useEffect(()=>{$.current=!1},[D,p]),I.useMemo(()=>u?{reference:{[Nse[y]]:()=>{h&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1))}},floating:{[Fse[p]]:()=>{$.current=!0}}}:{},[u,o,h,p,y,n])},Lse=function(e,t){let{open:r,onOpenChange:n,dataRef:o,events:i,refs:a,elements:{floating:s,domReference:l}}=e,{enabled:c=!0,keyboardOnly:u=!0}=t===void 0?{}:t;const f=I.useRef(""),d=I.useRef(!1),p=I.useRef();return I.useEffect(()=>{if(!c)return;const y=is(s).defaultView||window;function _(){!r&&dF(l)&&l===Tse(is(l))&&(d.current=!0)}return y.addEventListener("blur",_),()=>{y.removeEventListener("blur",_)}},[s,l,r,c]),I.useEffect(()=>{if(!c)return;function h(y){(y.type==="referencePress"||y.type==="escapeKey")&&(d.current=!0)}return i.on("dismiss",h),()=>{i.off("dismiss",h)}},[i,c]),I.useEffect(()=>()=>{clearTimeout(p.current)},[]),I.useMemo(()=>c?{reference:{onPointerDown(h){let{pointerType:y}=h;f.current=y,d.current=!!(y&&u)},onMouseLeave(){d.current=!1},onFocus(h){var y;d.current||h.type==="focus"&&((y=o.current.openEvent)==null?void 0:y.type)==="mousedown"&&o.current.openEvent&&v1(o.current.openEvent,l)||(o.current.openEvent=h.nativeEvent,n(!0))},onBlur(h){d.current=!1;const y=h.relatedTarget,_=wi(y)&&y.hasAttribute("data-floating-ui-focus-guard")&&y.getAttribute("data-type")==="outside";p.current=setTimeout(()=>{z7(a.floating.current,y)||z7(l,y)||_||n(!1)})}}}:{},[c,u,l,a,o,n])},zse=function(e,t){let{open:r}=e,{enabled:n=!0,role:o="dialog"}=t===void 0?{}:t;const i=B7(),a=B7();return I.useMemo(()=>{const s={id:i,role:o};return n?o==="tooltip"?{reference:{"aria-describedby":r?i:void 0},floating:s}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":r?i:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:a}},floating:{...s,...o==="menu"&&{"aria-labelledby":a}}}:{}},[n,o,r,i,a])};function __(e){e===void 0&&(e={});const{open:t=!1,onOpenChange:r,nodeId:n}=e,o=mse(e),i=w_(),a=I.useRef(null),s=I.useRef({}),l=I.useState(()=>xse())[0],[c,u]=I.useState(null),f=I.useCallback(b=>{const m=wi(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;o.refs.setReference(m)},[o.refs]),d=I.useCallback(b=>{(wi(b)||b===null)&&(a.current=b,u(b)),(wi(o.refs.reference.current)||o.refs.reference.current===null||b!==null&&!wi(b))&&o.refs.setReference(b)},[o.refs]),p=I.useMemo(()=>({...o.refs,setReference:d,setPositionReference:f,domReference:a}),[o.refs,d,f]),h=I.useMemo(()=>({...o.elements,domReference:c}),[o.elements,c]),y=gF(r),_=I.useMemo(()=>({...o,refs:p,elements:h,dataRef:s,nodeId:n,events:l,open:t,onOpenChange:y}),[o,n,l,t,y,p,h]);return mu(()=>{const b=i==null?void 0:i.nodesRef.current.find(m=>m.id===n);b&&(b.context=_)}),I.useMemo(()=>({...o,context:_,refs:p,reference:d,positionReference:f}),[o,p,_,d,f])}function P2(e,t,r){const n=new Map;return{...r==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[r]:null).concat(e).reduce((o,i)=>(i&&Object.entries(i).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(n.has(s)||n.set(s,[]),typeof l=="function"){var c;(c=n.get(s))==null||c.push(l),o[s]=function(){for(var u,f=arguments.length,d=new Array(f),p=0;ph(...d))}}}else o[s]=l}),o),{})}}const Use=function(e){e===void 0&&(e=[]);const t=e,r=I.useCallback(i=>P2(i,e,"reference"),t),n=I.useCallback(i=>P2(i,e,"floating"),t),o=I.useCallback(i=>P2(i,e,"item"),e.map(i=>i==null?void 0:i.item));return I.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:o}),[r,n,o])};function mF({opened:e,floating:t,position:r,positionDependencies:n}){const[o,i]=I.useState(0);I.useEffect(()=>{if(t.refs.reference.current&&t.refs.floating.current)return vse(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,r]),Jo(()=>{t.update()},n),Jo(()=>{i(a=>a+1)},[e])}function Hse(e){const t=[rF(e.offset)];return e.middlewares.shift&&t.push(g_({limiter:Xae()})),e.middlewares.flip&&t.push(QN()),e.middlewares.inline&&t.push(tF()),t.push(uF({element:e.arrowRef,padding:e.arrowOffset})),t}function Vse(e){const[t,r]=Rl({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),n=()=>{var a;(a=e.onClose)==null||a.call(e),r(!1)},o=()=>{var a,s;t?((a=e.onClose)==null||a.call(e),r(!1)):((s=e.onOpen)==null||s.call(e),r(!0))},i=__({placement:e.position,middleware:[...Hse(e),...e.width==="target"?[Zae({apply({rects:a}){var s,l;Object.assign((l=(s=i.refs.floating.current)==null?void 0:s.style)!=null?l:{},{width:`${a.reference.width}px`})}})]:[]]});return mF({opened:e.opened,position:e.position,positionDependencies:e.positionDependencies,floating:i}),Jo(()=>{var a;(a=e.onPositionChange)==null||a.call(e,i.placement)},[i.placement]),Jo(()=>{var a,s;e.opened?(s=e.onOpen)==null||s.call(e):(a=e.onClose)==null||a.call(e)},[e.opened]),{floating:i,controlled:typeof e.opened=="boolean",opened:t,onClose:n,onToggle:o}}const yF={context:"Popover component was not found in the tree",children:"Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[Wse,bF]=Hp(yF.context);var qse=Object.defineProperty,Gse=Object.defineProperties,Kse=Object.getOwnPropertyDescriptors,Mv=Object.getOwnPropertySymbols,wF=Object.prototype.hasOwnProperty,xF=Object.prototype.propertyIsEnumerable,U7=(e,t,r)=>t in e?qse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g0=(e,t)=>{for(var r in t||(t={}))wF.call(t,r)&&U7(e,r,t[r]);if(Mv)for(var r of Mv(t))xF.call(t,r)&&U7(e,r,t[r]);return e},Yse=(e,t)=>Gse(e,Kse(t)),Xse=(e,t)=>{var r={};for(var n in e)wF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Mv)for(var n of Mv(e))t.indexOf(n)<0&&xF.call(e,n)&&(r[n]=e[n]);return r};const Zse={refProp:"ref",popupType:"dialog"},_F=I.forwardRef((e,t)=>{const r=et("PopoverTarget",Zse,e),{children:n,refProp:o,popupType:i}=r,a=Xse(r,["children","refProp","popupType"]);if(!Vp(n))throw new Error(yF.children);const s=a,l=bF(),c=Ws(l.reference,n.ref,t),u=l.withRoles?{"aria-haspopup":i,"aria-expanded":l.opened,"aria-controls":l.getDropdownId(),id:l.getTargetId()}:{};return I.cloneElement(n,g0(Yse(g0(g0(g0({},s),u),l.targetProps),{className:LM(l.targetProps.className,s.className,n.props.className),[o]:c}),l.controlled?null:{onClick:l.onToggle}))});_F.displayName="@mantine/core/PopoverTarget";var Jse=at((e,{radius:t,shadow:r})=>({dropdown:{position:"absolute",backgroundColor:e.white,background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,padding:`${e.spacing.sm} ${e.spacing.md}`,boxShadow:e.shadows[r]||r||"none",borderRadius:e.fn.radius(t),"&:focus":{outline:0}},arrow:{backgroundColor:"inherit",border:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,zIndex:1}}));const Qse=Jse;var ele=Object.defineProperty,H7=Object.getOwnPropertySymbols,tle=Object.prototype.hasOwnProperty,rle=Object.prototype.propertyIsEnumerable,V7=(e,t,r)=>t in e?ele(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lc=(e,t)=>{for(var r in t||(t={}))tle.call(t,r)&&V7(e,r,t[r]);if(H7)for(var r of H7(t))rle.call(t,r)&&V7(e,r,t[r]);return e};const W7={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function nle({transition:e,state:t,duration:r,timingFunction:n}){const o={transitionDuration:`${r}ms`,transitionTimingFunction:n};return typeof e=="string"?e in a0?lc(lc(lc({transitionProperty:a0[e].transitionProperty},o),a0[e].common),a0[e][W7[t]]):null:lc(lc(lc({transitionProperty:e.transitionProperty},o),e.common),e[W7[t]])}function ole({duration:e,exitDuration:t,timingFunction:r,mounted:n,onEnter:o,onExit:i,onEntered:a,onExited:s}){const l=Lr(),c=py(),u=l.respectReducedMotion?c:!1,[f,d]=I.useState(u?0:e),[p,h]=I.useState(n?"entered":"exited"),y=I.useRef(-1),_=b=>{const m=b?o:i,E=b?a:s;h(b?"pre-entering":"pre-exiting"),window.clearTimeout(y.current);const A=u?0:b?e:t;if(d(A),A===0)typeof m=="function"&&m(),typeof E=="function"&&E(),h(b?"entered":"exited");else{const D=window.setTimeout(()=>{typeof m=="function"&&m(),h(b?"entering":"exiting")},10);y.current=window.setTimeout(()=>{window.clearTimeout(D),typeof E=="function"&&E(),h(b?"entered":"exited")},A)}};return Jo(()=>{_(n)},[n]),I.useEffect(()=>()=>window.clearTimeout(y.current),[]),{transitionDuration:f,transitionStatus:p,transitionTimingFunction:r||l.transitionTimingFunction}}function ql({keepMounted:e,transition:t,duration:r=250,exitDuration:n=r,mounted:o,children:i,timingFunction:a,onExit:s,onEntered:l,onEnter:c,onExited:u}){const{transitionDuration:f,transitionStatus:d,transitionTimingFunction:p}=ole({mounted:o,exitDuration:n,duration:r,timingFunction:a,onExit:s,onEntered:l,onEnter:c,onExited:u});return f===0?o?ae.createElement(ae.Fragment,null,i({})):e?i({display:"none"}):null:d==="exited"?e?i({display:"none"}):null:ae.createElement(ae.Fragment,null,i(nle({transition:t,duration:f,state:d,timingFunction:p})))}ql.displayName="@mantine/core/Transition";function E_({children:e,active:t=!0,refProp:r="ref"}){const n=Gte(t),o=Ws(n,e==null?void 0:e.ref);return Vp(e)?I.cloneElement(e,{[r]:o}):e}E_.displayName="@mantine/core/FocusTrap";var ile=Object.defineProperty,ale=Object.defineProperties,sle=Object.getOwnPropertyDescriptors,q7=Object.getOwnPropertySymbols,lle=Object.prototype.hasOwnProperty,cle=Object.prototype.propertyIsEnumerable,G7=(e,t,r)=>t in e?ile(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ba=(e,t)=>{for(var r in t||(t={}))lle.call(t,r)&&G7(e,r,t[r]);if(q7)for(var r of q7(t))cle.call(t,r)&&G7(e,r,t[r]);return e},m0=(e,t)=>ale(e,sle(t));function K7(e,t,r,n){return e==="center"||n==="center"?{top:t}:e==="end"?{bottom:r}:e==="start"?{top:r}:{}}function Y7(e,t,r,n,o){return e==="center"||n==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:r}:e==="start"?{[o==="ltr"?"left":"right"]:r}:{}}const ule={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function fle({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,arrowX:i,arrowY:a,dir:s}){const[l,c="center"]=e.split("-"),u={width:me(t),height:me(t),transform:"rotate(45deg)",position:"absolute",[ule[l]]:me(n)},f=me(-t/2);return l==="left"?m0(Ba(Ba({},u),K7(c,a,r,o)),{right:f,borderLeftColor:"transparent",borderBottomColor:"transparent"}):l==="right"?m0(Ba(Ba({},u),K7(c,a,r,o)),{left:f,borderRightColor:"transparent",borderTopColor:"transparent"}):l==="top"?m0(Ba(Ba({},u),Y7(c,i,r,o,s)),{bottom:f,borderTopColor:"transparent",borderLeftColor:"transparent"}):l==="bottom"?m0(Ba(Ba({},u),Y7(c,i,r,o,s)),{top:f,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var dle=Object.defineProperty,ple=Object.defineProperties,hle=Object.getOwnPropertyDescriptors,Rv=Object.getOwnPropertySymbols,EF=Object.prototype.hasOwnProperty,SF=Object.prototype.propertyIsEnumerable,X7=(e,t,r)=>t in e?dle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vle=(e,t)=>{for(var r in t||(t={}))EF.call(t,r)&&X7(e,r,t[r]);if(Rv)for(var r of Rv(t))SF.call(t,r)&&X7(e,r,t[r]);return e},gle=(e,t)=>ple(e,hle(t)),mle=(e,t)=>{var r={};for(var n in e)EF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Rv)for(var n of Rv(e))t.indexOf(n)<0&&SF.call(e,n)&&(r[n]=e[n]);return r};const S_=I.forwardRef((e,t)=>{var r=e,{position:n,arrowSize:o,arrowOffset:i,arrowRadius:a,arrowPosition:s,visible:l,arrowX:c,arrowY:u}=r,f=mle(r,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const d=Lr();return l?ae.createElement("div",gle(vle({},f),{ref:t,style:fle({position:n,arrowSize:o,arrowOffset:i,arrowRadius:a,arrowPosition:s,dir:d.dir,arrowX:c,arrowY:u})})):null});S_.displayName="@mantine/core/FloatingArrow";var yle=Object.defineProperty,ble=Object.defineProperties,wle=Object.getOwnPropertyDescriptors,Nv=Object.getOwnPropertySymbols,CF=Object.prototype.hasOwnProperty,PF=Object.prototype.propertyIsEnumerable,Z7=(e,t,r)=>t in e?yle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cc=(e,t)=>{for(var r in t||(t={}))CF.call(t,r)&&Z7(e,r,t[r]);if(Nv)for(var r of Nv(t))PF.call(t,r)&&Z7(e,r,t[r]);return e},y0=(e,t)=>ble(e,wle(t)),xle=(e,t)=>{var r={};for(var n in e)CF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Nv)for(var n of Nv(e))t.indexOf(n)<0&&PF.call(e,n)&&(r[n]=e[n]);return r};const _le={};function OF(e){var t;const r=et("PopoverDropdown",_le,e),{style:n,className:o,children:i,onKeyDownCapture:a}=r,s=xle(r,["style","className","children","onKeyDownCapture"]),l=bF(),{classes:c,cx:u}=Qse({radius:l.radius,shadow:l.shadow},{name:l.__staticSelector,classNames:l.classNames,styles:l.styles,unstyled:l.unstyled,variant:l.variant}),f=vR({opened:l.opened,shouldReturnFocus:l.returnFocus}),d=l.withRoles?{"aria-labelledby":l.getTargetId(),id:l.getDropdownId(),role:"dialog"}:{};return l.disabled?null:ae.createElement(Yp,y0(cc({},l.portalProps),{withinPortal:l.withinPortal}),ae.createElement(ql,y0(cc({mounted:l.opened},l.transitionProps),{transition:l.transitionProps.transition||"fade",duration:(t=l.transitionProps.duration)!=null?t:150,keepMounted:l.keepMounted,exitDuration:typeof l.transitionProps.exitDuration=="number"?l.transitionProps.exitDuration:l.transitionProps.duration}),p=>{var h,y;return ae.createElement(E_,{active:l.trapFocus},ae.createElement(rt,cc(y0(cc({},d),{tabIndex:-1,ref:l.floating,style:y0(cc(cc({},n),p),{zIndex:l.zIndex,top:(h=l.y)!=null?h:0,left:(y=l.x)!=null?y:0,width:l.width==="target"?void 0:me(l.width)}),className:u(c.dropdown,o),onKeyDownCapture:dQ(l.onClose,{active:l.closeOnEscape,onTrigger:f,onKeyDown:a}),"data-position":l.placement}),s),i,ae.createElement(S_,{ref:l.arrowRef,arrowX:l.arrowX,arrowY:l.arrowY,visible:l.withArrow,position:l.placement,arrowSize:l.arrowSize,arrowRadius:l.arrowRadius,arrowOffset:l.arrowOffset,arrowPosition:l.arrowPosition,className:c.arrow})))}))}OF.displayName="@mantine/core/PopoverDropdown";function AF(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){const[r,n]=t.split("-"),o=r==="right"?"left":"right";return n===void 0?o:`${o}-${n}`}return t}var J7=Object.getOwnPropertySymbols,Ele=Object.prototype.hasOwnProperty,Sle=Object.prototype.propertyIsEnumerable,Cle=(e,t)=>{var r={};for(var n in e)Ele.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&J7)for(var n of J7(e))t.indexOf(n)<0&&Sle.call(e,n)&&(r[n]=e[n]);return r};const Ple={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!1,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:Vs("popover"),__staticSelector:"Popover",width:"max-content"};function Ia(e){var t,r,n,o,i,a;const s=I.useRef(null),l=et("Popover",Ple,e),{children:c,position:u,offset:f,onPositionChange:d,positionDependencies:p,opened:h,transitionProps:y,width:_,middlewares:b,withArrow:m,arrowSize:E,arrowOffset:A,arrowRadius:D,arrowPosition:$,unstyled:g,classNames:N,styles:V,closeOnClickOutside:K,withinPortal:W,portalProps:P,closeOnEscape:C,clickOutsideEvents:v,trapFocus:w,onClose:B,onOpen:R,onChange:L,zIndex:U,radius:S,shadow:F,id:T,defaultOpened:q,__staticSelector:J,withRoles:te,disabled:ie,returnFocus:ce,variant:oe,keepMounted:ue}=l,O=Cle(l,["children","position","offset","onPositionChange","positionDependencies","opened","transitionProps","width","middlewares","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","unstyled","classNames","styles","closeOnClickOutside","withinPortal","portalProps","closeOnEscape","clickOutsideEvents","trapFocus","onClose","onOpen","onChange","zIndex","radius","shadow","id","defaultOpened","__staticSelector","withRoles","disabled","returnFocus","variant","keepMounted"]),[G,ee]=I.useState(null),[se,pe]=I.useState(null),ge=Hl(T),X=Lr(),M=Vse({middlewares:b,width:_,position:AF(X.dir,u),offset:typeof f=="number"?f+(m?E/2:0):f,arrowRef:s,arrowOffset:A,onPositionChange:d,positionDependencies:p,opened:h,defaultOpened:q,onChange:L,onOpen:R,onClose:B});Nte(()=>M.opened&&K&&M.onClose(),v,[G,se]);const z=I.useCallback(Q=>{ee(Q),M.floating.reference(Q)},[M.floating.reference]),Z=I.useCallback(Q=>{pe(Q),M.floating.floating(Q)},[M.floating.floating]);return ae.createElement(Wse,{value:{returnFocus:ce,disabled:ie,controlled:M.controlled,reference:z,floating:Z,x:M.floating.x,y:M.floating.y,arrowX:(n=(r=(t=M.floating)==null?void 0:t.middlewareData)==null?void 0:r.arrow)==null?void 0:n.x,arrowY:(a=(i=(o=M.floating)==null?void 0:o.middlewareData)==null?void 0:i.arrow)==null?void 0:a.y,opened:M.opened,arrowRef:s,transitionProps:y,width:_,withArrow:m,arrowSize:E,arrowOffset:A,arrowRadius:D,arrowPosition:$,placement:M.floating.placement,trapFocus:w,withinPortal:W,portalProps:P,zIndex:U,radius:S,shadow:F,closeOnEscape:C,onClose:M.onClose,onToggle:M.onToggle,getTargetId:()=>`${ge}-target`,getDropdownId:()=>`${ge}-dropdown`,withRoles:te,targetProps:O,__staticSelector:J,classNames:N,styles:V,unstyled:g,variant:oe,keepMounted:ue}},c)}Ia.Target=_F;Ia.Dropdown=OF;Ia.displayName="@mantine/core/Popover";var Ole=Object.defineProperty,Fv=Object.getOwnPropertySymbols,kF=Object.prototype.hasOwnProperty,IF=Object.prototype.propertyIsEnumerable,Q7=(e,t,r)=>t in e?Ole(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ale=(e,t)=>{for(var r in t||(t={}))kF.call(t,r)&&Q7(e,r,t[r]);if(Fv)for(var r of Fv(t))IF.call(t,r)&&Q7(e,r,t[r]);return e},kle=(e,t)=>{var r={};for(var n in e)kF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Fv)for(var n of Fv(e))t.indexOf(n)<0&&IF.call(e,n)&&(r[n]=e[n]);return r};function Ile(e){var t=e,{children:r,component:n="div",maxHeight:o=220,direction:i="column",id:a,innerRef:s,__staticSelector:l,styles:c,classNames:u,unstyled:f}=t,d=kle(t,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:p}=jae(null,{name:l,styles:c,classNames:u,unstyled:f});return ae.createElement(Ia.Dropdown,Ale({p:0,onMouseDown:h=>h.preventDefault()},d),ae.createElement("div",{style:{maxHeight:me(o),display:"flex"}},ae.createElement(rt,{component:n||"div",id:`${a}-items`,"aria-labelledby":`${a}-label`,role:"listbox",onMouseDown:h=>h.preventDefault(),style:{flex:1,overflowY:n!==u_?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:s},ae.createElement("div",{className:p.itemsWrapper,style:{flexDirection:i}},r))))}function wd({opened:e,transitionProps:t={transition:"fade",duration:0},shadow:r,withinPortal:n,portalProps:o,children:i,__staticSelector:a,onDirectionChange:s,switchDirectionOnFlip:l,zIndex:c,dropdownPosition:u,positionDependencies:f=[],classNames:d,styles:p,unstyled:h,readOnly:y,variant:_}){return ae.createElement(Ia,{unstyled:h,classNames:d,styles:p,width:"target",withRoles:!1,opened:e,middlewares:{flip:u==="flip",shift:!1},position:u==="flip"?"bottom":u,positionDependencies:f,zIndex:c,__staticSelector:a,withinPortal:n,portalProps:o,transitionProps:t,shadow:r,disabled:y,onPositionChange:b=>l&&(s==null?void 0:s(b==="top"?"column-reverse":"column")),variant:_},i)}wd.Target=Ia.Target;wd.Dropdown=Ile;var $le=Object.defineProperty,Tle=Object.defineProperties,Dle=Object.getOwnPropertyDescriptors,Bv=Object.getOwnPropertySymbols,$F=Object.prototype.hasOwnProperty,TF=Object.prototype.propertyIsEnumerable,eC=(e,t,r)=>t in e?$le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b0=(e,t)=>{for(var r in t||(t={}))$F.call(t,r)&&eC(e,r,t[r]);if(Bv)for(var r of Bv(t))TF.call(t,r)&&eC(e,r,t[r]);return e},Mle=(e,t)=>Tle(e,Dle(t)),Rle=(e,t)=>{var r={};for(var n in e)$F.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Bv)for(var n of Bv(e))t.indexOf(n)<0&&TF.call(e,n)&&(r[n]=e[n]);return r};function DF(e,t,r){const n=et(e,t,r),{label:o,description:i,error:a,required:s,classNames:l,styles:c,className:u,unstyled:f,__staticSelector:d,sx:p,errorProps:h,labelProps:y,descriptionProps:_,wrapperProps:b,id:m,size:E,style:A,inputContainer:D,inputWrapperOrder:$,withAsterisk:g,variant:N}=n,V=Rle(n,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),K=Hl(m),{systemStyles:W,rest:P}=zu(V),C=b0({label:o,description:i,error:a,required:s,classNames:l,className:u,__staticSelector:d,sx:p,errorProps:h,labelProps:y,descriptionProps:_,unstyled:f,styles:c,id:K,size:E,style:A,inputContainer:D,inputWrapperOrder:$,withAsterisk:g,variant:N},b);return Mle(b0({},P),{classNames:l,styles:c,unstyled:f,wrapperProps:b0(b0({},C),W),inputProps:{required:s,classNames:l,styles:c,unstyled:f,id:K,size:E,__staticSelector:d,error:a,variant:N}})}var Nle=at((e,t,{size:r})=>({label:{display:"inline-block",fontSize:Re({size:r,sizes:e.fontSizes}),fontWeight:500,color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[9],wordBreak:"break-word",cursor:"default",WebkitTapHighlightColor:"transparent"},required:{color:e.fn.variant({variant:"filled",color:"red"}).background}}));const Fle=Nle;var Ble=Object.defineProperty,jv=Object.getOwnPropertySymbols,MF=Object.prototype.hasOwnProperty,RF=Object.prototype.propertyIsEnumerable,tC=(e,t,r)=>t in e?Ble(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jle=(e,t)=>{for(var r in t||(t={}))MF.call(t,r)&&tC(e,r,t[r]);if(jv)for(var r of jv(t))RF.call(t,r)&&tC(e,r,t[r]);return e},Lle=(e,t)=>{var r={};for(var n in e)MF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&jv)for(var n of jv(e))t.indexOf(n)<0&&RF.call(e,n)&&(r[n]=e[n]);return r};const zle={labelElement:"label",size:"sm"},C_=I.forwardRef((e,t)=>{const r=et("InputLabel",zle,e),{labelElement:n,children:o,required:i,size:a,classNames:s,styles:l,unstyled:c,className:u,htmlFor:f,__staticSelector:d,variant:p,onMouseDown:h}=r,y=Lle(r,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:_,cx:b}=Fle(null,{name:["InputWrapper",d],classNames:s,styles:l,unstyled:c,variant:p,size:a});return ae.createElement(rt,jle({component:n,ref:t,className:b(_.label,u),htmlFor:n==="label"?f:void 0,onMouseDown:m=>{h==null||h(m),!m.defaultPrevented&&m.detail>1&&m.preventDefault()}},y),o,i&&ae.createElement("span",{className:_.required,"aria-hidden":!0}," *"))});C_.displayName="@mantine/core/InputLabel";var Ule=at((e,t,{size:r})=>({error:{wordBreak:"break-word",color:e.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${Re({size:r,sizes:e.fontSizes})} - ${me(2)})`,lineHeight:1.2,display:"block"}}));const Hle=Ule;var Vle=Object.defineProperty,Lv=Object.getOwnPropertySymbols,NF=Object.prototype.hasOwnProperty,FF=Object.prototype.propertyIsEnumerable,rC=(e,t,r)=>t in e?Vle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wle=(e,t)=>{for(var r in t||(t={}))NF.call(t,r)&&rC(e,r,t[r]);if(Lv)for(var r of Lv(t))FF.call(t,r)&&rC(e,r,t[r]);return e},qle=(e,t)=>{var r={};for(var n in e)NF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Lv)for(var n of Lv(e))t.indexOf(n)<0&&FF.call(e,n)&&(r[n]=e[n]);return r};const Gle={size:"sm"},P_=I.forwardRef((e,t)=>{const r=et("InputError",Gle,e),{children:n,className:o,classNames:i,styles:a,unstyled:s,size:l,__staticSelector:c,variant:u}=r,f=qle(r,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:d,cx:p}=Hle(null,{name:["InputWrapper",c],classNames:i,styles:a,unstyled:s,variant:u,size:l});return ae.createElement(St,Wle({className:p(d.error,o),ref:t},f),n)});P_.displayName="@mantine/core/InputError";var Kle=at((e,t,{size:r})=>({description:{wordBreak:"break-word",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontSize:`calc(${Re({size:r,sizes:e.fontSizes})} - ${me(2)})`,lineHeight:1.2,display:"block"}}));const Yle=Kle;var Xle=Object.defineProperty,zv=Object.getOwnPropertySymbols,BF=Object.prototype.hasOwnProperty,jF=Object.prototype.propertyIsEnumerable,nC=(e,t,r)=>t in e?Xle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Zle=(e,t)=>{for(var r in t||(t={}))BF.call(t,r)&&nC(e,r,t[r]);if(zv)for(var r of zv(t))jF.call(t,r)&&nC(e,r,t[r]);return e},Jle=(e,t)=>{var r={};for(var n in e)BF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&zv)for(var n of zv(e))t.indexOf(n)<0&&jF.call(e,n)&&(r[n]=e[n]);return r};const Qle={size:"sm"},O_=I.forwardRef((e,t)=>{const r=et("InputDescription",Qle,e),{children:n,className:o,classNames:i,styles:a,unstyled:s,size:l,__staticSelector:c,variant:u}=r,f=Jle(r,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:d,cx:p}=Yle(null,{name:["InputWrapper",c],classNames:i,styles:a,unstyled:s,variant:u,size:l});return ae.createElement(St,Zle({color:"dimmed",className:p(d.description,o),ref:t,unstyled:s},f),n)});O_.displayName="@mantine/core/InputDescription";const LF=I.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),ece=LF.Provider,tce=()=>I.useContext(LF);function rce(e,{hasDescription:t,hasError:r}){const n=e.findIndex(l=>l==="input"),o=e[n-1],i=e[n+1];return{offsetBottom:t&&i==="description"||r&&i==="error",offsetTop:t&&o==="description"||r&&o==="error"}}var nce=Object.defineProperty,oce=Object.defineProperties,ice=Object.getOwnPropertyDescriptors,oC=Object.getOwnPropertySymbols,ace=Object.prototype.hasOwnProperty,sce=Object.prototype.propertyIsEnumerable,iC=(e,t,r)=>t in e?nce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lce=(e,t)=>{for(var r in t||(t={}))ace.call(t,r)&&iC(e,r,t[r]);if(oC)for(var r of oC(t))sce.call(t,r)&&iC(e,r,t[r]);return e},cce=(e,t)=>oce(e,ice(t)),uce=at(e=>({root:cce(lce({},e.fn.fontStyles()),{lineHeight:e.lineHeight})}));const fce=uce;var dce=Object.defineProperty,pce=Object.defineProperties,hce=Object.getOwnPropertyDescriptors,Uv=Object.getOwnPropertySymbols,zF=Object.prototype.hasOwnProperty,UF=Object.prototype.propertyIsEnumerable,aC=(e,t,r)=>t in e?dce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ja=(e,t)=>{for(var r in t||(t={}))zF.call(t,r)&&aC(e,r,t[r]);if(Uv)for(var r of Uv(t))UF.call(t,r)&&aC(e,r,t[r]);return e},sC=(e,t)=>pce(e,hce(t)),vce=(e,t)=>{var r={};for(var n in e)zF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Uv)for(var n of Uv(e))t.indexOf(n)<0&&UF.call(e,n)&&(r[n]=e[n]);return r};const gce={labelElement:"label",size:"sm",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},HF=I.forwardRef((e,t)=>{const r=et("InputWrapper",gce,e),{className:n,label:o,children:i,required:a,id:s,error:l,description:c,labelElement:u,labelProps:f,descriptionProps:d,errorProps:p,classNames:h,styles:y,size:_,inputContainer:b,__staticSelector:m,unstyled:E,inputWrapperOrder:A,withAsterisk:D,variant:$}=r,g=vce(r,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:N,cx:V}=fce(null,{classNames:h,styles:y,name:["InputWrapper",m],unstyled:E,variant:$,size:_}),K={classNames:h,styles:y,unstyled:E,size:_,variant:$,__staticSelector:m},W=typeof D=="boolean"?D:a,P=s?`${s}-error`:p==null?void 0:p.id,C=s?`${s}-description`:d==null?void 0:d.id,w=`${!!l&&typeof l!="boolean"?P:""} ${c?C:""}`,B=w.trim().length>0?w.trim():void 0,R=o&&ae.createElement(C_,ja(ja({key:"label",labelElement:u,id:s?`${s}-label`:void 0,htmlFor:s,required:W},K),f),o),L=c&&ae.createElement(O_,sC(ja(ja({key:"description"},d),K),{size:(d==null?void 0:d.size)||K.size,id:(d==null?void 0:d.id)||C}),c),U=ae.createElement(I.Fragment,{key:"input"},b(i)),S=typeof l!="boolean"&&l&&ae.createElement(P_,sC(ja(ja({},p),K),{size:(p==null?void 0:p.size)||K.size,key:"error",id:(p==null?void 0:p.id)||P}),l),F=A.map(T=>{switch(T){case"label":return R;case"input":return U;case"description":return L;case"error":return S;default:return null}});return ae.createElement(ece,{value:ja({describedBy:B},rce(A,{hasDescription:!!L,hasError:!!S}))},ae.createElement(rt,ja({className:V(N.root,n),ref:t},g),F))});HF.displayName="@mantine/core/InputWrapper";var mce=Object.defineProperty,Hv=Object.getOwnPropertySymbols,VF=Object.prototype.hasOwnProperty,WF=Object.prototype.propertyIsEnumerable,lC=(e,t,r)=>t in e?mce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yce=(e,t)=>{for(var r in t||(t={}))VF.call(t,r)&&lC(e,r,t[r]);if(Hv)for(var r of Hv(t))WF.call(t,r)&&lC(e,r,t[r]);return e},bce=(e,t)=>{var r={};for(var n in e)VF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Hv)for(var n of Hv(e))t.indexOf(n)<0&&WF.call(e,n)&&(r[n]=e[n]);return r};const wce={},qF=I.forwardRef((e,t)=>{const r=et("InputPlaceholder",wce,e),{sx:n}=r,o=bce(r,["sx"]);return ae.createElement(rt,yce({component:"span",sx:[i=>i.fn.placeholderStyles(),...W6(n)],ref:t},o))});qF.displayName="@mantine/core/InputPlaceholder";var xce=Object.defineProperty,_ce=Object.defineProperties,Ece=Object.getOwnPropertyDescriptors,cC=Object.getOwnPropertySymbols,Sce=Object.prototype.hasOwnProperty,Cce=Object.prototype.propertyIsEnumerable,uC=(e,t,r)=>t in e?xce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w0=(e,t)=>{for(var r in t||(t={}))Sce.call(t,r)&&uC(e,r,t[r]);if(cC)for(var r of cC(t))Cce.call(t,r)&&uC(e,r,t[r]);return e},O2=(e,t)=>_ce(e,Ece(t));const fn={xs:me(30),sm:me(36),md:me(42),lg:me(50),xl:me(60)},Pce=["default","filled","unstyled"];function Oce({theme:e,variant:t}){return Pce.includes(t)?t==="default"?{border:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,transition:"border-color 100ms ease","&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:t==="filled"?{border:`${me(1)} solid transparent`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],"&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:{borderWidth:0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:"transparent",minHeight:me(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var Ace=at((e,{multiline:t,radius:r,invalid:n,rightSectionWidth:o,withRightSection:i,iconWidth:a,offsetBottom:s,offsetTop:l,pointer:c},{variant:u,size:f})=>{const d=e.fn.variant({variant:"filled",color:"red"}).background,p=u==="default"||u==="filled"?{minHeight:Re({size:f,sizes:fn}),paddingLeft:`calc(${Re({size:f,sizes:fn})} / 3)`,paddingRight:i?o||Re({size:f,sizes:fn}):`calc(${Re({size:f,sizes:fn})} / 3)`,borderRadius:e.fn.radius(r)}:u==="unstyled"&&i?{paddingRight:o||Re({size:f,sizes:fn})}:null;return{wrapper:{position:"relative",marginTop:l?`calc(${e.spacing.xs} / 2)`:void 0,marginBottom:s?`calc(${e.spacing.xs} / 2)`:void 0,"&:has(input:disabled)":{"& .mantine-Input-rightSection":{display:"none"}}},input:O2(w0(w0(O2(w0({},e.fn.fontStyles()),{height:t?u==="unstyled"?void 0:"auto":Re({size:f,sizes:fn}),WebkitTapHighlightColor:"transparent",lineHeight:t?e.lineHeight:`calc(${Re({size:f,sizes:fn})} - ${me(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:Re({size:f,sizes:e.fontSizes}),width:"100%",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"block",textAlign:"left",cursor:c?"pointer":void 0}),Oce({theme:e,variant:u})),p),{"&:disabled, &[data-disabled]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,cursor:"not-allowed",pointerEvents:"none","&::placeholder":{color:e.colors.dark[2]}},"&[data-invalid]":{color:d,borderColor:d,"&::placeholder":{opacity:1,color:d}},"&[data-with-icon]":{paddingLeft:typeof a=="number"?me(a):Re({size:f,sizes:fn})},"&::placeholder":O2(w0({},e.fn.placeholderStyles()),{opacity:1}),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{appearance:"none"},"&[type=number]":{MozAppearance:"textfield"}}),icon:{pointerEvents:"none",position:"absolute",zIndex:1,left:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",width:a?me(a):Re({size:f,sizes:fn}),color:n?e.colors.red[e.colorScheme==="dark"?6:7]:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[5]},rightSection:{position:"absolute",top:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",width:o||Re({size:f,sizes:fn})}}});const kce=Ace;var Ice=Object.defineProperty,$ce=Object.defineProperties,Tce=Object.getOwnPropertyDescriptors,Vv=Object.getOwnPropertySymbols,GF=Object.prototype.hasOwnProperty,KF=Object.prototype.propertyIsEnumerable,fC=(e,t,r)=>t in e?Ice(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x0=(e,t)=>{for(var r in t||(t={}))GF.call(t,r)&&fC(e,r,t[r]);if(Vv)for(var r of Vv(t))KF.call(t,r)&&fC(e,r,t[r]);return e},dC=(e,t)=>$ce(e,Tce(t)),Dce=(e,t)=>{var r={};for(var n in e)GF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Vv)for(var n of Vv(e))t.indexOf(n)<0&&KF.call(e,n)&&(r[n]=e[n]);return r};const Mce={size:"sm",variant:"default"},Gl=I.forwardRef((e,t)=>{const r=et("Input",Mce,e),{className:n,error:o,required:i,disabled:a,variant:s,icon:l,style:c,rightSectionWidth:u,iconWidth:f,rightSection:d,rightSectionProps:p,radius:h,size:y,wrapperProps:_,classNames:b,styles:m,__staticSelector:E,multiline:A,sx:D,unstyled:$,pointer:g}=r,N=Dce(r,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:V,offsetTop:K,describedBy:W}=tce(),{classes:P,cx:C}=kce({radius:h,multiline:A,invalid:!!o,rightSectionWidth:u?me(u):void 0,iconWidth:f,withRightSection:!!d,offsetBottom:V,offsetTop:K,pointer:g},{classNames:b,styles:m,name:["Input",E],unstyled:$,variant:s,size:y}),{systemStyles:v,rest:w}=zu(N);return ae.createElement(rt,x0(x0({className:C(P.wrapper,n),sx:D,style:c},v),_),l&&ae.createElement("div",{className:P.icon},l),ae.createElement(rt,dC(x0({component:"input"},w),{ref:t,required:i,"aria-invalid":!!o,"aria-describedby":W,disabled:a,"data-disabled":a||void 0,"data-with-icon":!!l||void 0,"data-invalid":!!o||void 0,className:P.input})),d&&ae.createElement("div",dC(x0({},p),{className:P.rightSection}),d))});Gl.displayName="@mantine/core/Input";Gl.Wrapper=HF;Gl.Label=C_;Gl.Description=O_;Gl.Error=P_;Gl.Placeholder=qF;const Ci=Gl,Rce={xs:me(12),sm:me(18),md:me(24),lg:me(34),xl:me(42)};var Nce=at((e,{color:t,transitionDuration:r},{size:n})=>{const o=Re({size:n,sizes:Rce}),i=t||(e.colorScheme==="dark"?e.white:e.black);return{root:{borderRadius:e.radius.sm,width:`calc(${o} + ${e.spacing.xs})`,height:`calc(${o} + ${e.spacing.xs})`,padding:`calc(${e.spacing.xs} / 2)`,cursor:"pointer"},burger:{position:"relative",userSelect:"none",boxSizing:"border-box","&, &::before, &::after":{display:"block",width:o,height:`calc(${o} / 12)`,backgroundColor:i,outline:`${me(1)} solid transparent`,transitionProperty:"background-color, transform",transitionDuration:`${r}ms`,"@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":void 0}},"&::before, &::after":{position:"absolute",content:'""',left:0},"&::before":{top:`calc((${o} / 3) * -1)`},"&::after":{top:`calc(${o} / 3)`},"&[data-opened]":{backgroundColor:"transparent","&::before":{transform:`translateY(calc(${o} / 3)) rotate(45deg)`},"&::after":{transform:`translateY(calc(-${o} / 3)) rotate(-45deg)`}}}}});const Fce=Nce;var Bce=Object.defineProperty,Wv=Object.getOwnPropertySymbols,YF=Object.prototype.hasOwnProperty,XF=Object.prototype.propertyIsEnumerable,pC=(e,t,r)=>t in e?Bce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jce=(e,t)=>{for(var r in t||(t={}))YF.call(t,r)&&pC(e,r,t[r]);if(Wv)for(var r of Wv(t))XF.call(t,r)&&pC(e,r,t[r]);return e},Lce=(e,t)=>{var r={};for(var n in e)YF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Wv)for(var n of Wv(e))t.indexOf(n)<0&&XF.call(e,n)&&(r[n]=e[n]);return r};const zce={size:"md",transitionDuration:300},ZF=I.forwardRef((e,t)=>{const r=et("Burger",zce,e),{className:n,opened:o,color:i,size:a,classNames:s,styles:l,transitionDuration:c,variant:u}=r,f=Lce(r,["className","opened","color","size","classNames","styles","transitionDuration","variant"]),{classes:d,cx:p}=Fce({color:i,transitionDuration:c},{classNames:s,styles:l,name:"Burger",variant:u,size:a});return ae.createElement(Kp,jce({className:p(d.root,n),ref:t},f),ae.createElement("div",{"data-opened":o||void 0,className:d.burger}))});ZF.displayName="@mantine/core/Burger";var Uce=at((e,{orientation:t,buttonBorderWidth:r})=>({root:{display:"flex",flexDirection:t==="vertical"?"column":"row","& [data-button]":{"&:first-of-type:not(:last-of-type)":{borderBottomRightRadius:0,[t==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${me(r)} / 2)`},"&:last-of-type:not(:first-of-type)":{borderTopLeftRadius:0,[t==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${me(r)} / 2)`},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${me(r)} / 2)`,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${me(r)} / 2)`},"& + [data-button]":{[t==="vertical"?"marginTop":"marginLeft"]:`calc(${r} * -1)`,"@media (min-resolution: 192dpi)":{[t==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const Hce=Uce;var Vce=Object.defineProperty,qv=Object.getOwnPropertySymbols,JF=Object.prototype.hasOwnProperty,QF=Object.prototype.propertyIsEnumerable,hC=(e,t,r)=>t in e?Vce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wce=(e,t)=>{for(var r in t||(t={}))JF.call(t,r)&&hC(e,r,t[r]);if(qv)for(var r of qv(t))QF.call(t,r)&&hC(e,r,t[r]);return e},qce=(e,t)=>{var r={};for(var n in e)JF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&qv)for(var n of qv(e))t.indexOf(n)<0&&QF.call(e,n)&&(r[n]=e[n]);return r};const Gce={orientation:"horizontal",buttonBorderWidth:1},eB=I.forwardRef((e,t)=>{const r=et("ButtonGroup",Gce,e),{className:n,orientation:o,buttonBorderWidth:i,unstyled:a}=r,s=qce(r,["className","orientation","buttonBorderWidth","unstyled"]),{classes:l,cx:c}=Hce({orientation:o,buttonBorderWidth:i},{name:"ButtonGroup",unstyled:a});return ae.createElement(rt,Wce({className:c(l.root,n),ref:t},s))});eB.displayName="@mantine/core/ButtonGroup";var Kce=Object.defineProperty,Yce=Object.defineProperties,Xce=Object.getOwnPropertyDescriptors,vC=Object.getOwnPropertySymbols,Zce=Object.prototype.hasOwnProperty,Jce=Object.prototype.propertyIsEnumerable,gC=(e,t,r)=>t in e?Kce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,oa=(e,t)=>{for(var r in t||(t={}))Zce.call(t,r)&&gC(e,r,t[r]);if(vC)for(var r of vC(t))Jce.call(t,r)&&gC(e,r,t[r]);return e},g1=(e,t)=>Yce(e,Xce(t));const Qce=["filled","outline","light","white","default","subtle","gradient"],m3={xs:{height:fn.xs,paddingLeft:me(14),paddingRight:me(14)},sm:{height:fn.sm,paddingLeft:me(18),paddingRight:me(18)},md:{height:fn.md,paddingLeft:me(22),paddingRight:me(22)},lg:{height:fn.lg,paddingLeft:me(26),paddingRight:me(26)},xl:{height:fn.xl,paddingLeft:me(32),paddingRight:me(32)},"compact-xs":{height:me(22),paddingLeft:me(7),paddingRight:me(7)},"compact-sm":{height:me(26),paddingLeft:me(8),paddingRight:me(8)},"compact-md":{height:me(30),paddingLeft:me(10),paddingRight:me(10)},"compact-lg":{height:me(34),paddingLeft:me(12),paddingRight:me(12)},"compact-xl":{height:me(40),paddingLeft:me(14),paddingRight:me(14)}};function eue({compact:e,size:t,withLeftIcon:r,withRightIcon:n}){if(e)return m3[`compact-${t}`];const o=m3[t];return o?g1(oa({},o),{paddingLeft:r?`calc(${o.paddingLeft} / 1.5)`:o.paddingLeft,paddingRight:n?`calc(${o.paddingRight} / 1.5)`:o.paddingRight}):{}}const tue=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function rue({variant:e,theme:t,color:r,gradient:n}){if(!Qce.includes(e))return null;const o=t.fn.variant({color:r,variant:e,gradient:n});return e==="gradient"?oa({border:0,backgroundImage:o.background,color:o.color},t.fn.hover({backgroundSize:"200%"})):oa({border:`${me(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover}))}var nue=at((e,{radius:t,fullWidth:r,compact:n,withLeftIcon:o,withRightIcon:i,color:a,gradient:s},{variant:l,size:c})=>({root:g1(oa(g1(oa(oa(oa(oa({},eue({compact:n,size:c,withLeftIcon:o,withRightIcon:i})),e.fn.fontStyles()),e.fn.focusStyles()),tue(r)),{borderRadius:e.fn.radius(t),fontWeight:600,position:"relative",lineHeight:1,fontSize:Re({size:c,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),rue({variant:l,theme:e,color:a,gradient:s})),{"&:active":e.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":g1(oa({content:'""'},e.fn.cover(me(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:e.spacing.xs},rightIcon:{marginLeft:e.spacing.xs},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const oue=nue;var iue=Object.defineProperty,Gv=Object.getOwnPropertySymbols,tB=Object.prototype.hasOwnProperty,rB=Object.prototype.propertyIsEnumerable,mC=(e,t,r)=>t in e?iue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yC=(e,t)=>{for(var r in t||(t={}))tB.call(t,r)&&mC(e,r,t[r]);if(Gv)for(var r of Gv(t))rB.call(t,r)&&mC(e,r,t[r]);return e},aue=(e,t)=>{var r={};for(var n in e)tB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Gv)for(var n of Gv(e))t.indexOf(n)<0&&rB.call(e,n)&&(r[n]=e[n]);return r};const sue={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},A_=I.forwardRef((e,t)=>{const r=et("Button",sue,e),{className:n,size:o,color:i,type:a,disabled:s,children:l,leftIcon:c,rightIcon:u,fullWidth:f,variant:d,radius:p,uppercase:h,compact:y,loading:_,loaderPosition:b,loaderProps:m,gradient:E,classNames:A,styles:D,unstyled:$}=r,g=aue(r,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:N,cx:V,theme:K}=oue({radius:p,color:i,fullWidth:f,compact:y,gradient:E,withLeftIcon:!!c,withRightIcon:!!u},{name:"Button",unstyled:$,classNames:A,styles:D,variant:d,size:o}),W=K.fn.variant({color:i,variant:d}),P=ae.createElement(pu,yC({color:W.color,size:`calc(${Re({size:o,sizes:m3}).height} / 2)`},m));return ae.createElement(Kp,yC({className:V(N.root,n),type:a,disabled:s,"data-button":!0,"data-disabled":s||void 0,"data-loading":_||void 0,ref:t,unstyled:$},g),ae.createElement("div",{className:N.inner},(c||_&&b==="left")&&ae.createElement("span",{className:V(N.icon,N.leftIcon)},_&&b==="left"?P:c),_&&b==="center"&&ae.createElement("span",{className:N.centerLoader},P),ae.createElement("span",{className:N.label,style:{textTransform:h?"uppercase":void 0}},l),(u||_&&b==="right")&&ae.createElement("span",{className:V(N.icon,N.rightIcon)},_&&b==="right"?P:u)))});A_.displayName="@mantine/core/Button";A_.Group=eB;const xr=A_;var lue=at((e,{radius:t,shadow:r})=>({root:{outline:0,WebkitTapHighlightColor:"transparent",display:"block",textDecoration:"none",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,boxSizing:"border-box",borderRadius:e.fn.radius(t),boxShadow:e.shadows[r]||r||"none","&[data-with-border]":{border:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}}}));const cue=lue;var uue=Object.defineProperty,Kv=Object.getOwnPropertySymbols,nB=Object.prototype.hasOwnProperty,oB=Object.prototype.propertyIsEnumerable,bC=(e,t,r)=>t in e?uue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fue=(e,t)=>{for(var r in t||(t={}))nB.call(t,r)&&bC(e,r,t[r]);if(Kv)for(var r of Kv(t))oB.call(t,r)&&bC(e,r,t[r]);return e},due=(e,t)=>{var r={};for(var n in e)nB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Kv)for(var n of Kv(e))t.indexOf(n)<0&&oB.call(e,n)&&(r[n]=e[n]);return r};const pue={},iB=I.forwardRef((e,t)=>{const r=et("Paper",pue,e),{className:n,children:o,radius:i,withBorder:a,shadow:s,unstyled:l,variant:c}=r,u=due(r,["className","children","radius","withBorder","shadow","unstyled","variant"]),{classes:f,cx:d}=cue({radius:i,shadow:s},{name:"Paper",unstyled:l,variant:c});return ae.createElement(rt,fue({className:d(f.root,n),"data-with-border":a||void 0,ref:t},u),o)});iB.displayName="@mantine/core/Paper";const aB=iB;var hue=at((e,{inline:t})=>({root:{display:t?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}}));const vue=hue;var gue=Object.defineProperty,Yv=Object.getOwnPropertySymbols,sB=Object.prototype.hasOwnProperty,lB=Object.prototype.propertyIsEnumerable,wC=(e,t,r)=>t in e?gue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mue=(e,t)=>{for(var r in t||(t={}))sB.call(t,r)&&wC(e,r,t[r]);if(Yv)for(var r of Yv(t))lB.call(t,r)&&wC(e,r,t[r]);return e},yue=(e,t)=>{var r={};for(var n in e)sB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Yv)for(var n of Yv(e))t.indexOf(n)<0&&lB.call(e,n)&&(r[n]=e[n]);return r};const cB=I.forwardRef((e,t)=>{const r=et("Center",{},e),{inline:n,className:o,unstyled:i,variant:a}=r,s=yue(r,["inline","className","unstyled","variant"]),{classes:l,cx:c}=vue({inline:n},{name:"Center",unstyled:i,variant:a});return ae.createElement(rt,mue({ref:t,className:c(l.root,o)},s))});cB.displayName="@mantine/core/Center";const wy=cB;var bue=Object.defineProperty,Xv=Object.getOwnPropertySymbols,uB=Object.prototype.hasOwnProperty,fB=Object.prototype.propertyIsEnumerable,xC=(e,t,r)=>t in e?bue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Zv=(e,t)=>{for(var r in t||(t={}))uB.call(t,r)&&xC(e,r,t[r]);if(Xv)for(var r of Xv(t))fB.call(t,r)&&xC(e,r,t[r]);return e},dB=(e,t)=>{var r={};for(var n in e)uB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Xv)for(var n of Xv(e))t.indexOf(n)<0&&fB.call(e,n)&&(r[n]=e[n]);return r};function pB(e){const t=e,{width:r,height:n,style:o}=t,i=dB(t,["width","height","style"]);return ae.createElement("svg",Zv({viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:Zv({width:r,height:n},o)},i),ae.createElement("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function wue(e){var t=e,{indeterminate:r}=t,n=dB(t,["indeterminate"]);return r?ae.createElement("svg",Zv({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6"},n),ae.createElement("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})):ae.createElement(pB,Zv({},n))}const hB=I.createContext(null),xue=hB.Provider,_ue=()=>I.useContext(hB),Eue={};function vB(e){const{value:t,defaultValue:r,onChange:n,multiple:o,children:i}=et("ChipGroup",Eue,e),[a,s]=Rl({value:t,defaultValue:r,finalValue:o?[]:null,onChange:n}),l=u=>Array.isArray(a)?a.includes(u):u===a,c=u=>{const f=u.currentTarget.value;Array.isArray(a)?s(a.includes(f)?a.filter(d=>d!==f):[...a,f]):s(f)};return ae.createElement(xue,{value:{isChipSelected:l,onChange:c,multiple:o}},i)}vB.displayName="@mantine/core/ChipGroup";var Sue=Object.defineProperty,Cue=Object.defineProperties,Pue=Object.getOwnPropertyDescriptors,_C=Object.getOwnPropertySymbols,Oue=Object.prototype.hasOwnProperty,Aue=Object.prototype.propertyIsEnumerable,EC=(e,t,r)=>t in e?Sue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Uo=(e,t)=>{for(var r in t||(t={}))Oue.call(t,r)&&EC(e,r,t[r]);if(_C)for(var r of _C(t))Aue.call(t,r)&&EC(e,r,t[r]);return e},sd=(e,t)=>Cue(e,Pue(t));const SC={xs:me(24),sm:me(28),md:me(32),lg:me(36),xl:me(40)},kf={xs:me(10),sm:me(12),md:me(14),lg:me(16),xl:me(18)},CC={xs:me(16),sm:me(20),md:me(24),lg:me(28),xl:me(32)},_0={xs:me(7.5),sm:me(10),md:me(11.5),lg:me(13),xl:me(15)};function kue(e,{color:t},r){const n=e.fn.variant({variant:"filled",color:t}),o=e.fn.variant({variant:"light",color:t});return r==="light"?{label:Uo({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:sd(Uo({color:o.color,backgroundColor:o.background},e.fn.hover({backgroundColor:o.hover})),{"&, &:hover":{backgroundColor:e.fn.variant({variant:"light",color:t}).background}})}:r==="filled"?{label:Uo({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:Uo({color:n.color,backgroundColor:n.background},e.fn.hover({backgroundColor:n.hover}))}:r==="outline"?{label:Uo({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:{border:`${me(1)} solid ${n.background}`}}:{label:null,checked:null}}var Iue=at((e,{radius:t,color:r},{size:n,variant:o})=>{const i=kue(e,{color:r},o);return{root:{},label:sd(Uo(sd(Uo({ref:zo("label")},e.fn.fontStyles()),{boxSizing:"border-box",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"inline-flex",alignItems:"center",userSelect:"none",border:`${me(1)} solid transparent`,borderRadius:e.fn.radius(t),height:Re({size:n,sizes:SC}),fontSize:Re({size:n,sizes:e.fontSizes}),lineHeight:`calc(${Re({size:n,sizes:SC})} - ${me(2)})`,paddingLeft:Re({size:n,sizes:CC}),paddingRight:Re({size:n,sizes:CC}),cursor:"pointer",whiteSpace:"nowrap",transition:"background-color 100ms ease",WebkitTapHighlightColor:"transparent"}),i.label),{"&[data-disabled]":sd(Uo({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],cursor:"not-allowed",pointerEvents:"none"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})),{[`& .${zo("iconWrapper")}`]:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}),"&[data-checked]":{paddingLeft:Re({size:n,sizes:_0}),paddingRight:Re({size:n,sizes:_0}),"&:not([data-disabled])":i.checked}}),iconWrapper:{ref:zo("iconWrapper"),color:o==="filled"?e.white:e.fn.variant({variant:"filled",color:r}).background,width:`calc(${Re({size:n,sizes:kf})} + (${Re({size:n,sizes:e.spacing})} / 1.5))`,maxWidth:`calc(${Re({size:n,sizes:kf})} + (${Re({size:n,sizes:e.spacing})} / 1.5))`,height:Re({size:n,sizes:kf}),display:"inline-block",verticalAlign:"middle",overflow:"hidden"},checkIcon:{width:Re({size:n,sizes:kf}),height:`calc(${Re({size:n,sizes:kf})} / 1.1)`,display:"block"},input:{width:0,height:0,padding:0,opacity:0,margin:0,"&:disabled + label":sd(Uo({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],cursor:"not-allowed",pointerEvents:"none"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})),{[`& .${zo("iconWrapper")}`]:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&[data-checked]":{paddingLeft:Re({size:n,sizes:_0}),paddingRight:Re({size:n,sizes:_0}),"&:not([data-disabled])":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}}),"&:focus":{outline:"none",[`& + .${zo("label")}`]:Uo({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),"&:focus:not(:focus-visible)":{[`& + .${zo("label")}`]:Uo({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)}}}}});const $ue=Iue;var Tue=Object.defineProperty,Jv=Object.getOwnPropertySymbols,gB=Object.prototype.hasOwnProperty,mB=Object.prototype.propertyIsEnumerable,PC=(e,t,r)=>t in e?Tue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,E0=(e,t)=>{for(var r in t||(t={}))gB.call(t,r)&&PC(e,r,t[r]);if(Jv)for(var r of Jv(t))mB.call(t,r)&&PC(e,r,t[r]);return e},Due=(e,t)=>{var r={};for(var n in e)gB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Jv)for(var n of Jv(e))t.indexOf(n)<0&&mB.call(e,n)&&(r[n]=e[n]);return r};const Mue={type:"checkbox",size:"sm",radius:"xl",variant:"outline"},Qv=I.forwardRef((e,t)=>{const r=et("Chip",Mue,e),{radius:n,type:o,size:i,variant:a,disabled:s,id:l,color:c,children:u,className:f,classNames:d,style:p,styles:h,checked:y,defaultChecked:_,onChange:b,sx:m,wrapperProps:E,value:A,unstyled:D}=r,$=Due(r,["radius","type","size","variant","disabled","id","color","children","className","classNames","style","styles","checked","defaultChecked","onChange","sx","wrapperProps","value","unstyled"]),g=_ue(),N=Hl(l),{systemStyles:V,rest:K}=zu($),{classes:W,cx:P}=$ue({radius:n,color:c},{classNames:d,styles:h,unstyled:D,name:"Chip",variant:a,size:i}),[C,v]=Rl({value:y,defaultValue:_,finalValue:!1,onChange:b}),w=g?{checked:g.isChipSelected(A),onChange:g.onChange,type:g.multiple?"checkbox":"radio"}:{},B=w.checked||C;return ae.createElement(rt,E0(E0({className:P(W.root,f),style:p,sx:m},V),E),ae.createElement("input",E0(E0({type:o,className:W.input,checked:B,onChange:R=>v(R.currentTarget.checked),id:N,disabled:s,ref:t,value:A},w),K)),ae.createElement("label",{htmlFor:N,"data-checked":B||void 0,"data-disabled":s||void 0,className:W.label},B&&ae.createElement("span",{className:W.iconWrapper},ae.createElement(pB,{className:W.checkIcon})),u))});Qv.displayName="@mantine/core/Chip";Qv.Group=vB;var Rue=at((e,{fluid:t,sizes:r},{size:n})=>({root:{paddingLeft:e.spacing.md,paddingRight:e.spacing.md,maxWidth:t?"100%":Re({size:n,sizes:r}),marginLeft:"auto",marginRight:"auto"}}));const Nue=Rue;var Fue=Object.defineProperty,eg=Object.getOwnPropertySymbols,yB=Object.prototype.hasOwnProperty,bB=Object.prototype.propertyIsEnumerable,OC=(e,t,r)=>t in e?Fue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bue=(e,t)=>{for(var r in t||(t={}))yB.call(t,r)&&OC(e,r,t[r]);if(eg)for(var r of eg(t))bB.call(t,r)&&OC(e,r,t[r]);return e},jue=(e,t)=>{var r={};for(var n in e)yB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&eg)for(var n of eg(e))t.indexOf(n)<0&&bB.call(e,n)&&(r[n]=e[n]);return r};const Lue={sizes:{xs:me(540),sm:me(720),md:me(960),lg:me(1140),xl:me(1320)}},k_=I.forwardRef((e,t)=>{const r=et("Container",Lue,e),{className:n,fluid:o,size:i,unstyled:a,sizes:s,variant:l}=r,c=jue(r,["className","fluid","size","unstyled","sizes","variant"]),{classes:u,cx:f}=Nue({fluid:o,sizes:s},{unstyled:a,name:"Container",variant:l,size:i});return ae.createElement(rt,Bue({className:f(u.root,n),ref:t},c))});k_.displayName="@mantine/core/Container";var zue=Object.defineProperty,tg=Object.getOwnPropertySymbols,wB=Object.prototype.hasOwnProperty,xB=Object.prototype.propertyIsEnumerable,AC=(e,t,r)=>t in e?zue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Uue=(e,t)=>{for(var r in t||(t={}))wB.call(t,r)&&AC(e,r,t[r]);if(tg)for(var r of tg(t))xB.call(t,r)&&AC(e,r,t[r]);return e},Hue=(e,t)=>{var r={};for(var n in e)wB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&tg)for(var n of tg(e))t.indexOf(n)<0&&xB.call(e,n)&&(r[n]=e[n]);return r};const Vue={timeout:1e3};function xy(e){const t=et("CopyButton",Vue,e),{children:r,timeout:n,value:o}=t,i=Hue(t,["children","timeout","value"]),a=Fte({timeout:n}),s=()=>a.copy(o);return ae.createElement(ae.Fragment,null,r(Uue({copy:s,copied:a.copied},i)))}xy.displayName="@mantine/core/CopyButton";const[Wue,Hu]=Hp("ModalBase component was not found in tree");var que=at(()=>({close:{marginLeft:"auto",marginRight:0}}));const Gue=que;var Kue=Object.defineProperty,rg=Object.getOwnPropertySymbols,_B=Object.prototype.hasOwnProperty,EB=Object.prototype.propertyIsEnumerable,kC=(e,t,r)=>t in e?Kue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yue=(e,t)=>{for(var r in t||(t={}))_B.call(t,r)&&kC(e,r,t[r]);if(rg)for(var r of rg(t))EB.call(t,r)&&kC(e,r,t[r]);return e},Xue=(e,t)=>{var r={};for(var n in e)_B.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&rg)for(var n of rg(e))t.indexOf(n)<0&&EB.call(e,n)&&(r[n]=e[n]);return r};const Zue={size:"sm"},Jue=I.forwardRef((e,t)=>{const r=Hu(),n=et(`${r.__staticSelector}CloseButton`,Zue,e),{className:o}=n,i=Xue(n,["className"]),{classes:a,cx:s}=Gue(null,r.stylesApi);return ae.createElement(s_,Yue({className:s(a.close,o),ref:t,onClick:r.onClose},i))});var Que=at(()=>({overlay:{}}));const efe=Que;var tfe=Object.defineProperty,rfe=Object.defineProperties,nfe=Object.getOwnPropertyDescriptors,IC=Object.getOwnPropertySymbols,ofe=Object.prototype.hasOwnProperty,ife=Object.prototype.propertyIsEnumerable,$C=(e,t,r)=>t in e?tfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,afe=(e,t)=>{for(var r in t||(t={}))ofe.call(t,r)&&$C(e,r,t[r]);if(IC)for(var r of IC(t))ife.call(t,r)&&$C(e,r,t[r]);return e},sfe=(e,t)=>rfe(e,nfe(t)),lfe=at((e,{color:t,opacity:r,blur:n,radius:o,gradient:i,fixed:a,zIndex:s})=>({root:sfe(afe({},e.fn.cover(0)),{position:a?"fixed":"absolute",backgroundColor:i?void 0:e.fn.rgba(t,r),backgroundImage:i,backdropFilter:n?`blur(${me(n)})`:void 0,borderRadius:e.fn.radius(o),zIndex:s,"&[data-center]":{display:"flex",alignItems:"center",justifyContent:"center"}})}));const cfe=lfe;var ufe=Object.defineProperty,ng=Object.getOwnPropertySymbols,SB=Object.prototype.hasOwnProperty,CB=Object.prototype.propertyIsEnumerable,TC=(e,t,r)=>t in e?ufe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ffe=(e,t)=>{for(var r in t||(t={}))SB.call(t,r)&&TC(e,r,t[r]);if(ng)for(var r of ng(t))CB.call(t,r)&&TC(e,r,t[r]);return e},dfe=(e,t)=>{var r={};for(var n in e)SB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ng)for(var n of ng(e))t.indexOf(n)<0&&CB.call(e,n)&&(r[n]=e[n]);return r};const pfe={opacity:.6,color:"#000",zIndex:Vs("modal"),radius:0},PB=I.forwardRef((e,t)=>{const r=et("Overlay",pfe,e),{variant:n,opacity:o,color:i,blur:a,gradient:s,zIndex:l,radius:c,children:u,className:f,classNames:d,styles:p,unstyled:h,center:y,fixed:_}=r,b=dfe(r,["variant","opacity","color","blur","gradient","zIndex","radius","children","className","classNames","styles","unstyled","center","fixed"]),{classes:m,cx:E}=cfe({color:i,opacity:o,blur:a,radius:c,gradient:s,fixed:_,zIndex:l},{name:"Overlay",classNames:d,styles:p,unstyled:h,variant:n});return ae.createElement(rt,ffe({ref:t,className:E(m.root,f),"data-center":y||void 0},b),u)});PB.displayName="@mantine/core/Overlay";const hfe=PB;var vfe=Object.defineProperty,gfe=Object.defineProperties,mfe=Object.getOwnPropertyDescriptors,og=Object.getOwnPropertySymbols,OB=Object.prototype.hasOwnProperty,AB=Object.prototype.propertyIsEnumerable,DC=(e,t,r)=>t in e?vfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,If=(e,t)=>{for(var r in t||(t={}))OB.call(t,r)&&DC(e,r,t[r]);if(og)for(var r of og(t))AB.call(t,r)&&DC(e,r,t[r]);return e},yfe=(e,t)=>gfe(e,mfe(t)),bfe=(e,t)=>{var r={};for(var n in e)OB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&og)for(var n of og(e))t.indexOf(n)<0&&AB.call(e,n)&&(r[n]=e[n]);return r};const wfe={},xfe=I.forwardRef((e,t)=>{const r=Hu(),n=et(`${r.__staticSelector}Overlay`,wfe,e),{onClick:o,transitionProps:i,style:a,className:s}=n,l=bfe(n,["onClick","transitionProps","style","className"]),{classes:c,cx:u}=efe(null,r.stylesApi),f=d=>{o==null||o(d),r.closeOnClickOutside&&r.onClose()};return ae.createElement(ql,yfe(If(If({mounted:r.opened},r.transitionProps),i),{transition:"fade"}),d=>ae.createElement(hfe,If({ref:t,onClick:f,fixed:!0,style:If(If({},a),d),className:u(c.overlay,s),zIndex:r.zIndex},l)))});var _fe=at((e,{zIndex:t})=>({inner:{position:"fixed",width:"100%",top:0,bottom:0,maxHeight:"100%",zIndex:t,pointerEvents:"none"},content:{pointerEvents:"all"}}));const Efe=_fe;var Sfe=Object.defineProperty,ig=Object.getOwnPropertySymbols,kB=Object.prototype.hasOwnProperty,IB=Object.prototype.propertyIsEnumerable,MC=(e,t,r)=>t in e?Sfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$f=(e,t)=>{for(var r in t||(t={}))kB.call(t,r)&&MC(e,r,t[r]);if(ig)for(var r of ig(t))IB.call(t,r)&&MC(e,r,t[r]);return e},Cfe=(e,t)=>{var r={};for(var n in e)kB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ig)for(var n of ig(e))t.indexOf(n)<0&&IB.call(e,n)&&(r[n]=e[n]);return r};const Pfe={},Ofe=I.forwardRef((e,t)=>{const r=Hu(),n=et(`${r.__staticSelector}Content`,Pfe,e),{className:o,transitionProps:i,style:a,onKeyDown:s}=n,l=Cfe(n,["className","transitionProps","style","onKeyDown"]),{classes:c,cx:u}=Efe({zIndex:r.zIndex},r.stylesApi),f=d=>{var p;((p=d.target)==null?void 0:p.getAttribute("data-mantine-stop-propagation"))!=="true"&&d.key==="Escape"&&r.closeOnEscape&&r.onClose(),s==null||s(d)};return ae.createElement(ql,$f($f({mounted:r.opened,transition:"pop"},r.transitionProps),i),d=>ae.createElement("div",{className:u(c.inner)},ae.createElement(E_,{active:r.opened&&r.trapFocus},ae.createElement(aB,$f({component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":r.bodyMounted?r.getBodyId():void 0,"aria-labelledby":r.titleMounted?r.getTitleId():void 0,onKeyDown:f,ref:t,className:u(c.content,o),style:$f($f({},a),d),shadow:r.shadow},l),l.children))))});var Afe=at((e,{padding:t})=>{const r=Re({size:t,sizes:e.spacing});return{header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:r,paddingRight:`calc(${r} - ${me(5)})`,position:"sticky",top:0,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,zIndex:1e3}}});const kfe=Afe;var Ife=Object.defineProperty,ag=Object.getOwnPropertySymbols,$B=Object.prototype.hasOwnProperty,TB=Object.prototype.propertyIsEnumerable,RC=(e,t,r)=>t in e?Ife(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$fe=(e,t)=>{for(var r in t||(t={}))$B.call(t,r)&&RC(e,r,t[r]);if(ag)for(var r of ag(t))TB.call(t,r)&&RC(e,r,t[r]);return e},Tfe=(e,t)=>{var r={};for(var n in e)$B.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ag)for(var n of ag(e))t.indexOf(n)<0&&TB.call(e,n)&&(r[n]=e[n]);return r};const Dfe={},Mfe=I.forwardRef((e,t)=>{const r=Hu(),n=et(`${r.__staticSelector}Header`,Dfe,e),{className:o}=n,i=Tfe(n,["className"]),{classes:a,cx:s}=kfe({padding:r.padding},r.stylesApi);return ae.createElement(rt,$fe({ref:t,className:s(a.header,o)},i))});var Rfe=at(e=>({title:{lineHeight:1,padding:0,margin:0,fontWeight:400,fontSize:e.fontSizes.md}}));const Nfe=Rfe;var Ffe=Object.defineProperty,sg=Object.getOwnPropertySymbols,DB=Object.prototype.hasOwnProperty,MB=Object.prototype.propertyIsEnumerable,NC=(e,t,r)=>t in e?Ffe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bfe=(e,t)=>{for(var r in t||(t={}))DB.call(t,r)&&NC(e,r,t[r]);if(sg)for(var r of sg(t))MB.call(t,r)&&NC(e,r,t[r]);return e},jfe=(e,t)=>{var r={};for(var n in e)DB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&sg)for(var n of sg(e))t.indexOf(n)<0&&MB.call(e,n)&&(r[n]=e[n]);return r};const Lfe={},zfe=I.forwardRef((e,t)=>{const r=Hu(),n=et(`${r.__staticSelector}Title`,Lfe,e),{className:o}=n,i=jfe(n,["className"]),{classes:a,cx:s}=Nfe(null,r.stylesApi);return I.useEffect(()=>(r.setTitleMounted(!0),()=>r.setTitleMounted(!1)),[]),ae.createElement(rt,Bfe({component:"h2",id:r.getTitleId(),className:s(a.title,o),ref:t},i))});var Ufe=at((e,{padding:t})=>({body:{padding:Re({size:t,sizes:e.spacing}),"&:not(:only-child)":{paddingTop:0}}}));const Hfe=Ufe;var Vfe=Object.defineProperty,lg=Object.getOwnPropertySymbols,RB=Object.prototype.hasOwnProperty,NB=Object.prototype.propertyIsEnumerable,FC=(e,t,r)=>t in e?Vfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wfe=(e,t)=>{for(var r in t||(t={}))RB.call(t,r)&&FC(e,r,t[r]);if(lg)for(var r of lg(t))NB.call(t,r)&&FC(e,r,t[r]);return e},qfe=(e,t)=>{var r={};for(var n in e)RB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&lg)for(var n of lg(e))t.indexOf(n)<0&&NB.call(e,n)&&(r[n]=e[n]);return r};const Gfe={},Kfe=I.forwardRef((e,t)=>{const r=Hu(),n=et(`${r.__staticSelector}Body`,Gfe,e),{className:o}=n,i=qfe(n,["className"]),{classes:a,cx:s}=Hfe({padding:r.padding},r.stylesApi);return I.useEffect(()=>(r.setBodyMounted(!0),()=>r.setBodyMounted(!1)),[]),ae.createElement(rt,Wfe({id:r.getBodyId(),className:s(a.body,o),ref:t},i))});function Yfe({children:e}){return ae.createElement(ae.Fragment,null,e)}function Xfe({opened:e,transitionDuration:t}){const[r,n]=I.useState(e),o=I.useRef(),a=py()?0:t;return I.useEffect(()=>(e?(n(!0),window.clearTimeout(o.current)):a===0?n(!1):o.current=window.setTimeout(()=>n(!1),a),()=>window.clearTimeout(o.current)),[e,a]),r}var Zfe=at(()=>({root:{}}));const Jfe=Zfe;var Qfe=Object.defineProperty,ede=Object.defineProperties,tde=Object.getOwnPropertyDescriptors,cg=Object.getOwnPropertySymbols,FB=Object.prototype.hasOwnProperty,BB=Object.prototype.propertyIsEnumerable,BC=(e,t,r)=>t in e?Qfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A2=(e,t)=>{for(var r in t||(t={}))FB.call(t,r)&&BC(e,r,t[r]);if(cg)for(var r of cg(t))BB.call(t,r)&&BC(e,r,t[r]);return e},jC=(e,t)=>ede(e,tde(t)),rde=(e,t)=>{var r={};for(var n in e)FB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&cg)for(var n of cg(e))t.indexOf(n)<0&&BB.call(e,n)&&(r[n]=e[n]);return r};const I_={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Vs("modal"),padding:"md",size:"md",shadow:"xl"};function sr(e){const t=et("ModalBase",I_,e),{opened:r,onClose:n,children:o,closeOnClickOutside:i,__staticSelector:a,transitionProps:s,withinPortal:l,portalProps:c,keepMounted:u,target:f,zIndex:d,lockScroll:p,trapFocus:h,closeOnEscape:y,returnFocus:_,padding:b,shadow:m,id:E,size:A,variant:D,classNames:$,unstyled:g,styles:N,className:V}=t,K=rde(t,["opened","onClose","children","closeOnClickOutside","__staticSelector","transitionProps","withinPortal","portalProps","keepMounted","target","zIndex","lockScroll","trapFocus","closeOnEscape","returnFocus","padding","shadow","id","size","variant","classNames","unstyled","styles","className"]),{classes:W,cx:P}=Jfe(null,{name:a,classNames:$,styles:N,unstyled:g,variant:D,size:A}),C=Hl(E),[v,w]=I.useState(!1),[B,R]=I.useState(!1),L=typeof(s==null?void 0:s.duration)=="number"?s==null?void 0:s.duration:200,U=Xfe({opened:r,transitionDuration:L});return up("keydown",S=>{!h&&S.key==="Escape"&&y&&n()}),vR({opened:r,shouldReturnFocus:h&&_}),ae.createElement(Yp,jC(A2({},c),{withinPortal:l,target:f}),ae.createElement(Wue,{value:{__staticSelector:a,opened:r,onClose:n,closeOnClickOutside:i,transitionProps:jC(A2({},s),{duration:L,keepMounted:u}),zIndex:d,padding:b,id:C,getTitleId:()=>`${C}-title`,getBodyId:()=>`${C}-body`,titleMounted:v,bodyMounted:B,setTitleMounted:w,setBodyMounted:R,trapFocus:h,closeOnEscape:y,shadow:m,stylesApi:{name:a,size:A,variant:D,classNames:$,styles:N,unstyled:g}}},ae.createElement(iQ,{enabled:U&&p},ae.createElement(rt,A2({className:P(W.root,V)},K),o))))}sr.CloseButton=Jue;sr.Overlay=xfe;sr.Content=Ofe;sr.Header=Mfe;sr.Title=zfe;sr.Body=Kfe;sr.NativeScrollArea=Yfe;const[nde,ode]=Hp("Grid component was not found in tree");var ide=Object.defineProperty,LC=Object.getOwnPropertySymbols,ade=Object.prototype.hasOwnProperty,sde=Object.prototype.propertyIsEnumerable,zC=(e,t,r)=>t in e?ide(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lde=(e,t)=>{for(var r in t||(t={}))ade.call(t,r)&&zC(e,r,t[r]);if(LC)for(var r of LC(t))sde.call(t,r)&&zC(e,r,t[r]);return e};const $_=(e,t)=>e==="content"?"auto":e==="auto"?"0rem":e?`${100/(t/e)}%`:void 0,jB=(e,t,r)=>r||e==="auto"||e==="content"?"unset":$_(e,t),LB=(e,t)=>{if(e)return e==="auto"||t?1:0},zB=(e,t)=>e===0?0:e?`${100/(t/e)}%`:void 0,UB=(e,t)=>typeof e<"u"?`calc(${Re({size:e,sizes:t.spacing})} / 2)`:void 0;function cde({sizes:e,offsets:t,orders:r,theme:n,columns:o,gutters:i,grow:a}){return WM.reduce((s,l)=>(s[`@media (min-width: ${mn(n.breakpoints[l])})`]={order:r[l],flexBasis:$_(e[l],o),padding:UB(i[l],n),flexShrink:0,width:e[l]==="content"?"auto":void 0,maxWidth:jB(e[l],o,a),marginLeft:zB(t[l],o),flexGrow:LB(e[l],a)},s),{})}var ude=at((e,{gutter:t,gutterXs:r,gutterSm:n,gutterMd:o,gutterLg:i,gutterXl:a,grow:s,offset:l,offsetXs:c,offsetSm:u,offsetMd:f,offsetLg:d,offsetXl:p,columns:h,span:y,xs:_,sm:b,md:m,lg:E,xl:A,order:D,orderXs:$,orderSm:g,orderMd:N,orderLg:V,orderXl:K})=>({col:lde({boxSizing:"border-box",flexGrow:LB(y,s),order:D,padding:UB(t,e),marginLeft:zB(l,h),flexBasis:$_(y,h),flexShrink:0,width:y==="content"?"auto":void 0,maxWidth:jB(y,h,s)},cde({sizes:{xs:_,sm:b,md:m,lg:E,xl:A},offsets:{xs:c,sm:u,md:f,lg:d,xl:p},orders:{xs:$,sm:g,md:N,lg:V,xl:K},gutters:{xs:r,sm:n,md:o,lg:i,xl:a},theme:e,columns:h,grow:s}))}));const fde=ude;var dde=Object.defineProperty,ug=Object.getOwnPropertySymbols,HB=Object.prototype.hasOwnProperty,VB=Object.prototype.propertyIsEnumerable,UC=(e,t,r)=>t in e?dde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pde=(e,t)=>{for(var r in t||(t={}))HB.call(t,r)&&UC(e,r,t[r]);if(ug)for(var r of ug(t))VB.call(t,r)&&UC(e,r,t[r]);return e},hde=(e,t)=>{var r={};for(var n in e)HB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ug)for(var n of ug(e))t.indexOf(n)<0&&VB.call(e,n)&&(r[n]=e[n]);return r};const vde={};function gde(e){return e==="auto"||e==="content"?!0:typeof e=="number"&&e>0&&e%1===0}const WB=I.forwardRef((e,t)=>{const r=et("GridCol",vde,e),{children:n,span:o,offset:i,offsetXs:a,offsetSm:s,offsetMd:l,offsetLg:c,offsetXl:u,xs:f,sm:d,md:p,lg:h,xl:y,order:_,orderXs:b,orderSm:m,orderMd:E,orderLg:A,orderXl:D,className:$,id:g,unstyled:N,variant:V}=r,K=hde(r,["children","span","offset","offsetXs","offsetSm","offsetMd","offsetLg","offsetXl","xs","sm","md","lg","xl","order","orderXs","orderSm","orderMd","orderLg","orderXl","className","id","unstyled","variant"]),W=ode(),P=o||W.columns,{classes:C,cx:v}=fde({gutter:W.gutter,gutterXs:W.gutterXs,gutterSm:W.gutterSm,gutterMd:W.gutterMd,gutterLg:W.gutterLg,gutterXl:W.gutterXl,offset:i,offsetXs:a,offsetSm:s,offsetMd:l,offsetLg:c,offsetXl:u,xs:f,sm:d,md:p,lg:h,xl:y,order:_,orderXs:b,orderSm:m,orderMd:E,orderLg:A,orderXl:D,grow:W.grow,columns:W.columns,span:P},{unstyled:N,name:"Grid",variant:V});return!gde(P)||P>W.columns?null:ae.createElement(rt,pde({className:v(C.col,$),ref:t},K),n)});WB.displayName="@mantine/core/Col";var mde=Object.defineProperty,HC=Object.getOwnPropertySymbols,yde=Object.prototype.hasOwnProperty,bde=Object.prototype.propertyIsEnumerable,VC=(e,t,r)=>t in e?mde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wde=(e,t)=>{for(var r in t||(t={}))yde.call(t,r)&&VC(e,r,t[r]);if(HC)for(var r of HC(t))bde.call(t,r)&&VC(e,r,t[r]);return e};function xde(e,t){return WM.reduce((r,n)=>(typeof e[n]<"u"&&(r[`@media (min-width: ${t.breakpoints[n]})`]={margin:`calc(-${Re({size:e[n],sizes:t.spacing})} / 2)`}),r),{})}var _de=at((e,{justify:t,align:r,gutter:n,gutterXs:o,gutterSm:i,gutterMd:a,gutterLg:s,gutterXl:l})=>({root:wde({margin:`calc(-${Re({size:n,sizes:e.spacing})} / 2)`,display:"flex",flexWrap:"wrap",justifyContent:t,alignItems:r},xde({xs:o,sm:i,md:a,lg:s,xl:l},e))}));const Ede=_de;var Sde=Object.defineProperty,fg=Object.getOwnPropertySymbols,qB=Object.prototype.hasOwnProperty,GB=Object.prototype.propertyIsEnumerable,WC=(e,t,r)=>t in e?Sde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Cde=(e,t)=>{for(var r in t||(t={}))qB.call(t,r)&&WC(e,r,t[r]);if(fg)for(var r of fg(t))GB.call(t,r)&&WC(e,r,t[r]);return e},Pde=(e,t)=>{var r={};for(var n in e)qB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&fg)for(var n of fg(e))t.indexOf(n)<0&&GB.call(e,n)&&(r[n]=e[n]);return r};const Ode={gutter:"md",justify:"flex-start",align:"stretch",columns:12},_s=I.forwardRef((e,t)=>{const r=et("Grid",Ode,e),{gutter:n,gutterXs:o,gutterSm:i,gutterMd:a,gutterLg:s,gutterXl:l,children:c,grow:u,justify:f,align:d,columns:p,className:h,id:y,unstyled:_,variant:b}=r,m=Pde(r,["gutter","gutterXs","gutterSm","gutterMd","gutterLg","gutterXl","children","grow","justify","align","columns","className","id","unstyled","variant"]),{classes:E,cx:A}=Ede({gutter:n,justify:f,align:d,gutterXs:o,gutterSm:i,gutterMd:a,gutterLg:s,gutterXl:l},{unstyled:_,name:"Grid",variant:b});return ae.createElement(nde,{value:{gutter:n,gutterXs:o,gutterSm:i,gutterMd:a,gutterLg:s,gutterXl:l,grow:u,columns:p}},ae.createElement(rt,Cde({className:A(E.root,h),ref:t},m),c))});_s.Col=WB;_s.displayName="@mantine/core/Grid";function Ade(e){return I.Children.toArray(e).filter(Boolean)}const kde={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var Ide=at((e,{spacing:t,position:r,noWrap:n,grow:o,align:i,count:a})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:i||"center",flexWrap:n?"nowrap":"wrap",justifyContent:kde[r],gap:Re({size:t,sizes:e.spacing}),"& > *":{boxSizing:"border-box",maxWidth:o?`calc(${100/a}% - (${me(Re({size:t,sizes:e.spacing}))} - ${Re({size:t,sizes:e.spacing})} / ${a}))`:void 0,flexGrow:o?1:0}}}));const $de=Ide;var Tde=Object.defineProperty,dg=Object.getOwnPropertySymbols,KB=Object.prototype.hasOwnProperty,YB=Object.prototype.propertyIsEnumerable,qC=(e,t,r)=>t in e?Tde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Dde=(e,t)=>{for(var r in t||(t={}))KB.call(t,r)&&qC(e,r,t[r]);if(dg)for(var r of dg(t))YB.call(t,r)&&qC(e,r,t[r]);return e},Mde=(e,t)=>{var r={};for(var n in e)KB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&dg)for(var n of dg(e))t.indexOf(n)<0&&YB.call(e,n)&&(r[n]=e[n]);return r};const Rde={position:"left",spacing:"md"},Kt=I.forwardRef((e,t)=>{const r=et("Group",Rde,e),{className:n,position:o,align:i,children:a,noWrap:s,grow:l,spacing:c,unstyled:u,variant:f}=r,d=Mde(r,["className","position","align","children","noWrap","grow","spacing","unstyled","variant"]),p=Ade(a),{classes:h,cx:y}=$de({align:i,grow:l,noWrap:s,spacing:c,position:o,count:p.length},{unstyled:u,name:"Group",variant:f});return ae.createElement(rt,Dde({className:y(h.root,n),ref:t},d),p)});Kt.displayName="@mantine/core/Group";var Nde=at((e,{color:t})=>({root:{backgroundColor:e.fn.themeColor(t,e.colorScheme==="dark"?5:2),color:e.colorScheme==="dark"?e.colors.dark[9]:"inherit"}}));const Fde=Nde;var Bde=Object.defineProperty,pg=Object.getOwnPropertySymbols,XB=Object.prototype.hasOwnProperty,ZB=Object.prototype.propertyIsEnumerable,GC=(e,t,r)=>t in e?Bde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jde=(e,t)=>{for(var r in t||(t={}))XB.call(t,r)&&GC(e,r,t[r]);if(pg)for(var r of pg(t))ZB.call(t,r)&&GC(e,r,t[r]);return e},Lde=(e,t)=>{var r={};for(var n in e)XB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&pg)for(var n of pg(e))t.indexOf(n)<0&&ZB.call(e,n)&&(r[n]=e[n]);return r};const zde={color:"yellow"},T_=I.forwardRef((e,t)=>{const r=et("Mark",zde,e),{color:n,className:o,unstyled:i,variant:a}=r,s=Lde(r,["color","className","unstyled","variant"]),{classes:l,cx:c}=Fde({color:n},{unstyled:i,name:"Mark",variant:a});return ae.createElement(rt,jde({component:"mark",ref:t,className:c(l.root,o)},s))});T_.displayName="@mantine/core/Mark";function Ude({open:e,close:t,openDelay:r,closeDelay:n}){const o=I.useRef(-1),i=I.useRef(-1),a=()=>{window.clearTimeout(o.current),window.clearTimeout(i.current)},s=()=>{a(),r===0?e():o.current=window.setTimeout(e,r)},l=()=>{a(),n===0?t():i.current=window.setTimeout(t,n)};return I.useEffect(()=>a,[]),{openDropdown:s,closeDropdown:l}}function fp(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i=0)&&(r[o]=e[o]);return r}var Hde=I.useLayoutEffect,Vde=function(t){var r=I.useRef(t);return Hde(function(){r.current=t}),r},KC=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},Wde=function(t,r){var n=I.useRef();return I.useCallback(function(o){t.current=o,n.current&&KC(n.current,null),n.current=r,r&&KC(r,o)},[r])},YC={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},XC=function(t){Object.keys(YC).forEach(function(r){t.style.setProperty(r,YC[r],"important")})},Bn=null,qde=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function Gde(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),Bn||(Bn=document.createElement("textarea"),Bn.setAttribute("tabindex","-1"),Bn.setAttribute("aria-hidden","true"),XC(Bn)),Bn.parentNode===null&&document.body.appendChild(Bn);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(d){var p=d;Bn.style[p]=a[p]}),XC(Bn),Bn.value=t;var l=qde(Bn,e);Bn.value="x";var c=Bn.scrollHeight-o,u=c*r;s==="border-box"&&(u=u+o+i),l=Math.max(u,l);var f=c*n;return s==="border-box"&&(f=f+o+i),l=Math.min(f,l),[l,c]}var ZC=function(){},Kde=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},Yde=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],Xde=!!document.documentElement.currentStyle,Zde=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=Kde(Yde,r),o=n.boxSizing;if(o==="")return null;Xde&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var i=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),a=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:i,borderSize:a}},Jde=function(t){var r=Vde(t);I.useLayoutEffect(function(){var n=function(i){r.current(i)};return window.addEventListener("resize",n),function(){window.removeEventListener("resize",n)}},[])},Qde=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?ZC:a,l=t.onHeightChange,c=l===void 0?ZC:l,u=fp(t,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),f=u.value!==void 0,d=I.useRef(null),p=Wde(d,r),h=I.useRef(0),y=I.useRef(),_=function(){var E=d.current,A=n&&y.current?y.current:Zde(E);if(A){y.current=A;var D=Gde(A,E.value||E.placeholder||"x",i,o),$=D[0],g=D[1];h.current!==$&&(h.current=$,E.style.setProperty("height",$+"px","important"),c($,{rowHeight:g}))}},b=function(E){f||_(),s(E)};return I.useLayoutEffect(_),Jde(_),I.createElement("textarea",Ze({},u,{onChange:b,ref:p}))},epe=I.forwardRef(Qde);const tpe=epe;var rpe=at(e=>({input:{paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs}}));const npe=rpe;var ope=Object.defineProperty,ipe=Object.defineProperties,ape=Object.getOwnPropertyDescriptors,hg=Object.getOwnPropertySymbols,JB=Object.prototype.hasOwnProperty,QB=Object.prototype.propertyIsEnumerable,JC=(e,t,r)=>t in e?ope(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uc=(e,t)=>{for(var r in t||(t={}))JB.call(t,r)&&JC(e,r,t[r]);if(hg)for(var r of hg(t))QB.call(t,r)&&JC(e,r,t[r]);return e},k2=(e,t)=>ipe(e,ape(t)),spe=(e,t)=>{var r={};for(var n in e)JB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&hg)for(var n of hg(e))t.indexOf(n)<0&&QB.call(e,n)&&(r[n]=e[n]);return r};const lpe={autosize:!1,size:"sm",__staticSelector:"Textarea"},D_=I.forwardRef((e,t)=>{const r=et("Textarea",lpe,e),{autosize:n,maxRows:o,minRows:i,label:a,error:s,description:l,id:c,className:u,required:f,style:d,wrapperProps:p,classNames:h,styles:y,size:_,__staticSelector:b,sx:m,errorProps:E,descriptionProps:A,labelProps:D,inputWrapperOrder:$,inputContainer:g,unstyled:N,withAsterisk:V,variant:K}=r,W=spe(r,["autosize","maxRows","minRows","label","error","description","id","className","required","style","wrapperProps","classNames","styles","size","__staticSelector","sx","errorProps","descriptionProps","labelProps","inputWrapperOrder","inputContainer","unstyled","withAsterisk","variant"]),P=Hl(c),{classes:C,cx:v}=npe(),{systemStyles:w,rest:B}=zu(W),R=uc({required:f,ref:t,error:s,id:P,classNames:k2(uc({},h),{input:v(C.input,h==null?void 0:h.input)}),styles:y,__staticSelector:b,size:_,multiline:!0,unstyled:N,variant:K},B);return ae.createElement(Ci.Wrapper,uc(uc({label:a,error:s,id:P,description:l,required:f,style:d,className:u,classNames:h,styles:y,size:_,__staticSelector:b,sx:m,errorProps:E,labelProps:D,descriptionProps:A,inputContainer:g,inputWrapperOrder:$,unstyled:N,withAsterisk:V,variant:K},w),p),n?ae.createElement(Ci,k2(uc({},R),{component:tpe,maxRows:o,minRows:i})):ae.createElement(Ci,k2(uc({},R),{component:"textarea",rows:i})))});D_.displayName="@mantine/core/Textarea";const ej={context:"Menu component was not found in the tree",children:"Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[cpe,Qp]=Hp(ej.context);var upe=at(e=>({divider:{marginTop:me(4),marginBottom:me(4),borderTop:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`}}));const fpe=upe;var dpe=Object.defineProperty,vg=Object.getOwnPropertySymbols,tj=Object.prototype.hasOwnProperty,rj=Object.prototype.propertyIsEnumerable,QC=(e,t,r)=>t in e?dpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ppe=(e,t)=>{for(var r in t||(t={}))tj.call(t,r)&&QC(e,r,t[r]);if(vg)for(var r of vg(t))rj.call(t,r)&&QC(e,r,t[r]);return e},hpe=(e,t)=>{var r={};for(var n in e)tj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&vg)for(var n of vg(e))t.indexOf(n)<0&&rj.call(e,n)&&(r[n]=e[n]);return r};const vpe={},nj=I.forwardRef((e,t)=>{const r=et("MenuDivider",vpe,e),{children:n,className:o}=r,i=hpe(r,["children","className"]),{classNames:a,styles:s,unstyled:l,variant:c}=Qp(),{classes:u,cx:f}=fpe(null,{name:"Menu",classNames:a,styles:s,unstyled:l,variant:c});return ae.createElement(rt,ppe({className:f(u.divider,o),ref:t},i))});nj.displayName="@mantine/core/MenuDivider";var gpe=Object.defineProperty,gg=Object.getOwnPropertySymbols,oj=Object.prototype.hasOwnProperty,ij=Object.prototype.propertyIsEnumerable,eP=(e,t,r)=>t in e?gpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mpe=(e,t)=>{for(var r in t||(t={}))oj.call(t,r)&&eP(e,r,t[r]);if(gg)for(var r of gg(t))ij.call(t,r)&&eP(e,r,t[r]);return e},ype=(e,t)=>{var r={};for(var n in e)oj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&gg)for(var n of gg(e))t.indexOf(n)<0&&ij.call(e,n)&&(r[n]=e[n]);return r};const bpe={};function aj(e){const t=et("MenuDropdown",bpe,e),{children:r,onMouseEnter:n,onMouseLeave:o}=t,i=ype(t,["children","onMouseEnter","onMouseLeave"]),a=I.useRef(),s=Qp(),l=f=>{var d;(f.key==="ArrowUp"||f.key==="ArrowDown")&&(f.preventDefault(),(d=a.current.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||d.focus())},c=ca(n,()=>s.trigger==="hover"&&s.openDropdown()),u=ca(o,()=>s.trigger==="hover"&&s.closeDropdown());return ae.createElement(Ia.Dropdown,mpe({onMouseEnter:c,onMouseLeave:u,role:"menu","aria-orientation":"vertical"},i),ae.createElement("div",{tabIndex:-1,"data-menu-dropdown":!0,"data-autofocus":!0,onKeyDown:l,ref:a,style:{outline:0}},r))}aj.displayName="@mantine/core/MenuDropdown";var wpe=Object.defineProperty,xpe=Object.defineProperties,_pe=Object.getOwnPropertyDescriptors,tP=Object.getOwnPropertySymbols,Epe=Object.prototype.hasOwnProperty,Spe=Object.prototype.propertyIsEnumerable,rP=(e,t,r)=>t in e?wpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Cpe=(e,t)=>{for(var r in t||(t={}))Epe.call(t,r)&&rP(e,r,t[r]);if(tP)for(var r of tP(t))Spe.call(t,r)&&rP(e,r,t[r]);return e},Ppe=(e,t)=>xpe(e,_pe(t)),Ope=at((e,{color:t,radius:r})=>({item:Ppe(Cpe({},e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",fontSize:e.fontSizes.sm,border:0,backgroundColor:"transparent",outline:0,width:"100%",textAlign:"left",textDecoration:"none",boxSizing:"border-box",padding:`${e.spacing.xs} ${e.spacing.sm}`,cursor:"pointer",borderRadius:e.fn.radius(r),color:t?e.fn.variant({variant:"filled",primaryFallback:!1,color:t}).background:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"flex",alignItems:"center","&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],pointerEvents:"none",userSelect:"none"},"&[data-hovered]":{backgroundColor:t?e.fn.variant({variant:"light",color:t}).background:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[3],.35):e.colors.gray[1]}}),itemLabel:{flex:1},itemIcon:{display:"flex",justifyContent:"center",alignItems:"center",marginRight:e.spacing.xs},itemRightSection:{}}));const Ape=Ope;var kpe=Object.defineProperty,Ipe=Object.defineProperties,$pe=Object.getOwnPropertyDescriptors,mg=Object.getOwnPropertySymbols,sj=Object.prototype.hasOwnProperty,lj=Object.prototype.propertyIsEnumerable,nP=(e,t,r)=>t in e?kpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Tpe=(e,t)=>{for(var r in t||(t={}))sj.call(t,r)&&nP(e,r,t[r]);if(mg)for(var r of mg(t))lj.call(t,r)&&nP(e,r,t[r]);return e},Dpe=(e,t)=>Ipe(e,$pe(t)),Mpe=(e,t)=>{var r={};for(var n in e)sj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&mg)for(var n of mg(e))t.indexOf(n)<0&&lj.call(e,n)&&(r[n]=e[n]);return r};const Rpe={},cj=I.forwardRef((e,t)=>{const r=et("MenuItem",Rpe,e),{children:n,className:o,color:i,closeMenuOnClick:a,icon:s,rightSection:l}=r,c=Mpe(r,["children","className","color","closeMenuOnClick","icon","rightSection"]),u=Qp(),{classes:f,cx:d,theme:p}=Ape({radius:u.radius,color:i},{name:"Menu",classNames:u.classNames,styles:u.styles,unstyled:u.unstyled,variant:u.variant}),h=I.useRef(),y=u.getItemIndex(h.current),_=c,b=ca(_.onMouseLeave,()=>u.setHovered(-1)),m=ca(_.onMouseEnter,()=>u.setHovered(u.getItemIndex(h.current))),E=ca(_.onClick,()=>{typeof a=="boolean"?a&&u.closeDropdownImmediately():u.closeOnItemClick&&u.closeDropdownImmediately()}),A=ca(_.onFocus,()=>u.setHovered(u.getItemIndex(h.current)));return ae.createElement(rt,Dpe(Tpe({component:"button",type:"button"},c),{tabIndex:-1,onFocus:A,className:d(f.item,o),ref:Ws(h,t),role:"menuitem","data-menu-item":!0,"data-hovered":u.hovered===y?!0:void 0,onMouseEnter:m,onMouseLeave:b,onClick:E,onKeyDown:cQ({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:u.loop,dir:p.dir,orientation:"vertical",onKeyDown:_.onKeydown})}),s&&ae.createElement("div",{className:f.itemIcon},s),n&&ae.createElement("div",{className:f.itemLabel},n),l&&ae.createElement("div",{className:f.itemRightSection},l))});cj.displayName="@mantine/core/MenuItem";const Npe=cj;var Fpe=at(e=>({label:{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontWeight:500,fontSize:e.fontSizes.xs,padding:`calc(${e.spacing.xs} / 2) ${e.spacing.sm}`,cursor:"default"}}));const Bpe=Fpe;var jpe=Object.defineProperty,yg=Object.getOwnPropertySymbols,uj=Object.prototype.hasOwnProperty,fj=Object.prototype.propertyIsEnumerable,oP=(e,t,r)=>t in e?jpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Lpe=(e,t)=>{for(var r in t||(t={}))uj.call(t,r)&&oP(e,r,t[r]);if(yg)for(var r of yg(t))fj.call(t,r)&&oP(e,r,t[r]);return e},zpe=(e,t)=>{var r={};for(var n in e)uj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&yg)for(var n of yg(e))t.indexOf(n)<0&&fj.call(e,n)&&(r[n]=e[n]);return r};const Upe={},dj=I.forwardRef((e,t)=>{const r=et("MenuLabel",Upe,e),{children:n,className:o}=r,i=zpe(r,["children","className"]),{classNames:a,styles:s,unstyled:l,variant:c}=Qp(),{classes:u,cx:f}=Bpe(null,{name:"Menu",classNames:a,styles:s,unstyled:l,variant:c});return ae.createElement(St,Lpe({className:f(u.label,o),ref:t},i),n)});dj.displayName="@mantine/core/MenuLabel";var Hpe=Object.defineProperty,bg=Object.getOwnPropertySymbols,pj=Object.prototype.hasOwnProperty,hj=Object.prototype.propertyIsEnumerable,iP=(e,t,r)=>t in e?Hpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Vpe=(e,t)=>{for(var r in t||(t={}))pj.call(t,r)&&iP(e,r,t[r]);if(bg)for(var r of bg(t))hj.call(t,r)&&iP(e,r,t[r]);return e},Wpe=(e,t)=>{var r={};for(var n in e)pj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&bg)for(var n of bg(e))t.indexOf(n)<0&&hj.call(e,n)&&(r[n]=e[n]);return r};const qpe={refProp:"ref"},vj=I.forwardRef((e,t)=>{const r=et("MenuTarget",qpe,e),{children:n,refProp:o}=r,i=Wpe(r,["children","refProp"]);if(!Vp(n))throw new Error(ej.children);const a=Qp(),s=ca(n.props.onClick,()=>a.trigger==="click"&&a.toggleDropdown()),l=ca(n.props.onMouseEnter,()=>a.trigger==="hover"&&a.openDropdown()),c=ca(n.props.onMouseLeave,()=>a.trigger==="hover"&&a.closeDropdown());return ae.createElement(Ia.Target,Vpe({refProp:o,popupType:"menu",ref:t},i),I.cloneElement(n,{onClick:s,onMouseEnter:l,onMouseLeave:c,"data-expanded":a.opened?!0:void 0}))});vj.displayName="@mantine/core/MenuTarget";var Gpe=at({dropdown:{padding:me(4)}});const Kpe=Gpe;var Ype=Object.defineProperty,Xpe=Object.defineProperties,Zpe=Object.getOwnPropertyDescriptors,wg=Object.getOwnPropertySymbols,gj=Object.prototype.hasOwnProperty,mj=Object.prototype.propertyIsEnumerable,aP=(e,t,r)=>t in e?Ype(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,sP=(e,t)=>{for(var r in t||(t={}))gj.call(t,r)&&aP(e,r,t[r]);if(wg)for(var r of wg(t))mj.call(t,r)&&aP(e,r,t[r]);return e},lP=(e,t)=>Xpe(e,Zpe(t)),Jpe=(e,t)=>{var r={};for(var n in e)gj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&wg)for(var n of wg(e))t.indexOf(n)<0&&mj.call(e,n)&&(r[n]=e[n]);return r};const Qpe={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function ho(e){const t=et("Menu",Qpe,e),{children:r,onOpen:n,onClose:o,opened:i,defaultOpened:a,onChange:s,closeOnItemClick:l,loop:c,closeOnEscape:u,trigger:f,openDelay:d,closeDelay:p,classNames:h,styles:y,unstyled:_,radius:b,variant:m}=t,E=Jpe(t,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius","variant"]),{classes:A,cx:D}=Kpe(),[$,{setHovered:g,resetHovered:N}]=pQ(),[V,K]=Rl({value:i,defaultValue:a,finalValue:!1,onChange:s}),W=()=>{K(!1),V&&(o==null||o())},P=()=>{K(!0),!V&&(n==null||n())},C=()=>V?W():P(),{openDropdown:v,closeDropdown:w}=Ude({open:P,close:W,closeDelay:p,openDelay:d}),B=R=>uQ("[data-menu-item]","[data-menu-dropdown]",R);return Jo(()=>{N()},[V]),ae.createElement(cpe,{value:{opened:V,toggleDropdown:C,getItemIndex:B,hovered:$,setHovered:g,closeOnItemClick:l,closeDropdown:f==="click"?W:w,openDropdown:f==="click"?P:v,closeDropdownImmediately:W,loop:c,trigger:f,radius:b,classNames:h,styles:y,unstyled:_,variant:m}},ae.createElement(Ia,lP(sP({},E),{radius:b,opened:V,onChange:C,defaultOpened:a,trapFocus:f==="click",closeOnEscape:u&&f==="click",__staticSelector:"Menu",classNames:lP(sP({},h),{dropdown:D(A.dropdown,h==null?void 0:h.dropdown)}),styles:y,unstyled:_,variant:m}),r))}ho.displayName="@mantine/core/Menu";ho.Item=Npe;ho.Label=dj;ho.Dropdown=aj;ho.Target=vj;ho.Divider=nj;const[ehe,the]=Hp("Modal component was not found in tree"),rhe={xs:me(320),sm:me(380),md:me(440),lg:me(620),xl:me(780)};var nhe=at((e,{yOffset:t,xOffset:r,centered:n,fullScreen:o},{size:i})=>({content:{flex:o?"0 0 100%":`0 0 ${Re({size:i,sizes:rhe})}`,maxWidth:"100%",maxHeight:o?void 0:`calc(100dvh - (${me(t)} * 2))`,height:o?"100vh":void 0,borderRadius:o?0:void 0,overflowY:"auto"},inner:{paddingTop:o?0:t,paddingBottom:o?0:t,paddingLeft:o?0:r,paddingRight:o?0:r,display:"flex",justifyContent:"center",alignItems:n?"center":"flex-start"}}));const ohe=nhe;var ihe=Object.defineProperty,ahe=Object.defineProperties,she=Object.getOwnPropertyDescriptors,xg=Object.getOwnPropertySymbols,yj=Object.prototype.hasOwnProperty,bj=Object.prototype.propertyIsEnumerable,cP=(e,t,r)=>t in e?ihe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y3=(e,t)=>{for(var r in t||(t={}))yj.call(t,r)&&cP(e,r,t[r]);if(xg)for(var r of xg(t))bj.call(t,r)&&cP(e,r,t[r]);return e},wj=(e,t)=>ahe(e,she(t)),lhe=(e,t)=>{var r={};for(var n in e)yj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&xg)for(var n of xg(e))t.indexOf(n)<0&&bj.call(e,n)&&(r[n]=e[n]);return r};const che=wj(y3({},I_),{yOffset:"5dvh",xOffset:"5vw"});function xj(e){const t=et("ModalRoot",che,e),{classNames:r,variant:n,size:o,yOffset:i,xOffset:a,scrollAreaComponent:s,radius:l,centered:c,fullScreen:u}=t,f=lhe(t,["classNames","variant","size","yOffset","xOffset","scrollAreaComponent","radius","centered","fullScreen"]),{classes:d,cx:p}=ohe({yOffset:i,xOffset:a,centered:c,fullScreen:u},{name:"Modal",variant:n,size:o});return ae.createElement(ehe,{value:{yOffset:i,scrollAreaComponent:s,radius:l}},ae.createElement(sr,y3({__staticSelector:"Modal",size:o,variant:n,classNames:wj(y3({},r),{content:p(d.content,r==null?void 0:r.content),inner:p(d.inner,r==null?void 0:r.inner)})},f)))}var uhe=Object.defineProperty,_g=Object.getOwnPropertySymbols,_j=Object.prototype.hasOwnProperty,Ej=Object.prototype.propertyIsEnumerable,uP=(e,t,r)=>t in e?uhe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fhe=(e,t)=>{for(var r in t||(t={}))_j.call(t,r)&&uP(e,r,t[r]);if(_g)for(var r of _g(t))Ej.call(t,r)&&uP(e,r,t[r]);return e},dhe=(e,t)=>{var r={};for(var n in e)_j.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&_g)for(var n of _g(e))t.indexOf(n)<0&&Ej.call(e,n)&&(r[n]=e[n]);return r};const phe={shadow:"xl"},Sj=I.forwardRef((e,t)=>{const r=et("ModalContent",phe,e),{children:n,scrollAreaComponent:o}=r,i=dhe(r,["children","scrollAreaComponent"]),a=the(),s=o||a.scrollAreaComponent||sr.NativeScrollArea;return ae.createElement(sr.Content,fhe({ref:t,radius:a.radius},i),ae.createElement(s,{style:{maxHeight:`calc(100dvh - (${me(a.yOffset)} * 2))`}},n))});var hhe=Object.defineProperty,vhe=Object.defineProperties,ghe=Object.getOwnPropertyDescriptors,Eg=Object.getOwnPropertySymbols,Cj=Object.prototype.hasOwnProperty,Pj=Object.prototype.propertyIsEnumerable,fP=(e,t,r)=>t in e?hhe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m1=(e,t)=>{for(var r in t||(t={}))Cj.call(t,r)&&fP(e,r,t[r]);if(Eg)for(var r of Eg(t))Pj.call(t,r)&&fP(e,r,t[r]);return e},mhe=(e,t)=>vhe(e,ghe(t)),yhe=(e,t)=>{var r={};for(var n in e)Cj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Eg)for(var n of Eg(e))t.indexOf(n)<0&&Pj.call(e,n)&&(r[n]=e[n]);return r};const bhe=mhe(m1({},I_),{transitionProps:{duration:200,transition:"pop"},withOverlay:!0,withCloseButton:!0});function $a(e){const t=et("Modal",bhe,e),{title:r,withOverlay:n,overlayProps:o,withCloseButton:i,closeButtonProps:a,children:s}=t,l=yhe(t,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),c=!!r||i;return ae.createElement(xj,m1({},l),n&&ae.createElement(sr.Overlay,m1({},o)),ae.createElement(Sj,null,c&&ae.createElement(sr.Header,null,r&&ae.createElement(sr.Title,null,r),i&&ae.createElement(sr.CloseButton,m1({},a))),ae.createElement(sr.Body,null,s)))}$a.Root=xj;$a.CloseButton=sr.CloseButton;$a.Overlay=sr.Overlay;$a.Content=Sj;$a.Header=sr.Header;$a.Title=sr.Title;$a.Body=sr.Body;$a.NativeScrollArea=sr.NativeScrollArea;var whe=Object.defineProperty,Sg=Object.getOwnPropertySymbols,Oj=Object.prototype.hasOwnProperty,Aj=Object.prototype.propertyIsEnumerable,dP=(e,t,r)=>t in e?whe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pP=(e,t)=>{for(var r in t||(t={}))Oj.call(t,r)&&dP(e,r,t[r]);if(Sg)for(var r of Sg(t))Aj.call(t,r)&&dP(e,r,t[r]);return e},xhe=(e,t)=>{var r={};for(var n in e)Oj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Sg)for(var n of Sg(e))t.indexOf(n)<0&&Aj.call(e,n)&&(r[n]=e[n]);return r};const _he={xs:me(14),sm:me(18),md:me(20),lg:me(24),xl:me(28)};function Ehe(e){var t=e,{size:r,error:n,style:o}=t,i=xhe(t,["size","error","style"]);const a=Lr(),s=Re({size:r,sizes:_he});return ae.createElement("svg",pP({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:pP({color:n?a.colors.red[6]:a.colors.gray[6],width:s,height:s},o),"data-chevron":!0},i),ae.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var She=Object.defineProperty,Che=Object.defineProperties,Phe=Object.getOwnPropertyDescriptors,hP=Object.getOwnPropertySymbols,Ohe=Object.prototype.hasOwnProperty,Ahe=Object.prototype.propertyIsEnumerable,vP=(e,t,r)=>t in e?She(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,khe=(e,t)=>{for(var r in t||(t={}))Ohe.call(t,r)&&vP(e,r,t[r]);if(hP)for(var r of hP(t))Ahe.call(t,r)&&vP(e,r,t[r]);return e},Ihe=(e,t)=>Che(e,Phe(t));function kj({shouldClear:e,clearButtonProps:t,onClear:r,size:n,error:o}){return e?ae.createElement(s_,Ihe(khe({},t),{variant:"transparent",onClick:r,size:n,onMouseDown:i=>i.preventDefault()})):ae.createElement(Ehe,{error:o,size:n})}kj.displayName="@mantine/core/SelectRightSection";var $he=Object.defineProperty,The=Object.defineProperties,Dhe=Object.getOwnPropertyDescriptors,Cg=Object.getOwnPropertySymbols,Ij=Object.prototype.hasOwnProperty,$j=Object.prototype.propertyIsEnumerable,gP=(e,t,r)=>t in e?$he(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I2=(e,t)=>{for(var r in t||(t={}))Ij.call(t,r)&&gP(e,r,t[r]);if(Cg)for(var r of Cg(t))$j.call(t,r)&&gP(e,r,t[r]);return e},mP=(e,t)=>The(e,Dhe(t)),Mhe=(e,t)=>{var r={};for(var n in e)Ij.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Cg)for(var n of Cg(e))t.indexOf(n)<0&&$j.call(e,n)&&(r[n]=e[n]);return r};function Rhe(e){var t=e,{styles:r,rightSection:n,rightSectionWidth:o,theme:i}=t,a=Mhe(t,["styles","rightSection","rightSectionWidth","theme"]);if(n)return{rightSection:n,rightSectionWidth:o,styles:r};const s=typeof r=="function"?r(i):r;return{rightSection:!a.readOnly&&!(a.disabled&&a.shouldClear)&&ae.createElement(kj,I2({},a)),styles:mP(I2({},s),{rightSection:mP(I2({},s==null?void 0:s.rightSection),{pointerEvents:a.shouldClear?void 0:"none"})})}}const Nhe=(e,t,r)=>Number.isInteger(e)&&e>=0&&t===0?"numeric":!Number.isInteger(e)&&e>=0&&t!==0?"decimal":Number.isInteger(e)&&e<0&&t===0||!Number.isInteger(e)&&e<0&&t!==0?r==="ios"?"text":"decimal":"numeric";function yP({direction:e,size:t}){return ae.createElement("svg",{style:{width:me(t),height:me(t),transform:e==="up"?"rotate(180deg)":void 0},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ae.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}const Tj={xs:me(20),sm:me(24),md:me(30),lg:me(34),xl:me(36)};var Fhe=at((e,{radius:t},{size:r})=>({rightSection:{display:"flex",flexDirection:"column",height:`calc(100% - ${me(2)})`,margin:me(1),overflow:"hidden",borderTopRightRadius:e.fn.radius(t),borderBottomRightRadius:e.fn.radius(t)},control:{margin:0,position:"relative",flex:"0 0 50%",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:Re({size:r,sizes:Tj}),padding:0,WebkitTapHighlightColor:"transparent",borderBottom:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderLeft:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderTop:0,borderRight:0,backgroundColor:"transparent",marginRight:me(1),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,"&:not(:disabled):hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]},"&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]}},controlUp:{},controlDown:{borderBottom:0}}));const Bhe=Fhe;var jhe=Object.defineProperty,Lhe=Object.defineProperties,zhe=Object.getOwnPropertyDescriptors,Pg=Object.getOwnPropertySymbols,Dj=Object.prototype.hasOwnProperty,Mj=Object.prototype.propertyIsEnumerable,bP=(e,t,r)=>t in e?jhe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$2=(e,t)=>{for(var r in t||(t={}))Dj.call(t,r)&&bP(e,r,t[r]);if(Pg)for(var r of Pg(t))Mj.call(t,r)&&bP(e,r,t[r]);return e},Uhe=(e,t)=>Lhe(e,zhe(t)),Hhe=(e,t)=>{var r={};for(var n in e)Dj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Pg)for(var n of Pg(e))t.indexOf(n)<0&&Mj.call(e,n)&&(r[n]=e[n]);return r};const Vhe={type:"text",size:"sm",__staticSelector:"TextInput"},Es=I.forwardRef((e,t)=>{const r=DF("TextInput",Vhe,e),{inputProps:n,wrapperProps:o}=r,i=Hhe(r,["inputProps","wrapperProps"]);return ae.createElement(Ci.Wrapper,$2({},o),ae.createElement(Ci,Uhe($2($2({},n),i),{ref:t})))});Es.displayName="@mantine/core/TextInput";var Whe=Object.defineProperty,qhe=Object.defineProperties,Ghe=Object.getOwnPropertyDescriptors,Og=Object.getOwnPropertySymbols,Rj=Object.prototype.hasOwnProperty,Nj=Object.prototype.propertyIsEnumerable,wP=(e,t,r)=>t in e?Whe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Khe=(e,t)=>{for(var r in t||(t={}))Rj.call(t,r)&&wP(e,r,t[r]);if(Og)for(var r of Og(t))Nj.call(t,r)&&wP(e,r,t[r]);return e},Yhe=(e,t)=>qhe(e,Ghe(t)),Xhe=(e,t)=>{var r={};for(var n in e)Rj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Og)for(var n of Og(e))t.indexOf(n)<0&&Nj.call(e,n)&&(r[n]=e[n]);return r};const Zhe=e=>e||"",Jhe=e=>{if(e==="-")return e;let t=e;t[0]==="."&&(t=`0${e}`);const r=parseFloat(t);return Number.isNaN(r)?"":e},xP={xs:me(10),sm:me(14),md:me(16),lg:me(18),xl:me(20)},Qhe={step:1,hideControls:!1,size:"sm",precision:0,noClampOnBlur:!1,removeTrailingZeros:!1,decimalSeparator:".",formatter:Zhe,parser:Jhe,type:"text"},M_=I.forwardRef((e,t)=>{const r=et("NumberInput",Qhe,e),{readOnly:n,disabled:o,value:i,onChange:a,decimalSeparator:s,thousandsSeparator:l,min:c,max:u,startValue:f,step:d,stepHoldInterval:p,stepHoldDelay:h,onFocus:y,onBlur:_,onKeyDown:b,onKeyUp:m,hideControls:E,radius:A,variant:D,precision:$,removeTrailingZeros:g,defaultValue:N,noClampOnBlur:V,handlersRef:K,classNames:W,styles:P,size:C,rightSection:v,rightSectionWidth:w,formatter:B,parser:R,inputMode:L,unstyled:U,type:S}=r,F=Xhe(r,["readOnly","disabled","value","onChange","decimalSeparator","thousandsSeparator","min","max","startValue","step","stepHoldInterval","stepHoldDelay","onFocus","onBlur","onKeyDown","onKeyUp","hideControls","radius","variant","precision","removeTrailingZeros","defaultValue","noClampOnBlur","handlersRef","classNames","styles","size","rightSection","rightSectionWidth","formatter","parser","inputMode","unstyled","type"]),{classes:T,cx:q}=Bhe({radius:A},{classNames:W,styles:P,unstyled:U,name:"NumberInput",variant:D,size:C}),J=xe=>{if(xe==="")return"";let _e=xe.toFixed($);return g&&$>0&&(_e=_e.replace(new RegExp(`[0]{0,${$}}$`),""),_e.endsWith(".")&&(_e=_e.slice(0,-1))),_e},te=xe=>{let _e=xe;return s&&(_e=_e.replace(".",s)),B(_e)},ie=xe=>{let _e=xe;return s&&(_e=_e.replaceAll(l,"").replace(s,".")),R(_e)},ce=xe=>te(J(xe)),[oe,ue]=I.useState(typeof i=="number"?i:typeof N=="number"?N:""),[O,G]=I.useState(()=>ce(oe)),ee=I.useRef(),[se,pe]=I.useState(!1),ge=(xe,_e)=>{if(!se||_e){const ke=ce(xe);ke!==O&&G(ke)}xe!==oe&&ue(xe)},X=typeof c=="number"?c:-1/0,M=typeof u=="number"?u:1/0,z=I.useRef();z.current=()=>{var xe;let _e;oe===""?_e=(xe=f??c)!=null?xe:0:_e=parseFloat(J(ws(oe+d,X,M))),ge(_e,!0),a==null||a(_e)};const Z=I.useRef();Z.current=()=>{var xe;let _e;oe===""?_e=(xe=f??c)!=null?xe:0:_e=parseFloat(J(ws(oe-d,X,M))),ge(_e,!0),a==null||a(_e)},wR(K,{increment:z.current,decrement:Z.current}),I.useEffect(()=>{se||ge(i===void 0?oe:i,!0)},[i,se]);const Q=h!==void 0&&p!==void 0,de=I.useRef(null),we=I.useRef(0),Se=()=>{de.current&&window.clearTimeout(de.current),de.current=null,we.current=0},Ee=xe=>{xe?z.current():Z.current(),we.current+=1},Ae=xe=>{if(Ee(xe),Q){const _e=typeof p=="number"?p:p(we.current);de.current=window.setTimeout(()=>Ae(xe),_e)}},Te=(xe,_e)=>{xe.preventDefault(),ee.current.focus(),Ee(_e),Q&&(de.current=window.setTimeout(()=>Ae(_e),h))};I.useEffect(()=>(Se(),Se),[]);const H=ae.createElement("div",{className:T.rightSection},ae.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:oe>=u,className:q(T.control,T.controlUp),onPointerDown:xe=>{Te(xe,!0)},onPointerUp:Se,onPointerLeave:Se},ae.createElement(yP,{size:Re({size:C,sizes:xP}),direction:"up"})),ae.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:oe<=c,className:q(T.control,T.controlDown),onPointerDown:xe=>{Te(xe,!1)},onPointerUp:Se,onPointerLeave:Se},ae.createElement(yP,{size:Re({size:C,sizes:xP}),direction:"down"}))),x=xe=>{let _e=xe;(_e[0]===`${s}`||_e[0]===".")&&(_e=`0${_e}`);const ke=parseFloat(J(parseFloat(ie(_e)))),$e=V?ke:ws(ke,X,M),Ne=Number.isNaN($e)?"":$e,We=oe!==Ne;G(xe),ge(Ne),We&&(a==null||a(Ne))},k=xe=>{xe.nativeEvent.isComposing||x(xe.target.value)},Y=xe=>{pe(!0),y==null||y(xe)},re=xe=>{pe(!1),_==null||_(xe)},fe=xe=>{if(typeof b=="function"&&b(xe),xe.repeat&&Q&&(xe.key==="ArrowUp"||xe.key==="ArrowDown")){xe.preventDefault();return}n||(xe.key==="ArrowUp"?Te(xe,!0):xe.key==="ArrowDown"&&Te(xe,!1))},le=xe=>{typeof m=="function"&&m(xe),(xe.key==="ArrowUp"||xe.key==="ArrowDown")&&Se()};return ae.createElement(Es,Yhe(Khe({},F),{type:S,variant:D,value:O,disabled:o,readOnly:n,ref:Ws(ee,t),onChange:k,onFocus:Y,onBlur:re,onKeyDown:fe,onKeyUp:le,rightSection:v||(o||n||E||D==="unstyled"?null:H),rightSectionWidth:w??`calc(${Re({size:C,sizes:Tj})} + ${me(1)})`,radius:A,max:u,min:c,step:d,size:C,styles:P,classNames:W,inputMode:L||Nhe(d,$,mre()),__staticSelector:"NumberInput",unstyled:U}))});M_.displayName="@mantine/core/NumberInput";const Fj=I.createContext(!1),e0e=Fj.Provider,t0e=()=>I.useContext(Fj);function Bj({children:e,openDelay:t=0,closeDelay:r=0}){return ae.createElement(e0e,{value:!0},ae.createElement(Ise,{delay:{open:t,close:r}},e))}Bj.displayName="@mantine/core/TooltipGroup";var r0e=Object.defineProperty,n0e=Object.defineProperties,o0e=Object.getOwnPropertyDescriptors,_P=Object.getOwnPropertySymbols,i0e=Object.prototype.hasOwnProperty,a0e=Object.prototype.propertyIsEnumerable,EP=(e,t,r)=>t in e?r0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,SP=(e,t)=>{for(var r in t||(t={}))i0e.call(t,r)&&EP(e,r,t[r]);if(_P)for(var r of _P(t))a0e.call(t,r)&&EP(e,r,t[r]);return e},s0e=(e,t)=>n0e(e,o0e(t));function l0e(e,t){if(!t)return{backgroundColor:e.colorScheme==="dark"?e.colors.gray[2]:e.colors.gray[9],color:e.colorScheme==="dark"?e.black:e.white};const r=e.fn.variant({variant:"filled",color:t,primaryFallback:!1});return{backgroundColor:r.background,color:r.color}}var c0e=at((e,{color:t,radius:r,width:n,multiline:o})=>({tooltip:s0e(SP(SP({},e.fn.fontStyles()),l0e(e,t)),{lineHeight:e.lineHeight,fontSize:e.fontSizes.sm,borderRadius:e.fn.radius(r),padding:`calc(${e.spacing.xs} / 2) ${e.spacing.xs}`,position:"absolute",whiteSpace:o?"unset":"nowrap",pointerEvents:"none",width:n}),arrow:{backgroundColor:"inherit",border:0,zIndex:1}}));const jj=c0e,Lj={children:"Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"};function u0e({offset:e,position:t}){const[r,n]=I.useState(!1),o=I.useRef(),{x:i,y:a,reference:s,floating:l,refs:c,update:u,placement:f}=__({placement:t,middleware:[g_({crossAxis:!0,padding:5,rootBoundary:"document"})]}),d=f.includes("right")?e:t.includes("left")?e*-1:0,p=f.includes("bottom")?e:t.includes("top")?e*-1:0,h=I.useCallback(({clientX:y,clientY:_})=>{s({getBoundingClientRect(){return{width:0,height:0,x:y,y:_,left:y+d,top:_+p,right:y,bottom:_}}})},[s]);return I.useEffect(()=>{if(c.floating.current){const y=o.current;y.addEventListener("mousemove",h);const _=xs(c.floating.current);return _.forEach(b=>{b.addEventListener("scroll",u)}),()=>{y.removeEventListener("mousemove",h),_.forEach(b=>{b.removeEventListener("scroll",u)})}}},[s,c.floating.current,u,h,r]),{handleMouseMove:h,x:i,y:a,opened:r,setOpened:n,boundaryRef:o,floating:l}}var f0e=Object.defineProperty,d0e=Object.defineProperties,p0e=Object.getOwnPropertyDescriptors,Ag=Object.getOwnPropertySymbols,zj=Object.prototype.hasOwnProperty,Uj=Object.prototype.propertyIsEnumerable,CP=(e,t,r)=>t in e?f0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S0=(e,t)=>{for(var r in t||(t={}))zj.call(t,r)&&CP(e,r,t[r]);if(Ag)for(var r of Ag(t))Uj.call(t,r)&&CP(e,r,t[r]);return e},C0=(e,t)=>d0e(e,p0e(t)),h0e=(e,t)=>{var r={};for(var n in e)zj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ag)for(var n of Ag(e))t.indexOf(n)<0&&Uj.call(e,n)&&(r[n]=e[n]);return r};const v0e={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:Vs("popover")};function Hj(e){var t;const r=et("TooltipFloating",v0e,e),{children:n,refProp:o,withinPortal:i,portalProps:a,style:s,className:l,classNames:c,styles:u,unstyled:f,radius:d,color:p,label:h,offset:y,position:_,multiline:b,width:m,zIndex:E,disabled:A,variant:D}=r,$=h0e(r,["children","refProp","withinPortal","portalProps","style","className","classNames","styles","unstyled","radius","color","label","offset","position","multiline","width","zIndex","disabled","variant"]),{handleMouseMove:g,x:N,y:V,opened:K,boundaryRef:W,floating:P,setOpened:C}=u0e({offset:y,position:_}),{classes:v,cx:w}=jj({radius:d,color:p,multiline:b,width:m},{name:"TooltipFloating",classNames:c,styles:u,unstyled:f,variant:D});if(!Vp(n))throw new Error(Lj.children);const B=Ws(W,n.ref),R=U=>{var S,F;(F=(S=n.props).onMouseEnter)==null||F.call(S,U),g(U),C(!0)},L=U=>{var S,F;(F=(S=n.props).onMouseLeave)==null||F.call(S,U),C(!1)};return ae.createElement(ae.Fragment,null,ae.createElement(Yp,C0(S0({},a),{withinPortal:i}),ae.createElement(rt,C0(S0({},$),{ref:P,className:w(v.tooltip,l),style:C0(S0({},s),{zIndex:E,display:!A&&K?"block":"none",top:V??"",left:(t=Math.round(N))!=null?t:""})}),h)),I.cloneElement(n,C0(S0({},n.props),{[o]:B,onMouseEnter:R,onMouseLeave:L})))}Hj.displayName="@mantine/core/TooltipFloating";function g0e(e){const[t,r]=I.useState(!1),o=typeof e.opened=="boolean"?e.opened:t,i=t0e(),a=Hl(),{delay:s,currentId:l,setCurrentId:c}=vF(),u=I.useCallback(N=>{r(N),N&&c(a)},[c,a]),{x:f,y:d,reference:p,floating:h,context:y,refs:_,update:b,placement:m,middlewareData:{arrow:{x:E,y:A}={}}}=__({placement:e.position,open:o,onOpenChange:u,middleware:[rF(e.offset),g_({padding:8}),QN(),uF({element:e.arrowRef,padding:e.arrowOffset}),...e.inline?[tF()]:[]]}),{getReferenceProps:D,getFloatingProps:$}=Use([kse(y,{enabled:e.events.hover,delay:i?s:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events.touch}),Lse(y,{enabled:e.events.focus,keyboardOnly:!0}),zse(y,{role:"tooltip"}),jse(y,{enabled:typeof e.opened===void 0}),$se(y,{id:a})]);return mF({opened:o,position:e.position,positionDependencies:e.positionDependencies,floating:{refs:_,update:b}}),Jo(()=>{var N;(N=e.onPositionChange)==null||N.call(e,m)},[m]),{x:f,y:d,arrowX:E,arrowY:A,reference:p,floating:h,getFloatingProps:$,getReferenceProps:D,isGroupPhase:o&&l&&l!==a,opened:o,placement:m}}var m0e=Object.defineProperty,y0e=Object.defineProperties,b0e=Object.getOwnPropertyDescriptors,kg=Object.getOwnPropertySymbols,Vj=Object.prototype.hasOwnProperty,Wj=Object.prototype.propertyIsEnumerable,PP=(e,t,r)=>t in e?m0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rl=(e,t)=>{for(var r in t||(t={}))Vj.call(t,r)&&PP(e,r,t[r]);if(kg)for(var r of kg(t))Wj.call(t,r)&&PP(e,r,t[r]);return e},T2=(e,t)=>y0e(e,b0e(t)),w0e=(e,t)=>{var r={};for(var n in e)Vj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&kg)for(var n of kg(e))t.indexOf(n)<0&&Wj.call(e,n)&&(r[n]=e[n]);return r};const x0e={position:"top",refProp:"ref",withinPortal:!1,inline:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},width:"auto",events:{hover:!0,focus:!1,touch:!1},zIndex:Vs("popover"),positionDependencies:[]},_y=I.forwardRef((e,t)=>{var r;const n=I.useRef(null),o=et("Tooltip",x0e,e),{children:i,position:a,refProp:s,label:l,openDelay:c,closeDelay:u,onPositionChange:f,opened:d,withinPortal:p,portalProps:h,radius:y,color:_,classNames:b,styles:m,unstyled:E,style:A,className:D,withArrow:$,arrowSize:g,arrowOffset:N,arrowRadius:V,arrowPosition:K,offset:W,transitionProps:P,multiline:C,width:v,events:w,zIndex:B,disabled:R,positionDependencies:L,onClick:U,onMouseEnter:S,onMouseLeave:F,inline:T,variant:q,keepMounted:J}=o,te=w0e(o,["children","position","refProp","label","openDelay","closeDelay","onPositionChange","opened","withinPortal","portalProps","radius","color","classNames","styles","unstyled","style","className","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","offset","transitionProps","multiline","width","events","zIndex","disabled","positionDependencies","onClick","onMouseEnter","onMouseLeave","inline","variant","keepMounted"]),{classes:ie,cx:ce,theme:oe}=jj({radius:y,color:_,width:v,multiline:C},{name:"Tooltip",classNames:b,styles:m,unstyled:E,variant:q}),ue=g0e({position:AF(oe.dir,a),closeDelay:u,openDelay:c,onPositionChange:f,opened:d,events:w,arrowRef:n,arrowOffset:N,offset:W+($?g/2:0),positionDependencies:[...L,i],inline:T});if(!Vp(i))throw new Error(Lj.children);const O=Ws(ue.reference,i.ref,t);return ae.createElement(ae.Fragment,null,ae.createElement(Yp,T2(rl({},h),{withinPortal:p}),ae.createElement(ql,T2(rl({keepMounted:J,mounted:!R&&ue.opened},P),{transition:P.transition||"fade",duration:ue.isGroupPhase?10:(r=P.duration)!=null?r:100}),G=>{var ee,se;return ae.createElement(rt,rl(rl({},te),ue.getFloatingProps({ref:ue.floating,className:ie.tooltip,style:T2(rl(rl({},A),G),{zIndex:B,top:(ee=ue.y)!=null?ee:0,left:(se=ue.x)!=null?se:0})})),l,ae.createElement(S_,{ref:n,arrowX:ue.arrowX,arrowY:ue.arrowY,visible:$,position:ue.placement,arrowSize:g,arrowOffset:N,arrowRadius:V,arrowPosition:K,className:ie.arrow}))})),I.cloneElement(i,ue.getReferenceProps(rl({onClick:U,onMouseEnter:S,onMouseLeave:F,onMouseMove:e.onMouseMove,onPointerDown:e.onPointerDown,onPointerEnter:e.onPointerEnter,[s]:O,className:ce(D,i.props.className)},i.props))))});_y.Group=Bj;_y.Floating=Hj;_y.displayName="@mantine/core/Tooltip";const eh=_y;function _0e({size:e,thickness:t,sum:r,value:n,root:o,offset:i}){const a=(e*.9-t*2)/2,s=Math.PI*a*2/100,l=o?`${(100-r)*s}, ${r*s}`:`${n*s}, ${(100-n)*s}`;return{strokeWidth:t,cx:e/2,cy:e/2,r:a,transform:o?`scale(1, -1) translate(0, -${e})`:null,strokeDasharray:l,strokeDashoffset:o?0:i}}var E0e=Object.defineProperty,S0e=Object.defineProperties,C0e=Object.getOwnPropertyDescriptors,Ig=Object.getOwnPropertySymbols,qj=Object.prototype.hasOwnProperty,Gj=Object.prototype.propertyIsEnumerable,OP=(e,t,r)=>t in e?E0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,AP=(e,t)=>{for(var r in t||(t={}))qj.call(t,r)&&OP(e,r,t[r]);if(Ig)for(var r of Ig(t))Gj.call(t,r)&&OP(e,r,t[r]);return e},P0e=(e,t)=>S0e(e,C0e(t)),O0e=(e,t)=>{var r={};for(var n in e)qj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ig)for(var n of Ig(e))t.indexOf(n)<0&&Gj.call(e,n)&&(r[n]=e[n]);return r};function Kj(e){var t=e,{size:r,value:n,offset:o,sum:i,thickness:a,root:s,color:l,lineRoundCaps:c,tooltip:u}=t,f=O0e(t,["size","value","offset","sum","thickness","root","color","lineRoundCaps","tooltip"]);const d=Lr(),p=d.fn.themeColor(l||(d.colorScheme==="dark"?"dark":"gray"),l?d.fn.primaryShade():d.colorScheme==="dark"?4:1,!1);return ae.createElement(eh.Floating,{disabled:!u,label:u},ae.createElement("circle",AP(P0e(AP({},f),{fill:"none",strokeLinecap:c?"round":"butt",stroke:p}),_0e({sum:i,size:r,thickness:a,value:n,offset:o,root:s}))))}Kj.displayName="@mantine/core/Curve";var A0e=Object.defineProperty,k0e=Object.defineProperties,I0e=Object.getOwnPropertyDescriptors,kP=Object.getOwnPropertySymbols,$0e=Object.prototype.hasOwnProperty,T0e=Object.prototype.propertyIsEnumerable,IP=(e,t,r)=>t in e?A0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Tf=(e,t)=>{for(var r in t||(t={}))$0e.call(t,r)&&IP(e,r,t[r]);if(kP)for(var r of kP(t))T0e.call(t,r)&&IP(e,r,t[r]);return e},Df=(e,t)=>k0e(e,I0e(t));function D0e({size:e,thickness:t,sections:r,renderRoundedLineCaps:n,rootColor:o}){const i=r.reduce((u,f)=>u+f.value,0),a=Math.PI*((e*.9-t*2)/2)*2;let s=a;const l=[],c=[];for(let u=0;u2){c.push(Df(Tf({},l[0]),{lineRoundCaps:n})),c.push(Df(Tf({},l[l.length-2]),{lineRoundCaps:n}));for(let u=1;u<=l.length-3;u+=1)c.push(Df(Tf({},l[u]),{lineRoundCaps:!1}))}else c.push(Df(Tf({},l[0]),{lineRoundCaps:n}));return c}var M0e=at({root:{position:"relative"},label:{position:"absolute",top:"50%",transform:"translateY(-50%)"}});const R0e=M0e;var N0e=Object.defineProperty,F0e=Object.defineProperties,B0e=Object.getOwnPropertyDescriptors,$g=Object.getOwnPropertySymbols,Yj=Object.prototype.hasOwnProperty,Xj=Object.prototype.propertyIsEnumerable,$P=(e,t,r)=>t in e?N0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,D2=(e,t)=>{for(var r in t||(t={}))Yj.call(t,r)&&$P(e,r,t[r]);if($g)for(var r of $g(t))Xj.call(t,r)&&$P(e,r,t[r]);return e},j0e=(e,t)=>F0e(e,B0e(t)),L0e=(e,t)=>{var r={};for(var n in e)Yj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&$g)for(var n of $g(e))t.indexOf(n)<0&&Xj.call(e,n)&&(r[n]=e[n]);return r};const z0e={size:120,thickness:12},Zj=I.forwardRef((e,t)=>{const r=et("RingProgress",z0e,e),{className:n,style:o,label:i,sections:a,size:s,thickness:l,classNames:c,styles:u,roundCaps:f,rootColor:d,unstyled:p,variant:h}=r,y=L0e(r,["className","style","label","sections","size","thickness","classNames","styles","roundCaps","rootColor","unstyled","variant"]),{classes:_,cx:b}=R0e(null,{name:"RingProgress",classNames:c,styles:u,unstyled:p,variant:h}),m=D0e({size:s,thickness:l,sections:a,renderRoundedLineCaps:f,rootColor:d}).map(({data:E,sum:A,root:D,lineRoundCaps:$,offset:g},N)=>ae.createElement(Kj,j0e(D2({},E),{key:N,size:s,thickness:l,sum:A,offset:g,color:E==null?void 0:E.color,root:D,lineRoundCaps:$})));return ae.createElement(rt,D2({style:D2({width:s,height:s},o),className:b(_.root,n),ref:t},y),ae.createElement("svg",{style:{width:s,height:s,transform:"rotate(-90deg)"}},m),i&&ae.createElement("div",{className:_.label,style:{right:l*2,left:l*2}},i))});Zj.displayName="@mantine/core/RingProgress";function U0e({data:e,searchable:t,limit:r,searchValue:n,filter:o,value:i,filterDataOnExactSearchMatch:a}){if(!t)return e;const s=i!=null&&e.find(c=>c.value===i)||null;if(s&&!a&&(s==null?void 0:s.label)===n){if(r){if(r>=e.length)return e;const c=e.indexOf(s),u=c+r,f=u-e.length;return f>0?e.slice(c-f):e.slice(c,u)}return e}const l=[];for(let c=0;c=r));c+=1);return l}var H0e=at(()=>({input:{"&:not(:disabled)":{cursor:"pointer","&::selection":{backgroundColor:"transparent"}}}}));const V0e=H0e;var W0e=Object.defineProperty,q0e=Object.defineProperties,G0e=Object.getOwnPropertyDescriptors,Tg=Object.getOwnPropertySymbols,Jj=Object.prototype.hasOwnProperty,Qj=Object.prototype.propertyIsEnumerable,TP=(e,t,r)=>t in e?W0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Mf=(e,t)=>{for(var r in t||(t={}))Jj.call(t,r)&&TP(e,r,t[r]);if(Tg)for(var r of Tg(t))Qj.call(t,r)&&TP(e,r,t[r]);return e},M2=(e,t)=>q0e(e,G0e(t)),K0e=(e,t)=>{var r={};for(var n in e)Jj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Tg)for(var n of Tg(e))t.indexOf(n)<0&&Qj.call(e,n)&&(r[n]=e[n]);return r};function Y0e(e,t){return t.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function X0e(e,t){return!!e&&!t.some(r=>r.label.toLowerCase()===e.toLowerCase())}const Z0e={required:!1,size:"sm",shadow:"sm",itemComponent:TN,transitionProps:{transition:"fade",duration:0},initiallyOpened:!1,filter:Y0e,maxDropdownHeight:220,searchable:!1,clearable:!1,limit:1/0,disabled:!1,creatable:!1,shouldCreate:X0e,selectOnBlur:!1,switchDirectionOnFlip:!1,filterDataOnExactSearchMatch:!1,zIndex:Vs("popover"),positionDependencies:[],dropdownPosition:"flip"},R_=I.forwardRef((e,t)=>{const r=DF("Select",Z0e,e),{inputProps:n,wrapperProps:o,shadow:i,data:a,value:s,defaultValue:l,onChange:c,itemComponent:u,onKeyDown:f,onBlur:d,onFocus:p,transitionProps:h,initiallyOpened:y,unstyled:_,classNames:b,styles:m,filter:E,maxDropdownHeight:A,searchable:D,clearable:$,nothingFound:g,limit:N,disabled:V,onSearchChange:K,searchValue:W,rightSection:P,rightSectionWidth:C,creatable:v,getCreateLabel:w,shouldCreate:B,selectOnBlur:R,onCreate:L,dropdownComponent:U,onDropdownClose:S,onDropdownOpen:F,withinPortal:T,portalProps:q,switchDirectionOnFlip:J,zIndex:te,name:ie,dropdownPosition:ce,allowDeselect:oe,placeholder:ue,filterDataOnExactSearchMatch:O,form:G,positionDependencies:ee,readOnly:se,clearButtonProps:pe,hoverOnSearchChange:ge}=r,X=K0e(r,["inputProps","wrapperProps","shadow","data","value","defaultValue","onChange","itemComponent","onKeyDown","onBlur","onFocus","transitionProps","initiallyOpened","unstyled","classNames","styles","filter","maxDropdownHeight","searchable","clearable","nothingFound","limit","disabled","onSearchChange","searchValue","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","selectOnBlur","onCreate","dropdownComponent","onDropdownClose","onDropdownOpen","withinPortal","portalProps","switchDirectionOnFlip","zIndex","name","dropdownPosition","allowDeselect","placeholder","filterDataOnExactSearchMatch","form","positionDependencies","readOnly","clearButtonProps","hoverOnSearchChange"]),{classes:M,cx:z,theme:Z}=V0e(),[Q,de]=I.useState(y),[we,Se]=I.useState(-1),Ee=I.useRef(),Ae=I.useRef({}),[Te,H]=I.useState("column"),x=Te==="column",{scrollIntoView:k,targetRef:Y,scrollableRef:re}=ore({duration:0,offset:5,cancelable:!1,isList:!0}),fe=oe===void 0?$:oe,le=Be=>{if(Q!==Be){de(Be);const Ke=Be?F:S;typeof Ke=="function"&&Ke()}},xe=v&&typeof w=="function";let _e=null;const ke=a.map(Be=>typeof Be=="string"?{label:Be,value:Be}:Be),$e=hQ({data:ke}),[Ne,We,gt]=Rl({value:s,defaultValue:l,finalValue:null,onChange:c}),ft=$e.find(Be=>Be.value===Ne),[Ye,Je]=Rl({value:W,defaultValue:(ft==null?void 0:ft.label)||"",finalValue:void 0,onChange:K}),tt=Be=>{Je(Be),D&&typeof K=="function"&&K(Be)},ve=()=>{var Be;se||(We(null),gt||tt(""),(Be=Ee.current)==null||Be.focus())};I.useEffect(()=>{const Be=$e.find(Ke=>Ke.value===Ne);Be?tt(Be.label):(!xe||!Ne)&&tt("")},[Ne]),I.useEffect(()=>{ft&&(!D||!Q)&&tt(ft.label)},[ft==null?void 0:ft.label]);const ne=Be=>{if(!se)if(fe&&(ft==null?void 0:ft.value)===Be.value)We(null),le(!1);else{if(Be.creatable&&typeof L=="function"){const Ke=L(Be.value);typeof Ke<"u"&&Ke!==null&&We(typeof Ke=="string"?Ke:Ke.value)}else We(Be.value);gt||tt(Be.label),Se(-1),le(!1),Ee.current.focus()}},he=U0e({data:$e,searchable:D,limit:N,searchValue:Ye,filter:E,filterDataOnExactSearchMatch:O,value:Ne});xe&&B(Ye,he)&&(_e=w(Ye),he.push({label:Ye,value:Ye,creatable:!0}));const be=(Be,Ke,mt)=>{let ct=Be;for(;mt(ct);)if(ct=Ke(ct),!he[ct].disabled)return ct;return Be};Jo(()=>{Se(ge&&Ye?0:-1)},[Ye,ge]);const Ce=Ne?he.findIndex(Be=>Be.value===Ne):0,Oe=!se&&(he.length>0?Q:Q&&!!g),Ie=()=>{Se(Be=>{var Ke;const mt=be(Be,ct=>ct-1,ct=>ct>0);return Y.current=Ae.current[(Ke=he[mt])==null?void 0:Ke.value],Oe&&k({alignment:x?"start":"end"}),mt})},De=()=>{Se(Be=>{var Ke;const mt=be(Be,ct=>ct+1,ct=>ctwindow.setTimeout(()=>{var Be;Y.current=Ae.current[(Be=he[Ce])==null?void 0:Be.value],k({alignment:x?"end":"start"})},50);Jo(()=>{Oe&&je()},[Oe]);const Me=Be=>{switch(typeof f=="function"&&f(Be),Be.key){case"ArrowUp":{Be.preventDefault(),Q?x?Ie():De():(Se(Ce),le(!0),je());break}case"ArrowDown":{Be.preventDefault(),Q?x?De():Ie():(Se(Ce),le(!0),je());break}case"Home":{if(!D){Be.preventDefault(),Q||le(!0);const Ke=he.findIndex(mt=>!mt.disabled);Se(Ke),Oe&&k({alignment:x?"end":"start"})}break}case"End":{if(!D){Be.preventDefault(),Q||le(!0);const Ke=he.map(mt=>!!mt.disabled).lastIndexOf(!1);Se(Ke),Oe&&k({alignment:x?"end":"start"})}break}case"Escape":{Be.preventDefault(),le(!1),Se(-1);break}case" ":{D||(Be.preventDefault(),he[we]&&Q?ne(he[we]):(le(!0),Se(Ce),je()));break}case"Enter":D||Be.preventDefault(),he[we]&&Q&&(Be.preventDefault(),ne(he[we]))}},He=Be=>{typeof d=="function"&&d(Be);const Ke=$e.find(mt=>mt.value===Ne);R&&he[we]&&Q&&ne(he[we]),tt((Ke==null?void 0:Ke.label)||""),le(!1)},qe=Be=>{typeof p=="function"&&p(Be),D&&le(!0)},ze=Be=>{se||(tt(Be.currentTarget.value),$&&Be.currentTarget.value===""&&We(null),Se(-1),le(!0))},it=()=>{se||(le(!Q),Ne&&!Q&&Se(Ce))};return ae.createElement(Ci.Wrapper,M2(Mf({},o),{__staticSelector:"Select"}),ae.createElement(wd,{opened:Oe,transitionProps:h,shadow:i,withinPortal:T,portalProps:q,__staticSelector:"Select",onDirectionChange:H,switchDirectionOnFlip:J,zIndex:te,dropdownPosition:ce,positionDependencies:[...ee,Ye],classNames:b,styles:m,unstyled:_,variant:n.variant},ae.createElement(wd.Target,null,ae.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-owns":Oe?`${n.id}-items`:null,"aria-controls":n.id,"aria-expanded":Oe,onMouseLeave:()=>Se(-1),tabIndex:-1},ae.createElement("input",{type:"hidden",name:ie,value:Ne||"",form:G,disabled:V}),ae.createElement(Ci,Mf(M2(Mf(Mf({autoComplete:"off",type:"search"},n),X),{ref:Ws(t,Ee),onKeyDown:Me,__staticSelector:"Select",value:Ye,placeholder:ue,onChange:ze,"aria-autocomplete":"list","aria-controls":Oe?`${n.id}-items`:null,"aria-activedescendant":we>=0?`${n.id}-${we}`:null,onMouseDown:it,onBlur:He,onFocus:qe,readOnly:!D||se,disabled:V,"data-mantine-stop-propagation":Oe,name:null,classNames:M2(Mf({},b),{input:z({[M.input]:!D},b==null?void 0:b.input)})}),Rhe({theme:Z,rightSection:P,rightSectionWidth:C,styles:m,size:n.size,shouldClear:$&&!!ft,onClear:ve,error:o.error,clearButtonProps:pe,disabled:V,readOnly:se}))))),ae.createElement(wd.Dropdown,{component:U||u_,maxHeight:A,direction:Te,id:n.id,innerRef:re,__staticSelector:"Select",classNames:b,styles:m},ae.createElement(kN,{data:he,hovered:we,classNames:b,styles:m,isItemSelected:Be=>Be===Ne,uuid:n.id,__staticSelector:"Select",onItemHover:Se,onItemSelect:ne,itemsRefs:Ae,itemComponent:u,size:n.size,nothingFound:g,creatable:xe&&!!_e,createLabel:_e,"aria-label":o.label,unstyled:_,variant:n.variant}))))});R_.displayName="@mantine/core/Select";function eL({value:e,min:t,max:r}){const n=(e-t)/(r-t)*100;return Math.min(Math.max(n,0),100)}function J0e({value:e,containerWidth:t,min:r,max:n,step:o,precision:i}){const s=(t?Math.min(Math.max(e,0),t)/t:e)*(n-r),l=(s!==0?Math.round(s/o)*o:0)+r,c=Math.max(l,r);return i!==void 0?Number(c.toFixed(i)):c}var Q0e=Object.defineProperty,e1e=Object.defineProperties,t1e=Object.getOwnPropertyDescriptors,DP=Object.getOwnPropertySymbols,r1e=Object.prototype.hasOwnProperty,n1e=Object.prototype.propertyIsEnumerable,MP=(e,t,r)=>t in e?Q0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,o1e=(e,t)=>{for(var r in t||(t={}))r1e.call(t,r)&&MP(e,r,t[r]);if(DP)for(var r of DP(t))n1e.call(t,r)&&MP(e,r,t[r]);return e},i1e=(e,t)=>e1e(e,t1e(t));const tn={xs:me(4),sm:me(6),md:me(8),lg:me(10),xl:me(12)};var a1e=at(e=>({root:i1e(o1e({},e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",outline:0,display:"flex",flexDirection:"column",alignItems:"center",touchAction:"none",position:"relative"})}));const s1e=a1e;var l1e=Object.defineProperty,c1e=Object.defineProperties,u1e=Object.getOwnPropertyDescriptors,RP=Object.getOwnPropertySymbols,f1e=Object.prototype.hasOwnProperty,d1e=Object.prototype.propertyIsEnumerable,NP=(e,t,r)=>t in e?l1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p1e=(e,t)=>{for(var r in t||(t={}))f1e.call(t,r)&&NP(e,r,t[r]);if(RP)for(var r of RP(t))d1e.call(t,r)&&NP(e,r,t[r]);return e},h1e=(e,t)=>c1e(e,u1e(t)),v1e=at((e,{color:t,disabled:r,thumbSize:n},{size:o})=>({label:{position:"absolute",top:me(-36),backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[9],fontSize:e.fontSizes.xs,color:e.white,padding:`calc(${e.spacing.xs} / 2)`,borderRadius:e.radius.sm,whiteSpace:"nowrap",pointerEvents:"none",userSelect:"none",touchAction:"none"},thumb:h1e(p1e({},e.fn.focusStyles()),{boxSizing:"border-box",position:"absolute",display:r?"none":"flex",height:n?me(n):`calc(${Re({sizes:tn,size:o})} * 2)`,width:n?me(n):`calc(${Re({sizes:tn,size:o})} * 2)`,backgroundColor:e.colorScheme==="dark"?e.fn.themeColor(t,e.fn.primaryShade()):e.white,border:`${me(4)} solid ${e.colorScheme==="dark"?e.white:e.fn.themeColor(t,e.fn.primaryShade())}`,color:e.colorScheme==="dark"?e.white:e.fn.themeColor(t,e.fn.primaryShade()),transform:"translate(-50%, -50%)",top:"50%",cursor:"pointer",borderRadius:1e3,alignItems:"center",justifyContent:"center",transitionDuration:"100ms",transitionProperty:"box-shadow, transform",transitionTimingFunction:e.transitionTimingFunction,zIndex:3,userSelect:"none",touchAction:"none"}),dragging:{transform:"translate(-50%, -50%) scale(1.05)",boxShadow:e.shadows.sm}}));const g1e=v1e,tL=I.forwardRef(({max:e,min:t,value:r,position:n,label:o,dragging:i,onMouseDown:a,onKeyDownCapture:s,color:l,classNames:c,styles:u,size:f,labelTransition:d,labelTransitionDuration:p,labelTransitionTimingFunction:h,labelAlwaysOn:y,thumbLabel:_,onFocus:b,onBlur:m,showLabelOnHover:E,isHovered:A,children:D=null,disabled:$,unstyled:g,thumbSize:N,variant:V},K)=>{const{classes:W,cx:P,theme:C}=g1e({color:l,disabled:$,thumbSize:N},{name:"Slider",classNames:c,styles:u,unstyled:g,variant:V,size:f}),[v,w]=I.useState(!1),B=y||i||v||E&&A;return ae.createElement(rt,{tabIndex:0,role:"slider","aria-label":_,"aria-valuemax":e,"aria-valuemin":t,"aria-valuenow":r,ref:K,className:P(W.thumb,{[W.dragging]:i}),onFocus:()=>{w(!0),typeof b=="function"&&b()},onBlur:()=>{w(!1),typeof m=="function"&&m()},onTouchStart:a,onMouseDown:a,onKeyDownCapture:s,onClick:R=>R.stopPropagation(),style:{[C.dir==="rtl"?"right":"left"]:`${n}%`}},D,ae.createElement(ql,{mounted:o!=null&&B,duration:p,transition:d,timingFunction:h||C.transitionTimingFunction},R=>ae.createElement("div",{style:R,className:W.label},o)))});tL.displayName="@mantine/core/SliderThumb";function m1e({mark:e,offset:t,value:r,inverted:n=!1}){return n?typeof t=="number"&&e.value<=t||e.value>=r:typeof t=="number"?e.value>=t&&e.value<=r:e.value<=r}var y1e=at((e,{color:t,disabled:r,thumbSize:n},{size:o})=>({marksContainer:{position:"absolute",right:n?me(n/2):Re({sizes:tn,size:o}),left:n?me(n/2):Re({sizes:tn,size:o}),"&:has(~ input:disabled)":{"& .mantine-Slider-markFilled":{border:`${me(2)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,borderColor:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]}}},markWrapper:{position:"absolute",top:`calc(${me(Re({sizes:tn,size:o}))} / 2)`,zIndex:2,height:0},mark:{boxSizing:"border-box",border:`${me(2)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,height:Re({sizes:tn,size:o}),width:Re({sizes:tn,size:o}),borderRadius:1e3,transform:`translateX(calc(-${Re({sizes:tn,size:o})} / 2))`,backgroundColor:e.white,pointerEvents:"none"},markFilled:{borderColor:r?e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]:e.fn.variant({variant:"filled",color:t}).background},markLabel:{transform:`translate(-50%, calc(${e.spacing.xs} / 2))`,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],whiteSpace:"nowrap",cursor:"pointer",userSelect:"none"}}));const b1e=y1e;function rL({marks:e,color:t,size:r,thumbSize:n,min:o,max:i,value:a,classNames:s,styles:l,offset:c,onChange:u,disabled:f,unstyled:d,inverted:p,variant:h}){const{classes:y,cx:_}=b1e({color:t,disabled:f,thumbSize:n},{name:"Slider",classNames:s,styles:l,unstyled:d,variant:h,size:r}),b=e.map((m,E)=>ae.createElement(rt,{className:y.markWrapper,sx:{left:`${eL({value:m.value,min:o,max:i})}%`},key:E},ae.createElement("div",{className:_(y.mark,{[y.markFilled]:m1e({mark:m,value:a,offset:c,inverted:p})})}),m.label&&ae.createElement("div",{className:y.markLabel,onMouseDown:A=>{A.stopPropagation(),!f&&u(m.value)},onTouchStart:A=>{A.stopPropagation(),!f&&u(m.value)}},m.label)));return ae.createElement("div",{className:y.marksContainer},b)}rL.displayName="@mantine/core/SliderMarks";var w1e=at((e,{radius:t,color:r,disabled:n,inverted:o,thumbSize:i},{size:a})=>({trackContainer:{display:"flex",alignItems:"center",width:"100%",height:`calc(${Re({sizes:tn,size:a})} * 2)`,cursor:"pointer","&:has(~ input:disabled)":{"&":{pointerEvents:"none"},"& .mantine-Slider-thumb":{display:"none"},"& .mantine-Slider-track::before":{content:'""',backgroundColor:o?e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]},"& .mantine-Slider-bar":{backgroundColor:o?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]}}},track:{position:"relative",height:Re({sizes:tn,size:a}),width:"100%",marginRight:i?me(i/2):Re({size:a,sizes:tn}),marginLeft:i?me(i/2):Re({size:a,sizes:tn}),"&::before":{content:'""',position:"absolute",top:0,bottom:0,borderRadius:e.fn.radius(t),right:`calc(${i?me(i/2):Re({size:a,sizes:tn})} * -1)`,left:`calc(${i?me(i/2):Re({size:a,sizes:tn})} * -1)`,backgroundColor:o?n?e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]:e.fn.variant({variant:"filled",color:r}).background:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],zIndex:0}},bar:{position:"absolute",zIndex:1,top:0,bottom:0,backgroundColor:o?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]:n?e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]:e.fn.variant({variant:"filled",color:r}).background,borderRadius:e.fn.radius(t)}}));const x1e=w1e;var _1e=Object.defineProperty,E1e=Object.defineProperties,S1e=Object.getOwnPropertyDescriptors,Dg=Object.getOwnPropertySymbols,nL=Object.prototype.hasOwnProperty,oL=Object.prototype.propertyIsEnumerable,FP=(e,t,r)=>t in e?_1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,BP=(e,t)=>{for(var r in t||(t={}))nL.call(t,r)&&FP(e,r,t[r]);if(Dg)for(var r of Dg(t))oL.call(t,r)&&FP(e,r,t[r]);return e},C1e=(e,t)=>E1e(e,S1e(t)),P1e=(e,t)=>{var r={};for(var n in e)nL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Dg)for(var n of Dg(e))t.indexOf(n)<0&&oL.call(e,n)&&(r[n]=e[n]);return r};function iL(e){var t=e,{filled:r,size:n,thumbSize:o,color:i,classNames:a,styles:s,radius:l,children:c,offset:u,disabled:f,marksOffset:d,unstyled:p,inverted:h,variant:y,containerProps:_}=t,b=P1e(t,["filled","size","thumbSize","color","classNames","styles","radius","children","offset","disabled","marksOffset","unstyled","inverted","variant","containerProps"]);const{classes:m}=x1e({color:i,radius:l,disabled:f,inverted:h,thumbSize:o},{name:"Slider",classNames:a,styles:s,unstyled:p,variant:y,size:n});return ae.createElement(ae.Fragment,null,ae.createElement("div",BP({className:m.trackContainer},_),ae.createElement("div",{className:m.track},ae.createElement(rt,{className:m.bar,sx:{left:`calc(${u}% - ${o?me(o/2):Re({size:n,sizes:tn})})`,width:`calc(${r}% + 2 * ${o?me(o/2):Re({size:n,sizes:tn})})`}}),c)),ae.createElement(rL,C1e(BP({},b),{size:n,thumbSize:o,color:i,offset:d,classNames:a,styles:s,disabled:f,unstyled:p,inverted:h,variant:y})))}iL.displayName="@mantine/core/SliderTrack";var O1e=Object.defineProperty,A1e=Object.defineProperties,k1e=Object.getOwnPropertyDescriptors,Mg=Object.getOwnPropertySymbols,aL=Object.prototype.hasOwnProperty,sL=Object.prototype.propertyIsEnumerable,jP=(e,t,r)=>t in e?O1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I1e=(e,t)=>{for(var r in t||(t={}))aL.call(t,r)&&jP(e,r,t[r]);if(Mg)for(var r of Mg(t))sL.call(t,r)&&jP(e,r,t[r]);return e},$1e=(e,t)=>A1e(e,k1e(t)),T1e=(e,t)=>{var r={};for(var n in e)aL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Mg)for(var n of Mg(e))t.indexOf(n)<0&&sL.call(e,n)&&(r[n]=e[n]);return r};const lL=I.forwardRef((e,t)=>{var r=e,{className:n,size:o,classNames:i,styles:a,disabled:s,unstyled:l,variant:c}=r,u=T1e(r,["className","size","classNames","styles","disabled","unstyled","variant"]);const{classes:f,cx:d}=s1e(null,{name:"Slider",classNames:i,styles:a,unstyled:l,variant:c,size:o});return ae.createElement(rt,$1e(I1e({},u),{tabIndex:-1,className:d(f.root,n),ref:t}))});lL.displayName="@mantine/core/SliderRoot";function P0(e,t){return parseFloat(e.toFixed(t))}function D1e(e){if(!e)return 0;const t=e.toString().split(".");return t.length>1?t[1].length:0}var M1e=Object.defineProperty,R1e=Object.defineProperties,N1e=Object.getOwnPropertyDescriptors,Rg=Object.getOwnPropertySymbols,cL=Object.prototype.hasOwnProperty,uL=Object.prototype.propertyIsEnumerable,LP=(e,t,r)=>t in e?M1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,F1e=(e,t)=>{for(var r in t||(t={}))cL.call(t,r)&&LP(e,r,t[r]);if(Rg)for(var r of Rg(t))uL.call(t,r)&&LP(e,r,t[r]);return e},B1e=(e,t)=>R1e(e,N1e(t)),j1e=(e,t)=>{var r={};for(var n in e)cL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Rg)for(var n of Rg(e))t.indexOf(n)<0&&uL.call(e,n)&&(r[n]=e[n]);return r};const L1e={size:"md",radius:"xl",min:0,max:100,step:1,marks:[],label:e=>e,labelTransition:"skew-down",labelTransitionDuration:0,labelAlwaysOn:!1,thumbLabel:"",showLabelOnHover:!0,disabled:!1,scale:e=>e},fL=I.forwardRef((e,t)=>{const r=et("Slider",L1e,e),{classNames:n,styles:o,color:i,value:a,onChange:s,onChangeEnd:l,size:c,radius:u,min:f,max:d,step:p,precision:h,defaultValue:y,name:_,marks:b,label:m,labelTransition:E,labelTransitionDuration:A,labelTransitionTimingFunction:D,labelAlwaysOn:$,thumbLabel:g,showLabelOnHover:N,thumbChildren:V,disabled:K,unstyled:W,thumbSize:P,scale:C,inverted:v,variant:w}=r,B=j1e(r,["classNames","styles","color","value","onChange","onChangeEnd","size","radius","min","max","step","precision","defaultValue","name","marks","label","labelTransition","labelTransitionDuration","labelTransitionTimingFunction","labelAlwaysOn","thumbLabel","showLabelOnHover","thumbChildren","disabled","unstyled","thumbSize","scale","inverted","variant"]),R=h??D1e(p),L=Lr(),[U,S]=I.useState(!1),[F,T]=Rl({value:typeof a=="number"?ws(a,f,d):a,defaultValue:typeof y=="number"?ws(y,f,d):y,finalValue:ws(0,f,d),onChange:s}),q=I.useRef(F),J=I.useRef(),te=I.useRef(),ie=eL({value:F,min:f,max:d}),ce=C(F),oe=typeof m=="function"?m(ce):m,ue=I.useCallback(({x:se})=>{if(!K){const pe=J0e({value:se,min:f,max:d,step:p,precision:R});T(pe),q.current=pe}},[K,f,d,p,R,T]),{ref:O,active:G}=Qte(ue,{onScrubEnd:()=>l==null?void 0:l(q.current)},L.dir),ee=se=>{if(!K)switch(se.key){case"ArrowUp":{se.preventDefault(),te.current.focus();const pe=P0(Math.min(Math.max(F+p,f),d),R);l==null||l(pe),T(pe);break}case"ArrowRight":{se.preventDefault(),te.current.focus();const pe=P0(Math.min(Math.max(L.dir==="rtl"?F-p:F+p,f),d),R);l==null||l(pe),T(pe);break}case"ArrowDown":{se.preventDefault(),te.current.focus();const pe=P0(Math.min(Math.max(F-p,f),d),R);l==null||l(pe),T(pe);break}case"ArrowLeft":{se.preventDefault(),te.current.focus();const pe=P0(Math.min(Math.max(L.dir==="rtl"?F+p:F-p,f),d),R);l==null||l(pe),T(pe);break}case"Home":{se.preventDefault(),te.current.focus(),l==null||l(f),T(f);break}case"End":{se.preventDefault(),te.current.focus(),l==null||l(d),T(d);break}}};return ae.createElement(lL,B1e(F1e({},B),{ref:Ws(t,J),onKeyDownCapture:ee,onMouseDownCapture:()=>{var se;return(se=J.current)==null?void 0:se.focus()},size:c,classNames:n,styles:o,disabled:K,unstyled:W,variant:w}),ae.createElement(iL,{inverted:v,offset:0,filled:ie,marks:b,size:c,thumbSize:P,radius:u,color:i,min:f,max:d,value:ce,onChange:T,classNames:n,styles:o,disabled:K,unstyled:W,variant:w,containerProps:{ref:O,onMouseEnter:N?()=>S(!0):void 0,onMouseLeave:N?()=>S(!1):void 0}},ae.createElement(tL,{max:d,min:f,value:ce,position:ie,dragging:G,color:i,size:c,label:oe,ref:te,labelTransition:E,labelTransitionDuration:A,labelTransitionTimingFunction:D,labelAlwaysOn:$,classNames:n,styles:o,thumbLabel:g,showLabelOnHover:N,isHovered:U,disabled:K,unstyled:W,thumbSize:P,variant:w},V)),ae.createElement("input",{type:"hidden",name:_,value:ce}))});fL.displayName="@mantine/core/Slider";var z1e=Object.defineProperty,Ng=Object.getOwnPropertySymbols,dL=Object.prototype.hasOwnProperty,pL=Object.prototype.propertyIsEnumerable,zP=(e,t,r)=>t in e?z1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,U1e=(e,t)=>{for(var r in t||(t={}))dL.call(t,r)&&zP(e,r,t[r]);if(Ng)for(var r of Ng(t))pL.call(t,r)&&zP(e,r,t[r]);return e},H1e=(e,t)=>{var r={};for(var n in e)dL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ng)for(var n of Ng(e))t.indexOf(n)<0&&pL.call(e,n)&&(r[n]=e[n]);return r};const V1e={w:0,h:0},hL=I.forwardRef((e,t)=>{const r=et("Space",V1e,e),{w:n,h:o}=r,i=H1e(r,["w","h"]);return ae.createElement(rt,U1e({ref:t,w:n,miw:n,h:o,mih:o},i))});hL.displayName="@mantine/core/Space";var W1e=at((e,{spacing:t,align:r,justify:n})=>({root:{display:"flex",flexDirection:"column",alignItems:r,justifyContent:n,gap:Re({size:t,sizes:e.spacing})}}));const q1e=W1e;var G1e=Object.defineProperty,Fg=Object.getOwnPropertySymbols,vL=Object.prototype.hasOwnProperty,gL=Object.prototype.propertyIsEnumerable,UP=(e,t,r)=>t in e?G1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,K1e=(e,t)=>{for(var r in t||(t={}))vL.call(t,r)&&UP(e,r,t[r]);if(Fg)for(var r of Fg(t))gL.call(t,r)&&UP(e,r,t[r]);return e},Y1e=(e,t)=>{var r={};for(var n in e)vL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Fg)for(var n of Fg(e))t.indexOf(n)<0&&gL.call(e,n)&&(r[n]=e[n]);return r};const X1e={spacing:"md",align:"stretch",justify:"flex-start"},Ey=I.forwardRef((e,t)=>{const r=et("Stack",X1e,e),{spacing:n,className:o,align:i,justify:a,unstyled:s,variant:l}=r,c=Y1e(r,["spacing","className","align","justify","unstyled","variant"]),{classes:u,cx:f}=q1e({spacing:n,align:i,justify:a},{name:"Stack",unstyled:s,variant:l});return ae.createElement(rt,K1e({className:f(u.root,o),ref:t},c))});Ey.displayName="@mantine/core/Stack";var Z1e=Object.defineProperty,J1e=Object.defineProperties,Q1e=Object.getOwnPropertyDescriptors,HP=Object.getOwnPropertySymbols,eve=Object.prototype.hasOwnProperty,tve=Object.prototype.propertyIsEnumerable,VP=(e,t,r)=>t in e?Z1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,R2=(e,t)=>{for(var r in t||(t={}))eve.call(t,r)&&VP(e,r,t[r]);if(HP)for(var r of HP(t))tve.call(t,r)&&VP(e,r,t[r]);return e},rve=(e,t)=>J1e(e,Q1e(t));const mL={xs:me(34),sm:me(36),md:me(42),lg:me(48),xl:me(52)};var nve=at((e,{color:t,iconSize:r,radius:n,allowStepClick:o,iconPosition:i,orientation:a},{size:s})=>{const l=r?me(r):Re({size:s,sizes:mL}),c=s==="xl"||s==="lg"?e.spacing.md:e.spacing.sm,u=e.fn.radius(n),f=e.fn.variant({variant:"filled",color:t||e.primaryColor,primaryFallback:!1}),d=`calc(${e.spacing.xs} / 2)`,p={step:{justifyContent:"flex-start",minHeight:`calc(${l} + ${e.spacing.xl} + ${d})`,marginTop:d,overflow:"hidden","&:first-of-type":{marginTop:0},[`&:last-of-type .${zo("verticalSeparator")}`]:{display:"none"}}};return{stepLoader:{},step:R2({display:"flex",flexDirection:i==="left"?"row":"row-reverse",cursor:o?"pointer":"default"},a==="vertical"?p.step:{alignItems:"center"}),stepWrapper:{position:"relative"},verticalSeparator:{top:`calc(${l} + ${d})`,left:`calc(${l} / 2)`,height:"100vh",position:"absolute",borderLeft:`${me(2)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}`,ref:zo("verticalSeparator")},verticalSeparatorActive:{borderColor:e.fn.variant({variant:"filled",color:t}).background},stepIcon:{boxSizing:"border-box",height:l,width:l,minWidth:l,borderRadius:u,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],border:`${me(2)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}`,transition:"background-color 150ms ease, border-color 150ms ease",position:"relative",fontWeight:700,color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7],fontSize:Re({size:s,sizes:e.fontSizes}),"&[data-progress]":{borderColor:f.background},"&[data-completed]":{backgroundColor:f.background,borderColor:f.background,color:e.white}},stepCompletedIcon:rve(R2({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",color:e.white}),stepBody:R2({display:"flex",flexDirection:"column",marginLeft:i==="left"?c:void 0,marginRight:i==="right"?c:void 0},a==="vertical"?{marginTop:`calc(${r} / 4)`}:null),stepLabel:{textAlign:i,fontWeight:500,fontSize:Re({size:s,sizes:e.fontSizes}),lineHeight:1},stepDescription:{textAlign:i,marginTop:`calc(${Re({size:s,sizes:e.spacing})} / 3)`,marginBottom:`calc(${Re({size:s,sizes:e.spacing})} / 3)`,fontSize:`calc(${Re({size:s,sizes:e.fontSizes})} - ${me(2)})`,lineHeight:1}}});const ove=nve;var ive=Object.defineProperty,Bg=Object.getOwnPropertySymbols,yL=Object.prototype.hasOwnProperty,bL=Object.prototype.propertyIsEnumerable,WP=(e,t,r)=>t in e?ive(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N2=(e,t)=>{for(var r in t||(t={}))yL.call(t,r)&&WP(e,r,t[r]);if(Bg)for(var r of Bg(t))bL.call(t,r)&&WP(e,r,t[r]);return e},ave=(e,t)=>{var r={};for(var n in e)yL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Bg)for(var n of Bg(e))t.indexOf(n)<0&&bL.call(e,n)&&(r[n]=e[n]);return r};const sve={xs:16,sm:18,md:20,lg:22,xl:24},lve={withIcon:!0,size:"md",radius:"xl",allowStepClick:!0,iconPosition:"left",__staticSelector:"Step"},O0=(e,t)=>typeof e=="function"?ae.createElement(e,{step:t}):e,wL=I.forwardRef((e,t)=>{const r=et("StepperStep",lve,e),{className:n,step:o,state:i,color:a,icon:s,completedIcon:l,progressIcon:c,label:u,description:f,withIcon:d,iconSize:p,size:h,radius:y,loading:_,allowStepClick:b,allowStepSelect:m,iconPosition:E,__staticSelector:A,classNames:D,styles:$,unstyled:g,orientation:N,variant:V}=r,K=ave(r,["className","step","state","color","icon","completedIcon","progressIcon","label","description","withIcon","iconSize","size","radius","loading","allowStepClick","allowStepSelect","iconPosition","__staticSelector","classNames","styles","unstyled","orientation","variant"]),{classes:W,cx:P}=ove({color:a,iconSize:p,radius:y,allowStepClick:b,iconPosition:E,orientation:N},{name:A,classNames:D,styles:$,unstyled:g,variant:V,size:h}),C=Re({size:h,sizes:sve}),v=i==="stepCompleted"?null:i==="stepProgress"?c:s,w={"data-progress":i==="stepProgress"||void 0,"data-completed":i==="stepCompleted"||void 0};return ae.createElement(Kp,N2(N2({className:P(W.step,n),tabIndex:b?0:-1,ref:t},w),K),d&&ae.createElement("div",{className:W.stepWrapper},ae.createElement("div",N2({className:W.stepIcon},w),ae.createElement(ql,{mounted:i==="stepCompleted",transition:"pop",duration:200},B=>ae.createElement("div",{className:W.stepCompletedIcon,style:B},_?ae.createElement(pu,{color:"#fff",size:C,className:W.stepLoader}):O0(l,o)||ae.createElement(wue,{indeterminate:!1,width:C,height:C}))),i!=="stepCompleted"?_?ae.createElement(pu,{size:C,color:a}):O0(v||s,o):null),N==="vertical"&&ae.createElement("div",{className:P(W.verticalSeparator,{[W.verticalSeparatorActive]:i==="stepCompleted"})})),(u||f)&&ae.createElement("div",{className:W.stepBody},u&&ae.createElement(St,{className:W.stepLabel},O0(u,o)),f&&ae.createElement(St,{className:W.stepDescription,color:"dimmed"},O0(f,o))))});wL.displayName="@mantine/core/Step";function jg(e){return null}jg.displayName="@mantine/core/StepCompleted";var cve=Object.defineProperty,uve=Object.defineProperties,fve=Object.getOwnPropertyDescriptors,qP=Object.getOwnPropertySymbols,dve=Object.prototype.hasOwnProperty,pve=Object.prototype.propertyIsEnumerable,GP=(e,t,r)=>t in e?cve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Rf=(e,t)=>{for(var r in t||(t={}))dve.call(t,r)&&GP(e,r,t[r]);if(qP)for(var r of qP(t))pve.call(t,r)&&GP(e,r,t[r]);return e},hve=(e,t)=>uve(e,fve(t)),vve=at((e,{contentPadding:t,color:r,orientation:n,iconPosition:o,iconSize:i,breakpoint:a},{size:s})=>{const l=typeof a<"u",c=xo(Re({size:a,sizes:e.breakpoints})),u=typeof i<"u"?`calc(${me(i)} / 2 - ${me(1)})`:`calc(${Re({size:s,sizes:mL})} / 2 - ${me(1)})`,f={steps:{flexDirection:"column",alignItems:o==="left"?"flex-start":"flex-end"},separator:{width:me(2),minHeight:e.spacing.xl,marginLeft:o==="left"?u:0,marginRight:o==="right"?u:0,marginTop:`calc(${e.spacing.xs} / 2)`,marginBottom:`calc(${e.spacing.xs} - ${me(2)})`}},d={steps:{[`@media (max-width: ${mn(c-1)})`]:f.steps},separator:{[`@media (max-width: ${mn(c-1)})`]:f.separator}};return{root:{},steps:Rf(Rf({display:"flex",boxSizing:"border-box",alignItems:"center"},n==="vertical"?f.steps:null),l?d.steps:null),separator:Rf(Rf({boxSizing:"border-box",transition:"background-color 150ms ease",flex:1,height:me(2),backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],marginLeft:e.spacing.md,marginRight:e.spacing.md},n==="vertical"?f.separator:null),l?d.separator:null),separatorActive:{backgroundColor:e.fn.variant({variant:"filled",color:r||e.primaryColor,primaryFallback:!1}).background},content:hve(Rf({},e.fn.fontStyles()),{paddingTop:Re({size:t,sizes:e.spacing})})}});const gve=vve;var mve=Object.defineProperty,Lg=Object.getOwnPropertySymbols,xL=Object.prototype.hasOwnProperty,_L=Object.prototype.propertyIsEnumerable,KP=(e,t,r)=>t in e?mve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yve=(e,t)=>{for(var r in t||(t={}))xL.call(t,r)&&KP(e,r,t[r]);if(Lg)for(var r of Lg(t))_L.call(t,r)&&KP(e,r,t[r]);return e},bve=(e,t)=>{var r={};for(var n in e)xL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Lg)for(var n of Lg(e))t.indexOf(n)<0&&_L.call(e,n)&&(r[n]=e[n]);return r};const wve={contentPadding:"md",size:"md",radius:"xl",orientation:"horizontal",iconPosition:"left",allowNextStepsSelect:!0},rs=I.forwardRef((e,t)=>{var r,n,o;const i=et("Stepper",wve,e),{className:a,children:s,onStepClick:l,active:c,icon:u,completedIcon:f,progressIcon:d,color:p,iconSize:h,contentPadding:y,size:_,radius:b,orientation:m,breakpoint:E,iconPosition:A,allowNextStepsSelect:D,classNames:$,styles:g,unstyled:N,variant:V}=i,K=bve(i,["className","children","onStepClick","active","icon","completedIcon","progressIcon","color","iconSize","contentPadding","size","radius","orientation","breakpoint","iconPosition","allowNextStepsSelect","classNames","styles","unstyled","variant"]),{classes:W,cx:P}=gve({contentPadding:y,color:p,orientation:m,iconPosition:A,iconSize:h,breakpoint:E},{name:"Stepper",classNames:$,styles:g,unstyled:N,variant:V,size:_}),C=I.Children.toArray(s),v=C.filter(S=>S.type!==jg),w=C.find(S=>S.type===jg),B=v.reduce((S,F,T)=>{const q=c===T?"stepProgress":c>T?"stepCompleted":"stepInactive",te=(()=>typeof l!="function"?!1:typeof F.props.allowStepSelect=="boolean"?F.props.allowStepSelect:q==="stepCompleted"||D)();return S.push(I.cloneElement(F,{__staticSelector:"Stepper",icon:F.props.icon||u||T+1,key:T,step:T,variant:V,state:q,onClick:()=>te&&l(T),allowStepClick:te,completedIcon:F.props.completedIcon||f,progressIcon:F.props.progressIcon||d,color:F.props.color||p,iconSize:h,size:_,radius:b,classNames:$,styles:g,iconPosition:F.props.iconPosition||A,orientation:m,unstyled:N})),m==="horizontal"&&T!==v.length-1&&S.push(ae.createElement("div",{className:P(W.separator,{[W.separatorActive]:Tv.length-1?L:R;return ae.createElement(rt,yve({className:P(W.root,a),ref:t},K),ae.createElement("div",{className:W.steps},B),U&&ae.createElement("div",{className:W.content},U))});rs.Step=wL;rs.Completed=jg;rs.displayName="@mantine/core/Stepper";var xve=Object.defineProperty,_ve=Object.defineProperties,Eve=Object.getOwnPropertyDescriptors,YP=Object.getOwnPropertySymbols,Sve=Object.prototype.hasOwnProperty,Cve=Object.prototype.propertyIsEnumerable,XP=(e,t,r)=>t in e?xve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Pve=(e,t)=>{for(var r in t||(t={}))Sve.call(t,r)&&XP(e,r,t[r]);if(YP)for(var r of YP(t))Cve.call(t,r)&&XP(e,r,t[r]);return e},Ove=(e,t)=>_ve(e,Eve(t)),Ave=at((e,{captionSide:t,horizontalSpacing:r,verticalSpacing:n,fontSize:o,withBorder:i,withColumnBorders:a})=>{const s=`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:Ove(Pve({},e.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:t,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,border:i?s:void 0,"& > caption":{marginTop:t==="top"?0:e.spacing.xs,marginBottom:t==="bottom"?0:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& > thead > tr > th, & > tfoot > tr > th, & > tbody > tr > th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:Re({size:o,sizes:e.fontSizes}),padding:`${Re({size:n,sizes:e.spacing})} ${Re({size:r,sizes:e.spacing})}`},"& > thead > tr > th":{borderBottom:s},"& > tfoot > tr > th, & > tbody > tr > th":{borderTop:s},"& > tbody > tr > td":{padding:`${Re({size:n,sizes:e.spacing})} ${Re({size:r,sizes:e.spacing})}`,borderTop:s,fontSize:Re({size:o,sizes:e.fontSizes})},"& > tbody > tr:first-of-type > td, & > tbody > tr:first-of-type > th":{borderTop:"none"},"& > thead > tr > th, & > tbody > tr > td":{borderRight:a?s:"none","&:last-of-type":{borderRight:"none",borderLeft:a?s:"none"}},"& > tbody > tr > th":{borderRight:a?s:"none"},"&[data-striped] > tbody > tr:nth-of-type(odd)":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]},"&[data-hover] > tbody > tr":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})})}});const kve=Ave;var Ive=Object.defineProperty,$ve=Object.defineProperties,Tve=Object.getOwnPropertyDescriptors,zg=Object.getOwnPropertySymbols,EL=Object.prototype.hasOwnProperty,SL=Object.prototype.propertyIsEnumerable,ZP=(e,t,r)=>t in e?Ive(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Dve=(e,t)=>{for(var r in t||(t={}))EL.call(t,r)&&ZP(e,r,t[r]);if(zg)for(var r of zg(t))SL.call(t,r)&&ZP(e,r,t[r]);return e},Mve=(e,t)=>$ve(e,Tve(t)),Rve=(e,t)=>{var r={};for(var n in e)EL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&zg)for(var n of zg(e))t.indexOf(n)<0&&SL.call(e,n)&&(r[n]=e[n]);return r};const Nve={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},CL=I.forwardRef((e,t)=>{const r=et("Table",Nve,e),{className:n,children:o,striped:i,highlightOnHover:a,captionSide:s,horizontalSpacing:l,verticalSpacing:c,fontSize:u,unstyled:f,withBorder:d,withColumnBorders:p,variant:h}=r,y=Rve(r,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders","variant"]),{classes:_,cx:b}=kve({captionSide:s,verticalSpacing:c,horizontalSpacing:l,fontSize:u,withBorder:d,withColumnBorders:p},{unstyled:f,name:"Table",variant:h});return ae.createElement(rt,Mve(Dve({},y),{component:"table",ref:t,className:b(_.root,n),"data-striped":i||void 0,"data-hover":a||void 0}),o)});CL.displayName="@mantine/core/Table";var Fve=Object.defineProperty,Bve=Object.defineProperties,jve=Object.getOwnPropertyDescriptors,JP=Object.getOwnPropertySymbols,Lve=Object.prototype.hasOwnProperty,zve=Object.prototype.propertyIsEnumerable,QP=(e,t,r)=>t in e?Fve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eO=(e,t)=>{for(var r in t||(t={}))Lve.call(t,r)&&QP(e,r,t[r]);if(JP)for(var r of JP(t))zve.call(t,r)&&QP(e,r,t[r]);return e},Uve=(e,t)=>Bve(e,jve(t));const Hve={xs:me(16),sm:me(20),md:me(26),lg:me(32),xl:me(40)},Vve=["filled","light","gradient","outline","default"];function Wve({theme:e,variant:t,color:r,gradient:n}){if(!Vve.includes(t))return null;const o=e.fn.variant({variant:t,color:r||e.primaryColor,gradient:n,primaryFallback:!1});return{backgroundColor:o.background,color:o.color,backgroundImage:t==="gradient"?o.background:void 0,border:`${me(t==="gradient"?0:1)} solid ${o.border}`}}var qve=at((e,{color:t,radius:r,gradient:n},{variant:o,size:i})=>{const a=Re({size:i,sizes:Hve});return{root:eO(Uve(eO({},e.fn.fontStyles()),{display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:a,height:a,minWidth:a,minHeight:a,borderRadius:e.fn.radius(r)}),Wve({theme:e,variant:o,gradient:n,color:t}))}});const Gve=qve;var Kve=Object.defineProperty,Ug=Object.getOwnPropertySymbols,PL=Object.prototype.hasOwnProperty,OL=Object.prototype.propertyIsEnumerable,tO=(e,t,r)=>t in e?Kve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yve=(e,t)=>{for(var r in t||(t={}))PL.call(t,r)&&tO(e,r,t[r]);if(Ug)for(var r of Ug(t))OL.call(t,r)&&tO(e,r,t[r]);return e},Xve=(e,t)=>{var r={};for(var n in e)PL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ug)for(var n of Ug(e))t.indexOf(n)<0&&OL.call(e,n)&&(r[n]=e[n]);return r};const Zve={size:"md",variant:"filled"},N_=I.forwardRef((e,t)=>{const r=et("ThemeIcon",Zve,e),{className:n,size:o,radius:i,variant:a,color:s,children:l,gradient:c,unstyled:u}=r,f=Xve(r,["className","size","radius","variant","color","children","gradient","unstyled"]),{classes:d,cx:p}=Gve({variant:a,radius:i,color:s,gradient:c},{name:"ThemeIcon",unstyled:u,variant:a,size:o});return ae.createElement(rt,Yve({className:p(d.root,n),ref:t},f),l)});N_.displayName="@mantine/core/ThemeIcon";var Jve=Object.defineProperty,Qve=Object.defineProperties,ege=Object.getOwnPropertyDescriptors,rO=Object.getOwnPropertySymbols,tge=Object.prototype.hasOwnProperty,rge=Object.prototype.propertyIsEnumerable,nO=(e,t,r)=>t in e?Jve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nge=(e,t)=>{for(var r in t||(t={}))tge.call(t,r)&&nO(e,r,t[r]);if(rO)for(var r of rO(t))rge.call(t,r)&&nO(e,r,t[r]);return e},oge=(e,t)=>Qve(e,ege(t));function ige(e,t,r){return typeof e<"u"?e in r.headings.sizes?r.headings.sizes[e].fontSize:me(e):r.headings.sizes[t].fontSize}function age(e,t,r){return typeof e<"u"&&e in r.headings.sizes?r.headings.sizes[e].lineHeight:r.headings.sizes[t].lineHeight}var sge=at((e,{element:t,weight:r,inline:n},{size:o})=>({root:oge(nge({},e.fn.fontStyles()),{fontFamily:e.headings.fontFamily,fontWeight:r||e.headings.sizes[t].fontWeight||e.headings.fontWeight,fontSize:ige(o,t,e),lineHeight:n?1:age(o,t,e),margin:0})}));const lge=sge;var cge=Object.defineProperty,Hg=Object.getOwnPropertySymbols,AL=Object.prototype.hasOwnProperty,kL=Object.prototype.propertyIsEnumerable,oO=(e,t,r)=>t in e?cge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uge=(e,t)=>{for(var r in t||(t={}))AL.call(t,r)&&oO(e,r,t[r]);if(Hg)for(var r of Hg(t))kL.call(t,r)&&oO(e,r,t[r]);return e},fge=(e,t)=>{var r={};for(var n in e)AL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Hg)for(var n of Hg(e))t.indexOf(n)<0&&kL.call(e,n)&&(r[n]=e[n]);return r};const dge={order:1},F_=I.forwardRef((e,t)=>{const r=et("Title",dge,e),{className:n,order:o,children:i,unstyled:a,size:s,weight:l,inline:c,variant:u}=r,f=fge(r,["className","order","children","unstyled","size","weight","inline","variant"]),{classes:d,cx:p}=lge({element:`h${o}`,weight:l,inline:c},{name:"Title",unstyled:a,variant:u,size:s});return[1,2,3,4,5,6].includes(o)?ae.createElement(St,uge({variant:u,component:`h${o}`,ref:t,className:p(d.root,n)},f),i):null});F_.displayName="@mantine/core/Title";/** - * @remix-run/router v1.7.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function dp(){return dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Sy(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function hge(){return Math.random().toString(36).substr(2,8)}function aO(e,t){return{usr:e.state,key:e.key,idx:t}}function b3(e,t,r,n){return r===void 0&&(r=null),dp({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Kl(t):t,{state:r,key:t&&t.key||n||hge()})}function Vg(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Kl(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function vge(e,t,r,n){n===void 0&&(n={});let{window:o=document.defaultView,v5Compat:i=!1}=n,a=o.history,s=as.Pop,l=null,c=u();c==null&&(c=0,a.replaceState(dp({},a.state,{idx:c}),""));function u(){return(a.state||{idx:null}).idx}function f(){s=as.Pop;let _=u(),b=_==null?null:_-c;c=_,l&&l({action:s,location:y.location,delta:b})}function d(_,b){s=as.Push;let m=b3(y.location,_,b);r&&r(m,_),c=u()+1;let E=aO(m,c),A=y.createHref(m);try{a.pushState(E,"",A)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;o.location.assign(A)}i&&l&&l({action:s,location:y.location,delta:1})}function p(_,b){s=as.Replace;let m=b3(y.location,_,b);r&&r(m,_),c=u();let E=aO(m,c),A=y.createHref(m);a.replaceState(E,"",A),i&&l&&l({action:s,location:y.location,delta:0})}function h(_){let b=o.location.origin!=="null"?o.location.origin:o.location.href,m=typeof _=="string"?_:Vg(_);return fr(b,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,b)}let y={get action(){return s},get location(){return e(o,a)},listen(_){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(iO,f),l=_,()=>{o.removeEventListener(iO,f),l=null}},createHref(_){return t(o,_)},createURL:h,encodeLocation(_){let b=h(_);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:d,replace:p,go(_){return a.go(_)}};return y}var sO;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(sO||(sO={}));function gge(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?Kl(t):t,o=B_(n.pathname||"/",r);if(o==null)return null;let i=IL(e);mge(i);let a=null;for(let s=0;a==null&&s{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};l.relativePath.startsWith("/")&&(fr(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=Ss([n,l.relativePath]),u=r.concat(l);i.children&&i.children.length>0&&(fr(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),IL(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:Sge(c,i.index),routesMeta:u})};return e.forEach((i,a)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,a);else for(let l of $L(i.path))o(i,a,l)}),t}function $L(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return o?[i,""]:[i];let a=$L(n.join("/")),s=[];return s.push(...a.map(l=>l===""?i:[i,l].join("/"))),o&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function mge(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Cge(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const yge=/^:\w+$/,bge=3,wge=2,xge=1,_ge=10,Ege=-2,lO=e=>e==="*";function Sge(e,t){let r=e.split("/"),n=r.length;return r.some(lO)&&(n+=Ege),t&&(n+=wge),r.filter(o=>!lO(o)).reduce((o,i)=>o+(yge.test(i)?bge:i===""?xge:_ge),n)}function Cge(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function Pge(e,t){let{routesMeta:r}=e,n={},o="/",i=[];for(let a=0;a{if(u==="*"){let d=s[f]||"";a=i.slice(0,i.length-d.length).replace(/(.)\/+$/,"$1")}return c[u]=Ige(s[f]||"",u),c},{}),pathname:i,pathnameBase:a,pattern:e}}function Age(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Sy(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(a,s)=>(n.push(s),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function kge(e){try{return decodeURI(e)}catch(t){return Sy(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ige(e,t){try{return decodeURIComponent(e)}catch(r){return Sy(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function B_(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function $ge(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?Kl(e):e;return{pathname:r?r.startsWith("/")?r:Tge(r,t):t,search:Mge(n),hash:Rge(o)}}function Tge(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function F2(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function TL(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function DL(e,t,r,n){n===void 0&&(n=!1);let o;typeof e=="string"?o=Kl(e):(o=dp({},e),fr(!o.pathname||!o.pathname.includes("?"),F2("?","pathname","search",o)),fr(!o.pathname||!o.pathname.includes("#"),F2("#","pathname","hash",o)),fr(!o.search||!o.search.includes("#"),F2("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(n||a==null)s=r;else{let f=t.length-1;if(a.startsWith("..")){let d=a.split("/");for(;d[0]==="..";)d.shift(),f-=1;o.pathname=d.join("/")}s=f>=0?t[f]:"/"}let l=$ge(o,s),c=a&&a!=="/"&&a.endsWith("/"),u=(i||a===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Ss=e=>e.join("/").replace(/\/\/+/g,"/"),Dge=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Mge=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Rge=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Nge(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const ML=["post","put","patch","delete"];new Set(ML);const Fge=["get",...ML];new Set(Fge);/** - * React Router v6.14.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Wg(){return Wg=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),a=I.useRef(!1);return NL(()=>{a.current=!0}),I.useCallback(function(l,c){if(c===void 0&&(c={}),!a.current)return;if(typeof l=="number"){r.go(l);return}let u=DL(l,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:Ss([t,u.pathname])),(c.replace?r.replace:r.push)(u,c.state,c)},[t,r,i,o,e])}function FL(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=I.useContext(Yl),{pathname:o}=Wu(),i=JSON.stringify(TL(n).map(a=>a.pathnameBase));return I.useMemo(()=>DL(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function zge(e,t){return Uge(e,t)}function Uge(e,t,r){th()||fr(!1);let{navigator:n}=I.useContext(Vu),{matches:o}=I.useContext(Yl),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let s=i?i.pathnameBase:"/";i&&i.route;let l=Wu(),c;if(t){var u;let y=typeof t=="string"?Kl(t):t;s==="/"||(u=y.pathname)!=null&&u.startsWith(s)||fr(!1),c=y}else c=l;let f=c.pathname||"/",d=s==="/"?f:f.slice(s.length)||"/",p=gge(e,{pathname:d}),h=Gge(p&&p.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Ss([s,n.encodeLocation?n.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?s:Ss([s,n.encodeLocation?n.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),o,r);return t&&h?I.createElement(Cy.Provider,{value:{location:Wg({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:as.Pop}},h):h}function Hge(){let e=Zge(),t=Nge(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return I.createElement(I.Fragment,null,I.createElement("h2",null,"Unexpected Application Error!"),I.createElement("h3",{style:{fontStyle:"italic"}},t),r?I.createElement("pre",{style:o},r):null,i)}const Vge=I.createElement(Hge,null);class Wge extends I.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?I.createElement(Yl.Provider,{value:this.props.routeContext},I.createElement(RL.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function qge(e){let{routeContext:t,match:r,children:n}=e,o=I.useContext(j_);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),I.createElement(Yl.Provider,{value:t},n)}function Gge(e,t,r){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let i=e,a=(n=r)==null?void 0:n.errors;if(a!=null){let s=i.findIndex(l=>l.route.id&&(a==null?void 0:a[l.route.id]));s>=0||fr(!1),i=i.slice(0,Math.min(i.length,s+1))}return i.reduceRight((s,l,c)=>{let u=l.route.id?a==null?void 0:a[l.route.id]:null,f=null;r&&(f=l.route.errorElement||Vge);let d=t.concat(i.slice(0,c+1)),p=()=>{let h;return u?h=f:l.route.Component?h=I.createElement(l.route.Component,null):l.route.element?h=l.route.element:h=s,I.createElement(qge,{match:l,routeContext:{outlet:s,matches:d,isDataRoute:r!=null},children:h})};return r&&(l.route.ErrorBoundary||l.route.errorElement||c===0)?I.createElement(Wge,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:p(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):p()},null)}var w3;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(w3||(w3={}));var pp;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(pp||(pp={}));function Kge(e){let t=I.useContext(j_);return t||fr(!1),t}function Yge(e){let t=I.useContext(Bge);return t||fr(!1),t}function Xge(e){let t=I.useContext(Yl);return t||fr(!1),t}function BL(e){let t=Xge(),r=t.matches[t.matches.length-1];return r.route.id||fr(!1),r.route.id}function Zge(){var e;let t=I.useContext(RL),r=Yge(pp.UseRouteError),n=BL(pp.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function Jge(){let{router:e}=Kge(w3.UseNavigateStable),t=BL(pp.UseNavigateStable),r=I.useRef(!1);return NL(()=>{r.current=!0}),I.useCallback(function(o,i){i===void 0&&(i={}),r.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Wg({fromRouteId:t},i)))},[e,t])}function pr(e){fr(!1)}function Qge(e){let{basename:t="/",children:r=null,location:n,navigationType:o=as.Pop,navigator:i,static:a=!1}=e;th()&&fr(!1);let s=t.replace(/^\/*/,"/"),l=I.useMemo(()=>({basename:s,navigator:i,static:a}),[s,i,a]);typeof n=="string"&&(n=Kl(n));let{pathname:c="/",search:u="",hash:f="",state:d=null,key:p="default"}=n,h=I.useMemo(()=>{let y=B_(c,s);return y==null?null:{location:{pathname:y,search:u,hash:f,state:d,key:p},navigationType:o}},[s,c,u,f,d,p,o]);return h==null?null:I.createElement(Vu.Provider,{value:l},I.createElement(Cy.Provider,{children:r,value:h}))}function eme(e){let{children:t,location:r}=e;return zge(x3(t),r)}var cO;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(cO||(cO={}));new Promise(()=>{});function x3(e,t){t===void 0&&(t=[]);let r=[];return I.Children.forEach(e,(n,o)=>{if(!I.isValidElement(n))return;let i=[...t,o];if(n.type===I.Fragment){r.push.apply(r,x3(n.props.children,i));return}n.type!==pr&&fr(!1),!n.props.index||!n.props.children||fr(!1);let a={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=x3(n.props.children,i)),r.push(a)}),r}/** - * React Router DOM v6.14.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function _3(){return _3=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[o]=e[o]);return r}function rme(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function nme(e,t){return e.button===0&&(!t||t==="_self")&&!rme(e)}const ome=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],ime="startTransition",uO=Hd[ime];function ame(e){let{basename:t,children:r,future:n,window:o}=e,i=I.useRef();i.current==null&&(i.current=pge({window:o,v5Compat:!0}));let a=i.current,[s,l]=I.useState({action:a.action,location:a.location}),{v7_startTransition:c}=n||{},u=I.useCallback(f=>{c&&uO?uO(()=>l(f)):l(f)},[l,c]);return I.useLayoutEffect(()=>a.listen(u),[a,u]),I.createElement(Qge,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:a})}const sme=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",lme=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jL=I.forwardRef(function(t,r){let{onClick:n,relative:o,reloadDocument:i,replace:a,state:s,target:l,to:c,preventScrollReset:u}=t,f=tme(t,ome),{basename:d}=I.useContext(Vu),p,h=!1;if(typeof c=="string"&&lme.test(c)&&(p=c,sme))try{let m=new URL(window.location.href),E=c.startsWith("//")?new URL(m.protocol+c):new URL(c),A=B_(E.pathname,d);E.origin===m.origin&&A!=null?c=A+E.search+E.hash:h=!0}catch{}let y=jge(c,{relative:o}),_=cme(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:o});function b(m){n&&n(m),m.defaultPrevented||_(m)}return I.createElement("a",_3({},f,{href:p||y,onClick:h||i?n:b,ref:r,target:l}))});var fO;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(fO||(fO={}));var dO;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(dO||(dO={}));function cme(e,t){let{target:r,replace:n,state:o,preventScrollReset:i,relative:a}=t===void 0?{}:t,s=rh(),l=Wu(),c=FL(e,{relative:a});return I.useCallback(u=>{if(nme(u,r)){u.preventDefault();let f=n!==void 0?n:Vg(l)===Vg(c);s(e,{replace:f,state:o,preventScrollReset:i,relative:a})}},[l,s,c,n,o,r,e,i,a])}var LL={exports:{}},ume="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",fme=ume,dme=fme;function zL(){}function UL(){}UL.resetWarningCache=zL;var pme=function(){function e(n,o,i,a,s,l){if(l!==dme){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:UL,resetWarningCache:zL};return r.PropTypes=r,r};LL.exports=pme();var hme=LL.exports;const nl=ri(hme);var vme={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"},gme=Object.defineProperty,mme=Object.defineProperties,yme=Object.getOwnPropertyDescriptors,qg=Object.getOwnPropertySymbols,HL=Object.prototype.hasOwnProperty,VL=Object.prototype.propertyIsEnumerable,pO=(e,t,r)=>t in e?gme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hO=(e,t)=>{for(var r in t||(t={}))HL.call(t,r)&&pO(e,r,t[r]);if(qg)for(var r of qg(t))VL.call(t,r)&&pO(e,r,t[r]);return e},bme=(e,t)=>mme(e,yme(t)),wme=(e,t)=>{var r={};for(var n in e)HL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&qg)for(var n of qg(e))t.indexOf(n)<0&&VL.call(e,n)&&(r[n]=e[n]);return r},Mn=(e,t,r)=>{const n=I.forwardRef((o,i)=>{var a=o,{color:s="currentColor",size:l=24,stroke:c=2,children:u}=a,f=wme(a,["color","size","stroke","children"]);return I.createElement("svg",hO(bme(hO({ref:i},vme),{width:l,height:l,stroke:s,strokeWidth:c,className:`tabler-icon tabler-icon-${e}`}),f),[...r.map(([d,p])=>I.createElement(d,p)),...u||[]])});return n.propTypes={color:nl.string,size:nl.oneOfType([nl.string,nl.number]),stroke:nl.oneOfType([nl.string,nl.number])},n.displayName=`${t}`,n},xme=Mn("alert-circle","IconAlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]),_me=Mn("at","IconAt",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M16 12v1.5a2.5 2.5 0 0 0 5 0v-1.5a9 9 0 1 0 -5.5 8.28",key:"svg-1"}]]),Eme=Mn("calendar-stats","IconCalendarStats",[["path",{d:"M11.795 21h-6.795a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4",key:"svg-0"}],["path",{d:"M18 14v4h4",key:"svg-1"}],["path",{d:"M18 18m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-2"}],["path",{d:"M15 3v4",key:"svg-3"}],["path",{d:"M7 3v4",key:"svg-4"}],["path",{d:"M3 11h16",key:"svg-5"}]]),Sme=Mn("check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]),Cme=Mn("chevron-left","IconChevronLeft",[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]]),Pme=Mn("chevron-right","IconChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]]),Ome=Mn("file-analytics","IconFileAnalytics",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 17l0 -5",key:"svg-2"}],["path",{d:"M12 17l0 -1",key:"svg-3"}],["path",{d:"M15 17l0 -3",key:"svg-4"}]]),Ame=Mn("gauge","IconGauge",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M13.41 10.59l2.59 -2.59",key:"svg-2"}],["path",{d:"M7 12a5 5 0 0 1 5 -5",key:"svg-3"}]]),kme=Mn("grip-vertical","IconGripVertical",[["path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]]),Ime=Mn("moon-stars","IconMoonStars",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}],["path",{d:"M17 4a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2",key:"svg-1"}],["path",{d:"M19 11h2m-1 -1v2",key:"svg-2"}]]),$me=Mn("notes","IconNotes",[["path",{d:"M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M9 7l6 0",key:"svg-1"}],["path",{d:"M9 11l6 0",key:"svg-2"}],["path",{d:"M9 15l4 0",key:"svg-3"}]]),Tme=Mn("presentation-analytics","IconPresentationAnalytics",[["path",{d:"M9 12v-4",key:"svg-0"}],["path",{d:"M15 12v-2",key:"svg-1"}],["path",{d:"M12 12v-1",key:"svg-2"}],["path",{d:"M3 4h18",key:"svg-3"}],["path",{d:"M4 4v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-10",key:"svg-4"}],["path",{d:"M12 16v4",key:"svg-5"}],["path",{d:"M9 20h6",key:"svg-6"}]]),Dme=Mn("square-rounded-minus","IconSquareRoundedMinus",[["path",{d:"M9 12h6",key:"svg-0"}],["path",{d:"M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z",key:"svg-1"}]]),Mme=Mn("sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]);const Rme=at(e=>({control:{fontWeight:500,display:"block",width:"100%",padding:`${e.spacing.xs} ${e.spacing.md}`,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,fontSize:e.fontSizes.sm,"&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[0],color:e.colorScheme==="dark"?e.white:e.black}},link:{fontWeight:500,display:"block",textDecoration:"none",padding:`${e.spacing.xs} ${e.spacing.md}`,paddingLeft:me(31),marginLeft:me(30),fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],borderLeft:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,"&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[0],color:e.colorScheme==="dark"?e.white:e.black}},linkActive:{"&, &:hover":{backgroundColor:e.fn.variant({variant:"light",color:e.primaryColor}).background,color:e.fn.variant({variant:"light",color:e.primaryColor}).color,[`& .${zo("icon")}`]:{color:e.fn.variant({variant:"light",color:e.primaryColor}).color}}},chevron:{transition:"transform 200ms ease"}}));function Nme({icon:e,label:t,initiallyOpened:r,links:n,groupLink:o,active:i,setActive:a}){const{classes:s,theme:l,cx:c}=Rme(),u=rh(),f=Array.isArray(n),[d,p]=I.useState(r??!0),h=l.dir==="ltr"?Pme:Cme,y=(f?n:[]).map(_=>j.jsx(St,{component:jL,className:c(s.link,{[s.linkActive]:_.link===i}),to:_.link,ta:"left",onClick:()=>a(_.link),children:_.label},_.label));return j.jsxs(j.Fragment,{children:[j.jsx(Kp,{onClick:()=>{p(_=>!_),f||a(o??""),o&&u(o)},className:c(s.control,{[s.linkActive]:!f&&o===i}),children:j.jsxs(Kt,{position:"apart",spacing:0,children:[j.jsxs(rt,{sx:{display:"flex",alignItems:"center"},children:[j.jsx(N_,{variant:"light",size:30,children:j.jsx(e,{size:"1.1rem"})}),j.jsx(rt,{ml:"md",children:t})]}),f&&j.jsx(h,{className:s.chevron,size:"1rem",stroke:1.5,style:{transform:d?`rotate(${l.dir==="rtl"?-90:90}deg)`:"none"}})]})}),f?j.jsx(DR,{in:d,children:y}):null]})}const Fme=[{label:"Wallet Info",icon:Ame,groupLink:"/"},{label:"Fungible Tokens",icon:$me,initiallyOpened:!1,links:[{label:"Token info",link:"/token/info"},{label:"Issue new tokens",link:"/token/new"},{label:"Burn tokens",link:"/token/burn"}]},{label:"NFT",icon:Eme,initiallyOpened:!1,links:[{label:"NFT info",link:"/nft/info"},{label:"Create new collection",link:"/nft/new-collection"},{label:"Burn NFTs",link:"/nft/burn"}]},{label:"Contracts",icon:Ome,initiallyOpened:!1,links:[{label:"Playground",link:"/contract/play"},{label:"Contract info",link:"/contract/info"},{label:"Deploy Contract",link:"/contract/deploy"}]},{label:"Multisig",icon:Tme,initiallyOpened:!0,links:[{label:"Create Multisig",link:"/multisig/create"},{label:"Import Multisig",link:"/multisig/import"},{label:"Show Multisig",link:"/multisig/show"},{label:"Build Transaction",link:"/multisig/build-tx"},{label:"Sign Transaction",link:"/multisig/sign-tx"}]}],Bme=at(e=>({navbar:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,paddingBottom:0},header:{padding:e.spacing.md,paddingTop:0,marginLeft:`calc(${e.spacing.md} * -1)`,marginRight:`calc(${e.spacing.md} * -1)`,color:e.colorScheme==="dark"?e.white:e.black,borderBottom:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`},links:{marginLeft:`calc(${e.spacing.md} * -1)`,marginRight:`calc(${e.spacing.md} * -1)`},linksInner:{paddingTop:e.spacing.xl,paddingBottom:e.spacing.xl},footer:{marginLeft:`calc(${e.spacing.md} * -1)`,marginRight:`calc(${e.spacing.md} * -1)`,borderTop:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}}));function jme(){const{classes:e}=Bme(),t=Wu(),[r,n]=I.useState(t.pathname);I.useEffect(()=>{n(t.pathname)},[t.pathname]);const o=Fme.map(i=>I.createElement(Nme,{...i,key:i.label,active:r,setActive:n}));return j.jsx(Ev,{width:{sm:300},p:"md",className:e.navbar,children:j.jsx(Ev.Section,{grow:!0,className:e.links,component:XN,children:j.jsx("div",{className:e.linksInner,children:o})})})}function Lme(){const{colorScheme:e,toggleColorScheme:t}=vte(),r=e==="dark";return j.jsx(pv,{variant:"outline",color:r?"yellow":"blue",onClick:()=>t(),title:"Toggle color scheme",children:r?j.jsx(Mme,{size:"1.1rem"}):j.jsx(Ime,{size:"1.1rem"})})}var E3=function(e,t){return E3=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},E3(e,t)};function WL(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");E3(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Ve=function(){return Ve=Object.assign||function(t){for(var r,n=1,o=arguments.length;n=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ir(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function qo(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n"u"||process.env===void 0?Ume:"production",Xi=function(e){return{isEnabled:function(t){return e.some(function(r){return!!t[r]})}}},hp={measureLayout:Xi(["layout","layoutId","drag"]),animation:Xi(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Xi(["exit"]),drag:Xi(["drag","dragControls"]),focus:Xi(["whileFocus"]),hover:Xi(["whileHover","onHoverStart","onHoverEnd"]),tap:Xi(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Xi(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Xi(["whileInView","onViewportEnter","onViewportLeave"])};function Hme(e){for(var t in e)e[t]!==null&&(t==="projectionNodeConstructor"?hp.projectionNodeConstructor=e[t]:hp[t].Component=e[t])}var Vme=function(){},Gg=function(){},qL=I.createContext({strict:!1}),GL=Object.keys(hp),Wme=GL.length;function qme(e,t,r){var n=[],o=I.useContext(qL);if(!t)return null;L_!=="production"&&r&&o.strict;for(var i=0;i"u")return t;var r=new Map;return new Proxy(t,{get:function(n,o){return r.has(o)||r.set(o,t(o)),r.get(o)}})}var uye=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function H_(e){return typeof e!="string"||e.includes("-")?!1:!!(uye.indexOf(e)>-1||/[A-Z]/.test(e))}var Yg={};function fye(e){Object.assign(Yg,e)}var C3=["","X","Y","Z"],dye=["translate","scale","rotate","skew"],vp=["transformPerspective","x","y","z"];dye.forEach(function(e){return C3.forEach(function(t){return vp.push(e+t)})});function pye(e,t){return vp.indexOf(e)-vp.indexOf(t)}var hye=new Set(vp);function ih(e){return hye.has(e)}var vye=new Set(["originX","originY","originZ"]);function QL(e){return vye.has(e)}function ez(e,t){var r=t.layout,n=t.layoutId;return ih(e)||QL(e)||(r||n!==void 0)&&(!!Yg[e]||e==="opacity")}var xa=function(e){return!!(e!==null&&typeof e=="object"&&e.getVelocity)},gye={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function mye(e,t,r,n){var o=e.transform,i=e.transformKeys,a=t.enableHardwareAcceleration,s=a===void 0?!0:a,l=t.allowTransformNone,c=l===void 0?!0:l,u="";i.sort(pye);for(var f=!1,d=i.length,p=0;pr=>Math.max(Math.min(r,t),e),_d=e=>e%1?Number(e.toFixed(5)):e,gp=/(-)?([\d]*\.?[\d])+/g,P3=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,wye=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function ah(e){return typeof e=="string"}const Xl={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ed=Object.assign(Object.assign({},Xl),{transform:rz(0,1)}),A0=Object.assign(Object.assign({},Xl),{default:1}),sh=e=>({test:t=>ah(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),qa=sh("deg"),Pi=sh("%"),dt=sh("px"),xye=sh("vh"),_ye=sh("vw"),gO=Object.assign(Object.assign({},Pi),{parse:e=>Pi.parse(e)/100,transform:e=>Pi.transform(e*100)}),V_=(e,t)=>r=>!!(ah(r)&&wye.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),nz=(e,t,r)=>n=>{if(!ah(n))return n;const[o,i,a,s]=n.match(gp);return{[e]:parseFloat(o),[t]:parseFloat(i),[r]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},El={test:V_("hsl","hue"),parse:nz("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Pi.transform(_d(t))+", "+Pi.transform(_d(r))+", "+_d(Ed.transform(n))+")"},Eye=rz(0,255),B2=Object.assign(Object.assign({},Xl),{transform:e=>Math.round(Eye(e))}),ss={test:V_("rgb","red"),parse:nz("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+B2.transform(e)+", "+B2.transform(t)+", "+B2.transform(r)+", "+_d(Ed.transform(n))+")"};function Sye(e){let t="",r="",n="",o="";return e.length>5?(t=e.substr(1,2),r=e.substr(3,2),n=e.substr(5,2),o=e.substr(7,2)):(t=e.substr(1,1),r=e.substr(2,1),n=e.substr(3,1),o=e.substr(4,1),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}const O3={test:V_("#"),parse:Sye,transform:ss.transform},dn={test:e=>ss.test(e)||O3.test(e)||El.test(e),parse:e=>ss.test(e)?ss.parse(e):El.test(e)?El.parse(e):O3.parse(e),transform:e=>ah(e)?e:e.hasOwnProperty("red")?ss.transform(e):El.transform(e)},oz="${c}",iz="${n}";function Cye(e){var t,r,n,o;return isNaN(e)&&ah(e)&&((r=(t=e.match(gp))===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)+((o=(n=e.match(P3))===null||n===void 0?void 0:n.length)!==null&&o!==void 0?o:0)>0}function az(e){typeof e=="number"&&(e=`${e}`);const t=[];let r=0;const n=e.match(P3);n&&(r=n.length,e=e.replace(P3,oz),t.push(...n.map(dn.parse)));const o=e.match(gp);return o&&(e=e.replace(gp,iz),t.push(...o.map(Xl.parse))),{values:t,numColors:r,tokenised:e}}function sz(e){return az(e).values}function lz(e){const{values:t,numColors:r,tokenised:n}=az(e),o=t.length;return i=>{let a=n;for(let s=0;stypeof e=="number"?0:e;function Oye(e){const t=sz(e);return lz(e)(t.map(Pye))}const _a={test:Cye,parse:sz,createTransformer:lz,getAnimatableNone:Oye},Aye=new Set(["brightness","contrast","saturate","opacity"]);function kye(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(gp)||[];if(!n)return e;const o=r.replace(n,"");let i=Aye.has(t)?1:0;return n!==r&&(i*=100),t+"("+i+o+")"}const Iye=/([a-z-]*)\(.*?\)/g,A3=Object.assign(Object.assign({},_a),{getAnimatableNone:e=>{const t=e.match(Iye);return t?t.map(kye).join(" "):e}});var mO=Ve(Ve({},Xl),{transform:Math.round}),cz={borderWidth:dt,borderTopWidth:dt,borderRightWidth:dt,borderBottomWidth:dt,borderLeftWidth:dt,borderRadius:dt,radius:dt,borderTopLeftRadius:dt,borderTopRightRadius:dt,borderBottomRightRadius:dt,borderBottomLeftRadius:dt,width:dt,maxWidth:dt,height:dt,maxHeight:dt,size:dt,top:dt,right:dt,bottom:dt,left:dt,padding:dt,paddingTop:dt,paddingRight:dt,paddingBottom:dt,paddingLeft:dt,margin:dt,marginTop:dt,marginRight:dt,marginBottom:dt,marginLeft:dt,rotate:qa,rotateX:qa,rotateY:qa,rotateZ:qa,scale:A0,scaleX:A0,scaleY:A0,scaleZ:A0,skew:qa,skewX:qa,skewY:qa,distance:dt,translateX:dt,translateY:dt,translateZ:dt,x:dt,y:dt,z:dt,perspective:dt,transformPerspective:dt,opacity:Ed,originX:gO,originY:gO,originZ:dt,zIndex:mO,fillOpacity:Ed,strokeOpacity:Ed,numOctaves:mO};function W_(e,t,r,n){var o,i=e.style,a=e.vars,s=e.transform,l=e.transformKeys,c=e.transformOrigin;l.length=0;var u=!1,f=!1,d=!0;for(var p in t){var h=t[p];if(tz(p)){a[p]=h;continue}var y=cz[p],_=bye(h,y);if(ih(p)){if(u=!0,s[p]=_,l.push(p),!d)continue;h!==((o=y.default)!==null&&o!==void 0?o:0)&&(d=!1)}else QL(p)?(c[p]=_,f=!0):i[p]=_}u?i.transform=mye(e,r,d,n):n?i.transform=n({},""):!t.transform&&i.transform&&(i.transform="none"),f&&(i.transformOrigin=yye(c))}var q_=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function uz(e,t,r){for(var n in t)!xa(t[n])&&!ez(n,r)&&(e[n]=t[n])}function $ye(e,t,r){var n=e.transformTemplate;return I.useMemo(function(){var o=q_();W_(o,t,{enableHardwareAcceleration:!r},n);var i=o.vars,a=o.style;return Ve(Ve({},i),a)},[t])}function Tye(e,t,r){var n=e.style||{},o={};return uz(o,n,e),Object.assign(o,$ye(e,t,r)),e.transformValues&&(o=e.transformValues(o)),o}function Dye(e,t,r){var n={},o=Tye(e,t,r);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":"pan-".concat(e.drag==="x"?"y":"x")),n.style=o,n}var Mye=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function Xg(e){return Mye.has(e)}var fz=function(e){return!Xg(e)};function Rye(e){e&&(fz=function(t){return t.startsWith("on")?!Xg(t):e(t)})}try{Rye(require("@emotion/is-prop-valid").default)}catch{}function Nye(e,t,r){var n={};for(var o in e)(fz(o)||r===!0&&Xg(o)||!t&&!Xg(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}function yO(e,t,r){return typeof e=="string"?e:dt.transform(t+r*e)}function Fye(e,t,r){var n=yO(t,e.x,e.width),o=yO(r,e.y,e.height);return"".concat(n," ").concat(o)}var Bye={offset:"stroke-dashoffset",array:"stroke-dasharray"},jye={offset:"strokeDashoffset",array:"strokeDasharray"};function Lye(e,t,r,n,o){r===void 0&&(r=1),n===void 0&&(n=0),o===void 0&&(o=!0),e.pathLength=1;var i=o?Bye:jye;e[i.offset]=dt.transform(-n);var a=dt.transform(t),s=dt.transform(r);e[i.array]="".concat(a," ").concat(s)}function G_(e,t,r,n){var o=t.attrX,i=t.attrY,a=t.originX,s=t.originY,l=t.pathLength,c=t.pathSpacing,u=c===void 0?1:c,f=t.pathOffset,d=f===void 0?0:f,p=Ri(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);W_(e,p,r,n),e.attrs=e.style,e.style={};var h=e.attrs,y=e.style,_=e.dimensions;h.transform&&(_&&(y.transform=h.transform),delete h.transform),_&&(a!==void 0||s!==void 0||y.transform)&&(y.transformOrigin=Fye(_,a!==void 0?a:.5,s!==void 0?s:.5)),o!==void 0&&(h.x=o),i!==void 0&&(h.y=i),l!==void 0&&Lye(h,l,u,d,!1)}var dz=function(){return Ve(Ve({},q_()),{attrs:{}})};function zye(e,t){var r=I.useMemo(function(){var o=dz();return G_(o,t,{enableHardwareAcceleration:!1},e.transformTemplate),Ve(Ve({},o.attrs),{style:Ve({},o.style)})},[t]);if(e.style){var n={};uz(n,e.style,e),r.style=Ve(Ve({},n),r.style)}return r}function Uye(e){e===void 0&&(e=!1);var t=function(r,n,o,i,a,s){var l=a.latestValues,c=H_(r)?zye:Dye,u=c(n,l,s),f=Nye(n,typeof r=="string",e),d=Ve(Ve(Ve({},f),u),{ref:i});return o&&(d["data-projection-id"]=o),I.createElement(r,d)};return t}var Hye=/([a-z])([A-Z])/g,Vye="$1-$2",pz=function(e){return e.replace(Hye,Vye).toLowerCase()};function hz(e,t,r,n){var o=t.style,i=t.vars;Object.assign(e.style,o,n&&n.getProjectionStyles(r));for(var a in i)e.style.setProperty(a,i[a])}var vz=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function gz(e,t,r,n){hz(e,t,void 0,n);for(var o in t.attrs)e.setAttribute(vz.has(o)?o:pz(o),t.attrs[o])}function K_(e){var t=e.style,r={};for(var n in t)(xa(t[n])||ez(n,e))&&(r[n]=t[n]);return r}function mz(e){var t=K_(e);for(var r in e)if(xa(e[r])){var n=r==="x"||r==="y"?"attr"+r.toUpperCase():r;t[n]=e[r]}return t}function Y_(e){return typeof e=="object"&&typeof e.start=="function"}var mp=function(e){return Array.isArray(e)},Wye=function(e){return!!(e&&typeof e=="object"&&e.mix&&e.toValue)},yz=function(e){return mp(e)?e[e.length-1]||0:e};function y1(e){var t=xa(e)?e.get():e;return Wye(t)?t.toValue():t}function bO(e,t,r,n){var o=e.scrapeMotionValuesFromProps,i=e.createRenderState,a=e.onMount,s={latestValues:qye(t,r,n,o),renderState:i()};return a&&(s.mount=function(l){return a(t,l,s)}),s}var bz=function(e){return function(t,r){var n=I.useContext(Py),o=I.useContext(nh);return r?bO(e,t,n,o):oh(function(){return bO(e,t,n,o)})}};function qye(e,t,r,n){var o={},i=(r==null?void 0:r.initial)===!1,a=n(e);for(var s in a)o[s]=y1(a[s]);var l=e.initial,c=e.animate,u=Ay(e),f=ZL(e);t&&f&&!u&&e.inherit!==!1&&(l??(l=t.initial),c??(c=t.animate));var d=i||l===!1,p=d?c:l;if(p&&typeof p!="boolean"&&!Y_(p)){var h=Array.isArray(p)?p:[p];h.forEach(function(y){var _=XL(e,y);if(_){var b=_.transitionEnd;_.transition;var m=Ri(_,["transitionEnd","transition"]);for(var E in m){var A=m[E];if(Array.isArray(A)){var D=d?A.length-1:0;A=A[D]}A!==null&&(o[E]=A)}for(var E in b)o[E]=b[E]}})}return o}var Gye={useVisualState:bz({scrapeMotionValuesFromProps:mz,createRenderState:dz,onMount:function(e,t,r){var n=r.renderState,o=r.latestValues;try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}G_(n,o,{enableHardwareAcceleration:!1},e.transformTemplate),gz(t,n)}})},Kye={useVisualState:bz({scrapeMotionValuesFromProps:K_,createRenderState:q_})};function Yye(e,t,r,n,o){var i=t.forwardMotionProps,a=i===void 0?!1:i,s=H_(e)?Gye:Kye;return Ve(Ve({},s),{preloadedFeatures:r,useRender:Uye(a),createVisualElement:n,projectionNodeConstructor:o,Component:e})}var jt;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(jt||(jt={}));function ky(e,t,r,n){return n===void 0&&(n={passive:!0}),e.addEventListener(t,r,n),function(){return e.removeEventListener(t,r)}}function k3(e,t,r,n){I.useEffect(function(){var o=e.current;if(r&&o)return ky(o,t,r,n)},[e,t,r,n])}function Xye(e){var t=e.whileFocus,r=e.visualElement,n=function(){var i;(i=r.animationState)===null||i===void 0||i.setActive(jt.Focus,!0)},o=function(){var i;(i=r.animationState)===null||i===void 0||i.setActive(jt.Focus,!1)};k3(r,"focus",t?n:void 0),k3(r,"blur",t?o:void 0)}function wz(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function xz(e){var t=!!e.touches;return t}function Zye(e){return function(t){var r=t instanceof MouseEvent,n=!r||r&&t.button===0;n&&e(t)}}var Jye={pageX:0,pageY:0};function Qye(e,t){t===void 0&&(t="page");var r=e.touches[0]||e.changedTouches[0],n=r||Jye;return{x:n[t+"X"],y:n[t+"Y"]}}function ebe(e,t){return t===void 0&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function X_(e,t){return t===void 0&&(t="page"),{point:xz(e)?Qye(e,t):ebe(e,t)}}var _z=function(e,t){t===void 0&&(t=!1);var r=function(n){return e(n,X_(n))};return t?Zye(r):r},tbe=function(){return qu&&window.onpointerdown===null},rbe=function(){return qu&&window.ontouchstart===null},nbe=function(){return qu&&window.onmousedown===null},obe={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},ibe={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Ez(e){return tbe()?e:rbe()?ibe[e]:nbe()?obe[e]:e}function Jc(e,t,r,n){return ky(e,Ez(t),_z(r,t==="pointerdown"),n)}function Zg(e,t,r,n){return k3(e,Ez(t),r&&_z(r,t==="pointerdown"),n)}function Sz(e){var t=null;return function(){var r=function(){t=null};return t===null?(t=e,r):!1}}var wO=Sz("dragHorizontal"),xO=Sz("dragVertical");function Cz(e){var t=!1;if(e==="y")t=xO();else if(e==="x")t=wO();else{var r=wO(),n=xO();r&&n?t=function(){r(),n()}:(r&&r(),n&&n())}return t}function Pz(){var e=Cz(!0);return e?(e(),!1):!0}function _O(e,t,r){return function(n,o){var i;!wz(n)||Pz()||((i=e.animationState)===null||i===void 0||i.setActive(jt.Hover,t),r==null||r(n,o))}}function abe(e){var t=e.onHoverStart,r=e.onHoverEnd,n=e.whileHover,o=e.visualElement;Zg(o,"pointerenter",t||n?_O(o,!0,t):void 0,{passive:!t}),Zg(o,"pointerleave",r||n?_O(o,!1,r):void 0,{passive:!r})}var Oz=function(e,t){return t?e===t?!0:Oz(e,t.parentElement):!1};function Z_(e){return I.useEffect(function(){return function(){return e()}},[])}function Az(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);oMath.min(Math.max(r,e),t),j2=.001,sbe=.01,EO=10,lbe=.05,cbe=1;function ube({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let o,i;Vme(e<=EO*1e3);let a=1-t;a=Jg(lbe,cbe,a),e=Jg(sbe,EO,e/1e3),a<1?(o=c=>{const u=c*a,f=u*e,d=u-r,p=I3(c,a),h=Math.exp(-f);return j2-d/p*h},i=c=>{const f=c*a*e,d=f*r+r,p=Math.pow(a,2)*Math.pow(c,2)*e,h=Math.exp(-f),y=I3(Math.pow(c,2),a);return(-o(c)+j2>0?-1:1)*((d-p)*h)/y}):(o=c=>{const u=Math.exp(-c*e),f=(c-r)*e+1;return-j2+u*f},i=c=>{const u=Math.exp(-c*e),f=(r-c)*(e*e);return u*f});const s=5/e,l=dbe(o,i,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:a*2*Math.sqrt(n*c),duration:e}}}const fbe=12;function dbe(e,t,r){let n=r;for(let o=1;oe[r]!==void 0)}function vbe(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!SO(e,hbe)&&SO(e,pbe)){const r=ube(e);t=Object.assign(Object.assign(Object.assign({},t),r),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function J_(e){var{from:t=0,to:r=1,restSpeed:n=2,restDelta:o}=e,i=Az(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:c,velocity:u,duration:f,isResolvedFromDuration:d}=vbe(i),p=CO,h=CO;function y(){const _=u?-(u/1e3):0,b=r-t,m=l/(2*Math.sqrt(s*c)),E=Math.sqrt(s/c)/1e3;if(o===void 0&&(o=Math.min(Math.abs(r-t)/100,.4)),m<1){const A=I3(E,m);p=D=>{const $=Math.exp(-m*E*D);return r-$*((_+m*E*b)/A*Math.sin(A*D)+b*Math.cos(A*D))},h=D=>{const $=Math.exp(-m*E*D);return m*E*$*(Math.sin(A*D)*(_+m*E*b)/A+b*Math.cos(A*D))-$*(Math.cos(A*D)*(_+m*E*b)-A*b*Math.sin(A*D))}}else if(m===1)p=A=>r-Math.exp(-E*A)*(b+(_+E*b)*A);else{const A=E*Math.sqrt(m*m-1);p=D=>{const $=Math.exp(-m*E*D),g=Math.min(A*D,300);return r-$*((_+m*E*b)*Math.sinh(g)+A*b*Math.cosh(g))/A}}}return y(),{next:_=>{const b=p(_);if(d)a.done=_>=f;else{const m=h(_)*1e3,E=Math.abs(m)<=n,A=Math.abs(r-b)<=o;a.done=E&&A}return a.value=a.done?r:b,a},flipTarget:()=>{u=-u,[t,r]=[r,t],y()}}}J_.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const CO=e=>0,yp=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},nr=(e,t,r)=>-r*e+r*t+e;function L2(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function PO({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,i=0,a=0;if(!t)o=i=a=r;else{const s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=L2(l,s,e+1/3),i=L2(l,s,e),a=L2(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:n}}const gbe=(e,t,r)=>{const n=e*e,o=t*t;return Math.sqrt(Math.max(0,r*(o-n)+n))},mbe=[O3,ss,El],OO=e=>mbe.find(t=>t.test(e)),kz=(e,t)=>{let r=OO(e),n=OO(t),o=r.parse(e),i=n.parse(t);r===El&&(o=PO(o),r=ss),n===El&&(i=PO(i),n=ss);const a=Object.assign({},o);return s=>{for(const l in a)l!=="alpha"&&(a[l]=gbe(o[l],i[l],s));return a.alpha=nr(o.alpha,i.alpha,s),r.transform(a)}},$3=e=>typeof e=="number",ybe=(e,t)=>r=>t(e(r)),Iy=(...e)=>e.reduce(ybe);function Iz(e,t){return $3(e)?r=>nr(e,t,r):dn.test(e)?kz(e,t):Tz(e,t)}const $z=(e,t)=>{const r=[...e],n=r.length,o=e.map((i,a)=>Iz(i,t[a]));return i=>{for(let a=0;a{const r=Object.assign(Object.assign({},e),t),n={};for(const o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=Iz(e[o],t[o]));return o=>{for(const i in n)r[i]=n[i](o);return r}};function AO(e){const t=_a.parse(e),r=t.length;let n=0,o=0,i=0;for(let a=0;a{const r=_a.createTransformer(t),n=AO(e),o=AO(t);return n.numHSL===o.numHSL&&n.numRGB===o.numRGB&&n.numNumbers>=o.numNumbers?Iy($z(n.parsed,o.parsed),r):a=>`${a>0?t:e}`},wbe=(e,t)=>r=>nr(e,t,r);function xbe(e){if(typeof e=="number")return wbe;if(typeof e=="string")return dn.test(e)?kz:Tz;if(Array.isArray(e))return $z;if(typeof e=="object")return bbe}function _be(e,t,r){const n=[],o=r||xbe(e[0]),i=e.length-1;for(let a=0;ar(yp(e,t,n))}function Sbe(e,t){const r=e.length,n=r-1;return o=>{let i=0,a=!1;if(o<=e[0]?a=!0:o>=e[n]&&(i=n-1,a=!0),!a){let l=1;for(;lo||l===n);l++);i=l-1}const s=yp(e[i],e[i+1],o);return t[i](s)}}function Dz(e,t,{clamp:r=!0,ease:n,mixer:o}={}){const i=e.length;Gg(i===t.length),Gg(!n||!Array.isArray(n)||n.length===i-1),e[0]>e[i-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=_be(t,n,o),s=i===2?Ebe(e,a):Sbe(e,a);return r?l=>s(Jg(e[0],e[i-1],l)):s}const $y=e=>t=>1-e(1-t),Q_=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Cbe=e=>t=>Math.pow(t,e),Mz=e=>t=>t*t*((e+1)*t-e),Pbe=e=>{const t=Mz(e);return r=>(r*=2)<1?.5*t(r):.5*(2-Math.pow(2,-10*(r-1)))},Rz=1.525,Obe=4/11,Abe=8/11,kbe=9/10,e4=e=>e,t4=Cbe(2),Ibe=$y(t4),Nz=Q_(t4),Fz=e=>1-Math.sin(Math.acos(e)),r4=$y(Fz),$be=Q_(r4),n4=Mz(Rz),Tbe=$y(n4),Dbe=Q_(n4),Mbe=Pbe(Rz),Rbe=4356/361,Nbe=35442/1805,Fbe=16061/1805,Qg=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-Qg(1-e*2)):.5*Qg(e*2-1)+.5;function Lbe(e,t){return e.map(()=>t||Nz).splice(0,e.length-1)}function zbe(e){const t=e.length;return e.map((r,n)=>n!==0?n/(t-1):0)}function Ube(e,t){return e.map(r=>r*t)}function b1({from:e=0,to:t=1,ease:r,offset:n,duration:o=300}){const i={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Ube(n&&n.length===a.length?n:zbe(a),o);function l(){return Dz(s,a,{ease:Array.isArray(r)?r:Lbe(a,r)})}let c=l();return{next:u=>(i.value=c(u),i.done=u>=o,i),flipTarget:()=>{a.reverse(),c=l()}}}function Hbe({velocity:e=0,from:t=0,power:r=.8,timeConstant:n=350,restDelta:o=.5,modifyTarget:i}){const a={done:!1,value:t};let s=r*e;const l=t+s,c=i===void 0?l:i(l);return c!==l&&(s=c-t),{next:u=>{const f=-s*Math.exp(-u/n);return a.done=!(f>o||f<-o),a.value=a.done?c:c+f,a},flipTarget:()=>{}}}const kO={keyframes:b1,spring:J_,decay:Hbe};function Vbe(e){if(Array.isArray(e.to))return b1;if(kO[e.type])return kO[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?b1:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?J_:b1}const Bz=1/60*1e3,Wbe=typeof performance<"u"?()=>performance.now():()=>Date.now(),jz=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Wbe()),Bz);function qbe(e){let t=[],r=[],n=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(l,c=!1,u=!1)=>{const f=u&&o,d=f?t:r;return c&&a.add(l),d.indexOf(l)===-1&&(d.push(l),f&&o&&(n=t.length)),l},cancel:l=>{const c=r.indexOf(l);c!==-1&&r.splice(c,1),a.delete(l)},process:l=>{if(o){i=!0;return}if(o=!0,[t,r]=[r,t],r.length=0,n=t.length,n)for(let c=0;c(e[t]=qbe(()=>bp=!0),e),{}),Go=lh.reduce((e,t)=>{const r=Ty[t];return e[t]=(n,o=!1,i=!1)=>(bp||Ybe(),r.schedule(n,o,i)),e},{}),yu=lh.reduce((e,t)=>(e[t]=Ty[t].cancel,e),{}),z2=lh.reduce((e,t)=>(e[t]=()=>Ty[t].process(Qc),e),{}),Kbe=e=>Ty[e].process(Qc),Lz=e=>{bp=!1,Qc.delta=T3?Bz:Math.max(Math.min(e-Qc.timestamp,Gbe),1),Qc.timestamp=e,D3=!0,lh.forEach(Kbe),D3=!1,bp&&(T3=!1,jz(Lz))},Ybe=()=>{bp=!0,T3=!0,D3||jz(Lz)},em=()=>Qc;function zz(e,t,r=0){return e-t-r}function Xbe(e,t,r=0,n=!0){return n?zz(t+-e,t,r):t-(e-t)+r}function Zbe(e,t,r,n){return n?e>=t+r:e<=-r}const Jbe=e=>{const t=({delta:r})=>e(r);return{start:()=>Go.update(t,!0),stop:()=>yu.update(t)}};function Uz(e){var t,r,{from:n,autoplay:o=!0,driver:i=Jbe,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:c=0,onPlay:u,onStop:f,onComplete:d,onRepeat:p,onUpdate:h}=e,y=Az(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:_}=y,b,m=0,E=y.duration,A,D=!1,$=!0,g;const N=Vbe(y);!((r=(t=N).needsInterpolation)===null||r===void 0)&&r.call(t,n,_)&&(g=Dz([0,100],[n,_],{clamp:!1}),n=0,_=100);const V=N(Object.assign(Object.assign({},y),{from:n,to:_}));function K(){m++,l==="reverse"?($=m%2===0,a=Xbe(a,E,c,$)):(a=zz(a,E,c),l==="mirror"&&V.flipTarget()),D=!1,p&&p()}function W(){b.stop(),d&&d()}function P(v){if($||(v=-v),a+=v,!D){const w=V.next(Math.max(0,a));A=w.value,g&&(A=g(A)),D=$?w.done:a<=0}h==null||h(A),D&&(m===0&&(E??(E=a)),m{f==null||f(),b.stop()}}}function Hz(e,t){return t?e*(1e3/t):0}function Qbe({from:e=0,velocity:t=0,min:r,max:n,power:o=.8,timeConstant:i=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:c,driver:u,onUpdate:f,onComplete:d,onStop:p}){let h;function y(E){return r!==void 0&&En}function _(E){return r===void 0?n:n===void 0||Math.abs(r-E){var D;f==null||f(A),(D=E.onUpdate)===null||D===void 0||D.call(E,A)},onComplete:d,onStop:p}))}function m(E){b(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},E))}if(y(e))m({from:e,velocity:t,to:_(e)});else{let E=o*t+e;typeof c<"u"&&(E=c(E));const A=_(E),D=A===r?-1:1;let $,g;const N=V=>{$=g,g=V,t=Hz(V-$,em().delta),(D===1&&V>A||D===-1&&Vh==null?void 0:h.stop()}}const M3=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),IO=e=>M3(e)&&e.hasOwnProperty("z"),k0=(e,t)=>Math.abs(e-t);function Vz(e,t){if($3(e)&&$3(t))return k0(e,t);if(M3(e)&&M3(t)){const r=k0(e.x,t.x),n=k0(e.y,t.y),o=IO(e)&&IO(t)?k0(e.z,t.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(o,2))}}const Wz=(e,t)=>1-3*t+3*e,qz=(e,t)=>3*t-6*e,Gz=e=>3*e,tm=(e,t,r)=>((Wz(t,r)*e+qz(t,r))*e+Gz(t))*e,Kz=(e,t,r)=>3*Wz(t,r)*e*e+2*qz(t,r)*e+Gz(t),e2e=1e-7,t2e=10;function r2e(e,t,r,n,o){let i,a,s=0;do a=t+(r-t)/2,i=tm(a,n,o)-e,i>0?r=a:t=a;while(Math.abs(i)>e2e&&++s=o2e?i2e(a,f,e,r):d===0?f:r2e(a,s,s+I0,e,r)}return a=>a===0||a===1?a:tm(i(a),t,n)}function s2e(e){var t=e.onTap,r=e.onTapStart,n=e.onTapCancel,o=e.whileTap,i=e.visualElement,a=t||r||n||o,s=I.useRef(!1),l=I.useRef(null),c={passive:!(r||t||n||h)};function u(){var y;(y=l.current)===null||y===void 0||y.call(l),l.current=null}function f(){var y;return u(),s.current=!1,(y=i.animationState)===null||y===void 0||y.setActive(jt.Tap,!1),!Pz()}function d(y,_){f()&&(Oz(i.getInstance(),y.target)?t==null||t(y,_):n==null||n(y,_))}function p(y,_){f()&&(n==null||n(y,_))}function h(y,_){var b;u(),!s.current&&(s.current=!0,l.current=Iy(Jc(window,"pointerup",d,c),Jc(window,"pointercancel",p,c)),(b=i.animationState)===null||b===void 0||b.setActive(jt.Tap,!0),r==null||r(y,_))}Zg(i,"pointerdown",a?h:void 0,c),Z_(u)}var $O=new Set;function l2e(e,t,r){e||$O.has(t)||(console.warn(t),r&&console.warn(r),$O.add(t))}var R3=new WeakMap,U2=new WeakMap,c2e=function(e){var t;(t=R3.get(e.target))===null||t===void 0||t(e)},u2e=function(e){e.forEach(c2e)};function f2e(e){var t=e.root,r=Ri(e,["root"]),n=t||document;U2.has(n)||U2.set(n,{});var o=U2.get(n),i=JSON.stringify(r);return o[i]||(o[i]=new IntersectionObserver(u2e,Ve({root:t},r))),o[i]}function d2e(e,t,r){var n=f2e(t);return R3.set(e,r),n.observe(e),function(){R3.delete(e),n.unobserve(e)}}function p2e(e){var t=e.visualElement,r=e.whileInView,n=e.onViewportEnter,o=e.onViewportLeave,i=e.viewport,a=i===void 0?{}:i,s=I.useRef({hasEnteredView:!1,isInView:!1}),l=!!(r||n||o);a.once&&s.current.hasEnteredView&&(l=!1);var c=typeof IntersectionObserver>"u"?g2e:v2e;c(l,s.current,t,a)}var h2e={some:0,all:1};function v2e(e,t,r,n){var o=n.root,i=n.margin,a=n.amount,s=a===void 0?"some":a,l=n.once;I.useEffect(function(){if(e){var c={root:o==null?void 0:o.current,rootMargin:i,threshold:typeof s=="number"?s:h2e[s]},u=function(f){var d,p=f.isIntersecting;if(t.isInView!==p&&(t.isInView=p,!(l&&!p&&t.hasEnteredView))){p&&(t.hasEnteredView=!0),(d=r.animationState)===null||d===void 0||d.setActive(jt.InView,p);var h=r.getProps(),y=p?h.onViewportEnter:h.onViewportLeave;y==null||y(f)}};return d2e(r.getInstance(),c,u)}},[e,o,i,s])}function g2e(e,t,r,n){var o=n.fallback,i=o===void 0?!0:o;I.useEffect(function(){!e||!i||(L_!=="production"&&l2e(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(function(){var a;t.hasEnteredView=!0;var s=r.getProps().onViewportEnter;s==null||s(null),(a=r.animationState)===null||a===void 0||a.setActive(jt.InView,!0)}))},[e])}var ls=function(e){return function(t){return e(t),null}},m2e={inView:ls(p2e),tap:ls(s2e),focus:ls(Xye),hover:ls(abe)},y2e=0,b2e=function(){return y2e++},Yz=function(){return oh(b2e)};function Xz(){var e=I.useContext(nh);if(e===null)return[!0,null];var t=e.isPresent,r=e.onExitComplete,n=e.register,o=Yz();I.useEffect(function(){return n(o)},[]);var i=function(){return r==null?void 0:r(o)};return!t&&r?[!1,i]:[!0]}function Zz(e,t){if(!Array.isArray(t))return!1;var r=t.length;if(r!==e.length)return!1;for(var n=0;n-1&&e.splice(r,1)}var Sd=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(t){var r=this;return l4(this.subscriptions,t),function(){return c4(r.subscriptions,t)}},e.prototype.notify=function(t,r,n){var o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,n);else for(var i=0;im&&W,B=Array.isArray(K)?K:[K],R=B.reduce(i,{});P===!1&&(R={});var L=V.prevResolvedValues,U=L===void 0?{}:L,S=Ve(Ve({},U),R),F=function(te){w=!0,_.delete(te),V.needsAnimating[te]=!0};for(var T in S){var q=R[T],J=U[T];b.hasOwnProperty(T)||(q!==J?mp(q)&&mp(J)?!Zz(q,J)||v?F(T):V.protectedKeys[T]=!0:q!==void 0?F(T):_.add(T):q!==void 0&&_.has(T)?F(T):V.protectedKeys[T]=!0)}V.prevProp=K,V.prevResolvedValues=R,V.isActive&&(b=Ve(Ve({},b),R)),o&&e.blockInitialAnimation&&(w=!1),w&&!C&&y.push.apply(y,qo([],ir(B.map(function(te){return{animation:te,options:Ve({type:N},u)}})),!1))},A=0;A=3;if(!(!p&&!h)){var y=d.point,_=em().timestamp;o.history.push(Ve(Ve({},y),{timestamp:_}));var b=o.handlers,m=b.onStart,E=b.onMove;p||(m&&m(o.lastMoveEvent,d),o.startEvent=o.lastMoveEvent),E&&E(o.lastMoveEvent,d)}}},this.handlePointerMove=function(d,p){if(o.lastMoveEvent=d,o.lastMoveEventInfo=V2(p,o.transformPagePoint),wz(d)&&d.buttons===0){o.handlePointerUp(d,p);return}Go.update(o.updatePoint,!0)},this.handlePointerUp=function(d,p){o.end();var h=o.handlers,y=h.onEnd,_=h.onSessionEnd,b=W2(V2(p,o.transformPagePoint),o.history);o.startEvent&&y&&y(d,b),_&&_(d,b)},!(xz(t)&&t.touches.length>1)){this.handlers=r,this.transformPagePoint=a;var s=X_(t),l=V2(s,this.transformPagePoint),c=l.point,u=em().timestamp;this.history=[Ve(Ve({},c),{timestamp:u})];var f=r.onSessionStart;f&&f(t,W2(l,this.history)),this.removeListeners=Iy(Jc(window,"pointermove",this.handlePointerMove),Jc(window,"pointerup",this.handlePointerUp),Jc(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(t){this.handlers=t},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),yu.update(this.updatePoint)},e}();function V2(e,t){return t?{point:t(e.point)}:e}function FO(e,t){return{x:e.x-t.x,y:e.y-t.y}}function W2(e,t){var r=e.point;return{point:r,delta:FO(r,rU(t)),offset:FO(r,ewe(t)),velocity:twe(t,.1)}}function ewe(e){return e[0]}function rU(e){return e[e.length-1]}function twe(e,t){if(e.length<2)return{x:0,y:0};for(var r=e.length-1,n=null,o=rU(e);r>=0&&(n=e[r],!(o.timestamp-n.timestamp>rm(t)));)r--;if(!n)return{x:0,y:0};var i=(o.timestamp-n.timestamp)/1e3;if(i===0)return{x:0,y:0};var a={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Ea(e){return e.max-e.min}function BO(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=.01),Vz(e,t)o&&(e=r?nr(o,e,r.max):Math.min(e,o)),e}function UO(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function owe(e,t){var r=t.top,n=t.left,o=t.bottom,i=t.right;return{x:UO(e.x,n,i),y:UO(e.y,r,o)}}function HO(e,t){var r,n=t.min-e.min,o=t.max-e.max;return t.max-t.minn?r=yp(t.min,t.max-n,e.min):n>o&&(r=yp(e.min,e.max-o,t.min)),Jg(0,1,r)}function swe(e,t){var r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var F3=.35;function lwe(e){return e===void 0&&(e=F3),e===!1?e=0:e===!0&&(e=F3),{x:VO(e,"left","right"),y:VO(e,"top","bottom")}}function VO(e,t,r){return{min:WO(e,t),max:WO(e,r)}}function WO(e,t){var r;return typeof e=="number"?e:(r=e[t])!==null&&r!==void 0?r:0}var qO=function(){return{translate:0,scale:1,origin:0,originPoint:0}},Od=function(){return{x:qO(),y:qO()}},GO=function(){return{min:0,max:0}},Jr=function(){return{x:GO(),y:GO()}};function hi(e){return[e("x"),e("y")]}function nU(e){var t=e.top,r=e.left,n=e.right,o=e.bottom;return{x:{min:r,max:n},y:{min:t,max:o}}}function cwe(e){var t=e.x,r=e.y;return{top:r.min,right:t.max,bottom:r.max,left:t.min}}function uwe(e,t){if(!t)return e;var r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function q2(e){return e===void 0||e===1}function oU(e){var t=e.scale,r=e.scaleX,n=e.scaleY;return!q2(t)||!q2(r)||!q2(n)}function Ga(e){return oU(e)||KO(e.x)||KO(e.y)||e.z||e.rotate||e.rotateX||e.rotateY}function KO(e){return e&&e!=="0%"}function nm(e,t,r){var n=e-r,o=t*n;return r+o}function YO(e,t,r,n,o){return o!==void 0&&(e=nm(e,o,n)),nm(e,r,n)+t}function B3(e,t,r,n,o){t===void 0&&(t=0),r===void 0&&(r=1),e.min=YO(e.min,t,r,n,o),e.max=YO(e.max,t,r,n,o)}function iU(e,t){var r=t.x,n=t.y;B3(e.x,r.translate,r.scale,r.originPoint),B3(e.y,n.translate,n.scale,n.originPoint)}function fwe(e,t,r,n){var o,i;n===void 0&&(n=!1);var a=r.length;if(a){t.x=t.y=1;for(var s,l,c=0;ct?r="y":Math.abs(e.x)>t&&(r="x"),r}function ywe(e){var t=e.dragControls,r=e.visualElement,n=oh(function(){return new gwe(r)});I.useEffect(function(){return t&&t.subscribe(n)},[n,t]),I.useEffect(function(){return n.addListeners()},[n])}function bwe(e){var t=e.onPan,r=e.onPanStart,n=e.onPanEnd,o=e.onPanSessionStart,i=e.visualElement,a=t||r||n||o,s=I.useRef(null),l=I.useContext(z_).transformPagePoint,c={onSessionStart:o,onStart:r,onMove:t,onEnd:function(f,d){s.current=null,n&&n(f,d)}};I.useEffect(function(){s.current!==null&&s.current.updateHandlers(c)});function u(f){s.current=new tU(f,c,{transformPagePoint:l})}Zg(i,"pointerdown",a&&u),Z_(function(){return s.current&&s.current.end()})}var wwe={pan:ls(bwe),drag:ls(ywe)},D0=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function xwe(){var e=D0.map(function(){return new Sd}),t={},r={clearAllListeners:function(){return e.forEach(function(n){return n.clear()})},updatePropListeners:function(n){D0.forEach(function(o){var i,a="on"+o,s=n[a];(i=t[o])===null||i===void 0||i.call(t),s&&(t[o]=r[a](s))})}};return e.forEach(function(n,o){r["on"+D0[o]]=function(i){return n.add(i)},r["notify"+D0[o]]=function(){for(var i=[],a=0;a=0?window.pageYOffset:null,c=$we(t,e,s);return i.length&&i.forEach(function(u){var f=ir(u,2),d=f[0],p=f[1];e.getValue(d).set(p)}),e.syncRender(),l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:n}}else return{target:t,transitionEnd:n}};function Dwe(e,t,r,n){return Owe(t)?Twe(e,t,r,n):{target:t,transitionEnd:n}}var Mwe=function(e,t,r,n){var o=Cwe(e,t,n);return t=o.target,n=o.transitionEnd,Dwe(e,t,r,n)};function Rwe(e){return window.getComputedStyle(e)}var dU={treeType:"dom",readValueFromInstance:function(e,t){if(ih(t)){var r=o4(t);return r&&r.default||0}else{var n=Rwe(e);return(tz(t)?n.getPropertyValue(t):n[t])||0}},sortNodePosition:function(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget:function(e,t){var r;return(r=e.style)===null||r===void 0?void 0:r[t]},measureViewportBox:function(e,t){var r=t.transformPagePoint;return aU(e,r)},resetTransform:function(e,t,r){var n=r.transformTemplate;t.style.transform=n?n({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var r=t.vars,n=t.style;delete r[e],delete n[e]},makeTargetAnimatable:function(e,t,r,n){var o=r.transformValues;n===void 0&&(n=!0);var i=t.transition,a=t.transitionEnd,s=Ri(t,["transition","transitionEnd"]),l=U2e(s,i||{},e);if(o&&(a&&(a=o(a)),s&&(s=o(s)),l&&(l=o(l))),n){L2e(e,s,l);var c=Mwe(e,s,l,a);a=c.transitionEnd,s=c.target}return Ve({transition:i,transitionEnd:a},s)},scrapeMotionValuesFromProps:K_,build:function(e,t,r,n,o){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),W_(t,r,n,o.transformTemplate)},render:hz},Nwe=sU(dU),Fwe=sU(Ve(Ve({},dU),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var r;return ih(t)?((r=o4(t))===null||r===void 0?void 0:r.default)||0:(t=vz.has(t)?t:pz(t),e.getAttribute(t))},scrapeMotionValuesFromProps:mz,build:function(e,t,r,n,o){G_(t,r,n,o.transformTemplate)},render:gz})),Bwe=function(e,t){return H_(e)?Fwe(t,{enableHardwareAcceleration:!1}):Nwe(t,{enableHardwareAcceleration:!0})};function rA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Ff={correct:function(e,t){if(!t.target)return e;if(typeof e=="string")if(dt.test(e))e=parseFloat(e);else return e;var r=rA(e,t.target.x),n=rA(e,t.target.y);return"".concat(r,"% ").concat(n,"%")}},nA="_$css",jwe={correct:function(e,t){var r=t.treeScale,n=t.projectionDelta,o=e,i=e.includes("var("),a=[];i&&(e=e.replace(cU,function(y){return a.push(y),nA}));var s=_a.parse(e);if(s.length>5)return o;var l=_a.createTransformer(e),c=typeof s[0]!="number"?1:0,u=n.x.scale*r.x,f=n.y.scale*r.y;s[0+c]/=u,s[1+c]/=f;var d=nr(u,f,.5);typeof s[2+c]=="number"&&(s[2+c]/=d),typeof s[3+c]=="number"&&(s[3+c]/=d);var p=l(s);if(i){var h=0;p=p.replace(nA,function(){var y=a[h];return h++,y})}return p}},Lwe=function(e){WL(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.componentDidMount=function(){var r=this,n=this.props,o=n.visualElement,i=n.layoutGroup,a=n.switchLayoutGroup,s=n.layoutId,l=o.projection;fye(Uwe),l&&(i!=null&&i.group&&i.group.add(l),a!=null&&a.register&&s&&a.register(l),l.root.didUpdate(),l.addEventListener("animationComplete",function(){r.safeToRemove()}),l.setOptions(Ve(Ve({},l.options),{onExitComplete:function(){return r.safeToRemove()}}))),xd.hasEverUpdated=!0},t.prototype.getSnapshotBeforeUpdate=function(r){var n=this,o=this.props,i=o.layoutDependency,a=o.visualElement,s=o.drag,l=o.isPresent,c=a.projection;return c&&(c.isPresent=l,s||r.layoutDependency!==i||i===void 0?c.willUpdate():this.safeToRemove(),r.isPresent!==l&&(l?c.promote():c.relegate()||Go.postRender(function(){var u;!((u=c.getStack())===null||u===void 0)&&u.members.length||n.safeToRemove()}))),null},t.prototype.componentDidUpdate=function(){var r=this.props.visualElement.projection;r&&(r.root.didUpdate(),!r.currentAnimation&&r.isLead()&&this.safeToRemove())},t.prototype.componentWillUnmount=function(){var r=this.props,n=r.visualElement,o=r.layoutGroup,i=r.switchLayoutGroup,a=n.projection;a&&(a.scheduleCheckAfterUnmount(),o!=null&&o.group&&o.group.remove(a),i!=null&&i.deregister&&i.deregister(a))},t.prototype.safeToRemove=function(){var r=this.props.safeToRemove;r==null||r()},t.prototype.render=function(){return null},t}(ae.Component);function zwe(e){var t=ir(Xz(),2),r=t[0],n=t[1],o=I.useContext(U_);return ae.createElement(Lwe,Ve({},e,{layoutGroup:o,switchLayoutGroup:I.useContext(JL),isPresent:r,safeToRemove:n}))}var Uwe={borderRadius:Ve(Ve({},Ff),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Ff,borderTopRightRadius:Ff,borderBottomLeftRadius:Ff,borderBottomRightRadius:Ff,boxShadow:jwe},Hwe={measureLayout:zwe};function Vwe(e,t,r){r===void 0&&(r={});var n=xa(e)?e:bu(e);return s4("",n,t,r),{stop:function(){return n.stop()},isAnimating:function(){return n.isAnimating()}}}var pU=["TopLeft","TopRight","BottomLeft","BottomRight"],Wwe=pU.length,oA=function(e){return typeof e=="string"?parseFloat(e):e},iA=function(e){return typeof e=="number"||dt.test(e)};function qwe(e,t,r,n,o,i){var a,s,l,c;o?(e.opacity=nr(0,(a=r.opacity)!==null&&a!==void 0?a:1,Gwe(n)),e.opacityExit=nr((s=t.opacity)!==null&&s!==void 0?s:1,0,Kwe(n))):i&&(e.opacity=nr((l=t.opacity)!==null&&l!==void 0?l:1,(c=r.opacity)!==null&&c!==void 0?c:1,n));for(var u=0;ut?1:r(yp(e,t,n))}}function sA(e,t){e.min=t.min,e.max=t.max}function ko(e,t){sA(e.x,t.x),sA(e.y,t.y)}function lA(e,t,r,n,o){return e-=t,e=nm(e,1/r,n),o!==void 0&&(e=nm(e,1/o,n)),e}function Ywe(e,t,r,n,o,i,a){if(t===void 0&&(t=0),r===void 0&&(r=1),n===void 0&&(n=.5),i===void 0&&(i=e),a===void 0&&(a=e),Pi.test(t)){t=parseFloat(t);var s=nr(a.min,a.max,t/100);t=s-a.min}if(typeof t=="number"){var l=nr(i.min,i.max,n);e===i&&(l-=t),e.min=lA(e.min,t,r,l,o),e.max=lA(e.max,t,r,l,o)}}function cA(e,t,r,n,o){var i=ir(r,3),a=i[0],s=i[1],l=i[2];Ywe(e,t[a],t[s],t[l],t.scale,n,o)}var Xwe=["x","scaleX","originX"],Zwe=["y","scaleY","originY"];function uA(e,t,r,n){cA(e.x,t,Xwe,r==null?void 0:r.x,n==null?void 0:n.x),cA(e.y,t,Zwe,r==null?void 0:r.y,n==null?void 0:n.y)}function fA(e){return e.translate===0&&e.scale===1}function vU(e){return fA(e.x)&&fA(e.y)}function gU(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}var Jwe=function(){function e(){this.members=[]}return e.prototype.add=function(t){l4(this.members,t),t.scheduleRender()},e.prototype.remove=function(t){if(c4(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){var r=this.members[this.members.length-1];r&&this.promote(r)}},e.prototype.relegate=function(t){var r=this.members.findIndex(function(a){return t===a});if(r===0)return!1;for(var n,o=r;o>=0;o--){var i=this.members[o];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1},e.prototype.promote=function(t,r){var n,o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,r&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues,t.snapshot.isShared=!0),!((n=t.root)===null||n===void 0)&&n.isUpdating&&(t.isLayoutDirty=!0);var i=t.options.crossfade;i===!1&&o.hide()}},e.prototype.exitAnimationComplete=function(){this.members.forEach(function(t){var r,n,o,i,a;(n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r),(a=(o=t.resumingFrom)===null||o===void 0?void 0:(i=o.options).onExitComplete)===null||a===void 0||a.call(i)})},e.prototype.scheduleRender=function(){this.members.forEach(function(t){t.instance&&t.scheduleRender(!1)})},e.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},e}(),Qwe="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function dA(e,t,r){var n=e.x.translate/t.x,o=e.y.translate/t.y,i="translate3d(".concat(n,"px, ").concat(o,"px, 0) ");if(i+="scale(".concat(1/t.x,", ").concat(1/t.y,") "),r){var a=r.rotate,s=r.rotateX,l=r.rotateY;a&&(i+="rotate(".concat(a,"deg) ")),s&&(i+="rotateX(".concat(s,"deg) ")),l&&(i+="rotateY(".concat(l,"deg) "))}var c=e.x.scale*t.x,u=e.y.scale*t.y;return i+="scale(".concat(c,", ").concat(u,")"),i===Qwe?"none":i}var e5e=function(e,t){return e.depth-t.depth},t5e=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(t){l4(this.children,t),this.isDirty=!0},e.prototype.remove=function(t){c4(this.children,t),this.isDirty=!0},e.prototype.forEach=function(t){this.isDirty&&this.children.sort(e5e),this.isDirty=!1,this.children.forEach(t)},e}(),pA=1e3;function mU(e){var t=e.attachResizeListener,r=e.defaultParent,n=e.measureScroll,o=e.checkIsScrollRoot,i=e.resetTransform;return function(){function a(s,l,c){var u=this;l===void 0&&(l={}),c===void 0&&(c=r==null?void 0:r()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){u.isUpdating&&(u.isUpdating=!1,u.clearAllSnapshots())},this.updateProjection=function(){u.nodes.forEach(s5e),u.nodes.forEach(l5e)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=s,this.latestValues=l,this.root=c?c.root||c:this,this.path=c?qo(qo([],ir(c.path),!1),[c],!1):[],this.parent=c,this.depth=c?c.depth+1:0,s&&this.root.registerPotentialNode(s,this);for(var f=0;f=0;n--)if(e.path[n].instance){r=e.path[n];break}var o=r&&r!==e.root?r.instance:document,i=o.querySelector('[data-projection-id="'.concat(t,'"]'));i&&e.mount(i,!0)}function mA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function yA(e){mA(e.x),mA(e.y)}var v5e=mU({attachResizeListener:function(e,t){return ky(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),G2={current:void 0},g5e=mU({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!G2.current){var e=new v5e(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),G2.current=e}return G2.current},resetTransform:function(e,t){e.style.transform=t??"none"},checkIsScrollRoot:function(e){return window.getComputedStyle(e).position==="fixed"}}),m5e=Ve(Ve(Ve(Ve({},Q2e),m2e),wwe),Hwe),ut=cye(function(e,t){return Yye(e,t,m5e,Bwe,g5e)});function yU(){var e=I.useRef(!1);return Kg(function(){return e.current=!0,function(){e.current=!1}},[]),e}function y5e(){var e=yU(),t=ir(I.useState(0),2),r=t[0],n=t[1],o=I.useCallback(function(){e.current&&n(r+1)},[r]),i=I.useCallback(function(){return Go.postRender(o)},[o]);return[i,r]}var K2=function(e){var t=e.children,r=e.initial,n=e.isPresent,o=e.onExitComplete,i=e.custom,a=e.presenceAffectsLayout,s=oh(b5e),l=Yz(),c=I.useMemo(function(){return{id:l,initial:r,isPresent:n,custom:i,onExitComplete:function(u){var f,d;s.set(u,!0);try{for(var p=zme(s.values()),h=p.next();!h.done;h=p.next()){var y=h.value;if(!y)return}}catch(_){f={error:_}}finally{try{h&&!h.done&&(d=p.return)&&d.call(p)}finally{if(f)throw f.error}}o==null||o()},register:function(u){return s.set(u,!1),function(){return s.delete(u)}}}},a?void 0:[n]);return I.useMemo(function(){s.forEach(function(u,f){return s.set(f,!1)})},[n]),I.useEffect(function(){!n&&!s.size&&(o==null||o())},[n]),I.createElement(nh.Provider,{value:c},t)};function b5e(){return new Map}var bc=function(e){return e.key||""};function w5e(e,t){e.forEach(function(r){var n=bc(r);t.set(n,r)})}function x5e(e){var t=[];return I.Children.forEach(e,function(r){I.isValidElement(r)&&t.push(r)}),t}var Ko=function(e){var t=e.children,r=e.custom,n=e.initial,o=n===void 0?!0:n,i=e.onExitComplete,a=e.exitBeforeEnter,s=e.presenceAffectsLayout,l=s===void 0?!0:s,c=ir(y5e(),1),u=c[0],f=I.useContext(U_).forceRender;f&&(u=f);var d=yU(),p=x5e(t),h=p,y=new Set,_=I.useRef(h),b=I.useRef(new Map).current,m=I.useRef(!0);if(Kg(function(){m.current=!1,w5e(p,b),_.current=h}),Z_(function(){m.current=!0,b.clear(),y.clear()}),m.current)return I.createElement(I.Fragment,null,h.map(function(N){return I.createElement(K2,{key:bc(N),isPresent:!0,initial:o?void 0:!1,presenceAffectsLayout:l},N)}));h=qo([],ir(h),!1);for(var E=_.current.map(bc),A=p.map(bc),D=E.length,$=0;$1&&console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour."),I.createElement(I.Fragment,null,y.size?h:h.map(function(N){return I.cloneElement(N)}))},bA=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new P5e:typeof navigator<"u"?_A(navigator.userAgent):T5e()}function I5e(e){return e!==""&&k5e.reduce(function(t,r){var n=r[0],o=r[1];if(t)return t;var i=o.exec(e);return!!i&&[n,i]},!1)}function _A(e){var t=I5e(e);if(!t)return null;var r=t[0],n=t[1];if(r==="searchbot")return new C5e;var o=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);o?o.lengthG)&&(Q=(Ee=Ee.replace(" ",":")).length),0te&&(te=(q=q.trim()).charCodeAt(0)),te){case 38:return q.replace(b,"$1"+T.trim());case 58:return T.trim()+q.replace(b,"$1"+T.trim());default:if(0<1*J&&0oe.charCodeAt(8))break;case 115:ie=ie.replace(oe,"-webkit-"+oe)+";"+ie;break;case 207:case 102:ie=ie.replace(oe,"-webkit-"+(102J.charCodeAt(0)&&(J=J.trim()),F=J,J=[F],01?t-1:0),n=1;n0?" Args: "+r.join(", "):""))}var B5e=function(){function e(r){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=r}var t=e.prototype;return t.indexOfGroup=function(r){for(var n=0,o=0;o=this.groupSizes.length){for(var o=this.groupSizes,i=o.length,a=i;r>=a;)(a<<=1)<0&&Fl(16,""+r);this.groupSizes=new Uint32Array(a),this.groupSizes.set(o),this.length=a;for(var s=i;s=this.length||this.groupSizes[r]===0)return n;for(var o=this.groupSizes[r],i=this.indexOfGroup(r),a=i+o,s=i;s=Ad&&(Ad=t+1),x1.set(e,t),im.set(t,e)},z5e="style["+xu+'][data-styled-version="5.3.11"]',U5e=new RegExp("^"+xu+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),H5e=function(e,t,r){for(var n,o=r.split(","),i=0,a=o.length;i=0;c--){var u=l[c];if(u&&u.nodeType===1&&u.hasAttribute(xu))return u}}(r),i=o!==void 0?o.nextSibling:null;n.setAttribute(xu,"active"),n.setAttribute("data-styled-version","5.3.11");var a=W5e();return a&&n.setAttribute("nonce",a),r.insertBefore(n,i),n},q5e=function(){function e(r){var n=this.element=bU(r);n.appendChild(document.createTextNode("")),this.sheet=function(o){if(o.sheet)return o.sheet;for(var i=document.styleSheets,a=0,s=i.length;a=0){var o=document.createTextNode(n),i=this.nodes[r];return this.element.insertBefore(o,i||null),this.length++,!0}return!1},t.deleteRule=function(r){this.element.removeChild(this.nodes[r]),this.length--},t.getRule=function(r){return r0&&(f+=d+",")}),i+=""+c+u+'{content:"'+f+`"}/*!sc*/ -`}}}return i}(this)},e}(),X5e=/(a)(d)/gi,OA=function(e){return String.fromCharCode(e+(e>25?39:97))};function U3(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=OA(t%52)+r;return(OA(t%52)+r).replace(X5e,"$1-$2")}var Bc=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},xU=function(e){return Bc(5381,e)};function Z5e(e){for(var t=0;t>>0);if(!r.hasNameForId(o,s)){var l=n(a,"."+s,void 0,o);r.insertRules(o,s,l)}i.push(s),this.staticRulesId=s}else{for(var c=this.rules.length,u=Bc(this.baseHash,n.hash),f="",d=0;d>>0);if(!r.hasNameForId(o,_)){var b=n(f,"."+_,void 0,o);r.insertRules(o,_,b)}i.push(_)}}return i.join(" ")},e}(),e3e=/^\s*\/\/.*$/gm,t3e=[":","[",".","#"];function r3e(e){var t,r,n,o,i=e===void 0?Cs:e,a=i.options,s=a===void 0?Cs:a,l=i.plugins,c=l===void 0?om:l,u=new M5e(s),f=[],d=function(y){function _(b){if(b)try{y(b+"}")}catch{}}return function(b,m,E,A,D,$,g,N,V,K){switch(b){case 1:if(V===0&&m.charCodeAt(0)===64)return y(m+";"),"";break;case 2:if(N===0)return m+"/*|*/";break;case 3:switch(N){case 102:case 112:return y(E[0]+m),"";default:return m+(K===0?"/*|*/":"")}case-2:m.split("/*|*/}").forEach(_)}}}(function(y){f.push(y)}),p=function(y,_,b){return _===0&&t3e.indexOf(b[r.length])!==-1||b.match(o)?y:"."+t};function h(y,_,b,m){m===void 0&&(m="&");var E=y.replace(e3e,""),A=_&&b?b+" "+_+" { "+E+" }":E;return t=m,r=_,n=new RegExp("\\"+r+"\\b","g"),o=new RegExp("(\\"+r+"\\b){2,}"),u(b||!_?"":_,A)}return u.use([].concat(c,[function(y,_,b){y===2&&b.length&&b[0].lastIndexOf(r)>0&&(b[0]=b[0].replace(n,p))},d,function(y){if(y===-2){var _=f;return f=[],_}}])),h.hash=c.length?c.reduce(function(y,_){return _.name||Fl(15),Bc(y,_.name)},5381).toString():"",h}var _U=ae.createContext();_U.Consumer;var EU=ae.createContext(),n3e=(EU.Consumer,new wU),H3=r3e();function o3e(){return I.useContext(_U)||n3e}function i3e(){return I.useContext(EU)||H3}var SU=function(){function e(t,r){var n=this;this.inject=function(o,i){i===void 0&&(i=H3);var a=n.name+i.hash;o.hasNameForId(n.id,a)||o.insertRules(n.id,a,i(n.rules,a,"@keyframes"))},this.toString=function(){return Fl(12,String(n.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=r}return e.prototype.getName=function(t){return t===void 0&&(t=H3),this.name+t.hash},e}(),a3e=/([A-Z])/,s3e=/([A-Z])/g,l3e=/^ms-/,c3e=function(e){return"-"+e.toLowerCase()};function AA(e){return a3e.test(e)?e.replace(s3e,c3e).replace(l3e,"-ms-"):e}var kA=function(e){return e==null||e===!1||e===""};function _u(e,t,r,n){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a1?t-1:0),n=1;n?@[\\\]^`{|}~-]+/g,d3e=/(^-|-$)/g;function Y2(e){return e.replace(f3e,"-").replace(d3e,"")}var CU=function(e){return U3(xU(e)>>>0)};function R0(e){return typeof e=="string"&&!0}var V3=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},p3e=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function h3e(e,t,r){var n=e[r];V3(t)&&V3(n)?PU(n,t):e[r]=t}function PU(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0||(K[N]=$[N]);return K}(t,["componentId"]),D=E&&E+"-"+(R0(m)?m:Y2(CA(m)));return OU(m,xi({},A,{attrs:d,componentId:D}),r)},Object.defineProperty(h,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(m){this._foldedDefaultProps=n?PU({},e.defaultProps,m):m}}),Object.defineProperty(h,"toString",{value:function(){return"."+h.styledComponentId}}),o&&o3(h,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),h}var W3=function(e){return function t(r,n,o){if(o===void 0&&(o=Cs),!t_.isValidElementType(n))return Fl(1,String(n));var i=function(){return r(n,o,ur.apply(void 0,arguments))};return i.withConfig=function(a){return t(r,n,xi({},o,{},a))},i.attrs=function(a){return t(r,n,xi({},o,{attrs:Array.prototype.concat(o.attrs,a).filter(Boolean)}))},i}(OU,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){W3[e]=W3(e)});function Jn(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0&&(m.current=setTimeout(D,E));break;case tw:A>=0&&(m.current=setTimeout(D,A));break;case J2:case ew:m.current=setTimeout(function(){return K(W+1)},0);break}},V=b.current<=N0;typeof g!="boolean"&&(g=!V),g?V||N(o?s?J2:Q2:N0):V&&N(a?l?ew:tw:rw(d))},[D,p,o,a,s,l,E,A,d]);return I.useEffect(function(){return function(){return clearTimeout(m.current)}},[]),[AU[y],$,D]},IU=function(){if(typeof Map<"u")return Map;function e(t,r){var n=-1;return t.some(function(o,i){return o[0]===r?(n=i,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(r,n){var o=e(this.__entries__,r);~o?this.__entries__[o][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,o=e(n,r);~o&&n.splice(o,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var o=0,i=this.__entries__;o0},e.prototype.connect_=function(){!q3||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),E3e?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!q3||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,o=_3e.some(function(i){return!!~n.indexOf(i)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),$U=function(e,t){for(var r=0,n=Object.keys(t);r"u"||!(Element instanceof Object))){if(!(t instanceof Eu(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new T3e(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Eu(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)&&(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new D3e(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),DU=typeof WeakMap<"u"?new WeakMap:new IU,MU=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=S3e.getInstance(),n=new M3e(t,r,this);DU.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){MU.prototype[e]=function(){var t;return(t=DU.get(this))[e].apply(t,arguments)}});var R3e=function(){return typeof sm.ResizeObserver<"u"?sm.ResizeObserver:MU}();function G3(e,t,r){var n,o,i,a,s;t==null&&(t=100);function l(){var u=Date.now()-a;u=0?n=setTimeout(l,t-u):(n=null,r||(s=e.apply(i,o),i=o=null))}var c=function(){i=this,o=arguments,a=Date.now();var u=r&&!n;return n||(n=setTimeout(l,t)),u&&(s=e.apply(i,o),i=o=null),s};return c.clear=function(){n&&(clearTimeout(n),n=null)},c.flush=function(){n&&(s=e.apply(i,o),i=o=null,clearTimeout(n),n=null)},c}G3.debounce=G3;var N3e=G3;const DA=ri(N3e);function RU(e){let{debounce:t,scroll:r,polyfill:n,offsetSize:o}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const i=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,s]=I.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=I.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),c=t?typeof t=="number"?t:t.scroll:null,u=t?typeof t=="number"?t:t.resize:null,f=I.useRef(!1);I.useEffect(()=>(f.current=!0,()=>void(f.current=!1)));const[d,p,h]=I.useMemo(()=>{const m=()=>{if(!l.current.element)return;const{left:E,top:A,width:D,height:$,bottom:g,right:N,x:V,y:K}=l.current.element.getBoundingClientRect(),W={left:E,top:A,width:D,height:$,bottom:g,right:N,x:V,y:K};l.current.element instanceof HTMLElement&&o&&(W.height=l.current.element.offsetHeight,W.width=l.current.element.offsetWidth),Object.freeze(W),f.current&&!L3e(l.current.lastBounds,W)&&s(l.current.lastBounds=W)};return[m,u?DA(m,u):m,c?DA(m,c):m]},[s,o,c,u]);function y(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(m=>m.removeEventListener("scroll",h,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function _(){l.current.element&&(l.current.resizeObserver=new i(h),l.current.resizeObserver.observe(l.current.element),r&&l.current.scrollContainers&&l.current.scrollContainers.forEach(m=>m.addEventListener("scroll",h,{capture:!0,passive:!0})))}const b=m=>{!m||m===l.current.element||(y(),l.current.element=m,l.current.scrollContainers=NU(m),_())};return B3e(h,!!r),F3e(p),I.useEffect(()=>{y(),_()},[r,h,p]),I.useEffect(()=>y,[]),[b,a,d]}function F3e(e){I.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function B3e(e,t){I.useEffect(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function NU(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:o}=window.getComputedStyle(e);return[r,n,o].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,...NU(e.parentElement)]}const j3e=["x","y","top","bottom","left","right","width","height"],L3e=(e,t)=>j3e.every(r=>e[r]===t[r]);var Mo={},nw={},ow={},Bf={},iw={},aw={},My={},Gu={},ch={};ch.byteLength=H3e;ch.toByteArray=W3e;ch.fromByteArray=K3e;var bi=[],co=[],z3e=typeof Uint8Array<"u"?Uint8Array:Array,sw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var fc=0,U3e=sw.length;fc0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function H3e(e){var t=FU(e),r=t[0],n=t[1];return(r+n)*3/4-n}function V3e(e,t,r){return(t+r)*3/4-r}function W3e(e){var t,r=FU(e),n=r[0],o=r[1],i=new z3e(V3e(e,n,o)),a=0,s=o>0?n-4:n,l;for(l=0;l>16&255,i[a++]=t>>8&255,i[a++]=t&255;return o===2&&(t=co[e.charCodeAt(l)]<<2|co[e.charCodeAt(l+1)]>>4,i[a++]=t&255),o===1&&(t=co[e.charCodeAt(l)]<<10|co[e.charCodeAt(l+1)]<<4|co[e.charCodeAt(l+2)]>>2,i[a++]=t>>8&255,i[a++]=t&255),i}function q3e(e){return bi[e>>18&63]+bi[e>>12&63]+bi[e>>6&63]+bi[e&63]}function G3e(e,t,r){for(var n,o=[],i=t;is?s:a+i));return n===1?(t=e[r-1],o.push(bi[t>>2]+bi[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],o.push(bi[t>>10]+bi[t>>4&63]+bi[t<<2&63]+"=")),o.join("")}var Ry={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */Ry.read=function(e,t,r,n,o){var i,a,s=o*8-n-1,l=(1<>1,u=-7,f=r?o-1:0,d=r?-1:1,p=e[t+f];for(f+=d,i=p&(1<<-u)-1,p>>=-u,u+=s;u>0;i=i*256+e[t+f],f+=d,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=n;u>0;a=a*256+e[t+f],f+=d,u-=8);if(i===0)i=1-c;else{if(i===l)return a?NaN:(p?-1:1)*(1/0);a=a+Math.pow(2,n),i=i-c}return(p?-1:1)*a*Math.pow(2,i-n)};Ry.write=function(e,t,r,n,o,i){var a,s,l,c=i*8-o-1,u=(1<>1,d=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,h=n?1:-1,y=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+f>=1?t+=d/l:t+=d*Math.pow(2,1-f),t*l>=2&&(a++,l/=2),a+f>=u?(s=0,a=u):a+f>=1?(s=(t*l-1)*Math.pow(2,o),a=a+f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+p]=s&255,p+=h,s/=256,o-=8);for(a=a<0;e[r+p]=a&255,p+=h,a/=256,c-=8);e[r+p-h]|=y*128};/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */(function(e){const t=ch,r=Ry,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const H=new Uint8Array(1),x={foo:function(){return 42}};return Object.setPrototypeOf(x,Uint8Array.prototype),Object.setPrototypeOf(H,x),H.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(H){if(H>o)throw new RangeError('The value "'+H+'" is invalid for option "size"');const x=new Uint8Array(H);return Object.setPrototypeOf(x,s.prototype),x}function s(H,x,k){if(typeof H=="number"){if(typeof x=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(H)}return l(H,x,k)}s.poolSize=8192;function l(H,x,k){if(typeof H=="string")return d(H,x);if(ArrayBuffer.isView(H))return h(H);if(H==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H);if(we(H,ArrayBuffer)||H&&we(H.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(we(H,SharedArrayBuffer)||H&&we(H.buffer,SharedArrayBuffer)))return y(H,x,k);if(typeof H=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Y=H.valueOf&&H.valueOf();if(Y!=null&&Y!==H)return s.from(Y,x,k);const re=_(H);if(re)return re;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof H[Symbol.toPrimitive]=="function")return s.from(H[Symbol.toPrimitive]("string"),x,k);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H)}s.from=function(H,x,k){return l(H,x,k)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(H){if(typeof H!="number")throw new TypeError('"size" argument must be of type number');if(H<0)throw new RangeError('The value "'+H+'" is invalid for option "size"')}function u(H,x,k){return c(H),H<=0?a(H):x!==void 0?typeof k=="string"?a(H).fill(x,k):a(H).fill(x):a(H)}s.alloc=function(H,x,k){return u(H,x,k)};function f(H){return c(H),a(H<0?0:b(H)|0)}s.allocUnsafe=function(H){return f(H)},s.allocUnsafeSlow=function(H){return f(H)};function d(H,x){if((typeof x!="string"||x==="")&&(x="utf8"),!s.isEncoding(x))throw new TypeError("Unknown encoding: "+x);const k=E(H,x)|0;let Y=a(k);const re=Y.write(H,x);return re!==k&&(Y=Y.slice(0,re)),Y}function p(H){const x=H.length<0?0:b(H.length)|0,k=a(x);for(let Y=0;Y=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return H|0}function m(H){return+H!=H&&(H=0),s.alloc(+H)}s.isBuffer=function(x){return x!=null&&x._isBuffer===!0&&x!==s.prototype},s.compare=function(x,k){if(we(x,Uint8Array)&&(x=s.from(x,x.offset,x.byteLength)),we(k,Uint8Array)&&(k=s.from(k,k.offset,k.byteLength)),!s.isBuffer(x)||!s.isBuffer(k))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(x===k)return 0;let Y=x.length,re=k.length;for(let fe=0,le=Math.min(Y,re);fere.length?(s.isBuffer(le)||(le=s.from(le)),le.copy(re,fe)):Uint8Array.prototype.set.call(re,le,fe);else if(s.isBuffer(le))le.copy(re,fe);else throw new TypeError('"list" argument must be an Array of Buffers');fe+=le.length}return re};function E(H,x){if(s.isBuffer(H))return H.length;if(ArrayBuffer.isView(H)||we(H,ArrayBuffer))return H.byteLength;if(typeof H!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof H);const k=H.length,Y=arguments.length>2&&arguments[2]===!0;if(!Y&&k===0)return 0;let re=!1;for(;;)switch(x){case"ascii":case"latin1":case"binary":return k;case"utf8":case"utf-8":return M(H).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k*2;case"hex":return k>>>1;case"base64":return Q(H).length;default:if(re)return Y?-1:M(H).length;x=(""+x).toLowerCase(),re=!0}}s.byteLength=E;function A(H,x,k){let Y=!1;if((x===void 0||x<0)&&(x=0),x>this.length||((k===void 0||k>this.length)&&(k=this.length),k<=0)||(k>>>=0,x>>>=0,k<=x))return"";for(H||(H="utf8");;)switch(H){case"hex":return U(this,x,k);case"utf8":case"utf-8":return v(this,x,k);case"ascii":return R(this,x,k);case"latin1":case"binary":return L(this,x,k);case"base64":return C(this,x,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,x,k);default:if(Y)throw new TypeError("Unknown encoding: "+H);H=(H+"").toLowerCase(),Y=!0}}s.prototype._isBuffer=!0;function D(H,x,k){const Y=H[x];H[x]=H[k],H[k]=Y}s.prototype.swap16=function(){const x=this.length;if(x%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let k=0;kk&&(x+=" ... "),""},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(x,k,Y,re,fe){if(we(x,Uint8Array)&&(x=s.from(x,x.offset,x.byteLength)),!s.isBuffer(x))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof x);if(k===void 0&&(k=0),Y===void 0&&(Y=x?x.length:0),re===void 0&&(re=0),fe===void 0&&(fe=this.length),k<0||Y>x.length||re<0||fe>this.length)throw new RangeError("out of range index");if(re>=fe&&k>=Y)return 0;if(re>=fe)return-1;if(k>=Y)return 1;if(k>>>=0,Y>>>=0,re>>>=0,fe>>>=0,this===x)return 0;let le=fe-re,xe=Y-k;const _e=Math.min(le,xe),ke=this.slice(re,fe),$e=x.slice(k,Y);for(let Ne=0;Ne<_e;++Ne)if(ke[Ne]!==$e[Ne]){le=ke[Ne],xe=$e[Ne];break}return le2147483647?k=2147483647:k<-2147483648&&(k=-2147483648),k=+k,Se(k)&&(k=re?0:H.length-1),k<0&&(k=H.length+k),k>=H.length){if(re)return-1;k=H.length-1}else if(k<0)if(re)k=0;else return-1;if(typeof x=="string"&&(x=s.from(x,Y)),s.isBuffer(x))return x.length===0?-1:g(H,x,k,Y,re);if(typeof x=="number")return x=x&255,typeof Uint8Array.prototype.indexOf=="function"?re?Uint8Array.prototype.indexOf.call(H,x,k):Uint8Array.prototype.lastIndexOf.call(H,x,k):g(H,[x],k,Y,re);throw new TypeError("val must be string, number or Buffer")}function g(H,x,k,Y,re){let fe=1,le=H.length,xe=x.length;if(Y!==void 0&&(Y=String(Y).toLowerCase(),Y==="ucs2"||Y==="ucs-2"||Y==="utf16le"||Y==="utf-16le")){if(H.length<2||x.length<2)return-1;fe=2,le/=2,xe/=2,k/=2}function _e($e,Ne){return fe===1?$e[Ne]:$e.readUInt16BE(Ne*fe)}let ke;if(re){let $e=-1;for(ke=k;kele&&(k=le-xe),ke=k;ke>=0;ke--){let $e=!0;for(let Ne=0;Nere&&(Y=re)):Y=re;const fe=x.length;Y>fe/2&&(Y=fe/2);let le;for(le=0;le>>0,isFinite(Y)?(Y=Y>>>0,re===void 0&&(re="utf8")):(re=Y,Y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const fe=this.length-k;if((Y===void 0||Y>fe)&&(Y=fe),x.length>0&&(Y<0||k<0)||k>this.length)throw new RangeError("Attempt to write outside buffer bounds");re||(re="utf8");let le=!1;for(;;)switch(re){case"hex":return N(this,x,k,Y);case"utf8":case"utf-8":return V(this,x,k,Y);case"ascii":case"latin1":case"binary":return K(this,x,k,Y);case"base64":return W(this,x,k,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,x,k,Y);default:if(le)throw new TypeError("Unknown encoding: "+re);re=(""+re).toLowerCase(),le=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(H,x,k){return x===0&&k===H.length?t.fromByteArray(H):t.fromByteArray(H.slice(x,k))}function v(H,x,k){k=Math.min(H.length,k);const Y=[];let re=x;for(;re239?4:fe>223?3:fe>191?2:1;if(re+xe<=k){let _e,ke,$e,Ne;switch(xe){case 1:fe<128&&(le=fe);break;case 2:_e=H[re+1],(_e&192)===128&&(Ne=(fe&31)<<6|_e&63,Ne>127&&(le=Ne));break;case 3:_e=H[re+1],ke=H[re+2],(_e&192)===128&&(ke&192)===128&&(Ne=(fe&15)<<12|(_e&63)<<6|ke&63,Ne>2047&&(Ne<55296||Ne>57343)&&(le=Ne));break;case 4:_e=H[re+1],ke=H[re+2],$e=H[re+3],(_e&192)===128&&(ke&192)===128&&($e&192)===128&&(Ne=(fe&15)<<18|(_e&63)<<12|(ke&63)<<6|$e&63,Ne>65535&&Ne<1114112&&(le=Ne))}}le===null?(le=65533,xe=1):le>65535&&(le-=65536,Y.push(le>>>10&1023|55296),le=56320|le&1023),Y.push(le),re+=xe}return B(Y)}const w=4096;function B(H){const x=H.length;if(x<=w)return String.fromCharCode.apply(String,H);let k="",Y=0;for(;YY)&&(k=Y);let re="";for(let fe=x;feY&&(x=Y),k<0?(k+=Y,k<0&&(k=0)):k>Y&&(k=Y),kk)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(x,k,Y){x=x>>>0,k=k>>>0,Y||F(x,k,this.length);let re=this[x],fe=1,le=0;for(;++le>>0,k=k>>>0,Y||F(x,k,this.length);let re=this[x+--k],fe=1;for(;k>0&&(fe*=256);)re+=this[x+--k]*fe;return re},s.prototype.readUint8=s.prototype.readUInt8=function(x,k){return x=x>>>0,k||F(x,1,this.length),this[x]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(x,k){return x=x>>>0,k||F(x,2,this.length),this[x]|this[x+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(x,k){return x=x>>>0,k||F(x,2,this.length),this[x]<<8|this[x+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(x,k){return x=x>>>0,k||F(x,4,this.length),(this[x]|this[x+1]<<8|this[x+2]<<16)+this[x+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(x,k){return x=x>>>0,k||F(x,4,this.length),this[x]*16777216+(this[x+1]<<16|this[x+2]<<8|this[x+3])},s.prototype.readBigUInt64LE=Ae(function(x){x=x>>>0,se(x,"offset");const k=this[x],Y=this[x+7];(k===void 0||Y===void 0)&&pe(x,this.length-8);const re=k+this[++x]*2**8+this[++x]*2**16+this[++x]*2**24,fe=this[++x]+this[++x]*2**8+this[++x]*2**16+Y*2**24;return BigInt(re)+(BigInt(fe)<>>0,se(x,"offset");const k=this[x],Y=this[x+7];(k===void 0||Y===void 0)&&pe(x,this.length-8);const re=k*2**24+this[++x]*2**16+this[++x]*2**8+this[++x],fe=this[++x]*2**24+this[++x]*2**16+this[++x]*2**8+Y;return(BigInt(re)<>>0,k=k>>>0,Y||F(x,k,this.length);let re=this[x],fe=1,le=0;for(;++le=fe&&(re-=Math.pow(2,8*k)),re},s.prototype.readIntBE=function(x,k,Y){x=x>>>0,k=k>>>0,Y||F(x,k,this.length);let re=k,fe=1,le=this[x+--re];for(;re>0&&(fe*=256);)le+=this[x+--re]*fe;return fe*=128,le>=fe&&(le-=Math.pow(2,8*k)),le},s.prototype.readInt8=function(x,k){return x=x>>>0,k||F(x,1,this.length),this[x]&128?(255-this[x]+1)*-1:this[x]},s.prototype.readInt16LE=function(x,k){x=x>>>0,k||F(x,2,this.length);const Y=this[x]|this[x+1]<<8;return Y&32768?Y|4294901760:Y},s.prototype.readInt16BE=function(x,k){x=x>>>0,k||F(x,2,this.length);const Y=this[x+1]|this[x]<<8;return Y&32768?Y|4294901760:Y},s.prototype.readInt32LE=function(x,k){return x=x>>>0,k||F(x,4,this.length),this[x]|this[x+1]<<8|this[x+2]<<16|this[x+3]<<24},s.prototype.readInt32BE=function(x,k){return x=x>>>0,k||F(x,4,this.length),this[x]<<24|this[x+1]<<16|this[x+2]<<8|this[x+3]},s.prototype.readBigInt64LE=Ae(function(x){x=x>>>0,se(x,"offset");const k=this[x],Y=this[x+7];(k===void 0||Y===void 0)&&pe(x,this.length-8);const re=this[x+4]+this[x+5]*2**8+this[x+6]*2**16+(Y<<24);return(BigInt(re)<>>0,se(x,"offset");const k=this[x],Y=this[x+7];(k===void 0||Y===void 0)&&pe(x,this.length-8);const re=(k<<24)+this[++x]*2**16+this[++x]*2**8+this[++x];return(BigInt(re)<>>0,k||F(x,4,this.length),r.read(this,x,!0,23,4)},s.prototype.readFloatBE=function(x,k){return x=x>>>0,k||F(x,4,this.length),r.read(this,x,!1,23,4)},s.prototype.readDoubleLE=function(x,k){return x=x>>>0,k||F(x,8,this.length),r.read(this,x,!0,52,8)},s.prototype.readDoubleBE=function(x,k){return x=x>>>0,k||F(x,8,this.length),r.read(this,x,!1,52,8)};function T(H,x,k,Y,re,fe){if(!s.isBuffer(H))throw new TypeError('"buffer" argument must be a Buffer instance');if(x>re||xH.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(x,k,Y,re){if(x=+x,k=k>>>0,Y=Y>>>0,!re){const xe=Math.pow(2,8*Y)-1;T(this,x,k,Y,xe,0)}let fe=1,le=0;for(this[k]=x&255;++le>>0,Y=Y>>>0,!re){const xe=Math.pow(2,8*Y)-1;T(this,x,k,Y,xe,0)}let fe=Y-1,le=1;for(this[k+fe]=x&255;--fe>=0&&(le*=256);)this[k+fe]=x/le&255;return k+Y},s.prototype.writeUint8=s.prototype.writeUInt8=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,1,255,0),this[k]=x&255,k+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,2,65535,0),this[k]=x&255,this[k+1]=x>>>8,k+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,2,65535,0),this[k]=x>>>8,this[k+1]=x&255,k+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,4,4294967295,0),this[k+3]=x>>>24,this[k+2]=x>>>16,this[k+1]=x>>>8,this[k]=x&255,k+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,4,4294967295,0),this[k]=x>>>24,this[k+1]=x>>>16,this[k+2]=x>>>8,this[k+3]=x&255,k+4};function q(H,x,k,Y,re){ee(x,Y,re,H,k,7);let fe=Number(x&BigInt(4294967295));H[k++]=fe,fe=fe>>8,H[k++]=fe,fe=fe>>8,H[k++]=fe,fe=fe>>8,H[k++]=fe;let le=Number(x>>BigInt(32)&BigInt(4294967295));return H[k++]=le,le=le>>8,H[k++]=le,le=le>>8,H[k++]=le,le=le>>8,H[k++]=le,k}function J(H,x,k,Y,re){ee(x,Y,re,H,k,7);let fe=Number(x&BigInt(4294967295));H[k+7]=fe,fe=fe>>8,H[k+6]=fe,fe=fe>>8,H[k+5]=fe,fe=fe>>8,H[k+4]=fe;let le=Number(x>>BigInt(32)&BigInt(4294967295));return H[k+3]=le,le=le>>8,H[k+2]=le,le=le>>8,H[k+1]=le,le=le>>8,H[k]=le,k+8}s.prototype.writeBigUInt64LE=Ae(function(x,k=0){return q(this,x,k,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Ae(function(x,k=0){return J(this,x,k,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(x,k,Y,re){if(x=+x,k=k>>>0,!re){const _e=Math.pow(2,8*Y-1);T(this,x,k,Y,_e-1,-_e)}let fe=0,le=1,xe=0;for(this[k]=x&255;++fe>0)-xe&255;return k+Y},s.prototype.writeIntBE=function(x,k,Y,re){if(x=+x,k=k>>>0,!re){const _e=Math.pow(2,8*Y-1);T(this,x,k,Y,_e-1,-_e)}let fe=Y-1,le=1,xe=0;for(this[k+fe]=x&255;--fe>=0&&(le*=256);)x<0&&xe===0&&this[k+fe+1]!==0&&(xe=1),this[k+fe]=(x/le>>0)-xe&255;return k+Y},s.prototype.writeInt8=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,1,127,-128),x<0&&(x=255+x+1),this[k]=x&255,k+1},s.prototype.writeInt16LE=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,2,32767,-32768),this[k]=x&255,this[k+1]=x>>>8,k+2},s.prototype.writeInt16BE=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,2,32767,-32768),this[k]=x>>>8,this[k+1]=x&255,k+2},s.prototype.writeInt32LE=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,4,2147483647,-2147483648),this[k]=x&255,this[k+1]=x>>>8,this[k+2]=x>>>16,this[k+3]=x>>>24,k+4},s.prototype.writeInt32BE=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,4,2147483647,-2147483648),x<0&&(x=4294967295+x+1),this[k]=x>>>24,this[k+1]=x>>>16,this[k+2]=x>>>8,this[k+3]=x&255,k+4},s.prototype.writeBigInt64LE=Ae(function(x,k=0){return q(this,x,k,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Ae(function(x,k=0){return J(this,x,k,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function te(H,x,k,Y,re,fe){if(k+Y>H.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("Index out of range")}function ie(H,x,k,Y,re){return x=+x,k=k>>>0,re||te(H,x,k,4),r.write(H,x,k,Y,23,4),k+4}s.prototype.writeFloatLE=function(x,k,Y){return ie(this,x,k,!0,Y)},s.prototype.writeFloatBE=function(x,k,Y){return ie(this,x,k,!1,Y)};function ce(H,x,k,Y,re){return x=+x,k=k>>>0,re||te(H,x,k,8),r.write(H,x,k,Y,52,8),k+8}s.prototype.writeDoubleLE=function(x,k,Y){return ce(this,x,k,!0,Y)},s.prototype.writeDoubleBE=function(x,k,Y){return ce(this,x,k,!1,Y)},s.prototype.copy=function(x,k,Y,re){if(!s.isBuffer(x))throw new TypeError("argument should be a Buffer");if(Y||(Y=0),!re&&re!==0&&(re=this.length),k>=x.length&&(k=x.length),k||(k=0),re>0&&re=this.length)throw new RangeError("Index out of range");if(re<0)throw new RangeError("sourceEnd out of bounds");re>this.length&&(re=this.length),x.length-k>>0,Y=Y===void 0?this.length:Y>>>0,x||(x=0);let fe;if(typeof x=="number")for(fe=k;fe2**32?re=O(String(k)):typeof k=="bigint"&&(re=String(k),(k>BigInt(2)**BigInt(32)||k<-(BigInt(2)**BigInt(32)))&&(re=O(re)),re+="n"),Y+=` It must be ${x}. Received ${re}`,Y},RangeError);function O(H){let x="",k=H.length;const Y=H[0]==="-"?1:0;for(;k>=Y+4;k-=3)x=`_${H.slice(k-3,k)}${x}`;return`${H.slice(0,k)}${x}`}function G(H,x,k){se(x,"offset"),(H[x]===void 0||H[x+k]===void 0)&&pe(x,H.length-(k+1))}function ee(H,x,k,Y,re,fe){if(H>k||H3?x===0||x===BigInt(0)?xe=`>= 0${le} and < 2${le} ** ${(fe+1)*8}${le}`:xe=`>= -(2${le} ** ${(fe+1)*8-1}${le}) and < 2 ** ${(fe+1)*8-1}${le}`:xe=`>= ${x}${le} and <= ${k}${le}`,new oe.ERR_OUT_OF_RANGE("value",xe,H)}G(Y,re,fe)}function se(H,x){if(typeof H!="number")throw new oe.ERR_INVALID_ARG_TYPE(x,"number",H)}function pe(H,x,k){throw Math.floor(H)!==H?(se(H,k),new oe.ERR_OUT_OF_RANGE(k||"offset","an integer",H)):x<0?new oe.ERR_BUFFER_OUT_OF_BOUNDS:new oe.ERR_OUT_OF_RANGE(k||"offset",`>= ${k?1:0} and <= ${x}`,H)}const ge=/[^+/0-9A-Za-z-_]/g;function X(H){if(H=H.split("=")[0],H=H.trim().replace(ge,""),H.length<2)return"";for(;H.length%4!==0;)H=H+"=";return H}function M(H,x){x=x||1/0;let k;const Y=H.length;let re=null;const fe=[];for(let le=0;le55295&&k<57344){if(!re){if(k>56319){(x-=3)>-1&&fe.push(239,191,189);continue}else if(le+1===Y){(x-=3)>-1&&fe.push(239,191,189);continue}re=k;continue}if(k<56320){(x-=3)>-1&&fe.push(239,191,189),re=k;continue}k=(re-55296<<10|k-56320)+65536}else re&&(x-=3)>-1&&fe.push(239,191,189);if(re=null,k<128){if((x-=1)<0)break;fe.push(k)}else if(k<2048){if((x-=2)<0)break;fe.push(k>>6|192,k&63|128)}else if(k<65536){if((x-=3)<0)break;fe.push(k>>12|224,k>>6&63|128,k&63|128)}else if(k<1114112){if((x-=4)<0)break;fe.push(k>>18|240,k>>12&63|128,k>>6&63|128,k&63|128)}else throw new Error("Invalid code point")}return fe}function z(H){const x=[];for(let k=0;k>8,re=k%256,fe.push(re),fe.push(Y);return fe}function Q(H){return t.toByteArray(X(H))}function de(H,x,k,Y){let re;for(re=0;re=x.length||re>=H.length);++re)x[re+k]=H[re];return re}function we(H,x){return H instanceof x||H!=null&&H.constructor!=null&&H.constructor.name!=null&&H.constructor.name===x.name}function Se(H){return H!==H}const Ee=function(){const H="0123456789abcdef",x=new Array(256);for(let k=0;k<16;++k){const Y=k*16;for(let re=0;re<16;++re)x[Y+re]=H[k]+H[re]}return x}();function Ae(H){return typeof BigInt>"u"?Te:H}function Te(){throw new Error("BigInt not supported")}})(Gu);const Y3e={},X3e=Object.freeze(Object.defineProperty({__proto__:null,default:Y3e},Symbol.toStringTag,{value:"Module"})),Yo=Ll(X3e);Object.defineProperty(My,"__esModule",{value:!0});My.WebCrypto=void 0;const Z3e=Gu,lw=Yo,MA=typeof window<"u"&&typeof window.document<"u";class J3e{constructor(){this.subtle=MA?globalThis.crypto.subtle:lw.webcrypto?lw.webcrypto.subtle:crypto.subtle}getRandomValues(t){if(!ArrayBuffer.isView(t))throw new TypeError("Failed to execute 'getRandomValues' on 'Crypto': parameter 1 is not of type 'ArrayBufferView'");const r=Z3e.Buffer.from(t.buffer,t.byteOffset,t.byteLength);return MA?globalThis.crypto.getRandomValues(r):(0,lw.randomFillSync)(r),t}}My.WebCrypto=J3e;var Ny={},Fy={};function Q3e(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r>>0,E=new Uint8Array(m);_!==b;){for(var A=p[_],D=0,$=m-1;(A!==0||D>>0,E[$]=A%a>>>0,A=A/a>>>0;if(A!==0)throw new Error("Non-zero carry");y=D,_++}for(var g=m-y;g!==m&&E[g]===0;)g++;for(var N=s.repeat(h);g>>0,m=new Uint8Array(b);p[h];){var E=t[p.charCodeAt(h)];if(E===255)return;for(var A=0,D=b-1;(E!==0||A<_)&&D!==-1;D--,A++)E+=a*m[D]>>>0,m[D]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error("Non-zero carry");_=A,h++}for(var $=b-_;$!==b&&m[$]===0;)$++;for(var g=new Uint8Array(y+(b-$)),N=y;$!==b;)g[N++]=m[$++];return g}function d(p){var h=f(p);if(h)return h;throw new Error("Non-base"+a+" character")}return{encode:u,decodeUnsafe:f,decode:d}}var exe=Q3e;(function(e){var t=Le&&Le.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.isBase58=e.bs58=void 0;const r=t(exe),n="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";e.bs58=(0,r.default)(n);function o(i){if(i===""||i.trim()==="")return!1;try{return e.bs58.encode(e.bs58.decode(i))===i}catch{return!1}}e.isBase58=o,e.default=e.bs58})(Fy);var uh={};Object.defineProperty(uh,"__esModule",{value:!0});function txe(e){let t=5381;for(let r=0;r>24,r=e>>16,n=e>>8;return t^r^n^e}function axe(e){return e&255}var ht={},h4={};const sxe="elliptic",lxe="6.5.4",cxe="EC cryptography",uxe="lib/elliptic.js",fxe=["lib"],dxe={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},pxe={type:"git",url:"git@github.com:indutny/elliptic"},hxe=["EC","Elliptic","curve","Cryptography"],vxe="Fedor Indutny ",gxe="MIT",mxe={url:"https://github.com/indutny/elliptic/issues"},yxe="https://github.com/indutny/elliptic",bxe={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},wxe={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},xxe={name:sxe,version:lxe,description:cxe,main:uxe,files:fxe,scripts:dxe,repository:pxe,keywords:hxe,author:vxe,license:gxe,bugs:mxe,homepage:yxe,devDependencies:bxe,dependencies:wxe};var Qn={},v4={exports:{}};v4.exports;(function(e){(function(t,r){function n(W,P){if(!W)throw new Error(P||"Assertion failed")}function o(W,P){W.super_=P;var C=function(){};C.prototype=P.prototype,W.prototype=new C,W.prototype.constructor=W}function i(W,P,C){if(i.isBN(W))return W;this.negative=0,this.words=null,this.length=0,this.red=null,W!==null&&((P==="le"||P==="be")&&(C=P,P=10),this._init(W||0,P||10,C||"be"))}typeof t=="object"?t.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=Yo.Buffer}catch{}i.isBN=function(P){return P instanceof i?!0:P!==null&&typeof P=="object"&&P.constructor.wordSize===i.wordSize&&Array.isArray(P.words)},i.max=function(P,C){return P.cmp(C)>0?P:C},i.min=function(P,C){return P.cmp(C)<0?P:C},i.prototype._init=function(P,C,v){if(typeof P=="number")return this._initNumber(P,C,v);if(typeof P=="object")return this._initArray(P,C,v);C==="hex"&&(C=16),n(C===(C|0)&&C>=2&&C<=36),P=P.toString().replace(/\s+/g,"");var w=0;P[0]==="-"&&(w++,this.negative=1),w=0;w-=3)R=P[w]|P[w-1]<<8|P[w-2]<<16,this.words[B]|=R<>>26-L&67108863,L+=24,L>=26&&(L-=26,B++);else if(v==="le")for(w=0,B=0;w>>26-L&67108863,L+=24,L>=26&&(L-=26,B++);return this.strip()};function s(W,P){var C=W.charCodeAt(P);return C>=65&&C<=70?C-55:C>=97&&C<=102?C-87:C-48&15}function l(W,P,C){var v=s(W,C);return C-1>=P&&(v|=s(W,C-1)<<4),v}i.prototype._parseHex=function(P,C,v){this.length=Math.ceil((P.length-C)/6),this.words=new Array(this.length);for(var w=0;w=C;w-=2)L=l(P,C,w)<=18?(B-=18,R+=1,this.words[R]|=L>>>26):B+=8;else{var U=P.length-C;for(w=U%2===0?C+1:C;w=18?(B-=18,R+=1,this.words[R]|=L>>>26):B+=8}this.strip()};function c(W,P,C,v){for(var w=0,B=Math.min(W.length,C),R=P;R=49?w+=L-49+10:L>=17?w+=L-17+10:w+=L}return w}i.prototype._parseBase=function(P,C,v){this.words=[0],this.length=1;for(var w=0,B=1;B<=67108863;B*=C)w++;w--,B=B/C|0;for(var R=P.length-v,L=R%w,U=Math.min(R,R-L)+v,S=0,F=v;F1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(P,C){P=P||10,C=C|0||1;var v;if(P===16||P==="hex"){v="";for(var w=0,B=0,R=0;R>>24-w&16777215,B!==0||R!==this.length-1?v=u[6-U.length]+U+v:v=U+v,w+=2,w>=26&&(w-=26,R--)}for(B!==0&&(v=B.toString(16)+v);v.length%C!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(P===(P|0)&&P>=2&&P<=36){var S=f[P],F=d[P];v="";var T=this.clone();for(T.negative=0;!T.isZero();){var q=T.modn(F).toString(P);T=T.idivn(F),T.isZero()?v=q+v:v=u[S-q.length]+q+v}for(this.isZero()&&(v="0"+v);v.length%C!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var P=this.words[0];return this.length===2?P+=this.words[1]*67108864:this.length===3&&this.words[2]===1?P+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-P:P},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(P,C){return n(typeof a<"u"),this.toArrayLike(a,P,C)},i.prototype.toArray=function(P,C){return this.toArrayLike(Array,P,C)},i.prototype.toArrayLike=function(P,C,v){var w=this.byteLength(),B=v||Math.max(1,w);n(w<=B,"byte array longer than desired length"),n(B>0,"Requested array length <= 0"),this.strip();var R=C==="le",L=new P(B),U,S,F=this.clone();if(R){for(S=0;!F.isZero();S++)U=F.andln(255),F.iushrn(8),L[S]=U;for(;S=4096&&(v+=13,C>>>=13),C>=64&&(v+=7,C>>>=7),C>=8&&(v+=4,C>>>=4),C>=2&&(v+=2,C>>>=2),v+C},i.prototype._zeroBits=function(P){if(P===0)return 26;var C=P,v=0;return C&8191||(v+=13,C>>>=13),C&127||(v+=7,C>>>=7),C&15||(v+=4,C>>>=4),C&3||(v+=2,C>>>=2),C&1||v++,v},i.prototype.bitLength=function(){var P=this.words[this.length-1],C=this._countBits(P);return(this.length-1)*26+C};function p(W){for(var P=new Array(W.bitLength()),C=0;C>>w}return P}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var P=0,C=0;CP.length?this.clone().ior(P):P.clone().ior(this)},i.prototype.uor=function(P){return this.length>P.length?this.clone().iuor(P):P.clone().iuor(this)},i.prototype.iuand=function(P){var C;this.length>P.length?C=P:C=this;for(var v=0;vP.length?this.clone().iand(P):P.clone().iand(this)},i.prototype.uand=function(P){return this.length>P.length?this.clone().iuand(P):P.clone().iuand(this)},i.prototype.iuxor=function(P){var C,v;this.length>P.length?(C=this,v=P):(C=P,v=this);for(var w=0;wP.length?this.clone().ixor(P):P.clone().ixor(this)},i.prototype.uxor=function(P){return this.length>P.length?this.clone().iuxor(P):P.clone().iuxor(this)},i.prototype.inotn=function(P){n(typeof P=="number"&&P>=0);var C=Math.ceil(P/26)|0,v=P%26;this._expand(C),v>0&&C--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-v),this.strip()},i.prototype.notn=function(P){return this.clone().inotn(P)},i.prototype.setn=function(P,C){n(typeof P=="number"&&P>=0);var v=P/26|0,w=P%26;return this._expand(v+1),C?this.words[v]=this.words[v]|1<P.length?(v=this,w=P):(v=P,w=this);for(var B=0,R=0;R>>26;for(;B!==0&&R>>26;if(this.length=v.length,B!==0)this.words[this.length]=B,this.length++;else if(v!==this)for(;RP.length?this.clone().iadd(P):P.clone().iadd(this)},i.prototype.isub=function(P){if(P.negative!==0){P.negative=0;var C=this.iadd(P);return P.negative=1,C._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(P),this.negative=1,this._normSign();var v=this.cmp(P);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var w,B;v>0?(w=this,B=P):(w=P,B=this);for(var R=0,L=0;L>26,this.words[L]=C&67108863;for(;R!==0&&L>26,this.words[L]=C&67108863;if(R===0&&L>>26,T=U&67108863,q=Math.min(S,P.length-1),J=Math.max(0,S-W.length+1);J<=q;J++){var te=S-J|0;w=W.words[te]|0,B=P.words[J]|0,R=w*B+T,F+=R/67108864|0,T=R&67108863}C.words[S]=T|0,U=F|0}return U!==0?C.words[S]=U|0:C.length--,C.strip()}var y=function(P,C,v){var w=P.words,B=C.words,R=v.words,L=0,U,S,F,T=w[0]|0,q=T&8191,J=T>>>13,te=w[1]|0,ie=te&8191,ce=te>>>13,oe=w[2]|0,ue=oe&8191,O=oe>>>13,G=w[3]|0,ee=G&8191,se=G>>>13,pe=w[4]|0,ge=pe&8191,X=pe>>>13,M=w[5]|0,z=M&8191,Z=M>>>13,Q=w[6]|0,de=Q&8191,we=Q>>>13,Se=w[7]|0,Ee=Se&8191,Ae=Se>>>13,Te=w[8]|0,H=Te&8191,x=Te>>>13,k=w[9]|0,Y=k&8191,re=k>>>13,fe=B[0]|0,le=fe&8191,xe=fe>>>13,_e=B[1]|0,ke=_e&8191,$e=_e>>>13,Ne=B[2]|0,We=Ne&8191,gt=Ne>>>13,ft=B[3]|0,Ye=ft&8191,Je=ft>>>13,tt=B[4]|0,ve=tt&8191,ne=tt>>>13,he=B[5]|0,be=he&8191,Ce=he>>>13,Oe=B[6]|0,Ie=Oe&8191,De=Oe>>>13,je=B[7]|0,Me=je&8191,He=je>>>13,qe=B[8]|0,ze=qe&8191,it=qe>>>13,Be=B[9]|0,Ke=Be&8191,mt=Be>>>13;v.negative=P.negative^C.negative,v.length=19,U=Math.imul(q,le),S=Math.imul(q,xe),S=S+Math.imul(J,le)|0,F=Math.imul(J,xe);var ct=(L+U|0)+((S&8191)<<13)|0;L=(F+(S>>>13)|0)+(ct>>>26)|0,ct&=67108863,U=Math.imul(ie,le),S=Math.imul(ie,xe),S=S+Math.imul(ce,le)|0,F=Math.imul(ce,xe),U=U+Math.imul(q,ke)|0,S=S+Math.imul(q,$e)|0,S=S+Math.imul(J,ke)|0,F=F+Math.imul(J,$e)|0;var Ct=(L+U|0)+((S&8191)<<13)|0;L=(F+(S>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,U=Math.imul(ue,le),S=Math.imul(ue,xe),S=S+Math.imul(O,le)|0,F=Math.imul(O,xe),U=U+Math.imul(ie,ke)|0,S=S+Math.imul(ie,$e)|0,S=S+Math.imul(ce,ke)|0,F=F+Math.imul(ce,$e)|0,U=U+Math.imul(q,We)|0,S=S+Math.imul(q,gt)|0,S=S+Math.imul(J,We)|0,F=F+Math.imul(J,gt)|0;var xn=(L+U|0)+((S&8191)<<13)|0;L=(F+(S>>>13)|0)+(xn>>>26)|0,xn&=67108863,U=Math.imul(ee,le),S=Math.imul(ee,xe),S=S+Math.imul(se,le)|0,F=Math.imul(se,xe),U=U+Math.imul(ue,ke)|0,S=S+Math.imul(ue,$e)|0,S=S+Math.imul(O,ke)|0,F=F+Math.imul(O,$e)|0,U=U+Math.imul(ie,We)|0,S=S+Math.imul(ie,gt)|0,S=S+Math.imul(ce,We)|0,F=F+Math.imul(ce,gt)|0,U=U+Math.imul(q,Ye)|0,S=S+Math.imul(q,Je)|0,S=S+Math.imul(J,Ye)|0,F=F+Math.imul(J,Je)|0;var Nn=(L+U|0)+((S&8191)<<13)|0;L=(F+(S>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,U=Math.imul(ge,le),S=Math.imul(ge,xe),S=S+Math.imul(X,le)|0,F=Math.imul(X,xe),U=U+Math.imul(ee,ke)|0,S=S+Math.imul(ee,$e)|0,S=S+Math.imul(se,ke)|0,F=F+Math.imul(se,$e)|0,U=U+Math.imul(ue,We)|0,S=S+Math.imul(ue,gt)|0,S=S+Math.imul(O,We)|0,F=F+Math.imul(O,gt)|0,U=U+Math.imul(ie,Ye)|0,S=S+Math.imul(ie,Je)|0,S=S+Math.imul(ce,Ye)|0,F=F+Math.imul(ce,Je)|0,U=U+Math.imul(q,ve)|0,S=S+Math.imul(q,ne)|0,S=S+Math.imul(J,ve)|0,F=F+Math.imul(J,ne)|0;var an=(L+U|0)+((S&8191)<<13)|0;L=(F+(S>>>13)|0)+(an>>>26)|0,an&=67108863,U=Math.imul(z,le),S=Math.imul(z,xe),S=S+Math.imul(Z,le)|0,F=Math.imul(Z,xe),U=U+Math.imul(ge,ke)|0,S=S+Math.imul(ge,$e)|0,S=S+Math.imul(X,ke)|0,F=F+Math.imul(X,$e)|0,U=U+Math.imul(ee,We)|0,S=S+Math.imul(ee,gt)|0,S=S+Math.imul(se,We)|0,F=F+Math.imul(se,gt)|0,U=U+Math.imul(ue,Ye)|0,S=S+Math.imul(ue,Je)|0,S=S+Math.imul(O,Ye)|0,F=F+Math.imul(O,Je)|0,U=U+Math.imul(ie,ve)|0,S=S+Math.imul(ie,ne)|0,S=S+Math.imul(ce,ve)|0,F=F+Math.imul(ce,ne)|0,U=U+Math.imul(q,be)|0,S=S+Math.imul(q,Ce)|0,S=S+Math.imul(J,be)|0,F=F+Math.imul(J,Ce)|0;var ai=(L+U|0)+((S&8191)<<13)|0;L=(F+(S>>>13)|0)+(ai>>>26)|0,ai&=67108863,U=Math.imul(de,le),S=Math.imul(de,xe),S=S+Math.imul(we,le)|0,F=Math.imul(we,xe),U=U+Math.imul(z,ke)|0,S=S+Math.imul(z,$e)|0,S=S+Math.imul(Z,ke)|0,F=F+Math.imul(Z,$e)|0,U=U+Math.imul(ge,We)|0,S=S+Math.imul(ge,gt)|0,S=S+Math.imul(X,We)|0,F=F+Math.imul(X,gt)|0,U=U+Math.imul(ee,Ye)|0,S=S+Math.imul(ee,Je)|0,S=S+Math.imul(se,Ye)|0,F=F+Math.imul(se,Je)|0,U=U+Math.imul(ue,ve)|0,S=S+Math.imul(ue,ne)|0,S=S+Math.imul(O,ve)|0,F=F+Math.imul(O,ne)|0,U=U+Math.imul(ie,be)|0,S=S+Math.imul(ie,Ce)|0,S=S+Math.imul(ce,be)|0,F=F+Math.imul(ce,Ce)|0,U=U+Math.imul(q,Ie)|0,S=S+Math.imul(q,De)|0,S=S+Math.imul(J,Ie)|0,F=F+Math.imul(J,De)|0;var sn=(L+U|0)+((S&8191)<<13)|0;L=(F+(S>>>13)|0)+(sn>>>26)|0,sn&=67108863,U=Math.imul(Ee,le),S=Math.imul(Ee,xe),S=S+Math.imul(Ae,le)|0,F=Math.imul(Ae,xe),U=U+Math.imul(de,ke)|0,S=S+Math.imul(de,$e)|0,S=S+Math.imul(we,ke)|0,F=F+Math.imul(we,$e)|0,U=U+Math.imul(z,We)|0,S=S+Math.imul(z,gt)|0,S=S+Math.imul(Z,We)|0,F=F+Math.imul(Z,gt)|0,U=U+Math.imul(ge,Ye)|0,S=S+Math.imul(ge,Je)|0,S=S+Math.imul(X,Ye)|0,F=F+Math.imul(X,Je)|0,U=U+Math.imul(ee,ve)|0,S=S+Math.imul(ee,ne)|0,S=S+Math.imul(se,ve)|0,F=F+Math.imul(se,ne)|0,U=U+Math.imul(ue,be)|0,S=S+Math.imul(ue,Ce)|0,S=S+Math.imul(O,be)|0,F=F+Math.imul(O,Ce)|0,U=U+Math.imul(ie,Ie)|0,S=S+Math.imul(ie,De)|0,S=S+Math.imul(ce,Ie)|0,F=F+Math.imul(ce,De)|0,U=U+Math.imul(q,Me)|0,S=S+Math.imul(q,He)|0,S=S+Math.imul(J,Me)|0,F=F+Math.imul(J,He)|0;var ji=(L+U|0)+((S&8191)<<13)|0;L=(F+(S>>>13)|0)+(ji>>>26)|0,ji&=67108863,U=Math.imul(H,le),S=Math.imul(H,xe),S=S+Math.imul(x,le)|0,F=Math.imul(x,xe),U=U+Math.imul(Ee,ke)|0,S=S+Math.imul(Ee,$e)|0,S=S+Math.imul(Ae,ke)|0,F=F+Math.imul(Ae,$e)|0,U=U+Math.imul(de,We)|0,S=S+Math.imul(de,gt)|0,S=S+Math.imul(we,We)|0,F=F+Math.imul(we,gt)|0,U=U+Math.imul(z,Ye)|0,S=S+Math.imul(z,Je)|0,S=S+Math.imul(Z,Ye)|0,F=F+Math.imul(Z,Je)|0,U=U+Math.imul(ge,ve)|0,S=S+Math.imul(ge,ne)|0,S=S+Math.imul(X,ve)|0,F=F+Math.imul(X,ne)|0,U=U+Math.imul(ee,be)|0,S=S+Math.imul(ee,Ce)|0,S=S+Math.imul(se,be)|0,F=F+Math.imul(se,Ce)|0,U=U+Math.imul(ue,Ie)|0,S=S+Math.imul(ue,De)|0,S=S+Math.imul(O,Ie)|0,F=F+Math.imul(O,De)|0,U=U+Math.imul(ie,Me)|0,S=S+Math.imul(ie,He)|0,S=S+Math.imul(ce,Me)|0,F=F+Math.imul(ce,He)|0,U=U+Math.imul(q,ze)|0,S=S+Math.imul(q,it)|0,S=S+Math.imul(J,ze)|0,F=F+Math.imul(J,it)|0;var Li=(L+U|0)+((S&8191)<<13)|0;L=(F+(S>>>13)|0)+(Li>>>26)|0,Li&=67108863,U=Math.imul(Y,le),S=Math.imul(Y,xe),S=S+Math.imul(re,le)|0,F=Math.imul(re,xe),U=U+Math.imul(H,ke)|0,S=S+Math.imul(H,$e)|0,S=S+Math.imul(x,ke)|0,F=F+Math.imul(x,$e)|0,U=U+Math.imul(Ee,We)|0,S=S+Math.imul(Ee,gt)|0,S=S+Math.imul(Ae,We)|0,F=F+Math.imul(Ae,gt)|0,U=U+Math.imul(de,Ye)|0,S=S+Math.imul(de,Je)|0,S=S+Math.imul(we,Ye)|0,F=F+Math.imul(we,Je)|0,U=U+Math.imul(z,ve)|0,S=S+Math.imul(z,ne)|0,S=S+Math.imul(Z,ve)|0,F=F+Math.imul(Z,ne)|0,U=U+Math.imul(ge,be)|0,S=S+Math.imul(ge,Ce)|0,S=S+Math.imul(X,be)|0,F=F+Math.imul(X,Ce)|0,U=U+Math.imul(ee,Ie)|0,S=S+Math.imul(ee,De)|0,S=S+Math.imul(se,Ie)|0,F=F+Math.imul(se,De)|0,U=U+Math.imul(ue,Me)|0,S=S+Math.imul(ue,He)|0,S=S+Math.imul(O,Me)|0,F=F+Math.imul(O,He)|0,U=U+Math.imul(ie,ze)|0,S=S+Math.imul(ie,it)|0,S=S+Math.imul(ce,ze)|0,F=F+Math.imul(ce,it)|0,U=U+Math.imul(q,Ke)|0,S=S+Math.imul(q,mt)|0,S=S+Math.imul(J,Ke)|0,F=F+Math.imul(J,mt)|0;var zi=(L+U|0)+((S&8191)<<13)|0;L=(F+(S>>>13)|0)+(zi>>>26)|0,zi&=67108863,U=Math.imul(Y,ke),S=Math.imul(Y,$e),S=S+Math.imul(re,ke)|0,F=Math.imul(re,$e),U=U+Math.imul(H,We)|0,S=S+Math.imul(H,gt)|0,S=S+Math.imul(x,We)|0,F=F+Math.imul(x,gt)|0,U=U+Math.imul(Ee,Ye)|0,S=S+Math.imul(Ee,Je)|0,S=S+Math.imul(Ae,Ye)|0,F=F+Math.imul(Ae,Je)|0,U=U+Math.imul(de,ve)|0,S=S+Math.imul(de,ne)|0,S=S+Math.imul(we,ve)|0,F=F+Math.imul(we,ne)|0,U=U+Math.imul(z,be)|0,S=S+Math.imul(z,Ce)|0,S=S+Math.imul(Z,be)|0,F=F+Math.imul(Z,Ce)|0,U=U+Math.imul(ge,Ie)|0,S=S+Math.imul(ge,De)|0,S=S+Math.imul(X,Ie)|0,F=F+Math.imul(X,De)|0,U=U+Math.imul(ee,Me)|0,S=S+Math.imul(ee,He)|0,S=S+Math.imul(se,Me)|0,F=F+Math.imul(se,He)|0,U=U+Math.imul(ue,ze)|0,S=S+Math.imul(ue,it)|0,S=S+Math.imul(O,ze)|0,F=F+Math.imul(O,it)|0,U=U+Math.imul(ie,Ke)|0,S=S+Math.imul(ie,mt)|0,S=S+Math.imul(ce,Ke)|0,F=F+Math.imul(ce,mt)|0;var Ui=(L+U|0)+((S&8191)<<13)|0;L=(F+(S>>>13)|0)+(Ui>>>26)|0,Ui&=67108863,U=Math.imul(Y,We),S=Math.imul(Y,gt),S=S+Math.imul(re,We)|0,F=Math.imul(re,gt),U=U+Math.imul(H,Ye)|0,S=S+Math.imul(H,Je)|0,S=S+Math.imul(x,Ye)|0,F=F+Math.imul(x,Je)|0,U=U+Math.imul(Ee,ve)|0,S=S+Math.imul(Ee,ne)|0,S=S+Math.imul(Ae,ve)|0,F=F+Math.imul(Ae,ne)|0,U=U+Math.imul(de,be)|0,S=S+Math.imul(de,Ce)|0,S=S+Math.imul(we,be)|0,F=F+Math.imul(we,Ce)|0,U=U+Math.imul(z,Ie)|0,S=S+Math.imul(z,De)|0,S=S+Math.imul(Z,Ie)|0,F=F+Math.imul(Z,De)|0,U=U+Math.imul(ge,Me)|0,S=S+Math.imul(ge,He)|0,S=S+Math.imul(X,Me)|0,F=F+Math.imul(X,He)|0,U=U+Math.imul(ee,ze)|0,S=S+Math.imul(ee,it)|0,S=S+Math.imul(se,ze)|0,F=F+Math.imul(se,it)|0,U=U+Math.imul(ue,Ke)|0,S=S+Math.imul(ue,mt)|0,S=S+Math.imul(O,Ke)|0,F=F+Math.imul(O,mt)|0;var Hi=(L+U|0)+((S&8191)<<13)|0;L=(F+(S>>>13)|0)+(Hi>>>26)|0,Hi&=67108863,U=Math.imul(Y,Ye),S=Math.imul(Y,Je),S=S+Math.imul(re,Ye)|0,F=Math.imul(re,Je),U=U+Math.imul(H,ve)|0,S=S+Math.imul(H,ne)|0,S=S+Math.imul(x,ve)|0,F=F+Math.imul(x,ne)|0,U=U+Math.imul(Ee,be)|0,S=S+Math.imul(Ee,Ce)|0,S=S+Math.imul(Ae,be)|0,F=F+Math.imul(Ae,Ce)|0,U=U+Math.imul(de,Ie)|0,S=S+Math.imul(de,De)|0,S=S+Math.imul(we,Ie)|0,F=F+Math.imul(we,De)|0,U=U+Math.imul(z,Me)|0,S=S+Math.imul(z,He)|0,S=S+Math.imul(Z,Me)|0,F=F+Math.imul(Z,He)|0,U=U+Math.imul(ge,ze)|0,S=S+Math.imul(ge,it)|0,S=S+Math.imul(X,ze)|0,F=F+Math.imul(X,it)|0,U=U+Math.imul(ee,Ke)|0,S=S+Math.imul(ee,mt)|0,S=S+Math.imul(se,Ke)|0,F=F+Math.imul(se,mt)|0;var ro=(L+U|0)+((S&8191)<<13)|0;L=(F+(S>>>13)|0)+(ro>>>26)|0,ro&=67108863,U=Math.imul(Y,ve),S=Math.imul(Y,ne),S=S+Math.imul(re,ve)|0,F=Math.imul(re,ne),U=U+Math.imul(H,be)|0,S=S+Math.imul(H,Ce)|0,S=S+Math.imul(x,be)|0,F=F+Math.imul(x,Ce)|0,U=U+Math.imul(Ee,Ie)|0,S=S+Math.imul(Ee,De)|0,S=S+Math.imul(Ae,Ie)|0,F=F+Math.imul(Ae,De)|0,U=U+Math.imul(de,Me)|0,S=S+Math.imul(de,He)|0,S=S+Math.imul(we,Me)|0,F=F+Math.imul(we,He)|0,U=U+Math.imul(z,ze)|0,S=S+Math.imul(z,it)|0,S=S+Math.imul(Z,ze)|0,F=F+Math.imul(Z,it)|0,U=U+Math.imul(ge,Ke)|0,S=S+Math.imul(ge,mt)|0,S=S+Math.imul(X,Ke)|0,F=F+Math.imul(X,mt)|0;var Vi=(L+U|0)+((S&8191)<<13)|0;L=(F+(S>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,U=Math.imul(Y,be),S=Math.imul(Y,Ce),S=S+Math.imul(re,be)|0,F=Math.imul(re,Ce),U=U+Math.imul(H,Ie)|0,S=S+Math.imul(H,De)|0,S=S+Math.imul(x,Ie)|0,F=F+Math.imul(x,De)|0,U=U+Math.imul(Ee,Me)|0,S=S+Math.imul(Ee,He)|0,S=S+Math.imul(Ae,Me)|0,F=F+Math.imul(Ae,He)|0,U=U+Math.imul(de,ze)|0,S=S+Math.imul(de,it)|0,S=S+Math.imul(we,ze)|0,F=F+Math.imul(we,it)|0,U=U+Math.imul(z,Ke)|0,S=S+Math.imul(z,mt)|0,S=S+Math.imul(Z,Ke)|0,F=F+Math.imul(Z,mt)|0;var Wi=(L+U|0)+((S&8191)<<13)|0;L=(F+(S>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,U=Math.imul(Y,Ie),S=Math.imul(Y,De),S=S+Math.imul(re,Ie)|0,F=Math.imul(re,De),U=U+Math.imul(H,Me)|0,S=S+Math.imul(H,He)|0,S=S+Math.imul(x,Me)|0,F=F+Math.imul(x,He)|0,U=U+Math.imul(Ee,ze)|0,S=S+Math.imul(Ee,it)|0,S=S+Math.imul(Ae,ze)|0,F=F+Math.imul(Ae,it)|0,U=U+Math.imul(de,Ke)|0,S=S+Math.imul(de,mt)|0,S=S+Math.imul(we,Ke)|0,F=F+Math.imul(we,mt)|0;var Vr=(L+U|0)+((S&8191)<<13)|0;L=(F+(S>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,U=Math.imul(Y,Me),S=Math.imul(Y,He),S=S+Math.imul(re,Me)|0,F=Math.imul(re,He),U=U+Math.imul(H,ze)|0,S=S+Math.imul(H,it)|0,S=S+Math.imul(x,ze)|0,F=F+Math.imul(x,it)|0,U=U+Math.imul(Ee,Ke)|0,S=S+Math.imul(Ee,mt)|0,S=S+Math.imul(Ae,Ke)|0,F=F+Math.imul(Ae,mt)|0;var qi=(L+U|0)+((S&8191)<<13)|0;L=(F+(S>>>13)|0)+(qi>>>26)|0,qi&=67108863,U=Math.imul(Y,ze),S=Math.imul(Y,it),S=S+Math.imul(re,ze)|0,F=Math.imul(re,it),U=U+Math.imul(H,Ke)|0,S=S+Math.imul(H,mt)|0,S=S+Math.imul(x,Ke)|0,F=F+Math.imul(x,mt)|0;var Gi=(L+U|0)+((S&8191)<<13)|0;L=(F+(S>>>13)|0)+(Gi>>>26)|0,Gi&=67108863,U=Math.imul(Y,Ke),S=Math.imul(Y,mt),S=S+Math.imul(re,Ke)|0,F=Math.imul(re,mt);var Ki=(L+U|0)+((S&8191)<<13)|0;return L=(F+(S>>>13)|0)+(Ki>>>26)|0,Ki&=67108863,R[0]=ct,R[1]=Ct,R[2]=xn,R[3]=Nn,R[4]=an,R[5]=ai,R[6]=sn,R[7]=ji,R[8]=Li,R[9]=zi,R[10]=Ui,R[11]=Hi,R[12]=ro,R[13]=Vi,R[14]=Wi,R[15]=Vr,R[16]=qi,R[17]=Gi,R[18]=Ki,L!==0&&(R[19]=L,v.length++),v};Math.imul||(y=h);function _(W,P,C){C.negative=P.negative^W.negative,C.length=W.length+P.length;for(var v=0,w=0,B=0;B>>26)|0,w+=R>>>26,R&=67108863}C.words[B]=L,v=R,R=w}return v!==0?C.words[B]=v:C.length--,C.strip()}function b(W,P,C){var v=new m;return v.mulp(W,P,C)}i.prototype.mulTo=function(P,C){var v,w=this.length+P.length;return this.length===10&&P.length===10?v=y(this,P,C):w<63?v=h(this,P,C):w<1024?v=_(this,P,C):v=b(this,P,C),v};function m(W,P){this.x=W,this.y=P}m.prototype.makeRBT=function(P){for(var C=new Array(P),v=i.prototype._countBits(P)-1,w=0;w>=1;return w},m.prototype.permute=function(P,C,v,w,B,R){for(var L=0;L>>1)B++;return 1<>>13,v[2*R+1]=B&8191,B=B>>>13;for(R=2*C;R>=26,C+=w/67108864|0,C+=B>>>26,this.words[v]=B&67108863}return C!==0&&(this.words[v]=C,this.length++),this},i.prototype.muln=function(P){return this.clone().imuln(P)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(P){var C=p(P);if(C.length===0)return new i(1);for(var v=this,w=0;w=0);var C=P%26,v=(P-C)/26,w=67108863>>>26-C<<26-C,B;if(C!==0){var R=0;for(B=0;B>>26-C}R&&(this.words[B]=R,this.length++)}if(v!==0){for(B=this.length-1;B>=0;B--)this.words[B+v]=this.words[B];for(B=0;B=0);var w;C?w=(C-C%26)/26:w=0;var B=P%26,R=Math.min((P-B)/26,this.length),L=67108863^67108863>>>B<R)for(this.length-=R,S=0;S=0&&(F!==0||S>=w);S--){var T=this.words[S]|0;this.words[S]=F<<26-B|T>>>B,F=T&L}return U&&F!==0&&(U.words[U.length++]=F),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(P,C,v){return n(this.negative===0),this.iushrn(P,C,v)},i.prototype.shln=function(P){return this.clone().ishln(P)},i.prototype.ushln=function(P){return this.clone().iushln(P)},i.prototype.shrn=function(P){return this.clone().ishrn(P)},i.prototype.ushrn=function(P){return this.clone().iushrn(P)},i.prototype.testn=function(P){n(typeof P=="number"&&P>=0);var C=P%26,v=(P-C)/26,w=1<=0);var C=P%26,v=(P-C)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(C!==0&&v++,this.length=Math.min(v,this.length),C!==0){var w=67108863^67108863>>>C<=67108864;C++)this.words[C]-=67108864,C===this.length-1?this.words[C+1]=1:this.words[C+1]++;return this.length=Math.max(this.length,C+1),this},i.prototype.isubn=function(P){if(n(typeof P=="number"),n(P<67108864),P<0)return this.iaddn(-P);if(this.negative!==0)return this.negative=0,this.iaddn(P),this.negative=1,this;if(this.words[0]-=P,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var C=0;C>26)-(U/67108864|0),this.words[B+v]=R&67108863}for(;B>26,this.words[B+v]=R&67108863;if(L===0)return this.strip();for(n(L===-1),L=0,B=0;B>26,this.words[B]=R&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(P,C){var v=this.length-P.length,w=this.clone(),B=P,R=B.words[B.length-1]|0,L=this._countBits(R);v=26-L,v!==0&&(B=B.ushln(v),w.iushln(v),R=B.words[B.length-1]|0);var U=w.length-B.length,S;if(C!=="mod"){S=new i(null),S.length=U+1,S.words=new Array(S.length);for(var F=0;F=0;q--){var J=(w.words[B.length+q]|0)*67108864+(w.words[B.length+q-1]|0);for(J=Math.min(J/R|0,67108863),w._ishlnsubmul(B,J,q);w.negative!==0;)J--,w.negative=0,w._ishlnsubmul(B,1,q),w.isZero()||(w.negative^=1);S&&(S.words[q]=J)}return S&&S.strip(),w.strip(),C!=="div"&&v!==0&&w.iushrn(v),{div:S||null,mod:w}},i.prototype.divmod=function(P,C,v){if(n(!P.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var w,B,R;return this.negative!==0&&P.negative===0?(R=this.neg().divmod(P,C),C!=="mod"&&(w=R.div.neg()),C!=="div"&&(B=R.mod.neg(),v&&B.negative!==0&&B.iadd(P)),{div:w,mod:B}):this.negative===0&&P.negative!==0?(R=this.divmod(P.neg(),C),C!=="mod"&&(w=R.div.neg()),{div:w,mod:R.mod}):this.negative&P.negative?(R=this.neg().divmod(P.neg(),C),C!=="div"&&(B=R.mod.neg(),v&&B.negative!==0&&B.isub(P)),{div:R.div,mod:B}):P.length>this.length||this.cmp(P)<0?{div:new i(0),mod:this}:P.length===1?C==="div"?{div:this.divn(P.words[0]),mod:null}:C==="mod"?{div:null,mod:new i(this.modn(P.words[0]))}:{div:this.divn(P.words[0]),mod:new i(this.modn(P.words[0]))}:this._wordDiv(P,C)},i.prototype.div=function(P){return this.divmod(P,"div",!1).div},i.prototype.mod=function(P){return this.divmod(P,"mod",!1).mod},i.prototype.umod=function(P){return this.divmod(P,"mod",!0).mod},i.prototype.divRound=function(P){var C=this.divmod(P);if(C.mod.isZero())return C.div;var v=C.div.negative!==0?C.mod.isub(P):C.mod,w=P.ushrn(1),B=P.andln(1),R=v.cmp(w);return R<0||B===1&&R===0?C.div:C.div.negative!==0?C.div.isubn(1):C.div.iaddn(1)},i.prototype.modn=function(P){n(P<=67108863);for(var C=(1<<26)%P,v=0,w=this.length-1;w>=0;w--)v=(C*v+(this.words[w]|0))%P;return v},i.prototype.idivn=function(P){n(P<=67108863);for(var C=0,v=this.length-1;v>=0;v--){var w=(this.words[v]|0)+C*67108864;this.words[v]=w/P|0,C=w%P}return this.strip()},i.prototype.divn=function(P){return this.clone().idivn(P)},i.prototype.egcd=function(P){n(P.negative===0),n(!P.isZero());var C=this,v=P.clone();C.negative!==0?C=C.umod(P):C=C.clone();for(var w=new i(1),B=new i(0),R=new i(0),L=new i(1),U=0;C.isEven()&&v.isEven();)C.iushrn(1),v.iushrn(1),++U;for(var S=v.clone(),F=C.clone();!C.isZero();){for(var T=0,q=1;!(C.words[0]&q)&&T<26;++T,q<<=1);if(T>0)for(C.iushrn(T);T-- >0;)(w.isOdd()||B.isOdd())&&(w.iadd(S),B.isub(F)),w.iushrn(1),B.iushrn(1);for(var J=0,te=1;!(v.words[0]&te)&&J<26;++J,te<<=1);if(J>0)for(v.iushrn(J);J-- >0;)(R.isOdd()||L.isOdd())&&(R.iadd(S),L.isub(F)),R.iushrn(1),L.iushrn(1);C.cmp(v)>=0?(C.isub(v),w.isub(R),B.isub(L)):(v.isub(C),R.isub(w),L.isub(B))}return{a:R,b:L,gcd:v.iushln(U)}},i.prototype._invmp=function(P){n(P.negative===0),n(!P.isZero());var C=this,v=P.clone();C.negative!==0?C=C.umod(P):C=C.clone();for(var w=new i(1),B=new i(0),R=v.clone();C.cmpn(1)>0&&v.cmpn(1)>0;){for(var L=0,U=1;!(C.words[0]&U)&&L<26;++L,U<<=1);if(L>0)for(C.iushrn(L);L-- >0;)w.isOdd()&&w.iadd(R),w.iushrn(1);for(var S=0,F=1;!(v.words[0]&F)&&S<26;++S,F<<=1);if(S>0)for(v.iushrn(S);S-- >0;)B.isOdd()&&B.iadd(R),B.iushrn(1);C.cmp(v)>=0?(C.isub(v),w.isub(B)):(v.isub(C),B.isub(w))}var T;return C.cmpn(1)===0?T=w:T=B,T.cmpn(0)<0&&T.iadd(P),T},i.prototype.gcd=function(P){if(this.isZero())return P.abs();if(P.isZero())return this.abs();var C=this.clone(),v=P.clone();C.negative=0,v.negative=0;for(var w=0;C.isEven()&&v.isEven();w++)C.iushrn(1),v.iushrn(1);do{for(;C.isEven();)C.iushrn(1);for(;v.isEven();)v.iushrn(1);var B=C.cmp(v);if(B<0){var R=C;C=v,v=R}else if(B===0||v.cmpn(1)===0)break;C.isub(v)}while(!0);return v.iushln(w)},i.prototype.invm=function(P){return this.egcd(P).a.umod(P)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(P){return this.words[0]&P},i.prototype.bincn=function(P){n(typeof P=="number");var C=P%26,v=(P-C)/26,w=1<>>26,L&=67108863,this.words[R]=L}return B!==0&&(this.words[R]=B,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(P){var C=P<0;if(this.negative!==0&&!C)return-1;if(this.negative===0&&C)return 1;this.strip();var v;if(this.length>1)v=1;else{C&&(P=-P),n(P<=67108863,"Number is too big");var w=this.words[0]|0;v=w===P?0:wP.length)return 1;if(this.length=0;v--){var w=this.words[v]|0,B=P.words[v]|0;if(w!==B){wB&&(C=1);break}}return C},i.prototype.gtn=function(P){return this.cmpn(P)===1},i.prototype.gt=function(P){return this.cmp(P)===1},i.prototype.gten=function(P){return this.cmpn(P)>=0},i.prototype.gte=function(P){return this.cmp(P)>=0},i.prototype.ltn=function(P){return this.cmpn(P)===-1},i.prototype.lt=function(P){return this.cmp(P)===-1},i.prototype.lten=function(P){return this.cmpn(P)<=0},i.prototype.lte=function(P){return this.cmp(P)<=0},i.prototype.eqn=function(P){return this.cmpn(P)===0},i.prototype.eq=function(P){return this.cmp(P)===0},i.red=function(P){return new V(P)},i.prototype.toRed=function(P){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),P.convertTo(this)._forceRed(P)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(P){return this.red=P,this},i.prototype.forceRed=function(P){return n(!this.red,"Already a number in reduction context"),this._forceRed(P)},i.prototype.redAdd=function(P){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,P)},i.prototype.redIAdd=function(P){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,P)},i.prototype.redSub=function(P){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,P)},i.prototype.redISub=function(P){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,P)},i.prototype.redShl=function(P){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,P)},i.prototype.redMul=function(P){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.mul(this,P)},i.prototype.redIMul=function(P){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.imul(this,P)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(P){return n(this.red&&!P.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,P)};var E={k256:null,p224:null,p192:null,p25519:null};function A(W,P){this.name=W,this.p=new i(P,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}A.prototype._tmp=function(){var P=new i(null);return P.words=new Array(Math.ceil(this.n/13)),P},A.prototype.ireduce=function(P){var C=P,v;do this.split(C,this.tmp),C=this.imulK(C),C=C.iadd(this.tmp),v=C.bitLength();while(v>this.n);var w=v0?C.isub(this.p):C.strip!==void 0?C.strip():C._strip(),C},A.prototype.split=function(P,C){P.iushrn(this.n,0,C)},A.prototype.imulK=function(P){return P.imul(this.k)};function D(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(D,A),D.prototype.split=function(P,C){for(var v=4194303,w=Math.min(P.length,9),B=0;B>>22,R=L}R>>>=22,P.words[B-10]=R,R===0&&P.length>10?P.length-=10:P.length-=9},D.prototype.imulK=function(P){P.words[P.length]=0,P.words[P.length+1]=0,P.length+=2;for(var C=0,v=0;v>>=26,P.words[v]=B,C=w}return C!==0&&(P.words[P.length++]=C),P},i._prime=function(P){if(E[P])return E[P];var C;if(P==="k256")C=new D;else if(P==="p224")C=new $;else if(P==="p192")C=new g;else if(P==="p25519")C=new N;else throw new Error("Unknown prime "+P);return E[P]=C,C};function V(W){if(typeof W=="string"){var P=i._prime(W);this.m=P.p,this.prime=P}else n(W.gtn(1),"modulus must be greater than 1"),this.m=W,this.prime=null}V.prototype._verify1=function(P){n(P.negative===0,"red works only with positives"),n(P.red,"red works only with red numbers")},V.prototype._verify2=function(P,C){n((P.negative|C.negative)===0,"red works only with positives"),n(P.red&&P.red===C.red,"red works only with red numbers")},V.prototype.imod=function(P){return this.prime?this.prime.ireduce(P)._forceRed(this):P.umod(this.m)._forceRed(this)},V.prototype.neg=function(P){return P.isZero()?P.clone():this.m.sub(P)._forceRed(this)},V.prototype.add=function(P,C){this._verify2(P,C);var v=P.add(C);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},V.prototype.iadd=function(P,C){this._verify2(P,C);var v=P.iadd(C);return v.cmp(this.m)>=0&&v.isub(this.m),v},V.prototype.sub=function(P,C){this._verify2(P,C);var v=P.sub(C);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},V.prototype.isub=function(P,C){this._verify2(P,C);var v=P.isub(C);return v.cmpn(0)<0&&v.iadd(this.m),v},V.prototype.shl=function(P,C){return this._verify1(P),this.imod(P.ushln(C))},V.prototype.imul=function(P,C){return this._verify2(P,C),this.imod(P.imul(C))},V.prototype.mul=function(P,C){return this._verify2(P,C),this.imod(P.mul(C))},V.prototype.isqr=function(P){return this.imul(P,P.clone())},V.prototype.sqr=function(P){return this.mul(P,P)},V.prototype.sqrt=function(P){if(P.isZero())return P.clone();var C=this.m.andln(3);if(n(C%2===1),C===3){var v=this.m.add(new i(1)).iushrn(2);return this.pow(P,v)}for(var w=this.m.subn(1),B=0;!w.isZero()&&w.andln(1)===0;)B++,w.iushrn(1);n(!w.isZero());var R=new i(1).toRed(this),L=R.redNeg(),U=this.m.subn(1).iushrn(1),S=this.m.bitLength();for(S=new i(2*S*S).toRed(this);this.pow(S,U).cmp(L)!==0;)S.redIAdd(L);for(var F=this.pow(S,w),T=this.pow(P,w.addn(1).iushrn(1)),q=this.pow(P,w),J=B;q.cmp(R)!==0;){for(var te=q,ie=0;te.cmp(R)!==0;ie++)te=te.redSqr();n(ie=0;B--){for(var F=C.words[B],T=S-1;T>=0;T--){var q=F>>T&1;if(R!==w[0]&&(R=this.sqr(R)),q===0&&L===0){U=0;continue}L<<=1,L|=q,U++,!(U!==v&&(B!==0||T!==0))&&(R=this.mul(R,w[L]),U=0,L=0)}S=26}return R},V.prototype.convertTo=function(P){var C=P.umod(this.m);return C===P?C.clone():C},V.prototype.convertFrom=function(P){var C=P.clone();return C.red=null,C},i.mont=function(P){return new K(P)};function K(W){V.call(this,W),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}o(K,V),K.prototype.convertTo=function(P){return this.imod(P.ushln(this.shift))},K.prototype.convertFrom=function(P){var C=this.imod(P.mul(this.rinv));return C.red=null,C},K.prototype.imul=function(P,C){if(P.isZero()||C.isZero())return P.words[0]=0,P.length=1,P;var v=P.imul(C),w=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=v.isub(w).iushrn(this.shift),R=B;return B.cmp(this.m)>=0?R=B.isub(this.m):B.cmpn(0)<0&&(R=B.iadd(this.m)),R._forceRed(this)},K.prototype.mul=function(P,C){if(P.isZero()||C.isZero())return new i(0)._forceRed(this);var v=P.mul(C),w=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=v.isub(w).iushrn(this.shift),R=B;return B.cmp(this.m)>=0?R=B.isub(this.m):B.cmpn(0)<0&&(R=B.iadd(this.m)),R._forceRed(this)},K.prototype.invm=function(P){var C=this.imod(P._invmp(this.m).mul(this.r2));return C._forceRed(this)}})(e,Le)})(v4);var Ta=v4.exports,Zl=jU;function jU(e,t){if(!e)throw new Error(t||"Assertion failed")}jU.equal=function(t,r,n){if(t!=r)throw new Error(n||"Assertion failed: "+t+" != "+r)};var g4={};(function(e){var t=e;function r(i,a){if(Array.isArray(i))return i.slice();if(!i)return[];var s=[];if(typeof i!="string"){for(var l=0;l>8,f=c&255;u?s.push(u,f):s.push(f)}return s}t.toArray=r;function n(i){return i.length===1?"0"+i:i}t.zero2=n;function o(i){for(var a="",s=0;s(h>>1)-1?b=(h>>1)-m:b=m,y.isubn(b)):b=0,p[_]=b,y.iushrn(1)}return p}t.getNAF=i;function a(u,f){var d=[[],[]];u=u.clone(),f=f.clone();for(var p=0,h=0,y;u.cmpn(-p)>0||f.cmpn(-h)>0;){var _=u.andln(3)+p&3,b=f.andln(3)+h&3;_===3&&(_=-1),b===3&&(b=-1);var m;_&1?(y=u.andln(7)+p&7,(y===3||y===5)&&b===2?m=-_:m=_):m=0,d[0].push(m);var E;b&1?(y=f.andln(7)+h&7,(y===3||y===5)&&_===2?E=-b:E=b):E=0,d[1].push(E),2*p===m+1&&(p=1-p),2*h===E+1&&(h=1-h),u.iushrn(1),f.iushrn(1)}return d}t.getJSF=a;function s(u,f,d){var p="_"+f;u.prototype[f]=function(){return this[p]!==void 0?this[p]:this[p]=d.call(this)}}t.cachedProperty=s;function l(u){return typeof u=="string"?t.toArray(u,"hex"):u}t.parseBytes=l;function c(u){return new r(u,"hex","le")}t.intFromLE=c})(Qn);var m4={exports:{}},cw;m4.exports=function(t){return cw||(cw=new cs(null)),cw.generate(t)};function cs(e){this.rand=e}m4.exports.Rand=cs;cs.prototype.generate=function(t){return this._rand(t)};cs.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var r=new Uint8Array(t),n=0;n0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var By=qs;qs.prototype.point=function(){throw new Error("Not implemented")};qs.prototype.validate=function(){throw new Error("Not implemented")};qs.prototype._fixedNafMul=function(t,r){um(t.precomputed);var n=t._getDoubles(),o=cm(r,1,this._bitLength),i=(1<=s;c--)l=(l<<1)+o[c];a.push(l)}for(var u=this.jpoint(null,null,null),f=this.jpoint(null,null,null),d=i;d>0;d--){for(s=0;s=0;l--){for(var c=0;l>=0&&a[l]===0;l--)c++;if(l>=0&&c++,s=s.dblp(c),l<0)break;var u=a[l];um(u!==0),t.type==="affine"?u>0?s=s.mixedAdd(i[u-1>>1]):s=s.mixedAdd(i[-u-1>>1].neg()):u>0?s=s.add(i[u-1>>1]):s=s.add(i[-u-1>>1].neg())}return t.type==="affine"?s.toP():s};qs.prototype._wnafMulAdd=function(t,r,n,o,i){var a=this._wnafT1,s=this._wnafT2,l=this._wnafT3,c=0,u,f,d;for(u=0;u=1;u-=2){var h=u-1,y=u;if(a[h]!==1||a[y]!==1){l[h]=cm(n[h],a[h],this._bitLength),l[y]=cm(n[y],a[y],this._bitLength),c=Math.max(l[h].length,c),c=Math.max(l[y].length,c);continue}var _=[r[h],null,null,r[y]];r[h].y.cmp(r[y].y)===0?(_[1]=r[h].add(r[y]),_[2]=r[h].toJ().mixedAdd(r[y].neg())):r[h].y.cmp(r[y].y.redNeg())===0?(_[1]=r[h].toJ().mixedAdd(r[y]),_[2]=r[h].add(r[y].neg())):(_[1]=r[h].toJ().mixedAdd(r[y]),_[2]=r[h].toJ().mixedAdd(r[y].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],m=_xe(n[h],n[y]);for(c=Math.max(m[0].length,c),l[h]=new Array(c),l[y]=new Array(c),f=0;f=0;u--){for(var g=0;u>=0;){var N=!0;for(f=0;f=0&&g++,D=D.dblp(g),u<0)break;for(f=0;f0?d=s[f][V-1>>1]:V<0&&(d=s[f][-V-1>>1].neg()),d.type==="affine"?D=D.mixedAdd(d):D=D.add(d))}}for(u=0;u=Math.ceil((t.bitLength()+1)/r.step):!1};Co.prototype._getDoubles=function(t,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],o=this,i=0;i=0&&(p=c,h=u),f.negative&&(f=f.neg(),d=d.neg()),p.negative&&(p=p.neg(),h=h.neg()),[{a:f,b:d},{a:p,b:h}]};Po.prototype._endoSplit=function(t){var r=this.endo.basis,n=r[0],o=r[1],i=o.b.mul(t).divRound(this.n),a=n.b.neg().mul(t).divRound(this.n),s=i.mul(n.a),l=a.mul(o.a),c=i.mul(n.b),u=a.mul(o.b),f=t.sub(s).sub(l),d=c.add(u).neg();return{k1:f,k2:d}};Po.prototype.pointFromX=function(t,r){t=new or(t,16),t.red||(t=t.toRed(this.red));var n=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),o=n.redSqrt();if(o.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var i=o.fromRed().isOdd();return(r&&!i||!r&&i)&&(o=o.redNeg()),this.point(t,o)};Po.prototype.validate=function(t){if(t.inf)return!0;var r=t.x,n=t.y,o=this.a.redMul(r),i=r.redSqr().redMul(r).redIAdd(o).redIAdd(this.b);return n.redSqr().redISub(i).cmpn(0)===0};Po.prototype._endoWnafMulAdd=function(t,r,n){for(var o=this._endoWnafT1,i=this._endoWnafT2,a=0;a":""};kr.prototype.isInfinity=function(){return this.inf};kr.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(this.x.cmp(t.x)===0)return this.curve.point(null,null);var r=this.y.redSub(t.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(t.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(t.x),o=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,o)};kr.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(t.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),o=t.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(o),a=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)};kr.prototype.getX=function(){return this.x.fromRed()};kr.prototype.getY=function(){return this.y.fromRed()};kr.prototype.mul=function(t){return t=new or(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)};kr.prototype.mulAdd=function(t,r,n){var o=[this,r],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(o,i):this.curve._wnafMulAdd(1,o,i,2)};kr.prototype.jmulAdd=function(t,r,n){var o=[this,r],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(o,i,!0):this.curve._wnafMulAdd(1,o,i,2,!0)};kr.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||this.x.cmp(t.x)===0&&this.y.cmp(t.y)===0)};kr.prototype.neg=function(t){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var n=this.precomputed,o=function(i){return i.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(o)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(o)}}}return r};kr.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t};function zr(e,t,r,n){Ku.BasePoint.call(this,e,"jacobian"),t===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new or(0)):(this.x=new or(t,16),this.y=new or(r,16),this.z=new or(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}b4(zr,Ku.BasePoint);Po.prototype.jpoint=function(t,r,n){return new zr(this,t,r,n)};zr.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),r=t.redSqr(),n=this.x.redMul(r),o=this.y.redMul(r).redMul(t);return this.curve.point(n,o)};zr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};zr.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var r=t.z.redSqr(),n=this.z.redSqr(),o=this.x.redMul(r),i=t.x.redMul(n),a=this.y.redMul(r.redMul(t.z)),s=t.y.redMul(n.redMul(this.z)),l=o.redSub(i),c=a.redSub(s);if(l.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var u=l.redSqr(),f=u.redMul(l),d=o.redMul(u),p=c.redSqr().redIAdd(f).redISub(d).redISub(d),h=c.redMul(d.redISub(p)).redISub(a.redMul(f)),y=this.z.redMul(t.z).redMul(l);return this.curve.jpoint(p,h,y)};zr.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var r=this.z.redSqr(),n=this.x,o=t.x.redMul(r),i=this.y,a=t.y.redMul(r).redMul(this.z),s=n.redSub(o),l=i.redSub(a);if(s.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),f=n.redMul(c),d=l.redSqr().redIAdd(u).redISub(f).redISub(f),p=l.redMul(f.redISub(d)).redISub(i.redMul(u)),h=this.z.redMul(s);return this.curve.jpoint(d,p,h)};zr.prototype.dblp=function(t){if(t===0)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(i),this.x.cmp(n)===0)return!0}};zr.prototype.inspect=function(){return this.isInfinity()?"":""};zr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var jc=Ta,zU=jy,Ly=By,Pxe=Qn;function Yu(e){Ly.call(this,"mont",e),this.a=new jc(e.a,16).toRed(this.red),this.b=new jc(e.b,16).toRed(this.red),this.i4=new jc(4).toRed(this.red).redInvm(),this.two=new jc(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}zU(Yu,Ly);var Oxe=Yu;Yu.prototype.validate=function(t){var r=t.normalize().x,n=r.redSqr(),o=n.redMul(r).redAdd(n.redMul(this.a)).redAdd(r),i=o.redSqrt();return i.redSqr().cmp(o)===0};function Pr(e,t,r){Ly.BasePoint.call(this,e,"projective"),t===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new jc(t,16),this.z=new jc(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}zU(Pr,Ly.BasePoint);Yu.prototype.decodePoint=function(t,r){return this.point(Pxe.toArray(t,r),1)};Yu.prototype.point=function(t,r){return new Pr(this,t,r)};Yu.prototype.pointFromJSON=function(t){return Pr.fromJSON(this,t)};Pr.prototype.precompute=function(){};Pr.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};Pr.fromJSON=function(t,r){return new Pr(t,r[0],r[1]||t.one)};Pr.prototype.inspect=function(){return this.isInfinity()?"":""};Pr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};Pr.prototype.dbl=function(){var t=this.x.redAdd(this.z),r=t.redSqr(),n=this.x.redSub(this.z),o=n.redSqr(),i=r.redSub(o),a=r.redMul(o),s=i.redMul(o.redAdd(this.curve.a24.redMul(i)));return this.curve.point(a,s)};Pr.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};Pr.prototype.diffAdd=function(t,r){var n=this.x.redAdd(this.z),o=this.x.redSub(this.z),i=t.x.redAdd(t.z),a=t.x.redSub(t.z),s=a.redMul(n),l=i.redMul(o),c=r.z.redMul(s.redAdd(l).redSqr()),u=r.x.redMul(s.redISub(l).redSqr());return this.curve.point(c,u)};Pr.prototype.mul=function(t){for(var r=t.clone(),n=this,o=this.curve.point(null,null),i=this,a=[];r.cmpn(0)!==0;r.iushrn(1))a.push(r.andln(1));for(var s=a.length-1;s>=0;s--)a[s]===0?(n=n.diffAdd(o,i),o=o.dbl()):(o=n.diffAdd(o,i),n=n.dbl());return o};Pr.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};Pr.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};Pr.prototype.eq=function(t){return this.getX().cmp(t.getX())===0};Pr.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};Pr.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var Axe=Qn,ua=Ta,UU=jy,zy=By,kxe=Axe.assert;function Ni(e){this.twisted=(e.a|0)!==1,this.mOneA=this.twisted&&(e.a|0)===-1,this.extended=this.mOneA,zy.call(this,"edwards",e),this.a=new ua(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new ua(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new ua(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),kxe(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(e.c|0)===1}UU(Ni,zy);var Ixe=Ni;Ni.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)};Ni.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)};Ni.prototype.jpoint=function(t,r,n,o){return this.point(t,r,n,o)};Ni.prototype.pointFromX=function(t,r){t=new ua(t,16),t.red||(t=t.toRed(this.red));var n=t.redSqr(),o=this.c2.redSub(this.a.redMul(n)),i=this.one.redSub(this.c2.redMul(this.d).redMul(n)),a=o.redMul(i.redInvm()),s=a.redSqrt();if(s.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");var l=s.fromRed().isOdd();return(r&&!l||!r&&l)&&(s=s.redNeg()),this.point(t,s)};Ni.prototype.pointFromY=function(t,r){t=new ua(t,16),t.red||(t=t.toRed(this.red));var n=t.redSqr(),o=n.redSub(this.c2),i=n.redMul(this.d).redMul(this.c2).redSub(this.a),a=o.redMul(i.redInvm());if(a.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,t)}var s=a.redSqrt();if(s.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");return s.fromRed().isOdd()!==r&&(s=s.redNeg()),this.point(s,t)};Ni.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var r=t.x.redSqr(),n=t.y.redSqr(),o=r.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(n)));return o.cmp(i)===0};function zt(e,t,r,n,o){zy.BasePoint.call(this,e,"projective"),t===null&&r===null&&n===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new ua(t,16),this.y=new ua(r,16),this.z=n?new ua(n,16):this.curve.one,this.t=o&&new ua(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}UU(zt,zy.BasePoint);Ni.prototype.pointFromJSON=function(t){return zt.fromJSON(this,t)};Ni.prototype.point=function(t,r,n,o){return new zt(this,t,r,n,o)};zt.fromJSON=function(t,r){return new zt(t,r[0],r[1],r[2])};zt.prototype.inspect=function(){return this.isInfinity()?"":""};zt.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};zt.prototype._extDbl=function(){var t=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var o=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(r),a=o.redAdd(r),s=a.redSub(n),l=o.redSub(r),c=i.redMul(s),u=a.redMul(l),f=i.redMul(l),d=s.redMul(a);return this.curve.point(c,u,d,f)};zt.prototype._projDbl=function(){var t=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),n=this.y.redSqr(),o,i,a,s,l,c;if(this.curve.twisted){s=this.curve._mulA(r);var u=s.redAdd(n);this.zOne?(o=t.redSub(r).redSub(n).redMul(u.redSub(this.curve.two)),i=u.redMul(s.redSub(n)),a=u.redSqr().redSub(u).redSub(u)):(l=this.z.redSqr(),c=u.redSub(l).redISub(l),o=t.redSub(r).redISub(n).redMul(c),i=u.redMul(s.redSub(n)),a=u.redMul(c))}else s=r.redAdd(n),l=this.curve._mulC(this.z).redSqr(),c=s.redSub(l).redSub(l),o=this.curve._mulC(t.redISub(s)).redMul(c),i=this.curve._mulC(s).redMul(r.redISub(n)),a=s.redMul(c);return this.curve.point(o,i,a)};zt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};zt.prototype._extAdd=function(t){var r=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),n=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),o=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),a=n.redSub(r),s=i.redSub(o),l=i.redAdd(o),c=n.redAdd(r),u=a.redMul(s),f=l.redMul(c),d=a.redMul(c),p=s.redMul(l);return this.curve.point(u,f,p,d)};zt.prototype._projAdd=function(t){var r=this.z.redMul(t.z),n=r.redSqr(),o=this.x.redMul(t.x),i=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(i),s=n.redSub(a),l=n.redAdd(a),c=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(i),u=r.redMul(s).redMul(c),f,d;return this.curve.twisted?(f=r.redMul(l).redMul(i.redSub(this.curve._mulA(o))),d=s.redMul(l)):(f=r.redMul(l).redMul(i.redSub(o)),d=this.curve._mulC(s).redMul(l)),this.curve.point(u,f,d)};zt.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)};zt.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)};zt.prototype.mulAdd=function(t,r,n){return this.curve._wnafMulAdd(1,[this,r],[t,n],2,!1)};zt.prototype.jmulAdd=function(t,r,n){return this.curve._wnafMulAdd(1,[this,r],[t,n],2,!0)};zt.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this};zt.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};zt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};zt.prototype.getY=function(){return this.normalize(),this.y.fromRed()};zt.prototype.eq=function(t){return this===t||this.getX().cmp(t.getX())===0&&this.getY().cmp(t.getY())===0};zt.prototype.eqXToP=function(t){var r=t.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var n=t.clone(),o=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(o),this.x.cmp(r)===0)return!0}};zt.prototype.toP=zt.prototype.normalize;zt.prototype.mixedAdd=zt.prototype.add;(function(e){var t=e;t.base=By,t.short=Cxe,t.mont=Oxe,t.edwards=Ixe})(y4);var Uy={},Hy={},Et={},$xe=Zl,Txe=jy;Et.inherits=Txe;function Dxe(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function Mxe(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e=="string")if(t){if(t==="hex")for(e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e),o=0;o>6|192,r[n++]=i&63|128):Dxe(e,o)?(i=65536+((i&1023)<<10)+(e.charCodeAt(++o)&1023),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=i&63|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=i&63|128)}else for(o=0;o>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}Et.htonl=HU;function Nxe(e,t){for(var r="",n=0;n>>0}return i}Et.join32=Fxe;function Bxe(e,t){for(var r=new Array(e.length*4),n=0,o=0;n>>24,r[o+1]=i>>>16&255,r[o+2]=i>>>8&255,r[o+3]=i&255):(r[o+3]=i>>>24,r[o+2]=i>>>16&255,r[o+1]=i>>>8&255,r[o]=i&255)}return r}Et.split32=Bxe;function jxe(e,t){return e>>>t|e<<32-t}Et.rotr32=jxe;function Lxe(e,t){return e<>>32-t}Et.rotl32=Lxe;function zxe(e,t){return e+t>>>0}Et.sum32=zxe;function Uxe(e,t,r){return e+t+r>>>0}Et.sum32_3=Uxe;function Hxe(e,t,r,n){return e+t+r+n>>>0}Et.sum32_4=Hxe;function Vxe(e,t,r,n,o){return e+t+r+n+o>>>0}Et.sum32_5=Vxe;function Wxe(e,t,r,n){var o=e[t],i=e[t+1],a=n+i>>>0,s=(a>>0,e[t+1]=a}Et.sum64=Wxe;function qxe(e,t,r,n){var o=t+n>>>0,i=(o>>0}Et.sum64_hi=qxe;function Gxe(e,t,r,n){var o=t+n;return o>>>0}Et.sum64_lo=Gxe;function Kxe(e,t,r,n,o,i,a,s){var l=0,c=t;c=c+n>>>0,l+=c>>0,l+=c>>0,l+=c>>0}Et.sum64_4_hi=Kxe;function Yxe(e,t,r,n,o,i,a,s){var l=t+n+i+s;return l>>>0}Et.sum64_4_lo=Yxe;function Xxe(e,t,r,n,o,i,a,s,l,c){var u=0,f=t;f=f+n>>>0,u+=f>>0,u+=f>>0,u+=f>>0,u+=f>>0}Et.sum64_5_hi=Xxe;function Zxe(e,t,r,n,o,i,a,s,l,c){var u=t+n+i+s+c;return u>>>0}Et.sum64_5_lo=Zxe;function Jxe(e,t,r){var n=t<<32-r|e>>>r;return n>>>0}Et.rotr64_hi=Jxe;function Qxe(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}Et.rotr64_lo=Qxe;function e6e(e,t,r){return e>>>r}Et.shr64_hi=e6e;function t6e(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}Et.shr64_lo=t6e;var Xu={},NA=Et,r6e=Zl;function Vy(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Xu.BlockHash=Vy;Vy.prototype.update=function(t,r){if(t=NA.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var n=t.length%this._delta8;this.pending=t.slice(t.length-n,t.length),this.pending.length===0&&(this.pending=null),t=NA.join32(t,0,t.length-n,this.endian);for(var o=0;o>>24&255,o[i++]=t>>>16&255,o[i++]=t>>>8&255,o[i++]=t&255}else for(o[i++]=t&255,o[i++]=t>>>8&255,o[i++]=t>>>16&255,o[i++]=t>>>24&255,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,a=8;a>>3}Fi.g0_256=s6e;function l6e(e){return Oi(e,17)^Oi(e,19)^e>>>10}Fi.g1_256=l6e;var Su=Et,c6e=Xu,u6e=Fi,uw=Su.rotl32,jf=Su.sum32,f6e=Su.sum32_5,d6e=u6e.ft_1,YU=c6e.BlockHash,p6e=[1518500249,1859775393,2400959708,3395469782];function Ti(){if(!(this instanceof Ti))return new Ti;YU.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Su.inherits(Ti,YU);var h6e=Ti;Ti.blockSize=512;Ti.outSize=160;Ti.hmacStrength=80;Ti.padLength=64;Ti.prototype._update=function(t,r){for(var n=this.W,o=0;o<16;o++)n[o]=t[r+o];for(;othis.blockSize&&(t=new this.Hash().update(t).digest()),t_e(t.length<=this.blockSize);for(var r=t.length;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var i_e=Ns;Ns.prototype._init=function(t,r,n){var o=t.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(n||[])),this._reseed=1};Ns.prototype.generate=function(t,r,n,o){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(o=n,n=r,r=null),n&&(n=Al.toArray(n,o||"hex"),this._update(n));for(var i=[];i.length"};var fm=Ta,w4=Qn,c_e=w4.assert;function Wy(e,t){if(e instanceof Wy)return e;this._importDER(e,t)||(c_e(e.r&&e.s,"Signature without r or s"),this.r=new fm(e.r,16),this.s=new fm(e.s,16),e.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var u_e=Wy;function f_e(){this.place=0}function hw(e,t){var r=e[t.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var o=0,i=0,a=t.place;i>>=0;return o<=127?!1:(t.place=a,o)}function zA(e){for(var t=0,r=e.length-1;!e[t]&&!(e[t+1]&128)&&t>>3);for(e.push(r|128);--r;)e.push(t>>>(r<<3)&255);e.push(t)}Wy.prototype.toDER=function(t){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=zA(r),n=zA(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var o=[2];vw(o,r.length),o=o.concat(r),o.push(2),vw(o,n.length);var i=o.concat(n),a=[48];return vw(a,i.length),a=a.concat(i),w4.encode(a,t)};var kl=Ta,sH=i_e,d_e=Qn,gw=Uy,p_e=LU,lH=d_e.assert,x4=l_e,qy=u_e;function Eo(e){if(!(this instanceof Eo))return new Eo(e);typeof e=="string"&&(lH(Object.prototype.hasOwnProperty.call(gw,e),"Unknown curve "+e),e=gw[e]),e instanceof gw.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var h_e=Eo;Eo.prototype.keyPair=function(t){return new x4(this,t)};Eo.prototype.keyFromPrivate=function(t,r){return x4.fromPrivate(this,t,r)};Eo.prototype.keyFromPublic=function(t,r){return x4.fromPublic(this,t,r)};Eo.prototype.genKeyPair=function(t){t||(t={});for(var r=new sH({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||p_e(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),o=this.n.sub(new kl(2));;){var i=new kl(r.generate(n));if(!(i.cmp(o)>0))return i.iaddn(1),this.keyFromPrivate(i)}};Eo.prototype._truncateToN=function(t,r){var n=t.byteLength()*8-this.n.bitLength();return n>0&&(t=t.ushrn(n)),!r&&t.cmp(this.n)>=0?t.sub(this.n):t};Eo.prototype.sign=function(t,r,n,o){typeof n=="object"&&(o=n,n=null),o||(o={}),r=this.keyFromPrivate(r,n),t=this._truncateToN(new kl(t,16));for(var i=this.n.byteLength(),a=r.getPrivate().toArray("be",i),s=t.toArray("be",i),l=new sH({hash:this.hash,entropy:a,nonce:s,pers:o.pers,persEnc:o.persEnc||"utf8"}),c=this.n.sub(new kl(1)),u=0;;u++){var f=o.k?o.k(u):new kl(l.generate(this.n.byteLength()));if(f=this._truncateToN(f,!0),!(f.cmpn(1)<=0||f.cmp(c)>=0)){var d=this.g.mul(f);if(!d.isInfinity()){var p=d.getX(),h=p.umod(this.n);if(h.cmpn(0)!==0){var y=f.invm(this.n).mul(h.mul(r.getPrivate()).iadd(t));if(y=y.umod(this.n),y.cmpn(0)!==0){var _=(d.getY().isOdd()?1:0)|(p.cmp(h)!==0?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),_^=1),new qy({r:h,s:y,recoveryParam:_})}}}}}};Eo.prototype.verify=function(t,r,n,o){t=this._truncateToN(new kl(t,16)),n=this.keyFromPublic(n,o),r=new qy(r,"hex");var i=r.r,a=r.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s=a.invm(this.n),l=s.mul(t).umod(this.n),c=s.mul(i).umod(this.n),u;return this.curve._maxwellTrick?(u=this.g.jmulAdd(l,n.getPublic(),c),u.isInfinity()?!1:u.eqXToP(i)):(u=this.g.mulAdd(l,n.getPublic(),c),u.isInfinity()?!1:u.getX().umod(this.n).cmp(i)===0)};Eo.prototype.recoverPubKey=function(e,t,r,n){lH((3&r)===r,"The recovery param is more than two bits"),t=new qy(t,n);var o=this.n,i=new kl(e),a=t.r,s=t.s,l=r&1,c=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");c?a=this.curve.pointFromX(a.add(this.curve.n),l):a=this.curve.pointFromX(a,l);var u=t.r.invm(o),f=o.sub(i).mul(u).umod(o),d=s.mul(u).umod(o);return this.g.mulAdd(f,a,d)};Eo.prototype.getKeyRecoveryParam=function(e,t,r,n){if(t=new qy(t,n),t.recoveryParam!==null)return t.recoveryParam;for(var o=0;o<4;o++){var i;try{i=this.recoverPubKey(e,t,o)}catch{continue}if(i.eq(r))return o}throw new Error("Unable to find valid recovery factor")};var dh=Qn,cH=dh.assert,UA=dh.parseBytes,Qu=dh.cachedProperty;function Sr(e,t){this.eddsa=e,this._secret=UA(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=UA(t.pub)}Sr.fromPublic=function(t,r){return r instanceof Sr?r:new Sr(t,{pub:r})};Sr.fromSecret=function(t,r){return r instanceof Sr?r:new Sr(t,{secret:r})};Sr.prototype.secret=function(){return this._secret};Qu(Sr,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});Qu(Sr,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});Qu(Sr,"privBytes",function(){var t=this.eddsa,r=this.hash(),n=t.encodingLength-1,o=r.slice(0,t.encodingLength);return o[0]&=248,o[n]&=127,o[n]|=64,o});Qu(Sr,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});Qu(Sr,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});Qu(Sr,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});Sr.prototype.sign=function(t){return cH(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)};Sr.prototype.verify=function(t,r){return this.eddsa.verify(t,r,this)};Sr.prototype.getSecret=function(t){return cH(this._secret,"KeyPair is public only"),dh.encode(this.secret(),t)};Sr.prototype.getPublic=function(t){return dh.encode(this.pubBytes(),t)};var v_e=Sr,g_e=Ta,Gy=Qn,m_e=Gy.assert,Ky=Gy.cachedProperty,y_e=Gy.parseBytes;function Jl(e,t){this.eddsa=e,typeof t!="object"&&(t=y_e(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),m_e(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof g_e&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}Ky(Jl,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});Ky(Jl,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});Ky(Jl,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});Ky(Jl,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});Jl.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};Jl.prototype.toHex=function(){return Gy.encode(this.toBytes(),"hex").toUpperCase()};var b_e=Jl,w_e=Hy,x_e=Uy,Ou=Qn,__e=Ou.assert,uH=Ou.parseBytes,fH=v_e,HA=b_e;function Tn(e){if(__e(e==="ed25519","only tested with ed25519 so far"),!(this instanceof Tn))return new Tn(e);e=x_e[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=w_e.sha512}var E_e=Tn;Tn.prototype.sign=function(t,r){t=uH(t);var n=this.keyFromSecret(r),o=this.hashInt(n.messagePrefix(),t),i=this.g.mul(o),a=this.encodePoint(i),s=this.hashInt(a,n.pubBytes(),t).mul(n.priv()),l=o.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:l,Rencoded:a})};Tn.prototype.verify=function(t,r,n){t=uH(t),r=this.makeSignature(r);var o=this.keyFromPublic(n),i=this.hashInt(r.Rencoded(),o.pubBytes(),t),a=this.g.mul(r.S()),s=r.R().add(o.pub().mul(i));return s.eq(a)};Tn.prototype.hashInt=function(){for(var t=this.hash(),r=0;r0?v:w},i.min=function(v,w){return v.cmp(w)<0?v:w},i.prototype._init=function(v,w,B){if(typeof v=="number")return this._initNumber(v,w,B);if(typeof v=="object")return this._initArray(v,w,B);w==="hex"&&(w=16),n(w===(w|0)&&w>=2&&w<=36),v=v.toString().replace(/\s+/g,"");var R=0;v[0]==="-"&&(R++,this.negative=1),R=0;R-=3)U=v[R]|v[R-1]<<8|v[R-2]<<16,this.words[L]|=U<>>26-S&67108863,S+=24,S>=26&&(S-=26,L++);else if(B==="le")for(R=0,L=0;R>>26-S&67108863,S+=24,S>=26&&(S-=26,L++);return this._strip()};function s(C,v){var w=C.charCodeAt(v);if(w>=48&&w<=57)return w-48;if(w>=65&&w<=70)return w-55;if(w>=97&&w<=102)return w-87;n(!1,"Invalid character in "+C)}function l(C,v,w){var B=s(C,w);return w-1>=v&&(B|=s(C,w-1)<<4),B}i.prototype._parseHex=function(v,w,B){this.length=Math.ceil((v.length-w)/6),this.words=new Array(this.length);for(var R=0;R=w;R-=2)S=l(v,w,R)<=18?(L-=18,U+=1,this.words[U]|=S>>>26):L+=8;else{var F=v.length-w;for(R=F%2===0?w+1:w;R=18?(L-=18,U+=1,this.words[U]|=S>>>26):L+=8}this._strip()};function c(C,v,w,B){for(var R=0,L=0,U=Math.min(C.length,w),S=v;S=49?L=F-49+10:F>=17?L=F-17+10:L=F,n(F>=0&&L1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch{i.prototype.inspect=f}else i.prototype.inspect=f;function f(){return(this.red?""}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(v,w){v=v||10,w=w|0||1;var B;if(v===16||v==="hex"){B="";for(var R=0,L=0,U=0;U>>24-R&16777215,R+=2,R>=26&&(R-=26,U--),L!==0||U!==this.length-1?B=d[6-F.length]+F+B:B=F+B}for(L!==0&&(B=L.toString(16)+B);B.length%w!==0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}if(v===(v|0)&&v>=2&&v<=36){var T=p[v],q=h[v];B="";var J=this.clone();for(J.negative=0;!J.isZero();){var te=J.modrn(q).toString(v);J=J.idivn(q),J.isZero()?B=te+B:B=d[T-te.length]+te+B}for(this.isZero()&&(B="0"+B);B.length%w!==0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var v=this.words[0];return this.length===2?v+=this.words[1]*67108864:this.length===3&&this.words[2]===1?v+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-v:v},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(v,w){return this.toArrayLike(a,v,w)}),i.prototype.toArray=function(v,w){return this.toArrayLike(Array,v,w)};var y=function(v,w){return v.allocUnsafe?v.allocUnsafe(w):new v(w)};i.prototype.toArrayLike=function(v,w,B){this._strip();var R=this.byteLength(),L=B||Math.max(1,R);n(R<=L,"byte array longer than desired length"),n(L>0,"Requested array length <= 0");var U=y(v,L),S=w==="le"?"LE":"BE";return this["_toArrayLike"+S](U,R),U},i.prototype._toArrayLikeLE=function(v,w){for(var B=0,R=0,L=0,U=0;L>8&255),B>16&255),U===6?(B>24&255),R=0,U=0):(R=S>>>24,U+=2)}if(B=0&&(v[B--]=S>>8&255),B>=0&&(v[B--]=S>>16&255),U===6?(B>=0&&(v[B--]=S>>24&255),R=0,U=0):(R=S>>>24,U+=2)}if(B>=0)for(v[B--]=R;B>=0;)v[B--]=0},Math.clz32?i.prototype._countBits=function(v){return 32-Math.clz32(v)}:i.prototype._countBits=function(v){var w=v,B=0;return w>=4096&&(B+=13,w>>>=13),w>=64&&(B+=7,w>>>=7),w>=8&&(B+=4,w>>>=4),w>=2&&(B+=2,w>>>=2),B+w},i.prototype._zeroBits=function(v){if(v===0)return 26;var w=v,B=0;return w&8191||(B+=13,w>>>=13),w&127||(B+=7,w>>>=7),w&15||(B+=4,w>>>=4),w&3||(B+=2,w>>>=2),w&1||B++,B},i.prototype.bitLength=function(){var v=this.words[this.length-1],w=this._countBits(v);return(this.length-1)*26+w};function _(C){for(var v=new Array(C.bitLength()),w=0;w>>R&1}return v}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var v=0,w=0;wv.length?this.clone().ior(v):v.clone().ior(this)},i.prototype.uor=function(v){return this.length>v.length?this.clone().iuor(v):v.clone().iuor(this)},i.prototype.iuand=function(v){var w;this.length>v.length?w=v:w=this;for(var B=0;Bv.length?this.clone().iand(v):v.clone().iand(this)},i.prototype.uand=function(v){return this.length>v.length?this.clone().iuand(v):v.clone().iuand(this)},i.prototype.iuxor=function(v){var w,B;this.length>v.length?(w=this,B=v):(w=v,B=this);for(var R=0;Rv.length?this.clone().ixor(v):v.clone().ixor(this)},i.prototype.uxor=function(v){return this.length>v.length?this.clone().iuxor(v):v.clone().iuxor(this)},i.prototype.inotn=function(v){n(typeof v=="number"&&v>=0);var w=Math.ceil(v/26)|0,B=v%26;this._expand(w),B>0&&w--;for(var R=0;R0&&(this.words[R]=~this.words[R]&67108863>>26-B),this._strip()},i.prototype.notn=function(v){return this.clone().inotn(v)},i.prototype.setn=function(v,w){n(typeof v=="number"&&v>=0);var B=v/26|0,R=v%26;return this._expand(B+1),w?this.words[B]=this.words[B]|1<v.length?(B=this,R=v):(B=v,R=this);for(var L=0,U=0;U>>26;for(;L!==0&&U>>26;if(this.length=B.length,L!==0)this.words[this.length]=L,this.length++;else if(B!==this)for(;Uv.length?this.clone().iadd(v):v.clone().iadd(this)},i.prototype.isub=function(v){if(v.negative!==0){v.negative=0;var w=this.iadd(v);return v.negative=1,w._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(v),this.negative=1,this._normSign();var B=this.cmp(v);if(B===0)return this.negative=0,this.length=1,this.words[0]=0,this;var R,L;B>0?(R=this,L=v):(R=v,L=this);for(var U=0,S=0;S>26,this.words[S]=w&67108863;for(;U!==0&&S>26,this.words[S]=w&67108863;if(U===0&&S>>26,J=F&67108863,te=Math.min(T,v.length-1),ie=Math.max(0,T-C.length+1);ie<=te;ie++){var ce=T-ie|0;R=C.words[ce]|0,L=v.words[ie]|0,U=R*L+J,q+=U/67108864|0,J=U&67108863}w.words[T]=J|0,F=q|0}return F!==0?w.words[T]=F|0:w.length--,w._strip()}var m=function(v,w,B){var R=v.words,L=w.words,U=B.words,S=0,F,T,q,J=R[0]|0,te=J&8191,ie=J>>>13,ce=R[1]|0,oe=ce&8191,ue=ce>>>13,O=R[2]|0,G=O&8191,ee=O>>>13,se=R[3]|0,pe=se&8191,ge=se>>>13,X=R[4]|0,M=X&8191,z=X>>>13,Z=R[5]|0,Q=Z&8191,de=Z>>>13,we=R[6]|0,Se=we&8191,Ee=we>>>13,Ae=R[7]|0,Te=Ae&8191,H=Ae>>>13,x=R[8]|0,k=x&8191,Y=x>>>13,re=R[9]|0,fe=re&8191,le=re>>>13,xe=L[0]|0,_e=xe&8191,ke=xe>>>13,$e=L[1]|0,Ne=$e&8191,We=$e>>>13,gt=L[2]|0,ft=gt&8191,Ye=gt>>>13,Je=L[3]|0,tt=Je&8191,ve=Je>>>13,ne=L[4]|0,he=ne&8191,be=ne>>>13,Ce=L[5]|0,Oe=Ce&8191,Ie=Ce>>>13,De=L[6]|0,je=De&8191,Me=De>>>13,He=L[7]|0,qe=He&8191,ze=He>>>13,it=L[8]|0,Be=it&8191,Ke=it>>>13,mt=L[9]|0,ct=mt&8191,Ct=mt>>>13;B.negative=v.negative^w.negative,B.length=19,F=Math.imul(te,_e),T=Math.imul(te,ke),T=T+Math.imul(ie,_e)|0,q=Math.imul(ie,ke);var xn=(S+F|0)+((T&8191)<<13)|0;S=(q+(T>>>13)|0)+(xn>>>26)|0,xn&=67108863,F=Math.imul(oe,_e),T=Math.imul(oe,ke),T=T+Math.imul(ue,_e)|0,q=Math.imul(ue,ke),F=F+Math.imul(te,Ne)|0,T=T+Math.imul(te,We)|0,T=T+Math.imul(ie,Ne)|0,q=q+Math.imul(ie,We)|0;var Nn=(S+F|0)+((T&8191)<<13)|0;S=(q+(T>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,F=Math.imul(G,_e),T=Math.imul(G,ke),T=T+Math.imul(ee,_e)|0,q=Math.imul(ee,ke),F=F+Math.imul(oe,Ne)|0,T=T+Math.imul(oe,We)|0,T=T+Math.imul(ue,Ne)|0,q=q+Math.imul(ue,We)|0,F=F+Math.imul(te,ft)|0,T=T+Math.imul(te,Ye)|0,T=T+Math.imul(ie,ft)|0,q=q+Math.imul(ie,Ye)|0;var an=(S+F|0)+((T&8191)<<13)|0;S=(q+(T>>>13)|0)+(an>>>26)|0,an&=67108863,F=Math.imul(pe,_e),T=Math.imul(pe,ke),T=T+Math.imul(ge,_e)|0,q=Math.imul(ge,ke),F=F+Math.imul(G,Ne)|0,T=T+Math.imul(G,We)|0,T=T+Math.imul(ee,Ne)|0,q=q+Math.imul(ee,We)|0,F=F+Math.imul(oe,ft)|0,T=T+Math.imul(oe,Ye)|0,T=T+Math.imul(ue,ft)|0,q=q+Math.imul(ue,Ye)|0,F=F+Math.imul(te,tt)|0,T=T+Math.imul(te,ve)|0,T=T+Math.imul(ie,tt)|0,q=q+Math.imul(ie,ve)|0;var ai=(S+F|0)+((T&8191)<<13)|0;S=(q+(T>>>13)|0)+(ai>>>26)|0,ai&=67108863,F=Math.imul(M,_e),T=Math.imul(M,ke),T=T+Math.imul(z,_e)|0,q=Math.imul(z,ke),F=F+Math.imul(pe,Ne)|0,T=T+Math.imul(pe,We)|0,T=T+Math.imul(ge,Ne)|0,q=q+Math.imul(ge,We)|0,F=F+Math.imul(G,ft)|0,T=T+Math.imul(G,Ye)|0,T=T+Math.imul(ee,ft)|0,q=q+Math.imul(ee,Ye)|0,F=F+Math.imul(oe,tt)|0,T=T+Math.imul(oe,ve)|0,T=T+Math.imul(ue,tt)|0,q=q+Math.imul(ue,ve)|0,F=F+Math.imul(te,he)|0,T=T+Math.imul(te,be)|0,T=T+Math.imul(ie,he)|0,q=q+Math.imul(ie,be)|0;var sn=(S+F|0)+((T&8191)<<13)|0;S=(q+(T>>>13)|0)+(sn>>>26)|0,sn&=67108863,F=Math.imul(Q,_e),T=Math.imul(Q,ke),T=T+Math.imul(de,_e)|0,q=Math.imul(de,ke),F=F+Math.imul(M,Ne)|0,T=T+Math.imul(M,We)|0,T=T+Math.imul(z,Ne)|0,q=q+Math.imul(z,We)|0,F=F+Math.imul(pe,ft)|0,T=T+Math.imul(pe,Ye)|0,T=T+Math.imul(ge,ft)|0,q=q+Math.imul(ge,Ye)|0,F=F+Math.imul(G,tt)|0,T=T+Math.imul(G,ve)|0,T=T+Math.imul(ee,tt)|0,q=q+Math.imul(ee,ve)|0,F=F+Math.imul(oe,he)|0,T=T+Math.imul(oe,be)|0,T=T+Math.imul(ue,he)|0,q=q+Math.imul(ue,be)|0,F=F+Math.imul(te,Oe)|0,T=T+Math.imul(te,Ie)|0,T=T+Math.imul(ie,Oe)|0,q=q+Math.imul(ie,Ie)|0;var ji=(S+F|0)+((T&8191)<<13)|0;S=(q+(T>>>13)|0)+(ji>>>26)|0,ji&=67108863,F=Math.imul(Se,_e),T=Math.imul(Se,ke),T=T+Math.imul(Ee,_e)|0,q=Math.imul(Ee,ke),F=F+Math.imul(Q,Ne)|0,T=T+Math.imul(Q,We)|0,T=T+Math.imul(de,Ne)|0,q=q+Math.imul(de,We)|0,F=F+Math.imul(M,ft)|0,T=T+Math.imul(M,Ye)|0,T=T+Math.imul(z,ft)|0,q=q+Math.imul(z,Ye)|0,F=F+Math.imul(pe,tt)|0,T=T+Math.imul(pe,ve)|0,T=T+Math.imul(ge,tt)|0,q=q+Math.imul(ge,ve)|0,F=F+Math.imul(G,he)|0,T=T+Math.imul(G,be)|0,T=T+Math.imul(ee,he)|0,q=q+Math.imul(ee,be)|0,F=F+Math.imul(oe,Oe)|0,T=T+Math.imul(oe,Ie)|0,T=T+Math.imul(ue,Oe)|0,q=q+Math.imul(ue,Ie)|0,F=F+Math.imul(te,je)|0,T=T+Math.imul(te,Me)|0,T=T+Math.imul(ie,je)|0,q=q+Math.imul(ie,Me)|0;var Li=(S+F|0)+((T&8191)<<13)|0;S=(q+(T>>>13)|0)+(Li>>>26)|0,Li&=67108863,F=Math.imul(Te,_e),T=Math.imul(Te,ke),T=T+Math.imul(H,_e)|0,q=Math.imul(H,ke),F=F+Math.imul(Se,Ne)|0,T=T+Math.imul(Se,We)|0,T=T+Math.imul(Ee,Ne)|0,q=q+Math.imul(Ee,We)|0,F=F+Math.imul(Q,ft)|0,T=T+Math.imul(Q,Ye)|0,T=T+Math.imul(de,ft)|0,q=q+Math.imul(de,Ye)|0,F=F+Math.imul(M,tt)|0,T=T+Math.imul(M,ve)|0,T=T+Math.imul(z,tt)|0,q=q+Math.imul(z,ve)|0,F=F+Math.imul(pe,he)|0,T=T+Math.imul(pe,be)|0,T=T+Math.imul(ge,he)|0,q=q+Math.imul(ge,be)|0,F=F+Math.imul(G,Oe)|0,T=T+Math.imul(G,Ie)|0,T=T+Math.imul(ee,Oe)|0,q=q+Math.imul(ee,Ie)|0,F=F+Math.imul(oe,je)|0,T=T+Math.imul(oe,Me)|0,T=T+Math.imul(ue,je)|0,q=q+Math.imul(ue,Me)|0,F=F+Math.imul(te,qe)|0,T=T+Math.imul(te,ze)|0,T=T+Math.imul(ie,qe)|0,q=q+Math.imul(ie,ze)|0;var zi=(S+F|0)+((T&8191)<<13)|0;S=(q+(T>>>13)|0)+(zi>>>26)|0,zi&=67108863,F=Math.imul(k,_e),T=Math.imul(k,ke),T=T+Math.imul(Y,_e)|0,q=Math.imul(Y,ke),F=F+Math.imul(Te,Ne)|0,T=T+Math.imul(Te,We)|0,T=T+Math.imul(H,Ne)|0,q=q+Math.imul(H,We)|0,F=F+Math.imul(Se,ft)|0,T=T+Math.imul(Se,Ye)|0,T=T+Math.imul(Ee,ft)|0,q=q+Math.imul(Ee,Ye)|0,F=F+Math.imul(Q,tt)|0,T=T+Math.imul(Q,ve)|0,T=T+Math.imul(de,tt)|0,q=q+Math.imul(de,ve)|0,F=F+Math.imul(M,he)|0,T=T+Math.imul(M,be)|0,T=T+Math.imul(z,he)|0,q=q+Math.imul(z,be)|0,F=F+Math.imul(pe,Oe)|0,T=T+Math.imul(pe,Ie)|0,T=T+Math.imul(ge,Oe)|0,q=q+Math.imul(ge,Ie)|0,F=F+Math.imul(G,je)|0,T=T+Math.imul(G,Me)|0,T=T+Math.imul(ee,je)|0,q=q+Math.imul(ee,Me)|0,F=F+Math.imul(oe,qe)|0,T=T+Math.imul(oe,ze)|0,T=T+Math.imul(ue,qe)|0,q=q+Math.imul(ue,ze)|0,F=F+Math.imul(te,Be)|0,T=T+Math.imul(te,Ke)|0,T=T+Math.imul(ie,Be)|0,q=q+Math.imul(ie,Ke)|0;var Ui=(S+F|0)+((T&8191)<<13)|0;S=(q+(T>>>13)|0)+(Ui>>>26)|0,Ui&=67108863,F=Math.imul(fe,_e),T=Math.imul(fe,ke),T=T+Math.imul(le,_e)|0,q=Math.imul(le,ke),F=F+Math.imul(k,Ne)|0,T=T+Math.imul(k,We)|0,T=T+Math.imul(Y,Ne)|0,q=q+Math.imul(Y,We)|0,F=F+Math.imul(Te,ft)|0,T=T+Math.imul(Te,Ye)|0,T=T+Math.imul(H,ft)|0,q=q+Math.imul(H,Ye)|0,F=F+Math.imul(Se,tt)|0,T=T+Math.imul(Se,ve)|0,T=T+Math.imul(Ee,tt)|0,q=q+Math.imul(Ee,ve)|0,F=F+Math.imul(Q,he)|0,T=T+Math.imul(Q,be)|0,T=T+Math.imul(de,he)|0,q=q+Math.imul(de,be)|0,F=F+Math.imul(M,Oe)|0,T=T+Math.imul(M,Ie)|0,T=T+Math.imul(z,Oe)|0,q=q+Math.imul(z,Ie)|0,F=F+Math.imul(pe,je)|0,T=T+Math.imul(pe,Me)|0,T=T+Math.imul(ge,je)|0,q=q+Math.imul(ge,Me)|0,F=F+Math.imul(G,qe)|0,T=T+Math.imul(G,ze)|0,T=T+Math.imul(ee,qe)|0,q=q+Math.imul(ee,ze)|0,F=F+Math.imul(oe,Be)|0,T=T+Math.imul(oe,Ke)|0,T=T+Math.imul(ue,Be)|0,q=q+Math.imul(ue,Ke)|0,F=F+Math.imul(te,ct)|0,T=T+Math.imul(te,Ct)|0,T=T+Math.imul(ie,ct)|0,q=q+Math.imul(ie,Ct)|0;var Hi=(S+F|0)+((T&8191)<<13)|0;S=(q+(T>>>13)|0)+(Hi>>>26)|0,Hi&=67108863,F=Math.imul(fe,Ne),T=Math.imul(fe,We),T=T+Math.imul(le,Ne)|0,q=Math.imul(le,We),F=F+Math.imul(k,ft)|0,T=T+Math.imul(k,Ye)|0,T=T+Math.imul(Y,ft)|0,q=q+Math.imul(Y,Ye)|0,F=F+Math.imul(Te,tt)|0,T=T+Math.imul(Te,ve)|0,T=T+Math.imul(H,tt)|0,q=q+Math.imul(H,ve)|0,F=F+Math.imul(Se,he)|0,T=T+Math.imul(Se,be)|0,T=T+Math.imul(Ee,he)|0,q=q+Math.imul(Ee,be)|0,F=F+Math.imul(Q,Oe)|0,T=T+Math.imul(Q,Ie)|0,T=T+Math.imul(de,Oe)|0,q=q+Math.imul(de,Ie)|0,F=F+Math.imul(M,je)|0,T=T+Math.imul(M,Me)|0,T=T+Math.imul(z,je)|0,q=q+Math.imul(z,Me)|0,F=F+Math.imul(pe,qe)|0,T=T+Math.imul(pe,ze)|0,T=T+Math.imul(ge,qe)|0,q=q+Math.imul(ge,ze)|0,F=F+Math.imul(G,Be)|0,T=T+Math.imul(G,Ke)|0,T=T+Math.imul(ee,Be)|0,q=q+Math.imul(ee,Ke)|0,F=F+Math.imul(oe,ct)|0,T=T+Math.imul(oe,Ct)|0,T=T+Math.imul(ue,ct)|0,q=q+Math.imul(ue,Ct)|0;var ro=(S+F|0)+((T&8191)<<13)|0;S=(q+(T>>>13)|0)+(ro>>>26)|0,ro&=67108863,F=Math.imul(fe,ft),T=Math.imul(fe,Ye),T=T+Math.imul(le,ft)|0,q=Math.imul(le,Ye),F=F+Math.imul(k,tt)|0,T=T+Math.imul(k,ve)|0,T=T+Math.imul(Y,tt)|0,q=q+Math.imul(Y,ve)|0,F=F+Math.imul(Te,he)|0,T=T+Math.imul(Te,be)|0,T=T+Math.imul(H,he)|0,q=q+Math.imul(H,be)|0,F=F+Math.imul(Se,Oe)|0,T=T+Math.imul(Se,Ie)|0,T=T+Math.imul(Ee,Oe)|0,q=q+Math.imul(Ee,Ie)|0,F=F+Math.imul(Q,je)|0,T=T+Math.imul(Q,Me)|0,T=T+Math.imul(de,je)|0,q=q+Math.imul(de,Me)|0,F=F+Math.imul(M,qe)|0,T=T+Math.imul(M,ze)|0,T=T+Math.imul(z,qe)|0,q=q+Math.imul(z,ze)|0,F=F+Math.imul(pe,Be)|0,T=T+Math.imul(pe,Ke)|0,T=T+Math.imul(ge,Be)|0,q=q+Math.imul(ge,Ke)|0,F=F+Math.imul(G,ct)|0,T=T+Math.imul(G,Ct)|0,T=T+Math.imul(ee,ct)|0,q=q+Math.imul(ee,Ct)|0;var Vi=(S+F|0)+((T&8191)<<13)|0;S=(q+(T>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,F=Math.imul(fe,tt),T=Math.imul(fe,ve),T=T+Math.imul(le,tt)|0,q=Math.imul(le,ve),F=F+Math.imul(k,he)|0,T=T+Math.imul(k,be)|0,T=T+Math.imul(Y,he)|0,q=q+Math.imul(Y,be)|0,F=F+Math.imul(Te,Oe)|0,T=T+Math.imul(Te,Ie)|0,T=T+Math.imul(H,Oe)|0,q=q+Math.imul(H,Ie)|0,F=F+Math.imul(Se,je)|0,T=T+Math.imul(Se,Me)|0,T=T+Math.imul(Ee,je)|0,q=q+Math.imul(Ee,Me)|0,F=F+Math.imul(Q,qe)|0,T=T+Math.imul(Q,ze)|0,T=T+Math.imul(de,qe)|0,q=q+Math.imul(de,ze)|0,F=F+Math.imul(M,Be)|0,T=T+Math.imul(M,Ke)|0,T=T+Math.imul(z,Be)|0,q=q+Math.imul(z,Ke)|0,F=F+Math.imul(pe,ct)|0,T=T+Math.imul(pe,Ct)|0,T=T+Math.imul(ge,ct)|0,q=q+Math.imul(ge,Ct)|0;var Wi=(S+F|0)+((T&8191)<<13)|0;S=(q+(T>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,F=Math.imul(fe,he),T=Math.imul(fe,be),T=T+Math.imul(le,he)|0,q=Math.imul(le,be),F=F+Math.imul(k,Oe)|0,T=T+Math.imul(k,Ie)|0,T=T+Math.imul(Y,Oe)|0,q=q+Math.imul(Y,Ie)|0,F=F+Math.imul(Te,je)|0,T=T+Math.imul(Te,Me)|0,T=T+Math.imul(H,je)|0,q=q+Math.imul(H,Me)|0,F=F+Math.imul(Se,qe)|0,T=T+Math.imul(Se,ze)|0,T=T+Math.imul(Ee,qe)|0,q=q+Math.imul(Ee,ze)|0,F=F+Math.imul(Q,Be)|0,T=T+Math.imul(Q,Ke)|0,T=T+Math.imul(de,Be)|0,q=q+Math.imul(de,Ke)|0,F=F+Math.imul(M,ct)|0,T=T+Math.imul(M,Ct)|0,T=T+Math.imul(z,ct)|0,q=q+Math.imul(z,Ct)|0;var Vr=(S+F|0)+((T&8191)<<13)|0;S=(q+(T>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,F=Math.imul(fe,Oe),T=Math.imul(fe,Ie),T=T+Math.imul(le,Oe)|0,q=Math.imul(le,Ie),F=F+Math.imul(k,je)|0,T=T+Math.imul(k,Me)|0,T=T+Math.imul(Y,je)|0,q=q+Math.imul(Y,Me)|0,F=F+Math.imul(Te,qe)|0,T=T+Math.imul(Te,ze)|0,T=T+Math.imul(H,qe)|0,q=q+Math.imul(H,ze)|0,F=F+Math.imul(Se,Be)|0,T=T+Math.imul(Se,Ke)|0,T=T+Math.imul(Ee,Be)|0,q=q+Math.imul(Ee,Ke)|0,F=F+Math.imul(Q,ct)|0,T=T+Math.imul(Q,Ct)|0,T=T+Math.imul(de,ct)|0,q=q+Math.imul(de,Ct)|0;var qi=(S+F|0)+((T&8191)<<13)|0;S=(q+(T>>>13)|0)+(qi>>>26)|0,qi&=67108863,F=Math.imul(fe,je),T=Math.imul(fe,Me),T=T+Math.imul(le,je)|0,q=Math.imul(le,Me),F=F+Math.imul(k,qe)|0,T=T+Math.imul(k,ze)|0,T=T+Math.imul(Y,qe)|0,q=q+Math.imul(Y,ze)|0,F=F+Math.imul(Te,Be)|0,T=T+Math.imul(Te,Ke)|0,T=T+Math.imul(H,Be)|0,q=q+Math.imul(H,Ke)|0,F=F+Math.imul(Se,ct)|0,T=T+Math.imul(Se,Ct)|0,T=T+Math.imul(Ee,ct)|0,q=q+Math.imul(Ee,Ct)|0;var Gi=(S+F|0)+((T&8191)<<13)|0;S=(q+(T>>>13)|0)+(Gi>>>26)|0,Gi&=67108863,F=Math.imul(fe,qe),T=Math.imul(fe,ze),T=T+Math.imul(le,qe)|0,q=Math.imul(le,ze),F=F+Math.imul(k,Be)|0,T=T+Math.imul(k,Ke)|0,T=T+Math.imul(Y,Be)|0,q=q+Math.imul(Y,Ke)|0,F=F+Math.imul(Te,ct)|0,T=T+Math.imul(Te,Ct)|0,T=T+Math.imul(H,ct)|0,q=q+Math.imul(H,Ct)|0;var Ki=(S+F|0)+((T&8191)<<13)|0;S=(q+(T>>>13)|0)+(Ki>>>26)|0,Ki&=67108863,F=Math.imul(fe,Be),T=Math.imul(fe,Ke),T=T+Math.imul(le,Be)|0,q=Math.imul(le,Ke),F=F+Math.imul(k,ct)|0,T=T+Math.imul(k,Ct)|0,T=T+Math.imul(Y,ct)|0,q=q+Math.imul(Y,Ct)|0;var df=(S+F|0)+((T&8191)<<13)|0;S=(q+(T>>>13)|0)+(df>>>26)|0,df&=67108863,F=Math.imul(fe,ct),T=Math.imul(fe,Ct),T=T+Math.imul(le,ct)|0,q=Math.imul(le,Ct);var pf=(S+F|0)+((T&8191)<<13)|0;return S=(q+(T>>>13)|0)+(pf>>>26)|0,pf&=67108863,U[0]=xn,U[1]=Nn,U[2]=an,U[3]=ai,U[4]=sn,U[5]=ji,U[6]=Li,U[7]=zi,U[8]=Ui,U[9]=Hi,U[10]=ro,U[11]=Vi,U[12]=Wi,U[13]=Vr,U[14]=qi,U[15]=Gi,U[16]=Ki,U[17]=df,U[18]=pf,S!==0&&(U[19]=S,B.length++),B};Math.imul||(m=b);function E(C,v,w){w.negative=v.negative^C.negative,w.length=C.length+v.length;for(var B=0,R=0,L=0;L>>26)|0,R+=U>>>26,U&=67108863}w.words[L]=S,B=U,U=R}return B!==0?w.words[L]=B:w.length--,w._strip()}function A(C,v,w){return E(C,v,w)}i.prototype.mulTo=function(v,w){var B,R=this.length+v.length;return this.length===10&&v.length===10?B=m(this,v,w):R<63?B=b(this,v,w):R<1024?B=E(this,v,w):B=A(this,v,w),B},i.prototype.mul=function(v){var w=new i(null);return w.words=new Array(this.length+v.length),this.mulTo(v,w)},i.prototype.mulf=function(v){var w=new i(null);return w.words=new Array(this.length+v.length),A(this,v,w)},i.prototype.imul=function(v){return this.clone().mulTo(v,this)},i.prototype.imuln=function(v){var w=v<0;w&&(v=-v),n(typeof v=="number"),n(v<67108864);for(var B=0,R=0;R>=26,B+=L/67108864|0,B+=U>>>26,this.words[R]=U&67108863}return B!==0&&(this.words[R]=B,this.length++),w?this.ineg():this},i.prototype.muln=function(v){return this.clone().imuln(v)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(v){var w=_(v);if(w.length===0)return new i(1);for(var B=this,R=0;R=0);var w=v%26,B=(v-w)/26,R=67108863>>>26-w<<26-w,L;if(w!==0){var U=0;for(L=0;L>>26-w}U&&(this.words[L]=U,this.length++)}if(B!==0){for(L=this.length-1;L>=0;L--)this.words[L+B]=this.words[L];for(L=0;L=0);var R;w?R=(w-w%26)/26:R=0;var L=v%26,U=Math.min((v-L)/26,this.length),S=67108863^67108863>>>L<U)for(this.length-=U,T=0;T=0&&(q!==0||T>=R);T--){var J=this.words[T]|0;this.words[T]=q<<26-L|J>>>L,q=J&S}return F&&q!==0&&(F.words[F.length++]=q),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(v,w,B){return n(this.negative===0),this.iushrn(v,w,B)},i.prototype.shln=function(v){return this.clone().ishln(v)},i.prototype.ushln=function(v){return this.clone().iushln(v)},i.prototype.shrn=function(v){return this.clone().ishrn(v)},i.prototype.ushrn=function(v){return this.clone().iushrn(v)},i.prototype.testn=function(v){n(typeof v=="number"&&v>=0);var w=v%26,B=(v-w)/26,R=1<=0);var w=v%26,B=(v-w)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=B)return this;if(w!==0&&B++,this.length=Math.min(B,this.length),w!==0){var R=67108863^67108863>>>w<=67108864;w++)this.words[w]-=67108864,w===this.length-1?this.words[w+1]=1:this.words[w+1]++;return this.length=Math.max(this.length,w+1),this},i.prototype.isubn=function(v){if(n(typeof v=="number"),n(v<67108864),v<0)return this.iaddn(-v);if(this.negative!==0)return this.negative=0,this.iaddn(v),this.negative=1,this;if(this.words[0]-=v,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var w=0;w>26)-(F/67108864|0),this.words[L+B]=U&67108863}for(;L>26,this.words[L+B]=U&67108863;if(S===0)return this._strip();for(n(S===-1),S=0,L=0;L>26,this.words[L]=U&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(v,w){var B=this.length-v.length,R=this.clone(),L=v,U=L.words[L.length-1]|0,S=this._countBits(U);B=26-S,B!==0&&(L=L.ushln(B),R.iushln(B),U=L.words[L.length-1]|0);var F=R.length-L.length,T;if(w!=="mod"){T=new i(null),T.length=F+1,T.words=new Array(T.length);for(var q=0;q=0;te--){var ie=(R.words[L.length+te]|0)*67108864+(R.words[L.length+te-1]|0);for(ie=Math.min(ie/U|0,67108863),R._ishlnsubmul(L,ie,te);R.negative!==0;)ie--,R.negative=0,R._ishlnsubmul(L,1,te),R.isZero()||(R.negative^=1);T&&(T.words[te]=ie)}return T&&T._strip(),R._strip(),w!=="div"&&B!==0&&R.iushrn(B),{div:T||null,mod:R}},i.prototype.divmod=function(v,w,B){if(n(!v.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var R,L,U;return this.negative!==0&&v.negative===0?(U=this.neg().divmod(v,w),w!=="mod"&&(R=U.div.neg()),w!=="div"&&(L=U.mod.neg(),B&&L.negative!==0&&L.iadd(v)),{div:R,mod:L}):this.negative===0&&v.negative!==0?(U=this.divmod(v.neg(),w),w!=="mod"&&(R=U.div.neg()),{div:R,mod:U.mod}):this.negative&v.negative?(U=this.neg().divmod(v.neg(),w),w!=="div"&&(L=U.mod.neg(),B&&L.negative!==0&&L.isub(v)),{div:U.div,mod:L}):v.length>this.length||this.cmp(v)<0?{div:new i(0),mod:this}:v.length===1?w==="div"?{div:this.divn(v.words[0]),mod:null}:w==="mod"?{div:null,mod:new i(this.modrn(v.words[0]))}:{div:this.divn(v.words[0]),mod:new i(this.modrn(v.words[0]))}:this._wordDiv(v,w)},i.prototype.div=function(v){return this.divmod(v,"div",!1).div},i.prototype.mod=function(v){return this.divmod(v,"mod",!1).mod},i.prototype.umod=function(v){return this.divmod(v,"mod",!0).mod},i.prototype.divRound=function(v){var w=this.divmod(v);if(w.mod.isZero())return w.div;var B=w.div.negative!==0?w.mod.isub(v):w.mod,R=v.ushrn(1),L=v.andln(1),U=B.cmp(R);return U<0||L===1&&U===0?w.div:w.div.negative!==0?w.div.isubn(1):w.div.iaddn(1)},i.prototype.modrn=function(v){var w=v<0;w&&(v=-v),n(v<=67108863);for(var B=(1<<26)%v,R=0,L=this.length-1;L>=0;L--)R=(B*R+(this.words[L]|0))%v;return w?-R:R},i.prototype.modn=function(v){return this.modrn(v)},i.prototype.idivn=function(v){var w=v<0;w&&(v=-v),n(v<=67108863);for(var B=0,R=this.length-1;R>=0;R--){var L=(this.words[R]|0)+B*67108864;this.words[R]=L/v|0,B=L%v}return this._strip(),w?this.ineg():this},i.prototype.divn=function(v){return this.clone().idivn(v)},i.prototype.egcd=function(v){n(v.negative===0),n(!v.isZero());var w=this,B=v.clone();w.negative!==0?w=w.umod(v):w=w.clone();for(var R=new i(1),L=new i(0),U=new i(0),S=new i(1),F=0;w.isEven()&&B.isEven();)w.iushrn(1),B.iushrn(1),++F;for(var T=B.clone(),q=w.clone();!w.isZero();){for(var J=0,te=1;!(w.words[0]&te)&&J<26;++J,te<<=1);if(J>0)for(w.iushrn(J);J-- >0;)(R.isOdd()||L.isOdd())&&(R.iadd(T),L.isub(q)),R.iushrn(1),L.iushrn(1);for(var ie=0,ce=1;!(B.words[0]&ce)&&ie<26;++ie,ce<<=1);if(ie>0)for(B.iushrn(ie);ie-- >0;)(U.isOdd()||S.isOdd())&&(U.iadd(T),S.isub(q)),U.iushrn(1),S.iushrn(1);w.cmp(B)>=0?(w.isub(B),R.isub(U),L.isub(S)):(B.isub(w),U.isub(R),S.isub(L))}return{a:U,b:S,gcd:B.iushln(F)}},i.prototype._invmp=function(v){n(v.negative===0),n(!v.isZero());var w=this,B=v.clone();w.negative!==0?w=w.umod(v):w=w.clone();for(var R=new i(1),L=new i(0),U=B.clone();w.cmpn(1)>0&&B.cmpn(1)>0;){for(var S=0,F=1;!(w.words[0]&F)&&S<26;++S,F<<=1);if(S>0)for(w.iushrn(S);S-- >0;)R.isOdd()&&R.iadd(U),R.iushrn(1);for(var T=0,q=1;!(B.words[0]&q)&&T<26;++T,q<<=1);if(T>0)for(B.iushrn(T);T-- >0;)L.isOdd()&&L.iadd(U),L.iushrn(1);w.cmp(B)>=0?(w.isub(B),R.isub(L)):(B.isub(w),L.isub(R))}var J;return w.cmpn(1)===0?J=R:J=L,J.cmpn(0)<0&&J.iadd(v),J},i.prototype.gcd=function(v){if(this.isZero())return v.abs();if(v.isZero())return this.abs();var w=this.clone(),B=v.clone();w.negative=0,B.negative=0;for(var R=0;w.isEven()&&B.isEven();R++)w.iushrn(1),B.iushrn(1);do{for(;w.isEven();)w.iushrn(1);for(;B.isEven();)B.iushrn(1);var L=w.cmp(B);if(L<0){var U=w;w=B,B=U}else if(L===0||B.cmpn(1)===0)break;w.isub(B)}while(!0);return B.iushln(R)},i.prototype.invm=function(v){return this.egcd(v).a.umod(v)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(v){return this.words[0]&v},i.prototype.bincn=function(v){n(typeof v=="number");var w=v%26,B=(v-w)/26,R=1<>>26,S&=67108863,this.words[U]=S}return L!==0&&(this.words[U]=L,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(v){var w=v<0;if(this.negative!==0&&!w)return-1;if(this.negative===0&&w)return 1;this._strip();var B;if(this.length>1)B=1;else{w&&(v=-v),n(v<=67108863,"Number is too big");var R=this.words[0]|0;B=R===v?0:Rv.length)return 1;if(this.length=0;B--){var R=this.words[B]|0,L=v.words[B]|0;if(R!==L){RL&&(w=1);break}}return w},i.prototype.gtn=function(v){return this.cmpn(v)===1},i.prototype.gt=function(v){return this.cmp(v)===1},i.prototype.gten=function(v){return this.cmpn(v)>=0},i.prototype.gte=function(v){return this.cmp(v)>=0},i.prototype.ltn=function(v){return this.cmpn(v)===-1},i.prototype.lt=function(v){return this.cmp(v)===-1},i.prototype.lten=function(v){return this.cmpn(v)<=0},i.prototype.lte=function(v){return this.cmp(v)<=0},i.prototype.eqn=function(v){return this.cmpn(v)===0},i.prototype.eq=function(v){return this.cmp(v)===0},i.red=function(v){return new W(v)},i.prototype.toRed=function(v){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),v.convertTo(this)._forceRed(v)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(v){return this.red=v,this},i.prototype.forceRed=function(v){return n(!this.red,"Already a number in reduction context"),this._forceRed(v)},i.prototype.redAdd=function(v){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,v)},i.prototype.redIAdd=function(v){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,v)},i.prototype.redSub=function(v){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,v)},i.prototype.redISub=function(v){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,v)},i.prototype.redShl=function(v){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,v)},i.prototype.redMul=function(v){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.mul(this,v)},i.prototype.redIMul=function(v){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.imul(this,v)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(v){return n(this.red&&!v.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,v)};var D={k256:null,p224:null,p192:null,p25519:null};function $(C,v){this.name=C,this.p=new i(v,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var v=new i(null);return v.words=new Array(Math.ceil(this.n/13)),v},$.prototype.ireduce=function(v){var w=v,B;do this.split(w,this.tmp),w=this.imulK(w),w=w.iadd(this.tmp),B=w.bitLength();while(B>this.n);var R=B0?w.isub(this.p):w.strip!==void 0?w.strip():w._strip(),w},$.prototype.split=function(v,w){v.iushrn(this.n,0,w)},$.prototype.imulK=function(v){return v.imul(this.k)};function g(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(g,$),g.prototype.split=function(v,w){for(var B=4194303,R=Math.min(v.length,9),L=0;L>>22,U=S}U>>>=22,v.words[L-10]=U,U===0&&v.length>10?v.length-=10:v.length-=9},g.prototype.imulK=function(v){v.words[v.length]=0,v.words[v.length+1]=0,v.length+=2;for(var w=0,B=0;B>>=26,v.words[B]=L,w=R}return w!==0&&(v.words[v.length++]=w),v},i._prime=function(v){if(D[v])return D[v];var w;if(v==="k256")w=new g;else if(v==="p224")w=new N;else if(v==="p192")w=new V;else if(v==="p25519")w=new K;else throw new Error("Unknown prime "+v);return D[v]=w,w};function W(C){if(typeof C=="string"){var v=i._prime(C);this.m=v.p,this.prime=v}else n(C.gtn(1),"modulus must be greater than 1"),this.m=C,this.prime=null}W.prototype._verify1=function(v){n(v.negative===0,"red works only with positives"),n(v.red,"red works only with red numbers")},W.prototype._verify2=function(v,w){n((v.negative|w.negative)===0,"red works only with positives"),n(v.red&&v.red===w.red,"red works only with red numbers")},W.prototype.imod=function(v){return this.prime?this.prime.ireduce(v)._forceRed(this):(u(v,v.umod(this.m)._forceRed(this)),v)},W.prototype.neg=function(v){return v.isZero()?v.clone():this.m.sub(v)._forceRed(this)},W.prototype.add=function(v,w){this._verify2(v,w);var B=v.add(w);return B.cmp(this.m)>=0&&B.isub(this.m),B._forceRed(this)},W.prototype.iadd=function(v,w){this._verify2(v,w);var B=v.iadd(w);return B.cmp(this.m)>=0&&B.isub(this.m),B},W.prototype.sub=function(v,w){this._verify2(v,w);var B=v.sub(w);return B.cmpn(0)<0&&B.iadd(this.m),B._forceRed(this)},W.prototype.isub=function(v,w){this._verify2(v,w);var B=v.isub(w);return B.cmpn(0)<0&&B.iadd(this.m),B},W.prototype.shl=function(v,w){return this._verify1(v),this.imod(v.ushln(w))},W.prototype.imul=function(v,w){return this._verify2(v,w),this.imod(v.imul(w))},W.prototype.mul=function(v,w){return this._verify2(v,w),this.imod(v.mul(w))},W.prototype.isqr=function(v){return this.imul(v,v.clone())},W.prototype.sqr=function(v){return this.mul(v,v)},W.prototype.sqrt=function(v){if(v.isZero())return v.clone();var w=this.m.andln(3);if(n(w%2===1),w===3){var B=this.m.add(new i(1)).iushrn(2);return this.pow(v,B)}for(var R=this.m.subn(1),L=0;!R.isZero()&&R.andln(1)===0;)L++,R.iushrn(1);n(!R.isZero());var U=new i(1).toRed(this),S=U.redNeg(),F=this.m.subn(1).iushrn(1),T=this.m.bitLength();for(T=new i(2*T*T).toRed(this);this.pow(T,F).cmp(S)!==0;)T.redIAdd(S);for(var q=this.pow(T,R),J=this.pow(v,R.addn(1).iushrn(1)),te=this.pow(v,R),ie=L;te.cmp(U)!==0;){for(var ce=te,oe=0;ce.cmp(U)!==0;oe++)ce=ce.redSqr();n(oe=0;L--){for(var q=w.words[L],J=T-1;J>=0;J--){var te=q>>J&1;if(U!==R[0]&&(U=this.sqr(U)),te===0&&S===0){F=0;continue}S<<=1,S|=te,F++,!(F!==B&&(L!==0||J!==0))&&(U=this.mul(U,R[S]),F=0,S=0)}T=26}return U},W.prototype.convertTo=function(v){var w=v.umod(this.m);return w===v?w.clone():w},W.prototype.convertFrom=function(v){var w=v.clone();return w.red=null,w},i.mont=function(v){return new P(v)};function P(C){W.call(this,C),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}o(P,W),P.prototype.convertTo=function(v){return this.imod(v.ushln(this.shift))},P.prototype.convertFrom=function(v){var w=this.imod(v.mul(this.rinv));return w.red=null,w},P.prototype.imul=function(v,w){if(v.isZero()||w.isZero())return v.words[0]=0,v.length=1,v;var B=v.imul(w),R=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),L=B.isub(R).iushrn(this.shift),U=L;return L.cmp(this.m)>=0?U=L.isub(this.m):L.cmpn(0)<0&&(U=L.iadd(this.m)),U._forceRed(this)},P.prototype.mul=function(v,w){if(v.isZero()||w.isZero())return new i(0)._forceRed(this);var B=v.mul(w),R=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),L=B.isub(R).iushrn(this.shift),U=L;return L.cmp(this.m)>=0?U=L.isub(this.m):L.cmpn(0)<0&&(U=L.iadd(this.m)),U._forceRed(this)},P.prototype.invm=function(v){var w=this.imod(v._invmp(this.m).mul(this.r2));return w._forceRed(this)}})(e,Le)})(_4);var S_e=_4.exports;const C_e="Input must be an string, Buffer or Uint8Array";function P_e(e){let t;if(e instanceof Uint8Array)t=e;else if(typeof e=="string")t=new TextEncoder().encode(e);else throw new Error(C_e);return t}function O_e(e){return Array.prototype.map.call(e,function(t){return(t<16?"0":"")+t.toString(16)}).join("")}function B0(e){return(4294967296+e).toString(16).substring(1)}function A_e(e,t,r){let n=` -`+e+" = ";for(let o=0;o=4294967296&&o++,e[t]=n,e[t+1]=o}function VA(e,t,r,n){let o=e[t]+r;r<0&&(o+=4294967296);let i=e[t+1]+n;o>=4294967296&&i++,e[t]=o,e[t+1]=i}function pH(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function za(e,t,r,n,o,i){const a=ld[o],s=ld[o+1],l=ld[i],c=ld[i+1];j0(yt,e,t),VA(yt,e,a,s);let u=yt[n]^yt[e],f=yt[n+1]^yt[e+1];yt[n]=f,yt[n+1]=u,j0(yt,r,n),u=yt[t]^yt[r],f=yt[t+1]^yt[r+1],yt[t]=u>>>24^f<<8,yt[t+1]=f>>>24^u<<8,j0(yt,e,t),VA(yt,e,l,c),u=yt[n]^yt[e],f=yt[n+1]^yt[e+1],yt[n]=u>>>16^f<<16,yt[n+1]=f>>>16^u<<16,j0(yt,r,n),u=yt[t]^yt[r],f=yt[t+1]^yt[r+1],yt[t]=f>>>31^u<<1,yt[t+1]=u>>>31^f<<1}const hH=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),I_e=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],Kr=new Uint8Array(I_e.map(function(e){return e*2})),yt=new Uint32Array(32),ld=new Uint32Array(32);function vH(e,t){let r=0;for(r=0;r<16;r++)yt[r]=e.h[r],yt[r+16]=hH[r];for(yt[24]=yt[24]^e.t,yt[25]=yt[25]^e.t/4294967296,t&&(yt[28]=~yt[28],yt[29]=~yt[29]),r=0;r<32;r++)ld[r]=pH(e.b,4*r);for(r=0;r<12;r++)za(0,8,16,24,Kr[r*16+0],Kr[r*16+1]),za(2,10,18,26,Kr[r*16+2],Kr[r*16+3]),za(4,12,20,28,Kr[r*16+4],Kr[r*16+5]),za(6,14,22,30,Kr[r*16+6],Kr[r*16+7]),za(0,10,20,30,Kr[r*16+8],Kr[r*16+9]),za(2,12,22,24,Kr[r*16+10],Kr[r*16+11]),za(4,14,16,26,Kr[r*16+12],Kr[r*16+13]),za(6,8,18,28,Kr[r*16+14],Kr[r*16+15]);for(r=0;r<16;r++)e.h[r]=e.h[r]^yt[r]^yt[r+16]}const Ua=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function gH(e,t,r,n){if(e===0||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(r&&r.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(n&&n.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const o={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};Ua.fill(0),Ua[0]=e,t&&(Ua[1]=t.length),Ua[2]=1,Ua[3]=1,r&&Ua.set(r,32),n&&Ua.set(n,48);for(let i=0;i<16;i++)o.h[i]=hH[i]^pH(Ua,i*4);return t&&(E4(o,t),o.c=128),o}function E4(e,t){for(let r=0;r>2]>>8*(r&3);return t}function yH(e,t,r,n,o){r=r||64,e=_1.normalizeInput(e),n&&(n=_1.normalizeInput(n)),o&&(o=_1.normalizeInput(o));const i=gH(r,t,n,o);return E4(i,e),mH(i)}function $_e(e,t,r,n,o){const i=yH(e,t,r,n,o);return _1.toHex(i)}var T_e={blake2b:yH,blake2bHex:$_e,blake2bInit:gH,blake2bUpdate:E4,blake2bFinal:mH};const bH=dH;function D_e(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function Ha(e,t,r,n,o,i){kt[e]=kt[e]+kt[t]+o,kt[n]=L0(kt[n]^kt[e],16),kt[r]=kt[r]+kt[n],kt[t]=L0(kt[t]^kt[r],12),kt[e]=kt[e]+kt[t]+i,kt[n]=L0(kt[n]^kt[e],8),kt[r]=kt[r]+kt[n],kt[t]=L0(kt[t]^kt[r],7)}function L0(e,t){return e>>>t^e<<32-t}const wH=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Yr=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),kt=new Uint32Array(16),$r=new Uint32Array(16);function xH(e,t){let r=0;for(r=0;r<8;r++)kt[r]=e.h[r],kt[r+8]=wH[r];for(kt[12]^=e.t,kt[13]^=e.t/4294967296,t&&(kt[14]=~kt[14]),r=0;r<16;r++)$r[r]=D_e(e.b,4*r);for(r=0;r<10;r++)Ha(0,4,8,12,$r[Yr[r*16+0]],$r[Yr[r*16+1]]),Ha(1,5,9,13,$r[Yr[r*16+2]],$r[Yr[r*16+3]]),Ha(2,6,10,14,$r[Yr[r*16+4]],$r[Yr[r*16+5]]),Ha(3,7,11,15,$r[Yr[r*16+6]],$r[Yr[r*16+7]]),Ha(0,5,10,15,$r[Yr[r*16+8]],$r[Yr[r*16+9]]),Ha(1,6,11,12,$r[Yr[r*16+10]],$r[Yr[r*16+11]]),Ha(2,7,8,13,$r[Yr[r*16+12]],$r[Yr[r*16+13]]),Ha(3,4,9,14,$r[Yr[r*16+14]],$r[Yr[r*16+15]]);for(r=0;r<8;r++)e.h[r]^=kt[r]^kt[r+8]}function _H(e,t){if(!(e>0&&e<=32))throw new Error("Incorrect output length, should be in [1, 32]");const r=t?t.length:0;if(t&&!(r>0&&r<=32))throw new Error("Incorrect key length, should be in [1, 32]");const n={h:new Uint32Array(wH),b:new Uint8Array(64),c:0,t:0,outlen:e};return n.h[0]^=16842752^r<<8^e,r>0&&(S4(n,t),n.c=64),n}function S4(e,t){for(let r=0;r>2]>>8*(r&3)&255;return t}function SH(e,t,r){r=r||32,e=bH.normalizeInput(e);const n=_H(r,t);return S4(n,e),EH(n)}function M_e(e,t,r){const n=SH(e,t,r);return bH.toHex(n)}var R_e={blake2s:SH,blake2sHex:M_e,blake2sInit:_H,blake2sUpdate:S4,blake2sFinal:EH};const zf=T_e,Uf=R_e;var Yy={blake2b:zf.blake2b,blake2bHex:zf.blake2bHex,blake2bInit:zf.blake2bInit,blake2bUpdate:zf.blake2bUpdate,blake2bFinal:zf.blake2bFinal,blake2s:Uf.blake2s,blake2sHex:Uf.blake2sHex,blake2sInit:Uf.blake2sInit,blake2sUpdate:Uf.blake2sUpdate,blake2sFinal:Uf.blake2sFinal};const Xy=ri(Yy);var Zy={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ZERO_ADDRESS=e.DUST_AMOUNT=e.ONE_ALPH=e.ALPH_TOKEN_ID=e.MIN_UTXO_SET_AMOUNT=e.TOTAL_NUMBER_OF_CHAINS=e.TOTAL_NUMBER_OF_GROUPS=void 0,e.TOTAL_NUMBER_OF_GROUPS=4,e.TOTAL_NUMBER_OF_CHAINS=e.TOTAL_NUMBER_OF_GROUPS*e.TOTAL_NUMBER_OF_GROUPS,e.MIN_UTXO_SET_AMOUNT=BigInt(1e12),e.ALPH_TOKEN_ID="".padStart(64,"0"),e.ONE_ALPH=10n**18n,e.DUST_AMOUNT=10n**15n,e.ZERO_ADDRESS="tgx7VNFoP9DJiFMFgXXtafQZkUvyEdDHT9ryamHJYrjq"})(Zy);var Jy=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ht,"__esModule",{value:!0});ht.assertType=ht.sleep=ht.hexToString=ht.stringToHex=ht.blockChainIndex=ht.subContractId=ht.contractIdFromTx=ht.addressFromTokenId=ht.addressFromContractId=ht.addressFromPublicKey=ht.publicKeyFromPrivateKey=ht.groupOfPrivateKey=ht.binToHex=ht.hexToBinUnsafe=ht.tokenIdFromAddress=ht.contractIdFromAddress=ht.groupOfAddress=ht.isHexString=ht.xorByte=ht.signatureDecode=ht.encodeHexSignature=ht.encodeSignature=ht.networkIds=void 0;const N_e=h4,dm=Jy(S_e),wp=Jy(Yy),xp=Jy(Fy),_r=Gu,kd=Zy,F_e=Jy(uh);ht.networkIds=["mainnet","testnet","devnet"];const Id=new N_e.ec("secp256k1");function CH(e){let t=e.s;Id.n&&e.s.cmp(Id.nh)===1&&(t=Id.n.sub(e.s));const r=e.r.toString("hex",66).slice(2),n=t.toString("hex",66).slice(2);return r+n}ht.encodeSignature=CH;function B_e(e,t){return CH({r:new dm.default(e,"hex"),s:new dm.default(t,"hex")})}ht.encodeHexSignature=B_e;function j_e(e,t){if(t.length!==128)throw new Error("Invalid signature length");const r=t.slice(64,128),n=new dm.default(r,"hex");if(e.n&&n.cmp(e.nh)<1)return{r:t.slice(0,64),s:r};throw new Error("The signature is not normalized")}ht.signatureDecode=j_e;function PH(e){const t=e>>24&255,r=e>>16&255,n=e>>8&255,o=e&255;return(t^r^n^o)&255}ht.xorByte=PH;function OH(e){return e.length%2===0&&/^[0-9a-fA-F]*$/.test(e)}ht.isHexString=OH;var pa;(function(e){e[e.P2PKH=0]="P2PKH",e[e.P2MPKH=1]="P2MPKH",e[e.P2SH=2]="P2SH",e[e.P2C=3]="P2C"})(pa||(pa={}));function AH(e){const t=xp.default.decode(e);if(t.length==0)throw new Error("Address string is empty");const r=t[0],n=t.slice(1);if(r==pa.P2PKH)return L_e(n);if(r==pa.P2MPKH)return z_e(n);if(r==pa.P2SH)return U_e(n);{const o=kH(e);return o[`${o.length-1}`]}}ht.groupOfAddress=AH;function C4(e){const t=(0,F_e.default)(e)|1;return PH(t)%kd.TOTAL_NUMBER_OF_GROUPS}function L_e(e){if(e.length!=32)throw new Error(`Invalid p2pkh address length: ${e.length}`);return C4(e)}function z_e(e){if((e.length-2)%32!=0)throw new Error(`Invalid p2mpkh address length: ${e.length}`);return C4(e.slice(1,33))}function U_e(e){return C4(e)}function kH(e){return IH(e)}ht.contractIdFromAddress=kH;function H_e(e){return IH(e)}ht.tokenIdFromAddress=H_e;function IH(e){const t=xp.default.decode(e);if(t.length==0)throw new Error("Address string is empty");const r=t[0],n=t.slice(1);if(r==pa.P2C)return n;throw new Error(`Invalid contract address type: ${r}`)}function _p(e){return _r.Buffer.from(e,"hex")}ht.hexToBinUnsafe=_p;function P4(e){return _r.Buffer.from(e).toString("hex")}ht.binToHex=P4;function V_e(e,t){return AH(TH($H(e,t),t))}ht.groupOfPrivateKey=V_e;function $H(e,t){return(t??"default")==="default"?Id.keyFromPrivate(e).getPublic(!0,"hex"):Id.g.mul(new dm.default(e,16)).encode("hex",!0).slice(2)}ht.publicKeyFromPrivateKey=$H;function TH(e,t){if((t??"default")==="default"){const n=_r.Buffer.from([pa.P2PKH]),o=_r.Buffer.from(wp.default.blake2b(_r.Buffer.from(e,"hex"),void 0,32)),i=_r.Buffer.concat([n,o]);return xp.default.encode(i)}else{const n=_r.Buffer.from(`0101000000000458144020${e}8685`,"hex"),o=wp.default.blake2b(n,void 0,32),i=_r.Buffer.from([pa.P2SH]);return xp.default.encode(_r.Buffer.concat([i,o]))}}ht.addressFromPublicKey=TH;function DH(e){const t=_r.Buffer.from([pa.P2C]),r=_r.Buffer.from(_p(e)),n=_r.Buffer.concat([t,r]);return xp.default.encode(n)}ht.addressFromContractId=DH;function W_e(e){return DH(e)}ht.addressFromTokenId=W_e;function q_e(e,t){const r=_p(e),n=_r.Buffer.concat([r,_r.Buffer.from([t])]),o=wp.default.blake2b(n,void 0,32);return P4(o)}ht.contractIdFromTx=q_e;function G_e(e,t,r){if(r<0||r>=kd.TOTAL_NUMBER_OF_GROUPS)throw new Error(`Invalid group ${r}`);const n=_r.Buffer.concat([_p(e),_p(t)]),o=_r.Buffer.concat([wp.default.blake2b(wp.default.blake2b(n,void 0,32),void 0,32).slice(0,-1),_r.Buffer.from([r])]);return P4(o)}ht.subContractId=G_e;function K_e(e){if(e.length!=64)throw Error(`Invalid block hash: ${e}`);const t=+("0x"+e.slice(-4))%kd.TOTAL_NUMBER_OF_CHAINS;return{fromGroup:Math.floor(t/kd.TOTAL_NUMBER_OF_GROUPS),toGroup:t%kd.TOTAL_NUMBER_OF_GROUPS}}ht.blockChainIndex=K_e;function Y_e(e){let t="";for(let r=0;rsetTimeout(t,e))}ht.sleep=Z_e;function J_e(){}ht.assertType=J_e;var Qy={},mw={exports:{}},WA;function MH(){return WA||(WA=1,function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function o(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function i(l,c,u,f,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var p=new o(u,f||l,d),h=r?r+c:c;return l._events[h]?l._events[h].fn?l._events[h]=[l._events[h],p]:l._events[h].push(p):(l._events[h]=p,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,f;if(this._eventsCount===0)return c;for(f in u=this._events)t.call(u,f)&&c.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=r?r+c:c,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,p=f.length,h=new Array(p);d{await this.polling(),this.cancelled||(this.task=setTimeout(()=>this.eventEmitter.emit("tick"),this.pollingInterval))}),this.eventEmitter.emit("tick")}unsubscribe(){this.eventEmitter.removeAllListeners(),this.cancelled=!0,typeof this.task<"u"&&clearTimeout(this.task)}isCancelled(){return this.cancelled}}Qy.Subscription=t4e;var sl={},RH={};(function(e){/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.schnorr=e.verify=e.signSync=e.sign=e.getSharedSecret=e.recoverPublicKey=e.getPublicKey=e.Signature=e.Point=e.CURVE=void 0;const t=Yo,r=BigInt(0),n=BigInt(1),o=BigInt(2),i=BigInt(3),a=BigInt(8),s=Object.freeze({a:r,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:n,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});e.CURVE=s;const l=(ve,ne)=>(ve+ne/o)/ne,c={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(ve){const{n:ne}=s,he=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),be=-n*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),Ce=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),Oe=he,Ie=BigInt("0x100000000000000000000000000000000"),De=l(Oe*ve,ne),je=l(-be*ve,ne);let Me=q(ve-De*he-je*Ce,ne),He=q(-De*be-je*Oe,ne);const qe=Me>Ie,ze=He>Ie;if(qe&&(Me=ne-Me),ze&&(He=ne-He),Me>Ie||He>Ie)throw new Error("splitScalarEndo: Endomorphism failed, k="+ve);return{k1neg:qe,k1:Me,k2neg:ze,k2:He}}},u=32,f=32,d=32,p=u+1,h=2*u+1;function y(ve){const{a:ne,b:he}=s,be=q(ve*ve),Ce=q(be*ve);return q(Ce+ne*ve+he)}const _=s.a===r;class b extends Error{constructor(ne){super(ne)}}function m(ve){if(!(ve instanceof E))throw new TypeError("JacobianPoint expected")}class E{constructor(ne,he,be){this.x=ne,this.y=he,this.z=be}static fromAffine(ne){if(!(ne instanceof $))throw new TypeError("JacobianPoint#fromAffine: expected Point");return ne.equals($.ZERO)?E.ZERO:new E(ne.x,ne.y,n)}static toAffineBatch(ne){const he=ce(ne.map(be=>be.z));return ne.map((be,Ce)=>be.toAffine(he[Ce]))}static normalizeZ(ne){return E.toAffineBatch(ne).map(E.fromAffine)}equals(ne){m(ne);const{x:he,y:be,z:Ce}=this,{x:Oe,y:Ie,z:De}=ne,je=q(Ce*Ce),Me=q(De*De),He=q(he*Me),qe=q(Oe*je),ze=q(q(be*De)*Me),it=q(q(Ie*Ce)*je);return He===qe&&ze===it}negate(){return new E(this.x,q(-this.y),this.z)}double(){const{x:ne,y:he,z:be}=this,Ce=q(ne*ne),Oe=q(he*he),Ie=q(Oe*Oe),De=ne+Oe,je=q(o*(q(De*De)-Ce-Ie)),Me=q(i*Ce),He=q(Me*Me),qe=q(He-o*je),ze=q(Me*(je-qe)-a*Ie),it=q(o*he*be);return new E(qe,ze,it)}add(ne){m(ne);const{x:he,y:be,z:Ce}=this,{x:Oe,y:Ie,z:De}=ne;if(Oe===r||Ie===r)return this;if(he===r||be===r)return ne;const je=q(Ce*Ce),Me=q(De*De),He=q(he*Me),qe=q(Oe*je),ze=q(q(be*De)*Me),it=q(q(Ie*Ce)*je),Be=q(qe-He),Ke=q(it-ze);if(Be===r)return Ke===r?this.double():E.ZERO;const mt=q(Be*Be),ct=q(Be*mt),Ct=q(He*mt),xn=q(Ke*Ke-ct-o*Ct),Nn=q(Ke*(Ct-xn)-ze*ct),an=q(Ce*De*Be);return new E(xn,Nn,an)}subtract(ne){return this.add(ne.negate())}multiplyUnsafe(ne){const he=E.ZERO;if(typeof ne=="bigint"&&ne===r)return he;let be=T(ne);if(be===n)return this;if(!_){let qe=he,ze=this;for(;be>r;)be&n&&(qe=qe.add(ze)),ze=ze.double(),be>>=n;return qe}let{k1neg:Ce,k1:Oe,k2neg:Ie,k2:De}=c.splitScalar(be),je=he,Me=he,He=this;for(;Oe>r||De>r;)Oe&n&&(je=je.add(He)),De&n&&(Me=Me.add(He)),He=He.double(),Oe>>=n,De>>=n;return Ce&&(je=je.negate()),Ie&&(Me=Me.negate()),Me=new E(q(Me.x*c.beta),Me.y,Me.z),je.add(Me)}precomputeWindow(ne){const he=_?128/ne+1:256/ne+1,be=[];let Ce=this,Oe=Ce;for(let Ie=0;Ie>=qe,Be>je&&(Be-=He,ne+=n);const Ke=it,mt=it+Math.abs(Be)-1,ct=ze%2!==0,Ct=Be<0;Be===0?Ie=Ie.add(A(ct,Ce[Ke])):Oe=Oe.add(A(Ct,Ce[mt]))}return{p:Oe,f:Ie}}multiply(ne,he){let be=T(ne),Ce,Oe;if(_){const{k1neg:Ie,k1:De,k2neg:je,k2:Me}=c.splitScalar(be);let{p:He,f:qe}=this.wNAF(De,he),{p:ze,f:it}=this.wNAF(Me,he);He=A(Ie,He),ze=A(je,ze),ze=new E(q(ze.x*c.beta),ze.y,ze.z),Ce=He.add(ze),Oe=qe.add(it)}else{const{p:Ie,f:De}=this.wNAF(be,he);Ce=Ie,Oe=De}return E.normalizeZ([Ce,Oe])[0]}toAffine(ne){const{x:he,y:be,z:Ce}=this,Oe=this.equals(E.ZERO);ne==null&&(ne=Oe?a:ie(Ce));const Ie=ne,De=q(Ie*Ie),je=q(De*Ie),Me=q(he*De),He=q(be*je),qe=q(Ce*Ie);if(Oe)return $.ZERO;if(qe!==n)throw new Error("invZ was invalid");return new $(Me,He)}}E.BASE=new E(s.Gx,s.Gy,n),E.ZERO=new E(r,n,r);function A(ve,ne){const he=ne.negate();return ve?he:ne}const D=new WeakMap;class ${constructor(ne,he){this.x=ne,this.y=he}_setWindowSize(ne){this._WINDOW_SIZE=ne,D.delete(this)}hasEvenY(){return this.y%o===r}static fromCompressedHex(ne){const he=ne.length===32,be=S(he?ne:ne.subarray(1));if(!pe(be))throw new Error("Point is not on curve");const Ce=y(be);let Oe=te(Ce);const Ie=(Oe&n)===n;he?Ie&&(Oe=q(-Oe)):(ne[0]&1)===1!==Ie&&(Oe=q(-Oe));const De=new $(be,Oe);return De.assertValidity(),De}static fromUncompressedHex(ne){const he=S(ne.subarray(1,u+1)),be=S(ne.subarray(u+1,u*2+1)),Ce=new $(he,be);return Ce.assertValidity(),Ce}static fromHex(ne){const he=F(ne),be=he.length,Ce=he[0];if(be===u)return this.fromCompressedHex(he);if(be===p&&(Ce===2||Ce===3))return this.fromCompressedHex(he);if(be===h&&Ce===4)return this.fromUncompressedHex(he);throw new Error(`Point.fromHex: received invalid point. Expected 32-${p} compressed bytes or ${h} uncompressed bytes, not ${be}`)}static fromPrivateKey(ne){return $.BASE.multiply(X(ne))}static fromSignature(ne,he,be){const{r:Ce,s:Oe}=z(he);if(![0,1,2,3].includes(be))throw new Error("Cannot recover: invalid recovery bit");const Ie=ue(F(ne)),{n:De}=s,je=be===2||be===3?Ce+De:Ce,Me=ie(je,De),He=q(-Ie*Me,De),qe=q(Oe*Me,De),ze=be&1?"03":"02",it=$.fromHex(ze+w(je)),Be=$.BASE.multiplyAndAddUnsafe(it,He,qe);if(!Be)throw new Error("Cannot recover signature: point at infinify");return Be.assertValidity(),Be}toRawBytes(ne=!1){return U(this.toHex(ne))}toHex(ne=!1){const he=w(this.x);return ne?`${this.hasEvenY()?"02":"03"}${he}`:`04${he}${w(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const ne="Point is not on elliptic curve",{x:he,y:be}=this;if(!pe(he)||!pe(be))throw new Error(ne);const Ce=q(be*be),Oe=y(he);if(q(Ce-Oe)!==r)throw new Error(ne)}equals(ne){return this.x===ne.x&&this.y===ne.y}negate(){return new $(this.x,q(-this.y))}double(){return E.fromAffine(this).double().toAffine()}add(ne){return E.fromAffine(this).add(E.fromAffine(ne)).toAffine()}subtract(ne){return this.add(ne.negate())}multiply(ne){return E.fromAffine(this).multiply(ne,this).toAffine()}multiplyAndAddUnsafe(ne,he,be){const Ce=E.fromAffine(this),Oe=he===r||he===n||this!==$.BASE?Ce.multiplyUnsafe(he):Ce.multiply(he),Ie=E.fromAffine(ne).multiplyUnsafe(be),De=Oe.add(Ie);return De.equals(E.ZERO)?void 0:De.toAffine()}}e.Point=$,$.BASE=new $(s.Gx,s.Gy),$.ZERO=new $(r,r);function g(ve){return Number.parseInt(ve[0],16)>=8?"00"+ve:ve}function N(ve){if(ve.length<2||ve[0]!==2)throw new Error(`Invalid signature integer tag: ${C(ve)}`);const ne=ve[1],he=ve.subarray(2,ne+2);if(!ne||he.length!==ne)throw new Error("Invalid signature integer: wrong length");if(he[0]===0&&he[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:S(he),left:ve.subarray(ne+2)}}function V(ve){if(ve.length<2||ve[0]!=48)throw new Error(`Invalid signature tag: ${C(ve)}`);if(ve[1]!==ve.length-2)throw new Error("Invalid signature: incorrect length");const{data:ne,left:he}=N(ve.subarray(2)),{data:be,left:Ce}=N(he);if(Ce.length)throw new Error(`Invalid signature: left bytes after parsing: ${C(Ce)}`);return{r:ne,s:be}}class K{constructor(ne,he){this.r=ne,this.s=he,this.assertValidity()}static fromCompact(ne){const he=ne instanceof Uint8Array,be="Signature.fromCompact";if(typeof ne!="string"&&!he)throw new TypeError(`${be}: Expected string or Uint8Array`);const Ce=he?C(ne):ne;if(Ce.length!==128)throw new Error(`${be}: Expected 64-byte hex`);return new K(L(Ce.slice(0,64)),L(Ce.slice(64,128)))}static fromDER(ne){const he=ne instanceof Uint8Array;if(typeof ne!="string"&&!he)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:be,s:Ce}=V(he?ne:U(ne));return new K(be,Ce)}static fromHex(ne){return this.fromDER(ne)}assertValidity(){const{r:ne,s:he}=this;if(!se(ne))throw new Error("Invalid Signature: r must be 0 < r < n");if(!se(he))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const ne=s.n>>n;return this.s>ne}normalizeS(){return this.hasHighS()?new K(this.r,q(-this.s,s.n)):this}toDERRawBytes(){return U(this.toDERHex())}toDERHex(){const ne=g(R(this.s)),he=g(R(this.r)),be=ne.length/2,Ce=he.length/2,Oe=R(be),Ie=R(Ce);return`30${R(Ce+be+4)}02${Ie}${he}02${Oe}${ne}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return U(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}e.Signature=K;function W(...ve){if(!ve.every(be=>be instanceof Uint8Array))throw new Error("Uint8Array list expected");if(ve.length===1)return ve[0];const ne=ve.reduce((be,Ce)=>be+Ce.length,0),he=new Uint8Array(ne);for(let be=0,Ce=0;bene.toString(16).padStart(2,"0"));function C(ve){if(!(ve instanceof Uint8Array))throw new Error("Expected Uint8Array");let ne="";for(let he=0;he0)return BigInt(ve);if(typeof ve=="bigint"&&se(ve))return ve;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function q(ve,ne=s.P){const he=ve%ne;return he>=r?he:ne+he}function J(ve,ne){const{P:he}=s;let be=ve;for(;ne-- >r;)be*=be,be%=he;return be}function te(ve){const{P:ne}=s,he=BigInt(6),be=BigInt(11),Ce=BigInt(22),Oe=BigInt(23),Ie=BigInt(44),De=BigInt(88),je=ve*ve*ve%ne,Me=je*je*ve%ne,He=J(Me,i)*Me%ne,qe=J(He,i)*Me%ne,ze=J(qe,o)*je%ne,it=J(ze,be)*ze%ne,Be=J(it,Ce)*it%ne,Ke=J(Be,Ie)*Be%ne,mt=J(Ke,De)*Ke%ne,ct=J(mt,Ie)*Be%ne,Ct=J(ct,i)*Me%ne,xn=J(Ct,Oe)*it%ne,Nn=J(xn,he)*je%ne,an=J(Nn,o);if(an*an%ne!==ve)throw new Error("Cannot find square root");return an}function ie(ve,ne=s.P){if(ve===r||ne<=r)throw new Error(`invert: expected positive integers, got n=${ve} mod=${ne}`);let he=q(ve,ne),be=ne,Ce=r,Oe=n;for(;he!==r;){const De=be/he,je=be%he,Me=Ce-Oe*De;be=he,he=je,Ce=Oe,Oe=Me}if(be!==n)throw new Error("invert: does not exist");return q(Ce,ne)}function ce(ve,ne=s.P){const he=new Array(ve.length),be=ve.reduce((Oe,Ie,De)=>Ie===r?Oe:(he[De]=Oe,q(Oe*Ie,ne)),n),Ce=ie(be,ne);return ve.reduceRight((Oe,Ie,De)=>Ie===r?Oe:(he[De]=q(Oe*he[De],ne),q(Oe*Ie,ne)),Ce),he}function oe(ve){const ne=ve.length*8-f*8,he=S(ve);return ne>0?he>>BigInt(ne):he}function ue(ve,ne=!1){const he=oe(ve);if(ne)return he;const{n:be}=s;return he>=be?he-be:he}let O,G;class ee{constructor(ne,he){if(this.hashLen=ne,this.qByteLen=he,typeof ne!="number"||ne<2)throw new Error("hashLen must be a number");if(typeof he!="number"||he<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(ne).fill(1),this.k=new Uint8Array(ne).fill(0),this.counter=0}hmac(...ne){return e.utils.hmacSha256(this.k,...ne)}hmacSync(...ne){return G(this.k,...ne)}checkSync(){if(typeof G!="function")throw new b("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(ne=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),ne),this.v=await this.hmac(this.v),ne.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),ne),this.v=await this.hmac(this.v))}reseedSync(ne=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),ne),this.v=this.hmacSync(this.v),ne.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),ne),this.v=this.hmacSync(this.v))}async generate(){this.incr();let ne=0;const he=[];for(;ne0)ne=BigInt(ve);else if(typeof ve=="string"){if(ve.length!==2*f)throw new Error("Expected 32 bytes of private key");ne=L(ve)}else if(ve instanceof Uint8Array){if(ve.length!==f)throw new Error("Expected 32 bytes of private key");ne=S(ve)}else throw new TypeError("Expected valid private key");if(!se(ne))throw new Error("Expected private key: 0 < key < n");return ne}function M(ve){return ve instanceof $?(ve.assertValidity(),ve):$.fromHex(ve)}function z(ve){if(ve instanceof K)return ve.assertValidity(),ve;try{return K.fromDER(ve)}catch{return K.fromCompact(ve)}}function Z(ve,ne=!1){return $.fromPrivateKey(ve).toRawBytes(ne)}e.getPublicKey=Z;function Q(ve,ne,he,be=!1){return $.fromSignature(ve,ne,he).toRawBytes(be)}e.recoverPublicKey=Q;function de(ve){const ne=ve instanceof Uint8Array,he=typeof ve=="string",be=(ne||he)&&ve.length;return ne?be===p||be===h:he?be===p*2||be===h*2:ve instanceof $}function we(ve,ne,he=!1){if(de(ve))throw new TypeError("getSharedSecret: first arg must be private key");if(!de(ne))throw new TypeError("getSharedSecret: second arg must be public key");const be=M(ne);return be.assertValidity(),be.multiply(X(ve)).toRawBytes(he)}e.getSharedSecret=we;function Se(ve){const ne=ve.length>u?ve.slice(0,u):ve;return S(ne)}function Ee(ve){const ne=Se(ve),he=q(ne,s.n);return Ae(he{ve=F(ve);const ne=f+8;if(ve.length1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const he=q(S(ve),s.n-n)+n;return B(he)},randomBytes:(ve=32)=>{if(Ye.web)return Ye.web.getRandomValues(new Uint8Array(ve));if(Ye.node){const{randomBytes:ne}=Ye.node;return Uint8Array.from(ne(ve))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.hashToPrivateKey(e.utils.randomBytes(f+8)),precompute(ve=8,ne=$.BASE){const he=ne===$.BASE?ne:new $(ne.x,ne.y);return he._setWindowSize(ve),he.multiply(i),he},sha256:async(...ve)=>{if(Ye.web){const ne=await Ye.web.subtle.digest("SHA-256",W(...ve));return new Uint8Array(ne)}else if(Ye.node){const{createHash:ne}=Ye.node,he=ne("sha256");return ve.forEach(be=>he.update(be)),Uint8Array.from(he.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(ve,...ne)=>{if(Ye.web){const he=await Ye.web.subtle.importKey("raw",ve,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),be=W(...ne),Ce=await Ye.web.subtle.sign("HMAC",he,be);return new Uint8Array(Ce)}else if(Ye.node){const{createHmac:he}=Ye.node,be=he("sha256",ve);return ne.forEach(Ce=>be.update(Ce)),Uint8Array.from(be.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(ve,...ne)=>{let he=tt[ve];if(he===void 0){const be=await e.utils.sha256(Uint8Array.from(ve,Ce=>Ce.charCodeAt(0)));he=W(be,be),tt[ve]=he}return e.utils.sha256(he,...ne)},taggedHashSync:(ve,...ne)=>{if(typeof O!="function")throw new b("sha256Sync is undefined, you need to set it");let he=tt[ve];if(he===void 0){const be=O(Uint8Array.from(ve,Ce=>Ce.charCodeAt(0)));he=W(be,be),tt[ve]=he}return O(he,...ne)},_JacobianPoint:E},Object.defineProperties(e.utils,{sha256Sync:{configurable:!1,get(){return O},set(ve){O||(O=ve)}},hmacSha256Sync:{configurable:!1,get(){return G},set(ve){G||(G=ve)}}})})(RH);var qA;function r4e(){if(qA)return sl;qA=1;var e=Le&&Le.__createBinding||(Object.create?function(u,f,d,p){p===void 0&&(p=d);var h=Object.getOwnPropertyDescriptor(f,d);(!h||("get"in h?!f.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return f[d]}}),Object.defineProperty(u,p,h)}:function(u,f,d,p){p===void 0&&(p=d),u[p]=f[d]}),t=Le&&Le.__setModuleDefault||(Object.create?function(u,f){Object.defineProperty(u,"default",{enumerable:!0,value:f})}:function(u,f){u.default=f}),r=Le&&Le.__importStar||function(u){if(u&&u.__esModule)return u;var f={};if(u!=null)for(var d in u)d!=="default"&&Object.prototype.hasOwnProperty.call(u,d)&&e(f,u,d);return t(f,u),f};Object.defineProperty(sl,"__esModule",{value:!0}),sl.verifySignature=sl.sign=void 0;const n=h4,o=Gs(),i=r(RH),a=Yo,s=new n.ec("secp256k1");i.utils.sha256Sync=(...u)=>{const f=(0,a.createHash)("sha256");for(const d of u)f.update(d);return f.digest()},i.utils.hmacSha256Sync=(u,...f)=>{const d=(0,a.createHmac)("sha256",Buffer.from(u));return f.forEach(p=>d.update(p)),Uint8Array.from(d.digest())};function l(u,f,d){if((d??"default")==="default"){const y=s.keyFromPrivate(f).sign(u);return(0,o.encodeSignature)(y)}else{const h=i.schnorr.signSync((0,o.hexToBinUnsafe)(u),(0,o.hexToBinUnsafe)(f));return(0,o.binToHex)(h)}}sl.sign=l;function c(u,f,d,p){const h=p??"default";try{return h==="default"?s.keyFromPublic(f,"hex").verify(u,(0,o.signatureDecode)(s,d)):i.schnorr.verifySync((0,o.hexToBinUnsafe)(d),(0,o.hexToBinUnsafe)(u),(0,o.hexToBinUnsafe)(f))}catch{return!1}}return sl.verifySignature=c,sl}var NH={},FH={exports:{}};(function(e){(function(t){var r,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,i=Math.floor,a="[BigNumber Error] ",s=a+"Number primitive has more than 15 significant digits: ",l=1e14,c=14,u=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,p=1e9;function h($){var g,N,V,K=J.prototype={constructor:J,toString:null,valueOf:null},W=new J(1),P=20,C=4,v=-7,w=21,B=-1e7,R=1e7,L=!1,U=1,S=0,F={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},T="0123456789abcdefghijklmnopqrstuvwxyz",q=!0;function J(O,G){var ee,se,pe,ge,X,M,z,Z,Q=this;if(!(Q instanceof J))return new J(O,G);if(G==null){if(O&&O._isBigNumber===!0){Q.s=O.s,!O.c||O.e>R?Q.c=Q.e=null:O.e=10;X/=10,ge++);ge>R?Q.c=Q.e=null:(Q.e=ge,Q.c=[O]);return}Z=String(O)}else{if(!n.test(Z=String(O)))return V(Q,Z,M);Q.s=Z.charCodeAt(0)==45?(Z=Z.slice(1),-1):1}(ge=Z.indexOf("."))>-1&&(Z=Z.replace(".","")),(X=Z.search(/e/i))>0?(ge<0&&(ge=X),ge+=+Z.slice(X+1),Z=Z.substring(0,X)):ge<0&&(ge=Z.length)}else{if(m(G,2,T.length,"Base"),G==10&&q)return Q=new J(O),oe(Q,P+Q.e+1,C);if(Z=String(O),M=typeof O=="number"){if(O*0!=0)return V(Q,Z,M,G);if(Q.s=1/O<0?(Z=Z.slice(1),-1):1,J.DEBUG&&Z.replace(/^0\.0*|\./,"").length>15)throw Error(s+O)}else Q.s=Z.charCodeAt(0)===45?(Z=Z.slice(1),-1):1;for(ee=T.slice(0,G),ge=X=0,z=Z.length;Xge){ge=z;continue}}else if(!pe&&(Z==Z.toUpperCase()&&(Z=Z.toLowerCase())||Z==Z.toLowerCase()&&(Z=Z.toUpperCase()))){pe=!0,X=-1,ge=0;continue}return V(Q,String(O),M,G)}M=!1,Z=N(Z,G,10,Q.s),(ge=Z.indexOf("."))>-1?Z=Z.replace(".",""):ge=Z.length}for(X=0;Z.charCodeAt(X)===48;X++);for(z=Z.length;Z.charCodeAt(--z)===48;);if(Z=Z.slice(X,++z)){if(z-=X,M&&J.DEBUG&&z>15&&(O>u||O!==i(O)))throw Error(s+Q.s*O);if((ge=ge-X-1)>R)Q.c=Q.e=null;else if(ge=-p&&pe<=p&&pe===i(pe)){if(se[0]===0){if(pe===0&&se.length===1)return!0;break e}if(G=(pe+1)%c,G<1&&(G+=c),String(se[0]).length==G){for(G=0;G=l||ee!==i(ee))break e;if(ee!==0)return!0}}}else if(se===null&&pe===null&&(ge===null||ge===1||ge===-1))return!0;throw Error(a+"Invalid BigNumber: "+O)},J.maximum=J.max=function(){return ie(arguments,K.lt)},J.minimum=J.min=function(){return ie(arguments,K.gt)},J.random=function(){var O=9007199254740992,G=Math.random()*O&2097151?function(){return i(Math.random()*O)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(ee){var se,pe,ge,X,M,z=0,Z=[],Q=new J(W);if(ee==null?ee=P:m(ee,0,p),X=o(ee/c),L)if(crypto.getRandomValues){for(se=crypto.getRandomValues(new Uint32Array(X*=2));z>>11),M>=9e15?(pe=crypto.getRandomValues(new Uint32Array(2)),se[z]=pe[0],se[z+1]=pe[1]):(Z.push(M%1e14),z+=2);z=X/2}else if(crypto.randomBytes){for(se=crypto.randomBytes(X*=7);z=9e15?crypto.randomBytes(7).copy(se,z):(Z.push(M%1e14),z+=7);z=X/7}else throw L=!1,Error(a+"crypto unavailable");if(!L)for(;z=10;M/=10,z++);zpe-1&&(M[X+1]==null&&(M[X+1]=0),M[X+1]+=M[X]/pe|0,M[X]%=pe)}return M.reverse()}return function(ee,se,pe,ge,X){var M,z,Z,Q,de,we,Se,Ee,Ae=ee.indexOf("."),Te=P,H=C;for(Ae>=0&&(Q=S,S=0,ee=ee.replace(".",""),Ee=new J(se),we=Ee.pow(ee.length-Ae),S=Q,Ee.c=G(D(_(we.c),we.e,"0"),10,pe,O),Ee.e=Ee.c.length),Se=G(ee,se,pe,X?(M=T,O):(M=O,T)),Z=Q=Se.length;Se[--Q]==0;Se.pop());if(!Se[0])return M.charAt(0);if(Ae<0?--Z:(we.c=Se,we.e=Z,we.s=ge,we=g(we,Ee,Te,H,pe),Se=we.c,de=we.r,Z=we.e),z=Z+Te+1,Ae=Se[z],Q=pe/2,de=de||z<0||Se[z+1]!=null,de=H<4?(Ae!=null||de)&&(H==0||H==(we.s<0?3:2)):Ae>Q||Ae==Q&&(H==4||de||H==6&&Se[z-1]&1||H==(we.s<0?8:7)),z<1||!Se[0])ee=de?D(M.charAt(1),-Te,M.charAt(0)):M.charAt(0);else{if(Se.length=z,de)for(--pe;++Se[--z]>pe;)Se[z]=0,z||(++Z,Se=[1].concat(Se));for(Q=Se.length;!Se[--Q];);for(Ae=0,ee="";Ae<=Q;ee+=M.charAt(Se[Ae++]));ee=D(ee,Z,M.charAt(0))}return ee}}(),g=function(){function O(se,pe,ge){var X,M,z,Z,Q=0,de=se.length,we=pe%d,Se=pe/d|0;for(se=se.slice();de--;)z=se[de]%d,Z=se[de]/d|0,X=Se*z+Z*we,M=we*z+X%d*d+Q,Q=(M/ge|0)+(X/d|0)+Se*Z,se[de]=M%ge;return Q&&(se=[Q].concat(se)),se}function G(se,pe,ge,X){var M,z;if(ge!=X)z=ge>X?1:-1;else for(M=z=0;Mpe[M]?1:-1;break}return z}function ee(se,pe,ge,X){for(var M=0;ge--;)se[ge]-=M,M=se[ge]1;se.splice(0,1));}return function(se,pe,ge,X,M){var z,Z,Q,de,we,Se,Ee,Ae,Te,H,x,k,Y,re,fe,le,xe,_e=se.s==pe.s?1:-1,ke=se.c,$e=pe.c;if(!ke||!ke[0]||!$e||!$e[0])return new J(!se.s||!pe.s||(ke?$e&&ke[0]==$e[0]:!$e)?NaN:ke&&ke[0]==0||!$e?_e*0:_e/0);for(Ae=new J(_e),Te=Ae.c=[],Z=se.e-pe.e,_e=ge+Z+1,M||(M=l,Z=y(se.e/c)-y(pe.e/c),_e=_e/c|0),Q=0;$e[Q]==(ke[Q]||0);Q++);if($e[Q]>(ke[Q]||0)&&Z--,_e<0)Te.push(1),de=!0;else{for(re=ke.length,le=$e.length,Q=0,_e+=2,we=i(M/($e[0]+1)),we>1&&($e=O($e,we,M),ke=O(ke,we,M),le=$e.length,re=ke.length),Y=le,H=ke.slice(0,le),x=H.length;x=M/2&&fe++;do{if(we=0,z=G($e,H,le,x),z<0){if(k=H[0],le!=x&&(k=k*M+(H[1]||0)),we=i(k/fe),we>1)for(we>=M&&(we=M-1),Se=O($e,we,M),Ee=Se.length,x=H.length;G(Se,H,Ee,x)==1;)we--,ee(Se,le=10;_e/=10,Q++);oe(Ae,ge+(Ae.e=Q+Z*c-1)+1,X,de)}else Ae.e=Z,Ae.r=+de;return Ae}}();function te(O,G,ee,se){var pe,ge,X,M,z;if(ee==null?ee=C:m(ee,0,8),!O.c)return O.toString();if(pe=O.c[0],X=O.e,G==null)z=_(O.c),z=se==1||se==2&&(X<=v||X>=w)?A(z,X):D(z,X,"0");else if(O=oe(new J(O),G,ee),ge=O.e,z=_(O.c),M=z.length,se==1||se==2&&(G<=ge||ge<=v)){for(;MM){if(--G>0)for(z+=".";G--;z+="0");}else if(G+=ge-M,G>0)for(ge+1==M&&(z+=".");G--;z+="0");return O.s<0&&pe?"-"+z:z}function ie(O,G){for(var ee,se=1,pe=new J(O[0]);se=10;pe/=10,se++);return(ee=se+ee*c-1)>R?O.c=O.e=null:ee=10;M/=10,pe++);if(ge=G-pe,ge<0)ge+=c,X=G,z=de[Z=0],Q=z/we[pe-X-1]%10|0;else if(Z=o((ge+1)/c),Z>=de.length)if(se){for(;de.length<=Z;de.push(0));z=Q=0,pe=1,ge%=c,X=ge-c+1}else break e;else{for(z=M=de[Z],pe=1;M>=10;M/=10,pe++);ge%=c,X=ge-c+pe,Q=X<0?0:z/we[pe-X-1]%10|0}if(se=se||G<0||de[Z+1]!=null||(X<0?z:z%we[pe-X-1]),se=ee<4?(Q||se)&&(ee==0||ee==(O.s<0?3:2)):Q>5||Q==5&&(ee==4||se||ee==6&&(ge>0?X>0?z/we[pe-X]:0:de[Z-1])%10&1||ee==(O.s<0?8:7)),G<1||!de[0])return de.length=0,se?(G-=O.e+1,de[0]=we[(c-G%c)%c],O.e=-G||0):de[0]=O.e=0,O;if(ge==0?(de.length=Z,M=1,Z--):(de.length=Z+1,M=we[c-ge],de[Z]=X>0?i(z/we[pe-X]%we[X])*M:0),se)for(;;)if(Z==0){for(ge=1,X=de[0];X>=10;X/=10,ge++);for(X=de[0]+=M,M=1;X>=10;X/=10,M++);ge!=M&&(O.e++,de[0]==l&&(de[0]=1));break}else{if(de[Z]+=M,de[Z]!=l)break;de[Z--]=0,M=1}for(ge=de.length;de[--ge]===0;de.pop());}O.e>R?O.c=O.e=null:O.e=w?A(G,ee):D(G,ee,"0"),O.s<0?"-"+G:G)}return K.absoluteValue=K.abs=function(){var O=new J(this);return O.s<0&&(O.s=1),O},K.comparedTo=function(O,G){return b(this,new J(O,G))},K.decimalPlaces=K.dp=function(O,G){var ee,se,pe,ge=this;if(O!=null)return m(O,0,p),G==null?G=C:m(G,0,8),oe(new J(ge),O+ge.e+1,G);if(!(ee=ge.c))return null;if(se=((pe=ee.length-1)-y(this.e/c))*c,pe=ee[pe])for(;pe%10==0;pe/=10,se--);return se<0&&(se=0),se},K.dividedBy=K.div=function(O,G){return g(this,new J(O,G),P,C)},K.dividedToIntegerBy=K.idiv=function(O,G){return g(this,new J(O,G),0,1)},K.exponentiatedBy=K.pow=function(O,G){var ee,se,pe,ge,X,M,z,Z,Q,de=this;if(O=new J(O),O.c&&!O.isInteger())throw Error(a+"Exponent not an integer: "+ue(O));if(G!=null&&(G=new J(G)),M=O.e>14,!de.c||!de.c[0]||de.c[0]==1&&!de.e&&de.c.length==1||!O.c||!O.c[0])return Q=new J(Math.pow(+ue(de),M?O.s*(2-E(O)):+ue(O))),G?Q.mod(G):Q;if(z=O.s<0,G){if(G.c?!G.c[0]:!G.s)return new J(NaN);se=!z&&de.isInteger()&&G.isInteger(),se&&(de=de.mod(G))}else{if(O.e>9&&(de.e>0||de.e<-1||(de.e==0?de.c[0]>1||M&&de.c[1]>=24e7:de.c[0]<8e13||M&&de.c[0]<=9999975e7)))return ge=de.s<0&&E(O)?-0:0,de.e>-1&&(ge=1/ge),new J(z?1/ge:ge);S&&(ge=o(S/c+2))}for(M?(ee=new J(.5),z&&(O.s=1),Z=E(O)):(pe=Math.abs(+ue(O)),Z=pe%2),Q=new J(W);;){if(Z){if(Q=Q.times(de),!Q.c)break;ge?Q.c.length>ge&&(Q.c.length=ge):se&&(Q=Q.mod(G))}if(pe){if(pe=i(pe/2),pe===0)break;Z=pe%2}else if(O=O.times(ee),oe(O,O.e+1,1),O.e>14)Z=E(O);else{if(pe=+ue(O),pe===0)break;Z=pe%2}de=de.times(de),ge?de.c&&de.c.length>ge&&(de.c.length=ge):se&&(de=de.mod(G))}return se?Q:(z&&(Q=W.div(Q)),G?Q.mod(G):ge?oe(Q,S,C,X):Q)},K.integerValue=function(O){var G=new J(this);return O==null?O=C:m(O,0,8),oe(G,G.e+1,O)},K.isEqualTo=K.eq=function(O,G){return b(this,new J(O,G))===0},K.isFinite=function(){return!!this.c},K.isGreaterThan=K.gt=function(O,G){return b(this,new J(O,G))>0},K.isGreaterThanOrEqualTo=K.gte=function(O,G){return(G=b(this,new J(O,G)))===1||G===0},K.isInteger=function(){return!!this.c&&y(this.e/c)>this.c.length-2},K.isLessThan=K.lt=function(O,G){return b(this,new J(O,G))<0},K.isLessThanOrEqualTo=K.lte=function(O,G){return(G=b(this,new J(O,G)))===-1||G===0},K.isNaN=function(){return!this.s},K.isNegative=function(){return this.s<0},K.isPositive=function(){return this.s>0},K.isZero=function(){return!!this.c&&this.c[0]==0},K.minus=function(O,G){var ee,se,pe,ge,X=this,M=X.s;if(O=new J(O,G),G=O.s,!M||!G)return new J(NaN);if(M!=G)return O.s=-G,X.plus(O);var z=X.e/c,Z=O.e/c,Q=X.c,de=O.c;if(!z||!Z){if(!Q||!de)return Q?(O.s=-G,O):new J(de?X:NaN);if(!Q[0]||!de[0])return de[0]?(O.s=-G,O):new J(Q[0]?X:C==3?-0:0)}if(z=y(z),Z=y(Z),Q=Q.slice(),M=z-Z){for((ge=M<0)?(M=-M,pe=Q):(Z=z,pe=de),pe.reverse(),G=M;G--;pe.push(0));pe.reverse()}else for(se=(ge=(M=Q.length)<(G=de.length))?M:G,M=G=0;G0)for(;G--;Q[ee++]=0);for(G=l-1;se>M;){if(Q[--se]=0;){for(ee=0,we=k[pe]%Te,Se=k[pe]/Te|0,X=z,ge=pe+X;ge>pe;)Z=x[--X]%Te,Q=x[X]/Te|0,M=Se*Z+Q*we,Z=we*Z+M%Te*Te+Ee[ge]+ee,ee=(Z/Ae|0)+(M/Te|0)+Se*Q,Ee[ge--]=Z%Ae;Ee[ge]=ee}return ee?++se:Ee.splice(0,1),ce(O,Ee,se)},K.negated=function(){var O=new J(this);return O.s=-O.s||null,O},K.plus=function(O,G){var ee,se=this,pe=se.s;if(O=new J(O,G),G=O.s,!pe||!G)return new J(NaN);if(pe!=G)return O.s=-G,se.minus(O);var ge=se.e/c,X=O.e/c,M=se.c,z=O.c;if(!ge||!X){if(!M||!z)return new J(pe/0);if(!M[0]||!z[0])return z[0]?O:new J(M[0]?se:pe*0)}if(ge=y(ge),X=y(X),M=M.slice(),pe=ge-X){for(pe>0?(X=ge,ee=z):(pe=-pe,ee=M),ee.reverse();pe--;ee.push(0));ee.reverse()}for(pe=M.length,G=z.length,pe-G<0&&(ee=z,z=M,M=ee,G=pe),pe=0;G;)pe=(M[--G]=M[G]+z[G]+pe)/l|0,M[G]=l===M[G]?0:M[G]%l;return pe&&(M=[pe].concat(M),++X),ce(O,M,X)},K.precision=K.sd=function(O,G){var ee,se,pe,ge=this;if(O!=null&&O!==!!O)return m(O,1,p),G==null?G=C:m(G,0,8),oe(new J(ge),O,G);if(!(ee=ge.c))return null;if(pe=ee.length-1,se=pe*c+1,pe=ee[pe]){for(;pe%10==0;pe/=10,se--);for(pe=ee[0];pe>=10;pe/=10,se++);}return O&&ge.e+1>se&&(se=ge.e+1),se},K.shiftedBy=function(O){return m(O,-u,u),this.times("1e"+O)},K.squareRoot=K.sqrt=function(){var O,G,ee,se,pe,ge=this,X=ge.c,M=ge.s,z=ge.e,Z=P+4,Q=new J("0.5");if(M!==1||!X||!X[0])return new J(!M||M<0&&(!X||X[0])?NaN:X?ge:1/0);if(M=Math.sqrt(+ue(ge)),M==0||M==1/0?(G=_(X),(G.length+z)%2==0&&(G+="0"),M=Math.sqrt(+G),z=y((z+1)/2)-(z<0||z%2),M==1/0?G="5e"+z:(G=M.toExponential(),G=G.slice(0,G.indexOf("e")+1)+z),ee=new J(G)):ee=new J(M+""),ee.c[0]){for(z=ee.e,M=z+Z,M<3&&(M=0);;)if(pe=ee,ee=Q.times(pe.plus(g(ge,pe,Z,1))),_(pe.c).slice(0,M)===(G=_(ee.c)).slice(0,M))if(ee.e0&&Ee>0){for(ge=Ee%M||M,Q=Se.substr(0,ge);ge0&&(Q+=Z+Se.slice(ge)),we&&(Q="-"+Q)}se=de?Q+(ee.decimalSeparator||"")+((z=+ee.fractionGroupSize)?de.replace(new RegExp("\\d{"+z+"}\\B","g"),"$&"+(ee.fractionGroupSeparator||"")):de):Q}return(ee.prefix||"")+se+(ee.suffix||"")},K.toFraction=function(O){var G,ee,se,pe,ge,X,M,z,Z,Q,de,we,Se=this,Ee=Se.c;if(O!=null&&(M=new J(O),!M.isInteger()&&(M.c||M.s!==1)||M.lt(W)))throw Error(a+"Argument "+(M.isInteger()?"out of range: ":"not an integer: ")+ue(M));if(!Ee)return new J(Se);for(G=new J(W),Z=ee=new J(W),se=z=new J(W),we=_(Ee),ge=G.e=we.length-Se.e-1,G.c[0]=f[(X=ge%c)<0?c+X:X],O=!O||M.comparedTo(G)>0?ge>0?G:Z:M,X=R,R=1/0,M=new J(we),z.c[0]=0;Q=g(M,G,0,1),pe=ee.plus(Q.times(se)),pe.comparedTo(O)!=1;)ee=se,se=pe,Z=z.plus(Q.times(pe=Z)),z=pe,G=M.minus(Q.times(pe=G)),M=pe;return pe=g(O.minus(ee),se,0,1),z=z.plus(pe.times(Z)),ee=ee.plus(pe.times(se)),z.s=Z.s=Se.s,ge=ge*2,de=g(Z,se,ge,C).minus(Se).abs().comparedTo(g(z,ee,ge,C).minus(Se).abs())<1?[Z,se]:[z,ee],R=X,de},K.toNumber=function(){return+ue(this)},K.toPrecision=function(O,G){return O!=null&&m(O,1,p),te(this,O,G,2)},K.toString=function(O){var G,ee=this,se=ee.s,pe=ee.e;return pe===null?se?(G="Infinity",se<0&&(G="-"+G)):G="NaN":(O==null?G=pe<=v||pe>=w?A(_(ee.c),pe):D(_(ee.c),pe,"0"):O===10&&q?(ee=oe(new J(ee),P+pe+1,C),G=D(_(ee.c),ee.e,"0")):(m(O,2,T.length,"Base"),G=N(D(_(ee.c),pe,"0"),10,O,se,!0)),se<0&&ee.c[0]&&(G="-"+G)),G},K.valueOf=K.toJSON=function(){return ue(this)},K._isBigNumber=!0,$!=null&&J.set($),J}function y($){var g=$|0;return $>0||$===g?g:g-1}function _($){for(var g,N,V=1,K=$.length,W=$[0]+"";Vw^N?1:-1;for(C=(v=K.length)<(w=W.length)?v:w,P=0;PW[P]^N?1:-1;return v==w?0:v>w^N?1:-1}function m($,g,N,V){if($N||$!==i($))throw Error(a+(V||"Argument")+(typeof $=="number"?$N?" out of range: ":" not an integer: ":" not a primitive number: ")+String($))}function E($){var g=$.c.length-1;return y($.e/c)==g&&$.c[g]%2!=0}function A($,g){return($.length>1?$.charAt(0)+"."+$.slice(1):$)+(g<0?"e":"e+")+g}function D($,g,N){var V,K;if(g<0){for(K=N+".";++g;K+=N);$=K+$}else if(V=$.length,++g>V){for(K=N,g-=V;--g;K+=N);$+=K}else g!isNaN(parseFloat(y))&&isFinite(y);e.isNumeric=n,e.prettifyNumberConfig={ALPH:{minDecimalPlaces:2,maxDecimalPlaces:10,minDecimalSignificantDigits:2,decimalPlacesWhenZero:2},TOKEN:{minDecimalPlaces:4,maxDecimalPlaces:16,minDecimalSignificantDigits:2,decimalPlacesWhenZero:1},Exact:{minDecimalPlaces:18,maxDecimalPlaces:18,minDecimalSignificantDigits:0,decimalPlacesWhenZero:0}};function o(y){return s(y,18,e.prettifyNumberConfig.ALPH)}e.prettifyAttoAlphAmount=o;function i(y,_){return s(y,_,e.prettifyNumberConfig.TOKEN)}e.prettifyTokenAmount=i;function a(y,_){return s(y,_,e.prettifyNumberConfig.Exact)}e.prettifyExactAmount=a;function s(y,_,b){const m=f(h(y),_);if(!(0,e.isNumeric)(m))return;const E=new r.default(m);let A;if(E.gte(1))A=E.toFormat(b.minDecimalPlaces);else{const N=E.toFormat(b.maxDecimalPlaces).split(".")[1],V=N==null?void 0:N.match(/^0+/),K=V&&V.length?V[0].length:0,W=Math.max(K+b.minDecimalSignificantDigits,b.minDecimalPlaces);A=E.toFormat(W)}let D=A.replace(/0+$/,"");const $=1+A.indexOf(".")+b.decimalPlacesWhenZero;return D.length<$&&(D=A.substring(0,$)),D[D.length-1]==="."&&(D=D.slice(0,-1)),D}e.prettifyNumber=s;const l=BigInt(-1),c=BigInt(0),u="0000";function f(y,_){let b="";yp(P,K)),type:"Array"}}e.toApiArray=d;function p(g,N){return N==="Bool"?{value:a(g),type:N}:N==="U256"||N==="I256"?{value:s(g),type:N}:N==="ByteVec"?{value:u(g),type:N}:N==="Address"?{value:f(g),type:N}:d(N,g)}e.toApiVal=p;function h(g,N,V,K=!1){if(g.length===0)throw new Error("Not enough Vals");const W=g[`${N}`];if(V==="Bool"&&W.type===V)return[W.value,N+1];if((V==="U256"||V==="I256")&&W.type===V)return[c(W.value),N+1];if((V==="ByteVec"||V==="Address")&&(W.type===V||K))return[W.value,N+1];{const[P,C]=m(V),v=C.reduce((R,L)=>R*L),w=N+v,B=g.slice(N,w);if(B.length==v&&B.every(R=>R.type===P)){const R=B.map(L=>b(L,P));return[E(R,C),w]}else throw new Error(`Invalid array Val type: ${B}, ${V}`)}}function y(g,N,V,K=!1){let W=0;const P={};return V.forEach((C,v)=>{const w=N[`${v}`],[B,R]=h(g,W,C,K);W=R,P[`${w}`]=B}),P}e.fromApiVals=y;function _(g,N){let V=0;const K=[];for(const W of N){const[P,C]=h(g,V,W);K.push(P),V=C}return K}e.fromApiArray=_;function b(g,N){if(g.type==="Bool"&&g.type===N)return g.value;if((g.type==="U256"||g.type==="I256")&&g.type===N)return c(g.value);if((g.type==="ByteVec"||g.type==="Address")&&g.type===N)return g.value;throw new Error(`Invalid node.Val type: ${g}`)}e.fromApiVal=b;function m(g){const N=g.lastIndexOf(";");if(N===-1)throw new Error(`Invalid Val type: ${g}`);const V=g.slice(1,N),K=parseInt(g.slice(N+1,-1));if(V[0]=="["){const[W,P]=m(V);return[W,(P.unshift(K),P)]}else return[V,[K]]}function E(g,N){if(N.length==1)return g;{const V=[],K=g.length/N[0],W=N.slice(1);for(let P=0;PV*K)}e.typeLength=A;function D(g,N){for(const[V,K]of Object.entries(g))for(const W of Object.keys(K))K[`${W}`]=async(...P)=>N({path:V,method:W,params:P})}e.forwardRequests=D;async function $(g,N){const V=g[`${N.path}`][`${N.method}`];return V(...N.params)}e.request=$,function(g){g.FungibleToken="0001",g.NFTCollection="0002",g.NFT="0003",g.NFTCollectionWithRoyalty="000201"}(e.StdInterfaceIds||(e.StdInterfaceIds={}))}(iw)),iw}var A4={};(function(){(function(e){(function(t){var r={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};function n(V){return V&&DataView.prototype.isPrototypeOf(V)}if(r.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],i=ArrayBuffer.isView||function(V){return V&&o.indexOf(Object.prototype.toString.call(V))>-1};function a(V){if(typeof V!="string"&&(V=String(V)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(V))throw new TypeError("Invalid character in header field name");return V.toLowerCase()}function s(V){return typeof V!="string"&&(V=String(V)),V}function l(V){var K={next:function(){var W=V.shift();return{done:W===void 0,value:W}}};return r.iterable&&(K[Symbol.iterator]=function(){return K}),K}function c(V){this.map={},V instanceof c?V.forEach(function(K,W){this.append(W,K)},this):Array.isArray(V)?V.forEach(function(K){this.append(K[0],K[1])},this):V&&Object.getOwnPropertyNames(V).forEach(function(K){this.append(K,V[K])},this)}c.prototype.append=function(V,K){V=a(V),K=s(K);var W=this.map[V];this.map[V]=W?W+", "+K:K},c.prototype.delete=function(V){delete this.map[a(V)]},c.prototype.get=function(V){return V=a(V),this.has(V)?this.map[V]:null},c.prototype.has=function(V){return this.map.hasOwnProperty(a(V))},c.prototype.set=function(V,K){this.map[a(V)]=s(K)},c.prototype.forEach=function(V,K){for(var W in this.map)this.map.hasOwnProperty(W)&&V.call(K,this.map[W],W,this)},c.prototype.keys=function(){var V=[];return this.forEach(function(K,W){V.push(W)}),l(V)},c.prototype.values=function(){var V=[];return this.forEach(function(K){V.push(K)}),l(V)},c.prototype.entries=function(){var V=[];return this.forEach(function(K,W){V.push([W,K])}),l(V)},r.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);function u(V){if(V.bodyUsed)return Promise.reject(new TypeError("Already read"));V.bodyUsed=!0}function f(V){return new Promise(function(K,W){V.onload=function(){K(V.result)},V.onerror=function(){W(V.error)}})}function d(V){var K=new FileReader,W=f(K);return K.readAsArrayBuffer(V),W}function p(V){var K=new FileReader,W=f(K);return K.readAsText(V),W}function h(V){for(var K=new Uint8Array(V),W=new Array(K.length),P=0;P-1?K:V}function E(V,K){K=K||{};var W=K.body;if(V instanceof E){if(V.bodyUsed)throw new TypeError("Already read");this.url=V.url,this.credentials=V.credentials,K.headers||(this.headers=new c(V.headers)),this.method=V.method,this.mode=V.mode,this.signal=V.signal,!W&&V._bodyInit!=null&&(W=V._bodyInit,V.bodyUsed=!0)}else this.url=String(V);if(this.credentials=K.credentials||this.credentials||"same-origin",(K.headers||!this.headers)&&(this.headers=new c(K.headers)),this.method=m(K.method||this.method||"GET"),this.mode=K.mode||this.mode||null,this.signal=K.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&W)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(W)}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})};function A(V){var K=new FormData;return V.trim().split("&").forEach(function(W){if(W){var P=W.split("="),C=P.shift().replace(/\+/g," "),v=P.join("=").replace(/\+/g," ");K.append(decodeURIComponent(C),decodeURIComponent(v))}}),K}function D(V){var K=new c,W=V.replace(/\r?\n[\t ]+/g," ");return W.split(/\r?\n/).forEach(function(P){var C=P.split(":"),v=C.shift().trim();if(v){var w=C.join(":").trim();K.append(v,w)}}),K}_.call(E.prototype);function $(V,K){K||(K={}),this.type="default",this.status=K.status===void 0?200:K.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in K?K.statusText:"OK",this.headers=new c(K.headers),this.url=K.url||"",this._initBody(V)}_.call($.prototype),$.prototype.clone=function(){return new $(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},$.error=function(){var V=new $(null,{status:0,statusText:""});return V.type="error",V};var g=[301,302,303,307,308];$.redirect=function(V,K){if(g.indexOf(K)===-1)throw new RangeError("Invalid status code");return new $(null,{status:K,headers:{location:V}})},t.DOMException=e.DOMException;try{new t.DOMException}catch{t.DOMException=function(K,W){this.message=K,this.name=W;var P=Error(K);this.stack=P.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function N(V,K){return new Promise(function(W,P){var C=new E(V,K);if(C.signal&&C.signal.aborted)return P(new t.DOMException("Aborted","AbortError"));var v=new XMLHttpRequest;function w(){v.abort()}v.onload=function(){var B={status:v.status,statusText:v.statusText,headers:D(v.getAllResponseHeaders()||"")};B.url="responseURL"in v?v.responseURL:B.headers.get("X-Request-URL");var R="response"in v?v.response:v.responseText;W(new $(R,B))},v.onerror=function(){P(new TypeError("Network request failed"))},v.ontimeout=function(){P(new TypeError("Network request failed"))},v.onabort=function(){P(new t.DOMException("Aborted","AbortError"))},v.open(C.method,C.url,!0),C.credentials==="include"?v.withCredentials=!0:C.credentials==="omit"&&(v.withCredentials=!1),"responseType"in v&&r.blob&&(v.responseType="blob"),C.headers.forEach(function(B,R){v.setRequestHeader(R,B)}),C.signal&&(C.signal.addEventListener("abort",w),v.onreadystatechange=function(){v.readyState===4&&C.signal.removeEventListener("abort",w)}),v.send(typeof C._bodyInit>"u"?null:C._bodyInit)})}return N.polyfill=!0,e.fetch||(e.fetch=N,e.Headers=c,e.Request=E,e.Response=$),t.Headers=c,t.Request=E,t.Response=$,t.fetch=N,Object.defineProperty(t,"__esModule",{value:!0}),t})({})})(typeof self<"u"?self:Le)})();var Fs={};Object.defineProperty(Fs,"__esModule",{value:!0});Fs.isBalanceEqual=Fs.convertHttpResponse=void 0;function o4e(e){if(e.error){const t=e.error.detail??`status code: ${e.status}`;throw new Error(`[API Error] - ${t}`)}else return e.data}Fs.convertHttpResponse=o4e;function i4e(e,t){const r=(o,i)=>{const a=(o==null?void 0:o.length)??0,s=(i==null?void 0:i.length)??0;if(a!==s)return!1;if(a===0)return!0;const l=i.map(c=>({...c,used:!1}));return o.every(c=>{const u=l.find(f=>!f.used&&c.id===f.id&&c.amount===f.amount);return u===void 0?!1:(u.used=!0,!0)})},n=e.balance===t.balance&&e.lockedBalance===t.lockedBalance;return e.utxoNum===t.utxoNum&&n&&r(e.tokenBalances,t.tokenBalances)&&r(e.lockedTokenBalances,t.lockedTokenBalances)}Fs.isBalanceEqual=i4e;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Api=e.HttpClient=e.ContentType=void 0;const t=Fs;var r;(function(i){i.Json="application/json",i.FormData="multipart/form-data",i.UrlEncoded="application/x-www-form-urlencoded",i.Text="text/plain"})(r=e.ContentType||(e.ContentType={}));class n{constructor(a={}){this.baseUrl="../",this.securityData=null,this.abortControllers=new Map,this.customFetch=(...s)=>fetch(...s),this.baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"},this.setSecurityData=s=>{this.securityData=s},this.contentFormatters={[r.Json]:s=>s!==null&&(typeof s=="object"||typeof s=="string")?JSON.stringify(s):s,[r.Text]:s=>s!==null&&typeof s!="string"?JSON.stringify(s):s,[r.FormData]:s=>Object.keys(s||{}).reduce((l,c)=>{const u=s[c];return l.append(c,u instanceof Blob?u:typeof u=="object"&&u!==null?JSON.stringify(u):`${u}`),l},new FormData),[r.UrlEncoded]:s=>this.toQueryString(s)},this.createAbortSignal=s=>{if(this.abortControllers.has(s)){const c=this.abortControllers.get(s);return c?c.signal:void 0}const l=new AbortController;return this.abortControllers.set(s,l),l.signal},this.abortRequest=s=>{const l=this.abortControllers.get(s);l&&(l.abort(),this.abortControllers.delete(s))},this.request=async({body:s,secure:l,path:c,type:u,query:f,format:d,baseUrl:p,cancelToken:h,...y})=>{const _=(typeof l=="boolean"?l:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},b=this.mergeRequestParams(y,_),m=f&&this.toQueryString(f),E=this.contentFormatters[u||r.Json],A=d||b.format;return this.customFetch(`${p||this.baseUrl||""}${c}${m?`?${m}`:""}`,{...b,headers:{...b.headers||{},...u&&u!==r.FormData?{"Content-Type":u}:{}},signal:h?this.createAbortSignal(h):b.signal,body:typeof s>"u"||s===null?null:E(s)}).then(async D=>{const $=D;$.data=null,$.error=null;const g=A?await D[A]().then(N=>($.ok?$.data=N:$.error=N,$)).catch(N=>($.error=N,$)):$;return h&&this.abortControllers.delete(h),g})},Object.assign(this,a)}encodeQueryParam(a,s){return`${encodeURIComponent(a)}=${encodeURIComponent(typeof s=="number"?s:`${s}`)}`}addQueryParam(a,s){return this.encodeQueryParam(s,a[s])}addArrayQueryParam(a,s){return a[s].map(c=>this.encodeQueryParam(s,c)).join("&")}toQueryString(a){const s=a||{};return Object.keys(s).filter(c=>typeof s[c]<"u").map(c=>Array.isArray(s[c])?this.addArrayQueryParam(s,c):this.addQueryParam(s,c)).join("&")}addQueryParams(a){const s=this.toQueryString(a);return s?`?${s}`:""}mergeRequestParams(a,s){return{...this.baseApiParams,...a,...s||{},headers:{...this.baseApiParams.headers||{},...a.headers||{},...s&&s.headers||{}}}}}e.HttpClient=n;class o extends n{constructor(){super(...arguments),this.wallets={getWallets:(a={})=>this.request({path:"/wallets",method:"GET",format:"json",...a}).then(t.convertHttpResponse),putWallets:(a,s={})=>this.request({path:"/wallets",method:"PUT",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postWallets:(a,s={})=>this.request({path:"/wallets",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getWalletsWalletName:(a,s={})=>this.request({path:`/wallets/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),deleteWalletsWalletName:(a,s,l={})=>this.request({path:`/wallets/${a}`,method:"DELETE",body:s,type:r.Json,...l}).then(t.convertHttpResponse),postWalletsWalletNameLock:(a,s={})=>this.request({path:`/wallets/${a}/lock`,method:"POST",...s}).then(t.convertHttpResponse),postWalletsWalletNameUnlock:(a,s,l={})=>this.request({path:`/wallets/${a}/unlock`,method:"POST",body:s,type:r.Json,...l}).then(t.convertHttpResponse),getWalletsWalletNameBalances:(a,s={})=>this.request({path:`/wallets/${a}/balances`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),postWalletsWalletNameRevealMnemonic:(a,s,l={})=>this.request({path:`/wallets/${a}/reveal-mnemonic`,method:"POST",body:s,type:r.Json,format:"json",...l}).then(t.convertHttpResponse),postWalletsWalletNameTransfer:(a,s,l={})=>this.request({path:`/wallets/${a}/transfer`,method:"POST",body:s,type:r.Json,format:"json",...l}).then(t.convertHttpResponse),postWalletsWalletNameSweepActiveAddress:(a,s,l={})=>this.request({path:`/wallets/${a}/sweep-active-address`,method:"POST",body:s,type:r.Json,format:"json",...l}).then(t.convertHttpResponse),postWalletsWalletNameSweepAllAddresses:(a,s,l={})=>this.request({path:`/wallets/${a}/sweep-all-addresses`,method:"POST",body:s,type:r.Json,format:"json",...l}).then(t.convertHttpResponse),postWalletsWalletNameSign:(a,s,l={})=>this.request({path:`/wallets/${a}/sign`,method:"POST",body:s,type:r.Json,format:"json",...l}).then(t.convertHttpResponse),getWalletsWalletNameAddresses:(a,s={})=>this.request({path:`/wallets/${a}/addresses`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getWalletsWalletNameAddressesAddress:(a,s,l={})=>this.request({path:`/wallets/${a}/addresses/${s}`,method:"GET",format:"json",...l}).then(t.convertHttpResponse),getWalletsWalletNameMinerAddresses:(a,s={})=>this.request({path:`/wallets/${a}/miner-addresses`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),postWalletsWalletNameDeriveNextAddress:(a,s,l={})=>this.request({path:`/wallets/${a}/derive-next-address`,method:"POST",query:s,format:"json",...l}).then(t.convertHttpResponse),postWalletsWalletNameDeriveNextMinerAddresses:(a,s={})=>this.request({path:`/wallets/${a}/derive-next-miner-addresses`,method:"POST",format:"json",...s}).then(t.convertHttpResponse),postWalletsWalletNameChangeActiveAddress:(a,s,l={})=>this.request({path:`/wallets/${a}/change-active-address`,method:"POST",body:s,type:r.Json,...l}).then(t.convertHttpResponse)},this.infos={getInfosNode:(a={})=>this.request({path:"/infos/node",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosVersion:(a={})=>this.request({path:"/infos/version",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosChainParams:(a={})=>this.request({path:"/infos/chain-params",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosSelfClique:(a={})=>this.request({path:"/infos/self-clique",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosInterCliquePeerInfo:(a={})=>this.request({path:"/infos/inter-clique-peer-info",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosDiscoveredNeighbors:(a={})=>this.request({path:"/infos/discovered-neighbors",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosMisbehaviors:(a={})=>this.request({path:"/infos/misbehaviors",method:"GET",format:"json",...a}).then(t.convertHttpResponse),postInfosMisbehaviors:(a,s={})=>this.request({path:"/infos/misbehaviors",method:"POST",body:a,type:r.Json,...s}).then(t.convertHttpResponse),getInfosUnreachable:(a={})=>this.request({path:"/infos/unreachable",method:"GET",format:"json",...a}).then(t.convertHttpResponse),postInfosDiscovery:(a,s={})=>this.request({path:"/infos/discovery",method:"POST",body:a,type:r.Json,...s}).then(t.convertHttpResponse),getInfosHistoryHashrate:(a,s={})=>this.request({path:"/infos/history-hashrate",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getInfosCurrentHashrate:(a,s={})=>this.request({path:"/infos/current-hashrate",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getInfosCurrentDifficulty:(a={})=>this.request({path:"/infos/current-difficulty",method:"GET",format:"json",...a}).then(t.convertHttpResponse)},this.blockflow={getBlockflowBlocks:(a,s={})=>this.request({path:"/blockflow/blocks",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowBlocksWithEvents:(a,s={})=>this.request({path:"/blockflow/blocks-with-events",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowBlocksBlockHash:(a,s={})=>this.request({path:`/blockflow/blocks/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getBlockflowBlocksWithEventsBlockHash:(a,s={})=>this.request({path:`/blockflow/blocks-with-events/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getBlockflowIsBlockInMainChain:(a,s={})=>this.request({path:"/blockflow/is-block-in-main-chain",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowHashes:(a,s={})=>this.request({path:"/blockflow/hashes",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowChainInfo:(a,s={})=>this.request({path:"/blockflow/chain-info",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowHeadersBlockHash:(a,s={})=>this.request({path:`/blockflow/headers/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse)},this.addresses={getAddressesAddressBalance:(a,s,l={})=>this.request({path:`/addresses/${a}/balance`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getAddressesAddressUtxos:(a,s={})=>this.request({path:`/addresses/${a}/utxos`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressGroup:(a,s={})=>this.request({path:`/addresses/${a}/group`,method:"GET",format:"json",...s}).then(t.convertHttpResponse)},this.transactions={postTransactionsBuild:(a,s={})=>this.request({path:"/transactions/build",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsSweepAddressBuild:(a,s={})=>this.request({path:"/transactions/sweep-address/build",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsSubmit:(a,s={})=>this.request({path:"/transactions/submit",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsDecodeUnsignedTx:(a,s={})=>this.request({path:"/transactions/decode-unsigned-tx",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getTransactionsDetailsTxid:(a,s,l={})=>this.request({path:`/transactions/details/${a}`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getTransactionsStatus:(a,s={})=>this.request({path:"/transactions/status",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse)},this.mempool={getMempoolTransactions:(a={})=>this.request({path:"/mempool/transactions",method:"GET",format:"json",...a}).then(t.convertHttpResponse),deleteMempoolTransactions:(a={})=>this.request({path:"/mempool/transactions",method:"DELETE",...a}).then(t.convertHttpResponse),putMempoolTransactionsRebroadcast:(a,s={})=>this.request({path:"/mempool/transactions/rebroadcast",method:"PUT",query:a,...s}).then(t.convertHttpResponse),putMempoolTransactionsValidate:(a={})=>this.request({path:"/mempool/transactions/validate",method:"PUT",...a}).then(t.convertHttpResponse)},this.contracts={postContractsCompileScript:(a,s={})=>this.request({path:"/contracts/compile-script",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsUnsignedTxExecuteScript:(a,s={})=>this.request({path:"/contracts/unsigned-tx/execute-script",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsCompileContract:(a,s={})=>this.request({path:"/contracts/compile-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsCompileProject:(a,s={})=>this.request({path:"/contracts/compile-project",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsUnsignedTxDeployContract:(a,s={})=>this.request({path:"/contracts/unsigned-tx/deploy-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getContractsAddressState:(a,s,l={})=>this.request({path:`/contracts/${a}/state`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),postContractsTestContract:(a,s={})=>this.request({path:"/contracts/test-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsCallContract:(a,s={})=>this.request({path:"/contracts/call-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsMulticallContract:(a,s={})=>this.request({path:"/contracts/multicall-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse)},this.multisig={postMultisigAddress:(a,s={})=>this.request({path:"/multisig/address",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postMultisigBuild:(a,s={})=>this.request({path:"/multisig/build",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postMultisigSubmit:(a,s={})=>this.request({path:"/multisig/submit",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse)},this.utils={postUtilsVerifySignature:(a,s={})=>this.request({path:"/utils/verify-signature",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),putUtilsCheckHashIndexing:(a={})=>this.request({path:"/utils/check-hash-indexing",method:"PUT",...a}).then(t.convertHttpResponse)},this.miners={postMinersCpuMining:(a,s={})=>this.request({path:"/miners/cpu-mining",method:"POST",query:a,format:"json",...s}).then(t.convertHttpResponse),postMinersCpuMiningMineOneBlock:(a,s={})=>this.request({path:"/miners/cpu-mining/mine-one-block",method:"POST",query:a,format:"json",...s}).then(t.convertHttpResponse),getMinersAddresses:(a={})=>this.request({path:"/miners/addresses",method:"GET",format:"json",...a}).then(t.convertHttpResponse),putMinersAddresses:(a,s={})=>this.request({path:"/miners/addresses",method:"PUT",body:a,type:r.Json,...s}).then(t.convertHttpResponse)},this.events={getEventsContractContractaddress:(a,s,l={})=>this.request({path:`/events/contract/${a}`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getEventsContractContractaddressCurrentCount:(a,s={})=>this.request({path:`/events/contract/${a}/current-count`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getEventsTxIdTxid:(a,s,l={})=>this.request({path:`/events/tx-id/${a}`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getEventsBlockHashBlockhash:(a,s,l={})=>this.request({path:`/events/block-hash/${a}`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse)}}}e.Api=o})(A4);var yw={},Ht={},YA;function BH(){if(YA)return Ht;YA=1;var e;Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.buildDebugBytecode=Ht.encodeContractField=Ht.buildContractByteCode=Ht.buildScriptByteCode=Ht.encodeScriptField=Ht.encodeScriptFieldAsString=Ht.encodeAddress=Ht.encodeByteVec=Ht.encodeU256=Ht.encodeI256=Ht.encodeBool=void 0;const t=Gu,r=ef(),n=Kn(),o=BigInt(0);class i{}i.oneByteBound=BigInt(64),i.twoByteBound=i.oneByteBound<=o?f(R):d(R)}Ht.encodeI256=c;function u(R,L,U){let S=R.toString(16);S.length%2===1?S="0"+S:L&&S[0]>="8"&&(S="00"+S);const F=S.length/2,T=new Uint8Array(F+1);for(let J=0;J>8)+s.twoBytePrefix,L&255])}else if(R>24)+s.fourBytePrefix,L>>16&255,L>>8&255,L&255])}else{if(R=-a.oneByteBound){const L=Number(R);return new Uint8Array([(L^s.oneByteNegPrefix)&255])}else if(R>=-a.twoByteBound){const L=Number(R);return new Uint8Array([(L>>8^s.twoByteNegPrefix)&255,L&255])}else if(R>=-a.fourByteBound){const L=Number(R);return new Uint8Array([(L>>24^s.fourByteNegPrefix)&255,L>>16&255,L>>8&255,L&255])}else{if(R>=a.i256LowerBound)return u(~R,!0,!0);throw Error(`Too small number for i256: ${R}`)}}function p(R){if(R>8&255)+s.twoBytePrefix,L&255])}else if(R>24&255)+s.fourBytePrefix,L>>16&255,L>>8&255,L&255])}else{if(R{const T=U.names[`${F}`],q=U.types[`${F}`];if(T in L){const J=L[`${T}`];return N(T,()=>A(q,J))}else throw new Error(`The value of field ${T} is not provided`)})}Ht.buildScriptByteCode=g;function N(R,L){try{return L()}catch(U){throw U instanceof Error?new Error(`Invalid ${R}, error: ${U.message}`):U}}function V(R,L,U){const F=L.isMutable.map((q,J)=>J).filter(q=>L.isMutable[`${q}`]===U).flatMap(q=>{const J=L.names[`${q}`],te=L.types[`${q}`];if(J in R){const ie=R[`${J}`];return N(J,()=>w(te,ie))}else throw new Error(`The value of field ${J} is not provided`)});return t.Buffer.from(c(BigInt(F.length))).toString("hex")+F.map(q=>t.Buffer.from(q).toString("hex")).join("")}function K(R,L,U){const S=V(L,U,!1),F=V(L,U,!0);return R+S+F}Ht.buildContractByteCode=K;var W;(function(R){R[R.Bool=0]="Bool",R[R.I256=1]="I256",R[R.U256=2]="U256",R[R.ByteVec=3]="ByteVec",R[R.Address=4]="Address"})(W||(W={}));function P(R){return new Uint8Array([W.I256,...c(R)])}function C(R){return new Uint8Array([W.U256,...p(R)])}function v(R,L){if(!Array.isArray(L))throw new Error(`Expected array, got ${L}`);const U=R.lastIndexOf(";");if(U==-1)throw new Error(`Invalid Array type: ${R}`);const S=R.slice(1,U),F=parseInt(R.slice(U+1,-1));if(L.length!=F)throw new Error(`Invalid val dimension: ${L}`);return L.flatMap(T=>w(S,T))}function w(R,L){switch(R){case"Bool":const U=(0,r.toApiBoolean)(L)?1:0;return[new Uint8Array([W.Bool,U])];case"I256":const S=(0,r.toApiNumber256)(L);return[P(BigInt(S))];case"U256":const F=(0,r.toApiNumber256)(L);return[C(BigInt(F))];case"ByteVec":const T=(0,r.toApiByteVec)(L);return[new Uint8Array([W.ByteVec,...h(T)])];case"Address":const q=(0,r.toApiAddress)(L);return[new Uint8Array([W.Address,...y(q)])];default:return v(R,L)}}Ht.encodeContractField=w;function B(R,L){if(L==="")return R;const U=/[=+-][0-9a-f]*/g;let S="",F=0;for(const T of L.matchAll(U)){const q=T[0],J=q[0];if(J==="="){const te=parseInt(q.substring(1));S=S+R.slice(F,F+te),F=F+te}else if(J==="+")S=S+q.substring(1);else{const te=parseInt(q.substring(1));F=F+te}}return S}return Ht.buildDebugBytecode=B,Ht}var bw={},$o={},XA;function jH(){if(XA)return $o;XA=1,Object.defineProperty($o,"__esModule",{value:!0}),$o.getCurrentExplorerProvider=$o.setCurrentExplorerProvider=$o.getCurrentNodeProvider=$o.setCurrentNodeProvider=void 0;const e=ef();let t;function r(s,l,c){typeof s=="string"?t=new e.NodeProvider(s,l,c):t=s}$o.setCurrentNodeProvider=r;function n(){if(typeof t>"u")throw Error("No node provider is set.");return t}$o.getCurrentNodeProvider=n;let o;function i(s,l,c){typeof s=="string"?o=new e.ExplorerProvider(s,l,c):o=s}$o.setCurrentExplorerProvider=i;function a(){return o}return $o.getCurrentExplorerProvider=a,$o}var ll={},ZA;function LH(){if(ZA)return ll;ZA=1,Object.defineProperty(ll,"__esModule",{value:!0}),ll.subscribeToEvents=ll.EventSubscription=void 0;const e=Gs(),t=Kn();class r extends t.Subscription{constructor(i,a,s){super(i),this.contractAddress=a,this.fromCount=typeof s>"u"?0:s,this.onEventCountChanged=i.onEventCountChanged,this.startPolling()}startPolling(){this.eventEmitter.on("tick",async()=>{await this.polling()}),this.eventEmitter.emit("tick")}currentEventCount(){return this.fromCount}async polling(){try{const i=await e.web3.getCurrentNodeProvider().events.getEventsContractContractaddress(this.contractAddress,{start:this.fromCount});if(this.cancelled)return;if(this.fromCount===i.nextStart){this.task=setTimeout(()=>this.eventEmitter.emit("tick"),this.pollingInterval);return}const a=i.events.map(s=>this.messageCallback(s));await Promise.all(a),this.fromCount=i.nextStart,this.onEventCountChanged!==void 0&&await this.onEventCountChanged(this.fromCount),await this.polling()}catch(i){await this.errorCallback(i,this)}}}ll.EventSubscription=r;function n(o,i,a){return new r(o,i,a)}return ll.subscribeToEvents=n,ll}var JA;function a4e(){return JA||(JA=1,function(e){var t=Le&&Le.__createBinding||(Object.create?function(H,x,k,Y){Y===void 0&&(Y=k);var re=Object.getOwnPropertyDescriptor(x,k);(!re||("get"in re?!x.__esModule:re.writable||re.configurable))&&(re={enumerable:!0,get:function(){return x[k]}}),Object.defineProperty(H,Y,re)}:function(H,x,k,Y){Y===void 0&&(Y=k),H[Y]=x[k]}),r=Le&&Le.__setModuleDefault||(Object.create?function(H,x){Object.defineProperty(H,"default",{enumerable:!0,value:x})}:function(H,x){H.default=x}),n=Le&&Le.__importStar||function(H){if(H&&H.__esModule)return H;var x={};if(H!=null)for(var k in H)k!=="default"&&Object.prototype.hasOwnProperty.call(H,k)&&t(x,H,k);return r(x,H),x},o=Le&&Le.__importDefault||function(H){return H&&H.__esModule?H:{default:H}};Object.defineProperty(e,"__esModule",{value:!0}),e.tryGetCallResult=e.getTokenIdFromUnsignedTx=e.getContractIdFromUnsignedTx=e.getContractEventsCurrentCount=e.multicallMethods=e.callMethod=e.subscribeContractEvents=e.subscribeContractEvent=e.decodeEvent=e.subscribeContractDestroyedEvent=e.subscribeContractCreatedEvent=e.fetchContractState=e.ContractInstance=e.testMethod=e.addStdIdToFields=e.subscribeEventsFromContract=e.decodeContractDestroyedEvent=e.decodeContractCreatedEvent=e.DestroyContractEventAddress=e.CreateContractEventAddress=e.ExecutableScript=e.ContractFactory=e.randomTxId=e.toApiVals=e.Script=e.Contract=e.Artifact=e.Project=e.ProjectArtifact=e.DEFAULT_COMPILER_OPTIONS=e.DEFAULT_NODE_COMPILER_OPTIONS=e.StdIdFieldName=void 0;const i=Gu,a=o(Yo),s=Yo,l=ef(),c=n(BH()),u=Kn(),f=jH(),d=n(Yo),p=LH(),h=Zy,y=n(Yy),_=new u.WebCrypto;e.StdIdFieldName="__stdInterfaceId";var b;(function(H){H[H.Contract=0]="Contract",H[H.Script=1]="Script",H[H.AbstractContract=2]="AbstractContract",H[H.Interface=3]="Interface"})(b||(b={})),e.DEFAULT_NODE_COMPILER_OPTIONS={ignoreUnusedConstantsWarnings:!1,ignoreUnusedVariablesWarnings:!1,ignoreUnusedFieldsWarnings:!1,ignoreUnusedPrivateFunctionsWarnings:!1,ignoreUpdateFieldsCheckWarnings:!1,ignoreCheckExternalCallerWarnings:!1},e.DEFAULT_COMPILER_OPTIONS={errorOnWarnings:!0,...e.DEFAULT_NODE_COMPILER_OPTIONS};class m{constructor(x,k){this.matcher=new RegExp(x,"mg"),this.type=k}}function E(H){let x=0;for(let k=0;kthis.compilerOptionsUsed[`${fe}`]===le)||k.length!==this.infos.size)return!0;for(const fe of k){const le=this.infos.get(fe.name);if(typeof le>"u"||le.sourceCodeHash!==fe.sourceCodeHash)return!0}return!1}static async from(x){const k=d.join(x,$.artifactFileName);if(a.default.existsSync(k))try{const Y=await s.promises.readFile(k),re=JSON.parse(Y.toString()),fe=re.fullNodeVersion,le=re.compilerOptionsUsed,xe=new Map(Object.entries(re.infos));return new $(fe,le,xe)}catch(Y){console.log(`Failed to load project artifact, error: ${Y}`);return}}}e.ProjectArtifact=$,$.artifactFileName=".project.json";class g{static buildProjectArtifact(x,k,Y,re,fe){const le=new Map;Y.forEach(_e=>{le.set(_e.artifact.name,{sourceFile:_e.sourceInfo.contractRelativePath,sourceCodeHash:_e.sourceInfo.sourceCodeHash,bytecodeDebugPatch:_e.artifact.bytecodeDebugPatch,codeHashDebug:_e.artifact.codeHashDebug,warnings:_e.warnings})}),re.forEach(_e=>{le.set(_e.artifact.name,{sourceFile:_e.sourceInfo.contractRelativePath,sourceCodeHash:_e.sourceInfo.sourceCodeHash,bytecodeDebugPatch:_e.artifact.bytecodeDebugPatch,codeHashDebug:"",warnings:_e.warnings})});const xe=Y.size+re.size;return k.slice(xe).forEach(_e=>{le.set(_e.name,{sourceFile:_e.contractRelativePath,sourceCodeHash:_e.sourceCodeHash,bytecodeDebugPatch:"",codeHashDebug:"",warnings:[]})}),new $(x,fe,le)}constructor(x,k,Y,re,fe,le,xe){this.contractsRootDir=x,this.artifactsRootDir=k,this.sourceInfos=Y,this.contracts=re,this.scripts=fe,this.projectArtifact=xe,le&&g.checkCompilerWarnings([...[...re.entries()].map(_e=>_e[1].warnings).flat(),...[...fe.entries()].map(_e=>_e[1].warnings).flat()],le)}static checkCompilerWarnings(x,k){if(x.length!==0){const Y=" - ",fe=`Compilation warnings: -`+(Y+x.join(` -`+Y))+` -`;if(k)throw new Error(fe);console.log(fe)}}static contract(x){const k=g.currentProject.contracts.get(x);if(typeof k>"u")throw new Error(`Contract "${x}" does not exist`);return k.artifact}static script(x){const k=g.currentProject.scripts.get(x);if(typeof k>"u")throw new Error(`Script "${x}" does not exist`);return k.artifact}async saveArtifactsToFile(x){const k=this.artifactsRootDir,Y=async function(re){const fe=re.sourceInfo.getArtifactPath(k),le=d.dirname(fe);return a.default.existsSync(le)||a.default.mkdirSync(le,{recursive:!0}),s.promises.writeFile(fe,re.artifact.toString())};this.contracts.forEach(re=>Y(re)),this.scripts.forEach(re=>Y(re)),await this.projectArtifact.saveToFile(x)}contractByCodeHash(x){const k=[...this.contracts.values()].find(Y=>Y.artifact.codeHash===x||Y.artifact.codeHashDebug==x);if(typeof k>"u")throw new Error(`Unknown code with code hash: ${x}`);return k.artifact}static async compile(x,k,Y,re,fe,le,xe,_e){const $e=Y.reduce((Je,tt)=>(Je.find(ve=>ve.sourceCodeHash===tt.sourceCodeHash)===void 0&&Je.push(tt),Je),[]).map(Je=>Je.sourceCode).join(` -`),Ne=await k.contracts.postContractsCompileProject({code:$e,compilerOptions:_e}),We=new Map,gt=new Map;Ne.contracts.forEach(Je=>{const tt=Y.find(ne=>ne.type===b.Contract&&ne.name===Je.name);if(tt===void 0)throw new Error(`SourceInfo does not exist for contract ${Je.name}`);const ve=V.fromCompileResult(Je);We.set(ve.name,new D(tt,ve,Je.warnings))}),Ne.scripts.forEach(Je=>{const tt=Y.find(ne=>ne.type===b.Script&&ne.name===Je.name);if(tt===void 0)throw new Error(`SourceInfo does not exist for script ${Je.name}`);const ve=K.fromCompileResult(Je);gt.set(ve.name,new D(tt,ve,Je.warnings))});const ft=g.buildProjectArtifact(x,Y,We,gt,_e),Ye=new g(fe,le,Y,We,gt,xe,ft);return await Ye.saveArtifactsToFile(re),Ye}static async loadArtifacts(x,k,Y,re,fe,le,xe,_e){try{const ke=new Map,$e=new Map;for(const Ne of k){const We=Y.infos.get(Ne.name);if(typeof We>"u")throw Error(`Unable to find project info for ${Ne.name}, please rebuild the project`);const gt=We.warnings,ft=Ne.getArtifactPath(le);if(Ne.type===b.Contract){const Ye=await V.fromArtifactFile(ft,We.bytecodeDebugPatch,We.codeHashDebug);ke.set(Ye.name,new D(Ne,Ye,gt))}else if(Ne.type===b.Script){const Ye=await K.fromArtifactFile(ft,We.bytecodeDebugPatch);$e.set(Ye.name,new D(Ne,Ye,gt))}}return new g(fe,le,k,ke,$e,xe,Y)}catch(ke){return console.log(`Failed to load artifacts, error: ${ke}, try to re-compile contracts...`),g.compile(Y.fullNodeVersion,x,k,re,fe,le,xe,_e)}}static getImportSourcePath(x,k){const Y=k.split("/");if(Y.length>1&&Y[0]==="std"){const fe=d.dirname(__filename);return d.join(fe,"..","..","..",k)}let re=x;for(;;){const fe=d.join(re,"node_modules",k);if(a.default.existsSync(fe))return fe;const le=re;if(re=d.join(re,".."),le===re)throw new Error(`Specified import file does not exist: ${k}`)}}static async handleImports(x,k,Y,re){const fe=[],le=Y.replace(g.importRegex,_e=>(fe.push(_e),"")),xe=[];for(const _e of fe){const ke=_e.slice(8,-1),$e=ke.endsWith(".ral")?ke:ke+".ral";if(!re.includes($e)){re.push($e);const Ne=g.getImportSourcePath(x,$e),We=await g.loadSourceFile(x,k,Ne,re,!0);xe.push(...We)}}return[le,xe]}static async loadSourceFile(x,k,Y,re,fe){const le=d.relative(k,Y);if(!Y.endsWith(".ral"))throw new Error(`Invalid filename: ${Y}, smart contract file name should end with ".ral"`);const xe=await s.promises.readFile(Y),[_e,ke]=await g.handleImports(x,k,xe.toString(),re);if(_e.match(new RegExp('^import "',"mg"))!==null)throw new Error(`Invalid import statements, source: ${Y}`);const $e=ke;for(const Ne of this.matchers){const We=_e.matchAll(Ne.matcher);for(const gt of We){const ft=await A.from(Ne.type,gt[1],_e,le,fe);$e.push(ft)}}return $e}static async loadSourceFiles(x,k){const Y=[],re=[],fe=async function(xe){const _e=await s.promises.readdir(xe,{withFileTypes:!0});for(const ke of _e)if(ke.isFile()){const $e=d.join(xe,ke.name),Ne=await g.loadSourceFile(x,k,$e,Y,!1);re.push(...Ne)}else{const $e=d.join(xe,ke.name);await fe($e)}};await fe(k);const le=re.filter(xe=>xe.type===b.Contract||xe.type===b.Script).length;if(re.length===0||le===0)throw new Error("Project have no source files");return re.sort((xe,_e)=>xe.type-_e.type)}static async build(x={},k=".",Y=g.DEFAULT_CONTRACTS_DIR,re=g.DEFAULT_ARTIFACTS_DIR,fe=void 0){const le=(0,f.getCurrentNodeProvider)(),xe=fe??(await le.infos.getInfosVersion()).version,_e=await g.loadSourceFiles(k,Y),{errorOnWarnings:ke,...$e}={...e.DEFAULT_COMPILER_OPTIONS,...x},Ne=await $.from(k);Ne===void 0||Ne.needToReCompile($e,_e,xe)?(console.log(`Compiling contracts in folder "${Y}"`),g.currentProject=await g.compile(xe,le,_e,k,Y,re,ke,$e)):(console.log(`Contracts are compiled already. Loading them from folder "${re}"`),g.currentProject=await g.loadArtifacts(le,_e,Ne,k,Y,re,ke,$e))}}e.Project=g,g.importRegex=new RegExp('^import "[^"./]+/[^"]*[a-z][a-z_0-9]*(.ral)?"',"mg"),g.abstractContractMatcher=new m("^Abstract Contract ([A-Z][a-zA-Z0-9]*)",b.AbstractContract),g.contractMatcher=new m("^Contract ([A-Z][a-zA-Z0-9]*)",b.Contract),g.interfaceMatcher=new m("^Interface ([A-Z][a-zA-Z0-9]*)",b.Interface),g.scriptMatcher=new m("^TxScript ([A-Z][a-zA-Z0-9]*)",b.Script),g.matchers=[g.abstractContractMatcher,g.contractMatcher,g.interfaceMatcher,g.scriptMatcher],g.DEFAULT_CONTRACTS_DIR="contracts",g.DEFAULT_ARTIFACTS_DIR="artifacts";class N{constructor(x,k,Y){this.version=x,this.name=k,this.functions=Y}publicFunctions(){return this.functions.filter(x=>x.isPublic).map(x=>x.name)}usingPreapprovedAssetsFunctions(){return this.functions.filter(x=>x.usePreapprovedAssets).map(x=>x.name)}usingAssetsInContractFunctions(){return this.functions.filter(x=>x.useAssetsInContract).map(x=>x.name)}}e.Artifact=N;class V extends N{constructor(x,k,Y,re,fe,le,xe,_e,ke,$e,Ne,We){super(x,k,ke),this.bytecode=Y,this.bytecodeDebugPatch=re,this.codeHash=fe,this.fieldsSig=xe,this.eventsSig=_e,this.constants=$e,this.enums=Ne,this.stdInterfaceId=We,this.bytecodeDebug=c.buildDebugBytecode(this.bytecode,this.bytecodeDebugPatch),this.codeHashDebug=le}static fromJson(x,k="",Y=""){if(x.version==null||x.name==null||x.bytecode==null||x.codeHash==null||x.fieldsSig==null||x.eventsSig==null||x.constants==null||x.enums==null||x.functions==null)throw Error("The artifact JSON for contract is incomplete");return new V(x.version,x.name,x.bytecode,k,x.codeHash,Y||x.codeHash,x.fieldsSig,x.eventsSig,x.functions,x.constants,x.enums,x.stdInterfaceId===null?void 0:x.stdInterfaceId)}static fromCompileResult(x){return new V(x.version,x.name,x.bytecode,x.bytecodeDebugPatch,x.codeHash,x.codeHashDebug,x.fields,x.events,x.functions,x.constants,x.enums,x.stdInterfaceId)}static async fromArtifactFile(x,k,Y){const re=await s.promises.readFile(x),fe=JSON.parse(re.toString());return V.fromJson(fe,k,Y)}toString(){const x={version:this.version,name:this.name,bytecode:this.bytecode,codeHash:this.codeHash,fieldsSig:this.fieldsSig,eventsSig:this.eventsSig,functions:this.functions,constants:this.constants,enums:this.enums};return this.stdInterfaceId!==void 0&&(x.stdInterfaceId=this.stdInterfaceId),JSON.stringify(x,null,2)}toState(x,k,Y){const re=typeof Y<"u"?Y:V.randomAddress();return{address:re,contractId:(0,u.binToHex)((0,u.contractIdFromAddress)(re)),bytecode:this.bytecode,codeHash:this.codeHash,fields:x,fieldsSig:this.fieldsSig,asset:k}}static randomAddress(){const x=new Uint8Array(33);return _.getRandomValues(x),x[0]=3,u.bs58.encode(x)}printDebugMessages(x,k){k.length!=0&&(console.log(`Testing ${this.name}.${x}:`),k.forEach(Y=>console.log(`Debug - ${Y.contractAddress} - ${Y.message}`)))}toApiFields(x){return typeof x>"u"?[]:L(x,this.fieldsSig)}toApiArgs(x,k){if(k){const Y=this.functions.find(re=>re.name==x);if(Y==null)throw new Error(`Invalid function name: ${x}`);return U(k,Y)}else return[]}getMethodIndex(x){return this.functions.findIndex(k=>k.name===x)}toApiContractStates(x){return typeof x<"u"?x.map(k=>R(k)):void 0}toApiTestContractParams(x,k){const Y=k.initialFields===void 0?[]:B(k.initialFields,this.fieldsSig,!1),re=k.initialFields===void 0?[]:B(k.initialFields,this.fieldsSig,!0);return{group:k.group,blockHash:k.blockHash,blockTimeStamp:k.blockTimeStamp,txId:k.txId,address:k.address,bytecode:this.bytecodeDebug,initialImmFields:Y,initialMutFields:re,initialAsset:typeof k.initialAsset<"u"?C(k.initialAsset):void 0,methodIndex:this.getMethodIndex(x),args:this.toApiArgs(x,k.testArgs),existingContracts:this.toApiContractStates(k.existingContracts),inputAssets:T(k.inputAssets)}}fromApiContractState(x){return{address:x.address,contractId:(0,u.binToHex)((0,u.contractIdFromAddress)(x.address)),bytecode:x.bytecode,initialStateHash:x.initialStateHash,codeHash:x.codeHash,fields:W(x.immFields,x.mutFields,this.fieldsSig),fieldsSig:this.fieldsSig,asset:v(x.asset)}}static fromApiContractState(x,k){return(k?k(x.codeHash):g.currentProject.contractByCodeHash(x.codeHash)).fromApiContractState(x)}static fromApiEvent(x,k,Y,re){let fe,le;if(x.eventIndex==V.ContractCreatedEventIndex)fe=ue(P(x.fields,V.ContractCreatedEvent,!0)),le=V.ContractCreatedEvent.name;else if(x.eventIndex==V.ContractDestroyedEventIndex)fe=P(x.fields,V.ContractDestroyedEvent,!0),le=V.ContractDestroyedEvent.name;else{const _e=(re?re(k):g.currentProject.contractByCodeHash(k)).eventsSig[x.eventIndex];fe=P(x.fields,_e),le=_e.name}return{txId:Y,blockHash:x.blockHash,contractAddress:x.contractAddress,name:le,eventIndex:x.eventIndex,fields:fe}}fromApiTestContractResult(x,k,Y){const re=this.functions.findIndex(ke=>ke.name===x),fe=this.functions[`${re}`].returnTypes,le=(0,l.fromApiArray)(k.returns,fe),xe=le.length===0?null:le.length===1?le[0]:le,_e=new Map;return _e.set(k.address,k.codeHash),k.contracts.forEach(ke=>_e.set(ke.address,ke.codeHash)),{contractId:(0,u.binToHex)((0,u.contractIdFromAddress)(k.address)),contractAddress:k.address,returns:xe,gasUsed:k.gasUsed,contracts:k.contracts.map(ke=>V.fromApiContractState(ke)),txOutputs:k.txOutputs.map(q),events:V.fromApiEvents(k.events,_e,Y),debugMessages:k.debugMessages}}async txParamsForDeployment(x,k){const Y=k.initialFields??{},re=this.buildByteCodeToDeploy(se(this,Y)),fe=await x.getSelectedAccount();return{signerAddress:fe.address,signerKeyType:fe.keyType,bytecode:re,initialAttoAlphAmount:k==null?void 0:k.initialAttoAlphAmount,issueTokenAmount:k==null?void 0:k.issueTokenAmount,initialTokenAmounts:k==null?void 0:k.initialTokenAmounts,gasAmount:k==null?void 0:k.gasAmount,gasPrice:k==null?void 0:k.gasPrice}}buildByteCodeToDeploy(x){try{return c.buildContractByteCode(this.bytecode,x,this.fieldsSig)}catch(k){throw new Error(`Failed to build bytecode for contract ${this.name}, error: ${k}`)}}static fromApiEvents(x,k,Y,re){return x.map(fe=>{const le=fe.contractAddress,xe=k.get(le);if(typeof xe<"u"||fe.eventIndex<0)return V.fromApiEvent(fe,xe,Y,re);throw Error(`Cannot find codeHash for the contract address: ${le}`)})}toApiCallContract(x,k,Y,re){const fe=this.functions[`${re}`],le=S(x.args??{},fe.paramNames,fe.paramTypes);return{...x,group:k,address:Y,methodIndex:re,args:le}}fromApiCallContractResult(x,k,Y,re){const fe=this.functions[`${Y}`].returnTypes,le=Te(x),xe=(0,l.fromApiArray)(le.returns,fe),_e=xe.length===0?null:xe.length===1?xe[0]:xe,ke=new Map;return le.contracts.forEach($e=>ke.set($e.address,$e.codeHash)),{returns:_e,gasUsed:le.gasUsed,contracts:le.contracts.map($e=>V.fromApiContractState($e,re)),txInputs:le.txInputs,txOutputs:le.txOutputs.map($e=>q($e)),events:V.fromApiEvents(le.events,ke,k,re)}}}e.Contract=V,V.ContractCreatedEventIndex=-1,V.ContractCreatedEvent={name:"ContractCreated",fieldNames:["address","parentAddress","stdInterfaceId"],fieldTypes:["Address","Address","ByteVec"]},V.ContractDestroyedEventIndex=-2,V.ContractDestroyedEvent={name:"ContractDestroyed",fieldNames:["address"],fieldTypes:["Address"]};class K extends N{constructor(x,k,Y,re,fe,le){super(x,k,le),this.bytecodeTemplate=Y,this.bytecodeDebugPatch=re,this.fieldsSig=fe}static fromCompileResult(x){return new K(x.version,x.name,x.bytecodeTemplate,x.bytecodeDebugPatch,x.fields,x.functions)}static fromJson(x,k=""){if(x.version==null||x.name==null||x.bytecodeTemplate==null||x.fieldsSig==null||x.functions==null)throw Error("The artifact JSON for script is incomplete");return new K(x.version,x.name,x.bytecodeTemplate,k,x.fieldsSig,x.functions)}static async fromArtifactFile(x,k){const Y=await s.promises.readFile(x),re=JSON.parse(Y.toString());return this.fromJson(re,k)}toString(){const x={version:this.version,name:this.name,bytecodeTemplate:this.bytecodeTemplate,fieldsSig:this.fieldsSig,functions:this.functions};return JSON.stringify(x,null,2)}async txParamsForExecution(x,k){const Y=await x.getSelectedAccount();return{signerAddress:Y.address,signerKeyType:Y.keyType,bytecode:this.buildByteCodeToDeploy(k.initialFields??{}),attoAlphAmount:k.attoAlphAmount,tokens:k.tokens,gasAmount:k.gasAmount,gasPrice:k.gasPrice}}buildByteCodeToDeploy(x){try{return c.buildScriptByteCode(this.bytecodeTemplate,x,this.fieldsSig)}catch(k){throw new Error(`Failed to build bytecode for script ${this.name}, error: ${k}`)}}}e.Script=K;function W(H,x,k){const Y=[];let re=0,fe=0;return k.types.flatMap((xe,_e)=>Array((0,l.typeLength)(xe)).fill(k.isMutable[`${_e}`])).forEach(xe=>{xe?(Y.push(x[`${fe}`]),fe+=1):(Y.push(H[`${re}`]),re+=1)}),(0,l.fromApiVals)(Y,k.names,k.types)}function P(H,x,k=!1){return(0,l.fromApiVals)(H,x.fieldNames,x.fieldTypes,k)}function C(H){return{attoAlphAmount:(0,l.toApiNumber256)(H.alphAmount),tokens:typeof H.tokens<"u"?H.tokens.map(l.toApiToken):[]}}function v(H){return{alphAmount:(0,l.fromApiNumber256)(H.attoAlphAmount),tokens:(0,l.fromApiTokens)(H.tokens)}}function w(H,x){if(x in H)return H[`${x}`];throw Error(`No Val exists for ${x}`)}function B(H,x,k){const Y=x.names.map((le,xe)=>xe).filter(le=>x.isMutable[`${le}`]===k),re=Y.map(le=>x.names[`${le}`]),fe=Y.map(le=>x.types[`${le}`]);return S(H,re,fe)}function R(H){const x=H.fields??{};return{address:H.address,bytecode:H.bytecode,codeHash:H.codeHash,initialStateHash:H.initialStateHash,immFields:B(x,H.fieldsSig,!1),mutFields:B(x,H.fieldsSig,!0),asset:C(H.asset)}}function L(H,x){return S(H,x.names,x.types)}function U(H,x){return S(H,x.paramNames,x.paramTypes)}function S(H,x,k){return x.map((Y,re)=>{const fe=w(H,Y),le=k[`${re}`];return(0,l.toApiVal)(fe,le)})}e.toApiVals=S;function F(H){return{address:H.address,asset:C(H.asset)}}function T(H){return typeof H<"u"?H.map(F):void 0}function q(H){if(H.type==="AssetOutput"){const x=H;return{type:"AssetOutput",address:x.address,alphAmount:(0,l.fromApiNumber256)(x.attoAlphAmount),tokens:(0,l.fromApiTokens)(x.tokens),lockTime:x.lockTime,message:x.message}}else if(H.type==="ContractOutput"){const x=H;return{type:"ContractOutput",address:x.address,alphAmount:(0,l.fromApiNumber256)(x.attoAlphAmount),tokens:(0,l.fromApiTokens)(x.tokens)}}else throw new Error(`Unknown output type: ${H}`)}function J(){const H=new Uint8Array(32);return _.getRandomValues(H),(0,u.binToHex)(H)}e.randomTxId=J,u.assertType;class te{constructor(x){this.contract=x}async deploy(x,k){const Y=await this.contract.txParamsForDeployment(x,{...k,initialFields:se(this.contract,k.initialFields)}),re=await x.signAndSubmitDeployContractTx(Y);return{...re,contractInstance:this.at(re.contractAddress)}}stateForTest(x,k,Y){const re={alphAmount:(k==null?void 0:k.alphAmount)??h.ONE_ALPH,tokens:k==null?void 0:k.tokens};return this.contract.toState(se(this.contract,x),re,Y)}}e.ContractFactory=te;class ie{constructor(x){this.script=x}async execute(x,k){const Y=await this.script.txParamsForExecution(x,k);return await x.signAndSubmitExecuteScriptTx(Y)}}e.ExecutableScript=ie;function ce(H){const x=new Uint8Array(32).fill(0);return x[31]=H,(0,u.addressFromContractId)((0,u.binToHex)(x))}e.CreateContractEventAddress=ce(-1),e.DestroyContractEventAddress=ce(-2);function oe(H,x,k){if(H.eventIndex!==k)throw new Error(`Invalid event index: ${H.eventIndex}, expected: ${k}`);return P(H.fields,x,!0)}function ue(H){const x=H.parentAddress,k=H.stdInterfaceId;return{address:H.address,parentAddress:x===""?void 0:x,stdInterfaceIdGuessed:k===""?void 0:k}}function O(H){const x=oe(H,V.ContractCreatedEvent,V.ContractCreatedEventIndex);return{blockHash:H.blockHash,txId:H.txId,eventIndex:H.eventIndex,name:V.ContractCreatedEvent.name,fields:ue(x)}}e.decodeContractCreatedEvent=O;function G(H){const x=oe(H,V.ContractDestroyedEvent,V.ContractDestroyedEventIndex);return{blockHash:H.blockHash,txId:H.txId,eventIndex:H.eventIndex,name:V.ContractDestroyedEvent.name,fields:{address:x.address}}}e.decodeContractDestroyedEvent=G;function ee(H,x,k,Y,re){const fe=_e=>_e.eventIndex!==k?Promise.resolve():H.messageCallback(Y(_e)),le=(_e,ke)=>H.errorCallback(_e,ke),xe={pollingInterval:H.pollingInterval,messageCallback:fe,errorCallback:le,onEventCountChanged:H.onEventCountChanged};return(0,p.subscribeToEvents)(xe,x,re)}e.subscribeEventsFromContract=ee;function se(H,x){const k="414c5048";return H.stdInterfaceId===void 0?x:{...x,__stdInterfaceId:k+H.stdInterfaceId}}e.addStdIdToFields=se;async function pe(H,x,k){const Y=(k==null?void 0:k.txId)??J(),re=k.initialFields===void 0?{}:k.initialFields,fe=H.contract.toApiTestContractParams(x,{...k,txId:Y,initialFields:se(H.contract,re),testArgs:k.testArgs===void 0?{}:k.testArgs}),le=await(0,f.getCurrentNodeProvider)().contracts.postContractsTestContract(fe),xe=H.contract.fromApiTestContractResult(x,le,Y);return H.contract.printDebugMessages(x,xe.debugMessages),xe}e.testMethod=pe;class ge{constructor(x){this.address=x,this.contractId=(0,u.binToHex)((0,u.contractIdFromAddress)(x)),this.groupIndex=(0,u.groupOfAddress)(x)}}e.ContractInstance=ge;async function X(H,x){const k=await(0,f.getCurrentNodeProvider)().contracts.getContractsAddressState(x.address,{group:x.groupIndex}),Y=H.contract.fromApiContractState(k);return{...Y,fields:Y.fields}}e.fetchContractState=X;function M(H,x){return ee(H,e.CreateContractEventAddress,V.ContractCreatedEventIndex,k=>({...O(k),contractAddress:e.CreateContractEventAddress}),x)}e.subscribeContractCreatedEvent=M;function z(H,x){return ee(H,e.DestroyContractEventAddress,V.ContractDestroyedEventIndex,k=>({...G(k),contractAddress:e.DestroyContractEventAddress}),x)}e.subscribeContractDestroyedEvent=z;function Z(H,x,k,Y){if(k.eventIndex!==Y&&!(Y>=0&&Yle.name===Y);return ee(k,x.address,fe,le=>Z(H,x,le,fe),re)}e.subscribeContractEvent=Q;function de(H,x,k,Y){const re=xe=>k.messageCallback({...Z(H,x,xe,xe.eventIndex),contractAddress:x.address}),fe=(xe,_e)=>k.errorCallback(xe,_e),le={pollingInterval:k.pollingInterval,messageCallback:re,errorCallback:fe,onEventCountChanged:k.onEventCountChanged};return(0,p.subscribeToEvents)(le,x.address,Y)}e.subscribeContractEvents=de;async function we(H,x,k,Y,re){const fe=H.contract.getMethodIndex(k),le=(Y==null?void 0:Y.txId)??J(),xe=H.contract.toApiCallContract({...Y,txId:le,args:Y.args===void 0?{}:Y.args},x.groupIndex,x.address,fe),_e=await(0,f.getCurrentNodeProvider)().contracts.postContractsCallContract(xe);return H.contract.fromApiCallContractResult(_e,le,fe,re)}e.callMethod=we;async function Se(H,x,k,Y){const re=Object.entries(k),fe=re.map(_e=>{const[ke,$e]=_e,Ne=H.contract.getMethodIndex(ke),We=($e==null?void 0:$e.txId)??J();return H.contract.toApiCallContract({...$e,txId:We,args:$e.args===void 0?{}:$e.args},x.groupIndex,x.address,Ne)}),le=await(0,f.getCurrentNodeProvider)().contracts.postContractsMulticallContract({calls:fe}),xe={};return fe.forEach((_e,ke)=>{const $e=_e.methodIndex,Ne=le.results[`${$e}`],We=re[`${ke}`][0];xe[`${We}`]=H.contract.fromApiCallContractResult(Ne,_e.txId,$e,Y)}),xe}e.multicallMethods=Se;async function Ee(H){return(0,f.getCurrentNodeProvider)().events.getEventsContractContractaddressCurrentCount(H).catch(x=>{if(x instanceof Error&&x.message.includes(`${H} not found`))return 0;throw x})}e.getContractEventsCurrentCount=Ee;const Ae=async(H,x)=>{const k=await H.transactions.postTransactionsDecodeUnsignedTx({unsignedTx:x}),Y=k.unsignedTx.fixedOutputs.length,re=k.unsignedTx.txId+Y.toString(16).padStart(8,"0");return(0,u.binToHex)(y.blake2b((0,u.hexToBinUnsafe)(re),void 0,32)).slice(0,62)+k.fromGroup.toString(16).padStart(2,"0")};e.getContractIdFromUnsignedTx=Ae,e.getTokenIdFromUnsignedTx=e.getContractIdFromUnsignedTx;function Te(H){if(H.type==="CallContractFailed")throw new Error(`Failed to call contract, error: ${H.error}`);return H}e.tryGetCallResult=Te}(bw)),bw}var QA;function zH(){return QA||(QA=1,function(e){var t=Le&&Le.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Le&&Le.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(BH(),e),r(a4e(),e),r(LH(),e)}(yw)),yw}var ek;function s4e(){if(ek)return Bf;ek=1,Object.defineProperty(Bf,"__esModule",{value:!0}),Bf.NodeProvider=void 0;const e=O4(),t=A4,r=zH(),n=Kn();function o(a,s,l){const c=new t.Api({baseUrl:a,baseApiParams:{secure:!0},securityWorker:u=>u!==null?{headers:{"X-API-KEY":`${u}`}}:{},customFetch:l??((...u)=>fetch(...u))});return c.setSecurityData(s??null),c}class i{constructor(s,l,c){this.request=f=>(0,e.request)(this,f),this.fetchFungibleTokenMetaData=async f=>{const d=(0,n.addressFromTokenId)(f),p=(0,n.groupOfAddress)(d),h=Array.from([0,1,2,3],b=>({methodIndex:b,group:p,address:d})),_=(await this.contracts.postContractsMulticallContract({calls:h})).results.map(b=>(0,r.tryGetCallResult)(b));return{symbol:_[0].returns[0].value,name:_[1].returns[0].value,decimals:Number(_[2].returns[0].value),totalSupply:BigInt(_[3].returns[0].value)}},this.fetchNFTMetaData=async f=>{const d=(0,n.addressFromTokenId)(f),p=(0,n.groupOfAddress)(d),h=await this.contracts.postContractsCallContract({methodIndex:0,group:p,address:d});return{tokenUri:(0,n.hexToString)((0,r.tryGetCallResult)(h).returns[0].value)}},this.fetchNFTCollectionMetaData=async f=>{const d=(0,n.addressFromContractId)(f),p=(0,n.groupOfAddress)(d),h=Array.from([0,1],b=>({methodIndex:b,group:p,address:d})),_=(await this.contracts.postContractsMulticallContract({calls:h})).results.map(b=>(0,r.tryGetCallResult)(b));return{collectionUri:(0,n.hexToString)(_[0].returns[0].value),totalSupply:BigInt(_[1].returns[0].value)}},this.guessStdInterfaceId=async f=>{var b;const d=(0,n.addressFromTokenId)(f),p=(0,n.groupOfAddress)(d),y=(b=(await this.contracts.getContractsAddressState((0,n.addressFromTokenId)(f),{group:p})).immFields.slice(-1).pop())==null?void 0:b.value,_="414c5048";if(typeof y=="string"&&y.startsWith(_))return y.slice(8)},this.guessFollowsNFTCollectionStd=async f=>{const d=await this.guessStdInterfaceId(f);return!!d&&d.startsWith(e.StdInterfaceIds.NFTCollection)},this.guessStdTokenType=async f=>{switch(await this.guessStdInterfaceId(f)){case e.StdInterfaceIds.FungibleToken:return"fungible";case e.StdInterfaceIds.NFT:return"non-fungible";default:return}};let u;typeof s=="string"?u=o(s,l,c):typeof s=="function"?(u=new i("https://1.2.3.4:0"),(0,e.forwardRequests)(u,s)):u=s,this.wallets={...u.wallets},this.infos={...u.infos},this.blockflow={...u.blockflow},this.addresses={...u.addresses},this.transactions={...u.transactions},this.mempool={...u.mempool},this.contracts={...u.contracts},this.multisig={...u.multisig},this.utils={...u.utils},this.miners={...u.miners},this.events={...u.events}}static Proxy(s){return new i(s)}static Remote(s){return new i(s)}}return Bf.NodeProvider=i,Bf}var Hf={},k4={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Api=e.HttpClient=e.ContentType=e.IntervalType=void 0,function(i){i.Daily="daily",i.Hourly="hourly"}(e.IntervalType||(e.IntervalType={}));const t=Fs;var r;(function(i){i.Json="application/json",i.FormData="multipart/form-data",i.UrlEncoded="application/x-www-form-urlencoded",i.Text="text/plain"})(r=e.ContentType||(e.ContentType={}));class n{constructor(a={}){this.baseUrl="",this.securityData=null,this.abortControllers=new Map,this.customFetch=(...s)=>fetch(...s),this.baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"},this.setSecurityData=s=>{this.securityData=s},this.contentFormatters={[r.Json]:s=>s!==null&&(typeof s=="object"||typeof s=="string")?JSON.stringify(s):s,[r.Text]:s=>s!==null&&typeof s!="string"?JSON.stringify(s):s,[r.FormData]:s=>Object.keys(s||{}).reduce((l,c)=>{const u=s[c];return l.append(c,u instanceof Blob?u:typeof u=="object"&&u!==null?JSON.stringify(u):`${u}`),l},new FormData),[r.UrlEncoded]:s=>this.toQueryString(s)},this.createAbortSignal=s=>{if(this.abortControllers.has(s)){const c=this.abortControllers.get(s);return c?c.signal:void 0}const l=new AbortController;return this.abortControllers.set(s,l),l.signal},this.abortRequest=s=>{const l=this.abortControllers.get(s);l&&(l.abort(),this.abortControllers.delete(s))},this.request=async({body:s,secure:l,path:c,type:u,query:f,format:d,baseUrl:p,cancelToken:h,...y})=>{const _=(typeof l=="boolean"?l:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},b=this.mergeRequestParams(y,_),m=f&&this.toQueryString(f),E=this.contentFormatters[u||r.Json],A=d||b.format;return this.customFetch(`${p||this.baseUrl||""}${c}${m?`?${m}`:""}`,{...b,headers:{...b.headers||{},...u&&u!==r.FormData?{"Content-Type":u}:{}},signal:h?this.createAbortSignal(h):b.signal,body:typeof s>"u"||s===null?null:E(s)}).then(async D=>{const $=D;$.data=null,$.error=null;const g=A?await D[A]().then(N=>($.ok?$.data=N:$.error=N,$)).catch(N=>($.error=N,$)):$;return h&&this.abortControllers.delete(h),g})},Object.assign(this,a)}encodeQueryParam(a,s){return`${encodeURIComponent(a)}=${encodeURIComponent(typeof s=="number"?s:`${s}`)}`}addQueryParam(a,s){return this.encodeQueryParam(s,a[s])}addArrayQueryParam(a,s){return a[s].map(c=>this.encodeQueryParam(s,c)).join("&")}toQueryString(a){const s=a||{};return Object.keys(s).filter(c=>typeof s[c]<"u").map(c=>Array.isArray(s[c])?this.addArrayQueryParam(s,c):this.addQueryParam(s,c)).join("&")}addQueryParams(a){const s=this.toQueryString(a);return s?`?${s}`:""}mergeRequestParams(a,s){return{...this.baseApiParams,...a,...s||{},headers:{...this.baseApiParams.headers||{},...a.headers||{},...s&&s.headers||{}}}}}e.HttpClient=n;class o extends n{constructor(){super(...arguments),this.blocks={getBlocks:(a,s={})=>this.request({path:"/blocks",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlocksBlockHash:(a,s={})=>this.request({path:`/blocks/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getBlocksBlockHashTransactions:(a,s,l={})=>this.request({path:`/blocks/${a}/transactions`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse)},this.transactions={getTransactionsTransactionHash:(a,s={})=>this.request({path:`/transactions/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse)},this.addresses={getAddressesAddress:(a,s={})=>this.request({path:`/addresses/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressTransactions:(a,s,l={})=>this.request({path:`/addresses/${a}/transactions`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),postAddressesTransactions:(a,s,l={})=>this.request({path:"/addresses/transactions",method:"POST",query:a,body:s,type:r.Json,format:"json",...l}).then(t.convertHttpResponse),getAddressesAddressTimerangedTransactions:(a,s,l={})=>this.request({path:`/addresses/${a}/timeranged-transactions`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getAddressesAddressTotalTransactions:(a,s={})=>this.request({path:`/addresses/${a}/total-transactions`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressMempoolTransactions:(a,s={})=>this.request({path:`/addresses/${a}/mempool/transactions`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressBalance:(a,s={})=>this.request({path:`/addresses/${a}/balance`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressTokens:(a,s,l={})=>this.request({path:`/addresses/${a}/tokens`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getAddressesAddressTokensTokenIdTransactions:(a,s,l,c={})=>this.request({path:`/addresses/${a}/tokens/${s}/transactions`,method:"GET",query:l,format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressTokensTokenIdBalance:(a,s,l={})=>this.request({path:`/addresses/${a}/tokens/${s}/balance`,method:"GET",format:"json",...l}).then(t.convertHttpResponse),getAddressesAddressTokensBalance:(a,s,l={})=>this.request({path:`/addresses/${a}/tokens-balance`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),postAddressesUsed:(a,s={})=>this.request({path:"/addresses/used",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressExportTransactionsCsv:(a,s,l={})=>this.request({path:`/addresses/${a}/export-transactions/csv`,method:"GET",query:s,format:"text",...l}).then(t.convertHttpResponse),getAddressesAddressAmountHistory:(a,s,l={})=>this.request({path:`/addresses/${a}/amount-history`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse)},this.infos={getInfos:(a={})=>this.request({path:"/infos",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosHeights:(a={})=>this.request({path:"/infos/heights",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosSupply:(a,s={})=>this.request({path:"/infos/supply",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getInfosSupplyTotalAlph:(a={})=>this.request({path:"/infos/supply/total-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosSupplyCirculatingAlph:(a={})=>this.request({path:"/infos/supply/circulating-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosSupplyReservedAlph:(a={})=>this.request({path:"/infos/supply/reserved-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosSupplyLockedAlph:(a={})=>this.request({path:"/infos/supply/locked-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosTotalTransactions:(a={})=>this.request({path:"/infos/total-transactions",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosAverageBlockTimes:(a={})=>this.request({path:"/infos/average-block-times",method:"GET",format:"json",...a}).then(t.convertHttpResponse)},this.mempool={getMempoolTransactions:(a,s={})=>this.request({path:"/mempool/transactions",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse)},this.tokens={getTokens:(a,s={})=>this.request({path:"/tokens",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getTokensTokenIdTransactions:(a,s,l={})=>this.request({path:`/tokens/${a}/transactions`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse)},this.charts={getChartsHashrates:(a,s={})=>this.request({path:"/charts/hashrates",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getChartsTransactionsCount:(a,s={})=>this.request({path:"/charts/transactions-count",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getChartsTransactionsCountPerChain:(a,s={})=>this.request({path:"/charts/transactions-count-per-chain",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse)},this.contractEvents={getContractEventsTransactionIdTransactionId:(a,s={})=>this.request({path:`/contract-events/transaction-id/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getContractEventsContractAddressContractAddress:(a,s,l={})=>this.request({path:`/contract-events/contract-address/${a}`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getContractEventsContractAddressContractAddressInputAddressInputAddress:(a,s,l,c={})=>this.request({path:`/contract-events/contract-address/${a}/input-address/${s}`,method:"GET",query:l,format:"json",...c}).then(t.convertHttpResponse)},this.contracts={getContractsContractParent:(a,s={})=>this.request({path:`/contracts/${a}/parent`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getContractsContractSubContracts:(a,s,l={})=>this.request({path:`/contracts/${a}/sub-contracts`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse)},this.utils={putUtilsSanityCheck:(a={})=>this.request({path:"/utils/sanity-check",method:"PUT",...a}).then(t.convertHttpResponse),putUtilsUpdateGlobalLoglevel:(a,s={})=>this.request({path:"/utils/update-global-loglevel",method:"PUT",body:a,...s}).then(t.convertHttpResponse),putUtilsUpdateLogConfig:(a,s={})=>this.request({path:"/utils/update-log-config",method:"PUT",body:a,type:r.Json,...s}).then(t.convertHttpResponse)}}}e.Api=o})(k4);var tk;function l4e(){if(tk)return Hf;tk=1,Object.defineProperty(Hf,"__esModule",{value:!0}),Hf.ExplorerProvider=void 0;const e=O4(),t=k4;function r(o,i,a){const s=new t.Api({baseUrl:o,baseApiParams:{secure:!0},securityWorker:l=>l!==null?{headers:{"X-API-KEY":`${l}`}}:{},customFetch:a??((...l)=>fetch(...l))});return s.setSecurityData(i??null),s}class n{constructor(i,a,s){this.request=c=>(0,e.request)(this,c);let l;typeof i=="string"?l=r(i,a,s):typeof i=="function"?(l=new n("https://1.2.3.4:0"),(0,e.forwardRequests)(l,i)):l=i,this.blocks={...l.blocks},this.transactions={...l.transactions},this.addresses={...l.addresses},this.infos={...l.infos},this.mempool={...l.mempool},this.tokens={...l.tokens},this.charts={...l.charts},this.utils={...l.utils},this.contracts={...l.contracts},this.contractEvents={...l.contractEvents}}static Proxy(i){return new n(i)}static Remote(i){return new n(i)}}return Hf.ExplorerProvider=n,Hf}var rk;function ef(){return rk||(rk=1,function(e){var t=Le&&Le.__createBinding||(Object.create?function(i,a,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(a,s);(!c||("get"in c?!a.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(i,l,c)}:function(i,a,s,l){l===void 0&&(l=s),i[l]=a[s]}),r=Le&&Le.__setModuleDefault||(Object.create?function(i,a){Object.defineProperty(i,"default",{enumerable:!0,value:a})}:function(i,a){i.default=a}),n=Le&&Le.__exportStar||function(i,a){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&t(a,i,s)},o=Le&&Le.__importStar||function(i){if(i&&i.__esModule)return i;var a={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&t(a,i,s);return r(a,i),a};Object.defineProperty(e,"__esModule",{value:!0}),e.explorer=e.node=void 0,n(s4e(),e),n(l4e(),e),e.node=o(A4),e.explorer=o(k4),n(O4(),e),n(Fs,e)}(ow)),ow}var ww={},Vt={},Vf={},nk;function UH(){if(nk)return Vf;nk=1,Object.defineProperty(Vf,"__esModule",{value:!0}),Vf.TransactionBuilder=void 0;const e=Gs(),t=ef(),r=Kn(),n=HH();class o{static from(a,s,l){const c=typeof a=="string"?new t.NodeProvider(a,s,l):a;return new class extends o{get nodeProvider(){return c}}}static validatePublicKey(a,s,l){if((0,r.addressFromPublicKey)(s,l)!==a.signerAddress)throw new Error("Unmatched public key")}async buildTransferTx(a,s){o.validatePublicKey(a,s,a.signerKeyType);const{destinations:l,gasPrice:c,...u}=a,f={fromPublicKey:s,fromPublicKeyType:a.signerKeyType,destinations:(0,n.toApiDestinations)(l),gasPrice:(0,t.toApiNumber256Optional)(c),...u},d=await this.nodeProvider.transactions.postTransactionsBuild(f);return{...d,gasPrice:(0,t.fromApiNumber256)(d.gasPrice)}}async buildDeployContractTx(a,s){o.validatePublicKey(a,s,a.signerKeyType);const{initialAttoAlphAmount:l,initialTokenAmounts:c,issueTokenAmount:u,gasPrice:f,...d}=a,p={fromPublicKey:s,fromPublicKeyType:a.signerKeyType,initialAttoAlphAmount:(0,t.toApiNumber256Optional)(l),initialTokenAmounts:(0,t.toApiTokens)(c),issueTokenAmount:(0,t.toApiNumber256Optional)(u),gasPrice:(0,t.toApiNumber256Optional)(f),...d},h=await this.nodeProvider.contracts.postContractsUnsignedTxDeployContract(p),y=e.utils.binToHex(e.utils.contractIdFromAddress(h.contractAddress));return{...h,groupIndex:h.fromGroup,contractId:y,gasPrice:(0,t.fromApiNumber256)(h.gasPrice)}}async buildExecuteScriptTx(a,s){o.validatePublicKey(a,s,a.signerKeyType);const{attoAlphAmount:l,tokens:c,gasPrice:u,...f}=a,d={fromPublicKey:s,fromPublicKeyType:a.signerKeyType,attoAlphAmount:(0,t.toApiNumber256Optional)(l),tokens:(0,t.toApiTokens)(c),gasPrice:(0,t.toApiNumber256Optional)(u),...f},p=await this.nodeProvider.contracts.postContractsUnsignedTxExecuteScript(d);return{...p,groupIndex:p.fromGroup,gasPrice:(0,t.fromApiNumber256)(p.gasPrice)}}async buildUnsignedTx(a){const s={unsignedTx:a.unsignedTx},l=await this.nodeProvider.transactions.postTransactionsDecodeUnsignedTx(s);return{fromGroup:l.fromGroup,toGroup:l.toGroup,unsignedTx:a.unsignedTx,txId:l.unsignedTx.txId,gasAmount:l.unsignedTx.gasAmount,gasPrice:(0,t.fromApiNumber256)(l.unsignedTx.gasPrice)}}}return Vf.TransactionBuilder=o,Vf}var ok;function HH(){if(ok)return Vt;ok=1;var e=Le&&Le.__createBinding||(Object.create?function($,g,N,V){V===void 0&&(V=N);var K=Object.getOwnPropertyDescriptor(g,N);(!K||("get"in K?!g.__esModule:K.writable||K.configurable))&&(K={enumerable:!0,get:function(){return g[N]}}),Object.defineProperty($,V,K)}:function($,g,N,V){V===void 0&&(V=N),$[V]=g[N]}),t=Le&&Le.__setModuleDefault||(Object.create?function($,g){Object.defineProperty($,"default",{enumerable:!0,value:g})}:function($,g){$.default=g}),r=Le&&Le.__importStar||function($){if($&&$.__esModule)return $;var g={};if($!=null)for(var N in $)N!=="default"&&Object.prototype.hasOwnProperty.call($,N)&&e(g,$,N);return t(g,$),g},n=Le&&Le.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.fromApiDestination=Vt.toApiDestinations=Vt.toApiDestination=Vt.verifySignedMessage=Vt.hashMessage=Vt.extendMessage=Vt.SignerProviderWithCachedAccounts=Vt.SignerProviderWithMultipleAccounts=Vt.SignerProviderSimple=Vt.InteractiveSignerProvider=Vt.SignerProvider=void 0;const o=Gu,i=Yo,a=ef(),s=r(Kn()),l=n(Yy),c=UH(),u=Kn();class f{async getSelectedAccount(){const g=await this.unsafeGetSelectedAccount();return f.validateAccount(g),g}static validateAccount(g){const N=(0,u.addressFromPublicKey)(g.publicKey,g.keyType),V=(0,u.groupOfAddress)(N);if(N!==g.address||V!==g.group)throw Error(`Invalid accounot data: ${JSON.stringify(g)}`)}}Vt.SignerProvider=f;class d extends f{async enable(g){const N=await this.unsafeEnable(g);return f.validateAccount(N),N}}Vt.InteractiveSignerProvider=d;class p extends f{async submitTransaction(g){const N={unsignedTx:g.unsignedTx,signature:g.signature};return this.nodeProvider.transactions.postTransactionsSubmit(N)}async signAndSubmitTransferTx(g){const N=await this.signTransferTx(g);return await this.submitTransaction(N),N}async signAndSubmitDeployContractTx(g){const N=await this.signDeployContractTx(g);return await this.submitTransaction(N),N}async signAndSubmitExecuteScriptTx(g){const N=await this.signExecuteScriptTx(g);return await this.submitTransaction(N),N}async signAndSubmitUnsignedTx(g){const N=await this.signUnsignedTx(g);return await this.submitTransaction(N),N}async usePublicKey(g){const{signerAddress:N,...V}=g;return{fromPublicKey:await this.getPublicKey(N),...V}}async signTransferTx(g){const N=await this.buildTransferTx(g);return{signature:await this.signRaw(g.signerAddress,N.txId),...N}}async buildTransferTx(g){return c.TransactionBuilder.from(this.nodeProvider).buildTransferTx(g,await this.getPublicKey(g.signerAddress))}async signDeployContractTx(g){const N=await this.buildDeployContractTx(g);return{signature:await this.signRaw(g.signerAddress,N.txId),...N}}async buildDeployContractTx(g){return c.TransactionBuilder.from(this.nodeProvider).buildDeployContractTx(g,await this.getPublicKey(g.signerAddress))}async signExecuteScriptTx(g){const N=await this.buildExecuteScriptTx(g);return{signature:await this.signRaw(g.signerAddress,N.txId),...N}}async buildExecuteScriptTx(g){return c.TransactionBuilder.from(this.nodeProvider).buildExecuteScriptTx(g,await this.getPublicKey(g.signerAddress))}async signUnsignedTx(g){const N=await c.TransactionBuilder.from(this.nodeProvider).buildUnsignedTx(g);return{signature:await this.signRaw(g.signerAddress,N.txId),...N}}async signMessage(g){const N=b(g.message,g.messageHasher);return{signature:await this.signRaw(g.signerAddress,N)}}}Vt.SignerProviderSimple=p;class h extends p{async getAccount(g){const V=(await this.getAccounts()).find(K=>K.address===g);if(typeof V>"u")throw new Error("Unmatched signerAddress");return V}async getPublicKey(g){return(await this.getAccount(g)).publicKey}}Vt.SignerProviderWithMultipleAccounts=h;class y extends h{constructor(){super(...arguments),this._selectedAccount=void 0,this._accounts=new Map}unsafeGetSelectedAccount(){if(this._selectedAccount===void 0)throw Error("No account is selected yet");return Promise.resolve(this._selectedAccount)}setSelectedAccount(g){const N=this._accounts.get(g);if(N===void 0)throw Error("The address is not in the accounts");return this._selectedAccount=N,Promise.resolve()}getAccounts(){return Promise.resolve(Array.from(this._accounts.values()))}async getAccount(g){const N=this._accounts.get(g);if(N===void 0)throw Error("The address is not in the accounts");return Promise.resolve(N)}}Vt.SignerProviderWithCachedAccounts=y;function _($){return"Alephium Signed Message: "+$}Vt.extendMessage=_;function b($,g){switch(g){case"alephium":return s.binToHex(l.default.blake2b(_($),void 0,32));case"sha256":const N=(0,i.createHash)("sha256");return N.update(o.Buffer.from($)),s.binToHex(N.digest());case"blake2b":return s.binToHex(l.default.blake2b($,void 0,32));case"identity":return $;default:throw Error(`Invalid message hasher: ${g}`)}}Vt.hashMessage=b;function m($,g,N,V,K){const W=b($,g);return s.verifySignature(W,N,V,K)}Vt.verifySignedMessage=m;function E($){return{...$,attoAlphAmount:(0,a.toApiNumber256)($.attoAlphAmount),tokens:(0,a.toApiTokens)($.tokens)}}Vt.toApiDestination=E;function A($){return $.map(E)}Vt.toApiDestinations=A;function D($){return{...$,attoAlphAmount:(0,a.fromApiNumber256)($.attoAlphAmount),tokens:(0,a.fromApiTokens)($.tokens)}}return Vt.fromApiDestination=D,Vt}var xw={},ik;function c4e(){if(ik)return xw;ik=1,Object.defineProperty(xw,"__esModule",{value:!0});const e=Kn();return e.assertType,(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),e.assertType,(0,e.assertType)(),xw}var ak;function u4e(){return ak||(ak=1,function(e){var t=Le&&Le.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Le&&Le.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(HH(),e),r(c4e(),e),r(UH(),e)}(ww)),ww}var _w={},cl={},sk;function f4e(){if(sk)return cl;sk=1,Object.defineProperty(cl,"__esModule",{value:!0}),cl.subscribeToTxStatus=cl.TxStatusSubscription=void 0;const e=Gs(),t=Kn();class r extends t.Subscription{constructor(i,a,s,l,c){super(i),this.txId=a,this.fromGroup=s,this.toGroup=l,this.confirmations=c??1,this.startPolling()}async polling(){try{const i=await e.web3.getCurrentNodeProvider().transactions.getTransactionsStatus({txId:this.txId,fromGroup:this.fromGroup,toGroup:this.toGroup});await this.messageCallback(i),i.type==="Confirmed"&&i.chainConfirmations>=this.confirmations&&this.unsubscribe()}catch(i){await this.errorCallback(i,this)}}}cl.TxStatusSubscription=r;function n(o,i,a,s,l){return new r(o,i,a,s,l)}return cl.subscribeToTxStatus=n,cl}var ul={},lk;function d4e(){if(lk)return ul;lk=1;var e=Le&&Le.__createBinding||(Object.create?function(a,s,l,c){c===void 0&&(c=l);var u=Object.getOwnPropertyDescriptor(s,l);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[l]}}),Object.defineProperty(a,c,u)}:function(a,s,l,c){c===void 0&&(c=l),a[c]=s[l]}),t=Le&&Le.__setModuleDefault||(Object.create?function(a,s){Object.defineProperty(a,"default",{enumerable:!0,value:s})}:function(a,s){a.default=s}),r=Le&&Le.__importStar||function(a){if(a&&a.__esModule)return a;var s={};if(a!=null)for(var l in a)l!=="default"&&Object.prototype.hasOwnProperty.call(a,l)&&e(s,a,l);return t(s,a),s};Object.defineProperty(ul,"__esModule",{value:!0}),ul.transactionVerifySignature=ul.transactionSign=void 0;const n=r(Kn());function o(a,s,l){return n.sign(a,s,l)}ul.transactionSign=o;function i(a,s,l,c){return n.verifySignature(a,s,l,c)}return ul.transactionVerifySignature=i,ul}var ck;function p4e(){return ck||(ck=1,function(e){var t=Le&&Le.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Le&&Le.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(f4e(),e),r(d4e(),e)}(_w)),_w}var VH={},WH={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateNFTBaseUri=e.validateNFTCollectionUriMetaData=e.validateNFTTokenUriMetaData=e.validNFTCollectionUriMetaDataFields=e.validNFTUriMetaDataAttributeTypes=e.validNFTTokenUriMetaDataAttributesFields=e.validNFTTokenUriMetaDataFields=void 0,e.validNFTTokenUriMetaDataFields=["name","description","image","attributes"],e.validNFTTokenUriMetaDataAttributesFields=["trait_type","value"],e.validNFTUriMetaDataAttributeTypes=["string","number","boolean"],e.validNFTCollectionUriMetaDataFields=["name","description","image"];function t(u){Object.keys(u).forEach(y=>{if(!e.validNFTTokenUriMetaDataFields.includes(y))throw new Error(`Invalid field ${y}, only ${e.validNFTTokenUriMetaDataFields} are allowed`)});const f=i(u,"name"),d=a(u,"description"),p=i(u,"image"),h=o(u.attributes);return{name:f,description:d,image:p,attributes:h}}e.validateNFTTokenUriMetaData=t;function r(u){Object.keys(u).forEach(h=>{if(!e.validNFTCollectionUriMetaDataFields.includes(h))throw new Error(`Invalid field ${h}, only ${e.validNFTCollectionUriMetaDataFields} are allowed`)});const f=i(u,"name"),d=i(u,"description"),p=i(u,"image");return{name:f,description:d,image:p}}e.validateNFTCollectionUriMetaData=r;async function n(u,f){if(c(f)&&f>0){const d=[];for(let p=0;p{if(typeof f!="object")throw new Error("Field 'attributes' should be an array of objects");Object.keys(f).forEach(d=>{if(!e.validNFTTokenUriMetaDataAttributesFields.includes(d))throw new Error(`Invalid field ${d} for attributes, only ${e.validNFTTokenUriMetaDataAttributesFields} are allowed`)}),i(f,"trait_type"),s(f,"value")})}return u}function i(u,f){const d=u[`${f}`];if(!(typeof d=="string"&&d!==""))throw new Error(`JSON field '${f}' is not a non empty string`);return d}function a(u,f){const d=u[`${f}`];if(d!==void 0&&!(typeof d=="string"&&d!==""))throw new Error(`JSON field '${f}' is not a non empty string`);return d}function s(u,f){const d=u[`${f}`];if(!(typeof d=="string"&&d!==""||typeof d=="number"||typeof d=="boolean"))throw new Error("Attribute value should be a non empty string, number or boolean");return d}async function l(u,f){try{return await(await fetch(`${u}${f}`)).json()}catch(d){throw new Error(`Error fetching NFT metadata from ${u}${f}: ${d}`)}}function c(u){return u===parseInt(u.toString(),10)}})(WH);(function(e){var t=Le&&Le.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Le&&Le.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(WH,e)})(VH);var uk;function Gs(){return uk||(uk=1,function(e){var t=Le&&Le.__createBinding||(Object.create?function(i,a,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(a,s);(!c||("get"in c?!a.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(i,l,c)}:function(i,a,s,l){l===void 0&&(l=s),i[l]=a[s]}),r=Le&&Le.__setModuleDefault||(Object.create?function(i,a){Object.defineProperty(i,"default",{enumerable:!0,value:a})}:function(i,a){i.default=a}),n=Le&&Le.__exportStar||function(i,a){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&t(a,i,s)},o=Le&&Le.__importStar||function(i){if(i&&i.__esModule)return i;var a={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&t(a,i,s);return r(a,i),a};Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.web3=void 0,BigInt.prototype.toJSON=function(){return this.toString()},n(ef(),e),n(zH(),e),n(u4e(),e),n(Kn(),e),n(p4e(),e),n(VH,e),n(Zy,e),e.web3=o(jH()),e.utils=o(Kn())}(nw)),nw}var E1;Object.defineProperty(Mo,"__esModule",{value:!0});var h4e=Gs();let v4e=class extends h4e.InteractiveSignerProvider{constructor(){super(...arguments),this.enableIfConnected=async t=>{if(await this.isPreauthorized(t))return await super.enable(t)}}};function qH(e){return`alephiumProviders/${e}#initialized`}const J3={id:"alephium",name:"Alephium",icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgd2lkdGg9IjEwMCUiCiAgIGhlaWdodD0iMTAwJSIKICAgdmlld0JveD0iMCAwIDUxMiA1MTIiCiAgIHZlcnNpb249IjEuMSIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoyOyIKICAgaWQ9InN2Zzk4ODQiCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnMKICAgaWQ9ImRlZnMxMCIgLz4KICAgIDxnCiAgIGlkPSJnMTAwNyI+PHJlY3QKICAgICB4PSIwIgogICAgIHk9IjAiCiAgICAgd2lkdGg9IjUxMi4wMDA2MSIKICAgICBoZWlnaHQ9IjUxMS45OTk5MSIKICAgICBzdHlsZT0iZmlsbDpub25lO3N0cm9rZS13aWR0aDowLjM1NTU1NiIKICAgICBpZD0icmVjdDk4NjUiIC8+PHBhdGgKICAgICBkPSJtIDIyMi44MjMyLDMwOS43OTQxMSBjIDAsLTQuMzYxMjQgLTMuNDQ2NzgsLTcuMjk4MzIgLTcuNzA0NTgsLTYuNTQ3NjYgbCAtNTAuODkwNzksOC45NzIwOSBjIC00LjI1Nzc5LDAuNzUwNjUgLTcuNzA0NTgsNC45MDMwOCAtNy43MDQ1OCw5LjI2NDMxIHYgOTYuMjM1OTggYyAwLDQuMzcxMTkgMy40NDY3OSw3LjMwODI3IDcuNzA0NTgsNi41NTc2MSBsIDUwLjg5MDc5LC04Ljk3MjA5IGMgNC4yNTc4LC0wLjc1MDY1IDcuNzA0NTgsLTQuOTAzMDggNy43MDQ1OCwtOS4yNzQyNyB6IgogICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlLXdpZHRoOjEuMDA0NyIKICAgICBpZD0icGF0aDk4NjciIC8+PHBhdGgKICAgICBkPSJtIDM1NS4zODYyLDk0LjMwNTMwNCBjIDAsLTQuMzYxMjM3IC0zLjQ0Njc4LC03LjI5ODMxNSAtNy43MDQ1OCwtNi41NDc2NjIgbCAtNTAuODkwNzksOC45NzIwOTUgYyAtNC4yNTc3OSwwLjc1MDY1MyAtNy43MDQ1OCw0LjkwMzA3MyAtNy43MDQ1OCw5LjI2NDMxMyB2IDk2LjIzNTk3IGMgMCw0LjM3MTIgMy40NDY3OSw3LjMwODI3IDcuNzA0NTgsNi41NTc2MiBsIDUwLjg5MDc5LC04Ljk3MjA5IGMgNC4yNTc4LC0wLjc1MDY2IDcuNzA0NTgsLTQuOTAzMDggNy43MDQ1OCwtOS4yNzQyNyB6IgogICAgIHN0eWxlPSJmaWxsOiNmZjVkNTE7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlLXdpZHRoOjEuMDA0NyIKICAgICBpZD0icGF0aDk4NzEiIC8+PHBhdGgKICAgICBkPSJtIDIzMS4wODk3OSwxMTYuNzY3NDEgYyAtMS45NjU1NSwtNC4zMjkwNSAtNy4yNDkxNiwtNy4xODEyNiAtMTEuODExMDgsLTYuMzc2OTkgbCAtNTQuNTI1NzgsOS42MTI5NiBjIC00LjU2MTkyLDAuODA0MjcgLTYuNjY0MjgsNC45NTg2MyAtNC42OTg3Miw5LjI4NzY4IGwgMTIwLjczOTcxLDI2NS45MjQxMiBjIDEuOTY1NTYsNC4zMjkwNiA3LjI2MDUzLDcuMjA2MjggMTEuODIyNDQsNi40MDIwMSBsIDU0LjUyNTc5LC05LjYxMjk1IGMgNC41NjE5MiwtMC44MDQyNyA2LjY1MjkxLC00Ljk4MzY1IDQuNjg3MzYsLTkuMzEyNzEgeiIKICAgICBzdHlsZT0iZmlsbDojMDAwMDAwO2ZpbGwtb3BhY2l0eToxO3N0cm9rZS13aWR0aDoxLjcxMzM0IgogICAgIGlkPSJwYXRoOTg3NSIgLz48L2c+Cjwvc3ZnPgo=",downloads:{chrome:"https://chrome.google.com/webstore/detail/alephium-extension-wallet",firefox:"https://addons.mozilla.org/en-US/firefox/addon/alephium-extension-wallet"}},fk=[J3];function GH(e,t){return e.id===t.id&&e.name===t.name}function Ew(e){return new Promise(t=>{const r=()=>{const n=KH(e.id);n&&GH(n,e)&&t(n)};window.addEventListener(qH(e.id),r),r(),setTimeout(()=>t(void 0),5e3)})}function KH(e){try{const t=window.alephiumProviders;if(!t)return;const r=t[e];return YH(r)?r:void 0}catch{}}function YH(e){try{return e&&["id","name","icon","unsafeEnable","isPreauthorized","nodeProvider","explorerProvider","signAndSubmitTransferTx","signAndSubmitDeployContractTx","signAndSubmitExecuteScriptTx","signAndSubmitUnsignedTx","signUnsignedTx","signMessage"].every(t=>t in e)}catch{}return!1}Mo.AlephiumWindowObject=v4e,Mo.alephiumProvider=J3,Mo.checkProviderMetadata=GH,E1=Mo.getDefaultAlephiumWallet=function(){return Ew(J3)},Mo.getKnownWallet=Ew,Mo.getWalletObject=KH,Mo.isWalletObj=YH,Mo.knownProviders=fk,Mo.providerInitializedEvent=qH,Mo.scanKnownWallets=async function(){const e=[];for(const t of fk){const r=await Ew(t);r!==void 0&&e.push(r)}return e};var Q3={};/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var ex=function(e,t){return ex=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)n.hasOwnProperty(o)&&(r[o]=n[o])},ex(e,t)};function g4e(e,t){ex(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var tx=function(){return tx=Object.assign||function(t){for(var r,n=1,o=arguments.length;n=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function b4e(e,t){return function(r,n){t(r,n,e)}}function w4e(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function x4e(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{c(n.next(u))}catch(f){a(f)}}function l(u){try{c(n.throw(u))}catch(f){a(f)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((n=n.apply(e,t||[])).next())})}function _4e(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,o=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function XH(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function C4e(){for(var e=[],t=0;t1||s(d,p)})})}function s(d,p){try{l(n[d](p))}catch(h){f(i[0][3],h)}}function l(d){d.value instanceof Ep?Promise.resolve(d.value.v).then(c,u):f(i[0][2],d)}function c(d){s("next",d)}function u(d){s("throw",d)}function f(d,p){d(p),i.shift(),i.length&&s(i[0][0],i[0][1])}}function A4e(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,i){t[o]=e[o]?function(a){return(r=!r)?{value:Ep(e[o](a)),done:o==="return"}:i?i(a):a}:i}}function k4e(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof rx=="function"?rx(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(a){return new Promise(function(s,l){a=e[i](a),o(s,l,a.done,a.value)})}}function o(i,a,s,l){Promise.resolve(l).then(function(c){i({value:c,done:s})},a)}}function I4e(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function $4e(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function T4e(e){return e&&e.__esModule?e:{default:e}}function D4e(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function M4e(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}const R4e=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return tx},__asyncDelegator:A4e,__asyncGenerator:O4e,__asyncValues:k4e,__await:Ep,__awaiter:x4e,__classPrivateFieldGet:D4e,__classPrivateFieldSet:M4e,__createBinding:E4e,__decorate:y4e,__exportStar:S4e,__extends:g4e,__generator:_4e,__importDefault:T4e,__importStar:$4e,__makeTemplateObject:I4e,__metadata:w4e,__param:b4e,__read:XH,__rest:m4e,__spread:C4e,__spreadArrays:P4e,__values:rx},Symbol.toStringTag,{value:"Module"})),Rn=Ll(R4e);var Tr={};function N4e(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}var F4e=B4e;function B4e(e,t,r){var n=r&&r.stringify||N4e,o=1;if(typeof e=="object"&&e!==null){var i=t.length+o;if(i===1)return e;var a=new Array(i);a[0]=n(e);for(var s=1;s-1?f:0,e.charCodeAt(p+1)){case 100:case 102:if(u>=l||t[u]==null)break;f=l||t[u]==null)break;f=l||t[u]===void 0)break;f",f=p+2,p++;break}c+=n(t[u]),f=p+2,p++;break;case 115:if(u>=l)break;f-1&&(i=!1);const a=["error","fatal","warn","info","debug","trace"];typeof r=="function"&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),e.enabled===!1&&(e.level="silent");const s=e.level||"info",l=Object.create(r);l.log||(l.log=Cp),Object.defineProperty(l,"levelVal",{get:u}),Object.defineProperty(l,"level",{get:f,set:d});const c={transmit:t,serialize:o,asObject:e.browser.asObject,levels:a,timestamp:W4e(e)};l.levels=Ii.levels,l.level=s,l.setMaxListeners=l.getMaxListeners=l.emit=l.addListener=l.on=l.prependListener=l.once=l.prependOnceListener=l.removeListener=l.removeAllListeners=l.listeners=l.listenerCount=l.eventNames=l.write=l.flush=Cp,l.serializers=n,l._serialize=o,l._stdErrSerialize=i,l.child=p,t&&(l._logEvent=nx());function u(){return this.level==="silent"?1/0:this.levels.values[this.level]}function f(){return this._level}function d(h){if(h!=="silent"&&!this.levels.values[h])throw Error("unknown level "+h);this._level=h,dc(c,l,"error","log"),dc(c,l,"fatal","error"),dc(c,l,"warn","error"),dc(c,l,"info","log"),dc(c,l,"debug","log"),dc(c,l,"trace","log")}function p(h,y){if(!h)throw new Error("missing bindings for child Pino");y=y||{},o&&h.serializers&&(y.serializers=h.serializers);const _=y.serializers;if(o&&_){var b=Object.assign({},n,_),m=e.browser.serialize===!0?Object.keys(b):o;delete h.serializers,eb([h],m,b,this._stdErrSerialize)}function E(A){this._childLevel=(A._childLevel|0)+1,this.error=pc(A,h,"error"),this.fatal=pc(A,h,"fatal"),this.warn=pc(A,h,"warn"),this.info=pc(A,h,"info"),this.debug=pc(A,h,"debug"),this.trace=pc(A,h,"trace"),b&&(this.serializers=b,this._serialize=m),t&&(this._logEvent=nx([].concat(A._logEvent.bindings,h)))}return E.prototype=this,new E(this)}return l}Ii.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};Ii.stdSerializers=j4e;Ii.stdTimeFunctions=Object.assign({},{nullTime:JH,epochTime:QH,unixTime:q4e,isoTime:G4e});function dc(e,t,r,n){const o=Object.getPrototypeOf(t);t[r]=t.levelVal>t.levels.values[r]?Cp:o[r]?o[r]:Sp[r]||Sp[n]||Cp,z4e(e,t,r)}function z4e(e,t,r){!e.transmit&&t[r]===Cp||(t[r]=function(n){return function(){const i=e.timestamp(),a=new Array(arguments.length),s=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Sp?Sp:this;for(var l=0;l-1&&i in r&&(e[o][i]=r[i](e[o][i]))}function pc(e,t,r){return function(){const n=new Array(1+arguments.length);n[0]=t;for(var o=1;o0&&(a=r[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[t];if(l===void 0)return!1;if(typeof l=="function")pk(l,this,r);else for(var c=l.length,u=aV(l,c),n=0;n0&&a.length>o&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,Y4e(s)}return e}Rt.prototype.addListener=function(t,r){return rV(this,t,r,!1)};Rt.prototype.on=Rt.prototype.addListener;Rt.prototype.prependListener=function(t,r){return rV(this,t,r,!0)};function X4e(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function nV(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=X4e.bind(n);return o.listener=r,n.wrapFn=o,o}Rt.prototype.once=function(t,r){return tb(r),this.on(t,nV(this,t,r)),this};Rt.prototype.prependOnceListener=function(t,r){return tb(r),this.prependListener(t,nV(this,t,r)),this};Rt.prototype.removeListener=function(t,r){var n,o,i,a,s;if(tb(r),o=this._events,o===void 0)return this;if(n=o[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete o[t],o.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===r||n[a].listener===r){s=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():Z4e(n,i),n.length===1&&(o[t]=n[0]),o.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};Rt.prototype.off=Rt.prototype.removeListener;Rt.prototype.removeAllListeners=function(t){var r,n,o;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i=Object.keys(n),a;for(o=0;o=0;o--)this.removeListener(t,r[o]);return this};function oV(e,t,r){var n=e._events;if(n===void 0)return[];var o=n[t];return o===void 0?[]:typeof o=="function"?r?[o.listener||o]:[o]:r?J4e(o):aV(o,o.length)}Rt.prototype.listeners=function(t){return oV(this,t,!0)};Rt.prototype.rawListeners=function(t){return oV(this,t,!1)};Rt.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):iV.call(e,t)};Rt.prototype.listenerCount=iV;function iV(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Rt.prototype.eventNames=function(){return this._eventsCount>0?S1(this._events):[]};function aV(e,t){for(var r=new Array(t),n=0;ntypeof r>"u"?null:r)}ph.safeJsonStringify=r8e;var Wf={exports:{}},vk;function n8e(){return vk||(vk=1,function(){let e;function t(){}e=t,e.prototype.getItem=function(r){return this.hasOwnProperty(r)?String(this[r]):null},e.prototype.setItem=function(r,n){this[r]=String(n)},e.prototype.removeItem=function(r){delete this[r]},e.prototype.clear=function(){const r=this;Object.keys(r).forEach(function(n){r[n]=void 0,delete r[n]})},e.prototype.key=function(r){return r=r||0,Object.keys(this)[r]},e.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof Le<"u"&&Le.localStorage?Wf.exports=Le.localStorage:typeof window<"u"&&window.localStorage?Wf.exports=window.localStorage:Wf.exports=new t}()),Wf.exports}var Cw={},qf={},gk;function o8e(){if(gk)return qf;gk=1,Object.defineProperty(qf,"__esModule",{value:!0}),qf.IKeyValueStorage=void 0;class e{}return qf.IKeyValueStorage=e,qf}var Gf={},mk;function i8e(){if(mk)return Gf;mk=1,Object.defineProperty(Gf,"__esModule",{value:!0}),Gf.parseEntry=void 0;const e=ph;function t(r){var n;return[r[0],e.safeJsonParse((n=r[1])!==null&&n!==void 0?n:"")]}return Gf.parseEntry=t,Gf}var yk;function a8e(){return yk||(yk=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Rn;t.__exportStar(o8e(),e),t.__exportStar(i8e(),e)}(Cw)),Cw}Object.defineProperty(rb,"__esModule",{value:!0});rb.KeyValueStorage=void 0;const wc=Rn,bk=ph,s8e=wc.__importDefault(n8e()),l8e=a8e();class cV{constructor(){this.localStorage=s8e.default}getKeys(){return wc.__awaiter(this,void 0,void 0,function*(){return Object.keys(this.localStorage)})}getEntries(){return wc.__awaiter(this,void 0,void 0,function*(){return Object.entries(this.localStorage).map(l8e.parseEntry)})}getItem(t){return wc.__awaiter(this,void 0,void 0,function*(){const r=this.localStorage.getItem(t);if(r!==null)return bk.safeJsonParse(r)})}setItem(t,r){return wc.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(t,bk.safeJsonStringify(r))})}removeItem(t){return wc.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(t)})}}rb.KeyValueStorage=cV;var c8e=rb.default=cV,hh={},Kf={},pt={},Pw={},Yf={},wk;function u8e(){if(wk)return Yf;wk=1,Object.defineProperty(Yf,"__esModule",{value:!0}),Yf.delay=void 0;function e(t){return new Promise(r=>{setTimeout(()=>{r(!0)},t)})}return Yf.delay=e,Yf}var fl={},Ow={},dl={},xk;function f8e(){return xk||(xk=1,Object.defineProperty(dl,"__esModule",{value:!0}),dl.ONE_THOUSAND=dl.ONE_HUNDRED=void 0,dl.ONE_HUNDRED=100,dl.ONE_THOUSAND=1e3),dl}var Aw={},_k;function d8e(){return _k||(_k=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_YEAR=e.FOUR_WEEKS=e.THREE_WEEKS=e.TWO_WEEKS=e.ONE_WEEK=e.THIRTY_DAYS=e.SEVEN_DAYS=e.FIVE_DAYS=e.THREE_DAYS=e.ONE_DAY=e.TWENTY_FOUR_HOURS=e.TWELVE_HOURS=e.SIX_HOURS=e.THREE_HOURS=e.ONE_HOUR=e.SIXTY_MINUTES=e.THIRTY_MINUTES=e.TEN_MINUTES=e.FIVE_MINUTES=e.ONE_MINUTE=e.SIXTY_SECONDS=e.THIRTY_SECONDS=e.TEN_SECONDS=e.FIVE_SECONDS=e.ONE_SECOND=void 0,e.ONE_SECOND=1,e.FIVE_SECONDS=5,e.TEN_SECONDS=10,e.THIRTY_SECONDS=30,e.SIXTY_SECONDS=60,e.ONE_MINUTE=e.SIXTY_SECONDS,e.FIVE_MINUTES=e.ONE_MINUTE*5,e.TEN_MINUTES=e.ONE_MINUTE*10,e.THIRTY_MINUTES=e.ONE_MINUTE*30,e.SIXTY_MINUTES=e.ONE_MINUTE*60,e.ONE_HOUR=e.SIXTY_MINUTES,e.THREE_HOURS=e.ONE_HOUR*3,e.SIX_HOURS=e.ONE_HOUR*6,e.TWELVE_HOURS=e.ONE_HOUR*12,e.TWENTY_FOUR_HOURS=e.ONE_HOUR*24,e.ONE_DAY=e.TWENTY_FOUR_HOURS,e.THREE_DAYS=e.ONE_DAY*3,e.FIVE_DAYS=e.ONE_DAY*5,e.SEVEN_DAYS=e.ONE_DAY*7,e.THIRTY_DAYS=e.ONE_DAY*30,e.ONE_WEEK=e.SEVEN_DAYS,e.TWO_WEEKS=e.ONE_WEEK*2,e.THREE_WEEKS=e.ONE_WEEK*3,e.FOUR_WEEKS=e.ONE_WEEK*4,e.ONE_YEAR=e.ONE_DAY*365}(Aw)),Aw}var Ek;function uV(){return Ek||(Ek=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Rn;t.__exportStar(f8e(),e),t.__exportStar(d8e(),e)}(Ow)),Ow}var Sk;function p8e(){if(Sk)return fl;Sk=1,Object.defineProperty(fl,"__esModule",{value:!0}),fl.fromMiliseconds=fl.toMiliseconds=void 0;const e=uV();function t(n){return n*e.ONE_THOUSAND}fl.toMiliseconds=t;function r(n){return Math.floor(n/e.ONE_THOUSAND)}return fl.fromMiliseconds=r,fl}var Ck;function h8e(){return Ck||(Ck=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Rn;t.__exportStar(u8e(),e),t.__exportStar(p8e(),e)}(Pw)),Pw}var hc={},Pk;function v8e(){if(Pk)return hc;Pk=1,Object.defineProperty(hc,"__esModule",{value:!0}),hc.Watch=void 0;class e{constructor(){this.timestamps=new Map}start(r){if(this.timestamps.has(r))throw new Error(`Watch already started for label: ${r}`);this.timestamps.set(r,{started:Date.now()})}stop(r){const n=this.get(r);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${r}`);const o=Date.now()-n.started;this.timestamps.set(r,{started:n.started,elapsed:o})}get(r){const n=this.timestamps.get(r);if(typeof n>"u")throw new Error(`No timestamp found for label: ${r}`);return n}elapsed(r){const n=this.get(r);return n.elapsed||Date.now()-n.started}}return hc.Watch=e,hc.default=e,hc}var kw={},Xf={},Ok;function g8e(){if(Ok)return Xf;Ok=1,Object.defineProperty(Xf,"__esModule",{value:!0}),Xf.IWatch=void 0;class e{}return Xf.IWatch=e,Xf}var Ak;function m8e(){return Ak||(Ak=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Rn.__exportStar(g8e(),e)}(kw)),kw}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Rn;t.__exportStar(h8e(),e),t.__exportStar(v8e(),e),t.__exportStar(m8e(),e),t.__exportStar(uV(),e)})(pt);var Iw={},Zf={};let Ql=class{};const y8e=Object.freeze(Object.defineProperty({__proto__:null,IEvents:Ql},Symbol.toStringTag,{value:"Module"})),b8e=Ll(y8e);var kk;function w8e(){if(kk)return Zf;kk=1,Object.defineProperty(Zf,"__esModule",{value:!0}),Zf.IHeartBeat=void 0;const e=b8e;class t extends e.IEvents{constructor(n){super()}}return Zf.IHeartBeat=t,Zf}var Ik;function fV(){return Ik||(Ik=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Rn.__exportStar(w8e(),e)}(Iw)),Iw}var $w={},pl={},$k;function x8e(){if($k)return pl;$k=1,Object.defineProperty(pl,"__esModule",{value:!0}),pl.HEARTBEAT_EVENTS=pl.HEARTBEAT_INTERVAL=void 0;const e=pt;return pl.HEARTBEAT_INTERVAL=e.FIVE_SECONDS,pl.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},pl}var Tk;function dV(){return Tk||(Tk=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Rn.__exportStar(x8e(),e)}($w)),$w}var Dk;function _8e(){if(Dk)return Kf;Dk=1,Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.HeartBeat=void 0;const e=Rn,t=ni,r=pt,n=fV(),o=dV();class i extends n.IHeartBeat{constructor(s){super(s),this.events=new t.EventEmitter,this.interval=o.HEARTBEAT_INTERVAL,this.interval=(s==null?void 0:s.interval)||o.HEARTBEAT_INTERVAL}static init(s){return e.__awaiter(this,void 0,void 0,function*(){const l=new i(s);return yield l.init(),l})}init(){return e.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(s,l){this.events.on(s,l)}once(s,l){this.events.once(s,l)}off(s,l){this.events.off(s,l)}removeListener(s,l){this.events.removeListener(s,l)}initialize(){return e.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),r.toMiliseconds(this.interval))})}pulse(){this.events.emit(o.HEARTBEAT_EVENTS.pulse)}}return Kf.HeartBeat=i,Kf}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Rn;t.__exportStar(_8e(),e),t.__exportStar(fV(),e),t.__exportStar(dV(),e)})(hh);var Mt={},hl={},Mk;function pV(){return Mk||(Mk=1,Object.defineProperty(hl,"__esModule",{value:!0}),hl.PINO_CUSTOM_CONTEXT_KEY=hl.PINO_LOGGER_DEFAULTS=void 0,hl.PINO_LOGGER_DEFAULTS={level:"info"},hl.PINO_CUSTOM_CONTEXT_KEY="custom_context"),hl}var ln={},Rk;function E8e(){if(Rk)return ln;Rk=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.generateChildLogger=ln.formatChildLoggerContext=ln.getLoggerContext=ln.setBrowserLoggerContext=ln.getBrowserLoggerContext=ln.getDefaultLoggerOptions=void 0;const e=pV();function t(s){return Object.assign(Object.assign({},s),{level:(s==null?void 0:s.level)||e.PINO_LOGGER_DEFAULTS.level})}ln.getDefaultLoggerOptions=t;function r(s,l=e.PINO_CUSTOM_CONTEXT_KEY){return s[l]||""}ln.getBrowserLoggerContext=r;function n(s,l,c=e.PINO_CUSTOM_CONTEXT_KEY){return s[c]=l,s}ln.setBrowserLoggerContext=n;function o(s,l=e.PINO_CUSTOM_CONTEXT_KEY){let c="";return typeof s.bindings>"u"?c=r(s,l):c=s.bindings().context||"",c}ln.getLoggerContext=o;function i(s,l,c=e.PINO_CUSTOM_CONTEXT_KEY){const u=o(s,c);return u.trim()?`${u}/${l}`:l}ln.formatChildLoggerContext=i;function a(s,l,c=e.PINO_CUSTOM_CONTEXT_KEY){const u=i(s,l,c),f=s.child({context:u});return n(f,u,c)}return ln.generateChildLogger=a,ln}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pino=void 0;const t=Rn,r=t.__importDefault(ZH);Object.defineProperty(e,"pino",{enumerable:!0,get:function(){return r.default}}),t.__exportStar(pV(),e),t.__exportStar(E8e(),e)})(Mt);let S8e=class extends Ql{constructor(t){super(),this.opts=t,this.protocol="wc",this.version=2}},C8e=class extends Ql{constructor(t,r){super(),this.core=t,this.logger=r,this.records=new Map}},P8e=class{constructor(t,r){this.logger=t,this.core=r}},O8e=class extends Ql{constructor(t,r){super(),this.relayer=t,this.logger=r}},A8e=class extends Ql{constructor(t){super()}},k8e=class{constructor(t,r,n,o){this.core=t,this.logger=r,this.name=n}},I8e=class extends Ql{constructor(t,r){super(),this.relayer=t,this.logger=r}},$8e=class extends Ql{constructor(t,r){super(),this.core=t,this.logger=r}},T8e=class{constructor(t){this.opts=t,this.protocol="wc",this.version=2}},D8e=class{constructor(t){this.client=t}};const M8e=e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString()+"n":r),R8e=e=>{const t=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,r=e.replace(t,'$1"$2n"$3');return JSON.parse(r,(n,o)=>typeof o=="string"&&o.match(/^\d+n$/)?BigInt(o.substring(0,o.length-1)):o)};function hV(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return R8e(e)}catch{return e}}function T4(e){return typeof e=="string"?e:M8e(e)||""}var D4={},tf={},nb={},ob={};Object.defineProperty(ob,"__esModule",{value:!0});ob.BrowserRandomSource=void 0;const Nk=65536;class N8e{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const t=typeof self<"u"?self.crypto||self.msCrypto:null;t&&t.getRandomValues!==void 0&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const r=new Uint8Array(t);for(let n=0;n>>16&65535,u=s&65535,f=l>>>16&65535,d=l&65535;return u*d+(c*d+u*f<<16>>>0)|0}e.mul=Math.imul||t;function r(s,l){return s+l|0}e.add=r;function n(s,l){return s-l|0}e.sub=n;function o(s,l){return s<>>32-l}e.rotl=o;function i(s,l){return s<<32-l|s>>>l}e.rotr=i;function a(s){return typeof s=="number"&&isFinite(s)&&Math.floor(s)===s}e.isInteger=Number.isInteger||a,e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(s){return e.isInteger(s)&&s>=-e.MAX_SAFE_INTEGER&&s<=e.MAX_SAFE_INTEGER}})(vV);Object.defineProperty(bt,"__esModule",{value:!0});var gV=vV;function V8e(e,t){return t===void 0&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16}bt.readInt16BE=V8e;function W8e(e,t){return t===void 0&&(t=0),(e[t+0]<<8|e[t+1])>>>0}bt.readUint16BE=W8e;function q8e(e,t){return t===void 0&&(t=0),(e[t+1]<<8|e[t])<<16>>16}bt.readInt16LE=q8e;function G8e(e,t){return t===void 0&&(t=0),(e[t+1]<<8|e[t])>>>0}bt.readUint16LE=G8e;function mV(e,t,r){return t===void 0&&(t=new Uint8Array(2)),r===void 0&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}bt.writeUint16BE=mV;bt.writeInt16BE=mV;function yV(e,t,r){return t===void 0&&(t=new Uint8Array(2)),r===void 0&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}bt.writeUint16LE=yV;bt.writeInt16LE=yV;function ox(e,t){return t===void 0&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}bt.readInt32BE=ox;function ix(e,t){return t===void 0&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}bt.readUint32BE=ix;function ax(e,t){return t===void 0&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}bt.readInt32LE=ax;function sx(e,t){return t===void 0&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}bt.readUint32LE=sx;function pm(e,t,r){return t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}bt.writeUint32BE=pm;bt.writeInt32BE=pm;function hm(e,t,r){return t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}bt.writeUint32LE=hm;bt.writeInt32LE=hm;function K8e(e,t){t===void 0&&(t=0);var r=ox(e,t),n=ox(e,t+4);return r*4294967296+n-(n>>31)*4294967296}bt.readInt64BE=K8e;function Y8e(e,t){t===void 0&&(t=0);var r=ix(e,t),n=ix(e,t+4);return r*4294967296+n}bt.readUint64BE=Y8e;function X8e(e,t){t===void 0&&(t=0);var r=ax(e,t),n=ax(e,t+4);return n*4294967296+r-(r>>31)*4294967296}bt.readInt64LE=X8e;function Z8e(e,t){t===void 0&&(t=0);var r=sx(e,t),n=sx(e,t+4);return n*4294967296+r}bt.readUint64LE=Z8e;function bV(e,t,r){return t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0),pm(e/4294967296>>>0,t,r),pm(e>>>0,t,r+4),t}bt.writeUint64BE=bV;bt.writeInt64BE=bV;function wV(e,t,r){return t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0),hm(e>>>0,t,r),hm(e/4294967296>>>0,t,r+4),t}bt.writeUint64LE=wV;bt.writeInt64LE=wV;function J8e(e,t,r){if(r===void 0&&(r=0),e%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,o=1,i=e/8+r-1;i>=r;i--)n+=t[i]*o,o*=256;return n}bt.readUintBE=J8e;function Q8e(e,t,r){if(r===void 0&&(r=0),e%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,o=1,i=r;i=n;i--)r[i]=t/o&255,o*=256;return r}bt.writeUintBE=eEe;function tEe(e,t,r,n){if(r===void 0&&(r=new Uint8Array(e/8)),n===void 0&&(n=0),e%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!gV.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var o=1,i=n;i256)throw new Error("randomString charset is too long");let d="";const p=u.length,h=256-256%p;for(;c>0;){const y=o(Math.ceil(c*256/h),f);for(let _=0;_0;_++){const b=y[_];b0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=l[u++],c--;this._bufferLength===this.blockSize&&(i(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(c>=this.blockSize&&(u=i(this._tempHi,this._tempLo,this._stateHi,this._stateLo,l,u,c),c%=this.blockSize);c>0;)this._buffer[this._bufferLength++]=l[u++],c--;return this},s.prototype.finish=function(l){if(!this._finished){var c=this._bytesHashed,u=this._bufferLength,f=c/536870912|0,d=c<<3,p=c%128<112?128:256;this._buffer[u]=128;for(var h=u+1;h0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},s.prototype.restoreState=function(l){return this._stateHi.set(l.stateHi),this._stateLo.set(l.stateLo),this._bufferLength=l.bufferLength,l.buffer&&this._buffer.set(l.buffer),this._bytesHashed=l.bytesHashed,this._finished=!1,this},s.prototype.cleanSavedState=function(l){r.wipe(l.stateHi),r.wipe(l.stateLo),l.buffer&&r.wipe(l.buffer),l.bufferLength=0,l.bytesHashed=0},s}();e.SHA512=n;var o=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function i(s,l,c,u,f,d,p){for(var h=c[0],y=c[1],_=c[2],b=c[3],m=c[4],E=c[5],A=c[6],D=c[7],$=u[0],g=u[1],N=u[2],V=u[3],K=u[4],W=u[5],P=u[6],C=u[7],v,w,B,R,L,U,S,F;p>=128;){for(var T=0;T<16;T++){var q=8*T+d;s[T]=t.readUint32BE(f,q),l[T]=t.readUint32BE(f,q+4)}for(var T=0;T<80;T++){var J=h,te=y,ie=_,ce=b,oe=m,ue=E,O=A,G=D,ee=$,se=g,pe=N,ge=V,X=K,M=W,z=P,Z=C;if(v=D,w=C,L=w&65535,U=w>>>16,S=v&65535,F=v>>>16,v=(m>>>14|K<<32-14)^(m>>>18|K<<32-18)^(K>>>41-32|m<<32-(41-32)),w=(K>>>14|m<<32-14)^(K>>>18|m<<32-18)^(m>>>41-32|K<<32-(41-32)),L+=w&65535,U+=w>>>16,S+=v&65535,F+=v>>>16,v=m&E^~m&A,w=K&W^~K&P,L+=w&65535,U+=w>>>16,S+=v&65535,F+=v>>>16,v=o[T*2],w=o[T*2+1],L+=w&65535,U+=w>>>16,S+=v&65535,F+=v>>>16,v=s[T%16],w=l[T%16],L+=w&65535,U+=w>>>16,S+=v&65535,F+=v>>>16,U+=L>>>16,S+=U>>>16,F+=S>>>16,B=S&65535|F<<16,R=L&65535|U<<16,v=B,w=R,L=w&65535,U=w>>>16,S=v&65535,F=v>>>16,v=(h>>>28|$<<32-28)^($>>>34-32|h<<32-(34-32))^($>>>39-32|h<<32-(39-32)),w=($>>>28|h<<32-28)^(h>>>34-32|$<<32-(34-32))^(h>>>39-32|$<<32-(39-32)),L+=w&65535,U+=w>>>16,S+=v&65535,F+=v>>>16,v=h&y^h&_^y&_,w=$&g^$&N^g&N,L+=w&65535,U+=w>>>16,S+=v&65535,F+=v>>>16,U+=L>>>16,S+=U>>>16,F+=S>>>16,G=S&65535|F<<16,Z=L&65535|U<<16,v=ce,w=ge,L=w&65535,U=w>>>16,S=v&65535,F=v>>>16,v=B,w=R,L+=w&65535,U+=w>>>16,S+=v&65535,F+=v>>>16,U+=L>>>16,S+=U>>>16,F+=S>>>16,ce=S&65535|F<<16,ge=L&65535|U<<16,y=J,_=te,b=ie,m=ce,E=oe,A=ue,D=O,h=G,g=ee,N=se,V=pe,K=ge,W=X,P=M,C=z,$=Z,T%16===15)for(var q=0;q<16;q++)v=s[q],w=l[q],L=w&65535,U=w>>>16,S=v&65535,F=v>>>16,v=s[(q+9)%16],w=l[(q+9)%16],L+=w&65535,U+=w>>>16,S+=v&65535,F+=v>>>16,B=s[(q+1)%16],R=l[(q+1)%16],v=(B>>>1|R<<32-1)^(B>>>8|R<<32-8)^B>>>7,w=(R>>>1|B<<32-1)^(R>>>8|B<<32-8)^(R>>>7|B<<32-7),L+=w&65535,U+=w>>>16,S+=v&65535,F+=v>>>16,B=s[(q+14)%16],R=l[(q+14)%16],v=(B>>>19|R<<32-19)^(R>>>61-32|B<<32-(61-32))^B>>>6,w=(R>>>19|B<<32-19)^(B>>>61-32|R<<32-(61-32))^(R>>>6|B<<32-6),L+=w&65535,U+=w>>>16,S+=v&65535,F+=v>>>16,U+=L>>>16,S+=U>>>16,F+=S>>>16,s[q]=S&65535|F<<16,l[q]=L&65535|U<<16}v=h,w=$,L=w&65535,U=w>>>16,S=v&65535,F=v>>>16,v=c[0],w=u[0],L+=w&65535,U+=w>>>16,S+=v&65535,F+=v>>>16,U+=L>>>16,S+=U>>>16,F+=S>>>16,c[0]=h=S&65535|F<<16,u[0]=$=L&65535|U<<16,v=y,w=g,L=w&65535,U=w>>>16,S=v&65535,F=v>>>16,v=c[1],w=u[1],L+=w&65535,U+=w>>>16,S+=v&65535,F+=v>>>16,U+=L>>>16,S+=U>>>16,F+=S>>>16,c[1]=y=S&65535|F<<16,u[1]=g=L&65535|U<<16,v=_,w=N,L=w&65535,U=w>>>16,S=v&65535,F=v>>>16,v=c[2],w=u[2],L+=w&65535,U+=w>>>16,S+=v&65535,F+=v>>>16,U+=L>>>16,S+=U>>>16,F+=S>>>16,c[2]=_=S&65535|F<<16,u[2]=N=L&65535|U<<16,v=b,w=V,L=w&65535,U=w>>>16,S=v&65535,F=v>>>16,v=c[3],w=u[3],L+=w&65535,U+=w>>>16,S+=v&65535,F+=v>>>16,U+=L>>>16,S+=U>>>16,F+=S>>>16,c[3]=b=S&65535|F<<16,u[3]=V=L&65535|U<<16,v=m,w=K,L=w&65535,U=w>>>16,S=v&65535,F=v>>>16,v=c[4],w=u[4],L+=w&65535,U+=w>>>16,S+=v&65535,F+=v>>>16,U+=L>>>16,S+=U>>>16,F+=S>>>16,c[4]=m=S&65535|F<<16,u[4]=K=L&65535|U<<16,v=E,w=W,L=w&65535,U=w>>>16,S=v&65535,F=v>>>16,v=c[5],w=u[5],L+=w&65535,U+=w>>>16,S+=v&65535,F+=v>>>16,U+=L>>>16,S+=U>>>16,F+=S>>>16,c[5]=E=S&65535|F<<16,u[5]=W=L&65535|U<<16,v=A,w=P,L=w&65535,U=w>>>16,S=v&65535,F=v>>>16,v=c[6],w=u[6],L+=w&65535,U+=w>>>16,S+=v&65535,F+=v>>>16,U+=L>>>16,S+=U>>>16,F+=S>>>16,c[6]=A=S&65535|F<<16,u[6]=P=L&65535|U<<16,v=D,w=C,L=w&65535,U=w>>>16,S=v&65535,F=v>>>16,v=c[7],w=u[7],L+=w&65535,U+=w>>>16,S+=v&65535,F+=v>>>16,U+=L>>>16,S+=U>>>16,F+=S>>>16,c[7]=D=S&65535|F<<16,u[7]=C=L&65535|U<<16,d+=128,p-=128}return d}function a(s){var l=new n;l.update(s);var c=l.digest();return l.clean(),c}e.hash=a})(xV);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.convertSecretKeyToX25519=e.convertPublicKeyToX25519=e.verify=e.sign=e.extractPublicKeyFromSecretKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.SEED_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=e.SIGNATURE_LENGTH=void 0;const t=tf,r=xV,n=eo;e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32;function o(ce){const oe=new Float64Array(16);if(ce)for(let ue=0;ue>16&1),ue[se-1]&=65535;ue[15]=O[15]-32767-(ue[14]>>16&1);const ee=ue[15]>>16&1;ue[14]&=65535,y(O,ue,1-ee)}for(let G=0;G<16;G++)ce[2*G]=O[G]&255,ce[2*G+1]=O[G]>>8}function b(ce,oe){let ue=0;for(let O=0;O<32;O++)ue|=ce[O]^oe[O];return(1&ue-1>>>8)-1}function m(ce,oe){const ue=new Uint8Array(32),O=new Uint8Array(32);return _(ue,ce),_(O,oe),b(ue,O)}function E(ce){const oe=new Uint8Array(32);return _(oe,ce),oe[0]&1}function A(ce,oe){for(let ue=0;ue<16;ue++)ce[ue]=oe[2*ue]+(oe[2*ue+1]<<8);ce[15]&=32767}function D(ce,oe,ue){for(let O=0;O<16;O++)ce[O]=oe[O]+ue[O]}function $(ce,oe,ue){for(let O=0;O<16;O++)ce[O]=oe[O]-ue[O]}function g(ce,oe,ue){let O,G,ee=0,se=0,pe=0,ge=0,X=0,M=0,z=0,Z=0,Q=0,de=0,we=0,Se=0,Ee=0,Ae=0,Te=0,H=0,x=0,k=0,Y=0,re=0,fe=0,le=0,xe=0,_e=0,ke=0,$e=0,Ne=0,We=0,gt=0,ft=0,Ye=0,Je=ue[0],tt=ue[1],ve=ue[2],ne=ue[3],he=ue[4],be=ue[5],Ce=ue[6],Oe=ue[7],Ie=ue[8],De=ue[9],je=ue[10],Me=ue[11],He=ue[12],qe=ue[13],ze=ue[14],it=ue[15];O=oe[0],ee+=O*Je,se+=O*tt,pe+=O*ve,ge+=O*ne,X+=O*he,M+=O*be,z+=O*Ce,Z+=O*Oe,Q+=O*Ie,de+=O*De,we+=O*je,Se+=O*Me,Ee+=O*He,Ae+=O*qe,Te+=O*ze,H+=O*it,O=oe[1],se+=O*Je,pe+=O*tt,ge+=O*ve,X+=O*ne,M+=O*he,z+=O*be,Z+=O*Ce,Q+=O*Oe,de+=O*Ie,we+=O*De,Se+=O*je,Ee+=O*Me,Ae+=O*He,Te+=O*qe,H+=O*ze,x+=O*it,O=oe[2],pe+=O*Je,ge+=O*tt,X+=O*ve,M+=O*ne,z+=O*he,Z+=O*be,Q+=O*Ce,de+=O*Oe,we+=O*Ie,Se+=O*De,Ee+=O*je,Ae+=O*Me,Te+=O*He,H+=O*qe,x+=O*ze,k+=O*it,O=oe[3],ge+=O*Je,X+=O*tt,M+=O*ve,z+=O*ne,Z+=O*he,Q+=O*be,de+=O*Ce,we+=O*Oe,Se+=O*Ie,Ee+=O*De,Ae+=O*je,Te+=O*Me,H+=O*He,x+=O*qe,k+=O*ze,Y+=O*it,O=oe[4],X+=O*Je,M+=O*tt,z+=O*ve,Z+=O*ne,Q+=O*he,de+=O*be,we+=O*Ce,Se+=O*Oe,Ee+=O*Ie,Ae+=O*De,Te+=O*je,H+=O*Me,x+=O*He,k+=O*qe,Y+=O*ze,re+=O*it,O=oe[5],M+=O*Je,z+=O*tt,Z+=O*ve,Q+=O*ne,de+=O*he,we+=O*be,Se+=O*Ce,Ee+=O*Oe,Ae+=O*Ie,Te+=O*De,H+=O*je,x+=O*Me,k+=O*He,Y+=O*qe,re+=O*ze,fe+=O*it,O=oe[6],z+=O*Je,Z+=O*tt,Q+=O*ve,de+=O*ne,we+=O*he,Se+=O*be,Ee+=O*Ce,Ae+=O*Oe,Te+=O*Ie,H+=O*De,x+=O*je,k+=O*Me,Y+=O*He,re+=O*qe,fe+=O*ze,le+=O*it,O=oe[7],Z+=O*Je,Q+=O*tt,de+=O*ve,we+=O*ne,Se+=O*he,Ee+=O*be,Ae+=O*Ce,Te+=O*Oe,H+=O*Ie,x+=O*De,k+=O*je,Y+=O*Me,re+=O*He,fe+=O*qe,le+=O*ze,xe+=O*it,O=oe[8],Q+=O*Je,de+=O*tt,we+=O*ve,Se+=O*ne,Ee+=O*he,Ae+=O*be,Te+=O*Ce,H+=O*Oe,x+=O*Ie,k+=O*De,Y+=O*je,re+=O*Me,fe+=O*He,le+=O*qe,xe+=O*ze,_e+=O*it,O=oe[9],de+=O*Je,we+=O*tt,Se+=O*ve,Ee+=O*ne,Ae+=O*he,Te+=O*be,H+=O*Ce,x+=O*Oe,k+=O*Ie,Y+=O*De,re+=O*je,fe+=O*Me,le+=O*He,xe+=O*qe,_e+=O*ze,ke+=O*it,O=oe[10],we+=O*Je,Se+=O*tt,Ee+=O*ve,Ae+=O*ne,Te+=O*he,H+=O*be,x+=O*Ce,k+=O*Oe,Y+=O*Ie,re+=O*De,fe+=O*je,le+=O*Me,xe+=O*He,_e+=O*qe,ke+=O*ze,$e+=O*it,O=oe[11],Se+=O*Je,Ee+=O*tt,Ae+=O*ve,Te+=O*ne,H+=O*he,x+=O*be,k+=O*Ce,Y+=O*Oe,re+=O*Ie,fe+=O*De,le+=O*je,xe+=O*Me,_e+=O*He,ke+=O*qe,$e+=O*ze,Ne+=O*it,O=oe[12],Ee+=O*Je,Ae+=O*tt,Te+=O*ve,H+=O*ne,x+=O*he,k+=O*be,Y+=O*Ce,re+=O*Oe,fe+=O*Ie,le+=O*De,xe+=O*je,_e+=O*Me,ke+=O*He,$e+=O*qe,Ne+=O*ze,We+=O*it,O=oe[13],Ae+=O*Je,Te+=O*tt,H+=O*ve,x+=O*ne,k+=O*he,Y+=O*be,re+=O*Ce,fe+=O*Oe,le+=O*Ie,xe+=O*De,_e+=O*je,ke+=O*Me,$e+=O*He,Ne+=O*qe,We+=O*ze,gt+=O*it,O=oe[14],Te+=O*Je,H+=O*tt,x+=O*ve,k+=O*ne,Y+=O*he,re+=O*be,fe+=O*Ce,le+=O*Oe,xe+=O*Ie,_e+=O*De,ke+=O*je,$e+=O*Me,Ne+=O*He,We+=O*qe,gt+=O*ze,ft+=O*it,O=oe[15],H+=O*Je,x+=O*tt,k+=O*ve,Y+=O*ne,re+=O*he,fe+=O*be,le+=O*Ce,xe+=O*Oe,_e+=O*Ie,ke+=O*De,$e+=O*je,Ne+=O*Me,We+=O*He,gt+=O*qe,ft+=O*ze,Ye+=O*it,ee+=38*x,se+=38*k,pe+=38*Y,ge+=38*re,X+=38*fe,M+=38*le,z+=38*xe,Z+=38*_e,Q+=38*ke,de+=38*$e,we+=38*Ne,Se+=38*We,Ee+=38*gt,Ae+=38*ft,Te+=38*Ye,G=1,O=ee+G+65535,G=Math.floor(O/65536),ee=O-G*65536,O=se+G+65535,G=Math.floor(O/65536),se=O-G*65536,O=pe+G+65535,G=Math.floor(O/65536),pe=O-G*65536,O=ge+G+65535,G=Math.floor(O/65536),ge=O-G*65536,O=X+G+65535,G=Math.floor(O/65536),X=O-G*65536,O=M+G+65535,G=Math.floor(O/65536),M=O-G*65536,O=z+G+65535,G=Math.floor(O/65536),z=O-G*65536,O=Z+G+65535,G=Math.floor(O/65536),Z=O-G*65536,O=Q+G+65535,G=Math.floor(O/65536),Q=O-G*65536,O=de+G+65535,G=Math.floor(O/65536),de=O-G*65536,O=we+G+65535,G=Math.floor(O/65536),we=O-G*65536,O=Se+G+65535,G=Math.floor(O/65536),Se=O-G*65536,O=Ee+G+65535,G=Math.floor(O/65536),Ee=O-G*65536,O=Ae+G+65535,G=Math.floor(O/65536),Ae=O-G*65536,O=Te+G+65535,G=Math.floor(O/65536),Te=O-G*65536,O=H+G+65535,G=Math.floor(O/65536),H=O-G*65536,ee+=G-1+37*(G-1),G=1,O=ee+G+65535,G=Math.floor(O/65536),ee=O-G*65536,O=se+G+65535,G=Math.floor(O/65536),se=O-G*65536,O=pe+G+65535,G=Math.floor(O/65536),pe=O-G*65536,O=ge+G+65535,G=Math.floor(O/65536),ge=O-G*65536,O=X+G+65535,G=Math.floor(O/65536),X=O-G*65536,O=M+G+65535,G=Math.floor(O/65536),M=O-G*65536,O=z+G+65535,G=Math.floor(O/65536),z=O-G*65536,O=Z+G+65535,G=Math.floor(O/65536),Z=O-G*65536,O=Q+G+65535,G=Math.floor(O/65536),Q=O-G*65536,O=de+G+65535,G=Math.floor(O/65536),de=O-G*65536,O=we+G+65535,G=Math.floor(O/65536),we=O-G*65536,O=Se+G+65535,G=Math.floor(O/65536),Se=O-G*65536,O=Ee+G+65535,G=Math.floor(O/65536),Ee=O-G*65536,O=Ae+G+65535,G=Math.floor(O/65536),Ae=O-G*65536,O=Te+G+65535,G=Math.floor(O/65536),Te=O-G*65536,O=H+G+65535,G=Math.floor(O/65536),H=O-G*65536,ee+=G-1+37*(G-1),ce[0]=ee,ce[1]=se,ce[2]=pe,ce[3]=ge,ce[4]=X,ce[5]=M,ce[6]=z,ce[7]=Z,ce[8]=Q,ce[9]=de,ce[10]=we,ce[11]=Se,ce[12]=Ee,ce[13]=Ae,ce[14]=Te,ce[15]=H}function N(ce,oe){g(ce,oe,oe)}function V(ce,oe){const ue=o();let O;for(O=0;O<16;O++)ue[O]=oe[O];for(O=253;O>=0;O--)N(ue,ue),O!==2&&O!==4&&g(ue,ue,oe);for(O=0;O<16;O++)ce[O]=ue[O]}function K(ce,oe){const ue=o();let O;for(O=0;O<16;O++)ue[O]=oe[O];for(O=250;O>=0;O--)N(ue,ue),O!==1&&g(ue,ue,oe);for(O=0;O<16;O++)ce[O]=ue[O]}function W(ce,oe){const ue=o(),O=o(),G=o(),ee=o(),se=o(),pe=o(),ge=o(),X=o(),M=o();$(ue,ce[1],ce[0]),$(M,oe[1],oe[0]),g(ue,ue,M),D(O,ce[0],ce[1]),D(M,oe[0],oe[1]),g(O,O,M),g(G,ce[3],oe[3]),g(G,G,c),g(ee,ce[2],oe[2]),D(ee,ee,ee),$(se,O,ue),$(pe,ee,G),D(ge,ee,G),D(X,O,ue),g(ce[0],se,pe),g(ce[1],X,ge),g(ce[2],ge,pe),g(ce[3],se,X)}function P(ce,oe,ue){for(let O=0;O<4;O++)y(ce[O],oe[O],ue)}function C(ce,oe){const ue=o(),O=o(),G=o();V(G,oe[2]),g(ue,oe[0],G),g(O,oe[1],G),_(ce,O),ce[31]^=E(ue)<<7}function v(ce,oe,ue){p(ce[0],a),p(ce[1],s),p(ce[2],s),p(ce[3],a);for(let O=255;O>=0;--O){const G=ue[O/8|0]>>(O&7)&1;P(ce,oe,G),W(oe,ce),W(ce,ce),P(ce,oe,G)}}function w(ce,oe){const ue=[o(),o(),o(),o()];p(ue[0],u),p(ue[1],f),p(ue[2],s),g(ue[3],u,f),v(ce,ue,oe)}function B(ce){if(ce.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);const oe=(0,r.hash)(ce);oe[0]&=248,oe[31]&=127,oe[31]|=64;const ue=new Uint8Array(32),O=[o(),o(),o(),o()];w(O,oe),C(ue,O);const G=new Uint8Array(64);return G.set(ce),G.set(ue,32),{publicKey:ue,secretKey:G}}e.generateKeyPairFromSeed=B;function R(ce){const oe=(0,t.randomBytes)(32,ce),ue=B(oe);return(0,n.wipe)(oe),ue}e.generateKeyPair=R;function L(ce){if(ce.length!==e.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${e.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(ce.subarray(32))}e.extractPublicKeyFromSecretKey=L;const U=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function S(ce,oe){let ue,O,G,ee;for(O=63;O>=32;--O){for(ue=0,G=O-32,ee=O-12;G>4)*U[G],ue=oe[G]>>8,oe[G]&=255;for(G=0;G<32;G++)oe[G]-=ue*U[G];for(O=0;O<32;O++)oe[O+1]+=oe[O]>>8,ce[O]=oe[O]&255}function F(ce){const oe=new Float64Array(64);for(let ue=0;ue<64;ue++)oe[ue]=ce[ue];for(let ue=0;ue<64;ue++)ce[ue]=0;S(ce,oe)}function T(ce,oe){const ue=new Float64Array(64),O=[o(),o(),o(),o()],G=(0,r.hash)(ce.subarray(0,32));G[0]&=248,G[31]&=127,G[31]|=64;const ee=new Uint8Array(64);ee.set(G.subarray(32),32);const se=new r.SHA512;se.update(ee.subarray(32)),se.update(oe);const pe=se.digest();se.clean(),F(pe),w(O,pe),C(ee,O),se.reset(),se.update(ee.subarray(0,32)),se.update(ce.subarray(32)),se.update(oe);const ge=se.digest();F(ge);for(let X=0;X<32;X++)ue[X]=pe[X];for(let X=0;X<32;X++)for(let M=0;M<32;M++)ue[X+M]+=ge[X]*G[M];return S(ee.subarray(32),ue),ee}e.sign=T;function q(ce,oe){const ue=o(),O=o(),G=o(),ee=o(),se=o(),pe=o(),ge=o();return p(ce[2],s),A(ce[1],oe),N(G,ce[1]),g(ee,G,l),$(G,G,ce[2]),D(ee,ce[2],ee),N(se,ee),N(pe,se),g(ge,pe,se),g(ue,ge,G),g(ue,ue,ee),K(ue,ue),g(ue,ue,G),g(ue,ue,ee),g(ue,ue,ee),g(ce[0],ue,ee),N(O,ce[0]),g(O,O,ee),m(O,G)&&g(ce[0],ce[0],d),N(O,ce[0]),g(O,O,ee),m(O,G)?-1:(E(ce[0])===oe[31]>>7&&$(ce[0],a,ce[0]),g(ce[3],ce[0],ce[1]),0)}function J(ce,oe,ue){const O=new Uint8Array(32),G=[o(),o(),o(),o()],ee=[o(),o(),o(),o()];if(ue.length!==e.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${e.SIGNATURE_LENGTH} bytes`);if(q(ee,ce))return!1;const se=new r.SHA512;se.update(ue.subarray(0,32)),se.update(ce),se.update(oe);const pe=se.digest();return F(pe),v(G,ee,pe),w(ee,ue.subarray(32)),W(G,ee),C(O,G),!b(ue,O)}e.verify=J;function te(ce){let oe=[o(),o(),o(),o()];if(q(oe,ce))throw new Error("Ed25519: invalid public key");let ue=o(),O=o(),G=oe[1];D(ue,s,G),$(O,s,G),V(O,O),g(ue,ue,O);let ee=new Uint8Array(32);return _(ee,ue),ee}e.convertPublicKeyToX25519=te;function ie(ce){const oe=(0,r.hash)(ce.subarray(0,32));oe[0]&=248,oe[31]&=127,oe[31]|=64;const ue=new Uint8Array(oe.subarray(0,32));return(0,n.wipe)(oe),ue}e.convertSecretKeyToX25519=ie})(D4);const uEe="EdDSA",fEe="JWT",_V=".",EV="base64url",dEe="utf8",pEe="utf8",hEe=":",vEe="did",gEe="key",Fk="base58btc",mEe="z",yEe="K36",bEe=32;function M4(e){return globalThis.Buffer!=null?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function SV(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?M4(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function lx(e,t){t||(t=e.reduce((o,i)=>o+i.length,0));const r=SV(t);let n=0;for(const o of e)r.set(o,n),n+=o.length;return M4(r)}function wEe(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,A=new Uint8Array(E);b!==m;){for(var D=h[b],$=0,g=E-1;(D!==0||$<_)&&g!==-1;g--,$++)D+=256*A[g]>>>0,A[g]=D%s>>>0,D=D/s>>>0;if(D!==0)throw new Error("Non-zero carry");_=$,b++}for(var N=E-_;N!==E&&A[N]===0;)N++;for(var V=l.repeat(y);N>>0,E=new Uint8Array(m);h[y];){var A=r[h.charCodeAt(y)];if(A===255)return;for(var D=0,$=m-1;(A!==0||D>>0,E[$]=A%256>>>0,A=A/256>>>0;if(A!==0)throw new Error("Non-zero carry");b=D,y++}if(h[y]!==" "){for(var g=m-b;g!==m&&E[g]===0;)g++;for(var N=new Uint8Array(_+(m-g)),V=_;g!==m;)N[V++]=E[g++];return N}}}function p(h){var y=d(h);if(y)return y;throw new Error(`Non-${t} character`)}return{encode:f,decodeUnsafe:d,decode:p}}var xEe=wEe,_Ee=xEe;const EEe=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},SEe=e=>new TextEncoder().encode(e),CEe=e=>new TextDecoder().decode(e);class PEe{constructor(t,r,n){this.name=t,this.prefix=r,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class OEe{constructor(t,r,n){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return CV(this,t)}}class AEe{constructor(t){this.decoders=t}or(t){return CV(this,t)}decode(t){const r=t[0],n=this.decoders[r];if(n)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const CV=(e,t)=>new AEe({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class kEe{constructor(t,r,n,o){this.name=t,this.prefix=r,this.baseEncode=n,this.baseDecode=o,this.encoder=new PEe(t,r,n),this.decoder=new OEe(t,r,o)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const ab=({name:e,prefix:t,encode:r,decode:n})=>new kEe(e,t,r,n),vh=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:o}=_Ee(r,t);return ab({prefix:e,name:t,encode:n,decode:i=>EEe(o(i))})},IEe=(e,t,r,n)=>{const o={};for(let u=0;u=8&&(s-=8,a[c++]=255&l>>s)}if(s>=r||255&l<<8-s)throw new SyntaxError("Unexpected end of data");return a},$Ee=(e,t,r)=>{const n=t[t.length-1]==="=",o=(1<r;)a-=r,i+=t[o&s>>a];if(a&&(i+=t[o&s<ab({prefix:t,name:e,encode(o){return $Ee(o,n,r)},decode(o){return IEe(o,n,r,e)}}),TEe=ab({prefix:"\0",name:"identity",encode:e=>CEe(e),decode:e=>SEe(e)}),DEe=Object.freeze(Object.defineProperty({__proto__:null,identity:TEe},Symbol.toStringTag,{value:"Module"})),MEe=Ur({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),REe=Object.freeze(Object.defineProperty({__proto__:null,base2:MEe},Symbol.toStringTag,{value:"Module"})),NEe=Ur({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),FEe=Object.freeze(Object.defineProperty({__proto__:null,base8:NEe},Symbol.toStringTag,{value:"Module"})),BEe=vh({prefix:"9",name:"base10",alphabet:"0123456789"}),jEe=Object.freeze(Object.defineProperty({__proto__:null,base10:BEe},Symbol.toStringTag,{value:"Module"})),LEe=Ur({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),zEe=Ur({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),UEe=Object.freeze(Object.defineProperty({__proto__:null,base16:LEe,base16upper:zEe},Symbol.toStringTag,{value:"Module"})),HEe=Ur({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),VEe=Ur({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),WEe=Ur({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),qEe=Ur({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),GEe=Ur({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),KEe=Ur({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),YEe=Ur({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),XEe=Ur({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),ZEe=Ur({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),JEe=Object.freeze(Object.defineProperty({__proto__:null,base32:HEe,base32hex:GEe,base32hexpad:YEe,base32hexpadupper:XEe,base32hexupper:KEe,base32pad:WEe,base32padupper:qEe,base32upper:VEe,base32z:ZEe},Symbol.toStringTag,{value:"Module"})),QEe=vh({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),eSe=vh({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),tSe=Object.freeze(Object.defineProperty({__proto__:null,base36:QEe,base36upper:eSe},Symbol.toStringTag,{value:"Module"})),rSe=vh({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),nSe=vh({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),oSe=Object.freeze(Object.defineProperty({__proto__:null,base58btc:rSe,base58flickr:nSe},Symbol.toStringTag,{value:"Module"})),iSe=Ur({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),aSe=Ur({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),sSe=Ur({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),lSe=Ur({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),cSe=Object.freeze(Object.defineProperty({__proto__:null,base64:iSe,base64pad:aSe,base64url:sSe,base64urlpad:lSe},Symbol.toStringTag,{value:"Module"})),PV=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),uSe=PV.reduce((e,t,r)=>(e[r]=t,e),[]),fSe=PV.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);function dSe(e){return e.reduce((t,r)=>(t+=uSe[r],t),"")}function pSe(e){const t=[];for(const r of e){const n=fSe[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(n)}return new Uint8Array(t)}const hSe=ab({prefix:"🚀",name:"base256emoji",encode:dSe,decode:pSe}),vSe=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:hSe},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const Bk={...DEe,...REe,...FEe,...jEe,...UEe,...JEe,...tSe,...oSe,...cSe,...vSe};function OV(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const jk=OV("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),Tw=OV("ascii","a",e=>{let t="a";for(let r=0;r{e=e.substring(1);const t=SV(e.length);for(let r=0;r>>32-16|w<<16,W=W+w|0,g^=W,g=g>>>32-12|g<<12,A=A+N|0,B^=A,B=B>>>32-16|B<<16,P=P+B|0,N^=P,N=N>>>32-12|N<<12,D=D+V|0,R^=D,R=R>>>32-16|R<<16,C=C+R|0,V^=C,V=V>>>32-12|V<<12,$=$+K|0,L^=$,L=L>>>32-16|L<<16,v=v+L|0,K^=v,K=K>>>32-12|K<<12,D=D+V|0,R^=D,R=R>>>32-8|R<<8,C=C+R|0,V^=C,V=V>>>32-7|V<<7,$=$+K|0,L^=$,L=L>>>32-8|L<<8,v=v+L|0,K^=v,K=K>>>32-7|K<<7,A=A+N|0,B^=A,B=B>>>32-8|B<<8,P=P+B|0,N^=P,N=N>>>32-7|N<<7,E=E+g|0,w^=E,w=w>>>32-8|w<<8,W=W+w|0,g^=W,g=g>>>32-7|g<<7,E=E+N|0,L^=E,L=L>>>32-16|L<<16,C=C+L|0,N^=C,N=N>>>32-12|N<<12,A=A+V|0,w^=A,w=w>>>32-16|w<<16,v=v+w|0,V^=v,V=V>>>32-12|V<<12,D=D+K|0,B^=D,B=B>>>32-16|B<<16,W=W+B|0,K^=W,K=K>>>32-12|K<<12,$=$+g|0,R^=$,R=R>>>32-16|R<<16,P=P+R|0,g^=P,g=g>>>32-12|g<<12,D=D+K|0,B^=D,B=B>>>32-8|B<<8,W=W+B|0,K^=W,K=K>>>32-7|K<<7,$=$+g|0,R^=$,R=R>>>32-8|R<<8,P=P+R|0,g^=P,g=g>>>32-7|g<<7,A=A+V|0,w^=A,w=w>>>32-8|w<<8,v=v+w|0,V^=v,V=V>>>32-7|V<<7,E=E+N|0,L^=E,L=L>>>32-8|L<<8,C=C+L|0,N^=C,N=N>>>32-7|N<<7;Xr.writeUint32LE(E+n|0,e,0),Xr.writeUint32LE(A+o|0,e,4),Xr.writeUint32LE(D+i|0,e,8),Xr.writeUint32LE($+a|0,e,12),Xr.writeUint32LE(g+s|0,e,16),Xr.writeUint32LE(N+l|0,e,20),Xr.writeUint32LE(V+c|0,e,24),Xr.writeUint32LE(K+u|0,e,28),Xr.writeUint32LE(W+f|0,e,32),Xr.writeUint32LE(P+d|0,e,36),Xr.writeUint32LE(C+p|0,e,40),Xr.writeUint32LE(v+h|0,e,44),Xr.writeUint32LE(w+y|0,e,48),Xr.writeUint32LE(B+_|0,e,52),Xr.writeUint32LE(R+b|0,e,56),Xr.writeUint32LE(L+m|0,e,60)}function IV(e,t,r,n,o){if(o===void 0&&(o=0),e.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,t++;if(n>0)throw new Error("ChaCha: counter overflow")}var $V={},Ks={};Object.defineProperty(Ks,"__esModule",{value:!0});function SSe(e,t,r){return~(e-1)&t|e-1&r}Ks.select=SSe;function CSe(e,t){return(e|0)-(t|0)-1>>>31&1}Ks.lessOrEqual=CSe;function TV(e,t){if(e.length!==t.length)return 0;for(var r=0,n=0;n>>8}Ks.compare=TV;function PSe(e,t){return e.length===0||t.length===0?!1:TV(e,t)!==0}Ks.equal=PSe;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Ks,r=eo;e.DIGEST_LENGTH=16;var n=function(){function a(s){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var l=s[0]|s[1]<<8;this._r[0]=l&8191;var c=s[2]|s[3]<<8;this._r[1]=(l>>>13|c<<3)&8191;var u=s[4]|s[5]<<8;this._r[2]=(c>>>10|u<<6)&7939;var f=s[6]|s[7]<<8;this._r[3]=(u>>>7|f<<9)&8191;var d=s[8]|s[9]<<8;this._r[4]=(f>>>4|d<<12)&255,this._r[5]=d>>>1&8190;var p=s[10]|s[11]<<8;this._r[6]=(d>>>14|p<<2)&8191;var h=s[12]|s[13]<<8;this._r[7]=(p>>>11|h<<5)&8065;var y=s[14]|s[15]<<8;this._r[8]=(h>>>8|y<<8)&8191,this._r[9]=y>>>5&127,this._pad[0]=s[16]|s[17]<<8,this._pad[1]=s[18]|s[19]<<8,this._pad[2]=s[20]|s[21]<<8,this._pad[3]=s[22]|s[23]<<8,this._pad[4]=s[24]|s[25]<<8,this._pad[5]=s[26]|s[27]<<8,this._pad[6]=s[28]|s[29]<<8,this._pad[7]=s[30]|s[31]<<8}return a.prototype._blocks=function(s,l,c){for(var u=this._fin?0:2048,f=this._h[0],d=this._h[1],p=this._h[2],h=this._h[3],y=this._h[4],_=this._h[5],b=this._h[6],m=this._h[7],E=this._h[8],A=this._h[9],D=this._r[0],$=this._r[1],g=this._r[2],N=this._r[3],V=this._r[4],K=this._r[5],W=this._r[6],P=this._r[7],C=this._r[8],v=this._r[9];c>=16;){var w=s[l+0]|s[l+1]<<8;f+=w&8191;var B=s[l+2]|s[l+3]<<8;d+=(w>>>13|B<<3)&8191;var R=s[l+4]|s[l+5]<<8;p+=(B>>>10|R<<6)&8191;var L=s[l+6]|s[l+7]<<8;h+=(R>>>7|L<<9)&8191;var U=s[l+8]|s[l+9]<<8;y+=(L>>>4|U<<12)&8191,_+=U>>>1&8191;var S=s[l+10]|s[l+11]<<8;b+=(U>>>14|S<<2)&8191;var F=s[l+12]|s[l+13]<<8;m+=(S>>>11|F<<5)&8191;var T=s[l+14]|s[l+15]<<8;E+=(F>>>8|T<<8)&8191,A+=T>>>5|u;var q=0,J=q;J+=f*D,J+=d*(5*v),J+=p*(5*C),J+=h*(5*P),J+=y*(5*W),q=J>>>13,J&=8191,J+=_*(5*K),J+=b*(5*V),J+=m*(5*N),J+=E*(5*g),J+=A*(5*$),q+=J>>>13,J&=8191;var te=q;te+=f*$,te+=d*D,te+=p*(5*v),te+=h*(5*C),te+=y*(5*P),q=te>>>13,te&=8191,te+=_*(5*W),te+=b*(5*K),te+=m*(5*V),te+=E*(5*N),te+=A*(5*g),q+=te>>>13,te&=8191;var ie=q;ie+=f*g,ie+=d*$,ie+=p*D,ie+=h*(5*v),ie+=y*(5*C),q=ie>>>13,ie&=8191,ie+=_*(5*P),ie+=b*(5*W),ie+=m*(5*K),ie+=E*(5*V),ie+=A*(5*N),q+=ie>>>13,ie&=8191;var ce=q;ce+=f*N,ce+=d*g,ce+=p*$,ce+=h*D,ce+=y*(5*v),q=ce>>>13,ce&=8191,ce+=_*(5*C),ce+=b*(5*P),ce+=m*(5*W),ce+=E*(5*K),ce+=A*(5*V),q+=ce>>>13,ce&=8191;var oe=q;oe+=f*V,oe+=d*N,oe+=p*g,oe+=h*$,oe+=y*D,q=oe>>>13,oe&=8191,oe+=_*(5*v),oe+=b*(5*C),oe+=m*(5*P),oe+=E*(5*W),oe+=A*(5*K),q+=oe>>>13,oe&=8191;var ue=q;ue+=f*K,ue+=d*V,ue+=p*N,ue+=h*g,ue+=y*$,q=ue>>>13,ue&=8191,ue+=_*D,ue+=b*(5*v),ue+=m*(5*C),ue+=E*(5*P),ue+=A*(5*W),q+=ue>>>13,ue&=8191;var O=q;O+=f*W,O+=d*K,O+=p*V,O+=h*N,O+=y*g,q=O>>>13,O&=8191,O+=_*$,O+=b*D,O+=m*(5*v),O+=E*(5*C),O+=A*(5*P),q+=O>>>13,O&=8191;var G=q;G+=f*P,G+=d*W,G+=p*K,G+=h*V,G+=y*N,q=G>>>13,G&=8191,G+=_*g,G+=b*$,G+=m*D,G+=E*(5*v),G+=A*(5*C),q+=G>>>13,G&=8191;var ee=q;ee+=f*C,ee+=d*P,ee+=p*W,ee+=h*K,ee+=y*V,q=ee>>>13,ee&=8191,ee+=_*N,ee+=b*g,ee+=m*$,ee+=E*D,ee+=A*(5*v),q+=ee>>>13,ee&=8191;var se=q;se+=f*v,se+=d*C,se+=p*P,se+=h*W,se+=y*K,q=se>>>13,se&=8191,se+=_*V,se+=b*N,se+=m*g,se+=E*$,se+=A*D,q+=se>>>13,se&=8191,q=(q<<2)+q|0,q=q+J|0,J=q&8191,q=q>>>13,te+=q,f=J,d=te,p=ie,h=ce,y=oe,_=ue,b=O,m=G,E=ee,A=se,l+=16,c-=16}this._h[0]=f,this._h[1]=d,this._h[2]=p,this._h[3]=h,this._h[4]=y,this._h[5]=_,this._h[6]=b,this._h[7]=m,this._h[8]=E,this._h[9]=A},a.prototype.finish=function(s,l){l===void 0&&(l=0);var c=new Uint16Array(10),u,f,d,p;if(this._leftover){for(p=this._leftover,this._buffer[p++]=1;p<16;p++)this._buffer[p]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(u=this._h[1]>>>13,this._h[1]&=8191,p=2;p<10;p++)this._h[p]+=u,u=this._h[p]>>>13,this._h[p]&=8191;for(this._h[0]+=u*5,u=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=u,u=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=u,c[0]=this._h[0]+5,u=c[0]>>>13,c[0]&=8191,p=1;p<10;p++)c[p]=this._h[p]+u,u=c[p]>>>13,c[p]&=8191;for(c[9]-=8192,f=(u^1)-1,p=0;p<10;p++)c[p]&=f;for(f=~f,p=0;p<10;p++)this._h[p]=this._h[p]&f|c[p];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,d=this._h[0]+this._pad[0],this._h[0]=d&65535,p=1;p<8;p++)d=(this._h[p]+this._pad[p]|0)+(d>>>16)|0,this._h[p]=d&65535;return s[l+0]=this._h[0]>>>0,s[l+1]=this._h[0]>>>8,s[l+2]=this._h[1]>>>0,s[l+3]=this._h[1]>>>8,s[l+4]=this._h[2]>>>0,s[l+5]=this._h[2]>>>8,s[l+6]=this._h[3]>>>0,s[l+7]=this._h[3]>>>8,s[l+8]=this._h[4]>>>0,s[l+9]=this._h[4]>>>8,s[l+10]=this._h[5]>>>0,s[l+11]=this._h[5]>>>8,s[l+12]=this._h[6]>>>0,s[l+13]=this._h[6]>>>8,s[l+14]=this._h[7]>>>0,s[l+15]=this._h[7]>>>8,this._finished=!0,this},a.prototype.update=function(s){var l=0,c=s.length,u;if(this._leftover){u=16-this._leftover,u>c&&(u=c);for(var f=0;f=16&&(u=c-c%16,this._blocks(s,l,u),l+=u,c-=u),c){for(var f=0;f16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var p=new Uint8Array(16);p.set(c,p.length-c.length);var h=new Uint8Array(32);t.stream(this._key,p,h,4);var y=u.length+this.tagLength,_;if(d){if(d.length!==y)throw new Error("ChaCha20Poly1305: incorrect destination length");_=d}else _=new Uint8Array(y);return t.streamXOR(this._key,p,u,_,4),this._authenticate(_.subarray(_.length-this.tagLength,_.length),h,_.subarray(0,_.length-this.tagLength),f),n.wipe(p),_},l.prototype.open=function(c,u,f,d){if(c.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(u.length0&&p.update(a.subarray(d.length%16))),p.update(f),f.length%16>0&&p.update(a.subarray(f.length%16));var h=new Uint8Array(8);d&&o.writeUint64LE(d.length,h),p.update(h),o.writeUint64LE(f.length,h),p.update(h);for(var y=p.digest(),_=0;_this.blockSize?this._inner.update(r).finish(n).clean():n.set(r);for(var o=0;o1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(t){for(var r=new Uint8Array(t),n=0;n0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=l[u++],c--;this._bufferLength===this.blockSize&&(i(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(c>=this.blockSize&&(u=i(this._temp,this._state,l,u,c),c%=this.blockSize);c>0;)this._buffer[this._bufferLength++]=l[u++],c--;return this},s.prototype.finish=function(l){if(!this._finished){var c=this._bytesHashed,u=this._bufferLength,f=c/536870912|0,d=c<<3,p=c%64<56?64:128;this._buffer[u]=128;for(var h=u+1;h0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},s.prototype.restoreState=function(l){return this._state.set(l.state),this._bufferLength=l.bufferLength,l.buffer&&this._buffer.set(l.buffer),this._bytesHashed=l.bytesHashed,this._finished=!1,this},s.prototype.cleanSavedState=function(l){r.wipe(l.state),l.buffer&&r.wipe(l.buffer),l.bufferLength=0,l.bytesHashed=0},s}();e.SHA256=n;var o=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function i(s,l,c,u,f){for(;f>=64;){for(var d=l[0],p=l[1],h=l[2],y=l[3],_=l[4],b=l[5],m=l[6],E=l[7],A=0;A<16;A++){var D=u+A*4;s[A]=t.readUint32BE(c,D)}for(var A=16;A<64;A++){var $=s[A-2],g=($>>>17|$<<32-17)^($>>>19|$<<32-19)^$>>>10;$=s[A-15];var N=($>>>7|$<<32-7)^($>>>18|$<<32-18)^$>>>3;s[A]=(g+s[A-7]|0)+(N+s[A-16]|0)}for(var A=0;A<64;A++){var g=(((_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7))+(_&b^~_&m)|0)+(E+(o[A]+s[A]|0)|0)|0,N=((d>>>2|d<<32-2)^(d>>>13|d<<32-13)^(d>>>22|d<<32-22))+(d&p^d&h^p&h)|0;E=m,m=b,b=_,_=y+g|0,y=h,h=p,p=d,d=g+N|0}l[0]+=d,l[1]+=p,l[2]+=h,l[3]+=y,l[4]+=_,l[5]+=b,l[6]+=m,l[7]+=E,u+=64,f-=64}return u}function a(s){var l=new n;l.update(s);var c=l.digest();return l.clean(),c}e.hash=a})(lb);var F4={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;const t=tf,r=eo;e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;function n(A){const D=new Float64Array(16);if(A)for(let $=0;$>16&1),$[K-1]&=65535;$[15]=g[15]-32767-($[14]>>16&1);const V=$[15]>>16&1;$[14]&=65535,s(g,$,1-V)}for(let N=0;N<16;N++)A[2*N]=g[N]&255,A[2*N+1]=g[N]>>8}function c(A,D){for(let $=0;$<16;$++)A[$]=D[2*$]+(D[2*$+1]<<8);A[15]&=32767}function u(A,D,$){for(let g=0;g<16;g++)A[g]=D[g]+$[g]}function f(A,D,$){for(let g=0;g<16;g++)A[g]=D[g]-$[g]}function d(A,D,$){let g,N,V=0,K=0,W=0,P=0,C=0,v=0,w=0,B=0,R=0,L=0,U=0,S=0,F=0,T=0,q=0,J=0,te=0,ie=0,ce=0,oe=0,ue=0,O=0,G=0,ee=0,se=0,pe=0,ge=0,X=0,M=0,z=0,Z=0,Q=$[0],de=$[1],we=$[2],Se=$[3],Ee=$[4],Ae=$[5],Te=$[6],H=$[7],x=$[8],k=$[9],Y=$[10],re=$[11],fe=$[12],le=$[13],xe=$[14],_e=$[15];g=D[0],V+=g*Q,K+=g*de,W+=g*we,P+=g*Se,C+=g*Ee,v+=g*Ae,w+=g*Te,B+=g*H,R+=g*x,L+=g*k,U+=g*Y,S+=g*re,F+=g*fe,T+=g*le,q+=g*xe,J+=g*_e,g=D[1],K+=g*Q,W+=g*de,P+=g*we,C+=g*Se,v+=g*Ee,w+=g*Ae,B+=g*Te,R+=g*H,L+=g*x,U+=g*k,S+=g*Y,F+=g*re,T+=g*fe,q+=g*le,J+=g*xe,te+=g*_e,g=D[2],W+=g*Q,P+=g*de,C+=g*we,v+=g*Se,w+=g*Ee,B+=g*Ae,R+=g*Te,L+=g*H,U+=g*x,S+=g*k,F+=g*Y,T+=g*re,q+=g*fe,J+=g*le,te+=g*xe,ie+=g*_e,g=D[3],P+=g*Q,C+=g*de,v+=g*we,w+=g*Se,B+=g*Ee,R+=g*Ae,L+=g*Te,U+=g*H,S+=g*x,F+=g*k,T+=g*Y,q+=g*re,J+=g*fe,te+=g*le,ie+=g*xe,ce+=g*_e,g=D[4],C+=g*Q,v+=g*de,w+=g*we,B+=g*Se,R+=g*Ee,L+=g*Ae,U+=g*Te,S+=g*H,F+=g*x,T+=g*k,q+=g*Y,J+=g*re,te+=g*fe,ie+=g*le,ce+=g*xe,oe+=g*_e,g=D[5],v+=g*Q,w+=g*de,B+=g*we,R+=g*Se,L+=g*Ee,U+=g*Ae,S+=g*Te,F+=g*H,T+=g*x,q+=g*k,J+=g*Y,te+=g*re,ie+=g*fe,ce+=g*le,oe+=g*xe,ue+=g*_e,g=D[6],w+=g*Q,B+=g*de,R+=g*we,L+=g*Se,U+=g*Ee,S+=g*Ae,F+=g*Te,T+=g*H,q+=g*x,J+=g*k,te+=g*Y,ie+=g*re,ce+=g*fe,oe+=g*le,ue+=g*xe,O+=g*_e,g=D[7],B+=g*Q,R+=g*de,L+=g*we,U+=g*Se,S+=g*Ee,F+=g*Ae,T+=g*Te,q+=g*H,J+=g*x,te+=g*k,ie+=g*Y,ce+=g*re,oe+=g*fe,ue+=g*le,O+=g*xe,G+=g*_e,g=D[8],R+=g*Q,L+=g*de,U+=g*we,S+=g*Se,F+=g*Ee,T+=g*Ae,q+=g*Te,J+=g*H,te+=g*x,ie+=g*k,ce+=g*Y,oe+=g*re,ue+=g*fe,O+=g*le,G+=g*xe,ee+=g*_e,g=D[9],L+=g*Q,U+=g*de,S+=g*we,F+=g*Se,T+=g*Ee,q+=g*Ae,J+=g*Te,te+=g*H,ie+=g*x,ce+=g*k,oe+=g*Y,ue+=g*re,O+=g*fe,G+=g*le,ee+=g*xe,se+=g*_e,g=D[10],U+=g*Q,S+=g*de,F+=g*we,T+=g*Se,q+=g*Ee,J+=g*Ae,te+=g*Te,ie+=g*H,ce+=g*x,oe+=g*k,ue+=g*Y,O+=g*re,G+=g*fe,ee+=g*le,se+=g*xe,pe+=g*_e,g=D[11],S+=g*Q,F+=g*de,T+=g*we,q+=g*Se,J+=g*Ee,te+=g*Ae,ie+=g*Te,ce+=g*H,oe+=g*x,ue+=g*k,O+=g*Y,G+=g*re,ee+=g*fe,se+=g*le,pe+=g*xe,ge+=g*_e,g=D[12],F+=g*Q,T+=g*de,q+=g*we,J+=g*Se,te+=g*Ee,ie+=g*Ae,ce+=g*Te,oe+=g*H,ue+=g*x,O+=g*k,G+=g*Y,ee+=g*re,se+=g*fe,pe+=g*le,ge+=g*xe,X+=g*_e,g=D[13],T+=g*Q,q+=g*de,J+=g*we,te+=g*Se,ie+=g*Ee,ce+=g*Ae,oe+=g*Te,ue+=g*H,O+=g*x,G+=g*k,ee+=g*Y,se+=g*re,pe+=g*fe,ge+=g*le,X+=g*xe,M+=g*_e,g=D[14],q+=g*Q,J+=g*de,te+=g*we,ie+=g*Se,ce+=g*Ee,oe+=g*Ae,ue+=g*Te,O+=g*H,G+=g*x,ee+=g*k,se+=g*Y,pe+=g*re,ge+=g*fe,X+=g*le,M+=g*xe,z+=g*_e,g=D[15],J+=g*Q,te+=g*de,ie+=g*we,ce+=g*Se,oe+=g*Ee,ue+=g*Ae,O+=g*Te,G+=g*H,ee+=g*x,se+=g*k,pe+=g*Y,ge+=g*re,X+=g*fe,M+=g*le,z+=g*xe,Z+=g*_e,V+=38*te,K+=38*ie,W+=38*ce,P+=38*oe,C+=38*ue,v+=38*O,w+=38*G,B+=38*ee,R+=38*se,L+=38*pe,U+=38*ge,S+=38*X,F+=38*M,T+=38*z,q+=38*Z,N=1,g=V+N+65535,N=Math.floor(g/65536),V=g-N*65536,g=K+N+65535,N=Math.floor(g/65536),K=g-N*65536,g=W+N+65535,N=Math.floor(g/65536),W=g-N*65536,g=P+N+65535,N=Math.floor(g/65536),P=g-N*65536,g=C+N+65535,N=Math.floor(g/65536),C=g-N*65536,g=v+N+65535,N=Math.floor(g/65536),v=g-N*65536,g=w+N+65535,N=Math.floor(g/65536),w=g-N*65536,g=B+N+65535,N=Math.floor(g/65536),B=g-N*65536,g=R+N+65535,N=Math.floor(g/65536),R=g-N*65536,g=L+N+65535,N=Math.floor(g/65536),L=g-N*65536,g=U+N+65535,N=Math.floor(g/65536),U=g-N*65536,g=S+N+65535,N=Math.floor(g/65536),S=g-N*65536,g=F+N+65535,N=Math.floor(g/65536),F=g-N*65536,g=T+N+65535,N=Math.floor(g/65536),T=g-N*65536,g=q+N+65535,N=Math.floor(g/65536),q=g-N*65536,g=J+N+65535,N=Math.floor(g/65536),J=g-N*65536,V+=N-1+37*(N-1),N=1,g=V+N+65535,N=Math.floor(g/65536),V=g-N*65536,g=K+N+65535,N=Math.floor(g/65536),K=g-N*65536,g=W+N+65535,N=Math.floor(g/65536),W=g-N*65536,g=P+N+65535,N=Math.floor(g/65536),P=g-N*65536,g=C+N+65535,N=Math.floor(g/65536),C=g-N*65536,g=v+N+65535,N=Math.floor(g/65536),v=g-N*65536,g=w+N+65535,N=Math.floor(g/65536),w=g-N*65536,g=B+N+65535,N=Math.floor(g/65536),B=g-N*65536,g=R+N+65535,N=Math.floor(g/65536),R=g-N*65536,g=L+N+65535,N=Math.floor(g/65536),L=g-N*65536,g=U+N+65535,N=Math.floor(g/65536),U=g-N*65536,g=S+N+65535,N=Math.floor(g/65536),S=g-N*65536,g=F+N+65535,N=Math.floor(g/65536),F=g-N*65536,g=T+N+65535,N=Math.floor(g/65536),T=g-N*65536,g=q+N+65535,N=Math.floor(g/65536),q=g-N*65536,g=J+N+65535,N=Math.floor(g/65536),J=g-N*65536,V+=N-1+37*(N-1),A[0]=V,A[1]=K,A[2]=W,A[3]=P,A[4]=C,A[5]=v,A[6]=w,A[7]=B,A[8]=R,A[9]=L,A[10]=U,A[11]=S,A[12]=F,A[13]=T,A[14]=q,A[15]=J}function p(A,D){d(A,D,D)}function h(A,D){const $=n();for(let g=0;g<16;g++)$[g]=D[g];for(let g=253;g>=0;g--)p($,$),g!==2&&g!==4&&d($,$,D);for(let g=0;g<16;g++)A[g]=$[g]}function y(A,D){const $=new Uint8Array(32),g=new Float64Array(80),N=n(),V=n(),K=n(),W=n(),P=n(),C=n();for(let R=0;R<31;R++)$[R]=A[R];$[31]=A[31]&127|64,$[0]&=248,c(g,D);for(let R=0;R<16;R++)V[R]=g[R];N[0]=W[0]=1;for(let R=254;R>=0;--R){const L=$[R>>>3]>>>(R&7)&1;s(N,V,L),s(K,W,L),u(P,N,K),f(N,N,K),u(K,V,W),f(V,V,W),p(W,P),p(C,N),d(N,K,N),d(K,V,P),u(P,N,K),f(N,N,K),p(V,N),f(K,W,C),d(N,K,i),u(N,N,W),d(K,K,N),d(N,W,C),d(W,V,g),p(V,P),s(N,V,L),s(K,W,L)}for(let R=0;R<16;R++)g[R+16]=N[R],g[R+32]=K[R],g[R+48]=V[R],g[R+64]=W[R];const v=g.subarray(32),w=g.subarray(16);h(v,v),d(w,w,v);const B=new Uint8Array(32);return l(B,w),B}e.scalarMult=y;function _(A){return y(A,o)}e.scalarMultBase=_;function b(A){if(A.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const D=new Uint8Array(A);return{publicKey:_(D),secretKey:D}}e.generateKeyPairFromSeed=b;function m(A){const D=(0,t.randomBytes)(32,A),$=b(D);return(0,r.wipe)(D),$}e.generateKeyPair=m;function E(A,D,$=!1){if(A.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(D.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const g=y(A,D);if($){let N=0;for(let V=0;V-1){const _=h.getAttribute("href");if(_)if(_.toLowerCase().indexOf("https:")===-1&&_.toLowerCase().indexOf("http:")===-1&&_.indexOf("//")!==0){let b=t.protocol+"//"+t.host;if(_.indexOf("/")===0)b+=_;else{const m=t.pathname.split("/");m.pop();const E=m.join("/");b+=E+"/"+_}d.push(b)}else if(_.indexOf("//")===0){const b=t.protocol+_;d.push(b)}else d.push(_)}}return d}function n(...f){const d=e.getElementsByTagName("meta");for(let p=0;ph.getAttribute(_)).filter(_=>_?f.includes(_):!1);if(y.length&&y){const _=h.getAttribute("content");if(_)return _}}return""}function o(){let f=n("name","og:site_name","og:title","twitter:title");return f||(f=e.title),f}function i(){return n("description","og:description","twitter:description","keywords")}const a=o(),s=i(),l=t.origin,c=r();return{description:s,url:l,icons:c,name:a}}NV=L4.getWindowMetadata=HSe;var Pp={},VSe=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),FV="%[a-f0-9]{2}",Vk=new RegExp("("+FV+")|([^%]+?)","gi"),Wk=new RegExp("("+FV+")+","gi");function ux(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],ux(r),ux(n))}function WSe(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Vk)||[],r=1;r{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},YSe=function(e,t){for(var r={},n=Object.keys(e),o=Array.isArray(t),i=0;im==null,a=Symbol("encodeFragmentIdentifier");function s(m){switch(m.arrayFormat){case"index":return E=>(A,D)=>{const $=A.length;return D===void 0||m.skipNull&&D===null||m.skipEmptyString&&D===""?A:D===null?[...A,[u(E,m),"[",$,"]"].join("")]:[...A,[u(E,m),"[",u($,m),"]=",u(D,m)].join("")]};case"bracket":return E=>(A,D)=>D===void 0||m.skipNull&&D===null||m.skipEmptyString&&D===""?A:D===null?[...A,[u(E,m),"[]"].join("")]:[...A,[u(E,m),"[]=",u(D,m)].join("")];case"colon-list-separator":return E=>(A,D)=>D===void 0||m.skipNull&&D===null||m.skipEmptyString&&D===""?A:D===null?[...A,[u(E,m),":list="].join("")]:[...A,[u(E,m),":list=",u(D,m)].join("")];case"comma":case"separator":case"bracket-separator":{const E=m.arrayFormat==="bracket-separator"?"[]=":"=";return A=>(D,$)=>$===void 0||m.skipNull&&$===null||m.skipEmptyString&&$===""?D:($=$===null?"":$,D.length===0?[[u(A,m),E,u($,m)].join("")]:[[D,u($,m)].join(m.arrayFormatSeparator)])}default:return E=>(A,D)=>D===void 0||m.skipNull&&D===null||m.skipEmptyString&&D===""?A:D===null?[...A,u(E,m)]:[...A,[u(E,m),"=",u(D,m)].join("")]}}function l(m){let E;switch(m.arrayFormat){case"index":return(A,D,$)=>{if(E=/\[(\d*)\]$/.exec(A),A=A.replace(/\[\d*\]$/,""),!E){$[A]=D;return}$[A]===void 0&&($[A]={}),$[A][E[1]]=D};case"bracket":return(A,D,$)=>{if(E=/(\[\])$/.exec(A),A=A.replace(/\[\]$/,""),!E){$[A]=D;return}if($[A]===void 0){$[A]=[D];return}$[A]=[].concat($[A],D)};case"colon-list-separator":return(A,D,$)=>{if(E=/(:list)$/.exec(A),A=A.replace(/:list$/,""),!E){$[A]=D;return}if($[A]===void 0){$[A]=[D];return}$[A]=[].concat($[A],D)};case"comma":case"separator":return(A,D,$)=>{const g=typeof D=="string"&&D.includes(m.arrayFormatSeparator),N=typeof D=="string"&&!g&&f(D,m).includes(m.arrayFormatSeparator);D=N?f(D,m):D;const V=g||N?D.split(m.arrayFormatSeparator).map(K=>f(K,m)):D===null?D:f(D,m);$[A]=V};case"bracket-separator":return(A,D,$)=>{const g=/(\[\])$/.test(A);if(A=A.replace(/\[\]$/,""),!g){$[A]=D&&f(D,m);return}const N=D===null?[]:D.split(m.arrayFormatSeparator).map(V=>f(V,m));if($[A]===void 0){$[A]=N;return}$[A]=[].concat($[A],N)};default:return(A,D,$)=>{if($[A]===void 0){$[A]=D;return}$[A]=[].concat($[A],D)}}}function c(m){if(typeof m!="string"||m.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function u(m,E){return E.encode?E.strict?t(m):encodeURIComponent(m):m}function f(m,E){return E.decode?r(m):m}function d(m){return Array.isArray(m)?m.sort():typeof m=="object"?d(Object.keys(m)).sort((E,A)=>Number(E)-Number(A)).map(E=>m[E]):m}function p(m){const E=m.indexOf("#");return E!==-1&&(m=m.slice(0,E)),m}function h(m){let E="";const A=m.indexOf("#");return A!==-1&&(E=m.slice(A)),E}function y(m){m=p(m);const E=m.indexOf("?");return E===-1?"":m.slice(E+1)}function _(m,E){return E.parseNumbers&&!Number.isNaN(Number(m))&&typeof m=="string"&&m.trim()!==""?m=Number(m):E.parseBooleans&&m!==null&&(m.toLowerCase()==="true"||m.toLowerCase()==="false")&&(m=m.toLowerCase()==="true"),m}function b(m,E){E=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},E),c(E.arrayFormatSeparator);const A=l(E),D=Object.create(null);if(typeof m!="string"||(m=m.trim().replace(/^[?#&]/,""),!m))return D;for(const $ of m.split("&")){if($==="")continue;let[g,N]=n(E.decode?$.replace(/\+/g," "):$,"=");N=N===void 0?null:["comma","separator","bracket-separator"].includes(E.arrayFormat)?N:f(N,E),A(f(g,E),N,D)}for(const $ of Object.keys(D)){const g=D[$];if(typeof g=="object"&&g!==null)for(const N of Object.keys(g))g[N]=_(g[N],E);else D[$]=_(g,E)}return E.sort===!1?D:(E.sort===!0?Object.keys(D).sort():Object.keys(D).sort(E.sort)).reduce(($,g)=>{const N=D[g];return N&&typeof N=="object"&&!Array.isArray(N)?$[g]=d(N):$[g]=N,$},Object.create(null))}e.extract=y,e.parse=b,e.stringify=(m,E)=>{if(!m)return"";E=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},E),c(E.arrayFormatSeparator);const A=N=>E.skipNull&&i(m[N])||E.skipEmptyString&&m[N]==="",D=s(E),$={};for(const N of Object.keys(m))A(N)||($[N]=m[N]);const g=Object.keys($);return E.sort!==!1&&g.sort(E.sort),g.map(N=>{const V=m[N];return V===void 0?"":V===null?u(N,E):Array.isArray(V)?V.length===0&&E.arrayFormat==="bracket-separator"?u(N,E)+"[]":V.reduce(D(N),[]).join("&"):u(N,E)+"="+u(V,E)}).filter(N=>N.length>0).join("&")},e.parseUrl=(m,E)=>{E=Object.assign({decode:!0},E);const[A,D]=n(m,"#");return Object.assign({url:A.split("?")[0]||"",query:b(y(m),E)},E&&E.parseFragmentIdentifier&&D?{fragmentIdentifier:f(D,E)}:{})},e.stringifyUrl=(m,E)=>{E=Object.assign({encode:!0,strict:!0,[a]:!0},E);const A=p(m.url).split("?")[0]||"",D=e.extract(m.url),$=e.parse(D,{sort:!1}),g=Object.assign($,m.query);let N=e.stringify(g,E);N&&(N=`?${N}`);let V=h(m.url);return m.fragmentIdentifier&&(V=`#${E[a]?u(m.fragmentIdentifier,E):m.fragmentIdentifier}`),`${A}${N}${V}`},e.pick=(m,E,A)=>{A=Object.assign({parseFragmentIdentifier:!0,[a]:!1},A);const{url:D,query:$,fragmentIdentifier:g}=e.parseUrl(m,A);return e.stringifyUrl({url:D,query:o($,E),fragmentIdentifier:g},A)},e.exclude=(m,E,A)=>{const D=Array.isArray(E)?$=>!E.includes($):($,g)=>!E($,g);return e.pick(m,D,A)}})(Pp);const XSe={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}},cb=":";function BV(e){const[t,r]=e.split(cb);return{namespace:t,reference:r}}function jV(e){const{namespace:t,reference:r}=e;return[t,r].join(cb)}function z4(e){const[t,r,n]=e.split(cb);return{namespace:t,reference:r,address:n}}function LV(e){const{namespace:t,reference:r,address:n}=e;return[t,r,n].join(cb)}function U4(e,t){const r=[];return e.forEach(n=>{const o=t(n);r.includes(o)||r.push(o)}),r}function zV(e){const{address:t}=z4(e);return t}function UV(e){const{namespace:t,reference:r}=z4(e);return jV({namespace:t,reference:r})}function ZSe(e,t){const{namespace:r,reference:n}=BV(t);return LV({namespace:r,reference:n,address:e})}function JSe(e){return U4(e,zV)}function HV(e){return U4(e,UV)}function QSe(e,t=[]){const r=[];return Object.keys(e).forEach(n=>{if(t.length&&!t.includes(n))return;const o=e[n];r.push(...o.accounts)}),r}function e9e(e,t=[]){const r=[];return Object.keys(e).forEach(n=>{if(t.length&&!t.includes(n))return;const o=e[n];r.push(...HV(o.accounts))}),r}function t9e(e,t=[]){const r=[];return Object.keys(e).forEach(n=>{if(t.length&&!t.includes(n))return;const o=e[n];r.push(...ub(n,o))}),r}function ub(e,t){return e.includes(":")?[e]:t.chains||[]}const fb=e=>e==null?void 0:e.split(":"),VV=e=>{const t=e&&fb(e);if(t)return t[3]},r9e=e=>{const t=e&&fb(e);if(t)return t[2]+":"+t[3]},WV=e=>{const t=e&&fb(e);if(t)return t.pop()},n9e=(e,t)=>{const r=`${e.domain} wants you to sign in with your Ethereum account:`,n=WV(t),o=e.statement,i=`URI: ${e.aud}`,a=`Version: ${e.version}`,s=`Chain ID: ${VV(t)}`,l=`Nonce: ${e.nonce}`,c=`Issued At: ${e.iat}`,u=e.resources&&e.resources.length>0?`Resources: -${e.resources.map(f=>`- ${f}`).join(` -`)}`:void 0;return[r,n,"",o,"",i,a,s,l,c,u].filter(f=>f!=null).join(` -`)},H4="base10",yn="base16",gm="base64pad",db="utf8",V4=0,Ys=1,o9e=0,qk=1,fx=12,W4=32;function qV(){const e=F4.generateKeyPair();return{privateKey:Dn(e.secretKey,yn),publicKey:Dn(e.publicKey,yn)}}function mm(){const e=tf.randomBytes(W4);return Dn(e,yn)}function GV(e,t){const r=F4.sharedKey(Cn(e,yn),Cn(t,yn)),n=new TSe(lb.SHA256,r).expand(W4);return Dn(n,yn)}function KV(e){const t=lb.hash(Cn(e,yn));return Dn(t,yn)}function Op(e){const t=lb.hash(Cn(e,db));return Dn(t,yn)}function YV(e){return Cn(`${e}`,H4)}function nf(e){return Number(Dn(e,H4))}function XV(e){const t=YV(typeof e.type<"u"?e.type:V4);if(nf(t)===Ys&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof e.senderPublicKey<"u"?Cn(e.senderPublicKey,yn):void 0,n=typeof e.iv<"u"?Cn(e.iv,yn):tf.randomBytes(fx),o=new R4.ChaCha20Poly1305(Cn(e.symKey,yn)).seal(n,Cn(e.message,db));return JV({type:t,sealed:o,iv:n,senderPublicKey:r})}function ZV(e){const t=new R4.ChaCha20Poly1305(Cn(e.symKey,yn)),{sealed:r,iv:n}=pb(e.encoded),o=t.open(n,r);if(o===null)throw new Error("Failed to decrypt");return Dn(o,db)}function JV(e){if(nf(e.type)===Ys){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Dn(lx([e.type,e.senderPublicKey,e.iv,e.sealed]),gm)}return Dn(lx([e.type,e.iv,e.sealed]),gm)}function pb(e){const t=Cn(e,gm),r=t.slice(o9e,qk),n=qk;if(nf(r)===Ys){const s=n+W4,l=s+fx,c=t.slice(n,s),u=t.slice(s,l),f=t.slice(l);return{type:r,sealed:f,iv:u,senderPublicKey:c}}const o=n+fx,i=t.slice(n,o),a=t.slice(o);return{type:r,sealed:a,iv:i}}function QV(e,t){const r=pb(e);return q4({type:nf(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?Dn(r.senderPublicKey,yn):void 0,receiverPublicKey:t==null?void 0:t.receiverPublicKey})}function q4(e){const t=(e==null?void 0:e.type)||V4;if(t===Ys){if(typeof(e==null?void 0:e.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(e==null?void 0:e.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e==null?void 0:e.senderPublicKey,receiverPublicKey:e==null?void 0:e.receiverPublicKey}}function dx(e){return e.type===Ys&&typeof e.senderPublicKey=="string"&&typeof e.receiverPublicKey=="string"}var i9e=Object.defineProperty,Gk=Object.getOwnPropertySymbols,a9e=Object.prototype.hasOwnProperty,s9e=Object.prototype.propertyIsEnumerable,Kk=(e,t,r)=>t in e?i9e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yk=(e,t)=>{for(var r in t||(t={}))a9e.call(t,r)&&Kk(e,r,t[r]);if(Gk)for(var r of Gk(t))s9e.call(t,r)&&Kk(e,r,t[r]);return e};const eW="ReactNative",Lc={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},ym=" ",l9e=":",tW="/",G4=2,c9e=1e3,rW="js";function K4(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function nW(){return!RV()&&!!B4()&&navigator.product===eW}function oW(){return!K4()&&!!B4()}function Y4(){return nW()?Lc.reactNative:K4()?Lc.node:oW()?Lc.browser:Lc.unknown}function iW(e,t){let r=Pp.parse(e);return r=Yk(Yk({},r),t),e=Pp.stringify(r),e}function aW(){return NV()||{name:"",description:"",url:"",icons:[""]}}function u9e(e,t){var r;const n=Y4(),o={protocol:e,version:t,env:n};return n==="browser"&&(o.host=((r=j4())==null?void 0:r.host)||"unknown"),o}function sW(){const e=f4();if(e===null)return"unknown";const t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return e.type==="browser"?[t,e.name,e.version].join("-"):[t,e.version].join("-")}function lW(){var e;const t=Y4();return t===Lc.browser?[t,((e=j4())==null?void 0:e.host)||"unknown"].join(":"):t}function cW(e,t,r){const n=sW(),o=lW();return[[e,t].join("-"),[rW,r].join("-"),n,o].join("/")}function uW({protocol:e,version:t,relayUrl:r,sdkVersion:n,auth:o,projectId:i,useOnCloseEvent:a}){const s=r.split("?"),l=cW(e,t,n),c={auth:o,ua:l,projectId:i,useOnCloseEvent:a||void 0},u=iW(s[1]||"",c);return s[0]+"?"+u}function f9e(e){let t=(e.match(/^[^:]+(?=:\/\/)/gi)||[])[0];const r=typeof t<"u"?e.split("://")[1]:e;return t=t==="wss"?"https":"http",[t,r].join("://")}function d9e(e,t,r){if(!e[t]||typeof e[t]!==r)throw new Error(`Missing or invalid "${t}" param`)}function fW(e,t=G4){return dW(e.split(tW),t)}function p9e(e){return fW(e).join(ym)}function us(e,t){return e.filter(r=>t.includes(r)).length===e.length}function dW(e,t=G4){return e.slice(Math.max(e.length-t,0))}function X4(e){return Object.fromEntries(e.entries())}function Z4(e){return new Map(Object.entries(e))}function h9e(e,t){const r={};return Object.keys(e).forEach(n=>{r[n]=t(e[n])}),r}const v9e=e=>e;function pW(e){return e.trim().replace(/^\w/,t=>t.toUpperCase())}function g9e(e){return e.split(ym).map(t=>pW(t)).join(ym)}function Ja(e=pt.FIVE_MINUTES,t){const r=pt.toMiliseconds(e||pt.FIVE_MINUTES);let n,o,i;return{resolve:a=>{i&&n&&(clearTimeout(i),n(a))},reject:a=>{i&&o&&(clearTimeout(i),o(a))},done:()=>new Promise((a,s)=>{i=setTimeout(()=>{s(new Error(t))},r),n=a,o=s})}}function Ap(e,t,r){return new Promise(async(n,o)=>{const i=setTimeout(()=>o(new Error(r)),t);try{const a=await e;n(a)}catch(a){o(a)}clearTimeout(i)})}function J4(e,t){if(typeof t=="string"&&t.startsWith(`${e}:`))return t;if(e.toLowerCase()==="topic"){if(typeof t!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}else if(e.toLowerCase()==="id"){if(typeof t!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function hW(e){return J4("topic",e)}function vW(e){return J4("id",e)}function Q4(e){const[t,r]=e.split(":"),n={id:void 0,topic:void 0};if(t==="topic"&&typeof r=="string")n.topic=r;else if(t==="id"&&Number.isInteger(Number(r)))n.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${r}`);return n}function Bo(e,t){return pt.fromMiliseconds((t||Date.now())+pt.toMiliseconds(e))}function ia(e){return Date.now()>=pt.toMiliseconds(e)}function tr(e,t){return`${e}${t?`:${t}`:""}`}const gW="irn";function bm(e){return(e==null?void 0:e.relay)||{protocol:gW}}function $d(e){const t=XSe[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var m9e=Object.defineProperty,Xk=Object.getOwnPropertySymbols,y9e=Object.prototype.hasOwnProperty,b9e=Object.prototype.propertyIsEnumerable,Zk=(e,t,r)=>t in e?m9e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w9e=(e,t)=>{for(var r in t||(t={}))y9e.call(t,r)&&Zk(e,r,t[r]);if(Xk)for(var r of Xk(t))b9e.call(t,r)&&Zk(e,r,t[r]);return e};function mW(e,t="-"){const r={},n="relay"+t;return Object.keys(e).forEach(o=>{if(o.startsWith(n)){const i=o.replace(n,""),a=e[o];r[i]=a}}),r}function yW(e){const t=e.indexOf(":"),r=e.indexOf("?")!==-1?e.indexOf("?"):void 0,n=e.substring(0,t),o=e.substring(t+1,r).split("@"),i=typeof r<"u"?e.substring(r):"",a=Pp.parse(i);return{protocol:n,topic:o[0],version:parseInt(o[1],10),symKey:a.symKey,relay:mW(a)}}function bW(e,t="-"){const r="relay",n={};return Object.keys(e).forEach(o=>{const i=r+t+o;e[o]&&(n[i]=e[o])}),n}function wW(e){return`${e.protocol}:${e.topic}@${e.version}?`+Pp.stringify(w9e({symKey:e.symKey},bW(e.relay)))}function tc(e){const t=[];return e.forEach(r=>{const[n,o]=r.split(":");t.push(`${n}:${o}`)}),t}function xW(e){const t=[];return Object.values(e).forEach(r=>{t.push(...tc(r.accounts))}),t}function _W(e,t){const r=[];return Object.values(e).forEach(n=>{tc(n.accounts).includes(t)&&r.push(...n.methods)}),r}function EW(e,t){const r=[];return Object.values(e).forEach(n=>{tc(n.accounts).includes(t)&&r.push(...n.events)}),r}function SW(e,t){const r=Td(e,t);if(r)throw new Error(r.message);const n={};for(const[o,i]of Object.entries(e))n[o]={methods:i.methods,events:i.events,chains:i.accounts.map(a=>`${a.split(":")[0]}:${a.split(":")[1]}`)};return n}const x9e={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},_9e={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Xe(e,t){const{message:r,code:n}=_9e[e];return{message:t?`${r} ${t}`:r,code:n}}function vr(e,t){const{message:r,code:n}=x9e[e];return{message:t?`${r} ${t}`:r,code:n}}function of(e,t){return Array.isArray(e)?typeof t<"u"&&e.length?e.every(t):!0:!1}function tu(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function rn(e){return typeof e>"u"}function gr(e,t){return t&&rn(e)?!0:typeof e=="string"&&!!e.trim().length}function hb(e,t){return t&&rn(e)?!0:typeof e=="number"&&!isNaN(e)}function CW(e,t){const{requiredNamespaces:r}=t,n=Object.keys(e.namespaces),o=Object.keys(r);let i=!0;return us(o,n)?(n.forEach(a=>{const{accounts:s,methods:l,events:c}=e.namespaces[a],u=tc(s),f=r[a];(!us(ub(a,f),u)||!us(f.methods,l)||!us(f.events,c))&&(i=!1)}),i):!1}function vb(e){return gr(e,!1)&&e.includes(":")?e.split(":").length===2:!1}function PW(e){if(gr(e,!1)&&e.includes(":")){const t=e.split(":");if(t.length===3){const r=t[0]+":"+t[1];return!!t[2]&&vb(r)}}return!1}function OW(e){if(gr(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}function AW(e){var t;return(t=e==null?void 0:e.proposer)==null?void 0:t.publicKey}function kW(e){return e==null?void 0:e.topic}function IW(e,t){let r=null;return gr(e==null?void 0:e.publicKey,!1)||(r=Xe("MISSING_OR_INVALID",`${t} controller public key should be a string`)),r}function px(e){let t=!0;return of(e)?e.length&&(t=e.every(r=>gr(r,!1))):t=!1,t}function $W(e,t,r){let n=null;return of(t)?t.forEach(o=>{n||(!vb(o)||!o.includes(e))&&(n=vr("UNSUPPORTED_CHAINS",`${r}, chain ${o} should be a string and conform to "namespace:chainId" format`))}):n=vr("UNSUPPORTED_CHAINS",`${r}, chains ${t} should be an array of strings conforming to "namespace:chainId" format`),n}function TW(e,t){let r=null;return Object.entries(e).forEach(([n,o])=>{if(r)return;const i=$W(n,ub(n,o),`${t} requiredNamespace`);i&&(r=i)}),r}function DW(e,t){let r=null;return of(e)?e.forEach(n=>{r||PW(n)||(r=vr("UNSUPPORTED_ACCOUNTS",`${t}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=vr("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function MW(e,t){let r=null;return Object.values(e).forEach(n=>{if(r)return;const o=DW(n==null?void 0:n.accounts,`${t} namespace`);o&&(r=o)}),r}function RW(e,t){let r=null;return px(e==null?void 0:e.methods)?px(e==null?void 0:e.events)||(r=vr("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):r=vr("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),r}function e8(e,t){let r=null;return Object.values(e).forEach(n=>{if(r)return;const o=RW(n,`${t}, namespace`);o&&(r=o)}),r}function NW(e,t,r){let n=null;if(e&&tu(e)){const o=e8(e,t);o&&(n=o);const i=TW(e,t);i&&(n=i)}else n=Xe("MISSING_OR_INVALID",`${t}, ${r} should be an object with data`);return n}function Td(e,t){let r=null;if(e&&tu(e)){const n=e8(e,t);n&&(r=n);const o=MW(e,t);o&&(r=o)}else r=Xe("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return r}function t8(e){return gr(e.protocol,!0)}function FW(e,t){let r=!1;return t&&!e?r=!0:e&&of(e)&&e.length&&e.forEach(n=>{r=t8(n)}),r}function BW(e){return typeof e=="number"}function un(e){return typeof e<"u"&&typeof e!==null}function jW(e){return!(!e||typeof e!="object"||!e.code||!hb(e.code,!1)||!e.message||!gr(e.message,!1))}function LW(e){return!(rn(e)||!gr(e.method,!1))}function zW(e){return!(rn(e)||rn(e.result)&&rn(e.error)||!hb(e.id,!1)||!gr(e.jsonrpc,!1))}function UW(e){return!(rn(e)||!gr(e.name,!1))}function hx(e,t){return!(!vb(t)||!xW(e).includes(t))}function HW(e,t,r){return gr(r,!1)?_W(e,t).includes(r):!1}function VW(e,t,r){return gr(r,!1)?EW(e,t).includes(r):!1}function vx(e,t,r){let n=null;const o=E9e(e),i=S9e(t),a=Object.keys(o),s=Object.keys(i),l=Jk(Object.keys(e)),c=Jk(Object.keys(t)),u=l.filter(f=>!c.includes(f));return u.length&&(n=Xe("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces. - Required: ${u.toString()} - Received: ${Object.keys(t).toString()}`)),us(a,s)||(n=Xe("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces. - Required: ${a.toString()} - Approved: ${s.toString()}`)),Object.keys(t).forEach(f=>{if(!f.includes(":")||n)return;const d=tc(t[f].accounts);d.includes(f)||(n=Xe("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${f} - Required: ${f} - Approved: ${d.toString()}`))}),a.forEach(f=>{n||(us(o[f].methods,i[f].methods)?us(o[f].events,i[f].events)||(n=Xe("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${f}`)):n=Xe("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${f}`))}),n}function E9e(e){const t={};return Object.keys(e).forEach(r=>{var n;r.includes(":")?t[r]=e[r]:(n=e[r].chains)==null||n.forEach(o=>{t[o]={methods:e[r].methods,events:e[r].events}})}),t}function Jk(e){return[...new Set(e.map(t=>t.includes(":")?t.split(":")[0]:t))]}function S9e(e){const t={};return Object.keys(e).forEach(r=>{if(r.includes(":"))t[r]=e[r];else{const n=tc(e[r].accounts);n==null||n.forEach(o=>{t[o]={accounts:e[r].accounts.filter(i=>i.includes(`${o}:`)),methods:e[r].methods,events:e[r].events}})}}),t}function WW(e,t){return hb(e,!1)&&e<=t.max&&e>=t.min}const C9e=Object.freeze(Object.defineProperty({__proto__:null,BASE10:H4,BASE16:yn,BASE64:gm,COLON:l9e,DEFAULT_DEPTH:G4,EMPTY_SPACE:ym,ENV_MAP:Lc,ONE_THOUSAND:c9e,REACT_NATIVE_PRODUCT:eW,RELAYER_DEFAULT_PROTOCOL:gW,SDK_TYPE:rW,SLASH:tW,TYPE_0:V4,TYPE_1:Ys,UTF8:db,appendToQueryString:iW,assertType:d9e,calcExpiry:Bo,capitalize:g9e,capitalizeWord:pW,createDelayedPromise:Ja,createExpiringPromise:Ap,decodeTypeByte:nf,decrypt:ZV,deriveSymKey:GV,deserialize:pb,encodeTypeByte:YV,encrypt:XV,engineEvent:tr,enumify:v9e,formatAccountId:LV,formatAccountWithChain:ZSe,formatChainId:jV,formatExpirerTarget:J4,formatIdTarget:vW,formatMessage:n9e,formatMessageContext:p9e,formatRelayParams:bW,formatRelayRpcUrl:uW,formatTopicTarget:hW,formatUA:cW,formatUri:wW,generateKeyPair:qV,generateRandomBytes32:mm,getAccountsChains:tc,getAccountsFromNamespaces:QSe,getAddressFromAccount:zV,getAddressesFromAccounts:JSe,getAppMetadata:aW,getChainFromAccount:UV,getChainsFromAccounts:HV,getChainsFromNamespace:ub,getChainsFromNamespaces:e9e,getChainsFromRequiredNamespaces:t9e,getDidAddress:WV,getDidAddressSegments:fb,getDidChainId:VV,getEnvironment:Y4,getHttpUrl:f9e,getInternalError:Xe,getJavascriptID:lW,getJavascriptOS:sW,getLastItems:dW,getNamespacedDidChainId:r9e,getNamespacesChains:xW,getNamespacesEventsForChainId:EW,getNamespacesMethodsForChainId:_W,getRelayClientMetadata:u9e,getRelayProtocolApi:$d,getRelayProtocolName:bm,getRequiredNamespacesFromNamespaces:SW,getSdkError:vr,getUniqueValues:U4,hasOverlap:us,hashKey:KV,hashMessage:Op,isBrowser:oW,isConformingNamespaces:vx,isExpired:ia,isNode:K4,isProposalStruct:AW,isReactNative:nW,isSessionCompatible:CW,isSessionStruct:kW,isTypeOneEnvelope:dx,isUndefined:rn,isValidAccountId:PW,isValidAccounts:DW,isValidActions:RW,isValidArray:of,isValidChainId:vb,isValidChains:$W,isValidController:IW,isValidErrorReason:jW,isValidEvent:UW,isValidId:BW,isValidNamespaceAccounts:MW,isValidNamespaceActions:e8,isValidNamespaceChains:TW,isValidNamespaceMethodsOrEvents:px,isValidNamespaces:Td,isValidNamespacesChainId:hx,isValidNamespacesEvent:VW,isValidNamespacesRequest:HW,isValidNumber:hb,isValidObject:tu,isValidParams:un,isValidRelay:t8,isValidRelays:FW,isValidRequest:LW,isValidRequestExpiry:WW,isValidRequiredNamespaces:NW,isValidResponse:zW,isValidString:gr,isValidUrl:OW,mapEntries:h9e,mapToObj:X4,objToMap:Z4,parseAccountId:z4,parseChainId:BV,parseContextNames:fW,parseExpirerTarget:Q4,parseRelayParams:mW,parseUri:yW,serialize:JV,validateDecoding:QV,validateEncoding:q4},Symbol.toStringTag,{value:"Module"})),P9e="PARSE_ERROR",O9e="INVALID_REQUEST",A9e="METHOD_NOT_FOUND",k9e="INVALID_PARAMS",qW="INTERNAL_ERROR",r8="SERVER_ERROR",I9e=[-32700,-32600,-32601,-32602,-32603],Dd={[P9e]:{code:-32700,message:"Parse error"},[O9e]:{code:-32600,message:"Invalid Request"},[A9e]:{code:-32601,message:"Method not found"},[k9e]:{code:-32602,message:"Invalid params"},[qW]:{code:-32603,message:"Internal error"},[r8]:{code:-32e3,message:"Server error"}},GW=r8;function $9e(e){return I9e.includes(e)}function Qk(e){return Object.keys(Dd).includes(e)?Dd[e]:Dd[GW]}function T9e(e){const t=Object.values(Dd).find(r=>r.code===e);return t||Dd[GW]}function D9e(e,t,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${t}`):e}var KW={},Zi={},eI;function M9e(){if(eI)return Zi;eI=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.isBrowserCryptoAvailable=Zi.getSubtleCrypto=Zi.getBrowerCrypto=void 0;function e(){return(Le==null?void 0:Le.crypto)||(Le==null?void 0:Le.msCrypto)||{}}Zi.getBrowerCrypto=e;function t(){const n=e();return n.subtle||n.webkitSubtle}Zi.getSubtleCrypto=t;function r(){return!!e()&&!!t()}return Zi.isBrowserCryptoAvailable=r,Zi}var Ji={},tI;function R9e(){if(tI)return Ji;tI=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.isBrowser=Ji.isNode=Ji.isReactNative=void 0;function e(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}Ji.isReactNative=e;function t(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}Ji.isNode=t;function r(){return!e()&&!t()}return Ji.isBrowser=r,Ji}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Rn;t.__exportStar(M9e(),e),t.__exportStar(R9e(),e)})(KW);function N9e(e=3){const t=Date.now()*Math.pow(10,e),r=Math.floor(Math.random()*Math.pow(10,e));return t+r}function gb(e,t,r){return{id:r||N9e(),jsonrpc:"2.0",method:e,params:t}}function n8(e,t){return{id:e,jsonrpc:"2.0",result:t}}function o8(e,t,r){return{id:e,jsonrpc:"2.0",error:F9e(t,r)}}function F9e(e,t){return typeof e>"u"?Qk(qW):(typeof e=="string"&&(e=Object.assign(Object.assign({},Qk(r8)),{message:e})),typeof t<"u"&&(e.data=t),$9e(e.code)&&(e=T9e(e.code)),e)}class B9e{}class j9e extends B9e{constructor(){super()}}class L9e extends j9e{constructor(t){super()}}const z9e="^wss?:";function U9e(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(!(!t||!t.length))return t[0]}function H9e(e,t){const r=U9e(e);return typeof r>"u"?!1:new RegExp(t).test(r)}function rI(e){return H9e(e,z9e)}function V9e(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}function YW(e){return typeof e=="object"&&"id"in e&&"jsonrpc"in e&&e.jsonrpc==="2.0"}function i8(e){return YW(e)&&"method"in e}function a8(e){return YW(e)&&(ra(e)||jo(e))}function ra(e){return"result"in e}function jo(e){return"error"in e}class W9e extends L9e{constructor(t){super(t),this.events=new ni.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(t),this.connection.connected&&this.registerEventListeners()}async connect(t=this.connection){await this.open(t)}async disconnect(){await this.close()}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async request(t,r){return this.requestStrict(gb(t.method,t.params||[]),r)}async requestStrict(t,r){return new Promise(async(n,o)=>{if(!this.connection.connected)try{await this.open()}catch(i){o(i)}this.events.on(`${t.id}`,i=>{jo(i)?o(i.error):n(i.result)});try{await this.connection.send(t,r)}catch(i){o(i)}})}setConnection(t=this.connection){return t}onPayload(t){this.events.emit("payload",t),a8(t)?this.events.emit(`${t.id}`,t):this.events.emit("message",{type:t.method,data:t.params})}onClose(t){t&&t.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${t.code} ${t.reason?`(${t.reason})`:""}`)),this.events.emit("disconnect")}async open(t=this.connection){this.connection===t&&this.connection.connected||(this.connection.connected&&this.close(),typeof t=="string"&&(await this.connection.open(t),t=this.connection),this.connection=this.setConnection(t),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",t=>this.onPayload(t)),this.connection.on("close",t=>this.onClose(t)),this.connection.on("error",t=>this.events.emit("error",t)),this.connection.on("register_error",t=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const nI=10,q9e=()=>typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:require("ws"),G9e=()=>typeof window<"u",K9e=q9e();class Y9e{constructor(t){if(this.url=t,this.events=new ni.EventEmitter,this.registering=!1,!rI(t))throw new Error(`Provided URL is not compatible with WebSocket connection: ${t}`);this.url=t}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async open(t=this.url){await this.register(t)}async close(){return new Promise((t,r)=>{if(typeof this.socket>"u"){r(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),t()},this.socket.close()})}async send(t,r){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(T4(t))}catch(n){this.onError(t.id,n)}}register(t=this.url){if(!rI(t))throw new Error(`Provided URL is not compatible with WebSocket connection: ${t}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,o)=>{this.events.once("register_error",i=>{this.resetMaxListeners(),o(i)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return o(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=t,this.registering=!0,new Promise((r,n)=>{const o=KW.isReactNative()?void 0:{rejectUnauthorized:!V9e(t)},i=new K9e(t,[],o);G9e()?i.onerror=a=>{const s=a;n(this.emitError(s.error))}:i.on("error",a=>{n(this.emitError(a))}),i.onopen=()=>{this.onOpen(i),r(i)}})}onOpen(t){t.onmessage=r=>this.onPayload(r),t.onclose=r=>this.onClose(r),this.socket=t,this.registering=!1,this.events.emit("open")}onClose(t){this.socket=void 0,this.registering=!1,this.events.emit("close",t)}onPayload(t){if(typeof t.data>"u")return;const r=typeof t.data=="string"?hV(t.data):t.data;this.events.emit("payload",r)}onError(t,r){const n=this.parseError(r),o=n.message||n.toString(),i=o8(t,o);this.events.emit("payload",i)}parseError(t,r=this.url){return D9e(t,r,"WS")}resetMaxListeners(){this.events.getMaxListeners()>nI&&this.events.setMaxListeners(nI)}emitError(t){const r=this.parseError(new Error((t==null?void 0:t.message)||`WebSocket connection failed for URL: ${this.url}`));return this.events.emit("register_error",r),r}}var wm={exports:{}};wm.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",o=1,i=2,a=9007199254740991,s="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",f="[object Date]",d="[object Error]",p="[object Function]",h="[object GeneratorFunction]",y="[object Map]",_="[object Number]",b="[object Null]",m="[object Object]",E="[object Promise]",A="[object Proxy]",D="[object RegExp]",$="[object Set]",g="[object String]",N="[object Symbol]",V="[object Undefined]",K="[object WeakMap]",W="[object ArrayBuffer]",P="[object DataView]",C="[object Float32Array]",v="[object Float64Array]",w="[object Int8Array]",B="[object Int16Array]",R="[object Int32Array]",L="[object Uint8Array]",U="[object Uint8ClampedArray]",S="[object Uint16Array]",F="[object Uint32Array]",T=/[\\^$.*+?()[\]{}|]/g,q=/^\[object .+?Constructor\]$/,J=/^(?:0|[1-9]\d*)$/,te={};te[C]=te[v]=te[w]=te[B]=te[R]=te[L]=te[U]=te[S]=te[F]=!0,te[s]=te[l]=te[W]=te[u]=te[P]=te[f]=te[d]=te[p]=te[y]=te[_]=te[m]=te[D]=te[$]=te[g]=te[K]=!1;var ie=typeof Le=="object"&&Le&&Le.Object===Object&&Le,ce=typeof self=="object"&&self&&self.Object===Object&&self,oe=ie||ce||Function("return this")(),ue=t&&!t.nodeType&&t,O=ue&&!0&&e&&!e.nodeType&&e,G=O&&O.exports===ue,ee=G&&ie.process,se=function(){try{return ee&&ee.binding&&ee.binding("util")}catch{}}(),pe=se&&se.isTypedArray;function ge(ye,Pe){for(var Fe=-1,nt=ye==null?0:ye.length,Ut=0,wt=[];++Fe-1}function ai(ye,Pe){var Fe=this.__data__,nt=Rh(Fe,ye);return nt<0?(++this.size,Fe.push([ye,Pe])):Fe[nt][1]=Pe,this}ct.prototype.clear=Ct,ct.prototype.delete=xn,ct.prototype.get=Nn,ct.prototype.has=an,ct.prototype.set=ai;function sn(ye){var Pe=-1,Fe=ye==null?0:ye.length;for(this.clear();++Peyr))return!1;var Xt=wt.get(ye);if(Xt&&wt.get(Pe))return Xt==Pe;var Fn=-1,Oo=!0,Wr=Fe&i?new ro:void 0;for(wt.set(ye,Pe),wt.set(Pe,ye);++Fn-1&&ye%1==0&&ye-1&&ye%1==0&&ye<=a}function dE(ye){var Pe=typeof ye;return ye!=null&&(Pe=="object"||Pe=="function")}function vf(ye){return ye!=null&&typeof ye=="object"}var pE=pe?Z(pe):MY;function KY(ye){return qY(ye)?IY(ye):RY(ye)}function YY(){return[]}function XY(){return!1}e.exports=GY})(wm,wm.exports);var X9e=wm.exports;const Z9e=ri(X9e);function J9e(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,A=new Uint8Array(E);b!==m;){for(var D=h[b],$=0,g=E-1;(D!==0||$<_)&&g!==-1;g--,$++)D+=256*A[g]>>>0,A[g]=D%s>>>0,D=D/s>>>0;if(D!==0)throw new Error("Non-zero carry");_=$,b++}for(var N=E-_;N!==E&&A[N]===0;)N++;for(var V=l.repeat(y);N>>0,E=new Uint8Array(m);h[y];){var A=r[h.charCodeAt(y)];if(A===255)return;for(var D=0,$=m-1;(A!==0||D>>0,E[$]=A%256>>>0,A=A/256>>>0;if(A!==0)throw new Error("Non-zero carry");b=D,y++}if(h[y]!==" "){for(var g=m-b;g!==m&&E[g]===0;)g++;for(var N=new Uint8Array(_+(m-g)),V=_;g!==m;)N[V++]=E[g++];return N}}}function p(h){var y=d(h);if(y)return y;throw new Error(`Non-${t} character`)}return{encode:f,decodeUnsafe:d,decode:p}}var Q9e=J9e,e7e=Q9e;const XW=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},t7e=e=>new TextEncoder().encode(e),r7e=e=>new TextDecoder().decode(e);class n7e{constructor(t,r,n){this.name=t,this.prefix=r,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class o7e{constructor(t,r,n){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return ZW(this,t)}}class i7e{constructor(t){this.decoders=t}or(t){return ZW(this,t)}decode(t){const r=t[0],n=this.decoders[r];if(n)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const ZW=(e,t)=>new i7e({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class a7e{constructor(t,r,n,o){this.name=t,this.prefix=r,this.baseEncode=n,this.baseDecode=o,this.encoder=new n7e(t,r,n),this.decoder=new o7e(t,r,o)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const mb=({name:e,prefix:t,encode:r,decode:n})=>new a7e(e,t,r,n),mh=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:o}=e7e(r,t);return mb({prefix:e,name:t,encode:n,decode:i=>XW(o(i))})},s7e=(e,t,r,n)=>{const o={};for(let u=0;u=8&&(s-=8,a[c++]=255&l>>s)}if(s>=r||255&l<<8-s)throw new SyntaxError("Unexpected end of data");return a},l7e=(e,t,r)=>{const n=t[t.length-1]==="=",o=(1<r;)a-=r,i+=t[o&s>>a];if(a&&(i+=t[o&s<mb({prefix:t,name:e,encode(o){return l7e(o,n,r)},decode(o){return s7e(o,n,r,e)}}),c7e=mb({prefix:"\0",name:"identity",encode:e=>r7e(e),decode:e=>t7e(e)});var u7e=Object.freeze({__proto__:null,identity:c7e});const f7e=Hr({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var d7e=Object.freeze({__proto__:null,base2:f7e});const p7e=Hr({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var h7e=Object.freeze({__proto__:null,base8:p7e});const v7e=mh({prefix:"9",name:"base10",alphabet:"0123456789"});var g7e=Object.freeze({__proto__:null,base10:v7e});const m7e=Hr({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),y7e=Hr({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var b7e=Object.freeze({__proto__:null,base16:m7e,base16upper:y7e});const w7e=Hr({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),x7e=Hr({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),_7e=Hr({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),E7e=Hr({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),S7e=Hr({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),C7e=Hr({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),P7e=Hr({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),O7e=Hr({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),A7e=Hr({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var k7e=Object.freeze({__proto__:null,base32:w7e,base32upper:x7e,base32pad:_7e,base32padupper:E7e,base32hex:S7e,base32hexupper:C7e,base32hexpad:P7e,base32hexpadupper:O7e,base32z:A7e});const I7e=mh({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),$7e=mh({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var T7e=Object.freeze({__proto__:null,base36:I7e,base36upper:$7e});const D7e=mh({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),M7e=mh({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var R7e=Object.freeze({__proto__:null,base58btc:D7e,base58flickr:M7e});const N7e=Hr({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),F7e=Hr({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),B7e=Hr({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),j7e=Hr({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var L7e=Object.freeze({__proto__:null,base64:N7e,base64pad:F7e,base64url:B7e,base64urlpad:j7e});const JW=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),z7e=JW.reduce((e,t,r)=>(e[r]=t,e),[]),U7e=JW.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);function H7e(e){return e.reduce((t,r)=>(t+=z7e[r],t),"")}function V7e(e){const t=[];for(const r of e){const n=U7e[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(n)}return new Uint8Array(t)}const W7e=mb({prefix:"🚀",name:"base256emoji",encode:H7e,decode:V7e});var q7e=Object.freeze({__proto__:null,base256emoji:W7e}),G7e=QW,oI=128,K7e=127,Y7e=~K7e,X7e=Math.pow(2,31);function QW(e,t,r){t=t||[],r=r||0;for(var n=r;e>=X7e;)t[r++]=e&255|oI,e/=128;for(;e&Y7e;)t[r++]=e&255|oI,e>>>=7;return t[r]=e|0,QW.bytes=r-n+1,t}var Z7e=gx,J7e=128,iI=127;function gx(e,n){var r=0,n=n||0,o=0,i=n,a,s=e.length;do{if(i>=s)throw gx.bytes=0,new RangeError("Could not decode varint");a=e[i++],r+=o<28?(a&iI)<=J7e);return gx.bytes=i-n,r}var Q7e=Math.pow(2,7),eCe=Math.pow(2,14),tCe=Math.pow(2,21),rCe=Math.pow(2,28),nCe=Math.pow(2,35),oCe=Math.pow(2,42),iCe=Math.pow(2,49),aCe=Math.pow(2,56),sCe=Math.pow(2,63),lCe=function(e){return e(eq.encode(e,t,r),t),sI=e=>eq.encodingLength(e),mx=(e,t)=>{const r=t.byteLength,n=sI(e),o=n+sI(r),i=new Uint8Array(o+r);return aI(e,i,0),aI(r,i,n),i.set(t,o),new uCe(e,r,t,i)};class uCe{constructor(t,r,n,o){this.code=t,this.size=r,this.digest=n,this.bytes=o}}const tq=({name:e,code:t,encode:r})=>new fCe(e,t,r);class fCe{constructor(t,r,n){this.name=t,this.code=r,this.encode=n}digest(t){if(t instanceof Uint8Array){const r=this.encode(t);return r instanceof Uint8Array?mx(this.code,r):r.then(n=>mx(this.code,n))}else throw Error("Unknown type, must be binary type")}}const rq=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),dCe=tq({name:"sha2-256",code:18,encode:rq("SHA-256")}),pCe=tq({name:"sha2-512",code:19,encode:rq("SHA-512")});var hCe=Object.freeze({__proto__:null,sha256:dCe,sha512:pCe});const nq=0,vCe="identity",oq=XW,gCe=e=>mx(nq,oq(e)),mCe={code:nq,name:vCe,encode:oq,digest:gCe};var yCe=Object.freeze({__proto__:null,identity:mCe});new TextEncoder,new TextDecoder;const lI={...u7e,...d7e,...h7e,...g7e,...b7e,...k7e,...T7e,...R7e,...L7e,...q7e};({...hCe,...yCe});function bCe(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}function iq(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const cI=iq("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),Dw=iq("ascii","a",e=>{let t="a";for(let r=0;r{e=e.substring(1);const t=bCe(e.length);for(let r=0;r{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}},this.has=n=>(this.isInitialized(),this.keychain.has(n)),this.set=async(n,o)=>{this.isInitialized(),this.keychain.set(n,o),await this.persist()},this.get=n=>{this.isInitialized();const o=this.keychain.get(n);if(typeof o>"u"){const{message:i}=Xe("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(i)}return o},this.del=async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()},this.core=t,this.logger=Mt.generateChildLogger(r,this.name)}get context(){return Mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setKeyChain(t){await this.core.storage.setItem(this.storageKey,X4(t))}async getKeyChain(){const t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?Z4(t):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}}class YCe{constructor(t,r,n){this.core=t,this.logger=r,this.name=CCe,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=o=>(this.isInitialized(),this.keychain.has(o)),this.getClientId=async()=>{this.isInitialized();const o=await this.getClientSeed(),i=Lk(o);return kV(i.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const o=qV();return this.setPrivateKey(o.publicKey,o.privateKey)},this.signJWT=async o=>{this.isInitialized();const i=await this.getClientSeed(),a=Lk(i),s=mm();return await bSe(s,o,PCe,a)},this.generateSharedKey=(o,i,a)=>{this.isInitialized();const s=this.getPrivateKey(o),l=GV(s,i);return this.setSymKey(l,a)},this.setSymKey=async(o,i)=>{this.isInitialized();const a=i||KV(o);return await this.keychain.set(a,o),a},this.deleteKeyPair=async o=>{this.isInitialized(),await this.keychain.del(o)},this.deleteSymKey=async o=>{this.isInitialized(),await this.keychain.del(o)},this.encode=async(o,i,a)=>{this.isInitialized();const s=q4(a),l=T4(i);if(dx(s)){const d=s.senderPublicKey,p=s.receiverPublicKey;o=await this.generateSharedKey(d,p)}const c=this.getSymKey(o),{type:u,senderPublicKey:f}=s;return XV({type:u,symKey:c,message:l,senderPublicKey:f})},this.decode=async(o,i,a)=>{this.isInitialized();const s=QV(i,a);if(dx(s)){const u=s.receiverPublicKey,f=s.senderPublicKey;o=await this.generateSharedKey(u,f)}const l=this.getSymKey(o),c=ZV({symKey:l,encoded:i});return hV(c)},this.core=t,this.logger=Mt.generateChildLogger(r,this.name),this.keychain=n||new KCe(this.core,this.logger)}get context(){return Mt.getLoggerContext(this.logger)}getPayloadType(t){const r=pb(t);return nf(r.type)}async setPrivateKey(t,r){return await this.keychain.set(t,r),t}getPrivateKey(t){return this.keychain.get(t)}async getClientSeed(){let t="";try{t=this.keychain.get(uI)}catch{t=mm(),await this.keychain.set(uI,t)}return xCe(t,"base16")}getSymKey(t){return this.keychain.get(t)}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}}let XCe=class extends P8e{constructor(t,r){super(t,r),this.logger=t,this.core=r,this.messages=new Map,this.name=kCe,this.version=ICe,this.initialized=!1,this.storagePrefix=Bs,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}},this.set=async(n,o)=>{this.isInitialized();const i=Op(o);let a=this.messages.get(n);return typeof a>"u"&&(a={}),typeof a[i]<"u"||(a[i]=o,this.messages.set(n,a),await this.persist()),i},this.get=n=>{this.isInitialized();let o=this.messages.get(n);return typeof o>"u"&&(o={}),o},this.has=(n,o)=>{this.isInitialized();const i=this.get(n),a=Op(o);return typeof i[a]<"u"},this.del=async n=>{this.isInitialized(),this.messages.delete(n),await this.persist()},this.logger=Mt.generateChildLogger(t,this.name),this.core=r}get context(){return Mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setRelayerMessages(t){await this.core.storage.setItem(this.storageKey,X4(t))}async getRelayerMessages(){const t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?Z4(t):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}};class ZCe extends O8e{constructor(t,r){super(t,r),this.relayer=t,this.logger=r,this.events=new ni.EventEmitter,this.name=TCe,this.queue=new Map,this.publishTimeout=1e4,this.publish=async(n,o,i)=>{this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:o,opts:i}});try{const a=(i==null?void 0:i.ttl)||$Ce,s=bm(i),l=(i==null?void 0:i.prompt)||!1,c=(i==null?void 0:i.tag)||0,u={topic:n,message:o,opts:{ttl:a,relay:s,prompt:l,tag:c}},f=Op(o);this.queue.set(f,u);try{await await Ap(this.rpcPublish(n,o,a,s,l,c),this.publishTimeout),this.relayer.events.emit(br.publish,u)}catch{this.logger.debug("Publishing Payload stalled"),this.relayer.events.emit(br.connection_stalled);return}this.onPublish(f,u),this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:o,opts:i}})}catch(a){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(a),a}},this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.relayer=t,this.logger=Mt.generateChildLogger(r,this.name),this.registerEventListeners()}get context(){return Mt.getLoggerContext(this.logger)}rpcPublish(t,r,n,o,i,a){var s,l,c,u;const f={method:$d(o.protocol).publish,params:{topic:t,message:r,ttl:n,prompt:i,tag:a}};return rn((s=f.params)==null?void 0:s.prompt)&&((l=f.params)==null||delete l.prompt),rn((c=f.params)==null?void 0:c.tag)&&((u=f.params)==null||delete u.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:f}),this.relayer.request(f)}onPublish(t,r){this.queue.delete(t)}checkQueue(){this.queue.forEach(async t=>{const{topic:r,message:n,opts:o}=t;await this.publish(r,n,o)})}registerEventListeners(){this.relayer.core.heartbeat.on(hh.HEARTBEAT_EVENTS.pulse,()=>{this.checkQueue()})}}class JCe{constructor(){this.map=new Map,this.set=(t,r)=>{const n=this.get(t);this.exists(t,r)||this.map.set(t,[...n,r])},this.get=t=>this.map.get(t)||[],this.exists=(t,r)=>this.get(t).includes(r),this.delete=(t,r)=>{if(typeof r>"u"){this.map.delete(t);return}if(!this.map.has(t))return;const n=this.get(t);if(!this.exists(t,r))return;const o=n.filter(i=>i!==r);if(!o.length){this.map.delete(t);return}this.map.set(t,o)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var QCe=Object.defineProperty,ePe=Object.defineProperties,tPe=Object.getOwnPropertyDescriptors,fI=Object.getOwnPropertySymbols,rPe=Object.prototype.hasOwnProperty,nPe=Object.prototype.propertyIsEnumerable,dI=(e,t,r)=>t in e?QCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qf=(e,t)=>{for(var r in t||(t={}))rPe.call(t,r)&&dI(e,r,t[r]);if(fI)for(var r of fI(t))nPe.call(t,r)&&dI(e,r,t[r]);return e},Mw=(e,t)=>ePe(e,tPe(t));class oPe extends I8e{constructor(t,r){super(t,r),this.relayer=t,this.logger=r,this.subscriptions=new Map,this.topicMap=new JCe,this.events=new ni.EventEmitter,this.name=jCe,this.version=LCe,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Bs,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restart(),this.registerEventListeners(),this.onEnable(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(n,o)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:o}});try{const i=bm(o),a={topic:n,relay:i};this.pending.set(n,a);const s=await this.rpcSubscribe(n,i);return this.onSubscribe(s,a),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:o}}),s}catch(i){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(i),i}},this.unsubscribe=async(n,o)=>{await this.restartToComplete(),this.isInitialized(),typeof(o==null?void 0:o.id)<"u"?await this.unsubscribeById(n,o.id,o):await this.unsubscribeByTopic(n,o)},this.isSubscribed=async n=>this.topics.includes(n)?!0:await new Promise((o,i)=>{const a=new pt.Watch;a.start(this.pendingSubscriptionWatchLabel);const s=setInterval(()=>{!this.pending.has(n)&&this.topics.includes(n)&&(clearInterval(s),a.stop(this.pendingSubscriptionWatchLabel),o(!0)),a.elapsed(this.pendingSubscriptionWatchLabel)>=zCe&&(clearInterval(s),a.stop(this.pendingSubscriptionWatchLabel),i(!1))},this.pollingInterval)}),this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=t,this.logger=Mt.generateChildLogger(r,this.name),this.clientId=""}get context(){return Mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(t,r){let n=!1;try{n=this.getSubscription(t).topic===r}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(t,r){const n=this.topicMap.get(t);await Promise.all(n.map(async o=>await this.unsubscribeById(t,o,r)))}async unsubscribeById(t,r,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:r,opts:n}});try{const o=bm(n);await this.rpcUnsubscribe(t,r,o);const i=vr("USER_DISCONNECTED",`${this.name}, ${t}`);await this.onUnsubscribe(t,r,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:r,opts:n}})}catch(o){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(o),o}}async rpcSubscribe(t,r){const n={method:$d(r.protocol).subscribe,params:{topic:t}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await Ap(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(br.connection_stalled)}return Op(t+this.clientId)}async rpcBatchSubscribe(t){if(!t.length)return;const r=t[0].relay,n={method:$d(r.protocol).batchSubscribe,params:{topics:t.map(o=>o.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await Ap(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(br.connection_stalled)}}rpcUnsubscribe(t,r,n){const o={method:$d(n.protocol).unsubscribe,params:{topic:t,id:r}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:o}),this.relayer.request(o)}onSubscribe(t,r){this.setSubscription(t,Mw(Qf({},r),{id:t})),this.pending.delete(r.topic)}onBatchSubscribe(t){t.length&&t.forEach(r=>{this.setSubscription(r.id,Qf({},r)),this.pending.delete(r.topic)})}async onUnsubscribe(t,r,n){this.events.removeAllListeners(r),this.hasSubscription(r,t)&&this.deleteSubscription(r,n),await this.relayer.messages.del(t)}async setRelayerSubscriptions(t){await this.relayer.core.storage.setItem(this.storageKey,t)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(t,r){this.subscriptions.has(t)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:t,subscription:r}),this.addSubscription(t,r))}addSubscription(t,r){this.subscriptions.set(t,Qf({},r)),this.topicMap.set(r.topic,t),this.events.emit(vi.created,r)}getSubscription(t){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:t});const r=this.subscriptions.get(t);if(!r){const{message:n}=Xe("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(n)}return r}deleteSubscription(t,r){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:t,reason:r});const n=this.getSubscription(t);this.subscriptions.delete(t),this.topicMap.delete(n.topic,t),this.events.emit(vi.deleted,Mw(Qf({},n),{reason:r}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(vi.sync)}async reset(){if(!this.cached.length)return;const t=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let r=0;r"u"||!t.length)return;if(this.subscriptions.size){const{message:r}=Xe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(t){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(t)}}async batchSubscribe(t){if(!t.length)return;const r=await this.rpcBatchSubscribe(t);of(r)&&this.onBatchSubscribe(r.map((n,o)=>Mw(Qf({},t[o]),{id:n})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(this.relayer.transportExplicitlyClosed)return;const t=[];this.pending.forEach(r=>{t.push(r)}),await this.batchSubscribe(t)}registerEventListeners(){this.relayer.core.heartbeat.on(hh.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(br.connect,async()=>{await this.onConnect()}),this.relayer.on(br.disconnect,()=>{this.onDisconnect()}),this.events.on(vi.created,async t=>{const r=vi.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),await this.persist()}),this.events.on(vi.deleted,async t=>{const r=vi.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}async restartToComplete(){this.restartInProgress&&await new Promise(t=>{const r=setInterval(()=>{this.restartInProgress||(clearInterval(r),t())},this.pollingInterval)})}}var iPe=Object.defineProperty,pI=Object.getOwnPropertySymbols,aPe=Object.prototype.hasOwnProperty,sPe=Object.prototype.propertyIsEnumerable,hI=(e,t,r)=>t in e?iPe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lPe=(e,t)=>{for(var r in t||(t={}))aPe.call(t,r)&&hI(e,r,t[r]);if(pI)for(var r of pI(t))sPe.call(t,r)&&hI(e,r,t[r]);return e};class cPe extends A8e{constructor(t){super(t),this.protocol="wc",this.version=2,this.events=new ni.EventEmitter,this.name=MCe,this.transportExplicitlyClosed=!1,this.initialized=!1,this.reconnecting=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.request=async r=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(r)}catch(n){throw this.logger.debug("Failed to Publish Request"),this.logger.error(n),n}},this.core=t.core,this.logger=typeof t.logger<"u"&&typeof t.logger!="string"?Mt.generateChildLogger(t.logger,this.name):I4(Mt.getDefaultLoggerOptions({level:t.logger||DCe})),this.messages=new XCe(this.logger,t.core),this.subscriber=new oPe(this,this.logger),this.publisher=new ZCe(this,this.logger),this.relayUrl=(t==null?void 0:t.relayUrl)||lq,this.projectId=t.projectId,this.provider={}}async init(){this.logger.trace("Initialized"),await this.createProvider(),await Promise.all([this.messages.init(),this.transportOpen(),this.subscriber.init()]),this.registerEventListeners(),this.initialized=!0}get context(){return Mt.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(t,r,n){this.isInitialized(),await this.publisher.publish(t,r,n),await this.recordMessageEvent({topic:t,message:r,publishedAt:Date.now()})}async subscribe(t,r){this.isInitialized();let n="";return await Promise.all([new Promise(o=>{this.subscriber.once(vi.created,i=>{i.topic===t&&o()})}),new Promise(async o=>{n=await this.subscriber.subscribe(t,r),o()})]),n}async unsubscribe(t,r){this.isInitialized(),await this.subscriber.unsubscribe(t,r)}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async transportClose(){this.transportExplicitlyClosed=!0,this.connected&&(await this.provider.disconnect(),this.events.emit(br.transport_closed))}async transportOpen(t){if(!this.reconnecting){this.relayUrl=t||this.relayUrl,this.transportExplicitlyClosed=!1,this.reconnecting=!0;try{await Promise.all([new Promise(r=>{this.initialized||r(),this.subscriber.once(vi.resubscribed,()=>{r()})}),await Promise.race([new Promise(async(r,n)=>{await Ap(this.provider.connect(),5e3,"socket stalled").catch(o=>n(o)).then(()=>r()).finally(()=>this.removeListener(br.transport_closed,this.rejectTransportOpen))}),new Promise(r=>this.once(br.transport_closed,this.rejectTransportOpen))])])}catch(r){this.logger.error(r);const n=r;if(!this.isConnectionStalled(n.message))throw r;this.events.emit(br.transport_closed)}finally{this.reconnecting=!1}}}async restartTransport(t){this.transportExplicitlyClosed||(this.relayUrl=t||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}isConnectionStalled(t){return this.staleConnectionErrors.some(r=>t.includes(r))}rejectTransportOpen(){throw new Error("closeTransport called before connection was established")}async createProvider(){const t=await this.core.crypto.signJWT(this.relayUrl);this.provider=new W9e(new Y9e(uW({sdkVersion:FCe,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:t,useOnCloseEvent:!0}))),this.registerProviderListeners()}async recordMessageEvent(t){const{topic:r,message:n}=t;await this.messages.set(r,n)}async shouldIgnoreMessageEvent(t){const{topic:r,message:n}=t;return await this.subscriber.isSubscribed(r)?this.messages.has(r,n):!0}async onProviderPayload(t){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:t}),i8(t)){if(!t.method.endsWith(RCe))return;const r=t.params,{topic:n,message:o,publishedAt:i}=r.data,a={topic:n,message:o,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(lPe({type:"event",event:r.id},a)),this.events.emit(r.id,a),await this.acknowledgePayload(t),await this.onMessageEvent(a)}}async onMessageEvent(t){await this.shouldIgnoreMessageEvent(t)||(this.events.emit(br.message,t),await this.recordMessageEvent(t))}async acknowledgePayload(t){const r=n8(t.id,!0);await this.provider.connection.send(r)}registerProviderListeners(){this.provider.on(U0.payload,t=>this.onProviderPayload(t)),this.provider.on(U0.connect,()=>{this.events.emit(br.connect)}),this.provider.on(U0.disconnect,()=>{this.onProviderDisconnect()}),this.provider.on(U0.error,t=>{this.logger.error(t),this.events.emit(br.error,t)})}registerEventListeners(){this.events.on(br.connection_stalled,async()=>{await this.restartTransport()})}onProviderDisconnect(){this.events.emit(br.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||setTimeout(async()=>{await this.restartTransport()},pt.toMiliseconds(NCe))}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}async toEstablishConnection(){if(!this.connected){if(this.connecting)return await new Promise(t=>{const r=setInterval(()=>{this.connected&&(clearInterval(r),t())},this.connectionStatusPollingInterval)});await this.restartTransport()}}}var uPe=Object.defineProperty,vI=Object.getOwnPropertySymbols,fPe=Object.prototype.hasOwnProperty,dPe=Object.prototype.propertyIsEnumerable,gI=(e,t,r)=>t in e?uPe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mI=(e,t)=>{for(var r in t||(t={}))fPe.call(t,r)&&gI(e,r,t[r]);if(vI)for(var r of vI(t))dPe.call(t,r)&&gI(e,r,t[r]);return e};class yb extends k8e{constructor(t,r,n,o=Bs,i=void 0){super(t,r,n,o),this.core=t,this.logger=r,this.name=n,this.map=new Map,this.version=BCe,this.cached=[],this.initialized=!1,this.storagePrefix=Bs,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(a=>{this.getKey&&a!==null&&!rn(a)?this.map.set(this.getKey(a),a):AW(a)?this.map.set(a.id,a):kW(a)&&this.map.set(a.topic,a)}),this.cached=[],this.initialized=!0)},this.set=async(a,s)=>{this.isInitialized(),this.map.has(a)?await this.update(a,s):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:a,value:s}),this.map.set(a,s),await this.persist())},this.get=a=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:a}),this.getData(a)),this.getAll=a=>(this.isInitialized(),a?this.values.filter(s=>Object.keys(a).every(l=>Z9e(s[l],a[l]))):this.values),this.update=async(a,s)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:a,update:s});const l=mI(mI({},this.getData(a)),s);this.map.set(a,l),await this.persist()},this.delete=async(a,s)=>{this.isInitialized(),this.map.has(a)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:a,reason:s}),this.map.delete(a),await this.persist())},this.logger=Mt.generateChildLogger(r,this.name),this.storagePrefix=o,this.getKey=i}get context(){return Mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(t){await this.core.storage.setItem(this.storageKey,t)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(t){const r=this.map.get(t);if(!r){const{message:n}=Xe("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.error(n),new Error(n)}return r}async persist(){await this.setDataStore(this.values)}async restore(){try{const t=await this.getDataStore();if(typeof t>"u"||!t.length)return;if(this.map.size){const{message:r}=Xe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(t){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(t)}}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}}class pPe{constructor(t,r){this.core=t,this.logger=r,this.name=UCe,this.version=HCe,this.events=new lV,this.initialized=!1,this.storagePrefix=Bs,this.ignoredPayloadTypes=[Ys],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]},this.create=async()=>{this.isInitialized();const n=mm(),o=await this.core.crypto.setSymKey(n),i=Bo(pt.FIVE_MINUTES),a={protocol:sq},s={topic:o,expiry:i,relay:a,active:!1},l=wW({protocol:this.core.protocol,version:this.core.version,topic:o,symKey:n,relay:a});return await this.pairings.set(o,s),await this.core.relayer.subscribe(o),this.core.expirer.set(o,i),{topic:o,uri:l}},this.pair=async n=>{this.isInitialized(),this.isValidPair(n);const{topic:o,symKey:i,relay:a}=yW(n.uri);if(this.pairings.keys.includes(o))throw new Error(`Pairing already exists: ${o}`);if(this.core.crypto.hasKeys(o))throw new Error(`Keychain already exists: ${o}`);const s=Bo(pt.FIVE_MINUTES),l={topic:o,relay:a,expiry:s,active:!1};return await this.pairings.set(o,l),await this.core.crypto.setSymKey(i,o),await this.core.relayer.subscribe(o,{relay:a}),this.core.expirer.set(o,s),n.activatePairing&&await this.activate({topic:o}),l},this.activate=async({topic:n})=>{this.isInitialized();const o=Bo(pt.THIRTY_DAYS);await this.pairings.update(n,{active:!0,expiry:o}),this.core.expirer.set(n,o)},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);const{topic:o}=n;if(this.pairings.keys.includes(o)){const i=await this.sendRequest(o,"wc_pairingPing",{}),{done:a,resolve:s,reject:l}=Ja();this.events.once(tr("pairing_ping",i),({error:c})=>{c?l(c):s()}),await a()}},this.updateExpiry=async({topic:n,expiry:o})=>{this.isInitialized(),await this.pairings.update(n,{expiry:o})},this.updateMetadata=async({topic:n,metadata:o})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:o})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:o}=n;this.pairings.keys.includes(o)&&(await this.sendRequest(o,"wc_pairingDelete",vr("USER_DISCONNECTED")),await this.deletePairing(o))},this.sendRequest=async(n,o,i)=>{const a=gb(o,i),s=await this.core.crypto.encode(n,a),l=Jf[o].req;return this.core.history.set(n,a),await this.core.relayer.publish(n,s,l),a.id},this.sendResult=async(n,o,i)=>{const a=n8(n,i),s=await this.core.crypto.encode(o,a),l=await this.core.history.get(o,n),c=Jf[l.request.method].res;await this.core.relayer.publish(o,s,c),await this.core.history.resolve(a)},this.sendError=async(n,o,i)=>{const a=o8(n,i),s=await this.core.crypto.encode(o,a),l=await this.core.history.get(o,n),c=Jf[l.request.method]?Jf[l.request.method].res:Jf.unregistered_method.res;await this.core.relayer.publish(o,s,c),await this.core.history.resolve(a)},this.deletePairing=async(n,o)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,vr("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),o?Promise.resolve():this.core.expirer.del(n)])},this.cleanup=async()=>{const n=this.pairings.getAll().filter(o=>ia(o.expiry));await Promise.all(n.map(o=>this.deletePairing(o.topic)))},this.onRelayEventRequest=n=>{const{topic:o,payload:i}=n,a=i.method;if(this.pairings.keys.includes(o))switch(a){case"wc_pairingPing":return this.onPairingPingRequest(o,i);case"wc_pairingDelete":return this.onPairingDeleteRequest(o,i);default:return this.onUnknownRpcMethodRequest(o,i)}},this.onRelayEventResponse=async n=>{const{topic:o,payload:i}=n,a=(await this.core.history.get(o,i.id)).request.method;if(this.pairings.keys.includes(o))switch(a){case"wc_pairingPing":return this.onPairingPingResponse(o,i);default:return this.onUnknownRpcMethodResponse(a)}},this.onPairingPingRequest=async(n,o)=>{const{id:i}=o;try{this.isValidPing({topic:n}),await this.sendResult(i,n,!0),this.events.emit("pairing_ping",{id:i,topic:n})}catch(a){await this.sendError(i,n,a),this.logger.error(a)}},this.onPairingPingResponse=(n,o)=>{const{id:i}=o;setTimeout(()=>{ra(o)?this.events.emit(tr("pairing_ping",i),{}):jo(o)&&this.events.emit(tr("pairing_ping",i),{error:o.error})},500)},this.onPairingDeleteRequest=async(n,o)=>{const{id:i}=o;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit("pairing_delete",{id:i,topic:n})}catch(a){await this.sendError(i,n,a),this.logger.error(a)}},this.onUnknownRpcMethodRequest=async(n,o)=>{const{id:i,method:a}=o;try{if(this.registeredMethods.includes(a))return;const s=vr("WC_METHOD_UNSUPPORTED",a);await this.sendError(i,n,s),this.logger.error(s)}catch(s){await this.sendError(i,n,s),this.logger.error(s)}},this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(vr("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{if(!un(n)){const{message:o}=Xe("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(o)}if(!OW(n.uri)){const{message:o}=Xe("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(o)}},this.isValidPing=async n=>{if(!un(n)){const{message:i}=Xe("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(i)}const{topic:o}=n;await this.isValidPairingTopic(o)},this.isValidDisconnect=async n=>{if(!un(n)){const{message:i}=Xe("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(i)}const{topic:o}=n;await this.isValidPairingTopic(o)},this.isValidPairingTopic=async n=>{if(!gr(n,!1)){const{message:o}=Xe("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(o)}if(!this.pairings.keys.includes(n)){const{message:o}=Xe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(o)}if(ia(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:o}=Xe("EXPIRED",`pairing topic: ${n}`);throw new Error(o)}},this.core=t,this.logger=Mt.generateChildLogger(r,this.name),this.pairings=new yb(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Mt.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}registerRelayerEvents(){this.core.relayer.on(br.message,async t=>{const{topic:r,message:n}=t;if(this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const o=await this.core.crypto.decode(r,n);i8(o)?(this.core.history.set(r,o),this.onRelayEventRequest({topic:r,payload:o})):a8(o)&&(await this.core.history.resolve(o),this.onRelayEventResponse({topic:r,payload:o}))})}registerExpirerEvents(){this.core.expirer.on(lo.expired,async t=>{const{topic:r}=Q4(t.target);r&&this.pairings.keys.includes(r)&&(await this.deletePairing(r,!0),this.events.emit("pairing_expire",{topic:r}))})}}class hPe extends C8e{constructor(t,r){super(t,r),this.core=t,this.logger=r,this.records=new Map,this.events=new ni.EventEmitter,this.name=VCe,this.version=WCe,this.cached=[],this.initialized=!1,this.storagePrefix=Bs,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(n,o,i)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:o,chainId:i}),this.records.has(o.id))return;const a={id:o.id,topic:n,request:{method:o.method,params:o.params||null},chainId:i};this.records.set(a.id,a),this.events.emit(ui.created,a)},this.resolve=async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const o=await this.getRecord(n.id);typeof o.response>"u"&&(o.response=jo(n)?{error:n.error}:{result:n.result},this.records.set(o.id,o),this.events.emit(ui.updated,o))},this.get=async(n,o)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:o}),await this.getRecord(o)),this.delete=(n,o)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:o}),this.values.forEach(i=>{if(i.topic===n){if(typeof o<"u"&&i.id!==o)return;this.records.delete(i.id),this.events.emit(ui.deleted,i)}})},this.exists=async(n,o)=>(this.isInitialized(),this.records.has(o)?(await this.getRecord(o)).topic===n:!1),this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.logger=Mt.generateChildLogger(r,this.name)}get context(){return Mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const t=[];return this.values.forEach(r=>{if(typeof r.response<"u")return;const n={topic:r.topic,request:gb(r.request.method,r.request.params,r.id),chainId:r.chainId};return t.push(n)}),t}async setJsonRpcRecords(t){await this.core.storage.setItem(this.storageKey,t)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(t){this.isInitialized();const r=this.records.get(t);if(!r){const{message:n}=Xe("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(n)}return r}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(ui.sync)}async restore(){try{const t=await this.getJsonRpcRecords();if(typeof t>"u"||!t.length)return;if(this.records.size){const{message:r}=Xe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(t){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(t)}}registerEventListeners(){this.events.on(ui.created,t=>{const r=ui.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:t}),this.persist()}),this.events.on(ui.updated,t=>{const r=ui.updated;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:t}),this.persist()}),this.events.on(ui.deleted,t=>{const r=ui.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:t}),this.persist()})}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}}class vPe extends $8e{constructor(t,r){super(t,r),this.core=t,this.logger=r,this.expirations=new Map,this.events=new ni.EventEmitter,this.name=qCe,this.version=GCe,this.cached=[],this.initialized=!1,this.storagePrefix=Bs,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=n=>{try{const o=this.formatTarget(n);return typeof this.getExpiration(o)<"u"}catch{return!1}},this.set=(n,o)=>{this.isInitialized();const i=this.formatTarget(n),a={target:i,expiry:o};this.expirations.set(i,a),this.checkExpiry(i,a),this.events.emit(lo.created,{target:i,expiration:a})},this.get=n=>{this.isInitialized();const o=this.formatTarget(n);return this.getExpiration(o)},this.del=n=>{if(this.isInitialized(),this.has(n)){const o=this.formatTarget(n),i=this.getExpiration(o);this.expirations.delete(o),this.events.emit(lo.deleted,{target:o,expiration:i})}},this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.logger=Mt.generateChildLogger(r,this.name)}get context(){return Mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(t){if(typeof t=="string")return hW(t);if(typeof t=="number")return vW(t);const{message:r}=Xe("UNKNOWN_TYPE",`Target type: ${typeof t}`);throw new Error(r)}async setExpirations(t){await this.core.storage.setItem(this.storageKey,t)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(lo.sync)}async restore(){try{const t=await this.getExpirations();if(typeof t>"u"||!t.length)return;if(this.expirations.size){const{message:r}=Xe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(t){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(t)}}getExpiration(t){const r=this.expirations.get(t);if(!r){const{message:n}=Xe("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.error(n),new Error(n)}return r}checkExpiry(t,r){const{expiry:n}=r;pt.toMiliseconds(n)-Date.now()<=0&&this.expire(t,r)}expire(t,r){this.expirations.delete(t),this.events.emit(lo.expired,{target:t,expiration:r})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((t,r)=>this.checkExpiry(r,t))}registerEventListeners(){this.core.heartbeat.on(hh.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(lo.created,t=>{const r=lo.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),this.persist()}),this.events.on(lo.expired,t=>{const r=lo.expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),this.persist()}),this.events.on(lo.deleted,t=>{const r=lo.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),this.persist()})}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}}var gPe=Object.defineProperty,yI=Object.getOwnPropertySymbols,mPe=Object.prototype.hasOwnProperty,yPe=Object.prototype.propertyIsEnumerable,bI=(e,t,r)=>t in e?gPe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wI=(e,t)=>{for(var r in t||(t={}))mPe.call(t,r)&&bI(e,r,t[r]);if(yI)for(var r of yI(t))yPe.call(t,r)&&bI(e,r,t[r]);return e};let bPe=class cq extends S8e{constructor(t){super(t),this.protocol=aq,this.version=_Ce,this.name=s8,this.events=new ni.EventEmitter,this.initialized=!1,this.on=(n,o)=>this.events.on(n,o),this.once=(n,o)=>this.events.once(n,o),this.off=(n,o)=>this.events.off(n,o),this.removeListener=(n,o)=>this.events.removeListener(n,o),this.projectId=t==null?void 0:t.projectId,this.relayUrl=(t==null?void 0:t.relayUrl)||lq;const r=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:I4(Mt.getDefaultLoggerOptions({level:(t==null?void 0:t.logger)||ECe.logger}));this.logger=Mt.generateChildLogger(r,this.name),this.heartbeat=new hh.HeartBeat,this.crypto=new YCe(this,this.logger,t==null?void 0:t.keychain),this.history=new hPe(this,this.logger),this.expirer=new vPe(this,this.logger),this.storage=t!=null&&t.storage?t.storage:new c8e(wI(wI({},SCe),t==null?void 0:t.storageOptions)),this.relayer=new cPe({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new pPe(this,this.logger)}static async init(t){const r=new cq(t);return await r.initialize(),r}get context(){return Mt.getLoggerContext(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(t){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,t),this.logger.error(t.message),t}}};const wPe=bPe,l8="wc",c8=2,u8="client",bb=`${l8}@${c8}:${u8}:`,C1={name:u8,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},xPe={session_proposal:"session_proposal",session_update:"session_update",session_extend:"session_extend",session_ping:"session_ping",session_delete:"session_delete",session_expire:"session_expire",session_request:"session_request",session_request_sent:"session_request_sent",session_event:"session_event",proposal_expire:"proposal_expire"},_Pe={database:":memory:"},EPe={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},SPe="history",CPe="0.3",uq="proposal",PPe=pt.THIRTY_DAYS,fq="Proposal expired",dq="session",cd=pt.SEVEN_DAYS,pq="engine",xc={wc_sessionPropose:{req:{ttl:pt.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:pt.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:pt.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:pt.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:pt.ONE_DAY,prompt:!1,tag:1104},res:{ttl:pt.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:pt.ONE_DAY,prompt:!1,tag:1106},res:{ttl:pt.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:pt.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:pt.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:pt.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:pt.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:pt.ONE_DAY,prompt:!1,tag:1112},res:{ttl:pt.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:pt.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:pt.THIRTY_SECONDS,prompt:!1,tag:1115}}},P1={min:pt.FIVE_MINUTES,max:pt.SEVEN_DAYS},hq="request";var OPe=Object.defineProperty,APe=Object.defineProperties,kPe=Object.getOwnPropertyDescriptors,xI=Object.getOwnPropertySymbols,IPe=Object.prototype.hasOwnProperty,$Pe=Object.prototype.propertyIsEnumerable,_I=(e,t,r)=>t in e?OPe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,io=(e,t)=>{for(var r in t||(t={}))IPe.call(t,r)&&_I(e,r,t[r]);if(xI)for(var r of xI(t))$Pe.call(t,r)&&_I(e,r,t[r]);return e},Rw=(e,t)=>APe(e,kPe(t));class TPe extends D8e{constructor(t){super(t),this.name=pq,this.events=new lV,this.initialized=!1,this.ignoredPayloadTypes=[Ys],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.client.core.pairing.register({methods:Object.keys(xc)}),this.initialized=!0)},this.connect=async r=>{this.isInitialized();const n=Rw(io({},r),{requiredNamespaces:r.requiredNamespaces||{},optionalNamespaces:r.optionalNamespaces||{}});await this.isValidConnect(n);const{pairingTopic:o,requiredNamespaces:i,optionalNamespaces:a,sessionProperties:s,relays:l}=n;let c=o,u,f=!1;if(c&&(f=this.client.core.pairing.pairings.get(c).active),!c||!f){const{topic:E,uri:A}=await this.client.core.pairing.create();c=E,u=A}const d=await this.client.core.crypto.generateKeyPair(),p=io({requiredNamespaces:i,optionalNamespaces:a,relays:l??[{protocol:sq}],proposer:{publicKey:d,metadata:this.client.metadata}},s&&{sessionProperties:s}),{reject:h,resolve:y,done:_}=Ja(pt.FIVE_MINUTES,fq);if(this.events.once(tr("session_connect"),async({error:E,session:A})=>{if(E)h(E);else if(A){A.self.publicKey=d;const D=Rw(io({},A),{requiredNamespaces:A.requiredNamespaces,optionalNamespaces:A.optionalNamespaces});await this.client.session.set(A.topic,D),await this.setExpiry(A.topic,A.expiry),c&&await this.client.core.pairing.updateMetadata({topic:c,metadata:A.peer.metadata}),y(D)}}),!c){const{message:E}=Xe("NO_MATCHING_KEY",`connect() pairing topic: ${c}`);throw new Error(E)}const b=await this.sendRequest(c,"wc_sessionPropose",p),m=Bo(pt.FIVE_MINUTES);return await this.setProposal(b,io({id:b,expiry:m},p)),{uri:u,approval:_}},this.pair=async r=>(this.isInitialized(),await this.client.core.pairing.pair(r)),this.approve=async r=>{this.isInitialized(),await this.isValidApprove(r);const{id:n,relayProtocol:o,namespaces:i,sessionProperties:a}=r,s=this.client.proposal.get(n);let{pairingTopic:l,proposer:c,requiredNamespaces:u,optionalNamespaces:f}=s;tu(u)||(u=SW(i,"approve()"));const d=await this.client.core.crypto.generateKeyPair(),p=c.publicKey,h=await this.client.core.crypto.generateSharedKey(d,p);l&&n&&(await this.client.core.pairing.updateMetadata({topic:l,metadata:c.metadata}),await this.sendResult(n,l,{relay:{protocol:o??"irn"},responderPublicKey:d}),await this.client.proposal.delete(n,vr("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:l}));const y=io({relay:{protocol:o??"irn"},namespaces:i,requiredNamespaces:u,optionalNamespaces:f,controller:{publicKey:d,metadata:this.client.metadata},expiry:Bo(cd)},a&&{sessionProperties:a});await this.client.core.relayer.subscribe(h);const _=await this.sendRequest(h,"wc_sessionSettle",y),{done:b,resolve:m,reject:E}=Ja();this.events.once(tr("session_approve",_),({error:D})=>{D?E(D):m(this.client.session.get(h))});const A=Rw(io({},y),{topic:h,acknowledged:!1,self:y.controller,peer:{publicKey:c.publicKey,metadata:c.metadata},controller:d});return await this.client.session.set(h,A),await this.setExpiry(h,Bo(cd)),{topic:h,acknowledged:b}},this.reject=async r=>{this.isInitialized(),await this.isValidReject(r);const{id:n,reason:o}=r,{pairingTopic:i}=this.client.proposal.get(n);i&&(await this.sendError(n,i,o),await this.client.proposal.delete(n,vr("USER_DISCONNECTED")))},this.update=async r=>{this.isInitialized(),await this.isValidUpdate(r);const{topic:n,namespaces:o}=r,i=await this.sendRequest(n,"wc_sessionUpdate",{namespaces:o}),{done:a,resolve:s,reject:l}=Ja();return this.events.once(tr("session_update",i),({error:c})=>{c?l(c):s()}),await this.client.session.update(n,{namespaces:o}),{acknowledged:a}},this.extend=async r=>{this.isInitialized(),await this.isValidExtend(r);const{topic:n}=r,o=await this.sendRequest(n,"wc_sessionExtend",{}),{done:i,resolve:a,reject:s}=Ja();return this.events.once(tr("session_extend",o),({error:l})=>{l?s(l):a()}),await this.setExpiry(n,Bo(cd)),{acknowledged:i}},this.request=async r=>{this.isInitialized(),await this.isValidRequest(r);const{chainId:n,request:o,topic:i,expiry:a}=r,s=await this.sendRequest(i,"wc_sessionRequest",{request:o,chainId:n},a),{done:l,resolve:c,reject:u}=Ja(a);return this.events.once(tr("session_request",s),({error:f,result:d})=>{f?u(f):c(d)}),this.client.events.emit("session_request_sent",{topic:i,request:o,chainId:n,id:s}),await l()},this.respond=async r=>{this.isInitialized(),await this.isValidRespond(r);const{topic:n,response:o}=r,{id:i}=o;ra(o)?await this.sendResult(i,n,o.result):jo(o)&&await this.sendError(i,n,o.error),this.deletePendingSessionRequest(r.response.id,{message:"fulfilled",code:0})},this.ping=async r=>{this.isInitialized(),await this.isValidPing(r);const{topic:n}=r;if(this.client.session.keys.includes(n)){const o=await this.sendRequest(n,"wc_sessionPing",{}),{done:i,resolve:a,reject:s}=Ja();this.events.once(tr("session_ping",o),({error:l})=>{l?s(l):a()}),await i()}else this.client.core.pairing.pairings.keys.includes(n)&&await this.client.core.pairing.ping({topic:n})},this.emit=async r=>{this.isInitialized(),await this.isValidEmit(r);const{topic:n,event:o,chainId:i}=r;await this.sendRequest(n,"wc_sessionEvent",{event:o,chainId:i})},this.disconnect=async r=>{this.isInitialized(),await this.isValidDisconnect(r);const{topic:n}=r;this.client.session.keys.includes(n)?(await this.sendRequest(n,"wc_sessionDelete",vr("USER_DISCONNECTED")),await this.deleteSession(n)):await this.client.core.pairing.disconnect({topic:n})},this.find=r=>(this.isInitialized(),this.client.session.getAll().filter(n=>CW(n,r))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.deleteSession=async(r,n)=>{const{self:o}=this.client.session.get(r);await this.client.core.relayer.unsubscribe(r),await Promise.all([this.client.session.delete(r,vr("USER_DISCONNECTED")),this.client.core.crypto.deleteKeyPair(o.publicKey),this.client.core.crypto.deleteSymKey(r),n?Promise.resolve():this.client.core.expirer.del(r)])},this.deleteProposal=async(r,n)=>{await Promise.all([this.client.proposal.delete(r,vr("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(r)])},this.deletePendingSessionRequest=async(r,n,o=!1)=>{await Promise.all([this.client.pendingRequest.delete(r,n),o?Promise.resolve():this.client.core.expirer.del(r)])},this.setExpiry=async(r,n)=>{this.client.session.keys.includes(r)&&await this.client.session.update(r,{expiry:n}),this.client.core.expirer.set(r,n)},this.setProposal=async(r,n)=>{await this.client.proposal.set(r,n),this.client.core.expirer.set(r,n.expiry)},this.setPendingSessionRequest=async r=>{const n=xc.wc_sessionRequest.req.ttl,{id:o,topic:i,params:a}=r;await this.client.pendingRequest.set(o,{id:o,topic:i,params:a}),n&&this.client.core.expirer.set(o,Bo(n))},this.sendRequest=async(r,n,o,i)=>{const a=gb(n,o),s=await this.client.core.crypto.encode(r,a),l=xc[n].req;return i&&(l.ttl=i),this.client.core.history.set(r,a),this.client.core.relayer.publish(r,s,l),a.id},this.sendResult=async(r,n,o)=>{const i=n8(r,o),a=await this.client.core.crypto.encode(n,i),s=await this.client.core.history.get(n,r),l=xc[s.request.method].res;this.client.core.relayer.publish(n,a,l),await this.client.core.history.resolve(i)},this.sendError=async(r,n,o)=>{const i=o8(r,o),a=await this.client.core.crypto.encode(n,i),s=await this.client.core.history.get(n,r),l=xc[s.request.method].res;this.client.core.relayer.publish(n,a,l),await this.client.core.history.resolve(i)},this.cleanup=async()=>{const r=[],n=[];this.client.session.getAll().forEach(o=>{ia(o.expiry)&&r.push(o.topic)}),this.client.proposal.getAll().forEach(o=>{ia(o.expiry)&&n.push(o.id)}),await Promise.all([...r.map(o=>this.deleteSession(o)),...n.map(o=>this.deleteProposal(o))])},this.onRelayEventRequest=r=>{const{topic:n,payload:o}=r,i=o.method;switch(i){case"wc_sessionPropose":return this.onSessionProposeRequest(n,o);case"wc_sessionSettle":return this.onSessionSettleRequest(n,o);case"wc_sessionUpdate":return this.onSessionUpdateRequest(n,o);case"wc_sessionExtend":return this.onSessionExtendRequest(n,o);case"wc_sessionPing":return this.onSessionPingRequest(n,o);case"wc_sessionDelete":return this.onSessionDeleteRequest(n,o);case"wc_sessionRequest":return this.onSessionRequest(n,o);case"wc_sessionEvent":return this.onSessionEventRequest(n,o);default:return this.client.logger.info(`Unsupported request method ${i}`)}},this.onRelayEventResponse=async r=>{const{topic:n,payload:o}=r,i=(await this.client.core.history.get(n,o.id)).request.method;switch(i){case"wc_sessionPropose":return this.onSessionProposeResponse(n,o);case"wc_sessionSettle":return this.onSessionSettleResponse(n,o);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,o);case"wc_sessionExtend":return this.onSessionExtendResponse(n,o);case"wc_sessionPing":return this.onSessionPingResponse(n,o);case"wc_sessionRequest":return this.onSessionRequestResponse(n,o);default:return this.client.logger.info(`Unsupported response method ${i}`)}},this.onSessionProposeRequest=async(r,n)=>{const{params:o,id:i}=n;try{this.isValidConnect(io({},n.params));const a=Bo(pt.FIVE_MINUTES),s=io({id:i,pairingTopic:r,expiry:a},o);await this.setProposal(i,s),this.client.events.emit("session_proposal",{id:i,params:s})}catch(a){await this.sendError(i,r,a),this.client.logger.error(a)}},this.onSessionProposeResponse=async(r,n)=>{const{id:o}=n;if(ra(n)){const{result:i}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:i});const a=this.client.proposal.get(o);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:a});const s=a.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:s});const l=i.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:l});const c=await this.client.core.crypto.generateSharedKey(s,l);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:c});const u=await this.client.core.relayer.subscribe(c);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:u}),await this.client.core.pairing.activate({topic:r})}else jo(n)&&(await this.client.proposal.delete(o,vr("USER_DISCONNECTED")),this.events.emit(tr("session_connect"),{error:n.error}))},this.onSessionSettleRequest=async(r,n)=>{const{id:o,params:i}=n;try{this.isValidSessionSettleRequest(i);const{relay:a,controller:s,expiry:l,namespaces:c,requiredNamespaces:u,optionalNamespaces:f,sessionProperties:d}=n.params,p=io({topic:r,relay:a,expiry:l,namespaces:c,acknowledged:!0,requiredNamespaces:u,optionalNamespaces:f,controller:s.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:s.publicKey,metadata:s.metadata}},d&&{sessionProperties:d});await this.sendResult(n.id,r,!0),this.events.emit(tr("session_connect"),{session:p})}catch(a){await this.sendError(o,r,a),this.client.logger.error(a)}},this.onSessionSettleResponse=async(r,n)=>{const{id:o}=n;ra(n)?(await this.client.session.update(r,{acknowledged:!0}),this.events.emit(tr("session_approve",o),{})):jo(n)&&(await this.client.session.delete(r,vr("USER_DISCONNECTED")),this.events.emit(tr("session_approve",o),{error:n.error}))},this.onSessionUpdateRequest=async(r,n)=>{const{params:o,id:i}=n;try{this.isValidUpdate(io({topic:r},o)),await this.client.session.update(r,{namespaces:o.namespaces}),await this.sendResult(i,r,!0),this.client.events.emit("session_update",{id:i,topic:r,params:o})}catch(a){await this.sendError(i,r,a),this.client.logger.error(a)}},this.onSessionUpdateResponse=(r,n)=>{const{id:o}=n;ra(n)?this.events.emit(tr("session_update",o),{}):jo(n)&&this.events.emit(tr("session_update",o),{error:n.error})},this.onSessionExtendRequest=async(r,n)=>{const{id:o}=n;try{this.isValidExtend({topic:r}),await this.setExpiry(r,Bo(cd)),await this.sendResult(o,r,!0),this.client.events.emit("session_extend",{id:o,topic:r})}catch(i){await this.sendError(o,r,i),this.client.logger.error(i)}},this.onSessionExtendResponse=(r,n)=>{const{id:o}=n;ra(n)?this.events.emit(tr("session_extend",o),{}):jo(n)&&this.events.emit(tr("session_extend",o),{error:n.error})},this.onSessionPingRequest=async(r,n)=>{const{id:o}=n;try{this.isValidPing({topic:r}),await this.sendResult(o,r,!0),this.client.events.emit("session_ping",{id:o,topic:r})}catch(i){await this.sendError(o,r,i),this.client.logger.error(i)}},this.onSessionPingResponse=(r,n)=>{const{id:o}=n;setTimeout(()=>{ra(n)?this.events.emit(tr("session_ping",o),{}):jo(n)&&this.events.emit(tr("session_ping",o),{error:n.error})},500)},this.onSessionDeleteRequest=async(r,n)=>{const{id:o}=n;try{this.isValidDisconnect({topic:r,reason:n.params}),this.client.core.relayer.once(br.publish,async()=>{await this.deleteSession(r)}),await this.sendResult(o,r,!0),this.client.events.emit("session_delete",{id:o,topic:r})}catch(i){await this.sendError(o,r,i),this.client.logger.error(i)}},this.onSessionRequest=async(r,n)=>{const{id:o,params:i}=n;try{this.isValidRequest(io({topic:r},i)),await this.setPendingSessionRequest({id:o,topic:r,params:i}),this.client.events.emit("session_request",{id:o,topic:r,params:i})}catch(a){await this.sendError(o,r,a),this.client.logger.error(a)}},this.onSessionRequestResponse=(r,n)=>{const{id:o}=n;ra(n)?this.events.emit(tr("session_request",o),{result:n.result}):jo(n)&&this.events.emit(tr("session_request",o),{error:n.error})},this.onSessionEventRequest=async(r,n)=>{const{id:o,params:i}=n;try{this.isValidEmit(io({topic:r},i)),this.client.events.emit("session_event",{id:o,topic:r,params:i})}catch(a){await this.sendError(o,r,a),this.client.logger.error(a)}},this.isValidConnect=async r=>{if(!un(r)){const{message:l}=Xe("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(r)}`);throw new Error(l)}const{pairingTopic:n,requiredNamespaces:o,optionalNamespaces:i,sessionProperties:a,relays:s}=r;if(rn(n)||await this.isValidPairingTopic(n),!FW(s,!0)){const{message:l}=Xe("MISSING_OR_INVALID",`connect() relays: ${s}`);throw new Error(l)}!rn(o)&&tu(o)!==0&&this.validateNamespaces(o,"requiredNamespaces"),!rn(i)&&tu(i)!==0&&this.validateNamespaces(i,"optionalNamespaces"),rn(a)||this.validateSessionProps(a,"sessionProperties")},this.validateNamespaces=(r,n)=>{const o=NW(r,"connect()",n);if(o)throw new Error(o.message)},this.isValidApprove=async r=>{if(!un(r))throw new Error(Xe("MISSING_OR_INVALID",`approve() params: ${r}`).message);const{id:n,namespaces:o,relayProtocol:i,sessionProperties:a}=r;await this.isValidProposalId(n);const s=this.client.proposal.get(n),l=Td(o,"approve()");if(l)throw new Error(l.message);const c=vx(s.requiredNamespaces,o,"approve()");if(c)throw new Error(c.message);if(!gr(i,!0)){const{message:u}=Xe("MISSING_OR_INVALID",`approve() relayProtocol: ${i}`);throw new Error(u)}rn(a)||this.validateSessionProps(a,"sessionProperties")},this.isValidReject=async r=>{if(!un(r)){const{message:i}=Xe("MISSING_OR_INVALID",`reject() params: ${r}`);throw new Error(i)}const{id:n,reason:o}=r;if(await this.isValidProposalId(n),!jW(o)){const{message:i}=Xe("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(o)}`);throw new Error(i)}},this.isValidSessionSettleRequest=r=>{if(!un(r)){const{message:c}=Xe("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${r}`);throw new Error(c)}const{relay:n,controller:o,namespaces:i,expiry:a}=r;if(!t8(n)){const{message:c}=Xe("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(c)}const s=IW(o,"onSessionSettleRequest()");if(s)throw new Error(s.message);const l=Td(i,"onSessionSettleRequest()");if(l)throw new Error(l.message);if(ia(a)){const{message:c}=Xe("EXPIRED","onSessionSettleRequest()");throw new Error(c)}},this.isValidUpdate=async r=>{if(!un(r)){const{message:l}=Xe("MISSING_OR_INVALID",`update() params: ${r}`);throw new Error(l)}const{topic:n,namespaces:o}=r;await this.isValidSessionTopic(n);const i=this.client.session.get(n),a=Td(o,"update()");if(a)throw new Error(a.message);const s=vx(i.requiredNamespaces,o,"update()");if(s)throw new Error(s.message)},this.isValidExtend=async r=>{if(!un(r)){const{message:o}=Xe("MISSING_OR_INVALID",`extend() params: ${r}`);throw new Error(o)}const{topic:n}=r;await this.isValidSessionTopic(n)},this.isValidRequest=async r=>{if(!un(r)){const{message:l}=Xe("MISSING_OR_INVALID",`request() params: ${r}`);throw new Error(l)}const{topic:n,request:o,chainId:i,expiry:a}=r;await this.isValidSessionTopic(n);const{namespaces:s}=this.client.session.get(n);if(!hx(s,i)){const{message:l}=Xe("MISSING_OR_INVALID",`request() chainId: ${i}`);throw new Error(l)}if(!LW(o)){const{message:l}=Xe("MISSING_OR_INVALID",`request() ${JSON.stringify(o)}`);throw new Error(l)}if(!HW(s,i,o.method)){const{message:l}=Xe("MISSING_OR_INVALID",`request() method: ${o.method}`);throw new Error(l)}if(a&&!WW(a,P1)){const{message:l}=Xe("MISSING_OR_INVALID",`request() expiry: ${a}. Expiry must be a number (in seconds) between ${P1.min} and ${P1.max}`);throw new Error(l)}},this.isValidRespond=async r=>{if(!un(r)){const{message:i}=Xe("MISSING_OR_INVALID",`respond() params: ${r}`);throw new Error(i)}const{topic:n,response:o}=r;if(await this.isValidSessionTopic(n),!zW(o)){const{message:i}=Xe("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(o)}`);throw new Error(i)}},this.isValidPing=async r=>{if(!un(r)){const{message:o}=Xe("MISSING_OR_INVALID",`ping() params: ${r}`);throw new Error(o)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)},this.isValidEmit=async r=>{if(!un(r)){const{message:s}=Xe("MISSING_OR_INVALID",`emit() params: ${r}`);throw new Error(s)}const{topic:n,event:o,chainId:i}=r;await this.isValidSessionTopic(n);const{namespaces:a}=this.client.session.get(n);if(!hx(a,i)){const{message:s}=Xe("MISSING_OR_INVALID",`emit() chainId: ${i}`);throw new Error(s)}if(!UW(o)){const{message:s}=Xe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(s)}if(!VW(a,i,o.name)){const{message:s}=Xe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(s)}},this.isValidDisconnect=async r=>{if(!un(r)){const{message:o}=Xe("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw new Error(o)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)},this.validateSessionProps=(r,n)=>{Object.values(r).forEach(o=>{if(!gr(o,!1)){const{message:i}=Xe("MISSING_OR_INVALID",`${n} must be in Record format. Received: ${JSON.stringify(o)}`);throw new Error(i)}})}}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}registerRelayerEvents(){this.client.core.relayer.on(br.message,async t=>{const{topic:r,message:n}=t;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const o=await this.client.core.crypto.decode(r,n);i8(o)?(this.client.core.history.set(r,o),this.onRelayEventRequest({topic:r,payload:o})):a8(o)&&(await this.client.core.history.resolve(o),this.onRelayEventResponse({topic:r,payload:o}))})}registerExpirerEvents(){this.client.core.expirer.on(lo.expired,async t=>{const{topic:r,id:n}=Q4(t.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,Xe("EXPIRED"),!0);r?this.client.session.keys.includes(r)&&(await this.deleteSession(r,!0),this.client.events.emit("session_expire",{topic:r})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}isValidPairingTopic(t){if(!gr(t,!1)){const{message:r}=Xe("MISSING_OR_INVALID",`pairing topic should be a string: ${t}`);throw new Error(r)}if(!this.client.core.pairing.pairings.keys.includes(t)){const{message:r}=Xe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${t}`);throw new Error(r)}if(ia(this.client.core.pairing.pairings.get(t).expiry)){const{message:r}=Xe("EXPIRED",`pairing topic: ${t}`);throw new Error(r)}}async isValidSessionTopic(t){if(!gr(t,!1)){const{message:r}=Xe("MISSING_OR_INVALID",`session topic should be a string: ${t}`);throw new Error(r)}if(!this.client.session.keys.includes(t)){const{message:r}=Xe("NO_MATCHING_KEY",`session topic doesn't exist: ${t}`);throw new Error(r)}if(ia(this.client.session.get(t).expiry)){await this.deleteSession(t);const{message:r}=Xe("EXPIRED",`session topic: ${t}`);throw new Error(r)}}async isValidSessionOrPairingTopic(t){if(this.client.session.keys.includes(t))await this.isValidSessionTopic(t);else if(this.client.core.pairing.pairings.keys.includes(t))this.isValidPairingTopic(t);else if(gr(t,!1)){const{message:r}=Xe("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${t}`);throw new Error(r)}else{const{message:r}=Xe("MISSING_OR_INVALID",`session or pairing topic should be a string: ${t}`);throw new Error(r)}}async isValidProposalId(t){if(!BW(t)){const{message:r}=Xe("MISSING_OR_INVALID",`proposal id should be a number: ${t}`);throw new Error(r)}if(!this.client.proposal.keys.includes(t)){const{message:r}=Xe("NO_MATCHING_KEY",`proposal id doesn't exist: ${t}`);throw new Error(r)}if(ia(this.client.proposal.get(t).expiry)){await this.deleteProposal(t);const{message:r}=Xe("EXPIRED",`proposal id: ${t}`);throw new Error(r)}}}class DPe extends yb{constructor(t,r){super(t,r,uq,bb),this.core=t,this.logger=r}}let MPe=class extends yb{constructor(t,r){super(t,r,dq,bb),this.core=t,this.logger=r}};class RPe extends yb{constructor(t,r){super(t,r,hq,bb,n=>n.id),this.core=t,this.logger=r}}let vq=class gq extends T8e{constructor(t){super(t),this.protocol=l8,this.version=c8,this.name=C1.name,this.events=new ni.EventEmitter,this.on=(n,o)=>this.events.on(n,o),this.once=(n,o)=>this.events.once(n,o),this.off=(n,o)=>this.events.off(n,o),this.removeListener=(n,o)=>this.events.removeListener(n,o),this.removeAllListeners=n=>this.events.removeAllListeners(n),this.connect=async n=>{try{return await this.engine.connect(n)}catch(o){throw this.logger.error(o.message),o}},this.pair=async n=>{try{return await this.engine.pair(n)}catch(o){throw this.logger.error(o.message),o}},this.approve=async n=>{try{return await this.engine.approve(n)}catch(o){throw this.logger.error(o.message),o}},this.reject=async n=>{try{return await this.engine.reject(n)}catch(o){throw this.logger.error(o.message),o}},this.update=async n=>{try{return await this.engine.update(n)}catch(o){throw this.logger.error(o.message),o}},this.extend=async n=>{try{return await this.engine.extend(n)}catch(o){throw this.logger.error(o.message),o}},this.request=async n=>{try{return await this.engine.request(n)}catch(o){throw this.logger.error(o.message),o}},this.respond=async n=>{try{return await this.engine.respond(n)}catch(o){throw this.logger.error(o.message),o}},this.ping=async n=>{try{return await this.engine.ping(n)}catch(o){throw this.logger.error(o.message),o}},this.emit=async n=>{try{return await this.engine.emit(n)}catch(o){throw this.logger.error(o.message),o}},this.disconnect=async n=>{try{return await this.engine.disconnect(n)}catch(o){throw this.logger.error(o.message),o}},this.find=n=>{try{return this.engine.find(n)}catch(o){throw this.logger.error(o.message),o}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}},this.name=(t==null?void 0:t.name)||C1.name,this.metadata=(t==null?void 0:t.metadata)||aW();const r=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:I4(Mt.getDefaultLoggerOptions({level:(t==null?void 0:t.logger)||C1.logger}));this.core=(t==null?void 0:t.core)||new wPe(t),this.logger=Mt.generateChildLogger(r,this.name),this.session=new MPe(this.core,this.logger),this.proposal=new DPe(this.core,this.logger),this.pendingRequest=new RPe(this.core,this.logger),this.engine=new TPe(this)}static async init(t){const r=new gq(t);return await r.initialize(),r}get context(){return Mt.getLoggerContext(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.logger.info("SignClient Initialization Success")}catch(t){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(t.message),t}}};const NPe=vq,FPe=Object.freeze(Object.defineProperty({__proto__:null,ENGINE_CONTEXT:pq,ENGINE_RPC_OPTS:xc,HISTORY_CONTEXT:SPe,HISTORY_EVENTS:EPe,HISTORY_STORAGE_VERSION:CPe,PROPOSAL_CONTEXT:uq,PROPOSAL_EXPIRY:PPe,PROPOSAL_EXPIRY_MESSAGE:fq,REQUEST_CONTEXT:hq,SESSION_CONTEXT:dq,SESSION_EXPIRY:cd,SESSION_REQUEST_EXPIRY_BOUNDARIES:P1,SIGN_CLIENT_CONTEXT:u8,SIGN_CLIENT_DEFAULT:C1,SIGN_CLIENT_EVENTS:xPe,SIGN_CLIENT_PROTOCOL:l8,SIGN_CLIENT_STORAGE_OPTIONS:_Pe,SIGN_CLIENT_STORAGE_PREFIX:bb,SIGN_CLIENT_VERSION:c8,SignClient:NPe,default:vq},Symbol.toStringTag,{value:"Module"})),BPe=Ll(FPe),jPe=Ll(C9e);var To={},EI;function mq(){return EI||(EI=1,Object.defineProperty(To,"__esModule",{value:!0}),To.RELAY_URL=To.LOGGER=To.RELAY_METHODS=To.PROVIDER_NAMESPACE=void 0,To.PROVIDER_NAMESPACE="alephium",To.RELAY_METHODS=["alph_signAndSubmitTransferTx","alph_signAndSubmitDeployContractTx","alph_signAndSubmitExecuteScriptTx","alph_signAndSubmitUnsignedTx","alph_signUnsignedTx","alph_signMessage","alph_requestNodeApi","alph_requestExplorerApi"],To.LOGGER="error",To.RELAY_URL="wss://relay.walletconnect.com"),To}var SI;function LPe(){if(SI)return Tr;SI=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.parseAccount=Tr.formatAccount=Tr.parseChain=Tr.formatChain=Tr.isCompatibleAddressGroup=Tr.isCompatibleChain=Tr.WalletConnectProvider=void 0;const e=Rn,t=e.__importDefault(MH()),r=e.__importDefault(BPe),n=jPe,o=Gs(),i=mq();class a extends o.SignerProvider{static async init(h){const y=new a(h);return await y.initialize(),y}constructor(h){super(),this.events=new t.default,this.account=void 0,this.requestNodeAPI=y=>this.typedRequest("alph_requestNodeApi",y),this.requestExplorerAPI=y=>this.typedRequest("alph_requestExplorerApi",y),this.providerOpts=h,this.networkId=h.networkId,this.addressGroup=h.addressGroup,this.permittedChain=c(this.networkId,this.addressGroup),this.methods=h.methods??[...i.RELAY_METHODS],this.methods.includes("alph_requestNodeApi")?this.nodeProvider=o.NodeProvider.Remote(this.requestNodeAPI):this.nodeProvider=void 0,this.methods.includes("alph_requestExplorerApi")?this.explorerProvider=o.ExplorerProvider.Remote(this.requestExplorerAPI):this.explorerProvider=void 0}async connect(){const{uri:h,approval:y}=await this.client.connect({requiredNamespaces:{alephium:{chains:[this.permittedChain],methods:this.methods,events:["accountChanged"]}}});h&&this.emitEvents("displayUri",h),this.session=await y(),this.updateNamespace(this.session.namespaces)}async disconnect(){if(!this.client)throw new Error("Sign Client not initialized");await this.providerOpts.onDisconnected(),await this.client.disconnect({topic:this.session.topic,reason:(0,n.getSdkError)("USER_DISCONNECTED")})}on(h,y){this.events.on(h,y)}once(h,y){this.events.once(h,y)}removeListener(h,y){this.events.removeListener(h,y)}off(h,y){this.events.off(h,y)}unsafeGetSelectedAccount(){if(this.account===void 0)throw Error("Account is not available");return Promise.resolve(this.account)}async signAndSubmitTransferTx(h){return this.typedRequest("alph_signAndSubmitTransferTx",h)}async signAndSubmitDeployContractTx(h){return this.typedRequest("alph_signAndSubmitDeployContractTx",h)}async signAndSubmitExecuteScriptTx(h){return this.typedRequest("alph_signAndSubmitExecuteScriptTx",h)}async signAndSubmitUnsignedTx(h){return this.typedRequest("alph_signAndSubmitUnsignedTx",h)}async signUnsignedTx(h){return this.typedRequest("alph_signUnsignedTx",h)}async signMessage(h){return this.typedRequest("alph_signMessage",h)}async initialize(){await this.createClient(),this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await r.default.init({logger:this.providerOpts.logger||i.LOGGER,relayUrl:this.providerOpts.relayUrl||i.RELAY_URL,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata})}checkStorage(){if(this.client.session.length){const h=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[h])}}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",h=>{this.emitEvents("session_ping",h)}),this.client.on("session_event",h=>{this.emitEvents("session_event",h)}),this.client.on("session_update",({topic:h,params:y})=>{var m;const{namespaces:_}=y,b=(m=this.client)==null?void 0:m.session.get(h);this.session={...b,namespaces:_},this.updateNamespace(this.session.namespaces),this.emitEvents("session_update",{topic:h,params:y})}),this.client.on("session_delete",()=>{this.emitEvents("session_delete")})}emitEvents(h,y){this.events.emit(h,y)}typedRequest(h,y){return this.request({method:h,params:y})}async request(h){var y,_;if(!this.methods.includes(h.method))return Promise.reject(new Error(`Invalid method was passed: ${h.method}`));if(!h.method.startsWith("alph_request")){const b=(y=h.params)==null?void 0:y.signerAddress;if(typeof b>"u")throw new Error("Cannot request without signerAddress");const m=(await this.getSelectedAccount()).address;if(b!==m)throw new Error(`Invalid signer address: ${h.params.signerAddress}`)}try{return await this.client.request({request:{method:h.method,params:h.params},chainId:this.permittedChain,topic:(_=this.session)==null?void 0:_.topic})}catch(b){throw b.message?new Error(b.message):b}}updateNamespace(h){const y=(0,n.getChainsFromNamespaces)(h,[i.PROVIDER_NAMESPACE]);this.setChain(y);const _=(0,n.getAccountsFromNamespaces)(h,[i.PROVIDER_NAMESPACE]);this.setAccounts(_)}sameChains(h,y){return typeof y>"u"?!1:h.join()===y.join()}setChain(h){if(!this.sameChains(h,[this.permittedChain]))throw Error("Network or address group has changed")}sameAccounts(h,y){return typeof y>"u"?!1:h.map(_=>_.address).join()===y.map(_=>_.address).join()}setAccounts(h){const y=h.map(d);if(this.sameAccounts(y,this.lastSetAccounts))return;if(this.lastSetAccounts=y,y.length!==1)throw Error("The WC provider does not supports multiple accounts");const _=y[0];if(!l(_.group,this.addressGroup))throw Error("The new account belongs to an unexpected address group");this.account=_,this.emitEvents("accountChanged",_)}}Tr.WalletConnectProvider=a;function s(p){return p.startsWith(`${i.PROVIDER_NAMESPACE}:`)}Tr.isCompatibleChain=s;function l(p,h){return h===void 0||h===p}Tr.isCompatibleAddressGroup=l;function c(p,h){if(h!==void 0&&h<0)throw Error("Address group in provider needs to be either undefined or non-negative");const y=h!==void 0?h:-1;return`${i.PROVIDER_NAMESPACE}:${p}/${y}`}Tr.formatChain=c;function u(p){const[h,y,_]=p.replace(/\//g,":").split(":"),b=parseInt(_,10);if(b<-1)throw Error("Address group in protocol needs to be either -1 or non-negative");const m=o.networkIds;if(!m.includes(y))throw Error(`Invalid network id, expect one of ${m}`);return{networkId:y,addressGroup:b===-1?void 0:b}}Tr.parseChain=u;function f(p,h){return`${p}:${h.publicKey}/${h.keyType}`}Tr.formatAccount=f;function d(p){const[h,y,_,b,m]=p.replace(/\//g,":").split(":"),E=(0,o.addressFromPublicKey)(b),A=(0,o.groupOfAddress)(E);if(m!=="default"&&m!=="bip340-schnorr")throw Error(`Invalid key type: ${m}`);return{address:E,group:A,publicKey:b,keyType:m}}return Tr.parseAccount=d,Tr}var Nw={},CI;function zPe(){if(CI)return Nw;CI=1,Object.defineProperty(Nw,"__esModule",{value:!0});const e=Gs();return(0,e.assertType)(),(0,e.assertType)(),Nw}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Rn;t.__exportStar(LPe(),e),t.__exportStar(mq(),e),t.__exportStar(zPe(),e)})(Q3);var f8={};Object.defineProperty(f8,"__esModule",{value:!0});var yq=f8.getWindowMetadata=void 0;const PI=Ft;function UPe(){let e,t;try{e=PI.getDocumentOrThrow(),t=PI.getLocationOrThrow()}catch{return null}function r(){const f=e.getElementsByTagName("link"),d=[];for(let p=0;p-1){const _=h.getAttribute("href");if(_)if(_.toLowerCase().indexOf("https:")===-1&&_.toLowerCase().indexOf("http:")===-1&&_.indexOf("//")!==0){let b=t.protocol+"//"+t.host;if(_.indexOf("/")===0)b+=_;else{const m=t.pathname.split("/");m.pop();const E=m.join("/");b+=E+"/"+_}d.push(b)}else if(_.indexOf("//")===0){const b=t.protocol+_;d.push(b)}else d.push(_)}}return d}function n(...f){const d=e.getElementsByTagName("meta");for(let p=0;ph.getAttribute(_)).filter(_=>_?f.includes(_):!1);if(y.length&&y){const _=h.getAttribute("content");if(_)return _}}return""}function o(){let f=n("name","og:site_name","og:title","twitter:title");return f||(f=e.title),f}function i(){return n("description","og:description","twitter:description","keywords")}const a=o(),s=i(),l=t.origin,c=r();return{description:s,url:l,icons:c,name:a}}yq=f8.getWindowMetadata=UPe;var qt={};Object.defineProperty(qt,"__esModule",{value:!0});var bq=qt.getLocalStorage=Iq=qt.getLocalStorageOrThrow=kq=qt.getCrypto=Aq=qt.getCryptoOrThrow=Oq=qt.getLocation=Pq=qt.getLocationOrThrow=Cq=qt.getNavigator=Sq=qt.getNavigatorOrThrow=Eq=qt.getDocument=_q=qt.getDocumentOrThrow=xq=qt.getFromWindowOrThrow=wq=qt.getFromWindow=void 0;function rc(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}var wq=qt.getFromWindow=rc;function af(e){const t=rc(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}var xq=qt.getFromWindowOrThrow=af;function HPe(){return af("document")}var _q=qt.getDocumentOrThrow=HPe;function VPe(){return rc("document")}var Eq=qt.getDocument=VPe;function WPe(){return af("navigator")}var Sq=qt.getNavigatorOrThrow=WPe;function qPe(){return rc("navigator")}var Cq=qt.getNavigator=qPe;function GPe(){return af("location")}var Pq=qt.getLocationOrThrow=GPe;function KPe(){return rc("location")}var Oq=qt.getLocation=KPe;function YPe(){return af("crypto")}var Aq=qt.getCryptoOrThrow=YPe;function XPe(){return rc("crypto")}var kq=qt.getCrypto=XPe;function ZPe(){return af("localStorage")}var Iq=qt.getLocalStorageOrThrow=ZPe;function JPe(){return rc("localStorage")}bq=qt.getLocalStorage=JPe;var QPe=globalThis&&globalThis.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new oOe:typeof navigator<"u"?kI(navigator.userAgent):fOe()}function cOe(e){return e!==""&&sOe.reduce(function(t,r){var n=r[0],o=r[1];if(t)return t;var i=o.exec(e);return!!i&&[n,i]},!1)}function kI(e){var t=cOe(e);if(!t)return null;var r=t[0],n=t[1];if(r==="searchbot")return new nOe;var o=n[1]&&n[1].split(/[._]/).slice(0,3);o?o.length1:!1}function pOe(){return wb()?$q()||Tq():!1}function Dq(){const e=d8();return e&&e.name?e.name.toLowerCase()==="node":!1}function hOe(){return!Dq()&&!!Mq()}const vOe=wq,gOe=xq,mOe=_q,yOe=Eq,bOe=Sq,Mq=Cq,wOe=Pq,xOe=Oq,_Oe=Aq,EOe=kq,SOe=Iq,xb=bq;function COe(){return yq()}function POe(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return JSON.parse(e)}catch{return e}}function OOe(e){return typeof e=="string"?e:JSON.stringify(e)}const Rq=POe,Nq=OOe;function Fq(e,t){const r=Nq(t),n=xb();n&&n.setItem(e,r)}function AOe(e){let t=null,r=null;const n=xb();return n&&(r=n.getItem(e)),t=r&&Rq(r),t}function kOe(e){const t=xb();t&&t.removeItem(e)}const Bq="WALLETCONNECT_DEEPLINK_CHOICE";function IOe(e,t){const r=encodeURIComponent(e);return t.universalLink?`${t.universalLink}/wc?uri=${r}`:t.deepLink?`${t.deepLink}${t.deepLink.endsWith(":")?"//":"/"}wc?uri=${r}`:""}function $Oe(e){const t=e.href.split("?")[0];Fq(Bq,Object.assign(Object.assign({},e),{href:t}))}function jq(e,t){return e.filter(r=>r.name.toLowerCase().includes(t.toLowerCase()))[0]}function TOe(e,t){let r=e;return t&&(r=t.map(n=>jq(e,n)).filter(Boolean)),r}const Lq="https://registry.walletconnect.com";function DOe(){return Lq+"/api/v2/wallets"}function MOe(){return Lq+"/api/v2/dapps"}function zq(e,t="mobile"){var r;return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:(r=e.image_url.sm)!==null&&r!==void 0?r:"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}function ROe(e,t="mobile"){return Object.values(e).filter(r=>!!r[t].universal||!!r[t].native).map(r=>zq(r,t))}const NOe=Object.freeze(Object.defineProperty({__proto__:null,detectEnv:d8,detectOS:wb,formatIOSMobile:IOe,formatMobileRegistry:ROe,formatMobileRegistryEntry:zq,getClientMeta:COe,getCrypto:EOe,getCryptoOrThrow:_Oe,getDappRegistryUrl:MOe,getDocument:yOe,getDocumentOrThrow:mOe,getFromWindow:vOe,getFromWindowOrThrow:gOe,getLocal:AOe,getLocalStorage:xb,getLocalStorageOrThrow:SOe,getLocation:xOe,getLocationOrThrow:wOe,getMobileLinkRegistry:TOe,getMobileRegistryEntry:jq,getNavigator:Mq,getNavigatorOrThrow:bOe,getWalletRegistryUrl:DOe,isAndroid:$q,isBrowser:hOe,isIOS:Tq,isMobile:pOe,isNode:Dq,mobileLinkChoiceKey:Bq,removeLocal:kOe,safeJsonParse:Rq,safeJsonStringify:Nq,saveMobileLinkInfo:$Oe,setLocal:Fq},Symbol.toStringTag,{value:"Module"})),FOe=Ll(NOe);var yh={},BOe=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Uq={},Xs={},jOe={}.toString,p8=Array.isArray||function(e){return jOe.call(e)=="[object Array]"},LOe=p8;function zOe(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},e.foo()===42}catch{return!1}}xt.TYPED_ARRAY_SUPPORT=zOe();var II=xt.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function xt(e,t,r){return!xt.TYPED_ARRAY_SUPPORT&&!(this instanceof xt)?new xt(e,t,r):typeof e=="number"?Hq(this,e):KOe(this,e,t,r)}xt.TYPED_ARRAY_SUPPORT&&(xt.prototype.__proto__=Uint8Array.prototype,xt.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&xt[Symbol.species]===xt&&Object.defineProperty(xt,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function h8(e){if(e>=II)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+II.toString(16)+" bytes");return e|0}function UOe(e){return e!==e}function Au(e,t){var r;return xt.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=xt.prototype):(r=e,r===null&&(r=new xt(t)),r.length=t),r}function Hq(e,t){var r=Au(e,t<0?0:h8(t)|0);if(!xt.TYPED_ARRAY_SUPPORT)for(var n=0;n55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function Wq(e){if(xt.isBuffer(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var t=e.length;return t===0?0:Vq(e).length}function qOe(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function GOe(e,t,r,n){return qOe(Vq(t,e.length-r),e,r,n)}function KOe(e,t,r,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer?VOe(e,t,r,n):typeof t=="string"?HOe(e,t):WOe(e,t)}xt.prototype.write=function(t,r,n){r===void 0?(n=this.length,r=0):n===void 0&&typeof r=="string"?(n=this.length,r=0):isFinite(r)&&(r=r|0,isFinite(n)?n=n|0:n=void 0);var o=this.length-r;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");return GOe(this,t,r,n)};xt.prototype.slice=function(t,r){var n=this.length;t=~~t,r=r===void 0?n:~~r,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r=t.length&&(r=t.length),r||(r=0),o>0&&o=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-r=0;--a)t[a+r]=this[a+n];else if(i<1e3||!xt.TYPED_ARRAY_SUPPORT)for(a=0;a>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var i;if(typeof t=="number")for(i=r;i40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};to.getSymbolTotalCodewords=function(t){return YOe[t]};to.getBCHDigit=function(e){for(var t=0;e!==0;)t++,e>>>=1;return t};to.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');v8=t};to.isKanjiModeEnabled=function(){return typeof v8<"u"};to.toSJIS=function(t){return v8(t)};var _b={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");var n=r.toLowerCase();switch(n){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},e.from=function(n,o){if(e.isValid(n))return n;try{return t(n)}catch{return o}}})(_b);function qq(){this.buffer=[],this.length=0}qq.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(var r=0;r>>t-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var XOe=qq,$I=Xs;function bh(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=$I.alloc(e*e),this.reservedBit=$I.alloc(e*e)}bh.prototype.set=function(e,t,r,n){var o=e*this.size+t;this.data[o]=r,n&&(this.reservedBit[o]=!0)};bh.prototype.get=function(e,t){return this.data[e*this.size+t]};bh.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r};bh.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var ZOe=bh,Gq={};(function(e){var t=to.getSymbolSize;e.getRowColCoords=function(n){if(n===1)return[];for(var o=Math.floor(n/7)+2,i=t(n),a=i===145?26:Math.ceil((i-13)/(2*o-2))*2,s=[i-7],l=1;l=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){for(var i=o.size,a=0,s=0,l=0,c=null,u=null,f=0;f=5&&(a+=t.N1+(s-5)),c=p,s=1),p=o.get(d,f),p===u?l++:(l>=5&&(a+=t.N1+(l-5)),u=p,l=1)}s>=5&&(a+=t.N1+(s-5)),l>=5&&(a+=t.N1+(l-5))}return a},e.getPenaltyN2=function(o){for(var i=o.size,a=0,s=0;s=10&&(s===1488||s===93)&&a++,l=l<<1&2047|o.get(u,c),u>=10&&(l===1488||l===93)&&a++}return a*t.N3},e.getPenaltyN4=function(o){for(var i=0,a=o.data.length,s=0;s=0;){for(var s=a[0],l=0;l - * @license MIT - */(function(e){var t=ch,r=Ry,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50;var o=2147483647;e.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var X=new Uint8Array(1),M={foo:function(){return 42}};return Object.setPrototypeOf(M,Uint8Array.prototype),Object.setPrototypeOf(X,M),X.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(X){if(X>o)throw new RangeError('The value "'+X+'" is invalid for option "size"');var M=new Uint8Array(X);return Object.setPrototypeOf(M,s.prototype),M}function s(X,M,z){if(typeof X=="number"){if(typeof M=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(X)}return l(X,M,z)}s.poolSize=8192;function l(X,M,z){if(typeof X=="string")return d(X,M);if(ArrayBuffer.isView(X))return h(X);if(X==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X);if(se(X,ArrayBuffer)||X&&se(X.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(se(X,SharedArrayBuffer)||X&&se(X.buffer,SharedArrayBuffer)))return y(X,M,z);if(typeof X=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Z=X.valueOf&&X.valueOf();if(Z!=null&&Z!==X)return s.from(Z,M,z);var Q=_(X);if(Q)return Q;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof X[Symbol.toPrimitive]=="function")return s.from(X[Symbol.toPrimitive]("string"),M,z);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X)}s.from=function(X,M,z){return l(X,M,z)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(X){if(typeof X!="number")throw new TypeError('"size" argument must be of type number');if(X<0)throw new RangeError('The value "'+X+'" is invalid for option "size"')}function u(X,M,z){return c(X),X<=0?a(X):M!==void 0?typeof z=="string"?a(X).fill(M,z):a(X).fill(M):a(X)}s.alloc=function(X,M,z){return u(X,M,z)};function f(X){return c(X),a(X<0?0:b(X)|0)}s.allocUnsafe=function(X){return f(X)},s.allocUnsafeSlow=function(X){return f(X)};function d(X,M){if((typeof M!="string"||M==="")&&(M="utf8"),!s.isEncoding(M))throw new TypeError("Unknown encoding: "+M);var z=E(X,M)|0,Z=a(z),Q=Z.write(X,M);return Q!==z&&(Z=Z.slice(0,Q)),Z}function p(X){for(var M=X.length<0?0:b(X.length)|0,z=a(M),Z=0;Z=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return X|0}function m(X){return+X!=X&&(X=0),s.alloc(+X)}s.isBuffer=function(M){return M!=null&&M._isBuffer===!0&&M!==s.prototype},s.compare=function(M,z){if(se(M,Uint8Array)&&(M=s.from(M,M.offset,M.byteLength)),se(z,Uint8Array)&&(z=s.from(z,z.offset,z.byteLength)),!s.isBuffer(M)||!s.isBuffer(z))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(M===z)return 0;for(var Z=M.length,Q=z.length,de=0,we=Math.min(Z,Q);deQ.length?s.from(we).copy(Q,de):Uint8Array.prototype.set.call(Q,we,de);else if(s.isBuffer(we))we.copy(Q,de);else throw new TypeError('"list" argument must be an Array of Buffers');de+=we.length}return Q};function E(X,M){if(s.isBuffer(X))return X.length;if(ArrayBuffer.isView(X)||se(X,ArrayBuffer))return X.byteLength;if(typeof X!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof X);var z=X.length,Z=arguments.length>2&&arguments[2]===!0;if(!Z&&z===0)return 0;for(var Q=!1;;)switch(M){case"ascii":case"latin1":case"binary":return z;case"utf8":case"utf-8":return oe(X).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z*2;case"hex":return z>>>1;case"base64":return G(X).length;default:if(Q)return Z?-1:oe(X).length;M=(""+M).toLowerCase(),Q=!0}}s.byteLength=E;function A(X,M,z){var Z=!1;if((M===void 0||M<0)&&(M=0),M>this.length||((z===void 0||z>this.length)&&(z=this.length),z<=0)||(z>>>=0,M>>>=0,z<=M))return"";for(X||(X="utf8");;)switch(X){case"hex":return U(this,M,z);case"utf8":case"utf-8":return v(this,M,z);case"ascii":return R(this,M,z);case"latin1":case"binary":return L(this,M,z);case"base64":return C(this,M,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,M,z);default:if(Z)throw new TypeError("Unknown encoding: "+X);X=(X+"").toLowerCase(),Z=!0}}s.prototype._isBuffer=!0;function D(X,M,z){var Z=X[M];X[M]=X[z],X[z]=Z}s.prototype.swap16=function(){var M=this.length;if(M%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var z=0;zz&&(M+=" ... "),""},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(M,z,Z,Q,de){if(se(M,Uint8Array)&&(M=s.from(M,M.offset,M.byteLength)),!s.isBuffer(M))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof M);if(z===void 0&&(z=0),Z===void 0&&(Z=M?M.length:0),Q===void 0&&(Q=0),de===void 0&&(de=this.length),z<0||Z>M.length||Q<0||de>this.length)throw new RangeError("out of range index");if(Q>=de&&z>=Z)return 0;if(Q>=de)return-1;if(z>=Z)return 1;if(z>>>=0,Z>>>=0,Q>>>=0,de>>>=0,this===M)return 0;for(var we=de-Q,Se=Z-z,Ee=Math.min(we,Se),Ae=this.slice(Q,de),Te=M.slice(z,Z),H=0;H2147483647?z=2147483647:z<-2147483648&&(z=-2147483648),z=+z,pe(z)&&(z=Q?0:X.length-1),z<0&&(z=X.length+z),z>=X.length){if(Q)return-1;z=X.length-1}else if(z<0)if(Q)z=0;else return-1;if(typeof M=="string"&&(M=s.from(M,Z)),s.isBuffer(M))return M.length===0?-1:g(X,M,z,Z,Q);if(typeof M=="number")return M=M&255,typeof Uint8Array.prototype.indexOf=="function"?Q?Uint8Array.prototype.indexOf.call(X,M,z):Uint8Array.prototype.lastIndexOf.call(X,M,z):g(X,[M],z,Z,Q);throw new TypeError("val must be string, number or Buffer")}function g(X,M,z,Z,Q){var de=1,we=X.length,Se=M.length;if(Z!==void 0&&(Z=String(Z).toLowerCase(),Z==="ucs2"||Z==="ucs-2"||Z==="utf16le"||Z==="utf-16le")){if(X.length<2||M.length<2)return-1;de=2,we/=2,Se/=2,z/=2}function Ee(k,Y){return de===1?k[Y]:k.readUInt16BE(Y*de)}var Ae;if(Q){var Te=-1;for(Ae=z;Aewe&&(z=we-Se),Ae=z;Ae>=0;Ae--){for(var H=!0,x=0;xQ&&(Z=Q)):Z=Q;var de=M.length;Z>de/2&&(Z=de/2);for(var we=0;we>>0,isFinite(Z)?(Z=Z>>>0,Q===void 0&&(Q="utf8")):(Q=Z,Z=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var de=this.length-z;if((Z===void 0||Z>de)&&(Z=de),M.length>0&&(Z<0||z<0)||z>this.length)throw new RangeError("Attempt to write outside buffer bounds");Q||(Q="utf8");for(var we=!1;;)switch(Q){case"hex":return N(this,M,z,Z);case"utf8":case"utf-8":return V(this,M,z,Z);case"ascii":case"latin1":case"binary":return K(this,M,z,Z);case"base64":return W(this,M,z,Z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,M,z,Z);default:if(we)throw new TypeError("Unknown encoding: "+Q);Q=(""+Q).toLowerCase(),we=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(X,M,z){return M===0&&z===X.length?t.fromByteArray(X):t.fromByteArray(X.slice(M,z))}function v(X,M,z){z=Math.min(X.length,z);for(var Z=[],Q=M;Q239?4:de>223?3:de>191?2:1;if(Q+Se<=z){var Ee,Ae,Te,H;switch(Se){case 1:de<128&&(we=de);break;case 2:Ee=X[Q+1],(Ee&192)===128&&(H=(de&31)<<6|Ee&63,H>127&&(we=H));break;case 3:Ee=X[Q+1],Ae=X[Q+2],(Ee&192)===128&&(Ae&192)===128&&(H=(de&15)<<12|(Ee&63)<<6|Ae&63,H>2047&&(H<55296||H>57343)&&(we=H));break;case 4:Ee=X[Q+1],Ae=X[Q+2],Te=X[Q+3],(Ee&192)===128&&(Ae&192)===128&&(Te&192)===128&&(H=(de&15)<<18|(Ee&63)<<12|(Ae&63)<<6|Te&63,H>65535&&H<1114112&&(we=H))}}we===null?(we=65533,Se=1):we>65535&&(we-=65536,Z.push(we>>>10&1023|55296),we=56320|we&1023),Z.push(we),Q+=Se}return B(Z)}var w=4096;function B(X){var M=X.length;if(M<=w)return String.fromCharCode.apply(String,X);for(var z="",Z=0;ZZ)&&(z=Z);for(var Q="",de=M;deZ&&(M=Z),z<0?(z+=Z,z<0&&(z=0)):z>Z&&(z=Z),zz)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(M,z,Z){M=M>>>0,z=z>>>0,Z||F(M,z,this.length);for(var Q=this[M],de=1,we=0;++we>>0,z=z>>>0,Z||F(M,z,this.length);for(var Q=this[M+--z],de=1;z>0&&(de*=256);)Q+=this[M+--z]*de;return Q},s.prototype.readUint8=s.prototype.readUInt8=function(M,z){return M=M>>>0,z||F(M,1,this.length),this[M]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(M,z){return M=M>>>0,z||F(M,2,this.length),this[M]|this[M+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(M,z){return M=M>>>0,z||F(M,2,this.length),this[M]<<8|this[M+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(M,z){return M=M>>>0,z||F(M,4,this.length),(this[M]|this[M+1]<<8|this[M+2]<<16)+this[M+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(M,z){return M=M>>>0,z||F(M,4,this.length),this[M]*16777216+(this[M+1]<<16|this[M+2]<<8|this[M+3])},s.prototype.readIntLE=function(M,z,Z){M=M>>>0,z=z>>>0,Z||F(M,z,this.length);for(var Q=this[M],de=1,we=0;++we=de&&(Q-=Math.pow(2,8*z)),Q},s.prototype.readIntBE=function(M,z,Z){M=M>>>0,z=z>>>0,Z||F(M,z,this.length);for(var Q=z,de=1,we=this[M+--Q];Q>0&&(de*=256);)we+=this[M+--Q]*de;return de*=128,we>=de&&(we-=Math.pow(2,8*z)),we},s.prototype.readInt8=function(M,z){return M=M>>>0,z||F(M,1,this.length),this[M]&128?(255-this[M]+1)*-1:this[M]},s.prototype.readInt16LE=function(M,z){M=M>>>0,z||F(M,2,this.length);var Z=this[M]|this[M+1]<<8;return Z&32768?Z|4294901760:Z},s.prototype.readInt16BE=function(M,z){M=M>>>0,z||F(M,2,this.length);var Z=this[M+1]|this[M]<<8;return Z&32768?Z|4294901760:Z},s.prototype.readInt32LE=function(M,z){return M=M>>>0,z||F(M,4,this.length),this[M]|this[M+1]<<8|this[M+2]<<16|this[M+3]<<24},s.prototype.readInt32BE=function(M,z){return M=M>>>0,z||F(M,4,this.length),this[M]<<24|this[M+1]<<16|this[M+2]<<8|this[M+3]},s.prototype.readFloatLE=function(M,z){return M=M>>>0,z||F(M,4,this.length),r.read(this,M,!0,23,4)},s.prototype.readFloatBE=function(M,z){return M=M>>>0,z||F(M,4,this.length),r.read(this,M,!1,23,4)},s.prototype.readDoubleLE=function(M,z){return M=M>>>0,z||F(M,8,this.length),r.read(this,M,!0,52,8)},s.prototype.readDoubleBE=function(M,z){return M=M>>>0,z||F(M,8,this.length),r.read(this,M,!1,52,8)};function T(X,M,z,Z,Q,de){if(!s.isBuffer(X))throw new TypeError('"buffer" argument must be a Buffer instance');if(M>Q||MX.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(M,z,Z,Q){if(M=+M,z=z>>>0,Z=Z>>>0,!Q){var de=Math.pow(2,8*Z)-1;T(this,M,z,Z,de,0)}var we=1,Se=0;for(this[z]=M&255;++Se>>0,Z=Z>>>0,!Q){var de=Math.pow(2,8*Z)-1;T(this,M,z,Z,de,0)}var we=Z-1,Se=1;for(this[z+we]=M&255;--we>=0&&(Se*=256);)this[z+we]=M/Se&255;return z+Z},s.prototype.writeUint8=s.prototype.writeUInt8=function(M,z,Z){return M=+M,z=z>>>0,Z||T(this,M,z,1,255,0),this[z]=M&255,z+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(M,z,Z){return M=+M,z=z>>>0,Z||T(this,M,z,2,65535,0),this[z]=M&255,this[z+1]=M>>>8,z+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(M,z,Z){return M=+M,z=z>>>0,Z||T(this,M,z,2,65535,0),this[z]=M>>>8,this[z+1]=M&255,z+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(M,z,Z){return M=+M,z=z>>>0,Z||T(this,M,z,4,4294967295,0),this[z+3]=M>>>24,this[z+2]=M>>>16,this[z+1]=M>>>8,this[z]=M&255,z+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(M,z,Z){return M=+M,z=z>>>0,Z||T(this,M,z,4,4294967295,0),this[z]=M>>>24,this[z+1]=M>>>16,this[z+2]=M>>>8,this[z+3]=M&255,z+4},s.prototype.writeIntLE=function(M,z,Z,Q){if(M=+M,z=z>>>0,!Q){var de=Math.pow(2,8*Z-1);T(this,M,z,Z,de-1,-de)}var we=0,Se=1,Ee=0;for(this[z]=M&255;++we>0)-Ee&255;return z+Z},s.prototype.writeIntBE=function(M,z,Z,Q){if(M=+M,z=z>>>0,!Q){var de=Math.pow(2,8*Z-1);T(this,M,z,Z,de-1,-de)}var we=Z-1,Se=1,Ee=0;for(this[z+we]=M&255;--we>=0&&(Se*=256);)M<0&&Ee===0&&this[z+we+1]!==0&&(Ee=1),this[z+we]=(M/Se>>0)-Ee&255;return z+Z},s.prototype.writeInt8=function(M,z,Z){return M=+M,z=z>>>0,Z||T(this,M,z,1,127,-128),M<0&&(M=255+M+1),this[z]=M&255,z+1},s.prototype.writeInt16LE=function(M,z,Z){return M=+M,z=z>>>0,Z||T(this,M,z,2,32767,-32768),this[z]=M&255,this[z+1]=M>>>8,z+2},s.prototype.writeInt16BE=function(M,z,Z){return M=+M,z=z>>>0,Z||T(this,M,z,2,32767,-32768),this[z]=M>>>8,this[z+1]=M&255,z+2},s.prototype.writeInt32LE=function(M,z,Z){return M=+M,z=z>>>0,Z||T(this,M,z,4,2147483647,-2147483648),this[z]=M&255,this[z+1]=M>>>8,this[z+2]=M>>>16,this[z+3]=M>>>24,z+4},s.prototype.writeInt32BE=function(M,z,Z){return M=+M,z=z>>>0,Z||T(this,M,z,4,2147483647,-2147483648),M<0&&(M=4294967295+M+1),this[z]=M>>>24,this[z+1]=M>>>16,this[z+2]=M>>>8,this[z+3]=M&255,z+4};function q(X,M,z,Z,Q,de){if(z+Z>X.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("Index out of range")}function J(X,M,z,Z,Q){return M=+M,z=z>>>0,Q||q(X,M,z,4),r.write(X,M,z,Z,23,4),z+4}s.prototype.writeFloatLE=function(M,z,Z){return J(this,M,z,!0,Z)},s.prototype.writeFloatBE=function(M,z,Z){return J(this,M,z,!1,Z)};function te(X,M,z,Z,Q){return M=+M,z=z>>>0,Q||q(X,M,z,8),r.write(X,M,z,Z,52,8),z+8}s.prototype.writeDoubleLE=function(M,z,Z){return te(this,M,z,!0,Z)},s.prototype.writeDoubleBE=function(M,z,Z){return te(this,M,z,!1,Z)},s.prototype.copy=function(M,z,Z,Q){if(!s.isBuffer(M))throw new TypeError("argument should be a Buffer");if(Z||(Z=0),!Q&&Q!==0&&(Q=this.length),z>=M.length&&(z=M.length),z||(z=0),Q>0&&Q=this.length)throw new RangeError("Index out of range");if(Q<0)throw new RangeError("sourceEnd out of bounds");Q>this.length&&(Q=this.length),M.length-z>>0,Z=Z===void 0?this.length:Z>>>0,M||(M=0);var we;if(typeof M=="number")for(we=z;we55295&&z<57344){if(!Q){if(z>56319){(M-=3)>-1&&de.push(239,191,189);continue}else if(we+1===Z){(M-=3)>-1&&de.push(239,191,189);continue}Q=z;continue}if(z<56320){(M-=3)>-1&&de.push(239,191,189),Q=z;continue}z=(Q-55296<<10|z-56320)+65536}else Q&&(M-=3)>-1&&de.push(239,191,189);if(Q=null,z<128){if((M-=1)<0)break;de.push(z)}else if(z<2048){if((M-=2)<0)break;de.push(z>>6|192,z&63|128)}else if(z<65536){if((M-=3)<0)break;de.push(z>>12|224,z>>6&63|128,z&63|128)}else if(z<1114112){if((M-=4)<0)break;de.push(z>>18|240,z>>12&63|128,z>>6&63|128,z&63|128)}else throw new Error("Invalid code point")}return de}function ue(X){for(var M=[],z=0;z>8,Q=z%256,de.push(Q),de.push(Z);return de}function G(X){return t.toByteArray(ce(X))}function ee(X,M,z,Z){for(var Q=0;Q=M.length||Q>=X.length);++Q)M[Q+z]=X[Q];return Q}function se(X,M){return X instanceof M||X!=null&&X.constructor!=null&&X.constructor.name!=null&&X.constructor.name===M.name}function pe(X){return X!==X}var ge=function(){for(var X="0123456789abcdef",M=new Array(256),z=0;z<16;++z)for(var Z=z*16,Q=0;Q<16;++Q)M[Z+Q]=X[z]+X[Q];return M}()})(Jq);var DI=Xs,Qq=Xq,QOe=Jq.Buffer;function g8(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}g8.prototype.initialize=function(t){this.degree=t,this.genPoly=Qq.generateECPolynomial(this.degree)};g8.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var r=DI.alloc(this.degree),n=QOe.concat([t,r],t.length+this.degree),o=Qq.mod(n,this.genPoly),i=this.degree-o.length;if(i>0){var a=DI.alloc(this.degree);return o.copy(a,i),a}return o};var eAe=g8,eG={},Zs={},m8={};m8.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var Bi={},tG="[0-9]+",tAe="[A-Z $%*+\\-./:]+",kp="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";kp=kp.replace(/u/g,"\\u");var rAe="(?:(?![A-Z0-9 $%*+\\-./:]|"+kp+`)(?:.|[\r -]))+`;Bi.KANJI=new RegExp(kp,"g");Bi.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Bi.BYTE=new RegExp(rAe,"g");Bi.NUMERIC=new RegExp(tG,"g");Bi.ALPHANUMERIC=new RegExp(tAe,"g");var nAe=new RegExp("^"+kp+"$"),oAe=new RegExp("^"+tG+"$"),iAe=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Bi.testKanji=function(t){return nAe.test(t)};Bi.testNumeric=function(t){return oAe.test(t)};Bi.testAlphanumeric=function(t){return iAe.test(t)};(function(e){var t=m8,r=Bi;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,a){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?i.ccBits[0]:a<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return r.testNumeric(i)?e.NUMERIC:r.testAlphanumeric(i)?e.ALPHANUMERIC:r.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function n(o){if(typeof o!="string")throw new Error("Param is not a string");var i=o.toLowerCase();switch(i){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(i,a){if(e.isValid(i))return i;try{return n(i)}catch{return a}}})(Zs);(function(e){var t=to,r=Eb,n=_b,o=Zs,i=m8,a=p8,s=7973,l=t.getBCHDigit(s);function c(p,h,y){for(var _=1;_<=40;_++)if(h<=e.getCapacity(_,y,p))return _}function u(p,h){return o.getCharCountIndicator(p,h)+4}function f(p,h){var y=0;return p.forEach(function(_){var b=u(_.mode,h);y+=b+_.getBitsLength()}),y}function d(p,h){for(var y=1;y<=40;y++){var _=f(p,y);if(_<=e.getCapacity(y,h,o.MIXED))return y}}e.from=function(h,y){return i.isValid(h)?parseInt(h,10):y},e.getCapacity=function(h,y,_){if(!i.isValid(h))throw new Error("Invalid QR Code version");typeof _>"u"&&(_=o.BYTE);var b=t.getSymbolTotalCodewords(h),m=r.getTotalCodewordsCount(h,y),E=(b-m)*8;if(_===o.MIXED)return E;var A=E-u(_,h);switch(_){case o.NUMERIC:return Math.floor(A/10*3);case o.ALPHANUMERIC:return Math.floor(A/11*2);case o.KANJI:return Math.floor(A/13);case o.BYTE:default:return Math.floor(A/8)}},e.getBestVersionForData=function(h,y){var _,b=n.from(y,n.M);if(a(h)){if(h.length>1)return d(h,b);if(h.length===0)return 1;_=h[0]}else _=h;return c(_.mode,_.getLength(),b)},e.getEncodedBits=function(h){if(!i.isValid(h)||h<7)throw new Error("Invalid QR Code version");for(var y=h<<12;t.getBCHDigit(y)-l>=0;)y^=s<=0;)o^=nG<0&&(n=this.data.substr(r),o=parseInt(n,10),t.put(o,i*3+1))};var lAe=ku,cAe=Zs,Fw=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Iu(e){this.mode=cAe.ALPHANUMERIC,this.data=e}Iu.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};Iu.prototype.getLength=function(){return this.data.length};Iu.prototype.getBitsLength=function(){return Iu.getBitsLength(this.data.length)};Iu.prototype.write=function(t){var r;for(r=0;r+2<=this.data.length;r+=2){var n=Fw.indexOf(this.data[r])*45;n+=Fw.indexOf(this.data[r+1]),t.put(n,11)}this.data.length%2&&t.put(Fw.indexOf(this.data[r]),6)};var uAe=Iu,fAe=Xs,dAe=Zs;function $u(e){this.mode=dAe.BYTE,this.data=fAe.from(e)}$u.getBitsLength=function(t){return t*8};$u.prototype.getLength=function(){return this.data.length};$u.prototype.getBitsLength=function(){return $u.getBitsLength(this.data.length)};$u.prototype.write=function(e){for(var t=0,r=this.data.length;t=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` -Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),e.put(r,13)}};var gAe=Tu,iG={exports:{}};(function(e){var t={single_source_shortest_paths:function(r,n,o){var i={},a={};a[n]=0;var s=t.PriorityQueue.make();s.push(n,0);for(var l,c,u,f,d,p,h,y,_;!s.empty();){l=s.pop(),c=l.value,f=l.cost,d=r[c]||{};for(u in d)d.hasOwnProperty(u)&&(p=d[u],h=f+p,y=a[u],_=typeof a[u]>"u",(_||y>h)&&(a[u]=h,s.push(u,h),i[u]=c))}if(typeof o<"u"&&typeof a[o]>"u"){var b=["Could not find a path from ",n," to ",o,"."].join("");throw new Error(b)}return i},extract_shortest_path_from_predecessor_list:function(r,n){for(var o=[],i=n;i;)o.push(i),r[i],i=r[i];return o.reverse(),o},find_path:function(r,n,o){var i=t.single_source_shortest_paths(r,n,o);return t.extract_shortest_path_from_predecessor_list(i,o)},PriorityQueue:{make:function(r){var n=t.PriorityQueue,o={},i;r=r||{};for(i in n)n.hasOwnProperty(i)&&(o[i]=n[i]);return o.queue=[],o.sorter=r.sorter||n.default_sorter,o},default_sorter:function(r,n){return r.cost-n.cost},push:function(r,n){var o={value:r,cost:n};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(iG);var mAe=iG.exports;(function(e){var t=Zs,r=lAe,n=uAe,o=pAe,i=gAe,a=Bi,s=to,l=mAe;function c(b){return unescape(encodeURIComponent(b)).length}function u(b,m,E){for(var A=[],D;(D=b.exec(E))!==null;)A.push({data:D[0],index:D.index,mode:m,length:D[0].length});return A}function f(b){var m=u(a.NUMERIC,t.NUMERIC,b),E=u(a.ALPHANUMERIC,t.ALPHANUMERIC,b),A,D;s.isKanjiModeEnabled()?(A=u(a.BYTE,t.BYTE,b),D=u(a.KANJI,t.KANJI,b)):(A=u(a.BYTE_KANJI,t.BYTE,b),D=[]);var $=m.concat(E,A,D);return $.sort(function(g,N){return g.index-N.index}).map(function(g){return{data:g.data,mode:g.mode,length:g.length}})}function d(b,m){switch(m){case t.NUMERIC:return r.getBitsLength(b);case t.ALPHANUMERIC:return n.getBitsLength(b);case t.KANJI:return i.getBitsLength(b);case t.BYTE:return o.getBitsLength(b)}}function p(b){return b.reduce(function(m,E){var A=m.length-1>=0?m[m.length-1]:null;return A&&A.mode===E.mode?(m[m.length-1].data+=E.data,m):(m.push(E),m)},[])}function h(b){for(var m=[],E=0;E=0&&s<=6&&(l===0||l===6)||l>=0&&l<=6&&(s===0||s===6)||s>=2&&s<=4&&l>=2&&l<=4?e.set(i+s,a+l,!0,!0):e.set(i+s,a+l,!1,!0))}function OAe(e){for(var t=e.size,r=8;r>s&1)===1,e.set(o,i,a,!0),e.set(i,o,a,!0)}function Lw(e,t,r){var n=e.size,o=EAe.getEncodedBits(t,r),i,a;for(i=0;i<15;i++)a=(o>>i&1)===1,i<6?e.set(i,8,a,!0):i<8?e.set(i+1,8,a,!0):e.set(n-15+i,8,a,!0),i<8?e.set(8,n-i-1,a,!0):i<9?e.set(8,15-i-1+1,a,!0):e.set(8,15-i-1,a,!0);e.set(n-8,8,1,!0)}function IAe(e,t){for(var r=e.size,n=-1,o=r-1,i=7,a=0,s=r-1;s>0;s-=2)for(s===6&&s--;;){for(var l=0;l<2;l++)if(!e.isReserved(o,s-l)){var c=!1;a>>i&1)===1),e.set(o,s-l,c),i--,i===-1&&(a++,i=7)}if(o+=n,o<0||r<=o){o-=n,n=-n;break}}}function $Ae(e,t,r){var n=new yAe;r.forEach(function(c){n.put(c.mode.bit,4),n.put(c.getLength(),SAe.getCharCountIndicator(c.mode,e)),c.write(n)});var o=Cb.getSymbolTotalCodewords(e),i=xx.getTotalCodewordsCount(e,t),a=(o-i)*8;for(n.getLengthInBits()+4<=a&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);for(var s=(a-n.getLengthInBits())/8,l=0;l=7&&kAe(u,t),IAe(u,l),isNaN(n)&&(n=wx.getBestMask(u,Lw.bind(null,u,r))),wx.applyMask(n,u),Lw(u,r,n),{modules:u,version:t,errorCorrectionLevel:r,maskPattern:n,segments:o}}Uq.create=function(t,r){if(typeof t>"u"||t==="")throw new Error("No input text");var n=Bw.M,o,i;return typeof r<"u"&&(n=Bw.from(r.errorCorrectionLevel,Bw.M),o=_m.from(r.version),i=wx.from(r.maskPattern),r.toSJISFunc&&Cb.setToSJISFunction(r.toSJISFunc)),DAe(t,o,n,i)};var aG={},y8={};(function(e){function t(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");var n=r.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+r);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(i){return[i,i]}))),n.length===6&&n.push("F","F");var o=parseInt(n.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+n.slice(0,6).join("")}}e.getOptions=function(n){n||(n={}),n.color||(n.color={});var o=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,i=n.width&&n.width>=21?n.width:void 0,a=n.scale||4;return{width:i,scale:i?4:a,margin:o,color:{dark:t(n.color.dark||"#000000ff"),light:t(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},e.getScale=function(n,o){return o.width&&o.width>=n+o.margin*2?o.width/(n+o.margin*2):o.scale},e.getImageWidth=function(n,o){var i=e.getScale(n,o);return Math.floor((n+o.margin*2)*i)},e.qrToImageData=function(n,o,i){for(var a=o.modules.size,s=o.modules.data,l=e.getScale(a,i),c=Math.floor((a+i.margin*2)*l),u=i.margin*l,f=[i.color.light,i.color.dark],d=0;d=u&&p>=u&&d"u"&&(!a||!a.getContext)&&(l=a,a=void 0),a||(c=n()),l=t.getOptions(l);var u=t.getImageWidth(i.modules.size,l),f=c.getContext("2d"),d=f.createImageData(u,u);return t.qrToImageData(d.data,i,l),r(f,c,u),f.putImageData(d,0,0),c},e.renderToDataURL=function(i,a,s){var l=s;typeof l>"u"&&(!a||!a.getContext)&&(l=a,a=void 0),l||(l={});var c=e.render(i,a,l),u=l.type||"image/png",f=l.rendererOpts||{};return c.toDataURL(u,f.quality)}})(aG);var sG={},MAe=y8;function NI(e,t){var r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function zw(e,t,r){var n=e+t;return typeof r<"u"&&(n+=" "+r),n}function RAe(e,t,r){for(var n="",o=0,i=!1,a=0,s=0;s0&&l>0&&e[s-1]||(n+=i?zw("M",l+r,.5+c+r):zw("m",o,0),o=0,i=!1),l+1':"",c="',u='viewBox="0 0 '+s+" "+s+'"',f=o.width?'width="'+o.width+'" height="'+o.width+'" ':"",d=''+l+c+` -`;return typeof n=="function"&&n(null,d),d};var NAe=BOe,_x=Uq,lG=aG,FAe=sG;function b8(e,t,r,n,o){var i=[].slice.call(arguments,1),a=i.length,s=typeof i[a-1]=="function";if(!s&&!NAe())throw new Error("Callback required as last argument");if(s){if(a<2)throw new Error("Too few arguments provided");a===2?(o=r,r=t,t=n=void 0):a===3&&(t.getContext&&typeof o>"u"?(o=n,n=void 0):(o=n,n=r,r=t,t=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(r=t,t=n=void 0):a===2&&!t.getContext&&(n=r,r=t,t=void 0),new Promise(function(c,u){try{var f=_x.create(r,n);c(e(f,t,n))}catch(d){u(d)}})}try{var l=_x.create(r,n);o(null,e(l,t,n))}catch(c){o(c)}}yh.create=_x.create;yh.toCanvas=b8.bind(null,lG.render);yh.toDataURL=b8.bind(null,lG.renderToDataURL);yh.toString=b8.bind(null,function(e,t,r){return FAe.render(e,r)});var BAe=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=FI[t.format]||FI.default;window.clipboardData.setData(f,e)}else u.clipboardData.clearData(),u.clipboardData.setData(t.format,e);t.onCopy&&(u.preventDefault(),t.onCopy(u.clipboardData))}),document.body.appendChild(s),i.selectNodeContents(s),a.addRange(i);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(u){r&&console.error("unable to copy using execCommand: ",u),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(f){r&&console.error("unable to copy using clipboardData: ",f),r&&console.error("falling back to prompt"),n=zAe("message"in t?t.message:LAe),window.prompt(n,e)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(i):a.removeAllRanges()),s&&document.body.removeChild(s),o()}return l}var HAe=UAe,vt,Rd,w8,cG,BI,x8,uG,ha={},Pb=[],VAe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function fa(e,t){for(var r in t)e[r]=t[r];return e}function fG(e){var t=e.parentNode;t&&t.removeChild(e)}function Da(e,t,r){var n,o=arguments,i={};for(n in t)n!=="key"&&n!=="ref"&&(i[n]=t[n]);if(arguments.length>3)for(r=[r],n=3;n2&&(t.children=Pb.slice.call(arguments,2)),r={},t)n!=="key"&&n!=="ref"&&(r[n]=t[n]);return Em(e.type,r,t.key||e.key,t.ref||e.ref,null)}function yG(e){var t={},r={__c:"__cC"+uG++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i=this;return this.getChildContext||(o=[],this.getChildContext=function(){return t[r.__c]=i,t},this.shouldComponentUpdate=function(a){i.props.value!==a.value&&o.some(function(s){s.context=a.value,O1(s)})},this.sub=function(a){o.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){o.splice(o.indexOf(a),1),s&&s.call(a)}}),n.children}};return r.Consumer.contextType=r,r.Provider.__=r,r}vt={__e:function(e,t){for(var r,n;t=t.__;)if((r=t.__c)&&!r.__)try{if(r.constructor&&r.constructor.getDerivedStateFromError!=null&&(n=!0,r.setState(r.constructor.getDerivedStateFromError(e))),r.componentDidCatch!=null&&(n=!0,r.componentDidCatch(e)),n)return O1(r.__E=r)}catch(o){e=o}throw e}},Xo.prototype.setState=function(e,t){var r;r=this.__s!==this.state?this.__s:this.__s=fa({},this.state),typeof e=="function"&&(e=e(r,this.props)),e&&fa(r,e),e!=null&&this.__v&&(t&&this.__h.push(t),O1(this))},Xo.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),O1(this))},Xo.prototype.render=wh,Rd=[],w8=0,cG=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,x8=ha,uG=0;var nc,Pn,zI,Du=0,Ex=[],UI=vt.__r,HI=vt.diffed,VI=vt.__c,WI=vt.unmount;function sf(e,t){vt.__h&&vt.__h(Pn,e,Du||t),Du=0;var r=Pn.__H||(Pn.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function E8(e){return Du=1,S8(CG,e)}function S8(e,t,r){var n=sf(nc++,2);return n.__c||(n.__c=Pn,n.__=[r?r(t):CG(void 0,t),function(o){var i=e(n.__[0],o);n.__[0]!==i&&(n.__[0]=i,n.__c.setState({}))}]),n.__}function bG(e,t){var r=sf(nc++,3);!vt.__s&&P8(r.__H,t)&&(r.__=e,r.__H=t,Pn.__H.__h.push(r))}function C8(e,t){var r=sf(nc++,4);!vt.__s&&P8(r.__H,t)&&(r.__=e,r.__H=t,Pn.__h.push(r))}function wG(e){return Du=5,Ob(function(){return{current:e}},[])}function xG(e,t,r){Du=6,C8(function(){typeof e=="function"?e(t()):e&&(e.current=t())},r==null?r:r.concat(e))}function Ob(e,t){var r=sf(nc++,7);return P8(r.__H,t)?(r.__H=t,r.__h=e,r.__=e()):r.__}function _G(e,t){return Du=8,Ob(function(){return e},t)}function EG(e){var t=Pn.context[e.__c],r=sf(nc++,9);return r.__c=e,t?(r.__==null&&(r.__=!0,t.sub(Pn)),t.props.value):e.__}function SG(e,t){vt.useDebugValue&&vt.useDebugValue(t?t(e):e)}function XAe(e){var t=sf(nc++,10),r=E8();return t.__=e,Pn.componentDidCatch||(Pn.componentDidCatch=function(n){t.__&&t.__(n),r[1](n)}),[r[0],function(){r[1](void 0)}]}function ZAe(){Ex.some(function(e){if(e.__P)try{e.__H.__h.forEach(Sx),e.__H.__h.forEach(Cx),e.__H.__h=[]}catch(t){return e.__H.__h=[],vt.__e(t,e.__v),!0}}),Ex=[]}function Sx(e){e.t&&e.t()}function Cx(e){var t=e.__();typeof t=="function"&&(e.t=t)}function P8(e,t){return!e||t.some(function(r,n){return r!==e[n]})}function CG(e,t){return typeof t=="function"?t(e):t}vt.__r=function(e){UI&&UI(e),nc=0,(Pn=e.__c).__H&&(Pn.__H.__h.forEach(Sx),Pn.__H.__h.forEach(Cx),Pn.__H.__h=[])},vt.diffed=function(e){HI&&HI(e);var t=e.__c;if(t){var r=t.__H;r&&r.__h.length&&(Ex.push(t)!==1&&zI===vt.requestAnimationFrame||((zI=vt.requestAnimationFrame)||function(n){var o,i=function(){clearTimeout(a),cancelAnimationFrame(o),setTimeout(n)},a=setTimeout(i,100);typeof window<"u"&&(o=requestAnimationFrame(i))})(ZAe))}},vt.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Sx),r.__h=r.__h.filter(function(n){return!n.__||Cx(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],vt.__e(n,r.__v)}}),VI&&VI(e,t)},vt.unmount=function(e){WI&&WI(e);var t=e.__c;if(t){var r=t.__H;if(r)try{r.__.forEach(function(n){return n.t&&n.t()})}catch(n){vt.__e(n,t.__v)}}};function O8(e,t){for(var r in t)e[r]=t[r];return e}function Px(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}var PG=function(e){var t,r;function n(o){var i;return(i=e.call(this,o)||this).isPureReactComponent=!0,i}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n.prototype.shouldComponentUpdate=function(o,i){return Px(this.props,o)||Px(this.state,i)},n}(Xo);function OG(e,t){function r(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:Px(this.props,o)}function n(o){return this.shouldComponentUpdate=r,Da(e,O8({},o))}return n.prototype.isReactComponent=!0,n.displayName="Memo("+(e.displayName||e.name)+")",n.t=!0,n}var qI=vt.__b;function AG(e){function t(r){var n=O8({},r);return delete n.ref,e(n,r.ref)}return t.prototype.isReactComponent=t.t=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}vt.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),qI&&qI(e)};var GI=function(e,t){return e?Ps(e).reduce(function(r,n,o){return r.concat(t(n,o))},[]):null},kG={map:GI,forEach:GI,count:function(e){return e?Ps(e).length:0},only:function(e){if((e=Ps(e)).length!==1)throw new Error("Children.only() expects only one child.");return e[0]},toArray:Ps},JAe=vt.__e;function IG(e){return e&&((e=O8({},e)).__c=null,e.__k=e.__k&&e.__k.map(IG)),e}function Cm(){this.__u=0,this.o=null,this.__b=null}function $G(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function TG(e){var t,r,n;function o(i){if(t||(t=e()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw t;return Da(r,i)}return o.displayName="Lazy",o.t=!0,o}function zc(){this.i=null,this.l=null}vt.__e=function(e,t,r){if(e.then){for(var n,o=t;o=o.__;)if((n=o.__c)&&n.__c)return n.__c(e,t.__c)}JAe(e,t,r)},(Cm.prototype=new Xo).__c=function(e,t){var r=this;r.o==null&&(r.o=[]),r.o.push(t);var n=$G(r.__v),o=!1,i=function(){o||(o=!0,n?n(a):a())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){i(),t.__c&&t.__c()};var a=function(){var s;if(!--r.__u)for(r.__v.__k[0]=r.state.u,r.setState({u:r.__b=null});s=r.o.pop();)s.forceUpdate()};r.__u++||r.setState({u:r.__b=r.__v.__k[0]}),e.then(i,i)},Cm.prototype.render=function(e,t){return this.__b&&(this.__v.__k[0]=IG(this.__b),this.__b=null),[Da(Xo,null,t.u?null:e.children),t.u&&e.fallback]};var KI=function(e,t,r){if(++r[1]===r[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]8?2.5:2.7)+"vw":"inherit";return Qe.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:r,onClick:i,rel:"noopener noreferrer",target:"_blank"},Qe.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+o+"') "+t,backgroundSize:"100%"}}),Qe.createElement("div",{style:{fontSize:a},className:"walletconnect-connect__button__text"},n))}var xke=5,Hw=12;function _ke(e){var t=hn.isAndroid(),r=Qe.useState(""),n=r[0],o=r[1],i=Qe.useState(""),a=i[0],s=i[1],l=Qe.useState(1),c=l[0],u=l[1],f=a?e.links.filter(function(A){return A.name.toLowerCase().includes(a.toLowerCase())}):e.links,d=e.errorMessage,p=a||f.length>xke,h=Math.ceil(f.length/Hw),y=[(c-1)*Hw+1,c*Hw],_=f.length?f.filter(function(A,D){return D+1>=y[0]&&D+1<=y[1]}):[],b=!t&&h>1,m=void 0;function E(A){o(A.target.value),clearTimeout(m),A.target.value?m=setTimeout(function(){s(A.target.value),u(1)},1e3):(o(""),s(""),u(1))}return Qe.createElement("div",null,Qe.createElement("p",{id:VG,className:"walletconnect-qrcode__text"},t?e.text.connect_mobile_wallet:e.text.choose_preferred_wallet),!t&&Qe.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:n,onChange:E}),Qe.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(t?"__android":p&&f.length?"__wrap":"")},t?Qe.createElement(mke,{name:e.text.connect,color:pke,href:e.uri,onClick:Qe.useCallback(function(){hn.saveMobileLinkInfo({name:"Unknown",href:e.uri})},[])}):_.length?_.map(function(A){var D=A.color,$=A.name,g=A.shortName,N=A.logo,V=hn.formatIOSMobile(e.uri,A),K=Qe.useCallback(function(){hn.saveMobileLinkInfo({name:$,href:V})},[_]);return p?Qe.createElement(wke,{color:D,href:V,name:g||$,logo:N,onClick:K}):Qe.createElement(bke,{color:D,href:V,name:$,logo:N,onClick:K})}):Qe.createElement(Qe.Fragment,null,Qe.createElement("p",null,d.length?e.errorMessage:e.links.length&&!f.length?e.text.no_wallets_found:e.text.loading))),b&&Qe.createElement("div",{className:"walletconnect-modal__footer"},Array(h).fill(0).map(function(A,D){var $=D+1,g=c===$;return Qe.createElement("a",{style:{margin:"auto 10px",fontWeight:g?"bold":"normal"},onClick:function(){return u($)}},$)})))}function Eke(e){var t=!!e.message.trim();return Qe.createElement("div",{className:"walletconnect-qrcode__notification"+(t?" notification__show":"")},e.message)}var Ske=function(e){try{var t="";return Promise.resolve(zG.toString(e,{margin:0,type:"svg"})).then(function(r){return typeof r=="string"&&(t=r.replace("0||Qe.useEffect(function(){var P=function(){try{if(t)return Promise.resolve();a(!0);var C=cke(function(){var v=e.qrcodeModalOptions&&e.qrcodeModalOptions.registryUrl?e.qrcodeModalOptions.registryUrl:hn.getWalletRegistryUrl();return Promise.resolve(fetch(v)).then(function(w){return Promise.resolve(w.json()).then(function(B){var R=B.listings,L=r?"mobile":"desktop",U=hn.getMobileLinkRegistry(hn.formatMobileRegistry(R,L),n);a(!1),c(!0),V(U.length?"":e.text.no_supported_wallets),$(U);var S=U.length===1;S&&(_(hn.formatIOSMobile(e.uri,U[0])),d(!0)),E(S)})})},function(v){a(!1),c(!0),V(e.text.something_went_wrong),console.error(v)});return Promise.resolve(C&&C.then?C.then(function(){}):void 0)}catch(v){return Promise.reject(v)}};P()})};K();var W=r?f:!f;return Qe.createElement("div",{id:HG,className:"walletconnect-qrcode__base animated fadeIn"},Qe.createElement("div",{className:"walletconnect-modal__base"},Qe.createElement(gke,{onClose:e.onClose}),m&&f?Qe.createElement("div",{className:"walletconnect-modal__single_wallet"},Qe.createElement("a",{onClick:function(){return hn.saveMobileLinkInfo({name:D[0].name,href:y})},href:y,rel:"noopener noreferrer",target:"_blank"},e.text.connect_with+" "+(m?D[0].name:"")+" ›")):t||i||!i&&D.length?Qe.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(W?" right__selected":"")},Qe.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),r?Qe.createElement(Qe.Fragment,null,Qe.createElement("a",{onClick:function(){return d(!1),K()}},e.text.mobile),Qe.createElement("a",{onClick:function(){return d(!0)}},e.text.qrcode)):Qe.createElement(Qe.Fragment,null,Qe.createElement("a",{onClick:function(){return d(!0)}},e.text.qrcode),Qe.createElement("a",{onClick:function(){return d(!1),K()}},e.text.desktop))):null,Qe.createElement("div",null,f||!t&&!i&&!D.length?Qe.createElement(Cke,Object.assign({},p)):Qe.createElement(_ke,Object.assign({},p,{links:D,errorMessage:N})))))}var Oke={choose_preferred_wallet:"Wähle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterstützten Wallet",no_wallets_found:"keine Wallet gefunden"},Ake={choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},kke={choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera móvil",scan_qrcode_with_wallet:"Escanea el código QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo salió mal",no_supported_wallets:"Todavía no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},Ike={choose_preferred_wallet:"Choisissez votre portefeuille préféré",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copié!",connect_with:"Connectez-vous à l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourné",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouvé"},$ke={choose_preferred_wallet:"원하는 지갑을 선택하세요",connect_mobile_wallet:"모바일 지갑과 연결",scan_qrcode_with_wallet:"WalletConnect 지원 지갑에서 QR코드를 스캔하세요",connect:"연결",qrcode:"QR 코드",mobile:"모바일",desktop:"데스크탑",copy_to_clipboard:"클립보드에 복사",copied_to_clipboard:"클립보드에 복사되었습니다!",connect_with:"와 연결하다",loading:"로드 중...",something_went_wrong:"문제가 발생했습니다.",no_supported_wallets:"아직 지원되는 지갑이 없습니다",no_wallets_found:"지갑을 찾을 수 없습니다"},Tke={choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se à carteira móvel",scan_qrcode_with_wallet:"Ler o código QR com uma carteira compatível com WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda não há carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},Dke={choose_preferred_wallet:"选择你的钱包",connect_mobile_wallet:"连接至移动端钱包",scan_qrcode_with_wallet:"使用兼容 WalletConnect 的钱包扫描二维码",connect:"连接",qrcode:"二维码",mobile:"移动",desktop:"桌面",copy_to_clipboard:"复制到剪贴板",copied_to_clipboard:"复制到剪贴板成功!",connect_with:"通过以下方式连接",loading:"正在加载...",something_went_wrong:"出了问题",no_supported_wallets:"目前还没有支持的钱包",no_wallets_found:"没有找到钱包"},Mke={choose_preferred_wallet:"کیف پول مورد نظر خود را انتخاب کنید",connect_mobile_wallet:"به کیف پول موبایل وصل شوید",scan_qrcode_with_wallet:"کد QR را با یک کیف پول سازگار با WalletConnect اسکن کنید",connect:"اتصال",qrcode:"کد QR",mobile:"سیار",desktop:"دسکتاپ",copy_to_clipboard:"کپی به کلیپ بورد",copied_to_clipboard:"در کلیپ بورد کپی شد!",connect_with:"ارتباط با",loading:"...بارگذاری",something_went_wrong:"مشکلی پیش آمد",no_supported_wallets:"هنوز هیچ کیف پول پشتیبانی شده ای وجود ندارد",no_wallets_found:"هیچ کیف پولی پیدا نشد"},e$={de:Oke,en:Ake,es:kke,fr:Ike,ko:$ke,pt:Tke,zh:Dke,fa:Mke};function Rke(){var e=hn.getDocumentOrThrow(),t=e.getElementById(QI);t&&e.head.removeChild(t);var r=e.createElement("style");r.setAttribute("id",QI),r.innerText=lke,e.head.appendChild(r)}function Nke(){var e=hn.getDocumentOrThrow(),t=e.createElement("div");return t.setAttribute("id",UG),e.body.appendChild(t),t}function WG(){var e=hn.getDocumentOrThrow(),t=e.getElementById(HG);t&&(t.className=t.className.replace("fadeIn","fadeOut"),setTimeout(function(){var r=e.getElementById(UG);r&&e.body.removeChild(r)},dke))}function Fke(e){return function(){WG(),e&&e()}}function Bke(){var e=hn.getNavigatorOrThrow().language.split("-")[0]||"en";return e$[e]||e$.en}function jke(e,t,r){Rke();var n=Nke();Qe.render(Qe.createElement(Pke,{text:Bke(),uri:e,onClose:Fke(t),qrcodeModalOptions:r}),n)}function Lke(){WG()}var qG=function(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"};function zke(e,t,r){console.log(e),qG()?ske(e):jke(e,t,r)}function Uke(){qG()||Lke()}var Hke={open:zke,close:Uke},Vke=Hke;const t$=ri(Vke);var At=Gs();const r$={font:{family:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, 'Apple Color Emoji', Arial, sans-serif, 'Segoe UI Emoji'"},text:{primary:{color:"#373737"},secondary:{color:"#999999",hover:{color:"#111111"}},error:"#FC6464",valid:"#32D74B"},buttons:{primary:{borderRadius:16,color:"#000373737000",background:"#FFFFFF",border:"#F0F0F0",hover:{color:"#000000",border:"#1A88F8"}},secondary:{borderRadius:16,background:"#F6F7F9",color:"#000000"}},navigation:{color:"#999999"},modal:{background:"#ffffff",divider:"#f7f6f8"},tooltips:{color:"#999999",background:"#ffffff",hover:{background:"#f6f7f9"}},overlay:{background:"rgba(0, 0, 0, 0.06)"},qrCode:{accentColor:"#F7F6F8"}},n$=e=>e,Wke=()=>typeof window>"u"?!1:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;Wke();const qke={connectKit:{options:{iconStyle:"light"},theme:{preferred:"dark",light:n$(r$),dark:n$(r$)}}},Ax=I.createContext(null),oi=()=>{const e=I.useContext(Ax);if(!e)throw Error("ConnectSetting Hook must be inside a Provider.");return e},kx=I.createContext(null),Ma=()=>{const e=I.useContext(kx);if(!e)throw Error("AlephiumConnect Hook must be inside a Provider.");return e},o$=I.createContext(null),GG=e=>{e={selector:"__ALEPHIUMCONNECT__",...e};const{selector:t,children:r}=e,n=I.useRef(null),[o,i]=I.useState(!1);return I.useEffect(()=>{const a="#"+t.replace(/^#/,"");if(n.current=document.querySelector(a),!n.current){const s=document.createElement("div");s.setAttribute("id",t),document.body.appendChild(s),n.current=s}i(!0)},[t]),n.current&&o?Hs.createPortal(r,n.current):null},KG=()=>{var e;const t=f4();return(e=t==null?void 0:t.name)!==null&&e!==void 0?e:""},YG=()=>{var e;const t=f4();return(e=t==null?void 0:t.os)!==null&&e!==void 0?e:""},Gke=()=>YG().toLowerCase().includes("ios"),Kke=()=>YG().toLowerCase().includes("android"),k8=()=>Kke()||Gke();function Ix(e){return ae.Children.toArray(e).reduce((r,n)=>n.type===ae.Fragment?r.concat(Ix(n.props.children)):(r.push(n),r),[])}const I8=e=>{const t=e.slice(0,6),r=e.slice(-6);return`${t} ... ${r}`};var st=typeof Z2.div=="function"?Z2:Z2.default,Pa={mobileWidth:560};const Yke=st(ut.div)` - z-index: -1; - pointer-events: auto; - position: absolute; - left: 50%; - transform: translateX(-50%); - width: var(--width); - top: 64px; - color: #fff; - font-size: 14px; - line-height: 20px; - font-weight: 500; - background: var(--ck-body-color-danger); - border-radius: 20px; - padding: 24px 46px 82px 24px; - transition: width var(--duration) var(--ease); - a { - font-weight: 700; - text-decoration: underline; - } - code { - font-size: 0.9em; - display: inline-block; - font-family: monospace; - margin: 1px; - padding: 0 4px; - border-radius: 8px; - font-weight: bold; - background: rgba(255, 255, 255, 0.1); - } -`,$x=Jn` -from { opacity: 0; } - to { opacity: 1; } -`,Xke=Jn` -from { opacity: 0; transform: scale(0.85); } - to { opacity: 1; transform: scale(1); } -`,Zke=Jn` -from { opacity: 0; transform: scale(1.1); } - to { opacity: 1; transform: scale(1); } -`,Tx=Jn` -from { opacity: 1; } - to { opacity: 0; } -`,Jke=Jn` -from { opacity: 1; transform: scale(1); } - to { opacity: 0; transform: scale(1.1); } -`,Qke=Jn` -from { opacity: 1; transform: scale(1); } - to { opacity: 0; transform: scale(0.85); } -`,Os=st(ut.div)` - max-width: 100%; - width: 295px; - padding-top: 48px; -`,eIe=st(ut.div)` - user-select: none; - position: relative; - display: block; - text-align: center; - color: var(--ck-body-color-muted); - font-size: 15px; - font-weight: 400; - line-height: 21px; - span { - z-index: 2; - position: relative; - display: inline-block; - user-select: none; - pointer-events: none; - padding: 0 14px; - background: var(--ck-body-background); - transition: background-color 200ms ease; - } - &:before { - z-index: 2; - content: ''; - position: absolute; - top: 50%; - left: 0; - right: 0; - height: 1px; - transform: translateY(-1px); - background: var(--ck-body-divider); - box-shadow: var(--ck-body-divider-box-shadow); - } -`,Pm=st(ut.div)` - z-index: 3; - pointer-events: none; - user-select: none; - position: absolute; - top: 25px; - left: 50%; - display: flex; - align-items: center; - justify-content: center; - height: 26px; - transform: translateX(-50%); - width: var(--width); - text-align: center; - font-size: 17px; - line-height: 20px; - font-weight: var(--ck-modal-heading-font-weight, 600); - color: var(--ck-body-color); - span { - display: inline-block; - } -`,tIe=st(ut.div)` - position: relative; - padding: 0; -`,uo=st(ut.div)` - left: 0; - right: 0; - text-align: center; - display: flex; - flex-direction: column; - gap: 12px; - padding: 0 0 16px; - - @media only screen and (max-width: ${Pa.mobileWidth}px) { - display: block; - } -`,Ka=st(ut.h1)` - margin: 0; - padding: 0; - line-height: ${e=>e.$small?20:22}px; - font-size: ${e=>e.$small?17:19}px; - font-weight: var(--ck-modal-h1-font-weight, 600); - color: ${e=>e.$error?"var(--ck-body-color-danger)":e.$valid?"var(--ck-body-color-valid)":"var(--ck-body-color)"}; - > svg { - position: relative; - top: -2px; - display: inline-block; - vertical-align: middle; - margin-right: 6px; - } - @media only screen and (max-width: ${Pa.mobileWidth}px) { - margin-bottom: 6px; - font-size: 17px; - } -`,Dx=st.div` - font-size: 16px; - font-weight: 400; - line-height: 21px; - color: var(--ck-body-color-muted); - strong { - font-weight: 500; - color: var(--ck-body-color); - } -`,rIe=st(ut.div)` - z-index: 1; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - background: var(--ck-overlay-background, rgba(71, 88, 107, 0.24)); - backdrop-filter: var(--ck-overlay-backdrop-filter, none); - opacity: 0; - animation: ${e=>e.$active?$x:Tx} 150ms ease-out both; -`,nIe=Jn` - from{ opacity: 0; transform: scale(0.97); } - to{ opacity: 1; transform: scale(1); } -`,oIe=Jn` - from{ opacity: 1; transform: scale(1); } - to{ opacity: 0; transform: scale(0.97); } -`,iIe=Jn` - from { transform: translate3d(0, 100%, 0); } - to { transform: translate3d(0, 0%, 0); } -`,aIe=Jn` - from { opacity: 1; } - to { opacity: 0; } -`,XG=st(ut.div)` - z-index: 2; - position: relative; - color: var(--ck-body-color); - - animation: 150ms ease both; - animation-name: ${oIe}; - &.active { - animation-name: ${nIe}; - } - - &:before { - content: ''; - position: absolute; - top: 0; - bottom: 0; - left: 50%; - width: var(--width); - height: var(--height); - transform: translateX(-50%); - backface-visibility: hidden; - transition: all 200ms ease; - border-radius: var(--ck-border-radius, 20px); - background: var(--ck-body-background); - box-shadow: var(--ck-modal-box-shadow); - } - - @media only screen and (max-width: ${Pa.mobileWidth}px) { - animation-name: ${aIe}; - animation-duration: 130ms; - animation-timing-function: ease; - - &.active { - animation-name: ${iIe}; - animation-duration: 300ms; - animation-delay: 32ms; - animation-timing-function: cubic-bezier(0.15, 1.15, 0.6, 1); - } - - &:before { - width: 100%; - transition: 0ms height cubic-bezier(0.15, 1.15, 0.6, 1); - will-change: height; - } - } -`,ZG=st(ut.div)` - z-index: 3; - position: absolute; - top: 0; - left: 50%; - height: 64px; - transform: translateX(-50%); - backface-visibility: hidden; - width: var(--width); - transition: 0.2s ease width; - pointer-events: auto; - //border-bottom: 1px solid var(--ck-body-divider); -`,sIe=st(ut.div)` - position: relative; - overflow: hidden; - height: var(--height); - transition: 0.2s ease height; - @media only screen and (max-width: ${Pa.mobileWidth}px) { - transition: 0ms height cubic-bezier(0.15, 1.15, 0.6, 1); - /* animation-delay: 34ms; */ - } -`,JG=st(ut.div)` - z-index: 2; - position: relative; - top: 0; - left: 50%; - margin-left: calc(var(--width) / -2); - width: var(--width); - /* left: 0; */ - /* width: 100%; */ - display: flex; - justify-content: center; - align-items: center; - transform-origin: center center; - animation: 200ms ease both; - - &.active { - animation-name: ${Zke}; - } - &.active-scale-up { - animation-name: ${Xke}; - } - &.exit-scale-down { - z-index: 1; - pointer-events: none; - position: absolute; - /* top: 0; */ - /* left: 0; */ - animation-name: ${Qke}; - } - &.exit { - z-index: 1; - pointer-events: none; - position: absolute; - /* top: 0; */ - /* left: 0; */ - /* left: 50%; */ - /* transform: translateX(-50%); */ - animation-name: ${Jke}; - animation-delay: 16.6667ms; - } - @media only screen and (max-width: ${Pa.mobileWidth}px) { - /* animation: 0ms ease both; */ - /* animation-delay: 35ms; */ - animation: 0ms cubic-bezier(0.15, 1.15, 0.6, 1) both; - - &.active { - animation-name: ${$x}; - } - &.active-scale-up { - animation-name: ${$x}; - } - &.exit-scale-down { - z-index: 3; - animation-name: ${Tx}; - } - &.exit { - z-index: 3; - animation-name: ${Tx}; - animation-delay: 0ms; - } - } -`,QG=st(ut.div)` - margin: 0 auto; - width: fit-content; - padding: 29px 24px 24px; - backface-visibility: hidden; -`,lIe=st.div` - z-index: 2147483646; // z-index set one below max (2147483647) for if we wish to layer things ontop of the modal in a seperate Portal - position: fixed; - inset: 0; -`,Mx=st(ut.button)` - z-index: 3; - cursor: pointer; - position: absolute; - top: 22px; - right: 17px; - width: 32px; - height: 32px; - display: flex; - align-items: center; - justify-content: center; - border-radius: 16px; - padding: 0; - margin: 0; - color: var(--ck-body-action-color); - background: var(--ck-body-background); - transition: background-color 200ms ease, transform 100ms ease; - /* will-change: transform; */ - svg { - display: block; - } - - &:hover { - background: var(--ck-body-background-secondary); - } - &:active { - transform: scale(0.9); - } -`,Rx=st(ut.button)` - z-index: 3; - position: absolute; - inset: 0; - display: flex; - align-items: center; - justify-content: center; - border-radius: 16px; - padding: 0; - margin: 0; - color: var(--ck-body-action-color); - background: var(--ck-body-background); - transition: background-color 200ms ease, transform 100ms ease; - /* will-change: transform; */ - svg { - display: block; - position: relative; - left: -1px; - } - - &:enabled { - cursor: pointer; - &:hover { - background: var(--ck-body-background-secondary); - } - &:active { - transform: scale(0.9); - } - } -`,Nx=st(ut.button)` - z-index: 3; - position: absolute; - inset: 0; - transform: translateX(-1px); - display: flex; - align-items: center; - justify-content: center; - border-radius: 16px; - padding: 0; - margin: 0; - color: var(--ck-body-action-color); - background: var(--ck-body-background); - transition: background-color 200ms ease, transform 100ms ease; - /* will-change: transform; */ - svg { - display: block; - position: relative; - } - &:enabled { - cursor: pointer; - &:hover { - background: var(--ck-body-background-secondary); - } - &:active { - transform: scale(0.9); - } - } -`,cIe=st(ut.div)` - --ease: cubic-bezier(0.25, 0.1, 0.25, 1); - --duration: 200ms; - --transition: height var(--duration) var(--ease), width var(--duration) var(--ease); - z-index: 3; - display: block; - pointer-events: none; - position: absolute; - left: 50%; - top: 50%; - width: 100%; - transform: translate3d(-50%, -50%, 0); - backface-visibility: hidden; - @media only screen and (max-width: ${Pa.mobileWidth}px) { - pointer-events: auto; - left: 0; - top: auto; - bottom: -5px; - transform: none; - ${XG} { - max-width: 448px; - margin: 0 auto; - &:before { - width: 100%; - border-radius: var(--ck-border-radius, 30px) var(--ck-border-radius, 30px) 0 0; - } - } - ${JG} { - left: 0; - right: 0; - margin: 0 auto; - width: auto; - } - ${Os} { - margin: 0 auto; - width: 100% !important; - } - ${Pm} { - top: 29px; - } - ${uo} { - gap: 12px; - } - ${Dx} { - margin: 0 auto; - max-width: 295px; - } - ${QG} { - width: 100%; - padding: 31px 24px; - } - ${ZG} { - width: 100%; - top: 4px; - border-bottom: 0; - } - ${Mx} { - right: 22px; - } - ${Rx} { - top: -1px; - left: -3px; - } - ${Nx} { - top: -1px; - left: -3px; - svg { - width: 65%; - height: auto; - } - } - ${Mx}, - ${Rx}, - ${Nx} { - // Quick hack for bigger tappable area on mobile - transform: scale(1.4) !important; - background: transparent !important; - svg { - transform: scale(0.8) !important; - } - } - } -`,uIe=9;function fIe(){const e=I.useRef(null);function t(r){if(!e.current)return;const n=e.current.querySelectorAll(` - a[href]:not(:disabled), - button:not(:disabled), - textarea:not(:disabled), - input[type="text"]:not(:disabled), - input[type="radio"]:not(:disabled), - input[type="checkbox"]:not(:disabled), - select:not(:disabled) - `),o=n[0],i=n[n.length-1];(r.key==="Tab"||r.keyCode===uIe)&&(r.shiftKey?document.activeElement===o&&(i.focus(),r.preventDefault()):document.activeElement===i&&(o.focus(),r.preventDefault()))}return I.useEffect(()=>{e.current&&(e.current.addEventListener("keydown",t),e.current.focus({preventScroll:!0}));const r=e.current;return()=>{r&&r.removeEventListener("keydown",t)}},[e]),e}function dIe(e){const t=fIe();return I.useEffect(()=>{t.current&&t.current.focus({preventScroll:!0})},[t]),j.jsx("div",{ref:t,tabIndex:0,children:e.children})}function pIe(e,t){const r=I.useRef({target:e,previous:t});return r.current.target!==e&&(r.current.previous=r.current.target,r.current.target=e),r.current.previous}const i$={debug:10,info:20,warn:30,error:40,none:100},hIe=typeof window<"u"&&window.document&&window.document.createElement!==void 0?I.useLayoutEffect:I.useEffect,vIe=({logLevel:e="info",maxFontSize:t=100,minFontSize:r=20,onFinish:n,onStart:o,resolution:i=5}={})=>{const a=i$[e],s=I.useCallback(()=>({calcKey:0,fontSize:t,fontSizePrev:r,fontSizeMax:t,fontSizeMin:r}),[t,r]),l=I.useRef(null),c=I.useRef(),u=I.useRef(!1),[f,d]=I.useState(s),{calcKey:p,fontSize:h,fontSizeMax:y,fontSizeMin:_,fontSizePrev:b}=f;let m=null;const[E]=I.useState(()=>new R3e(()=>{m=window.requestAnimationFrame(()=>{u.current||(o&&o(),u.current=!0,d({...s(),calcKey:p+1}))})}));I.useEffect(()=>(l.current&&E.observe(l.current),()=>{m&&window.cancelAnimationFrame(m),E.disconnect()}),[m,E]);const A=l.current&&l.current.innerHTML;return I.useEffect(()=>{p===0||u.current||(A!==c.current&&(o&&o(),d({...s(),calcKey:p+1})),c.current=A)},[p,s,A,o]),hIe(()=>{if(p===0)return;const D=Math.abs(h-b)<=i,$=!!l.current&&(l.current.scrollHeight>l.current.offsetHeight||l.current.scrollWidth>l.current.offsetWidth),g=$&&h===b,N=h>b;if(D){g?(u.current=!1,a<=i$.info&&console.info(`[use-fit-text] reached \`minFontSize = ${r}\` without fitting text`)):$?d({fontSize:N?b:_,fontSizeMax:y,fontSizeMin:_,fontSizePrev:b,calcKey:p}):(u.current=!1,n&&n(h));return}let V,K=y,W=_;$?(V=N?b-h:_-h,K=Math.min(y,h)):(V=N?y-h:b-h,W=Math.max(_,h)),d({calcKey:p,fontSize:h+V/2,fontSizeMax:K,fontSizeMin:W,fontSizePrev:h})},[p,h,y,_,b,n,l,i]),{fontSize:h,ref:l}},$8=ae.forwardRef(({children:e},t)=>{const[r,n]=ae.useState(!1),{fontSize:o,ref:i}=vIe({logLevel:"none",maxFontSize:100,minFontSize:70,onStart:()=>n(!0),onFinish:()=>n(!0)});return j.jsx("div",{ref:i,style:{visibility:r?"visible":"hidden",fontSize:`${o}%`,maxHeight:"100%",maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:e})});$8.displayName="FitText";var gIe={light:{"--ck-connectbutton-font-size":"15px","--ck-connectbutton-color":"#373737","--ck-connectbutton-background":"#F6F7F9","--ck-connectbutton-background-secondary":"#FFFFFF","--ck-connectbutton-hover-color":"#373737","--ck-connectbutton-hover-background":"#F0F2F5","--ck-connectbutton-active-color":"#373737","--ck-connectbutton-active-background":"#EAECF1","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#fff","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-background)","--ck-connectbutton-balance-hover-background":"#F6F7F9","--ck-connectbutton-balance-hover-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-hover-background)","--ck-connectbutton-balance-active-background":"#F0F2F5","--ck-connectbutton-balance-active-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-active-background)","--ck-primary-button-border-radius":"16px","--ck-primary-button-color":"#373737","--ck-primary-button-background":"#F6F7F9","--ck-primary-button-font-weight":"600","--ck-primary-button-hover-color":"#373737","--ck-primary-button-hover-background":"#F0F2F5","--ck-secondary-button-border-radius":"16px","--ck-secondary-button-color":"#373737","--ck-secondary-button-background":"#F6F7F9","--ck-tertiary-button-background":"#FFFFFF","--ck-secondary-button-hover-background":"#e0e4eb","--ck-modal-box-shadow":"0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-overlay-background":"rgba(71, 88, 107, 0.24)","--ck-body-color":"#373737","--ck-body-color-muted":"#999999","--ck-body-color-muted-hover":"#111111","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#F3F4F7","--ck-body-action-color":"#999999","--ck-body-divider":"#f7f6f8","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-siwe-border":"#F0F0F0","--ck-body-disclaimer-color":"#AAAAAB","--ck-body-disclaimer-link-color":"#838485","--ck-body-disclaimer-link-hover-color":"#000000","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0,0,0,0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#F5F7F9","--ck-qr-dot-color":"#000000","--ck-qr-border-color":"#f7f6f8","--ck-focus-color":"#1A88F8","--ck-spinner-color":"var(--ck-focus-color)","--ck-copytoclipboard-stroke":"#CCCCCC"},dark:{"--ck-connectbutton-font-size":"15px","--ck-connectbutton-color":"#ffffff","--ck-connectbutton-background":"#383838","--ck-connectbutton-background-secondary":"#282828","--ck-connectbutton-hover-background":"#404040","--ck-connectbutton-active-background":"#4D4D4D","--ck-connectbutton-balance-color":"#fff","--ck-connectbutton-balance-background":"#282828","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-background)","--ck-connectbutton-balance-hover-background":"#383838","--ck-connectbutton-balance-hover-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-hover-background)","--ck-connectbutton-balance-active-background":"#404040","--ck-connectbutton-balance-active-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-active-background)","--ck-primary-button-color":"#ffffff","--ck-primary-button-background":"#383838","--ck-primary-button-border-radius":"16px","--ck-primary-button-font-weight":"600","--ck-primary-button-hover-background":"#404040","--ck-primary-button-active-border-radius":"16px","--ck-secondary-button-color":"#ffffff","--ck-secondary-button-background":"#333333","--ck-secondary-button-hover-background":"#4D4D4D","--ck-tertiary-button-background":"#424242","--ck-focus-color":"#1A88F8","--ck-overlay-background":"rgba(0,0,0,0.4)","--ck-body-color":"#ffffff","--ck-body-color-muted":"rgba(255, 255, 255, 0.4)","--ck-body-color-muted-hover":"rgba(255, 255, 255, 0.8)","--ck-body-background":"#2B2B2B","--ck-body-background-transparent":"rgba(0,0,0,0)","--ck-body-background-secondary":"#333333","--ck-body-background-secondary-hover-background":"#4D4D4D","--ck-body-background-secondary-hover-outline":"#ffffff","--ck-body-background-tertiary":"#333333","--ck-body-action-color":"#808080","--ck-body-divider":"#383838","--ck-body-color-danger":"#FF4E4E","--ck-body-disclaimer-color":"#858585","--ck-body-disclaimer-link-color":"#ADADAD","--ck-body-disclaimer-link-hover-color":"#FFFFFF","--ck-modal-box-shadow":"0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-copytoclipboard-stroke":"#555555","--ck-tooltip-background":"#2B2B2B","--ck-tooltip-background-secondary":"#333333","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-dropdown-button-color":"#6C7381","--ck-spinner-color":"var(--ck-focus-color)","--ck-qr-dot-color":"#ffffff","--ck-qr-border-color":"#3d3d3d"}},mIe={"--ck-font-family":"Lato","--ck-border-radius":"0px","--ck-connectbutton-color":"#373737","--ck-connectbutton-background":"linear-gradient(180deg, #F0F0EA 0%, #FFFFFF 50%, #F0F0EA 100%) 100% 100% / 200% 200%, #F5F5F1","--ck-connectbutton-box-shadow":" 0 0 0 1px #003C74, 2px 2px 0px rgba(255, 255, 255, 0.75), -2px -2px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 0px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-connectbutton-border-radius":"4.5px","--ck-connectbutton-hover-color":"#373737","--ck-connectbutton-hover-background":"linear-gradient(180deg, #F0F0EA 0%, #FFFFFF 50%, #F0F0EA 100%) 100% 0% / 200% 200%, #F5F5F1","--ck-connectbutton-active-background":"linear-gradient(180deg, #F0F0EA 0%, #FFFFFF 50%, #F0F0EA 100%) 100% 100% / 200% 200%, #F5F5F1","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#fff","--ck-connectbutton-balance-box-shadow":"0 0 0 1px #E4E7E7","--ck-connectbutton-balance-hover-box-shadow":"0 0 0 1px #d7dbdb","--ck-connectbutton-balance-active-box-shadow":"0 0 0 1px #bbc0c0","--ck-focus-color":"#1A88F8","--ck-overlay-background":"rgba(0, 127, 128, 0.8)","--ck-body-color":"#373737","--ck-body-color-muted":"#808080","--ck-body-color-muted-hover":"#111111","--ck-body-background":"#F0EDE2","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary-hover-background":"#FAFAFA","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-action-color":"#373737","--ck-body-color-danger":"#FC6464","--ck-body-color-valid":"#32D74B","--ck-body-divider":"#919B9C","--ck-body-divider-box-shadow":"0px 1px 0px #FBFBF8","--ck-primary-button-background":"linear-gradient(180deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-primary-button-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 0px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-primary-button-border-radius":"6px","--ck-primary-button-hover-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 5px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-primary-button-hover-border-radius":"6px","--ck-modal-heading-font-weight":400,"--ck-modal-box-shadow":` - inset 0px -3px 0px #0F37A9, - inset -2px 0px 0px #0F37A9, - inset 0px -4px 0px #0D5DDF, - inset -4px 0px 0px #0D5DDF, - inset 2px 0px 0px #0453DD, - inset 0px 2px 0px #044FD1, - inset 4px 0px 0px #4283EB, - inset 0px 4px 0px #4283EB - `,"--ck-modal-h1-font-weight":400,"--ck-secondary-button-color":"#373737","--ck-secondary-button-border-radius":"6px","--ck-secondary-button-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 0px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-secondary-button-background":"linear-gradient(180deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-secondary-button-hover-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 4px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-body-background-secondary":"rgba(0, 0, 0, 0.1)","--ck-body-background-tertiary":"linear-gradient(180deg, #FBFBFB 0%, #EFEFEE 100%)","--ck-tertiary-border-radius":"0px","--ck-tertiary-box-shadow":"inset 0 0 0 1px #919B9C, 1px 1px 2px rgba(0, 0, 0, 0.15), inset -2px -2px 0px #FFFFFF","--ck-body-button-text-align":"left","--ck-body-button-box-shadow":"0 2px 4px rgba(0, 0, 0, 0.05 )","--ck-body-disclaimer-background":"linear-gradient(180deg, #FBFBFB 0%, #EFEFEE 100%)","--ck-body-disclaimer-box-shadow":` - inset 0px -3px 0px #0F37A9, - inset -2px 0px 0px #0F37A9, - inset 0px -4px 0px #0D5DDF, - inset -4px 0px 0px #0D5DDF, - inset 2px 0px 0px #0453DD, - inset 4px 0px 0px #4283EB, - inset 0 1px 0 0 #919B9C`,"--ck-body-disclaimer-font-size":"14px","--ck-body-disclaimer-color":"#959594","--ck-body-disclaimer-link-color":"#626262","--ck-body-disclaimer-link-hover-color":"#000000","--ck-qr-dot-color":"#000000","--ck-qr-border-color":"#919B9C","--ck-qr-border-radius":"0","--ck-qr-background":"#FFFFFF","--ck-copytoclipboard-stroke":"rgba(55, 55, 55, 0.4)","--ck-tooltip-background":"linear-gradient(270deg, #F7F3E6 7.69%, #F5F7DA 100%)","--ck-tooltip-background-secondary":"#f6f7f9","--ck-tooltip-color":"#000000","--ck-tooltip-shadow":" 0 0 0 1.5px #2b2622, 0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px #A0A0A0, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-dropdown-button-background":"linear-gradient(180deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-dropdown-button-hover-background":"linear-gradient(0deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-dropdown-pending-color":"#ACA899","--ck-dropdown-active-color":"#FFFFFF","--ck-dropdown-active-static-color":"#ACA899","--ck-dropdown-active-background":"#3F69BF","--ck-dropdown-active-border-radius":"0","--ck-dropdown-active-inset":"-12px","--ck-dropdown-color":"#ACA899","--ck-dropdown-background":"#FFFFFF","--ck-dropdown-box-shadow":"inset 0 0 0 1px #ACA899, 2px 2px 7px rgba(0, 0, 0, 0.15)","--ck-dropdown-border-radius":"0","--ck-alert-color":"#ACA899","--ck-alert-background":"linear-gradient(180deg, #FBFBFB 0%, #EFEFEE 100%)","--ck-alert-box-shadow":"inset 0 0 0 1px #919B9C, 1px 1px 2px rgba(0, 0, 0, 0.15), inset -2px -2px 0px #FFFFFF","--ck-alert-border-radius":"0","--ck-graphic-primary-color":"#333333","--ck-graphic-primary-background":"#FFFFFF","--ck-graphic-compass-background":"#FFFFFF","--ck-siwe-border":"#919B9C"},yIe={"--ck-font-family":'"SF Pro Rounded",ui-rounded,"Nunito",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"8px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-color":"#000000","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"-4px 4px 0px #000000, inset 0 0 0 2px #000000","--ck-connectbutton-border-radius":"8px","--ck-connectbutton-hover-background":"#F3EDE8","--ck-connectbutton-active-box-shadow":"0 0 0 0 #000000, inset 0 0 0 2px #000000","--ck-connectbutton-balance-color":"#000000","--ck-connectbutton-balance-background":"#F3EDE8","--ck-connectbutton-balance-box-shadow":"-4px 4px 0px #000000, inset 0 0 0 2px #000000","--ck-connectbutton-balance-hover-background":"#eee5dd","--ck-connectbutton-balance-connectbutton-box-shadow":"-4px 8px 0px -4px #000000, inset 0 0 0 2px #000000","--ck-connectbutton-balance-connectbutton-border-radius":"0px 8px 8px 0","--ck-primary-button-color":"#373737","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"inset 0 0 0 2px #000000, -4px 4px 0 0 #000000","--ck-primary-button-border-radius":"8px","--ck-primary-button-hover-background":"#F3EDE8","--ck-primary-button-hover-box-shadow":"inset 0 0 0 2px #000000, -0px 0px 0 0 #000000","--ck-secondary-button-border-radius":"8px","--ck-secondary-button-color":"#373737","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"-4px 4px 0 0 #000000, inset 0 0 0 2px #000000","--ck-secondary-button-hover-background":"#F3EDE8","--ck-secondary-button-hover-box-shadow":"0 0 0 0 #000000, inset 0 0 0 2px #000000","--ck-focus-color":"#3B99FC","--ck-overlay-background":"rgba(133, 120, 122, 0.8)","--ck-body-color":"#373737","--ck-body-color-muted":"rgba(0, 0, 0, 0.5)","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#EBE1D8","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"rgba(0,0,0,0.1)","--ck-body-background-secondary-hover-background":"#4D4D4D","--ck-body-background-secondary-hover-outline":"#373737","--ck-body-background-tertiary":"#ffffff","--ck-tertiary-border-radius":"8px","--ck-tertiary-box-shadow":"-4px 4px 0 0 #000000, inset 0 0 0 2px #000000","--ck-body-action-color":"#373737","--ck-body-divider":"#373737","--ck-body-color-danger":"#FF4E4E","--ck-body-disclaimer-background":"#E3D6C9","--ck-body-disclaimer-box-shadow":"-4px 4px 0 0 #000000, inset 2px 0 0 0 #000000, inset -2px 0 0 0 #000000, inset 0 -2px 0 0 #000000","--ck-body-disclaimer-font-weight":"500","--ck-body-disclaimer-color":"#888079","--ck-body-disclaimer-link-color":"#5B5650","--ck-body-disclaimer-link-hover-color":"#000000","--ck-modal-box-shadow":"-10px 10px 0px #000000, inset 0 0 0 2px #000000","--ck-copytoclipboard-stroke":"#555555","--ck-tooltip-border-radius":"8px","--ck-tooltip-color":"#373737","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#EBE1D8","--ck-tooltip-shadow":"-6px 6px 0 0 #000000, 0 0 0 2px #000000","--ck-spinner-color":"#1A88F8","--ck-dropdown-button-color":"#000","--ck-dropdown-button-box-shadow":"-2px 2px 0 2px #000000, 0 0 0 2px #000000","--ck-dropdown-button-background":"#ffffff","--ck-dropdown-button-hover-background":"#F3EDE8","--ck-dropdown-button-hover-box-shadow":"-2px 2px 0 0 #000000, 0 0 0 2px #000000","--ck-dropdown-pending-color":"rgba(0, 0, 0, 0.5)","--ck-dropdown-active-color":"#FFFFFF","--ck-dropdown-active-static-color":"rgba(0, 0, 0, 0.5)","--ck-dropdown-active-background":"#3B99FC","--ck-dropdown-active-box-shadow":"inset 0 0 0 2px #000000","--ck-dropdown-active-border-radius":"8px","--ck-dropdown-color":"rgba(0, 0, 0, 0.5)","--ck-dropdown-background":"#FFFFFF","--ck-dropdown-box-shadow":"-4px 4px 0 0 #000000, inset 0 0 0 2px #000000","--ck-dropdown-border-radius":"8px","--ck-alert-color":"rgba(0, 0, 0, 0.5)","--ck-alert-background":" #F5F5F5","--ck-alert-border-radius":"8px","--ck-qr-border-radius":"8px","--ck-qr-dot-color":"#000000","--ck-qr-border-color":"#000000","--ck-qr-background":"#ffffff","--ck-graphic-primary-color":"#000000","--ck-graphic-primary-background":"#ffffff","--ck-graphic-compass-background":"#FFFFFF","--ck-siwe-border":"#8E8985"},bIe={"--ck-border-radius":"12px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-border-radius":"12px","--ck-connectbutton-color":"#414451","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-hover-background":"#F6F7F9","--ck-connectbutton-hover-box-shadow":"inset 0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#F6F7F9","--ck-connectbutton-balance-box-shadow":"none","--ck-connectbutton-balance-hover-background":"#f1f1f3","--ck-primary-button-border-radius":"12px","--ck-primary-button-color":"#414451","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-primary-button-hover-background":"#F6F7F9","--ck-primary-button-hover-box-shadow":"0 0 0 1px #D9DBDD, 0px 0 0 rgba(0, 0, 0, 0.02)","--ck-secondary-button-border-radius":"12px","--ck-secondary-button-color":"#414451","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-secondary-button-hover-background":"#F6F7F9","--ck-secondary-button-hover-box-shadow":"0 0 0 1px #D9DBDD, 0px 0 0 rgba(0, 0, 0, 0.02)","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 3px 16px rgba(0, 0, 0, 0.08)","--ck-body-color":"#414451","--ck-body-color-muted":"#9196A1","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#F6F8FA","--ck-tertiary-border-radius":"13px","--ck-tertiary-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-body-action-color":"#999999","--ck-body-divider":"#f7f6f8","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#F9FAFA","--ck-body-disclaimer-color":"#AFB1B6","--ck-body-disclaimer-link-color":"#787B84","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#E7E7E7","--ck-dropdown-color":"rgba(55, 55, 55, 0.4)","--ck-dropdown-box-shadow":"0px 2px 15px rgba(0, 0, 0, 0.15)","--ck-alert-color":"#9196A1","--ck-alert-background":"#F6F8FA","--ck-alert-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-alert-border-radius":"8px","--ck-qr-border-radius":"12px","--ck-qr-dot-color":"#2E3138","--ck-qr-border-color":"#E9EAEC","--ck-siwe-border":"#EAEBED"},wIe={"--ck-font-family":'"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"10px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-border-radius":"8px","--ck-connectbutton-color":"#ffffff","--ck-connectbutton-background":"#313235","--ck-connectbutton-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-connectbutton-hover-background":"#414144","--ck-connectbutton-active-background":"#4C4D4F","--ck-connectbutton-balance-color":"#ffffff","--ck-connectbutton-balance-background":"#1F2023","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px #313235","--ck-connectbutton-balance-hover-background":"#313235","--ck-connectbutton-balance-active-background":"#414144","--ck-primary-button-border-radius":"8px","--ck-primary-button-color":"#ffffff","--ck-primary-button-background":"rgba(255, 255, 255, 0.08)","--ck-primary-button-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-primary-button-hover-background":"rgba(255, 255, 255, 0.2)","--ck-secondary-button-border-radius":"8px","--ck-secondary-button-color":"#ffffff","--ck-secondary-button-background":"#363638","--ck-secondary-button-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-secondary-button-hover-background":"#3c3c3e","--ck-overlay-background":"rgba(0,0,0,0.4)","--ck-modal-box-shadow":"inset 0 0 0 1px #38393C, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-focus-color":"#1A88F8","--ck-body-color":"#ffffff","--ck-body-color-muted":"#8B8F97","--ck-body-color-muted-hover":"#ffffff","--ck-body-background":"#1F2023","--ck-body-background-transparent":"rgba(31, 32, 35, 0)","--ck-body-background-secondary":"#313235","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"rgba(255, 255, 255, 0.02)","--ck-body-background-tertiary":"#313235","--ck-tertiary-border-radius":"12px","--ck-tertiary-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.02)","--ck-body-action-color":"#8B8F97","--ck-body-divider":"rgba(255,255,255,0.1)","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#2B2D31","--ck-body-disclaimer-box-shadow":"none","--ck-body-disclaimer-color":"#808183","--ck-body-disclaimer-link-color":"#AAABAD","--ck-body-disclaimer-link-hover-color":"#ffffff","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-background":"#1F2023","--ck-tooltip-background-secondary":"#1F2023","--ck-tooltip-color":"#ffffff","--ck-tooltip-shadow":" 0 0 0 1px rgba(255, 255, 255, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#6C7381","--ck-dropdown-button-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-dropdown-button-background":"#313235","--ck-dropdown-pending-color":"#8B8F97","--ck-dropdown-active-color":"#FFF","--ck-dropdown-active-static-color":"#FFF","--ck-dropdown-active-background":"rgba(255, 255, 255, 0.07)","--ck-dropdown-color":"#8B8F97","--ck-dropdown-background":"#313235","--ck-dropdown-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.03)","--ck-dropdown-border-radius":"8px","--ck-alert-color":"#8B8F97","--ck-alert-background":"#404145","--ck-alert-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.02)","--ck-qr-border-radius":"12px","--ck-qr-dot-color":"#ffffff","--ck-qr-border-color":"rgba(255,255,255,0.1)"},xIe={"--ck-font-family":'"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"0px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-border-radius":"0px","--ck-connectbutton-color":"#414451","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-connectbutton-hover-color":"#111","--ck-connectbutton-hover-box-shadow":"inset 0 0 0 1px #111","--ck-connectbutton-balance-color":"#111111","--ck-connectbutton-balance-background":"#F7F7F7","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px #F7F7F7","--ck-connectbutton-balance-hover-background":"#f1f1f3","--ck-connectbutton-balance-hover-box-shadow":"inset 0 0 0 1px #111","--ck-primary-button-border-radius":"0px","--ck-primary-button-color":"#111111","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-primary-button-hover-box-shadow":"inset 0 0 0 1px #111111","--ck-secondary-button-border-radius":"0px","--ck-secondary-button-color":"#111111","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-secondary-button-hover-box-shadow":"inset 0 0 0 1px #111111","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#E7E7E7","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 3px 16px rgba(0, 0, 0, 0.08)","--ck-body-color":"#111111","--ck-body-color-muted":"#A0A0A0","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#ffffff","--ck-tertiary-border-radius":"0px","--ck-tertiary-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-body-action-color":"#A0A0A0","--ck-body-divider":"#EBEBEB","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#FAFAFA","--ck-body-disclaimer-box-shadow":"inset 0 1px 0 0 #ECECEC","--ck-body-disclaimer-color":"#9D9D9D","--ck-body-disclaimer-link-color":"#6E6E6E","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-border-radius":"0px","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-active-border-radius":"0","--ck-dropdown-box-shadow":"0px 2px 15px rgba(0, 0, 0, 0.15)","--ck-dropdown-border-radius":"0","--ck-alert-color":"rgba(17, 17, 17, 0.4)","--ck-alert-background":"#fff","--ck-alert-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-alert-border-radius":"0","--ck-qr-border-radius":"0px","--ck-qr-dot-color":"#111111","--ck-qr-border-color":"#EBEBEB","--ck-modal-h1-font-weight":"400","--ck-modal-heading-font-weight":"400","--ck-primary-button-font-weight":"400","--ck-siwe-border":"#EBEBEB"},_Ie={"--ck-font-family":'"Nunito",ui-rounded,-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"24px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-font-weight":"700","--ck-connectbutton-border-radius":"14px","--ck-connectbutton-color":"#000000","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 2px #DFE4EC, 0 2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-hover-background":"#F9FAFB","--ck-connectbutton-balance-color":"#414451","--ck-connectbutton-balance-background":"#F9FAFB","--ck-connectbutton-balance-box-shadow":"0 2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-balance-hover-background":"#F5F7F9","--ck-connectbutton-balance-hover-box-shadow":"0 2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-balance-active-box-shadow":"0 0 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-active-background":"#F5F7F9","--ck-connectbutton-active-box-shadow":"inset 0 0 0 2px #CFD7E2, 0 0px 0 0 #CFD7E2, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-primary-button-border-radius":"18px","--ck-primary-button-color":"#000000","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -4px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-primary-button-hover-background":"#F5F7F9","--ck-primary-button-hover-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-secondary-button-border-radius":"16px","--ck-secondary-button-color":"#000000","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -4px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-secondary-button-hover-background":"#F5F7F9","--ck-secondary-button-hover-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 3px 16px rgba(0, 0, 0, 0.08)","--ck-body-color":"#000000","--ck-body-color-muted":"#93989F","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#ffffff","--ck-tertiary-border-radius":"22px","--ck-tertiary-box-shadow":"inset 0 0 0 2px #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-body-action-color":"#93989F","--ck-body-divider":"#DFE4EC","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#F9FAFB","--ck-body-disclaimer-font-size":"14px","--ck-body-disclaimer-font-weight":"700","--ck-body-disclaimer-color":"#959697","--ck-body-disclaimer-link-color":"#646464","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":" 0 0 0 2px #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 2px #DFE4EC, 0 2px 0 2px #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#F5F7F9","--ck-dropdown-pending-color":"#848D9A","--ck-dropdown-active-color":"#000000","--ck-dropdown-active-static-color":"#848D9A","--ck-dropdown-active-background":"#F5F7F9","--ck-dropdown-color":"#848D9A","--ck-dropdown-background":"#FFFFFF","--ck-dropdown-box-shadow":"0px 2px 15px rgba(0, 0, 0, 0.15)","--ck-dropdown-border-radius":"16px","--ck-alert-color":"#848D9A","--ck-alert-background":"#F5F7F9","--ck-qr-border-radius":"24px","--ck-qr-dot-color":"#111111","--ck-qr-border-color":"#DFE4EC","--ck-modal-h1-font-weight":"700","--ck-modal-heading-font-weight":"700","--ck-primary-button-font-weight":"700","--ck-siwe-border":"#DFE4EC"},EIe={"--ck-font-family":'"PT Root UI",ui-rounded,"Nunito",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"24px","--ck-connectbutton-font-size":"16px","--ck-connectbutton-font-weight":"700","--ck-connectbutton-border-radius":"10px","--ck-connectbutton-color":"#151C3B","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 1px #D6D8E1","--ck-connectbutton-hover-background":"#E9EBF3","--ck-connectbutton-hover-box-shadow":"inset 0 0 0 1px #D4D8E8","--ck-connectbutton-active-background":"#D4D8E8","--ck-connectbutton-active-box-shadow":"inset 0 0 0 1px #D4D8E8","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#F6F7F9","--ck-connectbutton-balance-box-shadow":"none","--ck-connectbutton-balance-hover-background":"#f1f1f3","--ck-primary-button-border-radius":"16px","--ck-primary-button-color":"#151C3B","--ck-primary-button-background":"#ffffff","--ck-primary-button-font-weight":"700","--ck-primary-button-hover-background":"#DEE1ED","--ck-secondary-button-border-radius":"16px","--ck-secondary-button-color":"#151C3B","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-font-weight":"700","--ck-secondary-button-hover-background":"#DEE1ED","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-overlay-background":"rgba(213, 215, 225, 0.8)","--ck-overlay-backdrop-filter":"blur(6px)","--ck-body-color":"#151C3B","--ck-body-color-muted":"#757A8E","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#F4F4F8","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#E9E9F1","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-tertiary":"#E9E9F1","--ck-tertiary-border-radius":"24px","--ck-body-action-color":"#79809C","--ck-body-divider":"#D9DBE3","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#F9FAFA","--ck-body-disclaimer-color":"#AFB1B6","--ck-body-disclaimer-link-color":"#787B84","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#79809C","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#DEE1ED","--ck-dropdown-button-hover-box-shadow":"0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-color":"#757A8E","--ck-dropdown-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-alert-color":"#9196A1","--ck-alert-background":"#F6F8FA","--ck-alert-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-alert-border-radius":"8px","--ck-qr-border-radius":"24px","--ck-qr-dot-color":"#000000","--ck-qr-background":"#ffffff","--ck-siwe-border":"#DFE4EC","--ck-graphic-primary-background":"#fff","--ck-graphic-compass-background":"#fff","--ck-graphic-primary-box-shadow":"0px 2.94737px 14.7368px rgba(0, 0, 0, 0.1)","--ck-graphic-compass-box-shadow":"0px 2px 9px rgba(0, 0, 0, 0.15)"},Qi={base:gIe,web95:mIe,retro:yIe,soft:bIe,midnight:wIe,minimal:xIe,rounded:_Ie,nouns:EIe};const _c={default:{"--ck-font-family":`-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, - 'Apple Color Emoji', Arial, sans-serif, 'Segoe UI Emoji', - 'Segoe UI Symbol'`,"--ck-border-radius":"20px","--ck-secondary-button-border-radius":"16px"},graphics:{light:{"--ck-graphic-wave-stop-01":"#E8F17D","--ck-graphic-wave-stop-02":"#A8ECDE","--ck-graphic-wave-stop-03":"#7AA1F2","--ck-graphic-wave-stop-04":"#DEA1E8","--ck-graphic-wave-stop-05":"#F46D98","--ck-graphic-scaniconwithlogos-01":"#4E4E4E","--ck-graphic-scaniconwithlogos-02":"#272727","--ck-graphic-scaniconwithlogos-03":"#F8D74A","--ck-graphic-scaniconwithlogos-04":"#F6F7F9","--ck-chain-ethereum-01":"#25292E","--ck-chain-ethereum-02":"#fff","--ck-chain-ethereum-03":"#DFE0E0"},dark:{"--ck-graphic-wave-stop-01":"#E8F17D","--ck-graphic-wave-stop-02":"#A8ECDE","--ck-graphic-wave-stop-03":"#7AA1F2","--ck-graphic-wave-stop-04":"#DEA1E8","--ck-graphic-wave-stop-05":"#F46D98","--ck-graphic-scaniconwithlogos-01":"#AFAFAF","--ck-graphic-scaniconwithlogos-02":"#696969","--ck-graphic-scaniconwithlogos-03":"#F8D74A","--ck-graphic-scaniconwithlogos-04":"#3D3D3D"}},ens:{light:{"--ck-ens-01-start":"#FF3B30","--ck-ens-01-stop":"#FF9500","--ck-ens-02-start":"#FF9500","--ck-ens-02-stop":"#FFCC00","--ck-ens-03-start":"#FFCC00","--ck-ens-03-stop":"#34C759","--ck-ens-04-start":"#5856D6","--ck-ens-04-stop":"#AF52DE","--ck-ens-05-start":"#5AC8FA","--ck-ens-05-stop":"#007AFF","--ck-ens-06-start":"#007AFF","--ck-ens-06-stop":"#5856D6","--ck-ens-07-start":"#5856D6","--ck-ens-07-stop":"#AF52DE","--ck-ens-08-start":"#AF52DE","--ck-ens-08-stop":"#FF2D55"},dark:{"--ck-ens-01-start":"#FF453A","--ck-ens-01-stop":"#FF9F0A","--ck-ens-02-start":"#FF9F0A","--ck-ens-02-stop":"#FFD60A","--ck-ens-03-start":"#FFD60A","--ck-ens-03-stop":"#32D74B","--ck-ens-04-start":"#32D74B","--ck-ens-04-stop":"#64D2FF","--ck-ens-05-start":"#64D2FF","--ck-ens-05-stop":"#0A84FF","--ck-ens-06-start":"#0A84FF","--ck-ens-06-stop":"#5E5CE6","--ck-ens-07-start":"#5E5CE6","--ck-ens-07-stop":"#BF5AF2","--ck-ens-08-start":"#BF5AF2","--ck-ens-08-stop":"#FF2D55"}},brand:{"--ck-family-brand":"#1A88F8","--ck-brand-walletConnect":"#3B99FC","--ck-brand-coinbaseWallet":"#0052FF","--ck-brand-metamask":"#f6851b","--ck-brand-metamask-01":"#F6851B","--ck-brand-metamask-02":"#E2761B","--ck-brand-metamask-03":"#CD6116","--ck-brand-metamask-04":"#161616","--ck-brand-metamask-05":"#763D16","--ck-brand-metamask-06":"#D7C1B3","--ck-brand-metamask-07":"#C0AD9E","--ck-brand-metamask-08":"#E4761B","--ck-brand-metamask-09":"#233447","--ck-brand-metamask-10":"#E4751F","--ck-brand-metamask-11":"#FEF5E7","--ck-brand-metamask-12":"#E3C8AB","--ck-brand-trust-01":"#3375BB","--ck-brand-trust-02":"#ffffff","--ck-brand-trust-01b":"#ffffff","--ck-brand-trust-02b":"#3375BB","--ck-brand-argent":"#f36a3d","--ck-brand-imtoken-01":"#11C4D1","--ck-brand-imtoken-02":"#0062AD"}},SIe=e=>{const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(t==null)return e;const r={r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)};return`color(display-p3 ${r.r/255} ${r.g/255} ${r.b/255})`},Ec=(e,t)=>ur` - ${Object.keys(e).map(r=>{const n=e[r];return n&&`${r}:${n};`})} - `,ea={light:Qi.base.light,dark:Qi.base.dark,web95:Qi.web95,retro:Qi.retro,soft:Qi.soft,midnight:Qi.midnight,minimal:Qi.minimal,rounded:Qi.rounded,nouns:Qi.nouns},di=(e,t)=>{const r=t?" !important":"";return ur` - ${Object.keys(e).map(n=>{const o=e[n];return o&&`${n}:${o}${r};`})} - @supports (color: color(display-p3 1 1 1)) { - ${Object.keys(e).map(n=>{const o=e[n];return`${n}:${SIe(o)}${r};`})} - } - `},ao={default:Ec(_c.default),light:di(ea.light),dark:di(ea.dark),web95:di(ea.web95),retro:di(ea.retro),soft:di(ea.soft),midnight:di(ea.midnight),minimal:di(ea.minimal),rounded:di(ea.rounded),nouns:di(ea.nouns)},ru={brand:Ec(_c.brand),ensLight:Ec(_c.ens.light),ensDark:Ec(_c.ens.dark),graphicsLight:Ec(_c.graphics.light),graphicsDark:Ec(_c.graphics.dark)},a$=ur` - ${ru.brand} - ${ru.ensLight} - ${ru.graphicsLight} -`,s$=ur` - ${ru.brand} - ${ru.ensDark} - ${ru.graphicsDark} -`;let fi="auto";const T8=st(ut.div)` - ${ao.default} - - ${e=>{switch(e.$useTheme){case"web95":return fi="light",ao.web95;case"retro":return fi="light",ao.retro;case"soft":return fi="light",ao.soft;case"midnight":return fi="dark",ao.midnight;case"minimal":return fi="light",ao.minimal;case"rounded":return fi="light",ao.rounded;case"nouns":return fi="light",ao.nouns;default:return e.$useMode==="light"?(fi="light",ao.light):e.$useMode==="dark"?(fi="dark",ao.dark):ur` - @media (prefers-color-scheme: light) { - ${ao.light} - } - @media (prefers-color-scheme: dark) { - ${ao.dark} - } - `}}} - - ${e=>{switch(fi){case"light":return a$;case"dark":return s$;default:return ur` - ${a$} - @media (prefers-color-scheme: dark) { - ${s$} - } - `}}} - - - ${e=>{if(e.$customTheme)return di(e.$customTheme,!0)}} - - all: initial; - text-align: left; - text-direction: ltr; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - -webkit-text-stroke: 0.001px transparent; - text-size-adjust: none; - font-size: 16px; - - button { - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - -webkit-text-stroke: 0.001px transparent; - } - - &, - * { - font-family: var(--ck-font-family); - box-sizing: border-box; - outline: none; - border: none; - } - /* - @media (prefers-reduced-motion) { - * { - animation-duration: 60ms !important; - transition-duration: 60ms !important; - } - } - */ - img, - svg { - max-width: 100%; - } - strong { - font-weight: 600; - } - a:focus-visible, - button:focus-visible { - outline: 2px solid var(--ck-focus-color); - } -`,CIe=({...e})=>j.jsx("svg",{"aria-hidden":"true",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:j.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 11C20 15.9706 15.9706 20 11 20C6.02944 20 2 15.9706 2 11C2 6.02944 6.02944 2 11 2C15.9706 2 20 6.02944 20 11ZM22 11C22 17.0751 17.0751 22 11 22C4.92487 22 0 17.0751 0 11C0 4.92487 4.92487 0 11 0C17.0751 0 22 4.92487 22 11ZM11.6445 12.7051C11.6445 13.1348 11.3223 13.4678 10.7744 13.4678C10.2266 13.4678 9.92578 13.1885 9.92578 12.6191V12.4795C9.92578 11.4268 10.4951 10.8574 11.2686 10.3203C12.2031 9.67578 12.665 9.32129 12.665 8.59082C12.665 7.76367 12.0205 7.21582 11.043 7.21582C10.3232 7.21582 9.80762 7.57031 9.45312 8.16113C9.38282 8.24242 9.32286 8.32101 9.2667 8.39461C9.04826 8.68087 8.88747 8.8916 8.40039 8.8916C8.0459 8.8916 7.66992 8.62305 7.66992 8.15039C7.66992 7.96777 7.70215 7.7959 7.75586 7.61328C8.05664 6.625 9.27051 5.75488 11.1182 5.75488C12.9336 5.75488 14.5234 6.71094 14.5234 8.50488C14.5234 9.7832 13.7822 10.417 12.7402 11.1045C11.999 11.5986 11.6445 11.9746 11.6445 12.5762V12.7051ZM11.9131 15.5625C11.9131 16.1855 11.376 16.6797 10.7529 16.6797C10.1299 16.6797 9.59277 16.1748 9.59277 15.5625C9.59277 14.9395 10.1191 14.4453 10.7529 14.4453C11.3867 14.4453 11.9131 14.9287 11.9131 15.5625Z",fill:"currentColor"})}),l$=({...e})=>j.jsxs(ut.svg,{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[j.jsx("path",{d:"M1 13L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),j.jsx("path",{d:"M1 0.999999L13 13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),PIe=({...e})=>j.jsx(ut.svg,{width:9,height:16,viewBox:"0 0 9 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:j.jsx("path",{d:"M8 1L1 8L8 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Vw=.22,OIe={initial:{zIndex:2,opacity:0},animate:{opacity:1,scale:1,transition:{duration:Vw*.75,delay:Vw*.25,ease:[.26,.08,.25,1]}},exit:{zIndex:1,opacity:0,pointerEvents:"none",position:"absolute",left:["50%","50%"],x:["-50%","-50%"],transition:{duration:Vw,ease:[.26,.08,.25,1]}}},vn={CONNECTORS:"CONNECTORS",PROFILE:"PROFILE",CONNECT:"CONNECT"},AIe=({open:e,pages:t,pageId:r,positionInside:n,inline:o,onClose:i,onBack:a,onInfo:s})=>{const l=oi(),c=k8(),[u,f]=kU({timeout:160,preEnter:!0,mountOnEnter:!0,unmountOnExit:!0}),d=!(u==="exited"||u==="unmounted"),p=u==="preEnter"||u!=="exiting",h=l.route===vn.CONNECTORS?0:1,y=pIe(h,h);I.useEffect(()=>{f(e),e&&E(void 0)},[e]);const[_,b]=I.useState({width:void 0,height:void 0}),[m,E]=I.useState(void 0),A=W=>{const P={width:W==null?void 0:W.offsetWidth,height:W==null?void 0:W.offsetHeight};b({width:`${P==null?void 0:P.width}px`,height:`${P==null?void 0:P.height}px`})},D=I.useRef(null),$=I.useRef(),g=I.useCallback(W=>{W&&(D.current=W,E(m!==void 0),clearTimeout($.current),$.current=setTimeout(()=>E(!1),360),A(W))},[m,$,D]);I.useEffect(()=>{D.current&&A(D.current)},[c]),I.useEffect(()=>{if(!d){b({width:void 0,height:void 0});return}const W=P=>{P.key==="Escape"&&i&&i()};return document.addEventListener("keydown",W),()=>{document.removeEventListener("keydown",W)}},[d,i]);const N={"--height":_.height,"--width":_.width};function V(){switch(l.route){case vn.CONNECTORS:return"Connectors";case vn.PROFILE:return"Profile";default:return""}}const K=j.jsx(T8,{$useTheme:l.theme,$useMode:l.mode,$customTheme:l.customTheme,children:j.jsxs(lIe,{role:"dialog",style:{pointerEvents:p?"auto":"none",position:n?"absolute":void 0},children:[!o&&j.jsx(rIe,{$active:p,onClick:i}),j.jsxs(cIe,{style:N,initial:!1,children:[j.jsx("div",{style:{pointerEvents:m?"all":"none",position:"absolute",top:0,bottom:0,left:"50%",transform:"translateX(-50%)",width:"var(--width)",zIndex:9,transition:"width 200ms ease"}}),j.jsxs(XG,{className:`${p&&"active"}`,children:[j.jsx(Ko,{initial:!1,children:l.errorMessage&&j.jsxs(Yke,{initial:{y:"10%",x:"-50%"},animate:{y:"-100%"},exit:{y:"100%"},transition:{duration:.2,ease:"easeInOut"},children:[j.jsx("span",{children:l.errorMessage}),j.jsx("div",{onClick:()=>console.log("click"),style:{position:"absolute",right:24,top:24},children:j.jsx(l$,{})})]})}),j.jsxs(ZG,{children:[i&&j.jsx(Mx,{"aria-label":"close",onClick:i,children:j.jsx(l$,{})}),j.jsx("div",{style:{position:"absolute",top:23,left:20,width:32,height:32},children:j.jsx(Ko,{children:a?j.jsx(Rx,{disabled:m,"aria-label":"back",onClick:a,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:c?0:.1,delay:c?.01:0},children:j.jsx(PIe,{})},"backButton"):l.route===vn.PROFILE&&s&&j.jsx(Nx,{disabled:m,"aria-label":"more info",onClick:s,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:c?0:.1,delay:c?.01:0},children:j.jsx(CIe,{})},"infoButton")})})]}),j.jsx(Pm,{children:j.jsx(Ko,{children:j.jsx(ut.div,{style:{position:"absolute",top:0,bottom:0,left:52,right:52,display:"flex",justifyContent:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:c?0:.17,delay:c?.01:0},children:j.jsx($8,{children:V()})},`${l.route}-''}`)})}),j.jsx(sIe,{children:t.map(({id:W,content:P})=>j.jsx(kIe,{open:W===r,initial:!n&&u!=="entered",enterAnim:W===r?h>y?"active-scale-up":"active":"",exitAnim:W!==r?h{const[i,a]=kU({timeout:400,preEnter:!0,initialEntered:t,mountOnEnter:!0,unmountOnExit:!0}),s=!(i==="exited"||i==="unmounted"),l=i==="preEnter"||i!=="exiting";return I.useEffect(()=>{a(t)},[t]),s?j.jsx(JG,{className:`${l?n:o}`,style:{animationDuration:r?"0ms":void 0,animationDelay:r?"0ms":void 0},children:e}):null},c$=({children:e})=>j.jsx(eIe,{children:j.jsx("span",{children:e??"or"})}),IIe=({background:e=!1,...t})=>j.jsx("svg",{...t,"aria-hidden":"true",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e?{background:"var(--ck-brand-walletConnect)"}:void 0,children:j.jsx("path",{d:"M9.58818 11.8556C13.1293 8.31442 18.8706 8.31442 22.4117 11.8556L22.8379 12.2818C23.015 12.4588 23.015 12.7459 22.8379 12.9229L21.3801 14.3808C21.2915 14.4693 21.148 14.4693 21.0595 14.3808L20.473 13.7943C18.0026 11.3239 13.9973 11.3239 11.5269 13.7943L10.8989 14.4223C10.8104 14.5109 10.6668 14.5109 10.5783 14.4223L9.12041 12.9645C8.94336 12.7875 8.94336 12.5004 9.12041 12.3234L9.58818 11.8556ZM25.4268 14.8706L26.7243 16.1682C26.9013 16.3452 26.9013 16.6323 26.7243 16.8093L20.8737 22.6599C20.6966 22.8371 20.4096 22.8371 20.2325 22.6599L16.0802 18.5076C16.0359 18.4634 15.9641 18.4634 15.9199 18.5076L11.7675 22.6599C11.5905 22.8371 11.3034 22.8371 11.1264 22.66C11.1264 22.66 11.1264 22.6599 11.1264 22.6599L5.27561 16.8092C5.09856 16.6322 5.09856 16.3451 5.27561 16.168L6.57313 14.8706C6.75019 14.6934 7.03726 14.6934 7.21431 14.8706L11.3668 19.023C11.411 19.0672 11.4828 19.0672 11.5271 19.023L15.6793 14.8706C15.8563 14.6934 16.1434 14.6934 16.3205 14.8706L20.473 19.023C20.5172 19.0672 20.589 19.0672 20.6332 19.023L24.7856 14.8706C24.9627 14.6935 25.2498 14.6935 25.4268 14.8706Z",fill:e?"white":"var(--ck-brand-walletConnect)"})}),$Ie=({...e})=>j.jsx("svg",{...e,"aria-hidden":"true",width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:"black"},children:j.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M37.2106 16H16V29.4577H19.2182V19.2182L37.2106 19.1011V16ZM37.3568 33.4073V54.6179H50.8146V51.3997H40.575L40.458 33.4073H37.3568ZM16 72.1714H37.2106V69.0703L19.2182 68.9533V58.7137H16V72.1714ZM50.9609 16H72.1714V29.4577H68.9533V19.2182L50.9609 19.1011V16ZM72.1714 72.1714H50.9609V69.0703L68.9533 68.9533V58.7137H72.1714V72.1714Z",fill:"white"})}),TIe=({...e})=>j.jsx("svg",{...e,version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:"36.000000pt",height:"36.000000pt",viewBox:"0 0 108.000000 108.000000",preserveAspectRatio:"xMidYMid meet",children:j.jsxs("g",{transform:"translate(0.000000,108.000000) scale(0.100000,-0.100000)",fill:"#000000",stroke:"none",children:[j.jsx("path",{d:`M655 871 l-30 -6 -3 -108 -3 -109 31 6 c16 3 44 9 60 12 l30 6 0 104 -0 104 -27 -1 c-16 -1 -41 -4 -58 -8z`}),j.jsx("path",{d:`M381 831 c-19 -3 -36 -10 -37 -16 -2 -5 54 -136 124 -290 l128 -280 -64 3 c35 1 68 6 73 11 5 5 -48 133 -120 292 l-129 284 -34 1 c-19 1 -50 -1 --69 -5z`}),j.jsx("path",{d:`M390 426 l-55 -11 -3 -114 -3 -114 52 7 c90 12 90 12 87 133 -2 60 --7 107 -13 109 -5 1 -35 -3 -65 -10z`})]})});var Rr={AlephiumIcon:TIe,WalletConnect:IIe,Ledger:$Ie};let eK=[];typeof window<"u"&&(eK=[{id:"injected",name:"Extension Wallet",shortName:"Browser",logos:{default:j.jsx(Rr.AlephiumIcon,{}),mobile:j.jsx("div",{style:{padding:5,background:"var(--ck-body-background-tertiary)",borderRadius:"27%",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.02)"},children:j.jsx("div",{style:{transform:"scale(0.75)",position:"relative",width:"100%"},children:j.jsx(Rr.AlephiumIcon,{})})}),transparent:j.jsx(Rr.AlephiumIcon,{})},scannable:!1,extensionIsInstalled:()=>!!window.alephiumProviders},{id:"desktopWallet",name:"Desktop wallet",shortName:"Desktop wallet",logos:{default:j.jsx(Rr.AlephiumIcon,{}),mobile:j.jsx("div",{style:{padding:5,background:"var(--ck-body-background-tertiary)",borderRadius:"27%",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.02)"},children:j.jsx("div",{style:{transform:"scale(0.75)",position:"relative",width:"100%"},children:j.jsx(Rr.AlephiumIcon,{})})}),transparent:j.jsx(Rr.AlephiumIcon,{})},scannable:!1},{id:"walletConnect",name:"WalletConnect",shortName:"WalletConnect",logos:{default:j.jsx(Rr.WalletConnect,{}),mobile:j.jsx("div",{style:{padding:5,background:"var(--ck-body-background-secondary)",borderRadius:"21%",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.02)"},children:j.jsx(Rr.WalletConnect,{})}),transparent:j.jsx(Rr.WalletConnect,{background:!1}),connectorButton:j.jsx(Rr.WalletConnect,{}),qrCode:j.jsx(Rr.WalletConnect,{background:!0})},logoBackground:"var(--ck-brand-walletConnect)",scannable:!0}]);var Sl=eK;const DIe=st(ut.div)` - display: flex; - flex-direction: column; - gap: 12px; - padding: 0 0 16px; -`,MIe=st(ut.button)` - cursor: pointer; - user-select: none; - position: relative; - display: flex; - align-items: center; - padding: 0 20px; - width: 100%; - height: 64px; - font-size: 17px; - font-weight: var(--ck-primary-button-font-weight, 500); - line-height: 20px; - text-align: var(--ck-body-button-text-align, left); - transition: 180ms ease; - transition-property: background, color, box-shadow, transform; - will-change: transform, box-shadow, background-color, color; - - --fallback-color: var(--ck-primary-button-color); - --fallback-background: var(--ck-primary-button-background); - --fallback-box-shadow: var(--ck-primary-button-box-shadow); - --fallback-border-radius: var(--ck-primary-button-border-radius); - - --color: var(--ck-primary-button-color, var(--fallback-color)); - --background: var(--ck-primary-button-background, var(--fallback-background)); - --box-shadow: var(--ck-primary-button-box-shadow, var(--fallback-box-shadow)); - --border-radius: var(--ck-primary-button-border-radius, var(--fallback-border-radius)); - - --hover-color: var(--ck-primary-button-hover-color, var(--color)); - --hover-background: var(--ck-primary-button-hover-background, var(--background)); - --hover-box-shadow: var(--ck-primary-button-hover-box-shadow, var(--box-shadow)); - --hover-border-radius: var(--ck-primary-button-hover-border-radius, var(--border-radius)); - - --active-color: var(--ck-primary-button-active-color, var(--hover-color)); - --active-background: var(--ck-primary-button-active-background, var(--hover-background)); - --active-box-shadow: var(--ck-primary-button-active-box-shadow, var(--hover-box-shadow)); - --active-border-radius: var(--ck-primary-button-active-border-radius, var(--hover-border-radius)); - - color: var(--color); - background: var(--background); - box-shadow: var(--box-shadow); - border-radius: var(--border-radius); - - &:disabled { - transition: 180ms ease; - } - - &:not(:disabled) { - &:hover { - color: var(--hover-color); - background: var(--hover-background); - box-shadow: var(--hover-box-shadow); - border-radius: var(--hover-border-radius); - } - &:focus-visible { - transition-duration: 100ms; - color: var(--hover-color); - background: var(--hover-background); - box-shadow: var(--hover-box-shadow); - border-radius: var(--hover-border-radius); - } - &:active { - color: var(--active-color); - background: var(--active-background); - box-shadow: var(--active-box-shadow); - border-radius: var(--active-border-radius); - } - } -`,RIe=st(ut.span)` - width: 100%; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - padding-right: 38px; -`,NIe=st(ut.div)` - position: absolute; - right: 20px; - width: 32px; - height: 32px; - overflow: hidden; - svg { - display: block; - width: 100%; - height: 100%; - } -`,FIe=st(ut.div)` - display: flex; - flex-direction: row; - align-items: flex-start; - justify-content: space-between; - padding: 14px 0 28px; - margin: 0 0; -`,BIe=st(ut.button)` - --background: var(--ck-body-background-secondary); - cursor: pointer; - user-select: none; - position: relative; - padding: 0; - width: 100%; - min-width: 25%; - font-size: 13px; - font-weight: 500; - line-height: 13px; - text-align: center; - transition: transform 100ms ease; - - background: none; - - &:disabled { - cursor: not-allowed; - opacity: 0.4; - } - - &:not(:disabled) { - &:active { - transform: scale(0.97); - } - } -`,jIe=st(ut.span)` - display: block; - padding: 10px 0 0; - color: var(--ck-body-color); - opacity: 0.75; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -`,LIe=st(ut.div)` - margin: 0 auto; - width: 60px; - height: 60px; - overflow: hidden; - svg { - border-radius: inherit; - display: block; - position: relative; - transform: translate3d(0, 0, 0); - width: 100%; - height: 100%; - } -`,zIe=()=>{const e=Sl.find(t=>t.id==="desktopWallet");if(!e)throw new Error("Desktop wallet connector configuration not found");return e},UIe=e=>{const t=typeof window<"u",r=k8()&&!t;return{id:"injected",name:"Extension Wallet",shortName:"browser",scannable:!1,logos:{default:j.jsx(Rr.AlephiumIcon,{})},installed:!!(!r&&t)}},HIe=e=>({id:"walletConnect",name:"Other Wallets",logos:{default:j.jsx(Rr.WalletConnect,{}),mobile:j.jsx(Rr.WalletConnect,{}),transparent:j.jsx(Rr.WalletConnect,{background:!1}),connectorButton:j.jsx(Rr.WalletConnect,{}),qrCode:j.jsx(Rr.WalletConnect,{background:!0})},logoBackground:"var(--ck-brand-walletConnect)",scannable:!0}),VIe=({})=>[UIe(),HIe(),zIe()];function WIe(){return VIe({})}const qIe=()=>{const e=oi(),t=k8(),r=WIe();return j.jsx(Os,{style:{width:312},children:t?j.jsx(j.Fragment,{children:j.jsx(FIe,{children:Sl.map(n=>{var o,i,a,s,l;const c=Sl.filter(d=>d.id===n.id)[0];if(!c)return null;let u=c.logos,f=(i=(o=c.shortName)!==null&&o!==void 0?o:c.name)!==null&&i!==void 0?i:n.name;if(c.id==="injected"&&n.name){const d=u$(n.name,r);d&&(u=d.logos,f=d.name.replace(" Wallet",""))}return c.id==="walletConnect"?f="Wallet Connect":c.id==="desktopWallet"&&(f="Desktop wallet"),j.jsxs(BIe,{onClick:()=>{e.setRoute(vn.CONNECT),e.setConnectorId(n.id)},children:[j.jsx(LIe,{children:(l=(s=(a=u.mobile)!==null&&a!==void 0?a:u.appIcon)!==null&&s!==void 0?s:u.connectorButton)!==null&&l!==void 0?l:u.default}),j.jsx(jIe,{children:f})]},`m-${n.id}`)})})}):j.jsx(j.Fragment,{children:j.jsx(DIe,{children:Sl.map(n=>{var o,i;const a=Sl.filter(u=>u.id===n.id)[0];if(!a)return null;let s=a.logos,l=(o=a.name)!==null&&o!==void 0?o:n.name;if(a.id==="walletConnect"?l="WalletConnect":a.id==="desktopWallet"&&(l="Desktop wallet"),a.id==="injected"&&n.name){const u=u$(n.name,r);u&&(s=u.logos,l=u.name)}let c=(i=s.connectorButton)!==null&&i!==void 0?i:s.default;return a.extensionIsInstalled&&s.appIcon&&a.extensionIsInstalled()&&(c=s.appIcon),j.jsxs(MIe,{disabled:e.route!==vn.CONNECTORS,onClick:()=>{e.setRoute(vn.CONNECT),e.setConnectorId(n.id)},children:[j.jsx(NIe,{children:c}),j.jsx(RIe,{children:l})]},n.id)})})})})},u$=(e,t)=>{let r=e.split(/[(),]+/);r.shift(),r=r.map(i=>i.trim());const n=r.filter(i=>t.map(s=>s.name).includes(i)?i:null);return n.length===0?null:t.filter(i=>i.installed&&i.name===n[0])[0]},vc=st(ut.div)` - display: flex; - flex-direction: column; - gap: 6px; - position: relative; - left: 0; - right: 0; - ${uo} { - padding: 0 8px 32px; - gap: 12px; - } -`,Ww=2,GIe=Jn` - 0%{ transform:none; } - 25%{ transform:translateX(${Ww}px); } - 50%{ transform:translateX(-${Ww}px); } - 75%{ transform:translateX(${Ww}px); } - 100%{ transform:none; } -`,KIe=Jn` - 0%{ opacity:1; } - 100%{ opacity:0; } -`,Fd=st(ut.div)` - /* - background: var( - --ck-body-background - ); // To stop the overlay issue during transition for the squircle spinner - */ -`,YIe=st(ut.div)` - display: flex; - align-items: center; - justify-content: center; - margin: 10px auto 16px; - height: 120px; - //transform: scale(1.001); // fixes shifting issue between states -`,XIe=st(ut.div)` - user-select: none; - position: relative; - --spinner-error-opacity: 0; - &:before { - content: ''; - position: absolute; - inset: -5px; - opacity: 0; - background: var(--ck-body-color-danger); - ${e=>e.$circle&&ur` - border-radius: 50%; - background: none; - box-shadow: inset 0 0 0 3.5px var(--ck-body-color-danger); - `} - } - ${e=>e.$shake&&ur` - animation: ${GIe} 220ms ease-out both; - &:before { - animation: ${KIe} 220ms ease-out 750ms both; - } - `} -`,ZIe=st(ut.button)` - z-index: 5; - appearance: none; - position: absolute; - right: 2px; - bottom: 2px; - padding: 0; - display: flex; - align-items: center; - justify-content: center; - width: 32px; - height: 32px; - border-radius: 16px; - cursor: pointer; - overflow: hidden; - background: none; - - color: var(--ck-body-background); - transition: color 200ms ease; - box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.15); - - &:before { - z-index: 3; - content: ''; - position: absolute; - inset: 0; - opacity: 0; - transition: opacity 200ms ease; - background: var(--ck-body-color); - } - - &:hover:before { - opacity: 0.1; - } -`,JIe=st(ut.div)` - position: absolute; - inset: 0; - - &:before { - z-index: 1; - content: ''; - position: absolute; - inset: 3px; - border-radius: 16px; - background: conic-gradient(from 90deg, currentColor 10%, var(--ck-body-color) 80%); - } - - svg { - z-index: 2; - display: block; - position: relative; - width: 100%; - height: 100%; - } -`,f$=Jn` - 0%{ transform: rotate(0deg); } - 100%{ transform: rotate(360deg); } -`,QIe=st(ut.div)` - position: absolute; - right: 16px; - top: 0; - bottom: 0; - display: flex; - align-items: center; - justify-content: center; - animation: ${f$} 1s linear infinite; - svg { - display: block; - position: relative; - animation: ${f$} 1s ease-in-out infinite; - } -`,nu=st.svg` - --x: -3px; - --stroke-width: 2; - position: relative; - top: 1px; - left: -0.5px; - display: inline-block; - vertical-align: middle; - margin-left: 9px; - margin-right: 1px; - transition: all 100ms ease; - transform: translateX(var(--x, -3px)); - color: var(--ck-secondary-button-color, var(--ck-body-color)); - opacity: 0.4; -`,Bd=st.path``,jd=st.line` - transition: inherit; - transition-property: transform; - transform-origin: 90% 50%; - transform: scaleX(0.1); -`,Fx=st.div` - display: inline-block; - vertical-align: middle; - position: relative; - margin-right: 6px; - color: var(--ck-secondary-button-color, var(--ck-body-color)); -`,e$e=st.div` - transform: rotate(90deg); - ${nu} { - margin: 0 auto; - } -`,t$e=st(ut.div)` - display: flex; - align-items: center; - justify-content: center; - inset: 0; - height: 100%; -`,r$e=st.button` - - ${({disabled:e})=>e&&ur` - cursor: not-allowed; - pointer-events: none; - `} - - ${({$variant:e})=>{if(e==="primary")return ur` - --color: var(--ck-primary-button-color, var(--ck-body-color)); - --background: var(--ck-primary-button-background, var(--ck-body-background-primary)); - --box-shadow: var(--ck-primary-button-box-shadow); - --border-radius: var(--ck-primary-button-border-radius); - --font-weight: var(--ck-primary-button-font-weight, 500); - - --hover-color: var(--ck-button-primary-hover-color, var(--color)); - --hover-background: var(--ck-primary-button-hover-background, var(--background)); - --hover-box-shadow: var(--ck-primary-button-hover-box-shadow, var(--box-shadow)); - --hover-border-radius: var(--ck-primary-button-hover-border-radius, var(--border-radius)); - --hover-font-weight: var(--ck-primary-button-font-weight, var(--font-weight)); - `;if(e==="secondary")return ur` - --color: var(--ck-secondary-button-color, var(--ck-body-color)); - --background: var(--ck-secondary-button-background, var(--ck-body-background-secondary)); - --box-shadow: var(--ck-secondary-button-box-shadow); - --border-radius: var(--ck-secondary-button-border-radius); - --font-weight: var(--ck-secondary-button-font-weight, 500); - - --hover-color: var(--ck-secondary-button-hover-color, var(--color)); - --hover-background: var(--ck-secondary-button-hover-background, var(--background)); - --hover-box-shadow: var(--ck-secondary-button-hover-box-shadow, var(--box-shadow)); - --hover-border-radius: var(--ck-secondary-button-hover-border-radius, var(--border-radius)); - --hover-font-weight: var(--ck-secondary-button-font-weight, var(--font-weight)); - `;if(e==="tertiary")return ur` - --color: var(--ck-tertiary-button-color, var(--ck-secondary-button-color)); - --background: var(--ck-tertiary-button-background, var(--ck-secondary-button-background)); - --box-shadow: var(--ck-tertiary-button-box-shadow, var(--ck-secondary-button-box-shadow)); - --border-radius: var(--ck-tertiary-button-border-radius, var(--ck-secondary-button-border-radius)); - --font-weight: var(--ck-tertiary-button-font-weight, var(--ck-secondary-button-font-weight)); - - --hover-color: var(--button-tertiary-hover-color, var(--ck-tertiary-button-color)); - --hover-background: var(--ck-tertiary-button-hover-background, var(--ck-tertiary-button-background)); - --hover-box-shadow: var(--ck-tertiary-button-hover-box-shadow, var(--ck-tertiary-button-box-shadow)); - --hover-border-radius: var( - --ck-tertiary-button-hover-border-radius, - var(--ck-tertiary-button-border-radius, var(--border-radius)) - ); - --hover-font-weight: var(--ck-tertiary-button-font-weight, var(--ck-secondary-button-font-weight)); - `}} - - appearance: none; - cursor: pointer; - user-select: none; - min-width: fit-content; - width: 100%; - display:block; - text-align: center; - height: 48px; - margin: 12px 0 0; - line-height: 48px; - padding: 0 4px; - font-size: 16px; - font-weight: var(--font-weight,500); - text-decoration: none; - white-space: nowrap; - transition: 100ms ease; - transition-property: box-shadow, background-color; - color: var(--color); - background: var(--background); - border-radius: var(--border-radius); - box-shadow: var(--box-shadow); - will-change: transform, box-shadow, background-color, color; - - ${Fx} { - ${nu} { - transform: translateX(0); - ${jd} { - transform: none; - } - ${Bd} { - } - } - } -} - - @media only screen and (min-width: ${Pa.mobileWidth+1}px) { - &:hover, - &:focus-visible { - color: var(--ck-accent-text-color, var(--hover-color)); - background: var(--ck-accent-color, var(--hover-background)); - border-radius: var(--hover-border-radius); - box-shadow: var(--hover-box-shadow); - - ${nu} { - transform: translateX(0); - ${jd} { - transform: none; - } - ${Bd} { - } - } - ${Fx} { - ${nu} { - transform: translateX(var(--x)); - ${jd} { - transform: scaleX(0.1); - } - ${Bd} { - } - } - } - } - &:active { - box-shadow: var(--ck-secondary-button-active-box-shadow, var(--hover-box-shadow)); - } - } - @media only screen and (max-width: ${Pa.mobileWidth}px) { - transition: transform 100ms ease; - transform: scale(1); - font-size: 17px; - &:active { - } - } -`,n$e=st.div` - transform: translateZ(0); // Shifting fix - position: relative; - display: inline-block; - vertical-align: middle; - max-width: calc(100% - 42px); - /* - overflow: hidden; - text-overflow: ellipsis; - */ -`,d$=st(ut.div)` - position: relative; - display: inline-block; - vertical-align: middle; - max-width: 20px; - max-height: 20px; - margin: 0 10px; - &:first-child { - margin-left: 0; - } - &:last-child { - margin-right: 0; - } - ${e=>e.$rounded&&ur` - overflow: hidden; - border-radius: 5px; - `} - svg { - display: block; - position: relative; - max-width: 100%; - height: auto; - } -`,Om={duration:.4,ease:[.175,.885,.32,.98]},o$e=()=>j.jsx(QIe,{initial:{opacity:0,rotate:180},animate:{opacity:1,rotate:0},exit:{position:"absolute",opacity:0,rotate:-180,transition:{...Om}},transition:{...Om,delay:.2},children:j.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[j.jsx("circle",{cx:"9",cy:"9",r:"7",stroke:"currentColor",strokeOpacity:"0.1",strokeWidth:"2.5"}),j.jsx("path",{d:"M16 9C16 5.13401 12.866 2 9 2",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})]})}),Uc=({children:e,variant:t="secondary",disabled:r,icon:n,iconPosition:o="left",roundedIcon:i,waiting:a,arrow:s,download:l,href:c,style:u,onClick:f})=>{const d=typeof e=="string"?e:Ix(e).join(""),p=typeof c=="string"?c:Ix(c).join("");return j.jsx(r$e,{as:c?"a":void 0,onClick:h=>{!r&&f&&f(h)},href:p,target:c&&"_blank",rel:c&&"noopener noreferrer",disabled:r,$variant:t,style:u,children:j.jsxs(Ko,{initial:!1,children:[j.jsxs(t$e,{initial:{opacity:0,y:-10},animate:{opacity:1,y:-1},exit:{position:"absolute",opacity:0,y:10,transition:{...Om}},transition:{...Om,delay:.2},children:[n&&o==="left"&&j.jsx(d$,{$rounded:i,children:n}),l&&j.jsx(Fx,{children:j.jsx(e$e,{children:j.jsxs(nu,{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[j.jsx(jd,{stroke:"currentColor",x1:"1",y1:"6",x2:"12",y2:"6",strokeWidth:"var(--stroke-width)",strokeLinecap:"round"}),j.jsx(Bd,{stroke:"currentColor",d:"M7.51431 1.5L11.757 5.74264M7.5 10.4858L11.7426 6.24314",strokeWidth:"var(--stroke-width)",strokeLinecap:"round"})]})})}),j.jsx(n$e,{style:{paddingLeft:s?6:0},children:j.jsx($8,{children:e})}),n&&o==="right"&&j.jsx(d$,{$rounded:i,children:n}),s&&j.jsxs(nu,{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[j.jsx(jd,{stroke:"currentColor",x1:"1",y1:"6",x2:"12",y2:"6",strokeWidth:"2",strokeLinecap:"round"}),j.jsx(Bd,{stroke:"currentColor",d:"M7.51431 1.5L11.757 5.74264M7.5 10.4858L11.7426 6.24314",strokeWidth:"2",strokeLinecap:"round"})]})]},d),a&&j.jsx(o$e,{})]})})},i$e=st(ut.div)` - z-index: 2147483647; - position: fixed; - inset: 0; - pointer-events: none; -`,a$e=st(ut.div)` - --shadow: var(--ck-tooltip-shadow); - z-index: 2147483647; - position: absolute; - top: 0; - left: 0; - display: flex; - gap: 8px; - width: fit-content; - align-items: center; - justify-content: center; - border-radius: var(--ck-tooltip-border-radius, ${e=>e.$size==="small"?11:14}px); - border-radius: ; - padding: 10px 16px 10px 12px; - font-size: 14px; - line-height: 19px; - font-weight: 500; - letter-spacing: -0.1px; - color: var(--ck-tooltip-color); - background: var(--ck-tooltip-background); - box-shadow: var(--shadow); - > span { - z-index: 3; - position: relative; - } - > div { - margin: -4px 0; // offset for icon - } - strong { - color: var(--ck-spinner-color); - } - - .ck-tt-logo { - display: inline-block; - vertical-align: text-bottom; - height: 1em; - width: 1.25em; - svg { - display: block; - height: 100%; - transform: translate(0.5px, -1px) scale(1.75); - } - } -`,s$e=st(ut.div)` - z-index: 2; - position: absolute; - display: flex; - align-items: center; - justify-content: center; - width: ${e=>e.$size==="small"?14:18}px; - right: 100%; - top: 0; - bottom: 0; - overflow: hidden; - &:before { - content: ''; - position: absolute; - box-shadow: var(--shadow); - width: ${e=>e.$size==="small"?14:18}px; - height: ${e=>e.$size==="small"?14:18}px; - transform: translate(75%, 0) rotate(45deg); - background: var(--ck-tooltip-background); - border-radius: ${e=>e.$size==="small"?2:3}px 0 0 0; - } -`,l$e=({children:e,message:t,open:r,xOffset:n=0,yOffset:o=0,delay:i})=>{const a=oi(),[s,l]=I.useState(!1),[c,u]=I.useState(!1),[f,d]=I.useState("small"),[p,h]=I.useState(!1),[y]=I.useState(a.route),_=I.useRef(null),[b,m]=RU({debounce:p?0:220,offsetSize:!0,scroll:!0}),E=()=>{let $=!1;const g=n+m.left+m.width,N=o+m.top+m.height*.5;return(g>window.innerWidth||g<0||N>window.innerHeight||N<0)&&($=!0),$};return(typeof window<"u"?I.useLayoutEffect:I.useEffect)(()=>{if(!_.current||m.top+m.bottom+m.left+m.right+m.height+m.width===0)return;const $=n+m.left+m.width,g=o+m.top+m.height*.5;!p&&$!==0&&g!==0&&h(!0),_.current.style.left=`${$}px`,_.current.style.top=`${g}px`,d(_.current.offsetHeight<=40?"small":"large"),u(E())},[m,r,s]),I.useEffect(()=>{a.open||l(!1)},[a.open]),I.useEffect(()=>{l(!!r)},[r]),j.jsxs(j.Fragment,{children:[j.jsx(ut.div,{ref:b,style:r===void 0?{cursor:"help"}:{},onHoverStart:()=>l(!0),onHoverEnd:()=>l(!1),onClick:()=>l(!1),children:e}),j.jsx(GG,{children:j.jsx(Ko,{children:y===a.route&&!c&&s&&j.jsx(T8,{$useTheme:a.theme,$useMode:a.mode,$customTheme:a.customTheme,children:j.jsx(i$e,{children:j.jsxs(a$e,{role:"tooltip",$size:f,ref:_,initial:"collapsed",animate:p?"open":{},exit:"collapsed",variants:{collapsed:{transformOrigin:"20px 50%",opacity:0,scale:.9,z:.01,y:"-50%",x:20,transition:{duration:.1}},open:{willChange:"opacity,transform",opacity:1,scale:1,z:.01,y:"-50%",x:20,transition:{ease:[.76,0,.24,1],duration:.15,delay:i||.5}}},children:[t,j.jsx(s$e,{$size:f})]})})})})})]})},c$e=st(ut.div)` - display: flex; - gap: 8px; - position: relative; - border-radius: 9px; - margin: 0 auto; - padding: 10px; - text-align: left; - font-size: 14px; - line-height: 17px; - font-weight: 400; - max-width: 260px; - min-width: 100%; - - border-radius: var(--ck-alert-border-radius, 12px); - color: var(--ck-alert-color, var(--ck-body-color-muted)); - background: var(--ck-alert-background, var(--ck-body-background-secondary)); - box-shadow: var(--ck-alert-box-shadow, var(--ck-body-box-shadow)); - - @media only screen and (max-width: ${Pa.mobileWidth}px) { - padding: 16px; - font-size: 16px; - line-height: 21px; - border-radius: 24px; - text-align: center; - } -`,u$e=st(ut.div)` - width: 24px; - height: 24px; - display: flex; - align-items: center; - justify-content: center; - svg { - display: block; - width: 100%; - height: auto; - } -`,Am=ae.forwardRef(({children:e,icon:t},r)=>j.jsxs(c$e,{children:[t&&j.jsx(u$e,{children:t}),j.jsx("div",{children:e})]}));Am.displayName="Alert";const f$e=st(ut.div)` - z-index: 4; - position: relative; - width: 100px; - height: 100px; - svg { - z-index: 3; - position: relative; - display: block; - } -`,d$e=st(ut.div)` - z-index: 2; - position: absolute; - //overflow: hidden; - inset: 6px; - border-radius: 50px; - background: var(--ck-body-background); - display: flex; - align-items: center; - justify-content: center; - svg, - img { - pointer-events: none; - display: block; - margin: 0 auto; - width: 100%; - height: 100%; - ${e=>e.$small&&ur` - width: 60%; - height: 60%; - `} - } -`,p$e=st(ut.div)` - position: absolute; - inset: -5px; -`,h$e=st(ut.div)` - pointer-events: none; - user-select: none; - z-index: 1; - position: absolute; - inset: -25%; - background: var(--ck-body-background); - div:first-child { - position: absolute; - left: 50%; - right: 0; - top: 0; - bottom: 0; - overflow: hidden; - &:before { - position: absolute; - content: ''; - inset: 0; - background: var(--ck-spinner-color); - transform-origin: 0% 50%; - animation: rotateExpiringSpinner 5000ms ease-in both; - } - } - div:last-child { - position: absolute; - left: 0; - right: 50%; - top: 0; - bottom: 0; - overflow: hidden; - &:before { - position: absolute; - content: ''; - inset: 0; - background: var(--ck-spinner-color); - transform-origin: 100% 50%; - animation: rotateExpiringSpinner 5000ms ease-out 5000ms both; - } - } - @keyframes rotateExpiringSpinner { - 0% { - transform: rotate(-180deg); - } - 100% { - transform: rotate(0deg); - } - } -`,v$e=st(ut.div)` - pointer-events: none; - user-select: none; - z-index: 1; - position: absolute; - inset: 0; - svg { - display: block; - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - animation: rotateSpinner 1200ms linear infinite; - } - @keyframes rotateSpinner { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } - } -`,g$e=({logo:e,smallLogo:t,connecting:r=!0,unavailable:n=!1,countdown:o=!1})=>j.jsxs(f$e,{transition:{duration:.5,ease:[.175,.885,.32,.98]},children:[j.jsx(d$e,{$small:!n&&t,style:n?{borderRadius:0}:void 0,children:e}),j.jsx(p$e,{children:j.jsxs(Ko,{children:[r&&j.jsx(v$e,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{duration:o?1:0}},children:j.jsxs("svg",{"aria-hidden":"true",width:"102",height:"102",viewBox:"0 0 102 102",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[j.jsx("path",{d:"M52 100C24.3858 100 2 77.6142 2 50",stroke:"url(#paint0_linear_1943_4139)",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round"}),j.jsx("defs",{children:j.jsxs("linearGradient",{id:"paint0_linear_1943_4139",x1:"2",y1:"48.5",x2:"53",y2:"100",gradientUnits:"userSpaceOnUse",children:[j.jsx("stop",{stopColor:"var(--ck-spinner-color)"}),j.jsx("stop",{offset:"1",stopColor:"var(--ck-spinner-color)",stopOpacity:"0"})]})})]})},"Spinner"),o&&j.jsxs(h$e,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.25},children:[j.jsx("div",{}),j.jsx("div",{})]},"ExpiringSpinner")]})})]}),p$=({...e})=>j.jsx("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:j.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 2.82561C0 1.26507 1.26507 0 2.82561 0H4.59161C6.15215 0 7.41722 1.26507 7.41722 2.82561V4.59161C7.41722 6.15215 6.15215 7.41722 4.59161 7.41722H2.82561C1.26507 7.41722 0 6.15215 0 4.59161V2.82561ZM2.82561 1.69536C2.20139 1.69536 1.69536 2.20139 1.69536 2.82561V4.59161C1.69536 5.21583 2.20139 5.72185 2.82561 5.72185H4.59161C5.21583 5.72185 5.72185 5.21583 5.72185 4.59161V2.82561C5.72185 2.20139 5.21583 1.69536 4.59161 1.69536H2.82561ZM0 11.4084C0 9.84791 1.26507 8.58284 2.82561 8.58284H4.59161C6.15215 8.58284 7.41722 9.8479 7.41722 11.4084V13.1744C7.41722 14.735 6.15215 16.0001 4.59161 16.0001H2.82561C1.26507 16.0001 0 14.735 0 13.1744V11.4084ZM2.82561 10.2782C2.20139 10.2782 1.69536 10.7842 1.69536 11.4084V13.1744C1.69536 13.7987 2.20139 14.3047 2.82561 14.3047H4.59161C5.21583 14.3047 5.72185 13.7987 5.72185 13.1744V11.4084C5.72185 10.7842 5.21583 10.2782 4.59161 10.2782H2.82561ZM11.4083 0C9.84779 0 8.58272 1.26507 8.58272 2.82561V4.59161C8.58272 6.15215 9.84779 7.41722 11.4083 7.41722H13.1743C14.7349 7.41722 15.9999 6.15215 15.9999 4.59161V2.82561C15.9999 1.26507 14.7349 0 13.1743 0H11.4083ZM10.2781 2.82561C10.2781 2.20139 10.7841 1.69536 11.4083 1.69536H13.1743C13.7985 1.69536 14.3046 2.20139 14.3046 2.82561V4.59161C14.3046 5.21583 13.7985 5.72185 13.1743 5.72185H11.4083C10.7841 5.72185 10.2781 5.21583 10.2781 4.59161V2.82561ZM15.7351 9.96026C15.7351 10.7795 15.0709 11.4437 14.2516 11.4437C13.4323 11.4437 12.7682 10.7795 12.7682 9.96026C12.7682 9.14098 13.4323 8.47682 14.2516 8.47682C15.0709 8.47682 15.7351 9.14098 15.7351 9.96026ZM9.96026 11.4437C10.7795 11.4437 11.4437 10.7795 11.4437 9.96026C11.4437 9.14098 10.7795 8.47682 9.96026 8.47682C9.14098 8.47682 8.47682 9.14098 8.47682 9.96026C8.47682 10.7795 9.14098 11.4437 9.96026 11.4437ZM15.7351 14.2517C15.7351 15.071 15.0709 15.7352 14.2516 15.7352C13.4323 15.7352 12.7682 15.071 12.7682 14.2517C12.7682 13.4325 13.4323 12.7683 14.2516 12.7683C15.0709 12.7683 15.7351 13.4325 15.7351 14.2517ZM9.96026 15.7352C10.7795 15.7352 11.4437 15.071 11.4437 14.2517C11.4437 13.4325 10.7795 12.7683 9.96026 12.7683C9.14098 12.7683 8.47682 13.4325 8.47682 14.2517C8.47682 15.071 9.14098 15.7352 9.96026 15.7352Z",fill:"currentColor",fillOpacity:"0.3"})}),m$e=({...e})=>j.jsxs("svg",{"aria-hidden":"true",width:"19",height:"18",viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[j.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.81753 1.60122C7.39283 0.530035 8.46953 0 9.50409 0C10.5507 0 11.6022 0.539558 12.1805 1.59767L18.6047 13.3334C18.882 13.8283 19 14.3568 19 14.8622C19 16.5296 17.7949 18 15.9149 18H3.08514C1.20508 18 0 16.5296 0 14.8622C0 14.3454 0.131445 13.8172 0.405555 13.3379L6.81753 1.60122ZM9.50409 2C9.13355 2 8.77256 2.18675 8.57866 2.54907L8.57458 2.5567L2.14992 14.3166L2.144 14.3268C2.04638 14.4959 2 14.6817 2 14.8622C2 15.5497 2.43032 16 3.08514 16H15.9149C16.5697 16 17 15.5497 17 14.8622C17 14.6681 16.9554 14.4805 16.8588 14.309L16.8529 14.2986L10.4259 2.55741C10.2191 2.1792 9.86395 2 9.50409 2Z",fill:"currentColor"}),j.jsx("path",{d:"M9.5 11.2297C9.01639 11.2297 8.7459 10.9419 8.72951 10.4186L8.60656 6.4157C8.59016 5.88372 8.95902 5.5 9.4918 5.5C10.0164 5.5 10.4016 5.89244 10.3852 6.42442L10.2623 10.4099C10.2377 10.9419 9.96721 11.2297 9.5 11.2297ZM9.5 14.5C8.95082 14.5 8.5 14.0901 8.5 13.5058C8.5 12.9215 8.95082 12.5116 9.5 12.5116C10.0492 12.5116 10.5 12.9128 10.5 13.5058C10.5 14.0988 10.041 14.5 9.5 14.5Z",fill:"currentColor"})]}),y$e=({...e})=>j.jsx("svg",{"aria-hidden":"true",width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{left:0,top:0},...e,children:j.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 0C1.79086 0 0 1.79086 0 4V10C0 12.2091 1.79086 14 4 14H6C6.55228 14 7 13.5523 7 13C7 12.4477 6.55228 12 6 12H4C2.89543 12 2 11.1046 2 10V4C2 2.89543 2.89543 2 4 2H6C6.55228 2 7 1.55228 7 1C7 0.447715 6.55228 0 6 0H4ZM11.7071 3.29289C11.3166 2.90237 10.6834 2.90237 10.2929 3.29289C9.90237 3.68342 9.90237 4.31658 10.2929 4.70711L11.5858 6H9.5H6C5.44772 6 5 6.44772 5 7C5 7.55228 5.44772 8 6 8H9.5H11.5858L10.2929 9.29289C9.90237 9.68342 9.90237 10.3166 10.2929 10.7071C10.6834 11.0976 11.3166 11.0976 11.7071 10.7071L14.7071 7.70711C15.0976 7.31658 15.0976 6.68342 14.7071 6.29289L11.7071 3.29289Z",fill:"currentColor",fillOpacity:"0.4"})}),b$e=({...e})=>j.jsx("svg",{"aria-hidden":"true",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:j.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 18C13.9706 18 18 13.9706 18 9C18 4.02944 13.9706 0 9 0C4.02944 0 0 4.02944 0 9C0 13.9706 4.02944 18 9 18ZM13.274 7.13324C13.6237 6.70579 13.5607 6.07577 13.1332 5.72604C12.7058 5.37632 12.0758 5.43932 11.726 5.86676L7.92576 10.5115L6.20711 8.79289C5.81658 8.40237 5.18342 8.40237 4.79289 8.79289C4.40237 9.18342 4.40237 9.81658 4.79289 10.2071L7.29289 12.7071C7.49267 12.9069 7.76764 13.0128 8.04981 12.9988C8.33199 12.9847 8.59505 12.8519 8.77396 12.6332L13.274 7.13324Z",fill:"currentColor"})}),w$e=({...e})=>j.jsx("svg",{"aria-hidden":"true",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:j.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16ZM24.5001 8.74263C25.0834 8.74263 25.5563 9.21551 25.5563 9.79883V14.5997C25.5563 15.183 25.0834 15.6559 24.5001 15.6559H19.6992C19.1159 15.6559 18.643 15.183 18.643 14.5997C18.643 14.0164 19.1159 13.5435 19.6992 13.5435H21.8378L20.071 11.8798C20.0632 11.8724 20.0555 11.865 20.048 11.8574C19.1061 10.915 17.8835 10.3042 16.5643 10.1171C15.2452 9.92999 13.9009 10.1767 12.7341 10.82C11.5674 11.4634 10.6413 12.4685 10.0955 13.684C9.54968 14.8994 9.41368 16.2593 9.70801 17.5588C10.0023 18.8583 10.711 20.0269 11.7273 20.8885C12.7436 21.7502 14.0124 22.2582 15.3425 22.336C16.6726 22.4138 17.9919 22.0572 19.1017 21.3199C19.5088 21.0495 19.8795 20.7333 20.2078 20.3793C20.6043 19.9515 21.2726 19.9262 21.7004 20.3228C22.1282 20.7194 22.1534 21.3876 21.7569 21.8154C21.3158 22.2912 20.8176 22.7161 20.2706 23.0795C18.7793 24.0702 17.0064 24.5493 15.2191 24.4448C13.4318 24.3402 11.7268 23.6576 10.3612 22.4998C8.9956 21.3419 8.0433 19.7716 7.6478 18.0254C7.2523 16.2793 7.43504 14.4519 8.16848 12.8186C8.90192 11.1854 10.1463 9.83471 11.7142 8.97021C13.282 8.10572 15.0884 7.77421 16.861 8.02565C18.6282 8.27631 20.2664 9.09278 21.5304 10.3525L23.4439 12.1544V9.79883C23.4439 9.21551 23.9168 8.74263 24.5001 8.74263Z",fill:"currentColor"})}),x$e=({...e})=>j.jsxs("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[j.jsx("path",{d:"M14 9.5V7C14 5.89543 13.1046 5 12 5H7C5.89543 5 5 5.89543 5 7V12C5 13.1046 5.89543 14 7 14H9.5",stroke:"var(--ck-body-color-muted)",strokeWidth:"2"}),j.jsx("rect",{x:"10",y:"10",width:"9",height:"9",rx:"2",stroke:"var(--ck-body-color-muted)",strokeWidth:"2"}),j.jsx("path",{d:"M1 3L3 5L7 1",stroke:"var(--ck-body-color)",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),_$e=st(ut.div)` - display: flex; - align-items: center; - justify-content: center; - max-width: 32px; - max-height: 32px; - width: 100%; - height: 100%; - svg { - display: block; - width: 100%; - height: 100%; - } -`,E$e=j.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[j.jsx("g",{filter:"url(#filter0_ii_927_5781)",children:j.jsxs("g",{clipPath:"url(#clip0_927_5781)",children:[j.jsx("path",{d:"M1.58771 0V12.2727H6.06498L10.0002 5.45455H20.0002V0H1.58771Z",fill:"#DB4437"}),j.jsx("path",{d:"M1.58771 0V12.2727H6.06498L10.0002 5.45455H20.0002V0H1.58771Z",fill:"url(#paint0_linear_927_5781)"}),j.jsx("path",{d:"M6.17038 12.2272L1.64538 4.46582L1.57947 4.57946L6.07265 12.284L6.17038 12.2272Z",fill:"black",fillOpacity:"0.15"}),j.jsx("path",{d:"M0 20.0003H9.51932L13.9375 15.5821V12.273H6.0625L0 1.87305V20.0003Z",fill:"#0F9D58"}),j.jsx("path",{d:"M0 20.0003H9.51932L13.9375 15.5821V12.273H6.0625L0 1.87305V20.0003Z",fill:"url(#paint1_linear_927_5781)"}),j.jsx("path",{d:"M13.8412 12.4208L13.7469 12.3662L9.38324 19.9969H9.51392L13.8435 12.4242L13.8412 12.4208Z",fill:"#263238",fillOpacity:"0.15"}),j.jsx("path",{d:"M10.0006 5.45459L13.9381 12.2728L9.51996 20H20.0006V5.45459H10.0006Z",fill:"#FFCD40"}),j.jsx("path",{d:"M10.0006 5.45459L13.9381 12.2728L9.51996 20H20.0006V5.45459H10.0006Z",fill:"url(#paint2_linear_927_5781)"}),j.jsx("path",{d:"M9.9996 5.45459L13.9371 12.2728L9.51892 20H19.9996V5.45459H9.9996Z",fill:"#FFCD40"}),j.jsx("path",{d:"M9.9996 5.45459L13.9371 12.2728L9.51892 20H19.9996V5.45459H9.9996Z",fill:"url(#paint3_linear_927_5781)"}),j.jsx("path",{d:"M1.58691 0V12.2727H6.06419L9.99941 5.45455H19.9994V0H1.58691Z",fill:"#DB4437"}),j.jsx("path",{d:"M1.58691 0V12.2727H6.06419L9.99941 5.45455H19.9994V0H1.58691Z",fill:"url(#paint4_linear_927_5781)"}),j.jsx("path",{d:"M10 5.45459V7.83527L18.9091 5.45459H10Z",fill:"url(#paint5_radial_927_5781)"}),j.jsx("path",{d:"M0 19.9998H9.51932L11.9318 15.9089L13.9375 12.2726H6.0625L0 1.87256V19.9998Z",fill:"#0F9D58"}),j.jsx("path",{d:"M0 19.9998H9.51932L12.1023 15.5112L13.9375 12.2726H6.0625L0 1.87256V19.9998Z",fill:"url(#paint6_linear_927_5781)"}),j.jsx("path",{d:"M1.58771 4.59668L8.09339 11.1012L6.06384 12.2728L1.58771 4.59668Z",fill:"url(#paint7_radial_927_5781)"}),j.jsx("path",{d:"M9.52661 19.9884L11.9084 11.1021L13.938 12.2725L9.52661 19.9884Z",fill:"url(#paint8_radial_927_5781)"}),j.jsx("path",{d:"M10.0003 14.5455C12.5107 14.5455 14.5458 12.5104 14.5458 10C14.5458 7.48966 12.5107 5.45459 10.0003 5.45459C7.48996 5.45459 5.4549 7.48966 5.4549 10C5.4549 12.5104 7.48996 14.5455 10.0003 14.5455Z",fill:"#F1F1F1"}),j.jsx("path",{d:"M9.99995 13.6365C12.0083 13.6365 13.6363 12.0084 13.6363 10.0001C13.6363 7.99183 12.0083 6.36377 9.99995 6.36377C7.99164 6.36377 6.36359 7.99183 6.36359 10.0001C6.36359 12.0084 7.99164 13.6365 9.99995 13.6365Z",fill:"#4285F4"}),j.jsx("path",{d:"M10.0003 5.34082C7.48899 5.34082 5.4549 7.37491 5.4549 9.88628V9.99991C5.4549 7.48855 7.48899 5.45446 10.0003 5.45446H20.0003V5.34082H10.0003Z",fill:"black",fillOpacity:"0.2"}),j.jsx("path",{d:"M13.9318 12.273C13.1455 13.6299 11.6818 14.5458 10 14.5458C8.31818 14.5458 6.85227 13.6299 6.06818 12.273H6.06364L0 1.87305V1.98668L6.06818 12.3867C6.85455 13.7435 8.31818 14.6594 10 14.6594C11.6818 14.6594 13.1455 13.7446 13.9318 12.3867H13.9375V12.273H13.9307H13.9318Z",fill:"white",fillOpacity:"0.1"}),j.jsx("path",{opacity:"0.1",d:"M10.1133 5.45459C10.094 5.45459 10.0758 5.45686 10.0565 5.458C12.5406 5.48868 14.5452 7.50913 14.5452 10C14.5452 12.491 12.5406 14.5114 10.0565 14.5421C10.0758 14.5421 10.094 14.5455 10.1133 14.5455C12.6247 14.5455 14.6588 12.5114 14.6588 10C14.6588 7.48868 12.6247 5.45459 10.1133 5.45459Z",fill:"black"}),j.jsx("path",{d:"M13.9769 12.4204C14.3632 11.7522 14.5871 10.9795 14.5871 10.1522C14.5874 9.68602 14.5157 9.22262 14.3746 8.77832C14.4826 9.16696 14.5451 9.57377 14.5451 9.99764C14.5451 10.8249 14.3212 11.5976 13.9348 12.2658L13.9371 12.2704L9.51892 19.9976H9.65074L13.9769 12.4204Z",fill:"white",fillOpacity:"0.2"}),j.jsx("path",{d:"M10 0.113636C15.5034 0.113636 19.9682 4.56023 20 10.0568C20 10.0375 20.0011 10.0193 20.0011 10C20.0011 4.47727 15.5239 0 10.0011 0C4.47841 0 0 4.47727 0 10C0 10.0193 0.00113639 10.0375 0.00113639 10.0568C0.0318182 4.56023 4.49659 0.113636 10 0.113636Z",fill:"white",fillOpacity:"0.2"}),j.jsx("path",{d:"M10 19.8865C15.5034 19.8865 19.9682 15.4399 20 9.94336C20 9.96268 20.0011 9.98086 20.0011 10.0002C20.0011 15.5229 15.5239 20.0002 10.0011 20.0002C4.47841 20.0002 0 15.5229 0 10.0002C0 9.98086 0.00113639 9.96268 0.00113639 9.94336C0.0318182 15.4399 4.49659 19.8865 10.0011 19.8865H10Z",fill:"black",fillOpacity:"0.15"})]})}),j.jsxs("defs",{children:[j.jsxs("filter",{id:"filter0_ii_927_5781",x:0,y:"-0.235294",width:20,height:"20.4706",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[j.jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),j.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),j.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),j.jsx("feOffset",{dy:"0.235294"}),j.jsx("feGaussianBlur",{stdDeviation:"0.235294"}),j.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),j.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.25 0"}),j.jsx("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_927_5781"}),j.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),j.jsx("feOffset",{dy:"-0.235294"}),j.jsx("feGaussianBlur",{stdDeviation:"0.235294"}),j.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),j.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"}),j.jsx("feBlend",{mode:"normal",in2:"effect1_innerShadow_927_5781",result:"effect2_innerShadow_927_5781"})]}),j.jsxs("linearGradient",{id:"paint0_linear_927_5781",x1:"2.42521",y1:"7.61591",x2:"8.39112",y2:"4.13068",gradientUnits:"userSpaceOnUse",children:[j.jsx("stop",{stopColor:"#A52714",stopOpacity:"0.6"}),j.jsx("stop",{offset:"0.66",stopColor:"#A52714",stopOpacity:0})]}),j.jsxs("linearGradient",{id:"paint1_linear_927_5781",x1:"11.6932",y1:"17.7844",x2:"5.06136",y2:"13.8981",gradientUnits:"userSpaceOnUse",children:[j.jsx("stop",{stopColor:"#055524",stopOpacity:"0.4"}),j.jsx("stop",{offset:"0.33",stopColor:"#055524",stopOpacity:0})]}),j.jsxs("linearGradient",{id:"paint2_linear_927_5781",x1:"12.9438",y1:"4.75004",x2:"14.6143",y2:"12.0569",gradientUnits:"userSpaceOnUse",children:[j.jsx("stop",{stopColor:"#EA6100",stopOpacity:"0.3"}),j.jsx("stop",{offset:"0.66",stopColor:"#EA6100",stopOpacity:0})]}),j.jsxs("linearGradient",{id:"paint3_linear_927_5781",x1:"12.9428",y1:"4.75004",x2:"14.6132",y2:"12.0569",gradientUnits:"userSpaceOnUse",children:[j.jsx("stop",{stopColor:"#EA6100",stopOpacity:"0.3"}),j.jsx("stop",{offset:"0.66",stopColor:"#EA6100",stopOpacity:0})]}),j.jsxs("linearGradient",{id:"paint4_linear_927_5781",x1:"2.42441",y1:"7.61591",x2:"8.39032",y2:"4.13068",gradientUnits:"userSpaceOnUse",children:[j.jsx("stop",{stopColor:"#A52714",stopOpacity:"0.6"}),j.jsx("stop",{offset:"0.66",stopColor:"#A52714",stopOpacity:0})]}),j.jsxs("radialGradient",{id:"paint5_radial_927_5781",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.56818 5.44891) scale(9.55455)",children:[j.jsx("stop",{stopColor:"#3E2723",stopOpacity:"0.2"}),j.jsx("stop",{offset:1,stopColor:"#3E2723",stopOpacity:0})]}),j.jsxs("linearGradient",{id:"paint6_linear_927_5781",x1:"11.6932",y1:"17.7839",x2:"5.06136",y2:"13.8976",gradientUnits:"userSpaceOnUse",children:[j.jsx("stop",{stopColor:"#055524",stopOpacity:"0.4"}),j.jsx("stop",{offset:"0.33",stopColor:"#055524",stopOpacity:0})]}),j.jsxs("radialGradient",{id:"paint7_radial_927_5781",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(1.57975 4.60463) scale(8.86818)",children:[j.jsx("stop",{stopColor:"#3E2723",stopOpacity:"0.2"}),j.jsx("stop",{offset:1,stopColor:"#3E2723",stopOpacity:0})]}),j.jsxs("radialGradient",{id:"paint8_radial_927_5781",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.97775 10.0157) scale(9.98523)",children:[j.jsx("stop",{stopColor:"#263238",stopOpacity:"0.2"}),j.jsx("stop",{offset:1,stopColor:"#263238",stopOpacity:0})]}),j.jsx("clipPath",{id:"clip0_927_5781",children:j.jsx("rect",{width:20,height:20,rx:10,fill:"white"})})]})]}),S$e=j.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[j.jsxs("g",{clipPath:"url(#clip0_927_5847)",children:[j.jsx("path",{d:"M19.011 6.71023C18.5898 5.69685 17.7355 4.60269 17.0665 4.25681C17.5436 5.18063 17.8747 6.17276 18.0481 7.19792L18.0499 7.21417C16.954 4.48315 15.0963 3.38023 13.5782 0.981835C13.5014 0.860539 13.4246 0.738994 13.3498 0.610696C13.3071 0.537418 13.2728 0.471393 13.2431 0.410621C13.1801 0.288713 13.1316 0.159878 13.0985 0.0267267C13.0985 0.0205825 13.0963 0.0146369 13.0923 0.0100242C13.0882 0.00541151 13.0826 0.00245454 13.0765 0.00171737C13.0705 7.85858e-05 13.0642 7.85858e-05 13.0582 0.00171737C13.057 0.00171737 13.055 0.00396821 13.0535 0.0044684C13.052 0.00496859 13.0487 0.00721943 13.0465 0.00821981L13.0502 0.00171737C10.6156 1.42725 9.78901 4.06574 9.71399 5.38624C8.74136 5.45292 7.81141 5.81121 7.04549 6.41437C6.96561 6.34671 6.88212 6.28343 6.79539 6.2248C6.57456 5.45174 6.56514 4.6336 6.76813 3.85566C5.87401 4.28877 5.07954 4.90279 4.43501 5.65884H4.43051C4.04636 5.17191 4.07337 3.5663 4.09538 3.23093C3.98174 3.2766 3.87326 3.33419 3.77176 3.40274C3.43264 3.64477 3.11562 3.91635 2.8244 4.2143C2.49255 4.55075 2.18946 4.91441 1.91831 5.30146V5.30296V5.3012C1.29521 6.18444 0.853213 7.18234 0.617826 8.23731L0.604821 8.30133C0.586564 8.38661 0.52079 8.81377 0.509535 8.90656C0.509535 8.91381 0.508035 8.92056 0.507285 8.92781C0.42244 9.36882 0.369864 9.81542 0.349976 10.2641V10.3141C0.354259 12.7396 1.26772 15.0754 2.91002 16.8604C4.55233 18.6454 6.80415 19.7498 9.22094 19.9556C11.6377 20.1615 14.0439 19.4538 15.9644 17.9723C17.8849 16.4908 19.1803 14.3431 19.5947 11.9532C19.6109 11.8282 19.6242 11.7044 19.6387 11.5781C19.8384 9.92791 19.6222 8.25404 19.01 6.70873L19.011 6.71023ZM7.83928 14.2981C7.88455 14.3198 7.92707 14.3433 7.97358 14.3641L7.98034 14.3684C7.93332 14.3458 7.8863 14.3224 7.83928 14.2981ZM18.0501 7.21692V7.20767L18.0519 7.21792L18.0501 7.21692Z",fill:"url(#paint0_linear_927_5847)"}),j.jsx("path",{d:"M19.0109 6.71026C18.5898 5.69688 17.7354 4.60272 17.0664 4.25684C17.5435 5.18066 17.8746 6.17278 18.0481 7.19794V7.20719L18.0498 7.21745C18.797 9.35551 18.689 11.6997 17.7482 13.7599C16.6373 16.1435 13.9493 18.5867 9.7402 18.4667C5.19349 18.3379 1.18699 14.9629 0.439211 10.5437C0.30291 9.84668 0.439211 9.4933 0.507737 8.92684C0.414265 9.36685 0.362102 9.81463 0.351929 10.2643V10.3144C0.356212 12.7399 1.26967 15.0757 2.91198 16.8607C4.55429 18.6456 6.8061 19.7501 9.2229 19.9559C11.6397 20.1617 14.0458 19.4541 15.9664 17.9725C17.8869 16.491 19.1822 14.3434 19.5966 11.9535C19.6129 11.8284 19.6262 11.7046 19.6407 11.5783C19.8403 9.92819 19.6242 8.25431 19.0119 6.70901L19.0109 6.71026Z",fill:"url(#paint1_radial_927_5847)"}),j.jsx("path",{d:"M19.0109 6.71026C18.5898 5.69688 17.7354 4.60272 17.0664 4.25684C17.5435 5.18066 17.8746 6.17278 18.0481 7.19794V7.20719L18.0498 7.21745C18.797 9.35551 18.689 11.6997 17.7482 13.7599C16.6373 16.1435 13.9493 18.5867 9.7402 18.4667C5.19349 18.3379 1.18699 14.9629 0.439211 10.5437C0.30291 9.84668 0.439211 9.4933 0.507737 8.92684C0.414265 9.36685 0.362102 9.81463 0.351929 10.2643V10.3144C0.356212 12.7399 1.26967 15.0757 2.91198 16.8607C4.55429 18.6456 6.8061 19.7501 9.2229 19.9559C11.6397 20.1617 14.0458 19.4541 15.9664 17.9725C17.8869 16.491 19.1822 14.3434 19.5966 11.9535C19.6129 11.8284 19.6262 11.7046 19.6407 11.5783C19.8403 9.92819 19.6242 8.25431 19.0119 6.70901L19.0109 6.71026Z",fill:"url(#paint2_radial_927_5847)"}),j.jsx("path",{d:"M14.2993 7.84794C14.3203 7.8627 14.3398 7.87745 14.3595 7.89221C14.1161 7.46047 13.813 7.06519 13.4592 6.71802C10.4456 3.70439 12.6696 0.18557 13.0445 0.00550206L13.0483 0C10.6136 1.42553 9.78706 4.06402 9.71204 5.38452C9.82508 5.37677 9.93712 5.36726 10.0527 5.36726C10.9164 5.36893 11.7644 5.59929 12.5103 6.03492C13.2562 6.47055 13.8734 7.09592 14.2993 7.84744V7.84794Z",fill:"url(#paint3_radial_927_5847)"}),j.jsx("path",{d:"M10.0577 8.45061C10.0417 8.6917 9.18992 9.52326 8.89206 9.52326C6.13602 9.52326 5.68835 11.1906 5.68835 11.1906C5.8104 12.5947 6.78877 13.7516 7.97146 14.3618C8.02548 14.3898 8.08025 14.4151 8.13502 14.4399C8.22989 14.4819 8.32476 14.5207 8.41963 14.5564C8.82553 14.7 9.25065 14.7821 9.68085 14.7997C14.5127 15.0263 15.448 9.02257 11.9615 7.27942C12.7839 7.1724 13.6168 7.37463 14.2986 7.84688C13.8727 7.09536 13.2555 6.46999 12.5096 6.03436C11.7637 5.59873 10.9158 5.36837 10.052 5.3667C9.93695 5.3667 9.82441 5.3762 9.71136 5.38396C8.73874 5.45064 7.80879 5.80893 7.04286 6.41209C7.19067 6.53714 7.35748 6.7042 7.70886 7.05058C8.36661 7.69857 10.0535 8.36983 10.0572 8.44861L10.0577 8.45061Z",fill:"url(#paint4_radial_927_5847)"}),j.jsx("path",{d:"M10.0577 8.45061C10.0417 8.6917 9.18992 9.52326 8.89206 9.52326C6.13602 9.52326 5.68835 11.1906 5.68835 11.1906C5.8104 12.5947 6.78877 13.7516 7.97146 14.3618C8.02548 14.3898 8.08025 14.4151 8.13502 14.4399C8.22989 14.4819 8.32476 14.5207 8.41963 14.5564C8.82553 14.7 9.25065 14.7821 9.68085 14.7997C14.5127 15.0263 15.448 9.02257 11.9615 7.27942C12.7839 7.1724 13.6168 7.37463 14.2986 7.84688C13.8727 7.09536 13.2555 6.46999 12.5096 6.03436C11.7637 5.59873 10.9158 5.36837 10.052 5.3667C9.93695 5.3667 9.82441 5.3762 9.71136 5.38396C8.73874 5.45064 7.80879 5.80893 7.04286 6.41209C7.19067 6.53714 7.35748 6.7042 7.70886 7.05058C8.36661 7.69857 10.0535 8.36983 10.0572 8.44861L10.0577 8.45061Z",fill:"url(#paint5_radial_927_5847)"}),j.jsx("path",{d:"M6.59134 6.0923C6.66987 6.14231 6.73464 6.18583 6.79141 6.2251C6.57058 5.45204 6.56117 4.63389 6.76415 3.85596C5.87003 4.28907 5.07556 4.90308 4.43103 5.65913C4.4783 5.65788 5.88432 5.63262 6.59134 6.0923Z",fill:"url(#paint6_radial_927_5847)"}),j.jsx("path",{d:"M0.437567 10.5439C1.1856 14.963 5.19185 18.3393 9.73855 18.4668C13.9476 18.5859 16.6361 16.1425 17.7466 13.7601C18.6873 11.6998 18.7954 9.35569 18.0482 7.21762V7.20837C18.0482 7.20111 18.0467 7.19686 18.0482 7.19911L18.0499 7.21537C18.3938 9.46046 17.2519 11.6345 15.4665 13.1076L15.4609 13.1201C11.9821 15.9536 8.6534 14.8292 7.98064 14.3706C7.93363 14.348 7.88661 14.3246 7.83959 14.3003C5.81158 13.3309 4.97352 11.4842 5.15358 9.89862C4.67218 9.90573 4.19905 9.77307 3.79151 9.51672C3.38397 9.26038 3.05952 8.89134 2.85747 8.45433C3.38987 8.1282 3.99692 7.94382 4.62077 7.91878C5.24461 7.89374 5.86448 8.02887 6.42131 8.31128C7.56906 8.83225 8.87507 8.8836 10.0602 8.45433C10.0564 8.37555 8.36954 7.70405 7.71179 7.05631C7.36041 6.70993 7.1936 6.54312 7.04579 6.41782C6.96591 6.35016 6.88243 6.28688 6.7957 6.22825C6.73818 6.18898 6.6734 6.14647 6.59562 6.09545C5.88861 5.63578 4.48258 5.66104 4.43607 5.66229H4.43156C4.04742 5.17535 4.07443 3.56975 4.09644 3.23438C3.9828 3.28005 3.87431 3.33764 3.77282 3.40619C3.4337 3.64822 3.11667 3.91979 2.82546 4.21774C2.49242 4.55325 2.18808 4.91607 1.91562 5.3024V5.3039V5.30215C1.29252 6.18539 0.850521 7.18329 0.615133 8.23825C0.610381 8.25801 0.266002 9.76357 0.435816 10.5444L0.437567 10.5439Z",fill:"url(#paint7_radial_927_5847)"}),j.jsx("path",{d:"M13.459 6.71761C13.8128 7.06516 14.1159 7.46087 14.3593 7.89305C14.4126 7.93331 14.4624 7.97333 14.5046 8.01209C16.7022 10.0378 15.5508 12.9014 15.465 13.104C17.2502 11.6332 18.3911 9.45763 18.0485 7.21179C16.952 4.47826 15.0923 3.37535 13.5768 0.976952C13.5 0.855657 13.4232 0.734111 13.3484 0.605813C13.3057 0.532535 13.2714 0.466511 13.2417 0.405738C13.1787 0.283831 13.1302 0.154995 13.0971 0.0218439C13.0971 0.0156997 13.0949 0.0097541 13.0909 0.0051414C13.0868 0.000528701 13.0812 -0.00242828 13.0751 -0.00316545C13.0691 -0.00480423 13.0628 -0.00480423 13.0568 -0.00316545C13.0556 -0.00316545 13.0536 -0.000914601 13.0521 -0.000414413C13.0506 8.57743e-05 13.0473 0.00233662 13.0451 0.00333699C12.6702 0.181154 10.4466 3.70222 13.4602 6.71335L13.459 6.71761Z",fill:"url(#paint8_radial_927_5847)"}),j.jsx("path",{d:"M14.5043 8.01315C14.462 7.97439 14.4122 7.93437 14.359 7.8941C14.3392 7.87935 14.3197 7.86459 14.2987 7.84984C13.6169 7.37759 12.784 7.17536 11.9616 7.28238C15.4479 9.02553 14.5125 15.0278 9.68095 14.8027C9.25075 14.785 8.82562 14.703 8.41973 14.5594C8.32486 14.5238 8.22999 14.485 8.13512 14.4428C8.08035 14.4178 8.02558 14.3928 7.97156 14.3648L7.97831 14.369C8.65206 14.829 11.9798 15.9526 15.4586 13.1186L15.4641 13.1061C15.5509 12.9035 16.7023 10.0399 14.5038 8.01415L14.5043 8.01315Z",fill:"url(#paint9_radial_927_5847)"}),j.jsx("path",{d:"M5.68842 11.1892C5.68842 11.1892 6.13583 9.52179 8.89212 9.52179C9.18998 9.52179 10.0425 8.69023 10.0578 8.44914C8.8727 8.8784 7.56669 8.82706 6.41894 8.30608C5.86211 8.02367 5.24224 7.88855 4.61839 7.91359C3.99455 7.93863 3.3875 8.123 2.8551 8.44914C3.05715 8.88615 3.3816 9.25518 3.78914 9.51153C4.19668 9.76787 4.66981 9.90053 5.15121 9.89343C4.97165 11.4783 5.80946 13.3247 7.83722 14.2951C7.88249 14.3168 7.925 14.3403 7.97152 14.3611C6.78783 13.7496 5.81046 12.5932 5.68842 11.1899V11.1892Z",fill:"url(#paint10_radial_927_5847)"}),j.jsx("path",{d:"M19.0112 6.71023C18.59 5.69685 17.7357 4.60269 17.0667 4.25681C17.5438 5.18063 17.8749 6.17276 18.0483 7.19792L18.0501 7.21417C16.9542 4.48315 15.0965 3.38023 13.5784 0.981835C13.5016 0.860539 13.4249 0.738994 13.3501 0.610696C13.3073 0.537418 13.2731 0.471393 13.2433 0.410621C13.1803 0.288713 13.1318 0.159878 13.0987 0.0267267C13.0988 0.0205825 13.0966 0.0146369 13.0925 0.0100242C13.0884 0.00541151 13.0828 0.00245454 13.0767 0.00171737C13.0708 7.85859e-05 13.0644 7.85859e-05 13.0585 0.00171737C13.0572 0.00171737 13.0552 0.00396821 13.0537 0.0044684C13.0522 0.00496859 13.049 0.00721943 13.0467 0.00821981L13.0505 0.00171737C10.6158 1.42725 9.78925 4.06574 9.71422 5.38624C9.82726 5.37848 9.9393 5.36898 10.0548 5.36898C10.9186 5.37065 11.7666 5.60101 12.5125 6.03664C13.2584 6.47227 13.8756 7.09764 14.3014 7.84916C13.6196 7.37691 12.7868 7.17468 11.9643 7.2817C15.4506 9.02485 14.5153 15.0271 9.68371 14.802C9.25351 14.7843 8.82838 14.7023 8.42248 14.5587C8.32761 14.5232 8.23275 14.4843 8.13788 14.4421C8.08311 14.4171 8.02834 14.3921 7.97432 14.3641L7.98107 14.3684C7.93405 14.3458 7.88703 14.3224 7.84002 14.2981C7.88528 14.3198 7.9278 14.3433 7.97432 14.3641C6.79062 13.7524 5.81326 12.5959 5.69121 11.1929C5.69121 11.1929 6.13863 9.52554 8.89491 9.52554C9.19277 9.52554 10.0453 8.69398 10.0606 8.45289C10.0568 8.37411 8.36996 7.7026 7.71222 7.05486C7.36084 6.70848 7.19402 6.54167 7.04622 6.41637C6.96634 6.34871 6.88285 6.28543 6.79612 6.2268C6.57529 5.45374 6.56588 4.6356 6.76886 3.85766C5.87474 4.29077 5.08027 4.90479 4.43574 5.66084H4.43124C4.04709 5.17391 4.0741 3.5683 4.09611 3.23293C3.98247 3.2786 3.87399 3.33619 3.77249 3.40474C3.43337 3.64677 3.11635 3.91835 2.82514 4.2163C2.49328 4.55275 2.19019 4.91641 1.91905 5.30345V5.30496V5.30321C1.29595 6.18644 0.853946 7.18434 0.618558 8.23931L0.605554 8.30333C0.587297 8.38861 0.505516 8.82177 0.493762 8.91481C0.418959 9.36194 0.371188 9.81318 0.350708 10.2661V10.3161C0.354992 12.7416 1.26845 15.0774 2.91076 16.8624C4.55307 18.6474 6.80488 19.7518 9.22168 19.9576C11.6385 20.1635 14.0446 19.4558 15.9652 17.9743C17.8857 16.4928 19.181 14.3451 19.5954 11.9552C19.6117 11.8302 19.6249 11.7064 19.6394 11.5801C19.8391 9.92991 19.623 8.25604 19.0107 6.71073L19.0112 6.71023ZM18.0496 7.20817L18.0513 7.21842L18.0496 7.20817Z",fill:"url(#paint11_linear_927_5847)"})]}),j.jsxs("defs",{children:[j.jsxs("linearGradient",{id:"paint0_linear_927_5847",x1:"17.728",y1:"3.09786",x2:"1.63621",y2:"18.6237",gradientUnits:"userSpaceOnUse",children:[j.jsx("stop",{offset:"0.048",stopColor:"#FFF44F"}),j.jsx("stop",{offset:"0.111",stopColor:"#FFE847"}),j.jsx("stop",{offset:"0.225",stopColor:"#FFC830"}),j.jsx("stop",{offset:"0.368",stopColor:"#FF980E"}),j.jsx("stop",{offset:"0.401",stopColor:"#FF8B16"}),j.jsx("stop",{offset:"0.462",stopColor:"#FF672A"}),j.jsx("stop",{offset:"0.534",stopColor:"#FF3647"}),j.jsx("stop",{offset:"0.705",stopColor:"#E31587"})]}),j.jsxs("radialGradient",{id:"paint1_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(17.1052 2.25108) scale(20.2076)",children:[j.jsx("stop",{offset:"0.129",stopColor:"#FFBD4F"}),j.jsx("stop",{offset:"0.186",stopColor:"#FFAC31"}),j.jsx("stop",{offset:"0.247",stopColor:"#FF9D17"}),j.jsx("stop",{offset:"0.283",stopColor:"#FF980E"}),j.jsx("stop",{offset:"0.403",stopColor:"#FF563B"}),j.jsx("stop",{offset:"0.467",stopColor:"#FF3750"}),j.jsx("stop",{offset:"0.71",stopColor:"#F5156C"}),j.jsx("stop",{offset:"0.782",stopColor:"#EB0878"}),j.jsx("stop",{offset:"0.86",stopColor:"#E50080"})]}),j.jsxs("radialGradient",{id:"paint2_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.6024 10.5042) scale(20.2076)",children:[j.jsx("stop",{offset:"0.3",stopColor:"#960E18"}),j.jsx("stop",{offset:"0.351",stopColor:"#B11927",stopOpacity:"0.74"}),j.jsx("stop",{offset:"0.435",stopColor:"#DB293D",stopOpacity:"0.343"}),j.jsx("stop",{offset:"0.497",stopColor:"#F5334B",stopOpacity:"0.094"}),j.jsx("stop",{offset:"0.53",stopColor:"#FF3750",stopOpacity:0})]}),j.jsxs("radialGradient",{id:"paint3_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(12.1034 -2.25084) scale(14.638)",children:[j.jsx("stop",{offset:"0.132",stopColor:"#FFF44F"}),j.jsx("stop",{offset:"0.252",stopColor:"#FFDC3E"}),j.jsx("stop",{offset:"0.506",stopColor:"#FF9D12"}),j.jsx("stop",{offset:"0.526",stopColor:"#FF980E"})]}),j.jsxs("radialGradient",{id:"paint4_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(7.35173 15.7558) scale(9.62111)",children:[j.jsx("stop",{offset:"0.353",stopColor:"#3A8EE6"}),j.jsx("stop",{offset:"0.472",stopColor:"#5C79F0"}),j.jsx("stop",{offset:"0.669",stopColor:"#9059FF"}),j.jsx("stop",{offset:1,stopColor:"#C139E6"})]}),j.jsxs("radialGradient",{id:"paint5_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.5799 8.76923) rotate(-13.5916) scale(5.10194 5.97309)",children:[j.jsx("stop",{offset:"0.206",stopColor:"#9059FF",stopOpacity:0}),j.jsx("stop",{offset:"0.278",stopColor:"#8C4FF3",stopOpacity:"0.064"}),j.jsx("stop",{offset:"0.747",stopColor:"#7716A8",stopOpacity:"0.45"}),j.jsx("stop",{offset:"0.975",stopColor:"#6E008B",stopOpacity:"0.6"})]}),j.jsxs("radialGradient",{id:"paint6_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.35238 1.50057) scale(6.9226)",children:[j.jsx("stop",{stopColor:"#FFE226"}),j.jsx("stop",{offset:"0.121",stopColor:"#FFDB27"}),j.jsx("stop",{offset:"0.295",stopColor:"#FFC82A"}),j.jsx("stop",{offset:"0.502",stopColor:"#FFA930"}),j.jsx("stop",{offset:"0.732",stopColor:"#FF7E37"}),j.jsx("stop",{offset:"0.792",stopColor:"#FF7139"})]}),j.jsxs("radialGradient",{id:"paint7_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(14.8545 -3.00121) scale(29.5361)",children:[j.jsx("stop",{offset:"0.113",stopColor:"#FFF44F"}),j.jsx("stop",{offset:"0.456",stopColor:"#FF980E"}),j.jsx("stop",{offset:"0.622",stopColor:"#FF5634"}),j.jsx("stop",{offset:"0.716",stopColor:"#FF3647"}),j.jsx("stop",{offset:"0.904",stopColor:"#E31587"})]}),j.jsxs("radialGradient",{id:"paint8_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(12.3996 -1.36343) rotate(83.976) scale(21.6445 14.2051)",children:[j.jsx("stop",{stopColor:"#FFF44F"}),j.jsx("stop",{offset:"0.06",stopColor:"#FFE847"}),j.jsx("stop",{offset:"0.168",stopColor:"#FFC830"}),j.jsx("stop",{offset:"0.304",stopColor:"#FF980E"}),j.jsx("stop",{offset:"0.356",stopColor:"#FF8B16"}),j.jsx("stop",{offset:"0.455",stopColor:"#FF672A"}),j.jsx("stop",{offset:"0.57",stopColor:"#FF3647"}),j.jsx("stop",{offset:"0.737",stopColor:"#E31587"})]}),j.jsxs("radialGradient",{id:"paint9_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.35233 4.00165) scale(18.4369)",children:[j.jsx("stop",{offset:"0.137",stopColor:"#FFF44F"}),j.jsx("stop",{offset:"0.48",stopColor:"#FF980E"}),j.jsx("stop",{offset:"0.592",stopColor:"#FF5634"}),j.jsx("stop",{offset:"0.655",stopColor:"#FF3647"}),j.jsx("stop",{offset:"0.904",stopColor:"#E31587"})]}),j.jsxs("radialGradient",{id:"paint10_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(14.1041 5.00184) scale(20.1801)",children:[j.jsx("stop",{offset:"0.094",stopColor:"#FFF44F"}),j.jsx("stop",{offset:"0.231",stopColor:"#FFE141"}),j.jsx("stop",{offset:"0.509",stopColor:"#FFAF1E"}),j.jsx("stop",{offset:"0.626",stopColor:"#FF980E"})]}),j.jsxs("linearGradient",{id:"paint11_linear_927_5847",x1:"17.5331",y1:"3.01533",x2:"3.84302",y2:"16.708",gradientUnits:"userSpaceOnUse",children:[j.jsx("stop",{offset:"0.167",stopColor:"#FFF44F",stopOpacity:"0.8"}),j.jsx("stop",{offset:"0.266",stopColor:"#FFF44F",stopOpacity:"0.634"}),j.jsx("stop",{offset:"0.489",stopColor:"#FFF44F",stopOpacity:"0.217"}),j.jsx("stop",{offset:"0.6",stopColor:"#FFF44F",stopOpacity:0})]}),j.jsx("clipPath",{id:"clip0_927_5847",children:j.jsx("rect",{width:20,height:20,fill:"white"})})]})]}),C$e=j.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[j.jsx("path",{d:"M17.2924 5.22043L17.7256 4.15905L16.4982 2.8883C15.8339 2.22404 14.4187 2.61393 14.4187 2.61393L12.8158 0.794434H7.16242L5.55231 2.62115C5.55231 2.62115 4.13715 2.23848 3.47289 2.8883L2.24545 4.15183L2.67866 5.21321L2.13715 6.78721L3.9422 13.6681C4.31765 15.141 4.57036 15.7114 5.63173 16.4623L8.93137 18.7006C9.24906 18.8955 9.63895 19.2349 9.99274 19.2349C10.3465 19.2349 10.7364 18.8955 11.0541 18.7006L14.3538 16.4623C15.4151 15.7114 15.6678 15.141 16.0433 13.6681L17.8483 6.78721L17.2924 5.22043Z",fill:"url(#paint0_linear_927_5861)"}),j.jsx("path",{d:"M13.9711 3.78343C13.9711 3.78343 16.0433 6.28884 16.0433 6.81592C16.0433 7.35744 15.7834 7.49462 15.5234 7.77621L13.9711 9.43686C13.8267 9.58126 13.5162 9.82675 13.6967 10.2527C13.8772 10.686 14.1299 11.2203 13.8411 11.769C13.5523 12.3249 13.0469 12.6932 12.722 12.6354C12.2387 12.4786 11.7777 12.2602 11.3502 11.9856C11.0758 11.8051 10.1949 11.0758 10.1949 10.7943C10.1949 10.5127 11.1047 10 11.278 9.89895C11.444 9.78343 12.2166 9.33577 12.231 9.16249C12.2455 8.9892 12.2455 8.94588 12.0144 8.51267C11.7834 8.07946 11.379 7.50184 11.4368 7.12639C11.509 6.75094 12.1588 6.54877 12.6426 6.36827L14.1372 5.80509C14.2527 5.74733 14.2238 5.69679 13.8772 5.66068C13.5307 5.6318 12.5559 5.50184 12.1155 5.62458C11.6751 5.74733 10.9386 5.93505 10.8664 6.03614C10.8086 6.13722 10.7509 6.13722 10.8159 6.48379L11.2346 8.75816C11.2635 9.04697 11.3213 9.24191 11.018 9.31411C10.7003 9.38632 10.1733 9.50906 9.99276 9.50906C9.81225 9.50906 9.27796 9.38632 8.96749 9.31411C8.65702 9.24191 8.71478 9.04697 8.75088 8.75816C8.77976 8.46935 9.09745 6.82314 9.16243 6.48379C9.23464 6.13722 9.16965 6.13722 9.11189 6.03614C9.03969 5.93505 8.29601 5.74733 7.85558 5.62458C7.42236 5.50184 6.44041 5.6318 6.09384 5.66791C5.74727 5.69679 5.71839 5.74011 5.83391 5.81231L7.3285 6.36827C7.80503 6.54877 8.46929 6.75094 8.53428 7.12639C8.60648 7.50906 8.19493 8.07946 7.95666 8.51267C7.71839 8.94588 7.72561 8.9892 7.74005 9.16249C7.75449 9.33577 8.53428 9.78343 8.69312 9.89895C8.86641 10.0073 9.77615 10.5127 9.77615 10.7943C9.77615 11.0758 8.91695 11.8051 8.62814 11.9856C8.20063 12.2602 7.73957 12.4786 7.2563 12.6354C6.93139 12.6932 6.42597 12.3249 6.12994 11.769C5.84113 11.2203 6.10106 10.686 6.27435 10.2527C6.45485 9.81953 6.1516 9.58848 5.99998 9.43686L4.44763 7.77621C4.19493 7.50906 3.935 7.36466 3.935 6.83036C3.935 6.29606 6.0072 3.79787 6.0072 3.79787L7.97832 4.11556C8.20937 4.11556 8.722 3.92061 9.19132 3.75455C9.66063 3.61014 9.98554 3.5957 9.98554 3.5957C9.98554 3.5957 10.3032 3.5957 10.7798 3.75455C11.2563 3.91339 11.7617 4.11556 11.9928 4.11556C12.231 4.11556 13.9783 3.77621 13.9783 3.77621L13.9711 3.78343ZM12.4188 13.3719C12.5487 13.4441 12.4693 13.6029 12.3465 13.6896L10.5126 15.1192C10.3682 15.2636 10.1372 15.4802 9.98554 15.4802C9.83391 15.4802 9.61009 15.2636 9.45846 15.1192C8.8506 14.6351 8.23683 14.1586 7.61731 13.6896C7.50178 13.6029 7.42236 13.4513 7.54511 13.3719L8.62814 12.7943C9.05864 12.5665 9.51417 12.3897 9.98554 12.2672C10.0938 12.2672 10.7798 12.5127 11.3357 12.7943L12.4188 13.3719Z",fill:"white"}),j.jsx("path",{d:"M14.4332 2.62115L12.8159 0.794434H7.16243L5.55232 2.62115C5.55232 2.62115 4.13716 2.23848 3.4729 2.8883C3.4729 2.8883 5.35016 2.72223 5.99998 3.77638L7.99276 4.11573C8.2238 4.11573 8.73644 3.92079 9.20575 3.75472C9.67507 3.61032 9.99998 3.59588 9.99998 3.59588C9.99998 3.59588 10.3177 3.59588 10.7942 3.75472C11.2707 3.91357 11.7761 4.11573 12.0072 4.11573C12.2455 4.11573 13.9928 3.77638 13.9928 3.77638C14.6426 2.72223 16.5198 2.8883 16.5198 2.8883C15.8556 2.22404 14.4404 2.61393 14.4404 2.61393",fill:"url(#paint1_linear_927_5861)"}),j.jsxs("defs",{children:[j.jsxs("linearGradient",{id:"paint0_linear_927_5861",x1:"2.13715",y1:"10.1991",x2:"17.8483",y2:"10.1991",gradientUnits:"userSpaceOnUse",children:[j.jsx("stop",{offset:"0.4",stopColor:"#FF5500"}),j.jsx("stop",{offset:"0.6",stopColor:"#FF2000"})]}),j.jsxs("linearGradient",{id:"paint1_linear_927_5861",x1:"3.73384",y1:"2.4883",x2:"16.5198",y2:"2.4883",gradientUnits:"userSpaceOnUse",children:[j.jsx("stop",{stopColor:"#FF452A"}),j.jsx("stop",{offset:1,stopColor:"#FF2000"})]})]})]}),P$e=j.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[j.jsxs("g",{clipPath:"url(#clip0_927_5865)",children:[j.jsx("path",{d:"M18.0547 14.8828C17.7865 15.0222 17.5099 15.1448 17.2266 15.25C16.3293 15.584 15.3792 15.7533 14.4219 15.75C10.7266 15.75 7.50781 13.2109 7.50781 9.94531C7.51262 9.50803 7.63385 9.07993 7.85905 8.70506C8.08424 8.33019 8.40526 8.0221 8.78906 7.8125C5.44531 7.95312 4.58594 11.4375 4.58594 13.4766C4.58594 19.2578 9.90625 19.8359 11.0547 19.8359C11.6719 19.8359 12.6016 19.6562 13.1641 19.4766L13.2656 19.4453C15.4183 18.7014 17.2534 17.2465 18.4688 15.3203C18.5041 15.2618 18.5192 15.1933 18.5119 15.1253C18.5046 15.0574 18.4752 14.9937 18.4282 14.944C18.3812 14.8944 18.3192 14.8615 18.2518 14.8505C18.1843 14.8394 18.1151 14.8508 18.0547 14.8828Z",fill:"url(#paint0_linear_927_5865)"}),j.jsx("path",{opacity:"0.35",d:"M18.0547 14.8828C17.7865 15.0222 17.5099 15.1448 17.2266 15.25C16.3293 15.584 15.3792 15.7533 14.4219 15.75C10.7266 15.75 7.50781 13.2109 7.50781 9.94531C7.51262 9.50803 7.63385 9.07993 7.85905 8.70506C8.08424 8.33019 8.40526 8.0221 8.78906 7.8125C5.44531 7.95312 4.58594 11.4375 4.58594 13.4766C4.58594 19.2578 9.90625 19.8359 11.0547 19.8359C11.6719 19.8359 12.6016 19.6562 13.1641 19.4766L13.2656 19.4453C15.4183 18.7014 17.2534 17.2465 18.4688 15.3203C18.5041 15.2618 18.5192 15.1933 18.5119 15.1253C18.5046 15.0574 18.4752 14.9937 18.4282 14.944C18.3812 14.8944 18.3192 14.8615 18.2518 14.8505C18.1843 14.8394 18.1151 14.8508 18.0547 14.8828Z",fill:"url(#paint1_radial_927_5865)"}),j.jsx("path",{d:"M8.2578 18.8516C7.56239 18.4196 6.95961 17.854 6.48436 17.1875C5.94166 16.4447 5.56809 15.5921 5.38987 14.6896C5.21165 13.787 5.23311 12.8565 5.45272 11.9631C5.67234 11.0697 6.08479 10.2353 6.66115 9.51826C7.23751 8.80123 7.96379 8.21903 8.78905 7.8125C9.03905 7.69531 9.45311 7.49219 10.0078 7.5C10.3981 7.50302 10.7824 7.59627 11.1308 7.77245C11.4791 7.94864 11.7819 8.20299 12.0156 8.51562C12.3299 8.93835 12.5023 9.4498 12.5078 9.97656C12.5078 9.96094 14.4219 3.75781 6.2578 3.75781C2.82811 3.75781 0.00780015 7.00781 0.00780015 9.86719C-0.00584162 11.3776 0.317079 12.8721 0.953112 14.2422C1.99473 16.4602 3.81447 18.2185 6.06689 19.1834C8.3193 20.1483 10.8476 20.2526 13.1719 19.4766C12.3576 19.7337 11.4972 19.811 10.6501 19.7031C9.80297 19.5952 8.98941 19.3047 8.26561 18.8516H8.2578Z",fill:"url(#paint2_linear_927_5865)"}),j.jsx("path",{opacity:"0.41",d:"M8.2578 18.8516C7.56239 18.4196 6.95961 17.854 6.48436 17.1875C5.94166 16.4447 5.56809 15.5921 5.38987 14.6896C5.21165 13.787 5.23311 12.8565 5.45272 11.9631C5.67234 11.0697 6.08479 10.2353 6.66115 9.51826C7.23751 8.80123 7.96379 8.21903 8.78905 7.8125C9.03905 7.69531 9.45311 7.49219 10.0078 7.5C10.3981 7.50302 10.7824 7.59627 11.1308 7.77245C11.4791 7.94864 11.7819 8.20299 12.0156 8.51562C12.3299 8.93835 12.5023 9.4498 12.5078 9.97656C12.5078 9.96094 14.4219 3.75781 6.2578 3.75781C2.82811 3.75781 0.00780015 7.00781 0.00780015 9.86719C-0.00584162 11.3776 0.317079 12.8721 0.953112 14.2422C1.99473 16.4602 3.81447 18.2185 6.06689 19.1834C8.3193 20.1483 10.8476 20.2526 13.1719 19.4766C12.3576 19.7337 11.4972 19.811 10.6501 19.7031C9.80297 19.5952 8.98941 19.3047 8.26561 18.8516H8.2578Z",fill:"url(#paint3_radial_927_5865)"}),j.jsx("path",{d:"M11.9062 11.625C11.8359 11.7031 11.6406 11.8203 11.6406 12.0625C11.6406 12.2656 11.7734 12.4688 12.0156 12.6328C13.1328 13.4141 15.25 13.3047 15.2578 13.3047C16.0907 13.3041 16.9081 13.0802 17.625 12.6562C18.3467 12.2341 18.9456 11.6307 19.3622 10.9057C19.7788 10.1808 19.9986 9.35955 20 8.52344C20.0234 6.77344 19.375 5.60937 19.1172 5.09375C17.4531 1.85937 13.8828 4.89564e-08 10 4.89564e-08C7.37202 -0.00025981 4.84956 1.03398 2.97819 2.87904C1.10682 4.7241 0.0369559 7.23166 0 9.85938C0.0390625 7.00781 2.875 4.70312 6.25 4.70312C6.52344 4.70312 8.08594 4.72656 9.53125 5.48438C10.5466 5.98895 11.3875 6.78627 11.9453 7.77344C12.4219 8.60156 12.5078 9.65625 12.5078 10.0781C12.5078 10.5 12.2969 11.1172 11.8984 11.6328L11.9062 11.625Z",fill:"url(#paint4_radial_927_5865)"}),j.jsx("path",{d:"M11.9062 11.625C11.8359 11.7031 11.6406 11.8203 11.6406 12.0625C11.6406 12.2656 11.7734 12.4688 12.0156 12.6328C13.1328 13.4141 15.25 13.3047 15.2578 13.3047C16.0907 13.3041 16.9081 13.0802 17.625 12.6562C18.3467 12.2341 18.9456 11.6307 19.3622 10.9057C19.7788 10.1808 19.9986 9.35955 20 8.52344C20.0234 6.77344 19.375 5.60937 19.1172 5.09375C17.4531 1.85937 13.8828 4.89564e-08 10 4.89564e-08C7.37202 -0.00025981 4.84956 1.03398 2.97819 2.87904C1.10682 4.7241 0.0369559 7.23166 0 9.85938C0.0390625 7.00781 2.875 4.70312 6.25 4.70312C6.52344 4.70312 8.08594 4.72656 9.53125 5.48438C10.5466 5.98895 11.3875 6.78627 11.9453 7.77344C12.4219 8.60156 12.5078 9.65625 12.5078 10.0781C12.5078 10.5 12.2969 11.1172 11.8984 11.6328L11.9062 11.625Z",fill:"url(#paint5_radial_927_5865)"})]}),j.jsxs("defs",{children:[j.jsxs("linearGradient",{id:"paint0_linear_927_5865",x1:"4.58594",y1:"13.8281",x2:"18.5234",y2:"13.8281",gradientUnits:"userSpaceOnUse",children:[j.jsx("stop",{stopColor:"#0C59A4"}),j.jsx("stop",{offset:1,stopColor:"#114A8B"})]}),j.jsxs("radialGradient",{id:"paint1_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(12.2813 13.9332) scale(7.45313 7.08047)",children:[j.jsx("stop",{offset:"0.7",stopOpacity:0}),j.jsx("stop",{offset:"0.9",stopOpacity:"0.5"}),j.jsx("stop",{offset:1})]}),j.jsxs("linearGradient",{id:"paint2_linear_927_5865",x1:"11.9297",y1:"7.78125",x2:"3.23436",y2:"17.2578",gradientUnits:"userSpaceOnUse",children:[j.jsx("stop",{stopColor:"#1B9DE2"}),j.jsx("stop",{offset:"0.2",stopColor:"#1595DF"}),j.jsx("stop",{offset:"0.7",stopColor:"#0680D7"}),j.jsx("stop",{offset:1,stopColor:"#0078D4"})]}),j.jsxs("radialGradient",{id:"paint3_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(5.51209 15.5419) rotate(-81.3844) scale(11.202 9.05011)",children:[j.jsx("stop",{offset:"0.8",stopOpacity:0}),j.jsx("stop",{offset:"0.9",stopOpacity:"0.5"}),j.jsx("stop",{offset:1})]}),j.jsxs("radialGradient",{id:"paint4_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(2.02266 3.69656) rotate(92.2906) scale(15.8251 33.7043)",children:[j.jsx("stop",{stopColor:"#35C1F1"}),j.jsx("stop",{offset:"0.1",stopColor:"#34C1ED"}),j.jsx("stop",{offset:"0.2",stopColor:"#2FC2DF"}),j.jsx("stop",{offset:"0.3",stopColor:"#2BC3D2"}),j.jsx("stop",{offset:"0.7",stopColor:"#36C752"})]}),j.jsxs("radialGradient",{id:"paint5_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(18.7547 6.03906) rotate(73.7398) scale(7.60156 6.18159)",children:[j.jsx("stop",{stopColor:"#66EB6E"}),j.jsx("stop",{offset:1,stopColor:"#66EB6E",stopOpacity:0})]}),j.jsx("clipPath",{id:"clip0_927_5865",children:j.jsx("rect",{width:20,height:20,fill:"white"})})]})]});var qw={Chrome:E$e,FireFox:S$e,Brave:C$e,Edge:P$e};const Bx=ae.forwardRef(({browser:e},t)=>{const r=e??KG();let n;switch(r){case"chrome":n=qw.Chrome;break;case"firefox":n=qw.FireFox;break;case"edge":n=qw.Edge;break}return n?j.jsx(_$e,{children:n}):j.jsx(j.Fragment,{})});Bx.displayName="BrowserIcon";const h$="6e2562e43678dd68a9070a62b6d52207";function xh(e){const{addressGroup:t,networkId:r}=e,{connectorId:n,keyType:o}=oi(),{signerProvider:i,setSignerProvider:a,setAccount:s}=Ma(),l=I.useCallback(()=>{a(void 0),s(void 0)},[a,s]),c=I.useCallback(async()=>{(n==="walletConnect"||n==="desktopWallet")&&i&&await i.disconnect()},[n,i]),u=I.useCallback(async()=>{const _=await Q3.WalletConnectProvider.init({projectId:h$,networkId:r,addressGroup:t,onDisconnected:l});_.on("displayUri",b=>{t$.open(b,()=>console.log("qr closed"))}),_.on("session_delete",l);try{await _.connect(),_.account&&(s({..._.account,network:r}),a(_))}catch(b){console.log("wallet connect error"),console.error(b)}t$.close()},[r,t,s,a,l]),f=I.useCallback(async()=>{const _=await Q3.WalletConnectProvider.init({projectId:h$,networkId:r,addressGroup:t,onDisconnected:l});_.on("displayUri",b=>{window.open(`alephium://wc?uri=${b}`)}),_.on("session_delete",l);try{await _.connect(),_.account&&(s({..._.account,network:r}),a(_))}catch(b){console.log("wallet connect error"),console.error(b)}},[r,t,s,a,l]),d=I.useCallback(()=>{E1().then(_=>{_&&_.disconnect()}).catch(_=>{console.error(_)})},[]),p=I.useMemo(()=>({addressGroup:t,networkId:r,keyType:o,onDisconnected:l}),[r,t,o,l]),h=I.useCallback(async()=>{const _=await E1(),b=await(_==null?void 0:_.enable(p).catch(()=>{}));return _&&b&&(a(_),s({...b,network:p.networkId})),b},[p,a,s]),y=I.useCallback(async()=>{const _=await E1(),b=await(_==null?void 0:_.enableIfConnected(p).catch(()=>{}));_&&b&&(a(_),s({...b,network:p.networkId}))},[p,a,s]);return I.useMemo(()=>({injected:{connect:h,disconnect:d,autoConnect:y},walletConnect:{connect:u,disconnect:c},desktopWallet:{connect:f,disconnect:c}})[`${n}`],[n,h,d,y,u,f,c])}const Nt={CONNECTED:"connected",CONNECTING:"connecting",EXPIRING:"expiring",FAILED:"failed",REJECTED:"rejected",NOTCONNECTED:"notconnected",UNAVAILABLE:"unavailable"},gc={initial:{willChange:"transform,opacity",position:"relative",opacity:0,scale:.95},animate:{position:"relative",opacity:1,scale:1,transition:{ease:[.16,1,.3,1],duration:.4,delay:.05,position:{delay:0}}},exit:{position:"absolute",opacity:0,scale:.95,transition:{ease:[.16,1,.3,1],duration:.3}}},O$e=({connectorId:e,switchConnectMethod:t,forceState:r})=>{var n,o;const{addressGroup:i,network:a,setOpen:s}=oi(),{connect:l}=xh({addressGroup:i,networkId:a}),[c,u]=I.useState(e),[f,d]=I.useState(!1),p=Sl.filter(g=>g.id===c)[0],h=9;I.useState(h);const y=p.extensionIsInstalled&&p.extensionIsInstalled(),_=KG(),b=p.extensions?p.extensions[_]:void 0,m=p.extensions?{name:Object.keys(p.extensions)[0],label:Object.keys(p.extensions)[0].charAt(0).toUpperCase()+Object.keys(p.extensions)[0].slice(1),url:p.extensions[Object.keys(p.extensions)[0]]}:void 0,[E,A]=I.useState(r||(y?Nt.CONNECTING:Nt.UNAVAILABLE)),D=I.useCallback(()=>{y&&l().then(g=>{g&&A(Nt.CONNECTED),s(!1)})},[y,s,l]),$=I.useRef();return I.useEffect(()=>{if(E!==Nt.UNAVAILABLE)return $.current=setTimeout(D,600),()=>{clearTimeout($.current)}},[E,D]),p?p.id==="walletConnect"?j.jsx(Os,{children:j.jsxs(Fd,{children:[j.jsx(Pm,{children:"Invalid State"}),j.jsx(uo,{children:j.jsx(Am,{children:"WalletConnect does not have an injection flow. This state should never happen."})})]})}):j.jsx(Os,{children:j.jsxs(Fd,{children:[j.jsx(YIe,{children:j.jsxs(XIe,{$shake:E===Nt.FAILED||E===Nt.REJECTED,$circle:!0,children:[j.jsx(Ko,{children:(E===Nt.FAILED||E===Nt.REJECTED)&&j.jsx(ZIe,{"aria-label":"Retry",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},whileTap:{scale:.9},transition:{duration:.1},onClick:D,children:j.jsx(JIe,{children:j.jsx(l$e,{open:f&&(E===Nt.FAILED||E===Nt.REJECTED),message:"try again",xOffset:-6,children:j.jsx(w$e,{})})})})}),j.jsx(g$e,{logo:E===Nt.UNAVAILABLE?j.jsx("div",{style:{transform:"scale(1.14)",position:"relative",width:"100%"},children:(n=p.logos.transparent)!==null&&n!==void 0?n:p.logos.default}):j.jsx(j.Fragment,{children:(o=p.logos.transparent)!==null&&o!==void 0?o:p.logos.default}),smallLogo:p.id==="injected",connecting:E===Nt.CONNECTING,unavailable:E===Nt.UNAVAILABLE,countdown:E===Nt.EXPIRING})]})}),j.jsx(tIe,{children:j.jsxs(Ko,{initial:!1,children:[E===Nt.FAILED&&j.jsxs(vc,{initial:"initial",animate:"animate",exit:"exit",variants:gc,children:[j.jsxs(uo,{children:[j.jsxs(Ka,{$error:!0,children:[j.jsx(m$e,{}),"failed"]}),j.jsx(Dx,{children:"failed"})]}),p.scannable&&j.jsxs(j.Fragment,{children:[j.jsx(c$,{}),j.jsx(Uc,{icon:j.jsx(p$,{}),onClick:()=>t(c),children:"scan qr code"})]})]},Nt.FAILED),E===Nt.REJECTED&&j.jsxs(vc,{initial:"initial",animate:"animate",exit:"exit",variants:gc,children:[j.jsxs(uo,{style:{paddingBottom:28},children:[j.jsx(Ka,{children:"rejected"}),j.jsx(Dx,{children:"rejected"})]}),p.scannable&&j.jsxs(j.Fragment,{children:[j.jsx(c$,{}),j.jsx(Uc,{icon:j.jsx(p$,{}),onClick:()=>t(c),children:"scan the qr code"})]})]},Nt.REJECTED),(E===Nt.CONNECTING||E===Nt.EXPIRING)&&j.jsx(vc,{initial:"initial",animate:"animate",exit:"exit",variants:gc,children:j.jsx(uo,{style:{paddingBottom:28},children:j.jsx(Ka,{children:p.id==="injected"?"connecting":"rejected"})})},Nt.CONNECTING),E===Nt.CONNECTED&&j.jsx(vc,{initial:"initial",animate:"animate",exit:"exit",variants:gc,children:j.jsx(uo,{children:j.jsxs(Ka,{$valid:!0,children:[j.jsx(b$e,{})," ","Connected"]})})},Nt.CONNECTED),E===Nt.NOTCONNECTED&&j.jsx(vc,{initial:"initial",animate:"animate",exit:"exit",variants:gc,children:j.jsx(uo,{children:j.jsx(Ka,{children:"Not Connected"})})},Nt.NOTCONNECTED),E===Nt.UNAVAILABLE&&j.jsx(vc,{initial:"initial",animate:"animate",exit:"exit",variants:gc,children:b?j.jsxs(j.Fragment,{children:[j.jsx(uo,{style:{paddingBottom:18},children:j.jsx(Ka,{children:"Install"})}),!y&&b&&j.jsx(Uc,{href:b,icon:j.jsx(Bx,{}),children:"Install the extension"})]}):j.jsxs(j.Fragment,{children:[j.jsx(uo,{style:{paddingBottom:12},children:j.jsx(Ka,{children:"Not Available"})}),!y&&m&&j.jsxs(Uc,{href:m==null?void 0:m.url,icon:j.jsx(Bx,{browser:m==null?void 0:m.name}),children:["Install on ",m==null?void 0:m.label]})]})},Nt.UNAVAILABLE)]})})]})}):j.jsx(Os,{children:j.jsxs(Fd,{children:[j.jsx(Pm,{children:"Invalid State"}),j.jsx(uo,{children:j.jsx(Am,{children:"No connectors match the id given. This state should never happen."})})]})})};let v$=!1;const A$e=()=>{const{addressGroup:e,network:t,setOpen:r}=oi(),[n,o]=I.useState(),{connect:i}=xh({addressGroup:e,networkId:t});return I.useEffect(()=>{v$||i().then(()=>{v$=!0,r(!1),o(void 0)}).catch(a=>o(`${a}`))},[i,r]),j.jsx(Os,{children:j.jsx(Fd,{children:n!==void 0?n:"Connecting to wallet connect"})})},k$e=()=>{const e=oi(),[t,r]=I.useState(),{connect:n}=xh({addressGroup:e.addressGroup,networkId:e.network});return I.useEffect(()=>{n().catch(o=>r(`${o}`))},[n]),j.jsx(Os,{children:j.jsx(Fd,{children:t!==void 0?t:"Opening desktop wallet..."})})},Va={QRCODE:"QRCODE",INJECTOR:"INJECTOR",DESKTOPWALLET:"DESKTOPWALLET"},I$e=({connectorId:e})=>{const[t,r]=I.useState(e),n=Sl.filter(l=>l.id===t)[0],o=n.extensionIsInstalled&&n.extensionIsInstalled(),i=(!n.scannable||o)&&e!=="desktopWallet",[a,s]=I.useState(i?Va.INJECTOR:e==="desktopWallet"?Va.DESKTOPWALLET:Va.QRCODE);return n?a===Va.QRCODE?j.jsx(A$e,{}):a===Va.DESKTOPWALLET?j.jsx(k$e,{}):j.jsx(Ko,{children:a===Va.INJECTOR&&j.jsx(ut.div,{initial:"initial",animate:"animate",exit:"exit",variants:OIe,children:j.jsx(O$e,{connectorId:t,switchConnectMethod:l=>{l&&r(l),s(Va.QRCODE)}})},Va.INJECTOR)}):j.jsx(Am,{children:"Connector not found"})},$$e=st(ut.div)` - transition: all 220ms cubic-bezier(0.175, 0.885, 0.32, 1.1); - display: flex; - align-items: center; - justify-content: center; - width: 16px; - svg { - display: block; - } - svg, - svg path, - svg rect { - transition: inherit; - } - svg path:first-child { - transform-origin: 50% 50%; - fill: var(--bg); - stroke: var(--color); - } - svg rect { - transform-origin: 53% 63%; - fill: var(--bg); - stroke: var(--color); - } - svg path:last-child { - opacity: 0; - stroke: var(--bg); - transform: translate(11.75px, 10px) rotate(90deg) scale(0.6); - } - ${e=>e.$clipboard?ur` - --color: var(--ck-focus-color) !important; - --bg: var(--ck-body-background); - svg { - transition-delay: 0ms; - path:first-child { - opacity: 0; - transform: rotate(-90deg) scale(0.2); - } - rect { - rx: 10px; - fill: var(--color); - transform: rotate(-90deg) scale(1.45); - } - path:last-child { - transition-delay: 100ms; - opacity: 1; - transform: translate(7.75px, 9.5px); - } - } - `:ur` - &:hover { - } - &:hover:active { - } - `} -`,g$=({copied:e,small:t})=>j.jsx($$e,{$clipboard:e,children:j.jsx(x$e,{style:{transform:t?"scale(1)":"translateX(3px) scale(1.5)",opacity:t||e?1:.3}})}),T$e=st.div` - --color: var(--ck-copytoclipboard-stroke); - --bg: var(--ck-body-background); - transition: all 220ms cubic-bezier(0.175, 0.885, 0.32, 1.1); - - cursor: pointer; - display: inline-flex; - align-items: center; - justify-content: center; - - ${e=>e.$disabled?ur` - cursor: not-allowed; - opacity: 0.4; - `:ur` - &:hover { - --color: var(--ck-body-color-muted); - } - `} -`,D$e=st.div` - display: block; - position: relative; - transition: inherit; - svg { - position: absolute; - left: 100%; - display: block; - top: -1px; - margin: 0; - margin-left: 4px; - } -`,M$e=({string:e,children:t,variant:r})=>{const[n,o]=I.useState(!1);let i;const a=()=>{if(!e)return;const s=e.trim();navigator.clipboard&&navigator.clipboard.writeText(s),o(!0),clearTimeout(i),i=setTimeout(()=>o(!1),1e3)};return r==="button"?j.jsx(Uc,{disabled:!e,onClick:a,icon:j.jsx(g$,{copied:n}),children:t}):j.jsx(T$e,{onClick:a,$disabled:!e,children:j.jsxs(D$e,{children:[t,j.jsx(g$,{copied:n,small:!0})]})})},R$e=({closeModal:e})=>{const{addressGroup:t,network:r,displayAccount:n,setOpen:o}=oi(),{account:i}=Ma(),{disconnect:a}=xh({addressGroup:t,networkId:r}),[s,l]=I.useState(!1),c=i?n?n(i):i.address:void 0;return I.useEffect(()=>{if(s)return e?e():o(!1),()=>{a(),o(!1)}},[s,a,e,o]),j.jsxs(Os,{children:[j.jsx(uo,{style:{paddingBottom:22,gap:6},children:j.jsx(Ka,{children:j.jsx(M$e,{string:c,children:c&&I8(c)})})}),j.jsx(Uc,{onClick:()=>l(!0),icon:j.jsx(y$e,{}),children:"Disconnect"})]})},N$e={},F$e=({mode:e="auto",theme:t="auto",customTheme:r=N$e})=>{const{network:n,addressGroup:o,route:i,setRoute:a,open:s,setOpen:l,connectorId:c,setMode:u,setTheme:f,setCustomTheme:d}=oi(),p=I.useRef(n),{account:h}=Ma(),y=!!h,{autoConnect:_,disconnect:b}=xh({networkId:n,addressGroup:o});I.useEffect(()=>{_!==void 0&&!y&&_()},[_,y]),I.useEffect(()=>{p.current!==n&&y&&b(),p.current=n},[n,p,b,y]);const m=i!==vn.CONNECTORS&&i!==vn.PROFILE,E=()=>{a(vn.CONNECTORS)},A=[{id:"CONNECTORS",content:j.jsx(qIe,{})},{id:"CONNECT",content:j.jsx(I$e,{connectorId:c})},{id:"PROFILE",content:j.jsx(R$e,{})}],D=I.useCallback(()=>{l(!1)},[l]);return I.useEffect(()=>{y&&i!==vn.PROFILE&&D()},[y,i,D]),I.useEffect(()=>u(e),[u,e]),I.useEffect(()=>f(t),[f,t]),I.useEffect(()=>d(r),[d,r]),I.useEffect(()=>{const $="alephium";if(!s)return;const g=document.createElement("meta");return g.setAttribute("property","og:title"),g.setAttribute("content",$),document.head.prepend(g),()=>{document.head.removeChild(g)}},[s]),j.jsx(AIe,{open:s,pages:A,pageId:i,onClose:D,onInfo:void 0,onBack:m?E:void 0})},B$e=({useTheme:e="auto",useMode:t="auto",useCustomTheme:r,network:n,addressGroup:o,keyType:i,children:a})=>{if(I.useContext(Ax))throw new Error("Multiple, nested usages of ConnectSettingContext detected. Please use only one.");const[l,c]=I.useState(e),[u,f]=I.useState(t),[d,p]=I.useState(r??{}),[h,y]=I.useState(!1),[_,b]=I.useState("injected"),[m,E]=I.useState(vn.CONNECTORS),[A,D]=I.useState("");I.useEffect(()=>c(l),[l]);const $={open:h,setOpen:y,route:m,setRoute:E,connectorId:_,setConnectorId:b,network:n,theme:l,setTheme:c,mode:u,setMode:f,customTheme:d,setCustomTheme:p,addressGroup:o,keyType:i??"default",errorMessage:A};return j.jsx(Ax.Provider,{value:$,children:j.jsxs(v3e,{theme:qke,children:[a,j.jsx(F$e,{theme:l,mode:u,customTheme:d})]})})};function j$e(){try{return At.web3.getCurrentNodeProvider()}catch{return}}const L$e=({children:e})=>{if(I.useContext(kx))throw new Error("Multiple, nested usages of AlephiumConnectProvider detected. Please use only one.");const[r,n]=I.useState(),[o,i]=I.useState(),a={account:r,setAccount:n,signerProvider:o,setSignerProvider:i};return j.jsx(kx.Provider,{value:a,children:e})},z$e=({children:e})=>{if(I.useContext(o$))throw new Error("Multiple, nested usages of AlephiumBalanceProvider detected. Please use only one.");const{account:r,signerProvider:n}=Ma(),[o,i]=I.useState(),a=I.useCallback(async()=>{var c;const u=(c=j$e())!==null&&c!==void 0?c:n==null?void 0:n.nodeProvider;if(u&&r){const f=await u.addresses.getAddressesAddressBalance(r.address);i(d=>d!==void 0&&At.isBalanceEqual(d,f)?d:f)}else r===void 0&&i(void 0)},[r,n]),s=I.useCallback((c,u)=>{if(r===void 0)throw new Error("Wallet is not connected");const f=u??1,y={pollingInterval:r.network==="devnet"?1e3:4e3,messageCallback:async _=>{_.type==="Confirmed"&&_.chainConfirmations>=f&&await a()},errorCallback:(_,b)=>(b.unsubscribe(),console.error(`tx status subscription error: ${_}`),Promise.resolve())};At.subscribeToTxStatus(y,c,void 0,void 0,f)},[a,r]);I.useEffect(()=>{r===void 0&&i(void 0)},[r]);const l={balance:o,updateBalance:a,updateBalanceForTx:s};return j.jsx(o$.Provider,{value:l,children:e})},U$e=({useTheme:e,useMode:t,useCustomTheme:r,network:n,addressGroup:o,keyType:i,children:a})=>j.jsx(L$e,{children:j.jsx(B$e,{useTheme:e,useMode:t,useCustomTheme:r,network:n,addressGroup:o,keyType:i,children:j.jsx(z$e,{children:a})})});function tK(){const[e,t]=I.useState(!1);return I.useEffect(()=>t(!0),[]),e}const Gw=st(ut.div)` - top: 0; - bottom: 0; - left: 0; - display: inline-flex; - align-items: center; - justify-content: center; - white-space: nowrap; -`,jx=st(ut.div)` - display: flex; - align-items: center; - justify-content: flex-start; - position: relative; - height: 40px; - padding: 0; - line-height: 0; - letter-spacing: -0.2px; - font-size: var(--ck-connectbutton-font-size, 16px); - font-weight: var(--ck-connectbutton-font-weight, 500); - text-align: center; - transition: 100ms ease; - transition-property: color, background, box-shadow, border-radius; - - color: var(--color); - background: var(--background); - box-shadow: var(--box-shadow); - border-radius: var(--border-radius); - - &.primary { - --color: var(--ck-connectbutton-color); - --background: var(--ck-connectbutton-background); - --box-shadow: var(--ck-connectbutton-box-shadow); - --border-radius: var(--ck-connectbutton-border-radius, 12px); - - --hover-color: var(--ck-connectbutton-hover-color, var(--color)); - --hover-background: var(--ck-connectbutton-hover-background, var(--background)); - --hover-box-shadow: var(--ck-connectbutton-hover-box-shadow, var(--box-shadow)); - --hover-border-radius: var(--ck-connectbutton-hover-border-radius, var(--border-radius)); - - --active-color: var(--ck-connectbutton-active-color, var(--hover-color)); - --active-background: var(--ck-connectbutton-active-background, var(--hover-background)); - --active-box-shadow: var(--ck-connectbutton-active-box-shadow, var(--hover-box-shadow)); - --active-border-radius: var(--ck-connectbutton-active-border-radius, var(--hover-border-radius)); - } - &.secondary { - --color: var(--ck-connectbutton-balance-color); - --background: var(--ck-connectbutton-balance-background); - --box-shadow: var(--ck-connectbutton-balance-box-shadow); - --border-radius: var(--ck-connectbutton-balance-border-radius, var(--ck-connectbutton-border-radius, 12px)); - - --hover-color: var(--ck-connectbutton-balance-hover-color, var(--color)); - --hover-background: var(--ck-connectbutton-balance-hover-background, var(--background)); - --hover-box-shadow: var(--ck-connectbutton-balance-hover-box-shadow, var(--box-shadow)); - --hover-border-radius: var(--ck-connectbutton-balance-hover-border-radius, var(--border-radius)); - - --active-color: var(--ck-connectbutton-balance-active-color, var(--hover-color)); - --active-background: var(--ck-connectbutton-balance-active-background, var(--hover-background)); - --active-box-shadow: var(--ck-connectbutton-balance-active-box-shadow, var(--hover-box-shadow)); - --active-border-radius: var(--ck-connectbutton-balance-active-border-radius, var(--hover-border-radius)); - } -`,H$e=st.button` - all: initial; - appearance: none; - user-select: none; - position: relative; - padding: 0; - margin: 0; - background: none; - border-radius: var(--ck-border-radius); - - &:disabled { - pointer-events: none; - opacity: 0.3; - } - - display: flex; - flex-wrap: nowrap; - background: none; - cursor: pointer; - * { - cursor: pointer; - } - &:hover { - ${jx} { - color: var(--hover-color, var(--color)); - background: var(--hover-background, var(--background)); - box-shadow: var(--hover-box-shadow, var(--box-shadow)); - border-radius: var(--hover-border-radius, var(--border-radius)); - } - } - &:active { - ${jx} { - color: var(--active-color, var(--hover-color, var(--color))); - background: var(--active-background, var(--hover-background, var(--background))); - box-shadow: var(--active-box-shadow, var(--hover-box-shadow, var(--box-shadow))); - border-radius: var(--active-border-radius, var(--hover-border-radius, var(--border-radius))); - } - } - &:focus-visible { - outline: 2px solid var(--ck-family-brand); - } -`,V$e=({children:e,variant:t="primary",autoSize:r=!0,duration:n=.3,style:o})=>{const[i,a]=RU();return j.jsx(jx,{className:t,initial:!1,animate:r?{width:a.width>10?a.width:"auto"}:void 0,transition:{duration:n,ease:[.25,1,.5,1],delay:.01},style:o,children:j.jsx("div",{ref:i,style:{whiteSpace:"nowrap",width:"fit-content",position:"relative",padding:"0 12px"},children:e})})},W$e={initial:{zIndex:2,opacity:0,x:"-100%"},animate:{opacity:1,x:.1,transition:{duration:.4,ease:[.25,1,.5,1]}},exit:{zIndex:1,opacity:0,x:"-100%",pointerEvents:"none",position:"absolute",transition:{duration:.4,ease:[.25,1,.5,1]}}},q$e={initial:{zIndex:2,opacity:0,x:"100%"},animate:{x:.2,opacity:1,transition:{duration:.4,ease:[.25,1,.5,1]}},exit:{zIndex:1,x:"100%",opacity:0,pointerEvents:"none",position:"absolute",transition:{duration:.4,ease:[.25,1,.5,1]}}},G$e={initial:{opacity:0},animate:{opacity:1,transition:{duration:.3,ease:[.25,1,.5,1]}},exit:{position:"absolute",opacity:0,transition:{duration:.3,ease:[.25,1,.5,1]}}},rK=({displayAccount:e,children:t})=>{const r=tK(),n=oi(),{account:o}=Ma(),i=!1;function a(){n.setOpen(!1)}function s(){n.setOpen(!0),n.setRoute(vn.CONNECTORS)}if(!t||!r)return null;const l=o?e(o):void 0;return j.jsx(j.Fragment,{children:t({show:s,hide:a,isConnected:!!o,isConnecting:i,address:l,truncatedAddress:l?I8(l):void 0})})};rK.displayName="AlephiumConnectButton.Custom";function K$e({label:e,displayAccount:t}){const{account:r}=Ma();return j.jsx(Ko,{initial:!1,children:r?j.jsx(Gw,{initial:"initial",animate:"animate",exit:"exit",variants:q$e,style:{height:40},children:j.jsx("div",{style:{position:"relative",paddingRight:0},children:j.jsx(Ko,{initial:!1,children:j.jsx(Gw,{initial:"initial",animate:"animate",exit:"exit",variants:G$e,style:{position:"relative"},children:I8(t(r))},"ckTruncatedAddress")})})},"connectedText"):j.jsx(Gw,{initial:"initial",animate:"animate",exit:"exit",variants:W$e,style:{height:40},children:e||"Connect Alephium"},"connectWalletText")})}function nK({label:e,onClick:t,displayAccount:r}){const n=tK(),o=oi(),{account:i}=Ma(),a=!!i;function s(){o.setOpen(!0),o.setRoute(a?vn.PROFILE:vn.CONNECTORS)}return n?j.jsx(T8,{$useTheme:o.theme,$useMode:o.mode,$customTheme:o.customTheme,children:j.jsx(H$e,{onClick:()=>{t?t(s):s()},children:j.jsx(V$e,{style:{overflow:"hidden"},children:j.jsx(K$e,{label:e,displayAccount:r??(l=>l.address)})})})}):null}nK.Custom=rK;function D8(){const{account:e,signerProvider:t}=Ma();return I.useMemo(()=>{if(e!==void 0&&t!==void 0)return{signer:t,account:e,nodeProvider:t.nodeProvider}},[t,e])}var Y$e={};const X$e=0,Z$e=[],J$e={networkId:X$e,nftCollections:Z$e},Q$e=1,eTe=[{id:"06544de23e447cff2c5d98d7f431a5b2c0f5b7a2ff69c7ef4ef5fcbf4a9de600"}],tTe={networkId:Q$e,nftCollections:eTe},rTe=0,nTe=[{id:"c0c0af7a481e3e50c50e418bf8ff6923dc4d878ac3744474e8c708a8adccfb00",name:"Alf",symbol:"ALF",decimals:0,description:"Alf, first token deployed on the mainnet",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/ALF.png"},{id:"b2d71c116408ae47b931482a440f675dc9ea64453db24ee931dacd578cae9002",name:"ALPHpaca",symbol:"PACA",decimals:0,description:"Part Alpaca, part ecosystem, part coin and part meme. ALPHpaca is rapidly trying to expand it's uses across the Alephium ecosystem.",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/PACA.png"},{id:"b522184377a33e376e997a950288fa76c1f48e97bc29cd10779adc7cfb673200",name:"Berry",symbol:"BERRY",decimals:0,description:"Mr Berry's coin",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/BERRY.png"},{id:"1516c410b54470d667e1315ce2faa81870c76c5c7a491e3e86eeec8366495502",name:"Montycoin",symbol:"TAIL",decimals:0,description:"Montycoin is an incentivization token made for fun and immersion into MontaiL's DJ'ing career. With widely growing uses.",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/TAIL.png"},{id:"1a281053ba8601a658368594da034c2e99a0fb951b86498d05e76aedfe666800",name:"AYIN",symbol:"AYIN",decimals:18,description:"$AYIN is a DEX token, that incentivises users through fees and other mechanisms to participate in trading on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/AYIN.png"}],oTe=[],iTe={networkId:rTe,tokens:nTe,nftCollections:oTe},aTe=1,sTe=[{id:"bed35ce97166170f91a8cdb35948b8696aa67dbd573ee0c5cc572bb8c44ddb01",name:"Test BTC",symbol:"TBTC",decimals:8,description:"Testing BTC on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/TBTC.png"},{id:"4d765e05a5f08c39ab441c10fea45310cbd7b8c7bc7b4cd4e93d4531fdf2b601",name:"Test ETH",symbol:"TETH",decimals:18,description:"Testing ETH on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/TETH.png"},{id:"9a8cda8bc3423347b7fe2932ef7981ed67e8825dba3a5ee36011f578d1d70f00",name:"Wrapped Ether (Wormhole)",symbol:"WETH",decimals:18,description:"ETH Bridged to Alephium from Wormhole",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/WETH.png"},{id:"4db93c3e58ca4c3392b9d47be17b62fcbabccba61a7d7c1fa1c3baa40181f700",name:"Wrapped BNB (Wormhole)",symbol:"WBNB",decimals:18,description:"BNB Bridged to Alephium from Wormhole",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/WBNB.png"},{id:"92982a9d35b38ff1d0b43dec536631b523cdccde0cf2fc1d5c349790c59d2701",name:"Test DAI",symbol:"TDAI",decimals:18,description:"Testing DAI on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/TDAI.png"},{id:"416800f4e2a7326ef2c129d38e4db35de11cec2d4aff98972558ca2c6f976e01",name:"Test USDT",symbol:"TUSDT",decimals:6,description:"Testing USDT on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/TUSDT.png"},{id:"ecc6dd103bbb3cfad3ada8d6a22d73a599a9d39a43b81a734bc9784acc261b01",name:"Test USDC",symbol:"TUSDC",decimals:6,description:"Testing USDC on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/TUSDC.png"},{id:"f393e2366ee780141240e840aa32f26eade79559864d103b453f0d595425af00",name:"Fetatoken",symbol:"FETA",decimals:18,description:"DJ Fetamin fanclub token",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/FETA.png"}],lTe={networkId:aTe,tokens:sTe};var oK={};Object.defineProperty(oK,"__esModule",{value:!0});(function(e){var t=Le&&Le.__createBinding||(Object.create?function(l,c,u,f){f===void 0&&(f=u);var d=Object.getOwnPropertyDescriptor(c,u);(!d||("get"in d?!c.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return c[u]}}),Object.defineProperty(l,f,d)}:function(l,c,u,f){f===void 0&&(f=u),l[f]=c[u]}),r=Le&&Le.__exportStar||function(l,c){for(var u in l)u!=="default"&&!Object.prototype.hasOwnProperty.call(c,u)&&t(c,l,u)},n=Le&&Le.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.ALPH=e.testnetNFTCollectionsMetadata=e.mainnetNFTCollectionsMetadata=e.testnetTokensMetadata=e.mainnetTokensMetadata=void 0;const o=n(J$e),i=n(tTe),a=n(iTe),s=n(lTe);r(oK,e),e.mainnetTokensMetadata=a.default,e.testnetTokensMetadata=s.default,e.mainnetNFTCollectionsMetadata=o.default,e.testnetNFTCollectionsMetadata=i.default,e.default={mainnet:{tokens:e.mainnetTokensMetadata,nftCollections:e.mainnetNFTCollectionsMetadata},testnet:{tokens:e.testnetTokensMetadata,nftCollections:e.testnetNFTCollectionsMetadata}},e.ALPH={id:"".padStart(64,"0"),name:"Alephium",symbol:"ALPH",decimals:18}})(Y$e);const cTe="https://wallet-v20.mainnet.alephium.org",uTe="https://wallet-v20.testnet.alephium.org",fTe="http://127.0.0.1:22973",dTe="https://backend-v113.mainnet.alephium.org",pTe="https://backend-v113.testnet.alephium.org",hTe="http://127.0.0.1:9090",vTe="https://explorer.alephium.org",gTe="https://testnet.alephium.org",mTe="http://localhost:23000",yTe="alephium-network";function _h(){const[e,t]=bR({key:yTe,defaultValue:"mainnet",getInitialValueInEffect:!1});return[e,t]}function Eh(){const[e]=_h();return new At.NodeProvider(e==="mainnet"?cTe:e==="testnet"?uTe:fTe)}function bTe(){const[e]=_h();return new At.ExplorerProvider(e==="mainnet"?dTe:e==="testnet"?pTe:hTe)}function wTe(){const[e]=_h();return e==="mainnet"?vTe:e==="testnet"?gTe:mTe}const xTe=at(e=>({link:{display:"flex",alignItems:"center",height:"100%",paddingLeft:e.spacing.md,paddingRight:e.spacing.md,textDecoration:"none",color:e.colorScheme==="dark"?e.white:e.black,fontWeight:500,fontSize:e.fontSizes.sm,[e.fn.smallerThan("sm")]:{height:me(42),display:"flex",alignItems:"center",width:"100%"},...e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]})},subLink:{width:"100%",padding:`${e.spacing.xs} ${e.spacing.md}`,borderRadius:e.radius.md,...e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[0]}),"&:active":e.activeStyles},dropdownFooter:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[0],margin:`calc(${e.spacing.md} * -1)`,marginTop:e.spacing.sm,padding:`${e.spacing.md} calc(${e.spacing.md} * 2)`,paddingBottom:e.spacing.xl,borderTop:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}`},hiddenMobile:{[e.fn.smallerThan("sm")]:{display:"none"}},hiddenDesktop:{[e.fn.largerThan("sm")]:{display:"none"}}}));function _Te(){const[e,{toggle:t}]=_R(!1),{classes:r}=xTe(),[n,o]=_h();return j.jsx(xN,{height:60,px:"md",children:j.jsxs(Kt,{position:"apart",sx:{height:"100%"},children:[j.jsx(St,{component:jL,to:"/",fw:"bold",fz:"1.5rem",variant:"gradient",gradient:{from:"indigo",to:"cyan",deg:45},children:"Alephium Toolkit"}),j.jsxs(Kt,{className:r.hiddenMobile,children:[j.jsx(Lme,{}),j.jsxs(ho,{children:[j.jsx(ho.Target,{children:j.jsx(xr,{size:"md",w:"5.25rem",tt:"capitalize",radius:"md",compact:!0,variant:"outline",children:n})}),j.jsxs(ho.Dropdown,{children:[j.jsx(ho.Item,{onClick:()=>o("mainnet"),children:"Mainnet"}),j.jsx(ho.Item,{onClick:()=>o("testnet"),children:"Testnet"}),j.jsx(ho.Item,{onClick:()=>o("devnet"),children:"Devnet"})]})]}),j.jsx(nK,{})]}),j.jsx(ZF,{opened:e,onClick:t,className:r.hiddenDesktop})]})})}function ou({children:e,...t}){return j.jsx(rt,{mx:"auto",px:"lg",py:"lg",sx:r=>({backgroundColor:r.colorScheme==="dark"?r.colors.dark[7]:"white",borderRadius:r.radius.md,boxShadow:r.shadows.sm}),...t,children:e})}function ETe({caption:e}){const t=Lr();return j.jsx(St,{fw:"bold",c:t.colorScheme==="dark"?t.colors.gray[0]:t.colors.dark[8],children:e})}function Ab({w:e,px:t,py:r,data:n,horizontalSpacing:o,verticalSpacing:i}){const a=Object.entries(n).map(([s,l])=>j.jsxs("tr",{children:[j.jsx("td",{width:"30%",children:j.jsx(ETe,{caption:s})}),j.jsx("td",{width:"70%",children:l})]},s));return j.jsx(ou,{w:e,mx:"auto",px:t??"lg",py:r??"lg",ta:"center",children:j.jsx(CL,{horizontalSpacing:o??"xs",verticalSpacing:i??"xl",fontSize:"md",withColumnBorders:!0,children:j.jsx("tbody",{children:a})})})}const STe=at(e=>({root:{paddingTop:me(80),paddingBottom:me(120),backgroundColor:e.fn.variant({variant:"filled",color:e.primaryColor}).background},label:{textAlign:"center",fontWeight:900,fontSize:me(150),lineHeight:1,marginBottom:`calc(${e.spacing.xl} * 1.5)`,color:e.colors[e.primaryColor][3],[e.fn.smallerThan("sm")]:{fontSize:me(120)}},title:{fontFamily:`Greycliff CF, ${e.fontFamily}`,textAlign:"center",fontWeight:900,fontSize:me(38),color:e.white,[e.fn.smallerThan("sm")]:{fontSize:me(32)}},description:{maxWidth:me(540),margin:"auto",marginTop:e.spacing.xl,marginBottom:`calc(${e.spacing.xl} * 1.5)`,color:e.colors[e.primaryColor][1]}}));function CTe(){const{classes:e}=STe();return j.jsx(rt,{maw:me("70%"),mx:"auto",mt:me("15%"),children:j.jsx("div",{className:e.root,children:j.jsxs(k_,{children:[j.jsx("div",{className:e.label,children:"No Wallet"}),j.jsx(F_,{className:e.title,children:"Please connect your wallet"})]})})})}function As({value:e,color:t}){return j.jsx(xy,{value:e,timeout:1e3,children:({copied:r,copy:n})=>j.jsx(eh.Floating,{label:r?"Copied":"Copy",position:"right",children:j.jsx(xr,{variant:"subtle",color:t,onClick:n,styles:{root:{height:"auto",padding:"0.5rem"},label:{whiteSpace:"normal",wordBreak:"break-all",lineHeight:"1.5rem"}},children:e})})})}function PTe(){const e=D8();if(I.useEffect(()=>{console.log("===== useEffect")}),e===void 0)return j.jsx(CTe,{});const t=e.account;return j.jsx(wy,{mt:"10%",children:j.jsx(Ab,{w:900,data:{"Network Type":j.jsx(St,{tt:"capitalize",children:t==null?void 0:t.network}),"Address Group":t==null?void 0:t.group,Address:j.jsx(As,{value:(t==null?void 0:t.address)??"???"}),"Public Key":j.jsx(As,{value:(t==null?void 0:t.publicKey)??"???"})}})})}const OTe=at(e=>({root:{paddingTop:"5rem",paddingBottom:me(120),backgroundColor:e.fn.variant({variant:"filled",color:e.primaryColor}).background},label:{textAlign:"center",fontWeight:900,fontSize:me(220),lineHeight:1,marginBottom:`calc(${e.spacing.xl} * 1.5)`,color:e.colors[e.primaryColor][3],[e.fn.smallerThan("sm")]:{fontSize:me(120)}},title:{fontFamily:`Greycliff CF, ${e.fontFamily}`,textAlign:"center",fontWeight:900,fontSize:me(38),color:e.white,[e.fn.smallerThan("sm")]:{fontSize:me(32)}},description:{maxWidth:me(540),margin:"auto",marginTop:e.spacing.xl,marginBottom:`calc(${e.spacing.xl} * 1.5)`,color:e.colors[e.primaryColor][1]}}));function Do(){const{classes:e}=OTe();return j.jsx(rt,{maw:me("70%"),mx:"auto",mt:me("15%"),children:j.jsx("div",{className:e.root,children:j.jsxs(k_,{children:[j.jsx("div",{className:e.label,children:"WIP"}),j.jsx(F_,{className:e.title,children:"We are working on it..."})]})})})}function m$({value:e,label:t}){return j.jsx(xy,{value:e,timeout:1e3,children:({copied:r,copy:n})=>j.jsx(eh,{label:r?"Copied":"Copy",withArrow:!0,position:"right",color:"indigo",children:j.jsx(xr,{variant:"subtle",onClick:n,children:t??e})})})}function ATe(){const[e,t]=I.useState(""),[r,n]=I.useState(),o=Eh(),i=I.useCallback(async a=>{if(t(a),a){const s=await o.fetchFungibleTokenMetaData(a),l=!1,c=At.addressFromTokenId(a);n({...s,verified:l,tokenId:a,tokenAddress:c})}else n(void 0)},[]);return j.jsx(wy,{h:me("80%"),children:j.jsxs(Ey,{children:[j.jsx(Es,{w:me("40rem"),mx:"auto",size:"md",value:e,onChange:a=>i(a.currentTarget.value),placeholder:"Search token address or token id",radius:"xl",withAsterisk:!0}),j.jsx(rt,{mt:"xl",w:me("55rem"),children:j.jsx(Ab,{data:{Verified:`${r==null?void 0:r.verified}`,Name:`${r?At.hexToString(r.name):void 0}`,Symbol:`${r?At.hexToString(r.symbol):void 0}`,Decimals:`${r==null?void 0:r.decimals}`,"Total Supply":`${r?At.prettifyTokenAmount(r.totalSupply,r.decimals):void 0}`,"Token ID":r?j.jsx(m$,{value:`${r.tokenId}`}):"undefined","Token Address":r?j.jsx(m$,{value:`${r.tokenAddress}`}):"undefined"}})})]})})}var kTe=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;o--!==0;){var a=i[o];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r};const y$=ri(kTe);function Lx(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,r)=>{const n=e[r];return n!=null&&n!==!1&&(t[r]=n),t},{})}var ITe=Object.defineProperty,b$=Object.getOwnPropertySymbols,$Te=Object.prototype.hasOwnProperty,TTe=Object.prototype.propertyIsEnumerable,w$=(e,t,r)=>t in e?ITe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,DTe=(e,t)=>{for(var r in t||(t={}))$Te.call(t,r)&&w$(e,r,t[r]);if(b$)for(var r of b$(t))TTe.call(t,r)&&w$(e,r,t[r]);return e};function iK(e,t){if(t===null||typeof t!="object")return{};const r=DTe({},t);return Object.keys(t).forEach(n=>{n.includes(`${String(e)}.`)&&delete r[n]}),r}const Ld="__MANTINE_FORM_INDEX__";function x$(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]/g,`.${Ld}`)):!1:!1}function _$(e,t,r){typeof r.value=="object"&&(r.value=Hc(r.value)),!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"?Object.defineProperty(e,t,r):e[t]=r.value}function Hc(e){if(typeof e!="object")return e;var t=0,r,n,o,i=Object.prototype.toString.call(e);if(i==="[object Object]"?o=Object.create(e.__proto__||null):i==="[object Array]"?o=Array(e.length):i==="[object Set]"?(o=new Set,e.forEach(function(a){o.add(Hc(a))})):i==="[object Map]"?(o=new Map,e.forEach(function(a,s){o.set(Hc(s),Hc(a))})):i==="[object Date]"?o=new Date(+e):i==="[object RegExp]"?o=new RegExp(e.source,e.flags):i==="[object DataView]"?o=new e.constructor(Hc(e.buffer)):i==="[object ArrayBuffer]"?o=e.slice(0):i.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(n=Object.getOwnPropertySymbols(e);t0,errors:t}}function zx(e,t,r="",n={}){return typeof e!="object"||e===null?n:Object.keys(e).reduce((o,i)=>{const a=e[i],s=`${r===""?"":`${r}.`}${i}`,l=aa(s,t);let c=!1;return typeof a=="function"&&(o[s]=a(l,t,s)),typeof a=="object"&&Array.isArray(l)&&(c=!0,l.forEach((u,f)=>zx(a,t,`${s}.${f}`,o))),typeof a=="object"&&typeof l=="object"&&l!==null&&(c||zx(a,t,s,o)),o},n)}function Ux(e,t){return E$(typeof e=="function"?e(t):zx(e,t))}function W0(e,t,r){if(typeof e!="string")return{hasError:!1,error:null};const n=Ux(t,r),o=Object.keys(n.errors).find(i=>e.split(".").every((a,s)=>a===i.split(".")[s]));return{hasError:!!o,error:o?n.errors[o]:null}}function MTe(e,{from:t,to:r},n){const o=aa(e,n);if(!Array.isArray(o))return n;const i=[...o],a=o[t];return i.splice(t,1),i.splice(r,0,a),kb(e,i,n)}var RTe=Object.defineProperty,S$=Object.getOwnPropertySymbols,NTe=Object.prototype.hasOwnProperty,FTe=Object.prototype.propertyIsEnumerable,C$=(e,t,r)=>t in e?RTe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,BTe=(e,t)=>{for(var r in t||(t={}))NTe.call(t,r)&&C$(e,r,t[r]);if(S$)for(var r of S$(t))FTe.call(t,r)&&C$(e,r,t[r]);return e};function jTe(e,{from:t,to:r},n){const o=`${e}.${t}`,i=`${e}.${r}`,a=BTe({},n);return Object.keys(n).every(s=>{let l,c;if(s.startsWith(o)&&(l=s,c=s.replace(o,i)),s.startsWith(i)&&(l=s.replace(i,o),c=s),l&&c){const u=a[l],f=a[c];return f===void 0?delete a[l]:a[l]=f,u===void 0?delete a[c]:a[c]=u,!1}return!0}),a}function LTe(e,t,r){const n=aa(e,r);return Array.isArray(n)?kb(e,n.filter((o,i)=>i!==t),r):r}var zTe=Object.defineProperty,P$=Object.getOwnPropertySymbols,UTe=Object.prototype.hasOwnProperty,HTe=Object.prototype.propertyIsEnumerable,O$=(e,t,r)=>t in e?zTe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,VTe=(e,t)=>{for(var r in t||(t={}))UTe.call(t,r)&&O$(e,r,t[r]);if(P$)for(var r of P$(t))HTe.call(t,r)&&O$(e,r,t[r]);return e};function A$(e,t){const r=e.substring(t.length+1).split(".")[0];return parseInt(r,10)}function k$(e,t,r,n){if(t===void 0)return r;const o=`${String(e)}`;let i=r;n===-1&&(i=iK(`${o}.${t}`,i));const a=VTe({},i),s=new Set;return Object.entries(i).filter(([l])=>{if(!l.startsWith(`${o}.`))return!1;const c=A$(l,o);return Number.isNaN(c)?!1:c>=t}).forEach(([l,c])=>{const u=A$(l,o),f=l.replace(`${o}.${u}`,`${o}.${u+n}`);a[f]=c,s.add(f),s.has(l)||delete a[l]}),a}function WTe(e,t,r,n){const o=aa(e,n);if(!Array.isArray(o))return n;const i=[...o];return i.splice(typeof r=="number"?r:i.length,0,t),kb(e,i,n)}function I$(e,t){const r=Object.keys(e);if(typeof t=="string"){const n=r.filter(o=>o.startsWith(`${t}.`));return e[t]||n.some(o=>e[o])||!1}return r.some(n=>e[n])}function qTe(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){const{currentTarget:r}=t;r instanceof HTMLInputElement?r.type==="checkbox"?e(r.checked):e(r.value):(r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)&&e(r.value)}else e(t)}}var GTe=Object.defineProperty,KTe=Object.defineProperties,YTe=Object.getOwnPropertyDescriptors,$$=Object.getOwnPropertySymbols,XTe=Object.prototype.hasOwnProperty,ZTe=Object.prototype.propertyIsEnumerable,T$=(e,t,r)=>t in e?GTe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wa=(e,t)=>{for(var r in t||(t={}))XTe.call(t,r)&&T$(e,r,t[r]);if($$)for(var r of $$(t))ZTe.call(t,r)&&T$(e,r,t[r]);return e},Kw=(e,t)=>KTe(e,YTe(t));function sK({initialValues:e={},initialErrors:t={},initialDirty:r={},initialTouched:n={},clearInputErrorOnChange:o=!0,validateInputOnChange:i=!1,validateInputOnBlur:a=!1,transformValues:s=c=>c,validate:l}={}){const[c,u]=I.useState(n),[f,d]=I.useState(r),[p,h]=I.useState(e),[y,_]=I.useState(Lx(t)),b=I.useRef(e),m=te=>{b.current=te},E=I.useCallback(()=>u({}),[]),A=te=>{const ie=te?Wa(Wa({},p),te):p;m(ie),d({})},D=I.useCallback(te=>_(ie=>Lx(typeof te=="function"?te(ie):te)),[]),$=I.useCallback(()=>_({}),[]),g=I.useCallback(()=>{h(e),$(),m(e),d({}),E()},[]),N=I.useCallback((te,ie)=>D(ce=>Kw(Wa({},ce),{[te]:ie})),[]),V=I.useCallback(te=>D(ie=>{if(typeof te!="string")return ie;const ce=Wa({},ie);return delete ce[te],ce}),[]),K=I.useCallback(te=>d(ie=>{if(typeof te!="string")return ie;const ce=iK(te,ie);return delete ce[te],ce}),[]),W=I.useCallback((te,ie)=>{const ce=x$(te,i);K(te),u(oe=>Kw(Wa({},oe),{[te]:!0})),h(oe=>{const ue=kb(te,ie,oe);if(ce){const O=W0(te,l,ue);O.hasError?N(te,O.error):V(te)}return ue}),!ce&&o&&N(te,null)},[]),P=I.useCallback(te=>{h(ie=>{const ce=typeof te=="function"?te(ie):te;return Wa(Wa({},ie),ce)}),o&&$()},[]),C=I.useCallback((te,ie)=>{K(te),h(ce=>MTe(te,ie,ce)),_(ce=>jTe(te,ie,ce))},[]),v=I.useCallback((te,ie)=>{K(te),h(ce=>LTe(te,ie,ce)),_(ce=>k$(te,ie,ce,-1))},[]),w=I.useCallback((te,ie,ce)=>{K(te),h(oe=>WTe(te,ie,ce,oe)),_(oe=>k$(te,ce,oe,1))},[]),B=I.useCallback(()=>{const te=Ux(l,p);return _(te.errors),te},[p,l]),R=I.useCallback(te=>{const ie=W0(te,l,p);return ie.hasError?N(te,ie.error):V(te),ie},[p,l]),L=(te,{type:ie="input",withError:ce=!0,withFocus:oe=!0}={})=>{const O={onChange:qTe(G=>W(te,G))};return ce&&(O.error=y[te]),ie==="checkbox"?O.checked=aa(te,p):O.value=aa(te,p),oe&&(O.onFocus=()=>u(G=>Kw(Wa({},G),{[te]:!0})),O.onBlur=()=>{if(x$(te,a)){const G=W0(te,l,p);G.hasError?N(te,G.error):V(te)}}),O},U=(te,ie)=>ce=>{ce==null||ce.preventDefault();const oe=B();oe.hasErrors?ie==null||ie(oe.errors,p,ce):te==null||te(s(p),ce)},S=te=>s(te||p),F=I.useCallback(te=>{te.preventDefault(),g()},[]),T=te=>{if(te){const ce=aa(te,f);if(typeof ce=="boolean")return ce;const oe=aa(te,p),ue=aa(te,b.current);return!y$(oe,ue)}return Object.keys(f).length>0?I$(f):!y$(p,b.current)},q=I.useCallback(te=>I$(c,te),[c]),J=I.useCallback(te=>te?!W0(te,l,p).hasError:!Ux(l,p).hasErrors,[p,l]);return{values:p,errors:y,setValues:P,setErrors:D,setFieldValue:W,setFieldError:N,clearFieldError:V,clearErrors:$,reset:g,validate:B,validateField:R,reorderListItem:C,removeListItem:v,insertListItem:w,getInputProps:L,onSubmit:U,onReset:F,isDirty:T,isTouched:q,setTouched:u,setDirty:d,resetTouched:E,resetDirty:A,isValid:J,getTransformedValues:S}}function Hx(e,t){return Hx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Hx(e,t)}function lK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Hx(e,t)}function Tp(e){"@babel/helpers - typeof";return Tp=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},Tp(e)}function JTe(e,t){if(Tp(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Tp(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QTe(e){var t=JTe(e,"string");return Tp(t)==="symbol"?t:String(t)}function eDe(e,t,r){return t=QTe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function D$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function M$(e){for(var t=1;t"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(_n(1));return r(cK)(e,t)}if(typeof e!="function")throw new Error(_n(2));var o=e,i=t,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function u(){if(l)throw new Error(_n(3));return i}function f(y){if(typeof y!="function")throw new Error(_n(4));if(l)throw new Error(_n(5));var _=!0;return c(),s.push(y),function(){if(_){if(l)throw new Error(_n(6));_=!1,c();var m=s.indexOf(y);s.splice(m,1),a=null}}}function d(y){if(!tDe(y))throw new Error(_n(7));if(typeof y.type>"u")throw new Error(_n(8));if(l)throw new Error(_n(9));try{l=!0,i=o(i,y)}finally{l=!1}for(var _=a=s,b=0;b<_.length;b++){var m=_[b];m()}return y}function p(y){if(typeof y!="function")throw new Error(_n(10));o=y,d({type:N$.REPLACE})}function h(){var y,_=f;return y={subscribe:function(m){if(typeof m!="object"||m===null)throw new Error(_n(11));function E(){m.next&&m.next(u())}E();var A=_(E);return{unsubscribe:A}}},y[R$]=function(){return this},y}return d({type:N$.INIT}),n={dispatch:d,subscribe:f,getState:u,replaceReducer:p},n[R$]=h,n}function F$(e,t){return function(){return t(e.apply(this,arguments))}}function B$(e,t){if(typeof e=="function")return F$(e,t);if(typeof e!="object"||e===null)throw new Error(_n(16));var r={};for(var n in e){var o=e[n];typeof o=="function"&&(r[n]=F$(o,t))}return r}function uK(){for(var e=arguments.length,t=new Array(e),r=0;r=0;n--){var o=t[n](e);if(o)return o}return function(i,a){throw new Error("Invalid value of type "+typeof e+" for "+r+" argument when connecting component "+a.wrappedComponentName+".")}}function qDe(e,t){return e===t}function GDe(e){var t=e===void 0?{}:e,r=t.connectHOC,n=r===void 0?ODe:r,o=t.mapStateToPropsFactories,i=o===void 0?RDe:o,a=t.mapDispatchToPropsFactories,s=a===void 0?TDe:a,l=t.mergePropsFactories,c=l===void 0?LDe:l,u=t.selectorFactory,f=u===void 0?VDe:u;return function(p,h,y,_){_===void 0&&(_={});var b=_,m=b.pure,E=m===void 0?!0:m,A=b.areStatesEqual,D=A===void 0?qDe:A,$=b.areOwnPropsEqual,g=$===void 0?Xw:$,N=b.areStatePropsEqual,V=N===void 0?Xw:N,K=b.areMergedPropsEqual,W=K===void 0?Xw:K,P=fp(b,WDe),C=Zw(p,i,"mapStateToProps"),v=Zw(h,s,"mapDispatchToProps"),w=Zw(y,c,"mergeProps");return n(f,Ze({methodName:"connect",getDisplayName:function(R){return"Connect("+R+")"},shouldHandleStateChanges:!!p,initMapStateToProps:C,initMapDispatchToProps:v,initMergeProps:w,pure:E,areStatesEqual:D,areOwnPropsEqual:g,areStatePropsEqual:V,areMergedPropsEqual:W},P))}}const _K=GDe();oDe(Hs.unstable_batchedUpdates);function KDe(e,t){if(e.length!==t.length)return!1;for(var r=0;r");return n.callbacks},n.setCallbacks=function(s){n.callbacks=s},n}var r=t.prototype;return r.componentDidMount=function(){this.unbind=go(window,[{eventName:"error",fn:this.onWindowError}])},r.componentDidCatch=function(o){if(o instanceof $m){this.setState({});return}throw o},r.componentWillUnmount=function(){this.unbind()},r.render=function(){return this.props.children(this.setCallbacks)},t}(ae.Component),aMe=` - Press space bar to start a drag. - When dragging you can use the arrow keys to move the item around and escape to cancel. - Some screen readers may require you to be in focus mode or to use your pass through key -`,Tm=function(t){return t+1},sMe=function(t){return` - You have lifted an item in position `+Tm(t.source.index)+` -`},OK=function(t,r){var n=t.droppableId===r.droppableId,o=Tm(t.index),i=Tm(r.index);return n?` - You have moved the item from position `+o+` - to position `+i+` - `:` - You have moved the item from position `+o+` - in list `+t.droppableId+` - to list `+r.droppableId+` - in position `+i+` - `},AK=function(t,r,n){var o=r.droppableId===n.droppableId;return o?` - The item `+t+` - has been combined with `+n.draggableId:` - The item `+t+` - in list `+r.droppableId+` - has been combined with `+n.draggableId+` - in list `+n.droppableId+` - `},lMe=function(t){var r=t.destination;if(r)return OK(t.source,r);var n=t.combine;return n?AK(t.draggableId,t.source,n):"You are over an area that cannot be dropped on"},W$=function(t){return` - The item has returned to its starting position - of `+Tm(t.index)+` -`},cMe=function(t){if(t.reason==="CANCEL")return` - Movement cancelled. - `+W$(t.source)+` - `;var r=t.destination,n=t.combine;return r?` - You have dropped the item. - `+OK(t.source,r)+` - `:n?` - You have dropped the item. - `+AK(t.draggableId,t.source,n)+` - `:` - The item has been dropped while not over a drop area. - `+W$(t.source)+` - `},A1={dragHandleUsageInstructions:aMe,onDragStart:sMe,onDragUpdate:lMe,onDragEnd:cMe},Or={x:0,y:0},Fr=function(t,r){return{x:t.x+r.x,y:t.y+r.y}},zn=function(t,r){return{x:t.x-r.x,y:t.y-r.y}},Is=function(t,r){return t.x===r.x&&t.y===r.y},lf=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},jl=function(t,r,n){var o;return n===void 0&&(n=0),o={},o[t]=r,o[t==="x"?"y":"x"]=n,o},Mp=function(t,r){return Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))},q$=function(t,r){return Math.min.apply(Math,r.map(function(n){return Mp(t,n)}))},kK=function(t){return function(r){return{x:t(r.x),y:t(r.y)}}},uMe=function(e,t){var r=Ho({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return r.width<=0||r.height<=0?null:r},Dh=function(t,r){return{top:t.top+r.y,left:t.left+r.x,bottom:t.bottom+r.y,right:t.right+r.x}},G$=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},fMe={top:0,right:0,bottom:0,left:0},dMe=function(t,r){return r?Dh(t,r.scroll.diff.displacement):t},pMe=function(t,r,n){if(n&&n.increasedBy){var o;return Ze({},t,(o={},o[r.end]=t[r.end]+n.increasedBy[r.line],o))}return t},hMe=function(t,r){return r&&r.shouldClipSubject?uMe(r.pageMarginBox,t):Ho(t)},Mu=function(e){var t=e.page,r=e.withPlaceholder,n=e.axis,o=e.frame,i=dMe(t.marginBox,o),a=pMe(i,n,r),s=hMe(a,o);return{page:t,withPlaceholder:r,active:s}},B8=function(e,t){e.frame||Ge(!1);var r=e.frame,n=zn(t,r.scroll.initial),o=lf(n),i=Ze({},r,{scroll:{initial:r.scroll.initial,current:t,diff:{value:n,displacement:o},max:r.scroll.max}}),a=Mu({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i}),s=Ze({},e,{frame:i,subject:a});return s};function Dm(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function j8(e,t){if(e.findIndex)return e.findIndex(t);for(var r=0;re.bottom,c=n.lefte.right,u=l&&c;if(u)return!0;var f=l&&a||c&&i;return f}},yMe=function(e){var t=yo(e.top,e.bottom),r=yo(e.left,e.right);return function(n){var o=t(n.top)&&t(n.bottom)&&r(n.left)&&r(n.right);return o}},z8={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},RK={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},bMe=function(e){return function(t){var r=yo(t.top,t.bottom),n=yo(t.left,t.right);return function(o){return e===z8?r(o.top)&&r(o.bottom):n(o.left)&&n(o.right)}}},wMe=function(t,r){var n=r.frame?r.frame.scroll.diff.displacement:Or;return Dh(t,n)},xMe=function(t,r,n){return r.subject.active?n(r.subject.active)(t):!1},_Me=function(t,r,n){return n(r)(t)},U8=function(t){var r=t.target,n=t.destination,o=t.viewport,i=t.withDroppableDisplacement,a=t.isVisibleThroughFrameFn,s=i?wMe(r,n):r;return xMe(s,n,a)&&_Me(s,o,a)},EMe=function(t){return U8(Ze({},t,{isVisibleThroughFrameFn:MK}))},NK=function(t){return U8(Ze({},t,{isVisibleThroughFrameFn:yMe}))},SMe=function(t){return U8(Ze({},t,{isVisibleThroughFrameFn:bMe(t.destination.axis)}))},CMe=function(t,r,n){if(typeof n=="boolean")return n;if(!r)return!0;var o=r.invisible,i=r.visible;if(o[t])return!1;var a=i[t];return a?a.shouldAnimate:!0};function PMe(e,t){var r=e.page.marginBox,n={top:t.point.y,right:0,bottom:0,left:t.point.x};return Ho(N8(r,n))}function Np(e){var t=e.afterDragging,r=e.destination,n=e.displacedBy,o=e.viewport,i=e.forceShouldAnimate,a=e.last;return t.reduce(function(l,c){var u=PMe(c,n),f=c.descriptor.id;l.all.push(f);var d=EMe({target:u,destination:r,viewport:o,withDroppableDisplacement:!0});if(!d)return l.invisible[c.descriptor.id]=!0,l;var p=CMe(f,a,i),h={draggableId:f,shouldAnimate:p};return l.visible[f]=h,l},{all:[],visible:{},invisible:{}})}function OMe(e,t){if(!e.length)return 0;var r=e[e.length-1].descriptor.index;return t.inHomeList?r:r+1}function K$(e){var t=e.insideDestination,r=e.inHomeList,n=e.displacedBy,o=e.destination,i=OMe(t,{inHomeList:r});return{displaced:Rp,displacedBy:n,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:i}}}}function Mm(e){var t=e.draggable,r=e.insideDestination,n=e.destination,o=e.viewport,i=e.displacedBy,a=e.last,s=e.index,l=e.forceShouldAnimate,c=uf(t,n);if(s==null)return K$({insideDestination:r,inHomeList:c,displacedBy:i,destination:n});var u=Js(r,function(y){return y.descriptor.index===s});if(!u)return K$({insideDestination:r,inHomeList:c,displacedBy:i,destination:n});var f=Mb(t,r),d=r.indexOf(u),p=f.slice(d),h=Np({afterDragging:p,destination:n,displacedBy:i,last:a,viewport:o.frame,forceShouldAnimate:l});return{displaced:h,displacedBy:i,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:s}}}}function js(e,t){return!!t.effected[e]}var AMe=function(e){var t=e.isMovingForward,r=e.destination,n=e.draggables,o=e.combine,i=e.afterCritical;if(!r.isCombineEnabled)return null;var a=o.draggableId,s=n[a],l=s.descriptor.index,c=js(a,i);return c?t?l:l-1:t?l+1:l},kMe=function(e){var t=e.isMovingForward,r=e.isInHomeList,n=e.insideDestination,o=e.location;if(!n.length)return null;var i=o.index,a=t?i+1:i-1,s=n[0].descriptor.index,l=n[n.length-1].descriptor.index,c=r?l:l+1;return ac?null:a},IMe=function(e){var t=e.isMovingForward,r=e.isInHomeList,n=e.draggable,o=e.draggables,i=e.destination,a=e.insideDestination,s=e.previousImpact,l=e.viewport,c=e.afterCritical,u=s.at;if(u||Ge(!1),u.type==="REORDER"){var f=kMe({isMovingForward:t,isInHomeList:r,location:u.destination,insideDestination:a});return f==null?null:Mm({draggable:n,insideDestination:a,destination:i,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:f})}var d=AMe({isMovingForward:t,destination:i,displaced:s.displaced,draggables:o,combine:u.combine,afterCritical:c});return d==null?null:Mm({draggable:n,insideDestination:a,destination:i,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:d})},$Me=function(e){var t=e.displaced,r=e.afterCritical,n=e.combineWith,o=e.displacedBy,i=!!(t.visible[n]||t.invisible[n]);return js(n,r)?i?Or:lf(o.point):i?o.point:Or},TMe=function(e){var t=e.afterCritical,r=e.impact,n=e.draggables,o=Db(r);o||Ge(!1);var i=o.draggableId,a=n[i].page.borderBox.center,s=$Me({displaced:r.displaced,afterCritical:t,combineWith:i,displacedBy:r.displacedBy});return Fr(a,s)},FK=function(t,r){return r.margin[t.start]+r.borderBox[t.size]/2},DMe=function(t,r){return r.margin[t.end]+r.borderBox[t.size]/2},H8=function(t,r,n){return r[t.crossAxisStart]+n.margin[t.crossAxisStart]+n.borderBox[t.crossAxisSize]/2},Y$=function(t){var r=t.axis,n=t.moveRelativeTo,o=t.isMoving;return jl(r.line,n.marginBox[r.end]+FK(r,o),H8(r,n.marginBox,o))},X$=function(t){var r=t.axis,n=t.moveRelativeTo,o=t.isMoving;return jl(r.line,n.marginBox[r.start]-DMe(r,o),H8(r,n.marginBox,o))},MMe=function(t){var r=t.axis,n=t.moveInto,o=t.isMoving;return jl(r.line,n.contentBox[r.start]+FK(r,o),H8(r,n.contentBox,o))},RMe=function(e){var t=e.impact,r=e.draggable,n=e.draggables,o=e.droppable,i=e.afterCritical,a=cf(o.descriptor.id,n),s=r.page,l=o.axis;if(!a.length)return MMe({axis:l,moveInto:o.page,isMoving:s});var c=t.displaced,u=t.displacedBy,f=c.all[0];if(f){var d=n[f];if(js(f,i))return X$({axis:l,moveRelativeTo:d.page,isMoving:s});var p=km(d.page,u.point);return X$({axis:l,moveRelativeTo:p,isMoving:s})}var h=a[a.length-1];if(h.descriptor.id===r.descriptor.id)return s.borderBox.center;if(js(h.descriptor.id,i)){var y=km(h.page,lf(i.displacedBy.point));return Y$({axis:l,moveRelativeTo:y,isMoving:s})}return Y$({axis:l,moveRelativeTo:h.page,isMoving:s})},Vx=function(e,t){var r=e.frame;return r?Fr(t,r.scroll.diff.displacement):t},NMe=function(t){var r=t.impact,n=t.draggable,o=t.droppable,i=t.draggables,a=t.afterCritical,s=n.page.borderBox.center,l=r.at;return!o||!l?s:l.type==="REORDER"?RMe({impact:r,draggable:n,draggables:i,droppable:o,afterCritical:a}):TMe({impact:r,draggables:i,afterCritical:a})},Rb=function(e){var t=NMe(e),r=e.droppable,n=r?Vx(r,t):t;return n},BK=function(e,t){var r=zn(t,e.scroll.initial),n=lf(r),o=Ho({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),i={frame:o,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:r,displacement:n}}};return i};function Z$(e,t){return e.map(function(r){return t[r]})}function FMe(e,t){for(var r=0;r1?u.sort(function(f,d){return cn(f)[s.start]-cn(d)[s.start]})[0]:c.sort(function(f,d){var p=q$(r,G$(cn(f))),h=q$(r,G$(cn(d)));return p!==h?p-h:cn(f)[s.start]-cn(d)[s.start]})[0]},J$=function(t,r){var n=t.page.borderBox.center;return js(t.descriptor.id,r)?zn(n,r.displacedBy.point):n},UMe=function(t,r){var n=t.page.borderBox;return js(t.descriptor.id,r)?Dh(n,lf(r.displacedBy.point)):n},HMe=function(e){var t=e.pageBorderBoxCenter,r=e.viewport,n=e.destination,o=e.insideDestination,i=e.afterCritical,a=o.filter(function(s){return NK({target:UMe(s,i),destination:n,viewport:r.frame,withDroppableDisplacement:!0})}).sort(function(s,l){var c=Mp(t,Vx(n,J$(s,i))),u=Mp(t,Vx(n,J$(l,i)));return ct.left&&e.topt.top}function ZMe(e){var t=e.pageBorderBox,r=e.draggable,n=e.candidates,o=r.page.borderBox.center,i=n.map(function(a){var s=a.axis,l=jl(a.axis.line,t.center[s.line],a.page.borderBox.center[s.crossAxisLine]);return{id:a.descriptor.id,distance:Mp(o,l)}}).sort(function(a,s){return s.distance-a.distance});return i[0]?i[0].id:null}function JMe(e){var t=e.pageBorderBox,r=e.draggable,n=e.droppables,o=Tb(n).filter(function(i){if(!i.isEnabled)return!1;var a=i.subject.active;if(!a||!XMe(t,a))return!1;if(UK(a)(t.center))return!0;var s=i.axis,l=a.center[s.crossAxisLine],c=t[s.crossAxisStart],u=t[s.crossAxisEnd],f=yo(a[s.crossAxisStart],a[s.crossAxisEnd]),d=f(c),p=f(u);return!d&&!p?!0:d?cl});return o.length?o.length===1?o[0].descriptor.id:ZMe({pageBorderBox:t,draggable:r,candidates:o}):null}var HK=function(t,r){return Ho(Dh(t,r))},QMe=function(e,t){var r=e.frame;return r?HK(t,r.scroll.diff.value):t};function VK(e){var t=e.displaced,r=e.id;return!!(t.visible[r]||t.invisible[r])}function eRe(e){var t=e.draggable,r=e.closest,n=e.inHomeList;return r?n&&r.descriptor.index>t.descriptor.index?r.descriptor.index-1:r.descriptor.index:null}var tRe=function(e){var t=e.pageBorderBoxWithDroppableScroll,r=e.draggable,n=e.destination,o=e.insideDestination,i=e.last,a=e.viewport,s=e.afterCritical,l=n.axis,c=Mh(n.axis,r.displaceBy),u=c.value,f=t[l.start],d=t[l.end],p=Mb(r,o),h=Js(p,function(_){var b=_.descriptor.id,m=_.page.borderBox.center[l.line],E=js(b,s),A=VK({displaced:i,id:b});return E?A?d<=m:fb[s.start]+E&&fb[s.start]-c+E&&ub[s.start]+c+E&&fb[s.start]+E&&u=tT)return QK;var i=o/tT,a=Gx+TRe*i,s=n==="CANCEL"?a*DRe:a;return Number(s.toFixed(2))},RRe=function(e){var t=e.impact,r=e.draggable,n=e.dimensions,o=e.viewport,i=e.afterCritical,a=n.draggables,s=n.droppables,l=Wn(t),c=l?s[l]:null,u=s[r.descriptor.droppableId],f=GK({impact:t,draggable:r,draggables:a,afterCritical:i,droppable:c||u,viewport:o}),d=zn(f,r.client.borderBox.center);return d},NRe=function(e){var t=e.draggables,r=e.reason,n=e.lastImpact,o=e.home,i=e.viewport,a=e.onLiftImpact;if(!n.at||r!=="DROP"){var s=qK({draggables:t,impact:a,destination:o,viewport:i,forceShouldAnimate:!0});return{impact:s,didDropInsideDroppable:!1}}if(n.at.type==="REORDER")return{impact:n,didDropInsideDroppable:!0};var l=Ze({},n,{displaced:Rp});return{impact:l,didDropInsideDroppable:!0}},FRe=function(e){var t=e.getState,r=e.dispatch;return function(n){return function(o){if(o.type!=="DROP"){n(o);return}var i=t(),a=o.payload.reason;if(i.phase==="COLLECTING"){r(kRe({reason:a}));return}if(i.phase!=="IDLE"){var s=i.phase==="DROP_PENDING"&&i.isWaiting;s&&Ge(!1),i.phase==="DRAGGING"||i.phase==="DROP_PENDING"||Ge(!1);var l=i.critical,c=i.dimensions,u=c.draggables[i.critical.draggable.id],f=NRe({reason:a,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),d=f.impact,p=f.didDropInsideDroppable,h=p?L8(d):null,y=p?Db(d):null,_={index:l.draggable.index,droppableId:l.droppable.id},b={draggableId:u.descriptor.id,type:u.descriptor.type,source:_,reason:a,mode:i.movementMode,destination:h,combine:y},m=RRe({impact:d,draggable:u,dimensions:c,viewport:i.viewport,afterCritical:i.afterCritical}),E={critical:i.critical,afterCritical:i.afterCritical,result:b,impact:d},A=!Is(i.current.client.offset,m)||!!b.combine;if(!A){r(G8({completed:E}));return}var D=MRe({current:i.current.client.offset,destination:m,reason:a}),$={newHomeClientOffset:m,dropDuration:D,completed:E};r(ARe($))}}}},eY=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function BRe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(r){r.target!==window&&r.target!==window.document||e()}}}function jRe(e){var t=e.onWindowScroll;function r(){t(eY())}var n=Dp(r),o=BRe(n),i=ks;function a(){return i!==ks}function s(){a()&&Ge(!1),i=go(window,[o])}function l(){a()||Ge(!1),n.cancel(),i(),i=ks}return{start:s,stop:l,isActive:a}}var LRe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},zRe=function(e){var t=jRe({onWindowScroll:function(n){e.dispatch(_Re({newScroll:n}))}});return function(r){return function(n){!t.isActive()&&n.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&LRe(n)&&t.stop(),r(n)}}},URe=function(e){var t=!1,r=!1,n=setTimeout(function(){r=!0}),o=function(a){t||r||(t=!0,e(a),clearTimeout(n))};return o.wasCalled=function(){return t},o},HRe=function(){var e=[],t=function(i){var a=j8(e,function(c){return c.timerId===i});a===-1&&Ge(!1);var s=e.splice(a,1),l=s[0];l.callback()},r=function(i){var a=setTimeout(function(){return t(a)}),s={timerId:a,callback:i};e.push(s)},n=function(){if(e.length){var i=[].concat(e);e.length=0,i.forEach(function(a){clearTimeout(a.timerId),a.callback()})}};return{add:r,flush:n}},VRe=function(t,r){return t==null&&r==null?!0:t==null||r==null?!1:t.droppableId===r.droppableId&&t.index===r.index},WRe=function(t,r){return t==null&&r==null?!0:t==null||r==null?!1:t.draggableId===r.draggableId&&t.droppableId===r.droppableId},qRe=function(t,r){if(t===r)return!0;var n=t.draggable.id===r.draggable.id&&t.draggable.droppableId===r.draggable.droppableId&&t.draggable.type===r.draggable.type&&t.draggable.index===r.draggable.index,o=t.droppable.id===r.droppable.id&&t.droppable.type===r.droppable.type;return n&&o},ed=function(t,r){r()},q0=function(t,r){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:r}},r5=function(t,r,n,o){if(!t){n(o(r));return}var i=URe(n),a={announce:i};t(r,a),i.wasCalled()||n(o(r))},GRe=function(e,t){var r=HRe(),n=null,o=function(d,p){n&&Ge(!1),ed("onBeforeCapture",function(){var h=e().onBeforeCapture;if(h){var y={draggableId:d,mode:p};h(y)}})},i=function(d,p){n&&Ge(!1),ed("onBeforeDragStart",function(){var h=e().onBeforeDragStart;h&&h(q0(d,p))})},a=function(d,p){n&&Ge(!1);var h=q0(d,p);n={mode:p,lastCritical:d,lastLocation:h.source,lastCombine:null},r.add(function(){ed("onDragStart",function(){return r5(e().onDragStart,h,t,A1.onDragStart)})})},s=function(d,p){var h=L8(p),y=Db(p);n||Ge(!1);var _=!qRe(d,n.lastCritical);_&&(n.lastCritical=d);var b=!VRe(n.lastLocation,h);b&&(n.lastLocation=h);var m=!WRe(n.lastCombine,y);if(m&&(n.lastCombine=y),!(!_&&!b&&!m)){var E=Ze({},q0(d,n.mode),{combine:y,destination:h});r.add(function(){ed("onDragUpdate",function(){return r5(e().onDragUpdate,E,t,A1.onDragUpdate)})})}},l=function(){n||Ge(!1),r.flush()},c=function(d){n||Ge(!1),n=null,ed("onDragEnd",function(){return r5(e().onDragEnd,d,t,A1.onDragEnd)})},u=function(){if(n){var d=Ze({},q0(n.lastCritical,n.mode),{combine:null,destination:null,reason:"CANCEL"});c(d)}};return{beforeCapture:o,beforeStart:i,start:a,update:s,flush:l,drop:c,abort:u}},KRe=function(e,t){var r=GRe(e,t);return function(n){return function(o){return function(i){if(i.type==="BEFORE_INITIAL_CAPTURE"){r.beforeCapture(i.payload.draggableId,i.payload.movementMode);return}if(i.type==="INITIAL_PUBLISH"){var a=i.payload.critical;r.beforeStart(a,i.payload.movementMode),o(i),r.start(a,i.payload.movementMode);return}if(i.type==="DROP_COMPLETE"){var s=i.payload.completed.result;r.flush(),o(i),r.drop(s);return}if(o(i),i.type==="FLUSH"){r.abort();return}var l=n.getState();l.phase==="DRAGGING"&&r.update(l.critical,l.impact)}}}},YRe=function(e){return function(t){return function(r){if(r.type!=="DROP_ANIMATION_FINISHED"){t(r);return}var n=e.getState();n.phase!=="DROP_ANIMATING"&&Ge(!1),e.dispatch(G8({completed:n.completed}))}}},XRe=function(e){var t=null,r=null;function n(){r&&(cancelAnimationFrame(r),r=null),t&&(t(),t=null)}return function(o){return function(i){if((i.type==="FLUSH"||i.type==="DROP_COMPLETE"||i.type==="DROP_ANIMATION_FINISHED")&&n(),o(i),i.type==="DROP_ANIMATE"){var a={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var l=e.getState();l.phase==="DROP_ANIMATING"&&e.dispatch(JK())}};r=requestAnimationFrame(function(){r=null,t=go(window,[a])})}}}},ZRe=function(e){return function(){return function(t){return function(r){(r.type==="DROP_COMPLETE"||r.type==="FLUSH"||r.type==="DROP_ANIMATE")&&e.stopPublishing(),t(r)}}}},JRe=function(e){var t=!1;return function(){return function(r){return function(n){if(n.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(n.payload.critical.draggable.id),r(n),e.tryRestoreFocusRecorded();return}if(r(n),!!t){if(n.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(n.type==="DROP_COMPLETE"){t=!1;var o=n.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},QRe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},eNe=function(e){return function(t){return function(r){return function(n){if(QRe(n)){e.stop(),r(n);return}if(n.type==="INITIAL_PUBLISH"){r(n);var o=t.getState();o.phase!=="DRAGGING"&&Ge(!1),e.start(o);return}r(n),e.scroll(t.getState())}}}},tNe=function(e){return function(t){return function(r){if(t(r),r.type==="PUBLISH_WHILE_DRAGGING"){var n=e.getState();n.phase==="DROP_PENDING"&&(n.isWaiting||e.dispatch(ZK({reason:n.reason})))}}}},rNe=uK,nNe=function(e){var t=e.dimensionMarshal,r=e.focusMarshal,n=e.styleMarshal,o=e.getResponders,i=e.announce,a=e.autoScroller;return cK(pRe,rNe(rDe($Re(n),ZRe(t),IRe(t),FRe,YRe,XRe,tNe,eNe(a),zRe,JRe(r),KRe(o,i))))},n5=function(){return{additions:{},removals:{},modified:{}}};function oNe(e){var t=e.registry,r=e.callbacks,n=n5(),o=null,i=function(){o||(r.collectionStarting(),o=requestAnimationFrame(function(){o=null;var u=n,f=u.additions,d=u.removals,p=u.modified,h=Object.keys(f).map(function(b){return t.draggable.getById(b).getDimension(Or)}).sort(function(b,m){return b.descriptor.index-m.descriptor.index}),y=Object.keys(p).map(function(b){var m=t.droppable.getById(b),E=m.callbacks.getScrollWhileDragging();return{droppableId:b,scroll:E}}),_={additions:h,removals:Object.keys(d),modified:y};n=n5(),r.publish(_)}))},a=function(u){var f=u.descriptor.id;n.additions[f]=u,n.modified[u.descriptor.droppableId]=!0,n.removals[f]&&delete n.removals[f],i()},s=function(u){var f=u.descriptor;n.removals[f.id]=!0,n.modified[f.droppableId]=!0,n.additions[f.id]&&delete n.additions[f.id],i()},l=function(){o&&(cancelAnimationFrame(o),o=null,n=n5())};return{add:a,remove:s,stop:l}}var tY=function(e){var t=e.scrollHeight,r=e.scrollWidth,n=e.height,o=e.width,i=zn({x:r,y:t},{x:o,y:n}),a={x:Math.max(0,i.x),y:Math.max(0,i.y)};return a},rY=function(){var e=document.documentElement;return e||Ge(!1),e},nY=function(){var e=rY(),t=tY({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},iNe=function(){var e=eY(),t=nY(),r=e.y,n=e.x,o=rY(),i=o.clientWidth,a=o.clientHeight,s=n+i,l=r+a,c=Ho({top:r,left:n,right:s,bottom:l}),u={frame:c,scroll:{initial:e,current:e,max:t,diff:{value:Or,displacement:Or}}};return u},aNe=function(e){var t=e.critical,r=e.scrollOptions,n=e.registry,o=iNe(),i=o.scroll.current,a=t.droppable,s=n.droppable.getAllByType(a.type).map(function(f){return f.callbacks.getDimensionAndWatchScroll(i,r)}),l=n.draggable.getAllByType(t.draggable.type).map(function(f){return f.getDimension(i)}),c={draggables:TK(l),droppables:$K(s)},u={dimensions:c,critical:t,viewport:o};return u};function rT(e,t,r){if(r.descriptor.id===t.id||r.descriptor.type!==t.type)return!1;var n=e.droppable.getById(r.descriptor.droppableId);return n.descriptor.mode==="virtual"}var sNe=function(e,t){var r=null,n=oNe({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=function(p,h){e.droppable.exists(p)||Ge(!1),r&&t.updateDroppableIsEnabled({id:p,isEnabled:h})},i=function(p,h){r&&(e.droppable.exists(p)||Ge(!1),t.updateDroppableIsCombineEnabled({id:p,isCombineEnabled:h}))},a=function(p,h){r&&(e.droppable.exists(p)||Ge(!1),t.updateDroppableScroll({id:p,newScroll:h}))},s=function(p,h){r&&e.droppable.getById(p).callbacks.scroll(h)},l=function(){if(r){n.stop();var p=r.critical.droppable;e.droppable.getAllByType(p.type).forEach(function(h){return h.callbacks.dragStopped()}),r.unsubscribe(),r=null}},c=function(p){r||Ge(!1);var h=r.critical.draggable;p.type==="ADDITION"&&rT(e,h,p.value)&&n.add(p.value),p.type==="REMOVAL"&&rT(e,h,p.value)&&n.remove(p.value)},u=function(p){r&&Ge(!1);var h=e.draggable.getById(p.draggableId),y=e.droppable.getById(h.descriptor.droppableId),_={draggable:h.descriptor,droppable:y.descriptor},b=e.subscribe(c);return r={critical:_,unsubscribe:b},aNe({critical:_,registry:e,scrollOptions:p.scrollOptions})},f={updateDroppableIsEnabled:o,updateDroppableIsCombineEnabled:i,scrollDroppable:s,updateDroppableScroll:a,startPublishing:u,stopPublishing:l};return f},oY=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},lNe=function(e){window.scrollBy(e.x,e.y)},cNe=Cr(function(e){return Tb(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),uNe=function(t,r){var n=Js(cNe(r),function(o){return o.frame||Ge(!1),UK(o.frame.pageMarginBox)(t)});return n},fNe=function(e){var t=e.center,r=e.destination,n=e.droppables;if(r){var o=n[r];return o.frame?o:null}var i=uNe(t,n);return i},$s={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},dNe=function(e,t){var r=e[t.size]*$s.startFromPercentage,n=e[t.size]*$s.maxScrollAtPercentage,o={startScrollingFrom:r,maxScrollValueAt:n};return o},iY=function(e){var t=e.startOfRange,r=e.endOfRange,n=e.current,o=r-t;if(o===0)return 0;var i=n-t,a=i/o;return a},X8=1,pNe=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return $s.maxPixelScroll;if(e===t.startScrollingFrom)return X8;var r=iY({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),n=1-r,o=$s.maxPixelScroll*$s.ease(n);return Math.ceil(o)},nT=$s.durationDampening.accelerateAt,oT=$s.durationDampening.stopDampeningAt,hNe=function(e,t){var r=t,n=oT,o=Date.now(),i=o-r;if(i>=oT)return e;if(it.height,i=r.width>t.width;return!i&&!o?n:i&&o?null:{x:i?0:n.x,y:o?0:n.y}},gNe=kK(function(e){return e===0?0:e}),aY=function(e){var t=e.dragStartTime,r=e.container,n=e.subject,o=e.center,i=e.shouldUseTimeDampening,a={top:o.y-r.top,right:r.right-o.x,bottom:r.bottom-o.y,left:o.x-r.left},s=aT({container:r,distanceToEdges:a,dragStartTime:t,axis:z8,shouldUseTimeDampening:i}),l=aT({container:r,distanceToEdges:a,dragStartTime:t,axis:RK,shouldUseTimeDampening:i}),c=gNe({x:l,y:s});if(Is(c,Or))return null;var u=vNe({container:r,subject:n,proposedScroll:c});return u?Is(u,Or)?null:u:null},mNe=kK(function(e){return e===0?0:e>0?1:-1}),Z8=function(){var e=function(r,n){return r<0?r:r>n?r-n:0};return function(t){var r=t.current,n=t.max,o=t.change,i=Fr(r,o),a={x:e(i.x,n.x),y:e(i.y,n.y)};return Is(a,Or)?null:a}}(),sY=function(t){var r=t.max,n=t.current,o=t.change,i={x:Math.max(n.x,r.x),y:Math.max(n.y,r.y)},a=mNe(o),s=Z8({max:i,current:n,change:a});return!s||a.x!==0&&s.x===0||a.y!==0&&s.y===0},J8=function(t,r){return sY({current:t.scroll.current,max:t.scroll.max,change:r})},yNe=function(t,r){if(!J8(t,r))return null;var n=t.scroll.max,o=t.scroll.current;return Z8({current:o,max:n,change:r})},Q8=function(t,r){var n=t.frame;return n?sY({current:n.scroll.current,max:n.scroll.max,change:r}):!1},bNe=function(t,r){var n=t.frame;return!n||!Q8(t,r)?null:Z8({current:n.scroll.current,max:n.scroll.max,change:r})},wNe=function(e){var t=e.viewport,r=e.subject,n=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=aY({dragStartTime:o,container:t.frame,subject:r,center:n,shouldUseTimeDampening:i});return a&&J8(t,a)?a:null},xNe=function(e){var t=e.droppable,r=e.subject,n=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var s=aY({dragStartTime:o,container:a.pageMarginBox,subject:r,center:n,shouldUseTimeDampening:i});return s&&Q8(t,s)?s:null},sT=function(e){var t=e.state,r=e.dragStartTime,n=e.shouldUseTimeDampening,o=e.scrollWindow,i=e.scrollDroppable,a=t.current.page.borderBoxCenter,s=t.dimensions.draggables[t.critical.draggable.id],l=s.page.marginBox;if(t.isWindowScrollAllowed){var c=t.viewport,u=wNe({dragStartTime:r,viewport:c,subject:l,center:a,shouldUseTimeDampening:n});if(u){o(u);return}}var f=fNe({center:a,destination:Wn(t.impact),droppables:t.dimensions.droppables});if(f){var d=xNe({dragStartTime:r,droppable:f,subject:l,center:a,shouldUseTimeDampening:n});d&&i(f.descriptor.id,d)}},_Ne=function(e){var t=e.scrollWindow,r=e.scrollDroppable,n=Dp(t),o=Dp(r),i=null,a=function(u){i||Ge(!1);var f=i,d=f.shouldUseTimeDampening,p=f.dragStartTime;sT({state:u,scrollWindow:n,scrollDroppable:o,dragStartTime:p,shouldUseTimeDampening:d})},s=function(u){i&&Ge(!1);var f=Date.now(),d=!1,p=function(){d=!0};sT({state:u,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:p,scrollDroppable:p}),i={dragStartTime:f,shouldUseTimeDampening:d},d&&a(u)},l=function(){i&&(n.cancel(),o.cancel(),i=null)};return{start:s,stop:l,scroll:a}},ENe=function(e){var t=e.move,r=e.scrollDroppable,n=e.scrollWindow,o=function(c,u){var f=Fr(c.current.client.selection,u);t({client:f})},i=function(c,u){if(!Q8(c,u))return u;var f=bNe(c,u);if(!f)return r(c.descriptor.id,u),null;var d=zn(u,f);r(c.descriptor.id,d);var p=zn(u,d);return p},a=function(c,u,f){if(!c||!J8(u,f))return f;var d=yNe(u,f);if(!d)return n(f),null;var p=zn(f,d);n(p);var h=zn(f,p);return h},s=function(c){var u=c.scrollJumpRequest;if(u){var f=Wn(c.impact);f||Ge(!1);var d=i(c.dimensions.droppables[f],u);if(d){var p=c.viewport,h=a(c.isWindowScrollAllowed,p,d);h&&o(c,h)}}};return s},SNe=function(e){var t=e.scrollDroppable,r=e.scrollWindow,n=e.move,o=_Ne({scrollWindow:r,scrollDroppable:t}),i=ENe({move:n,scrollWindow:r,scrollDroppable:t}),a=function(c){if(c.phase==="DRAGGING"){if(c.movementMode==="FLUID"){o.scroll(c);return}c.scrollJumpRequest&&i(c)}},s={scroll:a,start:o.start,stop:o.stop};return s},Ru="data-rbd",Nu=function(){var e=Ru+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),Kx=function(){var e=Ru+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),CNe=function(){var e=Ru+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),lT={contextId:Ru+"-scroll-container-context-id"},PNe=function(t){return function(r){return"["+r+'="'+t+'"]'}},td=function(t,r){return t.map(function(n){var o=n.styles[r];return o?n.selector+" { "+o+" }":""}).join(" ")},ONe="pointer-events: none;",ANe=function(e){var t=PNe(e),r=function(){var s=` - cursor: -webkit-grab; - cursor: grab; - `;return{selector:t(Nu.contextId),styles:{always:` - -webkit-touch-callout: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); - touch-action: manipulation; - `,resting:s,dragging:ONe,dropAnimating:s}}}(),n=function(){var s=` - transition: `+Ud.outOfTheWay+`; - `;return{selector:t(Kx.contextId),styles:{dragging:s,dropAnimating:s,userCancel:s}}}(),o={selector:t(CNe.contextId),styles:{always:"overflow-anchor: none;"}},i={selector:"body",styles:{dragging:` - cursor: grabbing; - cursor: -webkit-grabbing; - user-select: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - overflow-anchor: none; - `}},a=[n,r,o,i];return{always:td(a,"always"),resting:td(a,"resting"),dragging:td(a,"dragging"),dropAnimating:td(a,"dropAnimating"),userCancel:td(a,"userCancel")}},qn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?I.useLayoutEffect:I.useEffect,o5=function(){var t=document.querySelector("head");return t||Ge(!1),t},cT=function(t){var r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.type="text/css",r};function kNe(e,t){var r=Pt(function(){return ANe(e)},[e]),n=I.useRef(null),o=I.useRef(null),i=lt(Cr(function(f){var d=o.current;d||Ge(!1),d.textContent=f}),[]),a=lt(function(f){var d=n.current;d||Ge(!1),d.textContent=f},[]);qn(function(){!n.current&&!o.current||Ge(!1);var f=cT(t),d=cT(t);return n.current=f,o.current=d,f.setAttribute(Ru+"-always",e),d.setAttribute(Ru+"-dynamic",e),o5().appendChild(f),o5().appendChild(d),a(r.always),i(r.resting),function(){var p=function(y){var _=y.current;_||Ge(!1),o5().removeChild(_),y.current=null};p(n),p(o)}},[t,a,i,r.always,r.resting,e]);var s=lt(function(){return i(r.dragging)},[i,r.dragging]),l=lt(function(f){if(f==="DROP"){i(r.dropAnimating);return}i(r.userCancel)},[i,r.dropAnimating,r.userCancel]),c=lt(function(){o.current&&i(r.resting)},[i,r.resting]),u=Pt(function(){return{dragging:s,dropping:l,resting:c}},[s,l,c]);return u}var lY=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Nb(e){return e instanceof lY(e).HTMLElement}function INe(e,t){var r="["+Nu.contextId+'="'+e+'"]',n=IK(document.querySelectorAll(r));if(!n.length)return null;var o=Js(n,function(i){return i.getAttribute(Nu.draggableId)===t});return!o||!Nb(o)?null:o}function $Ne(e){var t=I.useRef({}),r=I.useRef(null),n=I.useRef(null),o=I.useRef(!1),i=lt(function(d,p){var h={id:d,focus:p};return t.current[d]=h,function(){var _=t.current,b=_[d];b!==h&&delete _[d]}},[]),a=lt(function(d){var p=INe(e,d);p&&p!==document.activeElement&&p.focus()},[e]),s=lt(function(d,p){r.current===d&&(r.current=p)},[]),l=lt(function(){n.current||o.current&&(n.current=requestAnimationFrame(function(){n.current=null;var d=r.current;d&&a(d)}))},[a]),c=lt(function(d){r.current=null;var p=document.activeElement;p&&p.getAttribute(Nu.draggableId)===d&&(r.current=d)},[]);qn(function(){return o.current=!0,function(){o.current=!1;var d=n.current;d&&cancelAnimationFrame(d)}},[]);var u=Pt(function(){return{register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}},[i,c,l,s]);return u}function TNe(){var e={draggables:{},droppables:{}},t=[];function r(f){return t.push(f),function(){var p=t.indexOf(f);p!==-1&&t.splice(p,1)}}function n(f){t.length&&t.forEach(function(d){return d(f)})}function o(f){return e.draggables[f]||null}function i(f){var d=o(f);return d||Ge(!1),d}var a={register:function(d){e.draggables[d.descriptor.id]=d,n({type:"ADDITION",value:d})},update:function(d,p){var h=e.draggables[p.descriptor.id];h&&h.uniqueId===d.uniqueId&&(delete e.draggables[p.descriptor.id],e.draggables[d.descriptor.id]=d)},unregister:function(d){var p=d.descriptor.id,h=o(p);h&&d.uniqueId===h.uniqueId&&(delete e.draggables[p],n({type:"REMOVAL",value:d}))},getById:i,findById:o,exists:function(d){return!!o(d)},getAllByType:function(d){return Dm(e.draggables).filter(function(p){return p.descriptor.type===d})}};function s(f){return e.droppables[f]||null}function l(f){var d=s(f);return d||Ge(!1),d}var c={register:function(d){e.droppables[d.descriptor.id]=d},unregister:function(d){var p=s(d.descriptor.id);p&&d.uniqueId===p.uniqueId&&delete e.droppables[d.descriptor.id]},getById:l,findById:s,exists:function(d){return!!s(d)},getAllByType:function(d){return Dm(e.droppables).filter(function(p){return p.descriptor.type===d})}};function u(){e.draggables={},e.droppables={},t.length=0}return{draggable:a,droppable:c,subscribe:r,clean:u}}function DNe(){var e=Pt(TNe,[]);return I.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var eE=ae.createContext(null),Rm=function(){var e=document.body;return e||Ge(!1),e},MNe={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},RNe=function(t){return"rbd-announcement-"+t};function NNe(e){var t=Pt(function(){return RNe(e)},[e]),r=I.useRef(null);I.useEffect(function(){var i=document.createElement("div");return r.current=i,i.id=t,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),Ze(i.style,MNe),Rm().appendChild(i),function(){setTimeout(function(){var l=Rm();l.contains(i)&&l.removeChild(i),i===r.current&&(r.current=null)})}},[t]);var n=lt(function(o){var i=r.current;if(i){i.textContent=o;return}},[]);return n}var FNe=0,BNe={separator:"::"};function tE(e,t){return t===void 0&&(t=BNe),Pt(function(){return""+e+t.separator+FNe++},[t.separator,e])}function jNe(e){var t=e.contextId,r=e.uniqueId;return"rbd-hidden-text-"+t+"-"+r}function LNe(e){var t=e.contextId,r=e.text,n=tE("hidden-text",{separator:"-"}),o=Pt(function(){return jNe({contextId:t,uniqueId:n})},[n,t]);return I.useEffect(function(){var a=document.createElement("div");return a.id=o,a.textContent=r,a.style.display="none",Rm().appendChild(a),function(){var l=Rm();l.contains(a)&&l.removeChild(a)}},[o,r]),o}var Fb=ae.createContext(null);function cY(e){var t=I.useRef(e);return I.useEffect(function(){t.current=e}),t}function zNe(){var e=null;function t(){return!!e}function r(a){return a===e}function n(a){e&&Ge(!1);var s={abandon:a};return e=s,s}function o(){e||Ge(!1),e=null}function i(){e&&(e.abandon(),o())}return{isClaimed:t,isActive:r,claim:n,release:o,tryAbandon:i}}var UNe=9,HNe=13,rE=27,uY=32,VNe=33,WNe=34,qNe=35,GNe=36,KNe=37,YNe=38,XNe=39,ZNe=40,G0,JNe=(G0={},G0[HNe]=!0,G0[UNe]=!0,G0),fY=function(e){JNe[e.keyCode]&&e.preventDefault()},Bb=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],r=Js(t,function(n){return"on"+n in document});return r||e}(),dY=0,uT=5;function QNe(e,t){return Math.abs(t.x-e.x)>=uT||Math.abs(t.y-e.y)>=uT}var fT={type:"IDLE"};function eFe(e){var t=e.cancel,r=e.completed,n=e.getPhase,o=e.setPhase;return[{eventName:"mousemove",fn:function(a){var s=a.button,l=a.clientX,c=a.clientY;if(s===dY){var u={x:l,y:c},f=n();if(f.type==="DRAGGING"){a.preventDefault(),f.actions.move(u);return}f.type!=="PENDING"&&Ge(!1);var d=f.point;if(QNe(d,u)){a.preventDefault();var p=f.actions.fluidLift(u);o({type:"DRAGGING",actions:p})}}}},{eventName:"mouseup",fn:function(a){var s=n();if(s.type!=="DRAGGING"){t();return}a.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),r()}},{eventName:"mousedown",fn:function(a){n().type==="DRAGGING"&&a.preventDefault(),t()}},{eventName:"keydown",fn:function(a){var s=n();if(s.type==="PENDING"){t();return}if(a.keyCode===rE){a.preventDefault(),t();return}fY(a)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){n().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(a){var s=n();if(s.type==="IDLE"&&Ge(!1),s.actions.shouldRespectForcePress()){t();return}a.preventDefault()}},{eventName:Bb,fn:t}]}function tFe(e){var t=I.useRef(fT),r=I.useRef(ks),n=Pt(function(){return{eventName:"mousedown",fn:function(f){if(!f.defaultPrevented&&f.button===dY&&!(f.ctrlKey||f.metaKey||f.shiftKey||f.altKey)){var d=e.findClosestDraggableId(f);if(d){var p=e.tryGetLock(d,a,{sourceEvent:f});if(p){f.preventDefault();var h={x:f.clientX,y:f.clientY};r.current(),c(p,h)}}}}}},[e]),o=Pt(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(f){if(!f.defaultPrevented){var d=e.findClosestDraggableId(f);if(d){var p=e.findOptionsForDraggable(d);p&&(p.shouldRespectForcePress||e.canGetLock(d)&&f.preventDefault())}}}}},[e]),i=lt(function(){var f={passive:!1,capture:!0};r.current=go(window,[o,n],f)},[o,n]),a=lt(function(){var u=t.current;u.type!=="IDLE"&&(t.current=fT,r.current(),i())},[i]),s=lt(function(){var u=t.current;a(),u.type==="DRAGGING"&&u.actions.cancel({shouldBlockNextClick:!0}),u.type==="PENDING"&&u.actions.abort()},[a]),l=lt(function(){var f={capture:!0,passive:!1},d=eFe({cancel:s,completed:a,getPhase:function(){return t.current},setPhase:function(h){t.current=h}});r.current=go(window,d,f)},[s,a]),c=lt(function(f,d){t.current.type!=="IDLE"&&Ge(!1),t.current={type:"PENDING",point:d,actions:f},l()},[l]);qn(function(){return i(),function(){r.current()}},[i])}var mc;function rFe(){}var nFe=(mc={},mc[WNe]=!0,mc[VNe]=!0,mc[GNe]=!0,mc[qNe]=!0,mc);function oFe(e,t){function r(){t(),e.cancel()}function n(){t(),e.drop()}return[{eventName:"keydown",fn:function(i){if(i.keyCode===rE){i.preventDefault(),r();return}if(i.keyCode===uY){i.preventDefault(),n();return}if(i.keyCode===ZNe){i.preventDefault(),e.moveDown();return}if(i.keyCode===YNe){i.preventDefault(),e.moveUp();return}if(i.keyCode===XNe){i.preventDefault(),e.moveRight();return}if(i.keyCode===KNe){i.preventDefault(),e.moveLeft();return}if(nFe[i.keyCode]){i.preventDefault();return}fY(i)}},{eventName:"mousedown",fn:r},{eventName:"mouseup",fn:r},{eventName:"click",fn:r},{eventName:"touchstart",fn:r},{eventName:"resize",fn:r},{eventName:"wheel",fn:r,options:{passive:!0}},{eventName:Bb,fn:r}]}function iFe(e){var t=I.useRef(rFe),r=Pt(function(){return{eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==uY)return;var a=e.findClosestDraggableId(i);if(!a)return;var s=e.tryGetLock(a,u,{sourceEvent:i});if(!s)return;i.preventDefault();var l=!0,c=s.snapLift();t.current();function u(){l||Ge(!1),l=!1,t.current(),n()}t.current=go(window,oFe(c,u),{capture:!0,passive:!1})}}},[e]),n=lt(function(){var i={passive:!1,capture:!0};t.current=go(window,[r],i)},[r]);qn(function(){return n(),function(){t.current()}},[n])}var i5={type:"IDLE"},aFe=120,sFe=.15;function lFe(e){var t=e.cancel,r=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(o){o.preventDefault()}},{eventName:"keydown",fn:function(o){if(r().type!=="DRAGGING"){t();return}o.keyCode===rE&&o.preventDefault(),t()}},{eventName:Bb,fn:t}]}function cFe(e){var t=e.cancel,r=e.completed,n=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(i){var a=n();if(a.type!=="DRAGGING"){t();return}a.hasMoved=!0;var s=i.touches[0],l=s.clientX,c=s.clientY,u={x:l,y:c};i.preventDefault(),a.actions.move(u)}},{eventName:"touchend",fn:function(i){var a=n();if(a.type!=="DRAGGING"){t();return}i.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),r()}},{eventName:"touchcancel",fn:function(i){if(n().type!=="DRAGGING"){t();return}i.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(i){var a=n();a.type==="IDLE"&&Ge(!1);var s=i.touches[0];if(s){var l=s.force>=sFe;if(l){var c=a.actions.shouldRespectForcePress();if(a.type==="PENDING"){c&&t();return}if(c){if(a.hasMoved){i.preventDefault();return}t();return}i.preventDefault()}}}},{eventName:Bb,fn:t}]}function uFe(e){var t=I.useRef(i5),r=I.useRef(ks),n=lt(function(){return t.current},[]),o=lt(function(p){t.current=p},[]),i=Pt(function(){return{eventName:"touchstart",fn:function(p){if(!p.defaultPrevented){var h=e.findClosestDraggableId(p);if(h){var y=e.tryGetLock(h,s,{sourceEvent:p});if(y){var _=p.touches[0],b=_.clientX,m=_.clientY,E={x:b,y:m};r.current(),f(y,E)}}}}}},[e]),a=lt(function(){var p={capture:!0,passive:!1};r.current=go(window,[i],p)},[i]),s=lt(function(){var d=t.current;d.type!=="IDLE"&&(d.type==="PENDING"&&clearTimeout(d.longPressTimerId),o(i5),r.current(),a())},[a,o]),l=lt(function(){var d=t.current;s(),d.type==="DRAGGING"&&d.actions.cancel({shouldBlockNextClick:!0}),d.type==="PENDING"&&d.actions.abort()},[s]),c=lt(function(){var p={capture:!0,passive:!1},h={cancel:l,completed:s,getPhase:n},y=go(window,cFe(h),p),_=go(window,lFe(h),p);r.current=function(){y(),_()}},[l,n,s]),u=lt(function(){var p=n();p.type!=="PENDING"&&Ge(!1);var h=p.actions.fluidLift(p.point);o({type:"DRAGGING",actions:h,hasMoved:!1})},[n,o]),f=lt(function(p,h){n().type!=="IDLE"&&Ge(!1);var y=setTimeout(u,aFe);o({type:"PENDING",point:h,actions:p,longPressTimerId:y}),c()},[c,n,o,u]);qn(function(){return a(),function(){r.current();var h=n();h.type==="PENDING"&&(clearTimeout(h.longPressTimerId),o(i5))}},[n,a,o]),qn(function(){var p=go(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return p},[])}var fFe={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function pY(e,t){if(t==null)return!1;var r=!!fFe[t.tagName.toLowerCase()];if(r)return!0;var n=t.getAttribute("contenteditable");return n==="true"||n===""?!0:t===e?!1:pY(e,t.parentElement)}function dFe(e,t){var r=t.target;return Nb(r)?pY(e,r):!1}var pFe=function(e){return Ho(e.getBoundingClientRect()).center};function hFe(e){return e instanceof lY(e).Element}var vFe=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],r=Js(t,function(n){return n in Element.prototype});return r||e}();function hY(e,t){return e==null?null:e[vFe](t)?e:hY(e.parentElement,t)}function gFe(e,t){return e.closest?e.closest(t):hY(e,t)}function mFe(e){return"["+Nu.contextId+'="'+e+'"]'}function yFe(e,t){var r=t.target;if(!hFe(r))return null;var n=mFe(e),o=gFe(r,n);return!o||!Nb(o)?null:o}function bFe(e,t){var r=yFe(e,t);return r?r.getAttribute(Nu.draggableId):null}function wFe(e,t){var r="["+Kx.contextId+'="'+e+'"]',n=IK(document.querySelectorAll(r)),o=Js(n,function(i){return i.getAttribute(Kx.id)===t});return!o||!Nb(o)?null:o}function xFe(e){e.preventDefault()}function K0(e){var t=e.expected,r=e.phase,n=e.isLockActive;return e.shouldWarn,!(!n()||t!==r)}function vY(e){var t=e.lockAPI,r=e.store,n=e.registry,o=e.draggableId;if(t.isClaimed())return!1;var i=n.draggable.findById(o);return!(!i||!i.options.isEnabled||!oY(r.getState(),o))}function _Fe(e){var t=e.lockAPI,r=e.contextId,n=e.store,o=e.registry,i=e.draggableId,a=e.forceSensorStop,s=e.sourceEvent,l=vY({lockAPI:t,store:n,registry:o,draggableId:i});if(!l)return null;var c=o.draggable.getById(i),u=wFe(r,c.descriptor.id);if(!u||s&&!c.options.canDragInteractiveElements&&dFe(u,s))return null;var f=t.claim(a||ks),d="PRE_DRAG";function p(){return c.options.shouldRespectForcePress}function h(){return t.isActive(f)}function y($,g){K0({expected:$,phase:d,isLockActive:h,shouldWarn:!0})&&n.dispatch(g())}var _=y.bind(null,"DRAGGING");function b($){function g(){t.release(),d="COMPLETED"}d!=="PRE_DRAG"&&(g(),d!=="PRE_DRAG"&&Ge(!1)),n.dispatch(vRe($.liftActionArgs)),d="DRAGGING";function N(V,K){if(K===void 0&&(K={shouldBlockNextClick:!1}),$.cleanup(),K.shouldBlockNextClick){var W=go(window,[{eventName:"click",fn:xFe,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(W)}g(),n.dispatch(ZK({reason:V}))}return Ze({isActive:function(){return K0({expected:"DRAGGING",phase:d,isLockActive:h,shouldWarn:!1})},shouldRespectForcePress:p,drop:function(K){return N("DROP",K)},cancel:function(K){return N("CANCEL",K)}},$.actions)}function m($){var g=Dp(function(V){_(function(){return XK({client:V})})}),N=b({liftActionArgs:{id:i,clientSelection:$,movementMode:"FLUID"},cleanup:function(){return g.cancel()},actions:{move:g}});return Ze({},N,{move:g})}function E(){var $={moveUp:function(){return _(SRe)},moveRight:function(){return _(PRe)},moveDown:function(){return _(CRe)},moveLeft:function(){return _(ORe)}};return b({liftActionArgs:{id:i,clientSelection:pFe(u),movementMode:"SNAP"},cleanup:ks,actions:$})}function A(){var $=K0({expected:"PRE_DRAG",phase:d,isLockActive:h,shouldWarn:!0});$&&t.release()}var D={isActive:function(){return K0({expected:"PRE_DRAG",phase:d,isLockActive:h,shouldWarn:!1})},shouldRespectForcePress:p,fluidLift:m,snapLift:E,abort:A};return D}var EFe=[tFe,iFe,uFe];function SFe(e){var t=e.contextId,r=e.store,n=e.registry,o=e.customSensors,i=e.enableDefaultSensors,a=[].concat(i?EFe:[],o||[]),s=I.useState(function(){return zNe()})[0],l=lt(function(m,E){m.isDragging&&!E.isDragging&&s.tryAbandon()},[s]);qn(function(){var m=r.getState(),E=r.subscribe(function(){var A=r.getState();l(m,A),m=A});return E},[s,r,l]),qn(function(){return s.tryAbandon},[s.tryAbandon]);for(var c=lt(function(b){return vY({lockAPI:s,registry:n,store:r,draggableId:b})},[s,n,r]),u=lt(function(b,m,E){return _Fe({lockAPI:s,registry:n,contextId:t,store:r,draggableId:b,forceSensorStop:m,sourceEvent:E&&E.sourceEvent?E.sourceEvent:null})},[t,s,n,r]),f=lt(function(b){return bFe(t,b)},[t]),d=lt(function(b){var m=n.draggable.findById(b);return m?m.options:null},[n.draggable]),p=lt(function(){s.isClaimed()&&(s.tryAbandon(),r.getState().phase!=="IDLE"&&r.dispatch(q8()))},[s,r]),h=lt(s.isClaimed,[s]),y=Pt(function(){return{canGetLock:c,tryGetLock:u,findClosestDraggableId:f,findOptionsForDraggable:d,tryReleaseLock:p,isLockClaimed:h}},[c,u,f,d,p,h]),_=0;_r.name!==e)))}function CY(e){return ff().find(r=>r.name===e)!==void 0}function PY(e){return At.isHexString(e)&&e.length===66}function xBe(e){return At.isHexString(e)&&e.length===128}function jb(e){const t=e.pubkeys.map(i=>{const a=At.hexToBinUnsafe(i.pubkey);return Xy.blake2b(a,void 0,32)}),r=e.pubkeys.length,n=[Uint8Array.from([1]),At.encodeI256(BigInt(r))].concat(t).concat([At.encodeI256(BigInt(e.mOfN))]),o=Uint8Array.from(n.reduce((i,a)=>Uint8Array.from([...i,...a]),new Uint8Array));return At.bs58.encode(o)}function OY(){return ff()}function AY(e){const t=ff().find(r=>r.name===e);if(t===void 0)throw new Error(`The multisig ${e} does not exist`);return t}function _Be(e){const t=Eh(),[r,n]=I.useState();return I.useEffect(()=>{e!==void 0&&t.addresses.getAddressesAddressBalance(e).then(n).catch(o=>{console.error(`Get balance error: ${o}`)})},[e]),r}function EBe(e){return e===void 0?"":At.prettifyAttoAlphAmount(BigInt(e.balance))}async function SBe(e,t,r){const n=await e.addresses.getAddressesAddressBalance(t),o=BigInt(n.balance)-BigInt(n.lockedBalance);if(o<=r){const i=At.prettifyAttoAlphAmount(r),a=At.prettifyAttoAlphAmount(o);throw new Error(`Not enough balance, expect ${i} ALPH, got ${a} ALPH`)}}async function CBe(e,t,r,n){const o=AY(t);if(r.length!==o.mOfN)throw new Error(`Please select ${o.mOfN} signers`);const i=r.map(l=>o.pubkeys.find(c=>c.name===l).pubkey);let a=0n;const s=n.map(l=>{const c=At.convertAlphAmountWithDecimals(l.alphAmount);return a+=c,{address:l.address,attoAlphAmount:c.toString()}});return await SBe(e,o.address,a),await e.multisig.postMultisigBuild({fromAddress:o.address,fromPublicKeys:i,destinations:s})}async function PBe(e,t){const r=await e.getSelectedAccount(),{signature:n}=await e.signUnsignedTx({signerAddress:r.address,signerKeyType:r.keyType,unsignedTx:t});return{signer:r.publicKey,signature:n}}async function OBe(e,t,r,n,o){const i=AY(t);if(o.length!==i.mOfN)throw new Error(`Expect ${i.mOfN} signatures`);const a=At.binToHex(Xy.blake2b(At.hexToBinUnsafe(n),void 0,32)),s=o.map(c=>{const u=i.pubkeys.find(f=>f.name===c.name).pubkey;return{name:c.name,pubkey:u,signature:c.signature}}),l=Array(i.pubkeys.length).fill("");return s.forEach(c=>{const u=i.pubkeys.findIndex(f=>f.pubkey===c.pubkey);if(u===-1)throw new Error(`Unknown signer: ${c.name}`);if(ABe(i,r,a,c,c.signature),l[u]!=="")throw new Error(`Duplicate signature from signer ${c.name}`);l[u]=c.signature}),await e.multisig.postMultisigSubmit({unsignedTx:n,signatures:l.filter(c=>c!=="")})}function ABe(e,t,r,n,o){if(At.verifySignature(r,n.pubkey,o))return;throw t.map(a=>e.pubkeys.find(s=>s.name===a)).forEach(a=>{if(a.pubkey!==n.pubkey&&At.verifySignature(r,a.pubkey,o))throw new Error(`The signature ${mT(o)} is from ${a.name}, not ${n.name}`)}),new Error(`Invalid signature ${mT(o)}`)}function mT(e){return`${e.slice(0,6)}...${e.slice(-6)}`}async function kY(e,t,r=30){try{await e.transactions.getTransactionsTransactionHash(t);return}catch(n){if(console.error(`Get transaction status error: ${n}`),r===0)throw n}await new Promise(n=>setTimeout(n,4e3)),await kY(e,t,r-1)}function kBe(e){const t={...e};delete t.address;const r=JSON.stringify(t),n=At.binToHex(Xy.blake2b(r,void 0,32));return btoa(r+n)}function IBe(e){const t=atob(e);if(t.length<=64)throw new Error("Invalid config");const r=t.length-64,n=t.slice(r),o=t.slice(0,r),i=At.binToHex(Xy.blake2b(o,void 0,32));if(n!==i)throw new Error("Invalid config hash");return $Be(JSON.parse(o))}function $Be(e){const t=e.name;if(t===void 0||t==="")throw new Error("Invalid config name");if(CY(t))throw new Error("The multisig already exists");const r=e.pubkeys;if(r===void 0||!Array.isArray(r))throw new Error("Expected a non-empty pubkey array");const n=r.length;if(n===0)throw new Error("The pubkey list is empty");r.forEach((i,a)=>{const s=i.name;if(s===void 0||s==="")throw new Error(`Invalid name in the pubkeys list, index: ${a}`);const l=i.pubkey;if(l===void 0||!PY(l))throw new Error(`Invalid pubkey in the pubkeys list, index: ${a}`)});const o=e.mOfN;if(o===void 0||typeof o!="number")throw new Error("Invalid mOfN");if(o<1||o>n)throw new Error("Invalid value of mOfN");return e}function yT(e){const t=e.indexOf("."),r=e.lastIndexOf(".");return parseInt(e.slice(t+1,r))}function TBe(){const e=sK({validateInputOnChange:[`pubkeys.${Ld}.pubkey`],initialValues:_Y,validate:{name:i=>i===""?"Empty name":CY(i)?"The multisig already exists":null,pubkeys:{pubkey:(i,a,s)=>{if(i==="")return"Empty public key";if(!PY(i))return"Invalid public key";const l=a.pubkeys.findIndex(c=>c.pubkey===i);return yT(s)!==l?"Duplicate public key":null},name:(i,a,s)=>{if(i==="")return"Empty name";const l=a.pubkeys.findIndex(c=>c.name===i);return yT(s)!==l?"Duplicate name":null}}}}),t=I.useRef(),r=rh();I.useEffect(()=>{const i=window.localStorage.getItem(k1);if(i)try{e.setValues(JSON.parse(i))}catch{console.log("Failed to parse stored value")}},[]),I.useEffect(()=>{window.localStorage.setItem(k1,JSON.stringify(e.values))},[e.values]),I.useEffect(()=>{e.values.pubkeys.lengthe.onSubmit(i=>{const a={...i,address:jb(i)};window.localStorage.setItem(k1,JSON.stringify(a)),SY(a),yBe(),r("/multisig/show?name="+i.name)}),[e,r]),o=e.values.pubkeys.map((i,a)=>j.jsx(dBe,{index:a,draggableId:a.toString(),children:s=>j.jsxs(Kt,{position:"apart",spacing:"xl",ref:s.innerRef,mt:"xs",...s.draggableProps,children:[j.jsx(wy,{...s.dragHandleProps,children:j.jsx(kme,{size:"1.2rem"})}),j.jsx(Es,{radius:"md",placeholder:"Name",ta:"left",...e.getInputProps(`pubkeys.${a}.name`)}),j.jsx(Es,{radius:"md",placeholder:"Public Key",w:"32rem",ta:"left",...e.getInputProps(`pubkeys.${a}.pubkey`)}),j.jsx(eh,{label:"Remove Signer",disabled:e.values.pubkeys.length===1,children:j.jsx(Dme,{size:"1.2rem",onClick:()=>e.values.pubkeys.length!==1&&e.removeListItem("pubkeys",a)})})]})},a));return j.jsx(rt,{maw:900,mx:"auto",mt:"5rem",children:j.jsxs("form",{onSubmit:n,children:[j.jsxs(Kt,{position:"center",children:[j.jsx(St,{fw:"700",size:"xl",children:"Choose a Name"}),j.jsx(Es,{placeholder:"Multisig Name",ta:"left",size:"md",...e.getInputProps("name")})]}),j.jsxs(ou,{mt:"2rem",px:"2rem",py:"1.5rem",children:[j.jsx(St,{ta:"left",fw:"700",children:"Signers"}),j.jsx(kFe,{onDragEnd:({destination:i,source:a})=>e.reorderListItem("pubkeys",{from:a.index,to:i.index}),children:j.jsx(xY,{droppableId:"dnd-list",direction:"vertical",children:i=>j.jsxs("div",{...i.droppableProps,ref:i.innerRef,children:[o,i.placeholder]})})}),j.jsxs(Kt,{position:"apart",mt:"lg",children:[j.jsx(xr,{variant:"light",radius:"md",onClick:()=>e.reset(),children:"Reset Signers"}),j.jsx(xr,{variant:"light",radius:"md",onClick:()=>e.insertListItem("pubkeys",{name:"",pubkey:""}),children:"Add Signer"})]})]}),j.jsxs(ou,{mt:"xl",px:"2rem",py:"1.5rem",children:[j.jsx(St,{weight:700,ta:"left",children:"Signatures Required"}),j.jsxs(Kt,{position:"apart",children:[j.jsx(fL,{mt:me("2.5rem"),w:"70%",pb:"md",px:"md",min:0,max:e.values.pubkeys.length,step:1,value:e.values.mOfN,label:i=>`${i} of ${e.values.pubkeys.length}`,labelAlwaysOn:!0,thumbSize:1,styles:i=>({label:{backgroundColor:i.colorScheme==="dark"?i.colors.dark[3]:i.colors.blue[3]}})}),j.jsxs(Kt,{spacing:5,mt:"md",children:[j.jsx(pv,{size:36,variant:"default",onClick:()=>t.current.decrement(),children:"–"}),j.jsx(M_,{hideControls:!0,value:e.values.mOfN,size:"xs",onChange:i=>e.setValues({mOfN:i!==""?i:1}),handlersRef:t,max:e.values.pubkeys.length,min:1,step:1,styles:{input:{width:me(54),textAlign:"center"}}}),j.jsx(pv,{size:36,variant:"default",onClick:()=>t.current.increment(),children:"+"})]})]})]}),j.jsx(Kt,{position:"right",mt:"xl",mx:"lg",children:j.jsx(xr,{type:"submit",children:"Create Multisig"})})]})})}function DBe(){const[e,t]=I.useState(),[r,n]=I.useState(),o=rh(),i=I.useCallback(()=>{r!==void 0&&(SY({...r,address:jb(r)}),o("/multisig/show?name="+r.name))},[r,o]),a=I.useCallback(s=>{if(t(void 0),s===""){t("Please input the configuration");return}try{n(IBe(s))}catch(l){t(`${l}`)}},[n,t]);return j.jsxs(rt,{maw:800,mx:"auto",mt:"5rem",children:[j.jsx(St,{ta:"left",fw:"700",size:"xl",children:"Multisig Configuration"}),j.jsx(Ci.Description,{ta:"left",size:"md",children:"You can import the multisig configuration shared by the creator of the multisig address."}),j.jsx(D_,{placeholder:"Paste the configuration here",minRows:8,mt:"lg",onChange:s=>a(s.target.value)}),e?j.jsx(St,{color:"red",mt:"md",ta:"right",children:e}):null,j.jsxs(Kt,{position:"right",mt:"lg",children:[j.jsx("div",{style:{flex:1}}),j.jsx(xr,{onClick:i,disabled:e!==void 0||r===void 0,children:"Import Multisig"})]})]})}function MBe(){const e=OY(),t=Wu(),r=new URLSearchParams(t.search),n=r.get("name");if(console.log(t.search,r,n),n){const o=e.find(i=>i.name===n);return o===void 0?[e,n,void 0]:[e,n,o]}else return[e,void 0,void 0]}function RBe(){const[e,t,r]=MBe(),[n,{open:o,close:i}]=_R(!1),a=D8(),s=rh();return j.jsxs(rt,{maw:850,mx:"auto",mt:"5rem",ta:"left",children:[j.jsxs(Kt,{position:"center",children:[j.jsx(St,{fw:"700",size:"xl",children:"Select Multisig"}),j.jsx(R_,{size:"md",placeholder:"Pick one",data:e.map(l=>({value:l.name,label:l.name})),value:t,onChange:l=>s("/multisig/show?name="+l)})]}),j.jsxs($a,{opened:n,onClose:i,withCloseButton:!1,styles:{inner:{right:0}},children:[j.jsxs(oN,{icon:j.jsx(xme,{size:"1rem"}),title:"Attention!",color:"red",mt:"lg",children:["This action will remove multisig ",j.jsx(T_,{children:t})," from your browser. You will need to re-import the configuration to use it again."]}),j.jsx(Kt,{position:"center",mt:"lg",children:j.jsx(xr,{color:"red",onClick:()=>{i(),t&&(wBe(t),s("/multisig/show"))},children:"Confirm"})})]}),t&&r&&j.jsxs(rt,{mx:"auto",mt:"2rem",w:"100%",children:[j.jsx(Ab,{data:{Address:j.jsx(Kt,{position:"center",mx:"auto",children:j.jsx(As,{value:jb(r)})}),"Number of Signers":r.pubkeys.length,"Required Signers":r.mOfN,Signers:j.jsx(_s,{children:r.pubkeys.map(({name:l,pubkey:c})=>{const u=At.addressFromPublicKey(c);return[j.jsx(_s.Col,{span:2,children:j.jsx(Ey,{h:"100%",children:j.jsxs(St,{fw:"450",my:"auto",ta:"right",children:[l,":"]})})},l),j.jsx(_s.Col,{span:10,children:j.jsx(As,{value:u,color:(a==null?void 0:a.account.address)===u?"yellow":void 0})},c)]})})}}),j.jsxs(Kt,{position:"apart",mt:"2rem",mx:"lg",children:[j.jsx(xr,{onClick:o,children:"Remove"}),j.jsx(xy,{value:kBe(r),timeout:1e3,children:({copied:l,copy:c})=>j.jsx(eh,{label:l?"Copied":null,opened:l,withArrow:!0,children:j.jsx(xr,{onClick:c,children:"Export"})})})]})]})]})}function NBe(){const[e,t]=I.useState(),[r,n]=I.useState(),[o,i]=I.useState(!1),[a,s]=I.useState(),[l,c]=I.useState(),[u,f]=I.useState(),d=D8(),[p,h]=I.useState(),y=Eh(),_=I.useCallback(async D=>{try{if(i(!0),!At.isHexString(D))throw new Error("Invalid unsigned tx");const $=await jBe(y,D),g=BBe($.unsignedTx.inputs[0].unlockScript),N=$.unsignedTx.fixedOutputs[0],V=FBe(g);c(g),s(V),f({recipient:N.address,amount:At.prettifyAttoAlphAmount(BigInt(N.attoAlphAmount)),fee:At.prettifyAttoAlphAmount(BigInt($.unsignedTx.gasPrice)*BigInt($.unsignedTx.gasAmount)),txId:$.unsignedTx.txId}),i(!1),h(void 0)}catch($){i(!1),h(`Error: ${$}`),console.error($)}},[s,i]),[b,m]=I.useState();I.useEffect(()=>{m(void 0)},[d]);const E=I.useCallback(async()=>{try{if(r===void 0||!At.isHexString(r))throw new Error("Invalid unsigned tx");if(d===void 0)throw new Error("Wallet is not connected");if(l!==void 0&&l.find($=>$.pubkey===d.account.publicKey)===void 0)throw new Error("The currently connected account is not the expected signer");const D=await PBe(d.signer,r);t(D)}catch(D){m(`Error: ${D}`),console.error(D)}},[d,r,t,l]),A=I.useCallback(()=>{i(!1),t(void 0),s(void 0),f(void 0),h(void 0),m(void 0),c(void 0)},[i,t,s]);return j.jsxs(rt,{maw:900,mx:"auto",mt:"5rem",children:[j.jsx(St,{ta:"left",fw:"700",size:"xl",children:"Transaction to sign"}),j.jsx(Ci.Description,{ta:"left",size:"md",children:"The transaction must be created by the multisig address."}),j.jsx(D_,{placeholder:"Paste your multisig transaction here",minRows:6,mt:"md",onChange:D=>{A(),D.target.value===""?n(void 0):(n(D.target.value),_(D.target.value))},styles:{input:{color:"gray",opacity:.9}}}),p?j.jsx(St,{color:"red",mt:"md",mx:"lg",ta:"left",children:p}):o||!r?null:j.jsxs(rt,{mt:"xl",children:[j.jsx(St,{ta:"left",fw:"700",mb:"lg",children:"Transaction Details"}),j.jsx(Ab,{px:0,py:0,verticalSpacing:"sm",data:{Multisig:a?j.jsx(c3,{href:`/alephium-toolkit/#/multisig/show?name=${a.name}`,target:"_blank",children:a.name}):j.jsx(T_,{color:"red",children:"unknown"}),Recipient:j.jsx(As,{value:(u==null?void 0:u.recipient)??""}),"ALPH Amount":(u==null?void 0:u.amount)+" ALPH","Transaction fee":(u==null?void 0:u.fee)+" ALPH","Tx Hash":j.jsx(As,{value:(u==null?void 0:u.txId)??""})}})]}),b&&j.jsx(St,{color:"red",mt:"md",mx:"lg",ta:"left",children:b}),e?j.jsxs(rt,{children:[j.jsx(St,{ta:"left",fw:"700",mt:"xl",children:"Copy and share the signature:"}),j.jsx(Kt,{position:"apart",mt:"md",children:j.jsx(As,{value:e.signature})})]}):j.jsx(Kt,{position:"right",mt:"xl",mx:"md",children:j.jsx(xr,{disabled:o||!!p||!r,onClick:E,children:"Sign Transaction"})})]})}function FBe(e){const t=e[e.length-1].index;return ff().find(n=>n.mOfN!==e.length||n.pubkeys.lengthn.pubkeys[i].pubkey===o))}function BBe(e){if(!e.startsWith("01"))throw new Error("Invalid p2mpk unlock script");const t=[],r=parseInt(e.slice(2,4),16);let n=4;for(let o=0;oi.unlockScript===n))throw new Error("Invalid unsigned tx, the input from different address");return r}function LBe(){const e=sK({validateInputOnChange:[`destinations.${Ld}.address`,`destinations.${Ld}.alphAmount`,`signatures.${Ld}.signature`],initialValues:EY,validate:{multisig:D=>D===""?"Please select multisig":null,destinations:{address:D=>D===""?"Empty address":At.isBase58(D)?null:"Invalid address",alphAmount:D=>{if(D==="")return"Empty amount";const $=At.convertAlphAmountWithDecimals(D);return $===void 0||$<=0n?"Invalid amount":null}},signatures:{signature:D=>xBe(D)?null:"Invalid signature"}}}),t=OY(),[r,n]=I.useState(),o=Eh(),i=bTe(),[a,s]=I.useState(),l=_Be(a);I.useEffect(()=>{if(e.values.multisig==="")s(void 0);else{const D=t.find($=>$.name===e.values.multisig);D!==void 0&&s(jb(D))}},[e.values.multisig,t]);const[c,u]=I.useState(),f=I.useCallback(D=>{const $=e.getInputProps(D);return{...$,onChange:N=>{$.onChange(N),u(void 0)}}},[e,u]),d=I.useCallback(async()=>{try{if(e.values.destinations.some((g,N)=>{const V=e.validateField(`destinations.${N}.address`),K=e.validateField(`destinations.${N}.alphAmount`);return V.hasError||K.hasError}))throw new Error("Invalid destinations");const $=await CBe(o,e.values.multisig,e.values.signers,e.values.destinations);u(void 0),console.log(`Build multisig tx result: ${JSON.stringify($)}`),e.setValues({unsignedTx:$.unsignedTx,step:1})}catch(D){u(`Error in build multisig tx: ${D}`),console.error(D)}},[e]),[p,h]=I.useState(!1),[y,_]=I.useState(),b=I.useCallback(async()=>{try{if(e.values.unsignedTx===void 0)throw new Error("There is no unsigned tx");if(e.values.signatures.some((g,N)=>e.validateField(`signatures.${N}.signature`).hasError))throw new Error("Invalid signatures");const $=await OBe(o,e.values.multisig,e.values.signers,e.values.unsignedTx,e.values.signatures);console.log(`Submit multisig tx result: ${JSON.stringify($)}`),n($),e.setValues({step:3}),await kY(i,$.txId),h(!0),_(void 0),bBe()}catch(D){_(`Error in tx submission: ${D}`),console.error(D)}},[e,n]),m=wTe(),E=I.useMemo(()=>{if(e.values.multisig!=="")return t.find(D=>D.name===e.values.multisig)},[e.values.multisig,t]);I.useEffect(()=>{const D=window.localStorage.getItem(Xx);if(D)try{e.setValues(JSON.parse(D))}catch{console.log("Failed to parse stored value")}},[]),I.useEffect(()=>{window.localStorage.setItem(Xx,JSON.stringify(e.values))},[e.values]);const A=I.useCallback(()=>{e.reset(),u(void 0)},[e,u]);return j.jsx(rt,{maw:1200,mx:"auto",mt:"5rem",children:j.jsxs(_s,{columns:13,children:[j.jsx(_s.Col,{span:9,children:e.values.step===0?j.jsxs(rt,{mx:"auto",mt:"xl",ta:"left",children:[j.jsx(R_,{w:"20rem",mx:"auto",size:"md",placeholder:"Select Multisig",data:t.map(D=>({value:D.name,label:D.name})),value:e.values.multisig,onChange:D=>{A(),e.setValues({multisig:D??""})}}),E&&j.jsxs(j.Fragment,{children:[j.jsxs(ou,{mx:"xl",mt:"xl",children:[j.jsxs(St,{ta:"left",fw:"700",children:["Select ",E.mOfN,"-of-",E.pubkeys.length," Signers"]}),j.jsx(Qv.Group,{multiple:!0,onChange:D=>{const $=D.sort((N,V)=>{const K=E.pubkeys.findIndex(P=>P.name===N),W=E.pubkeys.findIndex(P=>P.name===V);return console.log(K,W),K-W}),g=$.map(N=>({name:N,signature:""}));e.setValues({signers:$,signatures:g})},children:j.jsxs(Kt,{position:"center",mt:"lg",children:[...E.pubkeys.map(D=>j.jsx(Qv,{value:D.name,variant:"light",radius:"xl",checked:e.values.signers.includes(D.name),disabled:e.values.signers.length>=E.mOfN&&!e.values.signers.includes(D.name),style:{marginRight:"0.5rem",marginBottom:"0.5rem"},children:D.name}))]})})]}),j.jsxs(ou,{mx:"xl",mt:"xl",children:[j.jsx(St,{ta:"left",fw:"700",children:"Send Assets"}),j.jsxs(Kt,{mt:"lg",position:"apart",mx:"0.5rem",children:[j.jsx(Es,{label:"Recipient",ta:"left",placeholder:"Address",icon:j.jsx(_me,{size:"1.25rem"}),...e.getInputProps("destinations.0.address"),w:"28rem"}),j.jsx(M_,{label:`Balance: ${EBe(l)}`,ta:"left",precision:6,placeholder:"Amount",hideControls:!0,rightSection:"ALPH",rightSectionWidth:"4rem",...f("destinations.0.alphAmount")})]})]}),c&&j.jsx(St,{color:"red",mt:"lg",mx:"lg",children:c}),j.jsxs(Kt,{mt:"lg",position:"apart",mx:"2rem",children:[j.jsx(xr,{onClick:A,children:"Reset"}),j.jsx(xr,{onClick:d,children:"Build Transaction"})]})]})]}):e.values.step===1?j.jsxs(rt,{maw:800,mx:"lg",mt:"xl",ta:"left",children:[j.jsx(St,{fw:"700",size:"lg",children:"Copy and share the transaction to signers"}),j.jsxs(Ci.Description,{ta:"left",size:"md",children:["Signers should paste the transaction on the page"," ",j.jsx(c3,{href:"/alephium-toolkit/#/multisig/sign-tx",target:"_blank",children:"sign-tx"})]}),j.jsx(hL,{h:"lg"}),j.jsx(As,{value:e.values.unsignedTx??""}),j.jsxs(Kt,{mt:"xl",position:"apart",mx:"lg",children:[j.jsx(xr,{onClick:()=>{e.setValues({step:0})},children:"Back"}),j.jsx(xr,{onClick:()=>{e.setValues({step:2})},children:"Next"})]})]}):e.values.step===2?j.jsxs(rt,{mx:"auto",mt:"xl",ta:"left",children:[j.jsxs(ou,{mx:"lg",children:[j.jsx(St,{ta:"left",fw:"700",children:"Signatures"}),e.values.signers.map((D,$)=>j.jsxs(Kt,{position:"apart",mt:"md",mx:"5rem",children:[j.jsxs(St,{children:[D,":"]}),j.jsx(Es,{w:"32rem",placeholder:"Signature",...e.getInputProps(`signatures.${$}.signature`)})]},D))]}),y&&j.jsx(St,{color:"red",mt:"lg",mx:"lg",children:y}),j.jsxs(Kt,{mt:"xl",position:"apart",mx:"2rem",children:[j.jsx(xr,{onClick:()=>{e.setValues({step:1})},children:"Back"}),j.jsx(xr,{onClick:b,children:"Submit"})]})]}):j.jsxs(rt,{maw:900,mx:"auto",mt:"xl",ta:"left",children:[j.jsx(Kt,{position:"center",mt:"lg",children:p?j.jsx(Zj,{sections:[{value:100,color:"teal"}],size:16*20,thickness:16*2,label:j.jsx(wy,{children:j.jsx(N_,{color:"teal",variant:"light",radius:"xl",size:"xl",children:j.jsx(Sme,{size:42})})})}):j.jsx(pu,{color:"teal",size:"16rem"})}),p&&j.jsxs(Ey,{mt:"lg",mx:"2rem",children:[j.jsx(St,{fw:400,fz:"1.5rem",ta:"center",children:"Transaction Submitted"}),j.jsx(c3,{href:`${m}/transactions/${r==null?void 0:r.txId}`,target:"_blank",mx:"auto",children:"View on Explorer"}),j.jsx(xr,{mx:"auto",onClick:()=>{A(),e.setValues({step:0})},children:"Create more transactions"})]})]})}),j.jsx(_s.Col,{offset:1,span:3,children:j.jsx(rt,{maw:400,mx:"auto",mt:"2.5rem",ta:"left",children:j.jsxs(rs,{active:e.values.step,onStepClick:D=>e.setValues({step:D}),orientation:"vertical",allowNextStepsSelect:!1,children:[j.jsx(rs.Step,{label:"Create",description:"Create a new transaction",allowStepSelect:e.values.step!==3&&e.values.step>0}),j.jsx(rs.Step,{label:"Sign",description:"Share the transaction to all signers for signatures",allowStepSelect:e.values.step!==3&&e.values.step>1}),j.jsx(rs.Step,{label:"Submit",description:"Aggregate all signatures and submit the transaction",allowStepSelect:e.values.step!==3&&e.values.step>2}),j.jsx(rs.Step,{label:"Transaction",description:"Available on the explorer"})]})})})]})})}function zBe(){const e=Lr(),t=Ma(),r=Eh();return I.useEffect(()=>{var n;((n=t.signerProvider)==null?void 0:n.nodeProvider)!==void 0&&At.web3.setCurrentNodeProvider(r)},[t.signerProvider]),j.jsx(ame,{children:j.jsx(PN,{styles:{main:{background:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0]}},navbarOffsetBreakpoint:"sm",asideOffsetBreakpoint:"sm",navbar:j.jsx(jme,{}),footer:j.jsx(_N,{height:60,p:"md",children:j.jsx(St,{fw:"bold",fz:"sm",children:"Powered by BlockFlow, Stateful UTXO, PoLW"})}),header:j.jsx(_Te,{}),children:j.jsxs(eme,{children:[j.jsx(pr,{path:"/",element:j.jsx(PTe,{})}),j.jsx(pr,{path:"/token/all",element:j.jsx(Do,{})}),j.jsx(pr,{path:"/token/info",element:j.jsx(ATe,{})}),j.jsx(pr,{path:"/token/new",element:j.jsx(Do,{})}),j.jsx(pr,{path:"/token/burn",element:j.jsx(Do,{})}),j.jsx(pr,{path:"/nft/all",element:j.jsx(Do,{})}),j.jsx(pr,{path:"/nft/info",element:j.jsx(Do,{})}),j.jsx(pr,{path:"/nft/new-collection",element:j.jsx(Do,{})}),j.jsx(pr,{path:"/nft/burn",element:j.jsx(Do,{})}),j.jsx(pr,{path:"/contract/play",element:j.jsx(Do,{})}),j.jsx(pr,{path:"/contract/info",element:j.jsx(Do,{})}),j.jsx(pr,{path:"/contract/deploy",element:j.jsx(Do,{})}),j.jsx(pr,{path:"/multisig",element:j.jsx(Do,{})}),j.jsx(pr,{path:"/multisig/create",element:j.jsx(TBe,{})}),j.jsx(pr,{path:"/multisig/import",element:j.jsx(DBe,{})}),j.jsx(pr,{path:"/multisig/show",element:j.jsx(RBe,{})}),j.jsx(pr,{path:"/multisig/build-tx",element:j.jsx(LBe,{})}),j.jsx(pr,{path:"/multisig/sign-tx",element:j.jsx(NBe,{})})]})})})}function UBe(){const[e,t]=bR({key:"mantine-color-scheme",defaultValue:"light",getInitialValueInEffect:!1}),[r]=_h(),n=o=>t(o||(e==="dark"?"light":"dark"));return gre([["mod+J",()=>n()]]),j.jsx(U$e,{useTheme:"rounded",network:r,children:j.jsx("div",{className:"App",children:j.jsx(dR,{colorScheme:e,toggleColorScheme:n,children:j.jsx(uR,{withGlobalStyles:!0,withNormalizeCSS:!0,theme:{colorScheme:e},children:j.jsx(aB,{children:j.jsx(zBe,{})})})})})})}l5.createRoot(document.getElementById("root")).render(j.jsx(UBe,{})); diff --git a/assets/index-fa9d29df.js b/assets/index-fa9d29df.js new file mode 100644 index 0000000..f9476c8 --- /dev/null +++ b/assets/index-fa9d29df.js @@ -0,0 +1,2189 @@ +function HY(e,t){for(var r=0;rn[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=r(o);fetch(o.href,i)}})();var Le=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ri(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function jl(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var vT={exports:{}},$m={},gT={exports:{}},_t={};/** + * @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 Dp=Symbol.for("react.element"),VY=Symbol.for("react.portal"),WY=Symbol.for("react.fragment"),qY=Symbol.for("react.strict_mode"),GY=Symbol.for("react.profiler"),KY=Symbol.for("react.provider"),YY=Symbol.for("react.context"),XY=Symbol.for("react.forward_ref"),ZY=Symbol.for("react.suspense"),JY=Symbol.for("react.memo"),QY=Symbol.for("react.lazy"),uE=Symbol.iterator;function eX(e){return e===null||typeof e!="object"?null:(e=uE&&e[uE]||e["@@iterator"],typeof e=="function"?e:null)}var mT={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},yT=Object.assign,bT={};function Mu(e,t,r){this.props=e,this.context=t,this.refs=bT,this.updater=r||mT}Mu.prototype.isReactComponent={};Mu.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")};Mu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function wT(){}wT.prototype=Mu.prototype;function qx(e,t,r){this.props=e,this.context=t,this.refs=bT,this.updater=r||mT}var Gx=qx.prototype=new wT;Gx.constructor=qx;yT(Gx,Mu.prototype);Gx.isPureReactComponent=!0;var fE=Array.isArray,xT=Object.prototype.hasOwnProperty,Kx={current:null},_T={key:!0,ref:!0,__self:!0,__source:!0};function ET(e,t,r){var n,o={},i=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)xT.call(t,n)&&!_T.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(s===1)o.children=r;else if(1>>1,T=j[N];if(0>>1;No(te,E))neo(ce,te)?(j[N]=ce,j[ne]=E,N=ne):(j[N]=te,j[J]=E,N=J);else if(neo(ce,E))j[N]=ce,j[ne]=E,N=ne;else break e}}return U}function o(j,U){var E=j.sortIndex-U.sortIndex;return E!==0?E:j.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,f=null,d=3,p=!1,h=!1,m=!1,_=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(j){for(var U=r(c);U!==null;){if(U.callback===null)n(c);else if(U.startTime<=j)n(c),U.sortIndex=U.expirationTime,t(l,U);else break;U=r(c)}}function I(j){if(m=!1,C(j),!h)if(r(l)!==null)h=!0,B(F);else{var U=r(c);U!==null&&M(I,U.startTime-j)}}function F(j,U){h=!1,m&&(m=!1,w(D),D=-1),p=!0;var E=d;try{for(C(U),f=r(l);f!==null&&(!(f.expirationTime>U)||j&&!V());){var N=f.callback;if(typeof N=="function"){f.callback=null,d=f.priorityLevel;var T=N(f.expirationTime<=U);U=e.unstable_now(),typeof T=="function"?f.callback=T:f===r(l)&&n(l),C(U)}else n(l);f=r(l)}if(f!==null)var q=!0;else{var J=r(c);J!==null&&M(I,J.startTime-U),q=!1}return q}finally{f=null,d=E,p=!1}}var O=!1,g=null,D=-1,H=5,G=-1;function V(){return!(e.unstable_now()-Gj||125N?(j.sortIndex=E,t(c,j),r(l)===null&&j===r(c)&&(m?(w(D),D=-1):m=!0,M(I,E-N))):(j.sortIndex=T,t(l,j),h||p||(h=!0,B(F))),j},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(j){var U=d;return function(){var E=d;d=U;try{return j.apply(this,arguments)}finally{d=E}}}})(OT);PT.exports=OT;var fX=PT.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 AT=$,Gn=fX;function Ue(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),n5=Object.prototype.hasOwnProperty,dX=/^[: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]*$/,pE={},hE={};function pX(e){return n5.call(hE,e)?!0:n5.call(pE,e)?!1:dX.test(e)?hE[e]=!0:(pE[e]=!0,!1)}function hX(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function vX(e,t,r,n){if(t===null||typeof t>"u"||hX(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function wn(e,t,r,n,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var jr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){jr[e]=new wn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];jr[t]=new wn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){jr[e]=new wn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){jr[e]=new wn(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){jr[e]=new wn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){jr[e]=new wn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){jr[e]=new wn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){jr[e]=new wn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){jr[e]=new wn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Xx=/[\-:]([a-z])/g;function Zx(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(Xx,Zx);jr[t]=new wn(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(Xx,Zx);jr[t]=new wn(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(Xx,Zx);jr[t]=new wn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){jr[e]=new wn(e,1,!1,e.toLowerCase(),null,!1,!1)});jr.xlinkHref=new wn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){jr[e]=new wn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Jx(e,t,r,n){var o=jr.hasOwnProperty(t)?jr[t]:null;(o!==null?o.type!==0:n||!(2s||o[a]!==i[s]){var l=` +`+o[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{Nb=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?ed(e):""}function gX(e){switch(e.tag){case 5:return ed(e.type);case 16:return ed("Lazy");case 13:return ed("Suspense");case 19:return ed("SuspenseList");case 0:case 2:case 15:return e=Fb(e.type,!1),e;case 11:return e=Fb(e.type.render,!1),e;case 1:return e=Fb(e.type,!0),e;default:return""}}function s5(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 _c:return"Fragment";case xc:return"Portal";case o5:return"Profiler";case Qx:return"StrictMode";case i5:return"Suspense";case a5:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case $T:return(e.displayName||"Context")+".Consumer";case IT:return(e._context.displayName||"Context")+".Provider";case e6:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case t6:return t=e.displayName||null,t!==null?t:s5(e.type)||"Memo";case Ka:t=e._payload,e=e._init;try{return s5(e(t))}catch{}}return null}function mX(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 s5(t);case 8:return t===Qx?"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 $s(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function DT(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function yX(e){var t=DT(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fh(e){e._valueTracker||(e._valueTracker=yX(e))}function MT(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=DT(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function S1(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 l5(e,t){var r=t.checked;return Qt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function gE(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=$s(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function RT(e,t){t=t.checked,t!=null&&Jx(e,"checked",t,!1)}function c5(e,t){RT(e,t);var r=$s(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?u5(e,t.type,r):t.hasOwnProperty("defaultValue")&&u5(e,t.type,$s(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mE(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function u5(e,t,r){(t!=="number"||S1(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var td=Array.isArray;function zc(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Bh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ud(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var sd={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},bX=["Webkit","ms","Moz","O"];Object.keys(sd).forEach(function(e){bX.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),sd[t]=sd[e]})});function jT(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||sd.hasOwnProperty(e)&&sd[e]?(""+t).trim():t+"px"}function LT(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=jT(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var wX=Qt({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 p5(e,t){if(t){if(wX[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ue(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ue(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ue(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ue(62))}}function h5(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 v5=null;function r6(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var g5=null,Uc=null,Hc=null;function wE(e){if(e=Np(e)){if(typeof g5!="function")throw Error(Ue(280));var t=e.stateNode;t&&(t=Nm(t),g5(e.stateNode,e.type,t))}}function zT(e){Uc?Hc?Hc.push(e):Hc=[e]:Uc=e}function UT(){if(Uc){var e=Uc,t=Hc;if(Hc=Uc=null,wE(e),t)for(e=0;e>>=0,e===0?32:31-($X(e)/TX|0)|0}var jh=64,Lh=4194304;function rd(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 A1(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,a=r&268435455;if(a!==0){var s=a&~o;s!==0?n=rd(s):(i&=a,i!==0&&(n=rd(i)))}else a=r&~o,a!==0?n=rd(a):i!==0&&(n=rd(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&o)&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Mp(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Vo(t),e[t]=r}function NX(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=cd),kE=String.fromCharCode(32),IE=!1;function lD(e,t){switch(e){case"keyup":return uZ.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cD(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ec=!1;function dZ(e,t){switch(e){case"compositionend":return cD(t);case"keypress":return t.which!==32?null:(IE=!0,kE);case"textInput":return e=t.data,e===kE&&IE?null:e;default:return null}}function pZ(e,t){if(Ec)return e==="compositionend"||!u6&&lD(e,t)?(e=aD(),G0=s6=rs=null,Ec=!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:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ME(r)}}function pD(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pD(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function hD(){for(var e=window,t=S1();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=S1(e.document)}return t}function f6(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 _Z(e){var t=hD(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&pD(r.ownerDocument.documentElement,r)){if(n!==null&&f6(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=RE(r,i);var a=RE(r,n);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Sc=null,_5=null,fd=null,E5=!1;function NE(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;E5||Sc==null||Sc!==S1(n)||(n=Sc,"selectionStart"in n&&f6(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),fd&&Kd(fd,n)||(fd=n,n=$1(_5,"onSelect"),0Oc||(e.current=k5[Oc],k5[Oc]=null,Oc--)}function Lt(e,t){Oc++,k5[Oc]=e.current,e.current=t}var Ts={},on=Ls(Ts),On=Ls(!1),kl=Ts;function nu(e,t){var r=e.type.contextTypes;if(!r)return Ts;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function An(e){return e=e.childContextTypes,e!=null}function D1(){Gt(On),Gt(on)}function HE(e,t,r){if(on.current!==Ts)throw Error(Ue(168));Lt(on,t),Lt(On,r)}function ED(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(Ue(108,mX(e)||"Unknown",o));return Qt({},r,n)}function M1(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ts,kl=on.current,Lt(on,e),Lt(On,On.current),!0}function VE(e,t,r){var n=e.stateNode;if(!n)throw Error(Ue(169));r?(e=ED(e,t,kl),n.__reactInternalMemoizedMergedChildContext=e,Gt(On),Gt(on),Lt(on,e)):Gt(On),Lt(On,r)}var ra=null,Fm=!1,Zb=!1;function SD(e){ra===null?ra=[e]:ra.push(e)}function MZ(e){Fm=!0,SD(e)}function zs(){if(!Zb&&ra!==null){Zb=!0;var e=0,t=Tt;try{var r=ra;for(Tt=1;e>=a,o-=a,aa=1<<32-Vo(t)+o|r<D?(H=g,g=null):H=g.sibling;var G=d(w,g,C[D],I);if(G===null){g===null&&(g=H);break}e&&g&&G.alternate===null&&t(w,g),y=i(G,y,D),O===null?F=G:O.sibling=G,O=G,g=H}if(D===C.length)return r(w,g),Yt&&vl(w,D),F;if(g===null){for(;DD?(H=g,g=null):H=g.sibling;var V=d(w,g,G.value,I);if(V===null){g===null&&(g=H);break}e&&g&&V.alternate===null&&t(w,g),y=i(V,y,D),O===null?F=V:O.sibling=V,O=V,g=H}if(G.done)return r(w,g),Yt&&vl(w,D),F;if(g===null){for(;!G.done;D++,G=C.next())G=f(w,G.value,I),G!==null&&(y=i(G,y,D),O===null?F=G:O.sibling=G,O=G);return Yt&&vl(w,D),F}for(g=n(w,g);!G.done;D++,G=C.next())G=p(g,w,D,G.value,I),G!==null&&(e&&G.alternate!==null&&g.delete(G.key===null?D:G.key),y=i(G,y,D),O===null?F=G:O.sibling=G,O=G);return e&&g.forEach(function(P){return t(w,P)}),Yt&&vl(w,D),F}function _(w,y,C,I){if(typeof C=="object"&&C!==null&&C.type===_c&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case Nh:e:{for(var F=C.key,O=y;O!==null;){if(O.key===F){if(F=C.type,F===_c){if(O.tag===7){r(w,O.sibling),y=o(O,C.props.children),y.return=w,w=y;break e}}else if(O.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===Ka&&ZE(F)===O.type){r(w,O.sibling),y=o(O,C.props),y.ref=yf(w,O,C),y.return=w,w=y;break e}r(w,O);break}else t(w,O);O=O.sibling}C.type===_c?(y=Cl(C.props.children,w.mode,I,C.key),y.return=w,w=y):(I=t1(C.type,C.key,C.props,null,w.mode,I),I.ref=yf(w,y,C),I.return=w,w=I)}return a(w);case xc:e:{for(O=C.key;y!==null;){if(y.key===O)if(y.tag===4&&y.stateNode.containerInfo===C.containerInfo&&y.stateNode.implementation===C.implementation){r(w,y.sibling),y=o(y,C.children||[]),y.return=w,w=y;break e}else{r(w,y);break}else t(w,y);y=y.sibling}y=i2(C,w.mode,I),y.return=w,w=y}return a(w);case Ka:return O=C._init,_(w,y,O(C._payload),I)}if(td(C))return h(w,y,C,I);if(pf(C))return m(w,y,C,I);Gh(w,C)}return typeof C=="string"&&C!==""||typeof C=="number"?(C=""+C,y!==null&&y.tag===6?(r(w,y.sibling),y=o(y,C),y.return=w,w=y):(r(w,y),y=o2(C,w.mode,I),y.return=w,w=y),a(w)):r(w,y)}return _}var iu=TD(!0),DD=TD(!1),Fp={},Ei=Ls(Fp),Jd=Ls(Fp),Qd=Ls(Fp);function xl(e){if(e===Fp)throw Error(Ue(174));return e}function w6(e,t){switch(Lt(Qd,t),Lt(Jd,e),Lt(Ei,Fp),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:d5(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=d5(t,e)}Gt(Ei),Lt(Ei,t)}function au(){Gt(Ei),Gt(Jd),Gt(Qd)}function MD(e){xl(Qd.current);var t=xl(Ei.current),r=d5(t,e.type);t!==r&&(Lt(Jd,e),Lt(Ei,r))}function x6(e){Jd.current===e&&(Gt(Ei),Gt(Jd))}var Zt=Ls(0);function L1(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Jb=[];function _6(){for(var e=0;er?r:4,e(!0);var n=Qb.transition;Qb.transition={};try{e(!1),t()}finally{Tt=r,Qb.transition=n}}function XD(){return wo().memoizedState}function BZ(e,t,r){var n=ms(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},ZD(e))JD(t,r);else if(r=AD(e,t,r,n),r!==null){var o=gn();Wo(r,e,n,o),QD(r,t,n)}}function jZ(e,t,r){var n=ms(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(ZD(e))JD(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,r);if(o.hasEagerState=!0,o.eagerState=s,Zo(s,a)){var l=t.interleaved;l===null?(o.next=o,y6(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}r=AD(e,t,o,n),r!==null&&(o=gn(),Wo(r,e,n,o),QD(r,t,n))}}function ZD(e){var t=e.alternate;return e===Jt||t!==null&&t===Jt}function JD(e,t){dd=z1=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function QD(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,o6(e,r)}}var U1={readContext:bo,useCallback:qr,useContext:qr,useEffect:qr,useImperativeHandle:qr,useInsertionEffect:qr,useLayoutEffect:qr,useMemo:qr,useReducer:qr,useRef:qr,useState:qr,useDebugValue:qr,useDeferredValue:qr,useTransition:qr,useMutableSource:qr,useSyncExternalStore:qr,useId:qr,unstable_isNewReconciler:!1},LZ={readContext:bo,useCallback:function(e,t){return pi().memoizedState=[e,t===void 0?null:t],e},useContext:bo,useEffect:QE,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Z0(4194308,4,WD.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Z0(4194308,4,e,t)},useInsertionEffect:function(e,t){return Z0(4,2,e,t)},useMemo:function(e,t){var r=pi();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=pi();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=BZ.bind(null,Jt,e),[n.memoizedState,e]},useRef:function(e){var t=pi();return e={current:e},t.memoizedState=e},useState:JE,useDebugValue:O6,useDeferredValue:function(e){return pi().memoizedState=e},useTransition:function(){var e=JE(!1),t=e[0];return e=FZ.bind(null,e[1]),pi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Jt,o=pi();if(Yt){if(r===void 0)throw Error(Ue(407));r=r()}else{if(r=t(),Er===null)throw Error(Ue(349));$l&30||FD(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,QE(jD.bind(null,n,i,e),[e]),n.flags|=2048,rp(9,BD.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=pi(),t=Er.identifierPrefix;if(Yt){var r=sa,n=aa;r=(n&~(1<<32-Vo(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=ep++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[yi]=t,e[Zd]=n,lM(e,t,!1,!1),t.stateNode=e;e:{switch(a=h5(r,n),r){case"dialog":Wt("cancel",e),Wt("close",e),o=n;break;case"iframe":case"object":case"embed":Wt("load",e),o=n;break;case"video":case"audio":for(o=0;olu&&(t.flags|=128,n=!0,bf(i,!1),t.lanes=4194304)}else{if(!n)if(e=L1(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),bf(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Yt)return Gr(t),null}else 2*ar()-i.renderingStartTime>lu&&r!==1073741824&&(t.flags|=128,n=!0,bf(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(r=i.last,r!==null?r.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ar(),t.sibling=null,r=Zt.current,Lt(Zt,n?r&1|2:r&1),t):(Gr(t),null);case 22:case 23:return D6(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?jn&1073741824&&(Gr(t),t.subtreeFlags&6&&(t.flags|=8192)):Gr(t),null;case 24:return null;case 25:return null}throw Error(Ue(156,t.tag))}function KZ(e,t){switch(p6(t),t.tag){case 1:return An(t.type)&&D1(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return au(),Gt(On),Gt(on),_6(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return x6(t),null;case 13:if(Gt(Zt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ue(340));ou()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Gt(Zt),null;case 4:return au(),null;case 10:return m6(t.type._context),null;case 22:case 23:return D6(),null;case 24:return null;default:return null}}var Yh=!1,Qr=!1,YZ=typeof WeakSet=="function"?WeakSet:Set,ot=null;function $c(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){rr(e,t,n)}else r.current=null}function z5(e,t,r){try{r()}catch(n){rr(e,t,n)}}var lS=!1;function XZ(e,t){if(S5=k1,e=hD(),f6(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,s=-1,l=-1,c=0,u=0,f=e,d=null;t:for(;;){for(var p;f!==r||o!==0&&f.nodeType!==3||(s=a+o),f!==i||n!==0&&f.nodeType!==3||(l=a+n),f.nodeType===3&&(a+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===r&&++c===o&&(s=a),d===i&&++u===n&&(l=a),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(C5={focusedElem:e,selectionRange:r},k1=!1,ot=t;ot!==null;)if(t=ot,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ot=e;else for(;ot!==null;){t=ot;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,_=h.memoizedState,w=t.stateNode,y=w.getSnapshotBeforeUpdate(t.elementType===t.type?m:Ro(t.type,m),_);w.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var C=t.stateNode.containerInfo;C.nodeType===1?C.textContent="":C.nodeType===9&&C.documentElement&&C.removeChild(C.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ue(163))}}catch(I){rr(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,ot=e;break}ot=t.return}return h=lS,lS=!1,h}function pd(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&z5(t,r,i)}o=o.next}while(o!==n)}}function Lm(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function U5(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function fM(e){var t=e.alternate;t!==null&&(e.alternate=null,fM(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yi],delete t[Zd],delete t[A5],delete t[TZ],delete t[DZ])),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 dM(e){return e.tag===5||e.tag===3||e.tag===4}function cS(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||dM(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 H5(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=T1));else if(n!==4&&(e=e.child,e!==null))for(H5(e,t,r),e=e.sibling;e!==null;)H5(e,t,r),e=e.sibling}function V5(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(V5(e,t,r),e=e.sibling;e!==null;)V5(e,t,r),e=e.sibling}var Mr=null,No=!1;function Na(e,t,r){for(r=r.child;r!==null;)pM(e,t,r),r=r.sibling}function pM(e,t,r){if(_i&&typeof _i.onCommitFiberUnmount=="function")try{_i.onCommitFiberUnmount(Tm,r)}catch{}switch(r.tag){case 5:Qr||$c(r,t);case 6:var n=Mr,o=No;Mr=null,Na(e,t,r),Mr=n,No=o,Mr!==null&&(No?(e=Mr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Mr.removeChild(r.stateNode));break;case 18:Mr!==null&&(No?(e=Mr,r=r.stateNode,e.nodeType===8?Xb(e.parentNode,r):e.nodeType===1&&Xb(e,r),qd(e)):Xb(Mr,r.stateNode));break;case 4:n=Mr,o=No,Mr=r.stateNode.containerInfo,No=!0,Na(e,t,r),Mr=n,No=o;break;case 0:case 11:case 14:case 15:if(!Qr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&z5(r,t,a),o=o.next}while(o!==n)}Na(e,t,r);break;case 1:if(!Qr&&($c(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){rr(r,t,s)}Na(e,t,r);break;case 21:Na(e,t,r);break;case 22:r.mode&1?(Qr=(n=Qr)||r.memoizedState!==null,Na(e,t,r),Qr=n):Na(e,t,r);break;default:Na(e,t,r)}}function uS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new YZ),t.forEach(function(n){var o=iJ.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function Ao(e,t){var r=t.deletions;if(r!==null)for(var n=0;no&&(o=a),n&=~i}if(n=o,n=ar()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*JZ(n/1960))-n,10e?16:e,ns===null)var n=!1;else{if(e=ns,ns=null,W1=0,Ot&6)throw Error(Ue(331));var o=Ot;for(Ot|=4,ot=e.current;ot!==null;){var i=ot,a=i.child;if(ot.flags&16){var s=i.deletions;if(s!==null){for(var l=0;lar()-$6?Sl(e,0):I6|=r),kn(e,t)}function xM(e,t){t===0&&(e.mode&1?(t=Lh,Lh<<=1,!(Lh&130023424)&&(Lh=4194304)):t=1);var r=gn();e=ga(e,t),e!==null&&(Mp(e,t,r),kn(e,r))}function oJ(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),xM(e,r)}function iJ(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(Ue(314))}n!==null&&n.delete(t),xM(e,r)}var _M;_M=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||On.current)Sn=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Sn=!1,qZ(e,t,r);Sn=!!(e.flags&131072)}else Sn=!1,Yt&&t.flags&1048576&&CD(t,N1,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;J0(e,t),e=t.pendingProps;var o=nu(t,on.current);Wc(t,r),o=S6(null,t,n,e,o,r);var i=C6();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,An(n)?(i=!0,M1(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,b6(t),o.updater=Bm,t.stateNode=o,o._reactInternals=t,M5(t,n,e,r),t=F5(null,t,n,!0,i,r)):(t.tag=0,Yt&&i&&d6(t),pn(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(J0(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=sJ(n),e=Ro(n,e),o){case 0:t=N5(null,t,n,e,r);break e;case 1:t=iS(null,t,n,e,r);break e;case 11:t=nS(null,t,n,e,r);break e;case 14:t=oS(null,t,n,Ro(n.type,e),r);break e}throw Error(Ue(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ro(n,o),N5(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ro(n,o),iS(e,t,n,o,r);case 3:e:{if(iM(t),e===null)throw Error(Ue(387));n=t.pendingProps,i=t.memoizedState,o=i.element,kD(e,t),j1(t,n,null,r);var a=t.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=su(Error(Ue(423)),t),t=aS(e,t,n,r,o);break e}else if(n!==o){o=su(Error(Ue(424)),t),t=aS(e,t,n,r,o);break e}else for(Ln=hs(t.stateNode.containerInfo.firstChild),Un=t,Yt=!0,Lo=null,r=DD(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ou(),n===o){t=ma(e,t,r);break e}pn(e,t,n,r)}t=t.child}return t;case 5:return MD(t),e===null&&$5(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,P5(n,o)?a=null:i!==null&&P5(n,i)&&(t.flags|=32),oM(e,t),pn(e,t,a,r),t.child;case 6:return e===null&&$5(t),null;case 13:return aM(e,t,r);case 4:return w6(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=iu(t,null,n,r):pn(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ro(n,o),nS(e,t,n,o,r);case 7:return pn(e,t,t.pendingProps,r),t.child;case 8:return pn(e,t,t.pendingProps.children,r),t.child;case 12:return pn(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,Lt(F1,n._currentValue),n._currentValue=a,i!==null)if(Zo(i.value,a)){if(i.children===o.children&&!On.current){t=ma(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=fa(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),T5(i.return,r,t),s.lanes|=r;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(Ue(341));a.lanes|=r,s=a.alternate,s!==null&&(s.lanes|=r),T5(a,r,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}pn(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,Wc(t,r),o=bo(o),n=n(o),t.flags|=1,pn(e,t,n,r),t.child;case 14:return n=t.type,o=Ro(n,t.pendingProps),o=Ro(n.type,o),oS(e,t,n,o,r);case 15:return rM(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ro(n,o),J0(e,t),t.tag=1,An(n)?(e=!0,M1(t)):e=!1,Wc(t,r),$D(t,n,o),M5(t,n,o,r),F5(null,t,n,!0,e,r);case 19:return sM(e,t,r);case 22:return nM(e,t,r)}throw Error(Ue(156,t.tag))};function EM(e,t){return YT(e,t)}function aJ(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vo(e,t,r,n){return new aJ(e,t,r,n)}function R6(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sJ(e){if(typeof e=="function")return R6(e)?1:0;if(e!=null){if(e=e.$$typeof,e===e6)return 11;if(e===t6)return 14}return 2}function ys(e,t){var r=e.alternate;return r===null?(r=vo(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function t1(e,t,r,n,o,i){var a=2;if(n=e,typeof e=="function")R6(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case _c:return Cl(r.children,o,i,t);case Qx:a=8,o|=8;break;case o5:return e=vo(12,r,t,o|2),e.elementType=o5,e.lanes=i,e;case i5:return e=vo(13,r,t,o),e.elementType=i5,e.lanes=i,e;case a5:return e=vo(19,r,t,o),e.elementType=a5,e.lanes=i,e;case TT:return Um(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case IT:a=10;break e;case $T:a=9;break e;case e6:a=11;break e;case t6:a=14;break e;case Ka:a=16,n=null;break e}throw Error(Ue(130,e==null?e:typeof e,""))}return t=vo(a,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function Cl(e,t,r,n){return e=vo(7,e,n,t),e.lanes=r,e}function Um(e,t,r,n){return e=vo(22,e,n,t),e.elementType=TT,e.lanes=r,e.stateNode={isHidden:!1},e}function o2(e,t,r){return e=vo(6,e,null,t),e.lanes=r,e}function i2(e,t,r){return t=vo(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lJ(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=jb(0),this.expirationTimes=jb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jb(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function N6(e,t,r,n,o,i,a,s,l){return e=new lJ(e,t,r,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=vo(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},b6(i),e}function cJ(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(OM)}catch(e){console.error(e)}}OM(),CT.exports=Yn;var Us=CT.exports;const hJ=ri(Us);var yS=Us;r5.createRoot=yS.createRoot,r5.hydrateRoot=yS.hydrateRoot;var es=function(){return es=Object.assign||function(t){for(var r,n=1,o=arguments.length;n"u")return DJ;var t=MJ(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},NJ=IM(),FJ=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),` + .`.concat(mJ,` { + overflow: hidden `).concat(n,`; + padding-right: `).concat(s,"px ").concat(n,`; + } + body { + overflow: hidden `).concat(n,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` + padding-left: `.concat(o,`px; + padding-top: `).concat(i,`px; + padding-right: `).concat(a,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(n,`; + `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),` + } + + .`).concat(r1,` { + right: `).concat(s,"px ").concat(n,`; + } + + .`).concat(n1,` { + margin-right: `).concat(s,"px ").concat(n,`; + } + + .`).concat(r1," .").concat(r1,` { + right: 0 `).concat(n,`; + } + + .`).concat(n1," .").concat(n1,` { + margin-right: 0 `).concat(n,`; + } + + body { + `).concat(yJ,": ").concat(s,`px; + } +`)},BJ=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,i=$.useMemo(function(){return RJ(o)},[o]);return $.createElement(NJ,{styles:FJ(i,!t,o,r?"":"!important")})},Y5=!1;if(typeof window<"u")try{var Jh=Object.defineProperty({},"passive",{get:function(){return Y5=!0,!0}});window.addEventListener("test",Jh,Jh),window.removeEventListener("test",Jh,Jh)}catch{Y5=!1}var ic=Y5?{passive:!1}:!1,jJ=function(e){return e.tagName==="TEXTAREA"},$M=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!jJ(e)&&r[t]==="visible")},LJ=function(e){return $M(e,"overflowY")},zJ=function(e){return $M(e,"overflowX")},wS=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=TM(e,n);if(o){var i=DM(e,n),a=i[1],s=i[2];if(a>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},UJ=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},HJ=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},TM=function(e,t){return e==="v"?LJ(t):zJ(t)},DM=function(e,t){return e==="v"?UJ(t):HJ(t)},VJ=function(e,t){return e==="h"&&t==="rtl"?-1:1},WJ=function(e,t,r,n,o){var i=VJ(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),c=!1,u=a>0,f=0,d=0;do{var p=DM(e,s),h=p[0],m=p[1],_=p[2],w=m-_-i*h;(h||w)&&TM(e,s)&&(f+=w,d+=h),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(o&&f===0||!o&&a>f)||!u&&(o&&d===0||!o&&-a>d))&&(c=!0),c},Qh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xS=function(e){return[e.deltaX,e.deltaY]},_S=function(e){return e&&"current"in e?e.current:e},qJ=function(e,t){return e[0]===t[0]&&e[1]===t[1]},GJ=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},KJ=0,ac=[];function YJ(e){var t=$.useRef([]),r=$.useRef([0,0]),n=$.useRef(),o=$.useState(KJ++)[0],i=$.useState(IM)[0],a=$.useRef(e);$.useEffect(function(){a.current=e},[e]),$.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=gJ([e.lockRef.current],(e.shards||[]).map(_S),!0).filter(Boolean);return m.forEach(function(_){return _.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=$.useCallback(function(m,_){if("touches"in m&&m.touches.length===2)return!a.current.allowPinchZoom;var w=Qh(m),y=r.current,C="deltaX"in m?m.deltaX:y[0]-w[0],I="deltaY"in m?m.deltaY:y[1]-w[1],F,O=m.target,g=Math.abs(C)>Math.abs(I)?"h":"v";if("touches"in m&&g==="h"&&O.type==="range")return!1;var D=wS(g,O);if(!D)return!0;if(D?F=g:(F=g==="v"?"h":"v",D=wS(g,O)),!D)return!1;if(!n.current&&"changedTouches"in m&&(C||I)&&(n.current=F),!F)return!0;var H=n.current||F;return WJ(H,_,m,H==="h"?C:I,!0)},[]),l=$.useCallback(function(m){var _=m;if(!(!ac.length||ac[ac.length-1]!==i)){var w="deltaY"in _?xS(_):Qh(_),y=t.current.filter(function(F){return F.name===_.type&&F.target===_.target&&qJ(F.delta,w)})[0];if(y&&y.should){_.cancelable&&_.preventDefault();return}if(!y){var C=(a.current.shards||[]).map(_S).filter(Boolean).filter(function(F){return F.contains(_.target)}),I=C.length>0?s(_,C[0]):!a.current.noIsolation;I&&_.cancelable&&_.preventDefault()}}},[]),c=$.useCallback(function(m,_,w,y){var C={name:m,delta:_,target:w,should:y};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(I){return I!==C})},1)},[]),u=$.useCallback(function(m){r.current=Qh(m),n.current=void 0},[]),f=$.useCallback(function(m){c(m.type,xS(m),m.target,s(m,e.lockRef.current))},[]),d=$.useCallback(function(m){c(m.type,Qh(m),m.target,s(m,e.lockRef.current))},[]);$.useEffect(function(){return ac.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",l,ic),document.addEventListener("touchmove",l,ic),document.addEventListener("touchstart",u,ic),function(){ac=ac.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,ic),document.removeEventListener("touchmove",l,ic),document.removeEventListener("touchstart",u,ic)}},[]);var p=e.removeScrollBar,h=e.inert;return $.createElement($.Fragment,null,h?$.createElement(i,{styles:GJ(o)}):null,p?$.createElement(BJ,{gapMode:e.gapMode}):null)}const XJ=PJ(kM,YJ);var MM=$.forwardRef(function(e,t){return $.createElement(Gm,es({},e,{ref:t,sideCar:XJ}))});MM.classNames=Gm.classNames;const ZJ=MM;function Y1(e,t){let r=e;for(;(r=r.parentElement)&&!r.matches(t););return r}function JJ(e,t,r){for(let n=e-1;n>=0;n-=1)if(!t[n].disabled)return n;if(r){for(let n=t.length-1;n>-1;n-=1)if(!t[n].disabled)return n}return e}function QJ(e,t,r){for(let n=e+1;n{var l;r==null||r(s);const c=Array.from(((l=Y1(s.currentTarget,e))==null?void 0:l.querySelectorAll(t))||[]).filter(m=>eQ(s.currentTarget,m,e)),u=c.findIndex(m=>s.currentTarget===m),f=QJ(u,c,n),d=JJ(u,c,n),p=i==="rtl"?d:f,h=i==="rtl"?f:d;switch(s.key){case"ArrowRight":{a==="horizontal"&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),o&&c[p].click());break}case"ArrowLeft":{a==="horizontal"&&(s.stopPropagation(),s.preventDefault(),c[h].focus(),o&&c[h].click());break}case"ArrowUp":{a==="vertical"&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),o&&c[d].click());break}case"ArrowDown":{a==="vertical"&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),o&&c[f].click());break}case"Home":{s.stopPropagation(),s.preventDefault(),!c[0].disabled&&c[0].focus();break}case"End":{s.stopPropagation(),s.preventDefault();const m=c.length-1;!c[m].disabled&&c[m].focus();break}}}}function rQ(e,t,r){var n;return r?Array.from(((n=Y1(r,t))==null?void 0:n.querySelectorAll(e))||[]).findIndex(o=>o===r):null}function Bp(e){const t=$.createContext(null);return[({children:o,value:i})=>ae.createElement(t.Provider,{value:i},o),()=>{const o=$.useContext(t);if(o===null)throw new Error(e);return o}]}function L6(e){return Array.isArray(e)?e:[e]}const nQ=()=>{};function oQ(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||nQ:r=>{var n;r.key==="Escape"&&(e(r),(n=t.onTrigger)==null||n.call(t))}}function la(e,t){return r=>{e==null||e(r),t==null||t(r)}}function iQ(){const[e,t]=$.useState(-1);return[e,{setHovered:t,resetHovered:()=>t(-1)}]}function aQ({data:e}){const t=[],r=[],n=e.reduce((o,i,a)=>(i.group?o[i.group]?o[i.group].push(a):o[i.group]=[a]:r.push(a),o),{});return Object.keys(n).forEach(o=>{t.push(...n[o].map(i=>e[i]))}),t.push(...r.map(o=>e[o])),t}function jp(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==ae.Fragment:!1}function RM(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t({fontFamily:e.fontFamily||"sans-serif"})}var cQ=Object.defineProperty,ES=Object.getOwnPropertySymbols,uQ=Object.prototype.hasOwnProperty,fQ=Object.prototype.propertyIsEnumerable,SS=(e,t,r)=>t in e?cQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,CS=(e,t)=>{for(var r in t||(t={}))uQ.call(t,r)&&SS(e,r,t[r]);if(ES)for(var r of ES(t))fQ.call(t,r)&&SS(e,r,t[r]);return e};function dQ(e){return t=>({WebkitTapHighlightColor:"transparent",[t||"&:focus"]:CS({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[t?t.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:CS({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)})}function Lp(e){return t=>typeof e.primaryShade=="number"?e.primaryShade:e.primaryShade[t||e.colorScheme]}function z6(e){const t=Lp(e);return(r,n,o=!0,i=!0)=>{if(typeof r=="string"&&r.includes(".")){const[s,l]=r.split("."),c=parseInt(l,10);if(s in e.colors&&c>=0&&c<10)return e.colors[s][typeof n=="number"&&!i?n:c]}const a=typeof n=="number"?n:t();return r in e.colors?e.colors[r][a]:o?e.colors[e.primaryColor][a]:r}}function FM(e){let t="";for(let r=1;r{const o={from:(n==null?void 0:n.from)||e.defaultGradient.from,to:(n==null?void 0:n.to)||e.defaultGradient.to,deg:(n==null?void 0:n.deg)||e.defaultGradient.deg};return`linear-gradient(${o.deg}deg, ${t(o.from,r(),!1)} 0%, ${t(o.to,r(),!1)} 100%)`}}function jM(e){return t=>{if(typeof t=="number")return`${t/16}${e}`;if(typeof t=="string"){const r=t.replace("px","");if(!Number.isNaN(Number(r)))return`${Number(r)/16}${e}`}return t}}const me=jM("rem"),mn=jM("em");function Re({size:e,sizes:t,units:r}){return e in t?t[e]:typeof e=="number"?r==="em"?mn(e):me(e):e||t.md}function xo(e){return typeof e=="number"?e:typeof e=="string"&&e.includes("rem")?Number(e.replace("rem",""))*16:typeof e=="string"&&e.includes("em")?Number(e.replace("em",""))*16:Number(e)}function vQ(e){return t=>`@media (min-width: ${mn(xo(Re({size:t,sizes:e.breakpoints})))})`}function gQ(e){return t=>`@media (max-width: ${mn(xo(Re({size:t,sizes:e.breakpoints}))-1)})`}function mQ(e){return/^#?([0-9A-F]{3}){1,2}$/i.test(e)}function yQ(e){let t=e.replace("#","");if(t.length===3){const a=t.split("");t=[a[0],a[0],a[1],a[1],a[2],a[2]].join("")}const r=parseInt(t,16),n=r>>16&255,o=r>>8&255,i=r&255;return{r:n,g:o,b:i,a:1}}function bQ(e){const[t,r,n,o]=e.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:t,g:r,b:n,a:o||1}}function U6(e){return mQ(e)?yQ(e):e.startsWith("rgb")?bQ(e):{r:0,g:0,b:0,a:1}}function vc(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(--"))return e;const{r,g:n,b:o}=U6(e);return`rgba(${r}, ${n}, ${o}, ${t})`}function wQ(e=0){return{position:"absolute",top:me(e),right:me(e),left:me(e),bottom:me(e)}}function xQ(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r,g:n,b:o,a:i}=U6(e),a=1-t,s=l=>Math.round(l*a);return`rgba(${s(r)}, ${s(n)}, ${s(o)}, ${i})`}function _Q(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r,g:n,b:o,a:i}=U6(e),a=s=>Math.round(s+(255-s)*t);return`rgba(${a(r)}, ${a(n)}, ${a(o)}, ${i})`}function EQ(e){return t=>{if(typeof t=="number")return me(t);const r=typeof e.defaultRadius=="number"?e.defaultRadius:e.radius[e.defaultRadius]||e.defaultRadius;return e.radius[t]||t||r}}function SQ(e,t){if(typeof e=="string"&&e.includes(".")){const[r,n]=e.split("."),o=parseInt(n,10);if(r in t.colors&&o>=0&&o<10)return{isSplittedColor:!0,key:r,shade:o}}return{isSplittedColor:!1}}function CQ(e){const t=z6(e),r=Lp(e),n=BM(e);return({variant:o,color:i,gradient:a,primaryFallback:s})=>{const l=SQ(i,e);switch(o){case"light":return{border:"transparent",background:vc(t(i,e.colorScheme==="dark"?8:0,s,!1),e.colorScheme==="dark"?.2:1),color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:r("light")),hover:vc(t(i,e.colorScheme==="dark"?7:1,s,!1),e.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:r("light")),hover:vc(t(i,e.colorScheme==="dark"?8:0,s,!1),e.colorScheme==="dark"?.2:1)};case"outline":return{border:t(i,e.colorScheme==="dark"?5:r("light")),background:"transparent",color:t(i,e.colorScheme==="dark"?5:r("light")),hover:e.colorScheme==="dark"?vc(t(i,5,s,!1),.05):vc(t(i,0,s,!1),.35)};case"default":return{border:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4],background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,color:e.colorScheme==="dark"?e.white:e.black,hover:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]};case"white":return{border:"transparent",background:e.white,color:t(i,r()),hover:null};case"transparent":return{border:"transparent",color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:r("light")),background:"transparent",hover:null};case"gradient":return{background:n(a),color:e.white,border:"transparent",hover:null};default:{const c=r(),u=l.isSplittedColor?l.shade:c,f=l.isSplittedColor?l.key:i;return{border:"transparent",background:t(f,u,s),color:e.white,hover:t(f,u===9?8:u+1)}}}}}function PQ(e){return t=>{const r=Lp(e)(t);return e.colors[e.primaryColor][r]}}function OQ(e){return{"@media (hover: hover)":{"&:hover":e},"@media (hover: none)":{"&:active":e}}}function AQ(e){return()=>({userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]})}function kQ(e){return()=>e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}const dr={fontStyles:lQ,themeColor:z6,focusStyles:dQ,linearGradient:pQ,radialGradient:hQ,smallerThan:gQ,largerThan:vQ,rgba:vc,cover:wQ,darken:xQ,lighten:_Q,radius:EQ,variant:CQ,primaryShade:Lp,hover:OQ,gradient:BM,primaryColor:PQ,placeholderStyles:AQ,dimmed:kQ};var IQ=Object.defineProperty,$Q=Object.defineProperties,TQ=Object.getOwnPropertyDescriptors,PS=Object.getOwnPropertySymbols,DQ=Object.prototype.hasOwnProperty,MQ=Object.prototype.propertyIsEnumerable,OS=(e,t,r)=>t in e?IQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,RQ=(e,t)=>{for(var r in t||(t={}))DQ.call(t,r)&&OS(e,r,t[r]);if(PS)for(var r of PS(t))MQ.call(t,r)&&OS(e,r,t[r]);return e},NQ=(e,t)=>$Q(e,TQ(t));function LM(e){return NQ(RQ({},e),{fn:{fontStyles:dr.fontStyles(e),themeColor:dr.themeColor(e),focusStyles:dr.focusStyles(e),largerThan:dr.largerThan(e),smallerThan:dr.smallerThan(e),radialGradient:dr.radialGradient,linearGradient:dr.linearGradient,gradient:dr.gradient(e),rgba:dr.rgba,cover:dr.cover,lighten:dr.lighten,darken:dr.darken,primaryShade:dr.primaryShade(e),radius:dr.radius(e),variant:dr.variant(e),hover:dr.hover,primaryColor:dr.primaryColor(e),placeholderStyles:dr.placeholderStyles(e),dimmed:dr.dimmed(e)}})}const zM=["xs","sm","md","lg","xl"],FQ={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:sQ,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:e=>({outlineOffset:"0.125rem",outline:`0.125rem solid ${e.colors[e.primaryColor][e.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:e=>({outline:"none",borderColor:e.colors[e.primaryColor][typeof e.primaryShade=="object"?e.primaryShade[e.colorScheme]:e.primaryShade]})}},H6=LM(FQ);function BQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Nr(Fu,--In):0,cu--,lr===10&&(cu=1,Ym--),lr}function Hn(){return lr=In2||ip(lr)>3?"":" "}function ZQ(e,t){for(;--t&&Hn()&&!(lr<48||lr>102||lr>57&&lr<65||lr>70&&lr<97););return zp(e,o1()+(t<6&&Si()==32&&Hn()==32))}function Z5(e){for(;Hn();)switch(lr){case e:return In;case 34:case 39:e!==34&&e!==39&&Z5(lr);break;case 40:e===41&&Z5(e);break;case 92:Hn();break}return In}function JQ(e,t){for(;Hn()&&e+lr!==47+10;)if(e+lr===42+42&&Si()===47)break;return"/*"+zp(t,In-1)+"*"+Km(e===47?e:Hn())}function QQ(e){for(;!ip(Si());)Hn();return zp(e,In)}function eee(e){return GM(a1("",null,null,null,[""],e=qM(e),0,[0],e))}function a1(e,t,r,n,o,i,a,s,l){for(var c=0,u=0,f=a,d=0,p=0,h=0,m=1,_=1,w=1,y=0,C="",I=o,F=i,O=n,g=C;_;)switch(h=y,y=Hn()){case 40:if(h!=108&&Nr(g,f-1)==58){X5(g+=$t(i1(y),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:g+=i1(y);break;case 9:case 10:case 13:case 32:g+=XQ(h);break;case 92:g+=ZQ(o1()-1,7);continue;case 47:switch(Si()){case 42:case 47:e0(tee(JQ(Hn(),o1()),t,r),l);break;default:g+="/"}break;case 123*m:s[c++]=gi(g)*w;case 125*m:case 59:case 0:switch(y){case 0:case 125:_=0;case 59+u:w==-1&&(g=$t(g,/\f/g,"")),p>0&&gi(g)-f&&e0(p>32?kS(g+";",n,r,f-1):kS($t(g," ","")+";",n,r,f-2),l);break;case 59:g+=";";default:if(e0(O=AS(g,t,r,c,u,o,s,C,I=[],F=[],f),i),y===123)if(u===0)a1(g,t,O,O,I,i,f,s,F);else switch(d===99&&Nr(g,3)===110?100:d){case 100:case 108:case 109:case 115:a1(e,O,O,n&&e0(AS(e,O,O,0,0,o,s,C,o,I=[],f),F),o,F,f,s,n?I:F);break;default:a1(g,O,O,O,[""],F,0,s,F)}}c=u=p=0,m=w=1,C=g="",f=a;break;case 58:f=1+gi(g),p=h;default:if(m<1){if(y==123)--m;else if(y==125&&m++==0&&YQ()==125)continue}switch(g+=Km(y),y*m){case 38:w=u>0?1:(g+="\f",-1);break;case 44:s[c++]=(gi(g)-1)*w,w=1;break;case 64:Si()===45&&(g+=i1(Hn())),d=Si(),u=f=gi(C=g+=QQ(o1())),y++;break;case 45:h===45&&gi(g)==2&&(m=0)}}return i}function AS(e,t,r,n,o,i,a,s,l,c,u){for(var f=o-1,d=o===0?i:[""],p=q6(d),h=0,m=0,_=0;h0?d[w]+" "+y:$t(y,/&\f/g,d[w])))&&(l[_++]=C);return Xm(e,t,r,o===0?V6:s,l,c,u)}function tee(e,t,r){return Xm(e,t,r,UM,Km(KQ()),op(e,2,-2),0)}function kS(e,t,r,n){return Xm(e,t,r,W6,op(e,0,n),op(e,n+1,-1),n)}function Gc(e,t){for(var r="",n=q6(e),o=0;o6)switch(Nr(e,t+1)){case 109:if(Nr(e,t+4)!==45)break;case 102:return $t(e,/(.+:)(.+)-([^]+)/,"$1"+It+"$2-$3$1"+X1+(Nr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~X5(e,"stretch")?YM($t(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Nr(e,t+1)!==115)break;case 6444:switch(Nr(e,gi(e)-3-(~X5(e,"!important")&&10))){case 107:return $t(e,":",":"+It)+e;case 101:return $t(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+It+(Nr(e,14)===45?"inline-":"")+"box$3$1"+It+"$2$3$1"+Zr+"$2box$3")+e}break;case 5936:switch(Nr(e,t+11)){case 114:return It+e+Zr+$t(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return It+e+Zr+$t(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return It+e+Zr+$t(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return It+e+Zr+e+e}return e}var uee=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case W6:t.return=YM(t.value,t.length);break;case HM:return Gc([xf(t,{value:$t(t.value,"@","@"+It)})],o);case V6:if(t.length)return GQ(t.props,function(i){switch(qQ(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Gc([xf(t,{props:[$t(i,/:(read-\w+)/,":"+X1+"$1")]})],o);case"::placeholder":return Gc([xf(t,{props:[$t(i,/:(plac\w+)/,":"+It+"input-$1")]}),xf(t,{props:[$t(i,/:(plac\w+)/,":"+X1+"$1")]}),xf(t,{props:[$t(i,/:(plac\w+)/,Zr+"input-$1")]})],o)}return""})}},fee=[uee],XM=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(m){var _=m.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var o=t.stylisPlugins||fee,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(m){for(var _=m.getAttribute("data-emotion").split(" "),w=1;w<_.length;w++)i[_[w]]=!0;s.push(m)});var l,c=[lee,cee];{var u,f=[ree,oee(function(m){u.insert(m)})],d=nee(c.concat(o,f)),p=function(_){return Gc(eee(_),d)};l=function(_,w,y,C){u=y,p(_?_+"{"+w.styles+"}":w.styles),C&&(h.inserted[w.name]=!0)}}var h={key:r,sheet:new LQ({key:r,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:l};return h.sheet.hydrate(s),h};function Ze(){return Ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var kee={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Iee=/[A-Z]|^ms/g,$ee=/_EMO_([^_]+?)_([^]*?)_EMO_/g,rR=function(t){return t.charCodeAt(1)===45},RS=function(t){return t!=null&&typeof t!="boolean"},l2=KM(function(e){return rR(e)?e:e.replace(Iee,"-$&").toLowerCase()}),NS=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace($ee,function(n,o,i){return mi={name:o,styles:i,next:mi},o})}return kee[t]!==1&&!rR(t)&&typeof r=="number"&&r!==0?r+"px":r};function ap(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return mi={name:r.name,styles:r.styles,next:mi},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)mi={name:n.name,styles:n.styles,next:mi},n=n.next;var o=r.styles+";";return o}return Tee(e,t,r)}case"function":{if(e!==void 0){var i=mi,a=r(e);return mi=i,ap(e,t,a)}break}}if(t==null)return r;var s=t[r];return s!==void 0?s:r}function Tee(e,t,r){var n="";if(Array.isArray(r))for(var o=0;ot in e?jee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Vee=(e,t)=>{for(var r in t||(t={}))Uee.call(t,r)&&LS(e,r,t[r]);if(jS)for(var r of jS(t))Hee.call(t,r)&&LS(e,r,t[r]);return e},Wee=(e,t)=>Lee(e,zee(t));function qee({theme:e}){return ae.createElement(Up,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:e.colorScheme==="dark"?"dark":"light"},body:Wee(Vee({},e.fn.fontStyles()),{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function _f(e,t,r,n=me){Object.keys(t).forEach(o=>{e[`--mantine-${r}-${o}`]=n(t[o])})}function Gee({theme:e}){const t={"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-transition-timing-function":e.transitionTimingFunction,"--mantine-line-height":`${e.lineHeight}`,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":`${e.headings.fontWeight}`};_f(t,e.shadows,"shadow"),_f(t,e.fontSizes,"font-size"),_f(t,e.radius,"radius"),_f(t,e.spacing,"spacing"),_f(t,e.breakpoints,"breakpoints",mn),Object.keys(e.colors).forEach(n=>{e.colors[n].forEach((o,i)=>{t[`--mantine-color-${n}-${i}`]=o})});const r=e.headings.sizes;return Object.keys(r).forEach(n=>{t[`--mantine-${n}-font-size`]=r[n].fontSize,t[`--mantine-${n}-line-height`]=`${r[n].lineHeight}`}),ae.createElement(Up,{styles:{":root":t}})}var Kee=Object.defineProperty,Yee=Object.defineProperties,Xee=Object.getOwnPropertyDescriptors,zS=Object.getOwnPropertySymbols,Zee=Object.prototype.hasOwnProperty,Jee=Object.prototype.propertyIsEnumerable,US=(e,t,r)=>t in e?Kee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,li=(e,t)=>{for(var r in t||(t={}))Zee.call(t,r)&&US(e,r,t[r]);if(zS)for(var r of zS(t))Jee.call(t,r)&&US(e,r,t[r]);return e},c2=(e,t)=>Yee(e,Xee(t));function Qee(e,t){var r;if(!t)return e;const n=Object.keys(e).reduce((o,i)=>{if(i==="headings"&&t.headings){const a=t.headings.sizes?Object.keys(e.headings.sizes).reduce((s,l)=>(s[l]=li(li({},e.headings.sizes[l]),t.headings.sizes[l]),s),{}):e.headings.sizes;return c2(li({},o),{headings:c2(li(li({},e.headings),t.headings),{sizes:a})})}if(i==="breakpoints"&&t.breakpoints){const a=li(li({},e.breakpoints),t.breakpoints);return c2(li({},o),{breakpoints:Object.fromEntries(Object.entries(a).sort((s,l)=>xo(s[1])-xo(l[1])))})}return o[i]=typeof t[i]=="object"?li(li({},e[i]),t[i]):typeof t[i]=="number"||typeof t[i]=="boolean"||typeof t[i]=="function"?t[i]:t[i]||e[i],o},{});if(t!=null&&t.fontFamily&&!((r=t==null?void 0:t.headings)!=null&&r.fontFamily)&&(n.headings.fontFamily=t.fontFamily),!(n.primaryColor in n.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return n}function ete(e,t){return LM(Qee(e,t))}function oR(e){return Object.keys(e).reduce((t,r)=>(e[r]!==void 0&&(t[r]=e[r]),t),{})}const tte={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:`${me(1)} dotted ButtonText`},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"}};function rte(){return ae.createElement(Up,{styles:tte})}var nte=Object.defineProperty,HS=Object.getOwnPropertySymbols,ote=Object.prototype.hasOwnProperty,ite=Object.prototype.propertyIsEnumerable,VS=(e,t,r)=>t in e?nte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gd=(e,t)=>{for(var r in t||(t={}))ote.call(t,r)&&VS(e,r,t[r]);if(HS)for(var r of HS(t))ite.call(t,r)&&VS(e,r,t[r]);return e};const Z1=$.createContext({theme:H6});function Lr(){var e;return((e=$.useContext(Z1))==null?void 0:e.theme)||H6}function ate(e){const t=Lr(),r=n=>{var o,i,a,s;return{styles:((o=t.components[n])==null?void 0:o.styles)||{},classNames:((i=t.components[n])==null?void 0:i.classNames)||{},variants:(a=t.components[n])==null?void 0:a.variants,sizes:(s=t.components[n])==null?void 0:s.sizes}};return Array.isArray(e)?e.map(r):[r(e)]}function iR(){var e;return(e=$.useContext(Z1))==null?void 0:e.emotionCache}function et(e,t,r){var n;const o=Lr(),i=(n=o.components[e])==null?void 0:n.defaultProps,a=typeof i=="function"?i(o):i;return gd(gd(gd({},t),a),oR(r))}function aR({theme:e,emotionCache:t,withNormalizeCSS:r=!1,withGlobalStyles:n=!1,withCSSVariables:o=!1,inherit:i=!1,children:a}){const s=$.useContext(Z1),l=ete(H6,i?gd(gd({},s.theme),e):e);return ae.createElement(Fee,{theme:l},ae.createElement(Z1.Provider,{value:{theme:l,emotionCache:t}},r&&ae.createElement(rte,null),n&&ae.createElement(qee,{theme:l}),o&&ae.createElement(Gee,{theme:l}),typeof l.globalStyles=="function"&&ae.createElement(Up,{styles:l.globalStyles(l)}),a))}aR.displayName="@mantine/core/MantineProvider";const sR=$.createContext(null);function ste(){const e=$.useContext(sR);if(!e)throw new Error("useMantineColorScheme hook was called outside of context, make sure your app is wrapped with ColorSchemeProvider component");return e}function lR({colorScheme:e,toggleColorScheme:t,children:r}){return ae.createElement(sR.Provider,{value:{colorScheme:e,toggleColorScheme:t}},r)}lR.displayName="@mantine/core/ColorSchemeProvider";const lte={app:100,modal:200,popover:300,overlay:400,max:9999};function Hs(e){return lte[e]}function cte(e,t){const r=$.useRef();return(!r.current||t.length!==r.current.prevDeps.length||r.current.prevDeps.map((n,o)=>n===t[o]).indexOf(!1)>=0)&&(r.current={v:e(),prevDeps:[...t]}),r.current.v}const ute=XM({key:"mantine",prepend:!0});function fte(){return iR()||ute}var dte=Object.defineProperty,WS=Object.getOwnPropertySymbols,pte=Object.prototype.hasOwnProperty,hte=Object.prototype.propertyIsEnumerable,qS=(e,t,r)=>t in e?dte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vte=(e,t)=>{for(var r in t||(t={}))pte.call(t,r)&&qS(e,r,t[r]);if(WS)for(var r of WS(t))hte.call(t,r)&&qS(e,r,t[r]);return e};const u2="ref";function gte(e){let t;if(e.length!==1)return{args:e,ref:t};const[r]=e;if(!(r instanceof Object))return{args:e,ref:t};if(!(u2 in r))return{args:e,ref:t};t=r[u2];const n=vte({},r);return delete n[u2],{args:[n],ref:t}}const{cssFactory:mte}=(()=>{function e(r,n,o){const i=[],a=Pee(r,i,o);return i.length<2?o:a+n(i)}function t(r){const{cache:n}=r,o=(...a)=>{const{ref:s,args:l}=gte(a),c=Q6(l,n.registered);return tR(n,c,!1),`${n.key}-${c.name}${s===void 0?"":` ${s}`}`};return{css:o,cx:(...a)=>e(n.registered,o,NM(a))}}return{cssFactory:t}})();function cR(){const e=fte();return cte(()=>mte({cache:e}),[e])}function yte({cx:e,classes:t,context:r,classNames:n,name:o,cache:i}){const a=r.reduce((s,l)=>(Object.keys(l.classNames).forEach(c=>{typeof s[c]!="string"?s[c]=`${l.classNames[c]}`:s[c]=`${s[c]} ${l.classNames[c]}`}),s),{});return Object.keys(t).reduce((s,l)=>(s[l]=e(t[l],a[l],n!=null&&n[l],Array.isArray(o)?o.filter(Boolean).map(c=>`${(i==null?void 0:i.key)||"mantine"}-${c}-${l}`).join(" "):o?`${(i==null?void 0:i.key)||"mantine"}-${o}-${l}`:null),s),{})}var bte=Object.defineProperty,GS=Object.getOwnPropertySymbols,wte=Object.prototype.hasOwnProperty,xte=Object.prototype.propertyIsEnumerable,KS=(e,t,r)=>t in e?bte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f2=(e,t)=>{for(var r in t||(t={}))wte.call(t,r)&&KS(e,r,t[r]);if(GS)for(var r of GS(t))xte.call(t,r)&&KS(e,r,t[r]);return e};function e3(e,t){return t&&Object.keys(t).forEach(r=>{e[r]?e[r]=f2(f2({},e[r]),t[r]):e[r]=f2({},t[r])}),e}function YS(e,t,r,n){const o=i=>typeof i=="function"?i(t,r||{},n):i||{};return Array.isArray(e)?e.map(i=>o(i.styles)).reduce((i,a)=>e3(i,a),{}):o(e)}function _te({ctx:e,theme:t,params:r,variant:n,size:o}){return e.reduce((i,a)=>(a.variants&&n in a.variants&&e3(i,a.variants[n](t,r,{variant:n,size:o})),a.sizes&&o in a.sizes&&e3(i,a.sizes[o](t,r,{variant:n,size:o})),i),{})}function at(e){const t=typeof e=="function"?e:()=>e;function r(n,o){const i=Lr(),a=ate(o==null?void 0:o.name),s=iR(),l={variant:o==null?void 0:o.variant,size:o==null?void 0:o.size},{css:c,cx:u}=cR(),f=t(i,n,l),d=YS(o==null?void 0:o.styles,i,n,l),p=YS(a,i,n,l),h=_te({ctx:a,theme:i,params:n,variant:o==null?void 0:o.variant,size:o==null?void 0:o.size}),m=Object.fromEntries(Object.keys(f).map(_=>{const w=u({[c(f[_])]:!(o!=null&&o.unstyled)},c(h[_]),c(p[_]),c(d[_]));return[_,w]}));return{classes:yte({cx:u,classes:m,context:a,classNames:o==null?void 0:o.classNames,name:o==null?void 0:o.name,cache:s}),cx:u,theme:i}}return r}function zo(e){return`___ref-${e||""}`}function uR({styles:e}){const t=Lr();return ae.createElement(Up,{styles:Bee(typeof e=="function"?e(t):e)})}var Ete=Object.defineProperty,Ste=Object.defineProperties,Cte=Object.getOwnPropertyDescriptors,XS=Object.getOwnPropertySymbols,Pte=Object.prototype.hasOwnProperty,Ote=Object.prototype.propertyIsEnumerable,ZS=(e,t,r)=>t in e?Ete(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ef=(e,t)=>{for(var r in t||(t={}))Pte.call(t,r)&&ZS(e,r,t[r]);if(XS)for(var r of XS(t))Ote.call(t,r)&&ZS(e,r,t[r]);return e},Sf=(e,t)=>Ste(e,Cte(t));const Cf={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${me(10)})`},transitionProperty:"transform, opacity"},t0={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(-${me(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(${me(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${me(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${me(20)}) rotate(5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:Sf(Ef({},Cf),{common:{transformOrigin:"center center"}}),"pop-bottom-left":Sf(Ef({},Cf),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":Sf(Ef({},Cf),{common:{transformOrigin:"bottom right"}}),"pop-top-left":Sf(Ef({},Cf),{common:{transformOrigin:"top left"}}),"pop-top-right":Sf(Ef({},Cf),{common:{transformOrigin:"top right"}})},JS=["mousedown","touchstart"];function Ate(e,t,r){const n=$.useRef();return $.useEffect(()=>{const o=i=>{const{target:a}=i??{};if(Array.isArray(r)){const s=(a==null?void 0:a.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(a)&&a.tagName!=="HTML";r.every(c=>!!c&&!i.composedPath().includes(c))&&!s&&e()}else n.current&&!n.current.contains(a)&&e()};return(t||JS).forEach(i=>document.addEventListener(i,o)),()=>{(t||JS).forEach(i=>document.removeEventListener(i,o))}},[n,e,r]),n}function kte({timeout:e=2e3}={}){const[t,r]=$.useState(null),[n,o]=$.useState(!1),[i,a]=$.useState(null),s=u=>{clearTimeout(i),a(setTimeout(()=>o(!1),e)),o(u)};return{copy:u=>{"clipboard"in navigator?navigator.clipboard.writeText(u).then(()=>s(!0)).catch(f=>r(f)):r(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{o(!1),r(null),clearTimeout(i)},error:t,copied:n}}function Ite(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function $te(e,t){return typeof t=="boolean"?t:typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function Tte(e,t,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){const[n,o]=$.useState(r?t:$te(e,t)),i=$.useRef();return $.useEffect(()=>{if("matchMedia"in window)return i.current=window.matchMedia(e),o(i.current.matches),Ite(i.current,a=>o(a.matches))},[e]),n}function bs(e,t,r){return Math.min(Math.max(e,t),r)}const e_=typeof document<"u"?$.useLayoutEffect:$.useEffect;function Jo(e,t){const r=$.useRef(!1);$.useEffect(()=>()=>{r.current=!1},[]),$.useEffect(()=>{if(r.current)return e();r.current=!0},t)}function fR({opened:e,shouldReturnFocus:t=!0}){const r=$.useRef(),n=()=>{var o;r.current&&"focus"in r.current&&typeof r.current.focus=="function"&&((o=r.current)==null||o.focus({preventScroll:!0}))};return Jo(()=>{let o=-1;const i=a=>{a.key==="Tab"&&window.clearTimeout(o)};return document.addEventListener("keydown",i),e?r.current=document.activeElement:t&&(o=window.setTimeout(n,10)),()=>{window.clearTimeout(o),document.removeEventListener("keydown",i)}},[e,t]),n}const Dte=/input|select|textarea|button|object/,dR="a, input, select, textarea, button, object, [tabindex]";function Mte(e){return e.style.display==="none"}function Rte(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let r=e;for(;r&&!(r===document.body||r.nodeType===11);){if(Mte(r))return!1;r=r.parentNode}return!0}function pR(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function t3(e){const t=e.nodeName.toLowerCase(),r=!Number.isNaN(pR(e));return(Dte.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||r)&&Rte(e)}function hR(e){const t=pR(e);return(Number.isNaN(t)||t>=0)&&t3(e)}function Nte(e){return Array.from(e.querySelectorAll(dR)).filter(hR)}function Fte(e,t){const r=Nte(e);if(!r.length){t.preventDefault();return}const n=r[t.shiftKey?0:r.length-1],o=e.getRootNode();if(!(n===o.activeElement||e===o.activeElement))return;t.preventDefault();const a=r[t.shiftKey?r.length-1:0];a&&a.focus()}function t_(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function Bte(e,t="body > :not(script)"){const r=t_(),n=Array.from(document.querySelectorAll(t)).map(o=>{var i;if((i=o==null?void 0:o.shadowRoot)!=null&&i.contains(e)||o.contains(e))return;const a=o.getAttribute("aria-hidden"),s=o.getAttribute("data-hidden"),l=o.getAttribute("data-focus-id");return o.setAttribute("data-focus-id",r),a===null||a==="false"?o.setAttribute("aria-hidden","true"):!s&&!l&&o.setAttribute("data-hidden",a),{node:o,ariaHidden:s||null}});return()=>{n.forEach(o=>{!o||r!==o.node.getAttribute("data-focus-id")||(o.ariaHidden===null?o.node.removeAttribute("aria-hidden"):o.node.setAttribute("aria-hidden",o.ariaHidden),o.node.removeAttribute("data-focus-id"),o.node.removeAttribute("data-hidden"))})}}function jte(e=!0){const t=$.useRef(),r=$.useRef(null),n=i=>{let a=i.querySelector("[data-autofocus]");if(!a){const s=Array.from(i.querySelectorAll(dR));a=s.find(hR)||s.find(t3)||null,!a&&t3(i)&&(a=i)}a&&a.focus({preventScroll:!0})},o=$.useCallback(i=>{if(e){if(i===null){r.current&&(r.current(),r.current=null);return}r.current=Bte(i),t.current!==i&&(i?(setTimeout(()=>{i.getRootNode()&&n(i)}),t.current=i):t.current=null)}},[e]);return $.useEffect(()=>{if(!e)return;t.current&&setTimeout(()=>n(t.current));const i=a=>{a.key==="Tab"&&t.current&&Fte(t.current,a)};return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i),r.current&&r.current()}},[e]),o}const Lte=ae["useId".toString()]||(()=>{});function zte(){const e=Lte();return e?`mantine-${e.replace(/:/g,"")}`:""}function Ul(e){const t=zte(),[r,n]=$.useState(t);return e_(()=>{n(t_())},[]),typeof e=="string"?e:typeof window>"u"?t:r}function sp(e,t,r){$.useEffect(()=>(window.addEventListener(e,t,r),()=>window.removeEventListener(e,t,r)),[e,t])}function Ute(e,t){try{return JSON.stringify(e)}catch{throw new Error(`@mantine/hooks ${t}: Failed to serialize the value`)}}function Hte(e){try{return JSON.parse(e)}catch{return e}}function Vte(e,t){const r=e==="localStorage"?"mantine-local-storage":"mantine-session-storage";return function({key:o,defaultValue:i=void 0,getInitialValueInEffect:a=!0,deserialize:s=Hte,serialize:l=c=>Ute(c,t)}){const c=$.useCallback(h=>{if(typeof window>"u"||!(e in window)||window[e]===null||h)return i;const m=window[e].getItem(o);return m!==null?s(m):i},[o,i]),[u,f]=$.useState(c(a)),d=$.useCallback(h=>{h instanceof Function?f(m=>{const _=h(m);return window[e].setItem(o,l(_)),window.dispatchEvent(new CustomEvent(r,{detail:{key:o,value:h(m)}})),_}):(window[e].setItem(o,l(h)),window.dispatchEvent(new CustomEvent(r,{detail:{key:o,value:h}})),f(h))},[o]),p=$.useCallback(()=>{window[e].removeItem(o),window.dispatchEvent(new CustomEvent(r,{detail:{key:o,value:i}}))},[]);return sp("storage",h=>{var m;h.storageArea===window[e]&&h.key===o&&f(s((m=h.newValue)!=null?m:void 0))}),sp(r,h=>{h.detail.key===o&&f(h.detail.value)}),$.useEffect(()=>{i!==void 0&&u===void 0&&d(i)},[i,u,d]),$.useEffect(()=>{a&&f(c())},[o]),[u===void 0?i:u,d,p]}}function vR(e){return Vte("localStorage","use-local-storage")(e)}function gR(e,t){typeof e=="function"?e(t):typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function mR(...e){return t=>{e.forEach(r=>gR(r,t))}}function Vs(...e){return $.useCallback(mR(...e),e)}function Wte(e,t,r="ltr"){const n=$.useRef(),o=$.useRef(!1),i=$.useRef(!1),a=$.useRef(0),[s,l]=$.useState(!1);return $.useEffect(()=>{o.current=!0},[]),$.useEffect(()=>{const c=({x:y,y:C})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(o.current&&n.current){n.current.style.userSelect="none";const I=n.current.getBoundingClientRect();if(I.width&&I.height){const F=bs((y-I.left)/I.width,0,1);e({x:r==="ltr"?F:1-F,y:bs((C-I.top)/I.height,0,1)})}}})},u=()=>{document.addEventListener("mousemove",m),document.addEventListener("mouseup",p),document.addEventListener("touchmove",w),document.addEventListener("touchend",p)},f=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",p),document.removeEventListener("touchmove",w),document.removeEventListener("touchend",p)},d=()=>{!i.current&&o.current&&(i.current=!0,typeof(t==null?void 0:t.onScrubStart)=="function"&&t.onScrubStart(),l(!0),u())},p=()=>{i.current&&o.current&&(i.current=!1,l(!1),f(),setTimeout(()=>{typeof(t==null?void 0:t.onScrubEnd)=="function"&&t.onScrubEnd()},0))},h=y=>{d(),y.preventDefault(),m(y)},m=y=>c({x:y.clientX,y:y.clientY}),_=y=>{y.cancelable&&y.preventDefault(),d(),w(y)},w=y=>{y.cancelable&&y.preventDefault(),c({x:y.changedTouches[0].clientX,y:y.changedTouches[0].clientY})};return n.current.addEventListener("mousedown",h),n.current.addEventListener("touchstart",_,{passive:!1}),()=>{n.current&&(n.current.removeEventListener("mousedown",h),n.current.removeEventListener("touchstart",_))}},[r,e]),{ref:n,active:s}}function Ml({value:e,defaultValue:t,finalValue:r,onChange:n=()=>{}}){const[o,i]=$.useState(t!==void 0?t:r),a=s=>{i(s),n==null||n(s)};return e!==void 0?[e,n,!0]:[o,a,!1]}function sy(e,t){return Tte("(prefers-reduced-motion: reduce)",e,t)}const qte=e=>e<.5?2*e*e:-1+(4-2*e)*e,Gte=({axis:e,target:t,parent:r,alignment:n,offset:o,isList:i})=>{if(!t||!r&&typeof document>"u")return 0;const a=!!r,l=(r||document.body).getBoundingClientRect(),c=t.getBoundingClientRect(),u=f=>c[f]-l[f];if(e==="y"){const f=u("top");if(f===0)return 0;if(n==="start"){const p=f-o;return p<=c.height*(i?0:1)||!i?p:0}const d=a?l.height:window.innerHeight;if(n==="end"){const p=f+o-d+c.height;return p>=-c.height*(i?0:1)||!i?p:0}return n==="center"?f-d/2+c.height/2:0}if(e==="x"){const f=u("left");if(f===0)return 0;if(n==="start"){const p=f-o;return p<=c.width||!i?p:0}const d=a?l.width:window.innerWidth;if(n==="end"){const p=f+o-d+c.width;return p>=-c.width||!i?p:0}return n==="center"?f-d/2+c.width/2:0}return 0},Kte=({axis:e,parent:t})=>{if(!t&&typeof document>"u")return 0;const r=e==="y"?"scrollTop":"scrollLeft";if(t)return t[r];const{body:n,documentElement:o}=document;return n[r]+o[r]},Yte=({axis:e,parent:t,distance:r})=>{if(!t&&typeof document>"u")return;const n=e==="y"?"scrollTop":"scrollLeft";if(t)t[n]=r;else{const{body:o,documentElement:i}=document;o[n]=r,i[n]=r}};function Xte({duration:e=1250,axis:t="y",onScrollFinish:r,easing:n=qte,offset:o=0,cancelable:i=!0,isList:a=!1}={}){const s=$.useRef(0),l=$.useRef(0),c=$.useRef(!1),u=$.useRef(null),f=$.useRef(null),d=sy(),p=()=>{s.current&&cancelAnimationFrame(s.current)},h=$.useCallback(({alignment:_="start"}={})=>{var w;c.current=!1,s.current&&p();const y=(w=Kte({parent:u.current,axis:t}))!=null?w:0,C=Gte({parent:u.current,target:f.current,axis:t,alignment:_,offset:o,isList:a})-(u.current?0:y);function I(){l.current===0&&(l.current=performance.now());const O=performance.now()-l.current,g=d||e===0?1:O/e,D=y+C*n(g);Yte({parent:u.current,axis:t,distance:D}),!c.current&&g<1?s.current=requestAnimationFrame(I):(typeof r=="function"&&r(),l.current=0,s.current=0,p())}I()},[t,e,n,a,o,r,d]),m=()=>{i&&(c.current=!0)};return sp("wheel",m,{passive:!0}),sp("touchmove",m,{passive:!0}),$.useEffect(()=>p,[]),{scrollableRef:u,targetRef:f,scrollIntoView:h,cancel:p}}var Zte=Object.defineProperty,Jte=Object.defineProperties,Qte=Object.getOwnPropertyDescriptors,QS=Object.getOwnPropertySymbols,ere=Object.prototype.hasOwnProperty,tre=Object.prototype.propertyIsEnumerable,e9=(e,t,r)=>t in e?Zte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rre=(e,t)=>{for(var r in t||(t={}))ere.call(t,r)&&e9(e,r,t[r]);if(QS)for(var r of QS(t))tre.call(t,r)&&e9(e,r,t[r]);return e},nre=(e,t)=>Jte(e,Qte(t));function ore(e){const t=e.toLowerCase().split("+").map(i=>i.trim()),r={alt:t.includes("alt"),ctrl:t.includes("ctrl"),meta:t.includes("meta"),mod:t.includes("mod"),shift:t.includes("shift")},n=["alt","ctrl","meta","shift","mod"],o=t.find(i=>!n.includes(i));return nre(rre({},r),{key:o})}function ire(e,t){const{alt:r,ctrl:n,meta:o,mod:i,shift:a,key:s}=e,{altKey:l,ctrlKey:c,metaKey:u,shiftKey:f,key:d}=t;if(r!==l)return!1;if(i){if(!c&&!u)return!1}else if(n!==c||o!==u)return!1;return a!==f?!1:!!(s&&(d.toLowerCase()===s.toLowerCase()||t.code.replace("Key","").toLowerCase()===s.toLowerCase()))}function are(e){return t=>ire(ore(e),t)}function sre(e,t,r=!1){return e.target instanceof HTMLElement?(r||!e.target.isContentEditable)&&!t.includes(e.target.tagName):!0}function lre(e,t=["INPUT","TEXTAREA","SELECT"],r=!1){$.useEffect(()=>{const n=o=>{e.forEach(([i,a,s={preventDefault:!0}])=>{are(i)(o)&&sre(o,t,r)&&(s.preventDefault&&o.preventDefault(),a(o))})};return document.documentElement.addEventListener("keydown",n),()=>document.documentElement.removeEventListener("keydown",n)},[e])}function t9(){if(typeof window>"u")return"undetermined";const{userAgent:e}=window.navigator,t=/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i,r=/(Win32)|(Win64)|(Windows)|(WinCE)/i,n=/(iPhone)|(iPad)|(iPod)/i;return t.test(e)?"macos":n.test(e)?"ios":r.test(e)?"windows":/Android/i.test(e)?"android":/Linux/i.test(e)?"linux":"undetermined"}function cre(e={getValueInEffect:!0}){const[t,r]=$.useState(e.getValueInEffect?"undetermined":t9());return e_(()=>{e.getValueInEffect&&r(t9)},[]),t}function yR(e=!1,t){const{onOpen:r,onClose:n}=t||{},[o,i]=$.useState(e),a=$.useCallback(()=>{i(c=>c||(r==null||r(),!0))},[r]),s=$.useCallback(()=>{i(c=>c&&(n==null||n(),!1))},[n]),l=$.useCallback(()=>{o?s():a()},[s,a,o]);return[o,{open:a,close:s,toggle:l}]}var r9=Object.getOwnPropertySymbols,ure=Object.prototype.hasOwnProperty,fre=Object.prototype.propertyIsEnumerable,dre=(e,t)=>{var r={};for(var n in e)ure.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&r9)for(var n of r9(e))t.indexOf(n)<0&&fre.call(e,n)&&(r[n]=e[n]);return r};function Bu(e){const t=e,{m:r,mx:n,my:o,mt:i,mb:a,ml:s,mr:l,p:c,px:u,py:f,pt:d,pb:p,pl:h,pr:m,bg:_,c:w,opacity:y,ff:C,fz:I,fw:F,lts:O,ta:g,lh:D,fs:H,tt:G,td:V,w:P,miw:S,maw:v,h:b,mih:B,mah:M,bgsz:j,bgp:U,bgr:E,bga:N,pos:T,top:q,left:J,bottom:te,right:ne,inset:ce,display:ie}=t,ue=dre(t,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:oR({m:r,mx:n,my:o,mt:i,mb:a,ml:s,mr:l,p:c,px:u,py:f,pt:d,pb:p,pl:h,pr:m,bg:_,c:w,opacity:y,ff:C,fz:I,fw:F,lts:O,ta:g,lh:D,fs:H,tt:G,td:V,w:P,miw:S,maw:v,h:b,mih:B,mah:M,bgsz:j,bgp:U,bgr:E,bga:N,pos:T,top:q,left:J,bottom:te,right:ne,inset:ce,display:ie}),rest:ue}}function pre(e,t){const r=Object.keys(e).filter(n=>n!=="base").sort((n,o)=>xo(Re({size:n,sizes:t.breakpoints}))-xo(Re({size:o,sizes:t.breakpoints})));return"base"in e?["base",...r]:r}function hre({value:e,theme:t,getValue:r,property:n}){if(e==null)return;if(typeof e=="object")return pre(e,t).reduce((a,s)=>{if(s==="base"&&e.base!==void 0){const c=r(e.base,t);return Array.isArray(n)?(n.forEach(u=>{a[u]=c}),a):(a[n]=c,a)}const l=r(e[s],t);return Array.isArray(n)?(a[t.fn.largerThan(s)]={},n.forEach(c=>{a[t.fn.largerThan(s)][c]=l}),a):(a[t.fn.largerThan(s)]={[n]:l},a)},{});const o=r(e,t);return Array.isArray(n)?n.reduce((i,a)=>(i[a]=o,i),{}):{[n]:o}}function vre(e,t){return e==="dimmed"?t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]:t.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background}function gre(e){return me(e)}function mre(e){return e}function yre(e,t){return Re({size:e,sizes:t.fontSizes})}const bre=["-xs","-sm","-md","-lg","-xl"];function wre(e,t){return bre.includes(e)?`calc(${Re({size:e.replace("-",""),sizes:t.spacing})} * -1)`:Re({size:e,sizes:t.spacing})}const xre={identity:mre,color:vre,size:gre,fontSize:yre,spacing:wre},_re={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"identity",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"identity",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"}};var Ere=Object.defineProperty,n9=Object.getOwnPropertySymbols,Sre=Object.prototype.hasOwnProperty,Cre=Object.prototype.propertyIsEnumerable,o9=(e,t,r)=>t in e?Ere(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,i9=(e,t)=>{for(var r in t||(t={}))Sre.call(t,r)&&o9(e,r,t[r]);if(n9)for(var r of n9(t))Cre.call(t,r)&&o9(e,r,t[r]);return e};function a9(e,t,r=_re){return Object.keys(r).reduce((o,i)=>(i in e&&e[i]!==void 0&&o.push(hre({value:e[i],getValue:xre[r[i].type],property:r[i].property,theme:t})),o),[]).reduce((o,i)=>(Object.keys(i).forEach(a=>{typeof i[a]=="object"&&i[a]!==null&&a in o?o[a]=i9(i9({},o[a]),i[a]):o[a]=i[a]}),o),{})}function s9(e,t){return typeof e=="function"?e(t):e}function Pre(e,t,r){const n=Lr(),{css:o,cx:i}=cR();return Array.isArray(e)?i(r,o(a9(t,n)),e.map(a=>o(s9(a,n)))):i(r,o(s9(e,n)),o(a9(t,n)))}var Ore=Object.defineProperty,J1=Object.getOwnPropertySymbols,bR=Object.prototype.hasOwnProperty,wR=Object.prototype.propertyIsEnumerable,l9=(e,t,r)=>t in e?Ore(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Are=(e,t)=>{for(var r in t||(t={}))bR.call(t,r)&&l9(e,r,t[r]);if(J1)for(var r of J1(t))wR.call(t,r)&&l9(e,r,t[r]);return e},kre=(e,t)=>{var r={};for(var n in e)bR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&J1)for(var n of J1(e))t.indexOf(n)<0&&wR.call(e,n)&&(r[n]=e[n]);return r};const xR=$.forwardRef((e,t)=>{var r=e,{className:n,component:o,style:i,sx:a}=r,s=kre(r,["className","component","style","sx"]);const{systemStyles:l,rest:c}=Bu(s),u=o||"div";return ae.createElement(u,Are({ref:t,className:Pre(a,l,n),style:i},c))});xR.displayName="@mantine/core/Box";const rt=xR;var Ire=Object.defineProperty,$re=Object.defineProperties,Tre=Object.getOwnPropertyDescriptors,c9=Object.getOwnPropertySymbols,Dre=Object.prototype.hasOwnProperty,Mre=Object.prototype.propertyIsEnumerable,u9=(e,t,r)=>t in e?Ire(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f9=(e,t)=>{for(var r in t||(t={}))Dre.call(t,r)&&u9(e,r,t[r]);if(c9)for(var r of c9(t))Mre.call(t,r)&&u9(e,r,t[r]);return e},Rre=(e,t)=>$re(e,Tre(t)),Nre=at(e=>({root:Rre(f9(f9({},e.fn.focusStyles()),e.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"})}));const Fre=Nre;var Bre=Object.defineProperty,Q1=Object.getOwnPropertySymbols,_R=Object.prototype.hasOwnProperty,ER=Object.prototype.propertyIsEnumerable,d9=(e,t,r)=>t in e?Bre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jre=(e,t)=>{for(var r in t||(t={}))_R.call(t,r)&&d9(e,r,t[r]);if(Q1)for(var r of Q1(t))ER.call(t,r)&&d9(e,r,t[r]);return e},Lre=(e,t)=>{var r={};for(var n in e)_R.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Q1)for(var n of Q1(e))t.indexOf(n)<0&&ER.call(e,n)&&(r[n]=e[n]);return r};const SR=$.forwardRef((e,t)=>{const r=et("UnstyledButton",{},e),{className:n,component:o="button",unstyled:i,variant:a}=r,s=Lre(r,["className","component","unstyled","variant"]),{classes:l,cx:c}=Fre(null,{name:"UnstyledButton",unstyled:i,variant:a});return ae.createElement(rt,jre({component:o,ref:t,className:c(l.root,n),type:o==="button"?"button":void 0},s))});SR.displayName="@mantine/core/UnstyledButton";const Hp=SR;var zre=Object.defineProperty,Ure=Object.defineProperties,Hre=Object.getOwnPropertyDescriptors,ev=Object.getOwnPropertySymbols,CR=Object.prototype.hasOwnProperty,PR=Object.prototype.propertyIsEnumerable,p9=(e,t,r)=>t in e?zre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,el=(e,t)=>{for(var r in t||(t={}))CR.call(t,r)&&p9(e,r,t[r]);if(ev)for(var r of ev(t))PR.call(t,r)&&p9(e,r,t[r]);return e},d2=(e,t)=>Ure(e,Hre(t)),Vre=(e,t)=>{var r={};for(var n in e)CR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ev)for(var n of ev(e))t.indexOf(n)<0&&PR.call(e,n)&&(r[n]=e[n]);return r};function Wre(e){if(!e||typeof e=="string")return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function p2(e){return e!=null&&e.current?e.current.scrollHeight:"auto"}const r0=typeof window<"u"&&window.requestAnimationFrame;function qre({transitionDuration:e,transitionTimingFunction:t="ease",onTransitionEnd:r=()=>{},opened:n}){const o=$.useRef(null),i=0,a={display:"none",height:0,overflow:"hidden"},[s,l]=$.useState(n?{}:a),c=h=>{Us.flushSync(()=>l(h))},u=h=>{c(m=>el(el({},m),h))};function f(h){return{transition:`height ${e||Wre(h)}ms ${t}`}}Jo(()=>{r0(n?()=>{u({willChange:"height",display:"block",overflow:"hidden"}),r0(()=>{const h=p2(o);u(d2(el({},f(h)),{height:h}))})}:()=>{const h=p2(o);u(d2(el({},f(h)),{willChange:"height",height:h})),r0(()=>u({height:i,overflow:"hidden"}))})},[n]);const d=h=>{if(!(h.target!==o.current||h.propertyName!=="height"))if(n){const m=p2(o);m===s.height?c({}):u({height:m}),r()}else s.height===i&&(c(a),r())};function p(h={}){var m=h,{style:_={},refKey:w="ref"}=m,y=Vre(m,["style","refKey"]);const C=y[w];return d2(el({"aria-hidden":!n},y),{[w]:mR(o,C),onTransitionEnd:d,style:el(el({boxSizing:"border-box"},_),s)})}return p}var Gre=Object.defineProperty,tv=Object.getOwnPropertySymbols,OR=Object.prototype.hasOwnProperty,AR=Object.prototype.propertyIsEnumerable,h9=(e,t,r)=>t in e?Gre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,n0=(e,t)=>{for(var r in t||(t={}))OR.call(t,r)&&h9(e,r,t[r]);if(tv)for(var r of tv(t))AR.call(t,r)&&h9(e,r,t[r]);return e},Kre=(e,t)=>{var r={};for(var n in e)OR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&tv)for(var n of tv(e))t.indexOf(n)<0&&AR.call(e,n)&&(r[n]=e[n]);return r};const Yre={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},kR=$.forwardRef((e,t)=>{const r=et("Collapse",Yre,e),{children:n,in:o,transitionDuration:i,transitionTimingFunction:a,style:s,onTransitionEnd:l,animateOpacity:c}=r,u=Kre(r,["children","in","transitionDuration","transitionTimingFunction","style","onTransitionEnd","animateOpacity"]),f=Lr(),d=sy(),h=(f.respectReducedMotion?d:!1)?0:i,{systemStyles:m,rest:_}=Bu(u),w=qre({opened:o,transitionDuration:h,transitionTimingFunction:a,onTransitionEnd:l});return h===0?o?ae.createElement(rt,n0({},_),n):null:ae.createElement(rt,n0({},w(n0(n0({style:s,ref:t},_),m))),ae.createElement("div",{style:{opacity:o||!c?1:0,transition:c?`opacity ${h}ms ${a}`:"none"}},n))});kR.displayName="@mantine/core/Collapse";var Xre=Object.defineProperty,Zre=Object.defineProperties,Jre=Object.getOwnPropertyDescriptors,v9=Object.getOwnPropertySymbols,Qre=Object.prototype.hasOwnProperty,ene=Object.prototype.propertyIsEnumerable,g9=(e,t,r)=>t in e?Xre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,r3=(e,t)=>{for(var r in t||(t={}))Qre.call(t,r)&&g9(e,r,t[r]);if(v9)for(var r of v9(t))ene.call(t,r)&&g9(e,r,t[r]);return e},m9=(e,t)=>Zre(e,Jre(t));const tne=["subtle","filled","outline","light","default","transparent","gradient"],o0={xs:me(18),sm:me(22),md:me(28),lg:me(34),xl:me(44)};function rne({variant:e,theme:t,color:r,gradient:n}){const o=t.fn.variant({color:r,variant:e,gradient:n});return e==="gradient"?{border:0,backgroundImage:o.background,color:o.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:tne.includes(e)?r3({border:`${me(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover})):null}var nne=at((e,{radius:t,color:r,gradient:n},{variant:o,size:i})=>({root:m9(r3({position:"relative",borderRadius:e.fn.radius(t),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:Re({size:i,sizes:o0}),minHeight:Re({size:i,sizes:o0}),width:Re({size:i,sizes:o0}),minWidth:Re({size:i,sizes:o0})},rne({variant:o,theme:e,color:r,gradient:n})),{"&:active":e.activeStyles,"& [data-action-icon-loader]":{maxWidth:"70%"},"&:disabled, &[data-disabled]":{color:e.colors.gray[e.colorScheme==="dark"?6:4],cursor:"not-allowed",backgroundColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),borderColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":m9(r3({content:'""'},e.fn.cover(me(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}})}));const one=nne;var ine=Object.defineProperty,rv=Object.getOwnPropertySymbols,IR=Object.prototype.hasOwnProperty,$R=Object.prototype.propertyIsEnumerable,y9=(e,t,r)=>t in e?ine(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b9=(e,t)=>{for(var r in t||(t={}))IR.call(t,r)&&y9(e,r,t[r]);if(rv)for(var r of rv(t))$R.call(t,r)&&y9(e,r,t[r]);return e},w9=(e,t)=>{var r={};for(var n in e)IR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&rv)for(var n of rv(e))t.indexOf(n)<0&&$R.call(e,n)&&(r[n]=e[n]);return r};function ane(e){var t=e,{size:r,color:n}=t,o=w9(t,["size","color"]);const i=o,{style:a}=i,s=w9(i,["style"]);return ae.createElement("svg",b9({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:n,style:b9({width:r},a)},s),ae.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},ae.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),ae.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),ae.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},ae.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),ae.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),ae.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},ae.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),ae.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),ae.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},ae.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),ae.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),ae.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},ae.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),ae.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var sne=Object.defineProperty,nv=Object.getOwnPropertySymbols,TR=Object.prototype.hasOwnProperty,DR=Object.prototype.propertyIsEnumerable,x9=(e,t,r)=>t in e?sne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_9=(e,t)=>{for(var r in t||(t={}))TR.call(t,r)&&x9(e,r,t[r]);if(nv)for(var r of nv(t))DR.call(t,r)&&x9(e,r,t[r]);return e},E9=(e,t)=>{var r={};for(var n in e)TR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&nv)for(var n of nv(e))t.indexOf(n)<0&&DR.call(e,n)&&(r[n]=e[n]);return r};function lne(e){var t=e,{size:r,color:n}=t,o=E9(t,["size","color"]);const i=o,{style:a}=i,s=E9(i,["style"]);return ae.createElement("svg",_9({viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:n,style:_9({width:r,height:r},a)},s),ae.createElement("g",{fill:"none",fillRule:"evenodd"},ae.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},ae.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),ae.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},ae.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var cne=Object.defineProperty,ov=Object.getOwnPropertySymbols,MR=Object.prototype.hasOwnProperty,RR=Object.prototype.propertyIsEnumerable,S9=(e,t,r)=>t in e?cne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,C9=(e,t)=>{for(var r in t||(t={}))MR.call(t,r)&&S9(e,r,t[r]);if(ov)for(var r of ov(t))RR.call(t,r)&&S9(e,r,t[r]);return e},P9=(e,t)=>{var r={};for(var n in e)MR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ov)for(var n of ov(e))t.indexOf(n)<0&&RR.call(e,n)&&(r[n]=e[n]);return r};function une(e){var t=e,{size:r,color:n}=t,o=P9(t,["size","color"]);const i=o,{style:a}=i,s=P9(i,["style"]);return ae.createElement("svg",C9({viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:n,style:C9({width:r},a)},s),ae.createElement("circle",{cx:"15",cy:"15",r:"15"},ae.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),ae.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),ae.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},ae.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),ae.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),ae.createElement("circle",{cx:"105",cy:"15",r:"15"},ae.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),ae.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var fne=Object.defineProperty,iv=Object.getOwnPropertySymbols,NR=Object.prototype.hasOwnProperty,FR=Object.prototype.propertyIsEnumerable,O9=(e,t,r)=>t in e?fne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dne=(e,t)=>{for(var r in t||(t={}))NR.call(t,r)&&O9(e,r,t[r]);if(iv)for(var r of iv(t))FR.call(t,r)&&O9(e,r,t[r]);return e},pne=(e,t)=>{var r={};for(var n in e)NR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&iv)for(var n of iv(e))t.indexOf(n)<0&&FR.call(e,n)&&(r[n]=e[n]);return r};const h2={bars:ane,oval:lne,dots:une},hne={xs:me(18),sm:me(22),md:me(36),lg:me(44),xl:me(58)},vne={size:"md"};function uu(e){const t=et("Loader",vne,e),{size:r,color:n,variant:o}=t,i=pne(t,["size","color","variant"]),a=Lr(),s=o in h2?o:a.loader;return ae.createElement(rt,dne({role:"presentation",component:h2[s]||h2.bars,size:Re({size:r,sizes:hne}),color:a.fn.variant({variant:"filled",primaryFallback:!1,color:n||a.primaryColor}).background},i))}uu.displayName="@mantine/core/Loader";var gne=Object.defineProperty,av=Object.getOwnPropertySymbols,BR=Object.prototype.hasOwnProperty,jR=Object.prototype.propertyIsEnumerable,A9=(e,t,r)=>t in e?gne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k9=(e,t)=>{for(var r in t||(t={}))BR.call(t,r)&&A9(e,r,t[r]);if(av)for(var r of av(t))jR.call(t,r)&&A9(e,r,t[r]);return e},mne=(e,t)=>{var r={};for(var n in e)BR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&av)for(var n of av(e))t.indexOf(n)<0&&jR.call(e,n)&&(r[n]=e[n]);return r};const yne={color:"gray",size:"md",variant:"subtle"},LR=$.forwardRef((e,t)=>{const r=et("ActionIcon",yne,e),{className:n,color:o,children:i,radius:a,size:s,variant:l,gradient:c,disabled:u,loaderProps:f,loading:d,unstyled:p,__staticSelector:h}=r,m=mne(r,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:_,cx:w,theme:y}=one({radius:a,color:o,gradient:c},{name:["ActionIcon",h],unstyled:p,size:s,variant:l}),C=ae.createElement(uu,k9({color:y.fn.variant({color:o,variant:l}).color,size:"100%","data-action-icon-loader":!0},f));return ae.createElement(Hp,k9({className:w(_.root,n),ref:t,disabled:u,"data-disabled":u||void 0,"data-loading":d||void 0,unstyled:p},m),d?C:i)});LR.displayName="@mantine/core/ActionIcon";const sv=LR;var bne=Object.defineProperty,wne=Object.defineProperties,xne=Object.getOwnPropertyDescriptors,lv=Object.getOwnPropertySymbols,zR=Object.prototype.hasOwnProperty,UR=Object.prototype.propertyIsEnumerable,I9=(e,t,r)=>t in e?bne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_ne=(e,t)=>{for(var r in t||(t={}))zR.call(t,r)&&I9(e,r,t[r]);if(lv)for(var r of lv(t))UR.call(t,r)&&I9(e,r,t[r]);return e},Ene=(e,t)=>wne(e,xne(t)),Sne=(e,t)=>{var r={};for(var n in e)zR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&lv)for(var n of lv(e))t.indexOf(n)<0&&UR.call(e,n)&&(r[n]=e[n]);return r};function HR(e){const t=et("Portal",{},e),{children:r,target:n,className:o,innerRef:i}=t,a=Sne(t,["children","target","className","innerRef"]),s=Lr(),[l,c]=$.useState(!1),u=$.useRef();return e_(()=>(c(!0),u.current=n?typeof n=="string"?document.querySelector(n):n:document.createElement("div"),n||document.body.appendChild(u.current),()=>{!n&&document.body.removeChild(u.current)}),[n]),l?Us.createPortal(ae.createElement("div",Ene(_ne({className:o,dir:s.dir},a),{ref:i}),r),u.current):null}HR.displayName="@mantine/core/Portal";var Cne=Object.defineProperty,cv=Object.getOwnPropertySymbols,VR=Object.prototype.hasOwnProperty,WR=Object.prototype.propertyIsEnumerable,$9=(e,t,r)=>t in e?Cne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Pne=(e,t)=>{for(var r in t||(t={}))VR.call(t,r)&&$9(e,r,t[r]);if(cv)for(var r of cv(t))WR.call(t,r)&&$9(e,r,t[r]);return e},One=(e,t)=>{var r={};for(var n in e)VR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&cv)for(var n of cv(e))t.indexOf(n)<0&&WR.call(e,n)&&(r[n]=e[n]);return r};function Vp(e){var t=e,{withinPortal:r=!0,children:n}=t,o=One(t,["withinPortal","children"]);return r?ae.createElement(HR,Pne({},o),n):ae.createElement(ae.Fragment,null,n)}Vp.displayName="@mantine/core/OptionalPortal";var Ane=Object.defineProperty,kne=Object.defineProperties,Ine=Object.getOwnPropertyDescriptors,T9=Object.getOwnPropertySymbols,$ne=Object.prototype.hasOwnProperty,Tne=Object.prototype.propertyIsEnumerable,D9=(e,t,r)=>t in e?Ane(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,v2=(e,t)=>{for(var r in t||(t={}))$ne.call(t,r)&&D9(e,r,t[r]);if(T9)for(var r of T9(t))Tne.call(t,r)&&D9(e,r,t[r]);return e},M9=(e,t)=>kne(e,Ine(t));function Dne({variant:e,color:t,theme:r}){if(e==="filled")return{backgroundColor:r.fn.variant({variant:"filled",color:t}).background,color:r.white};if(e==="outline"){const n=r.fn.variant({variant:"outline",color:t});return{color:n.color,borderColor:n.border,backgroundColor:r.colorScheme==="dark"?r.colors.dark[6]:r.white}}if(e==="light"){const n=r.fn.variant({variant:"light",color:t});return{backgroundColor:n.background,color:n.color}}return null}var Mne=at((e,{radius:t,color:r},{variant:n})=>({root:v2(M9(v2({},e.fn.fontStyles()),{position:"relative",overflow:"hidden",paddingTop:e.spacing.sm,paddingBottom:e.spacing.sm,paddingLeft:e.spacing.md,paddingRight:e.spacing.sm,borderRadius:e.fn.radius(t),border:`${me(1)} solid transparent`}),Dne({variant:n,color:r,theme:e})),wrapper:{display:"flex"},body:{flex:1},title:{boxSizing:"border-box",margin:0,marginBottom:e.spacing.xs,display:"flex",alignItems:"center",justifyContent:"space-between",lineHeight:e.lineHeight,fontSize:e.fontSizes.sm,fontWeight:700,"&[data-with-close-button]":{paddingRight:e.spacing.md}},label:{display:"block",overflow:"hidden",textOverflow:"ellipsis"},icon:{lineHeight:1,width:me(20),height:me(20),display:"flex",alignItems:"center",justifyContent:"flex-start",marginRight:e.spacing.md,marginTop:1},message:M9(v2({},e.fn.fontStyles()),{lineHeight:e.lineHeight,textOverflow:"ellipsis",overflow:"hidden",fontSize:e.fontSizes.sm,color:n==="filled"?e.white:e.colorScheme==="dark"?n==="light"?e.white:e.colors.dark[0]:e.black}),closeButton:{width:me(10),height:me(10),color:n==="filled"?e.white:e.colorScheme==="dark"?n==="light"?e.white:e.colors.dark[0]:e.black}}));const Rne=Mne;var Nne=Object.defineProperty,uv=Object.getOwnPropertySymbols,qR=Object.prototype.hasOwnProperty,GR=Object.prototype.propertyIsEnumerable,R9=(e,t,r)=>t in e?Nne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N9=(e,t)=>{for(var r in t||(t={}))qR.call(t,r)&&R9(e,r,t[r]);if(uv)for(var r of uv(t))GR.call(t,r)&&R9(e,r,t[r]);return e},Fne=(e,t)=>{var r={};for(var n in e)qR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&uv)for(var n of uv(e))t.indexOf(n)<0&&GR.call(e,n)&&(r[n]=e[n]);return r};function KR(e){const t=e,{width:r,height:n,style:o}=t,i=Fne(t,["width","height","style"]);return ae.createElement("svg",N9({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:N9({width:r,height:n},o)},i),ae.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}KR.displayName="@mantine/core/CloseIcon";var Bne=Object.defineProperty,fv=Object.getOwnPropertySymbols,YR=Object.prototype.hasOwnProperty,XR=Object.prototype.propertyIsEnumerable,F9=(e,t,r)=>t in e?Bne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jne=(e,t)=>{for(var r in t||(t={}))YR.call(t,r)&&F9(e,r,t[r]);if(fv)for(var r of fv(t))XR.call(t,r)&&F9(e,r,t[r]);return e},Lne=(e,t)=>{var r={};for(var n in e)YR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&fv)for(var n of fv(e))t.indexOf(n)<0&&XR.call(e,n)&&(r[n]=e[n]);return r};const zne={xs:me(12),sm:me(16),md:me(20),lg:me(28),xl:me(34)},Une={size:"sm"},ZR=$.forwardRef((e,t)=>{const r=et("CloseButton",Une,e),{iconSize:n,size:o,children:i}=r,a=Lne(r,["iconSize","size","children"]),s=me(n||zne[o]);return ae.createElement(sv,jne({ref:t,__staticSelector:"CloseButton",size:o},a),i||ae.createElement(KR,{width:s,height:s}))});ZR.displayName="@mantine/core/CloseButton";const r_=ZR;var Hne=Object.defineProperty,dv=Object.getOwnPropertySymbols,JR=Object.prototype.hasOwnProperty,QR=Object.prototype.propertyIsEnumerable,B9=(e,t,r)=>t in e?Hne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Vne=(e,t)=>{for(var r in t||(t={}))JR.call(t,r)&&B9(e,r,t[r]);if(dv)for(var r of dv(t))QR.call(t,r)&&B9(e,r,t[r]);return e},Wne=(e,t)=>{var r={};for(var n in e)JR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&dv)for(var n of dv(e))t.indexOf(n)<0&&QR.call(e,n)&&(r[n]=e[n]);return r};const qne={variant:"light"},eN=$.forwardRef((e,t)=>{const r=et("Alert",qne,e),{id:n,className:o,title:i,variant:a,children:s,color:l,classNames:c,icon:u,styles:f,onClose:d,radius:p,withCloseButton:h,closeButtonLabel:m,unstyled:_}=r,w=Wne(r,["id","className","title","variant","children","color","classNames","icon","styles","onClose","radius","withCloseButton","closeButtonLabel","unstyled"]),{classes:y,cx:C}=Rne({color:l,radius:p},{classNames:c,styles:f,unstyled:_,variant:a,name:"Alert"}),I=Ul(n),F=i&&`${I}-title`,O=`${I}-body`;return ae.createElement(rt,Vne({id:I,role:"alert","aria-labelledby":F,"aria-describedby":O,className:C(y.root,y[a],o),ref:t},w),ae.createElement("div",{className:y.wrapper},u&&ae.createElement("div",{className:y.icon},u),ae.createElement("div",{className:y.body},i&&ae.createElement("div",{className:y.title,"data-with-close-button":h||void 0},ae.createElement("span",{id:F,className:y.label},i)),ae.createElement("div",{id:O,className:y.message},s)),h&&ae.createElement(r_,{className:y.closeButton,onClick:d,variant:"transparent",size:16,iconSize:16,"aria-label":m})))});eN.displayName="@mantine/core/Alert";var Gne=Object.defineProperty,Kne=Object.defineProperties,Yne=Object.getOwnPropertyDescriptors,j9=Object.getOwnPropertySymbols,Xne=Object.prototype.hasOwnProperty,Zne=Object.prototype.propertyIsEnumerable,L9=(e,t,r)=>t in e?Gne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,i0=(e,t)=>{for(var r in t||(t={}))Xne.call(t,r)&&L9(e,r,t[r]);if(j9)for(var r of j9(t))Zne.call(t,r)&&L9(e,r,t[r]);return e},Jne=(e,t)=>Kne(e,Yne(t));function Qne({underline:e,strikethrough:t}){const r=[];return e&&r.push("underline"),t&&r.push("line-through"),r.length>0?r.join(" "):"none"}function eoe({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?e.fn.variant({variant:"filled",color:t}).background:t||"inherit"}function toe(e){return typeof e=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}:null}function roe({theme:e,truncate:t}){return t==="start"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",direction:e.dir==="ltr"?"rtl":"ltr",textAlign:e.dir==="ltr"?"right":"left"}:t?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:null}var noe=at((e,{color:t,lineClamp:r,truncate:n,inline:o,inherit:i,underline:a,gradient:s,weight:l,transform:c,align:u,strikethrough:f,italic:d},{size:p})=>{const h=e.fn.variant({variant:"gradient",gradient:s});return{root:Jne(i0(i0(i0(i0({},e.fn.fontStyles()),e.fn.focusStyles()),toe(r)),roe({theme:e,truncate:n})),{color:eoe({color:t,theme:e}),fontFamily:i?"inherit":e.fontFamily,fontSize:i||p===void 0?"inherit":Re({size:p,sizes:e.fontSizes}),lineHeight:i?"inherit":o?1:e.lineHeight,textDecoration:Qne({underline:a,strikethrough:f}),WebkitTapHighlightColor:"transparent",fontWeight:i?"inherit":l,textTransform:c,textAlign:u,fontStyle:d?"italic":void 0}),gradient:{backgroundImage:h.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}});const ooe=noe;var ioe=Object.defineProperty,pv=Object.getOwnPropertySymbols,tN=Object.prototype.hasOwnProperty,rN=Object.prototype.propertyIsEnumerable,z9=(e,t,r)=>t in e?ioe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,aoe=(e,t)=>{for(var r in t||(t={}))tN.call(t,r)&&z9(e,r,t[r]);if(pv)for(var r of pv(t))rN.call(t,r)&&z9(e,r,t[r]);return e},soe=(e,t)=>{var r={};for(var n in e)tN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&pv)for(var n of pv(e))t.indexOf(n)<0&&rN.call(e,n)&&(r[n]=e[n]);return r};const loe={variant:"text"},nN=$.forwardRef((e,t)=>{const r=et("Text",loe,e),{className:n,size:o,weight:i,transform:a,color:s,align:l,variant:c,lineClamp:u,truncate:f,gradient:d,inline:p,inherit:h,underline:m,strikethrough:_,italic:w,classNames:y,styles:C,unstyled:I,span:F,__staticSelector:O}=r,g=soe(r,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:D,cx:H}=ooe({color:s,lineClamp:u,truncate:f,inline:p,inherit:h,underline:m,strikethrough:_,italic:w,weight:i,transform:a,align:l,gradient:d},{unstyled:I,name:O||"Text",variant:c,size:o});return ae.createElement(rt,aoe({ref:t,className:H(D.root,{[D.gradient]:c==="gradient"},n),component:F?"span":"div"},g))});nN.displayName="@mantine/core/Text";const St=nN;var coe=Object.defineProperty,U9=Object.getOwnPropertySymbols,uoe=Object.prototype.hasOwnProperty,foe=Object.prototype.propertyIsEnumerable,H9=(e,t,r)=>t in e?coe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,doe=(e,t)=>{for(var r in t||(t={}))uoe.call(t,r)&&H9(e,r,t[r]);if(U9)for(var r of U9(t))foe.call(t,r)&&H9(e,r,t[r]);return e};function poe({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():e.fn.themeColor(t||e.primaryColor,e.colorScheme==="dark"?4:7,!1,!0)}var hoe=at((e,{color:t,underline:r})=>({root:doe({backgroundColor:"transparent",cursor:"pointer",padding:0,border:0,color:poe({theme:e,color:t})},e.fn.hover({textDecoration:r?"underline":"none"}))}));const voe=hoe;var goe=Object.defineProperty,hv=Object.getOwnPropertySymbols,oN=Object.prototype.hasOwnProperty,iN=Object.prototype.propertyIsEnumerable,V9=(e,t,r)=>t in e?goe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,W9=(e,t)=>{for(var r in t||(t={}))oN.call(t,r)&&V9(e,r,t[r]);if(hv)for(var r of hv(t))iN.call(t,r)&&V9(e,r,t[r]);return e},moe=(e,t)=>{var r={};for(var n in e)oN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&hv)for(var n of hv(e))t.indexOf(n)<0&&iN.call(e,n)&&(r[n]=e[n]);return r};const yoe={underline:!0},aN=$.forwardRef((e,t)=>{const r=et("Anchor",yoe,e),{component:n,className:o,unstyled:i,variant:a,size:s,color:l,underline:c}=r,u=moe(r,["component","className","unstyled","variant","size","color","underline"]),{classes:f,cx:d}=voe({color:l,underline:c},{name:"Anchor",unstyled:i,variant:a,size:s}),p=n==="button"?{type:"button"}:null;return ae.createElement(St,W9(W9({component:n||"a",ref:t,className:d(f.root,o),size:s},p),u))});aN.displayName="@mantine/core/Anchor";const n3=aN,sN=$.createContext({zIndex:1e3,fixed:!1,layout:"default"}),boe=sN.Provider;function lN(){return $.useContext(sN)}function ly(e,t){if(!e)return[];const r=Object.keys(e).filter(n=>n!=="base").map(n=>[Re({size:n,sizes:t.breakpoints,units:"em"}),e[n]]);return r.sort((n,o)=>xo(n[0])-xo(o[0])),r}var woe=Object.defineProperty,xoe=Object.defineProperties,_oe=Object.getOwnPropertyDescriptors,q9=Object.getOwnPropertySymbols,Eoe=Object.prototype.hasOwnProperty,Soe=Object.prototype.propertyIsEnumerable,G9=(e,t,r)=>t in e?woe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,a0=(e,t)=>{for(var r in t||(t={}))Eoe.call(t,r)&&G9(e,r,t[r]);if(q9)for(var r of q9(t))Soe.call(t,r)&&G9(e,r,t[r]);return e},K9=(e,t)=>xoe(e,_oe(t)),Coe=at((e,{height:t,width:r,fixed:n,position:o,hiddenBreakpoint:i,zIndex:a,section:s,withBorder:l,layout:c})=>{const u=typeof r=="object"&&r!==null?ly(r,e).reduce((d,[p,h])=>(d[`@media (min-width: ${mn(p)})`]={width:me(h),minWidth:me(h)},d),{}):null,f=l?{[s==="navbar"?"borderRight":"borderLeft"]:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`}:{};return{root:K9(a0(a0(K9(a0(a0({},e.fn.fontStyles()),o),{top:c==="alt"?0:(o==null?void 0:o.top)||"var(--mantine-header-height)",bottom:0,zIndex:a,height:t?me(t):c==="alt"?"auto":"calc(100vh - var(--mantine-header-height, 0rem) - var(--mantine-footer-height, 0rem))",width:r!=null&&r.base?me(r==null?void 0:r.base):"100%",position:n?"fixed":"static",boxSizing:"border-box",display:"flex",flexDirection:"column",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),f),u),{"&[data-hidden]":{[`@media (max-width: ${mn(xo(Re({size:i,sizes:e.breakpoints}))-1)})`]:{display:"none"}}})}});const Poe=Coe;var Ooe=Object.defineProperty,vv=Object.getOwnPropertySymbols,cN=Object.prototype.hasOwnProperty,uN=Object.prototype.propertyIsEnumerable,Y9=(e,t,r)=>t in e?Ooe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,X9=(e,t)=>{for(var r in t||(t={}))cN.call(t,r)&&Y9(e,r,t[r]);if(vv)for(var r of vv(t))uN.call(t,r)&&Y9(e,r,t[r]);return e},Aoe=(e,t)=>{var r={};for(var n in e)cN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&vv)for(var n of vv(e))t.indexOf(n)<0&&uN.call(e,n)&&(r[n]=e[n]);return r};const fN=$.forwardRef((e,t)=>{var r=e,{width:n,height:o,fixed:i=!1,position:a,zIndex:s,hiddenBreakpoint:l="md",hidden:c=!1,withBorder:u=!0,className:f,classNames:d,styles:p,children:h,section:m,__staticSelector:_,unstyled:w,variant:y}=r,C=Aoe(r,["width","height","fixed","position","zIndex","hiddenBreakpoint","hidden","withBorder","className","classNames","styles","children","section","__staticSelector","unstyled","variant"]);const I=lN(),{classes:F,cx:O,theme:g}=Poe({width:n,height:o,fixed:I.fixed||i,position:a,hiddenBreakpoint:l,zIndex:s||I.zIndex||Hs("app"),section:m,withBorder:u,layout:I.layout},{classNames:d,styles:p,name:_,unstyled:w,variant:y}),D=ly(n,g).reduce((H,[G,V])=>(H[`@media (min-width: ${mn(G)})`]={[`--mantine-${m}-width`]:me(V)},H),{});return ae.createElement(rt,X9({component:m==="navbar"?"nav":"aside",ref:t,"data-hidden":c||void 0,className:O(F.root,f)},C),h,ae.createElement(uR,{styles:()=>({":root":X9({[`--mantine-${m}-width`]:n!=null&&n.base?me(n.base):"0rem"},D)})}))});fN.displayName="@mantine/core/HorizontalSection";var koe=Object.defineProperty,gv=Object.getOwnPropertySymbols,dN=Object.prototype.hasOwnProperty,pN=Object.prototype.propertyIsEnumerable,Z9=(e,t,r)=>t in e?koe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ioe=(e,t)=>{for(var r in t||(t={}))dN.call(t,r)&&Z9(e,r,t[r]);if(gv)for(var r of gv(t))pN.call(t,r)&&Z9(e,r,t[r]);return e},$oe=(e,t)=>{var r={};for(var n in e)dN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&gv)for(var n of gv(e))t.indexOf(n)<0&&pN.call(e,n)&&(r[n]=e[n]);return r};const hN=$.forwardRef((e,t)=>{var r=e,{children:n,grow:o=!1,sx:i}=r,a=$oe(r,["children","grow","sx"]);return ae.createElement(rt,Ioe({ref:t,sx:[{flex:o?1:0,boxSizing:"border-box"},...L6(i)]},a),n)});hN.displayName="@mantine/core/Section";const Toe=hN;var Doe=Object.defineProperty,J9=Object.getOwnPropertySymbols,Moe=Object.prototype.hasOwnProperty,Roe=Object.prototype.propertyIsEnumerable,Q9=(e,t,r)=>t in e?Doe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Noe=(e,t)=>{for(var r in t||(t={}))Moe.call(t,r)&&Q9(e,r,t[r]);if(J9)for(var r of J9(t))Roe.call(t,r)&&Q9(e,r,t[r]);return e};const Foe={fixed:!1,position:{top:0,left:0},hiddenBreakpoint:"md",hidden:!1},mv=$.forwardRef((e,t)=>{const r=et("Navbar",Foe,e);return ae.createElement(fN,Noe({section:"navbar",__staticSelector:"Navbar",ref:t},r))});mv.Section=Toe;mv.displayName="@mantine/core/Navbar";var Boe=Object.defineProperty,joe=Object.defineProperties,Loe=Object.getOwnPropertyDescriptors,e7=Object.getOwnPropertySymbols,zoe=Object.prototype.hasOwnProperty,Uoe=Object.prototype.propertyIsEnumerable,t7=(e,t,r)=>t in e?Boe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g2=(e,t)=>{for(var r in t||(t={}))zoe.call(t,r)&&t7(e,r,t[r]);if(e7)for(var r of e7(t))Uoe.call(t,r)&&t7(e,r,t[r]);return e},r7=(e,t)=>joe(e,Loe(t)),Hoe=at((e,{height:t,fixed:r,position:n,zIndex:o,borderPosition:i,layout:a})=>{const s=typeof t=="object"&&t!==null?ly(t,e).reduce((l,[c,u])=>(l[`@media (min-width: ${mn(c)})`]={height:me(u),minHeight:me(u)},l),{}):null;return{root:r7(g2(r7(g2(g2({},e.fn.fontStyles()),n),{zIndex:o,left:a==="alt"?"var(--mantine-navbar-width, 0)":0,right:a==="alt"?"var(--mantine-aside-width, 0)":0,height:typeof t=="object"?me(t==null?void 0:t.base)||"100%":me(t),maxHeight:typeof t=="object"?me(t==null?void 0:t.base)||"100%":me(t),position:r?"fixed":"static",boxSizing:"border-box",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),s),{borderBottom:i==="bottom"?`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0,borderTop:i==="top"?`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0})}});const Voe=Hoe;var Woe=Object.defineProperty,yv=Object.getOwnPropertySymbols,vN=Object.prototype.hasOwnProperty,gN=Object.prototype.propertyIsEnumerable,n7=(e,t,r)=>t in e?Woe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,o7=(e,t)=>{for(var r in t||(t={}))vN.call(t,r)&&n7(e,r,t[r]);if(yv)for(var r of yv(t))gN.call(t,r)&&n7(e,r,t[r]);return e},qoe=(e,t)=>{var r={};for(var n in e)vN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&yv)for(var n of yv(e))t.indexOf(n)<0&&gN.call(e,n)&&(r[n]=e[n]);return r};const n_=$.forwardRef((e,t)=>{var r=e,{children:n,className:o,classNames:i,styles:a,height:s,fixed:l=!1,withBorder:c=!0,position:u,zIndex:f,section:d,unstyled:p,__staticSelector:h,variant:m}=r,_=qoe(r,["children","className","classNames","styles","height","fixed","withBorder","position","zIndex","section","unstyled","__staticSelector","variant"]);const w=lN(),y=f||w.zIndex||Hs("app"),{classes:C,cx:I,theme:F}=Voe({height:s,fixed:w.fixed||l,position:u,zIndex:typeof y=="number"&&w.layout==="default"?y+1:y,layout:w.layout,borderPosition:c?d==="header"?"bottom":"top":"none"},{name:h,classNames:i,styles:a,unstyled:p,variant:m}),O=typeof s=="object"&&s!==null?ly(s,F).reduce((g,[D,H])=>(g[`@media (min-width: ${mn(D)})`]={[`--mantine-${d}-height`]:me(H)},g),{}):null;return ae.createElement(rt,o7({component:d==="header"?"header":"footer",className:I(C.root,o),ref:t},_),n,ae.createElement(uR,{styles:()=>({":root":o7({[`--mantine-${d}-height`]:typeof s=="object"?me(s==null?void 0:s.base)||"100%":me(s)},O)})}))});n_.displayName="@mantine/core/VerticalSection";var Goe=Object.defineProperty,Koe=Object.defineProperties,Yoe=Object.getOwnPropertyDescriptors,i7=Object.getOwnPropertySymbols,Xoe=Object.prototype.hasOwnProperty,Zoe=Object.prototype.propertyIsEnumerable,a7=(e,t,r)=>t in e?Goe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Joe=(e,t)=>{for(var r in t||(t={}))Xoe.call(t,r)&&a7(e,r,t[r]);if(i7)for(var r of i7(t))Zoe.call(t,r)&&a7(e,r,t[r]);return e},Qoe=(e,t)=>Koe(e,Yoe(t));const eie={fixed:!1,position:{top:0,left:0,right:0}},mN=$.forwardRef((e,t)=>{const r=et("Header",eie,e);return ae.createElement(n_,Qoe(Joe({section:"header",__staticSelector:"Header"},r),{ref:t}))});mN.displayName="@mantine/core/Header";var tie=Object.defineProperty,rie=Object.defineProperties,nie=Object.getOwnPropertyDescriptors,s7=Object.getOwnPropertySymbols,oie=Object.prototype.hasOwnProperty,iie=Object.prototype.propertyIsEnumerable,l7=(e,t,r)=>t in e?tie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,aie=(e,t)=>{for(var r in t||(t={}))oie.call(t,r)&&l7(e,r,t[r]);if(s7)for(var r of s7(t))iie.call(t,r)&&l7(e,r,t[r]);return e},sie=(e,t)=>rie(e,nie(t));const lie={fixed:!1,position:{bottom:0,left:0,right:0}},yN=$.forwardRef((e,t)=>{const r=et("Footer",lie,e);return ae.createElement(n_,sie(aie({section:"footer",__staticSelector:"Footer"},r),{ref:t}))});yN.displayName="@mantine/core/Footer";var cie=Object.defineProperty,c7=Object.getOwnPropertySymbols,uie=Object.prototype.hasOwnProperty,fie=Object.prototype.propertyIsEnumerable,u7=(e,t,r)=>t in e?cie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bN=(e,t)=>{for(var r in t||(t={}))uie.call(t,r)&&u7(e,r,t[r]);if(c7)for(var r of c7(t))fie.call(t,r)&&u7(e,r,t[r]);return e};function die(e,t){const r=Re({size:e.padding,sizes:t.spacing}),n=e.navbarOffsetBreakpoint?Re({size:e.navbarOffsetBreakpoint,sizes:t.breakpoints}):null,o=e.asideOffsetBreakpoint?Re({size:e.asideOffsetBreakpoint,sizes:t.breakpoints}):null;if(!e.fixed)return{padding:r};const i=xo(n),a=xo(o);return bN({minHeight:"100vh",paddingTop:`calc(var(--mantine-header-height, 0px) + ${r})`,paddingBottom:`calc(var(--mantine-footer-height, 0px) + ${r})`,paddingLeft:`calc(var(--mantine-navbar-width, 0px) + ${r})`,paddingRight:`calc(var(--mantine-aside-width, 0px) + ${r})`},i===a?{[`@media (max-width: ${mn(i-1)})`]:{paddingLeft:r,paddingRight:r}}:{[`@media (max-width: ${mn(i-1)})`]:{paddingLeft:r},[`@media (max-width: ${mn(a-1)})`]:{paddingRight:r}})}var pie=at((e,t)=>({root:{boxSizing:"border-box"},body:{display:"flex",boxSizing:"border-box"},main:bN({flex:1,width:"100vw",boxSizing:"border-box"},die(t,e))}));const hie=pie;var vie=Object.defineProperty,bv=Object.getOwnPropertySymbols,wN=Object.prototype.hasOwnProperty,xN=Object.prototype.propertyIsEnumerable,f7=(e,t,r)=>t in e?vie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gie=(e,t)=>{for(var r in t||(t={}))wN.call(t,r)&&f7(e,r,t[r]);if(bv)for(var r of bv(t))xN.call(t,r)&&f7(e,r,t[r]);return e},mie=(e,t)=>{var r={};for(var n in e)wN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&bv)for(var n of bv(e))t.indexOf(n)<0&&xN.call(e,n)&&(r[n]=e[n]);return r};const yie={fixed:!0,padding:"md"},_N=$.forwardRef((e,t)=>{const r=et("AppShell",yie,e),{children:n,navbar:o,header:i,footer:a,aside:s,fixed:l,zIndex:c,padding:u,navbarOffsetBreakpoint:f,asideOffsetBreakpoint:d,className:p,styles:h,classNames:m,unstyled:_,hidden:w,layout:y,variant:C}=r,I=mie(r,["children","navbar","header","footer","aside","fixed","zIndex","padding","navbarOffsetBreakpoint","asideOffsetBreakpoint","className","styles","classNames","unstyled","hidden","layout","variant"]),{classes:F,cx:O}=hie({padding:u,fixed:l,navbarOffsetBreakpoint:f,asideOffsetBreakpoint:d},{styles:h,classNames:m,unstyled:_,name:"AppShell",variant:C});return w?ae.createElement(ae.Fragment,null,n):ae.createElement(boe,{value:{fixed:l,zIndex:c,layout:y}},ae.createElement(rt,gie({className:O(F.root,p),ref:t},I),i,ae.createElement("div",{className:F.body},o,ae.createElement("main",{className:F.main},n),s),a))});_N.displayName="@mantine/core/AppShell";const s0={xs:me(1),sm:me(2),md:me(3),lg:me(4),xl:me(5)};function l0(e,t){const r=e.fn.variant({variant:"outline",color:t}).border;return typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?r:t===void 0?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]:t}var bie=at((e,{color:t},{size:r,variant:n})=>({root:{},withLabel:{borderTop:"0 !important"},left:{"&::before":{display:"none"}},right:{"&::after":{display:"none"}},label:{display:"flex",alignItems:"center","&::before":{content:'""',flex:1,height:me(1),borderTop:`${Re({size:r,sizes:s0})} ${n} ${l0(e,t)}`,marginRight:e.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${Re({size:r,sizes:s0})} ${n} ${l0(e,t)}`,marginLeft:e.spacing.xs}},labelDefaultStyles:{color:t==="dark"?e.colors.dark[1]:e.fn.themeColor(t,e.colorScheme==="dark"?5:e.fn.primaryShade(),!1)},horizontal:{border:0,borderTopWidth:me(Re({size:r,sizes:s0})),borderTopColor:l0(e,t),borderTopStyle:n,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:me(Re({size:r,sizes:s0})),borderLeftColor:l0(e,t),borderLeftStyle:n}}));const wie=bie;var xie=Object.defineProperty,_ie=Object.defineProperties,Eie=Object.getOwnPropertyDescriptors,wv=Object.getOwnPropertySymbols,EN=Object.prototype.hasOwnProperty,SN=Object.prototype.propertyIsEnumerable,d7=(e,t,r)=>t in e?xie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p7=(e,t)=>{for(var r in t||(t={}))EN.call(t,r)&&d7(e,r,t[r]);if(wv)for(var r of wv(t))SN.call(t,r)&&d7(e,r,t[r]);return e},Sie=(e,t)=>_ie(e,Eie(t)),Cie=(e,t)=>{var r={};for(var n in e)EN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&wv)for(var n of wv(e))t.indexOf(n)<0&&SN.call(e,n)&&(r[n]=e[n]);return r};const Pie={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},o3=$.forwardRef((e,t)=>{const r=et("Divider",Pie,e),{className:n,color:o,orientation:i,size:a,label:s,labelPosition:l,labelProps:c,variant:u,styles:f,classNames:d,unstyled:p}=r,h=Cie(r,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:m,cx:_}=wie({color:o},{classNames:d,styles:f,unstyled:p,name:"Divider",variant:u,size:a}),w=i==="vertical",y=i==="horizontal",C=!!s&&y,I=!(c!=null&&c.color);return ae.createElement(rt,p7({ref:t,className:_(m.root,{[m.vertical]:w,[m.horizontal]:y,[m.withLabel]:C},n),role:"separator"},h),C&&ae.createElement(St,Sie(p7({},c),{size:(c==null?void 0:c.size)||"xs",mt:me(2),className:_(m.label,m[l],{[m.labelDefaultStyles]:I})}),s))});o3.displayName="@mantine/core/Divider";var Oie=Object.defineProperty,Aie=Object.defineProperties,kie=Object.getOwnPropertyDescriptors,h7=Object.getOwnPropertySymbols,Iie=Object.prototype.hasOwnProperty,$ie=Object.prototype.propertyIsEnumerable,v7=(e,t,r)=>t in e?Oie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g7=(e,t)=>{for(var r in t||(t={}))Iie.call(t,r)&&v7(e,r,t[r]);if(h7)for(var r of h7(t))$ie.call(t,r)&&v7(e,r,t[r]);return e},Tie=(e,t)=>Aie(e,kie(t)),Die=at((e,t,{size:r})=>({item:Tie(g7({},e.fn.fontStyles()),{boxSizing:"border-box",wordBreak:"break-all",textAlign:"left",width:"100%",padding:`calc(${Re({size:r,sizes:e.spacing})} / 1.5) ${Re({size:r,sizes:e.spacing})}`,cursor:"pointer",fontSize:Re({size:r,sizes:e.fontSizes}),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderRadius:e.fn.radius(),"&[data-hovered]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[1]},"&[data-selected]":g7({backgroundColor:e.fn.variant({variant:"filled"}).background,color:e.fn.variant({variant:"filled"}).color},e.fn.hover({backgroundColor:e.fn.variant({variant:"filled"}).hover})),"&[data-disabled]":{cursor:"default",color:e.colors.dark[2]}}),nothingFound:{boxSizing:"border-box",color:e.colors.gray[6],paddingTop:`calc(${Re({size:r,sizes:e.spacing})} / 2)`,paddingBottom:`calc(${Re({size:r,sizes:e.spacing})} / 2)`,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${Re({size:r,sizes:e.spacing})} / 1.5) ${Re({size:r,sizes:e.spacing})}`},separatorLabel:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}));const Mie=Die;var Rie=Object.defineProperty,m7=Object.getOwnPropertySymbols,Nie=Object.prototype.hasOwnProperty,Fie=Object.prototype.propertyIsEnumerable,y7=(e,t,r)=>t in e?Rie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bie=(e,t)=>{for(var r in t||(t={}))Nie.call(t,r)&&y7(e,r,t[r]);if(m7)for(var r of m7(t))Fie.call(t,r)&&y7(e,r,t[r]);return e};function CN({data:e,hovered:t,classNames:r,styles:n,isItemSelected:o,uuid:i,__staticSelector:a,onItemHover:s,onItemSelect:l,itemsRefs:c,itemComponent:u,size:f,nothingFound:d,creatable:p,createLabel:h,unstyled:m,variant:_}){const{classes:w}=Mie(null,{classNames:r,styles:n,unstyled:m,name:a,variant:_,size:f}),y=[],C=[];let I=null;const F=(g,D)=>{const H=typeof o=="function"?o(g.value):!1;return ae.createElement(u,Bie({key:g.value,className:w.item,"data-disabled":g.disabled||void 0,"data-hovered":!g.disabled&&t===D||void 0,"data-selected":!g.disabled&&H||void 0,selected:H,onMouseEnter:()=>s(D),id:`${i}-${D}`,role:"option",tabIndex:-1,"aria-selected":t===D,ref:G=>{c&&c.current&&(c.current[g.value]=G)},onMouseDown:g.disabled?null:G=>{G.preventDefault(),l(g)},disabled:g.disabled,variant:_},g))};let O=null;if(e.forEach((g,D)=>{g.creatable?I=D:g.group?(O!==g.group&&(O=g.group,C.push(ae.createElement("div",{className:w.separator,key:`__mantine-divider-${D}`},ae.createElement(o3,{classNames:{label:w.separatorLabel},label:g.group})))),C.push(F(g,D))):y.push(F(g,D))}),p){const g=e[I];y.push(ae.createElement("div",{key:t_(),className:w.item,"data-hovered":t===I||void 0,onMouseEnter:()=>s(I),onMouseDown:D=>{D.preventDefault(),l(g)},tabIndex:-1,ref:D=>{c&&c.current&&(c.current[g.value]=D)}},h))}return C.length>0&&y.length>0&&y.unshift(ae.createElement("div",{className:w.separator,key:"empty-group-separator"},ae.createElement(o3,null))),C.length>0||y.length>0?ae.createElement(ae.Fragment,null,C,y):ae.createElement(St,{size:f,unstyled:m,className:w.nothingFound},d)}CN.displayName="@mantine/core/SelectItems";var jie=Object.defineProperty,xv=Object.getOwnPropertySymbols,PN=Object.prototype.hasOwnProperty,ON=Object.prototype.propertyIsEnumerable,b7=(e,t,r)=>t in e?jie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Lie=(e,t)=>{for(var r in t||(t={}))PN.call(t,r)&&b7(e,r,t[r]);if(xv)for(var r of xv(t))ON.call(t,r)&&b7(e,r,t[r]);return e},zie=(e,t)=>{var r={};for(var n in e)PN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&xv)for(var n of xv(e))t.indexOf(n)<0&&ON.call(e,n)&&(r[n]=e[n]);return r};const AN=$.forwardRef((e,t)=>{var r=e,{label:n,value:o}=r,i=zie(r,["label","value"]);return ae.createElement("div",Lie({ref:t},i),n||o)});AN.displayName="@mantine/core/DefaultItem";function Uie(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function kN(...e){return t=>e.forEach(r=>Uie(r,t))}function Hl(...e){return $.useCallback(kN(...e),e)}const IN=$.forwardRef((e,t)=>{const{children:r,...n}=e,o=$.Children.toArray(r),i=o.find(Vie);if(i){const a=i.props.children,s=o.map(l=>l===i?$.Children.count(a)>1?$.Children.only(null):$.isValidElement(a)?a.props.children:null:l);return $.createElement(i3,Ze({},n,{ref:t}),$.isValidElement(a)?$.cloneElement(a,void 0,s):null)}return $.createElement(i3,Ze({},n,{ref:t}),r)});IN.displayName="Slot";const i3=$.forwardRef((e,t)=>{const{children:r,...n}=e;return $.isValidElement(r)?$.cloneElement(r,{...Wie(n,r.props),ref:kN(t,r.ref)}):$.Children.count(r)>1?$.Children.only(null):null});i3.displayName="SlotClone";const Hie=({children:e})=>$.createElement($.Fragment,null,e);function Vie(e){return $.isValidElement(e)&&e.type===Hie}function Wie(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const qie=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Wp=qie.reduce((e,t)=>{const r=$.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?IN:t;return $.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),$.createElement(s,Ze({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),a3=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{};function Gie(e,t){return $.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const qp=e=>{const{present:t,children:r}=e,n=Kie(t),o=typeof r=="function"?r({present:n.isPresent}):$.Children.only(r),i=Hl(n.ref,o.ref);return typeof r=="function"||n.isPresent?$.cloneElement(o,{ref:i}):null};qp.displayName="Presence";function Kie(e){const[t,r]=$.useState(),n=$.useRef({}),o=$.useRef(e),i=$.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Gie(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return $.useEffect(()=>{const c=c0(n.current);i.current=s==="mounted"?c:"none"},[s]),a3(()=>{const c=n.current,u=o.current;if(u!==e){const d=i.current,p=c0(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&d!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),a3(()=>{if(t){const c=f=>{const p=c0(n.current).includes(f.animationName);f.target===t&&p&&Us.flushSync(()=>l("ANIMATION_END"))},u=f=>{f.target===t&&(i.current=c0(n.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:$.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function c0(e){return(e==null?void 0:e.animationName)||"none"}function Yie(e,t=[]){let r=[];function n(i,a){const s=$.createContext(a),l=r.length;r=[...r,a];function c(f){const{scope:d,children:p,...h}=f,m=(d==null?void 0:d[e][l])||s,_=$.useMemo(()=>h,Object.values(h));return $.createElement(m.Provider,{value:_},p)}function u(f,d){const p=(d==null?void 0:d[e][l])||s,h=$.useContext(p);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,u]}const o=()=>{const i=r.map(a=>$.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return $.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,Xie(o,...t)]}function Xie(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...s,...f}},{});return $.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function yl(e){const t=$.useRef(e);return $.useEffect(()=>{t.current=e}),$.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}const Zie=$.createContext(void 0);function Jie(e){const t=$.useContext(Zie);return e||t||"ltr"}function Qie(e,[t,r]){return Math.min(r,Math.max(t,e))}function Pl(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function eae(e,t){return $.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const $N="ScrollArea",[TN,SBe]=Yie($N),[tae,So]=TN($N),rae=$.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:i=600,...a}=e,[s,l]=$.useState(null),[c,u]=$.useState(null),[f,d]=$.useState(null),[p,h]=$.useState(null),[m,_]=$.useState(null),[w,y]=$.useState(0),[C,I]=$.useState(0),[F,O]=$.useState(!1),[g,D]=$.useState(!1),H=Hl(t,V=>l(V)),G=Jie(o);return $.createElement(tae,{scope:r,type:n,dir:G,scrollHideDelay:i,scrollArea:s,viewport:c,onViewportChange:u,content:f,onContentChange:d,scrollbarX:p,onScrollbarXChange:h,scrollbarXEnabled:F,onScrollbarXEnabledChange:O,scrollbarY:m,onScrollbarYChange:_,scrollbarYEnabled:g,onScrollbarYEnabledChange:D,onCornerWidthChange:y,onCornerHeightChange:I},$.createElement(Wp.div,Ze({dir:G},a,{ref:H,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":C+"px",...e.style}})))}),nae="ScrollAreaViewport",oae=$.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,...o}=e,i=So(nae,r),a=$.useRef(null),s=Hl(t,a,i.onViewportChange);return $.createElement($.Fragment,null,$.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),$.createElement(Wp.div,Ze({"data-radix-scroll-area-viewport":""},o,{ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),$.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},n)))}),Oa="ScrollAreaScrollbar",iae=$.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=So(Oa,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=o,s=e.orientation==="horizontal";return $.useEffect(()=>(s?i(!0):a(!0),()=>{s?i(!1):a(!1)}),[s,i,a]),o.type==="hover"?$.createElement(aae,Ze({},n,{ref:t,forceMount:r})):o.type==="scroll"?$.createElement(sae,Ze({},n,{ref:t,forceMount:r})):o.type==="auto"?$.createElement(DN,Ze({},n,{ref:t,forceMount:r})):o.type==="always"?$.createElement(o_,Ze({},n,{ref:t})):null}),aae=$.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=So(Oa,e.__scopeScrollArea),[i,a]=$.useState(!1);return $.useEffect(()=>{const s=o.scrollArea;let l=0;if(s){const c=()=>{window.clearTimeout(l),a(!0)},u=()=>{l=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),$.createElement(qp,{present:r||i},$.createElement(DN,Ze({"data-state":i?"visible":"hidden"},n,{ref:t})))}),sae=$.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=So(Oa,e.__scopeScrollArea),i=e.orientation==="horizontal",a=uy(()=>l("SCROLL_END"),100),[s,l]=eae("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return $.useEffect(()=>{if(s==="idle"){const c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[s,o.scrollHideDelay,l]),$.useEffect(()=>{const c=o.viewport,u=i?"scrollLeft":"scrollTop";if(c){let f=c[u];const d=()=>{const p=c[u];f!==p&&(l("SCROLL"),a()),f=p};return c.addEventListener("scroll",d),()=>c.removeEventListener("scroll",d)}},[o.viewport,i,l,a]),$.createElement(qp,{present:r||s!=="hidden"},$.createElement(o_,Ze({"data-state":s==="hidden"?"hidden":"visible"},n,{ref:t,onPointerEnter:Pl(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Pl(e.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),DN=$.forwardRef((e,t)=>{const r=So(Oa,e.__scopeScrollArea),{forceMount:n,...o}=e,[i,a]=$.useState(!1),s=e.orientation==="horizontal",l=uy(()=>{if(r.viewport){const c=r.viewport.offsetWidth{const{orientation:r="vertical",...n}=e,o=So(Oa,e.__scopeScrollArea),i=$.useRef(null),a=$.useRef(0),[s,l]=$.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=FN(s.viewport,s.content),u={...n,sizes:s,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:d=>i.current=d,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:d=>a.current=d};function f(d,p){return vae(d,a.current,s,p)}return r==="horizontal"?$.createElement(lae,Ze({},u,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const d=o.viewport.scrollLeft,p=w7(d,s,o.dir);i.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:d=>{o.viewport&&(o.viewport.scrollLeft=d)},onDragScroll:d=>{o.viewport&&(o.viewport.scrollLeft=f(d,o.dir))}})):r==="vertical"?$.createElement(cae,Ze({},u,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const d=o.viewport.scrollTop,p=w7(d,s);i.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:d=>{o.viewport&&(o.viewport.scrollTop=d)},onDragScroll:d=>{o.viewport&&(o.viewport.scrollTop=f(d))}})):null}),lae=$.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=So(Oa,e.__scopeScrollArea),[a,s]=$.useState(),l=$.useRef(null),c=Hl(t,l,i.onScrollbarXChange);return $.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),$.createElement(RN,Ze({"data-orientation":"horizontal"},o,{ref:c,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":cy(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,f)=>{if(i.viewport){const d=i.viewport.scrollLeft+u.deltaX;e.onWheelScroll(d),jN(d,f)&&u.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:_v(a.paddingLeft),paddingEnd:_v(a.paddingRight)}})}}))}),cae=$.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=So(Oa,e.__scopeScrollArea),[a,s]=$.useState(),l=$.useRef(null),c=Hl(t,l,i.onScrollbarYChange);return $.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),$.createElement(RN,Ze({"data-orientation":"vertical"},o,{ref:c,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":cy(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,f)=>{if(i.viewport){const d=i.viewport.scrollTop+u.deltaY;e.onWheelScroll(d),jN(d,f)&&u.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:_v(a.paddingTop),paddingEnd:_v(a.paddingBottom)}})}}))}),[uae,MN]=TN(Oa),RN=$.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:f,...d}=e,p=So(Oa,r),[h,m]=$.useState(null),_=Hl(t,H=>m(H)),w=$.useRef(null),y=$.useRef(""),C=p.viewport,I=n.content-n.viewport,F=yl(u),O=yl(l),g=uy(f,10);function D(H){if(w.current){const G=H.clientX-w.current.left,V=H.clientY-w.current.top;c({x:G,y:V})}}return $.useEffect(()=>{const H=G=>{const V=G.target;(h==null?void 0:h.contains(V))&&F(G,I)};return document.addEventListener("wheel",H,{passive:!1}),()=>document.removeEventListener("wheel",H,{passive:!1})},[C,h,I,F]),$.useEffect(O,[n,O]),fu(h,g),fu(p.content,g),$.createElement(uae,{scope:r,scrollbar:h,hasThumb:o,onThumbChange:yl(i),onThumbPointerUp:yl(a),onThumbPositionChange:O,onThumbPointerDown:yl(s)},$.createElement(Wp.div,Ze({},d,{ref:_,style:{position:"absolute",...d.style},onPointerDown:Pl(e.onPointerDown,H=>{H.button===0&&(H.target.setPointerCapture(H.pointerId),w.current=h.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",D(H))}),onPointerMove:Pl(e.onPointerMove,D),onPointerUp:Pl(e.onPointerUp,H=>{const G=H.target;G.hasPointerCapture(H.pointerId)&&G.releasePointerCapture(H.pointerId),document.body.style.webkitUserSelect=y.current,w.current=null})})))}),s3="ScrollAreaThumb",fae=$.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=MN(s3,e.__scopeScrollArea);return $.createElement(qp,{present:r||o.hasThumb},$.createElement(dae,Ze({ref:t},n)))}),dae=$.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,i=So(s3,r),a=MN(s3,r),{onThumbPositionChange:s}=a,l=Hl(t,f=>a.onThumbChange(f)),c=$.useRef(),u=uy(()=>{c.current&&(c.current(),c.current=void 0)},100);return $.useEffect(()=>{const f=i.viewport;if(f){const d=()=>{if(u(),!c.current){const p=gae(f,s);c.current=p,s()}};return s(),f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[i.viewport,u,s]),$.createElement(Wp.div,Ze({"data-state":a.hasThumb?"visible":"hidden"},o,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:Pl(e.onPointerDownCapture,f=>{const p=f.target.getBoundingClientRect(),h=f.clientX-p.left,m=f.clientY-p.top;a.onThumbPointerDown({x:h,y:m})}),onPointerUp:Pl(e.onPointerUp,a.onThumbPointerUp)}))}),NN="ScrollAreaCorner",pae=$.forwardRef((e,t)=>{const r=So(NN,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?$.createElement(hae,Ze({},e,{ref:t})):null}),hae=$.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=So(NN,r),[i,a]=$.useState(0),[s,l]=$.useState(0),c=!!(i&&s);return fu(o.scrollbarX,()=>{var u;const f=((u=o.scrollbarX)===null||u===void 0?void 0:u.offsetHeight)||0;o.onCornerHeightChange(f),l(f)}),fu(o.scrollbarY,()=>{var u;const f=((u=o.scrollbarY)===null||u===void 0?void 0:u.offsetWidth)||0;o.onCornerWidthChange(f),a(f)}),c?$.createElement(Wp.div,Ze({},n,{ref:t,style:{width:i,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function _v(e){return e?parseInt(e,10):0}function FN(e,t){const r=e/t;return isNaN(r)?0:r}function cy(e){const t=FN(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function vae(e,t,r,n="ltr"){const o=cy(r),i=o/2,a=t||i,s=o-a,l=r.scrollbar.paddingStart+a,c=r.scrollbar.size-r.scrollbar.paddingEnd-s,u=r.content-r.viewport,f=n==="ltr"?[0,u]:[u*-1,0];return BN([l,c],f)(e)}function w7(e,t,r="ltr"){const n=cy(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-n,l=r==="ltr"?[0,a]:[a*-1,0],c=Qie(e,l);return BN([0,a],[0,s])(c)}function BN(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function jN(e,t){return e>0&&e{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=r.left!==i.left,s=r.top!==i.top;(a||s)&&t(),r=i,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function uy(e,t){const r=yl(e),n=$.useRef(0);return $.useEffect(()=>()=>window.clearTimeout(n.current),[]),$.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function fu(e,t){const r=yl(t);a3(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}const mae=rae,yae=oae,x7=iae,_7=fae,bae=pae;var wae=at((e,{scrollbarSize:t,offsetScrollbars:r,scrollbarHovered:n,hidden:o})=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:r?me(t):void 0,paddingBottom:r?me(t):void 0},scrollbar:{display:o?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:`calc(${me(t)} / 5)`,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],[`& .${zo("thumb")}`]:{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.5):e.fn.rgba(e.black,.5)}},'&[data-orientation="vertical"]':{width:me(t)},'&[data-orientation="horizontal"]':{flexDirection:"column",height:me(t)},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:zo("thumb"),flex:1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.4):e.fn.rgba(e.black,.4),borderRadius:me(t),position:"relative",transition:"background-color 150ms ease",display:o?"none":void 0,overflow:"hidden","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:me(44),minHeight:me(44)}},corner:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],transition:"opacity 150ms ease",opacity:n?1:0,display:o?"none":void 0}}));const xae=wae;var _ae=Object.defineProperty,Eae=Object.defineProperties,Sae=Object.getOwnPropertyDescriptors,Ev=Object.getOwnPropertySymbols,LN=Object.prototype.hasOwnProperty,zN=Object.prototype.propertyIsEnumerable,E7=(e,t,r)=>t in e?_ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l3=(e,t)=>{for(var r in t||(t={}))LN.call(t,r)&&E7(e,r,t[r]);if(Ev)for(var r of Ev(t))zN.call(t,r)&&E7(e,r,t[r]);return e},UN=(e,t)=>Eae(e,Sae(t)),HN=(e,t)=>{var r={};for(var n in e)LN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ev)for(var n of Ev(e))t.indexOf(n)<0&&zN.call(e,n)&&(r[n]=e[n]);return r};const VN={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},fy=$.forwardRef((e,t)=>{const r=et("ScrollArea",VN,e),{children:n,className:o,classNames:i,styles:a,scrollbarSize:s,scrollHideDelay:l,type:c,dir:u,offsetScrollbars:f,viewportRef:d,onScrollPositionChange:p,unstyled:h,variant:m,viewportProps:_}=r,w=HN(r,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[y,C]=$.useState(!1),I=Lr(),{classes:F,cx:O}=xae({scrollbarSize:s,offsetScrollbars:f,scrollbarHovered:y,hidden:c==="never"},{name:"ScrollArea",classNames:i,styles:a,unstyled:h,variant:m});return ae.createElement(mae,{type:c==="never"?"always":c,scrollHideDelay:l,dir:u||I.dir,ref:t,asChild:!0},ae.createElement(rt,l3({className:O(F.root,o)},w),ae.createElement(yae,UN(l3({},_),{className:F.viewport,ref:d,onScroll:typeof p=="function"?({currentTarget:g})=>p({x:g.scrollLeft,y:g.scrollTop}):void 0}),n),ae.createElement(x7,{orientation:"horizontal",className:F.scrollbar,forceMount:!0,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1)},ae.createElement(_7,{className:F.thumb})),ae.createElement(x7,{orientation:"vertical",className:F.scrollbar,forceMount:!0,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1)},ae.createElement(_7,{className:F.thumb})),ae.createElement(bae,{className:F.corner})))}),WN=$.forwardRef((e,t)=>{const r=et("ScrollAreaAutosize",VN,e),{children:n,classNames:o,styles:i,scrollbarSize:a,scrollHideDelay:s,type:l,dir:c,offsetScrollbars:u,viewportRef:f,onScrollPositionChange:d,unstyled:p,sx:h,variant:m,viewportProps:_}=r,w=HN(r,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return ae.createElement(rt,UN(l3({},w),{ref:t,sx:[{display:"flex"},...L6(h)]}),ae.createElement(rt,{sx:{display:"flex",flexDirection:"column",flex:1}},ae.createElement(fy,{classNames:o,styles:i,scrollHideDelay:s,scrollbarSize:a,type:l,dir:c,offsetScrollbars:u,viewportRef:f,onScrollPositionChange:d,unstyled:p,variant:m,viewportProps:_},n)))});WN.displayName="@mantine/core/ScrollAreaAutosize";fy.displayName="@mantine/core/ScrollArea";fy.Autosize=WN;const qN=fy;var Cae=Object.defineProperty,Pae=Object.defineProperties,Oae=Object.getOwnPropertyDescriptors,Sv=Object.getOwnPropertySymbols,GN=Object.prototype.hasOwnProperty,KN=Object.prototype.propertyIsEnumerable,S7=(e,t,r)=>t in e?Cae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,C7=(e,t)=>{for(var r in t||(t={}))GN.call(t,r)&&S7(e,r,t[r]);if(Sv)for(var r of Sv(t))KN.call(t,r)&&S7(e,r,t[r]);return e},Aae=(e,t)=>Pae(e,Oae(t)),kae=(e,t)=>{var r={};for(var n in e)GN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Sv)for(var n of Sv(e))t.indexOf(n)<0&&KN.call(e,n)&&(r[n]=e[n]);return r};const i_=$.forwardRef((e,t)=>{var r=e,{style:n}=r,o=kae(r,["style"]);return ae.createElement(qN,Aae(C7({},o),{style:C7({width:"100%"},n),viewportProps:{tabIndex:-1},viewportRef:t}),o.children)});i_.displayName="@mantine/core/SelectScrollArea";var Iae=at(()=>({dropdown:{},itemsWrapper:{padding:me(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const $ae=Iae,Qo=Math.min,en=Math.max,Cv=Math.round,u0=Math.floor,Ds=e=>({x:e,y:e}),Tae={left:"right",right:"left",bottom:"top",top:"bottom"},Dae={start:"end",end:"start"};function c3(e,t,r){return en(e,Qo(t,r))}function ya(e,t){return typeof e=="function"?e(t):e}function ei(e){return e.split("-")[0]}function ju(e){return e.split("-")[1]}function a_(e){return e==="x"?"y":"x"}function s_(e){return e==="y"?"height":"width"}function Vl(e){return["top","bottom"].includes(ei(e))?"y":"x"}function l_(e){return a_(Vl(e))}function Mae(e,t,r){r===void 0&&(r=!1);const n=ju(e),o=l_(e),i=s_(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Pv(a)),[a,Pv(a)]}function Rae(e){const t=Pv(e);return[u3(e),t,u3(t)]}function u3(e){return e.replace(/start|end/g,t=>Dae[t])}function Nae(e,t,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?i:a;default:return[]}}function Fae(e,t,r,n){const o=ju(e);let i=Nae(ei(e),r==="start",n);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(u3)))),i}function Pv(e){return e.replace(/left|right|bottom|top/g,t=>Tae[t])}function Bae(e){return{top:0,right:0,bottom:0,left:0,...e}}function c_(e){return typeof e!="number"?Bae(e):{top:e,right:e,bottom:e,left:e}}function du(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function P7(e,t,r){let{reference:n,floating:o}=e;const i=Vl(t),a=l_(t),s=s_(a),l=ei(t),c=i==="y",u=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,d=n[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-o.width,y:f};break;default:p={x:n.x,y:n.y}}switch(ju(t)){case"start":p[a]-=d*(r&&c?-1:1);break;case"end":p[a]+=d*(r&&c?-1:1);break}return p}const jae=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=P7(c,n,l),d=n,p={},h=0;for(let m=0;m({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:s}=t,{element:l,padding:c=0}=ya(e,t)||{};if(l==null)return{};const u=c_(c),f={x:r,y:n},d=l_(o),p=s_(d),h=await a.getDimensions(l),m=d==="y",_=m?"top":"left",w=m?"bottom":"right",y=m?"clientHeight":"clientWidth",C=i.reference[p]+i.reference[d]-f[d]-i.floating[p],I=f[d]-i.reference[d],F=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let O=F?F[y]:0;(!O||!await(a.isElement==null?void 0:a.isElement(F)))&&(O=s.floating[y]||i.floating[p]);const g=C/2-I/2,D=O/2-h[p]/2-1,H=Qo(u[_],D),G=Qo(u[w],D),V=H,P=O-h[p]-G,S=O/2-h[p]/2+g,v=c3(V,S,P),B=ju(o)!=null&&S!=v&&i.reference[p]/2-(SV<=0)){var D,H;const V=(((D=o.flip)==null?void 0:D.index)||0)+1,P=I[V];if(P)return{data:{index:V,overflows:g},reset:{placement:P}};let S=(H=g.filter(v=>v.overflows[0]<=0).sort((v,b)=>v.overflows[1]-b.overflows[1])[0])==null?void 0:H.placement;if(!S)switch(d){case"bestFit":{var G;const v=(G=g.map(b=>[b.placement,b.overflows.filter(B=>B>0).reduce((B,M)=>B+M,0)]).sort((b,B)=>b[1]-B[1])[0])==null?void 0:G[0];v&&(S=v);break}case"initialPlacement":S=a;break}if(n!==S)return{reset:{placement:S}}}return{}}}};function XN(e){const t=Qo(...e.map(i=>i.left)),r=Qo(...e.map(i=>i.top)),n=en(...e.map(i=>i.right)),o=en(...e.map(i=>i.bottom));return{x:t,y:r,width:n-t,height:o-r}}function Lae(e){const t=e.slice().sort((o,i)=>o.y-i.y),r=[];let n=null;for(let o=0;on.height/2?r.push([i]):r[r.length-1].push(i),n=i}return r.map(o=>du(XN(o)))}const ZN=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:r,elements:n,rects:o,platform:i,strategy:a}=t,{padding:s=2,x:l,y:c}=ya(e,t),u=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(n.reference))||[]),f=Lae(u),d=du(XN(u)),p=c_(s);function h(){if(f.length===2&&f[0].left>f[1].right&&l!=null&&c!=null)return f.find(_=>l>_.left-p.left&&l<_.right+p.right&&c>_.top-p.top&&c<_.bottom+p.bottom)||d;if(f.length>=2){if(Vl(r)==="y"){const G=f[0],V=f[f.length-1],P=ei(r)==="top",S=G.top,v=V.bottom,b=P?G.left:V.left,B=P?G.right:V.right,M=B-b,j=v-S;return{top:S,bottom:v,left:b,right:B,width:M,height:j,x:b,y:S}}const _=ei(r)==="left",w=en(...f.map(G=>G.right)),y=Qo(...f.map(G=>G.left)),C=f.filter(G=>_?G.left===y:G.right===w),I=C[0].top,F=C[C.length-1].bottom,O=y,g=w,D=g-O,H=F-I;return{top:I,bottom:F,left:O,right:g,width:D,height:H,x:O,y:I}}return d}const m=await i.getElementRects({reference:{getBoundingClientRect:h},floating:n.floating,strategy:a});return o.reference.x!==m.reference.x||o.reference.y!==m.reference.y||o.reference.width!==m.reference.width||o.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}};async function zae(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=ei(r),s=ju(r),l=Vl(r)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,f=ya(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),l?{x:p*u,y:d*c}:{x:d*c,y:p*u}}const JN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await zae(t,e);return{x:r+o.x,y:n+o.y,data:o}}}},f_=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:_=>{let{x:w,y}=_;return{x:w,y}}},...l}=ya(e,t),c={x:r,y:n},u=await u_(t,l),f=Vl(ei(o)),d=a_(f);let p=c[d],h=c[f];if(i){const _=d==="y"?"top":"left",w=d==="y"?"bottom":"right",y=p+u[_],C=p-u[w];p=c3(y,p,C)}if(a){const _=f==="y"?"top":"left",w=f==="y"?"bottom":"right",y=h+u[_],C=h-u[w];h=c3(y,h,C)}const m=s.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-r,y:m.y-n}}}}},Uae=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=ya(e,t),u={x:r,y:n},f=Vl(o),d=a_(f);let p=u[d],h=u[f];const m=ya(s,t),_=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const C=d==="y"?"height":"width",I=i.reference[d]-i.floating[C]+_.mainAxis,F=i.reference[d]+i.reference[C]-_.mainAxis;pF&&(p=F)}if(c){var w,y;const C=d==="y"?"width":"height",I=["top","left"].includes(ei(o)),F=i.reference[f]-i.floating[C]+(I&&((w=a.offset)==null?void 0:w[f])||0)+(I?0:_.crossAxis),O=i.reference[f]+i.reference[C]+(I?0:((y=a.offset)==null?void 0:y[f])||0)-(I?_.crossAxis:0);hO&&(h=O)}return{[d]:p,[f]:h}}}},Hae=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:i}=t,{apply:a=()=>{},...s}=ya(e,t),l=await u_(t,s),c=ei(r),u=ju(r),f=Vl(r)==="y",{width:d,height:p}=n.floating;let h,m;c==="top"||c==="bottom"?(h=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,h=u==="end"?"top":"bottom");const _=p-l[h],w=d-l[m],y=!t.middlewareData.shift;let C=_,I=w;if(f){const O=d-l.left-l.right;I=u||y?Qo(w,O):O}else{const O=p-l.top-l.bottom;C=u||y?Qo(_,O):O}if(y&&!u){const O=en(l.left,0),g=en(l.right,0),D=en(l.top,0),H=en(l.bottom,0);f?I=d-2*(O!==0||g!==0?O+g:en(l.left,l.right)):C=p-2*(D!==0||H!==0?D+H:en(l.top,l.bottom))}await a({...t,availableWidth:I,availableHeight:C});const F=await o.getDimensions(i.floating);return d!==F.width||p!==F.height?{reset:{rects:!0}}:{}}}};function Ms(e){return QN(e)?(e.nodeName||"").toLowerCase():"#document"}function Vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Aa(e){var t;return(t=(QN(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function QN(e){return e instanceof Node||e instanceof Vn(e).Node}function ba(e){return e instanceof Element||e instanceof Vn(e).Element}function Ii(e){return e instanceof HTMLElement||e instanceof Vn(e).HTMLElement}function A7(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vn(e).ShadowRoot}function Gp(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=_o(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Vae(e){return["table","td","th"].includes(Ms(e))}function d_(e){const t=p_(),r=_o(e);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Wae(e){let t=pu(e);for(;Ii(t)&&!dy(t);){if(d_(t))return t;t=pu(t)}return null}function p_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function dy(e){return["html","body","#document"].includes(Ms(e))}function _o(e){return Vn(e).getComputedStyle(e)}function py(e){return ba(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function pu(e){if(Ms(e)==="html")return e;const t=e.assignedSlot||e.parentNode||A7(e)&&e.host||Aa(e);return A7(t)?t.host:t}function eF(e){const t=pu(e);return dy(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ii(t)&&Gp(t)?t:eF(t)}function ws(e,t){var r;t===void 0&&(t=[]);const n=eF(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=Vn(n);return o?t.concat(i,i.visualViewport||[],Gp(n)?n:[]):t.concat(n,ws(n))}function tF(e){const t=_o(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Ii(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=Cv(r)!==i||Cv(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function h_(e){return ba(e)?e:e.contextElement}function Kc(e){const t=h_(e);if(!Ii(t))return Ds(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=tF(t);let a=(i?Cv(r.width):r.width)/n,s=(i?Cv(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const qae=Ds(0);function rF(e){const t=Vn(e);return!p_()||!t.visualViewport?qae:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gae(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Vn(e)?!1:t}function Rl(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=h_(e);let a=Ds(1);t&&(n?ba(n)&&(a=Kc(n)):a=Kc(e));const s=Gae(i,r,n)?rF(i):Ds(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const d=Vn(i),p=n&&ba(n)?Vn(n):n;let h=d.frameElement;for(;h&&n&&p!==d;){const m=Kc(h),_=h.getBoundingClientRect(),w=_o(h),y=_.left+(h.clientLeft+parseFloat(w.paddingLeft))*m.x,C=_.top+(h.clientTop+parseFloat(w.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,f*=m.y,l+=y,c+=C,h=Vn(h).frameElement}}return du({width:u,height:f,x:l,y:c})}function Kae(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=Ii(r),i=Aa(r);if(r===i)return t;let a={scrollLeft:0,scrollTop:0},s=Ds(1);const l=Ds(0);if((o||!o&&n!=="fixed")&&((Ms(r)!=="body"||Gp(i))&&(a=py(r)),Ii(r))){const c=Rl(r);s=Kc(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}}function Yae(e){return Array.from(e.getClientRects())}function nF(e){return Rl(Aa(e)).left+py(e).scrollLeft}function Xae(e){const t=Aa(e),r=py(e),n=e.ownerDocument.body,o=en(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=en(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+nF(e);const s=-r.scrollTop;return _o(n).direction==="rtl"&&(a+=en(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}function Zae(e,t){const r=Vn(e),n=Aa(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=p_();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function Jae(e,t){const r=Rl(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=Ii(e)?Kc(e):Ds(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:a,height:s,x:l,y:c}}function k7(e,t,r){let n;if(t==="viewport")n=Zae(e,r);else if(t==="document")n=Xae(Aa(e));else if(ba(t))n=Jae(t,r);else{const o=rF(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return du(n)}function oF(e,t){const r=pu(e);return r===t||!ba(r)||dy(r)?!1:_o(r).position==="fixed"||oF(r,t)}function Qae(e,t){const r=t.get(e);if(r)return r;let n=ws(e).filter(s=>ba(s)&&Ms(s)!=="body"),o=null;const i=_o(e).position==="fixed";let a=i?pu(e):e;for(;ba(a)&&!dy(a);){const s=_o(a),l=d_(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Gp(a)&&!l&&oF(e,a))?n=n.filter(u=>u!==a):o=s,a=pu(a)}return t.set(e,n),n}function ese(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?Qae(t,this._c):[].concat(r),n],s=a[0],l=a.reduce((c,u)=>{const f=k7(t,u,o);return c.top=en(f.top,c.top),c.right=Qo(f.right,c.right),c.bottom=Qo(f.bottom,c.bottom),c.left=en(f.left,c.left),c},k7(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function tse(e){return tF(e)}function rse(e,t,r){const n=Ii(t),o=Aa(t),i=r==="fixed",a=Rl(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Ds(0);if(n||!n&&!i)if((Ms(t)!=="body"||Gp(o))&&(s=py(t)),n){const c=Rl(t,!0,i,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else o&&(l.x=nF(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function I7(e,t){return!Ii(e)||_o(e).position==="fixed"?null:t?t(e):e.offsetParent}function iF(e,t){const r=Vn(e);if(!Ii(e))return r;let n=I7(e,t);for(;n&&Vae(n)&&_o(n).position==="static";)n=I7(n,t);return n&&(Ms(n)==="html"||Ms(n)==="body"&&_o(n).position==="static"&&!d_(n))?r:n||Wae(e)||r}const nse=async function(e){let{reference:t,floating:r,strategy:n}=e;const o=this.getOffsetParent||iF,i=this.getDimensions;return{reference:rse(t,await o(r),n),floating:{x:0,y:0,...await i(r)}}};function ose(e){return _o(e).direction==="rtl"}const ise={convertOffsetParentRelativeRectToViewportRelativeRect:Kae,getDocumentElement:Aa,getClippingRect:ese,getOffsetParent:iF,getElementRects:nse,getClientRects:Yae,getDimensions:tse,getScale:Kc,isElement:ba,isRTL:ose};function ase(e,t){let r=null,n;const o=Aa(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;const p=u0(u),h=u0(o.clientWidth-(c+f)),m=u0(o.clientHeight-(u+d)),_=u0(c),y={rootMargin:-p+"px "+-h+"px "+-m+"px "+-_+"px",threshold:en(0,Qo(1,l))||1};let C=!0;function I(F){const O=F[0].intersectionRatio;if(O!==l){if(!C)return a();O?a(!1,O):n=setTimeout(()=>{a(!1,1e-7)},100)}C=!1}try{r=new IntersectionObserver(I,{...y,root:o.ownerDocument})}catch{r=new IntersectionObserver(I,y)}r.observe(e)}return a(!0),i}function sse(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=h_(e),u=o||i?[...c?ws(c):[],...ws(t)]:[];u.forEach(w=>{o&&w.addEventListener("scroll",r,{passive:!0}),i&&w.addEventListener("resize",r)});const f=c&&s?ase(c,r):null;let d=-1,p=null;a&&(p=new ResizeObserver(w=>{let[y]=w;y&&y.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{p&&p.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let h,m=l?Rl(e):null;l&&_();function _(){const w=Rl(e);m&&(w.x!==m.x||w.y!==m.y||w.width!==m.width||w.height!==m.height)&&r(),m=w,h=requestAnimationFrame(_)}return r(),()=>{u.forEach(w=>{o&&w.removeEventListener("scroll",r),i&&w.removeEventListener("resize",r)}),f&&f(),p&&p.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const lse=(e,t,r)=>{const n=new Map,o={platform:ise,...r},i={...o.platform,_c:n};return jae(e,t,{...o,platform:i})},aF=e=>{const{element:t,padding:r}=e;function n(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return n(t)?t.current!=null?O7({element:t.current,padding:r}).fn(o):{}:t?O7({element:t,padding:r}).fn(o):{}}}};var s1=typeof document<"u"?$.useLayoutEffect:$.useEffect;function Ov(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Ov(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!Ov(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function $7(e){const t=$.useRef(e);return s1(()=>{t.current=e}),t}function cse(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,whileElementsMounted:i,open:a}=e,[s,l]=$.useState({x:null,y:null,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[c,u]=$.useState(n);Ov(c,n)||u(n);const f=$.useRef(null),d=$.useRef(null),p=$.useRef(s),h=$7(i),m=$7(o),[_,w]=$.useState(null),[y,C]=$.useState(null),I=$.useCallback(G=>{f.current!==G&&(f.current=G,w(G))},[]),F=$.useCallback(G=>{d.current!==G&&(d.current=G,C(G))},[]),O=$.useCallback(()=>{if(!f.current||!d.current)return;const G={placement:t,strategy:r,middleware:c};m.current&&(G.platform=m.current),lse(f.current,d.current,G).then(V=>{const P={...V,isPositioned:!0};g.current&&!Ov(p.current,P)&&(p.current=P,Us.flushSync(()=>{l(P)}))})},[c,t,r,m]);s1(()=>{a===!1&&p.current.isPositioned&&(p.current.isPositioned=!1,l(G=>({...G,isPositioned:!1})))},[a]);const g=$.useRef(!1);s1(()=>(g.current=!0,()=>{g.current=!1}),[]),s1(()=>{if(_&&y){if(h.current)return h.current(_,y,O);O()}},[_,y,O,h]);const D=$.useMemo(()=>({reference:f,floating:d,setReference:I,setFloating:F}),[I,F]),H=$.useMemo(()=>({reference:_,floating:y}),[_,y]);return $.useMemo(()=>({...s,update:O,refs:D,elements:H,reference:I,floating:F}),[s,O,D,H,I,F])}var hu=typeof document<"u"?$.useLayoutEffect:$.useEffect;let m2=!1,use=0;const T7=()=>"floating-ui-"+use++;function fse(){const[e,t]=$.useState(()=>m2?T7():void 0);return hu(()=>{e==null&&t(T7())},[]),$.useEffect(()=>{m2||(m2=!0)},[]),e}const dse=Ld["useId".toString()],D7=dse||fse;function pse(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){e.set(t,(e.get(t)||[]).filter(n=>n!==r))}}}const hse=$.createContext(null),vse=$.createContext(null),sF=()=>{var e;return((e=$.useContext(hse))==null?void 0:e.id)||null},v_=()=>$.useContext(vse);function os(e){return(e==null?void 0:e.ownerDocument)||document}function gse(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function mse(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function g_(e){return os(e).defaultView||window}function wi(e){return e?e instanceof g_(e).Element:!1}function lF(e){return e?e instanceof g_(e).HTMLElement:!1}function yse(e){if(typeof ShadowRoot>"u")return!1;const t=g_(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function bse(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(gse())||t.test(mse()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function wse(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function cF(e,t){const r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function M7(e){const t=$.useRef(e);return hu(()=>{t.current=e}),t}const R7="data-floating-ui-safe-polygon";function l1(e,t,r){return r&&!cF(r)?0:typeof e=="number"?e:e==null?void 0:e[t]}const xse=function(e,t){let{enabled:r=!0,delay:n=0,handleClose:o=null,mouseOnly:i=!1,restMs:a=0,move:s=!0}=t===void 0?{}:t;const{open:l,onOpenChange:c,dataRef:u,events:f,elements:{domReference:d,floating:p},refs:h}=e,m=v_(),_=sF(),w=M7(o),y=M7(n),C=$.useRef(),I=$.useRef(),F=$.useRef(),O=$.useRef(),g=$.useRef(!0),D=$.useRef(!1),H=$.useRef(()=>{}),G=$.useCallback(()=>{var v;const b=(v=u.current.openEvent)==null?void 0:v.type;return(b==null?void 0:b.includes("mouse"))&&b!=="mousedown"},[u]);$.useEffect(()=>{if(!r)return;function v(){clearTimeout(I.current),clearTimeout(O.current),g.current=!0}return f.on("dismiss",v),()=>{f.off("dismiss",v)}},[r,f]),$.useEffect(()=>{if(!r||!w.current||!l)return;function v(){G()&&c(!1)}const b=os(p).documentElement;return b.addEventListener("mouseleave",v),()=>{b.removeEventListener("mouseleave",v)}},[p,l,c,r,w,u,G]);const V=$.useCallback(function(v){v===void 0&&(v=!0);const b=l1(y.current,"close",C.current);b&&!F.current?(clearTimeout(I.current),I.current=setTimeout(()=>c(!1),b)):v&&(clearTimeout(I.current),c(!1))},[y,c]),P=$.useCallback(()=>{H.current(),F.current=void 0},[]),S=$.useCallback(()=>{if(D.current){const v=os(h.floating.current).body;v.style.pointerEvents="",v.removeAttribute(R7),D.current=!1}},[h]);return $.useEffect(()=>{if(!r)return;function v(){return u.current.openEvent?["click","mousedown"].includes(u.current.openEvent.type):!1}function b(j){if(clearTimeout(I.current),g.current=!1,i&&!cF(C.current)||a>0&&l1(y.current,"open")===0)return;u.current.openEvent=j;const U=l1(y.current,"open",C.current);U?I.current=setTimeout(()=>{c(!0)},U):c(!0)}function B(j){if(v())return;H.current();const U=os(p);if(clearTimeout(O.current),w.current){l||clearTimeout(I.current),F.current=w.current({...e,tree:m,x:j.clientX,y:j.clientY,onClose(){S(),P(),V()}});const E=F.current;U.addEventListener("mousemove",E),H.current=()=>{U.removeEventListener("mousemove",E)};return}V()}function M(j){v()||w.current==null||w.current({...e,tree:m,x:j.clientX,y:j.clientY,onClose(){S(),P(),V()}})(j)}if(wi(d)){const j=d;return l&&j.addEventListener("mouseleave",M),p==null||p.addEventListener("mouseleave",M),s&&j.addEventListener("mousemove",b,{once:!0}),j.addEventListener("mouseenter",b),j.addEventListener("mouseleave",B),()=>{l&&j.removeEventListener("mouseleave",M),p==null||p.removeEventListener("mouseleave",M),s&&j.removeEventListener("mousemove",b),j.removeEventListener("mouseenter",b),j.removeEventListener("mouseleave",B)}}},[d,p,r,e,i,a,s,V,P,S,c,l,m,y,w,u]),hu(()=>{var v;if(r&&l&&(v=w.current)!=null&&v.__options.blockPointerEvents&&G()){const M=os(p).body;if(M.setAttribute(R7,""),M.style.pointerEvents="none",D.current=!0,wi(d)&&p){var b,B;const j=d,U=m==null||(b=m.nodesRef.current.find(E=>E.id===_))==null||(B=b.context)==null?void 0:B.elements.floating;return U&&(U.style.pointerEvents=""),j.style.pointerEvents="auto",p.style.pointerEvents="auto",()=>{j.style.pointerEvents="",p.style.pointerEvents=""}}}},[r,l,_,p,d,m,w,u,G]),hu(()=>{l||(C.current=void 0,P(),S())},[l,P,S]),$.useEffect(()=>()=>{P(),clearTimeout(I.current),clearTimeout(O.current),S()},[r,P,S]),$.useMemo(()=>{if(!r)return{};function v(b){C.current=b.pointerType}return{reference:{onPointerDown:v,onPointerEnter:v,onMouseMove(){l||a===0||(clearTimeout(O.current),O.current=setTimeout(()=>{g.current||c(!0)},a))}},floating:{onMouseEnter(){clearTimeout(I.current)},onMouseLeave(){f.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),V(!1)}}}},[f,r,a,l,c,V])},uF=$.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),fF=()=>$.useContext(uF),_se=e=>{let{children:t,delay:r,timeoutMs:n=0}=e;const[o,i]=$.useReducer((l,c)=>({...l,...c}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),a=$.useRef(null),s=$.useCallback(l=>{i({currentId:l})},[]);return hu(()=>{o.currentId?a.current===null?a.current=o.currentId:i({isInstantPhase:!0}):(i({isInstantPhase:!1}),a.current=null)},[o.currentId]),$.createElement(uF.Provider,{value:$.useMemo(()=>({...o,setState:i,setCurrentId:s}),[o,i,s])},t)},Ese=(e,t)=>{let{open:r,onOpenChange:n}=e,{id:o}=t;const{currentId:i,setCurrentId:a,initialDelay:s,setState:l,timeoutMs:c}=fF();$.useEffect(()=>{i&&(l({delay:{open:1,close:l1(s,"close")}}),i!==o&&n(!1))},[o,n,l,i,s]),$.useEffect(()=>{function u(){n(!1),l({delay:s,currentId:null})}if(!r&&i===o)if(c){const f=window.setTimeout(u,c);return()=>{clearTimeout(f)}}else u()},[r,l,i,o,n,s,c]),$.useEffect(()=>{r&&a(o)},[r,a,o])};function Sse(e){let t=e.activeElement;for(;((r=t)==null||(n=r.shadowRoot)==null?void 0:n.activeElement)!=null;){var r,n;t=t.shadowRoot.activeElement}return t}function N7(e,t){if(!e||!t)return!1;const r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&yse(r)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}function y2(e,t){let r=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)})||[],n=r;for(;n.length;)n=e.filter(o=>{var i;return(i=n)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})})||[],r=r.concat(n);return r}function Cse(e){return"composedPath"in e?e.composedPath()[0]:e.target}const Pse=Ld["useInsertionEffect".toString()],Ose=Pse||(e=>e());function dF(e){const t=$.useRef(()=>{});return Ose(()=>{t.current=e}),$.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o!1),F=typeof d=="function"?I:d,O=$.useRef(!1),{escapeKeyBubbles:g,outsidePressBubbles:D}=Ise(w);return $.useEffect(()=>{if(!r||!u)return;c.current.__escapeKeyBubbles=g,c.current.__outsidePressBubbles=D;function H(v){if(v.key==="Escape"){const b=y?y2(y.nodesRef.current,i):[];if(b.length>0){let B=!0;if(b.forEach(M=>{var j;if((j=M.context)!=null&&j.open&&!M.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1)}}function G(v){const b=O.current;if(O.current=!1,b||typeof F=="function"&&!F(v))return;const B=Cse(v);if(lF(B)&&l){const U=l.ownerDocument.defaultView||window,E=B.scrollWidth>B.clientWidth,N=B.scrollHeight>B.clientHeight;let T=N&&v.offsetX>B.clientWidth;if(N&&U.getComputedStyle(B).direction==="rtl"&&(T=v.offsetX<=B.offsetWidth-B.clientWidth),T||E&&v.offsetY>B.clientHeight)return}const M=y&&y2(y.nodesRef.current,i).some(U=>{var E;return c1(v,(E=U.context)==null?void 0:E.elements.floating)});if(c1(v,l)||c1(v,s)||M)return;const j=y?y2(y.nodesRef.current,i):[];if(j.length>0){let U=!0;if(j.forEach(E=>{var N;if((N=E.context)!=null&&N.open&&!E.context.dataRef.current.__outsidePressBubbles){U=!1;return}}),!U)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:C?{preventScroll:!0}:bse(v)||wse(v)}}),n(!1)}function V(){n(!1)}const P=os(l);f&&P.addEventListener("keydown",H),F&&P.addEventListener(p,G);let S=[];return _&&(wi(s)&&(S=ws(s)),wi(l)&&(S=S.concat(ws(l))),!wi(a)&&a&&a.contextElement&&(S=S.concat(ws(a.contextElement)))),S=S.filter(v=>{var b;return v!==((b=P.defaultView)==null?void 0:b.visualViewport)}),S.forEach(v=>{v.addEventListener("scroll",V,{passive:!0})}),()=>{f&&P.removeEventListener("keydown",H),F&&P.removeEventListener(p,G),S.forEach(v=>{v.removeEventListener("scroll",V)})}},[c,l,s,a,f,F,p,o,y,i,r,n,_,u,g,D,C]),$.useEffect(()=>{O.current=!1},[F,p]),$.useMemo(()=>u?{reference:{[Ase[m]]:()=>{h&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1))}},floating:{[kse[p]]:()=>{O.current=!0}}}:{},[u,o,h,p,m,n])},Tse=function(e,t){let{open:r,onOpenChange:n,dataRef:o,events:i,refs:a,elements:{floating:s,domReference:l}}=e,{enabled:c=!0,keyboardOnly:u=!0}=t===void 0?{}:t;const f=$.useRef(""),d=$.useRef(!1),p=$.useRef();return $.useEffect(()=>{if(!c)return;const m=os(s).defaultView||window;function _(){!r&&lF(l)&&l===Sse(os(l))&&(d.current=!0)}return m.addEventListener("blur",_),()=>{m.removeEventListener("blur",_)}},[s,l,r,c]),$.useEffect(()=>{if(!c)return;function h(m){(m.type==="referencePress"||m.type==="escapeKey")&&(d.current=!0)}return i.on("dismiss",h),()=>{i.off("dismiss",h)}},[i,c]),$.useEffect(()=>()=>{clearTimeout(p.current)},[]),$.useMemo(()=>c?{reference:{onPointerDown(h){let{pointerType:m}=h;f.current=m,d.current=!!(m&&u)},onMouseLeave(){d.current=!1},onFocus(h){var m;d.current||h.type==="focus"&&((m=o.current.openEvent)==null?void 0:m.type)==="mousedown"&&o.current.openEvent&&c1(o.current.openEvent,l)||(o.current.openEvent=h.nativeEvent,n(!0))},onBlur(h){d.current=!1;const m=h.relatedTarget,_=wi(m)&&m.hasAttribute("data-floating-ui-focus-guard")&&m.getAttribute("data-type")==="outside";p.current=setTimeout(()=>{N7(a.floating.current,m)||N7(l,m)||_||n(!1)})}}}:{},[c,u,l,a,o,n])},Dse=function(e,t){let{open:r}=e,{enabled:n=!0,role:o="dialog"}=t===void 0?{}:t;const i=D7(),a=D7();return $.useMemo(()=>{const s={id:i,role:o};return n?o==="tooltip"?{reference:{"aria-describedby":r?i:void 0},floating:s}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":r?i:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:a}},floating:{...s,...o==="menu"&&{"aria-labelledby":a}}}:{}},[n,o,r,i,a])};function m_(e){e===void 0&&(e={});const{open:t=!1,onOpenChange:r,nodeId:n}=e,o=cse(e),i=v_(),a=$.useRef(null),s=$.useRef({}),l=$.useState(()=>pse())[0],[c,u]=$.useState(null),f=$.useCallback(w=>{const y=wi(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;o.refs.setReference(y)},[o.refs]),d=$.useCallback(w=>{(wi(w)||w===null)&&(a.current=w,u(w)),(wi(o.refs.reference.current)||o.refs.reference.current===null||w!==null&&!wi(w))&&o.refs.setReference(w)},[o.refs]),p=$.useMemo(()=>({...o.refs,setReference:d,setPositionReference:f,domReference:a}),[o.refs,d,f]),h=$.useMemo(()=>({...o.elements,domReference:c}),[o.elements,c]),m=dF(r),_=$.useMemo(()=>({...o,refs:p,elements:h,dataRef:s,nodeId:n,events:l,open:t,onOpenChange:m}),[o,n,l,t,m,p,h]);return hu(()=>{const w=i==null?void 0:i.nodesRef.current.find(y=>y.id===n);w&&(w.context=_)}),$.useMemo(()=>({...o,context:_,refs:p,reference:d,positionReference:f}),[o,p,_,d,f])}function b2(e,t,r){const n=new Map;return{...r==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[r]:null).concat(e).reduce((o,i)=>(i&&Object.entries(i).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(n.has(s)||n.set(s,[]),typeof l=="function"){var c;(c=n.get(s))==null||c.push(l),o[s]=function(){for(var u,f=arguments.length,d=new Array(f),p=0;ph(...d))}}}else o[s]=l}),o),{})}}const Mse=function(e){e===void 0&&(e=[]);const t=e,r=$.useCallback(i=>b2(i,e,"reference"),t),n=$.useCallback(i=>b2(i,e,"floating"),t),o=$.useCallback(i=>b2(i,e,"item"),e.map(i=>i==null?void 0:i.item));return $.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:o}),[r,n,o])};function pF({opened:e,floating:t,position:r,positionDependencies:n}){const[o,i]=$.useState(0);$.useEffect(()=>{if(t.refs.reference.current&&t.refs.floating.current)return sse(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,r]),Jo(()=>{t.update()},n),Jo(()=>{i(a=>a+1)},[e])}function Rse(e){const t=[JN(e.offset)];return e.middlewares.shift&&t.push(f_({limiter:Uae()})),e.middlewares.flip&&t.push(YN()),e.middlewares.inline&&t.push(ZN()),t.push(aF({element:e.arrowRef,padding:e.arrowOffset})),t}function Nse(e){const[t,r]=Ml({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),n=()=>{var a;(a=e.onClose)==null||a.call(e),r(!1)},o=()=>{var a,s;t?((a=e.onClose)==null||a.call(e),r(!1)):((s=e.onOpen)==null||s.call(e),r(!0))},i=m_({placement:e.position,middleware:[...Rse(e),...e.width==="target"?[Hae({apply({rects:a}){var s,l;Object.assign((l=(s=i.refs.floating.current)==null?void 0:s.style)!=null?l:{},{width:`${a.reference.width}px`})}})]:[]]});return pF({opened:e.opened,position:e.position,positionDependencies:e.positionDependencies,floating:i}),Jo(()=>{var a;(a=e.onPositionChange)==null||a.call(e,i.placement)},[i.placement]),Jo(()=>{var a,s;e.opened?(s=e.onOpen)==null||s.call(e):(a=e.onClose)==null||a.call(e)},[e.opened]),{floating:i,controlled:typeof e.opened=="boolean",opened:t,onClose:n,onToggle:o}}const hF={context:"Popover component was not found in the tree",children:"Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[Fse,vF]=Bp(hF.context);var Bse=Object.defineProperty,jse=Object.defineProperties,Lse=Object.getOwnPropertyDescriptors,Av=Object.getOwnPropertySymbols,gF=Object.prototype.hasOwnProperty,mF=Object.prototype.propertyIsEnumerable,F7=(e,t,r)=>t in e?Bse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f0=(e,t)=>{for(var r in t||(t={}))gF.call(t,r)&&F7(e,r,t[r]);if(Av)for(var r of Av(t))mF.call(t,r)&&F7(e,r,t[r]);return e},zse=(e,t)=>jse(e,Lse(t)),Use=(e,t)=>{var r={};for(var n in e)gF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Av)for(var n of Av(e))t.indexOf(n)<0&&mF.call(e,n)&&(r[n]=e[n]);return r};const Hse={refProp:"ref",popupType:"dialog"},yF=$.forwardRef((e,t)=>{const r=et("PopoverTarget",Hse,e),{children:n,refProp:o,popupType:i}=r,a=Use(r,["children","refProp","popupType"]);if(!jp(n))throw new Error(hF.children);const s=a,l=vF(),c=Vs(l.reference,n.ref,t),u=l.withRoles?{"aria-haspopup":i,"aria-expanded":l.opened,"aria-controls":l.getDropdownId(),id:l.getTargetId()}:{};return $.cloneElement(n,f0(zse(f0(f0(f0({},s),u),l.targetProps),{className:NM(l.targetProps.className,s.className,n.props.className),[o]:c}),l.controlled?null:{onClick:l.onToggle}))});yF.displayName="@mantine/core/PopoverTarget";var Vse=at((e,{radius:t,shadow:r})=>({dropdown:{position:"absolute",backgroundColor:e.white,background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,padding:`${e.spacing.sm} ${e.spacing.md}`,boxShadow:e.shadows[r]||r||"none",borderRadius:e.fn.radius(t),"&:focus":{outline:0}},arrow:{backgroundColor:"inherit",border:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,zIndex:1}}));const Wse=Vse;var qse=Object.defineProperty,B7=Object.getOwnPropertySymbols,Gse=Object.prototype.hasOwnProperty,Kse=Object.prototype.propertyIsEnumerable,j7=(e,t,r)=>t in e?qse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,sc=(e,t)=>{for(var r in t||(t={}))Gse.call(t,r)&&j7(e,r,t[r]);if(B7)for(var r of B7(t))Kse.call(t,r)&&j7(e,r,t[r]);return e};const L7={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function Yse({transition:e,state:t,duration:r,timingFunction:n}){const o={transitionDuration:`${r}ms`,transitionTimingFunction:n};return typeof e=="string"?e in t0?sc(sc(sc({transitionProperty:t0[e].transitionProperty},o),t0[e].common),t0[e][L7[t]]):null:sc(sc(sc({transitionProperty:e.transitionProperty},o),e.common),e[L7[t]])}function Xse({duration:e,exitDuration:t,timingFunction:r,mounted:n,onEnter:o,onExit:i,onEntered:a,onExited:s}){const l=Lr(),c=sy(),u=l.respectReducedMotion?c:!1,[f,d]=$.useState(u?0:e),[p,h]=$.useState(n?"entered":"exited"),m=$.useRef(-1),_=w=>{const y=w?o:i,C=w?a:s;h(w?"pre-entering":"pre-exiting"),window.clearTimeout(m.current);const I=u?0:w?e:t;if(d(I),I===0)typeof y=="function"&&y(),typeof C=="function"&&C(),h(w?"entered":"exited");else{const F=window.setTimeout(()=>{typeof y=="function"&&y(),h(w?"entering":"exiting")},10);m.current=window.setTimeout(()=>{window.clearTimeout(F),typeof C=="function"&&C(),h(w?"entered":"exited")},I)}};return Jo(()=>{_(n)},[n]),$.useEffect(()=>()=>window.clearTimeout(m.current),[]),{transitionDuration:f,transitionStatus:p,transitionTimingFunction:r||l.transitionTimingFunction}}function Wl({keepMounted:e,transition:t,duration:r=250,exitDuration:n=r,mounted:o,children:i,timingFunction:a,onExit:s,onEntered:l,onEnter:c,onExited:u}){const{transitionDuration:f,transitionStatus:d,transitionTimingFunction:p}=Xse({mounted:o,exitDuration:n,duration:r,timingFunction:a,onExit:s,onEntered:l,onEnter:c,onExited:u});return f===0?o?ae.createElement(ae.Fragment,null,i({})):e?i({display:"none"}):null:d==="exited"?e?i({display:"none"}):null:ae.createElement(ae.Fragment,null,i(Yse({transition:t,duration:f,state:d,timingFunction:p})))}Wl.displayName="@mantine/core/Transition";function y_({children:e,active:t=!0,refProp:r="ref"}){const n=jte(t),o=Vs(n,e==null?void 0:e.ref);return jp(e)?$.cloneElement(e,{[r]:o}):e}y_.displayName="@mantine/core/FocusTrap";var Zse=Object.defineProperty,Jse=Object.defineProperties,Qse=Object.getOwnPropertyDescriptors,z7=Object.getOwnPropertySymbols,ele=Object.prototype.hasOwnProperty,tle=Object.prototype.propertyIsEnumerable,U7=(e,t,r)=>t in e?Zse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Fa=(e,t)=>{for(var r in t||(t={}))ele.call(t,r)&&U7(e,r,t[r]);if(z7)for(var r of z7(t))tle.call(t,r)&&U7(e,r,t[r]);return e},d0=(e,t)=>Jse(e,Qse(t));function H7(e,t,r,n){return e==="center"||n==="center"?{top:t}:e==="end"?{bottom:r}:e==="start"?{top:r}:{}}function V7(e,t,r,n,o){return e==="center"||n==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:r}:e==="start"?{[o==="ltr"?"left":"right"]:r}:{}}const rle={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function nle({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,arrowX:i,arrowY:a,dir:s}){const[l,c="center"]=e.split("-"),u={width:me(t),height:me(t),transform:"rotate(45deg)",position:"absolute",[rle[l]]:me(n)},f=me(-t/2);return l==="left"?d0(Fa(Fa({},u),H7(c,a,r,o)),{right:f,borderLeftColor:"transparent",borderBottomColor:"transparent"}):l==="right"?d0(Fa(Fa({},u),H7(c,a,r,o)),{left:f,borderRightColor:"transparent",borderTopColor:"transparent"}):l==="top"?d0(Fa(Fa({},u),V7(c,i,r,o,s)),{bottom:f,borderTopColor:"transparent",borderLeftColor:"transparent"}):l==="bottom"?d0(Fa(Fa({},u),V7(c,i,r,o,s)),{top:f,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var ole=Object.defineProperty,ile=Object.defineProperties,ale=Object.getOwnPropertyDescriptors,kv=Object.getOwnPropertySymbols,bF=Object.prototype.hasOwnProperty,wF=Object.prototype.propertyIsEnumerable,W7=(e,t,r)=>t in e?ole(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,sle=(e,t)=>{for(var r in t||(t={}))bF.call(t,r)&&W7(e,r,t[r]);if(kv)for(var r of kv(t))wF.call(t,r)&&W7(e,r,t[r]);return e},lle=(e,t)=>ile(e,ale(t)),cle=(e,t)=>{var r={};for(var n in e)bF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&kv)for(var n of kv(e))t.indexOf(n)<0&&wF.call(e,n)&&(r[n]=e[n]);return r};const b_=$.forwardRef((e,t)=>{var r=e,{position:n,arrowSize:o,arrowOffset:i,arrowRadius:a,arrowPosition:s,visible:l,arrowX:c,arrowY:u}=r,f=cle(r,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const d=Lr();return l?ae.createElement("div",lle(sle({},f),{ref:t,style:nle({position:n,arrowSize:o,arrowOffset:i,arrowRadius:a,arrowPosition:s,dir:d.dir,arrowX:c,arrowY:u})})):null});b_.displayName="@mantine/core/FloatingArrow";var ule=Object.defineProperty,fle=Object.defineProperties,dle=Object.getOwnPropertyDescriptors,Iv=Object.getOwnPropertySymbols,xF=Object.prototype.hasOwnProperty,_F=Object.prototype.propertyIsEnumerable,q7=(e,t,r)=>t in e?ule(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lc=(e,t)=>{for(var r in t||(t={}))xF.call(t,r)&&q7(e,r,t[r]);if(Iv)for(var r of Iv(t))_F.call(t,r)&&q7(e,r,t[r]);return e},p0=(e,t)=>fle(e,dle(t)),ple=(e,t)=>{var r={};for(var n in e)xF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Iv)for(var n of Iv(e))t.indexOf(n)<0&&_F.call(e,n)&&(r[n]=e[n]);return r};const hle={};function EF(e){var t;const r=et("PopoverDropdown",hle,e),{style:n,className:o,children:i,onKeyDownCapture:a}=r,s=ple(r,["style","className","children","onKeyDownCapture"]),l=vF(),{classes:c,cx:u}=Wse({radius:l.radius,shadow:l.shadow},{name:l.__staticSelector,classNames:l.classNames,styles:l.styles,unstyled:l.unstyled,variant:l.variant}),f=fR({opened:l.opened,shouldReturnFocus:l.returnFocus}),d=l.withRoles?{"aria-labelledby":l.getTargetId(),id:l.getDropdownId(),role:"dialog"}:{};return l.disabled?null:ae.createElement(Vp,p0(lc({},l.portalProps),{withinPortal:l.withinPortal}),ae.createElement(Wl,p0(lc({mounted:l.opened},l.transitionProps),{transition:l.transitionProps.transition||"fade",duration:(t=l.transitionProps.duration)!=null?t:150,keepMounted:l.keepMounted,exitDuration:typeof l.transitionProps.exitDuration=="number"?l.transitionProps.exitDuration:l.transitionProps.duration}),p=>{var h,m;return ae.createElement(y_,{active:l.trapFocus},ae.createElement(rt,lc(p0(lc({},d),{tabIndex:-1,ref:l.floating,style:p0(lc(lc({},n),p),{zIndex:l.zIndex,top:(h=l.y)!=null?h:0,left:(m=l.x)!=null?m:0,width:l.width==="target"?void 0:me(l.width)}),className:u(c.dropdown,o),onKeyDownCapture:oQ(l.onClose,{active:l.closeOnEscape,onTrigger:f,onKeyDown:a}),"data-position":l.placement}),s),i,ae.createElement(b_,{ref:l.arrowRef,arrowX:l.arrowX,arrowY:l.arrowY,visible:l.withArrow,position:l.placement,arrowSize:l.arrowSize,arrowRadius:l.arrowRadius,arrowOffset:l.arrowOffset,arrowPosition:l.arrowPosition,className:c.arrow})))}))}EF.displayName="@mantine/core/PopoverDropdown";function SF(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){const[r,n]=t.split("-"),o=r==="right"?"left":"right";return n===void 0?o:`${o}-${n}`}return t}var G7=Object.getOwnPropertySymbols,vle=Object.prototype.hasOwnProperty,gle=Object.prototype.propertyIsEnumerable,mle=(e,t)=>{var r={};for(var n in e)vle.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&G7)for(var n of G7(e))t.indexOf(n)<0&&gle.call(e,n)&&(r[n]=e[n]);return r};const yle={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!1,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:Hs("popover"),__staticSelector:"Popover",width:"max-content"};function ka(e){var t,r,n,o,i,a;const s=$.useRef(null),l=et("Popover",yle,e),{children:c,position:u,offset:f,onPositionChange:d,positionDependencies:p,opened:h,transitionProps:m,width:_,middlewares:w,withArrow:y,arrowSize:C,arrowOffset:I,arrowRadius:F,arrowPosition:O,unstyled:g,classNames:D,styles:H,closeOnClickOutside:G,withinPortal:V,portalProps:P,closeOnEscape:S,clickOutsideEvents:v,trapFocus:b,onClose:B,onOpen:M,onChange:j,zIndex:U,radius:E,shadow:N,id:T,defaultOpened:q,__staticSelector:J,withRoles:te,disabled:ne,returnFocus:ce,variant:ie,keepMounted:ue}=l,A=mle(l,["children","position","offset","onPositionChange","positionDependencies","opened","transitionProps","width","middlewares","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","unstyled","classNames","styles","closeOnClickOutside","withinPortal","portalProps","closeOnEscape","clickOutsideEvents","trapFocus","onClose","onOpen","onChange","zIndex","radius","shadow","id","defaultOpened","__staticSelector","withRoles","disabled","returnFocus","variant","keepMounted"]),[K,ee]=$.useState(null),[se,pe]=$.useState(null),ge=Ul(T),X=Lr(),R=Nse({middlewares:w,width:_,position:SF(X.dir,u),offset:typeof f=="number"?f+(y?C/2:0):f,arrowRef:s,arrowOffset:I,onPositionChange:d,positionDependencies:p,opened:h,defaultOpened:q,onChange:j,onOpen:M,onClose:B});Ate(()=>R.opened&&G&&R.onClose(),v,[K,se]);const z=$.useCallback(Q=>{ee(Q),R.floating.reference(Q)},[R.floating.reference]),Z=$.useCallback(Q=>{pe(Q),R.floating.floating(Q)},[R.floating.floating]);return ae.createElement(Fse,{value:{returnFocus:ce,disabled:ne,controlled:R.controlled,reference:z,floating:Z,x:R.floating.x,y:R.floating.y,arrowX:(n=(r=(t=R.floating)==null?void 0:t.middlewareData)==null?void 0:r.arrow)==null?void 0:n.x,arrowY:(a=(i=(o=R.floating)==null?void 0:o.middlewareData)==null?void 0:i.arrow)==null?void 0:a.y,opened:R.opened,arrowRef:s,transitionProps:m,width:_,withArrow:y,arrowSize:C,arrowOffset:I,arrowRadius:F,arrowPosition:O,placement:R.floating.placement,trapFocus:b,withinPortal:V,portalProps:P,zIndex:U,radius:E,shadow:N,closeOnEscape:S,onClose:R.onClose,onToggle:R.onToggle,getTargetId:()=>`${ge}-target`,getDropdownId:()=>`${ge}-dropdown`,withRoles:te,targetProps:A,__staticSelector:J,classNames:D,styles:H,unstyled:g,variant:ie,keepMounted:ue}},c)}ka.Target=yF;ka.Dropdown=EF;ka.displayName="@mantine/core/Popover";var ble=Object.defineProperty,$v=Object.getOwnPropertySymbols,CF=Object.prototype.hasOwnProperty,PF=Object.prototype.propertyIsEnumerable,K7=(e,t,r)=>t in e?ble(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wle=(e,t)=>{for(var r in t||(t={}))CF.call(t,r)&&K7(e,r,t[r]);if($v)for(var r of $v(t))PF.call(t,r)&&K7(e,r,t[r]);return e},xle=(e,t)=>{var r={};for(var n in e)CF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&$v)for(var n of $v(e))t.indexOf(n)<0&&PF.call(e,n)&&(r[n]=e[n]);return r};function _le(e){var t=e,{children:r,component:n="div",maxHeight:o=220,direction:i="column",id:a,innerRef:s,__staticSelector:l,styles:c,classNames:u,unstyled:f}=t,d=xle(t,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:p}=$ae(null,{name:l,styles:c,classNames:u,unstyled:f});return ae.createElement(ka.Dropdown,wle({p:0,onMouseDown:h=>h.preventDefault()},d),ae.createElement("div",{style:{maxHeight:me(o),display:"flex"}},ae.createElement(rt,{component:n||"div",id:`${a}-items`,"aria-labelledby":`${a}-label`,role:"listbox",onMouseDown:h=>h.preventDefault(),style:{flex:1,overflowY:n!==i_?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:s},ae.createElement("div",{className:p.itemsWrapper,style:{flexDirection:i}},r))))}function md({opened:e,transitionProps:t={transition:"fade",duration:0},shadow:r,withinPortal:n,portalProps:o,children:i,__staticSelector:a,onDirectionChange:s,switchDirectionOnFlip:l,zIndex:c,dropdownPosition:u,positionDependencies:f=[],classNames:d,styles:p,unstyled:h,readOnly:m,variant:_}){return ae.createElement(ka,{unstyled:h,classNames:d,styles:p,width:"target",withRoles:!1,opened:e,middlewares:{flip:u==="flip",shift:!1},position:u==="flip"?"bottom":u,positionDependencies:f,zIndex:c,__staticSelector:a,withinPortal:n,portalProps:o,transitionProps:t,shadow:r,disabled:m,onPositionChange:w=>l&&(s==null?void 0:s(w==="top"?"column-reverse":"column")),variant:_},i)}md.Target=ka.Target;md.Dropdown=_le;var Ele=Object.defineProperty,Sle=Object.defineProperties,Cle=Object.getOwnPropertyDescriptors,Tv=Object.getOwnPropertySymbols,OF=Object.prototype.hasOwnProperty,AF=Object.prototype.propertyIsEnumerable,Y7=(e,t,r)=>t in e?Ele(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h0=(e,t)=>{for(var r in t||(t={}))OF.call(t,r)&&Y7(e,r,t[r]);if(Tv)for(var r of Tv(t))AF.call(t,r)&&Y7(e,r,t[r]);return e},Ple=(e,t)=>Sle(e,Cle(t)),Ole=(e,t)=>{var r={};for(var n in e)OF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Tv)for(var n of Tv(e))t.indexOf(n)<0&&AF.call(e,n)&&(r[n]=e[n]);return r};function kF(e,t,r){const n=et(e,t,r),{label:o,description:i,error:a,required:s,classNames:l,styles:c,className:u,unstyled:f,__staticSelector:d,sx:p,errorProps:h,labelProps:m,descriptionProps:_,wrapperProps:w,id:y,size:C,style:I,inputContainer:F,inputWrapperOrder:O,withAsterisk:g,variant:D}=n,H=Ole(n,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),G=Ul(y),{systemStyles:V,rest:P}=Bu(H),S=h0({label:o,description:i,error:a,required:s,classNames:l,className:u,__staticSelector:d,sx:p,errorProps:h,labelProps:m,descriptionProps:_,unstyled:f,styles:c,id:G,size:C,style:I,inputContainer:F,inputWrapperOrder:O,withAsterisk:g,variant:D},w);return Ple(h0({},P),{classNames:l,styles:c,unstyled:f,wrapperProps:h0(h0({},S),V),inputProps:{required:s,classNames:l,styles:c,unstyled:f,id:G,size:C,__staticSelector:d,error:a,variant:D}})}var Ale=at((e,t,{size:r})=>({label:{display:"inline-block",fontSize:Re({size:r,sizes:e.fontSizes}),fontWeight:500,color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[9],wordBreak:"break-word",cursor:"default",WebkitTapHighlightColor:"transparent"},required:{color:e.fn.variant({variant:"filled",color:"red"}).background}}));const kle=Ale;var Ile=Object.defineProperty,Dv=Object.getOwnPropertySymbols,IF=Object.prototype.hasOwnProperty,$F=Object.prototype.propertyIsEnumerable,X7=(e,t,r)=>t in e?Ile(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$le=(e,t)=>{for(var r in t||(t={}))IF.call(t,r)&&X7(e,r,t[r]);if(Dv)for(var r of Dv(t))$F.call(t,r)&&X7(e,r,t[r]);return e},Tle=(e,t)=>{var r={};for(var n in e)IF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Dv)for(var n of Dv(e))t.indexOf(n)<0&&$F.call(e,n)&&(r[n]=e[n]);return r};const Dle={labelElement:"label",size:"sm"},w_=$.forwardRef((e,t)=>{const r=et("InputLabel",Dle,e),{labelElement:n,children:o,required:i,size:a,classNames:s,styles:l,unstyled:c,className:u,htmlFor:f,__staticSelector:d,variant:p,onMouseDown:h}=r,m=Tle(r,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:_,cx:w}=kle(null,{name:["InputWrapper",d],classNames:s,styles:l,unstyled:c,variant:p,size:a});return ae.createElement(rt,$le({component:n,ref:t,className:w(_.label,u),htmlFor:n==="label"?f:void 0,onMouseDown:y=>{h==null||h(y),!y.defaultPrevented&&y.detail>1&&y.preventDefault()}},m),o,i&&ae.createElement("span",{className:_.required,"aria-hidden":!0}," *"))});w_.displayName="@mantine/core/InputLabel";var Mle=at((e,t,{size:r})=>({error:{wordBreak:"break-word",color:e.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${Re({size:r,sizes:e.fontSizes})} - ${me(2)})`,lineHeight:1.2,display:"block"}}));const Rle=Mle;var Nle=Object.defineProperty,Mv=Object.getOwnPropertySymbols,TF=Object.prototype.hasOwnProperty,DF=Object.prototype.propertyIsEnumerable,Z7=(e,t,r)=>t in e?Nle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Fle=(e,t)=>{for(var r in t||(t={}))TF.call(t,r)&&Z7(e,r,t[r]);if(Mv)for(var r of Mv(t))DF.call(t,r)&&Z7(e,r,t[r]);return e},Ble=(e,t)=>{var r={};for(var n in e)TF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Mv)for(var n of Mv(e))t.indexOf(n)<0&&DF.call(e,n)&&(r[n]=e[n]);return r};const jle={size:"sm"},x_=$.forwardRef((e,t)=>{const r=et("InputError",jle,e),{children:n,className:o,classNames:i,styles:a,unstyled:s,size:l,__staticSelector:c,variant:u}=r,f=Ble(r,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:d,cx:p}=Rle(null,{name:["InputWrapper",c],classNames:i,styles:a,unstyled:s,variant:u,size:l});return ae.createElement(St,Fle({className:p(d.error,o),ref:t},f),n)});x_.displayName="@mantine/core/InputError";var Lle=at((e,t,{size:r})=>({description:{wordBreak:"break-word",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontSize:`calc(${Re({size:r,sizes:e.fontSizes})} - ${me(2)})`,lineHeight:1.2,display:"block"}}));const zle=Lle;var Ule=Object.defineProperty,Rv=Object.getOwnPropertySymbols,MF=Object.prototype.hasOwnProperty,RF=Object.prototype.propertyIsEnumerable,J7=(e,t,r)=>t in e?Ule(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Hle=(e,t)=>{for(var r in t||(t={}))MF.call(t,r)&&J7(e,r,t[r]);if(Rv)for(var r of Rv(t))RF.call(t,r)&&J7(e,r,t[r]);return e},Vle=(e,t)=>{var r={};for(var n in e)MF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Rv)for(var n of Rv(e))t.indexOf(n)<0&&RF.call(e,n)&&(r[n]=e[n]);return r};const Wle={size:"sm"},__=$.forwardRef((e,t)=>{const r=et("InputDescription",Wle,e),{children:n,className:o,classNames:i,styles:a,unstyled:s,size:l,__staticSelector:c,variant:u}=r,f=Vle(r,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:d,cx:p}=zle(null,{name:["InputWrapper",c],classNames:i,styles:a,unstyled:s,variant:u,size:l});return ae.createElement(St,Hle({color:"dimmed",className:p(d.description,o),ref:t,unstyled:s},f),n)});__.displayName="@mantine/core/InputDescription";const NF=$.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),qle=NF.Provider,Gle=()=>$.useContext(NF);function Kle(e,{hasDescription:t,hasError:r}){const n=e.findIndex(l=>l==="input"),o=e[n-1],i=e[n+1];return{offsetBottom:t&&i==="description"||r&&i==="error",offsetTop:t&&o==="description"||r&&o==="error"}}var Yle=Object.defineProperty,Xle=Object.defineProperties,Zle=Object.getOwnPropertyDescriptors,Q7=Object.getOwnPropertySymbols,Jle=Object.prototype.hasOwnProperty,Qle=Object.prototype.propertyIsEnumerable,eC=(e,t,r)=>t in e?Yle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ece=(e,t)=>{for(var r in t||(t={}))Jle.call(t,r)&&eC(e,r,t[r]);if(Q7)for(var r of Q7(t))Qle.call(t,r)&&eC(e,r,t[r]);return e},tce=(e,t)=>Xle(e,Zle(t)),rce=at(e=>({root:tce(ece({},e.fn.fontStyles()),{lineHeight:e.lineHeight})}));const nce=rce;var oce=Object.defineProperty,ice=Object.defineProperties,ace=Object.getOwnPropertyDescriptors,Nv=Object.getOwnPropertySymbols,FF=Object.prototype.hasOwnProperty,BF=Object.prototype.propertyIsEnumerable,tC=(e,t,r)=>t in e?oce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ba=(e,t)=>{for(var r in t||(t={}))FF.call(t,r)&&tC(e,r,t[r]);if(Nv)for(var r of Nv(t))BF.call(t,r)&&tC(e,r,t[r]);return e},rC=(e,t)=>ice(e,ace(t)),sce=(e,t)=>{var r={};for(var n in e)FF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Nv)for(var n of Nv(e))t.indexOf(n)<0&&BF.call(e,n)&&(r[n]=e[n]);return r};const lce={labelElement:"label",size:"sm",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},jF=$.forwardRef((e,t)=>{const r=et("InputWrapper",lce,e),{className:n,label:o,children:i,required:a,id:s,error:l,description:c,labelElement:u,labelProps:f,descriptionProps:d,errorProps:p,classNames:h,styles:m,size:_,inputContainer:w,__staticSelector:y,unstyled:C,inputWrapperOrder:I,withAsterisk:F,variant:O}=r,g=sce(r,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:D,cx:H}=nce(null,{classNames:h,styles:m,name:["InputWrapper",y],unstyled:C,variant:O,size:_}),G={classNames:h,styles:m,unstyled:C,size:_,variant:O,__staticSelector:y},V=typeof F=="boolean"?F:a,P=s?`${s}-error`:p==null?void 0:p.id,S=s?`${s}-description`:d==null?void 0:d.id,b=`${!!l&&typeof l!="boolean"?P:""} ${c?S:""}`,B=b.trim().length>0?b.trim():void 0,M=o&&ae.createElement(w_,Ba(Ba({key:"label",labelElement:u,id:s?`${s}-label`:void 0,htmlFor:s,required:V},G),f),o),j=c&&ae.createElement(__,rC(Ba(Ba({key:"description"},d),G),{size:(d==null?void 0:d.size)||G.size,id:(d==null?void 0:d.id)||S}),c),U=ae.createElement($.Fragment,{key:"input"},w(i)),E=typeof l!="boolean"&&l&&ae.createElement(x_,rC(Ba(Ba({},p),G),{size:(p==null?void 0:p.size)||G.size,key:"error",id:(p==null?void 0:p.id)||P}),l),N=I.map(T=>{switch(T){case"label":return M;case"input":return U;case"description":return j;case"error":return E;default:return null}});return ae.createElement(qle,{value:Ba({describedBy:B},Kle(I,{hasDescription:!!j,hasError:!!E}))},ae.createElement(rt,Ba({className:H(D.root,n),ref:t},g),N))});jF.displayName="@mantine/core/InputWrapper";var cce=Object.defineProperty,Fv=Object.getOwnPropertySymbols,LF=Object.prototype.hasOwnProperty,zF=Object.prototype.propertyIsEnumerable,nC=(e,t,r)=>t in e?cce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uce=(e,t)=>{for(var r in t||(t={}))LF.call(t,r)&&nC(e,r,t[r]);if(Fv)for(var r of Fv(t))zF.call(t,r)&&nC(e,r,t[r]);return e},fce=(e,t)=>{var r={};for(var n in e)LF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Fv)for(var n of Fv(e))t.indexOf(n)<0&&zF.call(e,n)&&(r[n]=e[n]);return r};const dce={},UF=$.forwardRef((e,t)=>{const r=et("InputPlaceholder",dce,e),{sx:n}=r,o=fce(r,["sx"]);return ae.createElement(rt,uce({component:"span",sx:[i=>i.fn.placeholderStyles(),...L6(n)],ref:t},o))});UF.displayName="@mantine/core/InputPlaceholder";var pce=Object.defineProperty,hce=Object.defineProperties,vce=Object.getOwnPropertyDescriptors,oC=Object.getOwnPropertySymbols,gce=Object.prototype.hasOwnProperty,mce=Object.prototype.propertyIsEnumerable,iC=(e,t,r)=>t in e?pce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,v0=(e,t)=>{for(var r in t||(t={}))gce.call(t,r)&&iC(e,r,t[r]);if(oC)for(var r of oC(t))mce.call(t,r)&&iC(e,r,t[r]);return e},w2=(e,t)=>hce(e,vce(t));const fn={xs:me(30),sm:me(36),md:me(42),lg:me(50),xl:me(60)},yce=["default","filled","unstyled"];function bce({theme:e,variant:t}){return yce.includes(t)?t==="default"?{border:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,transition:"border-color 100ms ease","&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:t==="filled"?{border:`${me(1)} solid transparent`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],"&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:{borderWidth:0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:"transparent",minHeight:me(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var wce=at((e,{multiline:t,radius:r,invalid:n,rightSectionWidth:o,withRightSection:i,iconWidth:a,offsetBottom:s,offsetTop:l,pointer:c},{variant:u,size:f})=>{const d=e.fn.variant({variant:"filled",color:"red"}).background,p=u==="default"||u==="filled"?{minHeight:Re({size:f,sizes:fn}),paddingLeft:`calc(${Re({size:f,sizes:fn})} / 3)`,paddingRight:i?o||Re({size:f,sizes:fn}):`calc(${Re({size:f,sizes:fn})} / 3)`,borderRadius:e.fn.radius(r)}:u==="unstyled"&&i?{paddingRight:o||Re({size:f,sizes:fn})}:null;return{wrapper:{position:"relative",marginTop:l?`calc(${e.spacing.xs} / 2)`:void 0,marginBottom:s?`calc(${e.spacing.xs} / 2)`:void 0,"&:has(input:disabled)":{"& .mantine-Input-rightSection":{display:"none"}}},input:w2(v0(v0(w2(v0({},e.fn.fontStyles()),{height:t?u==="unstyled"?void 0:"auto":Re({size:f,sizes:fn}),WebkitTapHighlightColor:"transparent",lineHeight:t?e.lineHeight:`calc(${Re({size:f,sizes:fn})} - ${me(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:Re({size:f,sizes:e.fontSizes}),width:"100%",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"block",textAlign:"left",cursor:c?"pointer":void 0}),bce({theme:e,variant:u})),p),{"&:disabled, &[data-disabled]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,cursor:"not-allowed",pointerEvents:"none","&::placeholder":{color:e.colors.dark[2]}},"&[data-invalid]":{color:d,borderColor:d,"&::placeholder":{opacity:1,color:d}},"&[data-with-icon]":{paddingLeft:typeof a=="number"?me(a):Re({size:f,sizes:fn})},"&::placeholder":w2(v0({},e.fn.placeholderStyles()),{opacity:1}),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{appearance:"none"},"&[type=number]":{MozAppearance:"textfield"}}),icon:{pointerEvents:"none",position:"absolute",zIndex:1,left:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",width:a?me(a):Re({size:f,sizes:fn}),color:n?e.colors.red[e.colorScheme==="dark"?6:7]:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[5]},rightSection:{position:"absolute",top:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",width:o||Re({size:f,sizes:fn})}}});const xce=wce;var _ce=Object.defineProperty,Ece=Object.defineProperties,Sce=Object.getOwnPropertyDescriptors,Bv=Object.getOwnPropertySymbols,HF=Object.prototype.hasOwnProperty,VF=Object.prototype.propertyIsEnumerable,aC=(e,t,r)=>t in e?_ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g0=(e,t)=>{for(var r in t||(t={}))HF.call(t,r)&&aC(e,r,t[r]);if(Bv)for(var r of Bv(t))VF.call(t,r)&&aC(e,r,t[r]);return e},sC=(e,t)=>Ece(e,Sce(t)),Cce=(e,t)=>{var r={};for(var n in e)HF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Bv)for(var n of Bv(e))t.indexOf(n)<0&&VF.call(e,n)&&(r[n]=e[n]);return r};const Pce={size:"sm",variant:"default"},ql=$.forwardRef((e,t)=>{const r=et("Input",Pce,e),{className:n,error:o,required:i,disabled:a,variant:s,icon:l,style:c,rightSectionWidth:u,iconWidth:f,rightSection:d,rightSectionProps:p,radius:h,size:m,wrapperProps:_,classNames:w,styles:y,__staticSelector:C,multiline:I,sx:F,unstyled:O,pointer:g}=r,D=Cce(r,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:H,offsetTop:G,describedBy:V}=Gle(),{classes:P,cx:S}=xce({radius:h,multiline:I,invalid:!!o,rightSectionWidth:u?me(u):void 0,iconWidth:f,withRightSection:!!d,offsetBottom:H,offsetTop:G,pointer:g},{classNames:w,styles:y,name:["Input",C],unstyled:O,variant:s,size:m}),{systemStyles:v,rest:b}=Bu(D);return ae.createElement(rt,g0(g0({className:S(P.wrapper,n),sx:F,style:c},v),_),l&&ae.createElement("div",{className:P.icon},l),ae.createElement(rt,sC(g0({component:"input"},b),{ref:t,required:i,"aria-invalid":!!o,"aria-describedby":V,disabled:a,"data-disabled":a||void 0,"data-with-icon":!!l||void 0,"data-invalid":!!o||void 0,className:P.input})),d&&ae.createElement("div",sC(g0({},p),{className:P.rightSection}),d))});ql.displayName="@mantine/core/Input";ql.Wrapper=jF;ql.Label=w_;ql.Description=__;ql.Error=x_;ql.Placeholder=UF;const Ci=ql,Oce={xs:me(12),sm:me(18),md:me(24),lg:me(34),xl:me(42)};var Ace=at((e,{color:t,transitionDuration:r},{size:n})=>{const o=Re({size:n,sizes:Oce}),i=t||(e.colorScheme==="dark"?e.white:e.black);return{root:{borderRadius:e.radius.sm,width:`calc(${o} + ${e.spacing.xs})`,height:`calc(${o} + ${e.spacing.xs})`,padding:`calc(${e.spacing.xs} / 2)`,cursor:"pointer"},burger:{position:"relative",userSelect:"none",boxSizing:"border-box","&, &::before, &::after":{display:"block",width:o,height:`calc(${o} / 12)`,backgroundColor:i,outline:`${me(1)} solid transparent`,transitionProperty:"background-color, transform",transitionDuration:`${r}ms`,"@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":void 0}},"&::before, &::after":{position:"absolute",content:'""',left:0},"&::before":{top:`calc((${o} / 3) * -1)`},"&::after":{top:`calc(${o} / 3)`},"&[data-opened]":{backgroundColor:"transparent","&::before":{transform:`translateY(calc(${o} / 3)) rotate(45deg)`},"&::after":{transform:`translateY(calc(-${o} / 3)) rotate(-45deg)`}}}}});const kce=Ace;var Ice=Object.defineProperty,jv=Object.getOwnPropertySymbols,WF=Object.prototype.hasOwnProperty,qF=Object.prototype.propertyIsEnumerable,lC=(e,t,r)=>t in e?Ice(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$ce=(e,t)=>{for(var r in t||(t={}))WF.call(t,r)&&lC(e,r,t[r]);if(jv)for(var r of jv(t))qF.call(t,r)&&lC(e,r,t[r]);return e},Tce=(e,t)=>{var r={};for(var n in e)WF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&jv)for(var n of jv(e))t.indexOf(n)<0&&qF.call(e,n)&&(r[n]=e[n]);return r};const Dce={size:"md",transitionDuration:300},GF=$.forwardRef((e,t)=>{const r=et("Burger",Dce,e),{className:n,opened:o,color:i,size:a,classNames:s,styles:l,transitionDuration:c,variant:u}=r,f=Tce(r,["className","opened","color","size","classNames","styles","transitionDuration","variant"]),{classes:d,cx:p}=kce({color:i,transitionDuration:c},{classNames:s,styles:l,name:"Burger",variant:u,size:a});return ae.createElement(Hp,$ce({className:p(d.root,n),ref:t},f),ae.createElement("div",{"data-opened":o||void 0,className:d.burger}))});GF.displayName="@mantine/core/Burger";var Mce=at((e,{orientation:t,buttonBorderWidth:r})=>({root:{display:"flex",flexDirection:t==="vertical"?"column":"row","& [data-button]":{"&:first-of-type:not(:last-of-type)":{borderBottomRightRadius:0,[t==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${me(r)} / 2)`},"&:last-of-type:not(:first-of-type)":{borderTopLeftRadius:0,[t==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${me(r)} / 2)`},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${me(r)} / 2)`,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${me(r)} / 2)`},"& + [data-button]":{[t==="vertical"?"marginTop":"marginLeft"]:`calc(${r} * -1)`,"@media (min-resolution: 192dpi)":{[t==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const Rce=Mce;var Nce=Object.defineProperty,Lv=Object.getOwnPropertySymbols,KF=Object.prototype.hasOwnProperty,YF=Object.prototype.propertyIsEnumerable,cC=(e,t,r)=>t in e?Nce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Fce=(e,t)=>{for(var r in t||(t={}))KF.call(t,r)&&cC(e,r,t[r]);if(Lv)for(var r of Lv(t))YF.call(t,r)&&cC(e,r,t[r]);return e},Bce=(e,t)=>{var r={};for(var n in e)KF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Lv)for(var n of Lv(e))t.indexOf(n)<0&&YF.call(e,n)&&(r[n]=e[n]);return r};const jce={orientation:"horizontal",buttonBorderWidth:1},XF=$.forwardRef((e,t)=>{const r=et("ButtonGroup",jce,e),{className:n,orientation:o,buttonBorderWidth:i,unstyled:a}=r,s=Bce(r,["className","orientation","buttonBorderWidth","unstyled"]),{classes:l,cx:c}=Rce({orientation:o,buttonBorderWidth:i},{name:"ButtonGroup",unstyled:a});return ae.createElement(rt,Fce({className:c(l.root,n),ref:t},s))});XF.displayName="@mantine/core/ButtonGroup";var Lce=Object.defineProperty,zce=Object.defineProperties,Uce=Object.getOwnPropertyDescriptors,uC=Object.getOwnPropertySymbols,Hce=Object.prototype.hasOwnProperty,Vce=Object.prototype.propertyIsEnumerable,fC=(e,t,r)=>t in e?Lce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,na=(e,t)=>{for(var r in t||(t={}))Hce.call(t,r)&&fC(e,r,t[r]);if(uC)for(var r of uC(t))Vce.call(t,r)&&fC(e,r,t[r]);return e},u1=(e,t)=>zce(e,Uce(t));const Wce=["filled","outline","light","white","default","subtle","gradient"],f3={xs:{height:fn.xs,paddingLeft:me(14),paddingRight:me(14)},sm:{height:fn.sm,paddingLeft:me(18),paddingRight:me(18)},md:{height:fn.md,paddingLeft:me(22),paddingRight:me(22)},lg:{height:fn.lg,paddingLeft:me(26),paddingRight:me(26)},xl:{height:fn.xl,paddingLeft:me(32),paddingRight:me(32)},"compact-xs":{height:me(22),paddingLeft:me(7),paddingRight:me(7)},"compact-sm":{height:me(26),paddingLeft:me(8),paddingRight:me(8)},"compact-md":{height:me(30),paddingLeft:me(10),paddingRight:me(10)},"compact-lg":{height:me(34),paddingLeft:me(12),paddingRight:me(12)},"compact-xl":{height:me(40),paddingLeft:me(14),paddingRight:me(14)}};function qce({compact:e,size:t,withLeftIcon:r,withRightIcon:n}){if(e)return f3[`compact-${t}`];const o=f3[t];return o?u1(na({},o),{paddingLeft:r?`calc(${o.paddingLeft} / 1.5)`:o.paddingLeft,paddingRight:n?`calc(${o.paddingRight} / 1.5)`:o.paddingRight}):{}}const Gce=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function Kce({variant:e,theme:t,color:r,gradient:n}){if(!Wce.includes(e))return null;const o=t.fn.variant({color:r,variant:e,gradient:n});return e==="gradient"?na({border:0,backgroundImage:o.background,color:o.color},t.fn.hover({backgroundSize:"200%"})):na({border:`${me(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover}))}var Yce=at((e,{radius:t,fullWidth:r,compact:n,withLeftIcon:o,withRightIcon:i,color:a,gradient:s},{variant:l,size:c})=>({root:u1(na(u1(na(na(na(na({},qce({compact:n,size:c,withLeftIcon:o,withRightIcon:i})),e.fn.fontStyles()),e.fn.focusStyles()),Gce(r)),{borderRadius:e.fn.radius(t),fontWeight:600,position:"relative",lineHeight:1,fontSize:Re({size:c,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),Kce({variant:l,theme:e,color:a,gradient:s})),{"&:active":e.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":u1(na({content:'""'},e.fn.cover(me(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:e.spacing.xs},rightIcon:{marginLeft:e.spacing.xs},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const Xce=Yce;var Zce=Object.defineProperty,zv=Object.getOwnPropertySymbols,ZF=Object.prototype.hasOwnProperty,JF=Object.prototype.propertyIsEnumerable,dC=(e,t,r)=>t in e?Zce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pC=(e,t)=>{for(var r in t||(t={}))ZF.call(t,r)&&dC(e,r,t[r]);if(zv)for(var r of zv(t))JF.call(t,r)&&dC(e,r,t[r]);return e},Jce=(e,t)=>{var r={};for(var n in e)ZF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&zv)for(var n of zv(e))t.indexOf(n)<0&&JF.call(e,n)&&(r[n]=e[n]);return r};const Qce={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},E_=$.forwardRef((e,t)=>{const r=et("Button",Qce,e),{className:n,size:o,color:i,type:a,disabled:s,children:l,leftIcon:c,rightIcon:u,fullWidth:f,variant:d,radius:p,uppercase:h,compact:m,loading:_,loaderPosition:w,loaderProps:y,gradient:C,classNames:I,styles:F,unstyled:O}=r,g=Jce(r,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:D,cx:H,theme:G}=Xce({radius:p,color:i,fullWidth:f,compact:m,gradient:C,withLeftIcon:!!c,withRightIcon:!!u},{name:"Button",unstyled:O,classNames:I,styles:F,variant:d,size:o}),V=G.fn.variant({color:i,variant:d}),P=ae.createElement(uu,pC({color:V.color,size:`calc(${Re({size:o,sizes:f3}).height} / 2)`},y));return ae.createElement(Hp,pC({className:H(D.root,n),type:a,disabled:s,"data-button":!0,"data-disabled":s||void 0,"data-loading":_||void 0,ref:t,unstyled:O},g),ae.createElement("div",{className:D.inner},(c||_&&w==="left")&&ae.createElement("span",{className:H(D.icon,D.leftIcon)},_&&w==="left"?P:c),_&&w==="center"&&ae.createElement("span",{className:D.centerLoader},P),ae.createElement("span",{className:D.label,style:{textTransform:h?"uppercase":void 0}},l),(u||_&&w==="right")&&ae.createElement("span",{className:H(D.icon,D.rightIcon)},_&&w==="right"?P:u)))});E_.displayName="@mantine/core/Button";E_.Group=XF;const xr=E_;var eue=at((e,{radius:t,shadow:r})=>({root:{outline:0,WebkitTapHighlightColor:"transparent",display:"block",textDecoration:"none",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,boxSizing:"border-box",borderRadius:e.fn.radius(t),boxShadow:e.shadows[r]||r||"none","&[data-with-border]":{border:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}}}));const tue=eue;var rue=Object.defineProperty,Uv=Object.getOwnPropertySymbols,QF=Object.prototype.hasOwnProperty,eB=Object.prototype.propertyIsEnumerable,hC=(e,t,r)=>t in e?rue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nue=(e,t)=>{for(var r in t||(t={}))QF.call(t,r)&&hC(e,r,t[r]);if(Uv)for(var r of Uv(t))eB.call(t,r)&&hC(e,r,t[r]);return e},oue=(e,t)=>{var r={};for(var n in e)QF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Uv)for(var n of Uv(e))t.indexOf(n)<0&&eB.call(e,n)&&(r[n]=e[n]);return r};const iue={},tB=$.forwardRef((e,t)=>{const r=et("Paper",iue,e),{className:n,children:o,radius:i,withBorder:a,shadow:s,unstyled:l,variant:c}=r,u=oue(r,["className","children","radius","withBorder","shadow","unstyled","variant"]),{classes:f,cx:d}=tue({radius:i,shadow:s},{name:"Paper",unstyled:l,variant:c});return ae.createElement(rt,nue({className:d(f.root,n),"data-with-border":a||void 0,ref:t},u),o)});tB.displayName="@mantine/core/Paper";const rB=tB;var aue=at((e,{inline:t})=>({root:{display:t?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}}));const sue=aue;var lue=Object.defineProperty,Hv=Object.getOwnPropertySymbols,nB=Object.prototype.hasOwnProperty,oB=Object.prototype.propertyIsEnumerable,vC=(e,t,r)=>t in e?lue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cue=(e,t)=>{for(var r in t||(t={}))nB.call(t,r)&&vC(e,r,t[r]);if(Hv)for(var r of Hv(t))oB.call(t,r)&&vC(e,r,t[r]);return e},uue=(e,t)=>{var r={};for(var n in e)nB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Hv)for(var n of Hv(e))t.indexOf(n)<0&&oB.call(e,n)&&(r[n]=e[n]);return r};const iB=$.forwardRef((e,t)=>{const r=et("Center",{},e),{inline:n,className:o,unstyled:i,variant:a}=r,s=uue(r,["inline","className","unstyled","variant"]),{classes:l,cx:c}=sue({inline:n},{name:"Center",unstyled:i,variant:a});return ae.createElement(rt,cue({ref:t,className:c(l.root,o)},s))});iB.displayName="@mantine/core/Center";const hy=iB;var fue=Object.defineProperty,Vv=Object.getOwnPropertySymbols,aB=Object.prototype.hasOwnProperty,sB=Object.prototype.propertyIsEnumerable,gC=(e,t,r)=>t in e?fue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wv=(e,t)=>{for(var r in t||(t={}))aB.call(t,r)&&gC(e,r,t[r]);if(Vv)for(var r of Vv(t))sB.call(t,r)&&gC(e,r,t[r]);return e},lB=(e,t)=>{var r={};for(var n in e)aB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Vv)for(var n of Vv(e))t.indexOf(n)<0&&sB.call(e,n)&&(r[n]=e[n]);return r};function cB(e){const t=e,{width:r,height:n,style:o}=t,i=lB(t,["width","height","style"]);return ae.createElement("svg",Wv({viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:Wv({width:r,height:n},o)},i),ae.createElement("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function due(e){var t=e,{indeterminate:r}=t,n=lB(t,["indeterminate"]);return r?ae.createElement("svg",Wv({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6"},n),ae.createElement("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})):ae.createElement(cB,Wv({},n))}const uB=$.createContext(null),pue=uB.Provider,hue=()=>$.useContext(uB),vue={};function fB(e){const{value:t,defaultValue:r,onChange:n,multiple:o,children:i}=et("ChipGroup",vue,e),[a,s]=Ml({value:t,defaultValue:r,finalValue:o?[]:null,onChange:n}),l=u=>Array.isArray(a)?a.includes(u):u===a,c=u=>{const f=u.currentTarget.value;Array.isArray(a)?s(a.includes(f)?a.filter(d=>d!==f):[...a,f]):s(f)};return ae.createElement(pue,{value:{isChipSelected:l,onChange:c,multiple:o}},i)}fB.displayName="@mantine/core/ChipGroup";var gue=Object.defineProperty,mue=Object.defineProperties,yue=Object.getOwnPropertyDescriptors,mC=Object.getOwnPropertySymbols,bue=Object.prototype.hasOwnProperty,wue=Object.prototype.propertyIsEnumerable,yC=(e,t,r)=>t in e?gue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Uo=(e,t)=>{for(var r in t||(t={}))bue.call(t,r)&&yC(e,r,t[r]);if(mC)for(var r of mC(t))wue.call(t,r)&&yC(e,r,t[r]);return e},od=(e,t)=>mue(e,yue(t));const bC={xs:me(24),sm:me(28),md:me(32),lg:me(36),xl:me(40)},Pf={xs:me(10),sm:me(12),md:me(14),lg:me(16),xl:me(18)},wC={xs:me(16),sm:me(20),md:me(24),lg:me(28),xl:me(32)},m0={xs:me(7.5),sm:me(10),md:me(11.5),lg:me(13),xl:me(15)};function xue(e,{color:t},r){const n=e.fn.variant({variant:"filled",color:t}),o=e.fn.variant({variant:"light",color:t});return r==="light"?{label:Uo({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:od(Uo({color:o.color,backgroundColor:o.background},e.fn.hover({backgroundColor:o.hover})),{"&, &:hover":{backgroundColor:e.fn.variant({variant:"light",color:t}).background}})}:r==="filled"?{label:Uo({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:Uo({color:n.color,backgroundColor:n.background},e.fn.hover({backgroundColor:n.hover}))}:r==="outline"?{label:Uo({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:{border:`${me(1)} solid ${n.background}`}}:{label:null,checked:null}}var _ue=at((e,{radius:t,color:r},{size:n,variant:o})=>{const i=xue(e,{color:r},o);return{root:{},label:od(Uo(od(Uo({ref:zo("label")},e.fn.fontStyles()),{boxSizing:"border-box",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"inline-flex",alignItems:"center",userSelect:"none",border:`${me(1)} solid transparent`,borderRadius:e.fn.radius(t),height:Re({size:n,sizes:bC}),fontSize:Re({size:n,sizes:e.fontSizes}),lineHeight:`calc(${Re({size:n,sizes:bC})} - ${me(2)})`,paddingLeft:Re({size:n,sizes:wC}),paddingRight:Re({size:n,sizes:wC}),cursor:"pointer",whiteSpace:"nowrap",transition:"background-color 100ms ease",WebkitTapHighlightColor:"transparent"}),i.label),{"&[data-disabled]":od(Uo({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],cursor:"not-allowed",pointerEvents:"none"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})),{[`& .${zo("iconWrapper")}`]:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}),"&[data-checked]":{paddingLeft:Re({size:n,sizes:m0}),paddingRight:Re({size:n,sizes:m0}),"&:not([data-disabled])":i.checked}}),iconWrapper:{ref:zo("iconWrapper"),color:o==="filled"?e.white:e.fn.variant({variant:"filled",color:r}).background,width:`calc(${Re({size:n,sizes:Pf})} + (${Re({size:n,sizes:e.spacing})} / 1.5))`,maxWidth:`calc(${Re({size:n,sizes:Pf})} + (${Re({size:n,sizes:e.spacing})} / 1.5))`,height:Re({size:n,sizes:Pf}),display:"inline-block",verticalAlign:"middle",overflow:"hidden"},checkIcon:{width:Re({size:n,sizes:Pf}),height:`calc(${Re({size:n,sizes:Pf})} / 1.1)`,display:"block"},input:{width:0,height:0,padding:0,opacity:0,margin:0,"&:disabled + label":od(Uo({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],cursor:"not-allowed",pointerEvents:"none"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})),{[`& .${zo("iconWrapper")}`]:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&[data-checked]":{paddingLeft:Re({size:n,sizes:m0}),paddingRight:Re({size:n,sizes:m0}),"&:not([data-disabled])":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}}),"&:focus":{outline:"none",[`& + .${zo("label")}`]:Uo({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),"&:focus:not(:focus-visible)":{[`& + .${zo("label")}`]:Uo({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)}}}}});const Eue=_ue;var Sue=Object.defineProperty,qv=Object.getOwnPropertySymbols,dB=Object.prototype.hasOwnProperty,pB=Object.prototype.propertyIsEnumerable,xC=(e,t,r)=>t in e?Sue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y0=(e,t)=>{for(var r in t||(t={}))dB.call(t,r)&&xC(e,r,t[r]);if(qv)for(var r of qv(t))pB.call(t,r)&&xC(e,r,t[r]);return e},Cue=(e,t)=>{var r={};for(var n in e)dB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&qv)for(var n of qv(e))t.indexOf(n)<0&&pB.call(e,n)&&(r[n]=e[n]);return r};const Pue={type:"checkbox",size:"sm",radius:"xl",variant:"outline"},Gv=$.forwardRef((e,t)=>{const r=et("Chip",Pue,e),{radius:n,type:o,size:i,variant:a,disabled:s,id:l,color:c,children:u,className:f,classNames:d,style:p,styles:h,checked:m,defaultChecked:_,onChange:w,sx:y,wrapperProps:C,value:I,unstyled:F}=r,O=Cue(r,["radius","type","size","variant","disabled","id","color","children","className","classNames","style","styles","checked","defaultChecked","onChange","sx","wrapperProps","value","unstyled"]),g=hue(),D=Ul(l),{systemStyles:H,rest:G}=Bu(O),{classes:V,cx:P}=Eue({radius:n,color:c},{classNames:d,styles:h,unstyled:F,name:"Chip",variant:a,size:i}),[S,v]=Ml({value:m,defaultValue:_,finalValue:!1,onChange:w}),b=g?{checked:g.isChipSelected(I),onChange:g.onChange,type:g.multiple?"checkbox":"radio"}:{},B=b.checked||S;return ae.createElement(rt,y0(y0({className:P(V.root,f),style:p,sx:y},H),C),ae.createElement("input",y0(y0({type:o,className:V.input,checked:B,onChange:M=>v(M.currentTarget.checked),id:D,disabled:s,ref:t,value:I},b),G)),ae.createElement("label",{htmlFor:D,"data-checked":B||void 0,"data-disabled":s||void 0,className:V.label},B&&ae.createElement("span",{className:V.iconWrapper},ae.createElement(cB,{className:V.checkIcon})),u))});Gv.displayName="@mantine/core/Chip";Gv.Group=fB;var Oue=at((e,{fluid:t,sizes:r},{size:n})=>({root:{paddingLeft:e.spacing.md,paddingRight:e.spacing.md,maxWidth:t?"100%":Re({size:n,sizes:r}),marginLeft:"auto",marginRight:"auto"}}));const Aue=Oue;var kue=Object.defineProperty,Kv=Object.getOwnPropertySymbols,hB=Object.prototype.hasOwnProperty,vB=Object.prototype.propertyIsEnumerable,_C=(e,t,r)=>t in e?kue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Iue=(e,t)=>{for(var r in t||(t={}))hB.call(t,r)&&_C(e,r,t[r]);if(Kv)for(var r of Kv(t))vB.call(t,r)&&_C(e,r,t[r]);return e},$ue=(e,t)=>{var r={};for(var n in e)hB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Kv)for(var n of Kv(e))t.indexOf(n)<0&&vB.call(e,n)&&(r[n]=e[n]);return r};const Tue={sizes:{xs:me(540),sm:me(720),md:me(960),lg:me(1140),xl:me(1320)}},S_=$.forwardRef((e,t)=>{const r=et("Container",Tue,e),{className:n,fluid:o,size:i,unstyled:a,sizes:s,variant:l}=r,c=$ue(r,["className","fluid","size","unstyled","sizes","variant"]),{classes:u,cx:f}=Aue({fluid:o,sizes:s},{unstyled:a,name:"Container",variant:l,size:i});return ae.createElement(rt,Iue({className:f(u.root,n),ref:t},c))});S_.displayName="@mantine/core/Container";var Due=Object.defineProperty,Yv=Object.getOwnPropertySymbols,gB=Object.prototype.hasOwnProperty,mB=Object.prototype.propertyIsEnumerable,EC=(e,t,r)=>t in e?Due(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Mue=(e,t)=>{for(var r in t||(t={}))gB.call(t,r)&&EC(e,r,t[r]);if(Yv)for(var r of Yv(t))mB.call(t,r)&&EC(e,r,t[r]);return e},Rue=(e,t)=>{var r={};for(var n in e)gB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Yv)for(var n of Yv(e))t.indexOf(n)<0&&mB.call(e,n)&&(r[n]=e[n]);return r};const Nue={timeout:1e3};function vy(e){const t=et("CopyButton",Nue,e),{children:r,timeout:n,value:o}=t,i=Rue(t,["children","timeout","value"]),a=kte({timeout:n}),s=()=>a.copy(o);return ae.createElement(ae.Fragment,null,r(Mue({copy:s,copied:a.copied},i)))}vy.displayName="@mantine/core/CopyButton";const[Fue,Lu]=Bp("ModalBase component was not found in tree");var Bue=at(()=>({close:{marginLeft:"auto",marginRight:0}}));const jue=Bue;var Lue=Object.defineProperty,Xv=Object.getOwnPropertySymbols,yB=Object.prototype.hasOwnProperty,bB=Object.prototype.propertyIsEnumerable,SC=(e,t,r)=>t in e?Lue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zue=(e,t)=>{for(var r in t||(t={}))yB.call(t,r)&&SC(e,r,t[r]);if(Xv)for(var r of Xv(t))bB.call(t,r)&&SC(e,r,t[r]);return e},Uue=(e,t)=>{var r={};for(var n in e)yB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Xv)for(var n of Xv(e))t.indexOf(n)<0&&bB.call(e,n)&&(r[n]=e[n]);return r};const Hue={size:"sm"},Vue=$.forwardRef((e,t)=>{const r=Lu(),n=et(`${r.__staticSelector}CloseButton`,Hue,e),{className:o}=n,i=Uue(n,["className"]),{classes:a,cx:s}=jue(null,r.stylesApi);return ae.createElement(r_,zue({className:s(a.close,o),ref:t,onClick:r.onClose},i))});var Wue=at(()=>({overlay:{}}));const que=Wue;var Gue=Object.defineProperty,Kue=Object.defineProperties,Yue=Object.getOwnPropertyDescriptors,CC=Object.getOwnPropertySymbols,Xue=Object.prototype.hasOwnProperty,Zue=Object.prototype.propertyIsEnumerable,PC=(e,t,r)=>t in e?Gue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jue=(e,t)=>{for(var r in t||(t={}))Xue.call(t,r)&&PC(e,r,t[r]);if(CC)for(var r of CC(t))Zue.call(t,r)&&PC(e,r,t[r]);return e},Que=(e,t)=>Kue(e,Yue(t)),efe=at((e,{color:t,opacity:r,blur:n,radius:o,gradient:i,fixed:a,zIndex:s})=>({root:Que(Jue({},e.fn.cover(0)),{position:a?"fixed":"absolute",backgroundColor:i?void 0:e.fn.rgba(t,r),backgroundImage:i,backdropFilter:n?`blur(${me(n)})`:void 0,borderRadius:e.fn.radius(o),zIndex:s,"&[data-center]":{display:"flex",alignItems:"center",justifyContent:"center"}})}));const tfe=efe;var rfe=Object.defineProperty,Zv=Object.getOwnPropertySymbols,wB=Object.prototype.hasOwnProperty,xB=Object.prototype.propertyIsEnumerable,OC=(e,t,r)=>t in e?rfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nfe=(e,t)=>{for(var r in t||(t={}))wB.call(t,r)&&OC(e,r,t[r]);if(Zv)for(var r of Zv(t))xB.call(t,r)&&OC(e,r,t[r]);return e},ofe=(e,t)=>{var r={};for(var n in e)wB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Zv)for(var n of Zv(e))t.indexOf(n)<0&&xB.call(e,n)&&(r[n]=e[n]);return r};const ife={opacity:.6,color:"#000",zIndex:Hs("modal"),radius:0},_B=$.forwardRef((e,t)=>{const r=et("Overlay",ife,e),{variant:n,opacity:o,color:i,blur:a,gradient:s,zIndex:l,radius:c,children:u,className:f,classNames:d,styles:p,unstyled:h,center:m,fixed:_}=r,w=ofe(r,["variant","opacity","color","blur","gradient","zIndex","radius","children","className","classNames","styles","unstyled","center","fixed"]),{classes:y,cx:C}=tfe({color:i,opacity:o,blur:a,radius:c,gradient:s,fixed:_,zIndex:l},{name:"Overlay",classNames:d,styles:p,unstyled:h,variant:n});return ae.createElement(rt,nfe({ref:t,className:C(y.root,f),"data-center":m||void 0},w),u)});_B.displayName="@mantine/core/Overlay";const afe=_B;var sfe=Object.defineProperty,lfe=Object.defineProperties,cfe=Object.getOwnPropertyDescriptors,Jv=Object.getOwnPropertySymbols,EB=Object.prototype.hasOwnProperty,SB=Object.prototype.propertyIsEnumerable,AC=(e,t,r)=>t in e?sfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Of=(e,t)=>{for(var r in t||(t={}))EB.call(t,r)&&AC(e,r,t[r]);if(Jv)for(var r of Jv(t))SB.call(t,r)&&AC(e,r,t[r]);return e},ufe=(e,t)=>lfe(e,cfe(t)),ffe=(e,t)=>{var r={};for(var n in e)EB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Jv)for(var n of Jv(e))t.indexOf(n)<0&&SB.call(e,n)&&(r[n]=e[n]);return r};const dfe={},pfe=$.forwardRef((e,t)=>{const r=Lu(),n=et(`${r.__staticSelector}Overlay`,dfe,e),{onClick:o,transitionProps:i,style:a,className:s}=n,l=ffe(n,["onClick","transitionProps","style","className"]),{classes:c,cx:u}=que(null,r.stylesApi),f=d=>{o==null||o(d),r.closeOnClickOutside&&r.onClose()};return ae.createElement(Wl,ufe(Of(Of({mounted:r.opened},r.transitionProps),i),{transition:"fade"}),d=>ae.createElement(afe,Of({ref:t,onClick:f,fixed:!0,style:Of(Of({},a),d),className:u(c.overlay,s),zIndex:r.zIndex},l)))});var hfe=at((e,{zIndex:t})=>({inner:{position:"fixed",width:"100%",top:0,bottom:0,maxHeight:"100%",zIndex:t,pointerEvents:"none"},content:{pointerEvents:"all"}}));const vfe=hfe;var gfe=Object.defineProperty,Qv=Object.getOwnPropertySymbols,CB=Object.prototype.hasOwnProperty,PB=Object.prototype.propertyIsEnumerable,kC=(e,t,r)=>t in e?gfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Af=(e,t)=>{for(var r in t||(t={}))CB.call(t,r)&&kC(e,r,t[r]);if(Qv)for(var r of Qv(t))PB.call(t,r)&&kC(e,r,t[r]);return e},mfe=(e,t)=>{var r={};for(var n in e)CB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Qv)for(var n of Qv(e))t.indexOf(n)<0&&PB.call(e,n)&&(r[n]=e[n]);return r};const yfe={},bfe=$.forwardRef((e,t)=>{const r=Lu(),n=et(`${r.__staticSelector}Content`,yfe,e),{className:o,transitionProps:i,style:a,onKeyDown:s}=n,l=mfe(n,["className","transitionProps","style","onKeyDown"]),{classes:c,cx:u}=vfe({zIndex:r.zIndex},r.stylesApi),f=d=>{var p;((p=d.target)==null?void 0:p.getAttribute("data-mantine-stop-propagation"))!=="true"&&d.key==="Escape"&&r.closeOnEscape&&r.onClose(),s==null||s(d)};return ae.createElement(Wl,Af(Af({mounted:r.opened,transition:"pop"},r.transitionProps),i),d=>ae.createElement("div",{className:u(c.inner)},ae.createElement(y_,{active:r.opened&&r.trapFocus},ae.createElement(rB,Af({component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":r.bodyMounted?r.getBodyId():void 0,"aria-labelledby":r.titleMounted?r.getTitleId():void 0,onKeyDown:f,ref:t,className:u(c.content,o),style:Af(Af({},a),d),shadow:r.shadow},l),l.children))))});var wfe=at((e,{padding:t})=>{const r=Re({size:t,sizes:e.spacing});return{header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:r,paddingRight:`calc(${r} - ${me(5)})`,position:"sticky",top:0,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,zIndex:1e3}}});const xfe=wfe;var _fe=Object.defineProperty,eg=Object.getOwnPropertySymbols,OB=Object.prototype.hasOwnProperty,AB=Object.prototype.propertyIsEnumerable,IC=(e,t,r)=>t in e?_fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Efe=(e,t)=>{for(var r in t||(t={}))OB.call(t,r)&&IC(e,r,t[r]);if(eg)for(var r of eg(t))AB.call(t,r)&&IC(e,r,t[r]);return e},Sfe=(e,t)=>{var r={};for(var n in e)OB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&eg)for(var n of eg(e))t.indexOf(n)<0&&AB.call(e,n)&&(r[n]=e[n]);return r};const Cfe={},Pfe=$.forwardRef((e,t)=>{const r=Lu(),n=et(`${r.__staticSelector}Header`,Cfe,e),{className:o}=n,i=Sfe(n,["className"]),{classes:a,cx:s}=xfe({padding:r.padding},r.stylesApi);return ae.createElement(rt,Efe({ref:t,className:s(a.header,o)},i))});var Ofe=at(e=>({title:{lineHeight:1,padding:0,margin:0,fontWeight:400,fontSize:e.fontSizes.md}}));const Afe=Ofe;var kfe=Object.defineProperty,tg=Object.getOwnPropertySymbols,kB=Object.prototype.hasOwnProperty,IB=Object.prototype.propertyIsEnumerable,$C=(e,t,r)=>t in e?kfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ife=(e,t)=>{for(var r in t||(t={}))kB.call(t,r)&&$C(e,r,t[r]);if(tg)for(var r of tg(t))IB.call(t,r)&&$C(e,r,t[r]);return e},$fe=(e,t)=>{var r={};for(var n in e)kB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&tg)for(var n of tg(e))t.indexOf(n)<0&&IB.call(e,n)&&(r[n]=e[n]);return r};const Tfe={},Dfe=$.forwardRef((e,t)=>{const r=Lu(),n=et(`${r.__staticSelector}Title`,Tfe,e),{className:o}=n,i=$fe(n,["className"]),{classes:a,cx:s}=Afe(null,r.stylesApi);return $.useEffect(()=>(r.setTitleMounted(!0),()=>r.setTitleMounted(!1)),[]),ae.createElement(rt,Ife({component:"h2",id:r.getTitleId(),className:s(a.title,o),ref:t},i))});var Mfe=at((e,{padding:t})=>({body:{padding:Re({size:t,sizes:e.spacing}),"&:not(:only-child)":{paddingTop:0}}}));const Rfe=Mfe;var Nfe=Object.defineProperty,rg=Object.getOwnPropertySymbols,$B=Object.prototype.hasOwnProperty,TB=Object.prototype.propertyIsEnumerable,TC=(e,t,r)=>t in e?Nfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ffe=(e,t)=>{for(var r in t||(t={}))$B.call(t,r)&&TC(e,r,t[r]);if(rg)for(var r of rg(t))TB.call(t,r)&&TC(e,r,t[r]);return e},Bfe=(e,t)=>{var r={};for(var n in e)$B.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&rg)for(var n of rg(e))t.indexOf(n)<0&&TB.call(e,n)&&(r[n]=e[n]);return r};const jfe={},Lfe=$.forwardRef((e,t)=>{const r=Lu(),n=et(`${r.__staticSelector}Body`,jfe,e),{className:o}=n,i=Bfe(n,["className"]),{classes:a,cx:s}=Rfe({padding:r.padding},r.stylesApi);return $.useEffect(()=>(r.setBodyMounted(!0),()=>r.setBodyMounted(!1)),[]),ae.createElement(rt,Ffe({id:r.getBodyId(),className:s(a.body,o),ref:t},i))});function zfe({children:e}){return ae.createElement(ae.Fragment,null,e)}function Ufe({opened:e,transitionDuration:t}){const[r,n]=$.useState(e),o=$.useRef(),a=sy()?0:t;return $.useEffect(()=>(e?(n(!0),window.clearTimeout(o.current)):a===0?n(!1):o.current=window.setTimeout(()=>n(!1),a),()=>window.clearTimeout(o.current)),[e,a]),r}var Hfe=at(()=>({root:{}}));const Vfe=Hfe;var Wfe=Object.defineProperty,qfe=Object.defineProperties,Gfe=Object.getOwnPropertyDescriptors,ng=Object.getOwnPropertySymbols,DB=Object.prototype.hasOwnProperty,MB=Object.prototype.propertyIsEnumerable,DC=(e,t,r)=>t in e?Wfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x2=(e,t)=>{for(var r in t||(t={}))DB.call(t,r)&&DC(e,r,t[r]);if(ng)for(var r of ng(t))MB.call(t,r)&&DC(e,r,t[r]);return e},MC=(e,t)=>qfe(e,Gfe(t)),Kfe=(e,t)=>{var r={};for(var n in e)DB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ng)for(var n of ng(e))t.indexOf(n)<0&&MB.call(e,n)&&(r[n]=e[n]);return r};const C_={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Hs("modal"),padding:"md",size:"md",shadow:"xl"};function sr(e){const t=et("ModalBase",C_,e),{opened:r,onClose:n,children:o,closeOnClickOutside:i,__staticSelector:a,transitionProps:s,withinPortal:l,portalProps:c,keepMounted:u,target:f,zIndex:d,lockScroll:p,trapFocus:h,closeOnEscape:m,returnFocus:_,padding:w,shadow:y,id:C,size:I,variant:F,classNames:O,unstyled:g,styles:D,className:H}=t,G=Kfe(t,["opened","onClose","children","closeOnClickOutside","__staticSelector","transitionProps","withinPortal","portalProps","keepMounted","target","zIndex","lockScroll","trapFocus","closeOnEscape","returnFocus","padding","shadow","id","size","variant","classNames","unstyled","styles","className"]),{classes:V,cx:P}=Vfe(null,{name:a,classNames:O,styles:D,unstyled:g,variant:F,size:I}),S=Ul(C),[v,b]=$.useState(!1),[B,M]=$.useState(!1),j=typeof(s==null?void 0:s.duration)=="number"?s==null?void 0:s.duration:200,U=Ufe({opened:r,transitionDuration:j});return sp("keydown",E=>{!h&&E.key==="Escape"&&m&&n()}),fR({opened:r,shouldReturnFocus:h&&_}),ae.createElement(Vp,MC(x2({},c),{withinPortal:l,target:f}),ae.createElement(Fue,{value:{__staticSelector:a,opened:r,onClose:n,closeOnClickOutside:i,transitionProps:MC(x2({},s),{duration:j,keepMounted:u}),zIndex:d,padding:w,id:S,getTitleId:()=>`${S}-title`,getBodyId:()=>`${S}-body`,titleMounted:v,bodyMounted:B,setTitleMounted:b,setBodyMounted:M,trapFocus:h,closeOnEscape:m,shadow:y,stylesApi:{name:a,size:I,variant:F,classNames:O,styles:D,unstyled:g}}},ae.createElement(ZJ,{enabled:U&&p},ae.createElement(rt,x2({className:P(V.root,H)},G),o))))}sr.CloseButton=Vue;sr.Overlay=pfe;sr.Content=bfe;sr.Header=Pfe;sr.Title=Dfe;sr.Body=Lfe;sr.NativeScrollArea=zfe;const[Yfe,Xfe]=Bp("Grid component was not found in tree");var Zfe=Object.defineProperty,RC=Object.getOwnPropertySymbols,Jfe=Object.prototype.hasOwnProperty,Qfe=Object.prototype.propertyIsEnumerable,NC=(e,t,r)=>t in e?Zfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ede=(e,t)=>{for(var r in t||(t={}))Jfe.call(t,r)&&NC(e,r,t[r]);if(RC)for(var r of RC(t))Qfe.call(t,r)&&NC(e,r,t[r]);return e};const P_=(e,t)=>e==="content"?"auto":e==="auto"?"0rem":e?`${100/(t/e)}%`:void 0,RB=(e,t,r)=>r||e==="auto"||e==="content"?"unset":P_(e,t),NB=(e,t)=>{if(e)return e==="auto"||t?1:0},FB=(e,t)=>e===0?0:e?`${100/(t/e)}%`:void 0,BB=(e,t)=>typeof e<"u"?`calc(${Re({size:e,sizes:t.spacing})} / 2)`:void 0;function tde({sizes:e,offsets:t,orders:r,theme:n,columns:o,gutters:i,grow:a}){return zM.reduce((s,l)=>(s[`@media (min-width: ${mn(n.breakpoints[l])})`]={order:r[l],flexBasis:P_(e[l],o),padding:BB(i[l],n),flexShrink:0,width:e[l]==="content"?"auto":void 0,maxWidth:RB(e[l],o,a),marginLeft:FB(t[l],o),flexGrow:NB(e[l],a)},s),{})}var rde=at((e,{gutter:t,gutterXs:r,gutterSm:n,gutterMd:o,gutterLg:i,gutterXl:a,grow:s,offset:l,offsetXs:c,offsetSm:u,offsetMd:f,offsetLg:d,offsetXl:p,columns:h,span:m,xs:_,sm:w,md:y,lg:C,xl:I,order:F,orderXs:O,orderSm:g,orderMd:D,orderLg:H,orderXl:G})=>({col:ede({boxSizing:"border-box",flexGrow:NB(m,s),order:F,padding:BB(t,e),marginLeft:FB(l,h),flexBasis:P_(m,h),flexShrink:0,width:m==="content"?"auto":void 0,maxWidth:RB(m,h,s)},tde({sizes:{xs:_,sm:w,md:y,lg:C,xl:I},offsets:{xs:c,sm:u,md:f,lg:d,xl:p},orders:{xs:O,sm:g,md:D,lg:H,xl:G},gutters:{xs:r,sm:n,md:o,lg:i,xl:a},theme:e,columns:h,grow:s}))}));const nde=rde;var ode=Object.defineProperty,og=Object.getOwnPropertySymbols,jB=Object.prototype.hasOwnProperty,LB=Object.prototype.propertyIsEnumerable,FC=(e,t,r)=>t in e?ode(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ide=(e,t)=>{for(var r in t||(t={}))jB.call(t,r)&&FC(e,r,t[r]);if(og)for(var r of og(t))LB.call(t,r)&&FC(e,r,t[r]);return e},ade=(e,t)=>{var r={};for(var n in e)jB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&og)for(var n of og(e))t.indexOf(n)<0&&LB.call(e,n)&&(r[n]=e[n]);return r};const sde={};function lde(e){return e==="auto"||e==="content"?!0:typeof e=="number"&&e>0&&e%1===0}const zB=$.forwardRef((e,t)=>{const r=et("GridCol",sde,e),{children:n,span:o,offset:i,offsetXs:a,offsetSm:s,offsetMd:l,offsetLg:c,offsetXl:u,xs:f,sm:d,md:p,lg:h,xl:m,order:_,orderXs:w,orderSm:y,orderMd:C,orderLg:I,orderXl:F,className:O,id:g,unstyled:D,variant:H}=r,G=ade(r,["children","span","offset","offsetXs","offsetSm","offsetMd","offsetLg","offsetXl","xs","sm","md","lg","xl","order","orderXs","orderSm","orderMd","orderLg","orderXl","className","id","unstyled","variant"]),V=Xfe(),P=o||V.columns,{classes:S,cx:v}=nde({gutter:V.gutter,gutterXs:V.gutterXs,gutterSm:V.gutterSm,gutterMd:V.gutterMd,gutterLg:V.gutterLg,gutterXl:V.gutterXl,offset:i,offsetXs:a,offsetSm:s,offsetMd:l,offsetLg:c,offsetXl:u,xs:f,sm:d,md:p,lg:h,xl:m,order:_,orderXs:w,orderSm:y,orderMd:C,orderLg:I,orderXl:F,grow:V.grow,columns:V.columns,span:P},{unstyled:D,name:"Grid",variant:H});return!lde(P)||P>V.columns?null:ae.createElement(rt,ide({className:v(S.col,O),ref:t},G),n)});zB.displayName="@mantine/core/Col";var cde=Object.defineProperty,BC=Object.getOwnPropertySymbols,ude=Object.prototype.hasOwnProperty,fde=Object.prototype.propertyIsEnumerable,jC=(e,t,r)=>t in e?cde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dde=(e,t)=>{for(var r in t||(t={}))ude.call(t,r)&&jC(e,r,t[r]);if(BC)for(var r of BC(t))fde.call(t,r)&&jC(e,r,t[r]);return e};function pde(e,t){return zM.reduce((r,n)=>(typeof e[n]<"u"&&(r[`@media (min-width: ${t.breakpoints[n]})`]={margin:`calc(-${Re({size:e[n],sizes:t.spacing})} / 2)`}),r),{})}var hde=at((e,{justify:t,align:r,gutter:n,gutterXs:o,gutterSm:i,gutterMd:a,gutterLg:s,gutterXl:l})=>({root:dde({margin:`calc(-${Re({size:n,sizes:e.spacing})} / 2)`,display:"flex",flexWrap:"wrap",justifyContent:t,alignItems:r},pde({xs:o,sm:i,md:a,lg:s,xl:l},e))}));const vde=hde;var gde=Object.defineProperty,ig=Object.getOwnPropertySymbols,UB=Object.prototype.hasOwnProperty,HB=Object.prototype.propertyIsEnumerable,LC=(e,t,r)=>t in e?gde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mde=(e,t)=>{for(var r in t||(t={}))UB.call(t,r)&&LC(e,r,t[r]);if(ig)for(var r of ig(t))HB.call(t,r)&&LC(e,r,t[r]);return e},yde=(e,t)=>{var r={};for(var n in e)UB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ig)for(var n of ig(e))t.indexOf(n)<0&&HB.call(e,n)&&(r[n]=e[n]);return r};const bde={gutter:"md",justify:"flex-start",align:"stretch",columns:12},xs=$.forwardRef((e,t)=>{const r=et("Grid",bde,e),{gutter:n,gutterXs:o,gutterSm:i,gutterMd:a,gutterLg:s,gutterXl:l,children:c,grow:u,justify:f,align:d,columns:p,className:h,id:m,unstyled:_,variant:w}=r,y=yde(r,["gutter","gutterXs","gutterSm","gutterMd","gutterLg","gutterXl","children","grow","justify","align","columns","className","id","unstyled","variant"]),{classes:C,cx:I}=vde({gutter:n,justify:f,align:d,gutterXs:o,gutterSm:i,gutterMd:a,gutterLg:s,gutterXl:l},{unstyled:_,name:"Grid",variant:w});return ae.createElement(Yfe,{value:{gutter:n,gutterXs:o,gutterSm:i,gutterMd:a,gutterLg:s,gutterXl:l,grow:u,columns:p}},ae.createElement(rt,mde({className:I(C.root,h),ref:t},y),c))});xs.Col=zB;xs.displayName="@mantine/core/Grid";function wde(e){return $.Children.toArray(e).filter(Boolean)}const xde={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var _de=at((e,{spacing:t,position:r,noWrap:n,grow:o,align:i,count:a})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:i||"center",flexWrap:n?"nowrap":"wrap",justifyContent:xde[r],gap:Re({size:t,sizes:e.spacing}),"& > *":{boxSizing:"border-box",maxWidth:o?`calc(${100/a}% - (${me(Re({size:t,sizes:e.spacing}))} - ${Re({size:t,sizes:e.spacing})} / ${a}))`:void 0,flexGrow:o?1:0}}}));const Ede=_de;var Sde=Object.defineProperty,ag=Object.getOwnPropertySymbols,VB=Object.prototype.hasOwnProperty,WB=Object.prototype.propertyIsEnumerable,zC=(e,t,r)=>t in e?Sde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Cde=(e,t)=>{for(var r in t||(t={}))VB.call(t,r)&&zC(e,r,t[r]);if(ag)for(var r of ag(t))WB.call(t,r)&&zC(e,r,t[r]);return e},Pde=(e,t)=>{var r={};for(var n in e)VB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ag)for(var n of ag(e))t.indexOf(n)<0&&WB.call(e,n)&&(r[n]=e[n]);return r};const Ode={position:"left",spacing:"md"},Kt=$.forwardRef((e,t)=>{const r=et("Group",Ode,e),{className:n,position:o,align:i,children:a,noWrap:s,grow:l,spacing:c,unstyled:u,variant:f}=r,d=Pde(r,["className","position","align","children","noWrap","grow","spacing","unstyled","variant"]),p=wde(a),{classes:h,cx:m}=Ede({align:i,grow:l,noWrap:s,spacing:c,position:o,count:p.length},{unstyled:u,name:"Group",variant:f});return ae.createElement(rt,Cde({className:m(h.root,n),ref:t},d),p)});Kt.displayName="@mantine/core/Group";var Ade=at((e,{color:t})=>({root:{backgroundColor:e.fn.themeColor(t,e.colorScheme==="dark"?5:2),color:e.colorScheme==="dark"?e.colors.dark[9]:"inherit"}}));const kde=Ade;var Ide=Object.defineProperty,sg=Object.getOwnPropertySymbols,qB=Object.prototype.hasOwnProperty,GB=Object.prototype.propertyIsEnumerable,UC=(e,t,r)=>t in e?Ide(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$de=(e,t)=>{for(var r in t||(t={}))qB.call(t,r)&&UC(e,r,t[r]);if(sg)for(var r of sg(t))GB.call(t,r)&&UC(e,r,t[r]);return e},Tde=(e,t)=>{var r={};for(var n in e)qB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&sg)for(var n of sg(e))t.indexOf(n)<0&&GB.call(e,n)&&(r[n]=e[n]);return r};const Dde={color:"yellow"},O_=$.forwardRef((e,t)=>{const r=et("Mark",Dde,e),{color:n,className:o,unstyled:i,variant:a}=r,s=Tde(r,["color","className","unstyled","variant"]),{classes:l,cx:c}=kde({color:n},{unstyled:i,name:"Mark",variant:a});return ae.createElement(rt,$de({component:"mark",ref:t,className:c(l.root,o)},s))});O_.displayName="@mantine/core/Mark";function Mde({open:e,close:t,openDelay:r,closeDelay:n}){const o=$.useRef(-1),i=$.useRef(-1),a=()=>{window.clearTimeout(o.current),window.clearTimeout(i.current)},s=()=>{a(),r===0?e():o.current=window.setTimeout(e,r)},l=()=>{a(),n===0?t():i.current=window.setTimeout(t,n)};return $.useEffect(()=>a,[]),{openDropdown:s,closeDropdown:l}}function lp(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i=0)&&(r[o]=e[o]);return r}var Rde=$.useLayoutEffect,Nde=function(t){var r=$.useRef(t);return Rde(function(){r.current=t}),r},HC=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},Fde=function(t,r){var n=$.useRef();return $.useCallback(function(o){t.current=o,n.current&&HC(n.current,null),n.current=r,r&&HC(r,o)},[r])},VC={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},WC=function(t){Object.keys(VC).forEach(function(r){t.style.setProperty(r,VC[r],"important")})},Bn=null,Bde=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function jde(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),Bn||(Bn=document.createElement("textarea"),Bn.setAttribute("tabindex","-1"),Bn.setAttribute("aria-hidden","true"),WC(Bn)),Bn.parentNode===null&&document.body.appendChild(Bn);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(d){var p=d;Bn.style[p]=a[p]}),WC(Bn),Bn.value=t;var l=Bde(Bn,e);Bn.value="x";var c=Bn.scrollHeight-o,u=c*r;s==="border-box"&&(u=u+o+i),l=Math.max(u,l);var f=c*n;return s==="border-box"&&(f=f+o+i),l=Math.min(f,l),[l,c]}var qC=function(){},Lde=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},zde=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],Ude=!!document.documentElement.currentStyle,Hde=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=Lde(zde,r),o=n.boxSizing;if(o==="")return null;Ude&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var i=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),a=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:i,borderSize:a}},Vde=function(t){var r=Nde(t);$.useLayoutEffect(function(){var n=function(i){r.current(i)};return window.addEventListener("resize",n),function(){window.removeEventListener("resize",n)}},[])},Wde=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?qC:a,l=t.onHeightChange,c=l===void 0?qC:l,u=lp(t,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),f=u.value!==void 0,d=$.useRef(null),p=Fde(d,r),h=$.useRef(0),m=$.useRef(),_=function(){var C=d.current,I=n&&m.current?m.current:Hde(C);if(I){m.current=I;var F=jde(I,C.value||C.placeholder||"x",i,o),O=F[0],g=F[1];h.current!==O&&(h.current=O,C.style.setProperty("height",O+"px","important"),c(O,{rowHeight:g}))}},w=function(C){f||_(),s(C)};return $.useLayoutEffect(_),Vde(_),$.createElement("textarea",Ze({},u,{onChange:w,ref:p}))},qde=$.forwardRef(Wde);const Gde=qde;var Kde=at(e=>({input:{paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs}}));const Yde=Kde;var Xde=Object.defineProperty,Zde=Object.defineProperties,Jde=Object.getOwnPropertyDescriptors,lg=Object.getOwnPropertySymbols,KB=Object.prototype.hasOwnProperty,YB=Object.prototype.propertyIsEnumerable,GC=(e,t,r)=>t in e?Xde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cc=(e,t)=>{for(var r in t||(t={}))KB.call(t,r)&&GC(e,r,t[r]);if(lg)for(var r of lg(t))YB.call(t,r)&&GC(e,r,t[r]);return e},_2=(e,t)=>Zde(e,Jde(t)),Qde=(e,t)=>{var r={};for(var n in e)KB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&lg)for(var n of lg(e))t.indexOf(n)<0&&YB.call(e,n)&&(r[n]=e[n]);return r};const epe={autosize:!1,size:"sm",__staticSelector:"Textarea"},A_=$.forwardRef((e,t)=>{const r=et("Textarea",epe,e),{autosize:n,maxRows:o,minRows:i,label:a,error:s,description:l,id:c,className:u,required:f,style:d,wrapperProps:p,classNames:h,styles:m,size:_,__staticSelector:w,sx:y,errorProps:C,descriptionProps:I,labelProps:F,inputWrapperOrder:O,inputContainer:g,unstyled:D,withAsterisk:H,variant:G}=r,V=Qde(r,["autosize","maxRows","minRows","label","error","description","id","className","required","style","wrapperProps","classNames","styles","size","__staticSelector","sx","errorProps","descriptionProps","labelProps","inputWrapperOrder","inputContainer","unstyled","withAsterisk","variant"]),P=Ul(c),{classes:S,cx:v}=Yde(),{systemStyles:b,rest:B}=Bu(V),M=cc({required:f,ref:t,error:s,id:P,classNames:_2(cc({},h),{input:v(S.input,h==null?void 0:h.input)}),styles:m,__staticSelector:w,size:_,multiline:!0,unstyled:D,variant:G},B);return ae.createElement(Ci.Wrapper,cc(cc({label:a,error:s,id:P,description:l,required:f,style:d,className:u,classNames:h,styles:m,size:_,__staticSelector:w,sx:y,errorProps:C,labelProps:F,descriptionProps:I,inputContainer:g,inputWrapperOrder:O,unstyled:D,withAsterisk:H,variant:G},b),p),n?ae.createElement(Ci,_2(cc({},M),{component:Gde,maxRows:o,minRows:i})):ae.createElement(Ci,_2(cc({},M),{component:"textarea",rows:i})))});A_.displayName="@mantine/core/Textarea";const XB={context:"Menu component was not found in the tree",children:"Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[tpe,Kp]=Bp(XB.context);var rpe=at(e=>({divider:{marginTop:me(4),marginBottom:me(4),borderTop:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`}}));const npe=rpe;var ope=Object.defineProperty,cg=Object.getOwnPropertySymbols,ZB=Object.prototype.hasOwnProperty,JB=Object.prototype.propertyIsEnumerable,KC=(e,t,r)=>t in e?ope(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ipe=(e,t)=>{for(var r in t||(t={}))ZB.call(t,r)&&KC(e,r,t[r]);if(cg)for(var r of cg(t))JB.call(t,r)&&KC(e,r,t[r]);return e},ape=(e,t)=>{var r={};for(var n in e)ZB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&cg)for(var n of cg(e))t.indexOf(n)<0&&JB.call(e,n)&&(r[n]=e[n]);return r};const spe={},QB=$.forwardRef((e,t)=>{const r=et("MenuDivider",spe,e),{children:n,className:o}=r,i=ape(r,["children","className"]),{classNames:a,styles:s,unstyled:l,variant:c}=Kp(),{classes:u,cx:f}=npe(null,{name:"Menu",classNames:a,styles:s,unstyled:l,variant:c});return ae.createElement(rt,ipe({className:f(u.divider,o),ref:t},i))});QB.displayName="@mantine/core/MenuDivider";var lpe=Object.defineProperty,ug=Object.getOwnPropertySymbols,ej=Object.prototype.hasOwnProperty,tj=Object.prototype.propertyIsEnumerable,YC=(e,t,r)=>t in e?lpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cpe=(e,t)=>{for(var r in t||(t={}))ej.call(t,r)&&YC(e,r,t[r]);if(ug)for(var r of ug(t))tj.call(t,r)&&YC(e,r,t[r]);return e},upe=(e,t)=>{var r={};for(var n in e)ej.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ug)for(var n of ug(e))t.indexOf(n)<0&&tj.call(e,n)&&(r[n]=e[n]);return r};const fpe={};function rj(e){const t=et("MenuDropdown",fpe,e),{children:r,onMouseEnter:n,onMouseLeave:o}=t,i=upe(t,["children","onMouseEnter","onMouseLeave"]),a=$.useRef(),s=Kp(),l=f=>{var d;(f.key==="ArrowUp"||f.key==="ArrowDown")&&(f.preventDefault(),(d=a.current.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||d.focus())},c=la(n,()=>s.trigger==="hover"&&s.openDropdown()),u=la(o,()=>s.trigger==="hover"&&s.closeDropdown());return ae.createElement(ka.Dropdown,cpe({onMouseEnter:c,onMouseLeave:u,role:"menu","aria-orientation":"vertical"},i),ae.createElement("div",{tabIndex:-1,"data-menu-dropdown":!0,"data-autofocus":!0,onKeyDown:l,ref:a,style:{outline:0}},r))}rj.displayName="@mantine/core/MenuDropdown";var dpe=Object.defineProperty,ppe=Object.defineProperties,hpe=Object.getOwnPropertyDescriptors,XC=Object.getOwnPropertySymbols,vpe=Object.prototype.hasOwnProperty,gpe=Object.prototype.propertyIsEnumerable,ZC=(e,t,r)=>t in e?dpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mpe=(e,t)=>{for(var r in t||(t={}))vpe.call(t,r)&&ZC(e,r,t[r]);if(XC)for(var r of XC(t))gpe.call(t,r)&&ZC(e,r,t[r]);return e},ype=(e,t)=>ppe(e,hpe(t)),bpe=at((e,{color:t,radius:r})=>({item:ype(mpe({},e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",fontSize:e.fontSizes.sm,border:0,backgroundColor:"transparent",outline:0,width:"100%",textAlign:"left",textDecoration:"none",boxSizing:"border-box",padding:`${e.spacing.xs} ${e.spacing.sm}`,cursor:"pointer",borderRadius:e.fn.radius(r),color:t?e.fn.variant({variant:"filled",primaryFallback:!1,color:t}).background:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"flex",alignItems:"center","&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],pointerEvents:"none",userSelect:"none"},"&[data-hovered]":{backgroundColor:t?e.fn.variant({variant:"light",color:t}).background:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[3],.35):e.colors.gray[1]}}),itemLabel:{flex:1},itemIcon:{display:"flex",justifyContent:"center",alignItems:"center",marginRight:e.spacing.xs},itemRightSection:{}}));const wpe=bpe;var xpe=Object.defineProperty,_pe=Object.defineProperties,Epe=Object.getOwnPropertyDescriptors,fg=Object.getOwnPropertySymbols,nj=Object.prototype.hasOwnProperty,oj=Object.prototype.propertyIsEnumerable,JC=(e,t,r)=>t in e?xpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Spe=(e,t)=>{for(var r in t||(t={}))nj.call(t,r)&&JC(e,r,t[r]);if(fg)for(var r of fg(t))oj.call(t,r)&&JC(e,r,t[r]);return e},Cpe=(e,t)=>_pe(e,Epe(t)),Ppe=(e,t)=>{var r={};for(var n in e)nj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&fg)for(var n of fg(e))t.indexOf(n)<0&&oj.call(e,n)&&(r[n]=e[n]);return r};const Ope={},ij=$.forwardRef((e,t)=>{const r=et("MenuItem",Ope,e),{children:n,className:o,color:i,closeMenuOnClick:a,icon:s,rightSection:l}=r,c=Ppe(r,["children","className","color","closeMenuOnClick","icon","rightSection"]),u=Kp(),{classes:f,cx:d,theme:p}=wpe({radius:u.radius,color:i},{name:"Menu",classNames:u.classNames,styles:u.styles,unstyled:u.unstyled,variant:u.variant}),h=$.useRef(),m=u.getItemIndex(h.current),_=c,w=la(_.onMouseLeave,()=>u.setHovered(-1)),y=la(_.onMouseEnter,()=>u.setHovered(u.getItemIndex(h.current))),C=la(_.onClick,()=>{typeof a=="boolean"?a&&u.closeDropdownImmediately():u.closeOnItemClick&&u.closeDropdownImmediately()}),I=la(_.onFocus,()=>u.setHovered(u.getItemIndex(h.current)));return ae.createElement(rt,Cpe(Spe({component:"button",type:"button"},c),{tabIndex:-1,onFocus:I,className:d(f.item,o),ref:Vs(h,t),role:"menuitem","data-menu-item":!0,"data-hovered":u.hovered===m?!0:void 0,onMouseEnter:y,onMouseLeave:w,onClick:C,onKeyDown:tQ({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:u.loop,dir:p.dir,orientation:"vertical",onKeyDown:_.onKeydown})}),s&&ae.createElement("div",{className:f.itemIcon},s),n&&ae.createElement("div",{className:f.itemLabel},n),l&&ae.createElement("div",{className:f.itemRightSection},l))});ij.displayName="@mantine/core/MenuItem";const Ape=ij;var kpe=at(e=>({label:{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontWeight:500,fontSize:e.fontSizes.xs,padding:`calc(${e.spacing.xs} / 2) ${e.spacing.sm}`,cursor:"default"}}));const Ipe=kpe;var $pe=Object.defineProperty,dg=Object.getOwnPropertySymbols,aj=Object.prototype.hasOwnProperty,sj=Object.prototype.propertyIsEnumerable,QC=(e,t,r)=>t in e?$pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Tpe=(e,t)=>{for(var r in t||(t={}))aj.call(t,r)&&QC(e,r,t[r]);if(dg)for(var r of dg(t))sj.call(t,r)&&QC(e,r,t[r]);return e},Dpe=(e,t)=>{var r={};for(var n in e)aj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&dg)for(var n of dg(e))t.indexOf(n)<0&&sj.call(e,n)&&(r[n]=e[n]);return r};const Mpe={},lj=$.forwardRef((e,t)=>{const r=et("MenuLabel",Mpe,e),{children:n,className:o}=r,i=Dpe(r,["children","className"]),{classNames:a,styles:s,unstyled:l,variant:c}=Kp(),{classes:u,cx:f}=Ipe(null,{name:"Menu",classNames:a,styles:s,unstyled:l,variant:c});return ae.createElement(St,Tpe({className:f(u.label,o),ref:t},i),n)});lj.displayName="@mantine/core/MenuLabel";var Rpe=Object.defineProperty,pg=Object.getOwnPropertySymbols,cj=Object.prototype.hasOwnProperty,uj=Object.prototype.propertyIsEnumerable,eP=(e,t,r)=>t in e?Rpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Npe=(e,t)=>{for(var r in t||(t={}))cj.call(t,r)&&eP(e,r,t[r]);if(pg)for(var r of pg(t))uj.call(t,r)&&eP(e,r,t[r]);return e},Fpe=(e,t)=>{var r={};for(var n in e)cj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&pg)for(var n of pg(e))t.indexOf(n)<0&&uj.call(e,n)&&(r[n]=e[n]);return r};const Bpe={refProp:"ref"},fj=$.forwardRef((e,t)=>{const r=et("MenuTarget",Bpe,e),{children:n,refProp:o}=r,i=Fpe(r,["children","refProp"]);if(!jp(n))throw new Error(XB.children);const a=Kp(),s=la(n.props.onClick,()=>a.trigger==="click"&&a.toggleDropdown()),l=la(n.props.onMouseEnter,()=>a.trigger==="hover"&&a.openDropdown()),c=la(n.props.onMouseLeave,()=>a.trigger==="hover"&&a.closeDropdown());return ae.createElement(ka.Target,Npe({refProp:o,popupType:"menu",ref:t},i),$.cloneElement(n,{onClick:s,onMouseEnter:l,onMouseLeave:c,"data-expanded":a.opened?!0:void 0}))});fj.displayName="@mantine/core/MenuTarget";var jpe=at({dropdown:{padding:me(4)}});const Lpe=jpe;var zpe=Object.defineProperty,Upe=Object.defineProperties,Hpe=Object.getOwnPropertyDescriptors,hg=Object.getOwnPropertySymbols,dj=Object.prototype.hasOwnProperty,pj=Object.prototype.propertyIsEnumerable,tP=(e,t,r)=>t in e?zpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rP=(e,t)=>{for(var r in t||(t={}))dj.call(t,r)&&tP(e,r,t[r]);if(hg)for(var r of hg(t))pj.call(t,r)&&tP(e,r,t[r]);return e},nP=(e,t)=>Upe(e,Hpe(t)),Vpe=(e,t)=>{var r={};for(var n in e)dj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&hg)for(var n of hg(e))t.indexOf(n)<0&&pj.call(e,n)&&(r[n]=e[n]);return r};const Wpe={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function ho(e){const t=et("Menu",Wpe,e),{children:r,onOpen:n,onClose:o,opened:i,defaultOpened:a,onChange:s,closeOnItemClick:l,loop:c,closeOnEscape:u,trigger:f,openDelay:d,closeDelay:p,classNames:h,styles:m,unstyled:_,radius:w,variant:y}=t,C=Vpe(t,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius","variant"]),{classes:I,cx:F}=Lpe(),[O,{setHovered:g,resetHovered:D}]=iQ(),[H,G]=Ml({value:i,defaultValue:a,finalValue:!1,onChange:s}),V=()=>{G(!1),H&&(o==null||o())},P=()=>{G(!0),!H&&(n==null||n())},S=()=>H?V():P(),{openDropdown:v,closeDropdown:b}=Mde({open:P,close:V,closeDelay:p,openDelay:d}),B=M=>rQ("[data-menu-item]","[data-menu-dropdown]",M);return Jo(()=>{D()},[H]),ae.createElement(tpe,{value:{opened:H,toggleDropdown:S,getItemIndex:B,hovered:O,setHovered:g,closeOnItemClick:l,closeDropdown:f==="click"?V:b,openDropdown:f==="click"?P:v,closeDropdownImmediately:V,loop:c,trigger:f,radius:w,classNames:h,styles:m,unstyled:_,variant:y}},ae.createElement(ka,nP(rP({},C),{radius:w,opened:H,onChange:S,defaultOpened:a,trapFocus:f==="click",closeOnEscape:u&&f==="click",__staticSelector:"Menu",classNames:nP(rP({},h),{dropdown:F(I.dropdown,h==null?void 0:h.dropdown)}),styles:m,unstyled:_,variant:y}),r))}ho.displayName="@mantine/core/Menu";ho.Item=Ape;ho.Label=lj;ho.Dropdown=rj;ho.Target=fj;ho.Divider=QB;const[qpe,Gpe]=Bp("Modal component was not found in tree"),Kpe={xs:me(320),sm:me(380),md:me(440),lg:me(620),xl:me(780)};var Ype=at((e,{yOffset:t,xOffset:r,centered:n,fullScreen:o},{size:i})=>({content:{flex:o?"0 0 100%":`0 0 ${Re({size:i,sizes:Kpe})}`,maxWidth:"100%",maxHeight:o?void 0:`calc(100dvh - (${me(t)} * 2))`,height:o?"100vh":void 0,borderRadius:o?0:void 0,overflowY:"auto"},inner:{paddingTop:o?0:t,paddingBottom:o?0:t,paddingLeft:o?0:r,paddingRight:o?0:r,display:"flex",justifyContent:"center",alignItems:n?"center":"flex-start"}}));const Xpe=Ype;var Zpe=Object.defineProperty,Jpe=Object.defineProperties,Qpe=Object.getOwnPropertyDescriptors,vg=Object.getOwnPropertySymbols,hj=Object.prototype.hasOwnProperty,vj=Object.prototype.propertyIsEnumerable,oP=(e,t,r)=>t in e?Zpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,d3=(e,t)=>{for(var r in t||(t={}))hj.call(t,r)&&oP(e,r,t[r]);if(vg)for(var r of vg(t))vj.call(t,r)&&oP(e,r,t[r]);return e},gj=(e,t)=>Jpe(e,Qpe(t)),ehe=(e,t)=>{var r={};for(var n in e)hj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&vg)for(var n of vg(e))t.indexOf(n)<0&&vj.call(e,n)&&(r[n]=e[n]);return r};const the=gj(d3({},C_),{yOffset:"5dvh",xOffset:"5vw"});function mj(e){const t=et("ModalRoot",the,e),{classNames:r,variant:n,size:o,yOffset:i,xOffset:a,scrollAreaComponent:s,radius:l,centered:c,fullScreen:u}=t,f=ehe(t,["classNames","variant","size","yOffset","xOffset","scrollAreaComponent","radius","centered","fullScreen"]),{classes:d,cx:p}=Xpe({yOffset:i,xOffset:a,centered:c,fullScreen:u},{name:"Modal",variant:n,size:o});return ae.createElement(qpe,{value:{yOffset:i,scrollAreaComponent:s,radius:l}},ae.createElement(sr,d3({__staticSelector:"Modal",size:o,variant:n,classNames:gj(d3({},r),{content:p(d.content,r==null?void 0:r.content),inner:p(d.inner,r==null?void 0:r.inner)})},f)))}var rhe=Object.defineProperty,gg=Object.getOwnPropertySymbols,yj=Object.prototype.hasOwnProperty,bj=Object.prototype.propertyIsEnumerable,iP=(e,t,r)=>t in e?rhe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nhe=(e,t)=>{for(var r in t||(t={}))yj.call(t,r)&&iP(e,r,t[r]);if(gg)for(var r of gg(t))bj.call(t,r)&&iP(e,r,t[r]);return e},ohe=(e,t)=>{var r={};for(var n in e)yj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&gg)for(var n of gg(e))t.indexOf(n)<0&&bj.call(e,n)&&(r[n]=e[n]);return r};const ihe={shadow:"xl"},wj=$.forwardRef((e,t)=>{const r=et("ModalContent",ihe,e),{children:n,scrollAreaComponent:o}=r,i=ohe(r,["children","scrollAreaComponent"]),a=Gpe(),s=o||a.scrollAreaComponent||sr.NativeScrollArea;return ae.createElement(sr.Content,nhe({ref:t,radius:a.radius},i),ae.createElement(s,{style:{maxHeight:`calc(100dvh - (${me(a.yOffset)} * 2))`}},n))});var ahe=Object.defineProperty,she=Object.defineProperties,lhe=Object.getOwnPropertyDescriptors,mg=Object.getOwnPropertySymbols,xj=Object.prototype.hasOwnProperty,_j=Object.prototype.propertyIsEnumerable,aP=(e,t,r)=>t in e?ahe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f1=(e,t)=>{for(var r in t||(t={}))xj.call(t,r)&&aP(e,r,t[r]);if(mg)for(var r of mg(t))_j.call(t,r)&&aP(e,r,t[r]);return e},che=(e,t)=>she(e,lhe(t)),uhe=(e,t)=>{var r={};for(var n in e)xj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&mg)for(var n of mg(e))t.indexOf(n)<0&&_j.call(e,n)&&(r[n]=e[n]);return r};const fhe=che(f1({},C_),{transitionProps:{duration:200,transition:"pop"},withOverlay:!0,withCloseButton:!0});function Ia(e){const t=et("Modal",fhe,e),{title:r,withOverlay:n,overlayProps:o,withCloseButton:i,closeButtonProps:a,children:s}=t,l=uhe(t,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),c=!!r||i;return ae.createElement(mj,f1({},l),n&&ae.createElement(sr.Overlay,f1({},o)),ae.createElement(wj,null,c&&ae.createElement(sr.Header,null,r&&ae.createElement(sr.Title,null,r),i&&ae.createElement(sr.CloseButton,f1({},a))),ae.createElement(sr.Body,null,s)))}Ia.Root=mj;Ia.CloseButton=sr.CloseButton;Ia.Overlay=sr.Overlay;Ia.Content=wj;Ia.Header=sr.Header;Ia.Title=sr.Title;Ia.Body=sr.Body;Ia.NativeScrollArea=sr.NativeScrollArea;var dhe=Object.defineProperty,yg=Object.getOwnPropertySymbols,Ej=Object.prototype.hasOwnProperty,Sj=Object.prototype.propertyIsEnumerable,sP=(e,t,r)=>t in e?dhe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lP=(e,t)=>{for(var r in t||(t={}))Ej.call(t,r)&&sP(e,r,t[r]);if(yg)for(var r of yg(t))Sj.call(t,r)&&sP(e,r,t[r]);return e},phe=(e,t)=>{var r={};for(var n in e)Ej.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&yg)for(var n of yg(e))t.indexOf(n)<0&&Sj.call(e,n)&&(r[n]=e[n]);return r};const hhe={xs:me(14),sm:me(18),md:me(20),lg:me(24),xl:me(28)};function vhe(e){var t=e,{size:r,error:n,style:o}=t,i=phe(t,["size","error","style"]);const a=Lr(),s=Re({size:r,sizes:hhe});return ae.createElement("svg",lP({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:lP({color:n?a.colors.red[6]:a.colors.gray[6],width:s,height:s},o),"data-chevron":!0},i),ae.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var ghe=Object.defineProperty,mhe=Object.defineProperties,yhe=Object.getOwnPropertyDescriptors,cP=Object.getOwnPropertySymbols,bhe=Object.prototype.hasOwnProperty,whe=Object.prototype.propertyIsEnumerable,uP=(e,t,r)=>t in e?ghe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xhe=(e,t)=>{for(var r in t||(t={}))bhe.call(t,r)&&uP(e,r,t[r]);if(cP)for(var r of cP(t))whe.call(t,r)&&uP(e,r,t[r]);return e},_he=(e,t)=>mhe(e,yhe(t));function Cj({shouldClear:e,clearButtonProps:t,onClear:r,size:n,error:o}){return e?ae.createElement(r_,_he(xhe({},t),{variant:"transparent",onClick:r,size:n,onMouseDown:i=>i.preventDefault()})):ae.createElement(vhe,{error:o,size:n})}Cj.displayName="@mantine/core/SelectRightSection";var Ehe=Object.defineProperty,She=Object.defineProperties,Che=Object.getOwnPropertyDescriptors,bg=Object.getOwnPropertySymbols,Pj=Object.prototype.hasOwnProperty,Oj=Object.prototype.propertyIsEnumerable,fP=(e,t,r)=>t in e?Ehe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,E2=(e,t)=>{for(var r in t||(t={}))Pj.call(t,r)&&fP(e,r,t[r]);if(bg)for(var r of bg(t))Oj.call(t,r)&&fP(e,r,t[r]);return e},dP=(e,t)=>She(e,Che(t)),Phe=(e,t)=>{var r={};for(var n in e)Pj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&bg)for(var n of bg(e))t.indexOf(n)<0&&Oj.call(e,n)&&(r[n]=e[n]);return r};function Ohe(e){var t=e,{styles:r,rightSection:n,rightSectionWidth:o,theme:i}=t,a=Phe(t,["styles","rightSection","rightSectionWidth","theme"]);if(n)return{rightSection:n,rightSectionWidth:o,styles:r};const s=typeof r=="function"?r(i):r;return{rightSection:!a.readOnly&&!(a.disabled&&a.shouldClear)&&ae.createElement(Cj,E2({},a)),styles:dP(E2({},s),{rightSection:dP(E2({},s==null?void 0:s.rightSection),{pointerEvents:a.shouldClear?void 0:"none"})})}}const Ahe=(e,t,r)=>Number.isInteger(e)&&e>=0&&t===0?"numeric":!Number.isInteger(e)&&e>=0&&t!==0?"decimal":Number.isInteger(e)&&e<0&&t===0||!Number.isInteger(e)&&e<0&&t!==0?r==="ios"?"text":"decimal":"numeric";function pP({direction:e,size:t}){return ae.createElement("svg",{style:{width:me(t),height:me(t),transform:e==="up"?"rotate(180deg)":void 0},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ae.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}const Aj={xs:me(20),sm:me(24),md:me(30),lg:me(34),xl:me(36)};var khe=at((e,{radius:t},{size:r})=>({rightSection:{display:"flex",flexDirection:"column",height:`calc(100% - ${me(2)})`,margin:me(1),overflow:"hidden",borderTopRightRadius:e.fn.radius(t),borderBottomRightRadius:e.fn.radius(t)},control:{margin:0,position:"relative",flex:"0 0 50%",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:Re({size:r,sizes:Aj}),padding:0,WebkitTapHighlightColor:"transparent",borderBottom:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderLeft:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderTop:0,borderRight:0,backgroundColor:"transparent",marginRight:me(1),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,"&:not(:disabled):hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]},"&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]}},controlUp:{},controlDown:{borderBottom:0}}));const Ihe=khe;var $he=Object.defineProperty,The=Object.defineProperties,Dhe=Object.getOwnPropertyDescriptors,wg=Object.getOwnPropertySymbols,kj=Object.prototype.hasOwnProperty,Ij=Object.prototype.propertyIsEnumerable,hP=(e,t,r)=>t in e?$he(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S2=(e,t)=>{for(var r in t||(t={}))kj.call(t,r)&&hP(e,r,t[r]);if(wg)for(var r of wg(t))Ij.call(t,r)&&hP(e,r,t[r]);return e},Mhe=(e,t)=>The(e,Dhe(t)),Rhe=(e,t)=>{var r={};for(var n in e)kj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&wg)for(var n of wg(e))t.indexOf(n)<0&&Ij.call(e,n)&&(r[n]=e[n]);return r};const Nhe={type:"text",size:"sm",__staticSelector:"TextInput"},_s=$.forwardRef((e,t)=>{const r=kF("TextInput",Nhe,e),{inputProps:n,wrapperProps:o}=r,i=Rhe(r,["inputProps","wrapperProps"]);return ae.createElement(Ci.Wrapper,S2({},o),ae.createElement(Ci,Mhe(S2(S2({},n),i),{ref:t})))});_s.displayName="@mantine/core/TextInput";var Fhe=Object.defineProperty,Bhe=Object.defineProperties,jhe=Object.getOwnPropertyDescriptors,xg=Object.getOwnPropertySymbols,$j=Object.prototype.hasOwnProperty,Tj=Object.prototype.propertyIsEnumerable,vP=(e,t,r)=>t in e?Fhe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Lhe=(e,t)=>{for(var r in t||(t={}))$j.call(t,r)&&vP(e,r,t[r]);if(xg)for(var r of xg(t))Tj.call(t,r)&&vP(e,r,t[r]);return e},zhe=(e,t)=>Bhe(e,jhe(t)),Uhe=(e,t)=>{var r={};for(var n in e)$j.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&xg)for(var n of xg(e))t.indexOf(n)<0&&Tj.call(e,n)&&(r[n]=e[n]);return r};const Hhe=e=>e||"",Vhe=e=>{if(e==="-")return e;let t=e;t[0]==="."&&(t=`0${e}`);const r=parseFloat(t);return Number.isNaN(r)?"":e},gP={xs:me(10),sm:me(14),md:me(16),lg:me(18),xl:me(20)},Whe={step:1,hideControls:!1,size:"sm",precision:0,noClampOnBlur:!1,removeTrailingZeros:!1,decimalSeparator:".",formatter:Hhe,parser:Vhe,type:"text"},k_=$.forwardRef((e,t)=>{const r=et("NumberInput",Whe,e),{readOnly:n,disabled:o,value:i,onChange:a,decimalSeparator:s,thousandsSeparator:l,min:c,max:u,startValue:f,step:d,stepHoldInterval:p,stepHoldDelay:h,onFocus:m,onBlur:_,onKeyDown:w,onKeyUp:y,hideControls:C,radius:I,variant:F,precision:O,removeTrailingZeros:g,defaultValue:D,noClampOnBlur:H,handlersRef:G,classNames:V,styles:P,size:S,rightSection:v,rightSectionWidth:b,formatter:B,parser:M,inputMode:j,unstyled:U,type:E}=r,N=Uhe(r,["readOnly","disabled","value","onChange","decimalSeparator","thousandsSeparator","min","max","startValue","step","stepHoldInterval","stepHoldDelay","onFocus","onBlur","onKeyDown","onKeyUp","hideControls","radius","variant","precision","removeTrailingZeros","defaultValue","noClampOnBlur","handlersRef","classNames","styles","size","rightSection","rightSectionWidth","formatter","parser","inputMode","unstyled","type"]),{classes:T,cx:q}=Ihe({radius:I},{classNames:V,styles:P,unstyled:U,name:"NumberInput",variant:F,size:S}),J=xe=>{if(xe==="")return"";let _e=xe.toFixed(O);return g&&O>0&&(_e=_e.replace(new RegExp(`[0]{0,${O}}$`),""),_e.endsWith(".")&&(_e=_e.slice(0,-1))),_e},te=xe=>{let _e=xe;return s&&(_e=_e.replace(".",s)),B(_e)},ne=xe=>{let _e=xe;return s&&(_e=_e.replaceAll(l,"").replace(s,".")),M(_e)},ce=xe=>te(J(xe)),[ie,ue]=$.useState(typeof i=="number"?i:typeof D=="number"?D:""),[A,K]=$.useState(()=>ce(ie)),ee=$.useRef(),[se,pe]=$.useState(!1),ge=(xe,_e)=>{if(!se||_e){const ke=ce(xe);ke!==A&&K(ke)}xe!==ie&&ue(xe)},X=typeof c=="number"?c:-1/0,R=typeof u=="number"?u:1/0,z=$.useRef();z.current=()=>{var xe;let _e;ie===""?_e=(xe=f??c)!=null?xe:0:_e=parseFloat(J(bs(ie+d,X,R))),ge(_e,!0),a==null||a(_e)};const Z=$.useRef();Z.current=()=>{var xe;let _e;ie===""?_e=(xe=f??c)!=null?xe:0:_e=parseFloat(J(bs(ie-d,X,R))),ge(_e,!0),a==null||a(_e)},gR(G,{increment:z.current,decrement:Z.current}),$.useEffect(()=>{se||ge(i===void 0?ie:i,!0)},[i,se]);const Q=h!==void 0&&p!==void 0,de=$.useRef(null),we=$.useRef(0),Se=()=>{de.current&&window.clearTimeout(de.current),de.current=null,we.current=0},Ee=xe=>{xe?z.current():Z.current(),we.current+=1},Ae=xe=>{if(Ee(xe),Q){const _e=typeof p=="number"?p:p(we.current);de.current=window.setTimeout(()=>Ae(xe),_e)}},Te=(xe,_e)=>{xe.preventDefault(),ee.current.focus(),Ee(_e),Q&&(de.current=window.setTimeout(()=>Ae(_e),h))};$.useEffect(()=>(Se(),Se),[]);const W=ae.createElement("div",{className:T.rightSection},ae.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:ie>=u,className:q(T.control,T.controlUp),onPointerDown:xe=>{Te(xe,!0)},onPointerUp:Se,onPointerLeave:Se},ae.createElement(pP,{size:Re({size:S,sizes:gP}),direction:"up"})),ae.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:ie<=c,className:q(T.control,T.controlDown),onPointerDown:xe=>{Te(xe,!1)},onPointerUp:Se,onPointerLeave:Se},ae.createElement(pP,{size:Re({size:S,sizes:gP}),direction:"down"}))),x=xe=>{let _e=xe;(_e[0]===`${s}`||_e[0]===".")&&(_e=`0${_e}`);const ke=parseFloat(J(parseFloat(ne(_e)))),$e=H?ke:bs(ke,X,R),Ne=Number.isNaN($e)?"":$e,We=ie!==Ne;K(xe),ge(Ne),We&&(a==null||a(Ne))},k=xe=>{xe.nativeEvent.isComposing||x(xe.target.value)},Y=xe=>{pe(!0),m==null||m(xe)},re=xe=>{pe(!1),_==null||_(xe)},fe=xe=>{if(typeof w=="function"&&w(xe),xe.repeat&&Q&&(xe.key==="ArrowUp"||xe.key==="ArrowDown")){xe.preventDefault();return}n||(xe.key==="ArrowUp"?Te(xe,!0):xe.key==="ArrowDown"&&Te(xe,!1))},le=xe=>{typeof y=="function"&&y(xe),(xe.key==="ArrowUp"||xe.key==="ArrowDown")&&Se()};return ae.createElement(_s,zhe(Lhe({},N),{type:E,variant:F,value:A,disabled:o,readOnly:n,ref:Vs(ee,t),onChange:k,onFocus:Y,onBlur:re,onKeyDown:fe,onKeyUp:le,rightSection:v||(o||n||C||F==="unstyled"?null:W),rightSectionWidth:b??`calc(${Re({size:S,sizes:Aj})} + ${me(1)})`,radius:I,max:u,min:c,step:d,size:S,styles:P,classNames:V,inputMode:j||Ahe(d,O,cre()),__staticSelector:"NumberInput",unstyled:U}))});k_.displayName="@mantine/core/NumberInput";const Dj=$.createContext(!1),qhe=Dj.Provider,Ghe=()=>$.useContext(Dj);function Mj({children:e,openDelay:t=0,closeDelay:r=0}){return ae.createElement(qhe,{value:!0},ae.createElement(_se,{delay:{open:t,close:r}},e))}Mj.displayName="@mantine/core/TooltipGroup";var Khe=Object.defineProperty,Yhe=Object.defineProperties,Xhe=Object.getOwnPropertyDescriptors,mP=Object.getOwnPropertySymbols,Zhe=Object.prototype.hasOwnProperty,Jhe=Object.prototype.propertyIsEnumerable,yP=(e,t,r)=>t in e?Khe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bP=(e,t)=>{for(var r in t||(t={}))Zhe.call(t,r)&&yP(e,r,t[r]);if(mP)for(var r of mP(t))Jhe.call(t,r)&&yP(e,r,t[r]);return e},Qhe=(e,t)=>Yhe(e,Xhe(t));function e0e(e,t){if(!t)return{backgroundColor:e.colorScheme==="dark"?e.colors.gray[2]:e.colors.gray[9],color:e.colorScheme==="dark"?e.black:e.white};const r=e.fn.variant({variant:"filled",color:t,primaryFallback:!1});return{backgroundColor:r.background,color:r.color}}var t0e=at((e,{color:t,radius:r,width:n,multiline:o})=>({tooltip:Qhe(bP(bP({},e.fn.fontStyles()),e0e(e,t)),{lineHeight:e.lineHeight,fontSize:e.fontSizes.sm,borderRadius:e.fn.radius(r),padding:`calc(${e.spacing.xs} / 2) ${e.spacing.xs}`,position:"absolute",whiteSpace:o?"unset":"nowrap",pointerEvents:"none",width:n}),arrow:{backgroundColor:"inherit",border:0,zIndex:1}}));const Rj=t0e,Nj={children:"Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"};function r0e({offset:e,position:t}){const[r,n]=$.useState(!1),o=$.useRef(),{x:i,y:a,reference:s,floating:l,refs:c,update:u,placement:f}=m_({placement:t,middleware:[f_({crossAxis:!0,padding:5,rootBoundary:"document"})]}),d=f.includes("right")?e:t.includes("left")?e*-1:0,p=f.includes("bottom")?e:t.includes("top")?e*-1:0,h=$.useCallback(({clientX:m,clientY:_})=>{s({getBoundingClientRect(){return{width:0,height:0,x:m,y:_,left:m+d,top:_+p,right:m,bottom:_}}})},[s]);return $.useEffect(()=>{if(c.floating.current){const m=o.current;m.addEventListener("mousemove",h);const _=ws(c.floating.current);return _.forEach(w=>{w.addEventListener("scroll",u)}),()=>{m.removeEventListener("mousemove",h),_.forEach(w=>{w.removeEventListener("scroll",u)})}}},[s,c.floating.current,u,h,r]),{handleMouseMove:h,x:i,y:a,opened:r,setOpened:n,boundaryRef:o,floating:l}}var n0e=Object.defineProperty,o0e=Object.defineProperties,i0e=Object.getOwnPropertyDescriptors,_g=Object.getOwnPropertySymbols,Fj=Object.prototype.hasOwnProperty,Bj=Object.prototype.propertyIsEnumerable,wP=(e,t,r)=>t in e?n0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b0=(e,t)=>{for(var r in t||(t={}))Fj.call(t,r)&&wP(e,r,t[r]);if(_g)for(var r of _g(t))Bj.call(t,r)&&wP(e,r,t[r]);return e},w0=(e,t)=>o0e(e,i0e(t)),a0e=(e,t)=>{var r={};for(var n in e)Fj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&_g)for(var n of _g(e))t.indexOf(n)<0&&Bj.call(e,n)&&(r[n]=e[n]);return r};const s0e={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:Hs("popover")};function jj(e){var t;const r=et("TooltipFloating",s0e,e),{children:n,refProp:o,withinPortal:i,portalProps:a,style:s,className:l,classNames:c,styles:u,unstyled:f,radius:d,color:p,label:h,offset:m,position:_,multiline:w,width:y,zIndex:C,disabled:I,variant:F}=r,O=a0e(r,["children","refProp","withinPortal","portalProps","style","className","classNames","styles","unstyled","radius","color","label","offset","position","multiline","width","zIndex","disabled","variant"]),{handleMouseMove:g,x:D,y:H,opened:G,boundaryRef:V,floating:P,setOpened:S}=r0e({offset:m,position:_}),{classes:v,cx:b}=Rj({radius:d,color:p,multiline:w,width:y},{name:"TooltipFloating",classNames:c,styles:u,unstyled:f,variant:F});if(!jp(n))throw new Error(Nj.children);const B=Vs(V,n.ref),M=U=>{var E,N;(N=(E=n.props).onMouseEnter)==null||N.call(E,U),g(U),S(!0)},j=U=>{var E,N;(N=(E=n.props).onMouseLeave)==null||N.call(E,U),S(!1)};return ae.createElement(ae.Fragment,null,ae.createElement(Vp,w0(b0({},a),{withinPortal:i}),ae.createElement(rt,w0(b0({},O),{ref:P,className:b(v.tooltip,l),style:w0(b0({},s),{zIndex:C,display:!I&&G?"block":"none",top:H??"",left:(t=Math.round(D))!=null?t:""})}),h)),$.cloneElement(n,w0(b0({},n.props),{[o]:B,onMouseEnter:M,onMouseLeave:j})))}jj.displayName="@mantine/core/TooltipFloating";function l0e(e){const[t,r]=$.useState(!1),o=typeof e.opened=="boolean"?e.opened:t,i=Ghe(),a=Ul(),{delay:s,currentId:l,setCurrentId:c}=fF(),u=$.useCallback(D=>{r(D),D&&c(a)},[c,a]),{x:f,y:d,reference:p,floating:h,context:m,refs:_,update:w,placement:y,middlewareData:{arrow:{x:C,y:I}={}}}=m_({placement:e.position,open:o,onOpenChange:u,middleware:[JN(e.offset),f_({padding:8}),YN(),aF({element:e.arrowRef,padding:e.arrowOffset}),...e.inline?[ZN()]:[]]}),{getReferenceProps:F,getFloatingProps:O}=Mse([xse(m,{enabled:e.events.hover,delay:i?s:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events.touch}),Tse(m,{enabled:e.events.focus,keyboardOnly:!0}),Dse(m,{role:"tooltip"}),$se(m,{enabled:typeof e.opened===void 0}),Ese(m,{id:a})]);return pF({opened:o,position:e.position,positionDependencies:e.positionDependencies,floating:{refs:_,update:w}}),Jo(()=>{var D;(D=e.onPositionChange)==null||D.call(e,y)},[y]),{x:f,y:d,arrowX:C,arrowY:I,reference:p,floating:h,getFloatingProps:O,getReferenceProps:F,isGroupPhase:o&&l&&l!==a,opened:o,placement:y}}var c0e=Object.defineProperty,u0e=Object.defineProperties,f0e=Object.getOwnPropertyDescriptors,Eg=Object.getOwnPropertySymbols,Lj=Object.prototype.hasOwnProperty,zj=Object.prototype.propertyIsEnumerable,xP=(e,t,r)=>t in e?c0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tl=(e,t)=>{for(var r in t||(t={}))Lj.call(t,r)&&xP(e,r,t[r]);if(Eg)for(var r of Eg(t))zj.call(t,r)&&xP(e,r,t[r]);return e},C2=(e,t)=>u0e(e,f0e(t)),d0e=(e,t)=>{var r={};for(var n in e)Lj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Eg)for(var n of Eg(e))t.indexOf(n)<0&&zj.call(e,n)&&(r[n]=e[n]);return r};const p0e={position:"top",refProp:"ref",withinPortal:!1,inline:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},width:"auto",events:{hover:!0,focus:!1,touch:!1},zIndex:Hs("popover"),positionDependencies:[]},gy=$.forwardRef((e,t)=>{var r;const n=$.useRef(null),o=et("Tooltip",p0e,e),{children:i,position:a,refProp:s,label:l,openDelay:c,closeDelay:u,onPositionChange:f,opened:d,withinPortal:p,portalProps:h,radius:m,color:_,classNames:w,styles:y,unstyled:C,style:I,className:F,withArrow:O,arrowSize:g,arrowOffset:D,arrowRadius:H,arrowPosition:G,offset:V,transitionProps:P,multiline:S,width:v,events:b,zIndex:B,disabled:M,positionDependencies:j,onClick:U,onMouseEnter:E,onMouseLeave:N,inline:T,variant:q,keepMounted:J}=o,te=d0e(o,["children","position","refProp","label","openDelay","closeDelay","onPositionChange","opened","withinPortal","portalProps","radius","color","classNames","styles","unstyled","style","className","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","offset","transitionProps","multiline","width","events","zIndex","disabled","positionDependencies","onClick","onMouseEnter","onMouseLeave","inline","variant","keepMounted"]),{classes:ne,cx:ce,theme:ie}=Rj({radius:m,color:_,width:v,multiline:S},{name:"Tooltip",classNames:w,styles:y,unstyled:C,variant:q}),ue=l0e({position:SF(ie.dir,a),closeDelay:u,openDelay:c,onPositionChange:f,opened:d,events:b,arrowRef:n,arrowOffset:D,offset:V+(O?g/2:0),positionDependencies:[...j,i],inline:T});if(!jp(i))throw new Error(Nj.children);const A=Vs(ue.reference,i.ref,t);return ae.createElement(ae.Fragment,null,ae.createElement(Vp,C2(tl({},h),{withinPortal:p}),ae.createElement(Wl,C2(tl({keepMounted:J,mounted:!M&&ue.opened},P),{transition:P.transition||"fade",duration:ue.isGroupPhase?10:(r=P.duration)!=null?r:100}),K=>{var ee,se;return ae.createElement(rt,tl(tl({},te),ue.getFloatingProps({ref:ue.floating,className:ne.tooltip,style:C2(tl(tl({},I),K),{zIndex:B,top:(ee=ue.y)!=null?ee:0,left:(se=ue.x)!=null?se:0})})),l,ae.createElement(b_,{ref:n,arrowX:ue.arrowX,arrowY:ue.arrowY,visible:O,position:ue.placement,arrowSize:g,arrowOffset:D,arrowRadius:H,arrowPosition:G,className:ne.arrow}))})),$.cloneElement(i,ue.getReferenceProps(tl({onClick:U,onMouseEnter:E,onMouseLeave:N,onMouseMove:e.onMouseMove,onPointerDown:e.onPointerDown,onPointerEnter:e.onPointerEnter,[s]:A,className:ce(F,i.props.className)},i.props))))});gy.Group=Mj;gy.Floating=jj;gy.displayName="@mantine/core/Tooltip";const Yp=gy;function h0e({size:e,thickness:t,sum:r,value:n,root:o,offset:i}){const a=(e*.9-t*2)/2,s=Math.PI*a*2/100,l=o?`${(100-r)*s}, ${r*s}`:`${n*s}, ${(100-n)*s}`;return{strokeWidth:t,cx:e/2,cy:e/2,r:a,transform:o?`scale(1, -1) translate(0, -${e})`:null,strokeDasharray:l,strokeDashoffset:o?0:i}}var v0e=Object.defineProperty,g0e=Object.defineProperties,m0e=Object.getOwnPropertyDescriptors,Sg=Object.getOwnPropertySymbols,Uj=Object.prototype.hasOwnProperty,Hj=Object.prototype.propertyIsEnumerable,_P=(e,t,r)=>t in e?v0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,EP=(e,t)=>{for(var r in t||(t={}))Uj.call(t,r)&&_P(e,r,t[r]);if(Sg)for(var r of Sg(t))Hj.call(t,r)&&_P(e,r,t[r]);return e},y0e=(e,t)=>g0e(e,m0e(t)),b0e=(e,t)=>{var r={};for(var n in e)Uj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Sg)for(var n of Sg(e))t.indexOf(n)<0&&Hj.call(e,n)&&(r[n]=e[n]);return r};function Vj(e){var t=e,{size:r,value:n,offset:o,sum:i,thickness:a,root:s,color:l,lineRoundCaps:c,tooltip:u}=t,f=b0e(t,["size","value","offset","sum","thickness","root","color","lineRoundCaps","tooltip"]);const d=Lr(),p=d.fn.themeColor(l||(d.colorScheme==="dark"?"dark":"gray"),l?d.fn.primaryShade():d.colorScheme==="dark"?4:1,!1);return ae.createElement(Yp.Floating,{disabled:!u,label:u},ae.createElement("circle",EP(y0e(EP({},f),{fill:"none",strokeLinecap:c?"round":"butt",stroke:p}),h0e({sum:i,size:r,thickness:a,value:n,offset:o,root:s}))))}Vj.displayName="@mantine/core/Curve";var w0e=Object.defineProperty,x0e=Object.defineProperties,_0e=Object.getOwnPropertyDescriptors,SP=Object.getOwnPropertySymbols,E0e=Object.prototype.hasOwnProperty,S0e=Object.prototype.propertyIsEnumerable,CP=(e,t,r)=>t in e?w0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kf=(e,t)=>{for(var r in t||(t={}))E0e.call(t,r)&&CP(e,r,t[r]);if(SP)for(var r of SP(t))S0e.call(t,r)&&CP(e,r,t[r]);return e},If=(e,t)=>x0e(e,_0e(t));function C0e({size:e,thickness:t,sections:r,renderRoundedLineCaps:n,rootColor:o}){const i=r.reduce((u,f)=>u+f.value,0),a=Math.PI*((e*.9-t*2)/2)*2;let s=a;const l=[],c=[];for(let u=0;u2){c.push(If(kf({},l[0]),{lineRoundCaps:n})),c.push(If(kf({},l[l.length-2]),{lineRoundCaps:n}));for(let u=1;u<=l.length-3;u+=1)c.push(If(kf({},l[u]),{lineRoundCaps:!1}))}else c.push(If(kf({},l[0]),{lineRoundCaps:n}));return c}var P0e=at({root:{position:"relative"},label:{position:"absolute",top:"50%",transform:"translateY(-50%)"}});const O0e=P0e;var A0e=Object.defineProperty,k0e=Object.defineProperties,I0e=Object.getOwnPropertyDescriptors,Cg=Object.getOwnPropertySymbols,Wj=Object.prototype.hasOwnProperty,qj=Object.prototype.propertyIsEnumerable,PP=(e,t,r)=>t in e?A0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,P2=(e,t)=>{for(var r in t||(t={}))Wj.call(t,r)&&PP(e,r,t[r]);if(Cg)for(var r of Cg(t))qj.call(t,r)&&PP(e,r,t[r]);return e},$0e=(e,t)=>k0e(e,I0e(t)),T0e=(e,t)=>{var r={};for(var n in e)Wj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Cg)for(var n of Cg(e))t.indexOf(n)<0&&qj.call(e,n)&&(r[n]=e[n]);return r};const D0e={size:120,thickness:12},Gj=$.forwardRef((e,t)=>{const r=et("RingProgress",D0e,e),{className:n,style:o,label:i,sections:a,size:s,thickness:l,classNames:c,styles:u,roundCaps:f,rootColor:d,unstyled:p,variant:h}=r,m=T0e(r,["className","style","label","sections","size","thickness","classNames","styles","roundCaps","rootColor","unstyled","variant"]),{classes:_,cx:w}=O0e(null,{name:"RingProgress",classNames:c,styles:u,unstyled:p,variant:h}),y=C0e({size:s,thickness:l,sections:a,renderRoundedLineCaps:f,rootColor:d}).map(({data:C,sum:I,root:F,lineRoundCaps:O,offset:g},D)=>ae.createElement(Vj,$0e(P2({},C),{key:D,size:s,thickness:l,sum:I,offset:g,color:C==null?void 0:C.color,root:F,lineRoundCaps:O})));return ae.createElement(rt,P2({style:P2({width:s,height:s},o),className:w(_.root,n),ref:t},m),ae.createElement("svg",{style:{width:s,height:s,transform:"rotate(-90deg)"}},y),i&&ae.createElement("div",{className:_.label,style:{right:l*2,left:l*2}},i))});Gj.displayName="@mantine/core/RingProgress";function M0e({data:e,searchable:t,limit:r,searchValue:n,filter:o,value:i,filterDataOnExactSearchMatch:a}){if(!t)return e;const s=i!=null&&e.find(c=>c.value===i)||null;if(s&&!a&&(s==null?void 0:s.label)===n){if(r){if(r>=e.length)return e;const c=e.indexOf(s),u=c+r,f=u-e.length;return f>0?e.slice(c-f):e.slice(c,u)}return e}const l=[];for(let c=0;c=r));c+=1);return l}var R0e=at(()=>({input:{"&:not(:disabled)":{cursor:"pointer","&::selection":{backgroundColor:"transparent"}}}}));const N0e=R0e;var F0e=Object.defineProperty,B0e=Object.defineProperties,j0e=Object.getOwnPropertyDescriptors,Pg=Object.getOwnPropertySymbols,Kj=Object.prototype.hasOwnProperty,Yj=Object.prototype.propertyIsEnumerable,OP=(e,t,r)=>t in e?F0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$f=(e,t)=>{for(var r in t||(t={}))Kj.call(t,r)&&OP(e,r,t[r]);if(Pg)for(var r of Pg(t))Yj.call(t,r)&&OP(e,r,t[r]);return e},O2=(e,t)=>B0e(e,j0e(t)),L0e=(e,t)=>{var r={};for(var n in e)Kj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Pg)for(var n of Pg(e))t.indexOf(n)<0&&Yj.call(e,n)&&(r[n]=e[n]);return r};function z0e(e,t){return t.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function U0e(e,t){return!!e&&!t.some(r=>r.label.toLowerCase()===e.toLowerCase())}const H0e={required:!1,size:"sm",shadow:"sm",itemComponent:AN,transitionProps:{transition:"fade",duration:0},initiallyOpened:!1,filter:z0e,maxDropdownHeight:220,searchable:!1,clearable:!1,limit:1/0,disabled:!1,creatable:!1,shouldCreate:U0e,selectOnBlur:!1,switchDirectionOnFlip:!1,filterDataOnExactSearchMatch:!1,zIndex:Hs("popover"),positionDependencies:[],dropdownPosition:"flip"},I_=$.forwardRef((e,t)=>{const r=kF("Select",H0e,e),{inputProps:n,wrapperProps:o,shadow:i,data:a,value:s,defaultValue:l,onChange:c,itemComponent:u,onKeyDown:f,onBlur:d,onFocus:p,transitionProps:h,initiallyOpened:m,unstyled:_,classNames:w,styles:y,filter:C,maxDropdownHeight:I,searchable:F,clearable:O,nothingFound:g,limit:D,disabled:H,onSearchChange:G,searchValue:V,rightSection:P,rightSectionWidth:S,creatable:v,getCreateLabel:b,shouldCreate:B,selectOnBlur:M,onCreate:j,dropdownComponent:U,onDropdownClose:E,onDropdownOpen:N,withinPortal:T,portalProps:q,switchDirectionOnFlip:J,zIndex:te,name:ne,dropdownPosition:ce,allowDeselect:ie,placeholder:ue,filterDataOnExactSearchMatch:A,form:K,positionDependencies:ee,readOnly:se,clearButtonProps:pe,hoverOnSearchChange:ge}=r,X=L0e(r,["inputProps","wrapperProps","shadow","data","value","defaultValue","onChange","itemComponent","onKeyDown","onBlur","onFocus","transitionProps","initiallyOpened","unstyled","classNames","styles","filter","maxDropdownHeight","searchable","clearable","nothingFound","limit","disabled","onSearchChange","searchValue","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","selectOnBlur","onCreate","dropdownComponent","onDropdownClose","onDropdownOpen","withinPortal","portalProps","switchDirectionOnFlip","zIndex","name","dropdownPosition","allowDeselect","placeholder","filterDataOnExactSearchMatch","form","positionDependencies","readOnly","clearButtonProps","hoverOnSearchChange"]),{classes:R,cx:z,theme:Z}=N0e(),[Q,de]=$.useState(m),[we,Se]=$.useState(-1),Ee=$.useRef(),Ae=$.useRef({}),[Te,W]=$.useState("column"),x=Te==="column",{scrollIntoView:k,targetRef:Y,scrollableRef:re}=Xte({duration:0,offset:5,cancelable:!1,isList:!0}),fe=ie===void 0?O:ie,le=Be=>{if(Q!==Be){de(Be);const Ke=Be?N:E;typeof Ke=="function"&&Ke()}},xe=v&&typeof b=="function";let _e=null;const ke=a.map(Be=>typeof Be=="string"?{label:Be,value:Be}:Be),$e=aQ({data:ke}),[Ne,We,gt]=Ml({value:s,defaultValue:l,finalValue:null,onChange:c}),ft=$e.find(Be=>Be.value===Ne),[Ye,Je]=Ml({value:V,defaultValue:(ft==null?void 0:ft.label)||"",finalValue:void 0,onChange:G}),tt=Be=>{Je(Be),F&&typeof G=="function"&&G(Be)},ve=()=>{var Be;se||(We(null),gt||tt(""),(Be=Ee.current)==null||Be.focus())};$.useEffect(()=>{const Be=$e.find(Ke=>Ke.value===Ne);Be?tt(Be.label):(!xe||!Ne)&&tt("")},[Ne]),$.useEffect(()=>{ft&&(!F||!Q)&&tt(ft.label)},[ft==null?void 0:ft.label]);const oe=Be=>{if(!se)if(fe&&(ft==null?void 0:ft.value)===Be.value)We(null),le(!1);else{if(Be.creatable&&typeof j=="function"){const Ke=j(Be.value);typeof Ke<"u"&&Ke!==null&&We(typeof Ke=="string"?Ke:Ke.value)}else We(Be.value);gt||tt(Be.label),Se(-1),le(!1),Ee.current.focus()}},he=M0e({data:$e,searchable:F,limit:D,searchValue:Ye,filter:C,filterDataOnExactSearchMatch:A,value:Ne});xe&&B(Ye,he)&&(_e=b(Ye),he.push({label:Ye,value:Ye,creatable:!0}));const be=(Be,Ke,mt)=>{let ct=Be;for(;mt(ct);)if(ct=Ke(ct),!he[ct].disabled)return ct;return Be};Jo(()=>{Se(ge&&Ye?0:-1)},[Ye,ge]);const Ce=Ne?he.findIndex(Be=>Be.value===Ne):0,Oe=!se&&(he.length>0?Q:Q&&!!g),Ie=()=>{Se(Be=>{var Ke;const mt=be(Be,ct=>ct-1,ct=>ct>0);return Y.current=Ae.current[(Ke=he[mt])==null?void 0:Ke.value],Oe&&k({alignment:x?"start":"end"}),mt})},De=()=>{Se(Be=>{var Ke;const mt=be(Be,ct=>ct+1,ct=>ctwindow.setTimeout(()=>{var Be;Y.current=Ae.current[(Be=he[Ce])==null?void 0:Be.value],k({alignment:x?"end":"start"})},50);Jo(()=>{Oe&&je()},[Oe]);const Me=Be=>{switch(typeof f=="function"&&f(Be),Be.key){case"ArrowUp":{Be.preventDefault(),Q?x?Ie():De():(Se(Ce),le(!0),je());break}case"ArrowDown":{Be.preventDefault(),Q?x?De():Ie():(Se(Ce),le(!0),je());break}case"Home":{if(!F){Be.preventDefault(),Q||le(!0);const Ke=he.findIndex(mt=>!mt.disabled);Se(Ke),Oe&&k({alignment:x?"end":"start"})}break}case"End":{if(!F){Be.preventDefault(),Q||le(!0);const Ke=he.map(mt=>!!mt.disabled).lastIndexOf(!1);Se(Ke),Oe&&k({alignment:x?"end":"start"})}break}case"Escape":{Be.preventDefault(),le(!1),Se(-1);break}case" ":{F||(Be.preventDefault(),he[we]&&Q?oe(he[we]):(le(!0),Se(Ce),je()));break}case"Enter":F||Be.preventDefault(),he[we]&&Q&&(Be.preventDefault(),oe(he[we]))}},He=Be=>{typeof d=="function"&&d(Be);const Ke=$e.find(mt=>mt.value===Ne);M&&he[we]&&Q&&oe(he[we]),tt((Ke==null?void 0:Ke.label)||""),le(!1)},qe=Be=>{typeof p=="function"&&p(Be),F&&le(!0)},ze=Be=>{se||(tt(Be.currentTarget.value),O&&Be.currentTarget.value===""&&We(null),Se(-1),le(!0))},it=()=>{se||(le(!Q),Ne&&!Q&&Se(Ce))};return ae.createElement(Ci.Wrapper,O2($f({},o),{__staticSelector:"Select"}),ae.createElement(md,{opened:Oe,transitionProps:h,shadow:i,withinPortal:T,portalProps:q,__staticSelector:"Select",onDirectionChange:W,switchDirectionOnFlip:J,zIndex:te,dropdownPosition:ce,positionDependencies:[...ee,Ye],classNames:w,styles:y,unstyled:_,variant:n.variant},ae.createElement(md.Target,null,ae.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-owns":Oe?`${n.id}-items`:null,"aria-controls":n.id,"aria-expanded":Oe,onMouseLeave:()=>Se(-1),tabIndex:-1},ae.createElement("input",{type:"hidden",name:ne,value:Ne||"",form:K,disabled:H}),ae.createElement(Ci,$f(O2($f($f({autoComplete:"off",type:"search"},n),X),{ref:Vs(t,Ee),onKeyDown:Me,__staticSelector:"Select",value:Ye,placeholder:ue,onChange:ze,"aria-autocomplete":"list","aria-controls":Oe?`${n.id}-items`:null,"aria-activedescendant":we>=0?`${n.id}-${we}`:null,onMouseDown:it,onBlur:He,onFocus:qe,readOnly:!F||se,disabled:H,"data-mantine-stop-propagation":Oe,name:null,classNames:O2($f({},w),{input:z({[R.input]:!F},w==null?void 0:w.input)})}),Ohe({theme:Z,rightSection:P,rightSectionWidth:S,styles:y,size:n.size,shouldClear:O&&!!ft,onClear:ve,error:o.error,clearButtonProps:pe,disabled:H,readOnly:se}))))),ae.createElement(md.Dropdown,{component:U||i_,maxHeight:I,direction:Te,id:n.id,innerRef:re,__staticSelector:"Select",classNames:w,styles:y},ae.createElement(CN,{data:he,hovered:we,classNames:w,styles:y,isItemSelected:Be=>Be===Ne,uuid:n.id,__staticSelector:"Select",onItemHover:Se,onItemSelect:oe,itemsRefs:Ae,itemComponent:u,size:n.size,nothingFound:g,creatable:xe&&!!_e,createLabel:_e,"aria-label":o.label,unstyled:_,variant:n.variant}))))});I_.displayName="@mantine/core/Select";function Xj({value:e,min:t,max:r}){const n=(e-t)/(r-t)*100;return Math.min(Math.max(n,0),100)}function V0e({value:e,containerWidth:t,min:r,max:n,step:o,precision:i}){const s=(t?Math.min(Math.max(e,0),t)/t:e)*(n-r),l=(s!==0?Math.round(s/o)*o:0)+r,c=Math.max(l,r);return i!==void 0?Number(c.toFixed(i)):c}var W0e=Object.defineProperty,q0e=Object.defineProperties,G0e=Object.getOwnPropertyDescriptors,AP=Object.getOwnPropertySymbols,K0e=Object.prototype.hasOwnProperty,Y0e=Object.prototype.propertyIsEnumerable,kP=(e,t,r)=>t in e?W0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,X0e=(e,t)=>{for(var r in t||(t={}))K0e.call(t,r)&&kP(e,r,t[r]);if(AP)for(var r of AP(t))Y0e.call(t,r)&&kP(e,r,t[r]);return e},Z0e=(e,t)=>q0e(e,G0e(t));const tn={xs:me(4),sm:me(6),md:me(8),lg:me(10),xl:me(12)};var J0e=at(e=>({root:Z0e(X0e({},e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",outline:0,display:"flex",flexDirection:"column",alignItems:"center",touchAction:"none",position:"relative"})}));const Q0e=J0e;var e1e=Object.defineProperty,t1e=Object.defineProperties,r1e=Object.getOwnPropertyDescriptors,IP=Object.getOwnPropertySymbols,n1e=Object.prototype.hasOwnProperty,o1e=Object.prototype.propertyIsEnumerable,$P=(e,t,r)=>t in e?e1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,i1e=(e,t)=>{for(var r in t||(t={}))n1e.call(t,r)&&$P(e,r,t[r]);if(IP)for(var r of IP(t))o1e.call(t,r)&&$P(e,r,t[r]);return e},a1e=(e,t)=>t1e(e,r1e(t)),s1e=at((e,{color:t,disabled:r,thumbSize:n},{size:o})=>({label:{position:"absolute",top:me(-36),backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[9],fontSize:e.fontSizes.xs,color:e.white,padding:`calc(${e.spacing.xs} / 2)`,borderRadius:e.radius.sm,whiteSpace:"nowrap",pointerEvents:"none",userSelect:"none",touchAction:"none"},thumb:a1e(i1e({},e.fn.focusStyles()),{boxSizing:"border-box",position:"absolute",display:r?"none":"flex",height:n?me(n):`calc(${Re({sizes:tn,size:o})} * 2)`,width:n?me(n):`calc(${Re({sizes:tn,size:o})} * 2)`,backgroundColor:e.colorScheme==="dark"?e.fn.themeColor(t,e.fn.primaryShade()):e.white,border:`${me(4)} solid ${e.colorScheme==="dark"?e.white:e.fn.themeColor(t,e.fn.primaryShade())}`,color:e.colorScheme==="dark"?e.white:e.fn.themeColor(t,e.fn.primaryShade()),transform:"translate(-50%, -50%)",top:"50%",cursor:"pointer",borderRadius:1e3,alignItems:"center",justifyContent:"center",transitionDuration:"100ms",transitionProperty:"box-shadow, transform",transitionTimingFunction:e.transitionTimingFunction,zIndex:3,userSelect:"none",touchAction:"none"}),dragging:{transform:"translate(-50%, -50%) scale(1.05)",boxShadow:e.shadows.sm}}));const l1e=s1e,Zj=$.forwardRef(({max:e,min:t,value:r,position:n,label:o,dragging:i,onMouseDown:a,onKeyDownCapture:s,color:l,classNames:c,styles:u,size:f,labelTransition:d,labelTransitionDuration:p,labelTransitionTimingFunction:h,labelAlwaysOn:m,thumbLabel:_,onFocus:w,onBlur:y,showLabelOnHover:C,isHovered:I,children:F=null,disabled:O,unstyled:g,thumbSize:D,variant:H},G)=>{const{classes:V,cx:P,theme:S}=l1e({color:l,disabled:O,thumbSize:D},{name:"Slider",classNames:c,styles:u,unstyled:g,variant:H,size:f}),[v,b]=$.useState(!1),B=m||i||v||C&&I;return ae.createElement(rt,{tabIndex:0,role:"slider","aria-label":_,"aria-valuemax":e,"aria-valuemin":t,"aria-valuenow":r,ref:G,className:P(V.thumb,{[V.dragging]:i}),onFocus:()=>{b(!0),typeof w=="function"&&w()},onBlur:()=>{b(!1),typeof y=="function"&&y()},onTouchStart:a,onMouseDown:a,onKeyDownCapture:s,onClick:M=>M.stopPropagation(),style:{[S.dir==="rtl"?"right":"left"]:`${n}%`}},F,ae.createElement(Wl,{mounted:o!=null&&B,duration:p,transition:d,timingFunction:h||S.transitionTimingFunction},M=>ae.createElement("div",{style:M,className:V.label},o)))});Zj.displayName="@mantine/core/SliderThumb";function c1e({mark:e,offset:t,value:r,inverted:n=!1}){return n?typeof t=="number"&&e.value<=t||e.value>=r:typeof t=="number"?e.value>=t&&e.value<=r:e.value<=r}var u1e=at((e,{color:t,disabled:r,thumbSize:n},{size:o})=>({marksContainer:{position:"absolute",right:n?me(n/2):Re({sizes:tn,size:o}),left:n?me(n/2):Re({sizes:tn,size:o}),"&:has(~ input:disabled)":{"& .mantine-Slider-markFilled":{border:`${me(2)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,borderColor:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]}}},markWrapper:{position:"absolute",top:`calc(${me(Re({sizes:tn,size:o}))} / 2)`,zIndex:2,height:0},mark:{boxSizing:"border-box",border:`${me(2)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,height:Re({sizes:tn,size:o}),width:Re({sizes:tn,size:o}),borderRadius:1e3,transform:`translateX(calc(-${Re({sizes:tn,size:o})} / 2))`,backgroundColor:e.white,pointerEvents:"none"},markFilled:{borderColor:r?e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]:e.fn.variant({variant:"filled",color:t}).background},markLabel:{transform:`translate(-50%, calc(${e.spacing.xs} / 2))`,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],whiteSpace:"nowrap",cursor:"pointer",userSelect:"none"}}));const f1e=u1e;function Jj({marks:e,color:t,size:r,thumbSize:n,min:o,max:i,value:a,classNames:s,styles:l,offset:c,onChange:u,disabled:f,unstyled:d,inverted:p,variant:h}){const{classes:m,cx:_}=f1e({color:t,disabled:f,thumbSize:n},{name:"Slider",classNames:s,styles:l,unstyled:d,variant:h,size:r}),w=e.map((y,C)=>ae.createElement(rt,{className:m.markWrapper,sx:{left:`${Xj({value:y.value,min:o,max:i})}%`},key:C},ae.createElement("div",{className:_(m.mark,{[m.markFilled]:c1e({mark:y,value:a,offset:c,inverted:p})})}),y.label&&ae.createElement("div",{className:m.markLabel,onMouseDown:I=>{I.stopPropagation(),!f&&u(y.value)},onTouchStart:I=>{I.stopPropagation(),!f&&u(y.value)}},y.label)));return ae.createElement("div",{className:m.marksContainer},w)}Jj.displayName="@mantine/core/SliderMarks";var d1e=at((e,{radius:t,color:r,disabled:n,inverted:o,thumbSize:i},{size:a})=>({trackContainer:{display:"flex",alignItems:"center",width:"100%",height:`calc(${Re({sizes:tn,size:a})} * 2)`,cursor:"pointer","&:has(~ input:disabled)":{"&":{pointerEvents:"none"},"& .mantine-Slider-thumb":{display:"none"},"& .mantine-Slider-track::before":{content:'""',backgroundColor:o?e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]},"& .mantine-Slider-bar":{backgroundColor:o?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]}}},track:{position:"relative",height:Re({sizes:tn,size:a}),width:"100%",marginRight:i?me(i/2):Re({size:a,sizes:tn}),marginLeft:i?me(i/2):Re({size:a,sizes:tn}),"&::before":{content:'""',position:"absolute",top:0,bottom:0,borderRadius:e.fn.radius(t),right:`calc(${i?me(i/2):Re({size:a,sizes:tn})} * -1)`,left:`calc(${i?me(i/2):Re({size:a,sizes:tn})} * -1)`,backgroundColor:o?n?e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]:e.fn.variant({variant:"filled",color:r}).background:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],zIndex:0}},bar:{position:"absolute",zIndex:1,top:0,bottom:0,backgroundColor:o?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]:n?e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]:e.fn.variant({variant:"filled",color:r}).background,borderRadius:e.fn.radius(t)}}));const p1e=d1e;var h1e=Object.defineProperty,v1e=Object.defineProperties,g1e=Object.getOwnPropertyDescriptors,Og=Object.getOwnPropertySymbols,Qj=Object.prototype.hasOwnProperty,eL=Object.prototype.propertyIsEnumerable,TP=(e,t,r)=>t in e?h1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,DP=(e,t)=>{for(var r in t||(t={}))Qj.call(t,r)&&TP(e,r,t[r]);if(Og)for(var r of Og(t))eL.call(t,r)&&TP(e,r,t[r]);return e},m1e=(e,t)=>v1e(e,g1e(t)),y1e=(e,t)=>{var r={};for(var n in e)Qj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Og)for(var n of Og(e))t.indexOf(n)<0&&eL.call(e,n)&&(r[n]=e[n]);return r};function tL(e){var t=e,{filled:r,size:n,thumbSize:o,color:i,classNames:a,styles:s,radius:l,children:c,offset:u,disabled:f,marksOffset:d,unstyled:p,inverted:h,variant:m,containerProps:_}=t,w=y1e(t,["filled","size","thumbSize","color","classNames","styles","radius","children","offset","disabled","marksOffset","unstyled","inverted","variant","containerProps"]);const{classes:y}=p1e({color:i,radius:l,disabled:f,inverted:h,thumbSize:o},{name:"Slider",classNames:a,styles:s,unstyled:p,variant:m,size:n});return ae.createElement(ae.Fragment,null,ae.createElement("div",DP({className:y.trackContainer},_),ae.createElement("div",{className:y.track},ae.createElement(rt,{className:y.bar,sx:{left:`calc(${u}% - ${o?me(o/2):Re({size:n,sizes:tn})})`,width:`calc(${r}% + 2 * ${o?me(o/2):Re({size:n,sizes:tn})})`}}),c)),ae.createElement(Jj,m1e(DP({},w),{size:n,thumbSize:o,color:i,offset:d,classNames:a,styles:s,disabled:f,unstyled:p,inverted:h,variant:m})))}tL.displayName="@mantine/core/SliderTrack";var b1e=Object.defineProperty,w1e=Object.defineProperties,x1e=Object.getOwnPropertyDescriptors,Ag=Object.getOwnPropertySymbols,rL=Object.prototype.hasOwnProperty,nL=Object.prototype.propertyIsEnumerable,MP=(e,t,r)=>t in e?b1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_1e=(e,t)=>{for(var r in t||(t={}))rL.call(t,r)&&MP(e,r,t[r]);if(Ag)for(var r of Ag(t))nL.call(t,r)&&MP(e,r,t[r]);return e},E1e=(e,t)=>w1e(e,x1e(t)),S1e=(e,t)=>{var r={};for(var n in e)rL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ag)for(var n of Ag(e))t.indexOf(n)<0&&nL.call(e,n)&&(r[n]=e[n]);return r};const oL=$.forwardRef((e,t)=>{var r=e,{className:n,size:o,classNames:i,styles:a,disabled:s,unstyled:l,variant:c}=r,u=S1e(r,["className","size","classNames","styles","disabled","unstyled","variant"]);const{classes:f,cx:d}=Q0e(null,{name:"Slider",classNames:i,styles:a,unstyled:l,variant:c,size:o});return ae.createElement(rt,E1e(_1e({},u),{tabIndex:-1,className:d(f.root,n),ref:t}))});oL.displayName="@mantine/core/SliderRoot";function x0(e,t){return parseFloat(e.toFixed(t))}function C1e(e){if(!e)return 0;const t=e.toString().split(".");return t.length>1?t[1].length:0}var P1e=Object.defineProperty,O1e=Object.defineProperties,A1e=Object.getOwnPropertyDescriptors,kg=Object.getOwnPropertySymbols,iL=Object.prototype.hasOwnProperty,aL=Object.prototype.propertyIsEnumerable,RP=(e,t,r)=>t in e?P1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k1e=(e,t)=>{for(var r in t||(t={}))iL.call(t,r)&&RP(e,r,t[r]);if(kg)for(var r of kg(t))aL.call(t,r)&&RP(e,r,t[r]);return e},I1e=(e,t)=>O1e(e,A1e(t)),$1e=(e,t)=>{var r={};for(var n in e)iL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&kg)for(var n of kg(e))t.indexOf(n)<0&&aL.call(e,n)&&(r[n]=e[n]);return r};const T1e={size:"md",radius:"xl",min:0,max:100,step:1,marks:[],label:e=>e,labelTransition:"skew-down",labelTransitionDuration:0,labelAlwaysOn:!1,thumbLabel:"",showLabelOnHover:!0,disabled:!1,scale:e=>e},sL=$.forwardRef((e,t)=>{const r=et("Slider",T1e,e),{classNames:n,styles:o,color:i,value:a,onChange:s,onChangeEnd:l,size:c,radius:u,min:f,max:d,step:p,precision:h,defaultValue:m,name:_,marks:w,label:y,labelTransition:C,labelTransitionDuration:I,labelTransitionTimingFunction:F,labelAlwaysOn:O,thumbLabel:g,showLabelOnHover:D,thumbChildren:H,disabled:G,unstyled:V,thumbSize:P,scale:S,inverted:v,variant:b}=r,B=$1e(r,["classNames","styles","color","value","onChange","onChangeEnd","size","radius","min","max","step","precision","defaultValue","name","marks","label","labelTransition","labelTransitionDuration","labelTransitionTimingFunction","labelAlwaysOn","thumbLabel","showLabelOnHover","thumbChildren","disabled","unstyled","thumbSize","scale","inverted","variant"]),M=h??C1e(p),j=Lr(),[U,E]=$.useState(!1),[N,T]=Ml({value:typeof a=="number"?bs(a,f,d):a,defaultValue:typeof m=="number"?bs(m,f,d):m,finalValue:bs(0,f,d),onChange:s}),q=$.useRef(N),J=$.useRef(),te=$.useRef(),ne=Xj({value:N,min:f,max:d}),ce=S(N),ie=typeof y=="function"?y(ce):y,ue=$.useCallback(({x:se})=>{if(!G){const pe=V0e({value:se,min:f,max:d,step:p,precision:M});T(pe),q.current=pe}},[G,f,d,p,M,T]),{ref:A,active:K}=Wte(ue,{onScrubEnd:()=>l==null?void 0:l(q.current)},j.dir),ee=se=>{if(!G)switch(se.key){case"ArrowUp":{se.preventDefault(),te.current.focus();const pe=x0(Math.min(Math.max(N+p,f),d),M);l==null||l(pe),T(pe);break}case"ArrowRight":{se.preventDefault(),te.current.focus();const pe=x0(Math.min(Math.max(j.dir==="rtl"?N-p:N+p,f),d),M);l==null||l(pe),T(pe);break}case"ArrowDown":{se.preventDefault(),te.current.focus();const pe=x0(Math.min(Math.max(N-p,f),d),M);l==null||l(pe),T(pe);break}case"ArrowLeft":{se.preventDefault(),te.current.focus();const pe=x0(Math.min(Math.max(j.dir==="rtl"?N+p:N-p,f),d),M);l==null||l(pe),T(pe);break}case"Home":{se.preventDefault(),te.current.focus(),l==null||l(f),T(f);break}case"End":{se.preventDefault(),te.current.focus(),l==null||l(d),T(d);break}}};return ae.createElement(oL,I1e(k1e({},B),{ref:Vs(t,J),onKeyDownCapture:ee,onMouseDownCapture:()=>{var se;return(se=J.current)==null?void 0:se.focus()},size:c,classNames:n,styles:o,disabled:G,unstyled:V,variant:b}),ae.createElement(tL,{inverted:v,offset:0,filled:ne,marks:w,size:c,thumbSize:P,radius:u,color:i,min:f,max:d,value:ce,onChange:T,classNames:n,styles:o,disabled:G,unstyled:V,variant:b,containerProps:{ref:A,onMouseEnter:D?()=>E(!0):void 0,onMouseLeave:D?()=>E(!1):void 0}},ae.createElement(Zj,{max:d,min:f,value:ce,position:ne,dragging:K,color:i,size:c,label:ie,ref:te,labelTransition:C,labelTransitionDuration:I,labelTransitionTimingFunction:F,labelAlwaysOn:O,classNames:n,styles:o,thumbLabel:g,showLabelOnHover:D,isHovered:U,disabled:G,unstyled:V,thumbSize:P,variant:b},H)),ae.createElement("input",{type:"hidden",name:_,value:ce}))});sL.displayName="@mantine/core/Slider";var D1e=Object.defineProperty,Ig=Object.getOwnPropertySymbols,lL=Object.prototype.hasOwnProperty,cL=Object.prototype.propertyIsEnumerable,NP=(e,t,r)=>t in e?D1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M1e=(e,t)=>{for(var r in t||(t={}))lL.call(t,r)&&NP(e,r,t[r]);if(Ig)for(var r of Ig(t))cL.call(t,r)&&NP(e,r,t[r]);return e},R1e=(e,t)=>{var r={};for(var n in e)lL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ig)for(var n of Ig(e))t.indexOf(n)<0&&cL.call(e,n)&&(r[n]=e[n]);return r};const N1e={w:0,h:0},uL=$.forwardRef((e,t)=>{const r=et("Space",N1e,e),{w:n,h:o}=r,i=R1e(r,["w","h"]);return ae.createElement(rt,M1e({ref:t,w:n,miw:n,h:o,mih:o},i))});uL.displayName="@mantine/core/Space";var F1e=at((e,{spacing:t,align:r,justify:n})=>({root:{display:"flex",flexDirection:"column",alignItems:r,justifyContent:n,gap:Re({size:t,sizes:e.spacing})}}));const B1e=F1e;var j1e=Object.defineProperty,$g=Object.getOwnPropertySymbols,fL=Object.prototype.hasOwnProperty,dL=Object.prototype.propertyIsEnumerable,FP=(e,t,r)=>t in e?j1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L1e=(e,t)=>{for(var r in t||(t={}))fL.call(t,r)&&FP(e,r,t[r]);if($g)for(var r of $g(t))dL.call(t,r)&&FP(e,r,t[r]);return e},z1e=(e,t)=>{var r={};for(var n in e)fL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&$g)for(var n of $g(e))t.indexOf(n)<0&&dL.call(e,n)&&(r[n]=e[n]);return r};const U1e={spacing:"md",align:"stretch",justify:"flex-start"},my=$.forwardRef((e,t)=>{const r=et("Stack",U1e,e),{spacing:n,className:o,align:i,justify:a,unstyled:s,variant:l}=r,c=z1e(r,["spacing","className","align","justify","unstyled","variant"]),{classes:u,cx:f}=B1e({spacing:n,align:i,justify:a},{name:"Stack",unstyled:s,variant:l});return ae.createElement(rt,L1e({className:f(u.root,o),ref:t},c))});my.displayName="@mantine/core/Stack";var H1e=Object.defineProperty,V1e=Object.defineProperties,W1e=Object.getOwnPropertyDescriptors,BP=Object.getOwnPropertySymbols,q1e=Object.prototype.hasOwnProperty,G1e=Object.prototype.propertyIsEnumerable,jP=(e,t,r)=>t in e?H1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A2=(e,t)=>{for(var r in t||(t={}))q1e.call(t,r)&&jP(e,r,t[r]);if(BP)for(var r of BP(t))G1e.call(t,r)&&jP(e,r,t[r]);return e},K1e=(e,t)=>V1e(e,W1e(t));const pL={xs:me(34),sm:me(36),md:me(42),lg:me(48),xl:me(52)};var Y1e=at((e,{color:t,iconSize:r,radius:n,allowStepClick:o,iconPosition:i,orientation:a},{size:s})=>{const l=r?me(r):Re({size:s,sizes:pL}),c=s==="xl"||s==="lg"?e.spacing.md:e.spacing.sm,u=e.fn.radius(n),f=e.fn.variant({variant:"filled",color:t||e.primaryColor,primaryFallback:!1}),d=`calc(${e.spacing.xs} / 2)`,p={step:{justifyContent:"flex-start",minHeight:`calc(${l} + ${e.spacing.xl} + ${d})`,marginTop:d,overflow:"hidden","&:first-of-type":{marginTop:0},[`&:last-of-type .${zo("verticalSeparator")}`]:{display:"none"}}};return{stepLoader:{},step:A2({display:"flex",flexDirection:i==="left"?"row":"row-reverse",cursor:o?"pointer":"default"},a==="vertical"?p.step:{alignItems:"center"}),stepWrapper:{position:"relative"},verticalSeparator:{top:`calc(${l} + ${d})`,left:`calc(${l} / 2)`,height:"100vh",position:"absolute",borderLeft:`${me(2)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}`,ref:zo("verticalSeparator")},verticalSeparatorActive:{borderColor:e.fn.variant({variant:"filled",color:t}).background},stepIcon:{boxSizing:"border-box",height:l,width:l,minWidth:l,borderRadius:u,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],border:`${me(2)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}`,transition:"background-color 150ms ease, border-color 150ms ease",position:"relative",fontWeight:700,color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7],fontSize:Re({size:s,sizes:e.fontSizes}),"&[data-progress]":{borderColor:f.background},"&[data-completed]":{backgroundColor:f.background,borderColor:f.background,color:e.white}},stepCompletedIcon:K1e(A2({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",color:e.white}),stepBody:A2({display:"flex",flexDirection:"column",marginLeft:i==="left"?c:void 0,marginRight:i==="right"?c:void 0},a==="vertical"?{marginTop:`calc(${r} / 4)`}:null),stepLabel:{textAlign:i,fontWeight:500,fontSize:Re({size:s,sizes:e.fontSizes}),lineHeight:1},stepDescription:{textAlign:i,marginTop:`calc(${Re({size:s,sizes:e.spacing})} / 3)`,marginBottom:`calc(${Re({size:s,sizes:e.spacing})} / 3)`,fontSize:`calc(${Re({size:s,sizes:e.fontSizes})} - ${me(2)})`,lineHeight:1}}});const X1e=Y1e;var Z1e=Object.defineProperty,Tg=Object.getOwnPropertySymbols,hL=Object.prototype.hasOwnProperty,vL=Object.prototype.propertyIsEnumerable,LP=(e,t,r)=>t in e?Z1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k2=(e,t)=>{for(var r in t||(t={}))hL.call(t,r)&&LP(e,r,t[r]);if(Tg)for(var r of Tg(t))vL.call(t,r)&&LP(e,r,t[r]);return e},J1e=(e,t)=>{var r={};for(var n in e)hL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Tg)for(var n of Tg(e))t.indexOf(n)<0&&vL.call(e,n)&&(r[n]=e[n]);return r};const Q1e={xs:16,sm:18,md:20,lg:22,xl:24},eve={withIcon:!0,size:"md",radius:"xl",allowStepClick:!0,iconPosition:"left",__staticSelector:"Step"},_0=(e,t)=>typeof e=="function"?ae.createElement(e,{step:t}):e,gL=$.forwardRef((e,t)=>{const r=et("StepperStep",eve,e),{className:n,step:o,state:i,color:a,icon:s,completedIcon:l,progressIcon:c,label:u,description:f,withIcon:d,iconSize:p,size:h,radius:m,loading:_,allowStepClick:w,allowStepSelect:y,iconPosition:C,__staticSelector:I,classNames:F,styles:O,unstyled:g,orientation:D,variant:H}=r,G=J1e(r,["className","step","state","color","icon","completedIcon","progressIcon","label","description","withIcon","iconSize","size","radius","loading","allowStepClick","allowStepSelect","iconPosition","__staticSelector","classNames","styles","unstyled","orientation","variant"]),{classes:V,cx:P}=X1e({color:a,iconSize:p,radius:m,allowStepClick:w,iconPosition:C,orientation:D},{name:I,classNames:F,styles:O,unstyled:g,variant:H,size:h}),S=Re({size:h,sizes:Q1e}),v=i==="stepCompleted"?null:i==="stepProgress"?c:s,b={"data-progress":i==="stepProgress"||void 0,"data-completed":i==="stepCompleted"||void 0};return ae.createElement(Hp,k2(k2({className:P(V.step,n),tabIndex:w?0:-1,ref:t},b),G),d&&ae.createElement("div",{className:V.stepWrapper},ae.createElement("div",k2({className:V.stepIcon},b),ae.createElement(Wl,{mounted:i==="stepCompleted",transition:"pop",duration:200},B=>ae.createElement("div",{className:V.stepCompletedIcon,style:B},_?ae.createElement(uu,{color:"#fff",size:S,className:V.stepLoader}):_0(l,o)||ae.createElement(due,{indeterminate:!1,width:S,height:S}))),i!=="stepCompleted"?_?ae.createElement(uu,{size:S,color:a}):_0(v||s,o):null),D==="vertical"&&ae.createElement("div",{className:P(V.verticalSeparator,{[V.verticalSeparatorActive]:i==="stepCompleted"})})),(u||f)&&ae.createElement("div",{className:V.stepBody},u&&ae.createElement(St,{className:V.stepLabel},_0(u,o)),f&&ae.createElement(St,{className:V.stepDescription,color:"dimmed"},_0(f,o))))});gL.displayName="@mantine/core/Step";function Dg(e){return null}Dg.displayName="@mantine/core/StepCompleted";var tve=Object.defineProperty,rve=Object.defineProperties,nve=Object.getOwnPropertyDescriptors,zP=Object.getOwnPropertySymbols,ove=Object.prototype.hasOwnProperty,ive=Object.prototype.propertyIsEnumerable,UP=(e,t,r)=>t in e?tve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Tf=(e,t)=>{for(var r in t||(t={}))ove.call(t,r)&&UP(e,r,t[r]);if(zP)for(var r of zP(t))ive.call(t,r)&&UP(e,r,t[r]);return e},ave=(e,t)=>rve(e,nve(t)),sve=at((e,{contentPadding:t,color:r,orientation:n,iconPosition:o,iconSize:i,breakpoint:a},{size:s})=>{const l=typeof a<"u",c=xo(Re({size:a,sizes:e.breakpoints})),u=typeof i<"u"?`calc(${me(i)} / 2 - ${me(1)})`:`calc(${Re({size:s,sizes:pL})} / 2 - ${me(1)})`,f={steps:{flexDirection:"column",alignItems:o==="left"?"flex-start":"flex-end"},separator:{width:me(2),minHeight:e.spacing.xl,marginLeft:o==="left"?u:0,marginRight:o==="right"?u:0,marginTop:`calc(${e.spacing.xs} / 2)`,marginBottom:`calc(${e.spacing.xs} - ${me(2)})`}},d={steps:{[`@media (max-width: ${mn(c-1)})`]:f.steps},separator:{[`@media (max-width: ${mn(c-1)})`]:f.separator}};return{root:{},steps:Tf(Tf({display:"flex",boxSizing:"border-box",alignItems:"center"},n==="vertical"?f.steps:null),l?d.steps:null),separator:Tf(Tf({boxSizing:"border-box",transition:"background-color 150ms ease",flex:1,height:me(2),backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],marginLeft:e.spacing.md,marginRight:e.spacing.md},n==="vertical"?f.separator:null),l?d.separator:null),separatorActive:{backgroundColor:e.fn.variant({variant:"filled",color:r||e.primaryColor,primaryFallback:!1}).background},content:ave(Tf({},e.fn.fontStyles()),{paddingTop:Re({size:t,sizes:e.spacing})})}});const lve=sve;var cve=Object.defineProperty,Mg=Object.getOwnPropertySymbols,mL=Object.prototype.hasOwnProperty,yL=Object.prototype.propertyIsEnumerable,HP=(e,t,r)=>t in e?cve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uve=(e,t)=>{for(var r in t||(t={}))mL.call(t,r)&&HP(e,r,t[r]);if(Mg)for(var r of Mg(t))yL.call(t,r)&&HP(e,r,t[r]);return e},fve=(e,t)=>{var r={};for(var n in e)mL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Mg)for(var n of Mg(e))t.indexOf(n)<0&&yL.call(e,n)&&(r[n]=e[n]);return r};const dve={contentPadding:"md",size:"md",radius:"xl",orientation:"horizontal",iconPosition:"left",allowNextStepsSelect:!0},ts=$.forwardRef((e,t)=>{var r,n,o;const i=et("Stepper",dve,e),{className:a,children:s,onStepClick:l,active:c,icon:u,completedIcon:f,progressIcon:d,color:p,iconSize:h,contentPadding:m,size:_,radius:w,orientation:y,breakpoint:C,iconPosition:I,allowNextStepsSelect:F,classNames:O,styles:g,unstyled:D,variant:H}=i,G=fve(i,["className","children","onStepClick","active","icon","completedIcon","progressIcon","color","iconSize","contentPadding","size","radius","orientation","breakpoint","iconPosition","allowNextStepsSelect","classNames","styles","unstyled","variant"]),{classes:V,cx:P}=lve({contentPadding:m,color:p,orientation:y,iconPosition:I,iconSize:h,breakpoint:C},{name:"Stepper",classNames:O,styles:g,unstyled:D,variant:H,size:_}),S=$.Children.toArray(s),v=S.filter(E=>E.type!==Dg),b=S.find(E=>E.type===Dg),B=v.reduce((E,N,T)=>{const q=c===T?"stepProgress":c>T?"stepCompleted":"stepInactive",te=(()=>typeof l!="function"?!1:typeof N.props.allowStepSelect=="boolean"?N.props.allowStepSelect:q==="stepCompleted"||F)();return E.push($.cloneElement(N,{__staticSelector:"Stepper",icon:N.props.icon||u||T+1,key:T,step:T,variant:H,state:q,onClick:()=>te&&l(T),allowStepClick:te,completedIcon:N.props.completedIcon||f,progressIcon:N.props.progressIcon||d,color:N.props.color||p,iconSize:h,size:_,radius:w,classNames:O,styles:g,iconPosition:N.props.iconPosition||I,orientation:y,unstyled:D})),y==="horizontal"&&T!==v.length-1&&E.push(ae.createElement("div",{className:P(V.separator,{[V.separatorActive]:Tv.length-1?j:M;return ae.createElement(rt,uve({className:P(V.root,a),ref:t},G),ae.createElement("div",{className:V.steps},B),U&&ae.createElement("div",{className:V.content},U))});ts.Step=gL;ts.Completed=Dg;ts.displayName="@mantine/core/Stepper";var pve=Object.defineProperty,hve=Object.defineProperties,vve=Object.getOwnPropertyDescriptors,VP=Object.getOwnPropertySymbols,gve=Object.prototype.hasOwnProperty,mve=Object.prototype.propertyIsEnumerable,WP=(e,t,r)=>t in e?pve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yve=(e,t)=>{for(var r in t||(t={}))gve.call(t,r)&&WP(e,r,t[r]);if(VP)for(var r of VP(t))mve.call(t,r)&&WP(e,r,t[r]);return e},bve=(e,t)=>hve(e,vve(t)),wve=at((e,{captionSide:t,horizontalSpacing:r,verticalSpacing:n,fontSize:o,withBorder:i,withColumnBorders:a})=>{const s=`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:bve(yve({},e.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:t,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,border:i?s:void 0,"& > caption":{marginTop:t==="top"?0:e.spacing.xs,marginBottom:t==="bottom"?0:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& > thead > tr > th, & > tfoot > tr > th, & > tbody > tr > th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:Re({size:o,sizes:e.fontSizes}),padding:`${Re({size:n,sizes:e.spacing})} ${Re({size:r,sizes:e.spacing})}`},"& > thead > tr > th":{borderBottom:s},"& > tfoot > tr > th, & > tbody > tr > th":{borderTop:s},"& > tbody > tr > td":{padding:`${Re({size:n,sizes:e.spacing})} ${Re({size:r,sizes:e.spacing})}`,borderTop:s,fontSize:Re({size:o,sizes:e.fontSizes})},"& > tbody > tr:first-of-type > td, & > tbody > tr:first-of-type > th":{borderTop:"none"},"& > thead > tr > th, & > tbody > tr > td":{borderRight:a?s:"none","&:last-of-type":{borderRight:"none",borderLeft:a?s:"none"}},"& > tbody > tr > th":{borderRight:a?s:"none"},"&[data-striped] > tbody > tr:nth-of-type(odd)":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]},"&[data-hover] > tbody > tr":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})})}});const xve=wve;var _ve=Object.defineProperty,Eve=Object.defineProperties,Sve=Object.getOwnPropertyDescriptors,Rg=Object.getOwnPropertySymbols,bL=Object.prototype.hasOwnProperty,wL=Object.prototype.propertyIsEnumerable,qP=(e,t,r)=>t in e?_ve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Cve=(e,t)=>{for(var r in t||(t={}))bL.call(t,r)&&qP(e,r,t[r]);if(Rg)for(var r of Rg(t))wL.call(t,r)&&qP(e,r,t[r]);return e},Pve=(e,t)=>Eve(e,Sve(t)),Ove=(e,t)=>{var r={};for(var n in e)bL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Rg)for(var n of Rg(e))t.indexOf(n)<0&&wL.call(e,n)&&(r[n]=e[n]);return r};const Ave={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},xL=$.forwardRef((e,t)=>{const r=et("Table",Ave,e),{className:n,children:o,striped:i,highlightOnHover:a,captionSide:s,horizontalSpacing:l,verticalSpacing:c,fontSize:u,unstyled:f,withBorder:d,withColumnBorders:p,variant:h}=r,m=Ove(r,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders","variant"]),{classes:_,cx:w}=xve({captionSide:s,verticalSpacing:c,horizontalSpacing:l,fontSize:u,withBorder:d,withColumnBorders:p},{unstyled:f,name:"Table",variant:h});return ae.createElement(rt,Pve(Cve({},m),{component:"table",ref:t,className:w(_.root,n),"data-striped":i||void 0,"data-hover":a||void 0}),o)});xL.displayName="@mantine/core/Table";var kve=Object.defineProperty,Ive=Object.defineProperties,$ve=Object.getOwnPropertyDescriptors,GP=Object.getOwnPropertySymbols,Tve=Object.prototype.hasOwnProperty,Dve=Object.prototype.propertyIsEnumerable,KP=(e,t,r)=>t in e?kve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,YP=(e,t)=>{for(var r in t||(t={}))Tve.call(t,r)&&KP(e,r,t[r]);if(GP)for(var r of GP(t))Dve.call(t,r)&&KP(e,r,t[r]);return e},Mve=(e,t)=>Ive(e,$ve(t));const Rve={xs:me(16),sm:me(20),md:me(26),lg:me(32),xl:me(40)},Nve=["filled","light","gradient","outline","default"];function Fve({theme:e,variant:t,color:r,gradient:n}){if(!Nve.includes(t))return null;const o=e.fn.variant({variant:t,color:r||e.primaryColor,gradient:n,primaryFallback:!1});return{backgroundColor:o.background,color:o.color,backgroundImage:t==="gradient"?o.background:void 0,border:`${me(t==="gradient"?0:1)} solid ${o.border}`}}var Bve=at((e,{color:t,radius:r,gradient:n},{variant:o,size:i})=>{const a=Re({size:i,sizes:Rve});return{root:YP(Mve(YP({},e.fn.fontStyles()),{display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:a,height:a,minWidth:a,minHeight:a,borderRadius:e.fn.radius(r)}),Fve({theme:e,variant:o,gradient:n,color:t}))}});const jve=Bve;var Lve=Object.defineProperty,Ng=Object.getOwnPropertySymbols,_L=Object.prototype.hasOwnProperty,EL=Object.prototype.propertyIsEnumerable,XP=(e,t,r)=>t in e?Lve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zve=(e,t)=>{for(var r in t||(t={}))_L.call(t,r)&&XP(e,r,t[r]);if(Ng)for(var r of Ng(t))EL.call(t,r)&&XP(e,r,t[r]);return e},Uve=(e,t)=>{var r={};for(var n in e)_L.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ng)for(var n of Ng(e))t.indexOf(n)<0&&EL.call(e,n)&&(r[n]=e[n]);return r};const Hve={size:"md",variant:"filled"},$_=$.forwardRef((e,t)=>{const r=et("ThemeIcon",Hve,e),{className:n,size:o,radius:i,variant:a,color:s,children:l,gradient:c,unstyled:u}=r,f=Uve(r,["className","size","radius","variant","color","children","gradient","unstyled"]),{classes:d,cx:p}=jve({variant:a,radius:i,color:s,gradient:c},{name:"ThemeIcon",unstyled:u,variant:a,size:o});return ae.createElement(rt,zve({className:p(d.root,n),ref:t},f),l)});$_.displayName="@mantine/core/ThemeIcon";var Vve=Object.defineProperty,Wve=Object.defineProperties,qve=Object.getOwnPropertyDescriptors,ZP=Object.getOwnPropertySymbols,Gve=Object.prototype.hasOwnProperty,Kve=Object.prototype.propertyIsEnumerable,JP=(e,t,r)=>t in e?Vve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yve=(e,t)=>{for(var r in t||(t={}))Gve.call(t,r)&&JP(e,r,t[r]);if(ZP)for(var r of ZP(t))Kve.call(t,r)&&JP(e,r,t[r]);return e},Xve=(e,t)=>Wve(e,qve(t));function Zve(e,t,r){return typeof e<"u"?e in r.headings.sizes?r.headings.sizes[e].fontSize:me(e):r.headings.sizes[t].fontSize}function Jve(e,t,r){return typeof e<"u"&&e in r.headings.sizes?r.headings.sizes[e].lineHeight:r.headings.sizes[t].lineHeight}var Qve=at((e,{element:t,weight:r,inline:n},{size:o})=>({root:Xve(Yve({},e.fn.fontStyles()),{fontFamily:e.headings.fontFamily,fontWeight:r||e.headings.sizes[t].fontWeight||e.headings.fontWeight,fontSize:Zve(o,t,e),lineHeight:n?1:Jve(o,t,e),margin:0})}));const ege=Qve;var tge=Object.defineProperty,Fg=Object.getOwnPropertySymbols,SL=Object.prototype.hasOwnProperty,CL=Object.prototype.propertyIsEnumerable,QP=(e,t,r)=>t in e?tge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rge=(e,t)=>{for(var r in t||(t={}))SL.call(t,r)&&QP(e,r,t[r]);if(Fg)for(var r of Fg(t))CL.call(t,r)&&QP(e,r,t[r]);return e},nge=(e,t)=>{var r={};for(var n in e)SL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Fg)for(var n of Fg(e))t.indexOf(n)<0&&CL.call(e,n)&&(r[n]=e[n]);return r};const oge={order:1},T_=$.forwardRef((e,t)=>{const r=et("Title",oge,e),{className:n,order:o,children:i,unstyled:a,size:s,weight:l,inline:c,variant:u}=r,f=nge(r,["className","order","children","unstyled","size","weight","inline","variant"]),{classes:d,cx:p}=ege({element:`h${o}`,weight:l,inline:c},{name:"Title",unstyled:a,variant:u,size:s});return[1,2,3,4,5,6].includes(o)?ae.createElement(St,rge({variant:u,component:`h${o}`,ref:t,className:p(d.root,n)},f),i):null});T_.displayName="@mantine/core/Title";/** + * @remix-run/router v1.7.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function cp(){return cp=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function yy(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function age(){return Math.random().toString(36).substr(2,8)}function tO(e,t){return{usr:e.state,key:e.key,idx:t}}function p3(e,t,r,n){return r===void 0&&(r=null),cp({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Gl(t):t,{state:r,key:t&&t.key||n||age()})}function Bg(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Gl(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function sge(e,t,r,n){n===void 0&&(n={});let{window:o=document.defaultView,v5Compat:i=!1}=n,a=o.history,s=is.Pop,l=null,c=u();c==null&&(c=0,a.replaceState(cp({},a.state,{idx:c}),""));function u(){return(a.state||{idx:null}).idx}function f(){s=is.Pop;let _=u(),w=_==null?null:_-c;c=_,l&&l({action:s,location:m.location,delta:w})}function d(_,w){s=is.Push;let y=p3(m.location,_,w);r&&r(y,_),c=u()+1;let C=tO(y,c),I=m.createHref(y);try{a.pushState(C,"",I)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;o.location.assign(I)}i&&l&&l({action:s,location:m.location,delta:1})}function p(_,w){s=is.Replace;let y=p3(m.location,_,w);r&&r(y,_),c=u();let C=tO(y,c),I=m.createHref(y);a.replaceState(C,"",I),i&&l&&l({action:s,location:m.location,delta:0})}function h(_){let w=o.location.origin!=="null"?o.location.origin:o.location.href,y=typeof _=="string"?_:Bg(_);return fr(w,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,w)}let m={get action(){return s},get location(){return e(o,a)},listen(_){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(eO,f),l=_,()=>{o.removeEventListener(eO,f),l=null}},createHref(_){return t(o,_)},createURL:h,encodeLocation(_){let w=h(_);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:d,replace:p,go(_){return a.go(_)}};return m}var rO;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(rO||(rO={}));function lge(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?Gl(t):t,o=D_(n.pathname||"/",r);if(o==null)return null;let i=PL(e);cge(i);let a=null;for(let s=0;a==null&&s{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};l.relativePath.startsWith("/")&&(fr(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=Es([n,l.relativePath]),u=r.concat(l);i.children&&i.children.length>0&&(fr(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),PL(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:gge(c,i.index),routesMeta:u})};return e.forEach((i,a)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,a);else for(let l of OL(i.path))o(i,a,l)}),t}function OL(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return o?[i,""]:[i];let a=OL(n.join("/")),s=[];return s.push(...a.map(l=>l===""?i:[i,l].join("/"))),o&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function cge(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:mge(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const uge=/^:\w+$/,fge=3,dge=2,pge=1,hge=10,vge=-2,nO=e=>e==="*";function gge(e,t){let r=e.split("/"),n=r.length;return r.some(nO)&&(n+=vge),t&&(n+=dge),r.filter(o=>!nO(o)).reduce((o,i)=>o+(uge.test(i)?fge:i===""?pge:hge),n)}function mge(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function yge(e,t){let{routesMeta:r}=e,n={},o="/",i=[];for(let a=0;a{if(u==="*"){let d=s[f]||"";a=i.slice(0,i.length-d.length).replace(/(.)\/+$/,"$1")}return c[u]=_ge(s[f]||"",u),c},{}),pathname:i,pathnameBase:a,pattern:e}}function wge(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),yy(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(a,s)=>(n.push(s),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function xge(e){try{return decodeURI(e)}catch(t){return yy(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function _ge(e,t){try{return decodeURIComponent(e)}catch(r){return yy(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function D_(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Ege(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?Gl(e):e;return{pathname:r?r.startsWith("/")?r:Sge(r,t):t,search:Pge(n),hash:Oge(o)}}function Sge(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function I2(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function AL(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function kL(e,t,r,n){n===void 0&&(n=!1);let o;typeof e=="string"?o=Gl(e):(o=cp({},e),fr(!o.pathname||!o.pathname.includes("?"),I2("?","pathname","search",o)),fr(!o.pathname||!o.pathname.includes("#"),I2("#","pathname","hash",o)),fr(!o.search||!o.search.includes("#"),I2("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(n||a==null)s=r;else{let f=t.length-1;if(a.startsWith("..")){let d=a.split("/");for(;d[0]==="..";)d.shift(),f-=1;o.pathname=d.join("/")}s=f>=0?t[f]:"/"}let l=Ege(o,s),c=a&&a!=="/"&&a.endsWith("/"),u=(i||a===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Es=e=>e.join("/").replace(/\/\/+/g,"/"),Cge=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Pge=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Oge=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Age(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const IL=["post","put","patch","delete"];new Set(IL);const kge=["get",...IL];new Set(kge);/** + * React Router v6.14.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function jg(){return jg=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),a=$.useRef(!1);return TL(()=>{a.current=!0}),$.useCallback(function(l,c){if(c===void 0&&(c={}),!a.current)return;if(typeof l=="number"){r.go(l);return}let u=kL(l,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:Es([t,u.pathname])),(c.replace?r.replace:r.push)(u,c.state,c)},[t,r,i,o,e])}function DL(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=$.useContext(Kl),{pathname:o}=Uu(),i=JSON.stringify(AL(n).map(a=>a.pathnameBase));return $.useMemo(()=>kL(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function Dge(e,t){return Mge(e,t)}function Mge(e,t,r){Xp()||fr(!1);let{navigator:n}=$.useContext(zu),{matches:o}=$.useContext(Kl),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let s=i?i.pathnameBase:"/";i&&i.route;let l=Uu(),c;if(t){var u;let m=typeof t=="string"?Gl(t):t;s==="/"||(u=m.pathname)!=null&&u.startsWith(s)||fr(!1),c=m}else c=l;let f=c.pathname||"/",d=s==="/"?f:f.slice(s.length)||"/",p=lge(e,{pathname:d}),h=jge(p&&p.map(m=>Object.assign({},m,{params:Object.assign({},a,m.params),pathname:Es([s,n.encodeLocation?n.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?s:Es([s,n.encodeLocation?n.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),o,r);return t&&h?$.createElement(by.Provider,{value:{location:jg({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:is.Pop}},h):h}function Rge(){let e=Hge(),t=Age(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return $.createElement($.Fragment,null,$.createElement("h2",null,"Unexpected Application Error!"),$.createElement("h3",{style:{fontStyle:"italic"}},t),r?$.createElement("pre",{style:o},r):null,i)}const Nge=$.createElement(Rge,null);class Fge extends $.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?$.createElement(Kl.Provider,{value:this.props.routeContext},$.createElement($L.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Bge(e){let{routeContext:t,match:r,children:n}=e,o=$.useContext(M_);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),$.createElement(Kl.Provider,{value:t},n)}function jge(e,t,r){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let i=e,a=(n=r)==null?void 0:n.errors;if(a!=null){let s=i.findIndex(l=>l.route.id&&(a==null?void 0:a[l.route.id]));s>=0||fr(!1),i=i.slice(0,Math.min(i.length,s+1))}return i.reduceRight((s,l,c)=>{let u=l.route.id?a==null?void 0:a[l.route.id]:null,f=null;r&&(f=l.route.errorElement||Nge);let d=t.concat(i.slice(0,c+1)),p=()=>{let h;return u?h=f:l.route.Component?h=$.createElement(l.route.Component,null):l.route.element?h=l.route.element:h=s,$.createElement(Bge,{match:l,routeContext:{outlet:s,matches:d,isDataRoute:r!=null},children:h})};return r&&(l.route.ErrorBoundary||l.route.errorElement||c===0)?$.createElement(Fge,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:p(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):p()},null)}var h3;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(h3||(h3={}));var up;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(up||(up={}));function Lge(e){let t=$.useContext(M_);return t||fr(!1),t}function zge(e){let t=$.useContext(Ige);return t||fr(!1),t}function Uge(e){let t=$.useContext(Kl);return t||fr(!1),t}function ML(e){let t=Uge(),r=t.matches[t.matches.length-1];return r.route.id||fr(!1),r.route.id}function Hge(){var e;let t=$.useContext($L),r=zge(up.UseRouteError),n=ML(up.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function Vge(){let{router:e}=Lge(h3.UseNavigateStable),t=ML(up.UseNavigateStable),r=$.useRef(!1);return TL(()=>{r.current=!0}),$.useCallback(function(o,i){i===void 0&&(i={}),r.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,jg({fromRouteId:t},i)))},[e,t])}function pr(e){fr(!1)}function Wge(e){let{basename:t="/",children:r=null,location:n,navigationType:o=is.Pop,navigator:i,static:a=!1}=e;Xp()&&fr(!1);let s=t.replace(/^\/*/,"/"),l=$.useMemo(()=>({basename:s,navigator:i,static:a}),[s,i,a]);typeof n=="string"&&(n=Gl(n));let{pathname:c="/",search:u="",hash:f="",state:d=null,key:p="default"}=n,h=$.useMemo(()=>{let m=D_(c,s);return m==null?null:{location:{pathname:m,search:u,hash:f,state:d,key:p},navigationType:o}},[s,c,u,f,d,p,o]);return h==null?null:$.createElement(zu.Provider,{value:l},$.createElement(by.Provider,{children:r,value:h}))}function qge(e){let{children:t,location:r}=e;return Dge(v3(t),r)}var oO;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(oO||(oO={}));new Promise(()=>{});function v3(e,t){t===void 0&&(t=[]);let r=[];return $.Children.forEach(e,(n,o)=>{if(!$.isValidElement(n))return;let i=[...t,o];if(n.type===$.Fragment){r.push.apply(r,v3(n.props.children,i));return}n.type!==pr&&fr(!1),!n.props.index||!n.props.children||fr(!1);let a={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=v3(n.props.children,i)),r.push(a)}),r}/** + * React Router DOM v6.14.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function g3(){return g3=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[o]=e[o]);return r}function Kge(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Yge(e,t){return e.button===0&&(!t||t==="_self")&&!Kge(e)}const Xge=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],Zge="startTransition",iO=Ld[Zge];function Jge(e){let{basename:t,children:r,future:n,window:o}=e,i=$.useRef();i.current==null&&(i.current=ige({window:o,v5Compat:!0}));let a=i.current,[s,l]=$.useState({action:a.action,location:a.location}),{v7_startTransition:c}=n||{},u=$.useCallback(f=>{c&&iO?iO(()=>l(f)):l(f)},[l,c]);return $.useLayoutEffect(()=>a.listen(u),[a,u]),$.createElement(Wge,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:a})}const Qge=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",eme=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,RL=$.forwardRef(function(t,r){let{onClick:n,relative:o,reloadDocument:i,replace:a,state:s,target:l,to:c,preventScrollReset:u}=t,f=Gge(t,Xge),{basename:d}=$.useContext(zu),p,h=!1;if(typeof c=="string"&&eme.test(c)&&(p=c,Qge))try{let y=new URL(window.location.href),C=c.startsWith("//")?new URL(y.protocol+c):new URL(c),I=D_(C.pathname,d);C.origin===y.origin&&I!=null?c=I+C.search+C.hash:h=!0}catch{}let m=$ge(c,{relative:o}),_=tme(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:o});function w(y){n&&n(y),y.defaultPrevented||_(y)}return $.createElement("a",g3({},f,{href:p||m,onClick:h||i?n:w,ref:r,target:l}))});var aO;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(aO||(aO={}));var sO;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(sO||(sO={}));function tme(e,t){let{target:r,replace:n,state:o,preventScrollReset:i,relative:a}=t===void 0?{}:t,s=Zp(),l=Uu(),c=DL(e,{relative:a});return $.useCallback(u=>{if(Yge(u,r)){u.preventDefault();let f=n!==void 0?n:Bg(l)===Bg(c);s(e,{replace:f,state:o,preventScrollReset:i,relative:a})}},[l,s,c,n,o,r,e,i,a])}var NL={exports:{}},rme="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",nme=rme,ome=nme;function FL(){}function BL(){}BL.resetWarningCache=FL;var ime=function(){function e(n,o,i,a,s,l){if(l!==ome){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:BL,resetWarningCache:FL};return r.PropTypes=r,r};NL.exports=ime();var ame=NL.exports;const rl=ri(ame);var sme={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"},lme=Object.defineProperty,cme=Object.defineProperties,ume=Object.getOwnPropertyDescriptors,Lg=Object.getOwnPropertySymbols,jL=Object.prototype.hasOwnProperty,LL=Object.prototype.propertyIsEnumerable,lO=(e,t,r)=>t in e?lme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cO=(e,t)=>{for(var r in t||(t={}))jL.call(t,r)&&lO(e,r,t[r]);if(Lg)for(var r of Lg(t))LL.call(t,r)&&lO(e,r,t[r]);return e},fme=(e,t)=>cme(e,ume(t)),dme=(e,t)=>{var r={};for(var n in e)jL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Lg)for(var n of Lg(e))t.indexOf(n)<0&&LL.call(e,n)&&(r[n]=e[n]);return r},Mn=(e,t,r)=>{const n=$.forwardRef((o,i)=>{var a=o,{color:s="currentColor",size:l=24,stroke:c=2,children:u}=a,f=dme(a,["color","size","stroke","children"]);return $.createElement("svg",cO(fme(cO({ref:i},sme),{width:l,height:l,stroke:s,strokeWidth:c,className:`tabler-icon tabler-icon-${e}`}),f),[...r.map(([d,p])=>$.createElement(d,p)),...u||[]])});return n.propTypes={color:rl.string,size:rl.oneOfType([rl.string,rl.number]),stroke:rl.oneOfType([rl.string,rl.number])},n.displayName=`${t}`,n},pme=Mn("alert-circle","IconAlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]),hme=Mn("at","IconAt",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M16 12v1.5a2.5 2.5 0 0 0 5 0v-1.5a9 9 0 1 0 -5.5 8.28",key:"svg-1"}]]),vme=Mn("calendar-stats","IconCalendarStats",[["path",{d:"M11.795 21h-6.795a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4",key:"svg-0"}],["path",{d:"M18 14v4h4",key:"svg-1"}],["path",{d:"M18 18m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-2"}],["path",{d:"M15 3v4",key:"svg-3"}],["path",{d:"M7 3v4",key:"svg-4"}],["path",{d:"M3 11h16",key:"svg-5"}]]),gme=Mn("check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]),mme=Mn("chevron-left","IconChevronLeft",[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]]),yme=Mn("chevron-right","IconChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]]),bme=Mn("file-analytics","IconFileAnalytics",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 17l0 -5",key:"svg-2"}],["path",{d:"M12 17l0 -1",key:"svg-3"}],["path",{d:"M15 17l0 -3",key:"svg-4"}]]),wme=Mn("gauge","IconGauge",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M13.41 10.59l2.59 -2.59",key:"svg-2"}],["path",{d:"M7 12a5 5 0 0 1 5 -5",key:"svg-3"}]]),xme=Mn("grip-vertical","IconGripVertical",[["path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]]),_me=Mn("moon-stars","IconMoonStars",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}],["path",{d:"M17 4a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2",key:"svg-1"}],["path",{d:"M19 11h2m-1 -1v2",key:"svg-2"}]]),Eme=Mn("notes","IconNotes",[["path",{d:"M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M9 7l6 0",key:"svg-1"}],["path",{d:"M9 11l6 0",key:"svg-2"}],["path",{d:"M9 15l4 0",key:"svg-3"}]]),Sme=Mn("presentation-analytics","IconPresentationAnalytics",[["path",{d:"M9 12v-4",key:"svg-0"}],["path",{d:"M15 12v-2",key:"svg-1"}],["path",{d:"M12 12v-1",key:"svg-2"}],["path",{d:"M3 4h18",key:"svg-3"}],["path",{d:"M4 4v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-10",key:"svg-4"}],["path",{d:"M12 16v4",key:"svg-5"}],["path",{d:"M9 20h6",key:"svg-6"}]]),Cme=Mn("square-rounded-minus","IconSquareRoundedMinus",[["path",{d:"M9 12h6",key:"svg-0"}],["path",{d:"M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z",key:"svg-1"}]]),Pme=Mn("sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]);const Ome=at(e=>({control:{fontWeight:500,display:"block",width:"100%",padding:`${e.spacing.xs} ${e.spacing.md}`,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,fontSize:e.fontSizes.sm,"&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[0],color:e.colorScheme==="dark"?e.white:e.black}},link:{fontWeight:500,display:"block",textDecoration:"none",padding:`${e.spacing.xs} ${e.spacing.md}`,paddingLeft:me(31),marginLeft:me(30),fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],borderLeft:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,"&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[0],color:e.colorScheme==="dark"?e.white:e.black}},linkActive:{"&, &:hover":{backgroundColor:e.fn.variant({variant:"light",color:e.primaryColor}).background,color:e.fn.variant({variant:"light",color:e.primaryColor}).color,[`& .${zo("icon")}`]:{color:e.fn.variant({variant:"light",color:e.primaryColor}).color}}},chevron:{transition:"transform 200ms ease"}}));function Ame({icon:e,label:t,initiallyOpened:r,links:n,groupLink:o,active:i,setActive:a}){const{classes:s,theme:l,cx:c}=Ome(),u=Zp(),f=Array.isArray(n),[d,p]=$.useState(r??!0),h=l.dir==="ltr"?yme:mme,m=(f?n:[]).map(_=>L.jsx(St,{component:RL,className:c(s.link,{[s.linkActive]:_.link===i}),to:_.link,ta:"left",onClick:()=>a(_.link),children:_.label},_.label));return L.jsxs(L.Fragment,{children:[L.jsx(Hp,{onClick:()=>{p(_=>!_),f||a(o??""),o&&u(o)},className:c(s.control,{[s.linkActive]:!f&&o===i}),children:L.jsxs(Kt,{position:"apart",spacing:0,children:[L.jsxs(rt,{sx:{display:"flex",alignItems:"center"},children:[L.jsx($_,{variant:"light",size:30,children:L.jsx(e,{size:"1.1rem"})}),L.jsx(rt,{ml:"md",children:t})]}),f&&L.jsx(h,{className:s.chevron,size:"1rem",stroke:1.5,style:{transform:d?`rotate(${l.dir==="rtl"?-90:90}deg)`:"none"}})]})}),f?L.jsx(kR,{in:d,children:m}):null]})}const kme=[{label:"Wallet Info",icon:wme,groupLink:"/"},{label:"Fungible Tokens",icon:Eme,initiallyOpened:!1,links:[{label:"Token info",link:"/token/info"},{label:"Issue new tokens",link:"/token/new"},{label:"Burn tokens",link:"/token/burn"}]},{label:"NFT",icon:vme,initiallyOpened:!1,links:[{label:"NFT info",link:"/nft/info"},{label:"Create new collection",link:"/nft/new-collection"},{label:"Burn NFTs",link:"/nft/burn"}]},{label:"Contracts",icon:bme,initiallyOpened:!1,links:[{label:"Playground",link:"/contract/play"},{label:"Contract info",link:"/contract/info"},{label:"Deploy Contract",link:"/contract/deploy"}]},{label:"Multisig",icon:Sme,initiallyOpened:!0,links:[{label:"Create Multisig",link:"/multisig/create"},{label:"Import Multisig",link:"/multisig/import"},{label:"Show Multisig",link:"/multisig/show"},{label:"Build Transaction",link:"/multisig/build-tx"},{label:"Sign Transaction",link:"/multisig/sign-tx"}]}],Ime=at(e=>({navbar:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,paddingBottom:0},header:{padding:e.spacing.md,paddingTop:0,marginLeft:`calc(${e.spacing.md} * -1)`,marginRight:`calc(${e.spacing.md} * -1)`,color:e.colorScheme==="dark"?e.white:e.black,borderBottom:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`},links:{marginLeft:`calc(${e.spacing.md} * -1)`,marginRight:`calc(${e.spacing.md} * -1)`},linksInner:{paddingTop:e.spacing.xl,paddingBottom:e.spacing.xl},footer:{marginLeft:`calc(${e.spacing.md} * -1)`,marginRight:`calc(${e.spacing.md} * -1)`,borderTop:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}}));function $me(){const{classes:e}=Ime(),t=Uu(),[r,n]=$.useState(t.pathname);$.useEffect(()=>{n(t.pathname)},[t.pathname]);const o=kme.map(i=>$.createElement(Ame,{...i,key:i.label,active:r,setActive:n}));return L.jsx(mv,{width:{sm:300},p:"md",className:e.navbar,children:L.jsx(mv.Section,{grow:!0,className:e.links,component:qN,children:L.jsx("div",{className:e.linksInner,children:o})})})}function Tme(){const{colorScheme:e,toggleColorScheme:t}=ste(),r=e==="dark";return L.jsx(sv,{variant:"outline",color:r?"yellow":"blue",onClick:()=>t(),title:"Toggle color scheme",children:r?L.jsx(Pme,{size:"1.1rem"}):L.jsx(_me,{size:"1.1rem"})})}var m3=function(e,t){return m3=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},m3(e,t)};function zL(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");m3(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Ve=function(){return Ve=Object.assign||function(t){for(var r,n=1,o=arguments.length;n=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ir(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function qo(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n"u"||process.env===void 0?Mme:"production",Yi=function(e){return{isEnabled:function(t){return e.some(function(r){return!!t[r]})}}},fp={measureLayout:Yi(["layout","layoutId","drag"]),animation:Yi(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Yi(["exit"]),drag:Yi(["drag","dragControls"]),focus:Yi(["whileFocus"]),hover:Yi(["whileHover","onHoverStart","onHoverEnd"]),tap:Yi(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Yi(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Yi(["whileInView","onViewportEnter","onViewportLeave"])};function Rme(e){for(var t in e)e[t]!==null&&(t==="projectionNodeConstructor"?fp.projectionNodeConstructor=e[t]:fp[t].Component=e[t])}var Nme=function(){},zg=function(){},UL=$.createContext({strict:!1}),HL=Object.keys(fp),Fme=HL.length;function Bme(e,t,r){var n=[],o=$.useContext(UL);if(!t)return null;R_!=="production"&&r&&o.strict;for(var i=0;i"u")return t;var r=new Map;return new Proxy(t,{get:function(n,o){return r.has(o)||r.set(o,t(o)),r.get(o)}})}var rye=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function B_(e){return typeof e!="string"||e.includes("-")?!1:!!(rye.indexOf(e)>-1||/[A-Z]/.test(e))}var Hg={};function nye(e){Object.assign(Hg,e)}var b3=["","X","Y","Z"],oye=["translate","scale","rotate","skew"],dp=["transformPerspective","x","y","z"];oye.forEach(function(e){return b3.forEach(function(t){return dp.push(e+t)})});function iye(e,t){return dp.indexOf(e)-dp.indexOf(t)}var aye=new Set(dp);function eh(e){return aye.has(e)}var sye=new Set(["originX","originY","originZ"]);function YL(e){return sye.has(e)}function XL(e,t){var r=t.layout,n=t.layoutId;return eh(e)||YL(e)||(r||n!==void 0)&&(!!Hg[e]||e==="opacity")}var wa=function(e){return!!(e!==null&&typeof e=="object"&&e.getVelocity)},lye={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function cye(e,t,r,n){var o=e.transform,i=e.transformKeys,a=t.enableHardwareAcceleration,s=a===void 0?!0:a,l=t.allowTransformNone,c=l===void 0?!0:l,u="";i.sort(iye);for(var f=!1,d=i.length,p=0;pr=>Math.max(Math.min(r,t),e),bd=e=>e%1?Number(e.toFixed(5)):e,pp=/(-)?([\d]*\.?[\d])+/g,w3=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,dye=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function th(e){return typeof e=="string"}const Yl={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},wd=Object.assign(Object.assign({},Yl),{transform:JL(0,1)}),E0=Object.assign(Object.assign({},Yl),{default:1}),rh=e=>({test:t=>th(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Wa=rh("deg"),Pi=rh("%"),dt=rh("px"),pye=rh("vh"),hye=rh("vw"),fO=Object.assign(Object.assign({},Pi),{parse:e=>Pi.parse(e)/100,transform:e=>Pi.transform(e*100)}),j_=(e,t)=>r=>!!(th(r)&&dye.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),QL=(e,t,r)=>n=>{if(!th(n))return n;const[o,i,a,s]=n.match(pp);return{[e]:parseFloat(o),[t]:parseFloat(i),[r]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},_l={test:j_("hsl","hue"),parse:QL("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Pi.transform(bd(t))+", "+Pi.transform(bd(r))+", "+bd(wd.transform(n))+")"},vye=JL(0,255),$2=Object.assign(Object.assign({},Yl),{transform:e=>Math.round(vye(e))}),as={test:j_("rgb","red"),parse:QL("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+$2.transform(e)+", "+$2.transform(t)+", "+$2.transform(r)+", "+bd(wd.transform(n))+")"};function gye(e){let t="",r="",n="",o="";return e.length>5?(t=e.substr(1,2),r=e.substr(3,2),n=e.substr(5,2),o=e.substr(7,2)):(t=e.substr(1,1),r=e.substr(2,1),n=e.substr(3,1),o=e.substr(4,1),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}const x3={test:j_("#"),parse:gye,transform:as.transform},dn={test:e=>as.test(e)||x3.test(e)||_l.test(e),parse:e=>as.test(e)?as.parse(e):_l.test(e)?_l.parse(e):x3.parse(e),transform:e=>th(e)?e:e.hasOwnProperty("red")?as.transform(e):_l.transform(e)},ez="${c}",tz="${n}";function mye(e){var t,r,n,o;return isNaN(e)&&th(e)&&((r=(t=e.match(pp))===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)+((o=(n=e.match(w3))===null||n===void 0?void 0:n.length)!==null&&o!==void 0?o:0)>0}function rz(e){typeof e=="number"&&(e=`${e}`);const t=[];let r=0;const n=e.match(w3);n&&(r=n.length,e=e.replace(w3,ez),t.push(...n.map(dn.parse)));const o=e.match(pp);return o&&(e=e.replace(pp,tz),t.push(...o.map(Yl.parse))),{values:t,numColors:r,tokenised:e}}function nz(e){return rz(e).values}function oz(e){const{values:t,numColors:r,tokenised:n}=rz(e),o=t.length;return i=>{let a=n;for(let s=0;stypeof e=="number"?0:e;function bye(e){const t=nz(e);return oz(e)(t.map(yye))}const xa={test:mye,parse:nz,createTransformer:oz,getAnimatableNone:bye},wye=new Set(["brightness","contrast","saturate","opacity"]);function xye(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(pp)||[];if(!n)return e;const o=r.replace(n,"");let i=wye.has(t)?1:0;return n!==r&&(i*=100),t+"("+i+o+")"}const _ye=/([a-z-]*)\(.*?\)/g,_3=Object.assign(Object.assign({},xa),{getAnimatableNone:e=>{const t=e.match(_ye);return t?t.map(xye).join(" "):e}});var dO=Ve(Ve({},Yl),{transform:Math.round}),iz={borderWidth:dt,borderTopWidth:dt,borderRightWidth:dt,borderBottomWidth:dt,borderLeftWidth:dt,borderRadius:dt,radius:dt,borderTopLeftRadius:dt,borderTopRightRadius:dt,borderBottomRightRadius:dt,borderBottomLeftRadius:dt,width:dt,maxWidth:dt,height:dt,maxHeight:dt,size:dt,top:dt,right:dt,bottom:dt,left:dt,padding:dt,paddingTop:dt,paddingRight:dt,paddingBottom:dt,paddingLeft:dt,margin:dt,marginTop:dt,marginRight:dt,marginBottom:dt,marginLeft:dt,rotate:Wa,rotateX:Wa,rotateY:Wa,rotateZ:Wa,scale:E0,scaleX:E0,scaleY:E0,scaleZ:E0,skew:Wa,skewX:Wa,skewY:Wa,distance:dt,translateX:dt,translateY:dt,translateZ:dt,x:dt,y:dt,z:dt,perspective:dt,transformPerspective:dt,opacity:wd,originX:fO,originY:fO,originZ:dt,zIndex:dO,fillOpacity:wd,strokeOpacity:wd,numOctaves:dO};function L_(e,t,r,n){var o,i=e.style,a=e.vars,s=e.transform,l=e.transformKeys,c=e.transformOrigin;l.length=0;var u=!1,f=!1,d=!0;for(var p in t){var h=t[p];if(ZL(p)){a[p]=h;continue}var m=iz[p],_=fye(h,m);if(eh(p)){if(u=!0,s[p]=_,l.push(p),!d)continue;h!==((o=m.default)!==null&&o!==void 0?o:0)&&(d=!1)}else YL(p)?(c[p]=_,f=!0):i[p]=_}u?i.transform=cye(e,r,d,n):n?i.transform=n({},""):!t.transform&&i.transform&&(i.transform="none"),f&&(i.transformOrigin=uye(c))}var z_=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function az(e,t,r){for(var n in t)!wa(t[n])&&!XL(n,r)&&(e[n]=t[n])}function Eye(e,t,r){var n=e.transformTemplate;return $.useMemo(function(){var o=z_();L_(o,t,{enableHardwareAcceleration:!r},n);var i=o.vars,a=o.style;return Ve(Ve({},i),a)},[t])}function Sye(e,t,r){var n=e.style||{},o={};return az(o,n,e),Object.assign(o,Eye(e,t,r)),e.transformValues&&(o=e.transformValues(o)),o}function Cye(e,t,r){var n={},o=Sye(e,t,r);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":"pan-".concat(e.drag==="x"?"y":"x")),n.style=o,n}var Pye=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function Vg(e){return Pye.has(e)}var sz=function(e){return!Vg(e)};function Oye(e){e&&(sz=function(t){return t.startsWith("on")?!Vg(t):e(t)})}try{Oye(require("@emotion/is-prop-valid").default)}catch{}function Aye(e,t,r){var n={};for(var o in e)(sz(o)||r===!0&&Vg(o)||!t&&!Vg(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}function pO(e,t,r){return typeof e=="string"?e:dt.transform(t+r*e)}function kye(e,t,r){var n=pO(t,e.x,e.width),o=pO(r,e.y,e.height);return"".concat(n," ").concat(o)}var Iye={offset:"stroke-dashoffset",array:"stroke-dasharray"},$ye={offset:"strokeDashoffset",array:"strokeDasharray"};function Tye(e,t,r,n,o){r===void 0&&(r=1),n===void 0&&(n=0),o===void 0&&(o=!0),e.pathLength=1;var i=o?Iye:$ye;e[i.offset]=dt.transform(-n);var a=dt.transform(t),s=dt.transform(r);e[i.array]="".concat(a," ").concat(s)}function U_(e,t,r,n){var o=t.attrX,i=t.attrY,a=t.originX,s=t.originY,l=t.pathLength,c=t.pathSpacing,u=c===void 0?1:c,f=t.pathOffset,d=f===void 0?0:f,p=Mi(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);L_(e,p,r,n),e.attrs=e.style,e.style={};var h=e.attrs,m=e.style,_=e.dimensions;h.transform&&(_&&(m.transform=h.transform),delete h.transform),_&&(a!==void 0||s!==void 0||m.transform)&&(m.transformOrigin=kye(_,a!==void 0?a:.5,s!==void 0?s:.5)),o!==void 0&&(h.x=o),i!==void 0&&(h.y=i),l!==void 0&&Tye(h,l,u,d,!1)}var lz=function(){return Ve(Ve({},z_()),{attrs:{}})};function Dye(e,t){var r=$.useMemo(function(){var o=lz();return U_(o,t,{enableHardwareAcceleration:!1},e.transformTemplate),Ve(Ve({},o.attrs),{style:Ve({},o.style)})},[t]);if(e.style){var n={};az(n,e.style,e),r.style=Ve(Ve({},n),r.style)}return r}function Mye(e){e===void 0&&(e=!1);var t=function(r,n,o,i,a,s){var l=a.latestValues,c=B_(r)?Dye:Cye,u=c(n,l,s),f=Aye(n,typeof r=="string",e),d=Ve(Ve(Ve({},f),u),{ref:i});return o&&(d["data-projection-id"]=o),$.createElement(r,d)};return t}var Rye=/([a-z])([A-Z])/g,Nye="$1-$2",cz=function(e){return e.replace(Rye,Nye).toLowerCase()};function uz(e,t,r,n){var o=t.style,i=t.vars;Object.assign(e.style,o,n&&n.getProjectionStyles(r));for(var a in i)e.style.setProperty(a,i[a])}var fz=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function dz(e,t,r,n){uz(e,t,void 0,n);for(var o in t.attrs)e.setAttribute(fz.has(o)?o:cz(o),t.attrs[o])}function H_(e){var t=e.style,r={};for(var n in t)(wa(t[n])||XL(n,e))&&(r[n]=t[n]);return r}function pz(e){var t=H_(e);for(var r in e)if(wa(e[r])){var n=r==="x"||r==="y"?"attr"+r.toUpperCase():r;t[n]=e[r]}return t}function V_(e){return typeof e=="object"&&typeof e.start=="function"}var hp=function(e){return Array.isArray(e)},Fye=function(e){return!!(e&&typeof e=="object"&&e.mix&&e.toValue)},hz=function(e){return hp(e)?e[e.length-1]||0:e};function d1(e){var t=wa(e)?e.get():e;return Fye(t)?t.toValue():t}function hO(e,t,r,n){var o=e.scrapeMotionValuesFromProps,i=e.createRenderState,a=e.onMount,s={latestValues:Bye(t,r,n,o),renderState:i()};return a&&(s.mount=function(l){return a(t,l,s)}),s}var vz=function(e){return function(t,r){var n=$.useContext(wy),o=$.useContext(Jp);return r?hO(e,t,n,o):Qp(function(){return hO(e,t,n,o)})}};function Bye(e,t,r,n){var o={},i=(r==null?void 0:r.initial)===!1,a=n(e);for(var s in a)o[s]=d1(a[s]);var l=e.initial,c=e.animate,u=_y(e),f=GL(e);t&&f&&!u&&e.inherit!==!1&&(l??(l=t.initial),c??(c=t.animate));var d=i||l===!1,p=d?c:l;if(p&&typeof p!="boolean"&&!V_(p)){var h=Array.isArray(p)?p:[p];h.forEach(function(m){var _=qL(e,m);if(_){var w=_.transitionEnd;_.transition;var y=Mi(_,["transitionEnd","transition"]);for(var C in y){var I=y[C];if(Array.isArray(I)){var F=d?I.length-1:0;I=I[F]}I!==null&&(o[C]=I)}for(var C in w)o[C]=w[C]}})}return o}var jye={useVisualState:vz({scrapeMotionValuesFromProps:pz,createRenderState:lz,onMount:function(e,t,r){var n=r.renderState,o=r.latestValues;try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}U_(n,o,{enableHardwareAcceleration:!1},e.transformTemplate),dz(t,n)}})},Lye={useVisualState:vz({scrapeMotionValuesFromProps:H_,createRenderState:z_})};function zye(e,t,r,n,o){var i=t.forwardMotionProps,a=i===void 0?!1:i,s=B_(e)?jye:Lye;return Ve(Ve({},s),{preloadedFeatures:r,useRender:Mye(a),createVisualElement:n,projectionNodeConstructor:o,Component:e})}var jt;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(jt||(jt={}));function Ey(e,t,r,n){return n===void 0&&(n={passive:!0}),e.addEventListener(t,r,n),function(){return e.removeEventListener(t,r)}}function E3(e,t,r,n){$.useEffect(function(){var o=e.current;if(r&&o)return Ey(o,t,r,n)},[e,t,r,n])}function Uye(e){var t=e.whileFocus,r=e.visualElement,n=function(){var i;(i=r.animationState)===null||i===void 0||i.setActive(jt.Focus,!0)},o=function(){var i;(i=r.animationState)===null||i===void 0||i.setActive(jt.Focus,!1)};E3(r,"focus",t?n:void 0),E3(r,"blur",t?o:void 0)}function gz(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function mz(e){var t=!!e.touches;return t}function Hye(e){return function(t){var r=t instanceof MouseEvent,n=!r||r&&t.button===0;n&&e(t)}}var Vye={pageX:0,pageY:0};function Wye(e,t){t===void 0&&(t="page");var r=e.touches[0]||e.changedTouches[0],n=r||Vye;return{x:n[t+"X"],y:n[t+"Y"]}}function qye(e,t){return t===void 0&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function W_(e,t){return t===void 0&&(t="page"),{point:mz(e)?Wye(e,t):qye(e,t)}}var yz=function(e,t){t===void 0&&(t=!1);var r=function(n){return e(n,W_(n))};return t?Hye(r):r},Gye=function(){return Hu&&window.onpointerdown===null},Kye=function(){return Hu&&window.ontouchstart===null},Yye=function(){return Hu&&window.onmousedown===null},Xye={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Zye={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function bz(e){return Gye()?e:Kye()?Zye[e]:Yye()?Xye[e]:e}function Yc(e,t,r,n){return Ey(e,bz(t),yz(r,t==="pointerdown"),n)}function Wg(e,t,r,n){return E3(e,bz(t),r&&yz(r,t==="pointerdown"),n)}function wz(e){var t=null;return function(){var r=function(){t=null};return t===null?(t=e,r):!1}}var vO=wz("dragHorizontal"),gO=wz("dragVertical");function xz(e){var t=!1;if(e==="y")t=gO();else if(e==="x")t=vO();else{var r=vO(),n=gO();r&&n?t=function(){r(),n()}:(r&&r(),n&&n())}return t}function _z(){var e=xz(!0);return e?(e(),!1):!0}function mO(e,t,r){return function(n,o){var i;!gz(n)||_z()||((i=e.animationState)===null||i===void 0||i.setActive(jt.Hover,t),r==null||r(n,o))}}function Jye(e){var t=e.onHoverStart,r=e.onHoverEnd,n=e.whileHover,o=e.visualElement;Wg(o,"pointerenter",t||n?mO(o,!0,t):void 0,{passive:!t}),Wg(o,"pointerleave",r||n?mO(o,!1,r):void 0,{passive:!r})}var Ez=function(e,t){return t?e===t?!0:Ez(e,t.parentElement):!1};function q_(e){return $.useEffect(function(){return function(){return e()}},[])}function Sz(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);oMath.min(Math.max(r,e),t),T2=.001,Qye=.01,yO=10,ebe=.05,tbe=1;function rbe({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let o,i;Nme(e<=yO*1e3);let a=1-t;a=qg(ebe,tbe,a),e=qg(Qye,yO,e/1e3),a<1?(o=c=>{const u=c*a,f=u*e,d=u-r,p=S3(c,a),h=Math.exp(-f);return T2-d/p*h},i=c=>{const f=c*a*e,d=f*r+r,p=Math.pow(a,2)*Math.pow(c,2)*e,h=Math.exp(-f),m=S3(Math.pow(c,2),a);return(-o(c)+T2>0?-1:1)*((d-p)*h)/m}):(o=c=>{const u=Math.exp(-c*e),f=(c-r)*e+1;return-T2+u*f},i=c=>{const u=Math.exp(-c*e),f=(r-c)*(e*e);return u*f});const s=5/e,l=obe(o,i,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:a*2*Math.sqrt(n*c),duration:e}}}const nbe=12;function obe(e,t,r){let n=r;for(let o=1;oe[r]!==void 0)}function sbe(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!bO(e,abe)&&bO(e,ibe)){const r=rbe(e);t=Object.assign(Object.assign(Object.assign({},t),r),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function G_(e){var{from:t=0,to:r=1,restSpeed:n=2,restDelta:o}=e,i=Sz(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:c,velocity:u,duration:f,isResolvedFromDuration:d}=sbe(i),p=wO,h=wO;function m(){const _=u?-(u/1e3):0,w=r-t,y=l/(2*Math.sqrt(s*c)),C=Math.sqrt(s/c)/1e3;if(o===void 0&&(o=Math.min(Math.abs(r-t)/100,.4)),y<1){const I=S3(C,y);p=F=>{const O=Math.exp(-y*C*F);return r-O*((_+y*C*w)/I*Math.sin(I*F)+w*Math.cos(I*F))},h=F=>{const O=Math.exp(-y*C*F);return y*C*O*(Math.sin(I*F)*(_+y*C*w)/I+w*Math.cos(I*F))-O*(Math.cos(I*F)*(_+y*C*w)-I*w*Math.sin(I*F))}}else if(y===1)p=I=>r-Math.exp(-C*I)*(w+(_+C*w)*I);else{const I=C*Math.sqrt(y*y-1);p=F=>{const O=Math.exp(-y*C*F),g=Math.min(I*F,300);return r-O*((_+y*C*w)*Math.sinh(g)+I*w*Math.cosh(g))/I}}}return m(),{next:_=>{const w=p(_);if(d)a.done=_>=f;else{const y=h(_)*1e3,C=Math.abs(y)<=n,I=Math.abs(r-w)<=o;a.done=C&&I}return a.value=a.done?r:w,a},flipTarget:()=>{u=-u,[t,r]=[r,t],m()}}}G_.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const wO=e=>0,vp=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},nr=(e,t,r)=>-r*e+r*t+e;function D2(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function xO({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,i=0,a=0;if(!t)o=i=a=r;else{const s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=D2(l,s,e+1/3),i=D2(l,s,e),a=D2(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:n}}const lbe=(e,t,r)=>{const n=e*e,o=t*t;return Math.sqrt(Math.max(0,r*(o-n)+n))},cbe=[x3,as,_l],_O=e=>cbe.find(t=>t.test(e)),Cz=(e,t)=>{let r=_O(e),n=_O(t),o=r.parse(e),i=n.parse(t);r===_l&&(o=xO(o),r=as),n===_l&&(i=xO(i),n=as);const a=Object.assign({},o);return s=>{for(const l in a)l!=="alpha"&&(a[l]=lbe(o[l],i[l],s));return a.alpha=nr(o.alpha,i.alpha,s),r.transform(a)}},C3=e=>typeof e=="number",ube=(e,t)=>r=>t(e(r)),Sy=(...e)=>e.reduce(ube);function Pz(e,t){return C3(e)?r=>nr(e,t,r):dn.test(e)?Cz(e,t):Az(e,t)}const Oz=(e,t)=>{const r=[...e],n=r.length,o=e.map((i,a)=>Pz(i,t[a]));return i=>{for(let a=0;a{const r=Object.assign(Object.assign({},e),t),n={};for(const o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=Pz(e[o],t[o]));return o=>{for(const i in n)r[i]=n[i](o);return r}};function EO(e){const t=xa.parse(e),r=t.length;let n=0,o=0,i=0;for(let a=0;a{const r=xa.createTransformer(t),n=EO(e),o=EO(t);return n.numHSL===o.numHSL&&n.numRGB===o.numRGB&&n.numNumbers>=o.numNumbers?Sy(Oz(n.parsed,o.parsed),r):a=>`${a>0?t:e}`},dbe=(e,t)=>r=>nr(e,t,r);function pbe(e){if(typeof e=="number")return dbe;if(typeof e=="string")return dn.test(e)?Cz:Az;if(Array.isArray(e))return Oz;if(typeof e=="object")return fbe}function hbe(e,t,r){const n=[],o=r||pbe(e[0]),i=e.length-1;for(let a=0;ar(vp(e,t,n))}function gbe(e,t){const r=e.length,n=r-1;return o=>{let i=0,a=!1;if(o<=e[0]?a=!0:o>=e[n]&&(i=n-1,a=!0),!a){let l=1;for(;lo||l===n);l++);i=l-1}const s=vp(e[i],e[i+1],o);return t[i](s)}}function kz(e,t,{clamp:r=!0,ease:n,mixer:o}={}){const i=e.length;zg(i===t.length),zg(!n||!Array.isArray(n)||n.length===i-1),e[0]>e[i-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=hbe(t,n,o),s=i===2?vbe(e,a):gbe(e,a);return r?l=>s(qg(e[0],e[i-1],l)):s}const Cy=e=>t=>1-e(1-t),K_=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,mbe=e=>t=>Math.pow(t,e),Iz=e=>t=>t*t*((e+1)*t-e),ybe=e=>{const t=Iz(e);return r=>(r*=2)<1?.5*t(r):.5*(2-Math.pow(2,-10*(r-1)))},$z=1.525,bbe=4/11,wbe=8/11,xbe=9/10,Y_=e=>e,X_=mbe(2),_be=Cy(X_),Tz=K_(X_),Dz=e=>1-Math.sin(Math.acos(e)),Z_=Cy(Dz),Ebe=K_(Z_),J_=Iz($z),Sbe=Cy(J_),Cbe=K_(J_),Pbe=ybe($z),Obe=4356/361,Abe=35442/1805,kbe=16061/1805,Gg=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-Gg(1-e*2)):.5*Gg(e*2-1)+.5;function Tbe(e,t){return e.map(()=>t||Tz).splice(0,e.length-1)}function Dbe(e){const t=e.length;return e.map((r,n)=>n!==0?n/(t-1):0)}function Mbe(e,t){return e.map(r=>r*t)}function p1({from:e=0,to:t=1,ease:r,offset:n,duration:o=300}){const i={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Mbe(n&&n.length===a.length?n:Dbe(a),o);function l(){return kz(s,a,{ease:Array.isArray(r)?r:Tbe(a,r)})}let c=l();return{next:u=>(i.value=c(u),i.done=u>=o,i),flipTarget:()=>{a.reverse(),c=l()}}}function Rbe({velocity:e=0,from:t=0,power:r=.8,timeConstant:n=350,restDelta:o=.5,modifyTarget:i}){const a={done:!1,value:t};let s=r*e;const l=t+s,c=i===void 0?l:i(l);return c!==l&&(s=c-t),{next:u=>{const f=-s*Math.exp(-u/n);return a.done=!(f>o||f<-o),a.value=a.done?c:c+f,a},flipTarget:()=>{}}}const SO={keyframes:p1,spring:G_,decay:Rbe};function Nbe(e){if(Array.isArray(e.to))return p1;if(SO[e.type])return SO[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?p1:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?G_:p1}const Mz=1/60*1e3,Fbe=typeof performance<"u"?()=>performance.now():()=>Date.now(),Rz=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Fbe()),Mz);function Bbe(e){let t=[],r=[],n=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(l,c=!1,u=!1)=>{const f=u&&o,d=f?t:r;return c&&a.add(l),d.indexOf(l)===-1&&(d.push(l),f&&o&&(n=t.length)),l},cancel:l=>{const c=r.indexOf(l);c!==-1&&r.splice(c,1),a.delete(l)},process:l=>{if(o){i=!0;return}if(o=!0,[t,r]=[r,t],r.length=0,n=t.length,n)for(let c=0;c(e[t]=Bbe(()=>gp=!0),e),{}),Go=nh.reduce((e,t)=>{const r=Py[t];return e[t]=(n,o=!1,i=!1)=>(gp||zbe(),r.schedule(n,o,i)),e},{}),vu=nh.reduce((e,t)=>(e[t]=Py[t].cancel,e),{}),M2=nh.reduce((e,t)=>(e[t]=()=>Py[t].process(Xc),e),{}),Lbe=e=>Py[e].process(Xc),Nz=e=>{gp=!1,Xc.delta=P3?Mz:Math.max(Math.min(e-Xc.timestamp,jbe),1),Xc.timestamp=e,O3=!0,nh.forEach(Lbe),O3=!1,gp&&(P3=!1,Rz(Nz))},zbe=()=>{gp=!0,P3=!0,O3||Rz(Nz)},Kg=()=>Xc;function Fz(e,t,r=0){return e-t-r}function Ube(e,t,r=0,n=!0){return n?Fz(t+-e,t,r):t-(e-t)+r}function Hbe(e,t,r,n){return n?e>=t+r:e<=-r}const Vbe=e=>{const t=({delta:r})=>e(r);return{start:()=>Go.update(t,!0),stop:()=>vu.update(t)}};function Bz(e){var t,r,{from:n,autoplay:o=!0,driver:i=Vbe,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:c=0,onPlay:u,onStop:f,onComplete:d,onRepeat:p,onUpdate:h}=e,m=Sz(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:_}=m,w,y=0,C=m.duration,I,F=!1,O=!0,g;const D=Nbe(m);!((r=(t=D).needsInterpolation)===null||r===void 0)&&r.call(t,n,_)&&(g=kz([0,100],[n,_],{clamp:!1}),n=0,_=100);const H=D(Object.assign(Object.assign({},m),{from:n,to:_}));function G(){y++,l==="reverse"?(O=y%2===0,a=Ube(a,C,c,O)):(a=Fz(a,C,c),l==="mirror"&&H.flipTarget()),F=!1,p&&p()}function V(){w.stop(),d&&d()}function P(v){if(O||(v=-v),a+=v,!F){const b=H.next(Math.max(0,a));I=b.value,g&&(I=g(I)),F=O?b.done:a<=0}h==null||h(I),F&&(y===0&&(C??(C=a)),y{f==null||f(),w.stop()}}}function jz(e,t){return t?e*(1e3/t):0}function Wbe({from:e=0,velocity:t=0,min:r,max:n,power:o=.8,timeConstant:i=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:c,driver:u,onUpdate:f,onComplete:d,onStop:p}){let h;function m(C){return r!==void 0&&Cn}function _(C){return r===void 0?n:n===void 0||Math.abs(r-C){var F;f==null||f(I),(F=C.onUpdate)===null||F===void 0||F.call(C,I)},onComplete:d,onStop:p}))}function y(C){w(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},C))}if(m(e))y({from:e,velocity:t,to:_(e)});else{let C=o*t+e;typeof c<"u"&&(C=c(C));const I=_(C),F=I===r?-1:1;let O,g;const D=H=>{O=g,g=H,t=jz(H-O,Kg().delta),(F===1&&H>I||F===-1&&Hh==null?void 0:h.stop()}}const A3=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),CO=e=>A3(e)&&e.hasOwnProperty("z"),S0=(e,t)=>Math.abs(e-t);function Lz(e,t){if(C3(e)&&C3(t))return S0(e,t);if(A3(e)&&A3(t)){const r=S0(e.x,t.x),n=S0(e.y,t.y),o=CO(e)&&CO(t)?S0(e.z,t.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(o,2))}}const zz=(e,t)=>1-3*t+3*e,Uz=(e,t)=>3*t-6*e,Hz=e=>3*e,Yg=(e,t,r)=>((zz(t,r)*e+Uz(t,r))*e+Hz(t))*e,Vz=(e,t,r)=>3*zz(t,r)*e*e+2*Uz(t,r)*e+Hz(t),qbe=1e-7,Gbe=10;function Kbe(e,t,r,n,o){let i,a,s=0;do a=t+(r-t)/2,i=Yg(a,n,o)-e,i>0?r=a:t=a;while(Math.abs(i)>qbe&&++s=Xbe?Zbe(a,f,e,r):d===0?f:Kbe(a,s,s+C0,e,r)}return a=>a===0||a===1?a:Yg(i(a),t,n)}function Qbe(e){var t=e.onTap,r=e.onTapStart,n=e.onTapCancel,o=e.whileTap,i=e.visualElement,a=t||r||n||o,s=$.useRef(!1),l=$.useRef(null),c={passive:!(r||t||n||h)};function u(){var m;(m=l.current)===null||m===void 0||m.call(l),l.current=null}function f(){var m;return u(),s.current=!1,(m=i.animationState)===null||m===void 0||m.setActive(jt.Tap,!1),!_z()}function d(m,_){f()&&(Ez(i.getInstance(),m.target)?t==null||t(m,_):n==null||n(m,_))}function p(m,_){f()&&(n==null||n(m,_))}function h(m,_){var w;u(),!s.current&&(s.current=!0,l.current=Sy(Yc(window,"pointerup",d,c),Yc(window,"pointercancel",p,c)),(w=i.animationState)===null||w===void 0||w.setActive(jt.Tap,!0),r==null||r(m,_))}Wg(i,"pointerdown",a?h:void 0,c),q_(u)}var PO=new Set;function e2e(e,t,r){e||PO.has(t)||(console.warn(t),r&&console.warn(r),PO.add(t))}var k3=new WeakMap,R2=new WeakMap,t2e=function(e){var t;(t=k3.get(e.target))===null||t===void 0||t(e)},r2e=function(e){e.forEach(t2e)};function n2e(e){var t=e.root,r=Mi(e,["root"]),n=t||document;R2.has(n)||R2.set(n,{});var o=R2.get(n),i=JSON.stringify(r);return o[i]||(o[i]=new IntersectionObserver(r2e,Ve({root:t},r))),o[i]}function o2e(e,t,r){var n=n2e(t);return k3.set(e,r),n.observe(e),function(){k3.delete(e),n.unobserve(e)}}function i2e(e){var t=e.visualElement,r=e.whileInView,n=e.onViewportEnter,o=e.onViewportLeave,i=e.viewport,a=i===void 0?{}:i,s=$.useRef({hasEnteredView:!1,isInView:!1}),l=!!(r||n||o);a.once&&s.current.hasEnteredView&&(l=!1);var c=typeof IntersectionObserver>"u"?l2e:s2e;c(l,s.current,t,a)}var a2e={some:0,all:1};function s2e(e,t,r,n){var o=n.root,i=n.margin,a=n.amount,s=a===void 0?"some":a,l=n.once;$.useEffect(function(){if(e){var c={root:o==null?void 0:o.current,rootMargin:i,threshold:typeof s=="number"?s:a2e[s]},u=function(f){var d,p=f.isIntersecting;if(t.isInView!==p&&(t.isInView=p,!(l&&!p&&t.hasEnteredView))){p&&(t.hasEnteredView=!0),(d=r.animationState)===null||d===void 0||d.setActive(jt.InView,p);var h=r.getProps(),m=p?h.onViewportEnter:h.onViewportLeave;m==null||m(f)}};return o2e(r.getInstance(),c,u)}},[e,o,i,s])}function l2e(e,t,r,n){var o=n.fallback,i=o===void 0?!0:o;$.useEffect(function(){!e||!i||(R_!=="production"&&e2e(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(function(){var a;t.hasEnteredView=!0;var s=r.getProps().onViewportEnter;s==null||s(null),(a=r.animationState)===null||a===void 0||a.setActive(jt.InView,!0)}))},[e])}var ss=function(e){return function(t){return e(t),null}},c2e={inView:ss(i2e),tap:ss(Qbe),focus:ss(Uye),hover:ss(Jye)},u2e=0,f2e=function(){return u2e++},Wz=function(){return Qp(f2e)};function qz(){var e=$.useContext(Jp);if(e===null)return[!0,null];var t=e.isPresent,r=e.onExitComplete,n=e.register,o=Wz();$.useEffect(function(){return n(o)},[]);var i=function(){return r==null?void 0:r(o)};return!t&&r?[!1,i]:[!0]}function Gz(e,t){if(!Array.isArray(t))return!1;var r=t.length;if(r!==e.length)return!1;for(var n=0;n-1&&e.splice(r,1)}var xd=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(t){var r=this;return n4(this.subscriptions,t),function(){return o4(r.subscriptions,t)}},e.prototype.notify=function(t,r,n){var o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,n);else for(var i=0;iy&&V,B=Array.isArray(G)?G:[G],M=B.reduce(i,{});P===!1&&(M={});var j=H.prevResolvedValues,U=j===void 0?{}:j,E=Ve(Ve({},U),M),N=function(te){b=!0,_.delete(te),H.needsAnimating[te]=!0};for(var T in E){var q=M[T],J=U[T];w.hasOwnProperty(T)||(q!==J?hp(q)&&hp(J)?!Gz(q,J)||v?N(T):H.protectedKeys[T]=!0:q!==void 0?N(T):_.add(T):q!==void 0&&_.has(T)?N(T):H.protectedKeys[T]=!0)}H.prevProp=G,H.prevResolvedValues=M,H.isActive&&(w=Ve(Ve({},w),M)),o&&e.blockInitialAnimation&&(b=!1),b&&!S&&m.push.apply(m,qo([],ir(B.map(function(te){return{animation:te,options:Ve({type:D},u)}})),!1))},I=0;I=3;if(!(!p&&!h)){var m=d.point,_=Kg().timestamp;o.history.push(Ve(Ve({},m),{timestamp:_}));var w=o.handlers,y=w.onStart,C=w.onMove;p||(y&&y(o.lastMoveEvent,d),o.startEvent=o.lastMoveEvent),C&&C(o.lastMoveEvent,d)}}},this.handlePointerMove=function(d,p){if(o.lastMoveEvent=d,o.lastMoveEventInfo=F2(p,o.transformPagePoint),gz(d)&&d.buttons===0){o.handlePointerUp(d,p);return}Go.update(o.updatePoint,!0)},this.handlePointerUp=function(d,p){o.end();var h=o.handlers,m=h.onEnd,_=h.onSessionEnd,w=B2(F2(p,o.transformPagePoint),o.history);o.startEvent&&m&&m(d,w),_&&_(d,w)},!(mz(t)&&t.touches.length>1)){this.handlers=r,this.transformPagePoint=a;var s=W_(t),l=F2(s,this.transformPagePoint),c=l.point,u=Kg().timestamp;this.history=[Ve(Ve({},c),{timestamp:u})];var f=r.onSessionStart;f&&f(t,B2(l,this.history)),this.removeListeners=Sy(Yc(window,"pointermove",this.handlePointerMove),Yc(window,"pointerup",this.handlePointerUp),Yc(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(t){this.handlers=t},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),vu.update(this.updatePoint)},e}();function F2(e,t){return t?{point:t(e.point)}:e}function TO(e,t){return{x:e.x-t.x,y:e.y-t.y}}function B2(e,t){var r=e.point;return{point:r,delta:TO(r,Jz(t)),offset:TO(r,q2e(t)),velocity:G2e(t,.1)}}function q2e(e){return e[0]}function Jz(e){return e[e.length-1]}function G2e(e,t){if(e.length<2)return{x:0,y:0};for(var r=e.length-1,n=null,o=Jz(e);r>=0&&(n=e[r],!(o.timestamp-n.timestamp>Xg(t)));)r--;if(!n)return{x:0,y:0};var i=(o.timestamp-n.timestamp)/1e3;if(i===0)return{x:0,y:0};var a={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function _a(e){return e.max-e.min}function DO(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=.01),Lz(e,t)o&&(e=r?nr(o,e,r.max):Math.min(e,o)),e}function FO(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function X2e(e,t){var r=t.top,n=t.left,o=t.bottom,i=t.right;return{x:FO(e.x,n,i),y:FO(e.y,r,o)}}function BO(e,t){var r,n=t.min-e.min,o=t.max-e.max;return t.max-t.minn?r=vp(t.min,t.max-n,e.min):n>o&&(r=vp(e.min,e.max-o,t.min)),qg(0,1,r)}function Q2e(e,t){var r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var $3=.35;function ewe(e){return e===void 0&&(e=$3),e===!1?e=0:e===!0&&(e=$3),{x:jO(e,"left","right"),y:jO(e,"top","bottom")}}function jO(e,t,r){return{min:LO(e,t),max:LO(e,r)}}function LO(e,t){var r;return typeof e=="number"?e:(r=e[t])!==null&&r!==void 0?r:0}var zO=function(){return{translate:0,scale:1,origin:0,originPoint:0}},Sd=function(){return{x:zO(),y:zO()}},UO=function(){return{min:0,max:0}},Jr=function(){return{x:UO(),y:UO()}};function hi(e){return[e("x"),e("y")]}function Qz(e){var t=e.top,r=e.left,n=e.right,o=e.bottom;return{x:{min:r,max:n},y:{min:t,max:o}}}function twe(e){var t=e.x,r=e.y;return{top:r.min,right:t.max,bottom:r.max,left:t.min}}function rwe(e,t){if(!t)return e;var r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function j2(e){return e===void 0||e===1}function eU(e){var t=e.scale,r=e.scaleX,n=e.scaleY;return!j2(t)||!j2(r)||!j2(n)}function qa(e){return eU(e)||HO(e.x)||HO(e.y)||e.z||e.rotate||e.rotateX||e.rotateY}function HO(e){return e&&e!=="0%"}function Zg(e,t,r){var n=e-r,o=t*n;return r+o}function VO(e,t,r,n,o){return o!==void 0&&(e=Zg(e,o,n)),Zg(e,r,n)+t}function T3(e,t,r,n,o){t===void 0&&(t=0),r===void 0&&(r=1),e.min=VO(e.min,t,r,n,o),e.max=VO(e.max,t,r,n,o)}function tU(e,t){var r=t.x,n=t.y;T3(e.x,r.translate,r.scale,r.originPoint),T3(e.y,n.translate,n.scale,n.originPoint)}function nwe(e,t,r,n){var o,i;n===void 0&&(n=!1);var a=r.length;if(a){t.x=t.y=1;for(var s,l,c=0;ct?r="y":Math.abs(e.x)>t&&(r="x"),r}function uwe(e){var t=e.dragControls,r=e.visualElement,n=Qp(function(){return new lwe(r)});$.useEffect(function(){return t&&t.subscribe(n)},[n,t]),$.useEffect(function(){return n.addListeners()},[n])}function fwe(e){var t=e.onPan,r=e.onPanStart,n=e.onPanEnd,o=e.onPanSessionStart,i=e.visualElement,a=t||r||n||o,s=$.useRef(null),l=$.useContext(N_).transformPagePoint,c={onSessionStart:o,onStart:r,onMove:t,onEnd:function(f,d){s.current=null,n&&n(f,d)}};$.useEffect(function(){s.current!==null&&s.current.updateHandlers(c)});function u(f){s.current=new Zz(f,c,{transformPagePoint:l})}Wg(i,"pointerdown",a&&u),q_(function(){return s.current&&s.current.end()})}var dwe={pan:ss(fwe),drag:ss(uwe)},A0=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function pwe(){var e=A0.map(function(){return new xd}),t={},r={clearAllListeners:function(){return e.forEach(function(n){return n.clear()})},updatePropListeners:function(n){A0.forEach(function(o){var i,a="on"+o,s=n[a];(i=t[o])===null||i===void 0||i.call(t),s&&(t[o]=r[a](s))})}};return e.forEach(function(n,o){r["on"+A0[o]]=function(i){return n.add(i)},r["notify"+A0[o]]=function(){for(var i=[],a=0;a=0?window.pageYOffset:null,c=Ewe(t,e,s);return i.length&&i.forEach(function(u){var f=ir(u,2),d=f[0],p=f[1];e.getValue(d).set(p)}),e.syncRender(),l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:n}}else return{target:t,transitionEnd:n}};function Cwe(e,t,r,n){return bwe(t)?Swe(e,t,r,n):{target:t,transitionEnd:n}}var Pwe=function(e,t,r,n){var o=mwe(e,t,n);return t=o.target,n=o.transitionEnd,Cwe(e,t,r,n)};function Owe(e){return window.getComputedStyle(e)}var lU={treeType:"dom",readValueFromInstance:function(e,t){if(eh(t)){var r=Q_(t);return r&&r.default||0}else{var n=Owe(e);return(ZL(t)?n.getPropertyValue(t):n[t])||0}},sortNodePosition:function(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget:function(e,t){var r;return(r=e.style)===null||r===void 0?void 0:r[t]},measureViewportBox:function(e,t){var r=t.transformPagePoint;return rU(e,r)},resetTransform:function(e,t,r){var n=r.transformTemplate;t.style.transform=n?n({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var r=t.vars,n=t.style;delete r[e],delete n[e]},makeTargetAnimatable:function(e,t,r,n){var o=r.transformValues;n===void 0&&(n=!0);var i=t.transition,a=t.transitionEnd,s=Mi(t,["transition","transitionEnd"]),l=M2e(s,i||{},e);if(o&&(a&&(a=o(a)),s&&(s=o(s)),l&&(l=o(l))),n){T2e(e,s,l);var c=Pwe(e,s,l,a);a=c.transitionEnd,s=c.target}return Ve({transition:i,transitionEnd:a},s)},scrapeMotionValuesFromProps:H_,build:function(e,t,r,n,o){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),L_(t,r,n,o.transformTemplate)},render:uz},Awe=nU(lU),kwe=nU(Ve(Ve({},lU),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var r;return eh(t)?((r=Q_(t))===null||r===void 0?void 0:r.default)||0:(t=fz.has(t)?t:cz(t),e.getAttribute(t))},scrapeMotionValuesFromProps:pz,build:function(e,t,r,n,o){U_(t,r,n,o.transformTemplate)},render:dz})),Iwe=function(e,t){return B_(e)?kwe(t,{enableHardwareAcceleration:!1}):Awe(t,{enableHardwareAcceleration:!0})};function ZO(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Mf={correct:function(e,t){if(!t.target)return e;if(typeof e=="string")if(dt.test(e))e=parseFloat(e);else return e;var r=ZO(e,t.target.x),n=ZO(e,t.target.y);return"".concat(r,"% ").concat(n,"%")}},JO="_$css",$we={correct:function(e,t){var r=t.treeScale,n=t.projectionDelta,o=e,i=e.includes("var("),a=[];i&&(e=e.replace(iU,function(m){return a.push(m),JO}));var s=xa.parse(e);if(s.length>5)return o;var l=xa.createTransformer(e),c=typeof s[0]!="number"?1:0,u=n.x.scale*r.x,f=n.y.scale*r.y;s[0+c]/=u,s[1+c]/=f;var d=nr(u,f,.5);typeof s[2+c]=="number"&&(s[2+c]/=d),typeof s[3+c]=="number"&&(s[3+c]/=d);var p=l(s);if(i){var h=0;p=p.replace(JO,function(){var m=a[h];return h++,m})}return p}},Twe=function(e){zL(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.componentDidMount=function(){var r=this,n=this.props,o=n.visualElement,i=n.layoutGroup,a=n.switchLayoutGroup,s=n.layoutId,l=o.projection;nye(Mwe),l&&(i!=null&&i.group&&i.group.add(l),a!=null&&a.register&&s&&a.register(l),l.root.didUpdate(),l.addEventListener("animationComplete",function(){r.safeToRemove()}),l.setOptions(Ve(Ve({},l.options),{onExitComplete:function(){return r.safeToRemove()}}))),yd.hasEverUpdated=!0},t.prototype.getSnapshotBeforeUpdate=function(r){var n=this,o=this.props,i=o.layoutDependency,a=o.visualElement,s=o.drag,l=o.isPresent,c=a.projection;return c&&(c.isPresent=l,s||r.layoutDependency!==i||i===void 0?c.willUpdate():this.safeToRemove(),r.isPresent!==l&&(l?c.promote():c.relegate()||Go.postRender(function(){var u;!((u=c.getStack())===null||u===void 0)&&u.members.length||n.safeToRemove()}))),null},t.prototype.componentDidUpdate=function(){var r=this.props.visualElement.projection;r&&(r.root.didUpdate(),!r.currentAnimation&&r.isLead()&&this.safeToRemove())},t.prototype.componentWillUnmount=function(){var r=this.props,n=r.visualElement,o=r.layoutGroup,i=r.switchLayoutGroup,a=n.projection;a&&(a.scheduleCheckAfterUnmount(),o!=null&&o.group&&o.group.remove(a),i!=null&&i.deregister&&i.deregister(a))},t.prototype.safeToRemove=function(){var r=this.props.safeToRemove;r==null||r()},t.prototype.render=function(){return null},t}(ae.Component);function Dwe(e){var t=ir(qz(),2),r=t[0],n=t[1],o=$.useContext(F_);return ae.createElement(Twe,Ve({},e,{layoutGroup:o,switchLayoutGroup:$.useContext(KL),isPresent:r,safeToRemove:n}))}var Mwe={borderRadius:Ve(Ve({},Mf),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Mf,borderTopRightRadius:Mf,borderBottomLeftRadius:Mf,borderBottomRightRadius:Mf,boxShadow:$we},Rwe={measureLayout:Dwe};function Nwe(e,t,r){r===void 0&&(r={});var n=wa(e)?e:gu(e);return r4("",n,t,r),{stop:function(){return n.stop()},isAnimating:function(){return n.isAnimating()}}}var cU=["TopLeft","TopRight","BottomLeft","BottomRight"],Fwe=cU.length,QO=function(e){return typeof e=="string"?parseFloat(e):e},eA=function(e){return typeof e=="number"||dt.test(e)};function Bwe(e,t,r,n,o,i){var a,s,l,c;o?(e.opacity=nr(0,(a=r.opacity)!==null&&a!==void 0?a:1,jwe(n)),e.opacityExit=nr((s=t.opacity)!==null&&s!==void 0?s:1,0,Lwe(n))):i&&(e.opacity=nr((l=t.opacity)!==null&&l!==void 0?l:1,(c=r.opacity)!==null&&c!==void 0?c:1,n));for(var u=0;ut?1:r(vp(e,t,n))}}function rA(e,t){e.min=t.min,e.max=t.max}function ko(e,t){rA(e.x,t.x),rA(e.y,t.y)}function nA(e,t,r,n,o){return e-=t,e=Zg(e,1/r,n),o!==void 0&&(e=Zg(e,1/o,n)),e}function zwe(e,t,r,n,o,i,a){if(t===void 0&&(t=0),r===void 0&&(r=1),n===void 0&&(n=.5),i===void 0&&(i=e),a===void 0&&(a=e),Pi.test(t)){t=parseFloat(t);var s=nr(a.min,a.max,t/100);t=s-a.min}if(typeof t=="number"){var l=nr(i.min,i.max,n);e===i&&(l-=t),e.min=nA(e.min,t,r,l,o),e.max=nA(e.max,t,r,l,o)}}function oA(e,t,r,n,o){var i=ir(r,3),a=i[0],s=i[1],l=i[2];zwe(e,t[a],t[s],t[l],t.scale,n,o)}var Uwe=["x","scaleX","originX"],Hwe=["y","scaleY","originY"];function iA(e,t,r,n){oA(e.x,t,Uwe,r==null?void 0:r.x,n==null?void 0:n.x),oA(e.y,t,Hwe,r==null?void 0:r.y,n==null?void 0:n.y)}function aA(e){return e.translate===0&&e.scale===1}function fU(e){return aA(e.x)&&aA(e.y)}function dU(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}var Vwe=function(){function e(){this.members=[]}return e.prototype.add=function(t){n4(this.members,t),t.scheduleRender()},e.prototype.remove=function(t){if(o4(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){var r=this.members[this.members.length-1];r&&this.promote(r)}},e.prototype.relegate=function(t){var r=this.members.findIndex(function(a){return t===a});if(r===0)return!1;for(var n,o=r;o>=0;o--){var i=this.members[o];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1},e.prototype.promote=function(t,r){var n,o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,r&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues,t.snapshot.isShared=!0),!((n=t.root)===null||n===void 0)&&n.isUpdating&&(t.isLayoutDirty=!0);var i=t.options.crossfade;i===!1&&o.hide()}},e.prototype.exitAnimationComplete=function(){this.members.forEach(function(t){var r,n,o,i,a;(n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r),(a=(o=t.resumingFrom)===null||o===void 0?void 0:(i=o.options).onExitComplete)===null||a===void 0||a.call(i)})},e.prototype.scheduleRender=function(){this.members.forEach(function(t){t.instance&&t.scheduleRender(!1)})},e.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},e}(),Wwe="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function sA(e,t,r){var n=e.x.translate/t.x,o=e.y.translate/t.y,i="translate3d(".concat(n,"px, ").concat(o,"px, 0) ");if(i+="scale(".concat(1/t.x,", ").concat(1/t.y,") "),r){var a=r.rotate,s=r.rotateX,l=r.rotateY;a&&(i+="rotate(".concat(a,"deg) ")),s&&(i+="rotateX(".concat(s,"deg) ")),l&&(i+="rotateY(".concat(l,"deg) "))}var c=e.x.scale*t.x,u=e.y.scale*t.y;return i+="scale(".concat(c,", ").concat(u,")"),i===Wwe?"none":i}var qwe=function(e,t){return e.depth-t.depth},Gwe=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(t){n4(this.children,t),this.isDirty=!0},e.prototype.remove=function(t){o4(this.children,t),this.isDirty=!0},e.prototype.forEach=function(t){this.isDirty&&this.children.sort(qwe),this.isDirty=!1,this.children.forEach(t)},e}(),lA=1e3;function pU(e){var t=e.attachResizeListener,r=e.defaultParent,n=e.measureScroll,o=e.checkIsScrollRoot,i=e.resetTransform;return function(){function a(s,l,c){var u=this;l===void 0&&(l={}),c===void 0&&(c=r==null?void 0:r()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){u.isUpdating&&(u.isUpdating=!1,u.clearAllSnapshots())},this.updateProjection=function(){u.nodes.forEach(Qwe),u.nodes.forEach(e5e)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=s,this.latestValues=l,this.root=c?c.root||c:this,this.path=c?qo(qo([],ir(c.path),!1),[c],!1):[],this.parent=c,this.depth=c?c.depth+1:0,s&&this.root.registerPotentialNode(s,this);for(var f=0;f=0;n--)if(e.path[n].instance){r=e.path[n];break}var o=r&&r!==e.root?r.instance:document,i=o.querySelector('[data-projection-id="'.concat(t,'"]'));i&&e.mount(i,!0)}function dA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function pA(e){dA(e.x),dA(e.y)}var s5e=pU({attachResizeListener:function(e,t){return Ey(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),L2={current:void 0},l5e=pU({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!L2.current){var e=new s5e(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),L2.current=e}return L2.current},resetTransform:function(e,t){e.style.transform=t??"none"},checkIsScrollRoot:function(e){return window.getComputedStyle(e).position==="fixed"}}),c5e=Ve(Ve(Ve(Ve({},W2e),c2e),dwe),Rwe),ut=tye(function(e,t){return zye(e,t,c5e,Iwe,l5e)});function hU(){var e=$.useRef(!1);return Ug(function(){return e.current=!0,function(){e.current=!1}},[]),e}function u5e(){var e=hU(),t=ir($.useState(0),2),r=t[0],n=t[1],o=$.useCallback(function(){e.current&&n(r+1)},[r]),i=$.useCallback(function(){return Go.postRender(o)},[o]);return[i,r]}var z2=function(e){var t=e.children,r=e.initial,n=e.isPresent,o=e.onExitComplete,i=e.custom,a=e.presenceAffectsLayout,s=Qp(f5e),l=Wz(),c=$.useMemo(function(){return{id:l,initial:r,isPresent:n,custom:i,onExitComplete:function(u){var f,d;s.set(u,!0);try{for(var p=Dme(s.values()),h=p.next();!h.done;h=p.next()){var m=h.value;if(!m)return}}catch(_){f={error:_}}finally{try{h&&!h.done&&(d=p.return)&&d.call(p)}finally{if(f)throw f.error}}o==null||o()},register:function(u){return s.set(u,!1),function(){return s.delete(u)}}}},a?void 0:[n]);return $.useMemo(function(){s.forEach(function(u,f){return s.set(f,!1)})},[n]),$.useEffect(function(){!n&&!s.size&&(o==null||o())},[n]),$.createElement(Jp.Provider,{value:c},t)};function f5e(){return new Map}var gc=function(e){return e.key||""};function d5e(e,t){e.forEach(function(r){var n=gc(r);t.set(n,r)})}function p5e(e){var t=[];return $.Children.forEach(e,function(r){$.isValidElement(r)&&t.push(r)}),t}var Ko=function(e){var t=e.children,r=e.custom,n=e.initial,o=n===void 0?!0:n,i=e.onExitComplete,a=e.exitBeforeEnter,s=e.presenceAffectsLayout,l=s===void 0?!0:s,c=ir(u5e(),1),u=c[0],f=$.useContext(F_).forceRender;f&&(u=f);var d=hU(),p=p5e(t),h=p,m=new Set,_=$.useRef(h),w=$.useRef(new Map).current,y=$.useRef(!0);if(Ug(function(){y.current=!1,d5e(p,w),_.current=h}),q_(function(){y.current=!0,w.clear(),m.clear()}),y.current)return $.createElement($.Fragment,null,h.map(function(D){return $.createElement(z2,{key:gc(D),isPresent:!0,initial:o?void 0:!1,presenceAffectsLayout:l},D)}));h=qo([],ir(h),!1);for(var C=_.current.map(gc),I=p.map(gc),F=C.length,O=0;O1&&console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour."),$.createElement($.Fragment,null,m.size?h:h.map(function(D){return $.cloneElement(D)}))},hA=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new y5e:typeof navigator<"u"?mA(navigator.userAgent):S5e()}function _5e(e){return e!==""&&x5e.reduce(function(t,r){var n=r[0],o=r[1];if(t)return t;var i=o.exec(e);return!!i&&[n,i]},!1)}function mA(e){var t=_5e(e);if(!t)return null;var r=t[0],n=t[1];if(r==="searchbot")return new m5e;var o=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);o?o.lengthK)&&(Q=(Ee=Ee.replace(" ",":")).length),0te&&(te=(q=q.trim()).charCodeAt(0)),te){case 38:return q.replace(w,"$1"+T.trim());case 58:return T.trim()+q.replace(w,"$1"+T.trim());default:if(0<1*J&&0ie.charCodeAt(8))break;case 115:ne=ne.replace(ie,"-webkit-"+ie)+";"+ne;break;case 207:case 102:ne=ne.replace(ie,"-webkit-"+(102J.charCodeAt(0)&&(J=J.trim()),N=J,J=[N],01?t-1:0),n=1;n0?" Args: "+r.join(", "):""))}var I5e=function(){function e(r){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=r}var t=e.prototype;return t.indexOfGroup=function(r){for(var n=0,o=0;o=this.groupSizes.length){for(var o=this.groupSizes,i=o.length,a=i;r>=a;)(a<<=1)<0&&Nl(16,""+r);this.groupSizes=new Uint32Array(a),this.groupSizes.set(o),this.length=a;for(var s=i;s=this.length||this.groupSizes[r]===0)return n;for(var o=this.groupSizes[r],i=this.indexOfGroup(r),a=i+o,s=i;s=Cd&&(Cd=t+1),v1.set(e,t),Qg.set(t,e)},D5e="style["+yu+'][data-styled-version="5.3.11"]',M5e=new RegExp("^"+yu+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),R5e=function(e,t,r){for(var n,o=r.split(","),i=0,a=o.length;i=0;c--){var u=l[c];if(u&&u.nodeType===1&&u.hasAttribute(yu))return u}}(r),i=o!==void 0?o.nextSibling:null;n.setAttribute(yu,"active"),n.setAttribute("data-styled-version","5.3.11");var a=F5e();return a&&n.setAttribute("nonce",a),r.insertBefore(n,i),n},B5e=function(){function e(r){var n=this.element=vU(r);n.appendChild(document.createTextNode("")),this.sheet=function(o){if(o.sheet)return o.sheet;for(var i=document.styleSheets,a=0,s=i.length;a=0){var o=document.createTextNode(n),i=this.nodes[r];return this.element.insertBefore(o,i||null),this.length++,!0}return!1},t.deleteRule=function(r){this.element.removeChild(this.nodes[r]),this.length--},t.getRule=function(r){return r0&&(f+=d+",")}),i+=""+c+u+'{content:"'+f+`"}/*!sc*/ +`}}}return i}(this)},e}(),U5e=/(a)(d)/gi,_A=function(e){return String.fromCharCode(e+(e>25?39:97))};function N3(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=_A(t%52)+r;return(_A(t%52)+r).replace(U5e,"$1-$2")}var Rc=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},mU=function(e){return Rc(5381,e)};function H5e(e){for(var t=0;t>>0);if(!r.hasNameForId(o,s)){var l=n(a,"."+s,void 0,o);r.insertRules(o,s,l)}i.push(s),this.staticRulesId=s}else{for(var c=this.rules.length,u=Rc(this.baseHash,n.hash),f="",d=0;d>>0);if(!r.hasNameForId(o,_)){var w=n(f,"."+_,void 0,o);r.insertRules(o,_,w)}i.push(_)}}return i.join(" ")},e}(),q5e=/^\s*\/\/.*$/gm,G5e=[":","[",".","#"];function K5e(e){var t,r,n,o,i=e===void 0?Ss:e,a=i.options,s=a===void 0?Ss:a,l=i.plugins,c=l===void 0?Jg:l,u=new P5e(s),f=[],d=function(m){function _(w){if(w)try{m(w+"}")}catch{}}return function(w,y,C,I,F,O,g,D,H,G){switch(w){case 1:if(H===0&&y.charCodeAt(0)===64)return m(y+";"),"";break;case 2:if(D===0)return y+"/*|*/";break;case 3:switch(D){case 102:case 112:return m(C[0]+y),"";default:return y+(G===0?"/*|*/":"")}case-2:y.split("/*|*/}").forEach(_)}}}(function(m){f.push(m)}),p=function(m,_,w){return _===0&&G5e.indexOf(w[r.length])!==-1||w.match(o)?m:"."+t};function h(m,_,w,y){y===void 0&&(y="&");var C=m.replace(q5e,""),I=_&&w?w+" "+_+" { "+C+" }":C;return t=y,r=_,n=new RegExp("\\"+r+"\\b","g"),o=new RegExp("(\\"+r+"\\b){2,}"),u(w||!_?"":_,I)}return u.use([].concat(c,[function(m,_,w){m===2&&w.length&&w[0].lastIndexOf(r)>0&&(w[0]=w[0].replace(n,p))},d,function(m){if(m===-2){var _=f;return f=[],_}}])),h.hash=c.length?c.reduce(function(m,_){return _.name||Nl(15),Rc(m,_.name)},5381).toString():"",h}var yU=ae.createContext();yU.Consumer;var bU=ae.createContext(),Y5e=(bU.Consumer,new gU),F3=K5e();function X5e(){return $.useContext(yU)||Y5e}function Z5e(){return $.useContext(bU)||F3}var wU=function(){function e(t,r){var n=this;this.inject=function(o,i){i===void 0&&(i=F3);var a=n.name+i.hash;o.hasNameForId(n.id,a)||o.insertRules(n.id,a,i(n.rules,a,"@keyframes"))},this.toString=function(){return Nl(12,String(n.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=r}return e.prototype.getName=function(t){return t===void 0&&(t=F3),this.name+t.hash},e}(),J5e=/([A-Z])/,Q5e=/([A-Z])/g,e3e=/^ms-/,t3e=function(e){return"-"+e.toLowerCase()};function EA(e){return J5e.test(e)?e.replace(Q5e,t3e).replace(e3e,"-ms-"):e}var SA=function(e){return e==null||e===!1||e===""};function bu(e,t,r,n){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a1?t-1:0),n=1;n?@[\\\]^`{|}~-]+/g,o3e=/(^-|-$)/g;function U2(e){return e.replace(n3e,"-").replace(o3e,"")}var xU=function(e){return N3(mU(e)>>>0)};function I0(e){return typeof e=="string"&&!0}var B3=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},i3e=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function a3e(e,t,r){var n=e[r];B3(t)&&B3(n)?_U(n,t):e[r]=t}function _U(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0||(G[D]=O[D]);return G}(t,["componentId"]),F=C&&C+"-"+(I0(y)?y:U2(wA(y)));return EU(y,xi({},I,{attrs:d,componentId:F}),r)},Object.defineProperty(h,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(y){this._foldedDefaultProps=n?_U({},e.defaultProps,y):y}}),Object.defineProperty(h,"toString",{value:function(){return"."+h.styledComponentId}}),o&&J5(h,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),h}var j3=function(e){return function t(r,n,o){if(o===void 0&&(o=Ss),!X6.isValidElementType(n))return Nl(1,String(n));var i=function(){return r(n,o,ur.apply(void 0,arguments))};return i.withConfig=function(a){return t(r,n,xi({},o,{},a))},i.attrs=function(a){return t(r,n,xi({},o,{attrs:Array.prototype.concat(o.attrs,a).filter(Boolean)}))},i}(EU,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){j3[e]=j3(e)});function Jn(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0&&(y.current=setTimeout(F,C));break;case K2:I>=0&&(y.current=setTimeout(F,I));break;case W2:case G2:y.current=setTimeout(function(){return G(V+1)},0);break}},H=w.current<=$0;typeof g!="boolean"&&(g=!H),g?H||D(o?s?W2:q2:$0):H&&D(a?l?G2:K2:Y2(d))},[F,p,o,a,s,l,C,I,d]);return $.useEffect(function(){return function(){return clearTimeout(y.current)}},[]),[SU[m],O,F]},PU=function(){if(typeof Map<"u")return Map;function e(t,r){var n=-1;return t.some(function(o,i){return o[0]===r?(n=i,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(r,n){var o=e(this.__entries__,r);~o?this.__entries__[o][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,o=e(n,r);~o&&n.splice(o,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var o=0,i=this.__entries__;o0},e.prototype.connect_=function(){!L3||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),v3e?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!L3||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,o=h3e.some(function(i){return!!~n.indexOf(i)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),OU=function(e,t){for(var r=0,n=Object.keys(t);r"u"||!(Element instanceof Object))){if(!(t instanceof wu(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new S3e(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof wu(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)&&(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new C3e(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),kU=typeof WeakMap<"u"?new WeakMap:new PU,IU=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=g3e.getInstance(),n=new P3e(t,r,this);kU.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){IU.prototype[e]=function(){var t;return(t=kU.get(this))[e].apply(t,arguments)}});var O3e=function(){return typeof tm.ResizeObserver<"u"?tm.ResizeObserver:IU}();function z3(e,t,r){var n,o,i,a,s;t==null&&(t=100);function l(){var u=Date.now()-a;u=0?n=setTimeout(l,t-u):(n=null,r||(s=e.apply(i,o),i=o=null))}var c=function(){i=this,o=arguments,a=Date.now();var u=r&&!n;return n||(n=setTimeout(l,t)),u&&(s=e.apply(i,o),i=o=null),s};return c.clear=function(){n&&(clearTimeout(n),n=null)},c.flush=function(){n&&(s=e.apply(i,o),i=o=null,clearTimeout(n),n=null)},c}z3.debounce=z3;var A3e=z3;const AA=ri(A3e);function $U(e){let{debounce:t,scroll:r,polyfill:n,offsetSize:o}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const i=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,s]=$.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=$.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),c=t?typeof t=="number"?t:t.scroll:null,u=t?typeof t=="number"?t:t.resize:null,f=$.useRef(!1);$.useEffect(()=>(f.current=!0,()=>void(f.current=!1)));const[d,p,h]=$.useMemo(()=>{const y=()=>{if(!l.current.element)return;const{left:C,top:I,width:F,height:O,bottom:g,right:D,x:H,y:G}=l.current.element.getBoundingClientRect(),V={left:C,top:I,width:F,height:O,bottom:g,right:D,x:H,y:G};l.current.element instanceof HTMLElement&&o&&(V.height=l.current.element.offsetHeight,V.width=l.current.element.offsetWidth),Object.freeze(V),f.current&&!T3e(l.current.lastBounds,V)&&s(l.current.lastBounds=V)};return[y,u?AA(y,u):y,c?AA(y,c):y]},[s,o,c,u]);function m(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(y=>y.removeEventListener("scroll",h,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function _(){l.current.element&&(l.current.resizeObserver=new i(h),l.current.resizeObserver.observe(l.current.element),r&&l.current.scrollContainers&&l.current.scrollContainers.forEach(y=>y.addEventListener("scroll",h,{capture:!0,passive:!0})))}const w=y=>{!y||y===l.current.element||(m(),l.current.element=y,l.current.scrollContainers=TU(y),_())};return I3e(h,!!r),k3e(p),$.useEffect(()=>{m(),_()},[r,h,p]),$.useEffect(()=>m,[]),[w,a,d]}function k3e(e){$.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function I3e(e,t){$.useEffect(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function TU(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:o}=window.getComputedStyle(e);return[r,n,o].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,...TU(e.parentElement)]}const $3e=["x","y","top","bottom","left","right","width","height"],T3e=(e,t)=>$3e.every(r=>e[r]===t[r]);var Mo={},X2={},Z2={},Rf={},J2={},Q2={},Ay={},Vu={},oh={};oh.byteLength=R3e;oh.toByteArray=F3e;oh.fromByteArray=L3e;var bi=[],co=[],D3e=typeof Uint8Array<"u"?Uint8Array:Array,ew="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var uc=0,M3e=ew.length;uc0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function R3e(e){var t=DU(e),r=t[0],n=t[1];return(r+n)*3/4-n}function N3e(e,t,r){return(t+r)*3/4-r}function F3e(e){var t,r=DU(e),n=r[0],o=r[1],i=new D3e(N3e(e,n,o)),a=0,s=o>0?n-4:n,l;for(l=0;l>16&255,i[a++]=t>>8&255,i[a++]=t&255;return o===2&&(t=co[e.charCodeAt(l)]<<2|co[e.charCodeAt(l+1)]>>4,i[a++]=t&255),o===1&&(t=co[e.charCodeAt(l)]<<10|co[e.charCodeAt(l+1)]<<4|co[e.charCodeAt(l+2)]>>2,i[a++]=t>>8&255,i[a++]=t&255),i}function B3e(e){return bi[e>>18&63]+bi[e>>12&63]+bi[e>>6&63]+bi[e&63]}function j3e(e,t,r){for(var n,o=[],i=t;is?s:a+i));return n===1?(t=e[r-1],o.push(bi[t>>2]+bi[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],o.push(bi[t>>10]+bi[t>>4&63]+bi[t<<2&63]+"=")),o.join("")}var ky={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ky.read=function(e,t,r,n,o){var i,a,s=o*8-n-1,l=(1<>1,u=-7,f=r?o-1:0,d=r?-1:1,p=e[t+f];for(f+=d,i=p&(1<<-u)-1,p>>=-u,u+=s;u>0;i=i*256+e[t+f],f+=d,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=n;u>0;a=a*256+e[t+f],f+=d,u-=8);if(i===0)i=1-c;else{if(i===l)return a?NaN:(p?-1:1)*(1/0);a=a+Math.pow(2,n),i=i-c}return(p?-1:1)*a*Math.pow(2,i-n)};ky.write=function(e,t,r,n,o,i){var a,s,l,c=i*8-o-1,u=(1<>1,d=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,h=n?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+f>=1?t+=d/l:t+=d*Math.pow(2,1-f),t*l>=2&&(a++,l/=2),a+f>=u?(s=0,a=u):a+f>=1?(s=(t*l-1)*Math.pow(2,o),a=a+f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+p]=s&255,p+=h,s/=256,o-=8);for(a=a<0;e[r+p]=a&255,p+=h,a/=256,c-=8);e[r+p-h]|=m*128};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */(function(e){const t=oh,r=ky,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const W=new Uint8Array(1),x={foo:function(){return 42}};return Object.setPrototypeOf(x,Uint8Array.prototype),Object.setPrototypeOf(W,x),W.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(W){if(W>o)throw new RangeError('The value "'+W+'" is invalid for option "size"');const x=new Uint8Array(W);return Object.setPrototypeOf(x,s.prototype),x}function s(W,x,k){if(typeof W=="number"){if(typeof x=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(W)}return l(W,x,k)}s.poolSize=8192;function l(W,x,k){if(typeof W=="string")return d(W,x);if(ArrayBuffer.isView(W))return h(W);if(W==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof W);if(we(W,ArrayBuffer)||W&&we(W.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(we(W,SharedArrayBuffer)||W&&we(W.buffer,SharedArrayBuffer)))return m(W,x,k);if(typeof W=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Y=W.valueOf&&W.valueOf();if(Y!=null&&Y!==W)return s.from(Y,x,k);const re=_(W);if(re)return re;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof W[Symbol.toPrimitive]=="function")return s.from(W[Symbol.toPrimitive]("string"),x,k);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof W)}s.from=function(W,x,k){return l(W,x,k)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(W){if(typeof W!="number")throw new TypeError('"size" argument must be of type number');if(W<0)throw new RangeError('The value "'+W+'" is invalid for option "size"')}function u(W,x,k){return c(W),W<=0?a(W):x!==void 0?typeof k=="string"?a(W).fill(x,k):a(W).fill(x):a(W)}s.alloc=function(W,x,k){return u(W,x,k)};function f(W){return c(W),a(W<0?0:w(W)|0)}s.allocUnsafe=function(W){return f(W)},s.allocUnsafeSlow=function(W){return f(W)};function d(W,x){if((typeof x!="string"||x==="")&&(x="utf8"),!s.isEncoding(x))throw new TypeError("Unknown encoding: "+x);const k=C(W,x)|0;let Y=a(k);const re=Y.write(W,x);return re!==k&&(Y=Y.slice(0,re)),Y}function p(W){const x=W.length<0?0:w(W.length)|0,k=a(x);for(let Y=0;Y=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return W|0}function y(W){return+W!=W&&(W=0),s.alloc(+W)}s.isBuffer=function(x){return x!=null&&x._isBuffer===!0&&x!==s.prototype},s.compare=function(x,k){if(we(x,Uint8Array)&&(x=s.from(x,x.offset,x.byteLength)),we(k,Uint8Array)&&(k=s.from(k,k.offset,k.byteLength)),!s.isBuffer(x)||!s.isBuffer(k))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(x===k)return 0;let Y=x.length,re=k.length;for(let fe=0,le=Math.min(Y,re);fere.length?(s.isBuffer(le)||(le=s.from(le)),le.copy(re,fe)):Uint8Array.prototype.set.call(re,le,fe);else if(s.isBuffer(le))le.copy(re,fe);else throw new TypeError('"list" argument must be an Array of Buffers');fe+=le.length}return re};function C(W,x){if(s.isBuffer(W))return W.length;if(ArrayBuffer.isView(W)||we(W,ArrayBuffer))return W.byteLength;if(typeof W!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof W);const k=W.length,Y=arguments.length>2&&arguments[2]===!0;if(!Y&&k===0)return 0;let re=!1;for(;;)switch(x){case"ascii":case"latin1":case"binary":return k;case"utf8":case"utf-8":return R(W).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k*2;case"hex":return k>>>1;case"base64":return Q(W).length;default:if(re)return Y?-1:R(W).length;x=(""+x).toLowerCase(),re=!0}}s.byteLength=C;function I(W,x,k){let Y=!1;if((x===void 0||x<0)&&(x=0),x>this.length||((k===void 0||k>this.length)&&(k=this.length),k<=0)||(k>>>=0,x>>>=0,k<=x))return"";for(W||(W="utf8");;)switch(W){case"hex":return U(this,x,k);case"utf8":case"utf-8":return v(this,x,k);case"ascii":return M(this,x,k);case"latin1":case"binary":return j(this,x,k);case"base64":return S(this,x,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,x,k);default:if(Y)throw new TypeError("Unknown encoding: "+W);W=(W+"").toLowerCase(),Y=!0}}s.prototype._isBuffer=!0;function F(W,x,k){const Y=W[x];W[x]=W[k],W[k]=Y}s.prototype.swap16=function(){const x=this.length;if(x%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let k=0;kk&&(x+=" ... "),""},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(x,k,Y,re,fe){if(we(x,Uint8Array)&&(x=s.from(x,x.offset,x.byteLength)),!s.isBuffer(x))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof x);if(k===void 0&&(k=0),Y===void 0&&(Y=x?x.length:0),re===void 0&&(re=0),fe===void 0&&(fe=this.length),k<0||Y>x.length||re<0||fe>this.length)throw new RangeError("out of range index");if(re>=fe&&k>=Y)return 0;if(re>=fe)return-1;if(k>=Y)return 1;if(k>>>=0,Y>>>=0,re>>>=0,fe>>>=0,this===x)return 0;let le=fe-re,xe=Y-k;const _e=Math.min(le,xe),ke=this.slice(re,fe),$e=x.slice(k,Y);for(let Ne=0;Ne<_e;++Ne)if(ke[Ne]!==$e[Ne]){le=ke[Ne],xe=$e[Ne];break}return le2147483647?k=2147483647:k<-2147483648&&(k=-2147483648),k=+k,Se(k)&&(k=re?0:W.length-1),k<0&&(k=W.length+k),k>=W.length){if(re)return-1;k=W.length-1}else if(k<0)if(re)k=0;else return-1;if(typeof x=="string"&&(x=s.from(x,Y)),s.isBuffer(x))return x.length===0?-1:g(W,x,k,Y,re);if(typeof x=="number")return x=x&255,typeof Uint8Array.prototype.indexOf=="function"?re?Uint8Array.prototype.indexOf.call(W,x,k):Uint8Array.prototype.lastIndexOf.call(W,x,k):g(W,[x],k,Y,re);throw new TypeError("val must be string, number or Buffer")}function g(W,x,k,Y,re){let fe=1,le=W.length,xe=x.length;if(Y!==void 0&&(Y=String(Y).toLowerCase(),Y==="ucs2"||Y==="ucs-2"||Y==="utf16le"||Y==="utf-16le")){if(W.length<2||x.length<2)return-1;fe=2,le/=2,xe/=2,k/=2}function _e($e,Ne){return fe===1?$e[Ne]:$e.readUInt16BE(Ne*fe)}let ke;if(re){let $e=-1;for(ke=k;kele&&(k=le-xe),ke=k;ke>=0;ke--){let $e=!0;for(let Ne=0;Nere&&(Y=re)):Y=re;const fe=x.length;Y>fe/2&&(Y=fe/2);let le;for(le=0;le>>0,isFinite(Y)?(Y=Y>>>0,re===void 0&&(re="utf8")):(re=Y,Y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const fe=this.length-k;if((Y===void 0||Y>fe)&&(Y=fe),x.length>0&&(Y<0||k<0)||k>this.length)throw new RangeError("Attempt to write outside buffer bounds");re||(re="utf8");let le=!1;for(;;)switch(re){case"hex":return D(this,x,k,Y);case"utf8":case"utf-8":return H(this,x,k,Y);case"ascii":case"latin1":case"binary":return G(this,x,k,Y);case"base64":return V(this,x,k,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,x,k,Y);default:if(le)throw new TypeError("Unknown encoding: "+re);re=(""+re).toLowerCase(),le=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(W,x,k){return x===0&&k===W.length?t.fromByteArray(W):t.fromByteArray(W.slice(x,k))}function v(W,x,k){k=Math.min(W.length,k);const Y=[];let re=x;for(;re239?4:fe>223?3:fe>191?2:1;if(re+xe<=k){let _e,ke,$e,Ne;switch(xe){case 1:fe<128&&(le=fe);break;case 2:_e=W[re+1],(_e&192)===128&&(Ne=(fe&31)<<6|_e&63,Ne>127&&(le=Ne));break;case 3:_e=W[re+1],ke=W[re+2],(_e&192)===128&&(ke&192)===128&&(Ne=(fe&15)<<12|(_e&63)<<6|ke&63,Ne>2047&&(Ne<55296||Ne>57343)&&(le=Ne));break;case 4:_e=W[re+1],ke=W[re+2],$e=W[re+3],(_e&192)===128&&(ke&192)===128&&($e&192)===128&&(Ne=(fe&15)<<18|(_e&63)<<12|(ke&63)<<6|$e&63,Ne>65535&&Ne<1114112&&(le=Ne))}}le===null?(le=65533,xe=1):le>65535&&(le-=65536,Y.push(le>>>10&1023|55296),le=56320|le&1023),Y.push(le),re+=xe}return B(Y)}const b=4096;function B(W){const x=W.length;if(x<=b)return String.fromCharCode.apply(String,W);let k="",Y=0;for(;YY)&&(k=Y);let re="";for(let fe=x;feY&&(x=Y),k<0?(k+=Y,k<0&&(k=0)):k>Y&&(k=Y),kk)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(x,k,Y){x=x>>>0,k=k>>>0,Y||N(x,k,this.length);let re=this[x],fe=1,le=0;for(;++le>>0,k=k>>>0,Y||N(x,k,this.length);let re=this[x+--k],fe=1;for(;k>0&&(fe*=256);)re+=this[x+--k]*fe;return re},s.prototype.readUint8=s.prototype.readUInt8=function(x,k){return x=x>>>0,k||N(x,1,this.length),this[x]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(x,k){return x=x>>>0,k||N(x,2,this.length),this[x]|this[x+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(x,k){return x=x>>>0,k||N(x,2,this.length),this[x]<<8|this[x+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(x,k){return x=x>>>0,k||N(x,4,this.length),(this[x]|this[x+1]<<8|this[x+2]<<16)+this[x+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(x,k){return x=x>>>0,k||N(x,4,this.length),this[x]*16777216+(this[x+1]<<16|this[x+2]<<8|this[x+3])},s.prototype.readBigUInt64LE=Ae(function(x){x=x>>>0,se(x,"offset");const k=this[x],Y=this[x+7];(k===void 0||Y===void 0)&&pe(x,this.length-8);const re=k+this[++x]*2**8+this[++x]*2**16+this[++x]*2**24,fe=this[++x]+this[++x]*2**8+this[++x]*2**16+Y*2**24;return BigInt(re)+(BigInt(fe)<>>0,se(x,"offset");const k=this[x],Y=this[x+7];(k===void 0||Y===void 0)&&pe(x,this.length-8);const re=k*2**24+this[++x]*2**16+this[++x]*2**8+this[++x],fe=this[++x]*2**24+this[++x]*2**16+this[++x]*2**8+Y;return(BigInt(re)<>>0,k=k>>>0,Y||N(x,k,this.length);let re=this[x],fe=1,le=0;for(;++le=fe&&(re-=Math.pow(2,8*k)),re},s.prototype.readIntBE=function(x,k,Y){x=x>>>0,k=k>>>0,Y||N(x,k,this.length);let re=k,fe=1,le=this[x+--re];for(;re>0&&(fe*=256);)le+=this[x+--re]*fe;return fe*=128,le>=fe&&(le-=Math.pow(2,8*k)),le},s.prototype.readInt8=function(x,k){return x=x>>>0,k||N(x,1,this.length),this[x]&128?(255-this[x]+1)*-1:this[x]},s.prototype.readInt16LE=function(x,k){x=x>>>0,k||N(x,2,this.length);const Y=this[x]|this[x+1]<<8;return Y&32768?Y|4294901760:Y},s.prototype.readInt16BE=function(x,k){x=x>>>0,k||N(x,2,this.length);const Y=this[x+1]|this[x]<<8;return Y&32768?Y|4294901760:Y},s.prototype.readInt32LE=function(x,k){return x=x>>>0,k||N(x,4,this.length),this[x]|this[x+1]<<8|this[x+2]<<16|this[x+3]<<24},s.prototype.readInt32BE=function(x,k){return x=x>>>0,k||N(x,4,this.length),this[x]<<24|this[x+1]<<16|this[x+2]<<8|this[x+3]},s.prototype.readBigInt64LE=Ae(function(x){x=x>>>0,se(x,"offset");const k=this[x],Y=this[x+7];(k===void 0||Y===void 0)&&pe(x,this.length-8);const re=this[x+4]+this[x+5]*2**8+this[x+6]*2**16+(Y<<24);return(BigInt(re)<>>0,se(x,"offset");const k=this[x],Y=this[x+7];(k===void 0||Y===void 0)&&pe(x,this.length-8);const re=(k<<24)+this[++x]*2**16+this[++x]*2**8+this[++x];return(BigInt(re)<>>0,k||N(x,4,this.length),r.read(this,x,!0,23,4)},s.prototype.readFloatBE=function(x,k){return x=x>>>0,k||N(x,4,this.length),r.read(this,x,!1,23,4)},s.prototype.readDoubleLE=function(x,k){return x=x>>>0,k||N(x,8,this.length),r.read(this,x,!0,52,8)},s.prototype.readDoubleBE=function(x,k){return x=x>>>0,k||N(x,8,this.length),r.read(this,x,!1,52,8)};function T(W,x,k,Y,re,fe){if(!s.isBuffer(W))throw new TypeError('"buffer" argument must be a Buffer instance');if(x>re||xW.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(x,k,Y,re){if(x=+x,k=k>>>0,Y=Y>>>0,!re){const xe=Math.pow(2,8*Y)-1;T(this,x,k,Y,xe,0)}let fe=1,le=0;for(this[k]=x&255;++le>>0,Y=Y>>>0,!re){const xe=Math.pow(2,8*Y)-1;T(this,x,k,Y,xe,0)}let fe=Y-1,le=1;for(this[k+fe]=x&255;--fe>=0&&(le*=256);)this[k+fe]=x/le&255;return k+Y},s.prototype.writeUint8=s.prototype.writeUInt8=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,1,255,0),this[k]=x&255,k+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,2,65535,0),this[k]=x&255,this[k+1]=x>>>8,k+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,2,65535,0),this[k]=x>>>8,this[k+1]=x&255,k+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,4,4294967295,0),this[k+3]=x>>>24,this[k+2]=x>>>16,this[k+1]=x>>>8,this[k]=x&255,k+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,4,4294967295,0),this[k]=x>>>24,this[k+1]=x>>>16,this[k+2]=x>>>8,this[k+3]=x&255,k+4};function q(W,x,k,Y,re){ee(x,Y,re,W,k,7);let fe=Number(x&BigInt(4294967295));W[k++]=fe,fe=fe>>8,W[k++]=fe,fe=fe>>8,W[k++]=fe,fe=fe>>8,W[k++]=fe;let le=Number(x>>BigInt(32)&BigInt(4294967295));return W[k++]=le,le=le>>8,W[k++]=le,le=le>>8,W[k++]=le,le=le>>8,W[k++]=le,k}function J(W,x,k,Y,re){ee(x,Y,re,W,k,7);let fe=Number(x&BigInt(4294967295));W[k+7]=fe,fe=fe>>8,W[k+6]=fe,fe=fe>>8,W[k+5]=fe,fe=fe>>8,W[k+4]=fe;let le=Number(x>>BigInt(32)&BigInt(4294967295));return W[k+3]=le,le=le>>8,W[k+2]=le,le=le>>8,W[k+1]=le,le=le>>8,W[k]=le,k+8}s.prototype.writeBigUInt64LE=Ae(function(x,k=0){return q(this,x,k,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Ae(function(x,k=0){return J(this,x,k,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(x,k,Y,re){if(x=+x,k=k>>>0,!re){const _e=Math.pow(2,8*Y-1);T(this,x,k,Y,_e-1,-_e)}let fe=0,le=1,xe=0;for(this[k]=x&255;++fe>0)-xe&255;return k+Y},s.prototype.writeIntBE=function(x,k,Y,re){if(x=+x,k=k>>>0,!re){const _e=Math.pow(2,8*Y-1);T(this,x,k,Y,_e-1,-_e)}let fe=Y-1,le=1,xe=0;for(this[k+fe]=x&255;--fe>=0&&(le*=256);)x<0&&xe===0&&this[k+fe+1]!==0&&(xe=1),this[k+fe]=(x/le>>0)-xe&255;return k+Y},s.prototype.writeInt8=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,1,127,-128),x<0&&(x=255+x+1),this[k]=x&255,k+1},s.prototype.writeInt16LE=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,2,32767,-32768),this[k]=x&255,this[k+1]=x>>>8,k+2},s.prototype.writeInt16BE=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,2,32767,-32768),this[k]=x>>>8,this[k+1]=x&255,k+2},s.prototype.writeInt32LE=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,4,2147483647,-2147483648),this[k]=x&255,this[k+1]=x>>>8,this[k+2]=x>>>16,this[k+3]=x>>>24,k+4},s.prototype.writeInt32BE=function(x,k,Y){return x=+x,k=k>>>0,Y||T(this,x,k,4,2147483647,-2147483648),x<0&&(x=4294967295+x+1),this[k]=x>>>24,this[k+1]=x>>>16,this[k+2]=x>>>8,this[k+3]=x&255,k+4},s.prototype.writeBigInt64LE=Ae(function(x,k=0){return q(this,x,k,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Ae(function(x,k=0){return J(this,x,k,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function te(W,x,k,Y,re,fe){if(k+Y>W.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("Index out of range")}function ne(W,x,k,Y,re){return x=+x,k=k>>>0,re||te(W,x,k,4),r.write(W,x,k,Y,23,4),k+4}s.prototype.writeFloatLE=function(x,k,Y){return ne(this,x,k,!0,Y)},s.prototype.writeFloatBE=function(x,k,Y){return ne(this,x,k,!1,Y)};function ce(W,x,k,Y,re){return x=+x,k=k>>>0,re||te(W,x,k,8),r.write(W,x,k,Y,52,8),k+8}s.prototype.writeDoubleLE=function(x,k,Y){return ce(this,x,k,!0,Y)},s.prototype.writeDoubleBE=function(x,k,Y){return ce(this,x,k,!1,Y)},s.prototype.copy=function(x,k,Y,re){if(!s.isBuffer(x))throw new TypeError("argument should be a Buffer");if(Y||(Y=0),!re&&re!==0&&(re=this.length),k>=x.length&&(k=x.length),k||(k=0),re>0&&re=this.length)throw new RangeError("Index out of range");if(re<0)throw new RangeError("sourceEnd out of bounds");re>this.length&&(re=this.length),x.length-k>>0,Y=Y===void 0?this.length:Y>>>0,x||(x=0);let fe;if(typeof x=="number")for(fe=k;fe2**32?re=A(String(k)):typeof k=="bigint"&&(re=String(k),(k>BigInt(2)**BigInt(32)||k<-(BigInt(2)**BigInt(32)))&&(re=A(re)),re+="n"),Y+=` It must be ${x}. Received ${re}`,Y},RangeError);function A(W){let x="",k=W.length;const Y=W[0]==="-"?1:0;for(;k>=Y+4;k-=3)x=`_${W.slice(k-3,k)}${x}`;return`${W.slice(0,k)}${x}`}function K(W,x,k){se(x,"offset"),(W[x]===void 0||W[x+k]===void 0)&&pe(x,W.length-(k+1))}function ee(W,x,k,Y,re,fe){if(W>k||W3?x===0||x===BigInt(0)?xe=`>= 0${le} and < 2${le} ** ${(fe+1)*8}${le}`:xe=`>= -(2${le} ** ${(fe+1)*8-1}${le}) and < 2 ** ${(fe+1)*8-1}${le}`:xe=`>= ${x}${le} and <= ${k}${le}`,new ie.ERR_OUT_OF_RANGE("value",xe,W)}K(Y,re,fe)}function se(W,x){if(typeof W!="number")throw new ie.ERR_INVALID_ARG_TYPE(x,"number",W)}function pe(W,x,k){throw Math.floor(W)!==W?(se(W,k),new ie.ERR_OUT_OF_RANGE(k||"offset","an integer",W)):x<0?new ie.ERR_BUFFER_OUT_OF_BOUNDS:new ie.ERR_OUT_OF_RANGE(k||"offset",`>= ${k?1:0} and <= ${x}`,W)}const ge=/[^+/0-9A-Za-z-_]/g;function X(W){if(W=W.split("=")[0],W=W.trim().replace(ge,""),W.length<2)return"";for(;W.length%4!==0;)W=W+"=";return W}function R(W,x){x=x||1/0;let k;const Y=W.length;let re=null;const fe=[];for(let le=0;le55295&&k<57344){if(!re){if(k>56319){(x-=3)>-1&&fe.push(239,191,189);continue}else if(le+1===Y){(x-=3)>-1&&fe.push(239,191,189);continue}re=k;continue}if(k<56320){(x-=3)>-1&&fe.push(239,191,189),re=k;continue}k=(re-55296<<10|k-56320)+65536}else re&&(x-=3)>-1&&fe.push(239,191,189);if(re=null,k<128){if((x-=1)<0)break;fe.push(k)}else if(k<2048){if((x-=2)<0)break;fe.push(k>>6|192,k&63|128)}else if(k<65536){if((x-=3)<0)break;fe.push(k>>12|224,k>>6&63|128,k&63|128)}else if(k<1114112){if((x-=4)<0)break;fe.push(k>>18|240,k>>12&63|128,k>>6&63|128,k&63|128)}else throw new Error("Invalid code point")}return fe}function z(W){const x=[];for(let k=0;k>8,re=k%256,fe.push(re),fe.push(Y);return fe}function Q(W){return t.toByteArray(X(W))}function de(W,x,k,Y){let re;for(re=0;re=x.length||re>=W.length);++re)x[re+k]=W[re];return re}function we(W,x){return W instanceof x||W!=null&&W.constructor!=null&&W.constructor.name!=null&&W.constructor.name===x.name}function Se(W){return W!==W}const Ee=function(){const W="0123456789abcdef",x=new Array(256);for(let k=0;k<16;++k){const Y=k*16;for(let re=0;re<16;++re)x[Y+re]=W[k]+W[re]}return x}();function Ae(W){return typeof BigInt>"u"?Te:W}function Te(){throw new Error("BigInt not supported")}})(Vu);const z3e={},U3e=Object.freeze(Object.defineProperty({__proto__:null,default:z3e},Symbol.toStringTag,{value:"Module"})),Yo=jl(U3e);Object.defineProperty(Ay,"__esModule",{value:!0});Ay.WebCrypto=void 0;const H3e=Vu,tw=Yo,kA=typeof window<"u"&&typeof window.document<"u";class V3e{constructor(){this.subtle=kA?globalThis.crypto.subtle:tw.webcrypto?tw.webcrypto.subtle:crypto.subtle}getRandomValues(t){if(!ArrayBuffer.isView(t))throw new TypeError("Failed to execute 'getRandomValues' on 'Crypto': parameter 1 is not of type 'ArrayBufferView'");const r=H3e.Buffer.from(t.buffer,t.byteOffset,t.byteLength);return kA?globalThis.crypto.getRandomValues(r):(0,tw.randomFillSync)(r),t}}Ay.WebCrypto=V3e;var Iy={},$y={};function W3e(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r>>0,C=new Uint8Array(y);_!==w;){for(var I=p[_],F=0,O=y-1;(I!==0||F>>0,C[O]=I%a>>>0,I=I/a>>>0;if(I!==0)throw new Error("Non-zero carry");m=F,_++}for(var g=y-m;g!==y&&C[g]===0;)g++;for(var D=s.repeat(h);g>>0,y=new Uint8Array(w);p[h];){var C=t[p.charCodeAt(h)];if(C===255)return;for(var I=0,F=w-1;(C!==0||I<_)&&F!==-1;F--,I++)C+=a*y[F]>>>0,y[F]=C%256>>>0,C=C/256>>>0;if(C!==0)throw new Error("Non-zero carry");_=I,h++}for(var O=w-_;O!==w&&y[O]===0;)O++;for(var g=new Uint8Array(m+(w-O)),D=m;O!==w;)g[D++]=y[O++];return g}function d(p){var h=f(p);if(h)return h;throw new Error("Non-base"+a+" character")}return{encode:u,decodeUnsafe:f,decode:d}}var q3e=W3e;(function(e){var t=Le&&Le.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.isBase58=e.bs58=void 0;const r=t(q3e),n="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";e.bs58=(0,r.default)(n);function o(i){if(i===""||i.trim()==="")return!1;try{return e.bs58.encode(e.bs58.decode(i))===i}catch{return!1}}e.isBase58=o,e.default=e.bs58})($y);var ih={};Object.defineProperty(ih,"__esModule",{value:!0});function G3e(e){let t=5381;for(let r=0;r>24,r=e>>16,n=e>>8;return t^r^n^e}function J3e(e){return e&255}var ht={},c4={};const Q3e="elliptic",exe="6.5.4",txe="EC cryptography",rxe="lib/elliptic.js",nxe=["lib"],oxe={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},ixe={type:"git",url:"git@github.com:indutny/elliptic"},axe=["EC","Elliptic","curve","Cryptography"],sxe="Fedor Indutny ",lxe="MIT",cxe={url:"https://github.com/indutny/elliptic/issues"},uxe="https://github.com/indutny/elliptic",fxe={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dxe={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},pxe={name:Q3e,version:exe,description:txe,main:rxe,files:nxe,scripts:oxe,repository:ixe,keywords:axe,author:sxe,license:lxe,bugs:cxe,homepage:uxe,devDependencies:fxe,dependencies:dxe};var Qn={},u4={exports:{}};u4.exports;(function(e){(function(t,r){function n(V,P){if(!V)throw new Error(P||"Assertion failed")}function o(V,P){V.super_=P;var S=function(){};S.prototype=P.prototype,V.prototype=new S,V.prototype.constructor=V}function i(V,P,S){if(i.isBN(V))return V;this.negative=0,this.words=null,this.length=0,this.red=null,V!==null&&((P==="le"||P==="be")&&(S=P,P=10),this._init(V||0,P||10,S||"be"))}typeof t=="object"?t.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=Yo.Buffer}catch{}i.isBN=function(P){return P instanceof i?!0:P!==null&&typeof P=="object"&&P.constructor.wordSize===i.wordSize&&Array.isArray(P.words)},i.max=function(P,S){return P.cmp(S)>0?P:S},i.min=function(P,S){return P.cmp(S)<0?P:S},i.prototype._init=function(P,S,v){if(typeof P=="number")return this._initNumber(P,S,v);if(typeof P=="object")return this._initArray(P,S,v);S==="hex"&&(S=16),n(S===(S|0)&&S>=2&&S<=36),P=P.toString().replace(/\s+/g,"");var b=0;P[0]==="-"&&(b++,this.negative=1),b=0;b-=3)M=P[b]|P[b-1]<<8|P[b-2]<<16,this.words[B]|=M<>>26-j&67108863,j+=24,j>=26&&(j-=26,B++);else if(v==="le")for(b=0,B=0;b>>26-j&67108863,j+=24,j>=26&&(j-=26,B++);return this.strip()};function s(V,P){var S=V.charCodeAt(P);return S>=65&&S<=70?S-55:S>=97&&S<=102?S-87:S-48&15}function l(V,P,S){var v=s(V,S);return S-1>=P&&(v|=s(V,S-1)<<4),v}i.prototype._parseHex=function(P,S,v){this.length=Math.ceil((P.length-S)/6),this.words=new Array(this.length);for(var b=0;b=S;b-=2)j=l(P,S,b)<=18?(B-=18,M+=1,this.words[M]|=j>>>26):B+=8;else{var U=P.length-S;for(b=U%2===0?S+1:S;b=18?(B-=18,M+=1,this.words[M]|=j>>>26):B+=8}this.strip()};function c(V,P,S,v){for(var b=0,B=Math.min(V.length,S),M=P;M=49?b+=j-49+10:j>=17?b+=j-17+10:b+=j}return b}i.prototype._parseBase=function(P,S,v){this.words=[0],this.length=1;for(var b=0,B=1;B<=67108863;B*=S)b++;b--,B=B/S|0;for(var M=P.length-v,j=M%b,U=Math.min(M,M-j)+v,E=0,N=v;N1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(P,S){P=P||10,S=S|0||1;var v;if(P===16||P==="hex"){v="";for(var b=0,B=0,M=0;M>>24-b&16777215,B!==0||M!==this.length-1?v=u[6-U.length]+U+v:v=U+v,b+=2,b>=26&&(b-=26,M--)}for(B!==0&&(v=B.toString(16)+v);v.length%S!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(P===(P|0)&&P>=2&&P<=36){var E=f[P],N=d[P];v="";var T=this.clone();for(T.negative=0;!T.isZero();){var q=T.modn(N).toString(P);T=T.idivn(N),T.isZero()?v=q+v:v=u[E-q.length]+q+v}for(this.isZero()&&(v="0"+v);v.length%S!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var P=this.words[0];return this.length===2?P+=this.words[1]*67108864:this.length===3&&this.words[2]===1?P+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-P:P},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(P,S){return n(typeof a<"u"),this.toArrayLike(a,P,S)},i.prototype.toArray=function(P,S){return this.toArrayLike(Array,P,S)},i.prototype.toArrayLike=function(P,S,v){var b=this.byteLength(),B=v||Math.max(1,b);n(b<=B,"byte array longer than desired length"),n(B>0,"Requested array length <= 0"),this.strip();var M=S==="le",j=new P(B),U,E,N=this.clone();if(M){for(E=0;!N.isZero();E++)U=N.andln(255),N.iushrn(8),j[E]=U;for(;E=4096&&(v+=13,S>>>=13),S>=64&&(v+=7,S>>>=7),S>=8&&(v+=4,S>>>=4),S>=2&&(v+=2,S>>>=2),v+S},i.prototype._zeroBits=function(P){if(P===0)return 26;var S=P,v=0;return S&8191||(v+=13,S>>>=13),S&127||(v+=7,S>>>=7),S&15||(v+=4,S>>>=4),S&3||(v+=2,S>>>=2),S&1||v++,v},i.prototype.bitLength=function(){var P=this.words[this.length-1],S=this._countBits(P);return(this.length-1)*26+S};function p(V){for(var P=new Array(V.bitLength()),S=0;S>>b}return P}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var P=0,S=0;SP.length?this.clone().ior(P):P.clone().ior(this)},i.prototype.uor=function(P){return this.length>P.length?this.clone().iuor(P):P.clone().iuor(this)},i.prototype.iuand=function(P){var S;this.length>P.length?S=P:S=this;for(var v=0;vP.length?this.clone().iand(P):P.clone().iand(this)},i.prototype.uand=function(P){return this.length>P.length?this.clone().iuand(P):P.clone().iuand(this)},i.prototype.iuxor=function(P){var S,v;this.length>P.length?(S=this,v=P):(S=P,v=this);for(var b=0;bP.length?this.clone().ixor(P):P.clone().ixor(this)},i.prototype.uxor=function(P){return this.length>P.length?this.clone().iuxor(P):P.clone().iuxor(this)},i.prototype.inotn=function(P){n(typeof P=="number"&&P>=0);var S=Math.ceil(P/26)|0,v=P%26;this._expand(S),v>0&&S--;for(var b=0;b0&&(this.words[b]=~this.words[b]&67108863>>26-v),this.strip()},i.prototype.notn=function(P){return this.clone().inotn(P)},i.prototype.setn=function(P,S){n(typeof P=="number"&&P>=0);var v=P/26|0,b=P%26;return this._expand(v+1),S?this.words[v]=this.words[v]|1<P.length?(v=this,b=P):(v=P,b=this);for(var B=0,M=0;M>>26;for(;B!==0&&M>>26;if(this.length=v.length,B!==0)this.words[this.length]=B,this.length++;else if(v!==this)for(;MP.length?this.clone().iadd(P):P.clone().iadd(this)},i.prototype.isub=function(P){if(P.negative!==0){P.negative=0;var S=this.iadd(P);return P.negative=1,S._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(P),this.negative=1,this._normSign();var v=this.cmp(P);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var b,B;v>0?(b=this,B=P):(b=P,B=this);for(var M=0,j=0;j>26,this.words[j]=S&67108863;for(;M!==0&&j>26,this.words[j]=S&67108863;if(M===0&&j>>26,T=U&67108863,q=Math.min(E,P.length-1),J=Math.max(0,E-V.length+1);J<=q;J++){var te=E-J|0;b=V.words[te]|0,B=P.words[J]|0,M=b*B+T,N+=M/67108864|0,T=M&67108863}S.words[E]=T|0,U=N|0}return U!==0?S.words[E]=U|0:S.length--,S.strip()}var m=function(P,S,v){var b=P.words,B=S.words,M=v.words,j=0,U,E,N,T=b[0]|0,q=T&8191,J=T>>>13,te=b[1]|0,ne=te&8191,ce=te>>>13,ie=b[2]|0,ue=ie&8191,A=ie>>>13,K=b[3]|0,ee=K&8191,se=K>>>13,pe=b[4]|0,ge=pe&8191,X=pe>>>13,R=b[5]|0,z=R&8191,Z=R>>>13,Q=b[6]|0,de=Q&8191,we=Q>>>13,Se=b[7]|0,Ee=Se&8191,Ae=Se>>>13,Te=b[8]|0,W=Te&8191,x=Te>>>13,k=b[9]|0,Y=k&8191,re=k>>>13,fe=B[0]|0,le=fe&8191,xe=fe>>>13,_e=B[1]|0,ke=_e&8191,$e=_e>>>13,Ne=B[2]|0,We=Ne&8191,gt=Ne>>>13,ft=B[3]|0,Ye=ft&8191,Je=ft>>>13,tt=B[4]|0,ve=tt&8191,oe=tt>>>13,he=B[5]|0,be=he&8191,Ce=he>>>13,Oe=B[6]|0,Ie=Oe&8191,De=Oe>>>13,je=B[7]|0,Me=je&8191,He=je>>>13,qe=B[8]|0,ze=qe&8191,it=qe>>>13,Be=B[9]|0,Ke=Be&8191,mt=Be>>>13;v.negative=P.negative^S.negative,v.length=19,U=Math.imul(q,le),E=Math.imul(q,xe),E=E+Math.imul(J,le)|0,N=Math.imul(J,xe);var ct=(j+U|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(ct>>>26)|0,ct&=67108863,U=Math.imul(ne,le),E=Math.imul(ne,xe),E=E+Math.imul(ce,le)|0,N=Math.imul(ce,xe),U=U+Math.imul(q,ke)|0,E=E+Math.imul(q,$e)|0,E=E+Math.imul(J,ke)|0,N=N+Math.imul(J,$e)|0;var Ct=(j+U|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,U=Math.imul(ue,le),E=Math.imul(ue,xe),E=E+Math.imul(A,le)|0,N=Math.imul(A,xe),U=U+Math.imul(ne,ke)|0,E=E+Math.imul(ne,$e)|0,E=E+Math.imul(ce,ke)|0,N=N+Math.imul(ce,$e)|0,U=U+Math.imul(q,We)|0,E=E+Math.imul(q,gt)|0,E=E+Math.imul(J,We)|0,N=N+Math.imul(J,gt)|0;var xn=(j+U|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(xn>>>26)|0,xn&=67108863,U=Math.imul(ee,le),E=Math.imul(ee,xe),E=E+Math.imul(se,le)|0,N=Math.imul(se,xe),U=U+Math.imul(ue,ke)|0,E=E+Math.imul(ue,$e)|0,E=E+Math.imul(A,ke)|0,N=N+Math.imul(A,$e)|0,U=U+Math.imul(ne,We)|0,E=E+Math.imul(ne,gt)|0,E=E+Math.imul(ce,We)|0,N=N+Math.imul(ce,gt)|0,U=U+Math.imul(q,Ye)|0,E=E+Math.imul(q,Je)|0,E=E+Math.imul(J,Ye)|0,N=N+Math.imul(J,Je)|0;var Nn=(j+U|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,U=Math.imul(ge,le),E=Math.imul(ge,xe),E=E+Math.imul(X,le)|0,N=Math.imul(X,xe),U=U+Math.imul(ee,ke)|0,E=E+Math.imul(ee,$e)|0,E=E+Math.imul(se,ke)|0,N=N+Math.imul(se,$e)|0,U=U+Math.imul(ue,We)|0,E=E+Math.imul(ue,gt)|0,E=E+Math.imul(A,We)|0,N=N+Math.imul(A,gt)|0,U=U+Math.imul(ne,Ye)|0,E=E+Math.imul(ne,Je)|0,E=E+Math.imul(ce,Ye)|0,N=N+Math.imul(ce,Je)|0,U=U+Math.imul(q,ve)|0,E=E+Math.imul(q,oe)|0,E=E+Math.imul(J,ve)|0,N=N+Math.imul(J,oe)|0;var an=(j+U|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(an>>>26)|0,an&=67108863,U=Math.imul(z,le),E=Math.imul(z,xe),E=E+Math.imul(Z,le)|0,N=Math.imul(Z,xe),U=U+Math.imul(ge,ke)|0,E=E+Math.imul(ge,$e)|0,E=E+Math.imul(X,ke)|0,N=N+Math.imul(X,$e)|0,U=U+Math.imul(ee,We)|0,E=E+Math.imul(ee,gt)|0,E=E+Math.imul(se,We)|0,N=N+Math.imul(se,gt)|0,U=U+Math.imul(ue,Ye)|0,E=E+Math.imul(ue,Je)|0,E=E+Math.imul(A,Ye)|0,N=N+Math.imul(A,Je)|0,U=U+Math.imul(ne,ve)|0,E=E+Math.imul(ne,oe)|0,E=E+Math.imul(ce,ve)|0,N=N+Math.imul(ce,oe)|0,U=U+Math.imul(q,be)|0,E=E+Math.imul(q,Ce)|0,E=E+Math.imul(J,be)|0,N=N+Math.imul(J,Ce)|0;var ai=(j+U|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(ai>>>26)|0,ai&=67108863,U=Math.imul(de,le),E=Math.imul(de,xe),E=E+Math.imul(we,le)|0,N=Math.imul(we,xe),U=U+Math.imul(z,ke)|0,E=E+Math.imul(z,$e)|0,E=E+Math.imul(Z,ke)|0,N=N+Math.imul(Z,$e)|0,U=U+Math.imul(ge,We)|0,E=E+Math.imul(ge,gt)|0,E=E+Math.imul(X,We)|0,N=N+Math.imul(X,gt)|0,U=U+Math.imul(ee,Ye)|0,E=E+Math.imul(ee,Je)|0,E=E+Math.imul(se,Ye)|0,N=N+Math.imul(se,Je)|0,U=U+Math.imul(ue,ve)|0,E=E+Math.imul(ue,oe)|0,E=E+Math.imul(A,ve)|0,N=N+Math.imul(A,oe)|0,U=U+Math.imul(ne,be)|0,E=E+Math.imul(ne,Ce)|0,E=E+Math.imul(ce,be)|0,N=N+Math.imul(ce,Ce)|0,U=U+Math.imul(q,Ie)|0,E=E+Math.imul(q,De)|0,E=E+Math.imul(J,Ie)|0,N=N+Math.imul(J,De)|0;var sn=(j+U|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(sn>>>26)|0,sn&=67108863,U=Math.imul(Ee,le),E=Math.imul(Ee,xe),E=E+Math.imul(Ae,le)|0,N=Math.imul(Ae,xe),U=U+Math.imul(de,ke)|0,E=E+Math.imul(de,$e)|0,E=E+Math.imul(we,ke)|0,N=N+Math.imul(we,$e)|0,U=U+Math.imul(z,We)|0,E=E+Math.imul(z,gt)|0,E=E+Math.imul(Z,We)|0,N=N+Math.imul(Z,gt)|0,U=U+Math.imul(ge,Ye)|0,E=E+Math.imul(ge,Je)|0,E=E+Math.imul(X,Ye)|0,N=N+Math.imul(X,Je)|0,U=U+Math.imul(ee,ve)|0,E=E+Math.imul(ee,oe)|0,E=E+Math.imul(se,ve)|0,N=N+Math.imul(se,oe)|0,U=U+Math.imul(ue,be)|0,E=E+Math.imul(ue,Ce)|0,E=E+Math.imul(A,be)|0,N=N+Math.imul(A,Ce)|0,U=U+Math.imul(ne,Ie)|0,E=E+Math.imul(ne,De)|0,E=E+Math.imul(ce,Ie)|0,N=N+Math.imul(ce,De)|0,U=U+Math.imul(q,Me)|0,E=E+Math.imul(q,He)|0,E=E+Math.imul(J,Me)|0,N=N+Math.imul(J,He)|0;var Bi=(j+U|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,U=Math.imul(W,le),E=Math.imul(W,xe),E=E+Math.imul(x,le)|0,N=Math.imul(x,xe),U=U+Math.imul(Ee,ke)|0,E=E+Math.imul(Ee,$e)|0,E=E+Math.imul(Ae,ke)|0,N=N+Math.imul(Ae,$e)|0,U=U+Math.imul(de,We)|0,E=E+Math.imul(de,gt)|0,E=E+Math.imul(we,We)|0,N=N+Math.imul(we,gt)|0,U=U+Math.imul(z,Ye)|0,E=E+Math.imul(z,Je)|0,E=E+Math.imul(Z,Ye)|0,N=N+Math.imul(Z,Je)|0,U=U+Math.imul(ge,ve)|0,E=E+Math.imul(ge,oe)|0,E=E+Math.imul(X,ve)|0,N=N+Math.imul(X,oe)|0,U=U+Math.imul(ee,be)|0,E=E+Math.imul(ee,Ce)|0,E=E+Math.imul(se,be)|0,N=N+Math.imul(se,Ce)|0,U=U+Math.imul(ue,Ie)|0,E=E+Math.imul(ue,De)|0,E=E+Math.imul(A,Ie)|0,N=N+Math.imul(A,De)|0,U=U+Math.imul(ne,Me)|0,E=E+Math.imul(ne,He)|0,E=E+Math.imul(ce,Me)|0,N=N+Math.imul(ce,He)|0,U=U+Math.imul(q,ze)|0,E=E+Math.imul(q,it)|0,E=E+Math.imul(J,ze)|0,N=N+Math.imul(J,it)|0;var ji=(j+U|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(ji>>>26)|0,ji&=67108863,U=Math.imul(Y,le),E=Math.imul(Y,xe),E=E+Math.imul(re,le)|0,N=Math.imul(re,xe),U=U+Math.imul(W,ke)|0,E=E+Math.imul(W,$e)|0,E=E+Math.imul(x,ke)|0,N=N+Math.imul(x,$e)|0,U=U+Math.imul(Ee,We)|0,E=E+Math.imul(Ee,gt)|0,E=E+Math.imul(Ae,We)|0,N=N+Math.imul(Ae,gt)|0,U=U+Math.imul(de,Ye)|0,E=E+Math.imul(de,Je)|0,E=E+Math.imul(we,Ye)|0,N=N+Math.imul(we,Je)|0,U=U+Math.imul(z,ve)|0,E=E+Math.imul(z,oe)|0,E=E+Math.imul(Z,ve)|0,N=N+Math.imul(Z,oe)|0,U=U+Math.imul(ge,be)|0,E=E+Math.imul(ge,Ce)|0,E=E+Math.imul(X,be)|0,N=N+Math.imul(X,Ce)|0,U=U+Math.imul(ee,Ie)|0,E=E+Math.imul(ee,De)|0,E=E+Math.imul(se,Ie)|0,N=N+Math.imul(se,De)|0,U=U+Math.imul(ue,Me)|0,E=E+Math.imul(ue,He)|0,E=E+Math.imul(A,Me)|0,N=N+Math.imul(A,He)|0,U=U+Math.imul(ne,ze)|0,E=E+Math.imul(ne,it)|0,E=E+Math.imul(ce,ze)|0,N=N+Math.imul(ce,it)|0,U=U+Math.imul(q,Ke)|0,E=E+Math.imul(q,mt)|0,E=E+Math.imul(J,Ke)|0,N=N+Math.imul(J,mt)|0;var Li=(j+U|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Li>>>26)|0,Li&=67108863,U=Math.imul(Y,ke),E=Math.imul(Y,$e),E=E+Math.imul(re,ke)|0,N=Math.imul(re,$e),U=U+Math.imul(W,We)|0,E=E+Math.imul(W,gt)|0,E=E+Math.imul(x,We)|0,N=N+Math.imul(x,gt)|0,U=U+Math.imul(Ee,Ye)|0,E=E+Math.imul(Ee,Je)|0,E=E+Math.imul(Ae,Ye)|0,N=N+Math.imul(Ae,Je)|0,U=U+Math.imul(de,ve)|0,E=E+Math.imul(de,oe)|0,E=E+Math.imul(we,ve)|0,N=N+Math.imul(we,oe)|0,U=U+Math.imul(z,be)|0,E=E+Math.imul(z,Ce)|0,E=E+Math.imul(Z,be)|0,N=N+Math.imul(Z,Ce)|0,U=U+Math.imul(ge,Ie)|0,E=E+Math.imul(ge,De)|0,E=E+Math.imul(X,Ie)|0,N=N+Math.imul(X,De)|0,U=U+Math.imul(ee,Me)|0,E=E+Math.imul(ee,He)|0,E=E+Math.imul(se,Me)|0,N=N+Math.imul(se,He)|0,U=U+Math.imul(ue,ze)|0,E=E+Math.imul(ue,it)|0,E=E+Math.imul(A,ze)|0,N=N+Math.imul(A,it)|0,U=U+Math.imul(ne,Ke)|0,E=E+Math.imul(ne,mt)|0,E=E+Math.imul(ce,Ke)|0,N=N+Math.imul(ce,mt)|0;var zi=(j+U|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(zi>>>26)|0,zi&=67108863,U=Math.imul(Y,We),E=Math.imul(Y,gt),E=E+Math.imul(re,We)|0,N=Math.imul(re,gt),U=U+Math.imul(W,Ye)|0,E=E+Math.imul(W,Je)|0,E=E+Math.imul(x,Ye)|0,N=N+Math.imul(x,Je)|0,U=U+Math.imul(Ee,ve)|0,E=E+Math.imul(Ee,oe)|0,E=E+Math.imul(Ae,ve)|0,N=N+Math.imul(Ae,oe)|0,U=U+Math.imul(de,be)|0,E=E+Math.imul(de,Ce)|0,E=E+Math.imul(we,be)|0,N=N+Math.imul(we,Ce)|0,U=U+Math.imul(z,Ie)|0,E=E+Math.imul(z,De)|0,E=E+Math.imul(Z,Ie)|0,N=N+Math.imul(Z,De)|0,U=U+Math.imul(ge,Me)|0,E=E+Math.imul(ge,He)|0,E=E+Math.imul(X,Me)|0,N=N+Math.imul(X,He)|0,U=U+Math.imul(ee,ze)|0,E=E+Math.imul(ee,it)|0,E=E+Math.imul(se,ze)|0,N=N+Math.imul(se,it)|0,U=U+Math.imul(ue,Ke)|0,E=E+Math.imul(ue,mt)|0,E=E+Math.imul(A,Ke)|0,N=N+Math.imul(A,mt)|0;var Ui=(j+U|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Ui>>>26)|0,Ui&=67108863,U=Math.imul(Y,Ye),E=Math.imul(Y,Je),E=E+Math.imul(re,Ye)|0,N=Math.imul(re,Je),U=U+Math.imul(W,ve)|0,E=E+Math.imul(W,oe)|0,E=E+Math.imul(x,ve)|0,N=N+Math.imul(x,oe)|0,U=U+Math.imul(Ee,be)|0,E=E+Math.imul(Ee,Ce)|0,E=E+Math.imul(Ae,be)|0,N=N+Math.imul(Ae,Ce)|0,U=U+Math.imul(de,Ie)|0,E=E+Math.imul(de,De)|0,E=E+Math.imul(we,Ie)|0,N=N+Math.imul(we,De)|0,U=U+Math.imul(z,Me)|0,E=E+Math.imul(z,He)|0,E=E+Math.imul(Z,Me)|0,N=N+Math.imul(Z,He)|0,U=U+Math.imul(ge,ze)|0,E=E+Math.imul(ge,it)|0,E=E+Math.imul(X,ze)|0,N=N+Math.imul(X,it)|0,U=U+Math.imul(ee,Ke)|0,E=E+Math.imul(ee,mt)|0,E=E+Math.imul(se,Ke)|0,N=N+Math.imul(se,mt)|0;var ro=(j+U|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(ro>>>26)|0,ro&=67108863,U=Math.imul(Y,ve),E=Math.imul(Y,oe),E=E+Math.imul(re,ve)|0,N=Math.imul(re,oe),U=U+Math.imul(W,be)|0,E=E+Math.imul(W,Ce)|0,E=E+Math.imul(x,be)|0,N=N+Math.imul(x,Ce)|0,U=U+Math.imul(Ee,Ie)|0,E=E+Math.imul(Ee,De)|0,E=E+Math.imul(Ae,Ie)|0,N=N+Math.imul(Ae,De)|0,U=U+Math.imul(de,Me)|0,E=E+Math.imul(de,He)|0,E=E+Math.imul(we,Me)|0,N=N+Math.imul(we,He)|0,U=U+Math.imul(z,ze)|0,E=E+Math.imul(z,it)|0,E=E+Math.imul(Z,ze)|0,N=N+Math.imul(Z,it)|0,U=U+Math.imul(ge,Ke)|0,E=E+Math.imul(ge,mt)|0,E=E+Math.imul(X,Ke)|0,N=N+Math.imul(X,mt)|0;var Hi=(j+U|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Hi>>>26)|0,Hi&=67108863,U=Math.imul(Y,be),E=Math.imul(Y,Ce),E=E+Math.imul(re,be)|0,N=Math.imul(re,Ce),U=U+Math.imul(W,Ie)|0,E=E+Math.imul(W,De)|0,E=E+Math.imul(x,Ie)|0,N=N+Math.imul(x,De)|0,U=U+Math.imul(Ee,Me)|0,E=E+Math.imul(Ee,He)|0,E=E+Math.imul(Ae,Me)|0,N=N+Math.imul(Ae,He)|0,U=U+Math.imul(de,ze)|0,E=E+Math.imul(de,it)|0,E=E+Math.imul(we,ze)|0,N=N+Math.imul(we,it)|0,U=U+Math.imul(z,Ke)|0,E=E+Math.imul(z,mt)|0,E=E+Math.imul(Z,Ke)|0,N=N+Math.imul(Z,mt)|0;var Vi=(j+U|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,U=Math.imul(Y,Ie),E=Math.imul(Y,De),E=E+Math.imul(re,Ie)|0,N=Math.imul(re,De),U=U+Math.imul(W,Me)|0,E=E+Math.imul(W,He)|0,E=E+Math.imul(x,Me)|0,N=N+Math.imul(x,He)|0,U=U+Math.imul(Ee,ze)|0,E=E+Math.imul(Ee,it)|0,E=E+Math.imul(Ae,ze)|0,N=N+Math.imul(Ae,it)|0,U=U+Math.imul(de,Ke)|0,E=E+Math.imul(de,mt)|0,E=E+Math.imul(we,Ke)|0,N=N+Math.imul(we,mt)|0;var Vr=(j+U|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,U=Math.imul(Y,Me),E=Math.imul(Y,He),E=E+Math.imul(re,Me)|0,N=Math.imul(re,He),U=U+Math.imul(W,ze)|0,E=E+Math.imul(W,it)|0,E=E+Math.imul(x,ze)|0,N=N+Math.imul(x,it)|0,U=U+Math.imul(Ee,Ke)|0,E=E+Math.imul(Ee,mt)|0,E=E+Math.imul(Ae,Ke)|0,N=N+Math.imul(Ae,mt)|0;var Wi=(j+U|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,U=Math.imul(Y,ze),E=Math.imul(Y,it),E=E+Math.imul(re,ze)|0,N=Math.imul(re,it),U=U+Math.imul(W,Ke)|0,E=E+Math.imul(W,mt)|0,E=E+Math.imul(x,Ke)|0,N=N+Math.imul(x,mt)|0;var qi=(j+U|0)+((E&8191)<<13)|0;j=(N+(E>>>13)|0)+(qi>>>26)|0,qi&=67108863,U=Math.imul(Y,Ke),E=Math.imul(Y,mt),E=E+Math.imul(re,Ke)|0,N=Math.imul(re,mt);var Gi=(j+U|0)+((E&8191)<<13)|0;return j=(N+(E>>>13)|0)+(Gi>>>26)|0,Gi&=67108863,M[0]=ct,M[1]=Ct,M[2]=xn,M[3]=Nn,M[4]=an,M[5]=ai,M[6]=sn,M[7]=Bi,M[8]=ji,M[9]=Li,M[10]=zi,M[11]=Ui,M[12]=ro,M[13]=Hi,M[14]=Vi,M[15]=Vr,M[16]=Wi,M[17]=qi,M[18]=Gi,j!==0&&(M[19]=j,v.length++),v};Math.imul||(m=h);function _(V,P,S){S.negative=P.negative^V.negative,S.length=V.length+P.length;for(var v=0,b=0,B=0;B>>26)|0,b+=M>>>26,M&=67108863}S.words[B]=j,v=M,M=b}return v!==0?S.words[B]=v:S.length--,S.strip()}function w(V,P,S){var v=new y;return v.mulp(V,P,S)}i.prototype.mulTo=function(P,S){var v,b=this.length+P.length;return this.length===10&&P.length===10?v=m(this,P,S):b<63?v=h(this,P,S):b<1024?v=_(this,P,S):v=w(this,P,S),v};function y(V,P){this.x=V,this.y=P}y.prototype.makeRBT=function(P){for(var S=new Array(P),v=i.prototype._countBits(P)-1,b=0;b>=1;return b},y.prototype.permute=function(P,S,v,b,B,M){for(var j=0;j>>1)B++;return 1<>>13,v[2*M+1]=B&8191,B=B>>>13;for(M=2*S;M>=26,S+=b/67108864|0,S+=B>>>26,this.words[v]=B&67108863}return S!==0&&(this.words[v]=S,this.length++),this},i.prototype.muln=function(P){return this.clone().imuln(P)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(P){var S=p(P);if(S.length===0)return new i(1);for(var v=this,b=0;b=0);var S=P%26,v=(P-S)/26,b=67108863>>>26-S<<26-S,B;if(S!==0){var M=0;for(B=0;B>>26-S}M&&(this.words[B]=M,this.length++)}if(v!==0){for(B=this.length-1;B>=0;B--)this.words[B+v]=this.words[B];for(B=0;B=0);var b;S?b=(S-S%26)/26:b=0;var B=P%26,M=Math.min((P-B)/26,this.length),j=67108863^67108863>>>B<M)for(this.length-=M,E=0;E=0&&(N!==0||E>=b);E--){var T=this.words[E]|0;this.words[E]=N<<26-B|T>>>B,N=T&j}return U&&N!==0&&(U.words[U.length++]=N),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(P,S,v){return n(this.negative===0),this.iushrn(P,S,v)},i.prototype.shln=function(P){return this.clone().ishln(P)},i.prototype.ushln=function(P){return this.clone().iushln(P)},i.prototype.shrn=function(P){return this.clone().ishrn(P)},i.prototype.ushrn=function(P){return this.clone().iushrn(P)},i.prototype.testn=function(P){n(typeof P=="number"&&P>=0);var S=P%26,v=(P-S)/26,b=1<=0);var S=P%26,v=(P-S)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(S!==0&&v++,this.length=Math.min(v,this.length),S!==0){var b=67108863^67108863>>>S<=67108864;S++)this.words[S]-=67108864,S===this.length-1?this.words[S+1]=1:this.words[S+1]++;return this.length=Math.max(this.length,S+1),this},i.prototype.isubn=function(P){if(n(typeof P=="number"),n(P<67108864),P<0)return this.iaddn(-P);if(this.negative!==0)return this.negative=0,this.iaddn(P),this.negative=1,this;if(this.words[0]-=P,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var S=0;S>26)-(U/67108864|0),this.words[B+v]=M&67108863}for(;B>26,this.words[B+v]=M&67108863;if(j===0)return this.strip();for(n(j===-1),j=0,B=0;B>26,this.words[B]=M&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(P,S){var v=this.length-P.length,b=this.clone(),B=P,M=B.words[B.length-1]|0,j=this._countBits(M);v=26-j,v!==0&&(B=B.ushln(v),b.iushln(v),M=B.words[B.length-1]|0);var U=b.length-B.length,E;if(S!=="mod"){E=new i(null),E.length=U+1,E.words=new Array(E.length);for(var N=0;N=0;q--){var J=(b.words[B.length+q]|0)*67108864+(b.words[B.length+q-1]|0);for(J=Math.min(J/M|0,67108863),b._ishlnsubmul(B,J,q);b.negative!==0;)J--,b.negative=0,b._ishlnsubmul(B,1,q),b.isZero()||(b.negative^=1);E&&(E.words[q]=J)}return E&&E.strip(),b.strip(),S!=="div"&&v!==0&&b.iushrn(v),{div:E||null,mod:b}},i.prototype.divmod=function(P,S,v){if(n(!P.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var b,B,M;return this.negative!==0&&P.negative===0?(M=this.neg().divmod(P,S),S!=="mod"&&(b=M.div.neg()),S!=="div"&&(B=M.mod.neg(),v&&B.negative!==0&&B.iadd(P)),{div:b,mod:B}):this.negative===0&&P.negative!==0?(M=this.divmod(P.neg(),S),S!=="mod"&&(b=M.div.neg()),{div:b,mod:M.mod}):this.negative&P.negative?(M=this.neg().divmod(P.neg(),S),S!=="div"&&(B=M.mod.neg(),v&&B.negative!==0&&B.isub(P)),{div:M.div,mod:B}):P.length>this.length||this.cmp(P)<0?{div:new i(0),mod:this}:P.length===1?S==="div"?{div:this.divn(P.words[0]),mod:null}:S==="mod"?{div:null,mod:new i(this.modn(P.words[0]))}:{div:this.divn(P.words[0]),mod:new i(this.modn(P.words[0]))}:this._wordDiv(P,S)},i.prototype.div=function(P){return this.divmod(P,"div",!1).div},i.prototype.mod=function(P){return this.divmod(P,"mod",!1).mod},i.prototype.umod=function(P){return this.divmod(P,"mod",!0).mod},i.prototype.divRound=function(P){var S=this.divmod(P);if(S.mod.isZero())return S.div;var v=S.div.negative!==0?S.mod.isub(P):S.mod,b=P.ushrn(1),B=P.andln(1),M=v.cmp(b);return M<0||B===1&&M===0?S.div:S.div.negative!==0?S.div.isubn(1):S.div.iaddn(1)},i.prototype.modn=function(P){n(P<=67108863);for(var S=(1<<26)%P,v=0,b=this.length-1;b>=0;b--)v=(S*v+(this.words[b]|0))%P;return v},i.prototype.idivn=function(P){n(P<=67108863);for(var S=0,v=this.length-1;v>=0;v--){var b=(this.words[v]|0)+S*67108864;this.words[v]=b/P|0,S=b%P}return this.strip()},i.prototype.divn=function(P){return this.clone().idivn(P)},i.prototype.egcd=function(P){n(P.negative===0),n(!P.isZero());var S=this,v=P.clone();S.negative!==0?S=S.umod(P):S=S.clone();for(var b=new i(1),B=new i(0),M=new i(0),j=new i(1),U=0;S.isEven()&&v.isEven();)S.iushrn(1),v.iushrn(1),++U;for(var E=v.clone(),N=S.clone();!S.isZero();){for(var T=0,q=1;!(S.words[0]&q)&&T<26;++T,q<<=1);if(T>0)for(S.iushrn(T);T-- >0;)(b.isOdd()||B.isOdd())&&(b.iadd(E),B.isub(N)),b.iushrn(1),B.iushrn(1);for(var J=0,te=1;!(v.words[0]&te)&&J<26;++J,te<<=1);if(J>0)for(v.iushrn(J);J-- >0;)(M.isOdd()||j.isOdd())&&(M.iadd(E),j.isub(N)),M.iushrn(1),j.iushrn(1);S.cmp(v)>=0?(S.isub(v),b.isub(M),B.isub(j)):(v.isub(S),M.isub(b),j.isub(B))}return{a:M,b:j,gcd:v.iushln(U)}},i.prototype._invmp=function(P){n(P.negative===0),n(!P.isZero());var S=this,v=P.clone();S.negative!==0?S=S.umod(P):S=S.clone();for(var b=new i(1),B=new i(0),M=v.clone();S.cmpn(1)>0&&v.cmpn(1)>0;){for(var j=0,U=1;!(S.words[0]&U)&&j<26;++j,U<<=1);if(j>0)for(S.iushrn(j);j-- >0;)b.isOdd()&&b.iadd(M),b.iushrn(1);for(var E=0,N=1;!(v.words[0]&N)&&E<26;++E,N<<=1);if(E>0)for(v.iushrn(E);E-- >0;)B.isOdd()&&B.iadd(M),B.iushrn(1);S.cmp(v)>=0?(S.isub(v),b.isub(B)):(v.isub(S),B.isub(b))}var T;return S.cmpn(1)===0?T=b:T=B,T.cmpn(0)<0&&T.iadd(P),T},i.prototype.gcd=function(P){if(this.isZero())return P.abs();if(P.isZero())return this.abs();var S=this.clone(),v=P.clone();S.negative=0,v.negative=0;for(var b=0;S.isEven()&&v.isEven();b++)S.iushrn(1),v.iushrn(1);do{for(;S.isEven();)S.iushrn(1);for(;v.isEven();)v.iushrn(1);var B=S.cmp(v);if(B<0){var M=S;S=v,v=M}else if(B===0||v.cmpn(1)===0)break;S.isub(v)}while(!0);return v.iushln(b)},i.prototype.invm=function(P){return this.egcd(P).a.umod(P)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(P){return this.words[0]&P},i.prototype.bincn=function(P){n(typeof P=="number");var S=P%26,v=(P-S)/26,b=1<>>26,j&=67108863,this.words[M]=j}return B!==0&&(this.words[M]=B,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(P){var S=P<0;if(this.negative!==0&&!S)return-1;if(this.negative===0&&S)return 1;this.strip();var v;if(this.length>1)v=1;else{S&&(P=-P),n(P<=67108863,"Number is too big");var b=this.words[0]|0;v=b===P?0:bP.length)return 1;if(this.length=0;v--){var b=this.words[v]|0,B=P.words[v]|0;if(b!==B){bB&&(S=1);break}}return S},i.prototype.gtn=function(P){return this.cmpn(P)===1},i.prototype.gt=function(P){return this.cmp(P)===1},i.prototype.gten=function(P){return this.cmpn(P)>=0},i.prototype.gte=function(P){return this.cmp(P)>=0},i.prototype.ltn=function(P){return this.cmpn(P)===-1},i.prototype.lt=function(P){return this.cmp(P)===-1},i.prototype.lten=function(P){return this.cmpn(P)<=0},i.prototype.lte=function(P){return this.cmp(P)<=0},i.prototype.eqn=function(P){return this.cmpn(P)===0},i.prototype.eq=function(P){return this.cmp(P)===0},i.red=function(P){return new H(P)},i.prototype.toRed=function(P){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),P.convertTo(this)._forceRed(P)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(P){return this.red=P,this},i.prototype.forceRed=function(P){return n(!this.red,"Already a number in reduction context"),this._forceRed(P)},i.prototype.redAdd=function(P){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,P)},i.prototype.redIAdd=function(P){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,P)},i.prototype.redSub=function(P){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,P)},i.prototype.redISub=function(P){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,P)},i.prototype.redShl=function(P){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,P)},i.prototype.redMul=function(P){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.mul(this,P)},i.prototype.redIMul=function(P){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.imul(this,P)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(P){return n(this.red&&!P.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,P)};var C={k256:null,p224:null,p192:null,p25519:null};function I(V,P){this.name=V,this.p=new i(P,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}I.prototype._tmp=function(){var P=new i(null);return P.words=new Array(Math.ceil(this.n/13)),P},I.prototype.ireduce=function(P){var S=P,v;do this.split(S,this.tmp),S=this.imulK(S),S=S.iadd(this.tmp),v=S.bitLength();while(v>this.n);var b=v0?S.isub(this.p):S.strip!==void 0?S.strip():S._strip(),S},I.prototype.split=function(P,S){P.iushrn(this.n,0,S)},I.prototype.imulK=function(P){return P.imul(this.k)};function F(){I.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(F,I),F.prototype.split=function(P,S){for(var v=4194303,b=Math.min(P.length,9),B=0;B>>22,M=j}M>>>=22,P.words[B-10]=M,M===0&&P.length>10?P.length-=10:P.length-=9},F.prototype.imulK=function(P){P.words[P.length]=0,P.words[P.length+1]=0,P.length+=2;for(var S=0,v=0;v>>=26,P.words[v]=B,S=b}return S!==0&&(P.words[P.length++]=S),P},i._prime=function(P){if(C[P])return C[P];var S;if(P==="k256")S=new F;else if(P==="p224")S=new O;else if(P==="p192")S=new g;else if(P==="p25519")S=new D;else throw new Error("Unknown prime "+P);return C[P]=S,S};function H(V){if(typeof V=="string"){var P=i._prime(V);this.m=P.p,this.prime=P}else n(V.gtn(1),"modulus must be greater than 1"),this.m=V,this.prime=null}H.prototype._verify1=function(P){n(P.negative===0,"red works only with positives"),n(P.red,"red works only with red numbers")},H.prototype._verify2=function(P,S){n((P.negative|S.negative)===0,"red works only with positives"),n(P.red&&P.red===S.red,"red works only with red numbers")},H.prototype.imod=function(P){return this.prime?this.prime.ireduce(P)._forceRed(this):P.umod(this.m)._forceRed(this)},H.prototype.neg=function(P){return P.isZero()?P.clone():this.m.sub(P)._forceRed(this)},H.prototype.add=function(P,S){this._verify2(P,S);var v=P.add(S);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},H.prototype.iadd=function(P,S){this._verify2(P,S);var v=P.iadd(S);return v.cmp(this.m)>=0&&v.isub(this.m),v},H.prototype.sub=function(P,S){this._verify2(P,S);var v=P.sub(S);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},H.prototype.isub=function(P,S){this._verify2(P,S);var v=P.isub(S);return v.cmpn(0)<0&&v.iadd(this.m),v},H.prototype.shl=function(P,S){return this._verify1(P),this.imod(P.ushln(S))},H.prototype.imul=function(P,S){return this._verify2(P,S),this.imod(P.imul(S))},H.prototype.mul=function(P,S){return this._verify2(P,S),this.imod(P.mul(S))},H.prototype.isqr=function(P){return this.imul(P,P.clone())},H.prototype.sqr=function(P){return this.mul(P,P)},H.prototype.sqrt=function(P){if(P.isZero())return P.clone();var S=this.m.andln(3);if(n(S%2===1),S===3){var v=this.m.add(new i(1)).iushrn(2);return this.pow(P,v)}for(var b=this.m.subn(1),B=0;!b.isZero()&&b.andln(1)===0;)B++,b.iushrn(1);n(!b.isZero());var M=new i(1).toRed(this),j=M.redNeg(),U=this.m.subn(1).iushrn(1),E=this.m.bitLength();for(E=new i(2*E*E).toRed(this);this.pow(E,U).cmp(j)!==0;)E.redIAdd(j);for(var N=this.pow(E,b),T=this.pow(P,b.addn(1).iushrn(1)),q=this.pow(P,b),J=B;q.cmp(M)!==0;){for(var te=q,ne=0;te.cmp(M)!==0;ne++)te=te.redSqr();n(ne=0;B--){for(var N=S.words[B],T=E-1;T>=0;T--){var q=N>>T&1;if(M!==b[0]&&(M=this.sqr(M)),q===0&&j===0){U=0;continue}j<<=1,j|=q,U++,!(U!==v&&(B!==0||T!==0))&&(M=this.mul(M,b[j]),U=0,j=0)}E=26}return M},H.prototype.convertTo=function(P){var S=P.umod(this.m);return S===P?S.clone():S},H.prototype.convertFrom=function(P){var S=P.clone();return S.red=null,S},i.mont=function(P){return new G(P)};function G(V){H.call(this,V),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}o(G,H),G.prototype.convertTo=function(P){return this.imod(P.ushln(this.shift))},G.prototype.convertFrom=function(P){var S=this.imod(P.mul(this.rinv));return S.red=null,S},G.prototype.imul=function(P,S){if(P.isZero()||S.isZero())return P.words[0]=0,P.length=1,P;var v=P.imul(S),b=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=v.isub(b).iushrn(this.shift),M=B;return B.cmp(this.m)>=0?M=B.isub(this.m):B.cmpn(0)<0&&(M=B.iadd(this.m)),M._forceRed(this)},G.prototype.mul=function(P,S){if(P.isZero()||S.isZero())return new i(0)._forceRed(this);var v=P.mul(S),b=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=v.isub(b).iushrn(this.shift),M=B;return B.cmp(this.m)>=0?M=B.isub(this.m):B.cmpn(0)<0&&(M=B.iadd(this.m)),M._forceRed(this)},G.prototype.invm=function(P){var S=this.imod(P._invmp(this.m).mul(this.r2));return S._forceRed(this)}})(e,Le)})(u4);var $a=u4.exports,Xl=RU;function RU(e,t){if(!e)throw new Error(t||"Assertion failed")}RU.equal=function(t,r,n){if(t!=r)throw new Error(n||"Assertion failed: "+t+" != "+r)};var f4={};(function(e){var t=e;function r(i,a){if(Array.isArray(i))return i.slice();if(!i)return[];var s=[];if(typeof i!="string"){for(var l=0;l>8,f=c&255;u?s.push(u,f):s.push(f)}return s}t.toArray=r;function n(i){return i.length===1?"0"+i:i}t.zero2=n;function o(i){for(var a="",s=0;s(h>>1)-1?w=(h>>1)-y:w=y,m.isubn(w)):w=0,p[_]=w,m.iushrn(1)}return p}t.getNAF=i;function a(u,f){var d=[[],[]];u=u.clone(),f=f.clone();for(var p=0,h=0,m;u.cmpn(-p)>0||f.cmpn(-h)>0;){var _=u.andln(3)+p&3,w=f.andln(3)+h&3;_===3&&(_=-1),w===3&&(w=-1);var y;_&1?(m=u.andln(7)+p&7,(m===3||m===5)&&w===2?y=-_:y=_):y=0,d[0].push(y);var C;w&1?(m=f.andln(7)+h&7,(m===3||m===5)&&_===2?C=-w:C=w):C=0,d[1].push(C),2*p===y+1&&(p=1-p),2*h===C+1&&(h=1-h),u.iushrn(1),f.iushrn(1)}return d}t.getJSF=a;function s(u,f,d){var p="_"+f;u.prototype[f]=function(){return this[p]!==void 0?this[p]:this[p]=d.call(this)}}t.cachedProperty=s;function l(u){return typeof u=="string"?t.toArray(u,"hex"):u}t.parseBytes=l;function c(u){return new r(u,"hex","le")}t.intFromLE=c})(Qn);var d4={exports:{}},rw;d4.exports=function(t){return rw||(rw=new ls(null)),rw.generate(t)};function ls(e){this.rand=e}d4.exports.Rand=ls;ls.prototype.generate=function(t){return this._rand(t)};ls.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var r=new Uint8Array(t),n=0;n0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Ty=Ws;Ws.prototype.point=function(){throw new Error("Not implemented")};Ws.prototype.validate=function(){throw new Error("Not implemented")};Ws.prototype._fixedNafMul=function(t,r){om(t.precomputed);var n=t._getDoubles(),o=nm(r,1,this._bitLength),i=(1<=s;c--)l=(l<<1)+o[c];a.push(l)}for(var u=this.jpoint(null,null,null),f=this.jpoint(null,null,null),d=i;d>0;d--){for(s=0;s=0;l--){for(var c=0;l>=0&&a[l]===0;l--)c++;if(l>=0&&c++,s=s.dblp(c),l<0)break;var u=a[l];om(u!==0),t.type==="affine"?u>0?s=s.mixedAdd(i[u-1>>1]):s=s.mixedAdd(i[-u-1>>1].neg()):u>0?s=s.add(i[u-1>>1]):s=s.add(i[-u-1>>1].neg())}return t.type==="affine"?s.toP():s};Ws.prototype._wnafMulAdd=function(t,r,n,o,i){var a=this._wnafT1,s=this._wnafT2,l=this._wnafT3,c=0,u,f,d;for(u=0;u=1;u-=2){var h=u-1,m=u;if(a[h]!==1||a[m]!==1){l[h]=nm(n[h],a[h],this._bitLength),l[m]=nm(n[m],a[m],this._bitLength),c=Math.max(l[h].length,c),c=Math.max(l[m].length,c);continue}var _=[r[h],null,null,r[m]];r[h].y.cmp(r[m].y)===0?(_[1]=r[h].add(r[m]),_[2]=r[h].toJ().mixedAdd(r[m].neg())):r[h].y.cmp(r[m].y.redNeg())===0?(_[1]=r[h].toJ().mixedAdd(r[m]),_[2]=r[h].add(r[m].neg())):(_[1]=r[h].toJ().mixedAdd(r[m]),_[2]=r[h].toJ().mixedAdd(r[m].neg()));var w=[-3,-1,-5,-7,0,7,5,1,3],y=hxe(n[h],n[m]);for(c=Math.max(y[0].length,c),l[h]=new Array(c),l[m]=new Array(c),f=0;f=0;u--){for(var g=0;u>=0;){var D=!0;for(f=0;f=0&&g++,F=F.dblp(g),u<0)break;for(f=0;f0?d=s[f][H-1>>1]:H<0&&(d=s[f][-H-1>>1].neg()),d.type==="affine"?F=F.mixedAdd(d):F=F.add(d))}}for(u=0;u=Math.ceil((t.bitLength()+1)/r.step):!1};Co.prototype._getDoubles=function(t,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],o=this,i=0;i=0&&(p=c,h=u),f.negative&&(f=f.neg(),d=d.neg()),p.negative&&(p=p.neg(),h=h.neg()),[{a:f,b:d},{a:p,b:h}]};Po.prototype._endoSplit=function(t){var r=this.endo.basis,n=r[0],o=r[1],i=o.b.mul(t).divRound(this.n),a=n.b.neg().mul(t).divRound(this.n),s=i.mul(n.a),l=a.mul(o.a),c=i.mul(n.b),u=a.mul(o.b),f=t.sub(s).sub(l),d=c.add(u).neg();return{k1:f,k2:d}};Po.prototype.pointFromX=function(t,r){t=new or(t,16),t.red||(t=t.toRed(this.red));var n=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),o=n.redSqrt();if(o.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var i=o.fromRed().isOdd();return(r&&!i||!r&&i)&&(o=o.redNeg()),this.point(t,o)};Po.prototype.validate=function(t){if(t.inf)return!0;var r=t.x,n=t.y,o=this.a.redMul(r),i=r.redSqr().redMul(r).redIAdd(o).redIAdd(this.b);return n.redSqr().redISub(i).cmpn(0)===0};Po.prototype._endoWnafMulAdd=function(t,r,n){for(var o=this._endoWnafT1,i=this._endoWnafT2,a=0;a":""};kr.prototype.isInfinity=function(){return this.inf};kr.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(this.x.cmp(t.x)===0)return this.curve.point(null,null);var r=this.y.redSub(t.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(t.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(t.x),o=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,o)};kr.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(t.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),o=t.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(o),a=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)};kr.prototype.getX=function(){return this.x.fromRed()};kr.prototype.getY=function(){return this.y.fromRed()};kr.prototype.mul=function(t){return t=new or(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)};kr.prototype.mulAdd=function(t,r,n){var o=[this,r],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(o,i):this.curve._wnafMulAdd(1,o,i,2)};kr.prototype.jmulAdd=function(t,r,n){var o=[this,r],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(o,i,!0):this.curve._wnafMulAdd(1,o,i,2,!0)};kr.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||this.x.cmp(t.x)===0&&this.y.cmp(t.y)===0)};kr.prototype.neg=function(t){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var n=this.precomputed,o=function(i){return i.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(o)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(o)}}}return r};kr.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t};function zr(e,t,r,n){Wu.BasePoint.call(this,e,"jacobian"),t===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new or(0)):(this.x=new or(t,16),this.y=new or(r,16),this.z=new or(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}h4(zr,Wu.BasePoint);Po.prototype.jpoint=function(t,r,n){return new zr(this,t,r,n)};zr.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),r=t.redSqr(),n=this.x.redMul(r),o=this.y.redMul(r).redMul(t);return this.curve.point(n,o)};zr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};zr.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var r=t.z.redSqr(),n=this.z.redSqr(),o=this.x.redMul(r),i=t.x.redMul(n),a=this.y.redMul(r.redMul(t.z)),s=t.y.redMul(n.redMul(this.z)),l=o.redSub(i),c=a.redSub(s);if(l.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var u=l.redSqr(),f=u.redMul(l),d=o.redMul(u),p=c.redSqr().redIAdd(f).redISub(d).redISub(d),h=c.redMul(d.redISub(p)).redISub(a.redMul(f)),m=this.z.redMul(t.z).redMul(l);return this.curve.jpoint(p,h,m)};zr.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var r=this.z.redSqr(),n=this.x,o=t.x.redMul(r),i=this.y,a=t.y.redMul(r).redMul(this.z),s=n.redSub(o),l=i.redSub(a);if(s.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),f=n.redMul(c),d=l.redSqr().redIAdd(u).redISub(f).redISub(f),p=l.redMul(f.redISub(d)).redISub(i.redMul(u)),h=this.z.redMul(s);return this.curve.jpoint(d,p,h)};zr.prototype.dblp=function(t){if(t===0)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(i),this.x.cmp(n)===0)return!0}};zr.prototype.inspect=function(){return this.isInfinity()?"":""};zr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Nc=$a,FU=Dy,My=Ty,yxe=Qn;function qu(e){My.call(this,"mont",e),this.a=new Nc(e.a,16).toRed(this.red),this.b=new Nc(e.b,16).toRed(this.red),this.i4=new Nc(4).toRed(this.red).redInvm(),this.two=new Nc(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}FU(qu,My);var bxe=qu;qu.prototype.validate=function(t){var r=t.normalize().x,n=r.redSqr(),o=n.redMul(r).redAdd(n.redMul(this.a)).redAdd(r),i=o.redSqrt();return i.redSqr().cmp(o)===0};function Pr(e,t,r){My.BasePoint.call(this,e,"projective"),t===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Nc(t,16),this.z=new Nc(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}FU(Pr,My.BasePoint);qu.prototype.decodePoint=function(t,r){return this.point(yxe.toArray(t,r),1)};qu.prototype.point=function(t,r){return new Pr(this,t,r)};qu.prototype.pointFromJSON=function(t){return Pr.fromJSON(this,t)};Pr.prototype.precompute=function(){};Pr.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};Pr.fromJSON=function(t,r){return new Pr(t,r[0],r[1]||t.one)};Pr.prototype.inspect=function(){return this.isInfinity()?"":""};Pr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};Pr.prototype.dbl=function(){var t=this.x.redAdd(this.z),r=t.redSqr(),n=this.x.redSub(this.z),o=n.redSqr(),i=r.redSub(o),a=r.redMul(o),s=i.redMul(o.redAdd(this.curve.a24.redMul(i)));return this.curve.point(a,s)};Pr.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};Pr.prototype.diffAdd=function(t,r){var n=this.x.redAdd(this.z),o=this.x.redSub(this.z),i=t.x.redAdd(t.z),a=t.x.redSub(t.z),s=a.redMul(n),l=i.redMul(o),c=r.z.redMul(s.redAdd(l).redSqr()),u=r.x.redMul(s.redISub(l).redSqr());return this.curve.point(c,u)};Pr.prototype.mul=function(t){for(var r=t.clone(),n=this,o=this.curve.point(null,null),i=this,a=[];r.cmpn(0)!==0;r.iushrn(1))a.push(r.andln(1));for(var s=a.length-1;s>=0;s--)a[s]===0?(n=n.diffAdd(o,i),o=o.dbl()):(o=n.diffAdd(o,i),n=n.dbl());return o};Pr.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};Pr.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};Pr.prototype.eq=function(t){return this.getX().cmp(t.getX())===0};Pr.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};Pr.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var wxe=Qn,ca=$a,BU=Dy,Ry=Ty,xxe=wxe.assert;function Ri(e){this.twisted=(e.a|0)!==1,this.mOneA=this.twisted&&(e.a|0)===-1,this.extended=this.mOneA,Ry.call(this,"edwards",e),this.a=new ca(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new ca(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new ca(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),xxe(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(e.c|0)===1}BU(Ri,Ry);var _xe=Ri;Ri.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)};Ri.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)};Ri.prototype.jpoint=function(t,r,n,o){return this.point(t,r,n,o)};Ri.prototype.pointFromX=function(t,r){t=new ca(t,16),t.red||(t=t.toRed(this.red));var n=t.redSqr(),o=this.c2.redSub(this.a.redMul(n)),i=this.one.redSub(this.c2.redMul(this.d).redMul(n)),a=o.redMul(i.redInvm()),s=a.redSqrt();if(s.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");var l=s.fromRed().isOdd();return(r&&!l||!r&&l)&&(s=s.redNeg()),this.point(t,s)};Ri.prototype.pointFromY=function(t,r){t=new ca(t,16),t.red||(t=t.toRed(this.red));var n=t.redSqr(),o=n.redSub(this.c2),i=n.redMul(this.d).redMul(this.c2).redSub(this.a),a=o.redMul(i.redInvm());if(a.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,t)}var s=a.redSqrt();if(s.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");return s.fromRed().isOdd()!==r&&(s=s.redNeg()),this.point(s,t)};Ri.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var r=t.x.redSqr(),n=t.y.redSqr(),o=r.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(n)));return o.cmp(i)===0};function zt(e,t,r,n,o){Ry.BasePoint.call(this,e,"projective"),t===null&&r===null&&n===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new ca(t,16),this.y=new ca(r,16),this.z=n?new ca(n,16):this.curve.one,this.t=o&&new ca(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}BU(zt,Ry.BasePoint);Ri.prototype.pointFromJSON=function(t){return zt.fromJSON(this,t)};Ri.prototype.point=function(t,r,n,o){return new zt(this,t,r,n,o)};zt.fromJSON=function(t,r){return new zt(t,r[0],r[1],r[2])};zt.prototype.inspect=function(){return this.isInfinity()?"":""};zt.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};zt.prototype._extDbl=function(){var t=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var o=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(r),a=o.redAdd(r),s=a.redSub(n),l=o.redSub(r),c=i.redMul(s),u=a.redMul(l),f=i.redMul(l),d=s.redMul(a);return this.curve.point(c,u,d,f)};zt.prototype._projDbl=function(){var t=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),n=this.y.redSqr(),o,i,a,s,l,c;if(this.curve.twisted){s=this.curve._mulA(r);var u=s.redAdd(n);this.zOne?(o=t.redSub(r).redSub(n).redMul(u.redSub(this.curve.two)),i=u.redMul(s.redSub(n)),a=u.redSqr().redSub(u).redSub(u)):(l=this.z.redSqr(),c=u.redSub(l).redISub(l),o=t.redSub(r).redISub(n).redMul(c),i=u.redMul(s.redSub(n)),a=u.redMul(c))}else s=r.redAdd(n),l=this.curve._mulC(this.z).redSqr(),c=s.redSub(l).redSub(l),o=this.curve._mulC(t.redISub(s)).redMul(c),i=this.curve._mulC(s).redMul(r.redISub(n)),a=s.redMul(c);return this.curve.point(o,i,a)};zt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};zt.prototype._extAdd=function(t){var r=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),n=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),o=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),a=n.redSub(r),s=i.redSub(o),l=i.redAdd(o),c=n.redAdd(r),u=a.redMul(s),f=l.redMul(c),d=a.redMul(c),p=s.redMul(l);return this.curve.point(u,f,p,d)};zt.prototype._projAdd=function(t){var r=this.z.redMul(t.z),n=r.redSqr(),o=this.x.redMul(t.x),i=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(i),s=n.redSub(a),l=n.redAdd(a),c=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(i),u=r.redMul(s).redMul(c),f,d;return this.curve.twisted?(f=r.redMul(l).redMul(i.redSub(this.curve._mulA(o))),d=s.redMul(l)):(f=r.redMul(l).redMul(i.redSub(o)),d=this.curve._mulC(s).redMul(l)),this.curve.point(u,f,d)};zt.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)};zt.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)};zt.prototype.mulAdd=function(t,r,n){return this.curve._wnafMulAdd(1,[this,r],[t,n],2,!1)};zt.prototype.jmulAdd=function(t,r,n){return this.curve._wnafMulAdd(1,[this,r],[t,n],2,!0)};zt.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this};zt.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};zt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};zt.prototype.getY=function(){return this.normalize(),this.y.fromRed()};zt.prototype.eq=function(t){return this===t||this.getX().cmp(t.getX())===0&&this.getY().cmp(t.getY())===0};zt.prototype.eqXToP=function(t){var r=t.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var n=t.clone(),o=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(o),this.x.cmp(r)===0)return!0}};zt.prototype.toP=zt.prototype.normalize;zt.prototype.mixedAdd=zt.prototype.add;(function(e){var t=e;t.base=Ty,t.short=mxe,t.mont=bxe,t.edwards=_xe})(p4);var Ny={},Fy={},Et={},Exe=Xl,Sxe=Dy;Et.inherits=Sxe;function Cxe(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function Pxe(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e=="string")if(t){if(t==="hex")for(e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e),o=0;o>6|192,r[n++]=i&63|128):Cxe(e,o)?(i=65536+((i&1023)<<10)+(e.charCodeAt(++o)&1023),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=i&63|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=i&63|128)}else for(o=0;o>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}Et.htonl=jU;function Axe(e,t){for(var r="",n=0;n>>0}return i}Et.join32=kxe;function Ixe(e,t){for(var r=new Array(e.length*4),n=0,o=0;n>>24,r[o+1]=i>>>16&255,r[o+2]=i>>>8&255,r[o+3]=i&255):(r[o+3]=i>>>24,r[o+2]=i>>>16&255,r[o+1]=i>>>8&255,r[o]=i&255)}return r}Et.split32=Ixe;function $xe(e,t){return e>>>t|e<<32-t}Et.rotr32=$xe;function Txe(e,t){return e<>>32-t}Et.rotl32=Txe;function Dxe(e,t){return e+t>>>0}Et.sum32=Dxe;function Mxe(e,t,r){return e+t+r>>>0}Et.sum32_3=Mxe;function Rxe(e,t,r,n){return e+t+r+n>>>0}Et.sum32_4=Rxe;function Nxe(e,t,r,n,o){return e+t+r+n+o>>>0}Et.sum32_5=Nxe;function Fxe(e,t,r,n){var o=e[t],i=e[t+1],a=n+i>>>0,s=(a>>0,e[t+1]=a}Et.sum64=Fxe;function Bxe(e,t,r,n){var o=t+n>>>0,i=(o>>0}Et.sum64_hi=Bxe;function jxe(e,t,r,n){var o=t+n;return o>>>0}Et.sum64_lo=jxe;function Lxe(e,t,r,n,o,i,a,s){var l=0,c=t;c=c+n>>>0,l+=c>>0,l+=c>>0,l+=c>>0}Et.sum64_4_hi=Lxe;function zxe(e,t,r,n,o,i,a,s){var l=t+n+i+s;return l>>>0}Et.sum64_4_lo=zxe;function Uxe(e,t,r,n,o,i,a,s,l,c){var u=0,f=t;f=f+n>>>0,u+=f>>0,u+=f>>0,u+=f>>0,u+=f>>0}Et.sum64_5_hi=Uxe;function Hxe(e,t,r,n,o,i,a,s,l,c){var u=t+n+i+s+c;return u>>>0}Et.sum64_5_lo=Hxe;function Vxe(e,t,r){var n=t<<32-r|e>>>r;return n>>>0}Et.rotr64_hi=Vxe;function Wxe(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}Et.rotr64_lo=Wxe;function qxe(e,t,r){return e>>>r}Et.shr64_hi=qxe;function Gxe(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}Et.shr64_lo=Gxe;var Gu={},$A=Et,Kxe=Xl;function By(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Gu.BlockHash=By;By.prototype.update=function(t,r){if(t=$A.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var n=t.length%this._delta8;this.pending=t.slice(t.length-n,t.length),this.pending.length===0&&(this.pending=null),t=$A.join32(t,0,t.length-n,this.endian);for(var o=0;o>>24&255,o[i++]=t>>>16&255,o[i++]=t>>>8&255,o[i++]=t&255}else for(o[i++]=t&255,o[i++]=t>>>8&255,o[i++]=t>>>16&255,o[i++]=t>>>24&255,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,a=8;a>>3}Ni.g0_256=Qxe;function e6e(e){return Oi(e,17)^Oi(e,19)^e>>>10}Ni.g1_256=e6e;var xu=Et,t6e=Gu,r6e=Ni,nw=xu.rotl32,Nf=xu.sum32,n6e=xu.sum32_5,o6e=r6e.ft_1,WU=t6e.BlockHash,i6e=[1518500249,1859775393,2400959708,3395469782];function $i(){if(!(this instanceof $i))return new $i;WU.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}xu.inherits($i,WU);var a6e=$i;$i.blockSize=512;$i.outSize=160;$i.hmacStrength=80;$i.padLength=64;$i.prototype._update=function(t,r){for(var n=this.W,o=0;o<16;o++)n[o]=t[r+o];for(;othis.blockSize&&(t=new this.Hash().update(t).digest()),G6e(t.length<=this.blockSize);for(var r=t.length;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var Z6e=Rs;Rs.prototype._init=function(t,r,n){var o=t.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(n||[])),this._reseed=1};Rs.prototype.generate=function(t,r,n,o){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(o=n,n=r,r=null),n&&(n=Ol.toArray(n,o||"hex"),this._update(n));for(var i=[];i.length"};var im=$a,v4=Qn,t_e=v4.assert;function jy(e,t){if(e instanceof jy)return e;this._importDER(e,t)||(t_e(e.r&&e.s,"Signature without r or s"),this.r=new im(e.r,16),this.s=new im(e.s,16),e.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var r_e=jy;function n_e(){this.place=0}function sw(e,t){var r=e[t.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var o=0,i=0,a=t.place;i>>=0;return o<=127?!1:(t.place=a,o)}function NA(e){for(var t=0,r=e.length-1;!e[t]&&!(e[t+1]&128)&&t>>3);for(e.push(r|128);--r;)e.push(t>>>(r<<3)&255);e.push(t)}jy.prototype.toDER=function(t){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=NA(r),n=NA(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var o=[2];lw(o,r.length),o=o.concat(r),o.push(2),lw(o,n.length);var i=o.concat(n),a=[48];return lw(a,i.length),a=a.concat(i),v4.encode(a,t)};var Al=$a,nH=Z6e,o_e=Qn,cw=Ny,i_e=NU,oH=o_e.assert,g4=e_e,Ly=r_e;function Eo(e){if(!(this instanceof Eo))return new Eo(e);typeof e=="string"&&(oH(Object.prototype.hasOwnProperty.call(cw,e),"Unknown curve "+e),e=cw[e]),e instanceof cw.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var a_e=Eo;Eo.prototype.keyPair=function(t){return new g4(this,t)};Eo.prototype.keyFromPrivate=function(t,r){return g4.fromPrivate(this,t,r)};Eo.prototype.keyFromPublic=function(t,r){return g4.fromPublic(this,t,r)};Eo.prototype.genKeyPair=function(t){t||(t={});for(var r=new nH({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||i_e(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),o=this.n.sub(new Al(2));;){var i=new Al(r.generate(n));if(!(i.cmp(o)>0))return i.iaddn(1),this.keyFromPrivate(i)}};Eo.prototype._truncateToN=function(t,r){var n=t.byteLength()*8-this.n.bitLength();return n>0&&(t=t.ushrn(n)),!r&&t.cmp(this.n)>=0?t.sub(this.n):t};Eo.prototype.sign=function(t,r,n,o){typeof n=="object"&&(o=n,n=null),o||(o={}),r=this.keyFromPrivate(r,n),t=this._truncateToN(new Al(t,16));for(var i=this.n.byteLength(),a=r.getPrivate().toArray("be",i),s=t.toArray("be",i),l=new nH({hash:this.hash,entropy:a,nonce:s,pers:o.pers,persEnc:o.persEnc||"utf8"}),c=this.n.sub(new Al(1)),u=0;;u++){var f=o.k?o.k(u):new Al(l.generate(this.n.byteLength()));if(f=this._truncateToN(f,!0),!(f.cmpn(1)<=0||f.cmp(c)>=0)){var d=this.g.mul(f);if(!d.isInfinity()){var p=d.getX(),h=p.umod(this.n);if(h.cmpn(0)!==0){var m=f.invm(this.n).mul(h.mul(r.getPrivate()).iadd(t));if(m=m.umod(this.n),m.cmpn(0)!==0){var _=(d.getY().isOdd()?1:0)|(p.cmp(h)!==0?2:0);return o.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),_^=1),new Ly({r:h,s:m,recoveryParam:_})}}}}}};Eo.prototype.verify=function(t,r,n,o){t=this._truncateToN(new Al(t,16)),n=this.keyFromPublic(n,o),r=new Ly(r,"hex");var i=r.r,a=r.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s=a.invm(this.n),l=s.mul(t).umod(this.n),c=s.mul(i).umod(this.n),u;return this.curve._maxwellTrick?(u=this.g.jmulAdd(l,n.getPublic(),c),u.isInfinity()?!1:u.eqXToP(i)):(u=this.g.mulAdd(l,n.getPublic(),c),u.isInfinity()?!1:u.getX().umod(this.n).cmp(i)===0)};Eo.prototype.recoverPubKey=function(e,t,r,n){oH((3&r)===r,"The recovery param is more than two bits"),t=new Ly(t,n);var o=this.n,i=new Al(e),a=t.r,s=t.s,l=r&1,c=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");c?a=this.curve.pointFromX(a.add(this.curve.n),l):a=this.curve.pointFromX(a,l);var u=t.r.invm(o),f=o.sub(i).mul(u).umod(o),d=s.mul(u).umod(o);return this.g.mulAdd(f,a,d)};Eo.prototype.getKeyRecoveryParam=function(e,t,r,n){if(t=new Ly(t,n),t.recoveryParam!==null)return t.recoveryParam;for(var o=0;o<4;o++){var i;try{i=this.recoverPubKey(e,t,o)}catch{continue}if(i.eq(r))return o}throw new Error("Unable to find valid recovery factor")};var sh=Qn,iH=sh.assert,FA=sh.parseBytes,Xu=sh.cachedProperty;function Sr(e,t){this.eddsa=e,this._secret=FA(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=FA(t.pub)}Sr.fromPublic=function(t,r){return r instanceof Sr?r:new Sr(t,{pub:r})};Sr.fromSecret=function(t,r){return r instanceof Sr?r:new Sr(t,{secret:r})};Sr.prototype.secret=function(){return this._secret};Xu(Sr,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});Xu(Sr,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});Xu(Sr,"privBytes",function(){var t=this.eddsa,r=this.hash(),n=t.encodingLength-1,o=r.slice(0,t.encodingLength);return o[0]&=248,o[n]&=127,o[n]|=64,o});Xu(Sr,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});Xu(Sr,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});Xu(Sr,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});Sr.prototype.sign=function(t){return iH(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)};Sr.prototype.verify=function(t,r){return this.eddsa.verify(t,r,this)};Sr.prototype.getSecret=function(t){return iH(this._secret,"KeyPair is public only"),sh.encode(this.secret(),t)};Sr.prototype.getPublic=function(t){return sh.encode(this.pubBytes(),t)};var s_e=Sr,l_e=$a,zy=Qn,c_e=zy.assert,Uy=zy.cachedProperty,u_e=zy.parseBytes;function Zl(e,t){this.eddsa=e,typeof t!="object"&&(t=u_e(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),c_e(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof l_e&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}Uy(Zl,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});Uy(Zl,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});Uy(Zl,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});Uy(Zl,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});Zl.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};Zl.prototype.toHex=function(){return zy.encode(this.toBytes(),"hex").toUpperCase()};var f_e=Zl,d_e=Fy,p_e=Ny,Su=Qn,h_e=Su.assert,aH=Su.parseBytes,sH=s_e,BA=f_e;function Tn(e){if(h_e(e==="ed25519","only tested with ed25519 so far"),!(this instanceof Tn))return new Tn(e);e=p_e[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=d_e.sha512}var v_e=Tn;Tn.prototype.sign=function(t,r){t=aH(t);var n=this.keyFromSecret(r),o=this.hashInt(n.messagePrefix(),t),i=this.g.mul(o),a=this.encodePoint(i),s=this.hashInt(a,n.pubBytes(),t).mul(n.priv()),l=o.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:l,Rencoded:a})};Tn.prototype.verify=function(t,r,n){t=aH(t),r=this.makeSignature(r);var o=this.keyFromPublic(n),i=this.hashInt(r.Rencoded(),o.pubBytes(),t),a=this.g.mul(r.S()),s=r.R().add(o.pub().mul(i));return s.eq(a)};Tn.prototype.hashInt=function(){for(var t=this.hash(),r=0;r0?v:b},i.min=function(v,b){return v.cmp(b)<0?v:b},i.prototype._init=function(v,b,B){if(typeof v=="number")return this._initNumber(v,b,B);if(typeof v=="object")return this._initArray(v,b,B);b==="hex"&&(b=16),n(b===(b|0)&&b>=2&&b<=36),v=v.toString().replace(/\s+/g,"");var M=0;v[0]==="-"&&(M++,this.negative=1),M=0;M-=3)U=v[M]|v[M-1]<<8|v[M-2]<<16,this.words[j]|=U<>>26-E&67108863,E+=24,E>=26&&(E-=26,j++);else if(B==="le")for(M=0,j=0;M>>26-E&67108863,E+=24,E>=26&&(E-=26,j++);return this._strip()};function s(S,v){var b=S.charCodeAt(v);if(b>=48&&b<=57)return b-48;if(b>=65&&b<=70)return b-55;if(b>=97&&b<=102)return b-87;n(!1,"Invalid character in "+S)}function l(S,v,b){var B=s(S,b);return b-1>=v&&(B|=s(S,b-1)<<4),B}i.prototype._parseHex=function(v,b,B){this.length=Math.ceil((v.length-b)/6),this.words=new Array(this.length);for(var M=0;M=b;M-=2)E=l(v,b,M)<=18?(j-=18,U+=1,this.words[U]|=E>>>26):j+=8;else{var N=v.length-b;for(M=N%2===0?b+1:b;M=18?(j-=18,U+=1,this.words[U]|=E>>>26):j+=8}this._strip()};function c(S,v,b,B){for(var M=0,j=0,U=Math.min(S.length,b),E=v;E=49?j=N-49+10:N>=17?j=N-17+10:j=N,n(N>=0&&j1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch{i.prototype.inspect=f}else i.prototype.inspect=f;function f(){return(this.red?""}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(v,b){v=v||10,b=b|0||1;var B;if(v===16||v==="hex"){B="";for(var M=0,j=0,U=0;U>>24-M&16777215,M+=2,M>=26&&(M-=26,U--),j!==0||U!==this.length-1?B=d[6-N.length]+N+B:B=N+B}for(j!==0&&(B=j.toString(16)+B);B.length%b!==0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}if(v===(v|0)&&v>=2&&v<=36){var T=p[v],q=h[v];B="";var J=this.clone();for(J.negative=0;!J.isZero();){var te=J.modrn(q).toString(v);J=J.idivn(q),J.isZero()?B=te+B:B=d[T-te.length]+te+B}for(this.isZero()&&(B="0"+B);B.length%b!==0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var v=this.words[0];return this.length===2?v+=this.words[1]*67108864:this.length===3&&this.words[2]===1?v+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-v:v},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(v,b){return this.toArrayLike(a,v,b)}),i.prototype.toArray=function(v,b){return this.toArrayLike(Array,v,b)};var m=function(v,b){return v.allocUnsafe?v.allocUnsafe(b):new v(b)};i.prototype.toArrayLike=function(v,b,B){this._strip();var M=this.byteLength(),j=B||Math.max(1,M);n(M<=j,"byte array longer than desired length"),n(j>0,"Requested array length <= 0");var U=m(v,j),E=b==="le"?"LE":"BE";return this["_toArrayLike"+E](U,M),U},i.prototype._toArrayLikeLE=function(v,b){for(var B=0,M=0,j=0,U=0;j>8&255),B>16&255),U===6?(B>24&255),M=0,U=0):(M=E>>>24,U+=2)}if(B=0&&(v[B--]=E>>8&255),B>=0&&(v[B--]=E>>16&255),U===6?(B>=0&&(v[B--]=E>>24&255),M=0,U=0):(M=E>>>24,U+=2)}if(B>=0)for(v[B--]=M;B>=0;)v[B--]=0},Math.clz32?i.prototype._countBits=function(v){return 32-Math.clz32(v)}:i.prototype._countBits=function(v){var b=v,B=0;return b>=4096&&(B+=13,b>>>=13),b>=64&&(B+=7,b>>>=7),b>=8&&(B+=4,b>>>=4),b>=2&&(B+=2,b>>>=2),B+b},i.prototype._zeroBits=function(v){if(v===0)return 26;var b=v,B=0;return b&8191||(B+=13,b>>>=13),b&127||(B+=7,b>>>=7),b&15||(B+=4,b>>>=4),b&3||(B+=2,b>>>=2),b&1||B++,B},i.prototype.bitLength=function(){var v=this.words[this.length-1],b=this._countBits(v);return(this.length-1)*26+b};function _(S){for(var v=new Array(S.bitLength()),b=0;b>>M&1}return v}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var v=0,b=0;bv.length?this.clone().ior(v):v.clone().ior(this)},i.prototype.uor=function(v){return this.length>v.length?this.clone().iuor(v):v.clone().iuor(this)},i.prototype.iuand=function(v){var b;this.length>v.length?b=v:b=this;for(var B=0;Bv.length?this.clone().iand(v):v.clone().iand(this)},i.prototype.uand=function(v){return this.length>v.length?this.clone().iuand(v):v.clone().iuand(this)},i.prototype.iuxor=function(v){var b,B;this.length>v.length?(b=this,B=v):(b=v,B=this);for(var M=0;Mv.length?this.clone().ixor(v):v.clone().ixor(this)},i.prototype.uxor=function(v){return this.length>v.length?this.clone().iuxor(v):v.clone().iuxor(this)},i.prototype.inotn=function(v){n(typeof v=="number"&&v>=0);var b=Math.ceil(v/26)|0,B=v%26;this._expand(b),B>0&&b--;for(var M=0;M0&&(this.words[M]=~this.words[M]&67108863>>26-B),this._strip()},i.prototype.notn=function(v){return this.clone().inotn(v)},i.prototype.setn=function(v,b){n(typeof v=="number"&&v>=0);var B=v/26|0,M=v%26;return this._expand(B+1),b?this.words[B]=this.words[B]|1<v.length?(B=this,M=v):(B=v,M=this);for(var j=0,U=0;U>>26;for(;j!==0&&U>>26;if(this.length=B.length,j!==0)this.words[this.length]=j,this.length++;else if(B!==this)for(;Uv.length?this.clone().iadd(v):v.clone().iadd(this)},i.prototype.isub=function(v){if(v.negative!==0){v.negative=0;var b=this.iadd(v);return v.negative=1,b._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(v),this.negative=1,this._normSign();var B=this.cmp(v);if(B===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,j;B>0?(M=this,j=v):(M=v,j=this);for(var U=0,E=0;E>26,this.words[E]=b&67108863;for(;U!==0&&E>26,this.words[E]=b&67108863;if(U===0&&E>>26,J=N&67108863,te=Math.min(T,v.length-1),ne=Math.max(0,T-S.length+1);ne<=te;ne++){var ce=T-ne|0;M=S.words[ce]|0,j=v.words[ne]|0,U=M*j+J,q+=U/67108864|0,J=U&67108863}b.words[T]=J|0,N=q|0}return N!==0?b.words[T]=N|0:b.length--,b._strip()}var y=function(v,b,B){var M=v.words,j=b.words,U=B.words,E=0,N,T,q,J=M[0]|0,te=J&8191,ne=J>>>13,ce=M[1]|0,ie=ce&8191,ue=ce>>>13,A=M[2]|0,K=A&8191,ee=A>>>13,se=M[3]|0,pe=se&8191,ge=se>>>13,X=M[4]|0,R=X&8191,z=X>>>13,Z=M[5]|0,Q=Z&8191,de=Z>>>13,we=M[6]|0,Se=we&8191,Ee=we>>>13,Ae=M[7]|0,Te=Ae&8191,W=Ae>>>13,x=M[8]|0,k=x&8191,Y=x>>>13,re=M[9]|0,fe=re&8191,le=re>>>13,xe=j[0]|0,_e=xe&8191,ke=xe>>>13,$e=j[1]|0,Ne=$e&8191,We=$e>>>13,gt=j[2]|0,ft=gt&8191,Ye=gt>>>13,Je=j[3]|0,tt=Je&8191,ve=Je>>>13,oe=j[4]|0,he=oe&8191,be=oe>>>13,Ce=j[5]|0,Oe=Ce&8191,Ie=Ce>>>13,De=j[6]|0,je=De&8191,Me=De>>>13,He=j[7]|0,qe=He&8191,ze=He>>>13,it=j[8]|0,Be=it&8191,Ke=it>>>13,mt=j[9]|0,ct=mt&8191,Ct=mt>>>13;B.negative=v.negative^b.negative,B.length=19,N=Math.imul(te,_e),T=Math.imul(te,ke),T=T+Math.imul(ne,_e)|0,q=Math.imul(ne,ke);var xn=(E+N|0)+((T&8191)<<13)|0;E=(q+(T>>>13)|0)+(xn>>>26)|0,xn&=67108863,N=Math.imul(ie,_e),T=Math.imul(ie,ke),T=T+Math.imul(ue,_e)|0,q=Math.imul(ue,ke),N=N+Math.imul(te,Ne)|0,T=T+Math.imul(te,We)|0,T=T+Math.imul(ne,Ne)|0,q=q+Math.imul(ne,We)|0;var Nn=(E+N|0)+((T&8191)<<13)|0;E=(q+(T>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,N=Math.imul(K,_e),T=Math.imul(K,ke),T=T+Math.imul(ee,_e)|0,q=Math.imul(ee,ke),N=N+Math.imul(ie,Ne)|0,T=T+Math.imul(ie,We)|0,T=T+Math.imul(ue,Ne)|0,q=q+Math.imul(ue,We)|0,N=N+Math.imul(te,ft)|0,T=T+Math.imul(te,Ye)|0,T=T+Math.imul(ne,ft)|0,q=q+Math.imul(ne,Ye)|0;var an=(E+N|0)+((T&8191)<<13)|0;E=(q+(T>>>13)|0)+(an>>>26)|0,an&=67108863,N=Math.imul(pe,_e),T=Math.imul(pe,ke),T=T+Math.imul(ge,_e)|0,q=Math.imul(ge,ke),N=N+Math.imul(K,Ne)|0,T=T+Math.imul(K,We)|0,T=T+Math.imul(ee,Ne)|0,q=q+Math.imul(ee,We)|0,N=N+Math.imul(ie,ft)|0,T=T+Math.imul(ie,Ye)|0,T=T+Math.imul(ue,ft)|0,q=q+Math.imul(ue,Ye)|0,N=N+Math.imul(te,tt)|0,T=T+Math.imul(te,ve)|0,T=T+Math.imul(ne,tt)|0,q=q+Math.imul(ne,ve)|0;var ai=(E+N|0)+((T&8191)<<13)|0;E=(q+(T>>>13)|0)+(ai>>>26)|0,ai&=67108863,N=Math.imul(R,_e),T=Math.imul(R,ke),T=T+Math.imul(z,_e)|0,q=Math.imul(z,ke),N=N+Math.imul(pe,Ne)|0,T=T+Math.imul(pe,We)|0,T=T+Math.imul(ge,Ne)|0,q=q+Math.imul(ge,We)|0,N=N+Math.imul(K,ft)|0,T=T+Math.imul(K,Ye)|0,T=T+Math.imul(ee,ft)|0,q=q+Math.imul(ee,Ye)|0,N=N+Math.imul(ie,tt)|0,T=T+Math.imul(ie,ve)|0,T=T+Math.imul(ue,tt)|0,q=q+Math.imul(ue,ve)|0,N=N+Math.imul(te,he)|0,T=T+Math.imul(te,be)|0,T=T+Math.imul(ne,he)|0,q=q+Math.imul(ne,be)|0;var sn=(E+N|0)+((T&8191)<<13)|0;E=(q+(T>>>13)|0)+(sn>>>26)|0,sn&=67108863,N=Math.imul(Q,_e),T=Math.imul(Q,ke),T=T+Math.imul(de,_e)|0,q=Math.imul(de,ke),N=N+Math.imul(R,Ne)|0,T=T+Math.imul(R,We)|0,T=T+Math.imul(z,Ne)|0,q=q+Math.imul(z,We)|0,N=N+Math.imul(pe,ft)|0,T=T+Math.imul(pe,Ye)|0,T=T+Math.imul(ge,ft)|0,q=q+Math.imul(ge,Ye)|0,N=N+Math.imul(K,tt)|0,T=T+Math.imul(K,ve)|0,T=T+Math.imul(ee,tt)|0,q=q+Math.imul(ee,ve)|0,N=N+Math.imul(ie,he)|0,T=T+Math.imul(ie,be)|0,T=T+Math.imul(ue,he)|0,q=q+Math.imul(ue,be)|0,N=N+Math.imul(te,Oe)|0,T=T+Math.imul(te,Ie)|0,T=T+Math.imul(ne,Oe)|0,q=q+Math.imul(ne,Ie)|0;var Bi=(E+N|0)+((T&8191)<<13)|0;E=(q+(T>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,N=Math.imul(Se,_e),T=Math.imul(Se,ke),T=T+Math.imul(Ee,_e)|0,q=Math.imul(Ee,ke),N=N+Math.imul(Q,Ne)|0,T=T+Math.imul(Q,We)|0,T=T+Math.imul(de,Ne)|0,q=q+Math.imul(de,We)|0,N=N+Math.imul(R,ft)|0,T=T+Math.imul(R,Ye)|0,T=T+Math.imul(z,ft)|0,q=q+Math.imul(z,Ye)|0,N=N+Math.imul(pe,tt)|0,T=T+Math.imul(pe,ve)|0,T=T+Math.imul(ge,tt)|0,q=q+Math.imul(ge,ve)|0,N=N+Math.imul(K,he)|0,T=T+Math.imul(K,be)|0,T=T+Math.imul(ee,he)|0,q=q+Math.imul(ee,be)|0,N=N+Math.imul(ie,Oe)|0,T=T+Math.imul(ie,Ie)|0,T=T+Math.imul(ue,Oe)|0,q=q+Math.imul(ue,Ie)|0,N=N+Math.imul(te,je)|0,T=T+Math.imul(te,Me)|0,T=T+Math.imul(ne,je)|0,q=q+Math.imul(ne,Me)|0;var ji=(E+N|0)+((T&8191)<<13)|0;E=(q+(T>>>13)|0)+(ji>>>26)|0,ji&=67108863,N=Math.imul(Te,_e),T=Math.imul(Te,ke),T=T+Math.imul(W,_e)|0,q=Math.imul(W,ke),N=N+Math.imul(Se,Ne)|0,T=T+Math.imul(Se,We)|0,T=T+Math.imul(Ee,Ne)|0,q=q+Math.imul(Ee,We)|0,N=N+Math.imul(Q,ft)|0,T=T+Math.imul(Q,Ye)|0,T=T+Math.imul(de,ft)|0,q=q+Math.imul(de,Ye)|0,N=N+Math.imul(R,tt)|0,T=T+Math.imul(R,ve)|0,T=T+Math.imul(z,tt)|0,q=q+Math.imul(z,ve)|0,N=N+Math.imul(pe,he)|0,T=T+Math.imul(pe,be)|0,T=T+Math.imul(ge,he)|0,q=q+Math.imul(ge,be)|0,N=N+Math.imul(K,Oe)|0,T=T+Math.imul(K,Ie)|0,T=T+Math.imul(ee,Oe)|0,q=q+Math.imul(ee,Ie)|0,N=N+Math.imul(ie,je)|0,T=T+Math.imul(ie,Me)|0,T=T+Math.imul(ue,je)|0,q=q+Math.imul(ue,Me)|0,N=N+Math.imul(te,qe)|0,T=T+Math.imul(te,ze)|0,T=T+Math.imul(ne,qe)|0,q=q+Math.imul(ne,ze)|0;var Li=(E+N|0)+((T&8191)<<13)|0;E=(q+(T>>>13)|0)+(Li>>>26)|0,Li&=67108863,N=Math.imul(k,_e),T=Math.imul(k,ke),T=T+Math.imul(Y,_e)|0,q=Math.imul(Y,ke),N=N+Math.imul(Te,Ne)|0,T=T+Math.imul(Te,We)|0,T=T+Math.imul(W,Ne)|0,q=q+Math.imul(W,We)|0,N=N+Math.imul(Se,ft)|0,T=T+Math.imul(Se,Ye)|0,T=T+Math.imul(Ee,ft)|0,q=q+Math.imul(Ee,Ye)|0,N=N+Math.imul(Q,tt)|0,T=T+Math.imul(Q,ve)|0,T=T+Math.imul(de,tt)|0,q=q+Math.imul(de,ve)|0,N=N+Math.imul(R,he)|0,T=T+Math.imul(R,be)|0,T=T+Math.imul(z,he)|0,q=q+Math.imul(z,be)|0,N=N+Math.imul(pe,Oe)|0,T=T+Math.imul(pe,Ie)|0,T=T+Math.imul(ge,Oe)|0,q=q+Math.imul(ge,Ie)|0,N=N+Math.imul(K,je)|0,T=T+Math.imul(K,Me)|0,T=T+Math.imul(ee,je)|0,q=q+Math.imul(ee,Me)|0,N=N+Math.imul(ie,qe)|0,T=T+Math.imul(ie,ze)|0,T=T+Math.imul(ue,qe)|0,q=q+Math.imul(ue,ze)|0,N=N+Math.imul(te,Be)|0,T=T+Math.imul(te,Ke)|0,T=T+Math.imul(ne,Be)|0,q=q+Math.imul(ne,Ke)|0;var zi=(E+N|0)+((T&8191)<<13)|0;E=(q+(T>>>13)|0)+(zi>>>26)|0,zi&=67108863,N=Math.imul(fe,_e),T=Math.imul(fe,ke),T=T+Math.imul(le,_e)|0,q=Math.imul(le,ke),N=N+Math.imul(k,Ne)|0,T=T+Math.imul(k,We)|0,T=T+Math.imul(Y,Ne)|0,q=q+Math.imul(Y,We)|0,N=N+Math.imul(Te,ft)|0,T=T+Math.imul(Te,Ye)|0,T=T+Math.imul(W,ft)|0,q=q+Math.imul(W,Ye)|0,N=N+Math.imul(Se,tt)|0,T=T+Math.imul(Se,ve)|0,T=T+Math.imul(Ee,tt)|0,q=q+Math.imul(Ee,ve)|0,N=N+Math.imul(Q,he)|0,T=T+Math.imul(Q,be)|0,T=T+Math.imul(de,he)|0,q=q+Math.imul(de,be)|0,N=N+Math.imul(R,Oe)|0,T=T+Math.imul(R,Ie)|0,T=T+Math.imul(z,Oe)|0,q=q+Math.imul(z,Ie)|0,N=N+Math.imul(pe,je)|0,T=T+Math.imul(pe,Me)|0,T=T+Math.imul(ge,je)|0,q=q+Math.imul(ge,Me)|0,N=N+Math.imul(K,qe)|0,T=T+Math.imul(K,ze)|0,T=T+Math.imul(ee,qe)|0,q=q+Math.imul(ee,ze)|0,N=N+Math.imul(ie,Be)|0,T=T+Math.imul(ie,Ke)|0,T=T+Math.imul(ue,Be)|0,q=q+Math.imul(ue,Ke)|0,N=N+Math.imul(te,ct)|0,T=T+Math.imul(te,Ct)|0,T=T+Math.imul(ne,ct)|0,q=q+Math.imul(ne,Ct)|0;var Ui=(E+N|0)+((T&8191)<<13)|0;E=(q+(T>>>13)|0)+(Ui>>>26)|0,Ui&=67108863,N=Math.imul(fe,Ne),T=Math.imul(fe,We),T=T+Math.imul(le,Ne)|0,q=Math.imul(le,We),N=N+Math.imul(k,ft)|0,T=T+Math.imul(k,Ye)|0,T=T+Math.imul(Y,ft)|0,q=q+Math.imul(Y,Ye)|0,N=N+Math.imul(Te,tt)|0,T=T+Math.imul(Te,ve)|0,T=T+Math.imul(W,tt)|0,q=q+Math.imul(W,ve)|0,N=N+Math.imul(Se,he)|0,T=T+Math.imul(Se,be)|0,T=T+Math.imul(Ee,he)|0,q=q+Math.imul(Ee,be)|0,N=N+Math.imul(Q,Oe)|0,T=T+Math.imul(Q,Ie)|0,T=T+Math.imul(de,Oe)|0,q=q+Math.imul(de,Ie)|0,N=N+Math.imul(R,je)|0,T=T+Math.imul(R,Me)|0,T=T+Math.imul(z,je)|0,q=q+Math.imul(z,Me)|0,N=N+Math.imul(pe,qe)|0,T=T+Math.imul(pe,ze)|0,T=T+Math.imul(ge,qe)|0,q=q+Math.imul(ge,ze)|0,N=N+Math.imul(K,Be)|0,T=T+Math.imul(K,Ke)|0,T=T+Math.imul(ee,Be)|0,q=q+Math.imul(ee,Ke)|0,N=N+Math.imul(ie,ct)|0,T=T+Math.imul(ie,Ct)|0,T=T+Math.imul(ue,ct)|0,q=q+Math.imul(ue,Ct)|0;var ro=(E+N|0)+((T&8191)<<13)|0;E=(q+(T>>>13)|0)+(ro>>>26)|0,ro&=67108863,N=Math.imul(fe,ft),T=Math.imul(fe,Ye),T=T+Math.imul(le,ft)|0,q=Math.imul(le,Ye),N=N+Math.imul(k,tt)|0,T=T+Math.imul(k,ve)|0,T=T+Math.imul(Y,tt)|0,q=q+Math.imul(Y,ve)|0,N=N+Math.imul(Te,he)|0,T=T+Math.imul(Te,be)|0,T=T+Math.imul(W,he)|0,q=q+Math.imul(W,be)|0,N=N+Math.imul(Se,Oe)|0,T=T+Math.imul(Se,Ie)|0,T=T+Math.imul(Ee,Oe)|0,q=q+Math.imul(Ee,Ie)|0,N=N+Math.imul(Q,je)|0,T=T+Math.imul(Q,Me)|0,T=T+Math.imul(de,je)|0,q=q+Math.imul(de,Me)|0,N=N+Math.imul(R,qe)|0,T=T+Math.imul(R,ze)|0,T=T+Math.imul(z,qe)|0,q=q+Math.imul(z,ze)|0,N=N+Math.imul(pe,Be)|0,T=T+Math.imul(pe,Ke)|0,T=T+Math.imul(ge,Be)|0,q=q+Math.imul(ge,Ke)|0,N=N+Math.imul(K,ct)|0,T=T+Math.imul(K,Ct)|0,T=T+Math.imul(ee,ct)|0,q=q+Math.imul(ee,Ct)|0;var Hi=(E+N|0)+((T&8191)<<13)|0;E=(q+(T>>>13)|0)+(Hi>>>26)|0,Hi&=67108863,N=Math.imul(fe,tt),T=Math.imul(fe,ve),T=T+Math.imul(le,tt)|0,q=Math.imul(le,ve),N=N+Math.imul(k,he)|0,T=T+Math.imul(k,be)|0,T=T+Math.imul(Y,he)|0,q=q+Math.imul(Y,be)|0,N=N+Math.imul(Te,Oe)|0,T=T+Math.imul(Te,Ie)|0,T=T+Math.imul(W,Oe)|0,q=q+Math.imul(W,Ie)|0,N=N+Math.imul(Se,je)|0,T=T+Math.imul(Se,Me)|0,T=T+Math.imul(Ee,je)|0,q=q+Math.imul(Ee,Me)|0,N=N+Math.imul(Q,qe)|0,T=T+Math.imul(Q,ze)|0,T=T+Math.imul(de,qe)|0,q=q+Math.imul(de,ze)|0,N=N+Math.imul(R,Be)|0,T=T+Math.imul(R,Ke)|0,T=T+Math.imul(z,Be)|0,q=q+Math.imul(z,Ke)|0,N=N+Math.imul(pe,ct)|0,T=T+Math.imul(pe,Ct)|0,T=T+Math.imul(ge,ct)|0,q=q+Math.imul(ge,Ct)|0;var Vi=(E+N|0)+((T&8191)<<13)|0;E=(q+(T>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,N=Math.imul(fe,he),T=Math.imul(fe,be),T=T+Math.imul(le,he)|0,q=Math.imul(le,be),N=N+Math.imul(k,Oe)|0,T=T+Math.imul(k,Ie)|0,T=T+Math.imul(Y,Oe)|0,q=q+Math.imul(Y,Ie)|0,N=N+Math.imul(Te,je)|0,T=T+Math.imul(Te,Me)|0,T=T+Math.imul(W,je)|0,q=q+Math.imul(W,Me)|0,N=N+Math.imul(Se,qe)|0,T=T+Math.imul(Se,ze)|0,T=T+Math.imul(Ee,qe)|0,q=q+Math.imul(Ee,ze)|0,N=N+Math.imul(Q,Be)|0,T=T+Math.imul(Q,Ke)|0,T=T+Math.imul(de,Be)|0,q=q+Math.imul(de,Ke)|0,N=N+Math.imul(R,ct)|0,T=T+Math.imul(R,Ct)|0,T=T+Math.imul(z,ct)|0,q=q+Math.imul(z,Ct)|0;var Vr=(E+N|0)+((T&8191)<<13)|0;E=(q+(T>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,N=Math.imul(fe,Oe),T=Math.imul(fe,Ie),T=T+Math.imul(le,Oe)|0,q=Math.imul(le,Ie),N=N+Math.imul(k,je)|0,T=T+Math.imul(k,Me)|0,T=T+Math.imul(Y,je)|0,q=q+Math.imul(Y,Me)|0,N=N+Math.imul(Te,qe)|0,T=T+Math.imul(Te,ze)|0,T=T+Math.imul(W,qe)|0,q=q+Math.imul(W,ze)|0,N=N+Math.imul(Se,Be)|0,T=T+Math.imul(Se,Ke)|0,T=T+Math.imul(Ee,Be)|0,q=q+Math.imul(Ee,Ke)|0,N=N+Math.imul(Q,ct)|0,T=T+Math.imul(Q,Ct)|0,T=T+Math.imul(de,ct)|0,q=q+Math.imul(de,Ct)|0;var Wi=(E+N|0)+((T&8191)<<13)|0;E=(q+(T>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,N=Math.imul(fe,je),T=Math.imul(fe,Me),T=T+Math.imul(le,je)|0,q=Math.imul(le,Me),N=N+Math.imul(k,qe)|0,T=T+Math.imul(k,ze)|0,T=T+Math.imul(Y,qe)|0,q=q+Math.imul(Y,ze)|0,N=N+Math.imul(Te,Be)|0,T=T+Math.imul(Te,Ke)|0,T=T+Math.imul(W,Be)|0,q=q+Math.imul(W,Ke)|0,N=N+Math.imul(Se,ct)|0,T=T+Math.imul(Se,Ct)|0,T=T+Math.imul(Ee,ct)|0,q=q+Math.imul(Ee,Ct)|0;var qi=(E+N|0)+((T&8191)<<13)|0;E=(q+(T>>>13)|0)+(qi>>>26)|0,qi&=67108863,N=Math.imul(fe,qe),T=Math.imul(fe,ze),T=T+Math.imul(le,qe)|0,q=Math.imul(le,ze),N=N+Math.imul(k,Be)|0,T=T+Math.imul(k,Ke)|0,T=T+Math.imul(Y,Be)|0,q=q+Math.imul(Y,Ke)|0,N=N+Math.imul(Te,ct)|0,T=T+Math.imul(Te,Ct)|0,T=T+Math.imul(W,ct)|0,q=q+Math.imul(W,Ct)|0;var Gi=(E+N|0)+((T&8191)<<13)|0;E=(q+(T>>>13)|0)+(Gi>>>26)|0,Gi&=67108863,N=Math.imul(fe,Be),T=Math.imul(fe,Ke),T=T+Math.imul(le,Be)|0,q=Math.imul(le,Ke),N=N+Math.imul(k,ct)|0,T=T+Math.imul(k,Ct)|0,T=T+Math.imul(Y,ct)|0,q=q+Math.imul(Y,Ct)|0;var cf=(E+N|0)+((T&8191)<<13)|0;E=(q+(T>>>13)|0)+(cf>>>26)|0,cf&=67108863,N=Math.imul(fe,ct),T=Math.imul(fe,Ct),T=T+Math.imul(le,ct)|0,q=Math.imul(le,Ct);var uf=(E+N|0)+((T&8191)<<13)|0;return E=(q+(T>>>13)|0)+(uf>>>26)|0,uf&=67108863,U[0]=xn,U[1]=Nn,U[2]=an,U[3]=ai,U[4]=sn,U[5]=Bi,U[6]=ji,U[7]=Li,U[8]=zi,U[9]=Ui,U[10]=ro,U[11]=Hi,U[12]=Vi,U[13]=Vr,U[14]=Wi,U[15]=qi,U[16]=Gi,U[17]=cf,U[18]=uf,E!==0&&(U[19]=E,B.length++),B};Math.imul||(y=w);function C(S,v,b){b.negative=v.negative^S.negative,b.length=S.length+v.length;for(var B=0,M=0,j=0;j>>26)|0,M+=U>>>26,U&=67108863}b.words[j]=E,B=U,U=M}return B!==0?b.words[j]=B:b.length--,b._strip()}function I(S,v,b){return C(S,v,b)}i.prototype.mulTo=function(v,b){var B,M=this.length+v.length;return this.length===10&&v.length===10?B=y(this,v,b):M<63?B=w(this,v,b):M<1024?B=C(this,v,b):B=I(this,v,b),B},i.prototype.mul=function(v){var b=new i(null);return b.words=new Array(this.length+v.length),this.mulTo(v,b)},i.prototype.mulf=function(v){var b=new i(null);return b.words=new Array(this.length+v.length),I(this,v,b)},i.prototype.imul=function(v){return this.clone().mulTo(v,this)},i.prototype.imuln=function(v){var b=v<0;b&&(v=-v),n(typeof v=="number"),n(v<67108864);for(var B=0,M=0;M>=26,B+=j/67108864|0,B+=U>>>26,this.words[M]=U&67108863}return B!==0&&(this.words[M]=B,this.length++),b?this.ineg():this},i.prototype.muln=function(v){return this.clone().imuln(v)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(v){var b=_(v);if(b.length===0)return new i(1);for(var B=this,M=0;M=0);var b=v%26,B=(v-b)/26,M=67108863>>>26-b<<26-b,j;if(b!==0){var U=0;for(j=0;j>>26-b}U&&(this.words[j]=U,this.length++)}if(B!==0){for(j=this.length-1;j>=0;j--)this.words[j+B]=this.words[j];for(j=0;j=0);var M;b?M=(b-b%26)/26:M=0;var j=v%26,U=Math.min((v-j)/26,this.length),E=67108863^67108863>>>j<U)for(this.length-=U,T=0;T=0&&(q!==0||T>=M);T--){var J=this.words[T]|0;this.words[T]=q<<26-j|J>>>j,q=J&E}return N&&q!==0&&(N.words[N.length++]=q),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(v,b,B){return n(this.negative===0),this.iushrn(v,b,B)},i.prototype.shln=function(v){return this.clone().ishln(v)},i.prototype.ushln=function(v){return this.clone().iushln(v)},i.prototype.shrn=function(v){return this.clone().ishrn(v)},i.prototype.ushrn=function(v){return this.clone().iushrn(v)},i.prototype.testn=function(v){n(typeof v=="number"&&v>=0);var b=v%26,B=(v-b)/26,M=1<=0);var b=v%26,B=(v-b)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=B)return this;if(b!==0&&B++,this.length=Math.min(B,this.length),b!==0){var M=67108863^67108863>>>b<=67108864;b++)this.words[b]-=67108864,b===this.length-1?this.words[b+1]=1:this.words[b+1]++;return this.length=Math.max(this.length,b+1),this},i.prototype.isubn=function(v){if(n(typeof v=="number"),n(v<67108864),v<0)return this.iaddn(-v);if(this.negative!==0)return this.negative=0,this.iaddn(v),this.negative=1,this;if(this.words[0]-=v,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var b=0;b>26)-(N/67108864|0),this.words[j+B]=U&67108863}for(;j>26,this.words[j+B]=U&67108863;if(E===0)return this._strip();for(n(E===-1),E=0,j=0;j>26,this.words[j]=U&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(v,b){var B=this.length-v.length,M=this.clone(),j=v,U=j.words[j.length-1]|0,E=this._countBits(U);B=26-E,B!==0&&(j=j.ushln(B),M.iushln(B),U=j.words[j.length-1]|0);var N=M.length-j.length,T;if(b!=="mod"){T=new i(null),T.length=N+1,T.words=new Array(T.length);for(var q=0;q=0;te--){var ne=(M.words[j.length+te]|0)*67108864+(M.words[j.length+te-1]|0);for(ne=Math.min(ne/U|0,67108863),M._ishlnsubmul(j,ne,te);M.negative!==0;)ne--,M.negative=0,M._ishlnsubmul(j,1,te),M.isZero()||(M.negative^=1);T&&(T.words[te]=ne)}return T&&T._strip(),M._strip(),b!=="div"&&B!==0&&M.iushrn(B),{div:T||null,mod:M}},i.prototype.divmod=function(v,b,B){if(n(!v.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var M,j,U;return this.negative!==0&&v.negative===0?(U=this.neg().divmod(v,b),b!=="mod"&&(M=U.div.neg()),b!=="div"&&(j=U.mod.neg(),B&&j.negative!==0&&j.iadd(v)),{div:M,mod:j}):this.negative===0&&v.negative!==0?(U=this.divmod(v.neg(),b),b!=="mod"&&(M=U.div.neg()),{div:M,mod:U.mod}):this.negative&v.negative?(U=this.neg().divmod(v.neg(),b),b!=="div"&&(j=U.mod.neg(),B&&j.negative!==0&&j.isub(v)),{div:U.div,mod:j}):v.length>this.length||this.cmp(v)<0?{div:new i(0),mod:this}:v.length===1?b==="div"?{div:this.divn(v.words[0]),mod:null}:b==="mod"?{div:null,mod:new i(this.modrn(v.words[0]))}:{div:this.divn(v.words[0]),mod:new i(this.modrn(v.words[0]))}:this._wordDiv(v,b)},i.prototype.div=function(v){return this.divmod(v,"div",!1).div},i.prototype.mod=function(v){return this.divmod(v,"mod",!1).mod},i.prototype.umod=function(v){return this.divmod(v,"mod",!0).mod},i.prototype.divRound=function(v){var b=this.divmod(v);if(b.mod.isZero())return b.div;var B=b.div.negative!==0?b.mod.isub(v):b.mod,M=v.ushrn(1),j=v.andln(1),U=B.cmp(M);return U<0||j===1&&U===0?b.div:b.div.negative!==0?b.div.isubn(1):b.div.iaddn(1)},i.prototype.modrn=function(v){var b=v<0;b&&(v=-v),n(v<=67108863);for(var B=(1<<26)%v,M=0,j=this.length-1;j>=0;j--)M=(B*M+(this.words[j]|0))%v;return b?-M:M},i.prototype.modn=function(v){return this.modrn(v)},i.prototype.idivn=function(v){var b=v<0;b&&(v=-v),n(v<=67108863);for(var B=0,M=this.length-1;M>=0;M--){var j=(this.words[M]|0)+B*67108864;this.words[M]=j/v|0,B=j%v}return this._strip(),b?this.ineg():this},i.prototype.divn=function(v){return this.clone().idivn(v)},i.prototype.egcd=function(v){n(v.negative===0),n(!v.isZero());var b=this,B=v.clone();b.negative!==0?b=b.umod(v):b=b.clone();for(var M=new i(1),j=new i(0),U=new i(0),E=new i(1),N=0;b.isEven()&&B.isEven();)b.iushrn(1),B.iushrn(1),++N;for(var T=B.clone(),q=b.clone();!b.isZero();){for(var J=0,te=1;!(b.words[0]&te)&&J<26;++J,te<<=1);if(J>0)for(b.iushrn(J);J-- >0;)(M.isOdd()||j.isOdd())&&(M.iadd(T),j.isub(q)),M.iushrn(1),j.iushrn(1);for(var ne=0,ce=1;!(B.words[0]&ce)&&ne<26;++ne,ce<<=1);if(ne>0)for(B.iushrn(ne);ne-- >0;)(U.isOdd()||E.isOdd())&&(U.iadd(T),E.isub(q)),U.iushrn(1),E.iushrn(1);b.cmp(B)>=0?(b.isub(B),M.isub(U),j.isub(E)):(B.isub(b),U.isub(M),E.isub(j))}return{a:U,b:E,gcd:B.iushln(N)}},i.prototype._invmp=function(v){n(v.negative===0),n(!v.isZero());var b=this,B=v.clone();b.negative!==0?b=b.umod(v):b=b.clone();for(var M=new i(1),j=new i(0),U=B.clone();b.cmpn(1)>0&&B.cmpn(1)>0;){for(var E=0,N=1;!(b.words[0]&N)&&E<26;++E,N<<=1);if(E>0)for(b.iushrn(E);E-- >0;)M.isOdd()&&M.iadd(U),M.iushrn(1);for(var T=0,q=1;!(B.words[0]&q)&&T<26;++T,q<<=1);if(T>0)for(B.iushrn(T);T-- >0;)j.isOdd()&&j.iadd(U),j.iushrn(1);b.cmp(B)>=0?(b.isub(B),M.isub(j)):(B.isub(b),j.isub(M))}var J;return b.cmpn(1)===0?J=M:J=j,J.cmpn(0)<0&&J.iadd(v),J},i.prototype.gcd=function(v){if(this.isZero())return v.abs();if(v.isZero())return this.abs();var b=this.clone(),B=v.clone();b.negative=0,B.negative=0;for(var M=0;b.isEven()&&B.isEven();M++)b.iushrn(1),B.iushrn(1);do{for(;b.isEven();)b.iushrn(1);for(;B.isEven();)B.iushrn(1);var j=b.cmp(B);if(j<0){var U=b;b=B,B=U}else if(j===0||B.cmpn(1)===0)break;b.isub(B)}while(!0);return B.iushln(M)},i.prototype.invm=function(v){return this.egcd(v).a.umod(v)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(v){return this.words[0]&v},i.prototype.bincn=function(v){n(typeof v=="number");var b=v%26,B=(v-b)/26,M=1<>>26,E&=67108863,this.words[U]=E}return j!==0&&(this.words[U]=j,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(v){var b=v<0;if(this.negative!==0&&!b)return-1;if(this.negative===0&&b)return 1;this._strip();var B;if(this.length>1)B=1;else{b&&(v=-v),n(v<=67108863,"Number is too big");var M=this.words[0]|0;B=M===v?0:Mv.length)return 1;if(this.length=0;B--){var M=this.words[B]|0,j=v.words[B]|0;if(M!==j){Mj&&(b=1);break}}return b},i.prototype.gtn=function(v){return this.cmpn(v)===1},i.prototype.gt=function(v){return this.cmp(v)===1},i.prototype.gten=function(v){return this.cmpn(v)>=0},i.prototype.gte=function(v){return this.cmp(v)>=0},i.prototype.ltn=function(v){return this.cmpn(v)===-1},i.prototype.lt=function(v){return this.cmp(v)===-1},i.prototype.lten=function(v){return this.cmpn(v)<=0},i.prototype.lte=function(v){return this.cmp(v)<=0},i.prototype.eqn=function(v){return this.cmpn(v)===0},i.prototype.eq=function(v){return this.cmp(v)===0},i.red=function(v){return new V(v)},i.prototype.toRed=function(v){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),v.convertTo(this)._forceRed(v)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(v){return this.red=v,this},i.prototype.forceRed=function(v){return n(!this.red,"Already a number in reduction context"),this._forceRed(v)},i.prototype.redAdd=function(v){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,v)},i.prototype.redIAdd=function(v){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,v)},i.prototype.redSub=function(v){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,v)},i.prototype.redISub=function(v){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,v)},i.prototype.redShl=function(v){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,v)},i.prototype.redMul=function(v){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.mul(this,v)},i.prototype.redIMul=function(v){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.imul(this,v)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(v){return n(this.red&&!v.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,v)};var F={k256:null,p224:null,p192:null,p25519:null};function O(S,v){this.name=S,this.p=new i(v,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}O.prototype._tmp=function(){var v=new i(null);return v.words=new Array(Math.ceil(this.n/13)),v},O.prototype.ireduce=function(v){var b=v,B;do this.split(b,this.tmp),b=this.imulK(b),b=b.iadd(this.tmp),B=b.bitLength();while(B>this.n);var M=B0?b.isub(this.p):b.strip!==void 0?b.strip():b._strip(),b},O.prototype.split=function(v,b){v.iushrn(this.n,0,b)},O.prototype.imulK=function(v){return v.imul(this.k)};function g(){O.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(g,O),g.prototype.split=function(v,b){for(var B=4194303,M=Math.min(v.length,9),j=0;j>>22,U=E}U>>>=22,v.words[j-10]=U,U===0&&v.length>10?v.length-=10:v.length-=9},g.prototype.imulK=function(v){v.words[v.length]=0,v.words[v.length+1]=0,v.length+=2;for(var b=0,B=0;B>>=26,v.words[B]=j,b=M}return b!==0&&(v.words[v.length++]=b),v},i._prime=function(v){if(F[v])return F[v];var b;if(v==="k256")b=new g;else if(v==="p224")b=new D;else if(v==="p192")b=new H;else if(v==="p25519")b=new G;else throw new Error("Unknown prime "+v);return F[v]=b,b};function V(S){if(typeof S=="string"){var v=i._prime(S);this.m=v.p,this.prime=v}else n(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null}V.prototype._verify1=function(v){n(v.negative===0,"red works only with positives"),n(v.red,"red works only with red numbers")},V.prototype._verify2=function(v,b){n((v.negative|b.negative)===0,"red works only with positives"),n(v.red&&v.red===b.red,"red works only with red numbers")},V.prototype.imod=function(v){return this.prime?this.prime.ireduce(v)._forceRed(this):(u(v,v.umod(this.m)._forceRed(this)),v)},V.prototype.neg=function(v){return v.isZero()?v.clone():this.m.sub(v)._forceRed(this)},V.prototype.add=function(v,b){this._verify2(v,b);var B=v.add(b);return B.cmp(this.m)>=0&&B.isub(this.m),B._forceRed(this)},V.prototype.iadd=function(v,b){this._verify2(v,b);var B=v.iadd(b);return B.cmp(this.m)>=0&&B.isub(this.m),B},V.prototype.sub=function(v,b){this._verify2(v,b);var B=v.sub(b);return B.cmpn(0)<0&&B.iadd(this.m),B._forceRed(this)},V.prototype.isub=function(v,b){this._verify2(v,b);var B=v.isub(b);return B.cmpn(0)<0&&B.iadd(this.m),B},V.prototype.shl=function(v,b){return this._verify1(v),this.imod(v.ushln(b))},V.prototype.imul=function(v,b){return this._verify2(v,b),this.imod(v.imul(b))},V.prototype.mul=function(v,b){return this._verify2(v,b),this.imod(v.mul(b))},V.prototype.isqr=function(v){return this.imul(v,v.clone())},V.prototype.sqr=function(v){return this.mul(v,v)},V.prototype.sqrt=function(v){if(v.isZero())return v.clone();var b=this.m.andln(3);if(n(b%2===1),b===3){var B=this.m.add(new i(1)).iushrn(2);return this.pow(v,B)}for(var M=this.m.subn(1),j=0;!M.isZero()&&M.andln(1)===0;)j++,M.iushrn(1);n(!M.isZero());var U=new i(1).toRed(this),E=U.redNeg(),N=this.m.subn(1).iushrn(1),T=this.m.bitLength();for(T=new i(2*T*T).toRed(this);this.pow(T,N).cmp(E)!==0;)T.redIAdd(E);for(var q=this.pow(T,M),J=this.pow(v,M.addn(1).iushrn(1)),te=this.pow(v,M),ne=j;te.cmp(U)!==0;){for(var ce=te,ie=0;ce.cmp(U)!==0;ie++)ce=ce.redSqr();n(ie=0;j--){for(var q=b.words[j],J=T-1;J>=0;J--){var te=q>>J&1;if(U!==M[0]&&(U=this.sqr(U)),te===0&&E===0){N=0;continue}E<<=1,E|=te,N++,!(N!==B&&(j!==0||J!==0))&&(U=this.mul(U,M[E]),N=0,E=0)}T=26}return U},V.prototype.convertTo=function(v){var b=v.umod(this.m);return b===v?b.clone():b},V.prototype.convertFrom=function(v){var b=v.clone();return b.red=null,b},i.mont=function(v){return new P(v)};function P(S){V.call(this,S),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}o(P,V),P.prototype.convertTo=function(v){return this.imod(v.ushln(this.shift))},P.prototype.convertFrom=function(v){var b=this.imod(v.mul(this.rinv));return b.red=null,b},P.prototype.imul=function(v,b){if(v.isZero()||b.isZero())return v.words[0]=0,v.length=1,v;var B=v.imul(b),M=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),j=B.isub(M).iushrn(this.shift),U=j;return j.cmp(this.m)>=0?U=j.isub(this.m):j.cmpn(0)<0&&(U=j.iadd(this.m)),U._forceRed(this)},P.prototype.mul=function(v,b){if(v.isZero()||b.isZero())return new i(0)._forceRed(this);var B=v.mul(b),M=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),j=B.isub(M).iushrn(this.shift),U=j;return j.cmp(this.m)>=0?U=j.isub(this.m):j.cmpn(0)<0&&(U=j.iadd(this.m)),U._forceRed(this)},P.prototype.invm=function(v){var b=this.imod(v._invmp(this.m).mul(this.r2));return b._forceRed(this)}})(e,Le)})(m4);var g_e=m4.exports;const m_e="Input must be an string, Buffer or Uint8Array";function y_e(e){let t;if(e instanceof Uint8Array)t=e;else if(typeof e=="string")t=new TextEncoder().encode(e);else throw new Error(m_e);return t}function b_e(e){return Array.prototype.map.call(e,function(t){return(t<16?"0":"")+t.toString(16)}).join("")}function D0(e){return(4294967296+e).toString(16).substring(1)}function w_e(e,t,r){let n=` +`+e+" = ";for(let o=0;o=4294967296&&o++,e[t]=n,e[t+1]=o}function jA(e,t,r,n){let o=e[t]+r;r<0&&(o+=4294967296);let i=e[t+1]+n;o>=4294967296&&i++,e[t]=o,e[t+1]=i}function cH(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function La(e,t,r,n,o,i){const a=id[o],s=id[o+1],l=id[i],c=id[i+1];M0(yt,e,t),jA(yt,e,a,s);let u=yt[n]^yt[e],f=yt[n+1]^yt[e+1];yt[n]=f,yt[n+1]=u,M0(yt,r,n),u=yt[t]^yt[r],f=yt[t+1]^yt[r+1],yt[t]=u>>>24^f<<8,yt[t+1]=f>>>24^u<<8,M0(yt,e,t),jA(yt,e,l,c),u=yt[n]^yt[e],f=yt[n+1]^yt[e+1],yt[n]=u>>>16^f<<16,yt[n+1]=f>>>16^u<<16,M0(yt,r,n),u=yt[t]^yt[r],f=yt[t+1]^yt[r+1],yt[t]=f>>>31^u<<1,yt[t+1]=u>>>31^f<<1}const uH=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),__e=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],Kr=new Uint8Array(__e.map(function(e){return e*2})),yt=new Uint32Array(32),id=new Uint32Array(32);function fH(e,t){let r=0;for(r=0;r<16;r++)yt[r]=e.h[r],yt[r+16]=uH[r];for(yt[24]=yt[24]^e.t,yt[25]=yt[25]^e.t/4294967296,t&&(yt[28]=~yt[28],yt[29]=~yt[29]),r=0;r<32;r++)id[r]=cH(e.b,4*r);for(r=0;r<12;r++)La(0,8,16,24,Kr[r*16+0],Kr[r*16+1]),La(2,10,18,26,Kr[r*16+2],Kr[r*16+3]),La(4,12,20,28,Kr[r*16+4],Kr[r*16+5]),La(6,14,22,30,Kr[r*16+6],Kr[r*16+7]),La(0,10,20,30,Kr[r*16+8],Kr[r*16+9]),La(2,12,22,24,Kr[r*16+10],Kr[r*16+11]),La(4,14,16,26,Kr[r*16+12],Kr[r*16+13]),La(6,8,18,28,Kr[r*16+14],Kr[r*16+15]);for(r=0;r<16;r++)e.h[r]=e.h[r]^yt[r]^yt[r+16]}const za=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function dH(e,t,r,n){if(e===0||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(r&&r.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(n&&n.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const o={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};za.fill(0),za[0]=e,t&&(za[1]=t.length),za[2]=1,za[3]=1,r&&za.set(r,32),n&&za.set(n,48);for(let i=0;i<16;i++)o.h[i]=uH[i]^cH(za,i*4);return t&&(y4(o,t),o.c=128),o}function y4(e,t){for(let r=0;r>2]>>8*(r&3);return t}function hH(e,t,r,n,o){r=r||64,e=g1.normalizeInput(e),n&&(n=g1.normalizeInput(n)),o&&(o=g1.normalizeInput(o));const i=dH(r,t,n,o);return y4(i,e),pH(i)}function E_e(e,t,r,n,o){const i=hH(e,t,r,n,o);return g1.toHex(i)}var S_e={blake2b:hH,blake2bHex:E_e,blake2bInit:dH,blake2bUpdate:y4,blake2bFinal:pH};const vH=lH;function C_e(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function Ua(e,t,r,n,o,i){kt[e]=kt[e]+kt[t]+o,kt[n]=R0(kt[n]^kt[e],16),kt[r]=kt[r]+kt[n],kt[t]=R0(kt[t]^kt[r],12),kt[e]=kt[e]+kt[t]+i,kt[n]=R0(kt[n]^kt[e],8),kt[r]=kt[r]+kt[n],kt[t]=R0(kt[t]^kt[r],7)}function R0(e,t){return e>>>t^e<<32-t}const gH=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Yr=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),kt=new Uint32Array(16),$r=new Uint32Array(16);function mH(e,t){let r=0;for(r=0;r<8;r++)kt[r]=e.h[r],kt[r+8]=gH[r];for(kt[12]^=e.t,kt[13]^=e.t/4294967296,t&&(kt[14]=~kt[14]),r=0;r<16;r++)$r[r]=C_e(e.b,4*r);for(r=0;r<10;r++)Ua(0,4,8,12,$r[Yr[r*16+0]],$r[Yr[r*16+1]]),Ua(1,5,9,13,$r[Yr[r*16+2]],$r[Yr[r*16+3]]),Ua(2,6,10,14,$r[Yr[r*16+4]],$r[Yr[r*16+5]]),Ua(3,7,11,15,$r[Yr[r*16+6]],$r[Yr[r*16+7]]),Ua(0,5,10,15,$r[Yr[r*16+8]],$r[Yr[r*16+9]]),Ua(1,6,11,12,$r[Yr[r*16+10]],$r[Yr[r*16+11]]),Ua(2,7,8,13,$r[Yr[r*16+12]],$r[Yr[r*16+13]]),Ua(3,4,9,14,$r[Yr[r*16+14]],$r[Yr[r*16+15]]);for(r=0;r<8;r++)e.h[r]^=kt[r]^kt[r+8]}function yH(e,t){if(!(e>0&&e<=32))throw new Error("Incorrect output length, should be in [1, 32]");const r=t?t.length:0;if(t&&!(r>0&&r<=32))throw new Error("Incorrect key length, should be in [1, 32]");const n={h:new Uint32Array(gH),b:new Uint8Array(64),c:0,t:0,outlen:e};return n.h[0]^=16842752^r<<8^e,r>0&&(b4(n,t),n.c=64),n}function b4(e,t){for(let r=0;r>2]>>8*(r&3)&255;return t}function wH(e,t,r){r=r||32,e=vH.normalizeInput(e);const n=yH(r,t);return b4(n,e),bH(n)}function P_e(e,t,r){const n=wH(e,t,r);return vH.toHex(n)}var O_e={blake2s:wH,blake2sHex:P_e,blake2sInit:yH,blake2sUpdate:b4,blake2sFinal:bH};const Bf=S_e,jf=O_e;var Hy={blake2b:Bf.blake2b,blake2bHex:Bf.blake2bHex,blake2bInit:Bf.blake2bInit,blake2bUpdate:Bf.blake2bUpdate,blake2bFinal:Bf.blake2bFinal,blake2s:jf.blake2s,blake2sHex:jf.blake2sHex,blake2sInit:jf.blake2sInit,blake2sUpdate:jf.blake2sUpdate,blake2sFinal:jf.blake2sFinal};const Vy=ri(Hy);var Wy={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ZERO_ADDRESS=e.DUST_AMOUNT=e.ONE_ALPH=e.ALPH_TOKEN_ID=e.MIN_UTXO_SET_AMOUNT=e.TOTAL_NUMBER_OF_CHAINS=e.TOTAL_NUMBER_OF_GROUPS=void 0,e.TOTAL_NUMBER_OF_GROUPS=4,e.TOTAL_NUMBER_OF_CHAINS=e.TOTAL_NUMBER_OF_GROUPS*e.TOTAL_NUMBER_OF_GROUPS,e.MIN_UTXO_SET_AMOUNT=BigInt(1e12),e.ALPH_TOKEN_ID="".padStart(64,"0"),e.ONE_ALPH=10n**18n,e.DUST_AMOUNT=10n**15n,e.ZERO_ADDRESS="tgx7VNFoP9DJiFMFgXXtafQZkUvyEdDHT9ryamHJYrjq"})(Wy);var qy=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ht,"__esModule",{value:!0});ht.assertType=ht.sleep=ht.hexToString=ht.stringToHex=ht.blockChainIndex=ht.subContractId=ht.contractIdFromTx=ht.addressFromTokenId=ht.addressFromContractId=ht.addressFromPublicKey=ht.publicKeyFromPrivateKey=ht.groupOfPrivateKey=ht.binToHex=ht.hexToBinUnsafe=ht.tokenIdFromAddress=ht.contractIdFromAddress=ht.groupOfAddress=ht.isHexString=ht.xorByte=ht.signatureDecode=ht.encodeHexSignature=ht.encodeSignature=ht.networkIds=void 0;const A_e=c4,am=qy(g_e),mp=qy(Hy),yp=qy($y),_r=Vu,Pd=Wy,k_e=qy(ih);ht.networkIds=["mainnet","testnet","devnet"];const Od=new A_e.ec("secp256k1");function xH(e){let t=e.s;Od.n&&e.s.cmp(Od.nh)===1&&(t=Od.n.sub(e.s));const r=e.r.toString("hex",66).slice(2),n=t.toString("hex",66).slice(2);return r+n}ht.encodeSignature=xH;function I_e(e,t){return xH({r:new am.default(e,"hex"),s:new am.default(t,"hex")})}ht.encodeHexSignature=I_e;function $_e(e,t){if(t.length!==128)throw new Error("Invalid signature length");const r=t.slice(64,128),n=new am.default(r,"hex");if(e.n&&n.cmp(e.nh)<1)return{r:t.slice(0,64),s:r};throw new Error("The signature is not normalized")}ht.signatureDecode=$_e;function _H(e){const t=e>>24&255,r=e>>16&255,n=e>>8&255,o=e&255;return(t^r^n^o)&255}ht.xorByte=_H;function EH(e){return e.length%2===0&&/^[0-9a-fA-F]*$/.test(e)}ht.isHexString=EH;var da;(function(e){e[e.P2PKH=0]="P2PKH",e[e.P2MPKH=1]="P2MPKH",e[e.P2SH=2]="P2SH",e[e.P2C=3]="P2C"})(da||(da={}));function SH(e){const t=yp.default.decode(e);if(t.length==0)throw new Error("Address string is empty");const r=t[0],n=t.slice(1);if(r==da.P2PKH)return T_e(n);if(r==da.P2MPKH)return D_e(n);if(r==da.P2SH)return M_e(n);{const o=CH(e);return o[`${o.length-1}`]}}ht.groupOfAddress=SH;function w4(e){const t=(0,k_e.default)(e)|1;return _H(t)%Pd.TOTAL_NUMBER_OF_GROUPS}function T_e(e){if(e.length!=32)throw new Error(`Invalid p2pkh address length: ${e.length}`);return w4(e)}function D_e(e){if((e.length-2)%32!=0)throw new Error(`Invalid p2mpkh address length: ${e.length}`);return w4(e.slice(1,33))}function M_e(e){return w4(e)}function CH(e){return PH(e)}ht.contractIdFromAddress=CH;function R_e(e){return PH(e)}ht.tokenIdFromAddress=R_e;function PH(e){const t=yp.default.decode(e);if(t.length==0)throw new Error("Address string is empty");const r=t[0],n=t.slice(1);if(r==da.P2C)return n;throw new Error(`Invalid contract address type: ${r}`)}function bp(e){return _r.Buffer.from(e,"hex")}ht.hexToBinUnsafe=bp;function x4(e){return _r.Buffer.from(e).toString("hex")}ht.binToHex=x4;function N_e(e,t){return SH(AH(OH(e,t),t))}ht.groupOfPrivateKey=N_e;function OH(e,t){return(t??"default")==="default"?Od.keyFromPrivate(e).getPublic(!0,"hex"):Od.g.mul(new am.default(e,16)).encode("hex",!0).slice(2)}ht.publicKeyFromPrivateKey=OH;function AH(e,t){if((t??"default")==="default"){const n=_r.Buffer.from([da.P2PKH]),o=_r.Buffer.from(mp.default.blake2b(_r.Buffer.from(e,"hex"),void 0,32)),i=_r.Buffer.concat([n,o]);return yp.default.encode(i)}else{const n=_r.Buffer.from(`0101000000000458144020${e}8685`,"hex"),o=mp.default.blake2b(n,void 0,32),i=_r.Buffer.from([da.P2SH]);return yp.default.encode(_r.Buffer.concat([i,o]))}}ht.addressFromPublicKey=AH;function kH(e){const t=_r.Buffer.from([da.P2C]),r=_r.Buffer.from(bp(e)),n=_r.Buffer.concat([t,r]);return yp.default.encode(n)}ht.addressFromContractId=kH;function F_e(e){return kH(e)}ht.addressFromTokenId=F_e;function B_e(e,t){const r=bp(e),n=_r.Buffer.concat([r,_r.Buffer.from([t])]),o=mp.default.blake2b(n,void 0,32);return x4(o)}ht.contractIdFromTx=B_e;function j_e(e,t,r){if(r<0||r>=Pd.TOTAL_NUMBER_OF_GROUPS)throw new Error(`Invalid group ${r}`);const n=_r.Buffer.concat([bp(e),bp(t)]),o=_r.Buffer.concat([mp.default.blake2b(mp.default.blake2b(n,void 0,32),void 0,32).slice(0,-1),_r.Buffer.from([r])]);return x4(o)}ht.subContractId=j_e;function L_e(e){if(e.length!=64)throw Error(`Invalid block hash: ${e}`);const t=+("0x"+e.slice(-4))%Pd.TOTAL_NUMBER_OF_CHAINS;return{fromGroup:Math.floor(t/Pd.TOTAL_NUMBER_OF_GROUPS),toGroup:t%Pd.TOTAL_NUMBER_OF_GROUPS}}ht.blockChainIndex=L_e;function z_e(e){let t="";for(let r=0;rsetTimeout(t,e))}ht.sleep=H_e;function V_e(){}ht.assertType=V_e;var Gy={},uw={exports:{}},LA;function IH(){return LA||(LA=1,function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function o(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function i(l,c,u,f,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var p=new o(u,f||l,d),h=r?r+c:c;return l._events[h]?l._events[h].fn?l._events[h]=[l._events[h],p]:l._events[h].push(p):(l._events[h]=p,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,f;if(this._eventsCount===0)return c;for(f in u=this._events)t.call(u,f)&&c.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=r?r+c:c,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,p=f.length,h=new Array(p);d{await this.polling(),this.cancelled||(this.task=setTimeout(()=>this.eventEmitter.emit("tick"),this.pollingInterval))}),this.eventEmitter.emit("tick")}unsubscribe(){this.eventEmitter.removeAllListeners(),this.cancelled=!0,typeof this.task<"u"&&clearTimeout(this.task)}isCancelled(){return this.cancelled}}Gy.Subscription=G_e;var al={},$H={};(function(e){/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.schnorr=e.verify=e.signSync=e.sign=e.getSharedSecret=e.recoverPublicKey=e.getPublicKey=e.Signature=e.Point=e.CURVE=void 0;const t=Yo,r=BigInt(0),n=BigInt(1),o=BigInt(2),i=BigInt(3),a=BigInt(8),s=Object.freeze({a:r,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:n,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});e.CURVE=s;const l=(ve,oe)=>(ve+oe/o)/oe,c={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(ve){const{n:oe}=s,he=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),be=-n*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),Ce=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),Oe=he,Ie=BigInt("0x100000000000000000000000000000000"),De=l(Oe*ve,oe),je=l(-be*ve,oe);let Me=q(ve-De*he-je*Ce,oe),He=q(-De*be-je*Oe,oe);const qe=Me>Ie,ze=He>Ie;if(qe&&(Me=oe-Me),ze&&(He=oe-He),Me>Ie||He>Ie)throw new Error("splitScalarEndo: Endomorphism failed, k="+ve);return{k1neg:qe,k1:Me,k2neg:ze,k2:He}}},u=32,f=32,d=32,p=u+1,h=2*u+1;function m(ve){const{a:oe,b:he}=s,be=q(ve*ve),Ce=q(be*ve);return q(Ce+oe*ve+he)}const _=s.a===r;class w extends Error{constructor(oe){super(oe)}}function y(ve){if(!(ve instanceof C))throw new TypeError("JacobianPoint expected")}class C{constructor(oe,he,be){this.x=oe,this.y=he,this.z=be}static fromAffine(oe){if(!(oe instanceof O))throw new TypeError("JacobianPoint#fromAffine: expected Point");return oe.equals(O.ZERO)?C.ZERO:new C(oe.x,oe.y,n)}static toAffineBatch(oe){const he=ce(oe.map(be=>be.z));return oe.map((be,Ce)=>be.toAffine(he[Ce]))}static normalizeZ(oe){return C.toAffineBatch(oe).map(C.fromAffine)}equals(oe){y(oe);const{x:he,y:be,z:Ce}=this,{x:Oe,y:Ie,z:De}=oe,je=q(Ce*Ce),Me=q(De*De),He=q(he*Me),qe=q(Oe*je),ze=q(q(be*De)*Me),it=q(q(Ie*Ce)*je);return He===qe&&ze===it}negate(){return new C(this.x,q(-this.y),this.z)}double(){const{x:oe,y:he,z:be}=this,Ce=q(oe*oe),Oe=q(he*he),Ie=q(Oe*Oe),De=oe+Oe,je=q(o*(q(De*De)-Ce-Ie)),Me=q(i*Ce),He=q(Me*Me),qe=q(He-o*je),ze=q(Me*(je-qe)-a*Ie),it=q(o*he*be);return new C(qe,ze,it)}add(oe){y(oe);const{x:he,y:be,z:Ce}=this,{x:Oe,y:Ie,z:De}=oe;if(Oe===r||Ie===r)return this;if(he===r||be===r)return oe;const je=q(Ce*Ce),Me=q(De*De),He=q(he*Me),qe=q(Oe*je),ze=q(q(be*De)*Me),it=q(q(Ie*Ce)*je),Be=q(qe-He),Ke=q(it-ze);if(Be===r)return Ke===r?this.double():C.ZERO;const mt=q(Be*Be),ct=q(Be*mt),Ct=q(He*mt),xn=q(Ke*Ke-ct-o*Ct),Nn=q(Ke*(Ct-xn)-ze*ct),an=q(Ce*De*Be);return new C(xn,Nn,an)}subtract(oe){return this.add(oe.negate())}multiplyUnsafe(oe){const he=C.ZERO;if(typeof oe=="bigint"&&oe===r)return he;let be=T(oe);if(be===n)return this;if(!_){let qe=he,ze=this;for(;be>r;)be&n&&(qe=qe.add(ze)),ze=ze.double(),be>>=n;return qe}let{k1neg:Ce,k1:Oe,k2neg:Ie,k2:De}=c.splitScalar(be),je=he,Me=he,He=this;for(;Oe>r||De>r;)Oe&n&&(je=je.add(He)),De&n&&(Me=Me.add(He)),He=He.double(),Oe>>=n,De>>=n;return Ce&&(je=je.negate()),Ie&&(Me=Me.negate()),Me=new C(q(Me.x*c.beta),Me.y,Me.z),je.add(Me)}precomputeWindow(oe){const he=_?128/oe+1:256/oe+1,be=[];let Ce=this,Oe=Ce;for(let Ie=0;Ie>=qe,Be>je&&(Be-=He,oe+=n);const Ke=it,mt=it+Math.abs(Be)-1,ct=ze%2!==0,Ct=Be<0;Be===0?Ie=Ie.add(I(ct,Ce[Ke])):Oe=Oe.add(I(Ct,Ce[mt]))}return{p:Oe,f:Ie}}multiply(oe,he){let be=T(oe),Ce,Oe;if(_){const{k1neg:Ie,k1:De,k2neg:je,k2:Me}=c.splitScalar(be);let{p:He,f:qe}=this.wNAF(De,he),{p:ze,f:it}=this.wNAF(Me,he);He=I(Ie,He),ze=I(je,ze),ze=new C(q(ze.x*c.beta),ze.y,ze.z),Ce=He.add(ze),Oe=qe.add(it)}else{const{p:Ie,f:De}=this.wNAF(be,he);Ce=Ie,Oe=De}return C.normalizeZ([Ce,Oe])[0]}toAffine(oe){const{x:he,y:be,z:Ce}=this,Oe=this.equals(C.ZERO);oe==null&&(oe=Oe?a:ne(Ce));const Ie=oe,De=q(Ie*Ie),je=q(De*Ie),Me=q(he*De),He=q(be*je),qe=q(Ce*Ie);if(Oe)return O.ZERO;if(qe!==n)throw new Error("invZ was invalid");return new O(Me,He)}}C.BASE=new C(s.Gx,s.Gy,n),C.ZERO=new C(r,n,r);function I(ve,oe){const he=oe.negate();return ve?he:oe}const F=new WeakMap;class O{constructor(oe,he){this.x=oe,this.y=he}_setWindowSize(oe){this._WINDOW_SIZE=oe,F.delete(this)}hasEvenY(){return this.y%o===r}static fromCompressedHex(oe){const he=oe.length===32,be=E(he?oe:oe.subarray(1));if(!pe(be))throw new Error("Point is not on curve");const Ce=m(be);let Oe=te(Ce);const Ie=(Oe&n)===n;he?Ie&&(Oe=q(-Oe)):(oe[0]&1)===1!==Ie&&(Oe=q(-Oe));const De=new O(be,Oe);return De.assertValidity(),De}static fromUncompressedHex(oe){const he=E(oe.subarray(1,u+1)),be=E(oe.subarray(u+1,u*2+1)),Ce=new O(he,be);return Ce.assertValidity(),Ce}static fromHex(oe){const he=N(oe),be=he.length,Ce=he[0];if(be===u)return this.fromCompressedHex(he);if(be===p&&(Ce===2||Ce===3))return this.fromCompressedHex(he);if(be===h&&Ce===4)return this.fromUncompressedHex(he);throw new Error(`Point.fromHex: received invalid point. Expected 32-${p} compressed bytes or ${h} uncompressed bytes, not ${be}`)}static fromPrivateKey(oe){return O.BASE.multiply(X(oe))}static fromSignature(oe,he,be){const{r:Ce,s:Oe}=z(he);if(![0,1,2,3].includes(be))throw new Error("Cannot recover: invalid recovery bit");const Ie=ue(N(oe)),{n:De}=s,je=be===2||be===3?Ce+De:Ce,Me=ne(je,De),He=q(-Ie*Me,De),qe=q(Oe*Me,De),ze=be&1?"03":"02",it=O.fromHex(ze+b(je)),Be=O.BASE.multiplyAndAddUnsafe(it,He,qe);if(!Be)throw new Error("Cannot recover signature: point at infinify");return Be.assertValidity(),Be}toRawBytes(oe=!1){return U(this.toHex(oe))}toHex(oe=!1){const he=b(this.x);return oe?`${this.hasEvenY()?"02":"03"}${he}`:`04${he}${b(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const oe="Point is not on elliptic curve",{x:he,y:be}=this;if(!pe(he)||!pe(be))throw new Error(oe);const Ce=q(be*be),Oe=m(he);if(q(Ce-Oe)!==r)throw new Error(oe)}equals(oe){return this.x===oe.x&&this.y===oe.y}negate(){return new O(this.x,q(-this.y))}double(){return C.fromAffine(this).double().toAffine()}add(oe){return C.fromAffine(this).add(C.fromAffine(oe)).toAffine()}subtract(oe){return this.add(oe.negate())}multiply(oe){return C.fromAffine(this).multiply(oe,this).toAffine()}multiplyAndAddUnsafe(oe,he,be){const Ce=C.fromAffine(this),Oe=he===r||he===n||this!==O.BASE?Ce.multiplyUnsafe(he):Ce.multiply(he),Ie=C.fromAffine(oe).multiplyUnsafe(be),De=Oe.add(Ie);return De.equals(C.ZERO)?void 0:De.toAffine()}}e.Point=O,O.BASE=new O(s.Gx,s.Gy),O.ZERO=new O(r,r);function g(ve){return Number.parseInt(ve[0],16)>=8?"00"+ve:ve}function D(ve){if(ve.length<2||ve[0]!==2)throw new Error(`Invalid signature integer tag: ${S(ve)}`);const oe=ve[1],he=ve.subarray(2,oe+2);if(!oe||he.length!==oe)throw new Error("Invalid signature integer: wrong length");if(he[0]===0&&he[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:E(he),left:ve.subarray(oe+2)}}function H(ve){if(ve.length<2||ve[0]!=48)throw new Error(`Invalid signature tag: ${S(ve)}`);if(ve[1]!==ve.length-2)throw new Error("Invalid signature: incorrect length");const{data:oe,left:he}=D(ve.subarray(2)),{data:be,left:Ce}=D(he);if(Ce.length)throw new Error(`Invalid signature: left bytes after parsing: ${S(Ce)}`);return{r:oe,s:be}}class G{constructor(oe,he){this.r=oe,this.s=he,this.assertValidity()}static fromCompact(oe){const he=oe instanceof Uint8Array,be="Signature.fromCompact";if(typeof oe!="string"&&!he)throw new TypeError(`${be}: Expected string or Uint8Array`);const Ce=he?S(oe):oe;if(Ce.length!==128)throw new Error(`${be}: Expected 64-byte hex`);return new G(j(Ce.slice(0,64)),j(Ce.slice(64,128)))}static fromDER(oe){const he=oe instanceof Uint8Array;if(typeof oe!="string"&&!he)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:be,s:Ce}=H(he?oe:U(oe));return new G(be,Ce)}static fromHex(oe){return this.fromDER(oe)}assertValidity(){const{r:oe,s:he}=this;if(!se(oe))throw new Error("Invalid Signature: r must be 0 < r < n");if(!se(he))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const oe=s.n>>n;return this.s>oe}normalizeS(){return this.hasHighS()?new G(this.r,q(-this.s,s.n)):this}toDERRawBytes(){return U(this.toDERHex())}toDERHex(){const oe=g(M(this.s)),he=g(M(this.r)),be=oe.length/2,Ce=he.length/2,Oe=M(be),Ie=M(Ce);return`30${M(Ce+be+4)}02${Ie}${he}02${Oe}${oe}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return U(this.toCompactHex())}toCompactHex(){return b(this.r)+b(this.s)}}e.Signature=G;function V(...ve){if(!ve.every(be=>be instanceof Uint8Array))throw new Error("Uint8Array list expected");if(ve.length===1)return ve[0];const oe=ve.reduce((be,Ce)=>be+Ce.length,0),he=new Uint8Array(oe);for(let be=0,Ce=0;beoe.toString(16).padStart(2,"0"));function S(ve){if(!(ve instanceof Uint8Array))throw new Error("Expected Uint8Array");let oe="";for(let he=0;he0)return BigInt(ve);if(typeof ve=="bigint"&&se(ve))return ve;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function q(ve,oe=s.P){const he=ve%oe;return he>=r?he:oe+he}function J(ve,oe){const{P:he}=s;let be=ve;for(;oe-- >r;)be*=be,be%=he;return be}function te(ve){const{P:oe}=s,he=BigInt(6),be=BigInt(11),Ce=BigInt(22),Oe=BigInt(23),Ie=BigInt(44),De=BigInt(88),je=ve*ve*ve%oe,Me=je*je*ve%oe,He=J(Me,i)*Me%oe,qe=J(He,i)*Me%oe,ze=J(qe,o)*je%oe,it=J(ze,be)*ze%oe,Be=J(it,Ce)*it%oe,Ke=J(Be,Ie)*Be%oe,mt=J(Ke,De)*Ke%oe,ct=J(mt,Ie)*Be%oe,Ct=J(ct,i)*Me%oe,xn=J(Ct,Oe)*it%oe,Nn=J(xn,he)*je%oe,an=J(Nn,o);if(an*an%oe!==ve)throw new Error("Cannot find square root");return an}function ne(ve,oe=s.P){if(ve===r||oe<=r)throw new Error(`invert: expected positive integers, got n=${ve} mod=${oe}`);let he=q(ve,oe),be=oe,Ce=r,Oe=n;for(;he!==r;){const De=be/he,je=be%he,Me=Ce-Oe*De;be=he,he=je,Ce=Oe,Oe=Me}if(be!==n)throw new Error("invert: does not exist");return q(Ce,oe)}function ce(ve,oe=s.P){const he=new Array(ve.length),be=ve.reduce((Oe,Ie,De)=>Ie===r?Oe:(he[De]=Oe,q(Oe*Ie,oe)),n),Ce=ne(be,oe);return ve.reduceRight((Oe,Ie,De)=>Ie===r?Oe:(he[De]=q(Oe*he[De],oe),q(Oe*Ie,oe)),Ce),he}function ie(ve){const oe=ve.length*8-f*8,he=E(ve);return oe>0?he>>BigInt(oe):he}function ue(ve,oe=!1){const he=ie(ve);if(oe)return he;const{n:be}=s;return he>=be?he-be:he}let A,K;class ee{constructor(oe,he){if(this.hashLen=oe,this.qByteLen=he,typeof oe!="number"||oe<2)throw new Error("hashLen must be a number");if(typeof he!="number"||he<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(oe).fill(1),this.k=new Uint8Array(oe).fill(0),this.counter=0}hmac(...oe){return e.utils.hmacSha256(this.k,...oe)}hmacSync(...oe){return K(this.k,...oe)}checkSync(){if(typeof K!="function")throw new w("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(oe=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),oe),this.v=await this.hmac(this.v),oe.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),oe),this.v=await this.hmac(this.v))}reseedSync(oe=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),oe),this.v=this.hmacSync(this.v),oe.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),oe),this.v=this.hmacSync(this.v))}async generate(){this.incr();let oe=0;const he=[];for(;oe0)oe=BigInt(ve);else if(typeof ve=="string"){if(ve.length!==2*f)throw new Error("Expected 32 bytes of private key");oe=j(ve)}else if(ve instanceof Uint8Array){if(ve.length!==f)throw new Error("Expected 32 bytes of private key");oe=E(ve)}else throw new TypeError("Expected valid private key");if(!se(oe))throw new Error("Expected private key: 0 < key < n");return oe}function R(ve){return ve instanceof O?(ve.assertValidity(),ve):O.fromHex(ve)}function z(ve){if(ve instanceof G)return ve.assertValidity(),ve;try{return G.fromDER(ve)}catch{return G.fromCompact(ve)}}function Z(ve,oe=!1){return O.fromPrivateKey(ve).toRawBytes(oe)}e.getPublicKey=Z;function Q(ve,oe,he,be=!1){return O.fromSignature(ve,oe,he).toRawBytes(be)}e.recoverPublicKey=Q;function de(ve){const oe=ve instanceof Uint8Array,he=typeof ve=="string",be=(oe||he)&&ve.length;return oe?be===p||be===h:he?be===p*2||be===h*2:ve instanceof O}function we(ve,oe,he=!1){if(de(ve))throw new TypeError("getSharedSecret: first arg must be private key");if(!de(oe))throw new TypeError("getSharedSecret: second arg must be public key");const be=R(oe);return be.assertValidity(),be.multiply(X(ve)).toRawBytes(he)}e.getSharedSecret=we;function Se(ve){const oe=ve.length>u?ve.slice(0,u):ve;return E(oe)}function Ee(ve){const oe=Se(ve),he=q(oe,s.n);return Ae(he{ve=N(ve);const oe=f+8;if(ve.length1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const he=q(E(ve),s.n-n)+n;return B(he)},randomBytes:(ve=32)=>{if(Ye.web)return Ye.web.getRandomValues(new Uint8Array(ve));if(Ye.node){const{randomBytes:oe}=Ye.node;return Uint8Array.from(oe(ve))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.hashToPrivateKey(e.utils.randomBytes(f+8)),precompute(ve=8,oe=O.BASE){const he=oe===O.BASE?oe:new O(oe.x,oe.y);return he._setWindowSize(ve),he.multiply(i),he},sha256:async(...ve)=>{if(Ye.web){const oe=await Ye.web.subtle.digest("SHA-256",V(...ve));return new Uint8Array(oe)}else if(Ye.node){const{createHash:oe}=Ye.node,he=oe("sha256");return ve.forEach(be=>he.update(be)),Uint8Array.from(he.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(ve,...oe)=>{if(Ye.web){const he=await Ye.web.subtle.importKey("raw",ve,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),be=V(...oe),Ce=await Ye.web.subtle.sign("HMAC",he,be);return new Uint8Array(Ce)}else if(Ye.node){const{createHmac:he}=Ye.node,be=he("sha256",ve);return oe.forEach(Ce=>be.update(Ce)),Uint8Array.from(be.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(ve,...oe)=>{let he=tt[ve];if(he===void 0){const be=await e.utils.sha256(Uint8Array.from(ve,Ce=>Ce.charCodeAt(0)));he=V(be,be),tt[ve]=he}return e.utils.sha256(he,...oe)},taggedHashSync:(ve,...oe)=>{if(typeof A!="function")throw new w("sha256Sync is undefined, you need to set it");let he=tt[ve];if(he===void 0){const be=A(Uint8Array.from(ve,Ce=>Ce.charCodeAt(0)));he=V(be,be),tt[ve]=he}return A(he,...oe)},_JacobianPoint:C},Object.defineProperties(e.utils,{sha256Sync:{configurable:!1,get(){return A},set(ve){A||(A=ve)}},hmacSha256Sync:{configurable:!1,get(){return K},set(ve){K||(K=ve)}}})})($H);var zA;function K_e(){if(zA)return al;zA=1;var e=Le&&Le.__createBinding||(Object.create?function(u,f,d,p){p===void 0&&(p=d);var h=Object.getOwnPropertyDescriptor(f,d);(!h||("get"in h?!f.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return f[d]}}),Object.defineProperty(u,p,h)}:function(u,f,d,p){p===void 0&&(p=d),u[p]=f[d]}),t=Le&&Le.__setModuleDefault||(Object.create?function(u,f){Object.defineProperty(u,"default",{enumerable:!0,value:f})}:function(u,f){u.default=f}),r=Le&&Le.__importStar||function(u){if(u&&u.__esModule)return u;var f={};if(u!=null)for(var d in u)d!=="default"&&Object.prototype.hasOwnProperty.call(u,d)&&e(f,u,d);return t(f,u),f};Object.defineProperty(al,"__esModule",{value:!0}),al.verifySignature=al.sign=void 0;const n=c4,o=qs(),i=r($H),a=Yo,s=new n.ec("secp256k1");i.utils.sha256Sync=(...u)=>{const f=(0,a.createHash)("sha256");for(const d of u)f.update(d);return f.digest()},i.utils.hmacSha256Sync=(u,...f)=>{const d=(0,a.createHmac)("sha256",Buffer.from(u));return f.forEach(p=>d.update(p)),Uint8Array.from(d.digest())};function l(u,f,d){if((d??"default")==="default"){const m=s.keyFromPrivate(f).sign(u);return(0,o.encodeSignature)(m)}else{const h=i.schnorr.signSync((0,o.hexToBinUnsafe)(u),(0,o.hexToBinUnsafe)(f));return(0,o.binToHex)(h)}}al.sign=l;function c(u,f,d,p){const h=p??"default";try{return h==="default"?s.keyFromPublic(f,"hex").verify(u,(0,o.signatureDecode)(s,d)):i.schnorr.verifySync((0,o.hexToBinUnsafe)(d),(0,o.hexToBinUnsafe)(u),(0,o.hexToBinUnsafe)(f))}catch{return!1}}return al.verifySignature=c,al}var TH={},DH={exports:{}};(function(e){(function(t){var r,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,i=Math.floor,a="[BigNumber Error] ",s=a+"Number primitive has more than 15 significant digits: ",l=1e14,c=14,u=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,p=1e9;function h(O){var g,D,H,G=J.prototype={constructor:J,toString:null,valueOf:null},V=new J(1),P=20,S=4,v=-7,b=21,B=-1e7,M=1e7,j=!1,U=1,E=0,N={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},T="0123456789abcdefghijklmnopqrstuvwxyz",q=!0;function J(A,K){var ee,se,pe,ge,X,R,z,Z,Q=this;if(!(Q instanceof J))return new J(A,K);if(K==null){if(A&&A._isBigNumber===!0){Q.s=A.s,!A.c||A.e>M?Q.c=Q.e=null:A.e=10;X/=10,ge++);ge>M?Q.c=Q.e=null:(Q.e=ge,Q.c=[A]);return}Z=String(A)}else{if(!n.test(Z=String(A)))return H(Q,Z,R);Q.s=Z.charCodeAt(0)==45?(Z=Z.slice(1),-1):1}(ge=Z.indexOf("."))>-1&&(Z=Z.replace(".","")),(X=Z.search(/e/i))>0?(ge<0&&(ge=X),ge+=+Z.slice(X+1),Z=Z.substring(0,X)):ge<0&&(ge=Z.length)}else{if(y(K,2,T.length,"Base"),K==10&&q)return Q=new J(A),ie(Q,P+Q.e+1,S);if(Z=String(A),R=typeof A=="number"){if(A*0!=0)return H(Q,Z,R,K);if(Q.s=1/A<0?(Z=Z.slice(1),-1):1,J.DEBUG&&Z.replace(/^0\.0*|\./,"").length>15)throw Error(s+A)}else Q.s=Z.charCodeAt(0)===45?(Z=Z.slice(1),-1):1;for(ee=T.slice(0,K),ge=X=0,z=Z.length;Xge){ge=z;continue}}else if(!pe&&(Z==Z.toUpperCase()&&(Z=Z.toLowerCase())||Z==Z.toLowerCase()&&(Z=Z.toUpperCase()))){pe=!0,X=-1,ge=0;continue}return H(Q,String(A),R,K)}R=!1,Z=D(Z,K,10,Q.s),(ge=Z.indexOf("."))>-1?Z=Z.replace(".",""):ge=Z.length}for(X=0;Z.charCodeAt(X)===48;X++);for(z=Z.length;Z.charCodeAt(--z)===48;);if(Z=Z.slice(X,++z)){if(z-=X,R&&J.DEBUG&&z>15&&(A>u||A!==i(A)))throw Error(s+Q.s*A);if((ge=ge-X-1)>M)Q.c=Q.e=null;else if(ge=-p&&pe<=p&&pe===i(pe)){if(se[0]===0){if(pe===0&&se.length===1)return!0;break e}if(K=(pe+1)%c,K<1&&(K+=c),String(se[0]).length==K){for(K=0;K=l||ee!==i(ee))break e;if(ee!==0)return!0}}}else if(se===null&&pe===null&&(ge===null||ge===1||ge===-1))return!0;throw Error(a+"Invalid BigNumber: "+A)},J.maximum=J.max=function(){return ne(arguments,G.lt)},J.minimum=J.min=function(){return ne(arguments,G.gt)},J.random=function(){var A=9007199254740992,K=Math.random()*A&2097151?function(){return i(Math.random()*A)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(ee){var se,pe,ge,X,R,z=0,Z=[],Q=new J(V);if(ee==null?ee=P:y(ee,0,p),X=o(ee/c),j)if(crypto.getRandomValues){for(se=crypto.getRandomValues(new Uint32Array(X*=2));z>>11),R>=9e15?(pe=crypto.getRandomValues(new Uint32Array(2)),se[z]=pe[0],se[z+1]=pe[1]):(Z.push(R%1e14),z+=2);z=X/2}else if(crypto.randomBytes){for(se=crypto.randomBytes(X*=7);z=9e15?crypto.randomBytes(7).copy(se,z):(Z.push(R%1e14),z+=7);z=X/7}else throw j=!1,Error(a+"crypto unavailable");if(!j)for(;z=10;R/=10,z++);zpe-1&&(R[X+1]==null&&(R[X+1]=0),R[X+1]+=R[X]/pe|0,R[X]%=pe)}return R.reverse()}return function(ee,se,pe,ge,X){var R,z,Z,Q,de,we,Se,Ee,Ae=ee.indexOf("."),Te=P,W=S;for(Ae>=0&&(Q=E,E=0,ee=ee.replace(".",""),Ee=new J(se),we=Ee.pow(ee.length-Ae),E=Q,Ee.c=K(F(_(we.c),we.e,"0"),10,pe,A),Ee.e=Ee.c.length),Se=K(ee,se,pe,X?(R=T,A):(R=A,T)),Z=Q=Se.length;Se[--Q]==0;Se.pop());if(!Se[0])return R.charAt(0);if(Ae<0?--Z:(we.c=Se,we.e=Z,we.s=ge,we=g(we,Ee,Te,W,pe),Se=we.c,de=we.r,Z=we.e),z=Z+Te+1,Ae=Se[z],Q=pe/2,de=de||z<0||Se[z+1]!=null,de=W<4?(Ae!=null||de)&&(W==0||W==(we.s<0?3:2)):Ae>Q||Ae==Q&&(W==4||de||W==6&&Se[z-1]&1||W==(we.s<0?8:7)),z<1||!Se[0])ee=de?F(R.charAt(1),-Te,R.charAt(0)):R.charAt(0);else{if(Se.length=z,de)for(--pe;++Se[--z]>pe;)Se[z]=0,z||(++Z,Se=[1].concat(Se));for(Q=Se.length;!Se[--Q];);for(Ae=0,ee="";Ae<=Q;ee+=R.charAt(Se[Ae++]));ee=F(ee,Z,R.charAt(0))}return ee}}(),g=function(){function A(se,pe,ge){var X,R,z,Z,Q=0,de=se.length,we=pe%d,Se=pe/d|0;for(se=se.slice();de--;)z=se[de]%d,Z=se[de]/d|0,X=Se*z+Z*we,R=we*z+X%d*d+Q,Q=(R/ge|0)+(X/d|0)+Se*Z,se[de]=R%ge;return Q&&(se=[Q].concat(se)),se}function K(se,pe,ge,X){var R,z;if(ge!=X)z=ge>X?1:-1;else for(R=z=0;Rpe[R]?1:-1;break}return z}function ee(se,pe,ge,X){for(var R=0;ge--;)se[ge]-=R,R=se[ge]1;se.splice(0,1));}return function(se,pe,ge,X,R){var z,Z,Q,de,we,Se,Ee,Ae,Te,W,x,k,Y,re,fe,le,xe,_e=se.s==pe.s?1:-1,ke=se.c,$e=pe.c;if(!ke||!ke[0]||!$e||!$e[0])return new J(!se.s||!pe.s||(ke?$e&&ke[0]==$e[0]:!$e)?NaN:ke&&ke[0]==0||!$e?_e*0:_e/0);for(Ae=new J(_e),Te=Ae.c=[],Z=se.e-pe.e,_e=ge+Z+1,R||(R=l,Z=m(se.e/c)-m(pe.e/c),_e=_e/c|0),Q=0;$e[Q]==(ke[Q]||0);Q++);if($e[Q]>(ke[Q]||0)&&Z--,_e<0)Te.push(1),de=!0;else{for(re=ke.length,le=$e.length,Q=0,_e+=2,we=i(R/($e[0]+1)),we>1&&($e=A($e,we,R),ke=A(ke,we,R),le=$e.length,re=ke.length),Y=le,W=ke.slice(0,le),x=W.length;x=R/2&&fe++;do{if(we=0,z=K($e,W,le,x),z<0){if(k=W[0],le!=x&&(k=k*R+(W[1]||0)),we=i(k/fe),we>1)for(we>=R&&(we=R-1),Se=A($e,we,R),Ee=Se.length,x=W.length;K(Se,W,Ee,x)==1;)we--,ee(Se,le=10;_e/=10,Q++);ie(Ae,ge+(Ae.e=Q+Z*c-1)+1,X,de)}else Ae.e=Z,Ae.r=+de;return Ae}}();function te(A,K,ee,se){var pe,ge,X,R,z;if(ee==null?ee=S:y(ee,0,8),!A.c)return A.toString();if(pe=A.c[0],X=A.e,K==null)z=_(A.c),z=se==1||se==2&&(X<=v||X>=b)?I(z,X):F(z,X,"0");else if(A=ie(new J(A),K,ee),ge=A.e,z=_(A.c),R=z.length,se==1||se==2&&(K<=ge||ge<=v)){for(;RR){if(--K>0)for(z+=".";K--;z+="0");}else if(K+=ge-R,K>0)for(ge+1==R&&(z+=".");K--;z+="0");return A.s<0&&pe?"-"+z:z}function ne(A,K){for(var ee,se=1,pe=new J(A[0]);se=10;pe/=10,se++);return(ee=se+ee*c-1)>M?A.c=A.e=null:ee=10;R/=10,pe++);if(ge=K-pe,ge<0)ge+=c,X=K,z=de[Z=0],Q=z/we[pe-X-1]%10|0;else if(Z=o((ge+1)/c),Z>=de.length)if(se){for(;de.length<=Z;de.push(0));z=Q=0,pe=1,ge%=c,X=ge-c+1}else break e;else{for(z=R=de[Z],pe=1;R>=10;R/=10,pe++);ge%=c,X=ge-c+pe,Q=X<0?0:z/we[pe-X-1]%10|0}if(se=se||K<0||de[Z+1]!=null||(X<0?z:z%we[pe-X-1]),se=ee<4?(Q||se)&&(ee==0||ee==(A.s<0?3:2)):Q>5||Q==5&&(ee==4||se||ee==6&&(ge>0?X>0?z/we[pe-X]:0:de[Z-1])%10&1||ee==(A.s<0?8:7)),K<1||!de[0])return de.length=0,se?(K-=A.e+1,de[0]=we[(c-K%c)%c],A.e=-K||0):de[0]=A.e=0,A;if(ge==0?(de.length=Z,R=1,Z--):(de.length=Z+1,R=we[c-ge],de[Z]=X>0?i(z/we[pe-X]%we[X])*R:0),se)for(;;)if(Z==0){for(ge=1,X=de[0];X>=10;X/=10,ge++);for(X=de[0]+=R,R=1;X>=10;X/=10,R++);ge!=R&&(A.e++,de[0]==l&&(de[0]=1));break}else{if(de[Z]+=R,de[Z]!=l)break;de[Z--]=0,R=1}for(ge=de.length;de[--ge]===0;de.pop());}A.e>M?A.c=A.e=null:A.e=b?I(K,ee):F(K,ee,"0"),A.s<0?"-"+K:K)}return G.absoluteValue=G.abs=function(){var A=new J(this);return A.s<0&&(A.s=1),A},G.comparedTo=function(A,K){return w(this,new J(A,K))},G.decimalPlaces=G.dp=function(A,K){var ee,se,pe,ge=this;if(A!=null)return y(A,0,p),K==null?K=S:y(K,0,8),ie(new J(ge),A+ge.e+1,K);if(!(ee=ge.c))return null;if(se=((pe=ee.length-1)-m(this.e/c))*c,pe=ee[pe])for(;pe%10==0;pe/=10,se--);return se<0&&(se=0),se},G.dividedBy=G.div=function(A,K){return g(this,new J(A,K),P,S)},G.dividedToIntegerBy=G.idiv=function(A,K){return g(this,new J(A,K),0,1)},G.exponentiatedBy=G.pow=function(A,K){var ee,se,pe,ge,X,R,z,Z,Q,de=this;if(A=new J(A),A.c&&!A.isInteger())throw Error(a+"Exponent not an integer: "+ue(A));if(K!=null&&(K=new J(K)),R=A.e>14,!de.c||!de.c[0]||de.c[0]==1&&!de.e&&de.c.length==1||!A.c||!A.c[0])return Q=new J(Math.pow(+ue(de),R?A.s*(2-C(A)):+ue(A))),K?Q.mod(K):Q;if(z=A.s<0,K){if(K.c?!K.c[0]:!K.s)return new J(NaN);se=!z&&de.isInteger()&&K.isInteger(),se&&(de=de.mod(K))}else{if(A.e>9&&(de.e>0||de.e<-1||(de.e==0?de.c[0]>1||R&&de.c[1]>=24e7:de.c[0]<8e13||R&&de.c[0]<=9999975e7)))return ge=de.s<0&&C(A)?-0:0,de.e>-1&&(ge=1/ge),new J(z?1/ge:ge);E&&(ge=o(E/c+2))}for(R?(ee=new J(.5),z&&(A.s=1),Z=C(A)):(pe=Math.abs(+ue(A)),Z=pe%2),Q=new J(V);;){if(Z){if(Q=Q.times(de),!Q.c)break;ge?Q.c.length>ge&&(Q.c.length=ge):se&&(Q=Q.mod(K))}if(pe){if(pe=i(pe/2),pe===0)break;Z=pe%2}else if(A=A.times(ee),ie(A,A.e+1,1),A.e>14)Z=C(A);else{if(pe=+ue(A),pe===0)break;Z=pe%2}de=de.times(de),ge?de.c&&de.c.length>ge&&(de.c.length=ge):se&&(de=de.mod(K))}return se?Q:(z&&(Q=V.div(Q)),K?Q.mod(K):ge?ie(Q,E,S,X):Q)},G.integerValue=function(A){var K=new J(this);return A==null?A=S:y(A,0,8),ie(K,K.e+1,A)},G.isEqualTo=G.eq=function(A,K){return w(this,new J(A,K))===0},G.isFinite=function(){return!!this.c},G.isGreaterThan=G.gt=function(A,K){return w(this,new J(A,K))>0},G.isGreaterThanOrEqualTo=G.gte=function(A,K){return(K=w(this,new J(A,K)))===1||K===0},G.isInteger=function(){return!!this.c&&m(this.e/c)>this.c.length-2},G.isLessThan=G.lt=function(A,K){return w(this,new J(A,K))<0},G.isLessThanOrEqualTo=G.lte=function(A,K){return(K=w(this,new J(A,K)))===-1||K===0},G.isNaN=function(){return!this.s},G.isNegative=function(){return this.s<0},G.isPositive=function(){return this.s>0},G.isZero=function(){return!!this.c&&this.c[0]==0},G.minus=function(A,K){var ee,se,pe,ge,X=this,R=X.s;if(A=new J(A,K),K=A.s,!R||!K)return new J(NaN);if(R!=K)return A.s=-K,X.plus(A);var z=X.e/c,Z=A.e/c,Q=X.c,de=A.c;if(!z||!Z){if(!Q||!de)return Q?(A.s=-K,A):new J(de?X:NaN);if(!Q[0]||!de[0])return de[0]?(A.s=-K,A):new J(Q[0]?X:S==3?-0:0)}if(z=m(z),Z=m(Z),Q=Q.slice(),R=z-Z){for((ge=R<0)?(R=-R,pe=Q):(Z=z,pe=de),pe.reverse(),K=R;K--;pe.push(0));pe.reverse()}else for(se=(ge=(R=Q.length)<(K=de.length))?R:K,R=K=0;K0)for(;K--;Q[ee++]=0);for(K=l-1;se>R;){if(Q[--se]=0;){for(ee=0,we=k[pe]%Te,Se=k[pe]/Te|0,X=z,ge=pe+X;ge>pe;)Z=x[--X]%Te,Q=x[X]/Te|0,R=Se*Z+Q*we,Z=we*Z+R%Te*Te+Ee[ge]+ee,ee=(Z/Ae|0)+(R/Te|0)+Se*Q,Ee[ge--]=Z%Ae;Ee[ge]=ee}return ee?++se:Ee.splice(0,1),ce(A,Ee,se)},G.negated=function(){var A=new J(this);return A.s=-A.s||null,A},G.plus=function(A,K){var ee,se=this,pe=se.s;if(A=new J(A,K),K=A.s,!pe||!K)return new J(NaN);if(pe!=K)return A.s=-K,se.minus(A);var ge=se.e/c,X=A.e/c,R=se.c,z=A.c;if(!ge||!X){if(!R||!z)return new J(pe/0);if(!R[0]||!z[0])return z[0]?A:new J(R[0]?se:pe*0)}if(ge=m(ge),X=m(X),R=R.slice(),pe=ge-X){for(pe>0?(X=ge,ee=z):(pe=-pe,ee=R),ee.reverse();pe--;ee.push(0));ee.reverse()}for(pe=R.length,K=z.length,pe-K<0&&(ee=z,z=R,R=ee,K=pe),pe=0;K;)pe=(R[--K]=R[K]+z[K]+pe)/l|0,R[K]=l===R[K]?0:R[K]%l;return pe&&(R=[pe].concat(R),++X),ce(A,R,X)},G.precision=G.sd=function(A,K){var ee,se,pe,ge=this;if(A!=null&&A!==!!A)return y(A,1,p),K==null?K=S:y(K,0,8),ie(new J(ge),A,K);if(!(ee=ge.c))return null;if(pe=ee.length-1,se=pe*c+1,pe=ee[pe]){for(;pe%10==0;pe/=10,se--);for(pe=ee[0];pe>=10;pe/=10,se++);}return A&&ge.e+1>se&&(se=ge.e+1),se},G.shiftedBy=function(A){return y(A,-u,u),this.times("1e"+A)},G.squareRoot=G.sqrt=function(){var A,K,ee,se,pe,ge=this,X=ge.c,R=ge.s,z=ge.e,Z=P+4,Q=new J("0.5");if(R!==1||!X||!X[0])return new J(!R||R<0&&(!X||X[0])?NaN:X?ge:1/0);if(R=Math.sqrt(+ue(ge)),R==0||R==1/0?(K=_(X),(K.length+z)%2==0&&(K+="0"),R=Math.sqrt(+K),z=m((z+1)/2)-(z<0||z%2),R==1/0?K="5e"+z:(K=R.toExponential(),K=K.slice(0,K.indexOf("e")+1)+z),ee=new J(K)):ee=new J(R+""),ee.c[0]){for(z=ee.e,R=z+Z,R<3&&(R=0);;)if(pe=ee,ee=Q.times(pe.plus(g(ge,pe,Z,1))),_(pe.c).slice(0,R)===(K=_(ee.c)).slice(0,R))if(ee.e0&&Ee>0){for(ge=Ee%R||R,Q=Se.substr(0,ge);ge0&&(Q+=Z+Se.slice(ge)),we&&(Q="-"+Q)}se=de?Q+(ee.decimalSeparator||"")+((z=+ee.fractionGroupSize)?de.replace(new RegExp("\\d{"+z+"}\\B","g"),"$&"+(ee.fractionGroupSeparator||"")):de):Q}return(ee.prefix||"")+se+(ee.suffix||"")},G.toFraction=function(A){var K,ee,se,pe,ge,X,R,z,Z,Q,de,we,Se=this,Ee=Se.c;if(A!=null&&(R=new J(A),!R.isInteger()&&(R.c||R.s!==1)||R.lt(V)))throw Error(a+"Argument "+(R.isInteger()?"out of range: ":"not an integer: ")+ue(R));if(!Ee)return new J(Se);for(K=new J(V),Z=ee=new J(V),se=z=new J(V),we=_(Ee),ge=K.e=we.length-Se.e-1,K.c[0]=f[(X=ge%c)<0?c+X:X],A=!A||R.comparedTo(K)>0?ge>0?K:Z:R,X=M,M=1/0,R=new J(we),z.c[0]=0;Q=g(R,K,0,1),pe=ee.plus(Q.times(se)),pe.comparedTo(A)!=1;)ee=se,se=pe,Z=z.plus(Q.times(pe=Z)),z=pe,K=R.minus(Q.times(pe=K)),R=pe;return pe=g(A.minus(ee),se,0,1),z=z.plus(pe.times(Z)),ee=ee.plus(pe.times(se)),z.s=Z.s=Se.s,ge=ge*2,de=g(Z,se,ge,S).minus(Se).abs().comparedTo(g(z,ee,ge,S).minus(Se).abs())<1?[Z,se]:[z,ee],M=X,de},G.toNumber=function(){return+ue(this)},G.toPrecision=function(A,K){return A!=null&&y(A,1,p),te(this,A,K,2)},G.toString=function(A){var K,ee=this,se=ee.s,pe=ee.e;return pe===null?se?(K="Infinity",se<0&&(K="-"+K)):K="NaN":(A==null?K=pe<=v||pe>=b?I(_(ee.c),pe):F(_(ee.c),pe,"0"):A===10&&q?(ee=ie(new J(ee),P+pe+1,S),K=F(_(ee.c),ee.e,"0")):(y(A,2,T.length,"Base"),K=D(F(_(ee.c),pe,"0"),10,A,se,!0)),se<0&&ee.c[0]&&(K="-"+K)),K},G.valueOf=G.toJSON=function(){return ue(this)},G._isBigNumber=!0,O!=null&&J.set(O),J}function m(O){var g=O|0;return O>0||O===g?g:g-1}function _(O){for(var g,D,H=1,G=O.length,V=O[0]+"";Hb^D?1:-1;for(S=(v=G.length)<(b=V.length)?v:b,P=0;PV[P]^D?1:-1;return v==b?0:v>b^D?1:-1}function y(O,g,D,H){if(OD||O!==i(O))throw Error(a+(H||"Argument")+(typeof O=="number"?OD?" out of range: ":" not an integer: ":" not a primitive number: ")+String(O))}function C(O){var g=O.c.length-1;return m(O.e/c)==g&&O.c[g]%2!=0}function I(O,g){return(O.length>1?O.charAt(0)+"."+O.slice(1):O)+(g<0?"e":"e+")+g}function F(O,g,D){var H,G;if(g<0){for(G=D+".";++g;G+=D);O=G+O}else if(H=O.length,++g>H){for(G=D,g-=H;--g;G+=D);O+=G}else g!isNaN(parseFloat(m))&&isFinite(m);e.isNumeric=n,e.prettifyNumberConfig={ALPH:{minDecimalPlaces:2,maxDecimalPlaces:10,minDecimalSignificantDigits:2,decimalPlacesWhenZero:2},TOKEN:{minDecimalPlaces:4,maxDecimalPlaces:16,minDecimalSignificantDigits:2,decimalPlacesWhenZero:1},Exact:{minDecimalPlaces:18,maxDecimalPlaces:18,minDecimalSignificantDigits:0,decimalPlacesWhenZero:0}};function o(m){return s(m,18,e.prettifyNumberConfig.ALPH)}e.prettifyAttoAlphAmount=o;function i(m,_){return s(m,_,e.prettifyNumberConfig.TOKEN)}e.prettifyTokenAmount=i;function a(m,_){return s(m,_,e.prettifyNumberConfig.Exact)}e.prettifyExactAmount=a;function s(m,_,w){const y=f(h(m),_);if(!(0,e.isNumeric)(y))return;const C=new r.default(y);let I;if(C.gte(1))I=C.toFormat(w.minDecimalPlaces);else{const D=C.toFormat(w.maxDecimalPlaces).split(".")[1],H=D==null?void 0:D.match(/^0+/),G=H&&H.length?H[0].length:0,V=Math.max(G+w.minDecimalSignificantDigits,w.minDecimalPlaces);I=C.toFormat(V)}let F=I.replace(/0+$/,"");const O=1+I.indexOf(".")+w.decimalPlacesWhenZero;return F.lengthp(P,G)),type:"Array"}}e.toApiArray=d;function p(g,D){return D==="Bool"?{value:a(g),type:D}:D==="U256"||D==="I256"?{value:s(g),type:D}:D==="ByteVec"?{value:u(g),type:D}:D==="Address"?{value:f(g),type:D}:d(D,g)}e.toApiVal=p;function h(g,D,H,G=!1){if(g.length===0)throw new Error("Not enough Vals");const V=g[`${D}`];if(H==="Bool"&&V.type===H)return[V.value,D+1];if((H==="U256"||H==="I256")&&V.type===H)return[c(V.value),D+1];if((H==="ByteVec"||H==="Address")&&(V.type===H||G))return[V.value,D+1];{const[P,S]=y(H),v=S.reduce((M,j)=>M*j),b=D+v,B=g.slice(D,b);if(B.length==v&&B.every(M=>M.type===P)){const M=B.map(j=>w(j,P));return[C(M,S),b]}else throw new Error(`Invalid array Val type: ${B}, ${H}`)}}function m(g,D,H,G=!1){let V=0;const P={};return H.forEach((S,v)=>{const b=D[`${v}`],[B,M]=h(g,V,S,G);V=M,P[`${b}`]=B}),P}e.fromApiVals=m;function _(g,D){let H=0;const G=[];for(const V of D){const[P,S]=h(g,H,V);G.push(P),H=S}return G}e.fromApiArray=_;function w(g,D){if(g.type==="Bool"&&g.type===D)return g.value;if((g.type==="U256"||g.type==="I256")&&g.type===D)return c(g.value);if((g.type==="ByteVec"||g.type==="Address")&&g.type===D)return g.value;throw new Error(`Invalid node.Val type: ${g}`)}e.fromApiVal=w;function y(g){const D=g.lastIndexOf(";");if(D===-1)throw new Error(`Invalid Val type: ${g}`);const H=g.slice(1,D),G=parseInt(g.slice(D+1,-1));if(H[0]=="["){const[V,P]=y(H);return[V,(P.unshift(G),P)]}else return[H,[G]]}function C(g,D){if(D.length==1)return g;{const H=[],G=g.length/D[0],V=D.slice(1);for(let P=0;PH*G)}e.typeLength=I;function F(g,D){for(const[H,G]of Object.entries(g))for(const V of Object.keys(G))G[`${V}`]=async(...P)=>D({path:H,method:V,params:P})}e.forwardRequests=F;async function O(g,D){const H=g[`${D.path}`][`${D.method}`];return H(...D.params)}e.request=O,function(g){g.FungibleToken="0001",g.NFTCollection="0002",g.NFT="0003",g.NFTCollectionWithRoyalty="000201"}(e.StdInterfaceIds||(e.StdInterfaceIds={}))}(J2)),J2}var E4={};(function(){(function(e){(function(t){var r={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};function n(H){return H&&DataView.prototype.isPrototypeOf(H)}if(r.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],i=ArrayBuffer.isView||function(H){return H&&o.indexOf(Object.prototype.toString.call(H))>-1};function a(H){if(typeof H!="string"&&(H=String(H)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(H))throw new TypeError("Invalid character in header field name");return H.toLowerCase()}function s(H){return typeof H!="string"&&(H=String(H)),H}function l(H){var G={next:function(){var V=H.shift();return{done:V===void 0,value:V}}};return r.iterable&&(G[Symbol.iterator]=function(){return G}),G}function c(H){this.map={},H instanceof c?H.forEach(function(G,V){this.append(V,G)},this):Array.isArray(H)?H.forEach(function(G){this.append(G[0],G[1])},this):H&&Object.getOwnPropertyNames(H).forEach(function(G){this.append(G,H[G])},this)}c.prototype.append=function(H,G){H=a(H),G=s(G);var V=this.map[H];this.map[H]=V?V+", "+G:G},c.prototype.delete=function(H){delete this.map[a(H)]},c.prototype.get=function(H){return H=a(H),this.has(H)?this.map[H]:null},c.prototype.has=function(H){return this.map.hasOwnProperty(a(H))},c.prototype.set=function(H,G){this.map[a(H)]=s(G)},c.prototype.forEach=function(H,G){for(var V in this.map)this.map.hasOwnProperty(V)&&H.call(G,this.map[V],V,this)},c.prototype.keys=function(){var H=[];return this.forEach(function(G,V){H.push(V)}),l(H)},c.prototype.values=function(){var H=[];return this.forEach(function(G){H.push(G)}),l(H)},c.prototype.entries=function(){var H=[];return this.forEach(function(G,V){H.push([V,G])}),l(H)},r.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);function u(H){if(H.bodyUsed)return Promise.reject(new TypeError("Already read"));H.bodyUsed=!0}function f(H){return new Promise(function(G,V){H.onload=function(){G(H.result)},H.onerror=function(){V(H.error)}})}function d(H){var G=new FileReader,V=f(G);return G.readAsArrayBuffer(H),V}function p(H){var G=new FileReader,V=f(G);return G.readAsText(H),V}function h(H){for(var G=new Uint8Array(H),V=new Array(G.length),P=0;P-1?G:H}function C(H,G){G=G||{};var V=G.body;if(H instanceof C){if(H.bodyUsed)throw new TypeError("Already read");this.url=H.url,this.credentials=H.credentials,G.headers||(this.headers=new c(H.headers)),this.method=H.method,this.mode=H.mode,this.signal=H.signal,!V&&H._bodyInit!=null&&(V=H._bodyInit,H.bodyUsed=!0)}else this.url=String(H);if(this.credentials=G.credentials||this.credentials||"same-origin",(G.headers||!this.headers)&&(this.headers=new c(G.headers)),this.method=y(G.method||this.method||"GET"),this.mode=G.mode||this.mode||null,this.signal=G.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&V)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(V)}C.prototype.clone=function(){return new C(this,{body:this._bodyInit})};function I(H){var G=new FormData;return H.trim().split("&").forEach(function(V){if(V){var P=V.split("="),S=P.shift().replace(/\+/g," "),v=P.join("=").replace(/\+/g," ");G.append(decodeURIComponent(S),decodeURIComponent(v))}}),G}function F(H){var G=new c,V=H.replace(/\r?\n[\t ]+/g," ");return V.split(/\r?\n/).forEach(function(P){var S=P.split(":"),v=S.shift().trim();if(v){var b=S.join(":").trim();G.append(v,b)}}),G}_.call(C.prototype);function O(H,G){G||(G={}),this.type="default",this.status=G.status===void 0?200:G.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in G?G.statusText:"OK",this.headers=new c(G.headers),this.url=G.url||"",this._initBody(H)}_.call(O.prototype),O.prototype.clone=function(){return new O(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},O.error=function(){var H=new O(null,{status:0,statusText:""});return H.type="error",H};var g=[301,302,303,307,308];O.redirect=function(H,G){if(g.indexOf(G)===-1)throw new RangeError("Invalid status code");return new O(null,{status:G,headers:{location:H}})},t.DOMException=e.DOMException;try{new t.DOMException}catch{t.DOMException=function(G,V){this.message=G,this.name=V;var P=Error(G);this.stack=P.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function D(H,G){return new Promise(function(V,P){var S=new C(H,G);if(S.signal&&S.signal.aborted)return P(new t.DOMException("Aborted","AbortError"));var v=new XMLHttpRequest;function b(){v.abort()}v.onload=function(){var B={status:v.status,statusText:v.statusText,headers:F(v.getAllResponseHeaders()||"")};B.url="responseURL"in v?v.responseURL:B.headers.get("X-Request-URL");var M="response"in v?v.response:v.responseText;V(new O(M,B))},v.onerror=function(){P(new TypeError("Network request failed"))},v.ontimeout=function(){P(new TypeError("Network request failed"))},v.onabort=function(){P(new t.DOMException("Aborted","AbortError"))},v.open(S.method,S.url,!0),S.credentials==="include"?v.withCredentials=!0:S.credentials==="omit"&&(v.withCredentials=!1),"responseType"in v&&r.blob&&(v.responseType="blob"),S.headers.forEach(function(B,M){v.setRequestHeader(M,B)}),S.signal&&(S.signal.addEventListener("abort",b),v.onreadystatechange=function(){v.readyState===4&&S.signal.removeEventListener("abort",b)}),v.send(typeof S._bodyInit>"u"?null:S._bodyInit)})}return D.polyfill=!0,e.fetch||(e.fetch=D,e.Headers=c,e.Request=C,e.Response=O),t.Headers=c,t.Request=C,t.Response=O,t.fetch=D,Object.defineProperty(t,"__esModule",{value:!0}),t})({})})(typeof self<"u"?self:Le)})();var Ns={};Object.defineProperty(Ns,"__esModule",{value:!0});Ns.isBalanceEqual=Ns.convertHttpResponse=void 0;function X_e(e){if(e.error){const t=e.error.detail??`status code: ${e.status}`;throw new Error(`[API Error] - ${t}`)}else return e.data}Ns.convertHttpResponse=X_e;function Z_e(e,t){const r=(o,i)=>{const a=(o==null?void 0:o.length)??0,s=(i==null?void 0:i.length)??0;if(a!==s)return!1;if(a===0)return!0;const l=i.map(c=>({...c,used:!1}));return o.every(c=>{const u=l.find(f=>!f.used&&c.id===f.id&&c.amount===f.amount);return u===void 0?!1:(u.used=!0,!0)})},n=e.balance===t.balance&&e.lockedBalance===t.lockedBalance;return e.utxoNum===t.utxoNum&&n&&r(e.tokenBalances,t.tokenBalances)&&r(e.lockedTokenBalances,t.lockedTokenBalances)}Ns.isBalanceEqual=Z_e;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Api=e.HttpClient=e.ContentType=void 0;const t=Ns;var r;(function(i){i.Json="application/json",i.FormData="multipart/form-data",i.UrlEncoded="application/x-www-form-urlencoded",i.Text="text/plain"})(r=e.ContentType||(e.ContentType={}));class n{constructor(a={}){this.baseUrl="../",this.securityData=null,this.abortControllers=new Map,this.customFetch=(...s)=>fetch(...s),this.baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"},this.setSecurityData=s=>{this.securityData=s},this.contentFormatters={[r.Json]:s=>s!==null&&(typeof s=="object"||typeof s=="string")?JSON.stringify(s):s,[r.Text]:s=>s!==null&&typeof s!="string"?JSON.stringify(s):s,[r.FormData]:s=>Object.keys(s||{}).reduce((l,c)=>{const u=s[c];return l.append(c,u instanceof Blob?u:typeof u=="object"&&u!==null?JSON.stringify(u):`${u}`),l},new FormData),[r.UrlEncoded]:s=>this.toQueryString(s)},this.createAbortSignal=s=>{if(this.abortControllers.has(s)){const c=this.abortControllers.get(s);return c?c.signal:void 0}const l=new AbortController;return this.abortControllers.set(s,l),l.signal},this.abortRequest=s=>{const l=this.abortControllers.get(s);l&&(l.abort(),this.abortControllers.delete(s))},this.request=async({body:s,secure:l,path:c,type:u,query:f,format:d,baseUrl:p,cancelToken:h,...m})=>{const _=(typeof l=="boolean"?l:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},w=this.mergeRequestParams(m,_),y=f&&this.toQueryString(f),C=this.contentFormatters[u||r.Json],I=d||w.format;return this.customFetch(`${p||this.baseUrl||""}${c}${y?`?${y}`:""}`,{...w,headers:{...w.headers||{},...u&&u!==r.FormData?{"Content-Type":u}:{}},signal:h?this.createAbortSignal(h):w.signal,body:typeof s>"u"||s===null?null:C(s)}).then(async F=>{const O=F;O.data=null,O.error=null;const g=I?await F[I]().then(D=>(O.ok?O.data=D:O.error=D,O)).catch(D=>(O.error=D,O)):O;return h&&this.abortControllers.delete(h),g})},Object.assign(this,a)}encodeQueryParam(a,s){return`${encodeURIComponent(a)}=${encodeURIComponent(typeof s=="number"?s:`${s}`)}`}addQueryParam(a,s){return this.encodeQueryParam(s,a[s])}addArrayQueryParam(a,s){return a[s].map(c=>this.encodeQueryParam(s,c)).join("&")}toQueryString(a){const s=a||{};return Object.keys(s).filter(c=>typeof s[c]<"u").map(c=>Array.isArray(s[c])?this.addArrayQueryParam(s,c):this.addQueryParam(s,c)).join("&")}addQueryParams(a){const s=this.toQueryString(a);return s?`?${s}`:""}mergeRequestParams(a,s){return{...this.baseApiParams,...a,...s||{},headers:{...this.baseApiParams.headers||{},...a.headers||{},...s&&s.headers||{}}}}}e.HttpClient=n;class o extends n{constructor(){super(...arguments),this.wallets={getWallets:(a={})=>this.request({path:"/wallets",method:"GET",format:"json",...a}).then(t.convertHttpResponse),putWallets:(a,s={})=>this.request({path:"/wallets",method:"PUT",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postWallets:(a,s={})=>this.request({path:"/wallets",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getWalletsWalletName:(a,s={})=>this.request({path:`/wallets/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),deleteWalletsWalletName:(a,s,l={})=>this.request({path:`/wallets/${a}`,method:"DELETE",body:s,type:r.Json,...l}).then(t.convertHttpResponse),postWalletsWalletNameLock:(a,s={})=>this.request({path:`/wallets/${a}/lock`,method:"POST",...s}).then(t.convertHttpResponse),postWalletsWalletNameUnlock:(a,s,l={})=>this.request({path:`/wallets/${a}/unlock`,method:"POST",body:s,type:r.Json,...l}).then(t.convertHttpResponse),getWalletsWalletNameBalances:(a,s={})=>this.request({path:`/wallets/${a}/balances`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),postWalletsWalletNameRevealMnemonic:(a,s,l={})=>this.request({path:`/wallets/${a}/reveal-mnemonic`,method:"POST",body:s,type:r.Json,format:"json",...l}).then(t.convertHttpResponse),postWalletsWalletNameTransfer:(a,s,l={})=>this.request({path:`/wallets/${a}/transfer`,method:"POST",body:s,type:r.Json,format:"json",...l}).then(t.convertHttpResponse),postWalletsWalletNameSweepActiveAddress:(a,s,l={})=>this.request({path:`/wallets/${a}/sweep-active-address`,method:"POST",body:s,type:r.Json,format:"json",...l}).then(t.convertHttpResponse),postWalletsWalletNameSweepAllAddresses:(a,s,l={})=>this.request({path:`/wallets/${a}/sweep-all-addresses`,method:"POST",body:s,type:r.Json,format:"json",...l}).then(t.convertHttpResponse),postWalletsWalletNameSign:(a,s,l={})=>this.request({path:`/wallets/${a}/sign`,method:"POST",body:s,type:r.Json,format:"json",...l}).then(t.convertHttpResponse),getWalletsWalletNameAddresses:(a,s={})=>this.request({path:`/wallets/${a}/addresses`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getWalletsWalletNameAddressesAddress:(a,s,l={})=>this.request({path:`/wallets/${a}/addresses/${s}`,method:"GET",format:"json",...l}).then(t.convertHttpResponse),getWalletsWalletNameMinerAddresses:(a,s={})=>this.request({path:`/wallets/${a}/miner-addresses`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),postWalletsWalletNameDeriveNextAddress:(a,s,l={})=>this.request({path:`/wallets/${a}/derive-next-address`,method:"POST",query:s,format:"json",...l}).then(t.convertHttpResponse),postWalletsWalletNameDeriveNextMinerAddresses:(a,s={})=>this.request({path:`/wallets/${a}/derive-next-miner-addresses`,method:"POST",format:"json",...s}).then(t.convertHttpResponse),postWalletsWalletNameChangeActiveAddress:(a,s,l={})=>this.request({path:`/wallets/${a}/change-active-address`,method:"POST",body:s,type:r.Json,...l}).then(t.convertHttpResponse)},this.infos={getInfosNode:(a={})=>this.request({path:"/infos/node",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosVersion:(a={})=>this.request({path:"/infos/version",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosChainParams:(a={})=>this.request({path:"/infos/chain-params",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosSelfClique:(a={})=>this.request({path:"/infos/self-clique",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosInterCliquePeerInfo:(a={})=>this.request({path:"/infos/inter-clique-peer-info",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosDiscoveredNeighbors:(a={})=>this.request({path:"/infos/discovered-neighbors",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosMisbehaviors:(a={})=>this.request({path:"/infos/misbehaviors",method:"GET",format:"json",...a}).then(t.convertHttpResponse),postInfosMisbehaviors:(a,s={})=>this.request({path:"/infos/misbehaviors",method:"POST",body:a,type:r.Json,...s}).then(t.convertHttpResponse),getInfosUnreachable:(a={})=>this.request({path:"/infos/unreachable",method:"GET",format:"json",...a}).then(t.convertHttpResponse),postInfosDiscovery:(a,s={})=>this.request({path:"/infos/discovery",method:"POST",body:a,type:r.Json,...s}).then(t.convertHttpResponse),getInfosHistoryHashrate:(a,s={})=>this.request({path:"/infos/history-hashrate",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getInfosCurrentHashrate:(a,s={})=>this.request({path:"/infos/current-hashrate",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getInfosCurrentDifficulty:(a={})=>this.request({path:"/infos/current-difficulty",method:"GET",format:"json",...a}).then(t.convertHttpResponse)},this.blockflow={getBlockflowBlocks:(a,s={})=>this.request({path:"/blockflow/blocks",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowBlocksWithEvents:(a,s={})=>this.request({path:"/blockflow/blocks-with-events",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowBlocksBlockHash:(a,s={})=>this.request({path:`/blockflow/blocks/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getBlockflowBlocksWithEventsBlockHash:(a,s={})=>this.request({path:`/blockflow/blocks-with-events/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getBlockflowIsBlockInMainChain:(a,s={})=>this.request({path:"/blockflow/is-block-in-main-chain",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowHashes:(a,s={})=>this.request({path:"/blockflow/hashes",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowChainInfo:(a,s={})=>this.request({path:"/blockflow/chain-info",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowHeadersBlockHash:(a,s={})=>this.request({path:`/blockflow/headers/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse)},this.addresses={getAddressesAddressBalance:(a,s,l={})=>this.request({path:`/addresses/${a}/balance`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getAddressesAddressUtxos:(a,s={})=>this.request({path:`/addresses/${a}/utxos`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressGroup:(a,s={})=>this.request({path:`/addresses/${a}/group`,method:"GET",format:"json",...s}).then(t.convertHttpResponse)},this.transactions={postTransactionsBuild:(a,s={})=>this.request({path:"/transactions/build",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsSweepAddressBuild:(a,s={})=>this.request({path:"/transactions/sweep-address/build",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsSubmit:(a,s={})=>this.request({path:"/transactions/submit",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsDecodeUnsignedTx:(a,s={})=>this.request({path:"/transactions/decode-unsigned-tx",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getTransactionsDetailsTxid:(a,s,l={})=>this.request({path:`/transactions/details/${a}`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getTransactionsStatus:(a,s={})=>this.request({path:"/transactions/status",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse)},this.mempool={getMempoolTransactions:(a={})=>this.request({path:"/mempool/transactions",method:"GET",format:"json",...a}).then(t.convertHttpResponse),deleteMempoolTransactions:(a={})=>this.request({path:"/mempool/transactions",method:"DELETE",...a}).then(t.convertHttpResponse),putMempoolTransactionsRebroadcast:(a,s={})=>this.request({path:"/mempool/transactions/rebroadcast",method:"PUT",query:a,...s}).then(t.convertHttpResponse),putMempoolTransactionsValidate:(a={})=>this.request({path:"/mempool/transactions/validate",method:"PUT",...a}).then(t.convertHttpResponse)},this.contracts={postContractsCompileScript:(a,s={})=>this.request({path:"/contracts/compile-script",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsUnsignedTxExecuteScript:(a,s={})=>this.request({path:"/contracts/unsigned-tx/execute-script",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsCompileContract:(a,s={})=>this.request({path:"/contracts/compile-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsCompileProject:(a,s={})=>this.request({path:"/contracts/compile-project",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsUnsignedTxDeployContract:(a,s={})=>this.request({path:"/contracts/unsigned-tx/deploy-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getContractsAddressState:(a,s,l={})=>this.request({path:`/contracts/${a}/state`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),postContractsTestContract:(a,s={})=>this.request({path:"/contracts/test-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsCallContract:(a,s={})=>this.request({path:"/contracts/call-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsMulticallContract:(a,s={})=>this.request({path:"/contracts/multicall-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse)},this.multisig={postMultisigAddress:(a,s={})=>this.request({path:"/multisig/address",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postMultisigBuild:(a,s={})=>this.request({path:"/multisig/build",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postMultisigSubmit:(a,s={})=>this.request({path:"/multisig/submit",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse)},this.utils={postUtilsVerifySignature:(a,s={})=>this.request({path:"/utils/verify-signature",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),putUtilsCheckHashIndexing:(a={})=>this.request({path:"/utils/check-hash-indexing",method:"PUT",...a}).then(t.convertHttpResponse)},this.miners={postMinersCpuMining:(a,s={})=>this.request({path:"/miners/cpu-mining",method:"POST",query:a,format:"json",...s}).then(t.convertHttpResponse),postMinersCpuMiningMineOneBlock:(a,s={})=>this.request({path:"/miners/cpu-mining/mine-one-block",method:"POST",query:a,format:"json",...s}).then(t.convertHttpResponse),getMinersAddresses:(a={})=>this.request({path:"/miners/addresses",method:"GET",format:"json",...a}).then(t.convertHttpResponse),putMinersAddresses:(a,s={})=>this.request({path:"/miners/addresses",method:"PUT",body:a,type:r.Json,...s}).then(t.convertHttpResponse)},this.events={getEventsContractContractaddress:(a,s,l={})=>this.request({path:`/events/contract/${a}`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getEventsContractContractaddressCurrentCount:(a,s={})=>this.request({path:`/events/contract/${a}/current-count`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getEventsTxIdTxid:(a,s,l={})=>this.request({path:`/events/tx-id/${a}`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getEventsBlockHashBlockhash:(a,s,l={})=>this.request({path:`/events/block-hash/${a}`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse)}}}e.Api=o})(E4);var fw={},Ht={},VA;function MH(){if(VA)return Ht;VA=1;var e;Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.buildDebugBytecode=Ht.encodeContractField=Ht.buildContractByteCode=Ht.buildScriptByteCode=Ht.encodeScriptField=Ht.encodeScriptFieldAsString=Ht.encodeAddress=Ht.encodeByteVec=Ht.encodeU256=Ht.encodeI256=Ht.encodeBool=void 0;const t=Vu,r=Zu(),n=Kn(),o=BigInt(0);class i{}i.oneByteBound=BigInt(64),i.twoByteBound=i.oneByteBound<=o?f(M):d(M)}Ht.encodeI256=c;function u(M,j,U){let E=M.toString(16);E.length%2===1?E="0"+E:j&&E[0]>="8"&&(E="00"+E);const N=E.length/2,T=new Uint8Array(N+1);for(let J=0;J>8)+s.twoBytePrefix,j&255])}else if(M>24)+s.fourBytePrefix,j>>16&255,j>>8&255,j&255])}else{if(M=-a.oneByteBound){const j=Number(M);return new Uint8Array([(j^s.oneByteNegPrefix)&255])}else if(M>=-a.twoByteBound){const j=Number(M);return new Uint8Array([(j>>8^s.twoByteNegPrefix)&255,j&255])}else if(M>=-a.fourByteBound){const j=Number(M);return new Uint8Array([(j>>24^s.fourByteNegPrefix)&255,j>>16&255,j>>8&255,j&255])}else{if(M>=a.i256LowerBound)return u(~M,!0,!0);throw Error(`Too small number for i256: ${M}`)}}function p(M){if(M>8&255)+s.twoBytePrefix,j&255])}else if(M>24&255)+s.fourBytePrefix,j>>16&255,j>>8&255,j&255])}else{if(M{const T=U.names[`${N}`],q=U.types[`${N}`];if(T in j){const J=j[`${T}`];return D(T,()=>I(q,J))}else throw new Error(`The value of field ${T} is not provided`)})}Ht.buildScriptByteCode=g;function D(M,j){try{return j()}catch(U){throw U instanceof Error?new Error(`Invalid ${M}, error: ${U.message}`):U}}function H(M,j,U){const N=j.isMutable.map((q,J)=>J).filter(q=>j.isMutable[`${q}`]===U).flatMap(q=>{const J=j.names[`${q}`],te=j.types[`${q}`];if(J in M){const ne=M[`${J}`];return D(J,()=>b(te,ne))}else throw new Error(`The value of field ${J} is not provided`)});return t.Buffer.from(c(BigInt(N.length))).toString("hex")+N.map(q=>t.Buffer.from(q).toString("hex")).join("")}function G(M,j,U){const E=H(j,U,!1),N=H(j,U,!0);return M+E+N}Ht.buildContractByteCode=G;var V;(function(M){M[M.Bool=0]="Bool",M[M.I256=1]="I256",M[M.U256=2]="U256",M[M.ByteVec=3]="ByteVec",M[M.Address=4]="Address"})(V||(V={}));function P(M){return new Uint8Array([V.I256,...c(M)])}function S(M){return new Uint8Array([V.U256,...p(M)])}function v(M,j){if(!Array.isArray(j))throw new Error(`Expected array, got ${j}`);const U=M.lastIndexOf(";");if(U==-1)throw new Error(`Invalid Array type: ${M}`);const E=M.slice(1,U),N=parseInt(M.slice(U+1,-1));if(j.length!=N)throw new Error(`Invalid val dimension: ${j}`);return j.flatMap(T=>b(E,T))}function b(M,j){switch(M){case"Bool":const U=(0,r.toApiBoolean)(j)?1:0;return[new Uint8Array([V.Bool,U])];case"I256":const E=(0,r.toApiNumber256)(j);return[P(BigInt(E))];case"U256":const N=(0,r.toApiNumber256)(j);return[S(BigInt(N))];case"ByteVec":const T=(0,r.toApiByteVec)(j);return[new Uint8Array([V.ByteVec,...h(T)])];case"Address":const q=(0,r.toApiAddress)(j);return[new Uint8Array([V.Address,...m(q)])];default:return v(M,j)}}Ht.encodeContractField=b;function B(M,j){if(j==="")return M;const U=/[=+-][0-9a-f]*/g;let E="",N=0;for(const T of j.matchAll(U)){const q=T[0],J=q[0];if(J==="="){const te=parseInt(q.substring(1));E=E+M.slice(N,N+te),N=N+te}else if(J==="+")E=E+q.substring(1);else{const te=parseInt(q.substring(1));N=N+te}}return E}return Ht.buildDebugBytecode=B,Ht}var dw={},$o={},WA;function RH(){if(WA)return $o;WA=1,Object.defineProperty($o,"__esModule",{value:!0}),$o.getCurrentExplorerProvider=$o.setCurrentExplorerProvider=$o.getCurrentNodeProvider=$o.setCurrentNodeProvider=void 0;const e=Zu();let t;function r(s,l,c){typeof s=="string"?t=new e.NodeProvider(s,l,c):t=s}$o.setCurrentNodeProvider=r;function n(){if(typeof t>"u")throw Error("No node provider is set.");return t}$o.getCurrentNodeProvider=n;let o;function i(s,l,c){typeof s=="string"?o=new e.ExplorerProvider(s,l,c):o=s}$o.setCurrentExplorerProvider=i;function a(){return o}return $o.getCurrentExplorerProvider=a,$o}var sl={},qA;function NH(){if(qA)return sl;qA=1,Object.defineProperty(sl,"__esModule",{value:!0}),sl.subscribeToEvents=sl.EventSubscription=void 0;const e=qs(),t=Kn();class r extends t.Subscription{constructor(i,a,s){super(i),this.contractAddress=a,this.fromCount=typeof s>"u"?0:s,this.onEventCountChanged=i.onEventCountChanged,this.startPolling()}startPolling(){this.eventEmitter.on("tick",async()=>{await this.polling()}),this.eventEmitter.emit("tick")}currentEventCount(){return this.fromCount}async polling(){try{const i=await e.web3.getCurrentNodeProvider().events.getEventsContractContractaddress(this.contractAddress,{start:this.fromCount});if(this.cancelled)return;if(this.fromCount===i.nextStart){this.task=setTimeout(()=>this.eventEmitter.emit("tick"),this.pollingInterval);return}const a=i.events.map(s=>this.messageCallback(s));await Promise.all(a),this.fromCount=i.nextStart,this.onEventCountChanged!==void 0&&await this.onEventCountChanged(this.fromCount),await this.polling()}catch(i){await this.errorCallback(i,this)}}}sl.EventSubscription=r;function n(o,i,a){return new r(o,i,a)}return sl.subscribeToEvents=n,sl}var GA;function J_e(){return GA||(GA=1,function(e){var t=Le&&Le.__createBinding||(Object.create?function(W,x,k,Y){Y===void 0&&(Y=k);var re=Object.getOwnPropertyDescriptor(x,k);(!re||("get"in re?!x.__esModule:re.writable||re.configurable))&&(re={enumerable:!0,get:function(){return x[k]}}),Object.defineProperty(W,Y,re)}:function(W,x,k,Y){Y===void 0&&(Y=k),W[Y]=x[k]}),r=Le&&Le.__setModuleDefault||(Object.create?function(W,x){Object.defineProperty(W,"default",{enumerable:!0,value:x})}:function(W,x){W.default=x}),n=Le&&Le.__importStar||function(W){if(W&&W.__esModule)return W;var x={};if(W!=null)for(var k in W)k!=="default"&&Object.prototype.hasOwnProperty.call(W,k)&&t(x,W,k);return r(x,W),x},o=Le&&Le.__importDefault||function(W){return W&&W.__esModule?W:{default:W}};Object.defineProperty(e,"__esModule",{value:!0}),e.tryGetCallResult=e.getTokenIdFromUnsignedTx=e.getContractIdFromUnsignedTx=e.getContractEventsCurrentCount=e.multicallMethods=e.callMethod=e.subscribeContractEvents=e.subscribeContractEvent=e.decodeEvent=e.subscribeContractDestroyedEvent=e.subscribeContractCreatedEvent=e.fetchContractState=e.ContractInstance=e.testMethod=e.addStdIdToFields=e.subscribeEventsFromContract=e.decodeContractDestroyedEvent=e.decodeContractCreatedEvent=e.DestroyContractEventAddress=e.CreateContractEventAddress=e.ExecutableScript=e.ContractFactory=e.randomTxId=e.toApiVals=e.Script=e.Contract=e.Artifact=e.Project=e.ProjectArtifact=e.DEFAULT_COMPILER_OPTIONS=e.DEFAULT_NODE_COMPILER_OPTIONS=e.StdIdFieldName=void 0;const i=Vu,a=o(Yo),s=Yo,l=Zu(),c=n(MH()),u=Kn(),f=RH(),d=n(Yo),p=NH(),h=Wy,m=n(Hy),_=new u.WebCrypto;e.StdIdFieldName="__stdInterfaceId";var w;(function(W){W[W.Contract=0]="Contract",W[W.Script=1]="Script",W[W.AbstractContract=2]="AbstractContract",W[W.Interface=3]="Interface"})(w||(w={})),e.DEFAULT_NODE_COMPILER_OPTIONS={ignoreUnusedConstantsWarnings:!1,ignoreUnusedVariablesWarnings:!1,ignoreUnusedFieldsWarnings:!1,ignoreUnusedPrivateFunctionsWarnings:!1,ignoreUpdateFieldsCheckWarnings:!1,ignoreCheckExternalCallerWarnings:!1},e.DEFAULT_COMPILER_OPTIONS={errorOnWarnings:!0,...e.DEFAULT_NODE_COMPILER_OPTIONS};class y{constructor(x,k){this.matcher=new RegExp(x,"mg"),this.type=k}}function C(W){let x=0;for(let k=0;kthis.compilerOptionsUsed[`${fe}`]===le)||k.length!==this.infos.size)return!0;for(const fe of k){const le=this.infos.get(fe.name);if(typeof le>"u"||le.sourceCodeHash!==fe.sourceCodeHash)return!0}return!1}static async from(x){const k=d.join(x,O.artifactFileName);if(a.default.existsSync(k))try{const Y=await s.promises.readFile(k),re=JSON.parse(Y.toString()),fe=re.fullNodeVersion,le=re.compilerOptionsUsed,xe=new Map(Object.entries(re.infos));return new O(fe,le,xe)}catch(Y){console.log(`Failed to load project artifact, error: ${Y}`);return}}}e.ProjectArtifact=O,O.artifactFileName=".project.json";class g{static buildProjectArtifact(x,k,Y,re,fe){const le=new Map;Y.forEach(_e=>{le.set(_e.artifact.name,{sourceFile:_e.sourceInfo.contractRelativePath,sourceCodeHash:_e.sourceInfo.sourceCodeHash,bytecodeDebugPatch:_e.artifact.bytecodeDebugPatch,codeHashDebug:_e.artifact.codeHashDebug,warnings:_e.warnings})}),re.forEach(_e=>{le.set(_e.artifact.name,{sourceFile:_e.sourceInfo.contractRelativePath,sourceCodeHash:_e.sourceInfo.sourceCodeHash,bytecodeDebugPatch:_e.artifact.bytecodeDebugPatch,codeHashDebug:"",warnings:_e.warnings})});const xe=Y.size+re.size;return k.slice(xe).forEach(_e=>{le.set(_e.name,{sourceFile:_e.contractRelativePath,sourceCodeHash:_e.sourceCodeHash,bytecodeDebugPatch:"",codeHashDebug:"",warnings:[]})}),new O(x,fe,le)}constructor(x,k,Y,re,fe,le,xe){this.contractsRootDir=x,this.artifactsRootDir=k,this.sourceInfos=Y,this.contracts=re,this.scripts=fe,this.projectArtifact=xe,le&&g.checkCompilerWarnings([...[...re.entries()].map(_e=>_e[1].warnings).flat(),...[...fe.entries()].map(_e=>_e[1].warnings).flat()],le)}static checkCompilerWarnings(x,k){if(x.length!==0){const Y=" - ",fe=`Compilation warnings: +`+(Y+x.join(` +`+Y))+` +`;if(k)throw new Error(fe);console.log(fe)}}static contract(x){const k=g.currentProject.contracts.get(x);if(typeof k>"u")throw new Error(`Contract "${x}" does not exist`);return k.artifact}static script(x){const k=g.currentProject.scripts.get(x);if(typeof k>"u")throw new Error(`Script "${x}" does not exist`);return k.artifact}async saveArtifactsToFile(x){const k=this.artifactsRootDir,Y=async function(re){const fe=re.sourceInfo.getArtifactPath(k),le=d.dirname(fe);return a.default.existsSync(le)||a.default.mkdirSync(le,{recursive:!0}),s.promises.writeFile(fe,re.artifact.toString())};this.contracts.forEach(re=>Y(re)),this.scripts.forEach(re=>Y(re)),await this.projectArtifact.saveToFile(x)}contractByCodeHash(x){const k=[...this.contracts.values()].find(Y=>Y.artifact.codeHash===x||Y.artifact.codeHashDebug==x);if(typeof k>"u")throw new Error(`Unknown code with code hash: ${x}`);return k.artifact}static async compile(x,k,Y,re,fe,le,xe,_e){const $e=Y.reduce((Je,tt)=>(Je.find(ve=>ve.sourceCodeHash===tt.sourceCodeHash)===void 0&&Je.push(tt),Je),[]).map(Je=>Je.sourceCode).join(` +`),Ne=await k.contracts.postContractsCompileProject({code:$e,compilerOptions:_e}),We=new Map,gt=new Map;Ne.contracts.forEach(Je=>{const tt=Y.find(oe=>oe.type===w.Contract&&oe.name===Je.name);if(tt===void 0)throw new Error(`SourceInfo does not exist for contract ${Je.name}`);const ve=H.fromCompileResult(Je);We.set(ve.name,new F(tt,ve,Je.warnings))}),Ne.scripts.forEach(Je=>{const tt=Y.find(oe=>oe.type===w.Script&&oe.name===Je.name);if(tt===void 0)throw new Error(`SourceInfo does not exist for script ${Je.name}`);const ve=G.fromCompileResult(Je);gt.set(ve.name,new F(tt,ve,Je.warnings))});const ft=g.buildProjectArtifact(x,Y,We,gt,_e),Ye=new g(fe,le,Y,We,gt,xe,ft);return await Ye.saveArtifactsToFile(re),Ye}static async loadArtifacts(x,k,Y,re,fe,le,xe,_e){try{const ke=new Map,$e=new Map;for(const Ne of k){const We=Y.infos.get(Ne.name);if(typeof We>"u")throw Error(`Unable to find project info for ${Ne.name}, please rebuild the project`);const gt=We.warnings,ft=Ne.getArtifactPath(le);if(Ne.type===w.Contract){const Ye=await H.fromArtifactFile(ft,We.bytecodeDebugPatch,We.codeHashDebug);ke.set(Ye.name,new F(Ne,Ye,gt))}else if(Ne.type===w.Script){const Ye=await G.fromArtifactFile(ft,We.bytecodeDebugPatch);$e.set(Ye.name,new F(Ne,Ye,gt))}}return new g(fe,le,k,ke,$e,xe,Y)}catch(ke){return console.log(`Failed to load artifacts, error: ${ke}, try to re-compile contracts...`),g.compile(Y.fullNodeVersion,x,k,re,fe,le,xe,_e)}}static getImportSourcePath(x,k){const Y=k.split("/");if(Y.length>1&&Y[0]==="std"){const fe=d.dirname(__filename);return d.join(fe,"..","..","..",k)}let re=x;for(;;){const fe=d.join(re,"node_modules",k);if(a.default.existsSync(fe))return fe;const le=re;if(re=d.join(re,".."),le===re)throw new Error(`Specified import file does not exist: ${k}`)}}static async handleImports(x,k,Y,re){const fe=[],le=Y.replace(g.importRegex,_e=>(fe.push(_e),"")),xe=[];for(const _e of fe){const ke=_e.slice(8,-1),$e=ke.endsWith(".ral")?ke:ke+".ral";if(!re.includes($e)){re.push($e);const Ne=g.getImportSourcePath(x,$e),We=await g.loadSourceFile(x,k,Ne,re,!0);xe.push(...We)}}return[le,xe]}static async loadSourceFile(x,k,Y,re,fe){const le=d.relative(k,Y);if(!Y.endsWith(".ral"))throw new Error(`Invalid filename: ${Y}, smart contract file name should end with ".ral"`);const xe=await s.promises.readFile(Y),[_e,ke]=await g.handleImports(x,k,xe.toString(),re);if(_e.match(new RegExp('^import "',"mg"))!==null)throw new Error(`Invalid import statements, source: ${Y}`);const $e=ke;for(const Ne of this.matchers){const We=_e.matchAll(Ne.matcher);for(const gt of We){const ft=await I.from(Ne.type,gt[1],_e,le,fe);$e.push(ft)}}return $e}static async loadSourceFiles(x,k){const Y=[],re=[],fe=async function(xe){const _e=await s.promises.readdir(xe,{withFileTypes:!0});for(const ke of _e)if(ke.isFile()){const $e=d.join(xe,ke.name),Ne=await g.loadSourceFile(x,k,$e,Y,!1);re.push(...Ne)}else{const $e=d.join(xe,ke.name);await fe($e)}};await fe(k);const le=re.filter(xe=>xe.type===w.Contract||xe.type===w.Script).length;if(re.length===0||le===0)throw new Error("Project have no source files");return re.sort((xe,_e)=>xe.type-_e.type)}static async build(x={},k=".",Y=g.DEFAULT_CONTRACTS_DIR,re=g.DEFAULT_ARTIFACTS_DIR,fe=void 0){const le=(0,f.getCurrentNodeProvider)(),xe=fe??(await le.infos.getInfosVersion()).version,_e=await g.loadSourceFiles(k,Y),{errorOnWarnings:ke,...$e}={...e.DEFAULT_COMPILER_OPTIONS,...x},Ne=await O.from(k);Ne===void 0||Ne.needToReCompile($e,_e,xe)?(console.log(`Compiling contracts in folder "${Y}"`),g.currentProject=await g.compile(xe,le,_e,k,Y,re,ke,$e)):(console.log(`Contracts are compiled already. Loading them from folder "${re}"`),g.currentProject=await g.loadArtifacts(le,_e,Ne,k,Y,re,ke,$e))}}e.Project=g,g.importRegex=new RegExp('^import "[^"./]+/[^"]*[a-z][a-z_0-9]*(.ral)?"',"mg"),g.abstractContractMatcher=new y("^Abstract Contract ([A-Z][a-zA-Z0-9]*)",w.AbstractContract),g.contractMatcher=new y("^Contract ([A-Z][a-zA-Z0-9]*)",w.Contract),g.interfaceMatcher=new y("^Interface ([A-Z][a-zA-Z0-9]*)",w.Interface),g.scriptMatcher=new y("^TxScript ([A-Z][a-zA-Z0-9]*)",w.Script),g.matchers=[g.abstractContractMatcher,g.contractMatcher,g.interfaceMatcher,g.scriptMatcher],g.DEFAULT_CONTRACTS_DIR="contracts",g.DEFAULT_ARTIFACTS_DIR="artifacts";class D{constructor(x,k,Y){this.version=x,this.name=k,this.functions=Y}publicFunctions(){return this.functions.filter(x=>x.isPublic).map(x=>x.name)}usingPreapprovedAssetsFunctions(){return this.functions.filter(x=>x.usePreapprovedAssets).map(x=>x.name)}usingAssetsInContractFunctions(){return this.functions.filter(x=>x.useAssetsInContract).map(x=>x.name)}}e.Artifact=D;class H extends D{constructor(x,k,Y,re,fe,le,xe,_e,ke,$e,Ne,We){super(x,k,ke),this.bytecode=Y,this.bytecodeDebugPatch=re,this.codeHash=fe,this.fieldsSig=xe,this.eventsSig=_e,this.constants=$e,this.enums=Ne,this.stdInterfaceId=We,this.bytecodeDebug=c.buildDebugBytecode(this.bytecode,this.bytecodeDebugPatch),this.codeHashDebug=le}static fromJson(x,k="",Y=""){if(x.version==null||x.name==null||x.bytecode==null||x.codeHash==null||x.fieldsSig==null||x.eventsSig==null||x.constants==null||x.enums==null||x.functions==null)throw Error("The artifact JSON for contract is incomplete");return new H(x.version,x.name,x.bytecode,k,x.codeHash,Y||x.codeHash,x.fieldsSig,x.eventsSig,x.functions,x.constants,x.enums,x.stdInterfaceId===null?void 0:x.stdInterfaceId)}static fromCompileResult(x){return new H(x.version,x.name,x.bytecode,x.bytecodeDebugPatch,x.codeHash,x.codeHashDebug,x.fields,x.events,x.functions,x.constants,x.enums,x.stdInterfaceId)}static async fromArtifactFile(x,k,Y){const re=await s.promises.readFile(x),fe=JSON.parse(re.toString());return H.fromJson(fe,k,Y)}toString(){const x={version:this.version,name:this.name,bytecode:this.bytecode,codeHash:this.codeHash,fieldsSig:this.fieldsSig,eventsSig:this.eventsSig,functions:this.functions,constants:this.constants,enums:this.enums};return this.stdInterfaceId!==void 0&&(x.stdInterfaceId=this.stdInterfaceId),JSON.stringify(x,null,2)}toState(x,k,Y){const re=typeof Y<"u"?Y:H.randomAddress();return{address:re,contractId:(0,u.binToHex)((0,u.contractIdFromAddress)(re)),bytecode:this.bytecode,codeHash:this.codeHash,fields:x,fieldsSig:this.fieldsSig,asset:k}}static randomAddress(){const x=new Uint8Array(33);return _.getRandomValues(x),x[0]=3,u.bs58.encode(x)}printDebugMessages(x,k){k.length!=0&&(console.log(`Testing ${this.name}.${x}:`),k.forEach(Y=>console.log(`Debug - ${Y.contractAddress} - ${Y.message}`)))}toApiFields(x){return typeof x>"u"?[]:j(x,this.fieldsSig)}toApiArgs(x,k){if(k){const Y=this.functions.find(re=>re.name==x);if(Y==null)throw new Error(`Invalid function name: ${x}`);return U(k,Y)}else return[]}getMethodIndex(x){return this.functions.findIndex(k=>k.name===x)}toApiContractStates(x){return typeof x<"u"?x.map(k=>M(k)):void 0}toApiTestContractParams(x,k){const Y=k.initialFields===void 0?[]:B(k.initialFields,this.fieldsSig,!1),re=k.initialFields===void 0?[]:B(k.initialFields,this.fieldsSig,!0);return{group:k.group,blockHash:k.blockHash,blockTimeStamp:k.blockTimeStamp,txId:k.txId,address:k.address,bytecode:this.bytecodeDebug,initialImmFields:Y,initialMutFields:re,initialAsset:typeof k.initialAsset<"u"?S(k.initialAsset):void 0,methodIndex:this.getMethodIndex(x),args:this.toApiArgs(x,k.testArgs),existingContracts:this.toApiContractStates(k.existingContracts),inputAssets:T(k.inputAssets)}}fromApiContractState(x){return{address:x.address,contractId:(0,u.binToHex)((0,u.contractIdFromAddress)(x.address)),bytecode:x.bytecode,initialStateHash:x.initialStateHash,codeHash:x.codeHash,fields:V(x.immFields,x.mutFields,this.fieldsSig),fieldsSig:this.fieldsSig,asset:v(x.asset)}}static fromApiContractState(x,k){return(k?k(x.codeHash):g.currentProject.contractByCodeHash(x.codeHash)).fromApiContractState(x)}static fromApiEvent(x,k,Y,re){let fe,le;if(x.eventIndex==H.ContractCreatedEventIndex)fe=ue(P(x.fields,H.ContractCreatedEvent,!0)),le=H.ContractCreatedEvent.name;else if(x.eventIndex==H.ContractDestroyedEventIndex)fe=P(x.fields,H.ContractDestroyedEvent,!0),le=H.ContractDestroyedEvent.name;else{const _e=(re?re(k):g.currentProject.contractByCodeHash(k)).eventsSig[x.eventIndex];fe=P(x.fields,_e),le=_e.name}return{txId:Y,blockHash:x.blockHash,contractAddress:x.contractAddress,name:le,eventIndex:x.eventIndex,fields:fe}}fromApiTestContractResult(x,k,Y){const re=this.functions.findIndex(ke=>ke.name===x),fe=this.functions[`${re}`].returnTypes,le=(0,l.fromApiArray)(k.returns,fe),xe=le.length===0?null:le.length===1?le[0]:le,_e=new Map;return _e.set(k.address,k.codeHash),k.contracts.forEach(ke=>_e.set(ke.address,ke.codeHash)),{contractId:(0,u.binToHex)((0,u.contractIdFromAddress)(k.address)),contractAddress:k.address,returns:xe,gasUsed:k.gasUsed,contracts:k.contracts.map(ke=>H.fromApiContractState(ke)),txOutputs:k.txOutputs.map(q),events:H.fromApiEvents(k.events,_e,Y),debugMessages:k.debugMessages}}async txParamsForDeployment(x,k){const Y=k.initialFields??{},re=this.buildByteCodeToDeploy(se(this,Y)),fe=await x.getSelectedAccount();return{signerAddress:fe.address,signerKeyType:fe.keyType,bytecode:re,initialAttoAlphAmount:k==null?void 0:k.initialAttoAlphAmount,issueTokenAmount:k==null?void 0:k.issueTokenAmount,initialTokenAmounts:k==null?void 0:k.initialTokenAmounts,gasAmount:k==null?void 0:k.gasAmount,gasPrice:k==null?void 0:k.gasPrice}}buildByteCodeToDeploy(x){try{return c.buildContractByteCode(this.bytecode,x,this.fieldsSig)}catch(k){throw new Error(`Failed to build bytecode for contract ${this.name}, error: ${k}`)}}static fromApiEvents(x,k,Y,re){return x.map(fe=>{const le=fe.contractAddress,xe=k.get(le);if(typeof xe<"u"||fe.eventIndex<0)return H.fromApiEvent(fe,xe,Y,re);throw Error(`Cannot find codeHash for the contract address: ${le}`)})}toApiCallContract(x,k,Y,re){const fe=this.functions[`${re}`],le=E(x.args??{},fe.paramNames,fe.paramTypes);return{...x,group:k,address:Y,methodIndex:re,args:le}}fromApiCallContractResult(x,k,Y,re){const fe=this.functions[`${Y}`].returnTypes,le=Te(x),xe=(0,l.fromApiArray)(le.returns,fe),_e=xe.length===0?null:xe.length===1?xe[0]:xe,ke=new Map;return le.contracts.forEach($e=>ke.set($e.address,$e.codeHash)),{returns:_e,gasUsed:le.gasUsed,contracts:le.contracts.map($e=>H.fromApiContractState($e,re)),txInputs:le.txInputs,txOutputs:le.txOutputs.map($e=>q($e)),events:H.fromApiEvents(le.events,ke,k,re)}}}e.Contract=H,H.ContractCreatedEventIndex=-1,H.ContractCreatedEvent={name:"ContractCreated",fieldNames:["address","parentAddress","stdInterfaceId"],fieldTypes:["Address","Address","ByteVec"]},H.ContractDestroyedEventIndex=-2,H.ContractDestroyedEvent={name:"ContractDestroyed",fieldNames:["address"],fieldTypes:["Address"]};class G extends D{constructor(x,k,Y,re,fe,le){super(x,k,le),this.bytecodeTemplate=Y,this.bytecodeDebugPatch=re,this.fieldsSig=fe}static fromCompileResult(x){return new G(x.version,x.name,x.bytecodeTemplate,x.bytecodeDebugPatch,x.fields,x.functions)}static fromJson(x,k=""){if(x.version==null||x.name==null||x.bytecodeTemplate==null||x.fieldsSig==null||x.functions==null)throw Error("The artifact JSON for script is incomplete");return new G(x.version,x.name,x.bytecodeTemplate,k,x.fieldsSig,x.functions)}static async fromArtifactFile(x,k){const Y=await s.promises.readFile(x),re=JSON.parse(Y.toString());return this.fromJson(re,k)}toString(){const x={version:this.version,name:this.name,bytecodeTemplate:this.bytecodeTemplate,fieldsSig:this.fieldsSig,functions:this.functions};return JSON.stringify(x,null,2)}async txParamsForExecution(x,k){const Y=await x.getSelectedAccount();return{signerAddress:Y.address,signerKeyType:Y.keyType,bytecode:this.buildByteCodeToDeploy(k.initialFields??{}),attoAlphAmount:k.attoAlphAmount,tokens:k.tokens,gasAmount:k.gasAmount,gasPrice:k.gasPrice}}buildByteCodeToDeploy(x){try{return c.buildScriptByteCode(this.bytecodeTemplate,x,this.fieldsSig)}catch(k){throw new Error(`Failed to build bytecode for script ${this.name}, error: ${k}`)}}}e.Script=G;function V(W,x,k){const Y=[];let re=0,fe=0;return k.types.flatMap((xe,_e)=>Array((0,l.typeLength)(xe)).fill(k.isMutable[`${_e}`])).forEach(xe=>{xe?(Y.push(x[`${fe}`]),fe+=1):(Y.push(W[`${re}`]),re+=1)}),(0,l.fromApiVals)(Y,k.names,k.types)}function P(W,x,k=!1){return(0,l.fromApiVals)(W,x.fieldNames,x.fieldTypes,k)}function S(W){return{attoAlphAmount:(0,l.toApiNumber256)(W.alphAmount),tokens:typeof W.tokens<"u"?W.tokens.map(l.toApiToken):[]}}function v(W){return{alphAmount:(0,l.fromApiNumber256)(W.attoAlphAmount),tokens:(0,l.fromApiTokens)(W.tokens)}}function b(W,x){if(x in W)return W[`${x}`];throw Error(`No Val exists for ${x}`)}function B(W,x,k){const Y=x.names.map((le,xe)=>xe).filter(le=>x.isMutable[`${le}`]===k),re=Y.map(le=>x.names[`${le}`]),fe=Y.map(le=>x.types[`${le}`]);return E(W,re,fe)}function M(W){const x=W.fields??{};return{address:W.address,bytecode:W.bytecode,codeHash:W.codeHash,initialStateHash:W.initialStateHash,immFields:B(x,W.fieldsSig,!1),mutFields:B(x,W.fieldsSig,!0),asset:S(W.asset)}}function j(W,x){return E(W,x.names,x.types)}function U(W,x){return E(W,x.paramNames,x.paramTypes)}function E(W,x,k){return x.map((Y,re)=>{const fe=b(W,Y),le=k[`${re}`];return(0,l.toApiVal)(fe,le)})}e.toApiVals=E;function N(W){return{address:W.address,asset:S(W.asset)}}function T(W){return typeof W<"u"?W.map(N):void 0}function q(W){if(W.type==="AssetOutput"){const x=W;return{type:"AssetOutput",address:x.address,alphAmount:(0,l.fromApiNumber256)(x.attoAlphAmount),tokens:(0,l.fromApiTokens)(x.tokens),lockTime:x.lockTime,message:x.message}}else if(W.type==="ContractOutput"){const x=W;return{type:"ContractOutput",address:x.address,alphAmount:(0,l.fromApiNumber256)(x.attoAlphAmount),tokens:(0,l.fromApiTokens)(x.tokens)}}else throw new Error(`Unknown output type: ${W}`)}function J(){const W=new Uint8Array(32);return _.getRandomValues(W),(0,u.binToHex)(W)}e.randomTxId=J,u.assertType;class te{constructor(x){this.contract=x}async deploy(x,k){const Y=await this.contract.txParamsForDeployment(x,{...k,initialFields:se(this.contract,k.initialFields)}),re=await x.signAndSubmitDeployContractTx(Y);return{...re,contractInstance:this.at(re.contractAddress)}}stateForTest(x,k,Y){const re={alphAmount:(k==null?void 0:k.alphAmount)??h.ONE_ALPH,tokens:k==null?void 0:k.tokens};return this.contract.toState(se(this.contract,x),re,Y)}}e.ContractFactory=te;class ne{constructor(x){this.script=x}async execute(x,k){const Y=await this.script.txParamsForExecution(x,k);return await x.signAndSubmitExecuteScriptTx(Y)}}e.ExecutableScript=ne;function ce(W){const x=new Uint8Array(32).fill(0);return x[31]=W,(0,u.addressFromContractId)((0,u.binToHex)(x))}e.CreateContractEventAddress=ce(-1),e.DestroyContractEventAddress=ce(-2);function ie(W,x,k){if(W.eventIndex!==k)throw new Error(`Invalid event index: ${W.eventIndex}, expected: ${k}`);return P(W.fields,x,!0)}function ue(W){const x=W.parentAddress,k=W.stdInterfaceId;return{address:W.address,parentAddress:x===""?void 0:x,stdInterfaceIdGuessed:k===""?void 0:k}}function A(W){const x=ie(W,H.ContractCreatedEvent,H.ContractCreatedEventIndex);return{blockHash:W.blockHash,txId:W.txId,eventIndex:W.eventIndex,name:H.ContractCreatedEvent.name,fields:ue(x)}}e.decodeContractCreatedEvent=A;function K(W){const x=ie(W,H.ContractDestroyedEvent,H.ContractDestroyedEventIndex);return{blockHash:W.blockHash,txId:W.txId,eventIndex:W.eventIndex,name:H.ContractDestroyedEvent.name,fields:{address:x.address}}}e.decodeContractDestroyedEvent=K;function ee(W,x,k,Y,re){const fe=_e=>_e.eventIndex!==k?Promise.resolve():W.messageCallback(Y(_e)),le=(_e,ke)=>W.errorCallback(_e,ke),xe={pollingInterval:W.pollingInterval,messageCallback:fe,errorCallback:le,onEventCountChanged:W.onEventCountChanged};return(0,p.subscribeToEvents)(xe,x,re)}e.subscribeEventsFromContract=ee;function se(W,x){const k="414c5048";return W.stdInterfaceId===void 0?x:{...x,__stdInterfaceId:k+W.stdInterfaceId}}e.addStdIdToFields=se;async function pe(W,x,k){const Y=(k==null?void 0:k.txId)??J(),re=k.initialFields===void 0?{}:k.initialFields,fe=W.contract.toApiTestContractParams(x,{...k,txId:Y,initialFields:se(W.contract,re),testArgs:k.testArgs===void 0?{}:k.testArgs}),le=await(0,f.getCurrentNodeProvider)().contracts.postContractsTestContract(fe),xe=W.contract.fromApiTestContractResult(x,le,Y);return W.contract.printDebugMessages(x,xe.debugMessages),xe}e.testMethod=pe;class ge{constructor(x){this.address=x,this.contractId=(0,u.binToHex)((0,u.contractIdFromAddress)(x)),this.groupIndex=(0,u.groupOfAddress)(x)}}e.ContractInstance=ge;async function X(W,x){const k=await(0,f.getCurrentNodeProvider)().contracts.getContractsAddressState(x.address,{group:x.groupIndex}),Y=W.contract.fromApiContractState(k);return{...Y,fields:Y.fields}}e.fetchContractState=X;function R(W,x){return ee(W,e.CreateContractEventAddress,H.ContractCreatedEventIndex,k=>({...A(k),contractAddress:e.CreateContractEventAddress}),x)}e.subscribeContractCreatedEvent=R;function z(W,x){return ee(W,e.DestroyContractEventAddress,H.ContractDestroyedEventIndex,k=>({...K(k),contractAddress:e.DestroyContractEventAddress}),x)}e.subscribeContractDestroyedEvent=z;function Z(W,x,k,Y){if(k.eventIndex!==Y&&!(Y>=0&&Yle.name===Y);return ee(k,x.address,fe,le=>Z(W,x,le,fe),re)}e.subscribeContractEvent=Q;function de(W,x,k,Y){const re=xe=>k.messageCallback({...Z(W,x,xe,xe.eventIndex),contractAddress:x.address}),fe=(xe,_e)=>k.errorCallback(xe,_e),le={pollingInterval:k.pollingInterval,messageCallback:re,errorCallback:fe,onEventCountChanged:k.onEventCountChanged};return(0,p.subscribeToEvents)(le,x.address,Y)}e.subscribeContractEvents=de;async function we(W,x,k,Y,re){const fe=W.contract.getMethodIndex(k),le=(Y==null?void 0:Y.txId)??J(),xe=W.contract.toApiCallContract({...Y,txId:le,args:Y.args===void 0?{}:Y.args},x.groupIndex,x.address,fe),_e=await(0,f.getCurrentNodeProvider)().contracts.postContractsCallContract(xe);return W.contract.fromApiCallContractResult(_e,le,fe,re)}e.callMethod=we;async function Se(W,x,k,Y){const re=Object.entries(k),fe=re.map(_e=>{const[ke,$e]=_e,Ne=W.contract.getMethodIndex(ke),We=($e==null?void 0:$e.txId)??J();return W.contract.toApiCallContract({...$e,txId:We,args:$e.args===void 0?{}:$e.args},x.groupIndex,x.address,Ne)}),le=await(0,f.getCurrentNodeProvider)().contracts.postContractsMulticallContract({calls:fe}),xe={};return fe.forEach((_e,ke)=>{const $e=_e.methodIndex,Ne=le.results[`${$e}`],We=re[`${ke}`][0];xe[`${We}`]=W.contract.fromApiCallContractResult(Ne,_e.txId,$e,Y)}),xe}e.multicallMethods=Se;async function Ee(W){return(0,f.getCurrentNodeProvider)().events.getEventsContractContractaddressCurrentCount(W).catch(x=>{if(x instanceof Error&&x.message.includes(`${W} not found`))return 0;throw x})}e.getContractEventsCurrentCount=Ee;const Ae=async(W,x)=>{const k=await W.transactions.postTransactionsDecodeUnsignedTx({unsignedTx:x}),Y=k.unsignedTx.fixedOutputs.length,re=k.unsignedTx.txId+Y.toString(16).padStart(8,"0");return(0,u.binToHex)(m.blake2b((0,u.hexToBinUnsafe)(re),void 0,32)).slice(0,62)+k.fromGroup.toString(16).padStart(2,"0")};e.getContractIdFromUnsignedTx=Ae,e.getTokenIdFromUnsignedTx=e.getContractIdFromUnsignedTx;function Te(W){if(W.type==="CallContractFailed")throw new Error(`Failed to call contract, error: ${W.error}`);return W}e.tryGetCallResult=Te}(dw)),dw}var KA;function FH(){return KA||(KA=1,function(e){var t=Le&&Le.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Le&&Le.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(MH(),e),r(J_e(),e),r(NH(),e)}(fw)),fw}var YA;function Q_e(){if(YA)return Rf;YA=1,Object.defineProperty(Rf,"__esModule",{value:!0}),Rf.NodeProvider=void 0;const e=_4(),t=E4,r=FH(),n=Kn();function o(a,s,l){const c=new t.Api({baseUrl:a,baseApiParams:{secure:!0},securityWorker:u=>u!==null?{headers:{"X-API-KEY":`${u}`}}:{},customFetch:l??((...u)=>fetch(...u))});return c.setSecurityData(s??null),c}class i{constructor(s,l,c){this.request=f=>(0,e.request)(this,f),this.fetchFungibleTokenMetaData=async f=>{const d=(0,n.addressFromTokenId)(f),p=(0,n.groupOfAddress)(d),h=Array.from([0,1,2,3],w=>({methodIndex:w,group:p,address:d})),_=(await this.contracts.postContractsMulticallContract({calls:h})).results.map(w=>(0,r.tryGetCallResult)(w));return{symbol:_[0].returns[0].value,name:_[1].returns[0].value,decimals:Number(_[2].returns[0].value),totalSupply:BigInt(_[3].returns[0].value)}},this.fetchNFTMetaData=async f=>{const d=(0,n.addressFromTokenId)(f),p=(0,n.groupOfAddress)(d),h=await this.contracts.postContractsCallContract({methodIndex:0,group:p,address:d});return{tokenUri:(0,n.hexToString)((0,r.tryGetCallResult)(h).returns[0].value)}},this.fetchNFTCollectionMetaData=async f=>{const d=(0,n.addressFromContractId)(f),p=(0,n.groupOfAddress)(d),h=Array.from([0,1],w=>({methodIndex:w,group:p,address:d})),_=(await this.contracts.postContractsMulticallContract({calls:h})).results.map(w=>(0,r.tryGetCallResult)(w));return{collectionUri:(0,n.hexToString)(_[0].returns[0].value),totalSupply:BigInt(_[1].returns[0].value)}},this.guessStdInterfaceId=async f=>{var w;const d=(0,n.addressFromTokenId)(f),p=(0,n.groupOfAddress)(d),m=(w=(await this.contracts.getContractsAddressState((0,n.addressFromTokenId)(f),{group:p})).immFields.slice(-1).pop())==null?void 0:w.value,_="414c5048";if(typeof m=="string"&&m.startsWith(_))return m.slice(8)},this.guessFollowsNFTCollectionStd=async f=>{const d=await this.guessStdInterfaceId(f);return!!d&&d.startsWith(e.StdInterfaceIds.NFTCollection)},this.guessStdTokenType=async f=>{switch(await this.guessStdInterfaceId(f)){case e.StdInterfaceIds.FungibleToken:return"fungible";case e.StdInterfaceIds.NFT:return"non-fungible";default:return}};let u;typeof s=="string"?u=o(s,l,c):typeof s=="function"?(u=new i("https://1.2.3.4:0"),(0,e.forwardRequests)(u,s)):u=s,this.wallets={...u.wallets},this.infos={...u.infos},this.blockflow={...u.blockflow},this.addresses={...u.addresses},this.transactions={...u.transactions},this.mempool={...u.mempool},this.contracts={...u.contracts},this.multisig={...u.multisig},this.utils={...u.utils},this.miners={...u.miners},this.events={...u.events}}static Proxy(s){return new i(s)}static Remote(s){return new i(s)}}return Rf.NodeProvider=i,Rf}var Lf={},S4={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Api=e.HttpClient=e.ContentType=e.IntervalType=void 0,function(i){i.Daily="daily",i.Hourly="hourly"}(e.IntervalType||(e.IntervalType={}));const t=Ns;var r;(function(i){i.Json="application/json",i.FormData="multipart/form-data",i.UrlEncoded="application/x-www-form-urlencoded",i.Text="text/plain"})(r=e.ContentType||(e.ContentType={}));class n{constructor(a={}){this.baseUrl="",this.securityData=null,this.abortControllers=new Map,this.customFetch=(...s)=>fetch(...s),this.baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"},this.setSecurityData=s=>{this.securityData=s},this.contentFormatters={[r.Json]:s=>s!==null&&(typeof s=="object"||typeof s=="string")?JSON.stringify(s):s,[r.Text]:s=>s!==null&&typeof s!="string"?JSON.stringify(s):s,[r.FormData]:s=>Object.keys(s||{}).reduce((l,c)=>{const u=s[c];return l.append(c,u instanceof Blob?u:typeof u=="object"&&u!==null?JSON.stringify(u):`${u}`),l},new FormData),[r.UrlEncoded]:s=>this.toQueryString(s)},this.createAbortSignal=s=>{if(this.abortControllers.has(s)){const c=this.abortControllers.get(s);return c?c.signal:void 0}const l=new AbortController;return this.abortControllers.set(s,l),l.signal},this.abortRequest=s=>{const l=this.abortControllers.get(s);l&&(l.abort(),this.abortControllers.delete(s))},this.request=async({body:s,secure:l,path:c,type:u,query:f,format:d,baseUrl:p,cancelToken:h,...m})=>{const _=(typeof l=="boolean"?l:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},w=this.mergeRequestParams(m,_),y=f&&this.toQueryString(f),C=this.contentFormatters[u||r.Json],I=d||w.format;return this.customFetch(`${p||this.baseUrl||""}${c}${y?`?${y}`:""}`,{...w,headers:{...w.headers||{},...u&&u!==r.FormData?{"Content-Type":u}:{}},signal:h?this.createAbortSignal(h):w.signal,body:typeof s>"u"||s===null?null:C(s)}).then(async F=>{const O=F;O.data=null,O.error=null;const g=I?await F[I]().then(D=>(O.ok?O.data=D:O.error=D,O)).catch(D=>(O.error=D,O)):O;return h&&this.abortControllers.delete(h),g})},Object.assign(this,a)}encodeQueryParam(a,s){return`${encodeURIComponent(a)}=${encodeURIComponent(typeof s=="number"?s:`${s}`)}`}addQueryParam(a,s){return this.encodeQueryParam(s,a[s])}addArrayQueryParam(a,s){return a[s].map(c=>this.encodeQueryParam(s,c)).join("&")}toQueryString(a){const s=a||{};return Object.keys(s).filter(c=>typeof s[c]<"u").map(c=>Array.isArray(s[c])?this.addArrayQueryParam(s,c):this.addQueryParam(s,c)).join("&")}addQueryParams(a){const s=this.toQueryString(a);return s?`?${s}`:""}mergeRequestParams(a,s){return{...this.baseApiParams,...a,...s||{},headers:{...this.baseApiParams.headers||{},...a.headers||{},...s&&s.headers||{}}}}}e.HttpClient=n;class o extends n{constructor(){super(...arguments),this.blocks={getBlocks:(a,s={})=>this.request({path:"/blocks",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlocksBlockHash:(a,s={})=>this.request({path:`/blocks/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getBlocksBlockHashTransactions:(a,s,l={})=>this.request({path:`/blocks/${a}/transactions`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse)},this.transactions={getTransactionsTransactionHash:(a,s={})=>this.request({path:`/transactions/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse)},this.addresses={getAddressesAddress:(a,s={})=>this.request({path:`/addresses/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressTransactions:(a,s,l={})=>this.request({path:`/addresses/${a}/transactions`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),postAddressesTransactions:(a,s,l={})=>this.request({path:"/addresses/transactions",method:"POST",query:a,body:s,type:r.Json,format:"json",...l}).then(t.convertHttpResponse),getAddressesAddressTimerangedTransactions:(a,s,l={})=>this.request({path:`/addresses/${a}/timeranged-transactions`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getAddressesAddressTotalTransactions:(a,s={})=>this.request({path:`/addresses/${a}/total-transactions`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressMempoolTransactions:(a,s={})=>this.request({path:`/addresses/${a}/mempool/transactions`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressBalance:(a,s={})=>this.request({path:`/addresses/${a}/balance`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressTokens:(a,s,l={})=>this.request({path:`/addresses/${a}/tokens`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getAddressesAddressTokensTokenIdTransactions:(a,s,l,c={})=>this.request({path:`/addresses/${a}/tokens/${s}/transactions`,method:"GET",query:l,format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressTokensTokenIdBalance:(a,s,l={})=>this.request({path:`/addresses/${a}/tokens/${s}/balance`,method:"GET",format:"json",...l}).then(t.convertHttpResponse),getAddressesAddressTokensBalance:(a,s,l={})=>this.request({path:`/addresses/${a}/tokens-balance`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),postAddressesUsed:(a,s={})=>this.request({path:"/addresses/used",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressExportTransactionsCsv:(a,s,l={})=>this.request({path:`/addresses/${a}/export-transactions/csv`,method:"GET",query:s,format:"text",...l}).then(t.convertHttpResponse),getAddressesAddressAmountHistory:(a,s,l={})=>this.request({path:`/addresses/${a}/amount-history`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse)},this.infos={getInfos:(a={})=>this.request({path:"/infos",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosHeights:(a={})=>this.request({path:"/infos/heights",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosSupply:(a,s={})=>this.request({path:"/infos/supply",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getInfosSupplyTotalAlph:(a={})=>this.request({path:"/infos/supply/total-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosSupplyCirculatingAlph:(a={})=>this.request({path:"/infos/supply/circulating-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosSupplyReservedAlph:(a={})=>this.request({path:"/infos/supply/reserved-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosSupplyLockedAlph:(a={})=>this.request({path:"/infos/supply/locked-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosTotalTransactions:(a={})=>this.request({path:"/infos/total-transactions",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosAverageBlockTimes:(a={})=>this.request({path:"/infos/average-block-times",method:"GET",format:"json",...a}).then(t.convertHttpResponse)},this.mempool={getMempoolTransactions:(a,s={})=>this.request({path:"/mempool/transactions",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse)},this.tokens={getTokens:(a,s={})=>this.request({path:"/tokens",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getTokensTokenIdTransactions:(a,s,l={})=>this.request({path:`/tokens/${a}/transactions`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse)},this.charts={getChartsHashrates:(a,s={})=>this.request({path:"/charts/hashrates",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getChartsTransactionsCount:(a,s={})=>this.request({path:"/charts/transactions-count",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getChartsTransactionsCountPerChain:(a,s={})=>this.request({path:"/charts/transactions-count-per-chain",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse)},this.contractEvents={getContractEventsTransactionIdTransactionId:(a,s={})=>this.request({path:`/contract-events/transaction-id/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getContractEventsContractAddressContractAddress:(a,s,l={})=>this.request({path:`/contract-events/contract-address/${a}`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getContractEventsContractAddressContractAddressInputAddressInputAddress:(a,s,l,c={})=>this.request({path:`/contract-events/contract-address/${a}/input-address/${s}`,method:"GET",query:l,format:"json",...c}).then(t.convertHttpResponse)},this.contracts={getContractsContractParent:(a,s={})=>this.request({path:`/contracts/${a}/parent`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getContractsContractSubContracts:(a,s,l={})=>this.request({path:`/contracts/${a}/sub-contracts`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse)},this.utils={putUtilsSanityCheck:(a={})=>this.request({path:"/utils/sanity-check",method:"PUT",...a}).then(t.convertHttpResponse),putUtilsUpdateGlobalLoglevel:(a,s={})=>this.request({path:"/utils/update-global-loglevel",method:"PUT",body:a,...s}).then(t.convertHttpResponse),putUtilsUpdateLogConfig:(a,s={})=>this.request({path:"/utils/update-log-config",method:"PUT",body:a,type:r.Json,...s}).then(t.convertHttpResponse)}}}e.Api=o})(S4);var XA;function e4e(){if(XA)return Lf;XA=1,Object.defineProperty(Lf,"__esModule",{value:!0}),Lf.ExplorerProvider=void 0;const e=_4(),t=S4;function r(o,i,a){const s=new t.Api({baseUrl:o,baseApiParams:{secure:!0},securityWorker:l=>l!==null?{headers:{"X-API-KEY":`${l}`}}:{},customFetch:a??((...l)=>fetch(...l))});return s.setSecurityData(i??null),s}class n{constructor(i,a,s){this.request=c=>(0,e.request)(this,c);let l;typeof i=="string"?l=r(i,a,s):typeof i=="function"?(l=new n("https://1.2.3.4:0"),(0,e.forwardRequests)(l,i)):l=i,this.blocks={...l.blocks},this.transactions={...l.transactions},this.addresses={...l.addresses},this.infos={...l.infos},this.mempool={...l.mempool},this.tokens={...l.tokens},this.charts={...l.charts},this.utils={...l.utils},this.contracts={...l.contracts},this.contractEvents={...l.contractEvents}}static Proxy(i){return new n(i)}static Remote(i){return new n(i)}}return Lf.ExplorerProvider=n,Lf}var ZA;function Zu(){return ZA||(ZA=1,function(e){var t=Le&&Le.__createBinding||(Object.create?function(i,a,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(a,s);(!c||("get"in c?!a.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(i,l,c)}:function(i,a,s,l){l===void 0&&(l=s),i[l]=a[s]}),r=Le&&Le.__setModuleDefault||(Object.create?function(i,a){Object.defineProperty(i,"default",{enumerable:!0,value:a})}:function(i,a){i.default=a}),n=Le&&Le.__exportStar||function(i,a){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&t(a,i,s)},o=Le&&Le.__importStar||function(i){if(i&&i.__esModule)return i;var a={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&t(a,i,s);return r(a,i),a};Object.defineProperty(e,"__esModule",{value:!0}),e.explorer=e.node=void 0,n(Q_e(),e),n(e4e(),e),e.node=o(E4),e.explorer=o(S4),n(_4(),e),n(Ns,e)}(Z2)),Z2}var pw={},Vt={},zf={},JA;function BH(){if(JA)return zf;JA=1,Object.defineProperty(zf,"__esModule",{value:!0}),zf.TransactionBuilder=void 0;const e=qs(),t=Zu(),r=Kn(),n=jH();class o{static from(a,s,l){const c=typeof a=="string"?new t.NodeProvider(a,s,l):a;return new class extends o{get nodeProvider(){return c}}}static validatePublicKey(a,s,l){if((0,r.addressFromPublicKey)(s,l)!==a.signerAddress)throw new Error("Unmatched public key")}async buildTransferTx(a,s){o.validatePublicKey(a,s,a.signerKeyType);const{destinations:l,gasPrice:c,...u}=a,f={fromPublicKey:s,fromPublicKeyType:a.signerKeyType,destinations:(0,n.toApiDestinations)(l),gasPrice:(0,t.toApiNumber256Optional)(c),...u},d=await this.nodeProvider.transactions.postTransactionsBuild(f);return{...d,gasPrice:(0,t.fromApiNumber256)(d.gasPrice)}}async buildDeployContractTx(a,s){o.validatePublicKey(a,s,a.signerKeyType);const{initialAttoAlphAmount:l,initialTokenAmounts:c,issueTokenAmount:u,gasPrice:f,...d}=a,p={fromPublicKey:s,fromPublicKeyType:a.signerKeyType,initialAttoAlphAmount:(0,t.toApiNumber256Optional)(l),initialTokenAmounts:(0,t.toApiTokens)(c),issueTokenAmount:(0,t.toApiNumber256Optional)(u),gasPrice:(0,t.toApiNumber256Optional)(f),...d},h=await this.nodeProvider.contracts.postContractsUnsignedTxDeployContract(p),m=e.utils.binToHex(e.utils.contractIdFromAddress(h.contractAddress));return{...h,groupIndex:h.fromGroup,contractId:m,gasPrice:(0,t.fromApiNumber256)(h.gasPrice)}}async buildExecuteScriptTx(a,s){o.validatePublicKey(a,s,a.signerKeyType);const{attoAlphAmount:l,tokens:c,gasPrice:u,...f}=a,d={fromPublicKey:s,fromPublicKeyType:a.signerKeyType,attoAlphAmount:(0,t.toApiNumber256Optional)(l),tokens:(0,t.toApiTokens)(c),gasPrice:(0,t.toApiNumber256Optional)(u),...f},p=await this.nodeProvider.contracts.postContractsUnsignedTxExecuteScript(d);return{...p,groupIndex:p.fromGroup,gasPrice:(0,t.fromApiNumber256)(p.gasPrice)}}async buildUnsignedTx(a){const s={unsignedTx:a.unsignedTx},l=await this.nodeProvider.transactions.postTransactionsDecodeUnsignedTx(s);return{fromGroup:l.fromGroup,toGroup:l.toGroup,unsignedTx:a.unsignedTx,txId:l.unsignedTx.txId,gasAmount:l.unsignedTx.gasAmount,gasPrice:(0,t.fromApiNumber256)(l.unsignedTx.gasPrice)}}}return zf.TransactionBuilder=o,zf}var QA;function jH(){if(QA)return Vt;QA=1;var e=Le&&Le.__createBinding||(Object.create?function(O,g,D,H){H===void 0&&(H=D);var G=Object.getOwnPropertyDescriptor(g,D);(!G||("get"in G?!g.__esModule:G.writable||G.configurable))&&(G={enumerable:!0,get:function(){return g[D]}}),Object.defineProperty(O,H,G)}:function(O,g,D,H){H===void 0&&(H=D),O[H]=g[D]}),t=Le&&Le.__setModuleDefault||(Object.create?function(O,g){Object.defineProperty(O,"default",{enumerable:!0,value:g})}:function(O,g){O.default=g}),r=Le&&Le.__importStar||function(O){if(O&&O.__esModule)return O;var g={};if(O!=null)for(var D in O)D!=="default"&&Object.prototype.hasOwnProperty.call(O,D)&&e(g,O,D);return t(g,O),g},n=Le&&Le.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.fromApiDestination=Vt.toApiDestinations=Vt.toApiDestination=Vt.verifySignedMessage=Vt.hashMessage=Vt.extendMessage=Vt.SignerProviderWithCachedAccounts=Vt.SignerProviderWithMultipleAccounts=Vt.SignerProviderSimple=Vt.InteractiveSignerProvider=Vt.SignerProvider=void 0;const o=Vu,i=Yo,a=Zu(),s=r(Kn()),l=n(Hy),c=BH(),u=Kn();class f{async getSelectedAccount(){const g=await this.unsafeGetSelectedAccount();return f.validateAccount(g),g}static validateAccount(g){const D=(0,u.addressFromPublicKey)(g.publicKey,g.keyType),H=(0,u.groupOfAddress)(D);if(D!==g.address||H!==g.group)throw Error(`Invalid accounot data: ${JSON.stringify(g)}`)}}Vt.SignerProvider=f;class d extends f{async enable(g){const D=await this.unsafeEnable(g);return f.validateAccount(D),D}}Vt.InteractiveSignerProvider=d;class p extends f{async submitTransaction(g){const D={unsignedTx:g.unsignedTx,signature:g.signature};return this.nodeProvider.transactions.postTransactionsSubmit(D)}async signAndSubmitTransferTx(g){const D=await this.signTransferTx(g);return await this.submitTransaction(D),D}async signAndSubmitDeployContractTx(g){const D=await this.signDeployContractTx(g);return await this.submitTransaction(D),D}async signAndSubmitExecuteScriptTx(g){const D=await this.signExecuteScriptTx(g);return await this.submitTransaction(D),D}async signAndSubmitUnsignedTx(g){const D=await this.signUnsignedTx(g);return await this.submitTransaction(D),D}async usePublicKey(g){const{signerAddress:D,...H}=g;return{fromPublicKey:await this.getPublicKey(D),...H}}async signTransferTx(g){const D=await this.buildTransferTx(g);return{signature:await this.signRaw(g.signerAddress,D.txId),...D}}async buildTransferTx(g){return c.TransactionBuilder.from(this.nodeProvider).buildTransferTx(g,await this.getPublicKey(g.signerAddress))}async signDeployContractTx(g){const D=await this.buildDeployContractTx(g);return{signature:await this.signRaw(g.signerAddress,D.txId),...D}}async buildDeployContractTx(g){return c.TransactionBuilder.from(this.nodeProvider).buildDeployContractTx(g,await this.getPublicKey(g.signerAddress))}async signExecuteScriptTx(g){const D=await this.buildExecuteScriptTx(g);return{signature:await this.signRaw(g.signerAddress,D.txId),...D}}async buildExecuteScriptTx(g){return c.TransactionBuilder.from(this.nodeProvider).buildExecuteScriptTx(g,await this.getPublicKey(g.signerAddress))}async signUnsignedTx(g){const D=await c.TransactionBuilder.from(this.nodeProvider).buildUnsignedTx(g);return{signature:await this.signRaw(g.signerAddress,D.txId),...D}}async signMessage(g){const D=w(g.message,g.messageHasher);return{signature:await this.signRaw(g.signerAddress,D)}}}Vt.SignerProviderSimple=p;class h extends p{async getAccount(g){const H=(await this.getAccounts()).find(G=>G.address===g);if(typeof H>"u")throw new Error("Unmatched signerAddress");return H}async getPublicKey(g){return(await this.getAccount(g)).publicKey}}Vt.SignerProviderWithMultipleAccounts=h;class m extends h{constructor(){super(...arguments),this._selectedAccount=void 0,this._accounts=new Map}unsafeGetSelectedAccount(){if(this._selectedAccount===void 0)throw Error("No account is selected yet");return Promise.resolve(this._selectedAccount)}setSelectedAccount(g){const D=this._accounts.get(g);if(D===void 0)throw Error("The address is not in the accounts");return this._selectedAccount=D,Promise.resolve()}getAccounts(){return Promise.resolve(Array.from(this._accounts.values()))}async getAccount(g){const D=this._accounts.get(g);if(D===void 0)throw Error("The address is not in the accounts");return Promise.resolve(D)}}Vt.SignerProviderWithCachedAccounts=m;function _(O){return"Alephium Signed Message: "+O}Vt.extendMessage=_;function w(O,g){switch(g){case"alephium":return s.binToHex(l.default.blake2b(_(O),void 0,32));case"sha256":const D=(0,i.createHash)("sha256");return D.update(o.Buffer.from(O)),s.binToHex(D.digest());case"blake2b":return s.binToHex(l.default.blake2b(O,void 0,32));case"identity":return O;default:throw Error(`Invalid message hasher: ${g}`)}}Vt.hashMessage=w;function y(O,g,D,H,G){const V=w(O,g);return s.verifySignature(V,D,H,G)}Vt.verifySignedMessage=y;function C(O){return{...O,attoAlphAmount:(0,a.toApiNumber256)(O.attoAlphAmount),tokens:(0,a.toApiTokens)(O.tokens)}}Vt.toApiDestination=C;function I(O){return O.map(C)}Vt.toApiDestinations=I;function F(O){return{...O,attoAlphAmount:(0,a.fromApiNumber256)(O.attoAlphAmount),tokens:(0,a.fromApiTokens)(O.tokens)}}return Vt.fromApiDestination=F,Vt}var hw={},ek;function t4e(){if(ek)return hw;ek=1,Object.defineProperty(hw,"__esModule",{value:!0});const e=Kn();return e.assertType,(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),e.assertType,(0,e.assertType)(),hw}var tk;function r4e(){return tk||(tk=1,function(e){var t=Le&&Le.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Le&&Le.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(jH(),e),r(t4e(),e),r(BH(),e)}(pw)),pw}var vw={},ll={},rk;function n4e(){if(rk)return ll;rk=1,Object.defineProperty(ll,"__esModule",{value:!0}),ll.subscribeToTxStatus=ll.TxStatusSubscription=void 0;const e=qs(),t=Kn();class r extends t.Subscription{constructor(i,a,s,l,c){super(i),this.txId=a,this.fromGroup=s,this.toGroup=l,this.confirmations=c??1,this.startPolling()}async polling(){try{const i=await e.web3.getCurrentNodeProvider().transactions.getTransactionsStatus({txId:this.txId,fromGroup:this.fromGroup,toGroup:this.toGroup});await this.messageCallback(i),i.type==="Confirmed"&&i.chainConfirmations>=this.confirmations&&this.unsubscribe()}catch(i){await this.errorCallback(i,this)}}}ll.TxStatusSubscription=r;function n(o,i,a,s,l){return new r(o,i,a,s,l)}return ll.subscribeToTxStatus=n,ll}var cl={},nk;function o4e(){if(nk)return cl;nk=1;var e=Le&&Le.__createBinding||(Object.create?function(a,s,l,c){c===void 0&&(c=l);var u=Object.getOwnPropertyDescriptor(s,l);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[l]}}),Object.defineProperty(a,c,u)}:function(a,s,l,c){c===void 0&&(c=l),a[c]=s[l]}),t=Le&&Le.__setModuleDefault||(Object.create?function(a,s){Object.defineProperty(a,"default",{enumerable:!0,value:s})}:function(a,s){a.default=s}),r=Le&&Le.__importStar||function(a){if(a&&a.__esModule)return a;var s={};if(a!=null)for(var l in a)l!=="default"&&Object.prototype.hasOwnProperty.call(a,l)&&e(s,a,l);return t(s,a),s};Object.defineProperty(cl,"__esModule",{value:!0}),cl.transactionVerifySignature=cl.transactionSign=void 0;const n=r(Kn());function o(a,s,l){return n.sign(a,s,l)}cl.transactionSign=o;function i(a,s,l,c){return n.verifySignature(a,s,l,c)}return cl.transactionVerifySignature=i,cl}var ok;function i4e(){return ok||(ok=1,function(e){var t=Le&&Le.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Le&&Le.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(n4e(),e),r(o4e(),e)}(vw)),vw}var LH={},zH={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateNFTBaseUri=e.validateNFTCollectionUriMetaData=e.validateNFTTokenUriMetaData=e.validNFTCollectionUriMetaDataFields=e.validNFTUriMetaDataAttributeTypes=e.validNFTTokenUriMetaDataAttributesFields=e.validNFTTokenUriMetaDataFields=void 0,e.validNFTTokenUriMetaDataFields=["name","description","image","attributes"],e.validNFTTokenUriMetaDataAttributesFields=["trait_type","value"],e.validNFTUriMetaDataAttributeTypes=["string","number","boolean"],e.validNFTCollectionUriMetaDataFields=["name","description","image"];function t(u){Object.keys(u).forEach(m=>{if(!e.validNFTTokenUriMetaDataFields.includes(m))throw new Error(`Invalid field ${m}, only ${e.validNFTTokenUriMetaDataFields} are allowed`)});const f=i(u,"name"),d=a(u,"description"),p=i(u,"image"),h=o(u.attributes);return{name:f,description:d,image:p,attributes:h}}e.validateNFTTokenUriMetaData=t;function r(u){Object.keys(u).forEach(h=>{if(!e.validNFTCollectionUriMetaDataFields.includes(h))throw new Error(`Invalid field ${h}, only ${e.validNFTCollectionUriMetaDataFields} are allowed`)});const f=i(u,"name"),d=i(u,"description"),p=i(u,"image");return{name:f,description:d,image:p}}e.validateNFTCollectionUriMetaData=r;async function n(u,f){if(c(f)&&f>0){const d=[];for(let p=0;p{if(typeof f!="object")throw new Error("Field 'attributes' should be an array of objects");Object.keys(f).forEach(d=>{if(!e.validNFTTokenUriMetaDataAttributesFields.includes(d))throw new Error(`Invalid field ${d} for attributes, only ${e.validNFTTokenUriMetaDataAttributesFields} are allowed`)}),i(f,"trait_type"),s(f,"value")})}return u}function i(u,f){const d=u[`${f}`];if(!(typeof d=="string"&&d!==""))throw new Error(`JSON field '${f}' is not a non empty string`);return d}function a(u,f){const d=u[`${f}`];if(d!==void 0&&!(typeof d=="string"&&d!==""))throw new Error(`JSON field '${f}' is not a non empty string`);return d}function s(u,f){const d=u[`${f}`];if(!(typeof d=="string"&&d!==""||typeof d=="number"||typeof d=="boolean"))throw new Error("Attribute value should be a non empty string, number or boolean");return d}async function l(u,f){try{return await(await fetch(`${u}${f}`)).json()}catch(d){throw new Error(`Error fetching NFT metadata from ${u}${f}: ${d}`)}}function c(u){return u===parseInt(u.toString(),10)}})(zH);(function(e){var t=Le&&Le.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Le&&Le.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(zH,e)})(LH);var ik;function qs(){return ik||(ik=1,function(e){var t=Le&&Le.__createBinding||(Object.create?function(i,a,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(a,s);(!c||("get"in c?!a.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(i,l,c)}:function(i,a,s,l){l===void 0&&(l=s),i[l]=a[s]}),r=Le&&Le.__setModuleDefault||(Object.create?function(i,a){Object.defineProperty(i,"default",{enumerable:!0,value:a})}:function(i,a){i.default=a}),n=Le&&Le.__exportStar||function(i,a){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&t(a,i,s)},o=Le&&Le.__importStar||function(i){if(i&&i.__esModule)return i;var a={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&t(a,i,s);return r(a,i),a};Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.web3=void 0,BigInt.prototype.toJSON=function(){return this.toString()},n(Zu(),e),n(FH(),e),n(r4e(),e),n(Kn(),e),n(i4e(),e),n(LH,e),n(Wy,e),e.web3=o(RH()),e.utils=o(Kn())}(X2)),X2}var m1;Object.defineProperty(Mo,"__esModule",{value:!0});var a4e=qs();let s4e=class extends a4e.InteractiveSignerProvider{constructor(){super(...arguments),this.enableIfConnected=async t=>{if(await this.isPreauthorized(t))return await super.enable(t)}}};function UH(e){return`alephiumProviders/${e}#initialized`}const q3={id:"alephium",name:"Alephium",icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgd2lkdGg9IjEwMCUiCiAgIGhlaWdodD0iMTAwJSIKICAgdmlld0JveD0iMCAwIDUxMiA1MTIiCiAgIHZlcnNpb249IjEuMSIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoyOyIKICAgaWQ9InN2Zzk4ODQiCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnMKICAgaWQ9ImRlZnMxMCIgLz4KICAgIDxnCiAgIGlkPSJnMTAwNyI+PHJlY3QKICAgICB4PSIwIgogICAgIHk9IjAiCiAgICAgd2lkdGg9IjUxMi4wMDA2MSIKICAgICBoZWlnaHQ9IjUxMS45OTk5MSIKICAgICBzdHlsZT0iZmlsbDpub25lO3N0cm9rZS13aWR0aDowLjM1NTU1NiIKICAgICBpZD0icmVjdDk4NjUiIC8+PHBhdGgKICAgICBkPSJtIDIyMi44MjMyLDMwOS43OTQxMSBjIDAsLTQuMzYxMjQgLTMuNDQ2NzgsLTcuMjk4MzIgLTcuNzA0NTgsLTYuNTQ3NjYgbCAtNTAuODkwNzksOC45NzIwOSBjIC00LjI1Nzc5LDAuNzUwNjUgLTcuNzA0NTgsNC45MDMwOCAtNy43MDQ1OCw5LjI2NDMxIHYgOTYuMjM1OTggYyAwLDQuMzcxMTkgMy40NDY3OSw3LjMwODI3IDcuNzA0NTgsNi41NTc2MSBsIDUwLjg5MDc5LC04Ljk3MjA5IGMgNC4yNTc4LC0wLjc1MDY1IDcuNzA0NTgsLTQuOTAzMDggNy43MDQ1OCwtOS4yNzQyNyB6IgogICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlLXdpZHRoOjEuMDA0NyIKICAgICBpZD0icGF0aDk4NjciIC8+PHBhdGgKICAgICBkPSJtIDM1NS4zODYyLDk0LjMwNTMwNCBjIDAsLTQuMzYxMjM3IC0zLjQ0Njc4LC03LjI5ODMxNSAtNy43MDQ1OCwtNi41NDc2NjIgbCAtNTAuODkwNzksOC45NzIwOTUgYyAtNC4yNTc3OSwwLjc1MDY1MyAtNy43MDQ1OCw0LjkwMzA3MyAtNy43MDQ1OCw5LjI2NDMxMyB2IDk2LjIzNTk3IGMgMCw0LjM3MTIgMy40NDY3OSw3LjMwODI3IDcuNzA0NTgsNi41NTc2MiBsIDUwLjg5MDc5LC04Ljk3MjA5IGMgNC4yNTc4LC0wLjc1MDY2IDcuNzA0NTgsLTQuOTAzMDggNy43MDQ1OCwtOS4yNzQyNyB6IgogICAgIHN0eWxlPSJmaWxsOiNmZjVkNTE7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlLXdpZHRoOjEuMDA0NyIKICAgICBpZD0icGF0aDk4NzEiIC8+PHBhdGgKICAgICBkPSJtIDIzMS4wODk3OSwxMTYuNzY3NDEgYyAtMS45NjU1NSwtNC4zMjkwNSAtNy4yNDkxNiwtNy4xODEyNiAtMTEuODExMDgsLTYuMzc2OTkgbCAtNTQuNTI1NzgsOS42MTI5NiBjIC00LjU2MTkyLDAuODA0MjcgLTYuNjY0MjgsNC45NTg2MyAtNC42OTg3Miw5LjI4NzY4IGwgMTIwLjczOTcxLDI2NS45MjQxMiBjIDEuOTY1NTYsNC4zMjkwNiA3LjI2MDUzLDcuMjA2MjggMTEuODIyNDQsNi40MDIwMSBsIDU0LjUyNTc5LC05LjYxMjk1IGMgNC41NjE5MiwtMC44MDQyNyA2LjY1MjkxLC00Ljk4MzY1IDQuNjg3MzYsLTkuMzEyNzEgeiIKICAgICBzdHlsZT0iZmlsbDojMDAwMDAwO2ZpbGwtb3BhY2l0eToxO3N0cm9rZS13aWR0aDoxLjcxMzM0IgogICAgIGlkPSJwYXRoOTg3NSIgLz48L2c+Cjwvc3ZnPgo=",downloads:{chrome:"https://chrome.google.com/webstore/detail/alephium-extension-wallet",firefox:"https://addons.mozilla.org/en-US/firefox/addon/alephium-extension-wallet"}},ak=[q3];function HH(e,t){return e.id===t.id&&e.name===t.name}function gw(e){return new Promise(t=>{const r=()=>{const n=VH(e.id);n&&HH(n,e)&&t(n)};window.addEventListener(UH(e.id),r),r(),setTimeout(()=>t(void 0),5e3)})}function VH(e){try{const t=window.alephiumProviders;if(!t)return;const r=t[e];return WH(r)?r:void 0}catch{}}function WH(e){try{return e&&["id","name","icon","unsafeEnable","isPreauthorized","nodeProvider","explorerProvider","signAndSubmitTransferTx","signAndSubmitDeployContractTx","signAndSubmitExecuteScriptTx","signAndSubmitUnsignedTx","signUnsignedTx","signMessage"].every(t=>t in e)}catch{}return!1}Mo.AlephiumWindowObject=s4e,Mo.alephiumProvider=q3,Mo.checkProviderMetadata=HH,m1=Mo.getDefaultAlephiumWallet=function(){return gw(q3)},Mo.getKnownWallet=gw,Mo.getWalletObject=VH,Mo.isWalletObj=WH,Mo.knownProviders=ak,Mo.providerInitializedEvent=UH,Mo.scanKnownWallets=async function(){const e=[];for(const t of ak){const r=await gw(t);r!==void 0&&e.push(r)}return e};var G3={};/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var K3=function(e,t){return K3=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)n.hasOwnProperty(o)&&(r[o]=n[o])},K3(e,t)};function l4e(e,t){K3(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Y3=function(){return Y3=Object.assign||function(t){for(var r,n=1,o=arguments.length;n=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function f4e(e,t){return function(r,n){t(r,n,e)}}function d4e(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function p4e(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{c(n.next(u))}catch(f){a(f)}}function l(u){try{c(n.throw(u))}catch(f){a(f)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((n=n.apply(e,t||[])).next())})}function h4e(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,o=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function qH(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function m4e(){for(var e=[],t=0;t1||s(d,p)})})}function s(d,p){try{l(n[d](p))}catch(h){f(i[0][3],h)}}function l(d){d.value instanceof wp?Promise.resolve(d.value.v).then(c,u):f(i[0][2],d)}function c(d){s("next",d)}function u(d){s("throw",d)}function f(d,p){d(p),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w4e(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,i){t[o]=e[o]?function(a){return(r=!r)?{value:wp(e[o](a)),done:o==="return"}:i?i(a):a}:i}}function x4e(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof X3=="function"?X3(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(a){return new Promise(function(s,l){a=e[i](a),o(s,l,a.done,a.value)})}}function o(i,a,s,l){Promise.resolve(l).then(function(c){i({value:c,done:s})},a)}}function _4e(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E4e(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function S4e(e){return e&&e.__esModule?e:{default:e}}function C4e(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P4e(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}const O4e=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return Y3},__asyncDelegator:w4e,__asyncGenerator:b4e,__asyncValues:x4e,__await:wp,__awaiter:p4e,__classPrivateFieldGet:C4e,__classPrivateFieldSet:P4e,__createBinding:v4e,__decorate:u4e,__exportStar:g4e,__extends:l4e,__generator:h4e,__importDefault:S4e,__importStar:E4e,__makeTemplateObject:_4e,__metadata:d4e,__param:f4e,__read:qH,__rest:c4e,__spread:m4e,__spreadArrays:y4e,__values:X3},Symbol.toStringTag,{value:"Module"})),Rn=jl(O4e);var Tr={},mw,sk;function A4e(){if(sk)return mw;sk=1;function e(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}mw=t;function t(r,n,o){var i=o&&o.stringify||e,a=1;if(typeof r=="object"&&r!==null){var s=n.length+a;if(s===1)return r;var l=new Array(s);l[0]=i(r);for(var c=1;c-1?p:0,r.charCodeAt(m+1)){case 100:case 102:if(d>=u||n[d]==null)break;p=u||n[d]==null)break;p=u||n[d]===void 0)break;p",p=m+2,m++;break}f+=i(n[d]),p=m+2,m++;break;case 115:if(d>=u)break;p-1&&(V=!1);const P=["error","fatal","warn","info","debug","trace"];typeof D=="function"&&(D.error=D.fatal=D.warn=D.info=D.debug=D.trace=D),O.enabled===!1&&(O.level="silent");const S=O.level||"info",v=Object.create(D);v.log||(v.log=_),Object.defineProperty(v,"levelVal",{get:B}),Object.defineProperty(v,"level",{get:M,set:j});const b={transmit:g,serialize:G,asObject:O.browser.asObject,levels:P,timestamp:p(O)};v.levels=o.levels,v.level=S,v.setMaxListeners=v.getMaxListeners=v.emit=v.addListener=v.on=v.prependListener=v.once=v.prependOnceListener=v.removeListener=v.removeAllListeners=v.listeners=v.listenerCount=v.eventNames=v.write=v.flush=_,v.serializers=H,v._serialize=G,v._stdErrSerialize=V,v.child=U,g&&(v._logEvent=f());function B(){return this.level==="silent"?1/0:this.levels.values[this.level]}function M(){return this._level}function j(E){if(E!=="silent"&&!this.levels.values[E])throw Error("unknown level "+E);this._level=E,i(b,v,"error","log"),i(b,v,"fatal","error"),i(b,v,"warn","error"),i(b,v,"info","log"),i(b,v,"debug","log"),i(b,v,"trace","log")}function U(E,N){if(!E)throw new Error("missing bindings for child Pino");N=N||{},G&&E.serializers&&(N.serializers=E.serializers);const T=N.serializers;if(G&&T){var q=Object.assign({},H,T),J=O.browser.serialize===!0?Object.keys(q):G;delete E.serializers,l([E],J,q,this._stdErrSerialize)}function te(ne){this._childLevel=(ne._childLevel|0)+1,this.error=c(ne,E,"error"),this.fatal=c(ne,E,"fatal"),this.warn=c(ne,E,"warn"),this.info=c(ne,E,"info"),this.debug=c(ne,E,"debug"),this.trace=c(ne,E,"trace"),q&&(this.serializers=q,this._serialize=J),g&&(this._logEvent=f([].concat(ne._logEvent.bindings,E)))}return te.prototype=this,new te(this)}return v}o.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},o.stdSerializers=r,o.stdTimeFunctions=Object.assign({},{nullTime:w,epochTime:y,unixTime:C,isoTime:I});function i(O,g,D,H){const G=Object.getPrototypeOf(g);g[D]=g.levelVal>g.levels.values[D]?_:G[D]?G[D]:t[D]||t[H]||_,a(O,g,D)}function a(O,g,D){!O.transmit&&g[D]===_||(g[D]=function(H){return function(){const V=O.timestamp(),P=new Array(arguments.length),S=Object.getPrototypeOf&&Object.getPrototypeOf(this)===t?t:this;for(var v=0;v-1&&V in D&&(O[G][V]=D[V](O[G][V]))}function c(O,g,D){return function(){const H=new Array(1+arguments.length);H[0]=g;for(var G=1;G0&&(a=r[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[t];if(l===void 0)return!1;if(typeof l=="function")ck(l,this,r);else for(var c=l.length,u=eV(l,c),n=0;n0&&a.length>o&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,I4e(s)}return e}Rt.prototype.addListener=function(t,r){return XH(this,t,r,!1)};Rt.prototype.on=Rt.prototype.addListener;Rt.prototype.prependListener=function(t,r){return XH(this,t,r,!0)};function $4e(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function ZH(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=$4e.bind(n);return o.listener=r,n.wrapFn=o,o}Rt.prototype.once=function(t,r){return Ky(r),this.on(t,ZH(this,t,r)),this};Rt.prototype.prependOnceListener=function(t,r){return Ky(r),this.prependListener(t,ZH(this,t,r)),this};Rt.prototype.removeListener=function(t,r){var n,o,i,a,s;if(Ky(r),o=this._events,o===void 0)return this;if(n=o[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete o[t],o.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===r||n[a].listener===r){s=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():T4e(n,i),n.length===1&&(o[t]=n[0]),o.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};Rt.prototype.off=Rt.prototype.removeListener;Rt.prototype.removeAllListeners=function(t){var r,n,o;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i=Object.keys(n),a;for(o=0;o=0;o--)this.removeListener(t,r[o]);return this};function JH(e,t,r){var n=e._events;if(n===void 0)return[];var o=n[t];return o===void 0?[]:typeof o=="function"?r?[o.listener||o]:[o]:r?D4e(o):eV(o,o.length)}Rt.prototype.listeners=function(t){return JH(this,t,!0)};Rt.prototype.rawListeners=function(t){return JH(this,t,!1)};Rt.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):QH.call(e,t)};Rt.prototype.listenerCount=QH;function QH(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Rt.prototype.eventNames=function(){return this._eventsCount>0?y1(this._events):[]};function eV(e,t){for(var r=new Array(t),n=0;ntypeof r>"u"?null:r)}lh.safeJsonStringify=F4e;var Uf={exports:{}},fk;function B4e(){return fk||(fk=1,function(){let e;function t(){}e=t,e.prototype.getItem=function(r){return this.hasOwnProperty(r)?String(this[r]):null},e.prototype.setItem=function(r,n){this[r]=String(n)},e.prototype.removeItem=function(r){delete this[r]},e.prototype.clear=function(){const r=this;Object.keys(r).forEach(function(n){r[n]=void 0,delete r[n]})},e.prototype.key=function(r){return r=r||0,Object.keys(this)[r]},e.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof Le<"u"&&Le.localStorage?Uf.exports=Le.localStorage:typeof window<"u"&&window.localStorage?Uf.exports=window.localStorage:Uf.exports=new t}()),Uf.exports}var bw={},Hf={},dk;function j4e(){if(dk)return Hf;dk=1,Object.defineProperty(Hf,"__esModule",{value:!0}),Hf.IKeyValueStorage=void 0;class e{}return Hf.IKeyValueStorage=e,Hf}var Vf={},pk;function L4e(){if(pk)return Vf;pk=1,Object.defineProperty(Vf,"__esModule",{value:!0}),Vf.parseEntry=void 0;const e=lh;function t(r){var n;return[r[0],e.safeJsonParse((n=r[1])!==null&&n!==void 0?n:"")]}return Vf.parseEntry=t,Vf}var hk;function z4e(){return hk||(hk=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Rn;t.__exportStar(j4e(),e),t.__exportStar(L4e(),e)}(bw)),bw}Object.defineProperty(Yy,"__esModule",{value:!0});Yy.KeyValueStorage=void 0;const mc=Rn,vk=lh,U4e=mc.__importDefault(B4e()),H4e=z4e();class nV{constructor(){this.localStorage=U4e.default}getKeys(){return mc.__awaiter(this,void 0,void 0,function*(){return Object.keys(this.localStorage)})}getEntries(){return mc.__awaiter(this,void 0,void 0,function*(){return Object.entries(this.localStorage).map(H4e.parseEntry)})}getItem(t){return mc.__awaiter(this,void 0,void 0,function*(){const r=this.localStorage.getItem(t);if(r!==null)return vk.safeJsonParse(r)})}setItem(t,r){return mc.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(t,vk.safeJsonStringify(r))})}removeItem(t){return mc.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(t)})}}Yy.KeyValueStorage=nV;var V4e=Yy.default=nV,ch={},Wf={},pt={},ww={},qf={},gk;function W4e(){if(gk)return qf;gk=1,Object.defineProperty(qf,"__esModule",{value:!0}),qf.delay=void 0;function e(t){return new Promise(r=>{setTimeout(()=>{r(!0)},t)})}return qf.delay=e,qf}var ul={},xw={},fl={},mk;function q4e(){return mk||(mk=1,Object.defineProperty(fl,"__esModule",{value:!0}),fl.ONE_THOUSAND=fl.ONE_HUNDRED=void 0,fl.ONE_HUNDRED=100,fl.ONE_THOUSAND=1e3),fl}var _w={},yk;function G4e(){return yk||(yk=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_YEAR=e.FOUR_WEEKS=e.THREE_WEEKS=e.TWO_WEEKS=e.ONE_WEEK=e.THIRTY_DAYS=e.SEVEN_DAYS=e.FIVE_DAYS=e.THREE_DAYS=e.ONE_DAY=e.TWENTY_FOUR_HOURS=e.TWELVE_HOURS=e.SIX_HOURS=e.THREE_HOURS=e.ONE_HOUR=e.SIXTY_MINUTES=e.THIRTY_MINUTES=e.TEN_MINUTES=e.FIVE_MINUTES=e.ONE_MINUTE=e.SIXTY_SECONDS=e.THIRTY_SECONDS=e.TEN_SECONDS=e.FIVE_SECONDS=e.ONE_SECOND=void 0,e.ONE_SECOND=1,e.FIVE_SECONDS=5,e.TEN_SECONDS=10,e.THIRTY_SECONDS=30,e.SIXTY_SECONDS=60,e.ONE_MINUTE=e.SIXTY_SECONDS,e.FIVE_MINUTES=e.ONE_MINUTE*5,e.TEN_MINUTES=e.ONE_MINUTE*10,e.THIRTY_MINUTES=e.ONE_MINUTE*30,e.SIXTY_MINUTES=e.ONE_MINUTE*60,e.ONE_HOUR=e.SIXTY_MINUTES,e.THREE_HOURS=e.ONE_HOUR*3,e.SIX_HOURS=e.ONE_HOUR*6,e.TWELVE_HOURS=e.ONE_HOUR*12,e.TWENTY_FOUR_HOURS=e.ONE_HOUR*24,e.ONE_DAY=e.TWENTY_FOUR_HOURS,e.THREE_DAYS=e.ONE_DAY*3,e.FIVE_DAYS=e.ONE_DAY*5,e.SEVEN_DAYS=e.ONE_DAY*7,e.THIRTY_DAYS=e.ONE_DAY*30,e.ONE_WEEK=e.SEVEN_DAYS,e.TWO_WEEKS=e.ONE_WEEK*2,e.THREE_WEEKS=e.ONE_WEEK*3,e.FOUR_WEEKS=e.ONE_WEEK*4,e.ONE_YEAR=e.ONE_DAY*365}(_w)),_w}var bk;function oV(){return bk||(bk=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Rn;t.__exportStar(q4e(),e),t.__exportStar(G4e(),e)}(xw)),xw}var wk;function K4e(){if(wk)return ul;wk=1,Object.defineProperty(ul,"__esModule",{value:!0}),ul.fromMiliseconds=ul.toMiliseconds=void 0;const e=oV();function t(n){return n*e.ONE_THOUSAND}ul.toMiliseconds=t;function r(n){return Math.floor(n/e.ONE_THOUSAND)}return ul.fromMiliseconds=r,ul}var xk;function Y4e(){return xk||(xk=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Rn;t.__exportStar(W4e(),e),t.__exportStar(K4e(),e)}(ww)),ww}var fc={},_k;function X4e(){if(_k)return fc;_k=1,Object.defineProperty(fc,"__esModule",{value:!0}),fc.Watch=void 0;class e{constructor(){this.timestamps=new Map}start(r){if(this.timestamps.has(r))throw new Error(`Watch already started for label: ${r}`);this.timestamps.set(r,{started:Date.now()})}stop(r){const n=this.get(r);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${r}`);const o=Date.now()-n.started;this.timestamps.set(r,{started:n.started,elapsed:o})}get(r){const n=this.timestamps.get(r);if(typeof n>"u")throw new Error(`No timestamp found for label: ${r}`);return n}elapsed(r){const n=this.get(r);return n.elapsed||Date.now()-n.started}}return fc.Watch=e,fc.default=e,fc}var Ew={},Gf={},Ek;function Z4e(){if(Ek)return Gf;Ek=1,Object.defineProperty(Gf,"__esModule",{value:!0}),Gf.IWatch=void 0;class e{}return Gf.IWatch=e,Gf}var Sk;function J4e(){return Sk||(Sk=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Rn.__exportStar(Z4e(),e)}(Ew)),Ew}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Rn;t.__exportStar(Y4e(),e),t.__exportStar(X4e(),e),t.__exportStar(J4e(),e),t.__exportStar(oV(),e)})(pt);var Sw={},Kf={};let Jl=class{};const Q4e=Object.freeze(Object.defineProperty({__proto__:null,IEvents:Jl},Symbol.toStringTag,{value:"Module"})),e8e=jl(Q4e);var Ck;function t8e(){if(Ck)return Kf;Ck=1,Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.IHeartBeat=void 0;const e=e8e;class t extends e.IEvents{constructor(n){super()}}return Kf.IHeartBeat=t,Kf}var Pk;function iV(){return Pk||(Pk=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Rn.__exportStar(t8e(),e)}(Sw)),Sw}var Cw={},dl={},Ok;function r8e(){if(Ok)return dl;Ok=1,Object.defineProperty(dl,"__esModule",{value:!0}),dl.HEARTBEAT_EVENTS=dl.HEARTBEAT_INTERVAL=void 0;const e=pt;return dl.HEARTBEAT_INTERVAL=e.FIVE_SECONDS,dl.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},dl}var Ak;function aV(){return Ak||(Ak=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Rn.__exportStar(r8e(),e)}(Cw)),Cw}var kk;function n8e(){if(kk)return Wf;kk=1,Object.defineProperty(Wf,"__esModule",{value:!0}),Wf.HeartBeat=void 0;const e=Rn,t=ni,r=pt,n=iV(),o=aV();class i extends n.IHeartBeat{constructor(s){super(s),this.events=new t.EventEmitter,this.interval=o.HEARTBEAT_INTERVAL,this.interval=(s==null?void 0:s.interval)||o.HEARTBEAT_INTERVAL}static init(s){return e.__awaiter(this,void 0,void 0,function*(){const l=new i(s);return yield l.init(),l})}init(){return e.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(s,l){this.events.on(s,l)}once(s,l){this.events.once(s,l)}off(s,l){this.events.off(s,l)}removeListener(s,l){this.events.removeListener(s,l)}initialize(){return e.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),r.toMiliseconds(this.interval))})}pulse(){this.events.emit(o.HEARTBEAT_EVENTS.pulse)}}return Wf.HeartBeat=i,Wf}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Rn;t.__exportStar(n8e(),e),t.__exportStar(iV(),e),t.__exportStar(aV(),e)})(ch);var Mt={},pl={},Ik;function sV(){return Ik||(Ik=1,Object.defineProperty(pl,"__esModule",{value:!0}),pl.PINO_CUSTOM_CONTEXT_KEY=pl.PINO_LOGGER_DEFAULTS=void 0,pl.PINO_LOGGER_DEFAULTS={level:"info"},pl.PINO_CUSTOM_CONTEXT_KEY="custom_context"),pl}var ln={},$k;function o8e(){if($k)return ln;$k=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.generateChildLogger=ln.formatChildLoggerContext=ln.getLoggerContext=ln.setBrowserLoggerContext=ln.getBrowserLoggerContext=ln.getDefaultLoggerOptions=void 0;const e=sV();function t(s){return Object.assign(Object.assign({},s),{level:(s==null?void 0:s.level)||e.PINO_LOGGER_DEFAULTS.level})}ln.getDefaultLoggerOptions=t;function r(s,l=e.PINO_CUSTOM_CONTEXT_KEY){return s[l]||""}ln.getBrowserLoggerContext=r;function n(s,l,c=e.PINO_CUSTOM_CONTEXT_KEY){return s[c]=l,s}ln.setBrowserLoggerContext=n;function o(s,l=e.PINO_CUSTOM_CONTEXT_KEY){let c="";return typeof s.bindings>"u"?c=r(s,l):c=s.bindings().context||"",c}ln.getLoggerContext=o;function i(s,l,c=e.PINO_CUSTOM_CONTEXT_KEY){const u=o(s,c);return u.trim()?`${u}/${l}`:l}ln.formatChildLoggerContext=i;function a(s,l,c=e.PINO_CUSTOM_CONTEXT_KEY){const u=i(s,l,c),f=s.child({context:u});return n(f,u,c)}return ln.generateChildLogger=a,ln}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pino=void 0;const t=Rn,r=t.__importDefault(GH());Object.defineProperty(e,"pino",{enumerable:!0,get:function(){return r.default}}),t.__exportStar(sV(),e),t.__exportStar(o8e(),e)})(Mt);let i8e=class extends Jl{constructor(t){super(),this.opts=t,this.protocol="wc",this.version=2}},a8e=class extends Jl{constructor(t,r){super(),this.core=t,this.logger=r,this.records=new Map}},s8e=class{constructor(t,r){this.logger=t,this.core=r}},l8e=class extends Jl{constructor(t,r){super(),this.relayer=t,this.logger=r}},c8e=class extends Jl{constructor(t){super()}},u8e=class{constructor(t,r,n,o){this.core=t,this.logger=r,this.name=n}},f8e=class extends Jl{constructor(t,r){super(),this.relayer=t,this.logger=r}},d8e=class extends Jl{constructor(t,r){super(),this.core=t,this.logger=r}},p8e=class{constructor(t){this.opts=t,this.protocol="wc",this.version=2}},h8e=class{constructor(t){this.client=t}};const v8e=e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString()+"n":r),g8e=e=>{const t=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,r=e.replace(t,'$1"$2n"$3');return JSON.parse(r,(n,o)=>typeof o=="string"&&o.match(/^\d+n$/)?BigInt(o.substring(0,o.length-1)):o)};function lV(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return g8e(e)}catch{return e}}function O4(e){return typeof e=="string"?e:v8e(e)||""}var A4={},Ju={},Xy={},Zy={};Object.defineProperty(Zy,"__esModule",{value:!0});Zy.BrowserRandomSource=void 0;const Tk=65536;class m8e{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const t=typeof self<"u"?self.crypto||self.msCrypto:null;t&&t.getRandomValues!==void 0&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const r=new Uint8Array(t);for(let n=0;n>>16&65535,u=s&65535,f=l>>>16&65535,d=l&65535;return u*d+(c*d+u*f<<16>>>0)|0}e.mul=Math.imul||t;function r(s,l){return s+l|0}e.add=r;function n(s,l){return s-l|0}e.sub=n;function o(s,l){return s<>>32-l}e.rotl=o;function i(s,l){return s<<32-l|s>>>l}e.rotr=i;function a(s){return typeof s=="number"&&isFinite(s)&&Math.floor(s)===s}e.isInteger=Number.isInteger||a,e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(s){return e.isInteger(s)&&s>=-e.MAX_SAFE_INTEGER&&s<=e.MAX_SAFE_INTEGER}})(cV);Object.defineProperty(bt,"__esModule",{value:!0});var uV=cV;function C8e(e,t){return t===void 0&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16}bt.readInt16BE=C8e;function P8e(e,t){return t===void 0&&(t=0),(e[t+0]<<8|e[t+1])>>>0}bt.readUint16BE=P8e;function O8e(e,t){return t===void 0&&(t=0),(e[t+1]<<8|e[t])<<16>>16}bt.readInt16LE=O8e;function A8e(e,t){return t===void 0&&(t=0),(e[t+1]<<8|e[t])>>>0}bt.readUint16LE=A8e;function fV(e,t,r){return t===void 0&&(t=new Uint8Array(2)),r===void 0&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}bt.writeUint16BE=fV;bt.writeInt16BE=fV;function dV(e,t,r){return t===void 0&&(t=new Uint8Array(2)),r===void 0&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}bt.writeUint16LE=dV;bt.writeInt16LE=dV;function Z3(e,t){return t===void 0&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}bt.readInt32BE=Z3;function J3(e,t){return t===void 0&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}bt.readUint32BE=J3;function Q3(e,t){return t===void 0&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}bt.readInt32LE=Q3;function ex(e,t){return t===void 0&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}bt.readUint32LE=ex;function sm(e,t,r){return t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}bt.writeUint32BE=sm;bt.writeInt32BE=sm;function lm(e,t,r){return t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}bt.writeUint32LE=lm;bt.writeInt32LE=lm;function k8e(e,t){t===void 0&&(t=0);var r=Z3(e,t),n=Z3(e,t+4);return r*4294967296+n-(n>>31)*4294967296}bt.readInt64BE=k8e;function I8e(e,t){t===void 0&&(t=0);var r=J3(e,t),n=J3(e,t+4);return r*4294967296+n}bt.readUint64BE=I8e;function $8e(e,t){t===void 0&&(t=0);var r=Q3(e,t),n=Q3(e,t+4);return n*4294967296+r-(r>>31)*4294967296}bt.readInt64LE=$8e;function T8e(e,t){t===void 0&&(t=0);var r=ex(e,t),n=ex(e,t+4);return n*4294967296+r}bt.readUint64LE=T8e;function pV(e,t,r){return t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0),sm(e/4294967296>>>0,t,r),sm(e>>>0,t,r+4),t}bt.writeUint64BE=pV;bt.writeInt64BE=pV;function hV(e,t,r){return t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0),lm(e>>>0,t,r),lm(e/4294967296>>>0,t,r+4),t}bt.writeUint64LE=hV;bt.writeInt64LE=hV;function D8e(e,t,r){if(r===void 0&&(r=0),e%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,o=1,i=e/8+r-1;i>=r;i--)n+=t[i]*o,o*=256;return n}bt.readUintBE=D8e;function M8e(e,t,r){if(r===void 0&&(r=0),e%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,o=1,i=r;i=n;i--)r[i]=t/o&255,o*=256;return r}bt.writeUintBE=R8e;function N8e(e,t,r,n){if(r===void 0&&(r=new Uint8Array(e/8)),n===void 0&&(n=0),e%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!uV.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var o=1,i=n;i256)throw new Error("randomString charset is too long");let d="";const p=u.length,h=256-256%p;for(;c>0;){const m=o(Math.ceil(c*256/h),f);for(let _=0;_0;_++){const w=m[_];w0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=l[u++],c--;this._bufferLength===this.blockSize&&(i(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(c>=this.blockSize&&(u=i(this._tempHi,this._tempLo,this._stateHi,this._stateLo,l,u,c),c%=this.blockSize);c>0;)this._buffer[this._bufferLength++]=l[u++],c--;return this},s.prototype.finish=function(l){if(!this._finished){var c=this._bytesHashed,u=this._bufferLength,f=c/536870912|0,d=c<<3,p=c%128<112?128:256;this._buffer[u]=128;for(var h=u+1;h0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},s.prototype.restoreState=function(l){return this._stateHi.set(l.stateHi),this._stateLo.set(l.stateLo),this._bufferLength=l.bufferLength,l.buffer&&this._buffer.set(l.buffer),this._bytesHashed=l.bytesHashed,this._finished=!1,this},s.prototype.cleanSavedState=function(l){r.wipe(l.stateHi),r.wipe(l.stateLo),l.buffer&&r.wipe(l.buffer),l.bufferLength=0,l.bytesHashed=0},s}();e.SHA512=n;var o=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function i(s,l,c,u,f,d,p){for(var h=c[0],m=c[1],_=c[2],w=c[3],y=c[4],C=c[5],I=c[6],F=c[7],O=u[0],g=u[1],D=u[2],H=u[3],G=u[4],V=u[5],P=u[6],S=u[7],v,b,B,M,j,U,E,N;p>=128;){for(var T=0;T<16;T++){var q=8*T+d;s[T]=t.readUint32BE(f,q),l[T]=t.readUint32BE(f,q+4)}for(var T=0;T<80;T++){var J=h,te=m,ne=_,ce=w,ie=y,ue=C,A=I,K=F,ee=O,se=g,pe=D,ge=H,X=G,R=V,z=P,Z=S;if(v=F,b=S,j=b&65535,U=b>>>16,E=v&65535,N=v>>>16,v=(y>>>14|G<<32-14)^(y>>>18|G<<32-18)^(G>>>41-32|y<<32-(41-32)),b=(G>>>14|y<<32-14)^(G>>>18|y<<32-18)^(y>>>41-32|G<<32-(41-32)),j+=b&65535,U+=b>>>16,E+=v&65535,N+=v>>>16,v=y&C^~y&I,b=G&V^~G&P,j+=b&65535,U+=b>>>16,E+=v&65535,N+=v>>>16,v=o[T*2],b=o[T*2+1],j+=b&65535,U+=b>>>16,E+=v&65535,N+=v>>>16,v=s[T%16],b=l[T%16],j+=b&65535,U+=b>>>16,E+=v&65535,N+=v>>>16,U+=j>>>16,E+=U>>>16,N+=E>>>16,B=E&65535|N<<16,M=j&65535|U<<16,v=B,b=M,j=b&65535,U=b>>>16,E=v&65535,N=v>>>16,v=(h>>>28|O<<32-28)^(O>>>34-32|h<<32-(34-32))^(O>>>39-32|h<<32-(39-32)),b=(O>>>28|h<<32-28)^(h>>>34-32|O<<32-(34-32))^(h>>>39-32|O<<32-(39-32)),j+=b&65535,U+=b>>>16,E+=v&65535,N+=v>>>16,v=h&m^h&_^m&_,b=O&g^O&D^g&D,j+=b&65535,U+=b>>>16,E+=v&65535,N+=v>>>16,U+=j>>>16,E+=U>>>16,N+=E>>>16,K=E&65535|N<<16,Z=j&65535|U<<16,v=ce,b=ge,j=b&65535,U=b>>>16,E=v&65535,N=v>>>16,v=B,b=M,j+=b&65535,U+=b>>>16,E+=v&65535,N+=v>>>16,U+=j>>>16,E+=U>>>16,N+=E>>>16,ce=E&65535|N<<16,ge=j&65535|U<<16,m=J,_=te,w=ne,y=ce,C=ie,I=ue,F=A,h=K,g=ee,D=se,H=pe,G=ge,V=X,P=R,S=z,O=Z,T%16===15)for(var q=0;q<16;q++)v=s[q],b=l[q],j=b&65535,U=b>>>16,E=v&65535,N=v>>>16,v=s[(q+9)%16],b=l[(q+9)%16],j+=b&65535,U+=b>>>16,E+=v&65535,N+=v>>>16,B=s[(q+1)%16],M=l[(q+1)%16],v=(B>>>1|M<<32-1)^(B>>>8|M<<32-8)^B>>>7,b=(M>>>1|B<<32-1)^(M>>>8|B<<32-8)^(M>>>7|B<<32-7),j+=b&65535,U+=b>>>16,E+=v&65535,N+=v>>>16,B=s[(q+14)%16],M=l[(q+14)%16],v=(B>>>19|M<<32-19)^(M>>>61-32|B<<32-(61-32))^B>>>6,b=(M>>>19|B<<32-19)^(B>>>61-32|M<<32-(61-32))^(M>>>6|B<<32-6),j+=b&65535,U+=b>>>16,E+=v&65535,N+=v>>>16,U+=j>>>16,E+=U>>>16,N+=E>>>16,s[q]=E&65535|N<<16,l[q]=j&65535|U<<16}v=h,b=O,j=b&65535,U=b>>>16,E=v&65535,N=v>>>16,v=c[0],b=u[0],j+=b&65535,U+=b>>>16,E+=v&65535,N+=v>>>16,U+=j>>>16,E+=U>>>16,N+=E>>>16,c[0]=h=E&65535|N<<16,u[0]=O=j&65535|U<<16,v=m,b=g,j=b&65535,U=b>>>16,E=v&65535,N=v>>>16,v=c[1],b=u[1],j+=b&65535,U+=b>>>16,E+=v&65535,N+=v>>>16,U+=j>>>16,E+=U>>>16,N+=E>>>16,c[1]=m=E&65535|N<<16,u[1]=g=j&65535|U<<16,v=_,b=D,j=b&65535,U=b>>>16,E=v&65535,N=v>>>16,v=c[2],b=u[2],j+=b&65535,U+=b>>>16,E+=v&65535,N+=v>>>16,U+=j>>>16,E+=U>>>16,N+=E>>>16,c[2]=_=E&65535|N<<16,u[2]=D=j&65535|U<<16,v=w,b=H,j=b&65535,U=b>>>16,E=v&65535,N=v>>>16,v=c[3],b=u[3],j+=b&65535,U+=b>>>16,E+=v&65535,N+=v>>>16,U+=j>>>16,E+=U>>>16,N+=E>>>16,c[3]=w=E&65535|N<<16,u[3]=H=j&65535|U<<16,v=y,b=G,j=b&65535,U=b>>>16,E=v&65535,N=v>>>16,v=c[4],b=u[4],j+=b&65535,U+=b>>>16,E+=v&65535,N+=v>>>16,U+=j>>>16,E+=U>>>16,N+=E>>>16,c[4]=y=E&65535|N<<16,u[4]=G=j&65535|U<<16,v=C,b=V,j=b&65535,U=b>>>16,E=v&65535,N=v>>>16,v=c[5],b=u[5],j+=b&65535,U+=b>>>16,E+=v&65535,N+=v>>>16,U+=j>>>16,E+=U>>>16,N+=E>>>16,c[5]=C=E&65535|N<<16,u[5]=V=j&65535|U<<16,v=I,b=P,j=b&65535,U=b>>>16,E=v&65535,N=v>>>16,v=c[6],b=u[6],j+=b&65535,U+=b>>>16,E+=v&65535,N+=v>>>16,U+=j>>>16,E+=U>>>16,N+=E>>>16,c[6]=I=E&65535|N<<16,u[6]=P=j&65535|U<<16,v=F,b=S,j=b&65535,U=b>>>16,E=v&65535,N=v>>>16,v=c[7],b=u[7],j+=b&65535,U+=b>>>16,E+=v&65535,N+=v>>>16,U+=j>>>16,E+=U>>>16,N+=E>>>16,c[7]=F=E&65535|N<<16,u[7]=S=j&65535|U<<16,d+=128,p-=128}return d}function a(s){var l=new n;l.update(s);var c=l.digest();return l.clean(),c}e.hash=a})(vV);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.convertSecretKeyToX25519=e.convertPublicKeyToX25519=e.verify=e.sign=e.extractPublicKeyFromSecretKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.SEED_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=e.SIGNATURE_LENGTH=void 0;const t=Ju,r=vV,n=eo;e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32;function o(ce){const ie=new Float64Array(16);if(ce)for(let ue=0;ue>16&1),ue[se-1]&=65535;ue[15]=A[15]-32767-(ue[14]>>16&1);const ee=ue[15]>>16&1;ue[14]&=65535,m(A,ue,1-ee)}for(let K=0;K<16;K++)ce[2*K]=A[K]&255,ce[2*K+1]=A[K]>>8}function w(ce,ie){let ue=0;for(let A=0;A<32;A++)ue|=ce[A]^ie[A];return(1&ue-1>>>8)-1}function y(ce,ie){const ue=new Uint8Array(32),A=new Uint8Array(32);return _(ue,ce),_(A,ie),w(ue,A)}function C(ce){const ie=new Uint8Array(32);return _(ie,ce),ie[0]&1}function I(ce,ie){for(let ue=0;ue<16;ue++)ce[ue]=ie[2*ue]+(ie[2*ue+1]<<8);ce[15]&=32767}function F(ce,ie,ue){for(let A=0;A<16;A++)ce[A]=ie[A]+ue[A]}function O(ce,ie,ue){for(let A=0;A<16;A++)ce[A]=ie[A]-ue[A]}function g(ce,ie,ue){let A,K,ee=0,se=0,pe=0,ge=0,X=0,R=0,z=0,Z=0,Q=0,de=0,we=0,Se=0,Ee=0,Ae=0,Te=0,W=0,x=0,k=0,Y=0,re=0,fe=0,le=0,xe=0,_e=0,ke=0,$e=0,Ne=0,We=0,gt=0,ft=0,Ye=0,Je=ue[0],tt=ue[1],ve=ue[2],oe=ue[3],he=ue[4],be=ue[5],Ce=ue[6],Oe=ue[7],Ie=ue[8],De=ue[9],je=ue[10],Me=ue[11],He=ue[12],qe=ue[13],ze=ue[14],it=ue[15];A=ie[0],ee+=A*Je,se+=A*tt,pe+=A*ve,ge+=A*oe,X+=A*he,R+=A*be,z+=A*Ce,Z+=A*Oe,Q+=A*Ie,de+=A*De,we+=A*je,Se+=A*Me,Ee+=A*He,Ae+=A*qe,Te+=A*ze,W+=A*it,A=ie[1],se+=A*Je,pe+=A*tt,ge+=A*ve,X+=A*oe,R+=A*he,z+=A*be,Z+=A*Ce,Q+=A*Oe,de+=A*Ie,we+=A*De,Se+=A*je,Ee+=A*Me,Ae+=A*He,Te+=A*qe,W+=A*ze,x+=A*it,A=ie[2],pe+=A*Je,ge+=A*tt,X+=A*ve,R+=A*oe,z+=A*he,Z+=A*be,Q+=A*Ce,de+=A*Oe,we+=A*Ie,Se+=A*De,Ee+=A*je,Ae+=A*Me,Te+=A*He,W+=A*qe,x+=A*ze,k+=A*it,A=ie[3],ge+=A*Je,X+=A*tt,R+=A*ve,z+=A*oe,Z+=A*he,Q+=A*be,de+=A*Ce,we+=A*Oe,Se+=A*Ie,Ee+=A*De,Ae+=A*je,Te+=A*Me,W+=A*He,x+=A*qe,k+=A*ze,Y+=A*it,A=ie[4],X+=A*Je,R+=A*tt,z+=A*ve,Z+=A*oe,Q+=A*he,de+=A*be,we+=A*Ce,Se+=A*Oe,Ee+=A*Ie,Ae+=A*De,Te+=A*je,W+=A*Me,x+=A*He,k+=A*qe,Y+=A*ze,re+=A*it,A=ie[5],R+=A*Je,z+=A*tt,Z+=A*ve,Q+=A*oe,de+=A*he,we+=A*be,Se+=A*Ce,Ee+=A*Oe,Ae+=A*Ie,Te+=A*De,W+=A*je,x+=A*Me,k+=A*He,Y+=A*qe,re+=A*ze,fe+=A*it,A=ie[6],z+=A*Je,Z+=A*tt,Q+=A*ve,de+=A*oe,we+=A*he,Se+=A*be,Ee+=A*Ce,Ae+=A*Oe,Te+=A*Ie,W+=A*De,x+=A*je,k+=A*Me,Y+=A*He,re+=A*qe,fe+=A*ze,le+=A*it,A=ie[7],Z+=A*Je,Q+=A*tt,de+=A*ve,we+=A*oe,Se+=A*he,Ee+=A*be,Ae+=A*Ce,Te+=A*Oe,W+=A*Ie,x+=A*De,k+=A*je,Y+=A*Me,re+=A*He,fe+=A*qe,le+=A*ze,xe+=A*it,A=ie[8],Q+=A*Je,de+=A*tt,we+=A*ve,Se+=A*oe,Ee+=A*he,Ae+=A*be,Te+=A*Ce,W+=A*Oe,x+=A*Ie,k+=A*De,Y+=A*je,re+=A*Me,fe+=A*He,le+=A*qe,xe+=A*ze,_e+=A*it,A=ie[9],de+=A*Je,we+=A*tt,Se+=A*ve,Ee+=A*oe,Ae+=A*he,Te+=A*be,W+=A*Ce,x+=A*Oe,k+=A*Ie,Y+=A*De,re+=A*je,fe+=A*Me,le+=A*He,xe+=A*qe,_e+=A*ze,ke+=A*it,A=ie[10],we+=A*Je,Se+=A*tt,Ee+=A*ve,Ae+=A*oe,Te+=A*he,W+=A*be,x+=A*Ce,k+=A*Oe,Y+=A*Ie,re+=A*De,fe+=A*je,le+=A*Me,xe+=A*He,_e+=A*qe,ke+=A*ze,$e+=A*it,A=ie[11],Se+=A*Je,Ee+=A*tt,Ae+=A*ve,Te+=A*oe,W+=A*he,x+=A*be,k+=A*Ce,Y+=A*Oe,re+=A*Ie,fe+=A*De,le+=A*je,xe+=A*Me,_e+=A*He,ke+=A*qe,$e+=A*ze,Ne+=A*it,A=ie[12],Ee+=A*Je,Ae+=A*tt,Te+=A*ve,W+=A*oe,x+=A*he,k+=A*be,Y+=A*Ce,re+=A*Oe,fe+=A*Ie,le+=A*De,xe+=A*je,_e+=A*Me,ke+=A*He,$e+=A*qe,Ne+=A*ze,We+=A*it,A=ie[13],Ae+=A*Je,Te+=A*tt,W+=A*ve,x+=A*oe,k+=A*he,Y+=A*be,re+=A*Ce,fe+=A*Oe,le+=A*Ie,xe+=A*De,_e+=A*je,ke+=A*Me,$e+=A*He,Ne+=A*qe,We+=A*ze,gt+=A*it,A=ie[14],Te+=A*Je,W+=A*tt,x+=A*ve,k+=A*oe,Y+=A*he,re+=A*be,fe+=A*Ce,le+=A*Oe,xe+=A*Ie,_e+=A*De,ke+=A*je,$e+=A*Me,Ne+=A*He,We+=A*qe,gt+=A*ze,ft+=A*it,A=ie[15],W+=A*Je,x+=A*tt,k+=A*ve,Y+=A*oe,re+=A*he,fe+=A*be,le+=A*Ce,xe+=A*Oe,_e+=A*Ie,ke+=A*De,$e+=A*je,Ne+=A*Me,We+=A*He,gt+=A*qe,ft+=A*ze,Ye+=A*it,ee+=38*x,se+=38*k,pe+=38*Y,ge+=38*re,X+=38*fe,R+=38*le,z+=38*xe,Z+=38*_e,Q+=38*ke,de+=38*$e,we+=38*Ne,Se+=38*We,Ee+=38*gt,Ae+=38*ft,Te+=38*Ye,K=1,A=ee+K+65535,K=Math.floor(A/65536),ee=A-K*65536,A=se+K+65535,K=Math.floor(A/65536),se=A-K*65536,A=pe+K+65535,K=Math.floor(A/65536),pe=A-K*65536,A=ge+K+65535,K=Math.floor(A/65536),ge=A-K*65536,A=X+K+65535,K=Math.floor(A/65536),X=A-K*65536,A=R+K+65535,K=Math.floor(A/65536),R=A-K*65536,A=z+K+65535,K=Math.floor(A/65536),z=A-K*65536,A=Z+K+65535,K=Math.floor(A/65536),Z=A-K*65536,A=Q+K+65535,K=Math.floor(A/65536),Q=A-K*65536,A=de+K+65535,K=Math.floor(A/65536),de=A-K*65536,A=we+K+65535,K=Math.floor(A/65536),we=A-K*65536,A=Se+K+65535,K=Math.floor(A/65536),Se=A-K*65536,A=Ee+K+65535,K=Math.floor(A/65536),Ee=A-K*65536,A=Ae+K+65535,K=Math.floor(A/65536),Ae=A-K*65536,A=Te+K+65535,K=Math.floor(A/65536),Te=A-K*65536,A=W+K+65535,K=Math.floor(A/65536),W=A-K*65536,ee+=K-1+37*(K-1),K=1,A=ee+K+65535,K=Math.floor(A/65536),ee=A-K*65536,A=se+K+65535,K=Math.floor(A/65536),se=A-K*65536,A=pe+K+65535,K=Math.floor(A/65536),pe=A-K*65536,A=ge+K+65535,K=Math.floor(A/65536),ge=A-K*65536,A=X+K+65535,K=Math.floor(A/65536),X=A-K*65536,A=R+K+65535,K=Math.floor(A/65536),R=A-K*65536,A=z+K+65535,K=Math.floor(A/65536),z=A-K*65536,A=Z+K+65535,K=Math.floor(A/65536),Z=A-K*65536,A=Q+K+65535,K=Math.floor(A/65536),Q=A-K*65536,A=de+K+65535,K=Math.floor(A/65536),de=A-K*65536,A=we+K+65535,K=Math.floor(A/65536),we=A-K*65536,A=Se+K+65535,K=Math.floor(A/65536),Se=A-K*65536,A=Ee+K+65535,K=Math.floor(A/65536),Ee=A-K*65536,A=Ae+K+65535,K=Math.floor(A/65536),Ae=A-K*65536,A=Te+K+65535,K=Math.floor(A/65536),Te=A-K*65536,A=W+K+65535,K=Math.floor(A/65536),W=A-K*65536,ee+=K-1+37*(K-1),ce[0]=ee,ce[1]=se,ce[2]=pe,ce[3]=ge,ce[4]=X,ce[5]=R,ce[6]=z,ce[7]=Z,ce[8]=Q,ce[9]=de,ce[10]=we,ce[11]=Se,ce[12]=Ee,ce[13]=Ae,ce[14]=Te,ce[15]=W}function D(ce,ie){g(ce,ie,ie)}function H(ce,ie){const ue=o();let A;for(A=0;A<16;A++)ue[A]=ie[A];for(A=253;A>=0;A--)D(ue,ue),A!==2&&A!==4&&g(ue,ue,ie);for(A=0;A<16;A++)ce[A]=ue[A]}function G(ce,ie){const ue=o();let A;for(A=0;A<16;A++)ue[A]=ie[A];for(A=250;A>=0;A--)D(ue,ue),A!==1&&g(ue,ue,ie);for(A=0;A<16;A++)ce[A]=ue[A]}function V(ce,ie){const ue=o(),A=o(),K=o(),ee=o(),se=o(),pe=o(),ge=o(),X=o(),R=o();O(ue,ce[1],ce[0]),O(R,ie[1],ie[0]),g(ue,ue,R),F(A,ce[0],ce[1]),F(R,ie[0],ie[1]),g(A,A,R),g(K,ce[3],ie[3]),g(K,K,c),g(ee,ce[2],ie[2]),F(ee,ee,ee),O(se,A,ue),O(pe,ee,K),F(ge,ee,K),F(X,A,ue),g(ce[0],se,pe),g(ce[1],X,ge),g(ce[2],ge,pe),g(ce[3],se,X)}function P(ce,ie,ue){for(let A=0;A<4;A++)m(ce[A],ie[A],ue)}function S(ce,ie){const ue=o(),A=o(),K=o();H(K,ie[2]),g(ue,ie[0],K),g(A,ie[1],K),_(ce,A),ce[31]^=C(ue)<<7}function v(ce,ie,ue){p(ce[0],a),p(ce[1],s),p(ce[2],s),p(ce[3],a);for(let A=255;A>=0;--A){const K=ue[A/8|0]>>(A&7)&1;P(ce,ie,K),V(ie,ce),V(ce,ce),P(ce,ie,K)}}function b(ce,ie){const ue=[o(),o(),o(),o()];p(ue[0],u),p(ue[1],f),p(ue[2],s),g(ue[3],u,f),v(ce,ue,ie)}function B(ce){if(ce.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);const ie=(0,r.hash)(ce);ie[0]&=248,ie[31]&=127,ie[31]|=64;const ue=new Uint8Array(32),A=[o(),o(),o(),o()];b(A,ie),S(ue,A);const K=new Uint8Array(64);return K.set(ce),K.set(ue,32),{publicKey:ue,secretKey:K}}e.generateKeyPairFromSeed=B;function M(ce){const ie=(0,t.randomBytes)(32,ce),ue=B(ie);return(0,n.wipe)(ie),ue}e.generateKeyPair=M;function j(ce){if(ce.length!==e.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${e.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(ce.subarray(32))}e.extractPublicKeyFromSecretKey=j;const U=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function E(ce,ie){let ue,A,K,ee;for(A=63;A>=32;--A){for(ue=0,K=A-32,ee=A-12;K>4)*U[K],ue=ie[K]>>8,ie[K]&=255;for(K=0;K<32;K++)ie[K]-=ue*U[K];for(A=0;A<32;A++)ie[A+1]+=ie[A]>>8,ce[A]=ie[A]&255}function N(ce){const ie=new Float64Array(64);for(let ue=0;ue<64;ue++)ie[ue]=ce[ue];for(let ue=0;ue<64;ue++)ce[ue]=0;E(ce,ie)}function T(ce,ie){const ue=new Float64Array(64),A=[o(),o(),o(),o()],K=(0,r.hash)(ce.subarray(0,32));K[0]&=248,K[31]&=127,K[31]|=64;const ee=new Uint8Array(64);ee.set(K.subarray(32),32);const se=new r.SHA512;se.update(ee.subarray(32)),se.update(ie);const pe=se.digest();se.clean(),N(pe),b(A,pe),S(ee,A),se.reset(),se.update(ee.subarray(0,32)),se.update(ce.subarray(32)),se.update(ie);const ge=se.digest();N(ge);for(let X=0;X<32;X++)ue[X]=pe[X];for(let X=0;X<32;X++)for(let R=0;R<32;R++)ue[X+R]+=ge[X]*K[R];return E(ee.subarray(32),ue),ee}e.sign=T;function q(ce,ie){const ue=o(),A=o(),K=o(),ee=o(),se=o(),pe=o(),ge=o();return p(ce[2],s),I(ce[1],ie),D(K,ce[1]),g(ee,K,l),O(K,K,ce[2]),F(ee,ce[2],ee),D(se,ee),D(pe,se),g(ge,pe,se),g(ue,ge,K),g(ue,ue,ee),G(ue,ue),g(ue,ue,K),g(ue,ue,ee),g(ue,ue,ee),g(ce[0],ue,ee),D(A,ce[0]),g(A,A,ee),y(A,K)&&g(ce[0],ce[0],d),D(A,ce[0]),g(A,A,ee),y(A,K)?-1:(C(ce[0])===ie[31]>>7&&O(ce[0],a,ce[0]),g(ce[3],ce[0],ce[1]),0)}function J(ce,ie,ue){const A=new Uint8Array(32),K=[o(),o(),o(),o()],ee=[o(),o(),o(),o()];if(ue.length!==e.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${e.SIGNATURE_LENGTH} bytes`);if(q(ee,ce))return!1;const se=new r.SHA512;se.update(ue.subarray(0,32)),se.update(ce),se.update(ie);const pe=se.digest();return N(pe),v(K,ee,pe),b(ee,ue.subarray(32)),V(K,ee),S(A,K),!w(ue,A)}e.verify=J;function te(ce){let ie=[o(),o(),o(),o()];if(q(ie,ce))throw new Error("Ed25519: invalid public key");let ue=o(),A=o(),K=ie[1];F(ue,s,K),O(A,s,K),H(A,A),g(ue,ue,A);let ee=new Uint8Array(32);return _(ee,ue),ee}e.convertPublicKeyToX25519=te;function ne(ce){const ie=(0,r.hash)(ce.subarray(0,32));ie[0]&=248,ie[31]&=127,ie[31]|=64;const ue=new Uint8Array(ie.subarray(0,32));return(0,n.wipe)(ie),ue}e.convertSecretKeyToX25519=ne})(A4);const W8e="EdDSA",q8e="JWT",gV=".",mV="base64url",G8e="utf8",K8e="utf8",Y8e=":",X8e="did",Z8e="key",Dk="base58btc",J8e="z",Q8e="K36",eEe=32;function k4(e){return globalThis.Buffer!=null?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function yV(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?k4(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function tx(e,t){t||(t=e.reduce((o,i)=>o+i.length,0));const r=yV(t);let n=0;for(const o of e)r.set(o,n),n+=o.length;return k4(r)}function tEe(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,I=new Uint8Array(C);w!==y;){for(var F=h[w],O=0,g=C-1;(F!==0||O<_)&&g!==-1;g--,O++)F+=256*I[g]>>>0,I[g]=F%s>>>0,F=F/s>>>0;if(F!==0)throw new Error("Non-zero carry");_=O,w++}for(var D=C-_;D!==C&&I[D]===0;)D++;for(var H=l.repeat(m);D>>0,C=new Uint8Array(y);h[m];){var I=r[h.charCodeAt(m)];if(I===255)return;for(var F=0,O=y-1;(I!==0||F>>0,C[O]=I%256>>>0,I=I/256>>>0;if(I!==0)throw new Error("Non-zero carry");w=F,m++}if(h[m]!==" "){for(var g=y-w;g!==y&&C[g]===0;)g++;for(var D=new Uint8Array(_+(y-g)),H=_;g!==y;)D[H++]=C[g++];return D}}}function p(h){var m=d(h);if(m)return m;throw new Error(`Non-${t} character`)}return{encode:f,decodeUnsafe:d,decode:p}}var rEe=tEe,nEe=rEe;const oEe=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},iEe=e=>new TextEncoder().encode(e),aEe=e=>new TextDecoder().decode(e);class sEe{constructor(t,r,n){this.name=t,this.prefix=r,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class lEe{constructor(t,r,n){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return bV(this,t)}}class cEe{constructor(t){this.decoders=t}or(t){return bV(this,t)}decode(t){const r=t[0],n=this.decoders[r];if(n)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const bV=(e,t)=>new cEe({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class uEe{constructor(t,r,n,o){this.name=t,this.prefix=r,this.baseEncode=n,this.baseDecode=o,this.encoder=new sEe(t,r,n),this.decoder=new lEe(t,r,o)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const Qy=({name:e,prefix:t,encode:r,decode:n})=>new uEe(e,t,r,n),uh=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:o}=nEe(r,t);return Qy({prefix:e,name:t,encode:n,decode:i=>oEe(o(i))})},fEe=(e,t,r,n)=>{const o={};for(let u=0;u=8&&(s-=8,a[c++]=255&l>>s)}if(s>=r||255&l<<8-s)throw new SyntaxError("Unexpected end of data");return a},dEe=(e,t,r)=>{const n=t[t.length-1]==="=",o=(1<r;)a-=r,i+=t[o&s>>a];if(a&&(i+=t[o&s<Qy({prefix:t,name:e,encode(o){return dEe(o,n,r)},decode(o){return fEe(o,n,r,e)}}),pEe=Qy({prefix:"\0",name:"identity",encode:e=>aEe(e),decode:e=>iEe(e)}),hEe=Object.freeze(Object.defineProperty({__proto__:null,identity:pEe},Symbol.toStringTag,{value:"Module"})),vEe=Ur({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),gEe=Object.freeze(Object.defineProperty({__proto__:null,base2:vEe},Symbol.toStringTag,{value:"Module"})),mEe=Ur({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),yEe=Object.freeze(Object.defineProperty({__proto__:null,base8:mEe},Symbol.toStringTag,{value:"Module"})),bEe=uh({prefix:"9",name:"base10",alphabet:"0123456789"}),wEe=Object.freeze(Object.defineProperty({__proto__:null,base10:bEe},Symbol.toStringTag,{value:"Module"})),xEe=Ur({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),_Ee=Ur({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),EEe=Object.freeze(Object.defineProperty({__proto__:null,base16:xEe,base16upper:_Ee},Symbol.toStringTag,{value:"Module"})),SEe=Ur({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),CEe=Ur({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),PEe=Ur({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),OEe=Ur({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),AEe=Ur({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),kEe=Ur({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),IEe=Ur({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),$Ee=Ur({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),TEe=Ur({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),DEe=Object.freeze(Object.defineProperty({__proto__:null,base32:SEe,base32hex:AEe,base32hexpad:IEe,base32hexpadupper:$Ee,base32hexupper:kEe,base32pad:PEe,base32padupper:OEe,base32upper:CEe,base32z:TEe},Symbol.toStringTag,{value:"Module"})),MEe=uh({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),REe=uh({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),NEe=Object.freeze(Object.defineProperty({__proto__:null,base36:MEe,base36upper:REe},Symbol.toStringTag,{value:"Module"})),FEe=uh({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),BEe=uh({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),jEe=Object.freeze(Object.defineProperty({__proto__:null,base58btc:FEe,base58flickr:BEe},Symbol.toStringTag,{value:"Module"})),LEe=Ur({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),zEe=Ur({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),UEe=Ur({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),HEe=Ur({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),VEe=Object.freeze(Object.defineProperty({__proto__:null,base64:LEe,base64pad:zEe,base64url:UEe,base64urlpad:HEe},Symbol.toStringTag,{value:"Module"})),wV=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),WEe=wV.reduce((e,t,r)=>(e[r]=t,e),[]),qEe=wV.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);function GEe(e){return e.reduce((t,r)=>(t+=WEe[r],t),"")}function KEe(e){const t=[];for(const r of e){const n=qEe[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(n)}return new Uint8Array(t)}const YEe=Qy({prefix:"🚀",name:"base256emoji",encode:GEe,decode:KEe}),XEe=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:YEe},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const Mk={...hEe,...gEe,...yEe,...wEe,...EEe,...DEe,...NEe,...jEe,...VEe,...XEe};function xV(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const Rk=xV("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),Pw=xV("ascii","a",e=>{let t="a";for(let r=0;r{e=e.substring(1);const t=yV(e.length);for(let r=0;r>>32-16|b<<16,V=V+b|0,g^=V,g=g>>>32-12|g<<12,I=I+D|0,B^=I,B=B>>>32-16|B<<16,P=P+B|0,D^=P,D=D>>>32-12|D<<12,F=F+H|0,M^=F,M=M>>>32-16|M<<16,S=S+M|0,H^=S,H=H>>>32-12|H<<12,O=O+G|0,j^=O,j=j>>>32-16|j<<16,v=v+j|0,G^=v,G=G>>>32-12|G<<12,F=F+H|0,M^=F,M=M>>>32-8|M<<8,S=S+M|0,H^=S,H=H>>>32-7|H<<7,O=O+G|0,j^=O,j=j>>>32-8|j<<8,v=v+j|0,G^=v,G=G>>>32-7|G<<7,I=I+D|0,B^=I,B=B>>>32-8|B<<8,P=P+B|0,D^=P,D=D>>>32-7|D<<7,C=C+g|0,b^=C,b=b>>>32-8|b<<8,V=V+b|0,g^=V,g=g>>>32-7|g<<7,C=C+D|0,j^=C,j=j>>>32-16|j<<16,S=S+j|0,D^=S,D=D>>>32-12|D<<12,I=I+H|0,b^=I,b=b>>>32-16|b<<16,v=v+b|0,H^=v,H=H>>>32-12|H<<12,F=F+G|0,B^=F,B=B>>>32-16|B<<16,V=V+B|0,G^=V,G=G>>>32-12|G<<12,O=O+g|0,M^=O,M=M>>>32-16|M<<16,P=P+M|0,g^=P,g=g>>>32-12|g<<12,F=F+G|0,B^=F,B=B>>>32-8|B<<8,V=V+B|0,G^=V,G=G>>>32-7|G<<7,O=O+g|0,M^=O,M=M>>>32-8|M<<8,P=P+M|0,g^=P,g=g>>>32-7|g<<7,I=I+H|0,b^=I,b=b>>>32-8|b<<8,v=v+b|0,H^=v,H=H>>>32-7|H<<7,C=C+D|0,j^=C,j=j>>>32-8|j<<8,S=S+j|0,D^=S,D=D>>>32-7|D<<7;Xr.writeUint32LE(C+n|0,e,0),Xr.writeUint32LE(I+o|0,e,4),Xr.writeUint32LE(F+i|0,e,8),Xr.writeUint32LE(O+a|0,e,12),Xr.writeUint32LE(g+s|0,e,16),Xr.writeUint32LE(D+l|0,e,20),Xr.writeUint32LE(H+c|0,e,24),Xr.writeUint32LE(G+u|0,e,28),Xr.writeUint32LE(V+f|0,e,32),Xr.writeUint32LE(P+d|0,e,36),Xr.writeUint32LE(S+p|0,e,40),Xr.writeUint32LE(v+h|0,e,44),Xr.writeUint32LE(b+m|0,e,48),Xr.writeUint32LE(B+_|0,e,52),Xr.writeUint32LE(M+w|0,e,56),Xr.writeUint32LE(j+y|0,e,60)}function SV(e,t,r,n,o){if(o===void 0&&(o=0),e.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,t++;if(n>0)throw new Error("ChaCha: counter overflow")}var CV={},Gs={};Object.defineProperty(Gs,"__esModule",{value:!0});function iSe(e,t,r){return~(e-1)&t|e-1&r}Gs.select=iSe;function aSe(e,t){return(e|0)-(t|0)-1>>>31&1}Gs.lessOrEqual=aSe;function PV(e,t){if(e.length!==t.length)return 0;for(var r=0,n=0;n>>8}Gs.compare=PV;function sSe(e,t){return e.length===0||t.length===0?!1:PV(e,t)!==0}Gs.equal=sSe;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Gs,r=eo;e.DIGEST_LENGTH=16;var n=function(){function a(s){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var l=s[0]|s[1]<<8;this._r[0]=l&8191;var c=s[2]|s[3]<<8;this._r[1]=(l>>>13|c<<3)&8191;var u=s[4]|s[5]<<8;this._r[2]=(c>>>10|u<<6)&7939;var f=s[6]|s[7]<<8;this._r[3]=(u>>>7|f<<9)&8191;var d=s[8]|s[9]<<8;this._r[4]=(f>>>4|d<<12)&255,this._r[5]=d>>>1&8190;var p=s[10]|s[11]<<8;this._r[6]=(d>>>14|p<<2)&8191;var h=s[12]|s[13]<<8;this._r[7]=(p>>>11|h<<5)&8065;var m=s[14]|s[15]<<8;this._r[8]=(h>>>8|m<<8)&8191,this._r[9]=m>>>5&127,this._pad[0]=s[16]|s[17]<<8,this._pad[1]=s[18]|s[19]<<8,this._pad[2]=s[20]|s[21]<<8,this._pad[3]=s[22]|s[23]<<8,this._pad[4]=s[24]|s[25]<<8,this._pad[5]=s[26]|s[27]<<8,this._pad[6]=s[28]|s[29]<<8,this._pad[7]=s[30]|s[31]<<8}return a.prototype._blocks=function(s,l,c){for(var u=this._fin?0:2048,f=this._h[0],d=this._h[1],p=this._h[2],h=this._h[3],m=this._h[4],_=this._h[5],w=this._h[6],y=this._h[7],C=this._h[8],I=this._h[9],F=this._r[0],O=this._r[1],g=this._r[2],D=this._r[3],H=this._r[4],G=this._r[5],V=this._r[6],P=this._r[7],S=this._r[8],v=this._r[9];c>=16;){var b=s[l+0]|s[l+1]<<8;f+=b&8191;var B=s[l+2]|s[l+3]<<8;d+=(b>>>13|B<<3)&8191;var M=s[l+4]|s[l+5]<<8;p+=(B>>>10|M<<6)&8191;var j=s[l+6]|s[l+7]<<8;h+=(M>>>7|j<<9)&8191;var U=s[l+8]|s[l+9]<<8;m+=(j>>>4|U<<12)&8191,_+=U>>>1&8191;var E=s[l+10]|s[l+11]<<8;w+=(U>>>14|E<<2)&8191;var N=s[l+12]|s[l+13]<<8;y+=(E>>>11|N<<5)&8191;var T=s[l+14]|s[l+15]<<8;C+=(N>>>8|T<<8)&8191,I+=T>>>5|u;var q=0,J=q;J+=f*F,J+=d*(5*v),J+=p*(5*S),J+=h*(5*P),J+=m*(5*V),q=J>>>13,J&=8191,J+=_*(5*G),J+=w*(5*H),J+=y*(5*D),J+=C*(5*g),J+=I*(5*O),q+=J>>>13,J&=8191;var te=q;te+=f*O,te+=d*F,te+=p*(5*v),te+=h*(5*S),te+=m*(5*P),q=te>>>13,te&=8191,te+=_*(5*V),te+=w*(5*G),te+=y*(5*H),te+=C*(5*D),te+=I*(5*g),q+=te>>>13,te&=8191;var ne=q;ne+=f*g,ne+=d*O,ne+=p*F,ne+=h*(5*v),ne+=m*(5*S),q=ne>>>13,ne&=8191,ne+=_*(5*P),ne+=w*(5*V),ne+=y*(5*G),ne+=C*(5*H),ne+=I*(5*D),q+=ne>>>13,ne&=8191;var ce=q;ce+=f*D,ce+=d*g,ce+=p*O,ce+=h*F,ce+=m*(5*v),q=ce>>>13,ce&=8191,ce+=_*(5*S),ce+=w*(5*P),ce+=y*(5*V),ce+=C*(5*G),ce+=I*(5*H),q+=ce>>>13,ce&=8191;var ie=q;ie+=f*H,ie+=d*D,ie+=p*g,ie+=h*O,ie+=m*F,q=ie>>>13,ie&=8191,ie+=_*(5*v),ie+=w*(5*S),ie+=y*(5*P),ie+=C*(5*V),ie+=I*(5*G),q+=ie>>>13,ie&=8191;var ue=q;ue+=f*G,ue+=d*H,ue+=p*D,ue+=h*g,ue+=m*O,q=ue>>>13,ue&=8191,ue+=_*F,ue+=w*(5*v),ue+=y*(5*S),ue+=C*(5*P),ue+=I*(5*V),q+=ue>>>13,ue&=8191;var A=q;A+=f*V,A+=d*G,A+=p*H,A+=h*D,A+=m*g,q=A>>>13,A&=8191,A+=_*O,A+=w*F,A+=y*(5*v),A+=C*(5*S),A+=I*(5*P),q+=A>>>13,A&=8191;var K=q;K+=f*P,K+=d*V,K+=p*G,K+=h*H,K+=m*D,q=K>>>13,K&=8191,K+=_*g,K+=w*O,K+=y*F,K+=C*(5*v),K+=I*(5*S),q+=K>>>13,K&=8191;var ee=q;ee+=f*S,ee+=d*P,ee+=p*V,ee+=h*G,ee+=m*H,q=ee>>>13,ee&=8191,ee+=_*D,ee+=w*g,ee+=y*O,ee+=C*F,ee+=I*(5*v),q+=ee>>>13,ee&=8191;var se=q;se+=f*v,se+=d*S,se+=p*P,se+=h*V,se+=m*G,q=se>>>13,se&=8191,se+=_*H,se+=w*D,se+=y*g,se+=C*O,se+=I*F,q+=se>>>13,se&=8191,q=(q<<2)+q|0,q=q+J|0,J=q&8191,q=q>>>13,te+=q,f=J,d=te,p=ne,h=ce,m=ie,_=ue,w=A,y=K,C=ee,I=se,l+=16,c-=16}this._h[0]=f,this._h[1]=d,this._h[2]=p,this._h[3]=h,this._h[4]=m,this._h[5]=_,this._h[6]=w,this._h[7]=y,this._h[8]=C,this._h[9]=I},a.prototype.finish=function(s,l){l===void 0&&(l=0);var c=new Uint16Array(10),u,f,d,p;if(this._leftover){for(p=this._leftover,this._buffer[p++]=1;p<16;p++)this._buffer[p]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(u=this._h[1]>>>13,this._h[1]&=8191,p=2;p<10;p++)this._h[p]+=u,u=this._h[p]>>>13,this._h[p]&=8191;for(this._h[0]+=u*5,u=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=u,u=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=u,c[0]=this._h[0]+5,u=c[0]>>>13,c[0]&=8191,p=1;p<10;p++)c[p]=this._h[p]+u,u=c[p]>>>13,c[p]&=8191;for(c[9]-=8192,f=(u^1)-1,p=0;p<10;p++)c[p]&=f;for(f=~f,p=0;p<10;p++)this._h[p]=this._h[p]&f|c[p];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,d=this._h[0]+this._pad[0],this._h[0]=d&65535,p=1;p<8;p++)d=(this._h[p]+this._pad[p]|0)+(d>>>16)|0,this._h[p]=d&65535;return s[l+0]=this._h[0]>>>0,s[l+1]=this._h[0]>>>8,s[l+2]=this._h[1]>>>0,s[l+3]=this._h[1]>>>8,s[l+4]=this._h[2]>>>0,s[l+5]=this._h[2]>>>8,s[l+6]=this._h[3]>>>0,s[l+7]=this._h[3]>>>8,s[l+8]=this._h[4]>>>0,s[l+9]=this._h[4]>>>8,s[l+10]=this._h[5]>>>0,s[l+11]=this._h[5]>>>8,s[l+12]=this._h[6]>>>0,s[l+13]=this._h[6]>>>8,s[l+14]=this._h[7]>>>0,s[l+15]=this._h[7]>>>8,this._finished=!0,this},a.prototype.update=function(s){var l=0,c=s.length,u;if(this._leftover){u=16-this._leftover,u>c&&(u=c);for(var f=0;f=16&&(u=c-c%16,this._blocks(s,l,u),l+=u,c-=u),c){for(var f=0;f16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var p=new Uint8Array(16);p.set(c,p.length-c.length);var h=new Uint8Array(32);t.stream(this._key,p,h,4);var m=u.length+this.tagLength,_;if(d){if(d.length!==m)throw new Error("ChaCha20Poly1305: incorrect destination length");_=d}else _=new Uint8Array(m);return t.streamXOR(this._key,p,u,_,4),this._authenticate(_.subarray(_.length-this.tagLength,_.length),h,_.subarray(0,_.length-this.tagLength),f),n.wipe(p),_},l.prototype.open=function(c,u,f,d){if(c.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(u.length0&&p.update(a.subarray(d.length%16))),p.update(f),f.length%16>0&&p.update(a.subarray(f.length%16));var h=new Uint8Array(8);d&&o.writeUint64LE(d.length,h),p.update(h),o.writeUint64LE(f.length,h),p.update(h);for(var m=p.digest(),_=0;_this.blockSize?this._inner.update(r).finish(n).clean():n.set(r);for(var o=0;o1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(t){for(var r=new Uint8Array(t),n=0;n0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=l[u++],c--;this._bufferLength===this.blockSize&&(i(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(c>=this.blockSize&&(u=i(this._temp,this._state,l,u,c),c%=this.blockSize);c>0;)this._buffer[this._bufferLength++]=l[u++],c--;return this},s.prototype.finish=function(l){if(!this._finished){var c=this._bytesHashed,u=this._bufferLength,f=c/536870912|0,d=c<<3,p=c%64<56?64:128;this._buffer[u]=128;for(var h=u+1;h0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},s.prototype.restoreState=function(l){return this._state.set(l.state),this._bufferLength=l.bufferLength,l.buffer&&this._buffer.set(l.buffer),this._bytesHashed=l.bytesHashed,this._finished=!1,this},s.prototype.cleanSavedState=function(l){r.wipe(l.state),l.buffer&&r.wipe(l.buffer),l.bufferLength=0,l.bytesHashed=0},s}();e.SHA256=n;var o=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function i(s,l,c,u,f){for(;f>=64;){for(var d=l[0],p=l[1],h=l[2],m=l[3],_=l[4],w=l[5],y=l[6],C=l[7],I=0;I<16;I++){var F=u+I*4;s[I]=t.readUint32BE(c,F)}for(var I=16;I<64;I++){var O=s[I-2],g=(O>>>17|O<<32-17)^(O>>>19|O<<32-19)^O>>>10;O=s[I-15];var D=(O>>>7|O<<32-7)^(O>>>18|O<<32-18)^O>>>3;s[I]=(g+s[I-7]|0)+(D+s[I-16]|0)}for(var I=0;I<64;I++){var g=(((_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7))+(_&w^~_&y)|0)+(C+(o[I]+s[I]|0)|0)|0,D=((d>>>2|d<<32-2)^(d>>>13|d<<32-13)^(d>>>22|d<<32-22))+(d&p^d&h^p&h)|0;C=y,y=w,w=_,_=m+g|0,m=h,h=p,p=d,d=g+D|0}l[0]+=d,l[1]+=p,l[2]+=h,l[3]+=m,l[4]+=_,l[5]+=w,l[6]+=y,l[7]+=C,u+=64,f-=64}return u}function a(s){var l=new n;l.update(s);var c=l.digest();return l.clean(),c}e.hash=a})(tb);var T4={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;const t=Ju,r=eo;e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;function n(I){const F=new Float64Array(16);if(I)for(let O=0;O>16&1),O[G-1]&=65535;O[15]=g[15]-32767-(O[14]>>16&1);const H=O[15]>>16&1;O[14]&=65535,s(g,O,1-H)}for(let D=0;D<16;D++)I[2*D]=g[D]&255,I[2*D+1]=g[D]>>8}function c(I,F){for(let O=0;O<16;O++)I[O]=F[2*O]+(F[2*O+1]<<8);I[15]&=32767}function u(I,F,O){for(let g=0;g<16;g++)I[g]=F[g]+O[g]}function f(I,F,O){for(let g=0;g<16;g++)I[g]=F[g]-O[g]}function d(I,F,O){let g,D,H=0,G=0,V=0,P=0,S=0,v=0,b=0,B=0,M=0,j=0,U=0,E=0,N=0,T=0,q=0,J=0,te=0,ne=0,ce=0,ie=0,ue=0,A=0,K=0,ee=0,se=0,pe=0,ge=0,X=0,R=0,z=0,Z=0,Q=O[0],de=O[1],we=O[2],Se=O[3],Ee=O[4],Ae=O[5],Te=O[6],W=O[7],x=O[8],k=O[9],Y=O[10],re=O[11],fe=O[12],le=O[13],xe=O[14],_e=O[15];g=F[0],H+=g*Q,G+=g*de,V+=g*we,P+=g*Se,S+=g*Ee,v+=g*Ae,b+=g*Te,B+=g*W,M+=g*x,j+=g*k,U+=g*Y,E+=g*re,N+=g*fe,T+=g*le,q+=g*xe,J+=g*_e,g=F[1],G+=g*Q,V+=g*de,P+=g*we,S+=g*Se,v+=g*Ee,b+=g*Ae,B+=g*Te,M+=g*W,j+=g*x,U+=g*k,E+=g*Y,N+=g*re,T+=g*fe,q+=g*le,J+=g*xe,te+=g*_e,g=F[2],V+=g*Q,P+=g*de,S+=g*we,v+=g*Se,b+=g*Ee,B+=g*Ae,M+=g*Te,j+=g*W,U+=g*x,E+=g*k,N+=g*Y,T+=g*re,q+=g*fe,J+=g*le,te+=g*xe,ne+=g*_e,g=F[3],P+=g*Q,S+=g*de,v+=g*we,b+=g*Se,B+=g*Ee,M+=g*Ae,j+=g*Te,U+=g*W,E+=g*x,N+=g*k,T+=g*Y,q+=g*re,J+=g*fe,te+=g*le,ne+=g*xe,ce+=g*_e,g=F[4],S+=g*Q,v+=g*de,b+=g*we,B+=g*Se,M+=g*Ee,j+=g*Ae,U+=g*Te,E+=g*W,N+=g*x,T+=g*k,q+=g*Y,J+=g*re,te+=g*fe,ne+=g*le,ce+=g*xe,ie+=g*_e,g=F[5],v+=g*Q,b+=g*de,B+=g*we,M+=g*Se,j+=g*Ee,U+=g*Ae,E+=g*Te,N+=g*W,T+=g*x,q+=g*k,J+=g*Y,te+=g*re,ne+=g*fe,ce+=g*le,ie+=g*xe,ue+=g*_e,g=F[6],b+=g*Q,B+=g*de,M+=g*we,j+=g*Se,U+=g*Ee,E+=g*Ae,N+=g*Te,T+=g*W,q+=g*x,J+=g*k,te+=g*Y,ne+=g*re,ce+=g*fe,ie+=g*le,ue+=g*xe,A+=g*_e,g=F[7],B+=g*Q,M+=g*de,j+=g*we,U+=g*Se,E+=g*Ee,N+=g*Ae,T+=g*Te,q+=g*W,J+=g*x,te+=g*k,ne+=g*Y,ce+=g*re,ie+=g*fe,ue+=g*le,A+=g*xe,K+=g*_e,g=F[8],M+=g*Q,j+=g*de,U+=g*we,E+=g*Se,N+=g*Ee,T+=g*Ae,q+=g*Te,J+=g*W,te+=g*x,ne+=g*k,ce+=g*Y,ie+=g*re,ue+=g*fe,A+=g*le,K+=g*xe,ee+=g*_e,g=F[9],j+=g*Q,U+=g*de,E+=g*we,N+=g*Se,T+=g*Ee,q+=g*Ae,J+=g*Te,te+=g*W,ne+=g*x,ce+=g*k,ie+=g*Y,ue+=g*re,A+=g*fe,K+=g*le,ee+=g*xe,se+=g*_e,g=F[10],U+=g*Q,E+=g*de,N+=g*we,T+=g*Se,q+=g*Ee,J+=g*Ae,te+=g*Te,ne+=g*W,ce+=g*x,ie+=g*k,ue+=g*Y,A+=g*re,K+=g*fe,ee+=g*le,se+=g*xe,pe+=g*_e,g=F[11],E+=g*Q,N+=g*de,T+=g*we,q+=g*Se,J+=g*Ee,te+=g*Ae,ne+=g*Te,ce+=g*W,ie+=g*x,ue+=g*k,A+=g*Y,K+=g*re,ee+=g*fe,se+=g*le,pe+=g*xe,ge+=g*_e,g=F[12],N+=g*Q,T+=g*de,q+=g*we,J+=g*Se,te+=g*Ee,ne+=g*Ae,ce+=g*Te,ie+=g*W,ue+=g*x,A+=g*k,K+=g*Y,ee+=g*re,se+=g*fe,pe+=g*le,ge+=g*xe,X+=g*_e,g=F[13],T+=g*Q,q+=g*de,J+=g*we,te+=g*Se,ne+=g*Ee,ce+=g*Ae,ie+=g*Te,ue+=g*W,A+=g*x,K+=g*k,ee+=g*Y,se+=g*re,pe+=g*fe,ge+=g*le,X+=g*xe,R+=g*_e,g=F[14],q+=g*Q,J+=g*de,te+=g*we,ne+=g*Se,ce+=g*Ee,ie+=g*Ae,ue+=g*Te,A+=g*W,K+=g*x,ee+=g*k,se+=g*Y,pe+=g*re,ge+=g*fe,X+=g*le,R+=g*xe,z+=g*_e,g=F[15],J+=g*Q,te+=g*de,ne+=g*we,ce+=g*Se,ie+=g*Ee,ue+=g*Ae,A+=g*Te,K+=g*W,ee+=g*x,se+=g*k,pe+=g*Y,ge+=g*re,X+=g*fe,R+=g*le,z+=g*xe,Z+=g*_e,H+=38*te,G+=38*ne,V+=38*ce,P+=38*ie,S+=38*ue,v+=38*A,b+=38*K,B+=38*ee,M+=38*se,j+=38*pe,U+=38*ge,E+=38*X,N+=38*R,T+=38*z,q+=38*Z,D=1,g=H+D+65535,D=Math.floor(g/65536),H=g-D*65536,g=G+D+65535,D=Math.floor(g/65536),G=g-D*65536,g=V+D+65535,D=Math.floor(g/65536),V=g-D*65536,g=P+D+65535,D=Math.floor(g/65536),P=g-D*65536,g=S+D+65535,D=Math.floor(g/65536),S=g-D*65536,g=v+D+65535,D=Math.floor(g/65536),v=g-D*65536,g=b+D+65535,D=Math.floor(g/65536),b=g-D*65536,g=B+D+65535,D=Math.floor(g/65536),B=g-D*65536,g=M+D+65535,D=Math.floor(g/65536),M=g-D*65536,g=j+D+65535,D=Math.floor(g/65536),j=g-D*65536,g=U+D+65535,D=Math.floor(g/65536),U=g-D*65536,g=E+D+65535,D=Math.floor(g/65536),E=g-D*65536,g=N+D+65535,D=Math.floor(g/65536),N=g-D*65536,g=T+D+65535,D=Math.floor(g/65536),T=g-D*65536,g=q+D+65535,D=Math.floor(g/65536),q=g-D*65536,g=J+D+65535,D=Math.floor(g/65536),J=g-D*65536,H+=D-1+37*(D-1),D=1,g=H+D+65535,D=Math.floor(g/65536),H=g-D*65536,g=G+D+65535,D=Math.floor(g/65536),G=g-D*65536,g=V+D+65535,D=Math.floor(g/65536),V=g-D*65536,g=P+D+65535,D=Math.floor(g/65536),P=g-D*65536,g=S+D+65535,D=Math.floor(g/65536),S=g-D*65536,g=v+D+65535,D=Math.floor(g/65536),v=g-D*65536,g=b+D+65535,D=Math.floor(g/65536),b=g-D*65536,g=B+D+65535,D=Math.floor(g/65536),B=g-D*65536,g=M+D+65535,D=Math.floor(g/65536),M=g-D*65536,g=j+D+65535,D=Math.floor(g/65536),j=g-D*65536,g=U+D+65535,D=Math.floor(g/65536),U=g-D*65536,g=E+D+65535,D=Math.floor(g/65536),E=g-D*65536,g=N+D+65535,D=Math.floor(g/65536),N=g-D*65536,g=T+D+65535,D=Math.floor(g/65536),T=g-D*65536,g=q+D+65535,D=Math.floor(g/65536),q=g-D*65536,g=J+D+65535,D=Math.floor(g/65536),J=g-D*65536,H+=D-1+37*(D-1),I[0]=H,I[1]=G,I[2]=V,I[3]=P,I[4]=S,I[5]=v,I[6]=b,I[7]=B,I[8]=M,I[9]=j,I[10]=U,I[11]=E,I[12]=N,I[13]=T,I[14]=q,I[15]=J}function p(I,F){d(I,F,F)}function h(I,F){const O=n();for(let g=0;g<16;g++)O[g]=F[g];for(let g=253;g>=0;g--)p(O,O),g!==2&&g!==4&&d(O,O,F);for(let g=0;g<16;g++)I[g]=O[g]}function m(I,F){const O=new Uint8Array(32),g=new Float64Array(80),D=n(),H=n(),G=n(),V=n(),P=n(),S=n();for(let M=0;M<31;M++)O[M]=I[M];O[31]=I[31]&127|64,O[0]&=248,c(g,F);for(let M=0;M<16;M++)H[M]=g[M];D[0]=V[0]=1;for(let M=254;M>=0;--M){const j=O[M>>>3]>>>(M&7)&1;s(D,H,j),s(G,V,j),u(P,D,G),f(D,D,G),u(G,H,V),f(H,H,V),p(V,P),p(S,D),d(D,G,D),d(G,H,P),u(P,D,G),f(D,D,G),p(H,D),f(G,V,S),d(D,G,i),u(D,D,V),d(G,G,D),d(D,V,S),d(V,H,g),p(H,P),s(D,H,j),s(G,V,j)}for(let M=0;M<16;M++)g[M+16]=D[M],g[M+32]=G[M],g[M+48]=H[M],g[M+64]=V[M];const v=g.subarray(32),b=g.subarray(16);h(v,v),d(b,b,v);const B=new Uint8Array(32);return l(B,b),B}e.scalarMult=m;function _(I){return m(I,o)}e.scalarMultBase=_;function w(I){if(I.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const F=new Uint8Array(I);return{publicKey:_(F),secretKey:F}}e.generateKeyPairFromSeed=w;function y(I){const F=(0,t.randomBytes)(32,I),O=w(F);return(0,r.wipe)(F),O}e.generateKeyPair=y;function C(I,F,O=!1){if(I.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(F.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const g=m(I,F);if(O){let D=0;for(let H=0;H-1){const _=h.getAttribute("href");if(_)if(_.toLowerCase().indexOf("https:")===-1&&_.toLowerCase().indexOf("http:")===-1&&_.indexOf("//")!==0){let w=t.protocol+"//"+t.host;if(_.indexOf("/")===0)w+=_;else{const y=t.pathname.split("/");y.pop();const C=y.join("/");w+=C+"/"+_}d.push(w)}else if(_.indexOf("//")===0){const w=t.protocol+_;d.push(w)}else d.push(_)}}return d}function n(...f){const d=e.getElementsByTagName("meta");for(let p=0;ph.getAttribute(_)).filter(_=>_?f.includes(_):!1);if(m.length&&m){const _=h.getAttribute("content");if(_)return _}}return""}function o(){let f=n("name","og:site_name","og:title","twitter:title");return f||(f=e.title),f}function i(){return n("description","og:description","twitter:description","keywords")}const a=o(),s=i(),l=t.origin,c=r();return{description:s,url:l,icons:c,name:a}}IV=R4.getWindowMetadata=SSe;var xp={},CSe=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),$V="%[a-f0-9]{2}",Lk=new RegExp("("+$V+")|([^%]+?)","gi"),zk=new RegExp("("+$V+")+","gi");function nx(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],nx(r),nx(n))}function PSe(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Lk)||[],r=1;r{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},ISe=function(e,t){for(var r={},n=Object.keys(e),o=Array.isArray(t),i=0;iy==null,a=Symbol("encodeFragmentIdentifier");function s(y){switch(y.arrayFormat){case"index":return C=>(I,F)=>{const O=I.length;return F===void 0||y.skipNull&&F===null||y.skipEmptyString&&F===""?I:F===null?[...I,[u(C,y),"[",O,"]"].join("")]:[...I,[u(C,y),"[",u(O,y),"]=",u(F,y)].join("")]};case"bracket":return C=>(I,F)=>F===void 0||y.skipNull&&F===null||y.skipEmptyString&&F===""?I:F===null?[...I,[u(C,y),"[]"].join("")]:[...I,[u(C,y),"[]=",u(F,y)].join("")];case"colon-list-separator":return C=>(I,F)=>F===void 0||y.skipNull&&F===null||y.skipEmptyString&&F===""?I:F===null?[...I,[u(C,y),":list="].join("")]:[...I,[u(C,y),":list=",u(F,y)].join("")];case"comma":case"separator":case"bracket-separator":{const C=y.arrayFormat==="bracket-separator"?"[]=":"=";return I=>(F,O)=>O===void 0||y.skipNull&&O===null||y.skipEmptyString&&O===""?F:(O=O===null?"":O,F.length===0?[[u(I,y),C,u(O,y)].join("")]:[[F,u(O,y)].join(y.arrayFormatSeparator)])}default:return C=>(I,F)=>F===void 0||y.skipNull&&F===null||y.skipEmptyString&&F===""?I:F===null?[...I,u(C,y)]:[...I,[u(C,y),"=",u(F,y)].join("")]}}function l(y){let C;switch(y.arrayFormat){case"index":return(I,F,O)=>{if(C=/\[(\d*)\]$/.exec(I),I=I.replace(/\[\d*\]$/,""),!C){O[I]=F;return}O[I]===void 0&&(O[I]={}),O[I][C[1]]=F};case"bracket":return(I,F,O)=>{if(C=/(\[\])$/.exec(I),I=I.replace(/\[\]$/,""),!C){O[I]=F;return}if(O[I]===void 0){O[I]=[F];return}O[I]=[].concat(O[I],F)};case"colon-list-separator":return(I,F,O)=>{if(C=/(:list)$/.exec(I),I=I.replace(/:list$/,""),!C){O[I]=F;return}if(O[I]===void 0){O[I]=[F];return}O[I]=[].concat(O[I],F)};case"comma":case"separator":return(I,F,O)=>{const g=typeof F=="string"&&F.includes(y.arrayFormatSeparator),D=typeof F=="string"&&!g&&f(F,y).includes(y.arrayFormatSeparator);F=D?f(F,y):F;const H=g||D?F.split(y.arrayFormatSeparator).map(G=>f(G,y)):F===null?F:f(F,y);O[I]=H};case"bracket-separator":return(I,F,O)=>{const g=/(\[\])$/.test(I);if(I=I.replace(/\[\]$/,""),!g){O[I]=F&&f(F,y);return}const D=F===null?[]:F.split(y.arrayFormatSeparator).map(H=>f(H,y));if(O[I]===void 0){O[I]=D;return}O[I]=[].concat(O[I],D)};default:return(I,F,O)=>{if(O[I]===void 0){O[I]=F;return}O[I]=[].concat(O[I],F)}}}function c(y){if(typeof y!="string"||y.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function u(y,C){return C.encode?C.strict?t(y):encodeURIComponent(y):y}function f(y,C){return C.decode?r(y):y}function d(y){return Array.isArray(y)?y.sort():typeof y=="object"?d(Object.keys(y)).sort((C,I)=>Number(C)-Number(I)).map(C=>y[C]):y}function p(y){const C=y.indexOf("#");return C!==-1&&(y=y.slice(0,C)),y}function h(y){let C="";const I=y.indexOf("#");return I!==-1&&(C=y.slice(I)),C}function m(y){y=p(y);const C=y.indexOf("?");return C===-1?"":y.slice(C+1)}function _(y,C){return C.parseNumbers&&!Number.isNaN(Number(y))&&typeof y=="string"&&y.trim()!==""?y=Number(y):C.parseBooleans&&y!==null&&(y.toLowerCase()==="true"||y.toLowerCase()==="false")&&(y=y.toLowerCase()==="true"),y}function w(y,C){C=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},C),c(C.arrayFormatSeparator);const I=l(C),F=Object.create(null);if(typeof y!="string"||(y=y.trim().replace(/^[?#&]/,""),!y))return F;for(const O of y.split("&")){if(O==="")continue;let[g,D]=n(C.decode?O.replace(/\+/g," "):O,"=");D=D===void 0?null:["comma","separator","bracket-separator"].includes(C.arrayFormat)?D:f(D,C),I(f(g,C),D,F)}for(const O of Object.keys(F)){const g=F[O];if(typeof g=="object"&&g!==null)for(const D of Object.keys(g))g[D]=_(g[D],C);else F[O]=_(g,C)}return C.sort===!1?F:(C.sort===!0?Object.keys(F).sort():Object.keys(F).sort(C.sort)).reduce((O,g)=>{const D=F[g];return D&&typeof D=="object"&&!Array.isArray(D)?O[g]=d(D):O[g]=D,O},Object.create(null))}e.extract=m,e.parse=w,e.stringify=(y,C)=>{if(!y)return"";C=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},C),c(C.arrayFormatSeparator);const I=D=>C.skipNull&&i(y[D])||C.skipEmptyString&&y[D]==="",F=s(C),O={};for(const D of Object.keys(y))I(D)||(O[D]=y[D]);const g=Object.keys(O);return C.sort!==!1&&g.sort(C.sort),g.map(D=>{const H=y[D];return H===void 0?"":H===null?u(D,C):Array.isArray(H)?H.length===0&&C.arrayFormat==="bracket-separator"?u(D,C)+"[]":H.reduce(F(D),[]).join("&"):u(D,C)+"="+u(H,C)}).filter(D=>D.length>0).join("&")},e.parseUrl=(y,C)=>{C=Object.assign({decode:!0},C);const[I,F]=n(y,"#");return Object.assign({url:I.split("?")[0]||"",query:w(m(y),C)},C&&C.parseFragmentIdentifier&&F?{fragmentIdentifier:f(F,C)}:{})},e.stringifyUrl=(y,C)=>{C=Object.assign({encode:!0,strict:!0,[a]:!0},C);const I=p(y.url).split("?")[0]||"",F=e.extract(y.url),O=e.parse(F,{sort:!1}),g=Object.assign(O,y.query);let D=e.stringify(g,C);D&&(D=`?${D}`);let H=h(y.url);return y.fragmentIdentifier&&(H=`#${C[a]?u(y.fragmentIdentifier,C):y.fragmentIdentifier}`),`${I}${D}${H}`},e.pick=(y,C,I)=>{I=Object.assign({parseFragmentIdentifier:!0,[a]:!1},I);const{url:F,query:O,fragmentIdentifier:g}=e.parseUrl(y,I);return e.stringifyUrl({url:F,query:o(O,C),fragmentIdentifier:g},I)},e.exclude=(y,C,I)=>{const F=Array.isArray(C)?O=>!C.includes(O):(O,g)=>!C(O,g);return e.pick(y,F,I)}})(xp);const $Se={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}},rb=":";function TV(e){const[t,r]=e.split(rb);return{namespace:t,reference:r}}function DV(e){const{namespace:t,reference:r}=e;return[t,r].join(rb)}function N4(e){const[t,r,n]=e.split(rb);return{namespace:t,reference:r,address:n}}function MV(e){const{namespace:t,reference:r,address:n}=e;return[t,r,n].join(rb)}function F4(e,t){const r=[];return e.forEach(n=>{const o=t(n);r.includes(o)||r.push(o)}),r}function RV(e){const{address:t}=N4(e);return t}function NV(e){const{namespace:t,reference:r}=N4(e);return DV({namespace:t,reference:r})}function TSe(e,t){const{namespace:r,reference:n}=TV(t);return MV({namespace:r,reference:n,address:e})}function DSe(e){return F4(e,RV)}function FV(e){return F4(e,NV)}function MSe(e,t=[]){const r=[];return Object.keys(e).forEach(n=>{if(t.length&&!t.includes(n))return;const o=e[n];r.push(...o.accounts)}),r}function RSe(e,t=[]){const r=[];return Object.keys(e).forEach(n=>{if(t.length&&!t.includes(n))return;const o=e[n];r.push(...FV(o.accounts))}),r}function NSe(e,t=[]){const r=[];return Object.keys(e).forEach(n=>{if(t.length&&!t.includes(n))return;const o=e[n];r.push(...nb(n,o))}),r}function nb(e,t){return e.includes(":")?[e]:t.chains||[]}const ob=e=>e==null?void 0:e.split(":"),BV=e=>{const t=e&&ob(e);if(t)return t[3]},FSe=e=>{const t=e&&ob(e);if(t)return t[2]+":"+t[3]},jV=e=>{const t=e&&ob(e);if(t)return t.pop()},BSe=(e,t)=>{const r=`${e.domain} wants you to sign in with your Ethereum account:`,n=jV(t),o=e.statement,i=`URI: ${e.aud}`,a=`Version: ${e.version}`,s=`Chain ID: ${BV(t)}`,l=`Nonce: ${e.nonce}`,c=`Issued At: ${e.iat}`,u=e.resources&&e.resources.length>0?`Resources: +${e.resources.map(f=>`- ${f}`).join(` +`)}`:void 0;return[r,n,"",o,"",i,a,s,l,c,u].filter(f=>f!=null).join(` +`)},B4="base10",yn="base16",um="base64pad",ib="utf8",j4=0,Ks=1,jSe=0,Uk=1,ox=12,L4=32;function LV(){const e=T4.generateKeyPair();return{privateKey:Dn(e.secretKey,yn),publicKey:Dn(e.publicKey,yn)}}function fm(){const e=Ju.randomBytes(L4);return Dn(e,yn)}function zV(e,t){const r=T4.sharedKey(Cn(e,yn),Cn(t,yn)),n=new pSe(tb.SHA256,r).expand(L4);return Dn(n,yn)}function UV(e){const t=tb.hash(Cn(e,yn));return Dn(t,yn)}function _p(e){const t=tb.hash(Cn(e,ib));return Dn(t,yn)}function HV(e){return Cn(`${e}`,B4)}function ef(e){return Number(Dn(e,B4))}function VV(e){const t=HV(typeof e.type<"u"?e.type:j4);if(ef(t)===Ks&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof e.senderPublicKey<"u"?Cn(e.senderPublicKey,yn):void 0,n=typeof e.iv<"u"?Cn(e.iv,yn):Ju.randomBytes(ox),o=new I4.ChaCha20Poly1305(Cn(e.symKey,yn)).seal(n,Cn(e.message,ib));return qV({type:t,sealed:o,iv:n,senderPublicKey:r})}function WV(e){const t=new I4.ChaCha20Poly1305(Cn(e.symKey,yn)),{sealed:r,iv:n}=ab(e.encoded),o=t.open(n,r);if(o===null)throw new Error("Failed to decrypt");return Dn(o,ib)}function qV(e){if(ef(e.type)===Ks){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Dn(tx([e.type,e.senderPublicKey,e.iv,e.sealed]),um)}return Dn(tx([e.type,e.iv,e.sealed]),um)}function ab(e){const t=Cn(e,um),r=t.slice(jSe,Uk),n=Uk;if(ef(r)===Ks){const s=n+L4,l=s+ox,c=t.slice(n,s),u=t.slice(s,l),f=t.slice(l);return{type:r,sealed:f,iv:u,senderPublicKey:c}}const o=n+ox,i=t.slice(n,o),a=t.slice(o);return{type:r,sealed:a,iv:i}}function GV(e,t){const r=ab(e);return z4({type:ef(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?Dn(r.senderPublicKey,yn):void 0,receiverPublicKey:t==null?void 0:t.receiverPublicKey})}function z4(e){const t=(e==null?void 0:e.type)||j4;if(t===Ks){if(typeof(e==null?void 0:e.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(e==null?void 0:e.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e==null?void 0:e.senderPublicKey,receiverPublicKey:e==null?void 0:e.receiverPublicKey}}function ix(e){return e.type===Ks&&typeof e.senderPublicKey=="string"&&typeof e.receiverPublicKey=="string"}var LSe=Object.defineProperty,Hk=Object.getOwnPropertySymbols,zSe=Object.prototype.hasOwnProperty,USe=Object.prototype.propertyIsEnumerable,Vk=(e,t,r)=>t in e?LSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wk=(e,t)=>{for(var r in t||(t={}))zSe.call(t,r)&&Vk(e,r,t[r]);if(Hk)for(var r of Hk(t))USe.call(t,r)&&Vk(e,r,t[r]);return e};const KV="ReactNative",Fc={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},dm=" ",HSe=":",YV="/",U4=2,VSe=1e3,XV="js";function H4(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function ZV(){return!kV()&&!!D4()&&navigator.product===KV}function JV(){return!H4()&&!!D4()}function V4(){return ZV()?Fc.reactNative:H4()?Fc.node:JV()?Fc.browser:Fc.unknown}function QV(e,t){let r=xp.parse(e);return r=Wk(Wk({},r),t),e=xp.stringify(r),e}function eW(){return IV()||{name:"",description:"",url:"",icons:[""]}}function WSe(e,t){var r;const n=V4(),o={protocol:e,version:t,env:n};return n==="browser"&&(o.host=((r=M4())==null?void 0:r.host)||"unknown"),o}function tW(){const e=a4();if(e===null)return"unknown";const t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return e.type==="browser"?[t,e.name,e.version].join("-"):[t,e.version].join("-")}function rW(){var e;const t=V4();return t===Fc.browser?[t,((e=M4())==null?void 0:e.host)||"unknown"].join(":"):t}function nW(e,t,r){const n=tW(),o=rW();return[[e,t].join("-"),[XV,r].join("-"),n,o].join("/")}function oW({protocol:e,version:t,relayUrl:r,sdkVersion:n,auth:o,projectId:i,useOnCloseEvent:a}){const s=r.split("?"),l=nW(e,t,n),c={auth:o,ua:l,projectId:i,useOnCloseEvent:a||void 0},u=QV(s[1]||"",c);return s[0]+"?"+u}function qSe(e){let t=(e.match(/^[^:]+(?=:\/\/)/gi)||[])[0];const r=typeof t<"u"?e.split("://")[1]:e;return t=t==="wss"?"https":"http",[t,r].join("://")}function GSe(e,t,r){if(!e[t]||typeof e[t]!==r)throw new Error(`Missing or invalid "${t}" param`)}function iW(e,t=U4){return aW(e.split(YV),t)}function KSe(e){return iW(e).join(dm)}function cs(e,t){return e.filter(r=>t.includes(r)).length===e.length}function aW(e,t=U4){return e.slice(Math.max(e.length-t,0))}function W4(e){return Object.fromEntries(e.entries())}function q4(e){return new Map(Object.entries(e))}function YSe(e,t){const r={};return Object.keys(e).forEach(n=>{r[n]=t(e[n])}),r}const XSe=e=>e;function sW(e){return e.trim().replace(/^\w/,t=>t.toUpperCase())}function ZSe(e){return e.split(dm).map(t=>sW(t)).join(dm)}function Za(e=pt.FIVE_MINUTES,t){const r=pt.toMiliseconds(e||pt.FIVE_MINUTES);let n,o,i;return{resolve:a=>{i&&n&&(clearTimeout(i),n(a))},reject:a=>{i&&o&&(clearTimeout(i),o(a))},done:()=>new Promise((a,s)=>{i=setTimeout(()=>{s(new Error(t))},r),n=a,o=s})}}function Ep(e,t,r){return new Promise(async(n,o)=>{const i=setTimeout(()=>o(new Error(r)),t);try{const a=await e;n(a)}catch(a){o(a)}clearTimeout(i)})}function G4(e,t){if(typeof t=="string"&&t.startsWith(`${e}:`))return t;if(e.toLowerCase()==="topic"){if(typeof t!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}else if(e.toLowerCase()==="id"){if(typeof t!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function lW(e){return G4("topic",e)}function cW(e){return G4("id",e)}function K4(e){const[t,r]=e.split(":"),n={id:void 0,topic:void 0};if(t==="topic"&&typeof r=="string")n.topic=r;else if(t==="id"&&Number.isInteger(Number(r)))n.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${r}`);return n}function Bo(e,t){return pt.fromMiliseconds((t||Date.now())+pt.toMiliseconds(e))}function oa(e){return Date.now()>=pt.toMiliseconds(e)}function tr(e,t){return`${e}${t?`:${t}`:""}`}const uW="irn";function pm(e){return(e==null?void 0:e.relay)||{protocol:uW}}function Ad(e){const t=$Se[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var JSe=Object.defineProperty,qk=Object.getOwnPropertySymbols,QSe=Object.prototype.hasOwnProperty,e9e=Object.prototype.propertyIsEnumerable,Gk=(e,t,r)=>t in e?JSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,t9e=(e,t)=>{for(var r in t||(t={}))QSe.call(t,r)&&Gk(e,r,t[r]);if(qk)for(var r of qk(t))e9e.call(t,r)&&Gk(e,r,t[r]);return e};function fW(e,t="-"){const r={},n="relay"+t;return Object.keys(e).forEach(o=>{if(o.startsWith(n)){const i=o.replace(n,""),a=e[o];r[i]=a}}),r}function dW(e){const t=e.indexOf(":"),r=e.indexOf("?")!==-1?e.indexOf("?"):void 0,n=e.substring(0,t),o=e.substring(t+1,r).split("@"),i=typeof r<"u"?e.substring(r):"",a=xp.parse(i);return{protocol:n,topic:o[0],version:parseInt(o[1],10),symKey:a.symKey,relay:fW(a)}}function pW(e,t="-"){const r="relay",n={};return Object.keys(e).forEach(o=>{const i=r+t+o;e[o]&&(n[i]=e[o])}),n}function hW(e){return`${e.protocol}:${e.topic}@${e.version}?`+xp.stringify(t9e({symKey:e.symKey},pW(e.relay)))}function ec(e){const t=[];return e.forEach(r=>{const[n,o]=r.split(":");t.push(`${n}:${o}`)}),t}function vW(e){const t=[];return Object.values(e).forEach(r=>{t.push(...ec(r.accounts))}),t}function gW(e,t){const r=[];return Object.values(e).forEach(n=>{ec(n.accounts).includes(t)&&r.push(...n.methods)}),r}function mW(e,t){const r=[];return Object.values(e).forEach(n=>{ec(n.accounts).includes(t)&&r.push(...n.events)}),r}function yW(e,t){const r=kd(e,t);if(r)throw new Error(r.message);const n={};for(const[o,i]of Object.entries(e))n[o]={methods:i.methods,events:i.events,chains:i.accounts.map(a=>`${a.split(":")[0]}:${a.split(":")[1]}`)};return n}const r9e={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},n9e={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Xe(e,t){const{message:r,code:n}=n9e[e];return{message:t?`${r} ${t}`:r,code:n}}function vr(e,t){const{message:r,code:n}=r9e[e];return{message:t?`${r} ${t}`:r,code:n}}function tf(e,t){return Array.isArray(e)?typeof t<"u"&&e.length?e.every(t):!0:!1}function Jc(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function rn(e){return typeof e>"u"}function gr(e,t){return t&&rn(e)?!0:typeof e=="string"&&!!e.trim().length}function sb(e,t){return t&&rn(e)?!0:typeof e=="number"&&!isNaN(e)}function bW(e,t){const{requiredNamespaces:r}=t,n=Object.keys(e.namespaces),o=Object.keys(r);let i=!0;return cs(o,n)?(n.forEach(a=>{const{accounts:s,methods:l,events:c}=e.namespaces[a],u=ec(s),f=r[a];(!cs(nb(a,f),u)||!cs(f.methods,l)||!cs(f.events,c))&&(i=!1)}),i):!1}function lb(e){return gr(e,!1)&&e.includes(":")?e.split(":").length===2:!1}function wW(e){if(gr(e,!1)&&e.includes(":")){const t=e.split(":");if(t.length===3){const r=t[0]+":"+t[1];return!!t[2]&&lb(r)}}return!1}function xW(e){if(gr(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}function _W(e){var t;return(t=e==null?void 0:e.proposer)==null?void 0:t.publicKey}function EW(e){return e==null?void 0:e.topic}function SW(e,t){let r=null;return gr(e==null?void 0:e.publicKey,!1)||(r=Xe("MISSING_OR_INVALID",`${t} controller public key should be a string`)),r}function ax(e){let t=!0;return tf(e)?e.length&&(t=e.every(r=>gr(r,!1))):t=!1,t}function CW(e,t,r){let n=null;return tf(t)?t.forEach(o=>{n||(!lb(o)||!o.includes(e))&&(n=vr("UNSUPPORTED_CHAINS",`${r}, chain ${o} should be a string and conform to "namespace:chainId" format`))}):n=vr("UNSUPPORTED_CHAINS",`${r}, chains ${t} should be an array of strings conforming to "namespace:chainId" format`),n}function PW(e,t){let r=null;return Object.entries(e).forEach(([n,o])=>{if(r)return;const i=CW(n,nb(n,o),`${t} requiredNamespace`);i&&(r=i)}),r}function OW(e,t){let r=null;return tf(e)?e.forEach(n=>{r||wW(n)||(r=vr("UNSUPPORTED_ACCOUNTS",`${t}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=vr("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function AW(e,t){let r=null;return Object.values(e).forEach(n=>{if(r)return;const o=OW(n==null?void 0:n.accounts,`${t} namespace`);o&&(r=o)}),r}function kW(e,t){let r=null;return ax(e==null?void 0:e.methods)?ax(e==null?void 0:e.events)||(r=vr("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):r=vr("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),r}function Y4(e,t){let r=null;return Object.values(e).forEach(n=>{if(r)return;const o=kW(n,`${t}, namespace`);o&&(r=o)}),r}function IW(e,t,r){let n=null;if(e&&Jc(e)){const o=Y4(e,t);o&&(n=o);const i=PW(e,t);i&&(n=i)}else n=Xe("MISSING_OR_INVALID",`${t}, ${r} should be an object with data`);return n}function kd(e,t){let r=null;if(e&&Jc(e)){const n=Y4(e,t);n&&(r=n);const o=AW(e,t);o&&(r=o)}else r=Xe("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return r}function X4(e){return gr(e.protocol,!0)}function $W(e,t){let r=!1;return t&&!e?r=!0:e&&tf(e)&&e.length&&e.forEach(n=>{r=X4(n)}),r}function TW(e){return typeof e=="number"}function un(e){return typeof e<"u"&&typeof e!==null}function DW(e){return!(!e||typeof e!="object"||!e.code||!sb(e.code,!1)||!e.message||!gr(e.message,!1))}function MW(e){return!(rn(e)||!gr(e.method,!1))}function RW(e){return!(rn(e)||rn(e.result)&&rn(e.error)||!sb(e.id,!1)||!gr(e.jsonrpc,!1))}function NW(e){return!(rn(e)||!gr(e.name,!1))}function sx(e,t){return!(!lb(t)||!vW(e).includes(t))}function FW(e,t,r){return gr(r,!1)?gW(e,t).includes(r):!1}function BW(e,t,r){return gr(r,!1)?mW(e,t).includes(r):!1}function lx(e,t,r){let n=null;const o=o9e(e),i=i9e(t),a=Object.keys(o),s=Object.keys(i),l=Kk(Object.keys(e)),c=Kk(Object.keys(t)),u=l.filter(f=>!c.includes(f));return u.length&&(n=Xe("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces. + Required: ${u.toString()} + Received: ${Object.keys(t).toString()}`)),cs(a,s)||(n=Xe("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces. + Required: ${a.toString()} + Approved: ${s.toString()}`)),Object.keys(t).forEach(f=>{if(!f.includes(":")||n)return;const d=ec(t[f].accounts);d.includes(f)||(n=Xe("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${f} + Required: ${f} + Approved: ${d.toString()}`))}),a.forEach(f=>{n||(cs(o[f].methods,i[f].methods)?cs(o[f].events,i[f].events)||(n=Xe("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${f}`)):n=Xe("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${f}`))}),n}function o9e(e){const t={};return Object.keys(e).forEach(r=>{var n;r.includes(":")?t[r]=e[r]:(n=e[r].chains)==null||n.forEach(o=>{t[o]={methods:e[r].methods,events:e[r].events}})}),t}function Kk(e){return[...new Set(e.map(t=>t.includes(":")?t.split(":")[0]:t))]}function i9e(e){const t={};return Object.keys(e).forEach(r=>{if(r.includes(":"))t[r]=e[r];else{const n=ec(e[r].accounts);n==null||n.forEach(o=>{t[o]={accounts:e[r].accounts.filter(i=>i.includes(`${o}:`)),methods:e[r].methods,events:e[r].events}})}}),t}function jW(e,t){return sb(e,!1)&&e<=t.max&&e>=t.min}const a9e=Object.freeze(Object.defineProperty({__proto__:null,BASE10:B4,BASE16:yn,BASE64:um,COLON:HSe,DEFAULT_DEPTH:U4,EMPTY_SPACE:dm,ENV_MAP:Fc,ONE_THOUSAND:VSe,REACT_NATIVE_PRODUCT:KV,RELAYER_DEFAULT_PROTOCOL:uW,SDK_TYPE:XV,SLASH:YV,TYPE_0:j4,TYPE_1:Ks,UTF8:ib,appendToQueryString:QV,assertType:GSe,calcExpiry:Bo,capitalize:ZSe,capitalizeWord:sW,createDelayedPromise:Za,createExpiringPromise:Ep,decodeTypeByte:ef,decrypt:WV,deriveSymKey:zV,deserialize:ab,encodeTypeByte:HV,encrypt:VV,engineEvent:tr,enumify:XSe,formatAccountId:MV,formatAccountWithChain:TSe,formatChainId:DV,formatExpirerTarget:G4,formatIdTarget:cW,formatMessage:BSe,formatMessageContext:KSe,formatRelayParams:pW,formatRelayRpcUrl:oW,formatTopicTarget:lW,formatUA:nW,formatUri:hW,generateKeyPair:LV,generateRandomBytes32:fm,getAccountsChains:ec,getAccountsFromNamespaces:MSe,getAddressFromAccount:RV,getAddressesFromAccounts:DSe,getAppMetadata:eW,getChainFromAccount:NV,getChainsFromAccounts:FV,getChainsFromNamespace:nb,getChainsFromNamespaces:RSe,getChainsFromRequiredNamespaces:NSe,getDidAddress:jV,getDidAddressSegments:ob,getDidChainId:BV,getEnvironment:V4,getHttpUrl:qSe,getInternalError:Xe,getJavascriptID:rW,getJavascriptOS:tW,getLastItems:aW,getNamespacedDidChainId:FSe,getNamespacesChains:vW,getNamespacesEventsForChainId:mW,getNamespacesMethodsForChainId:gW,getRelayClientMetadata:WSe,getRelayProtocolApi:Ad,getRelayProtocolName:pm,getRequiredNamespacesFromNamespaces:yW,getSdkError:vr,getUniqueValues:F4,hasOverlap:cs,hashKey:UV,hashMessage:_p,isBrowser:JV,isConformingNamespaces:lx,isExpired:oa,isNode:H4,isProposalStruct:_W,isReactNative:ZV,isSessionCompatible:bW,isSessionStruct:EW,isTypeOneEnvelope:ix,isUndefined:rn,isValidAccountId:wW,isValidAccounts:OW,isValidActions:kW,isValidArray:tf,isValidChainId:lb,isValidChains:CW,isValidController:SW,isValidErrorReason:DW,isValidEvent:NW,isValidId:TW,isValidNamespaceAccounts:AW,isValidNamespaceActions:Y4,isValidNamespaceChains:PW,isValidNamespaceMethodsOrEvents:ax,isValidNamespaces:kd,isValidNamespacesChainId:sx,isValidNamespacesEvent:BW,isValidNamespacesRequest:FW,isValidNumber:sb,isValidObject:Jc,isValidParams:un,isValidRelay:X4,isValidRelays:$W,isValidRequest:MW,isValidRequestExpiry:jW,isValidRequiredNamespaces:IW,isValidResponse:RW,isValidString:gr,isValidUrl:xW,mapEntries:YSe,mapToObj:W4,objToMap:q4,parseAccountId:N4,parseChainId:TV,parseContextNames:iW,parseExpirerTarget:K4,parseRelayParams:fW,parseUri:dW,serialize:qV,validateDecoding:GV,validateEncoding:z4},Symbol.toStringTag,{value:"Module"})),s9e="PARSE_ERROR",l9e="INVALID_REQUEST",c9e="METHOD_NOT_FOUND",u9e="INVALID_PARAMS",LW="INTERNAL_ERROR",Z4="SERVER_ERROR",f9e=[-32700,-32600,-32601,-32602,-32603],Id={[s9e]:{code:-32700,message:"Parse error"},[l9e]:{code:-32600,message:"Invalid Request"},[c9e]:{code:-32601,message:"Method not found"},[u9e]:{code:-32602,message:"Invalid params"},[LW]:{code:-32603,message:"Internal error"},[Z4]:{code:-32e3,message:"Server error"}},zW=Z4;function d9e(e){return f9e.includes(e)}function Yk(e){return Object.keys(Id).includes(e)?Id[e]:Id[zW]}function p9e(e){const t=Object.values(Id).find(r=>r.code===e);return t||Id[zW]}function h9e(e,t,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${t}`):e}var UW={},Xi={},Xk;function v9e(){if(Xk)return Xi;Xk=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.isBrowserCryptoAvailable=Xi.getSubtleCrypto=Xi.getBrowerCrypto=void 0;function e(){return(Le==null?void 0:Le.crypto)||(Le==null?void 0:Le.msCrypto)||{}}Xi.getBrowerCrypto=e;function t(){const n=e();return n.subtle||n.webkitSubtle}Xi.getSubtleCrypto=t;function r(){return!!e()&&!!t()}return Xi.isBrowserCryptoAvailable=r,Xi}var Zi={},Zk;function g9e(){if(Zk)return Zi;Zk=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.isBrowser=Zi.isNode=Zi.isReactNative=void 0;function e(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}Zi.isReactNative=e;function t(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}Zi.isNode=t;function r(){return!e()&&!t()}return Zi.isBrowser=r,Zi}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Rn;t.__exportStar(v9e(),e),t.__exportStar(g9e(),e)})(UW);function m9e(e=3){const t=Date.now()*Math.pow(10,e),r=Math.floor(Math.random()*Math.pow(10,e));return t+r}function cb(e,t,r){return{id:r||m9e(),jsonrpc:"2.0",method:e,params:t}}function J4(e,t){return{id:e,jsonrpc:"2.0",result:t}}function Q4(e,t,r){return{id:e,jsonrpc:"2.0",error:y9e(t,r)}}function y9e(e,t){return typeof e>"u"?Yk(LW):(typeof e=="string"&&(e=Object.assign(Object.assign({},Yk(Z4)),{message:e})),typeof t<"u"&&(e.data=t),d9e(e.code)&&(e=p9e(e.code)),e)}class b9e{}class w9e extends b9e{constructor(){super()}}class x9e extends w9e{constructor(t){super()}}const _9e="^wss?:";function E9e(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(!(!t||!t.length))return t[0]}function S9e(e,t){const r=E9e(e);return typeof r>"u"?!1:new RegExp(t).test(r)}function Jk(e){return S9e(e,_9e)}function C9e(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}function HW(e){return typeof e=="object"&&"id"in e&&"jsonrpc"in e&&e.jsonrpc==="2.0"}function e8(e){return HW(e)&&"method"in e}function t8(e){return HW(e)&&(ta(e)||jo(e))}function ta(e){return"result"in e}function jo(e){return"error"in e}class P9e extends x9e{constructor(t){super(t),this.events=new ni.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(t),this.connection.connected&&this.registerEventListeners()}async connect(t=this.connection){await this.open(t)}async disconnect(){await this.close()}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async request(t,r){return this.requestStrict(cb(t.method,t.params||[]),r)}async requestStrict(t,r){return new Promise(async(n,o)=>{if(!this.connection.connected)try{await this.open()}catch(i){o(i)}this.events.on(`${t.id}`,i=>{jo(i)?o(i.error):n(i.result)});try{await this.connection.send(t,r)}catch(i){o(i)}})}setConnection(t=this.connection){return t}onPayload(t){this.events.emit("payload",t),t8(t)?this.events.emit(`${t.id}`,t):this.events.emit("message",{type:t.method,data:t.params})}onClose(t){t&&t.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${t.code} ${t.reason?`(${t.reason})`:""}`)),this.events.emit("disconnect")}async open(t=this.connection){this.connection===t&&this.connection.connected||(this.connection.connected&&this.close(),typeof t=="string"&&(await this.connection.open(t),t=this.connection),this.connection=this.setConnection(t),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",t=>this.onPayload(t)),this.connection.on("close",t=>this.onClose(t)),this.connection.on("error",t=>this.events.emit("error",t)),this.connection.on("register_error",t=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const Qk=10,O9e=()=>typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:require("ws"),A9e=()=>typeof window<"u",k9e=O9e();class I9e{constructor(t){if(this.url=t,this.events=new ni.EventEmitter,this.registering=!1,!Jk(t))throw new Error(`Provided URL is not compatible with WebSocket connection: ${t}`);this.url=t}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async open(t=this.url){await this.register(t)}async close(){return new Promise((t,r)=>{if(typeof this.socket>"u"){r(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),t()},this.socket.close()})}async send(t,r){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(O4(t))}catch(n){this.onError(t.id,n)}}register(t=this.url){if(!Jk(t))throw new Error(`Provided URL is not compatible with WebSocket connection: ${t}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,o)=>{this.events.once("register_error",i=>{this.resetMaxListeners(),o(i)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return o(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=t,this.registering=!0,new Promise((r,n)=>{const o=UW.isReactNative()?void 0:{rejectUnauthorized:!C9e(t)},i=new k9e(t,[],o);A9e()?i.onerror=a=>{const s=a;n(this.emitError(s.error))}:i.on("error",a=>{n(this.emitError(a))}),i.onopen=()=>{this.onOpen(i),r(i)}})}onOpen(t){t.onmessage=r=>this.onPayload(r),t.onclose=r=>this.onClose(r),this.socket=t,this.registering=!1,this.events.emit("open")}onClose(t){this.socket=void 0,this.registering=!1,this.events.emit("close",t)}onPayload(t){if(typeof t.data>"u")return;const r=typeof t.data=="string"?lV(t.data):t.data;this.events.emit("payload",r)}onError(t,r){const n=this.parseError(r),o=n.message||n.toString(),i=Q4(t,o);this.events.emit("payload",i)}parseError(t,r=this.url){return h9e(t,r,"WS")}resetMaxListeners(){this.events.getMaxListeners()>Qk&&this.events.setMaxListeners(Qk)}emitError(t){const r=this.parseError(new Error((t==null?void 0:t.message)||`WebSocket connection failed for URL: ${this.url}`));return this.events.emit("register_error",r),r}}var hm={exports:{}};hm.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",o=1,i=2,a=9007199254740991,s="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",f="[object Date]",d="[object Error]",p="[object Function]",h="[object GeneratorFunction]",m="[object Map]",_="[object Number]",w="[object Null]",y="[object Object]",C="[object Promise]",I="[object Proxy]",F="[object RegExp]",O="[object Set]",g="[object String]",D="[object Symbol]",H="[object Undefined]",G="[object WeakMap]",V="[object ArrayBuffer]",P="[object DataView]",S="[object Float32Array]",v="[object Float64Array]",b="[object Int8Array]",B="[object Int16Array]",M="[object Int32Array]",j="[object Uint8Array]",U="[object Uint8ClampedArray]",E="[object Uint16Array]",N="[object Uint32Array]",T=/[\\^$.*+?()[\]{}|]/g,q=/^\[object .+?Constructor\]$/,J=/^(?:0|[1-9]\d*)$/,te={};te[S]=te[v]=te[b]=te[B]=te[M]=te[j]=te[U]=te[E]=te[N]=!0,te[s]=te[l]=te[V]=te[u]=te[P]=te[f]=te[d]=te[p]=te[m]=te[_]=te[y]=te[F]=te[O]=te[g]=te[G]=!1;var ne=typeof Le=="object"&&Le&&Le.Object===Object&&Le,ce=typeof self=="object"&&self&&self.Object===Object&&self,ie=ne||ce||Function("return this")(),ue=t&&!t.nodeType&&t,A=ue&&!0&&e&&!e.nodeType&&e,K=A&&A.exports===ue,ee=K&&ne.process,se=function(){try{return ee&&ee.binding&&ee.binding("util")}catch{}}(),pe=se&&se.isTypedArray;function ge(ye,Pe){for(var Fe=-1,nt=ye==null?0:ye.length,Ut=0,wt=[];++Fe-1}function ai(ye,Pe){var Fe=this.__data__,nt=Ih(Fe,ye);return nt<0?(++this.size,Fe.push([ye,Pe])):Fe[nt][1]=Pe,this}ct.prototype.clear=Ct,ct.prototype.delete=xn,ct.prototype.get=Nn,ct.prototype.has=an,ct.prototype.set=ai;function sn(ye){var Pe=-1,Fe=ye==null?0:ye.length;for(this.clear();++Peyr))return!1;var Xt=wt.get(ye);if(Xt&&wt.get(Pe))return Xt==Pe;var Fn=-1,Oo=!0,Wr=Fe&i?new ro:void 0;for(wt.set(ye,Pe),wt.set(Pe,ye);++Fn-1&&ye%1==0&&ye-1&&ye%1==0&&ye<=a}function sE(ye){var Pe=typeof ye;return ye!=null&&(Pe=="object"||Pe=="function")}function df(ye){return ye!=null&&typeof ye=="object"}var lE=pe?Z(pe):PY;function LY(ye){return BY(ye)?_Y(ye):OY(ye)}function zY(){return[]}function UY(){return!1}e.exports=jY})(hm,hm.exports);var $9e=hm.exports;const T9e=ri($9e);function D9e(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,I=new Uint8Array(C);w!==y;){for(var F=h[w],O=0,g=C-1;(F!==0||O<_)&&g!==-1;g--,O++)F+=256*I[g]>>>0,I[g]=F%s>>>0,F=F/s>>>0;if(F!==0)throw new Error("Non-zero carry");_=O,w++}for(var D=C-_;D!==C&&I[D]===0;)D++;for(var H=l.repeat(m);D>>0,C=new Uint8Array(y);h[m];){var I=r[h.charCodeAt(m)];if(I===255)return;for(var F=0,O=y-1;(I!==0||F>>0,C[O]=I%256>>>0,I=I/256>>>0;if(I!==0)throw new Error("Non-zero carry");w=F,m++}if(h[m]!==" "){for(var g=y-w;g!==y&&C[g]===0;)g++;for(var D=new Uint8Array(_+(y-g)),H=_;g!==y;)D[H++]=C[g++];return D}}}function p(h){var m=d(h);if(m)return m;throw new Error(`Non-${t} character`)}return{encode:f,decodeUnsafe:d,decode:p}}var M9e=D9e,R9e=M9e;const VW=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},N9e=e=>new TextEncoder().encode(e),F9e=e=>new TextDecoder().decode(e);class B9e{constructor(t,r,n){this.name=t,this.prefix=r,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class j9e{constructor(t,r,n){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return WW(this,t)}}class L9e{constructor(t){this.decoders=t}or(t){return WW(this,t)}decode(t){const r=t[0],n=this.decoders[r];if(n)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const WW=(e,t)=>new L9e({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class z9e{constructor(t,r,n,o){this.name=t,this.prefix=r,this.baseEncode=n,this.baseDecode=o,this.encoder=new B9e(t,r,n),this.decoder=new j9e(t,r,o)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const ub=({name:e,prefix:t,encode:r,decode:n})=>new z9e(e,t,r,n),dh=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:o}=R9e(r,t);return ub({prefix:e,name:t,encode:n,decode:i=>VW(o(i))})},U9e=(e,t,r,n)=>{const o={};for(let u=0;u=8&&(s-=8,a[c++]=255&l>>s)}if(s>=r||255&l<<8-s)throw new SyntaxError("Unexpected end of data");return a},H9e=(e,t,r)=>{const n=t[t.length-1]==="=",o=(1<r;)a-=r,i+=t[o&s>>a];if(a&&(i+=t[o&s<ub({prefix:t,name:e,encode(o){return H9e(o,n,r)},decode(o){return U9e(o,n,r,e)}}),V9e=ub({prefix:"\0",name:"identity",encode:e=>F9e(e),decode:e=>N9e(e)});var W9e=Object.freeze({__proto__:null,identity:V9e});const q9e=Hr({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var G9e=Object.freeze({__proto__:null,base2:q9e});const K9e=Hr({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Y9e=Object.freeze({__proto__:null,base8:K9e});const X9e=dh({prefix:"9",name:"base10",alphabet:"0123456789"});var Z9e=Object.freeze({__proto__:null,base10:X9e});const J9e=Hr({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Q9e=Hr({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var e7e=Object.freeze({__proto__:null,base16:J9e,base16upper:Q9e});const t7e=Hr({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),r7e=Hr({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),n7e=Hr({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),o7e=Hr({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),i7e=Hr({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),a7e=Hr({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),s7e=Hr({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),l7e=Hr({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),c7e=Hr({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var u7e=Object.freeze({__proto__:null,base32:t7e,base32upper:r7e,base32pad:n7e,base32padupper:o7e,base32hex:i7e,base32hexupper:a7e,base32hexpad:s7e,base32hexpadupper:l7e,base32z:c7e});const f7e=dh({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),d7e=dh({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var p7e=Object.freeze({__proto__:null,base36:f7e,base36upper:d7e});const h7e=dh({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),v7e=dh({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var g7e=Object.freeze({__proto__:null,base58btc:h7e,base58flickr:v7e});const m7e=Hr({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),y7e=Hr({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),b7e=Hr({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),w7e=Hr({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var x7e=Object.freeze({__proto__:null,base64:m7e,base64pad:y7e,base64url:b7e,base64urlpad:w7e});const qW=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),_7e=qW.reduce((e,t,r)=>(e[r]=t,e),[]),E7e=qW.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);function S7e(e){return e.reduce((t,r)=>(t+=_7e[r],t),"")}function C7e(e){const t=[];for(const r of e){const n=E7e[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(n)}return new Uint8Array(t)}const P7e=ub({prefix:"🚀",name:"base256emoji",encode:S7e,decode:C7e});var O7e=Object.freeze({__proto__:null,base256emoji:P7e}),A7e=GW,eI=128,k7e=127,I7e=~k7e,$7e=Math.pow(2,31);function GW(e,t,r){t=t||[],r=r||0;for(var n=r;e>=$7e;)t[r++]=e&255|eI,e/=128;for(;e&I7e;)t[r++]=e&255|eI,e>>>=7;return t[r]=e|0,GW.bytes=r-n+1,t}var T7e=cx,D7e=128,tI=127;function cx(e,n){var r=0,n=n||0,o=0,i=n,a,s=e.length;do{if(i>=s)throw cx.bytes=0,new RangeError("Could not decode varint");a=e[i++],r+=o<28?(a&tI)<=D7e);return cx.bytes=i-n,r}var M7e=Math.pow(2,7),R7e=Math.pow(2,14),N7e=Math.pow(2,21),F7e=Math.pow(2,28),B7e=Math.pow(2,35),j7e=Math.pow(2,42),L7e=Math.pow(2,49),z7e=Math.pow(2,56),U7e=Math.pow(2,63),H7e=function(e){return e(KW.encode(e,t,r),t),nI=e=>KW.encodingLength(e),ux=(e,t)=>{const r=t.byteLength,n=nI(e),o=n+nI(r),i=new Uint8Array(o+r);return rI(e,i,0),rI(r,i,n),i.set(t,o),new W7e(e,r,t,i)};class W7e{constructor(t,r,n,o){this.code=t,this.size=r,this.digest=n,this.bytes=o}}const YW=({name:e,code:t,encode:r})=>new q7e(e,t,r);class q7e{constructor(t,r,n){this.name=t,this.code=r,this.encode=n}digest(t){if(t instanceof Uint8Array){const r=this.encode(t);return r instanceof Uint8Array?ux(this.code,r):r.then(n=>ux(this.code,n))}else throw Error("Unknown type, must be binary type")}}const XW=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),G7e=YW({name:"sha2-256",code:18,encode:XW("SHA-256")}),K7e=YW({name:"sha2-512",code:19,encode:XW("SHA-512")});var Y7e=Object.freeze({__proto__:null,sha256:G7e,sha512:K7e});const ZW=0,X7e="identity",JW=VW,Z7e=e=>ux(ZW,JW(e)),J7e={code:ZW,name:X7e,encode:JW,digest:Z7e};var Q7e=Object.freeze({__proto__:null,identity:J7e});new TextEncoder,new TextDecoder;const oI={...W9e,...G9e,...Y9e,...Z9e,...e7e,...u7e,...p7e,...g7e,...x7e,...O7e};({...Y7e,...Q7e});function eCe(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}function QW(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const iI=QW("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),Ow=QW("ascii","a",e=>{let t="a";for(let r=0;r{e=e.substring(1);const t=eCe(e.length);for(let r=0;r{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}},this.has=n=>(this.isInitialized(),this.keychain.has(n)),this.set=async(n,o)=>{this.isInitialized(),this.keychain.set(n,o),await this.persist()},this.get=n=>{this.isInitialized();const o=this.keychain.get(n);if(typeof o>"u"){const{message:i}=Xe("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(i)}return o},this.del=async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()},this.core=t,this.logger=Mt.generateChildLogger(r,this.name)}get context(){return Mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setKeyChain(t){await this.core.storage.setItem(this.storageKey,W4(t))}async getKeyChain(){const t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?q4(t):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}}class ICe{constructor(t,r,n){this.core=t,this.logger=r,this.name=aCe,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=o=>(this.isInitialized(),this.keychain.has(o)),this.getClientId=async()=>{this.isInitialized();const o=await this.getClientSeed(),i=Nk(o);return EV(i.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const o=LV();return this.setPrivateKey(o.publicKey,o.privateKey)},this.signJWT=async o=>{this.isInitialized();const i=await this.getClientSeed(),a=Nk(i),s=fm();return await eSe(s,o,sCe,a)},this.generateSharedKey=(o,i,a)=>{this.isInitialized();const s=this.getPrivateKey(o),l=zV(s,i);return this.setSymKey(l,a)},this.setSymKey=async(o,i)=>{this.isInitialized();const a=i||UV(o);return await this.keychain.set(a,o),a},this.deleteKeyPair=async o=>{this.isInitialized(),await this.keychain.del(o)},this.deleteSymKey=async o=>{this.isInitialized(),await this.keychain.del(o)},this.encode=async(o,i,a)=>{this.isInitialized();const s=z4(a),l=O4(i);if(ix(s)){const d=s.senderPublicKey,p=s.receiverPublicKey;o=await this.generateSharedKey(d,p)}const c=this.getSymKey(o),{type:u,senderPublicKey:f}=s;return VV({type:u,symKey:c,message:l,senderPublicKey:f})},this.decode=async(o,i,a)=>{this.isInitialized();const s=GV(i,a);if(ix(s)){const u=s.receiverPublicKey,f=s.senderPublicKey;o=await this.generateSharedKey(u,f)}const l=this.getSymKey(o),c=WV({symKey:l,encoded:i});return lV(c)},this.core=t,this.logger=Mt.generateChildLogger(r,this.name),this.keychain=n||new kCe(this.core,this.logger)}get context(){return Mt.getLoggerContext(this.logger)}getPayloadType(t){const r=ab(t);return ef(r.type)}async setPrivateKey(t,r){return await this.keychain.set(t,r),t}getPrivateKey(t){return this.keychain.get(t)}async getClientSeed(){let t="";try{t=this.keychain.get(aI)}catch{t=fm(),await this.keychain.set(aI,t)}return rCe(t,"base16")}getSymKey(t){return this.keychain.get(t)}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}}let $Ce=class extends s8e{constructor(t,r){super(t,r),this.logger=t,this.core=r,this.messages=new Map,this.name=uCe,this.version=fCe,this.initialized=!1,this.storagePrefix=Fs,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}},this.set=async(n,o)=>{this.isInitialized();const i=_p(o);let a=this.messages.get(n);return typeof a>"u"&&(a={}),typeof a[i]<"u"||(a[i]=o,this.messages.set(n,a),await this.persist()),i},this.get=n=>{this.isInitialized();let o=this.messages.get(n);return typeof o>"u"&&(o={}),o},this.has=(n,o)=>{this.isInitialized();const i=this.get(n),a=_p(o);return typeof i[a]<"u"},this.del=async n=>{this.isInitialized(),this.messages.delete(n),await this.persist()},this.logger=Mt.generateChildLogger(t,this.name),this.core=r}get context(){return Mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setRelayerMessages(t){await this.core.storage.setItem(this.storageKey,W4(t))}async getRelayerMessages(){const t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?q4(t):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}};class TCe extends l8e{constructor(t,r){super(t,r),this.relayer=t,this.logger=r,this.events=new ni.EventEmitter,this.name=pCe,this.queue=new Map,this.publishTimeout=1e4,this.publish=async(n,o,i)=>{this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:o,opts:i}});try{const a=(i==null?void 0:i.ttl)||dCe,s=pm(i),l=(i==null?void 0:i.prompt)||!1,c=(i==null?void 0:i.tag)||0,u={topic:n,message:o,opts:{ttl:a,relay:s,prompt:l,tag:c}},f=_p(o);this.queue.set(f,u);try{await await Ep(this.rpcPublish(n,o,a,s,l,c),this.publishTimeout),this.relayer.events.emit(br.publish,u)}catch{this.logger.debug("Publishing Payload stalled"),this.relayer.events.emit(br.connection_stalled);return}this.onPublish(f,u),this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:o,opts:i}})}catch(a){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(a),a}},this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.relayer=t,this.logger=Mt.generateChildLogger(r,this.name),this.registerEventListeners()}get context(){return Mt.getLoggerContext(this.logger)}rpcPublish(t,r,n,o,i,a){var s,l,c,u;const f={method:Ad(o.protocol).publish,params:{topic:t,message:r,ttl:n,prompt:i,tag:a}};return rn((s=f.params)==null?void 0:s.prompt)&&((l=f.params)==null||delete l.prompt),rn((c=f.params)==null?void 0:c.tag)&&((u=f.params)==null||delete u.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:f}),this.relayer.request(f)}onPublish(t,r){this.queue.delete(t)}checkQueue(){this.queue.forEach(async t=>{const{topic:r,message:n,opts:o}=t;await this.publish(r,n,o)})}registerEventListeners(){this.relayer.core.heartbeat.on(ch.HEARTBEAT_EVENTS.pulse,()=>{this.checkQueue()})}}class DCe{constructor(){this.map=new Map,this.set=(t,r)=>{const n=this.get(t);this.exists(t,r)||this.map.set(t,[...n,r])},this.get=t=>this.map.get(t)||[],this.exists=(t,r)=>this.get(t).includes(r),this.delete=(t,r)=>{if(typeof r>"u"){this.map.delete(t);return}if(!this.map.has(t))return;const n=this.get(t);if(!this.exists(t,r))return;const o=n.filter(i=>i!==r);if(!o.length){this.map.delete(t);return}this.map.set(t,o)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var MCe=Object.defineProperty,RCe=Object.defineProperties,NCe=Object.getOwnPropertyDescriptors,sI=Object.getOwnPropertySymbols,FCe=Object.prototype.hasOwnProperty,BCe=Object.prototype.propertyIsEnumerable,lI=(e,t,r)=>t in e?MCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xf=(e,t)=>{for(var r in t||(t={}))FCe.call(t,r)&&lI(e,r,t[r]);if(sI)for(var r of sI(t))BCe.call(t,r)&&lI(e,r,t[r]);return e},Aw=(e,t)=>RCe(e,NCe(t));class jCe extends f8e{constructor(t,r){super(t,r),this.relayer=t,this.logger=r,this.subscriptions=new Map,this.topicMap=new DCe,this.events=new ni.EventEmitter,this.name=wCe,this.version=xCe,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Fs,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restart(),this.registerEventListeners(),this.onEnable(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(n,o)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:o}});try{const i=pm(o),a={topic:n,relay:i};this.pending.set(n,a);const s=await this.rpcSubscribe(n,i);return this.onSubscribe(s,a),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:o}}),s}catch(i){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(i),i}},this.unsubscribe=async(n,o)=>{await this.restartToComplete(),this.isInitialized(),typeof(o==null?void 0:o.id)<"u"?await this.unsubscribeById(n,o.id,o):await this.unsubscribeByTopic(n,o)},this.isSubscribed=async n=>this.topics.includes(n)?!0:await new Promise((o,i)=>{const a=new pt.Watch;a.start(this.pendingSubscriptionWatchLabel);const s=setInterval(()=>{!this.pending.has(n)&&this.topics.includes(n)&&(clearInterval(s),a.stop(this.pendingSubscriptionWatchLabel),o(!0)),a.elapsed(this.pendingSubscriptionWatchLabel)>=_Ce&&(clearInterval(s),a.stop(this.pendingSubscriptionWatchLabel),i(!1))},this.pollingInterval)}),this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=t,this.logger=Mt.generateChildLogger(r,this.name),this.clientId=""}get context(){return Mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(t,r){let n=!1;try{n=this.getSubscription(t).topic===r}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(t,r){const n=this.topicMap.get(t);await Promise.all(n.map(async o=>await this.unsubscribeById(t,o,r)))}async unsubscribeById(t,r,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:r,opts:n}});try{const o=pm(n);await this.rpcUnsubscribe(t,r,o);const i=vr("USER_DISCONNECTED",`${this.name}, ${t}`);await this.onUnsubscribe(t,r,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:r,opts:n}})}catch(o){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(o),o}}async rpcSubscribe(t,r){const n={method:Ad(r.protocol).subscribe,params:{topic:t}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await Ep(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(br.connection_stalled)}return _p(t+this.clientId)}async rpcBatchSubscribe(t){if(!t.length)return;const r=t[0].relay,n={method:Ad(r.protocol).batchSubscribe,params:{topics:t.map(o=>o.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await Ep(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(br.connection_stalled)}}rpcUnsubscribe(t,r,n){const o={method:Ad(n.protocol).unsubscribe,params:{topic:t,id:r}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:o}),this.relayer.request(o)}onSubscribe(t,r){this.setSubscription(t,Aw(Xf({},r),{id:t})),this.pending.delete(r.topic)}onBatchSubscribe(t){t.length&&t.forEach(r=>{this.setSubscription(r.id,Xf({},r)),this.pending.delete(r.topic)})}async onUnsubscribe(t,r,n){this.events.removeAllListeners(r),this.hasSubscription(r,t)&&this.deleteSubscription(r,n),await this.relayer.messages.del(t)}async setRelayerSubscriptions(t){await this.relayer.core.storage.setItem(this.storageKey,t)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(t,r){this.subscriptions.has(t)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:t,subscription:r}),this.addSubscription(t,r))}addSubscription(t,r){this.subscriptions.set(t,Xf({},r)),this.topicMap.set(r.topic,t),this.events.emit(vi.created,r)}getSubscription(t){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:t});const r=this.subscriptions.get(t);if(!r){const{message:n}=Xe("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(n)}return r}deleteSubscription(t,r){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:t,reason:r});const n=this.getSubscription(t);this.subscriptions.delete(t),this.topicMap.delete(n.topic,t),this.events.emit(vi.deleted,Aw(Xf({},n),{reason:r}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(vi.sync)}async reset(){if(!this.cached.length)return;const t=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let r=0;r"u"||!t.length)return;if(this.subscriptions.size){const{message:r}=Xe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(t){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(t)}}async batchSubscribe(t){if(!t.length)return;const r=await this.rpcBatchSubscribe(t);tf(r)&&this.onBatchSubscribe(r.map((n,o)=>Aw(Xf({},t[o]),{id:n})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(this.relayer.transportExplicitlyClosed)return;const t=[];this.pending.forEach(r=>{t.push(r)}),await this.batchSubscribe(t)}registerEventListeners(){this.relayer.core.heartbeat.on(ch.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(br.connect,async()=>{await this.onConnect()}),this.relayer.on(br.disconnect,()=>{this.onDisconnect()}),this.events.on(vi.created,async t=>{const r=vi.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),await this.persist()}),this.events.on(vi.deleted,async t=>{const r=vi.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}async restartToComplete(){this.restartInProgress&&await new Promise(t=>{const r=setInterval(()=>{this.restartInProgress||(clearInterval(r),t())},this.pollingInterval)})}}var LCe=Object.defineProperty,cI=Object.getOwnPropertySymbols,zCe=Object.prototype.hasOwnProperty,UCe=Object.prototype.propertyIsEnumerable,uI=(e,t,r)=>t in e?LCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,HCe=(e,t)=>{for(var r in t||(t={}))zCe.call(t,r)&&uI(e,r,t[r]);if(cI)for(var r of cI(t))UCe.call(t,r)&&uI(e,r,t[r]);return e};class VCe extends c8e{constructor(t){super(t),this.protocol="wc",this.version=2,this.events=new ni.EventEmitter,this.name=vCe,this.transportExplicitlyClosed=!1,this.initialized=!1,this.reconnecting=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.request=async r=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(r)}catch(n){throw this.logger.debug("Failed to Publish Request"),this.logger.error(n),n}},this.core=t.core,this.logger=typeof t.logger<"u"&&typeof t.logger!="string"?Mt.generateChildLogger(t.logger,this.name):C4(Mt.getDefaultLoggerOptions({level:t.logger||hCe})),this.messages=new $Ce(this.logger,t.core),this.subscriber=new jCe(this,this.logger),this.publisher=new TCe(this,this.logger),this.relayUrl=(t==null?void 0:t.relayUrl)||rq,this.projectId=t.projectId,this.provider={}}async init(){this.logger.trace("Initialized"),await this.createProvider(),await Promise.all([this.messages.init(),this.transportOpen(),this.subscriber.init()]),this.registerEventListeners(),this.initialized=!0}get context(){return Mt.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(t,r,n){this.isInitialized(),await this.publisher.publish(t,r,n),await this.recordMessageEvent({topic:t,message:r,publishedAt:Date.now()})}async subscribe(t,r){this.isInitialized();let n="";return await Promise.all([new Promise(o=>{this.subscriber.once(vi.created,i=>{i.topic===t&&o()})}),new Promise(async o=>{n=await this.subscriber.subscribe(t,r),o()})]),n}async unsubscribe(t,r){this.isInitialized(),await this.subscriber.unsubscribe(t,r)}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async transportClose(){this.transportExplicitlyClosed=!0,this.connected&&(await this.provider.disconnect(),this.events.emit(br.transport_closed))}async transportOpen(t){if(!this.reconnecting){this.relayUrl=t||this.relayUrl,this.transportExplicitlyClosed=!1,this.reconnecting=!0;try{await Promise.all([new Promise(r=>{this.initialized||r(),this.subscriber.once(vi.resubscribed,()=>{r()})}),await Promise.race([new Promise(async(r,n)=>{await Ep(this.provider.connect(),5e3,"socket stalled").catch(o=>n(o)).then(()=>r()).finally(()=>this.removeListener(br.transport_closed,this.rejectTransportOpen))}),new Promise(r=>this.once(br.transport_closed,this.rejectTransportOpen))])])}catch(r){this.logger.error(r);const n=r;if(!this.isConnectionStalled(n.message))throw r;this.events.emit(br.transport_closed)}finally{this.reconnecting=!1}}}async restartTransport(t){this.transportExplicitlyClosed||(this.relayUrl=t||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}isConnectionStalled(t){return this.staleConnectionErrors.some(r=>t.includes(r))}rejectTransportOpen(){throw new Error("closeTransport called before connection was established")}async createProvider(){const t=await this.core.crypto.signJWT(this.relayUrl);this.provider=new P9e(new I9e(oW({sdkVersion:yCe,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:t,useOnCloseEvent:!0}))),this.registerProviderListeners()}async recordMessageEvent(t){const{topic:r,message:n}=t;await this.messages.set(r,n)}async shouldIgnoreMessageEvent(t){const{topic:r,message:n}=t;return await this.subscriber.isSubscribed(r)?this.messages.has(r,n):!0}async onProviderPayload(t){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:t}),e8(t)){if(!t.method.endsWith(gCe))return;const r=t.params,{topic:n,message:o,publishedAt:i}=r.data,a={topic:n,message:o,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(HCe({type:"event",event:r.id},a)),this.events.emit(r.id,a),await this.acknowledgePayload(t),await this.onMessageEvent(a)}}async onMessageEvent(t){await this.shouldIgnoreMessageEvent(t)||(this.events.emit(br.message,t),await this.recordMessageEvent(t))}async acknowledgePayload(t){const r=J4(t.id,!0);await this.provider.connection.send(r)}registerProviderListeners(){this.provider.on(N0.payload,t=>this.onProviderPayload(t)),this.provider.on(N0.connect,()=>{this.events.emit(br.connect)}),this.provider.on(N0.disconnect,()=>{this.onProviderDisconnect()}),this.provider.on(N0.error,t=>{this.logger.error(t),this.events.emit(br.error,t)})}registerEventListeners(){this.events.on(br.connection_stalled,async()=>{await this.restartTransport()})}onProviderDisconnect(){this.events.emit(br.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||setTimeout(async()=>{await this.restartTransport()},pt.toMiliseconds(mCe))}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}async toEstablishConnection(){if(!this.connected){if(this.connecting)return await new Promise(t=>{const r=setInterval(()=>{this.connected&&(clearInterval(r),t())},this.connectionStatusPollingInterval)});await this.restartTransport()}}}var WCe=Object.defineProperty,fI=Object.getOwnPropertySymbols,qCe=Object.prototype.hasOwnProperty,GCe=Object.prototype.propertyIsEnumerable,dI=(e,t,r)=>t in e?WCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pI=(e,t)=>{for(var r in t||(t={}))qCe.call(t,r)&&dI(e,r,t[r]);if(fI)for(var r of fI(t))GCe.call(t,r)&&dI(e,r,t[r]);return e};class fb extends u8e{constructor(t,r,n,o=Fs,i=void 0){super(t,r,n,o),this.core=t,this.logger=r,this.name=n,this.map=new Map,this.version=bCe,this.cached=[],this.initialized=!1,this.storagePrefix=Fs,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(a=>{this.getKey&&a!==null&&!rn(a)?this.map.set(this.getKey(a),a):_W(a)?this.map.set(a.id,a):EW(a)&&this.map.set(a.topic,a)}),this.cached=[],this.initialized=!0)},this.set=async(a,s)=>{this.isInitialized(),this.map.has(a)?await this.update(a,s):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:a,value:s}),this.map.set(a,s),await this.persist())},this.get=a=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:a}),this.getData(a)),this.getAll=a=>(this.isInitialized(),a?this.values.filter(s=>Object.keys(a).every(l=>T9e(s[l],a[l]))):this.values),this.update=async(a,s)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:a,update:s});const l=pI(pI({},this.getData(a)),s);this.map.set(a,l),await this.persist()},this.delete=async(a,s)=>{this.isInitialized(),this.map.has(a)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:a,reason:s}),this.map.delete(a),await this.persist())},this.logger=Mt.generateChildLogger(r,this.name),this.storagePrefix=o,this.getKey=i}get context(){return Mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(t){await this.core.storage.setItem(this.storageKey,t)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(t){const r=this.map.get(t);if(!r){const{message:n}=Xe("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.error(n),new Error(n)}return r}async persist(){await this.setDataStore(this.values)}async restore(){try{const t=await this.getDataStore();if(typeof t>"u"||!t.length)return;if(this.map.size){const{message:r}=Xe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(t){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(t)}}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}}class KCe{constructor(t,r){this.core=t,this.logger=r,this.name=ECe,this.version=SCe,this.events=new rV,this.initialized=!1,this.storagePrefix=Fs,this.ignoredPayloadTypes=[Ks],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]},this.create=async()=>{this.isInitialized();const n=fm(),o=await this.core.crypto.setSymKey(n),i=Bo(pt.FIVE_MINUTES),a={protocol:tq},s={topic:o,expiry:i,relay:a,active:!1},l=hW({protocol:this.core.protocol,version:this.core.version,topic:o,symKey:n,relay:a});return await this.pairings.set(o,s),await this.core.relayer.subscribe(o),this.core.expirer.set(o,i),{topic:o,uri:l}},this.pair=async n=>{this.isInitialized(),this.isValidPair(n);const{topic:o,symKey:i,relay:a}=dW(n.uri);if(this.pairings.keys.includes(o))throw new Error(`Pairing already exists: ${o}`);if(this.core.crypto.hasKeys(o))throw new Error(`Keychain already exists: ${o}`);const s=Bo(pt.FIVE_MINUTES),l={topic:o,relay:a,expiry:s,active:!1};return await this.pairings.set(o,l),await this.core.crypto.setSymKey(i,o),await this.core.relayer.subscribe(o,{relay:a}),this.core.expirer.set(o,s),n.activatePairing&&await this.activate({topic:o}),l},this.activate=async({topic:n})=>{this.isInitialized();const o=Bo(pt.THIRTY_DAYS);await this.pairings.update(n,{active:!0,expiry:o}),this.core.expirer.set(n,o)},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);const{topic:o}=n;if(this.pairings.keys.includes(o)){const i=await this.sendRequest(o,"wc_pairingPing",{}),{done:a,resolve:s,reject:l}=Za();this.events.once(tr("pairing_ping",i),({error:c})=>{c?l(c):s()}),await a()}},this.updateExpiry=async({topic:n,expiry:o})=>{this.isInitialized(),await this.pairings.update(n,{expiry:o})},this.updateMetadata=async({topic:n,metadata:o})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:o})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:o}=n;this.pairings.keys.includes(o)&&(await this.sendRequest(o,"wc_pairingDelete",vr("USER_DISCONNECTED")),await this.deletePairing(o))},this.sendRequest=async(n,o,i)=>{const a=cb(o,i),s=await this.core.crypto.encode(n,a),l=Yf[o].req;return this.core.history.set(n,a),await this.core.relayer.publish(n,s,l),a.id},this.sendResult=async(n,o,i)=>{const a=J4(n,i),s=await this.core.crypto.encode(o,a),l=await this.core.history.get(o,n),c=Yf[l.request.method].res;await this.core.relayer.publish(o,s,c),await this.core.history.resolve(a)},this.sendError=async(n,o,i)=>{const a=Q4(n,i),s=await this.core.crypto.encode(o,a),l=await this.core.history.get(o,n),c=Yf[l.request.method]?Yf[l.request.method].res:Yf.unregistered_method.res;await this.core.relayer.publish(o,s,c),await this.core.history.resolve(a)},this.deletePairing=async(n,o)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,vr("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),o?Promise.resolve():this.core.expirer.del(n)])},this.cleanup=async()=>{const n=this.pairings.getAll().filter(o=>oa(o.expiry));await Promise.all(n.map(o=>this.deletePairing(o.topic)))},this.onRelayEventRequest=n=>{const{topic:o,payload:i}=n,a=i.method;if(this.pairings.keys.includes(o))switch(a){case"wc_pairingPing":return this.onPairingPingRequest(o,i);case"wc_pairingDelete":return this.onPairingDeleteRequest(o,i);default:return this.onUnknownRpcMethodRequest(o,i)}},this.onRelayEventResponse=async n=>{const{topic:o,payload:i}=n,a=(await this.core.history.get(o,i.id)).request.method;if(this.pairings.keys.includes(o))switch(a){case"wc_pairingPing":return this.onPairingPingResponse(o,i);default:return this.onUnknownRpcMethodResponse(a)}},this.onPairingPingRequest=async(n,o)=>{const{id:i}=o;try{this.isValidPing({topic:n}),await this.sendResult(i,n,!0),this.events.emit("pairing_ping",{id:i,topic:n})}catch(a){await this.sendError(i,n,a),this.logger.error(a)}},this.onPairingPingResponse=(n,o)=>{const{id:i}=o;setTimeout(()=>{ta(o)?this.events.emit(tr("pairing_ping",i),{}):jo(o)&&this.events.emit(tr("pairing_ping",i),{error:o.error})},500)},this.onPairingDeleteRequest=async(n,o)=>{const{id:i}=o;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit("pairing_delete",{id:i,topic:n})}catch(a){await this.sendError(i,n,a),this.logger.error(a)}},this.onUnknownRpcMethodRequest=async(n,o)=>{const{id:i,method:a}=o;try{if(this.registeredMethods.includes(a))return;const s=vr("WC_METHOD_UNSUPPORTED",a);await this.sendError(i,n,s),this.logger.error(s)}catch(s){await this.sendError(i,n,s),this.logger.error(s)}},this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(vr("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{if(!un(n)){const{message:o}=Xe("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(o)}if(!xW(n.uri)){const{message:o}=Xe("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(o)}},this.isValidPing=async n=>{if(!un(n)){const{message:i}=Xe("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(i)}const{topic:o}=n;await this.isValidPairingTopic(o)},this.isValidDisconnect=async n=>{if(!un(n)){const{message:i}=Xe("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(i)}const{topic:o}=n;await this.isValidPairingTopic(o)},this.isValidPairingTopic=async n=>{if(!gr(n,!1)){const{message:o}=Xe("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(o)}if(!this.pairings.keys.includes(n)){const{message:o}=Xe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(o)}if(oa(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:o}=Xe("EXPIRED",`pairing topic: ${n}`);throw new Error(o)}},this.core=t,this.logger=Mt.generateChildLogger(r,this.name),this.pairings=new fb(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Mt.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}registerRelayerEvents(){this.core.relayer.on(br.message,async t=>{const{topic:r,message:n}=t;if(this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const o=await this.core.crypto.decode(r,n);e8(o)?(this.core.history.set(r,o),this.onRelayEventRequest({topic:r,payload:o})):t8(o)&&(await this.core.history.resolve(o),this.onRelayEventResponse({topic:r,payload:o}))})}registerExpirerEvents(){this.core.expirer.on(lo.expired,async t=>{const{topic:r}=K4(t.target);r&&this.pairings.keys.includes(r)&&(await this.deletePairing(r,!0),this.events.emit("pairing_expire",{topic:r}))})}}class YCe extends a8e{constructor(t,r){super(t,r),this.core=t,this.logger=r,this.records=new Map,this.events=new ni.EventEmitter,this.name=CCe,this.version=PCe,this.cached=[],this.initialized=!1,this.storagePrefix=Fs,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(n,o,i)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:o,chainId:i}),this.records.has(o.id))return;const a={id:o.id,topic:n,request:{method:o.method,params:o.params||null},chainId:i};this.records.set(a.id,a),this.events.emit(ui.created,a)},this.resolve=async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const o=await this.getRecord(n.id);typeof o.response>"u"&&(o.response=jo(n)?{error:n.error}:{result:n.result},this.records.set(o.id,o),this.events.emit(ui.updated,o))},this.get=async(n,o)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:o}),await this.getRecord(o)),this.delete=(n,o)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:o}),this.values.forEach(i=>{if(i.topic===n){if(typeof o<"u"&&i.id!==o)return;this.records.delete(i.id),this.events.emit(ui.deleted,i)}})},this.exists=async(n,o)=>(this.isInitialized(),this.records.has(o)?(await this.getRecord(o)).topic===n:!1),this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.logger=Mt.generateChildLogger(r,this.name)}get context(){return Mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const t=[];return this.values.forEach(r=>{if(typeof r.response<"u")return;const n={topic:r.topic,request:cb(r.request.method,r.request.params,r.id),chainId:r.chainId};return t.push(n)}),t}async setJsonRpcRecords(t){await this.core.storage.setItem(this.storageKey,t)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(t){this.isInitialized();const r=this.records.get(t);if(!r){const{message:n}=Xe("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(n)}return r}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(ui.sync)}async restore(){try{const t=await this.getJsonRpcRecords();if(typeof t>"u"||!t.length)return;if(this.records.size){const{message:r}=Xe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(t){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(t)}}registerEventListeners(){this.events.on(ui.created,t=>{const r=ui.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:t}),this.persist()}),this.events.on(ui.updated,t=>{const r=ui.updated;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:t}),this.persist()}),this.events.on(ui.deleted,t=>{const r=ui.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:t}),this.persist()})}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}}class XCe extends d8e{constructor(t,r){super(t,r),this.core=t,this.logger=r,this.expirations=new Map,this.events=new ni.EventEmitter,this.name=OCe,this.version=ACe,this.cached=[],this.initialized=!1,this.storagePrefix=Fs,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=n=>{try{const o=this.formatTarget(n);return typeof this.getExpiration(o)<"u"}catch{return!1}},this.set=(n,o)=>{this.isInitialized();const i=this.formatTarget(n),a={target:i,expiry:o};this.expirations.set(i,a),this.checkExpiry(i,a),this.events.emit(lo.created,{target:i,expiration:a})},this.get=n=>{this.isInitialized();const o=this.formatTarget(n);return this.getExpiration(o)},this.del=n=>{if(this.isInitialized(),this.has(n)){const o=this.formatTarget(n),i=this.getExpiration(o);this.expirations.delete(o),this.events.emit(lo.deleted,{target:o,expiration:i})}},this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.logger=Mt.generateChildLogger(r,this.name)}get context(){return Mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(t){if(typeof t=="string")return lW(t);if(typeof t=="number")return cW(t);const{message:r}=Xe("UNKNOWN_TYPE",`Target type: ${typeof t}`);throw new Error(r)}async setExpirations(t){await this.core.storage.setItem(this.storageKey,t)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(lo.sync)}async restore(){try{const t=await this.getExpirations();if(typeof t>"u"||!t.length)return;if(this.expirations.size){const{message:r}=Xe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(t){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(t)}}getExpiration(t){const r=this.expirations.get(t);if(!r){const{message:n}=Xe("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.error(n),new Error(n)}return r}checkExpiry(t,r){const{expiry:n}=r;pt.toMiliseconds(n)-Date.now()<=0&&this.expire(t,r)}expire(t,r){this.expirations.delete(t),this.events.emit(lo.expired,{target:t,expiration:r})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((t,r)=>this.checkExpiry(r,t))}registerEventListeners(){this.core.heartbeat.on(ch.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(lo.created,t=>{const r=lo.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),this.persist()}),this.events.on(lo.expired,t=>{const r=lo.expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),this.persist()}),this.events.on(lo.deleted,t=>{const r=lo.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),this.persist()})}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}}var ZCe=Object.defineProperty,hI=Object.getOwnPropertySymbols,JCe=Object.prototype.hasOwnProperty,QCe=Object.prototype.propertyIsEnumerable,vI=(e,t,r)=>t in e?ZCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gI=(e,t)=>{for(var r in t||(t={}))JCe.call(t,r)&&vI(e,r,t[r]);if(hI)for(var r of hI(t))QCe.call(t,r)&&vI(e,r,t[r]);return e};let ePe=class nq extends i8e{constructor(t){super(t),this.protocol=eq,this.version=nCe,this.name=r8,this.events=new ni.EventEmitter,this.initialized=!1,this.on=(n,o)=>this.events.on(n,o),this.once=(n,o)=>this.events.once(n,o),this.off=(n,o)=>this.events.off(n,o),this.removeListener=(n,o)=>this.events.removeListener(n,o),this.projectId=t==null?void 0:t.projectId,this.relayUrl=(t==null?void 0:t.relayUrl)||rq;const r=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:C4(Mt.getDefaultLoggerOptions({level:(t==null?void 0:t.logger)||oCe.logger}));this.logger=Mt.generateChildLogger(r,this.name),this.heartbeat=new ch.HeartBeat,this.crypto=new ICe(this,this.logger,t==null?void 0:t.keychain),this.history=new YCe(this,this.logger),this.expirer=new XCe(this,this.logger),this.storage=t!=null&&t.storage?t.storage:new V4e(gI(gI({},iCe),t==null?void 0:t.storageOptions)),this.relayer=new VCe({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new KCe(this,this.logger)}static async init(t){const r=new nq(t);return await r.initialize(),r}get context(){return Mt.getLoggerContext(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(t){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,t),this.logger.error(t.message),t}}};const tPe=ePe,n8="wc",o8=2,i8="client",db=`${n8}@${o8}:${i8}:`,b1={name:i8,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},rPe={session_proposal:"session_proposal",session_update:"session_update",session_extend:"session_extend",session_ping:"session_ping",session_delete:"session_delete",session_expire:"session_expire",session_request:"session_request",session_request_sent:"session_request_sent",session_event:"session_event",proposal_expire:"proposal_expire"},nPe={database:":memory:"},oPe={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},iPe="history",aPe="0.3",oq="proposal",sPe=pt.THIRTY_DAYS,iq="Proposal expired",aq="session",ad=pt.SEVEN_DAYS,sq="engine",yc={wc_sessionPropose:{req:{ttl:pt.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:pt.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:pt.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:pt.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:pt.ONE_DAY,prompt:!1,tag:1104},res:{ttl:pt.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:pt.ONE_DAY,prompt:!1,tag:1106},res:{ttl:pt.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:pt.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:pt.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:pt.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:pt.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:pt.ONE_DAY,prompt:!1,tag:1112},res:{ttl:pt.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:pt.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:pt.THIRTY_SECONDS,prompt:!1,tag:1115}}},w1={min:pt.FIVE_MINUTES,max:pt.SEVEN_DAYS},lq="request";var lPe=Object.defineProperty,cPe=Object.defineProperties,uPe=Object.getOwnPropertyDescriptors,mI=Object.getOwnPropertySymbols,fPe=Object.prototype.hasOwnProperty,dPe=Object.prototype.propertyIsEnumerable,yI=(e,t,r)=>t in e?lPe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,io=(e,t)=>{for(var r in t||(t={}))fPe.call(t,r)&&yI(e,r,t[r]);if(mI)for(var r of mI(t))dPe.call(t,r)&&yI(e,r,t[r]);return e},kw=(e,t)=>cPe(e,uPe(t));class pPe extends h8e{constructor(t){super(t),this.name=sq,this.events=new rV,this.initialized=!1,this.ignoredPayloadTypes=[Ks],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.client.core.pairing.register({methods:Object.keys(yc)}),this.initialized=!0)},this.connect=async r=>{this.isInitialized();const n=kw(io({},r),{requiredNamespaces:r.requiredNamespaces||{},optionalNamespaces:r.optionalNamespaces||{}});await this.isValidConnect(n);const{pairingTopic:o,requiredNamespaces:i,optionalNamespaces:a,sessionProperties:s,relays:l}=n;let c=o,u,f=!1;if(c&&(f=this.client.core.pairing.pairings.get(c).active),!c||!f){const{topic:C,uri:I}=await this.client.core.pairing.create();c=C,u=I}const d=await this.client.core.crypto.generateKeyPair(),p=io({requiredNamespaces:i,optionalNamespaces:a,relays:l??[{protocol:tq}],proposer:{publicKey:d,metadata:this.client.metadata}},s&&{sessionProperties:s}),{reject:h,resolve:m,done:_}=Za(pt.FIVE_MINUTES,iq);if(this.events.once(tr("session_connect"),async({error:C,session:I})=>{if(C)h(C);else if(I){I.self.publicKey=d;const F=kw(io({},I),{requiredNamespaces:I.requiredNamespaces,optionalNamespaces:I.optionalNamespaces});await this.client.session.set(I.topic,F),await this.setExpiry(I.topic,I.expiry),c&&await this.client.core.pairing.updateMetadata({topic:c,metadata:I.peer.metadata}),m(F)}}),!c){const{message:C}=Xe("NO_MATCHING_KEY",`connect() pairing topic: ${c}`);throw new Error(C)}const w=await this.sendRequest(c,"wc_sessionPropose",p),y=Bo(pt.FIVE_MINUTES);return await this.setProposal(w,io({id:w,expiry:y},p)),{uri:u,approval:_}},this.pair=async r=>(this.isInitialized(),await this.client.core.pairing.pair(r)),this.approve=async r=>{this.isInitialized(),await this.isValidApprove(r);const{id:n,relayProtocol:o,namespaces:i,sessionProperties:a}=r,s=this.client.proposal.get(n);let{pairingTopic:l,proposer:c,requiredNamespaces:u,optionalNamespaces:f}=s;Jc(u)||(u=yW(i,"approve()"));const d=await this.client.core.crypto.generateKeyPair(),p=c.publicKey,h=await this.client.core.crypto.generateSharedKey(d,p);l&&n&&(await this.client.core.pairing.updateMetadata({topic:l,metadata:c.metadata}),await this.sendResult(n,l,{relay:{protocol:o??"irn"},responderPublicKey:d}),await this.client.proposal.delete(n,vr("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:l}));const m=io({relay:{protocol:o??"irn"},namespaces:i,requiredNamespaces:u,optionalNamespaces:f,controller:{publicKey:d,metadata:this.client.metadata},expiry:Bo(ad)},a&&{sessionProperties:a});await this.client.core.relayer.subscribe(h);const _=await this.sendRequest(h,"wc_sessionSettle",m),{done:w,resolve:y,reject:C}=Za();this.events.once(tr("session_approve",_),({error:F})=>{F?C(F):y(this.client.session.get(h))});const I=kw(io({},m),{topic:h,acknowledged:!1,self:m.controller,peer:{publicKey:c.publicKey,metadata:c.metadata},controller:d});return await this.client.session.set(h,I),await this.setExpiry(h,Bo(ad)),{topic:h,acknowledged:w}},this.reject=async r=>{this.isInitialized(),await this.isValidReject(r);const{id:n,reason:o}=r,{pairingTopic:i}=this.client.proposal.get(n);i&&(await this.sendError(n,i,o),await this.client.proposal.delete(n,vr("USER_DISCONNECTED")))},this.update=async r=>{this.isInitialized(),await this.isValidUpdate(r);const{topic:n,namespaces:o}=r,i=await this.sendRequest(n,"wc_sessionUpdate",{namespaces:o}),{done:a,resolve:s,reject:l}=Za();return this.events.once(tr("session_update",i),({error:c})=>{c?l(c):s()}),await this.client.session.update(n,{namespaces:o}),{acknowledged:a}},this.extend=async r=>{this.isInitialized(),await this.isValidExtend(r);const{topic:n}=r,o=await this.sendRequest(n,"wc_sessionExtend",{}),{done:i,resolve:a,reject:s}=Za();return this.events.once(tr("session_extend",o),({error:l})=>{l?s(l):a()}),await this.setExpiry(n,Bo(ad)),{acknowledged:i}},this.request=async r=>{this.isInitialized(),await this.isValidRequest(r);const{chainId:n,request:o,topic:i,expiry:a}=r,s=await this.sendRequest(i,"wc_sessionRequest",{request:o,chainId:n},a),{done:l,resolve:c,reject:u}=Za(a);return this.events.once(tr("session_request",s),({error:f,result:d})=>{f?u(f):c(d)}),this.client.events.emit("session_request_sent",{topic:i,request:o,chainId:n,id:s}),await l()},this.respond=async r=>{this.isInitialized(),await this.isValidRespond(r);const{topic:n,response:o}=r,{id:i}=o;ta(o)?await this.sendResult(i,n,o.result):jo(o)&&await this.sendError(i,n,o.error),this.deletePendingSessionRequest(r.response.id,{message:"fulfilled",code:0})},this.ping=async r=>{this.isInitialized(),await this.isValidPing(r);const{topic:n}=r;if(this.client.session.keys.includes(n)){const o=await this.sendRequest(n,"wc_sessionPing",{}),{done:i,resolve:a,reject:s}=Za();this.events.once(tr("session_ping",o),({error:l})=>{l?s(l):a()}),await i()}else this.client.core.pairing.pairings.keys.includes(n)&&await this.client.core.pairing.ping({topic:n})},this.emit=async r=>{this.isInitialized(),await this.isValidEmit(r);const{topic:n,event:o,chainId:i}=r;await this.sendRequest(n,"wc_sessionEvent",{event:o,chainId:i})},this.disconnect=async r=>{this.isInitialized(),await this.isValidDisconnect(r);const{topic:n}=r;this.client.session.keys.includes(n)?(await this.sendRequest(n,"wc_sessionDelete",vr("USER_DISCONNECTED")),await this.deleteSession(n)):await this.client.core.pairing.disconnect({topic:n})},this.find=r=>(this.isInitialized(),this.client.session.getAll().filter(n=>bW(n,r))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.deleteSession=async(r,n)=>{const{self:o}=this.client.session.get(r);await this.client.core.relayer.unsubscribe(r),await Promise.all([this.client.session.delete(r,vr("USER_DISCONNECTED")),this.client.core.crypto.deleteKeyPair(o.publicKey),this.client.core.crypto.deleteSymKey(r),n?Promise.resolve():this.client.core.expirer.del(r)])},this.deleteProposal=async(r,n)=>{await Promise.all([this.client.proposal.delete(r,vr("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(r)])},this.deletePendingSessionRequest=async(r,n,o=!1)=>{await Promise.all([this.client.pendingRequest.delete(r,n),o?Promise.resolve():this.client.core.expirer.del(r)])},this.setExpiry=async(r,n)=>{this.client.session.keys.includes(r)&&await this.client.session.update(r,{expiry:n}),this.client.core.expirer.set(r,n)},this.setProposal=async(r,n)=>{await this.client.proposal.set(r,n),this.client.core.expirer.set(r,n.expiry)},this.setPendingSessionRequest=async r=>{const n=yc.wc_sessionRequest.req.ttl,{id:o,topic:i,params:a}=r;await this.client.pendingRequest.set(o,{id:o,topic:i,params:a}),n&&this.client.core.expirer.set(o,Bo(n))},this.sendRequest=async(r,n,o,i)=>{const a=cb(n,o),s=await this.client.core.crypto.encode(r,a),l=yc[n].req;return i&&(l.ttl=i),this.client.core.history.set(r,a),this.client.core.relayer.publish(r,s,l),a.id},this.sendResult=async(r,n,o)=>{const i=J4(r,o),a=await this.client.core.crypto.encode(n,i),s=await this.client.core.history.get(n,r),l=yc[s.request.method].res;this.client.core.relayer.publish(n,a,l),await this.client.core.history.resolve(i)},this.sendError=async(r,n,o)=>{const i=Q4(r,o),a=await this.client.core.crypto.encode(n,i),s=await this.client.core.history.get(n,r),l=yc[s.request.method].res;this.client.core.relayer.publish(n,a,l),await this.client.core.history.resolve(i)},this.cleanup=async()=>{const r=[],n=[];this.client.session.getAll().forEach(o=>{oa(o.expiry)&&r.push(o.topic)}),this.client.proposal.getAll().forEach(o=>{oa(o.expiry)&&n.push(o.id)}),await Promise.all([...r.map(o=>this.deleteSession(o)),...n.map(o=>this.deleteProposal(o))])},this.onRelayEventRequest=r=>{const{topic:n,payload:o}=r,i=o.method;switch(i){case"wc_sessionPropose":return this.onSessionProposeRequest(n,o);case"wc_sessionSettle":return this.onSessionSettleRequest(n,o);case"wc_sessionUpdate":return this.onSessionUpdateRequest(n,o);case"wc_sessionExtend":return this.onSessionExtendRequest(n,o);case"wc_sessionPing":return this.onSessionPingRequest(n,o);case"wc_sessionDelete":return this.onSessionDeleteRequest(n,o);case"wc_sessionRequest":return this.onSessionRequest(n,o);case"wc_sessionEvent":return this.onSessionEventRequest(n,o);default:return this.client.logger.info(`Unsupported request method ${i}`)}},this.onRelayEventResponse=async r=>{const{topic:n,payload:o}=r,i=(await this.client.core.history.get(n,o.id)).request.method;switch(i){case"wc_sessionPropose":return this.onSessionProposeResponse(n,o);case"wc_sessionSettle":return this.onSessionSettleResponse(n,o);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,o);case"wc_sessionExtend":return this.onSessionExtendResponse(n,o);case"wc_sessionPing":return this.onSessionPingResponse(n,o);case"wc_sessionRequest":return this.onSessionRequestResponse(n,o);default:return this.client.logger.info(`Unsupported response method ${i}`)}},this.onSessionProposeRequest=async(r,n)=>{const{params:o,id:i}=n;try{this.isValidConnect(io({},n.params));const a=Bo(pt.FIVE_MINUTES),s=io({id:i,pairingTopic:r,expiry:a},o);await this.setProposal(i,s),this.client.events.emit("session_proposal",{id:i,params:s})}catch(a){await this.sendError(i,r,a),this.client.logger.error(a)}},this.onSessionProposeResponse=async(r,n)=>{const{id:o}=n;if(ta(n)){const{result:i}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:i});const a=this.client.proposal.get(o);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:a});const s=a.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:s});const l=i.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:l});const c=await this.client.core.crypto.generateSharedKey(s,l);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:c});const u=await this.client.core.relayer.subscribe(c);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:u}),await this.client.core.pairing.activate({topic:r})}else jo(n)&&(await this.client.proposal.delete(o,vr("USER_DISCONNECTED")),this.events.emit(tr("session_connect"),{error:n.error}))},this.onSessionSettleRequest=async(r,n)=>{const{id:o,params:i}=n;try{this.isValidSessionSettleRequest(i);const{relay:a,controller:s,expiry:l,namespaces:c,requiredNamespaces:u,optionalNamespaces:f,sessionProperties:d}=n.params,p=io({topic:r,relay:a,expiry:l,namespaces:c,acknowledged:!0,requiredNamespaces:u,optionalNamespaces:f,controller:s.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:s.publicKey,metadata:s.metadata}},d&&{sessionProperties:d});await this.sendResult(n.id,r,!0),this.events.emit(tr("session_connect"),{session:p})}catch(a){await this.sendError(o,r,a),this.client.logger.error(a)}},this.onSessionSettleResponse=async(r,n)=>{const{id:o}=n;ta(n)?(await this.client.session.update(r,{acknowledged:!0}),this.events.emit(tr("session_approve",o),{})):jo(n)&&(await this.client.session.delete(r,vr("USER_DISCONNECTED")),this.events.emit(tr("session_approve",o),{error:n.error}))},this.onSessionUpdateRequest=async(r,n)=>{const{params:o,id:i}=n;try{this.isValidUpdate(io({topic:r},o)),await this.client.session.update(r,{namespaces:o.namespaces}),await this.sendResult(i,r,!0),this.client.events.emit("session_update",{id:i,topic:r,params:o})}catch(a){await this.sendError(i,r,a),this.client.logger.error(a)}},this.onSessionUpdateResponse=(r,n)=>{const{id:o}=n;ta(n)?this.events.emit(tr("session_update",o),{}):jo(n)&&this.events.emit(tr("session_update",o),{error:n.error})},this.onSessionExtendRequest=async(r,n)=>{const{id:o}=n;try{this.isValidExtend({topic:r}),await this.setExpiry(r,Bo(ad)),await this.sendResult(o,r,!0),this.client.events.emit("session_extend",{id:o,topic:r})}catch(i){await this.sendError(o,r,i),this.client.logger.error(i)}},this.onSessionExtendResponse=(r,n)=>{const{id:o}=n;ta(n)?this.events.emit(tr("session_extend",o),{}):jo(n)&&this.events.emit(tr("session_extend",o),{error:n.error})},this.onSessionPingRequest=async(r,n)=>{const{id:o}=n;try{this.isValidPing({topic:r}),await this.sendResult(o,r,!0),this.client.events.emit("session_ping",{id:o,topic:r})}catch(i){await this.sendError(o,r,i),this.client.logger.error(i)}},this.onSessionPingResponse=(r,n)=>{const{id:o}=n;setTimeout(()=>{ta(n)?this.events.emit(tr("session_ping",o),{}):jo(n)&&this.events.emit(tr("session_ping",o),{error:n.error})},500)},this.onSessionDeleteRequest=async(r,n)=>{const{id:o}=n;try{this.isValidDisconnect({topic:r,reason:n.params}),this.client.core.relayer.once(br.publish,async()=>{await this.deleteSession(r)}),await this.sendResult(o,r,!0),this.client.events.emit("session_delete",{id:o,topic:r})}catch(i){await this.sendError(o,r,i),this.client.logger.error(i)}},this.onSessionRequest=async(r,n)=>{const{id:o,params:i}=n;try{this.isValidRequest(io({topic:r},i)),await this.setPendingSessionRequest({id:o,topic:r,params:i}),this.client.events.emit("session_request",{id:o,topic:r,params:i})}catch(a){await this.sendError(o,r,a),this.client.logger.error(a)}},this.onSessionRequestResponse=(r,n)=>{const{id:o}=n;ta(n)?this.events.emit(tr("session_request",o),{result:n.result}):jo(n)&&this.events.emit(tr("session_request",o),{error:n.error})},this.onSessionEventRequest=async(r,n)=>{const{id:o,params:i}=n;try{this.isValidEmit(io({topic:r},i)),this.client.events.emit("session_event",{id:o,topic:r,params:i})}catch(a){await this.sendError(o,r,a),this.client.logger.error(a)}},this.isValidConnect=async r=>{if(!un(r)){const{message:l}=Xe("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(r)}`);throw new Error(l)}const{pairingTopic:n,requiredNamespaces:o,optionalNamespaces:i,sessionProperties:a,relays:s}=r;if(rn(n)||await this.isValidPairingTopic(n),!$W(s,!0)){const{message:l}=Xe("MISSING_OR_INVALID",`connect() relays: ${s}`);throw new Error(l)}!rn(o)&&Jc(o)!==0&&this.validateNamespaces(o,"requiredNamespaces"),!rn(i)&&Jc(i)!==0&&this.validateNamespaces(i,"optionalNamespaces"),rn(a)||this.validateSessionProps(a,"sessionProperties")},this.validateNamespaces=(r,n)=>{const o=IW(r,"connect()",n);if(o)throw new Error(o.message)},this.isValidApprove=async r=>{if(!un(r))throw new Error(Xe("MISSING_OR_INVALID",`approve() params: ${r}`).message);const{id:n,namespaces:o,relayProtocol:i,sessionProperties:a}=r;await this.isValidProposalId(n);const s=this.client.proposal.get(n),l=kd(o,"approve()");if(l)throw new Error(l.message);const c=lx(s.requiredNamespaces,o,"approve()");if(c)throw new Error(c.message);if(!gr(i,!0)){const{message:u}=Xe("MISSING_OR_INVALID",`approve() relayProtocol: ${i}`);throw new Error(u)}rn(a)||this.validateSessionProps(a,"sessionProperties")},this.isValidReject=async r=>{if(!un(r)){const{message:i}=Xe("MISSING_OR_INVALID",`reject() params: ${r}`);throw new Error(i)}const{id:n,reason:o}=r;if(await this.isValidProposalId(n),!DW(o)){const{message:i}=Xe("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(o)}`);throw new Error(i)}},this.isValidSessionSettleRequest=r=>{if(!un(r)){const{message:c}=Xe("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${r}`);throw new Error(c)}const{relay:n,controller:o,namespaces:i,expiry:a}=r;if(!X4(n)){const{message:c}=Xe("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(c)}const s=SW(o,"onSessionSettleRequest()");if(s)throw new Error(s.message);const l=kd(i,"onSessionSettleRequest()");if(l)throw new Error(l.message);if(oa(a)){const{message:c}=Xe("EXPIRED","onSessionSettleRequest()");throw new Error(c)}},this.isValidUpdate=async r=>{if(!un(r)){const{message:l}=Xe("MISSING_OR_INVALID",`update() params: ${r}`);throw new Error(l)}const{topic:n,namespaces:o}=r;await this.isValidSessionTopic(n);const i=this.client.session.get(n),a=kd(o,"update()");if(a)throw new Error(a.message);const s=lx(i.requiredNamespaces,o,"update()");if(s)throw new Error(s.message)},this.isValidExtend=async r=>{if(!un(r)){const{message:o}=Xe("MISSING_OR_INVALID",`extend() params: ${r}`);throw new Error(o)}const{topic:n}=r;await this.isValidSessionTopic(n)},this.isValidRequest=async r=>{if(!un(r)){const{message:l}=Xe("MISSING_OR_INVALID",`request() params: ${r}`);throw new Error(l)}const{topic:n,request:o,chainId:i,expiry:a}=r;await this.isValidSessionTopic(n);const{namespaces:s}=this.client.session.get(n);if(!sx(s,i)){const{message:l}=Xe("MISSING_OR_INVALID",`request() chainId: ${i}`);throw new Error(l)}if(!MW(o)){const{message:l}=Xe("MISSING_OR_INVALID",`request() ${JSON.stringify(o)}`);throw new Error(l)}if(!FW(s,i,o.method)){const{message:l}=Xe("MISSING_OR_INVALID",`request() method: ${o.method}`);throw new Error(l)}if(a&&!jW(a,w1)){const{message:l}=Xe("MISSING_OR_INVALID",`request() expiry: ${a}. Expiry must be a number (in seconds) between ${w1.min} and ${w1.max}`);throw new Error(l)}},this.isValidRespond=async r=>{if(!un(r)){const{message:i}=Xe("MISSING_OR_INVALID",`respond() params: ${r}`);throw new Error(i)}const{topic:n,response:o}=r;if(await this.isValidSessionTopic(n),!RW(o)){const{message:i}=Xe("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(o)}`);throw new Error(i)}},this.isValidPing=async r=>{if(!un(r)){const{message:o}=Xe("MISSING_OR_INVALID",`ping() params: ${r}`);throw new Error(o)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)},this.isValidEmit=async r=>{if(!un(r)){const{message:s}=Xe("MISSING_OR_INVALID",`emit() params: ${r}`);throw new Error(s)}const{topic:n,event:o,chainId:i}=r;await this.isValidSessionTopic(n);const{namespaces:a}=this.client.session.get(n);if(!sx(a,i)){const{message:s}=Xe("MISSING_OR_INVALID",`emit() chainId: ${i}`);throw new Error(s)}if(!NW(o)){const{message:s}=Xe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(s)}if(!BW(a,i,o.name)){const{message:s}=Xe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(s)}},this.isValidDisconnect=async r=>{if(!un(r)){const{message:o}=Xe("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw new Error(o)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)},this.validateSessionProps=(r,n)=>{Object.values(r).forEach(o=>{if(!gr(o,!1)){const{message:i}=Xe("MISSING_OR_INVALID",`${n} must be in Record format. Received: ${JSON.stringify(o)}`);throw new Error(i)}})}}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}registerRelayerEvents(){this.client.core.relayer.on(br.message,async t=>{const{topic:r,message:n}=t;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const o=await this.client.core.crypto.decode(r,n);e8(o)?(this.client.core.history.set(r,o),this.onRelayEventRequest({topic:r,payload:o})):t8(o)&&(await this.client.core.history.resolve(o),this.onRelayEventResponse({topic:r,payload:o}))})}registerExpirerEvents(){this.client.core.expirer.on(lo.expired,async t=>{const{topic:r,id:n}=K4(t.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,Xe("EXPIRED"),!0);r?this.client.session.keys.includes(r)&&(await this.deleteSession(r,!0),this.client.events.emit("session_expire",{topic:r})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}isValidPairingTopic(t){if(!gr(t,!1)){const{message:r}=Xe("MISSING_OR_INVALID",`pairing topic should be a string: ${t}`);throw new Error(r)}if(!this.client.core.pairing.pairings.keys.includes(t)){const{message:r}=Xe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${t}`);throw new Error(r)}if(oa(this.client.core.pairing.pairings.get(t).expiry)){const{message:r}=Xe("EXPIRED",`pairing topic: ${t}`);throw new Error(r)}}async isValidSessionTopic(t){if(!gr(t,!1)){const{message:r}=Xe("MISSING_OR_INVALID",`session topic should be a string: ${t}`);throw new Error(r)}if(!this.client.session.keys.includes(t)){const{message:r}=Xe("NO_MATCHING_KEY",`session topic doesn't exist: ${t}`);throw new Error(r)}if(oa(this.client.session.get(t).expiry)){await this.deleteSession(t);const{message:r}=Xe("EXPIRED",`session topic: ${t}`);throw new Error(r)}}async isValidSessionOrPairingTopic(t){if(this.client.session.keys.includes(t))await this.isValidSessionTopic(t);else if(this.client.core.pairing.pairings.keys.includes(t))this.isValidPairingTopic(t);else if(gr(t,!1)){const{message:r}=Xe("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${t}`);throw new Error(r)}else{const{message:r}=Xe("MISSING_OR_INVALID",`session or pairing topic should be a string: ${t}`);throw new Error(r)}}async isValidProposalId(t){if(!TW(t)){const{message:r}=Xe("MISSING_OR_INVALID",`proposal id should be a number: ${t}`);throw new Error(r)}if(!this.client.proposal.keys.includes(t)){const{message:r}=Xe("NO_MATCHING_KEY",`proposal id doesn't exist: ${t}`);throw new Error(r)}if(oa(this.client.proposal.get(t).expiry)){await this.deleteProposal(t);const{message:r}=Xe("EXPIRED",`proposal id: ${t}`);throw new Error(r)}}}class hPe extends fb{constructor(t,r){super(t,r,oq,db),this.core=t,this.logger=r}}let vPe=class extends fb{constructor(t,r){super(t,r,aq,db),this.core=t,this.logger=r}};class gPe extends fb{constructor(t,r){super(t,r,lq,db,n=>n.id),this.core=t,this.logger=r}}let cq=class uq extends p8e{constructor(t){super(t),this.protocol=n8,this.version=o8,this.name=b1.name,this.events=new ni.EventEmitter,this.on=(n,o)=>this.events.on(n,o),this.once=(n,o)=>this.events.once(n,o),this.off=(n,o)=>this.events.off(n,o),this.removeListener=(n,o)=>this.events.removeListener(n,o),this.removeAllListeners=n=>this.events.removeAllListeners(n),this.connect=async n=>{try{return await this.engine.connect(n)}catch(o){throw this.logger.error(o.message),o}},this.pair=async n=>{try{return await this.engine.pair(n)}catch(o){throw this.logger.error(o.message),o}},this.approve=async n=>{try{return await this.engine.approve(n)}catch(o){throw this.logger.error(o.message),o}},this.reject=async n=>{try{return await this.engine.reject(n)}catch(o){throw this.logger.error(o.message),o}},this.update=async n=>{try{return await this.engine.update(n)}catch(o){throw this.logger.error(o.message),o}},this.extend=async n=>{try{return await this.engine.extend(n)}catch(o){throw this.logger.error(o.message),o}},this.request=async n=>{try{return await this.engine.request(n)}catch(o){throw this.logger.error(o.message),o}},this.respond=async n=>{try{return await this.engine.respond(n)}catch(o){throw this.logger.error(o.message),o}},this.ping=async n=>{try{return await this.engine.ping(n)}catch(o){throw this.logger.error(o.message),o}},this.emit=async n=>{try{return await this.engine.emit(n)}catch(o){throw this.logger.error(o.message),o}},this.disconnect=async n=>{try{return await this.engine.disconnect(n)}catch(o){throw this.logger.error(o.message),o}},this.find=n=>{try{return this.engine.find(n)}catch(o){throw this.logger.error(o.message),o}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}},this.name=(t==null?void 0:t.name)||b1.name,this.metadata=(t==null?void 0:t.metadata)||eW();const r=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:C4(Mt.getDefaultLoggerOptions({level:(t==null?void 0:t.logger)||b1.logger}));this.core=(t==null?void 0:t.core)||new tPe(t),this.logger=Mt.generateChildLogger(r,this.name),this.session=new vPe(this.core,this.logger),this.proposal=new hPe(this.core,this.logger),this.pendingRequest=new gPe(this.core,this.logger),this.engine=new pPe(this)}static async init(t){const r=new uq(t);return await r.initialize(),r}get context(){return Mt.getLoggerContext(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.logger.info("SignClient Initialization Success")}catch(t){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(t.message),t}}};const mPe=cq,yPe=Object.freeze(Object.defineProperty({__proto__:null,ENGINE_CONTEXT:sq,ENGINE_RPC_OPTS:yc,HISTORY_CONTEXT:iPe,HISTORY_EVENTS:oPe,HISTORY_STORAGE_VERSION:aPe,PROPOSAL_CONTEXT:oq,PROPOSAL_EXPIRY:sPe,PROPOSAL_EXPIRY_MESSAGE:iq,REQUEST_CONTEXT:lq,SESSION_CONTEXT:aq,SESSION_EXPIRY:ad,SESSION_REQUEST_EXPIRY_BOUNDARIES:w1,SIGN_CLIENT_CONTEXT:i8,SIGN_CLIENT_DEFAULT:b1,SIGN_CLIENT_EVENTS:rPe,SIGN_CLIENT_PROTOCOL:n8,SIGN_CLIENT_STORAGE_OPTIONS:nPe,SIGN_CLIENT_STORAGE_PREFIX:db,SIGN_CLIENT_VERSION:o8,SignClient:mPe,default:cq},Symbol.toStringTag,{value:"Module"})),bPe=jl(yPe),wPe=jl(a9e);var To={},bI;function fq(){return bI||(bI=1,Object.defineProperty(To,"__esModule",{value:!0}),To.RELAY_URL=To.LOGGER=To.RELAY_METHODS=To.PROVIDER_NAMESPACE=void 0,To.PROVIDER_NAMESPACE="alephium",To.RELAY_METHODS=["alph_signAndSubmitTransferTx","alph_signAndSubmitDeployContractTx","alph_signAndSubmitExecuteScriptTx","alph_signAndSubmitUnsignedTx","alph_signUnsignedTx","alph_signMessage","alph_requestNodeApi","alph_requestExplorerApi"],To.LOGGER="error",To.RELAY_URL="wss://relay.walletconnect.com"),To}var wI;function xPe(){if(wI)return Tr;wI=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.parseAccount=Tr.formatAccount=Tr.parseChain=Tr.formatChain=Tr.isCompatibleAddressGroup=Tr.isCompatibleChain=Tr.WalletConnectProvider=void 0;const e=Rn,t=e.__importDefault(IH()),r=e.__importDefault(bPe),n=wPe,o=qs(),i=fq();class a extends o.SignerProvider{static async init(h){const m=new a(h);return await m.initialize(),m}constructor(h){super(),this.events=new t.default,this.account=void 0,this.requestNodeAPI=m=>this.typedRequest("alph_requestNodeApi",m),this.requestExplorerAPI=m=>this.typedRequest("alph_requestExplorerApi",m),this.providerOpts=h,this.networkId=h.networkId,this.addressGroup=h.addressGroup,this.permittedChain=c(this.networkId,this.addressGroup),this.methods=h.methods??[...i.RELAY_METHODS],this.methods.includes("alph_requestNodeApi")?this.nodeProvider=o.NodeProvider.Remote(this.requestNodeAPI):this.nodeProvider=void 0,this.methods.includes("alph_requestExplorerApi")?this.explorerProvider=o.ExplorerProvider.Remote(this.requestExplorerAPI):this.explorerProvider=void 0}async connect(){const{uri:h,approval:m}=await this.client.connect({requiredNamespaces:{alephium:{chains:[this.permittedChain],methods:this.methods,events:["accountChanged"]}}});h&&this.emitEvents("displayUri",h),this.session=await m(),this.updateNamespace(this.session.namespaces)}async disconnect(){if(!this.client)throw new Error("Sign Client not initialized");await this.providerOpts.onDisconnected(),await this.client.disconnect({topic:this.session.topic,reason:(0,n.getSdkError)("USER_DISCONNECTED")})}on(h,m){this.events.on(h,m)}once(h,m){this.events.once(h,m)}removeListener(h,m){this.events.removeListener(h,m)}off(h,m){this.events.off(h,m)}unsafeGetSelectedAccount(){if(this.account===void 0)throw Error("Account is not available");return Promise.resolve(this.account)}async signAndSubmitTransferTx(h){return this.typedRequest("alph_signAndSubmitTransferTx",h)}async signAndSubmitDeployContractTx(h){return this.typedRequest("alph_signAndSubmitDeployContractTx",h)}async signAndSubmitExecuteScriptTx(h){return this.typedRequest("alph_signAndSubmitExecuteScriptTx",h)}async signAndSubmitUnsignedTx(h){return this.typedRequest("alph_signAndSubmitUnsignedTx",h)}async signUnsignedTx(h){return this.typedRequest("alph_signUnsignedTx",h)}async signMessage(h){return this.typedRequest("alph_signMessage",h)}async initialize(){await this.createClient(),this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await r.default.init({logger:this.providerOpts.logger||i.LOGGER,relayUrl:this.providerOpts.relayUrl||i.RELAY_URL,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata})}checkStorage(){if(this.client.session.length){const h=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[h])}}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",h=>{this.emitEvents("session_ping",h)}),this.client.on("session_event",h=>{this.emitEvents("session_event",h)}),this.client.on("session_update",({topic:h,params:m})=>{var y;const{namespaces:_}=m,w=(y=this.client)==null?void 0:y.session.get(h);this.session={...w,namespaces:_},this.updateNamespace(this.session.namespaces),this.emitEvents("session_update",{topic:h,params:m})}),this.client.on("session_delete",()=>{this.emitEvents("session_delete")})}emitEvents(h,m){this.events.emit(h,m)}typedRequest(h,m){return this.request({method:h,params:m})}async request(h){var m,_;if(!this.methods.includes(h.method))return Promise.reject(new Error(`Invalid method was passed: ${h.method}`));if(!h.method.startsWith("alph_request")){const w=(m=h.params)==null?void 0:m.signerAddress;if(typeof w>"u")throw new Error("Cannot request without signerAddress");const y=(await this.getSelectedAccount()).address;if(w!==y)throw new Error(`Invalid signer address: ${h.params.signerAddress}`)}try{return await this.client.request({request:{method:h.method,params:h.params},chainId:this.permittedChain,topic:(_=this.session)==null?void 0:_.topic})}catch(w){throw w.message?new Error(w.message):w}}updateNamespace(h){const m=(0,n.getChainsFromNamespaces)(h,[i.PROVIDER_NAMESPACE]);this.setChain(m);const _=(0,n.getAccountsFromNamespaces)(h,[i.PROVIDER_NAMESPACE]);this.setAccounts(_)}sameChains(h,m){return typeof m>"u"?!1:h.join()===m.join()}setChain(h){if(!this.sameChains(h,[this.permittedChain]))throw Error("Network or address group has changed")}sameAccounts(h,m){return typeof m>"u"?!1:h.map(_=>_.address).join()===m.map(_=>_.address).join()}setAccounts(h){const m=h.map(d);if(this.sameAccounts(m,this.lastSetAccounts))return;if(this.lastSetAccounts=m,m.length!==1)throw Error("The WC provider does not supports multiple accounts");const _=m[0];if(!l(_.group,this.addressGroup))throw Error("The new account belongs to an unexpected address group");this.account=_,this.emitEvents("accountChanged",_)}}Tr.WalletConnectProvider=a;function s(p){return p.startsWith(`${i.PROVIDER_NAMESPACE}:`)}Tr.isCompatibleChain=s;function l(p,h){return h===void 0||h===p}Tr.isCompatibleAddressGroup=l;function c(p,h){if(h!==void 0&&h<0)throw Error("Address group in provider needs to be either undefined or non-negative");const m=h!==void 0?h:-1;return`${i.PROVIDER_NAMESPACE}:${p}/${m}`}Tr.formatChain=c;function u(p){const[h,m,_]=p.replace(/\//g,":").split(":"),w=parseInt(_,10);if(w<-1)throw Error("Address group in protocol needs to be either -1 or non-negative");const y=o.networkIds;if(!y.includes(m))throw Error(`Invalid network id, expect one of ${y}`);return{networkId:m,addressGroup:w===-1?void 0:w}}Tr.parseChain=u;function f(p,h){return`${p}:${h.publicKey}/${h.keyType}`}Tr.formatAccount=f;function d(p){const[h,m,_,w,y]=p.replace(/\//g,":").split(":"),C=(0,o.addressFromPublicKey)(w),I=(0,o.groupOfAddress)(C);if(y!=="default"&&y!=="bip340-schnorr")throw Error(`Invalid key type: ${y}`);return{address:C,group:I,publicKey:w,keyType:y}}return Tr.parseAccount=d,Tr}var Iw={},xI;function _Pe(){if(xI)return Iw;xI=1,Object.defineProperty(Iw,"__esModule",{value:!0});const e=qs();return(0,e.assertType)(),(0,e.assertType)(),Iw}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Rn;t.__exportStar(xPe(),e),t.__exportStar(fq(),e),t.__exportStar(_Pe(),e)})(G3);var a8={};Object.defineProperty(a8,"__esModule",{value:!0});var dq=a8.getWindowMetadata=void 0;const _I=Ft;function EPe(){let e,t;try{e=_I.getDocumentOrThrow(),t=_I.getLocationOrThrow()}catch{return null}function r(){const f=e.getElementsByTagName("link"),d=[];for(let p=0;p-1){const _=h.getAttribute("href");if(_)if(_.toLowerCase().indexOf("https:")===-1&&_.toLowerCase().indexOf("http:")===-1&&_.indexOf("//")!==0){let w=t.protocol+"//"+t.host;if(_.indexOf("/")===0)w+=_;else{const y=t.pathname.split("/");y.pop();const C=y.join("/");w+=C+"/"+_}d.push(w)}else if(_.indexOf("//")===0){const w=t.protocol+_;d.push(w)}else d.push(_)}}return d}function n(...f){const d=e.getElementsByTagName("meta");for(let p=0;ph.getAttribute(_)).filter(_=>_?f.includes(_):!1);if(m.length&&m){const _=h.getAttribute("content");if(_)return _}}return""}function o(){let f=n("name","og:site_name","og:title","twitter:title");return f||(f=e.title),f}function i(){return n("description","og:description","twitter:description","keywords")}const a=o(),s=i(),l=t.origin,c=r();return{description:s,url:l,icons:c,name:a}}dq=a8.getWindowMetadata=EPe;var qt={};Object.defineProperty(qt,"__esModule",{value:!0});var pq=qt.getLocalStorage=Sq=qt.getLocalStorageOrThrow=Eq=qt.getCrypto=_q=qt.getCryptoOrThrow=xq=qt.getLocation=wq=qt.getLocationOrThrow=bq=qt.getNavigator=yq=qt.getNavigatorOrThrow=mq=qt.getDocument=gq=qt.getDocumentOrThrow=vq=qt.getFromWindowOrThrow=hq=qt.getFromWindow=void 0;function tc(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}var hq=qt.getFromWindow=tc;function rf(e){const t=tc(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}var vq=qt.getFromWindowOrThrow=rf;function SPe(){return rf("document")}var gq=qt.getDocumentOrThrow=SPe;function CPe(){return tc("document")}var mq=qt.getDocument=CPe;function PPe(){return rf("navigator")}var yq=qt.getNavigatorOrThrow=PPe;function OPe(){return tc("navigator")}var bq=qt.getNavigator=OPe;function APe(){return rf("location")}var wq=qt.getLocationOrThrow=APe;function kPe(){return tc("location")}var xq=qt.getLocation=kPe;function IPe(){return rf("crypto")}var _q=qt.getCryptoOrThrow=IPe;function $Pe(){return tc("crypto")}var Eq=qt.getCrypto=$Pe;function TPe(){return rf("localStorage")}var Sq=qt.getLocalStorageOrThrow=TPe;function DPe(){return tc("localStorage")}pq=qt.getLocalStorage=DPe;var MPe=globalThis&&globalThis.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new jPe:typeof navigator<"u"?CI(navigator.userAgent):qPe()}function VPe(e){return e!==""&&UPe.reduce(function(t,r){var n=r[0],o=r[1];if(t)return t;var i=o.exec(e);return!!i&&[n,i]},!1)}function CI(e){var t=VPe(e);if(!t)return null;var r=t[0],n=t[1];if(r==="searchbot")return new BPe;var o=n[1]&&n[1].split(/[._]/).slice(0,3);o?o.length1:!1}function KPe(){return pb()?Cq()||Pq():!1}function Oq(){const e=s8();return e&&e.name?e.name.toLowerCase()==="node":!1}function YPe(){return!Oq()&&!!Aq()}const XPe=hq,ZPe=vq,JPe=gq,QPe=mq,eOe=yq,Aq=bq,tOe=wq,rOe=xq,nOe=_q,oOe=Eq,iOe=Sq,hb=pq;function aOe(){return dq()}function sOe(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return JSON.parse(e)}catch{return e}}function lOe(e){return typeof e=="string"?e:JSON.stringify(e)}const kq=sOe,Iq=lOe;function $q(e,t){const r=Iq(t),n=hb();n&&n.setItem(e,r)}function cOe(e){let t=null,r=null;const n=hb();return n&&(r=n.getItem(e)),t=r&&kq(r),t}function uOe(e){const t=hb();t&&t.removeItem(e)}const Tq="WALLETCONNECT_DEEPLINK_CHOICE";function fOe(e,t){const r=encodeURIComponent(e);return t.universalLink?`${t.universalLink}/wc?uri=${r}`:t.deepLink?`${t.deepLink}${t.deepLink.endsWith(":")?"//":"/"}wc?uri=${r}`:""}function dOe(e){const t=e.href.split("?")[0];$q(Tq,Object.assign(Object.assign({},e),{href:t}))}function Dq(e,t){return e.filter(r=>r.name.toLowerCase().includes(t.toLowerCase()))[0]}function pOe(e,t){let r=e;return t&&(r=t.map(n=>Dq(e,n)).filter(Boolean)),r}const Mq="https://registry.walletconnect.com";function hOe(){return Mq+"/api/v2/wallets"}function vOe(){return Mq+"/api/v2/dapps"}function Rq(e,t="mobile"){var r;return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:(r=e.image_url.sm)!==null&&r!==void 0?r:"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}function gOe(e,t="mobile"){return Object.values(e).filter(r=>!!r[t].universal||!!r[t].native).map(r=>Rq(r,t))}const mOe=Object.freeze(Object.defineProperty({__proto__:null,detectEnv:s8,detectOS:pb,formatIOSMobile:fOe,formatMobileRegistry:gOe,formatMobileRegistryEntry:Rq,getClientMeta:aOe,getCrypto:oOe,getCryptoOrThrow:nOe,getDappRegistryUrl:vOe,getDocument:QPe,getDocumentOrThrow:JPe,getFromWindow:XPe,getFromWindowOrThrow:ZPe,getLocal:cOe,getLocalStorage:hb,getLocalStorageOrThrow:iOe,getLocation:rOe,getLocationOrThrow:tOe,getMobileLinkRegistry:pOe,getMobileRegistryEntry:Dq,getNavigator:Aq,getNavigatorOrThrow:eOe,getWalletRegistryUrl:hOe,isAndroid:Cq,isBrowser:YPe,isIOS:Pq,isMobile:KPe,isNode:Oq,mobileLinkChoiceKey:Tq,removeLocal:uOe,safeJsonParse:kq,safeJsonStringify:Iq,saveMobileLinkInfo:dOe,setLocal:$q},Symbol.toStringTag,{value:"Module"})),yOe=jl(mOe);var ph={},bOe=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Nq={},Ys={},wOe={}.toString,l8=Array.isArray||function(e){return wOe.call(e)=="[object Array]"},xOe=l8;function _Oe(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},e.foo()===42}catch{return!1}}xt.TYPED_ARRAY_SUPPORT=_Oe();var PI=xt.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function xt(e,t,r){return!xt.TYPED_ARRAY_SUPPORT&&!(this instanceof xt)?new xt(e,t,r):typeof e=="number"?Fq(this,e):kOe(this,e,t,r)}xt.TYPED_ARRAY_SUPPORT&&(xt.prototype.__proto__=Uint8Array.prototype,xt.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&xt[Symbol.species]===xt&&Object.defineProperty(xt,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function c8(e){if(e>=PI)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+PI.toString(16)+" bytes");return e|0}function EOe(e){return e!==e}function Cu(e,t){var r;return xt.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=xt.prototype):(r=e,r===null&&(r=new xt(t)),r.length=t),r}function Fq(e,t){var r=Cu(e,t<0?0:c8(t)|0);if(!xt.TYPED_ARRAY_SUPPORT)for(var n=0;n55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function jq(e){if(xt.isBuffer(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var t=e.length;return t===0?0:Bq(e).length}function OOe(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function AOe(e,t,r,n){return OOe(Bq(t,e.length-r),e,r,n)}function kOe(e,t,r,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer?COe(e,t,r,n):typeof t=="string"?SOe(e,t):POe(e,t)}xt.prototype.write=function(t,r,n){r===void 0?(n=this.length,r=0):n===void 0&&typeof r=="string"?(n=this.length,r=0):isFinite(r)&&(r=r|0,isFinite(n)?n=n|0:n=void 0);var o=this.length-r;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");return AOe(this,t,r,n)};xt.prototype.slice=function(t,r){var n=this.length;t=~~t,r=r===void 0?n:~~r,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r=t.length&&(r=t.length),r||(r=0),o>0&&o=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-r=0;--a)t[a+r]=this[a+n];else if(i<1e3||!xt.TYPED_ARRAY_SUPPORT)for(a=0;a>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var i;if(typeof t=="number")for(i=r;i40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};to.getSymbolTotalCodewords=function(t){return IOe[t]};to.getBCHDigit=function(e){for(var t=0;e!==0;)t++,e>>>=1;return t};to.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');u8=t};to.isKanjiModeEnabled=function(){return typeof u8<"u"};to.toSJIS=function(t){return u8(t)};var vb={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");var n=r.toLowerCase();switch(n){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},e.from=function(n,o){if(e.isValid(n))return n;try{return t(n)}catch{return o}}})(vb);function Lq(){this.buffer=[],this.length=0}Lq.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(var r=0;r>>t-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var $Oe=Lq,OI=Ys;function hh(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=OI.alloc(e*e),this.reservedBit=OI.alloc(e*e)}hh.prototype.set=function(e,t,r,n){var o=e*this.size+t;this.data[o]=r,n&&(this.reservedBit[o]=!0)};hh.prototype.get=function(e,t){return this.data[e*this.size+t]};hh.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r};hh.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var TOe=hh,zq={};(function(e){var t=to.getSymbolSize;e.getRowColCoords=function(n){if(n===1)return[];for(var o=Math.floor(n/7)+2,i=t(n),a=i===145?26:Math.ceil((i-13)/(2*o-2))*2,s=[i-7],l=1;l=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){for(var i=o.size,a=0,s=0,l=0,c=null,u=null,f=0;f=5&&(a+=t.N1+(s-5)),c=p,s=1),p=o.get(d,f),p===u?l++:(l>=5&&(a+=t.N1+(l-5)),u=p,l=1)}s>=5&&(a+=t.N1+(s-5)),l>=5&&(a+=t.N1+(l-5))}return a},e.getPenaltyN2=function(o){for(var i=o.size,a=0,s=0;s=10&&(s===1488||s===93)&&a++,l=l<<1&2047|o.get(u,c),u>=10&&(l===1488||l===93)&&a++}return a*t.N3},e.getPenaltyN4=function(o){for(var i=0,a=o.data.length,s=0;s=0;){for(var s=a[0],l=0;l + * @license MIT + */(function(e){var t=oh,r=ky,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50;var o=2147483647;e.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var X=new Uint8Array(1),R={foo:function(){return 42}};return Object.setPrototypeOf(R,Uint8Array.prototype),Object.setPrototypeOf(X,R),X.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(X){if(X>o)throw new RangeError('The value "'+X+'" is invalid for option "size"');var R=new Uint8Array(X);return Object.setPrototypeOf(R,s.prototype),R}function s(X,R,z){if(typeof X=="number"){if(typeof R=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(X)}return l(X,R,z)}s.poolSize=8192;function l(X,R,z){if(typeof X=="string")return d(X,R);if(ArrayBuffer.isView(X))return h(X);if(X==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X);if(se(X,ArrayBuffer)||X&&se(X.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(se(X,SharedArrayBuffer)||X&&se(X.buffer,SharedArrayBuffer)))return m(X,R,z);if(typeof X=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Z=X.valueOf&&X.valueOf();if(Z!=null&&Z!==X)return s.from(Z,R,z);var Q=_(X);if(Q)return Q;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof X[Symbol.toPrimitive]=="function")return s.from(X[Symbol.toPrimitive]("string"),R,z);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X)}s.from=function(X,R,z){return l(X,R,z)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(X){if(typeof X!="number")throw new TypeError('"size" argument must be of type number');if(X<0)throw new RangeError('The value "'+X+'" is invalid for option "size"')}function u(X,R,z){return c(X),X<=0?a(X):R!==void 0?typeof z=="string"?a(X).fill(R,z):a(X).fill(R):a(X)}s.alloc=function(X,R,z){return u(X,R,z)};function f(X){return c(X),a(X<0?0:w(X)|0)}s.allocUnsafe=function(X){return f(X)},s.allocUnsafeSlow=function(X){return f(X)};function d(X,R){if((typeof R!="string"||R==="")&&(R="utf8"),!s.isEncoding(R))throw new TypeError("Unknown encoding: "+R);var z=C(X,R)|0,Z=a(z),Q=Z.write(X,R);return Q!==z&&(Z=Z.slice(0,Q)),Z}function p(X){for(var R=X.length<0?0:w(X.length)|0,z=a(R),Z=0;Z=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return X|0}function y(X){return+X!=X&&(X=0),s.alloc(+X)}s.isBuffer=function(R){return R!=null&&R._isBuffer===!0&&R!==s.prototype},s.compare=function(R,z){if(se(R,Uint8Array)&&(R=s.from(R,R.offset,R.byteLength)),se(z,Uint8Array)&&(z=s.from(z,z.offset,z.byteLength)),!s.isBuffer(R)||!s.isBuffer(z))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(R===z)return 0;for(var Z=R.length,Q=z.length,de=0,we=Math.min(Z,Q);deQ.length?s.from(we).copy(Q,de):Uint8Array.prototype.set.call(Q,we,de);else if(s.isBuffer(we))we.copy(Q,de);else throw new TypeError('"list" argument must be an Array of Buffers');de+=we.length}return Q};function C(X,R){if(s.isBuffer(X))return X.length;if(ArrayBuffer.isView(X)||se(X,ArrayBuffer))return X.byteLength;if(typeof X!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof X);var z=X.length,Z=arguments.length>2&&arguments[2]===!0;if(!Z&&z===0)return 0;for(var Q=!1;;)switch(R){case"ascii":case"latin1":case"binary":return z;case"utf8":case"utf-8":return ie(X).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z*2;case"hex":return z>>>1;case"base64":return K(X).length;default:if(Q)return Z?-1:ie(X).length;R=(""+R).toLowerCase(),Q=!0}}s.byteLength=C;function I(X,R,z){var Z=!1;if((R===void 0||R<0)&&(R=0),R>this.length||((z===void 0||z>this.length)&&(z=this.length),z<=0)||(z>>>=0,R>>>=0,z<=R))return"";for(X||(X="utf8");;)switch(X){case"hex":return U(this,R,z);case"utf8":case"utf-8":return v(this,R,z);case"ascii":return M(this,R,z);case"latin1":case"binary":return j(this,R,z);case"base64":return S(this,R,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,R,z);default:if(Z)throw new TypeError("Unknown encoding: "+X);X=(X+"").toLowerCase(),Z=!0}}s.prototype._isBuffer=!0;function F(X,R,z){var Z=X[R];X[R]=X[z],X[z]=Z}s.prototype.swap16=function(){var R=this.length;if(R%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var z=0;zz&&(R+=" ... "),""},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(R,z,Z,Q,de){if(se(R,Uint8Array)&&(R=s.from(R,R.offset,R.byteLength)),!s.isBuffer(R))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof R);if(z===void 0&&(z=0),Z===void 0&&(Z=R?R.length:0),Q===void 0&&(Q=0),de===void 0&&(de=this.length),z<0||Z>R.length||Q<0||de>this.length)throw new RangeError("out of range index");if(Q>=de&&z>=Z)return 0;if(Q>=de)return-1;if(z>=Z)return 1;if(z>>>=0,Z>>>=0,Q>>>=0,de>>>=0,this===R)return 0;for(var we=de-Q,Se=Z-z,Ee=Math.min(we,Se),Ae=this.slice(Q,de),Te=R.slice(z,Z),W=0;W2147483647?z=2147483647:z<-2147483648&&(z=-2147483648),z=+z,pe(z)&&(z=Q?0:X.length-1),z<0&&(z=X.length+z),z>=X.length){if(Q)return-1;z=X.length-1}else if(z<0)if(Q)z=0;else return-1;if(typeof R=="string"&&(R=s.from(R,Z)),s.isBuffer(R))return R.length===0?-1:g(X,R,z,Z,Q);if(typeof R=="number")return R=R&255,typeof Uint8Array.prototype.indexOf=="function"?Q?Uint8Array.prototype.indexOf.call(X,R,z):Uint8Array.prototype.lastIndexOf.call(X,R,z):g(X,[R],z,Z,Q);throw new TypeError("val must be string, number or Buffer")}function g(X,R,z,Z,Q){var de=1,we=X.length,Se=R.length;if(Z!==void 0&&(Z=String(Z).toLowerCase(),Z==="ucs2"||Z==="ucs-2"||Z==="utf16le"||Z==="utf-16le")){if(X.length<2||R.length<2)return-1;de=2,we/=2,Se/=2,z/=2}function Ee(k,Y){return de===1?k[Y]:k.readUInt16BE(Y*de)}var Ae;if(Q){var Te=-1;for(Ae=z;Aewe&&(z=we-Se),Ae=z;Ae>=0;Ae--){for(var W=!0,x=0;xQ&&(Z=Q)):Z=Q;var de=R.length;Z>de/2&&(Z=de/2);for(var we=0;we>>0,isFinite(Z)?(Z=Z>>>0,Q===void 0&&(Q="utf8")):(Q=Z,Z=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var de=this.length-z;if((Z===void 0||Z>de)&&(Z=de),R.length>0&&(Z<0||z<0)||z>this.length)throw new RangeError("Attempt to write outside buffer bounds");Q||(Q="utf8");for(var we=!1;;)switch(Q){case"hex":return D(this,R,z,Z);case"utf8":case"utf-8":return H(this,R,z,Z);case"ascii":case"latin1":case"binary":return G(this,R,z,Z);case"base64":return V(this,R,z,Z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,R,z,Z);default:if(we)throw new TypeError("Unknown encoding: "+Q);Q=(""+Q).toLowerCase(),we=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(X,R,z){return R===0&&z===X.length?t.fromByteArray(X):t.fromByteArray(X.slice(R,z))}function v(X,R,z){z=Math.min(X.length,z);for(var Z=[],Q=R;Q239?4:de>223?3:de>191?2:1;if(Q+Se<=z){var Ee,Ae,Te,W;switch(Se){case 1:de<128&&(we=de);break;case 2:Ee=X[Q+1],(Ee&192)===128&&(W=(de&31)<<6|Ee&63,W>127&&(we=W));break;case 3:Ee=X[Q+1],Ae=X[Q+2],(Ee&192)===128&&(Ae&192)===128&&(W=(de&15)<<12|(Ee&63)<<6|Ae&63,W>2047&&(W<55296||W>57343)&&(we=W));break;case 4:Ee=X[Q+1],Ae=X[Q+2],Te=X[Q+3],(Ee&192)===128&&(Ae&192)===128&&(Te&192)===128&&(W=(de&15)<<18|(Ee&63)<<12|(Ae&63)<<6|Te&63,W>65535&&W<1114112&&(we=W))}}we===null?(we=65533,Se=1):we>65535&&(we-=65536,Z.push(we>>>10&1023|55296),we=56320|we&1023),Z.push(we),Q+=Se}return B(Z)}var b=4096;function B(X){var R=X.length;if(R<=b)return String.fromCharCode.apply(String,X);for(var z="",Z=0;ZZ)&&(z=Z);for(var Q="",de=R;deZ&&(R=Z),z<0?(z+=Z,z<0&&(z=0)):z>Z&&(z=Z),zz)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(R,z,Z){R=R>>>0,z=z>>>0,Z||N(R,z,this.length);for(var Q=this[R],de=1,we=0;++we>>0,z=z>>>0,Z||N(R,z,this.length);for(var Q=this[R+--z],de=1;z>0&&(de*=256);)Q+=this[R+--z]*de;return Q},s.prototype.readUint8=s.prototype.readUInt8=function(R,z){return R=R>>>0,z||N(R,1,this.length),this[R]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(R,z){return R=R>>>0,z||N(R,2,this.length),this[R]|this[R+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(R,z){return R=R>>>0,z||N(R,2,this.length),this[R]<<8|this[R+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(R,z){return R=R>>>0,z||N(R,4,this.length),(this[R]|this[R+1]<<8|this[R+2]<<16)+this[R+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(R,z){return R=R>>>0,z||N(R,4,this.length),this[R]*16777216+(this[R+1]<<16|this[R+2]<<8|this[R+3])},s.prototype.readIntLE=function(R,z,Z){R=R>>>0,z=z>>>0,Z||N(R,z,this.length);for(var Q=this[R],de=1,we=0;++we=de&&(Q-=Math.pow(2,8*z)),Q},s.prototype.readIntBE=function(R,z,Z){R=R>>>0,z=z>>>0,Z||N(R,z,this.length);for(var Q=z,de=1,we=this[R+--Q];Q>0&&(de*=256);)we+=this[R+--Q]*de;return de*=128,we>=de&&(we-=Math.pow(2,8*z)),we},s.prototype.readInt8=function(R,z){return R=R>>>0,z||N(R,1,this.length),this[R]&128?(255-this[R]+1)*-1:this[R]},s.prototype.readInt16LE=function(R,z){R=R>>>0,z||N(R,2,this.length);var Z=this[R]|this[R+1]<<8;return Z&32768?Z|4294901760:Z},s.prototype.readInt16BE=function(R,z){R=R>>>0,z||N(R,2,this.length);var Z=this[R+1]|this[R]<<8;return Z&32768?Z|4294901760:Z},s.prototype.readInt32LE=function(R,z){return R=R>>>0,z||N(R,4,this.length),this[R]|this[R+1]<<8|this[R+2]<<16|this[R+3]<<24},s.prototype.readInt32BE=function(R,z){return R=R>>>0,z||N(R,4,this.length),this[R]<<24|this[R+1]<<16|this[R+2]<<8|this[R+3]},s.prototype.readFloatLE=function(R,z){return R=R>>>0,z||N(R,4,this.length),r.read(this,R,!0,23,4)},s.prototype.readFloatBE=function(R,z){return R=R>>>0,z||N(R,4,this.length),r.read(this,R,!1,23,4)},s.prototype.readDoubleLE=function(R,z){return R=R>>>0,z||N(R,8,this.length),r.read(this,R,!0,52,8)},s.prototype.readDoubleBE=function(R,z){return R=R>>>0,z||N(R,8,this.length),r.read(this,R,!1,52,8)};function T(X,R,z,Z,Q,de){if(!s.isBuffer(X))throw new TypeError('"buffer" argument must be a Buffer instance');if(R>Q||RX.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(R,z,Z,Q){if(R=+R,z=z>>>0,Z=Z>>>0,!Q){var de=Math.pow(2,8*Z)-1;T(this,R,z,Z,de,0)}var we=1,Se=0;for(this[z]=R&255;++Se>>0,Z=Z>>>0,!Q){var de=Math.pow(2,8*Z)-1;T(this,R,z,Z,de,0)}var we=Z-1,Se=1;for(this[z+we]=R&255;--we>=0&&(Se*=256);)this[z+we]=R/Se&255;return z+Z},s.prototype.writeUint8=s.prototype.writeUInt8=function(R,z,Z){return R=+R,z=z>>>0,Z||T(this,R,z,1,255,0),this[z]=R&255,z+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(R,z,Z){return R=+R,z=z>>>0,Z||T(this,R,z,2,65535,0),this[z]=R&255,this[z+1]=R>>>8,z+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(R,z,Z){return R=+R,z=z>>>0,Z||T(this,R,z,2,65535,0),this[z]=R>>>8,this[z+1]=R&255,z+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(R,z,Z){return R=+R,z=z>>>0,Z||T(this,R,z,4,4294967295,0),this[z+3]=R>>>24,this[z+2]=R>>>16,this[z+1]=R>>>8,this[z]=R&255,z+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(R,z,Z){return R=+R,z=z>>>0,Z||T(this,R,z,4,4294967295,0),this[z]=R>>>24,this[z+1]=R>>>16,this[z+2]=R>>>8,this[z+3]=R&255,z+4},s.prototype.writeIntLE=function(R,z,Z,Q){if(R=+R,z=z>>>0,!Q){var de=Math.pow(2,8*Z-1);T(this,R,z,Z,de-1,-de)}var we=0,Se=1,Ee=0;for(this[z]=R&255;++we>0)-Ee&255;return z+Z},s.prototype.writeIntBE=function(R,z,Z,Q){if(R=+R,z=z>>>0,!Q){var de=Math.pow(2,8*Z-1);T(this,R,z,Z,de-1,-de)}var we=Z-1,Se=1,Ee=0;for(this[z+we]=R&255;--we>=0&&(Se*=256);)R<0&&Ee===0&&this[z+we+1]!==0&&(Ee=1),this[z+we]=(R/Se>>0)-Ee&255;return z+Z},s.prototype.writeInt8=function(R,z,Z){return R=+R,z=z>>>0,Z||T(this,R,z,1,127,-128),R<0&&(R=255+R+1),this[z]=R&255,z+1},s.prototype.writeInt16LE=function(R,z,Z){return R=+R,z=z>>>0,Z||T(this,R,z,2,32767,-32768),this[z]=R&255,this[z+1]=R>>>8,z+2},s.prototype.writeInt16BE=function(R,z,Z){return R=+R,z=z>>>0,Z||T(this,R,z,2,32767,-32768),this[z]=R>>>8,this[z+1]=R&255,z+2},s.prototype.writeInt32LE=function(R,z,Z){return R=+R,z=z>>>0,Z||T(this,R,z,4,2147483647,-2147483648),this[z]=R&255,this[z+1]=R>>>8,this[z+2]=R>>>16,this[z+3]=R>>>24,z+4},s.prototype.writeInt32BE=function(R,z,Z){return R=+R,z=z>>>0,Z||T(this,R,z,4,2147483647,-2147483648),R<0&&(R=4294967295+R+1),this[z]=R>>>24,this[z+1]=R>>>16,this[z+2]=R>>>8,this[z+3]=R&255,z+4};function q(X,R,z,Z,Q,de){if(z+Z>X.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("Index out of range")}function J(X,R,z,Z,Q){return R=+R,z=z>>>0,Q||q(X,R,z,4),r.write(X,R,z,Z,23,4),z+4}s.prototype.writeFloatLE=function(R,z,Z){return J(this,R,z,!0,Z)},s.prototype.writeFloatBE=function(R,z,Z){return J(this,R,z,!1,Z)};function te(X,R,z,Z,Q){return R=+R,z=z>>>0,Q||q(X,R,z,8),r.write(X,R,z,Z,52,8),z+8}s.prototype.writeDoubleLE=function(R,z,Z){return te(this,R,z,!0,Z)},s.prototype.writeDoubleBE=function(R,z,Z){return te(this,R,z,!1,Z)},s.prototype.copy=function(R,z,Z,Q){if(!s.isBuffer(R))throw new TypeError("argument should be a Buffer");if(Z||(Z=0),!Q&&Q!==0&&(Q=this.length),z>=R.length&&(z=R.length),z||(z=0),Q>0&&Q=this.length)throw new RangeError("Index out of range");if(Q<0)throw new RangeError("sourceEnd out of bounds");Q>this.length&&(Q=this.length),R.length-z>>0,Z=Z===void 0?this.length:Z>>>0,R||(R=0);var we;if(typeof R=="number")for(we=z;we55295&&z<57344){if(!Q){if(z>56319){(R-=3)>-1&&de.push(239,191,189);continue}else if(we+1===Z){(R-=3)>-1&&de.push(239,191,189);continue}Q=z;continue}if(z<56320){(R-=3)>-1&&de.push(239,191,189),Q=z;continue}z=(Q-55296<<10|z-56320)+65536}else Q&&(R-=3)>-1&&de.push(239,191,189);if(Q=null,z<128){if((R-=1)<0)break;de.push(z)}else if(z<2048){if((R-=2)<0)break;de.push(z>>6|192,z&63|128)}else if(z<65536){if((R-=3)<0)break;de.push(z>>12|224,z>>6&63|128,z&63|128)}else if(z<1114112){if((R-=4)<0)break;de.push(z>>18|240,z>>12&63|128,z>>6&63|128,z&63|128)}else throw new Error("Invalid code point")}return de}function ue(X){for(var R=[],z=0;z>8,Q=z%256,de.push(Q),de.push(Z);return de}function K(X){return t.toByteArray(ce(X))}function ee(X,R,z,Z){for(var Q=0;Q=R.length||Q>=X.length);++Q)R[Q+z]=X[Q];return Q}function se(X,R){return X instanceof R||X!=null&&X.constructor!=null&&X.constructor.name!=null&&X.constructor.name===R.name}function pe(X){return X!==X}var ge=function(){for(var X="0123456789abcdef",R=new Array(256),z=0;z<16;++z)for(var Z=z*16,Q=0;Q<16;++Q)R[Z+Q]=X[z]+X[Q];return R}()})(qq);var kI=Ys,Gq=Vq,MOe=qq.Buffer;function f8(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}f8.prototype.initialize=function(t){this.degree=t,this.genPoly=Gq.generateECPolynomial(this.degree)};f8.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var r=kI.alloc(this.degree),n=MOe.concat([t,r],t.length+this.degree),o=Gq.mod(n,this.genPoly),i=this.degree-o.length;if(i>0){var a=kI.alloc(this.degree);return o.copy(a,i),a}return o};var ROe=f8,Kq={},Xs={},d8={};d8.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var Fi={},Yq="[0-9]+",NOe="[A-Z $%*+\\-./:]+",Sp="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Sp=Sp.replace(/u/g,"\\u");var FOe="(?:(?![A-Z0-9 $%*+\\-./:]|"+Sp+`)(?:.|[\r +]))+`;Fi.KANJI=new RegExp(Sp,"g");Fi.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Fi.BYTE=new RegExp(FOe,"g");Fi.NUMERIC=new RegExp(Yq,"g");Fi.ALPHANUMERIC=new RegExp(NOe,"g");var BOe=new RegExp("^"+Sp+"$"),jOe=new RegExp("^"+Yq+"$"),LOe=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Fi.testKanji=function(t){return BOe.test(t)};Fi.testNumeric=function(t){return jOe.test(t)};Fi.testAlphanumeric=function(t){return LOe.test(t)};(function(e){var t=d8,r=Fi;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,a){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?i.ccBits[0]:a<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return r.testNumeric(i)?e.NUMERIC:r.testAlphanumeric(i)?e.ALPHANUMERIC:r.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function n(o){if(typeof o!="string")throw new Error("Param is not a string");var i=o.toLowerCase();switch(i){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(i,a){if(e.isValid(i))return i;try{return n(i)}catch{return a}}})(Xs);(function(e){var t=to,r=gb,n=vb,o=Xs,i=d8,a=l8,s=7973,l=t.getBCHDigit(s);function c(p,h,m){for(var _=1;_<=40;_++)if(h<=e.getCapacity(_,m,p))return _}function u(p,h){return o.getCharCountIndicator(p,h)+4}function f(p,h){var m=0;return p.forEach(function(_){var w=u(_.mode,h);m+=w+_.getBitsLength()}),m}function d(p,h){for(var m=1;m<=40;m++){var _=f(p,m);if(_<=e.getCapacity(m,h,o.MIXED))return m}}e.from=function(h,m){return i.isValid(h)?parseInt(h,10):m},e.getCapacity=function(h,m,_){if(!i.isValid(h))throw new Error("Invalid QR Code version");typeof _>"u"&&(_=o.BYTE);var w=t.getSymbolTotalCodewords(h),y=r.getTotalCodewordsCount(h,m),C=(w-y)*8;if(_===o.MIXED)return C;var I=C-u(_,h);switch(_){case o.NUMERIC:return Math.floor(I/10*3);case o.ALPHANUMERIC:return Math.floor(I/11*2);case o.KANJI:return Math.floor(I/13);case o.BYTE:default:return Math.floor(I/8)}},e.getBestVersionForData=function(h,m){var _,w=n.from(m,n.M);if(a(h)){if(h.length>1)return d(h,w);if(h.length===0)return 1;_=h[0]}else _=h;return c(_.mode,_.getLength(),w)},e.getEncodedBits=function(h){if(!i.isValid(h)||h<7)throw new Error("Invalid QR Code version");for(var m=h<<12;t.getBCHDigit(m)-l>=0;)m^=s<=0;)o^=Zq<0&&(n=this.data.substr(r),o=parseInt(n,10),t.put(o,i*3+1))};var HOe=Pu,VOe=Xs,$w=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Ou(e){this.mode=VOe.ALPHANUMERIC,this.data=e}Ou.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};Ou.prototype.getLength=function(){return this.data.length};Ou.prototype.getBitsLength=function(){return Ou.getBitsLength(this.data.length)};Ou.prototype.write=function(t){var r;for(r=0;r+2<=this.data.length;r+=2){var n=$w.indexOf(this.data[r])*45;n+=$w.indexOf(this.data[r+1]),t.put(n,11)}this.data.length%2&&t.put($w.indexOf(this.data[r]),6)};var WOe=Ou,qOe=Ys,GOe=Xs;function Au(e){this.mode=GOe.BYTE,this.data=qOe.from(e)}Au.getBitsLength=function(t){return t*8};Au.prototype.getLength=function(){return this.data.length};Au.prototype.getBitsLength=function(){return Au.getBitsLength(this.data.length)};Au.prototype.write=function(e){for(var t=0,r=this.data.length;t=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` +Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),e.put(r,13)}};var ZOe=ku,Qq={exports:{}};(function(e){var t={single_source_shortest_paths:function(r,n,o){var i={},a={};a[n]=0;var s=t.PriorityQueue.make();s.push(n,0);for(var l,c,u,f,d,p,h,m,_;!s.empty();){l=s.pop(),c=l.value,f=l.cost,d=r[c]||{};for(u in d)d.hasOwnProperty(u)&&(p=d[u],h=f+p,m=a[u],_=typeof a[u]>"u",(_||m>h)&&(a[u]=h,s.push(u,h),i[u]=c))}if(typeof o<"u"&&typeof a[o]>"u"){var w=["Could not find a path from ",n," to ",o,"."].join("");throw new Error(w)}return i},extract_shortest_path_from_predecessor_list:function(r,n){for(var o=[],i=n;i;)o.push(i),r[i],i=r[i];return o.reverse(),o},find_path:function(r,n,o){var i=t.single_source_shortest_paths(r,n,o);return t.extract_shortest_path_from_predecessor_list(i,o)},PriorityQueue:{make:function(r){var n=t.PriorityQueue,o={},i;r=r||{};for(i in n)n.hasOwnProperty(i)&&(o[i]=n[i]);return o.queue=[],o.sorter=r.sorter||n.default_sorter,o},default_sorter:function(r,n){return r.cost-n.cost},push:function(r,n){var o={value:r,cost:n};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Qq);var JOe=Qq.exports;(function(e){var t=Xs,r=HOe,n=WOe,o=KOe,i=ZOe,a=Fi,s=to,l=JOe;function c(w){return unescape(encodeURIComponent(w)).length}function u(w,y,C){for(var I=[],F;(F=w.exec(C))!==null;)I.push({data:F[0],index:F.index,mode:y,length:F[0].length});return I}function f(w){var y=u(a.NUMERIC,t.NUMERIC,w),C=u(a.ALPHANUMERIC,t.ALPHANUMERIC,w),I,F;s.isKanjiModeEnabled()?(I=u(a.BYTE,t.BYTE,w),F=u(a.KANJI,t.KANJI,w)):(I=u(a.BYTE_KANJI,t.BYTE,w),F=[]);var O=y.concat(C,I,F);return O.sort(function(g,D){return g.index-D.index}).map(function(g){return{data:g.data,mode:g.mode,length:g.length}})}function d(w,y){switch(y){case t.NUMERIC:return r.getBitsLength(w);case t.ALPHANUMERIC:return n.getBitsLength(w);case t.KANJI:return i.getBitsLength(w);case t.BYTE:return o.getBitsLength(w)}}function p(w){return w.reduce(function(y,C){var I=y.length-1>=0?y[y.length-1]:null;return I&&I.mode===C.mode?(y[y.length-1].data+=C.data,y):(y.push(C),y)},[])}function h(w){for(var y=[],C=0;C=0&&s<=6&&(l===0||l===6)||l>=0&&l<=6&&(s===0||s===6)||s>=2&&s<=4&&l>=2&&l<=4?e.set(i+s,a+l,!0,!0):e.set(i+s,a+l,!1,!0))}function lAe(e){for(var t=e.size,r=8;r>s&1)===1,e.set(o,i,a,!0),e.set(i,o,a,!0)}function Mw(e,t,r){var n=e.size,o=oAe.getEncodedBits(t,r),i,a;for(i=0;i<15;i++)a=(o>>i&1)===1,i<6?e.set(i,8,a,!0):i<8?e.set(i+1,8,a,!0):e.set(n-15+i,8,a,!0),i<8?e.set(8,n-i-1,a,!0):i<9?e.set(8,15-i-1+1,a,!0):e.set(8,15-i-1,a,!0);e.set(n-8,8,1,!0)}function fAe(e,t){for(var r=e.size,n=-1,o=r-1,i=7,a=0,s=r-1;s>0;s-=2)for(s===6&&s--;;){for(var l=0;l<2;l++)if(!e.isReserved(o,s-l)){var c=!1;a>>i&1)===1),e.set(o,s-l,c),i--,i===-1&&(a++,i=7)}if(o+=n,o<0||r<=o){o-=n,n=-n;break}}}function dAe(e,t,r){var n=new QOe;r.forEach(function(c){n.put(c.mode.bit,4),n.put(c.getLength(),iAe.getCharCountIndicator(c.mode,e)),c.write(n)});var o=yb.getSymbolTotalCodewords(e),i=hx.getTotalCodewordsCount(e,t),a=(o-i)*8;for(n.getLengthInBits()+4<=a&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);for(var s=(a-n.getLengthInBits())/8,l=0;l=7&&uAe(u,t),fAe(u,l),isNaN(n)&&(n=px.getBestMask(u,Mw.bind(null,u,r))),px.applyMask(n,u),Mw(u,r,n),{modules:u,version:t,errorCorrectionLevel:r,maskPattern:n,segments:o}}Nq.create=function(t,r){if(typeof t>"u"||t==="")throw new Error("No input text");var n=Tw.M,o,i;return typeof r<"u"&&(n=Tw.from(r.errorCorrectionLevel,Tw.M),o=gm.from(r.version),i=px.from(r.maskPattern),r.toSJISFunc&&yb.setToSJISFunction(r.toSJISFunc)),hAe(t,o,n,i)};var eG={},p8={};(function(e){function t(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");var n=r.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+r);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(i){return[i,i]}))),n.length===6&&n.push("F","F");var o=parseInt(n.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+n.slice(0,6).join("")}}e.getOptions=function(n){n||(n={}),n.color||(n.color={});var o=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,i=n.width&&n.width>=21?n.width:void 0,a=n.scale||4;return{width:i,scale:i?4:a,margin:o,color:{dark:t(n.color.dark||"#000000ff"),light:t(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},e.getScale=function(n,o){return o.width&&o.width>=n+o.margin*2?o.width/(n+o.margin*2):o.scale},e.getImageWidth=function(n,o){var i=e.getScale(n,o);return Math.floor((n+o.margin*2)*i)},e.qrToImageData=function(n,o,i){for(var a=o.modules.size,s=o.modules.data,l=e.getScale(a,i),c=Math.floor((a+i.margin*2)*l),u=i.margin*l,f=[i.color.light,i.color.dark],d=0;d=u&&p>=u&&d"u"&&(!a||!a.getContext)&&(l=a,a=void 0),a||(c=n()),l=t.getOptions(l);var u=t.getImageWidth(i.modules.size,l),f=c.getContext("2d"),d=f.createImageData(u,u);return t.qrToImageData(d.data,i,l),r(f,c,u),f.putImageData(d,0,0),c},e.renderToDataURL=function(i,a,s){var l=s;typeof l>"u"&&(!a||!a.getContext)&&(l=a,a=void 0),l||(l={});var c=e.render(i,a,l),u=l.type||"image/png",f=l.rendererOpts||{};return c.toDataURL(u,f.quality)}})(eG);var tG={},vAe=p8;function TI(e,t){var r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function Rw(e,t,r){var n=e+t;return typeof r<"u"&&(n+=" "+r),n}function gAe(e,t,r){for(var n="",o=0,i=!1,a=0,s=0;s0&&l>0&&e[s-1]||(n+=i?Rw("M",l+r,.5+c+r):Rw("m",o,0),o=0,i=!1),l+1':"",c="',u='viewBox="0 0 '+s+" "+s+'"',f=o.width?'width="'+o.width+'" height="'+o.width+'" ':"",d=''+l+c+` +`;return typeof n=="function"&&n(null,d),d};var mAe=bOe,vx=Nq,rG=eG,yAe=tG;function h8(e,t,r,n,o){var i=[].slice.call(arguments,1),a=i.length,s=typeof i[a-1]=="function";if(!s&&!mAe())throw new Error("Callback required as last argument");if(s){if(a<2)throw new Error("Too few arguments provided");a===2?(o=r,r=t,t=n=void 0):a===3&&(t.getContext&&typeof o>"u"?(o=n,n=void 0):(o=n,n=r,r=t,t=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(r=t,t=n=void 0):a===2&&!t.getContext&&(n=r,r=t,t=void 0),new Promise(function(c,u){try{var f=vx.create(r,n);c(e(f,t,n))}catch(d){u(d)}})}try{var l=vx.create(r,n);o(null,e(l,t,n))}catch(c){o(c)}}ph.create=vx.create;ph.toCanvas=h8.bind(null,rG.render);ph.toDataURL=h8.bind(null,rG.renderToDataURL);ph.toString=h8.bind(null,function(e,t,r){return yAe.render(e,r)});var bAe=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=DI[t.format]||DI.default;window.clipboardData.setData(f,e)}else u.clipboardData.clearData(),u.clipboardData.setData(t.format,e);t.onCopy&&(u.preventDefault(),t.onCopy(u.clipboardData))}),document.body.appendChild(s),i.selectNodeContents(s),a.addRange(i);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(u){r&&console.error("unable to copy using execCommand: ",u),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(f){r&&console.error("unable to copy using clipboardData: ",f),r&&console.error("falling back to prompt"),n=_Ae("message"in t?t.message:xAe),window.prompt(n,e)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(i):a.removeAllRanges()),s&&document.body.removeChild(s),o()}return l}var SAe=EAe,vt,Td,v8,nG,MI,g8,oG,pa={},bb=[],CAe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function ua(e,t){for(var r in t)e[r]=t[r];return e}function iG(e){var t=e.parentNode;t&&t.removeChild(e)}function Ta(e,t,r){var n,o=arguments,i={};for(n in t)n!=="key"&&n!=="ref"&&(i[n]=t[n]);if(arguments.length>3)for(r=[r],n=3;n2&&(t.children=bb.slice.call(arguments,2)),r={},t)n!=="key"&&n!=="ref"&&(r[n]=t[n]);return mm(e.type,r,t.key||e.key,t.ref||e.ref,null)}function dG(e){var t={},r={__c:"__cC"+oG++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i=this;return this.getChildContext||(o=[],this.getChildContext=function(){return t[r.__c]=i,t},this.shouldComponentUpdate=function(a){i.props.value!==a.value&&o.some(function(s){s.context=a.value,x1(s)})},this.sub=function(a){o.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){o.splice(o.indexOf(a),1),s&&s.call(a)}}),n.children}};return r.Consumer.contextType=r,r.Provider.__=r,r}vt={__e:function(e,t){for(var r,n;t=t.__;)if((r=t.__c)&&!r.__)try{if(r.constructor&&r.constructor.getDerivedStateFromError!=null&&(n=!0,r.setState(r.constructor.getDerivedStateFromError(e))),r.componentDidCatch!=null&&(n=!0,r.componentDidCatch(e)),n)return x1(r.__E=r)}catch(o){e=o}throw e}},Xo.prototype.setState=function(e,t){var r;r=this.__s!==this.state?this.__s:this.__s=ua({},this.state),typeof e=="function"&&(e=e(r,this.props)),e&&ua(r,e),e!=null&&this.__v&&(t&&this.__h.push(t),x1(this))},Xo.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),x1(this))},Xo.prototype.render=vh,Td=[],v8=0,nG=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,g8=pa,oG=0;var rc,Pn,FI,Iu=0,gx=[],BI=vt.__r,jI=vt.diffed,LI=vt.__c,zI=vt.unmount;function nf(e,t){vt.__h&&vt.__h(Pn,e,Iu||t),Iu=0;var r=Pn.__H||(Pn.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function y8(e){return Iu=1,b8(bG,e)}function b8(e,t,r){var n=nf(rc++,2);return n.__c||(n.__c=Pn,n.__=[r?r(t):bG(void 0,t),function(o){var i=e(n.__[0],o);n.__[0]!==i&&(n.__[0]=i,n.__c.setState({}))}]),n.__}function pG(e,t){var r=nf(rc++,3);!vt.__s&&x8(r.__H,t)&&(r.__=e,r.__H=t,Pn.__H.__h.push(r))}function w8(e,t){var r=nf(rc++,4);!vt.__s&&x8(r.__H,t)&&(r.__=e,r.__H=t,Pn.__h.push(r))}function hG(e){return Iu=5,wb(function(){return{current:e}},[])}function vG(e,t,r){Iu=6,w8(function(){typeof e=="function"?e(t()):e&&(e.current=t())},r==null?r:r.concat(e))}function wb(e,t){var r=nf(rc++,7);return x8(r.__H,t)?(r.__H=t,r.__h=e,r.__=e()):r.__}function gG(e,t){return Iu=8,wb(function(){return e},t)}function mG(e){var t=Pn.context[e.__c],r=nf(rc++,9);return r.__c=e,t?(r.__==null&&(r.__=!0,t.sub(Pn)),t.props.value):e.__}function yG(e,t){vt.useDebugValue&&vt.useDebugValue(t?t(e):e)}function $Ae(e){var t=nf(rc++,10),r=y8();return t.__=e,Pn.componentDidCatch||(Pn.componentDidCatch=function(n){t.__&&t.__(n),r[1](n)}),[r[0],function(){r[1](void 0)}]}function TAe(){gx.some(function(e){if(e.__P)try{e.__H.__h.forEach(mx),e.__H.__h.forEach(yx),e.__H.__h=[]}catch(t){return e.__H.__h=[],vt.__e(t,e.__v),!0}}),gx=[]}function mx(e){e.t&&e.t()}function yx(e){var t=e.__();typeof t=="function"&&(e.t=t)}function x8(e,t){return!e||t.some(function(r,n){return r!==e[n]})}function bG(e,t){return typeof t=="function"?t(e):t}vt.__r=function(e){BI&&BI(e),rc=0,(Pn=e.__c).__H&&(Pn.__H.__h.forEach(mx),Pn.__H.__h.forEach(yx),Pn.__H.__h=[])},vt.diffed=function(e){jI&&jI(e);var t=e.__c;if(t){var r=t.__H;r&&r.__h.length&&(gx.push(t)!==1&&FI===vt.requestAnimationFrame||((FI=vt.requestAnimationFrame)||function(n){var o,i=function(){clearTimeout(a),cancelAnimationFrame(o),setTimeout(n)},a=setTimeout(i,100);typeof window<"u"&&(o=requestAnimationFrame(i))})(TAe))}},vt.__c=function(e,t){t.some(function(r){try{r.__h.forEach(mx),r.__h=r.__h.filter(function(n){return!n.__||yx(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],vt.__e(n,r.__v)}}),LI&&LI(e,t)},vt.unmount=function(e){zI&&zI(e);var t=e.__c;if(t){var r=t.__H;if(r)try{r.__.forEach(function(n){return n.t&&n.t()})}catch(n){vt.__e(n,t.__v)}}};function _8(e,t){for(var r in t)e[r]=t[r];return e}function bx(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}var wG=function(e){var t,r;function n(o){var i;return(i=e.call(this,o)||this).isPureReactComponent=!0,i}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n.prototype.shouldComponentUpdate=function(o,i){return bx(this.props,o)||bx(this.state,i)},n}(Xo);function xG(e,t){function r(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:bx(this.props,o)}function n(o){return this.shouldComponentUpdate=r,Ta(e,_8({},o))}return n.prototype.isReactComponent=!0,n.displayName="Memo("+(e.displayName||e.name)+")",n.t=!0,n}var UI=vt.__b;function _G(e){function t(r){var n=_8({},r);return delete n.ref,e(n,r.ref)}return t.prototype.isReactComponent=t.t=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}vt.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),UI&&UI(e)};var HI=function(e,t){return e?Cs(e).reduce(function(r,n,o){return r.concat(t(n,o))},[]):null},EG={map:HI,forEach:HI,count:function(e){return e?Cs(e).length:0},only:function(e){if((e=Cs(e)).length!==1)throw new Error("Children.only() expects only one child.");return e[0]},toArray:Cs},DAe=vt.__e;function SG(e){return e&&((e=_8({},e)).__c=null,e.__k=e.__k&&e.__k.map(SG)),e}function bm(){this.__u=0,this.o=null,this.__b=null}function CG(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function PG(e){var t,r,n;function o(i){if(t||(t=e()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw t;return Ta(r,i)}return o.displayName="Lazy",o.t=!0,o}function Bc(){this.i=null,this.l=null}vt.__e=function(e,t,r){if(e.then){for(var n,o=t;o=o.__;)if((n=o.__c)&&n.__c)return n.__c(e,t.__c)}DAe(e,t,r)},(bm.prototype=new Xo).__c=function(e,t){var r=this;r.o==null&&(r.o=[]),r.o.push(t);var n=CG(r.__v),o=!1,i=function(){o||(o=!0,n?n(a):a())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){i(),t.__c&&t.__c()};var a=function(){var s;if(!--r.__u)for(r.__v.__k[0]=r.state.u,r.setState({u:r.__b=null});s=r.o.pop();)s.forceUpdate()};r.__u++||r.setState({u:r.__b=r.__v.__k[0]}),e.then(i,i)},bm.prototype.render=function(e,t){return this.__b&&(this.__v.__k[0]=SG(this.__b),this.__b=null),[Ta(Xo,null,t.u?null:e.children),t.u&&e.fallback]};var VI=function(e,t,r){if(++r[1]===r[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]8?2.5:2.7)+"vw":"inherit";return Qe.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:r,onClick:i,rel:"noopener noreferrer",target:"_blank"},Qe.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+o+"') "+t,backgroundSize:"100%"}}),Qe.createElement("div",{style:{fontSize:a},className:"walletconnect-connect__button__text"},n))}var rke=5,Fw=12;function nke(e){var t=hn.isAndroid(),r=Qe.useState(""),n=r[0],o=r[1],i=Qe.useState(""),a=i[0],s=i[1],l=Qe.useState(1),c=l[0],u=l[1],f=a?e.links.filter(function(I){return I.name.toLowerCase().includes(a.toLowerCase())}):e.links,d=e.errorMessage,p=a||f.length>rke,h=Math.ceil(f.length/Fw),m=[(c-1)*Fw+1,c*Fw],_=f.length?f.filter(function(I,F){return F+1>=m[0]&&F+1<=m[1]}):[],w=!t&&h>1,y=void 0;function C(I){o(I.target.value),clearTimeout(y),I.target.value?y=setTimeout(function(){s(I.target.value),u(1)},1e3):(o(""),s(""),u(1))}return Qe.createElement("div",null,Qe.createElement("p",{id:BG,className:"walletconnect-qrcode__text"},t?e.text.connect_mobile_wallet:e.text.choose_preferred_wallet),!t&&Qe.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:n,onChange:C}),Qe.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(t?"__android":p&&f.length?"__wrap":"")},t?Qe.createElement(JAe,{name:e.text.connect,color:KAe,href:e.uri,onClick:Qe.useCallback(function(){hn.saveMobileLinkInfo({name:"Unknown",href:e.uri})},[])}):_.length?_.map(function(I){var F=I.color,O=I.name,g=I.shortName,D=I.logo,H=hn.formatIOSMobile(e.uri,I),G=Qe.useCallback(function(){hn.saveMobileLinkInfo({name:O,href:H})},[_]);return p?Qe.createElement(tke,{color:F,href:H,name:g||O,logo:D,onClick:G}):Qe.createElement(eke,{color:F,href:H,name:O,logo:D,onClick:G})}):Qe.createElement(Qe.Fragment,null,Qe.createElement("p",null,d.length?e.errorMessage:e.links.length&&!f.length?e.text.no_wallets_found:e.text.loading))),w&&Qe.createElement("div",{className:"walletconnect-modal__footer"},Array(h).fill(0).map(function(I,F){var O=F+1,g=c===O;return Qe.createElement("a",{style:{margin:"auto 10px",fontWeight:g?"bold":"normal"},onClick:function(){return u(O)}},O)})))}function oke(e){var t=!!e.message.trim();return Qe.createElement("div",{className:"walletconnect-qrcode__notification"+(t?" notification__show":"")},e.message)}var ike=function(e){try{var t="";return Promise.resolve(RG.toString(e,{margin:0,type:"svg"})).then(function(r){return typeof r=="string"&&(t=r.replace("0||Qe.useEffect(function(){var P=function(){try{if(t)return Promise.resolve();a(!0);var S=VAe(function(){var v=e.qrcodeModalOptions&&e.qrcodeModalOptions.registryUrl?e.qrcodeModalOptions.registryUrl:hn.getWalletRegistryUrl();return Promise.resolve(fetch(v)).then(function(b){return Promise.resolve(b.json()).then(function(B){var M=B.listings,j=r?"mobile":"desktop",U=hn.getMobileLinkRegistry(hn.formatMobileRegistry(M,j),n);a(!1),c(!0),H(U.length?"":e.text.no_supported_wallets),O(U);var E=U.length===1;E&&(_(hn.formatIOSMobile(e.uri,U[0])),d(!0)),C(E)})})},function(v){a(!1),c(!0),H(e.text.something_went_wrong),console.error(v)});return Promise.resolve(S&&S.then?S.then(function(){}):void 0)}catch(v){return Promise.reject(v)}};P()})};G();var V=r?f:!f;return Qe.createElement("div",{id:FG,className:"walletconnect-qrcode__base animated fadeIn"},Qe.createElement("div",{className:"walletconnect-modal__base"},Qe.createElement(ZAe,{onClose:e.onClose}),y&&f?Qe.createElement("div",{className:"walletconnect-modal__single_wallet"},Qe.createElement("a",{onClick:function(){return hn.saveMobileLinkInfo({name:F[0].name,href:m})},href:m,rel:"noopener noreferrer",target:"_blank"},e.text.connect_with+" "+(y?F[0].name:"")+" ›")):t||i||!i&&F.length?Qe.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(V?" right__selected":"")},Qe.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),r?Qe.createElement(Qe.Fragment,null,Qe.createElement("a",{onClick:function(){return d(!1),G()}},e.text.mobile),Qe.createElement("a",{onClick:function(){return d(!0)}},e.text.qrcode)):Qe.createElement(Qe.Fragment,null,Qe.createElement("a",{onClick:function(){return d(!0)}},e.text.qrcode),Qe.createElement("a",{onClick:function(){return d(!1),G()}},e.text.desktop))):null,Qe.createElement("div",null,f||!t&&!i&&!F.length?Qe.createElement(ake,Object.assign({},p)):Qe.createElement(nke,Object.assign({},p,{links:F,errorMessage:D})))))}var lke={choose_preferred_wallet:"Wähle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterstützten Wallet",no_wallets_found:"keine Wallet gefunden"},cke={choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},uke={choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera móvil",scan_qrcode_with_wallet:"Escanea el código QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo salió mal",no_supported_wallets:"Todavía no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},fke={choose_preferred_wallet:"Choisissez votre portefeuille préféré",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copié!",connect_with:"Connectez-vous à l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourné",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouvé"},dke={choose_preferred_wallet:"원하는 지갑을 선택하세요",connect_mobile_wallet:"모바일 지갑과 연결",scan_qrcode_with_wallet:"WalletConnect 지원 지갑에서 QR코드를 스캔하세요",connect:"연결",qrcode:"QR 코드",mobile:"모바일",desktop:"데스크탑",copy_to_clipboard:"클립보드에 복사",copied_to_clipboard:"클립보드에 복사되었습니다!",connect_with:"와 연결하다",loading:"로드 중...",something_went_wrong:"문제가 발생했습니다.",no_supported_wallets:"아직 지원되는 지갑이 없습니다",no_wallets_found:"지갑을 찾을 수 없습니다"},pke={choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se à carteira móvel",scan_qrcode_with_wallet:"Ler o código QR com uma carteira compatível com WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda não há carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},hke={choose_preferred_wallet:"选择你的钱包",connect_mobile_wallet:"连接至移动端钱包",scan_qrcode_with_wallet:"使用兼容 WalletConnect 的钱包扫描二维码",connect:"连接",qrcode:"二维码",mobile:"移动",desktop:"桌面",copy_to_clipboard:"复制到剪贴板",copied_to_clipboard:"复制到剪贴板成功!",connect_with:"通过以下方式连接",loading:"正在加载...",something_went_wrong:"出了问题",no_supported_wallets:"目前还没有支持的钱包",no_wallets_found:"没有找到钱包"},vke={choose_preferred_wallet:"کیف پول مورد نظر خود را انتخاب کنید",connect_mobile_wallet:"به کیف پول موبایل وصل شوید",scan_qrcode_with_wallet:"کد QR را با یک کیف پول سازگار با WalletConnect اسکن کنید",connect:"اتصال",qrcode:"کد QR",mobile:"سیار",desktop:"دسکتاپ",copy_to_clipboard:"کپی به کلیپ بورد",copied_to_clipboard:"در کلیپ بورد کپی شد!",connect_with:"ارتباط با",loading:"...بارگذاری",something_went_wrong:"مشکلی پیش آمد",no_supported_wallets:"هنوز هیچ کیف پول پشتیبانی شده ای وجود ندارد",no_wallets_found:"هیچ کیف پولی پیدا نشد"},XI={de:lke,en:cke,es:uke,fr:fke,ko:dke,pt:pke,zh:hke,fa:vke};function gke(){var e=hn.getDocumentOrThrow(),t=e.getElementById(YI);t&&e.head.removeChild(t);var r=e.createElement("style");r.setAttribute("id",YI),r.innerText=HAe,e.head.appendChild(r)}function mke(){var e=hn.getDocumentOrThrow(),t=e.createElement("div");return t.setAttribute("id",NG),e.body.appendChild(t),t}function jG(){var e=hn.getDocumentOrThrow(),t=e.getElementById(FG);t&&(t.className=t.className.replace("fadeIn","fadeOut"),setTimeout(function(){var r=e.getElementById(NG);r&&e.body.removeChild(r)},GAe))}function yke(e){return function(){jG(),e&&e()}}function bke(){var e=hn.getNavigatorOrThrow().language.split("-")[0]||"en";return XI[e]||XI.en}function wke(e,t,r){gke();var n=mke();Qe.render(Qe.createElement(ske,{text:bke(),uri:e,onClose:yke(t),qrcodeModalOptions:r}),n)}function xke(){jG()}var LG=function(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"};function _ke(e,t,r){console.log(e),LG()?UAe(e):wke(e,t,r)}function Eke(){LG()||xke()}var Ske={open:_ke,close:Eke},Cke=Ske;const ZI=ri(Cke);var At=qs();const JI={font:{family:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, 'Apple Color Emoji', Arial, sans-serif, 'Segoe UI Emoji'"},text:{primary:{color:"#373737"},secondary:{color:"#999999",hover:{color:"#111111"}},error:"#FC6464",valid:"#32D74B"},buttons:{primary:{borderRadius:16,color:"#000373737000",background:"#FFFFFF",border:"#F0F0F0",hover:{color:"#000000",border:"#1A88F8"}},secondary:{borderRadius:16,background:"#F6F7F9",color:"#000000"}},navigation:{color:"#999999"},modal:{background:"#ffffff",divider:"#f7f6f8"},tooltips:{color:"#999999",background:"#ffffff",hover:{background:"#f6f7f9"}},overlay:{background:"rgba(0, 0, 0, 0.06)"},qrCode:{accentColor:"#F7F6F8"}},QI=e=>e,Pke=()=>typeof window>"u"?!1:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;Pke();const Oke={connectKit:{options:{iconStyle:"light"},theme:{preferred:"dark",light:QI(JI),dark:QI(JI)}}},xx=$.createContext(null),oi=()=>{const e=$.useContext(xx);if(!e)throw Error("ConnectSetting Hook must be inside a Provider.");return e},_x=$.createContext(null),Da=()=>{const e=$.useContext(_x);if(!e)throw Error("AlephiumConnect Hook must be inside a Provider.");return e},e$=$.createContext(null),zG=e=>{e={selector:"__ALEPHIUMCONNECT__",...e};const{selector:t,children:r}=e,n=$.useRef(null),[o,i]=$.useState(!1);return $.useEffect(()=>{const a="#"+t.replace(/^#/,"");if(n.current=document.querySelector(a),!n.current){const s=document.createElement("div");s.setAttribute("id",t),document.body.appendChild(s),n.current=s}i(!0)},[t]),n.current&&o?Us.createPortal(r,n.current):null},UG=()=>{var e;const t=a4();return(e=t==null?void 0:t.name)!==null&&e!==void 0?e:""},HG=()=>{var e;const t=a4();return(e=t==null?void 0:t.os)!==null&&e!==void 0?e:""},Ake=()=>HG().toLowerCase().includes("ios"),kke=()=>HG().toLowerCase().includes("android"),S8=()=>kke()||Ake();function Ex(e){return ae.Children.toArray(e).reduce((r,n)=>n.type===ae.Fragment?r.concat(Ex(n.props.children)):(r.push(n),r),[])}const C8=e=>{const t=e.slice(0,6),r=e.slice(-6);return`${t} ... ${r}`};var st=typeof V2.div=="function"?V2:V2.default,Ca={mobileWidth:560};const Ike=st(ut.div)` + z-index: -1; + pointer-events: auto; + position: absolute; + left: 50%; + transform: translateX(-50%); + width: var(--width); + top: 64px; + color: #fff; + font-size: 14px; + line-height: 20px; + font-weight: 500; + background: var(--ck-body-color-danger); + border-radius: 20px; + padding: 24px 46px 82px 24px; + transition: width var(--duration) var(--ease); + a { + font-weight: 700; + text-decoration: underline; + } + code { + font-size: 0.9em; + display: inline-block; + font-family: monospace; + margin: 1px; + padding: 0 4px; + border-radius: 8px; + font-weight: bold; + background: rgba(255, 255, 255, 0.1); + } +`,Sx=Jn` +from { opacity: 0; } + to { opacity: 1; } +`,$ke=Jn` +from { opacity: 0; transform: scale(0.85); } + to { opacity: 1; transform: scale(1); } +`,Tke=Jn` +from { opacity: 0; transform: scale(1.1); } + to { opacity: 1; transform: scale(1); } +`,Cx=Jn` +from { opacity: 1; } + to { opacity: 0; } +`,Dke=Jn` +from { opacity: 1; transform: scale(1); } + to { opacity: 0; transform: scale(1.1); } +`,Mke=Jn` +from { opacity: 1; transform: scale(1); } + to { opacity: 0; transform: scale(0.85); } +`,Ps=st(ut.div)` + max-width: 100%; + width: 295px; + padding-top: 48px; +`,Rke=st(ut.div)` + user-select: none; + position: relative; + display: block; + text-align: center; + color: var(--ck-body-color-muted); + font-size: 15px; + font-weight: 400; + line-height: 21px; + span { + z-index: 2; + position: relative; + display: inline-block; + user-select: none; + pointer-events: none; + padding: 0 14px; + background: var(--ck-body-background); + transition: background-color 200ms ease; + } + &:before { + z-index: 2; + content: ''; + position: absolute; + top: 50%; + left: 0; + right: 0; + height: 1px; + transform: translateY(-1px); + background: var(--ck-body-divider); + box-shadow: var(--ck-body-divider-box-shadow); + } +`,wm=st(ut.div)` + z-index: 3; + pointer-events: none; + user-select: none; + position: absolute; + top: 25px; + left: 50%; + display: flex; + align-items: center; + justify-content: center; + height: 26px; + transform: translateX(-50%); + width: var(--width); + text-align: center; + font-size: 17px; + line-height: 20px; + font-weight: var(--ck-modal-heading-font-weight, 600); + color: var(--ck-body-color); + span { + display: inline-block; + } +`,Nke=st(ut.div)` + position: relative; + padding: 0; +`,uo=st(ut.div)` + left: 0; + right: 0; + text-align: center; + display: flex; + flex-direction: column; + gap: 12px; + padding: 0 0 16px; + + @media only screen and (max-width: ${Ca.mobileWidth}px) { + display: block; + } +`,Ga=st(ut.h1)` + margin: 0; + padding: 0; + line-height: ${e=>e.$small?20:22}px; + font-size: ${e=>e.$small?17:19}px; + font-weight: var(--ck-modal-h1-font-weight, 600); + color: ${e=>e.$error?"var(--ck-body-color-danger)":e.$valid?"var(--ck-body-color-valid)":"var(--ck-body-color)"}; + > svg { + position: relative; + top: -2px; + display: inline-block; + vertical-align: middle; + margin-right: 6px; + } + @media only screen and (max-width: ${Ca.mobileWidth}px) { + margin-bottom: 6px; + font-size: 17px; + } +`,Px=st.div` + font-size: 16px; + font-weight: 400; + line-height: 21px; + color: var(--ck-body-color-muted); + strong { + font-weight: 500; + color: var(--ck-body-color); + } +`,Fke=st(ut.div)` + z-index: 1; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: var(--ck-overlay-background, rgba(71, 88, 107, 0.24)); + backdrop-filter: var(--ck-overlay-backdrop-filter, none); + opacity: 0; + animation: ${e=>e.$active?Sx:Cx} 150ms ease-out both; +`,Bke=Jn` + from{ opacity: 0; transform: scale(0.97); } + to{ opacity: 1; transform: scale(1); } +`,jke=Jn` + from{ opacity: 1; transform: scale(1); } + to{ opacity: 0; transform: scale(0.97); } +`,Lke=Jn` + from { transform: translate3d(0, 100%, 0); } + to { transform: translate3d(0, 0%, 0); } +`,zke=Jn` + from { opacity: 1; } + to { opacity: 0; } +`,VG=st(ut.div)` + z-index: 2; + position: relative; + color: var(--ck-body-color); + + animation: 150ms ease both; + animation-name: ${jke}; + &.active { + animation-name: ${Bke}; + } + + &:before { + content: ''; + position: absolute; + top: 0; + bottom: 0; + left: 50%; + width: var(--width); + height: var(--height); + transform: translateX(-50%); + backface-visibility: hidden; + transition: all 200ms ease; + border-radius: var(--ck-border-radius, 20px); + background: var(--ck-body-background); + box-shadow: var(--ck-modal-box-shadow); + } + + @media only screen and (max-width: ${Ca.mobileWidth}px) { + animation-name: ${zke}; + animation-duration: 130ms; + animation-timing-function: ease; + + &.active { + animation-name: ${Lke}; + animation-duration: 300ms; + animation-delay: 32ms; + animation-timing-function: cubic-bezier(0.15, 1.15, 0.6, 1); + } + + &:before { + width: 100%; + transition: 0ms height cubic-bezier(0.15, 1.15, 0.6, 1); + will-change: height; + } + } +`,WG=st(ut.div)` + z-index: 3; + position: absolute; + top: 0; + left: 50%; + height: 64px; + transform: translateX(-50%); + backface-visibility: hidden; + width: var(--width); + transition: 0.2s ease width; + pointer-events: auto; + //border-bottom: 1px solid var(--ck-body-divider); +`,Uke=st(ut.div)` + position: relative; + overflow: hidden; + height: var(--height); + transition: 0.2s ease height; + @media only screen and (max-width: ${Ca.mobileWidth}px) { + transition: 0ms height cubic-bezier(0.15, 1.15, 0.6, 1); + /* animation-delay: 34ms; */ + } +`,qG=st(ut.div)` + z-index: 2; + position: relative; + top: 0; + left: 50%; + margin-left: calc(var(--width) / -2); + width: var(--width); + /* left: 0; */ + /* width: 100%; */ + display: flex; + justify-content: center; + align-items: center; + transform-origin: center center; + animation: 200ms ease both; + + &.active { + animation-name: ${Tke}; + } + &.active-scale-up { + animation-name: ${$ke}; + } + &.exit-scale-down { + z-index: 1; + pointer-events: none; + position: absolute; + /* top: 0; */ + /* left: 0; */ + animation-name: ${Mke}; + } + &.exit { + z-index: 1; + pointer-events: none; + position: absolute; + /* top: 0; */ + /* left: 0; */ + /* left: 50%; */ + /* transform: translateX(-50%); */ + animation-name: ${Dke}; + animation-delay: 16.6667ms; + } + @media only screen and (max-width: ${Ca.mobileWidth}px) { + /* animation: 0ms ease both; */ + /* animation-delay: 35ms; */ + animation: 0ms cubic-bezier(0.15, 1.15, 0.6, 1) both; + + &.active { + animation-name: ${Sx}; + } + &.active-scale-up { + animation-name: ${Sx}; + } + &.exit-scale-down { + z-index: 3; + animation-name: ${Cx}; + } + &.exit { + z-index: 3; + animation-name: ${Cx}; + animation-delay: 0ms; + } + } +`,GG=st(ut.div)` + margin: 0 auto; + width: fit-content; + padding: 29px 24px 24px; + backface-visibility: hidden; +`,Hke=st.div` + z-index: 2147483646; // z-index set one below max (2147483647) for if we wish to layer things ontop of the modal in a seperate Portal + position: fixed; + inset: 0; +`,Ox=st(ut.button)` + z-index: 3; + cursor: pointer; + position: absolute; + top: 22px; + right: 17px; + width: 32px; + height: 32px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 16px; + padding: 0; + margin: 0; + color: var(--ck-body-action-color); + background: var(--ck-body-background); + transition: background-color 200ms ease, transform 100ms ease; + /* will-change: transform; */ + svg { + display: block; + } + + &:hover { + background: var(--ck-body-background-secondary); + } + &:active { + transform: scale(0.9); + } +`,Ax=st(ut.button)` + z-index: 3; + position: absolute; + inset: 0; + display: flex; + align-items: center; + justify-content: center; + border-radius: 16px; + padding: 0; + margin: 0; + color: var(--ck-body-action-color); + background: var(--ck-body-background); + transition: background-color 200ms ease, transform 100ms ease; + /* will-change: transform; */ + svg { + display: block; + position: relative; + left: -1px; + } + + &:enabled { + cursor: pointer; + &:hover { + background: var(--ck-body-background-secondary); + } + &:active { + transform: scale(0.9); + } + } +`,kx=st(ut.button)` + z-index: 3; + position: absolute; + inset: 0; + transform: translateX(-1px); + display: flex; + align-items: center; + justify-content: center; + border-radius: 16px; + padding: 0; + margin: 0; + color: var(--ck-body-action-color); + background: var(--ck-body-background); + transition: background-color 200ms ease, transform 100ms ease; + /* will-change: transform; */ + svg { + display: block; + position: relative; + } + &:enabled { + cursor: pointer; + &:hover { + background: var(--ck-body-background-secondary); + } + &:active { + transform: scale(0.9); + } + } +`,Vke=st(ut.div)` + --ease: cubic-bezier(0.25, 0.1, 0.25, 1); + --duration: 200ms; + --transition: height var(--duration) var(--ease), width var(--duration) var(--ease); + z-index: 3; + display: block; + pointer-events: none; + position: absolute; + left: 50%; + top: 50%; + width: 100%; + transform: translate3d(-50%, -50%, 0); + backface-visibility: hidden; + @media only screen and (max-width: ${Ca.mobileWidth}px) { + pointer-events: auto; + left: 0; + top: auto; + bottom: -5px; + transform: none; + ${VG} { + max-width: 448px; + margin: 0 auto; + &:before { + width: 100%; + border-radius: var(--ck-border-radius, 30px) var(--ck-border-radius, 30px) 0 0; + } + } + ${qG} { + left: 0; + right: 0; + margin: 0 auto; + width: auto; + } + ${Ps} { + margin: 0 auto; + width: 100% !important; + } + ${wm} { + top: 29px; + } + ${uo} { + gap: 12px; + } + ${Px} { + margin: 0 auto; + max-width: 295px; + } + ${GG} { + width: 100%; + padding: 31px 24px; + } + ${WG} { + width: 100%; + top: 4px; + border-bottom: 0; + } + ${Ox} { + right: 22px; + } + ${Ax} { + top: -1px; + left: -3px; + } + ${kx} { + top: -1px; + left: -3px; + svg { + width: 65%; + height: auto; + } + } + ${Ox}, + ${Ax}, + ${kx} { + // Quick hack for bigger tappable area on mobile + transform: scale(1.4) !important; + background: transparent !important; + svg { + transform: scale(0.8) !important; + } + } + } +`,Wke=9;function qke(){const e=$.useRef(null);function t(r){if(!e.current)return;const n=e.current.querySelectorAll(` + a[href]:not(:disabled), + button:not(:disabled), + textarea:not(:disabled), + input[type="text"]:not(:disabled), + input[type="radio"]:not(:disabled), + input[type="checkbox"]:not(:disabled), + select:not(:disabled) + `),o=n[0],i=n[n.length-1];(r.key==="Tab"||r.keyCode===Wke)&&(r.shiftKey?document.activeElement===o&&(i.focus(),r.preventDefault()):document.activeElement===i&&(o.focus(),r.preventDefault()))}return $.useEffect(()=>{e.current&&(e.current.addEventListener("keydown",t),e.current.focus({preventScroll:!0}));const r=e.current;return()=>{r&&r.removeEventListener("keydown",t)}},[e]),e}function Gke(e){const t=qke();return $.useEffect(()=>{t.current&&t.current.focus({preventScroll:!0})},[t]),L.jsx("div",{ref:t,tabIndex:0,children:e.children})}function Kke(e,t){const r=$.useRef({target:e,previous:t});return r.current.target!==e&&(r.current.previous=r.current.target,r.current.target=e),r.current.previous}const t$={debug:10,info:20,warn:30,error:40,none:100},Yke=typeof window<"u"&&window.document&&window.document.createElement!==void 0?$.useLayoutEffect:$.useEffect,Xke=({logLevel:e="info",maxFontSize:t=100,minFontSize:r=20,onFinish:n,onStart:o,resolution:i=5}={})=>{const a=t$[e],s=$.useCallback(()=>({calcKey:0,fontSize:t,fontSizePrev:r,fontSizeMax:t,fontSizeMin:r}),[t,r]),l=$.useRef(null),c=$.useRef(),u=$.useRef(!1),[f,d]=$.useState(s),{calcKey:p,fontSize:h,fontSizeMax:m,fontSizeMin:_,fontSizePrev:w}=f;let y=null;const[C]=$.useState(()=>new O3e(()=>{y=window.requestAnimationFrame(()=>{u.current||(o&&o(),u.current=!0,d({...s(),calcKey:p+1}))})}));$.useEffect(()=>(l.current&&C.observe(l.current),()=>{y&&window.cancelAnimationFrame(y),C.disconnect()}),[y,C]);const I=l.current&&l.current.innerHTML;return $.useEffect(()=>{p===0||u.current||(I!==c.current&&(o&&o(),d({...s(),calcKey:p+1})),c.current=I)},[p,s,I,o]),Yke(()=>{if(p===0)return;const F=Math.abs(h-w)<=i,O=!!l.current&&(l.current.scrollHeight>l.current.offsetHeight||l.current.scrollWidth>l.current.offsetWidth),g=O&&h===w,D=h>w;if(F){g?(u.current=!1,a<=t$.info&&console.info(`[use-fit-text] reached \`minFontSize = ${r}\` without fitting text`)):O?d({fontSize:D?w:_,fontSizeMax:m,fontSizeMin:_,fontSizePrev:w,calcKey:p}):(u.current=!1,n&&n(h));return}let H,G=m,V=_;O?(H=D?w-h:_-h,G=Math.min(m,h)):(H=D?m-h:w-h,V=Math.max(_,h)),d({calcKey:p,fontSize:h+H/2,fontSizeMax:G,fontSizeMin:V,fontSizePrev:h})},[p,h,m,_,w,n,l,i]),{fontSize:h,ref:l}},P8=ae.forwardRef(({children:e},t)=>{const[r,n]=ae.useState(!1),{fontSize:o,ref:i}=Xke({logLevel:"none",maxFontSize:100,minFontSize:70,onStart:()=>n(!0),onFinish:()=>n(!0)});return L.jsx("div",{ref:i,style:{visibility:r?"visible":"hidden",fontSize:`${o}%`,maxHeight:"100%",maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:e})});P8.displayName="FitText";var Zke={light:{"--ck-connectbutton-font-size":"15px","--ck-connectbutton-color":"#373737","--ck-connectbutton-background":"#F6F7F9","--ck-connectbutton-background-secondary":"#FFFFFF","--ck-connectbutton-hover-color":"#373737","--ck-connectbutton-hover-background":"#F0F2F5","--ck-connectbutton-active-color":"#373737","--ck-connectbutton-active-background":"#EAECF1","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#fff","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-background)","--ck-connectbutton-balance-hover-background":"#F6F7F9","--ck-connectbutton-balance-hover-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-hover-background)","--ck-connectbutton-balance-active-background":"#F0F2F5","--ck-connectbutton-balance-active-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-active-background)","--ck-primary-button-border-radius":"16px","--ck-primary-button-color":"#373737","--ck-primary-button-background":"#F6F7F9","--ck-primary-button-font-weight":"600","--ck-primary-button-hover-color":"#373737","--ck-primary-button-hover-background":"#F0F2F5","--ck-secondary-button-border-radius":"16px","--ck-secondary-button-color":"#373737","--ck-secondary-button-background":"#F6F7F9","--ck-tertiary-button-background":"#FFFFFF","--ck-secondary-button-hover-background":"#e0e4eb","--ck-modal-box-shadow":"0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-overlay-background":"rgba(71, 88, 107, 0.24)","--ck-body-color":"#373737","--ck-body-color-muted":"#999999","--ck-body-color-muted-hover":"#111111","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#F3F4F7","--ck-body-action-color":"#999999","--ck-body-divider":"#f7f6f8","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-siwe-border":"#F0F0F0","--ck-body-disclaimer-color":"#AAAAAB","--ck-body-disclaimer-link-color":"#838485","--ck-body-disclaimer-link-hover-color":"#000000","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0,0,0,0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#F5F7F9","--ck-qr-dot-color":"#000000","--ck-qr-border-color":"#f7f6f8","--ck-focus-color":"#1A88F8","--ck-spinner-color":"var(--ck-focus-color)","--ck-copytoclipboard-stroke":"#CCCCCC"},dark:{"--ck-connectbutton-font-size":"15px","--ck-connectbutton-color":"#ffffff","--ck-connectbutton-background":"#383838","--ck-connectbutton-background-secondary":"#282828","--ck-connectbutton-hover-background":"#404040","--ck-connectbutton-active-background":"#4D4D4D","--ck-connectbutton-balance-color":"#fff","--ck-connectbutton-balance-background":"#282828","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-background)","--ck-connectbutton-balance-hover-background":"#383838","--ck-connectbutton-balance-hover-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-hover-background)","--ck-connectbutton-balance-active-background":"#404040","--ck-connectbutton-balance-active-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-active-background)","--ck-primary-button-color":"#ffffff","--ck-primary-button-background":"#383838","--ck-primary-button-border-radius":"16px","--ck-primary-button-font-weight":"600","--ck-primary-button-hover-background":"#404040","--ck-primary-button-active-border-radius":"16px","--ck-secondary-button-color":"#ffffff","--ck-secondary-button-background":"#333333","--ck-secondary-button-hover-background":"#4D4D4D","--ck-tertiary-button-background":"#424242","--ck-focus-color":"#1A88F8","--ck-overlay-background":"rgba(0,0,0,0.4)","--ck-body-color":"#ffffff","--ck-body-color-muted":"rgba(255, 255, 255, 0.4)","--ck-body-color-muted-hover":"rgba(255, 255, 255, 0.8)","--ck-body-background":"#2B2B2B","--ck-body-background-transparent":"rgba(0,0,0,0)","--ck-body-background-secondary":"#333333","--ck-body-background-secondary-hover-background":"#4D4D4D","--ck-body-background-secondary-hover-outline":"#ffffff","--ck-body-background-tertiary":"#333333","--ck-body-action-color":"#808080","--ck-body-divider":"#383838","--ck-body-color-danger":"#FF4E4E","--ck-body-disclaimer-color":"#858585","--ck-body-disclaimer-link-color":"#ADADAD","--ck-body-disclaimer-link-hover-color":"#FFFFFF","--ck-modal-box-shadow":"0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-copytoclipboard-stroke":"#555555","--ck-tooltip-background":"#2B2B2B","--ck-tooltip-background-secondary":"#333333","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-dropdown-button-color":"#6C7381","--ck-spinner-color":"var(--ck-focus-color)","--ck-qr-dot-color":"#ffffff","--ck-qr-border-color":"#3d3d3d"}},Jke={"--ck-font-family":"Lato","--ck-border-radius":"0px","--ck-connectbutton-color":"#373737","--ck-connectbutton-background":"linear-gradient(180deg, #F0F0EA 0%, #FFFFFF 50%, #F0F0EA 100%) 100% 100% / 200% 200%, #F5F5F1","--ck-connectbutton-box-shadow":" 0 0 0 1px #003C74, 2px 2px 0px rgba(255, 255, 255, 0.75), -2px -2px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 0px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-connectbutton-border-radius":"4.5px","--ck-connectbutton-hover-color":"#373737","--ck-connectbutton-hover-background":"linear-gradient(180deg, #F0F0EA 0%, #FFFFFF 50%, #F0F0EA 100%) 100% 0% / 200% 200%, #F5F5F1","--ck-connectbutton-active-background":"linear-gradient(180deg, #F0F0EA 0%, #FFFFFF 50%, #F0F0EA 100%) 100% 100% / 200% 200%, #F5F5F1","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#fff","--ck-connectbutton-balance-box-shadow":"0 0 0 1px #E4E7E7","--ck-connectbutton-balance-hover-box-shadow":"0 0 0 1px #d7dbdb","--ck-connectbutton-balance-active-box-shadow":"0 0 0 1px #bbc0c0","--ck-focus-color":"#1A88F8","--ck-overlay-background":"rgba(0, 127, 128, 0.8)","--ck-body-color":"#373737","--ck-body-color-muted":"#808080","--ck-body-color-muted-hover":"#111111","--ck-body-background":"#F0EDE2","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary-hover-background":"#FAFAFA","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-action-color":"#373737","--ck-body-color-danger":"#FC6464","--ck-body-color-valid":"#32D74B","--ck-body-divider":"#919B9C","--ck-body-divider-box-shadow":"0px 1px 0px #FBFBF8","--ck-primary-button-background":"linear-gradient(180deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-primary-button-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 0px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-primary-button-border-radius":"6px","--ck-primary-button-hover-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 5px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-primary-button-hover-border-radius":"6px","--ck-modal-heading-font-weight":400,"--ck-modal-box-shadow":` + inset 0px -3px 0px #0F37A9, + inset -2px 0px 0px #0F37A9, + inset 0px -4px 0px #0D5DDF, + inset -4px 0px 0px #0D5DDF, + inset 2px 0px 0px #0453DD, + inset 0px 2px 0px #044FD1, + inset 4px 0px 0px #4283EB, + inset 0px 4px 0px #4283EB + `,"--ck-modal-h1-font-weight":400,"--ck-secondary-button-color":"#373737","--ck-secondary-button-border-radius":"6px","--ck-secondary-button-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 0px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-secondary-button-background":"linear-gradient(180deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-secondary-button-hover-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 4px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-body-background-secondary":"rgba(0, 0, 0, 0.1)","--ck-body-background-tertiary":"linear-gradient(180deg, #FBFBFB 0%, #EFEFEE 100%)","--ck-tertiary-border-radius":"0px","--ck-tertiary-box-shadow":"inset 0 0 0 1px #919B9C, 1px 1px 2px rgba(0, 0, 0, 0.15), inset -2px -2px 0px #FFFFFF","--ck-body-button-text-align":"left","--ck-body-button-box-shadow":"0 2px 4px rgba(0, 0, 0, 0.05 )","--ck-body-disclaimer-background":"linear-gradient(180deg, #FBFBFB 0%, #EFEFEE 100%)","--ck-body-disclaimer-box-shadow":` + inset 0px -3px 0px #0F37A9, + inset -2px 0px 0px #0F37A9, + inset 0px -4px 0px #0D5DDF, + inset -4px 0px 0px #0D5DDF, + inset 2px 0px 0px #0453DD, + inset 4px 0px 0px #4283EB, + inset 0 1px 0 0 #919B9C`,"--ck-body-disclaimer-font-size":"14px","--ck-body-disclaimer-color":"#959594","--ck-body-disclaimer-link-color":"#626262","--ck-body-disclaimer-link-hover-color":"#000000","--ck-qr-dot-color":"#000000","--ck-qr-border-color":"#919B9C","--ck-qr-border-radius":"0","--ck-qr-background":"#FFFFFF","--ck-copytoclipboard-stroke":"rgba(55, 55, 55, 0.4)","--ck-tooltip-background":"linear-gradient(270deg, #F7F3E6 7.69%, #F5F7DA 100%)","--ck-tooltip-background-secondary":"#f6f7f9","--ck-tooltip-color":"#000000","--ck-tooltip-shadow":" 0 0 0 1.5px #2b2622, 0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px #A0A0A0, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-dropdown-button-background":"linear-gradient(180deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-dropdown-button-hover-background":"linear-gradient(0deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-dropdown-pending-color":"#ACA899","--ck-dropdown-active-color":"#FFFFFF","--ck-dropdown-active-static-color":"#ACA899","--ck-dropdown-active-background":"#3F69BF","--ck-dropdown-active-border-radius":"0","--ck-dropdown-active-inset":"-12px","--ck-dropdown-color":"#ACA899","--ck-dropdown-background":"#FFFFFF","--ck-dropdown-box-shadow":"inset 0 0 0 1px #ACA899, 2px 2px 7px rgba(0, 0, 0, 0.15)","--ck-dropdown-border-radius":"0","--ck-alert-color":"#ACA899","--ck-alert-background":"linear-gradient(180deg, #FBFBFB 0%, #EFEFEE 100%)","--ck-alert-box-shadow":"inset 0 0 0 1px #919B9C, 1px 1px 2px rgba(0, 0, 0, 0.15), inset -2px -2px 0px #FFFFFF","--ck-alert-border-radius":"0","--ck-graphic-primary-color":"#333333","--ck-graphic-primary-background":"#FFFFFF","--ck-graphic-compass-background":"#FFFFFF","--ck-siwe-border":"#919B9C"},Qke={"--ck-font-family":'"SF Pro Rounded",ui-rounded,"Nunito",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"8px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-color":"#000000","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"-4px 4px 0px #000000, inset 0 0 0 2px #000000","--ck-connectbutton-border-radius":"8px","--ck-connectbutton-hover-background":"#F3EDE8","--ck-connectbutton-active-box-shadow":"0 0 0 0 #000000, inset 0 0 0 2px #000000","--ck-connectbutton-balance-color":"#000000","--ck-connectbutton-balance-background":"#F3EDE8","--ck-connectbutton-balance-box-shadow":"-4px 4px 0px #000000, inset 0 0 0 2px #000000","--ck-connectbutton-balance-hover-background":"#eee5dd","--ck-connectbutton-balance-connectbutton-box-shadow":"-4px 8px 0px -4px #000000, inset 0 0 0 2px #000000","--ck-connectbutton-balance-connectbutton-border-radius":"0px 8px 8px 0","--ck-primary-button-color":"#373737","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"inset 0 0 0 2px #000000, -4px 4px 0 0 #000000","--ck-primary-button-border-radius":"8px","--ck-primary-button-hover-background":"#F3EDE8","--ck-primary-button-hover-box-shadow":"inset 0 0 0 2px #000000, -0px 0px 0 0 #000000","--ck-secondary-button-border-radius":"8px","--ck-secondary-button-color":"#373737","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"-4px 4px 0 0 #000000, inset 0 0 0 2px #000000","--ck-secondary-button-hover-background":"#F3EDE8","--ck-secondary-button-hover-box-shadow":"0 0 0 0 #000000, inset 0 0 0 2px #000000","--ck-focus-color":"#3B99FC","--ck-overlay-background":"rgba(133, 120, 122, 0.8)","--ck-body-color":"#373737","--ck-body-color-muted":"rgba(0, 0, 0, 0.5)","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#EBE1D8","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"rgba(0,0,0,0.1)","--ck-body-background-secondary-hover-background":"#4D4D4D","--ck-body-background-secondary-hover-outline":"#373737","--ck-body-background-tertiary":"#ffffff","--ck-tertiary-border-radius":"8px","--ck-tertiary-box-shadow":"-4px 4px 0 0 #000000, inset 0 0 0 2px #000000","--ck-body-action-color":"#373737","--ck-body-divider":"#373737","--ck-body-color-danger":"#FF4E4E","--ck-body-disclaimer-background":"#E3D6C9","--ck-body-disclaimer-box-shadow":"-4px 4px 0 0 #000000, inset 2px 0 0 0 #000000, inset -2px 0 0 0 #000000, inset 0 -2px 0 0 #000000","--ck-body-disclaimer-font-weight":"500","--ck-body-disclaimer-color":"#888079","--ck-body-disclaimer-link-color":"#5B5650","--ck-body-disclaimer-link-hover-color":"#000000","--ck-modal-box-shadow":"-10px 10px 0px #000000, inset 0 0 0 2px #000000","--ck-copytoclipboard-stroke":"#555555","--ck-tooltip-border-radius":"8px","--ck-tooltip-color":"#373737","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#EBE1D8","--ck-tooltip-shadow":"-6px 6px 0 0 #000000, 0 0 0 2px #000000","--ck-spinner-color":"#1A88F8","--ck-dropdown-button-color":"#000","--ck-dropdown-button-box-shadow":"-2px 2px 0 2px #000000, 0 0 0 2px #000000","--ck-dropdown-button-background":"#ffffff","--ck-dropdown-button-hover-background":"#F3EDE8","--ck-dropdown-button-hover-box-shadow":"-2px 2px 0 0 #000000, 0 0 0 2px #000000","--ck-dropdown-pending-color":"rgba(0, 0, 0, 0.5)","--ck-dropdown-active-color":"#FFFFFF","--ck-dropdown-active-static-color":"rgba(0, 0, 0, 0.5)","--ck-dropdown-active-background":"#3B99FC","--ck-dropdown-active-box-shadow":"inset 0 0 0 2px #000000","--ck-dropdown-active-border-radius":"8px","--ck-dropdown-color":"rgba(0, 0, 0, 0.5)","--ck-dropdown-background":"#FFFFFF","--ck-dropdown-box-shadow":"-4px 4px 0 0 #000000, inset 0 0 0 2px #000000","--ck-dropdown-border-radius":"8px","--ck-alert-color":"rgba(0, 0, 0, 0.5)","--ck-alert-background":" #F5F5F5","--ck-alert-border-radius":"8px","--ck-qr-border-radius":"8px","--ck-qr-dot-color":"#000000","--ck-qr-border-color":"#000000","--ck-qr-background":"#ffffff","--ck-graphic-primary-color":"#000000","--ck-graphic-primary-background":"#ffffff","--ck-graphic-compass-background":"#FFFFFF","--ck-siwe-border":"#8E8985"},eIe={"--ck-border-radius":"12px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-border-radius":"12px","--ck-connectbutton-color":"#414451","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-hover-background":"#F6F7F9","--ck-connectbutton-hover-box-shadow":"inset 0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#F6F7F9","--ck-connectbutton-balance-box-shadow":"none","--ck-connectbutton-balance-hover-background":"#f1f1f3","--ck-primary-button-border-radius":"12px","--ck-primary-button-color":"#414451","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-primary-button-hover-background":"#F6F7F9","--ck-primary-button-hover-box-shadow":"0 0 0 1px #D9DBDD, 0px 0 0 rgba(0, 0, 0, 0.02)","--ck-secondary-button-border-radius":"12px","--ck-secondary-button-color":"#414451","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-secondary-button-hover-background":"#F6F7F9","--ck-secondary-button-hover-box-shadow":"0 0 0 1px #D9DBDD, 0px 0 0 rgba(0, 0, 0, 0.02)","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 3px 16px rgba(0, 0, 0, 0.08)","--ck-body-color":"#414451","--ck-body-color-muted":"#9196A1","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#F6F8FA","--ck-tertiary-border-radius":"13px","--ck-tertiary-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-body-action-color":"#999999","--ck-body-divider":"#f7f6f8","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#F9FAFA","--ck-body-disclaimer-color":"#AFB1B6","--ck-body-disclaimer-link-color":"#787B84","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#E7E7E7","--ck-dropdown-color":"rgba(55, 55, 55, 0.4)","--ck-dropdown-box-shadow":"0px 2px 15px rgba(0, 0, 0, 0.15)","--ck-alert-color":"#9196A1","--ck-alert-background":"#F6F8FA","--ck-alert-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-alert-border-radius":"8px","--ck-qr-border-radius":"12px","--ck-qr-dot-color":"#2E3138","--ck-qr-border-color":"#E9EAEC","--ck-siwe-border":"#EAEBED"},tIe={"--ck-font-family":'"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"10px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-border-radius":"8px","--ck-connectbutton-color":"#ffffff","--ck-connectbutton-background":"#313235","--ck-connectbutton-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-connectbutton-hover-background":"#414144","--ck-connectbutton-active-background":"#4C4D4F","--ck-connectbutton-balance-color":"#ffffff","--ck-connectbutton-balance-background":"#1F2023","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px #313235","--ck-connectbutton-balance-hover-background":"#313235","--ck-connectbutton-balance-active-background":"#414144","--ck-primary-button-border-radius":"8px","--ck-primary-button-color":"#ffffff","--ck-primary-button-background":"rgba(255, 255, 255, 0.08)","--ck-primary-button-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-primary-button-hover-background":"rgba(255, 255, 255, 0.2)","--ck-secondary-button-border-radius":"8px","--ck-secondary-button-color":"#ffffff","--ck-secondary-button-background":"#363638","--ck-secondary-button-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-secondary-button-hover-background":"#3c3c3e","--ck-overlay-background":"rgba(0,0,0,0.4)","--ck-modal-box-shadow":"inset 0 0 0 1px #38393C, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-focus-color":"#1A88F8","--ck-body-color":"#ffffff","--ck-body-color-muted":"#8B8F97","--ck-body-color-muted-hover":"#ffffff","--ck-body-background":"#1F2023","--ck-body-background-transparent":"rgba(31, 32, 35, 0)","--ck-body-background-secondary":"#313235","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"rgba(255, 255, 255, 0.02)","--ck-body-background-tertiary":"#313235","--ck-tertiary-border-radius":"12px","--ck-tertiary-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.02)","--ck-body-action-color":"#8B8F97","--ck-body-divider":"rgba(255,255,255,0.1)","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#2B2D31","--ck-body-disclaimer-box-shadow":"none","--ck-body-disclaimer-color":"#808183","--ck-body-disclaimer-link-color":"#AAABAD","--ck-body-disclaimer-link-hover-color":"#ffffff","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-background":"#1F2023","--ck-tooltip-background-secondary":"#1F2023","--ck-tooltip-color":"#ffffff","--ck-tooltip-shadow":" 0 0 0 1px rgba(255, 255, 255, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#6C7381","--ck-dropdown-button-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-dropdown-button-background":"#313235","--ck-dropdown-pending-color":"#8B8F97","--ck-dropdown-active-color":"#FFF","--ck-dropdown-active-static-color":"#FFF","--ck-dropdown-active-background":"rgba(255, 255, 255, 0.07)","--ck-dropdown-color":"#8B8F97","--ck-dropdown-background":"#313235","--ck-dropdown-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.03)","--ck-dropdown-border-radius":"8px","--ck-alert-color":"#8B8F97","--ck-alert-background":"#404145","--ck-alert-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.02)","--ck-qr-border-radius":"12px","--ck-qr-dot-color":"#ffffff","--ck-qr-border-color":"rgba(255,255,255,0.1)"},rIe={"--ck-font-family":'"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"0px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-border-radius":"0px","--ck-connectbutton-color":"#414451","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-connectbutton-hover-color":"#111","--ck-connectbutton-hover-box-shadow":"inset 0 0 0 1px #111","--ck-connectbutton-balance-color":"#111111","--ck-connectbutton-balance-background":"#F7F7F7","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px #F7F7F7","--ck-connectbutton-balance-hover-background":"#f1f1f3","--ck-connectbutton-balance-hover-box-shadow":"inset 0 0 0 1px #111","--ck-primary-button-border-radius":"0px","--ck-primary-button-color":"#111111","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-primary-button-hover-box-shadow":"inset 0 0 0 1px #111111","--ck-secondary-button-border-radius":"0px","--ck-secondary-button-color":"#111111","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-secondary-button-hover-box-shadow":"inset 0 0 0 1px #111111","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#E7E7E7","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 3px 16px rgba(0, 0, 0, 0.08)","--ck-body-color":"#111111","--ck-body-color-muted":"#A0A0A0","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#ffffff","--ck-tertiary-border-radius":"0px","--ck-tertiary-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-body-action-color":"#A0A0A0","--ck-body-divider":"#EBEBEB","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#FAFAFA","--ck-body-disclaimer-box-shadow":"inset 0 1px 0 0 #ECECEC","--ck-body-disclaimer-color":"#9D9D9D","--ck-body-disclaimer-link-color":"#6E6E6E","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-border-radius":"0px","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-active-border-radius":"0","--ck-dropdown-box-shadow":"0px 2px 15px rgba(0, 0, 0, 0.15)","--ck-dropdown-border-radius":"0","--ck-alert-color":"rgba(17, 17, 17, 0.4)","--ck-alert-background":"#fff","--ck-alert-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-alert-border-radius":"0","--ck-qr-border-radius":"0px","--ck-qr-dot-color":"#111111","--ck-qr-border-color":"#EBEBEB","--ck-modal-h1-font-weight":"400","--ck-modal-heading-font-weight":"400","--ck-primary-button-font-weight":"400","--ck-siwe-border":"#EBEBEB"},nIe={"--ck-font-family":'"Nunito",ui-rounded,-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"24px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-font-weight":"700","--ck-connectbutton-border-radius":"14px","--ck-connectbutton-color":"#000000","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 2px #DFE4EC, 0 2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-hover-background":"#F9FAFB","--ck-connectbutton-balance-color":"#414451","--ck-connectbutton-balance-background":"#F9FAFB","--ck-connectbutton-balance-box-shadow":"0 2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-balance-hover-background":"#F5F7F9","--ck-connectbutton-balance-hover-box-shadow":"0 2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-balance-active-box-shadow":"0 0 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-active-background":"#F5F7F9","--ck-connectbutton-active-box-shadow":"inset 0 0 0 2px #CFD7E2, 0 0px 0 0 #CFD7E2, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-primary-button-border-radius":"18px","--ck-primary-button-color":"#000000","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -4px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-primary-button-hover-background":"#F5F7F9","--ck-primary-button-hover-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-secondary-button-border-radius":"16px","--ck-secondary-button-color":"#000000","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -4px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-secondary-button-hover-background":"#F5F7F9","--ck-secondary-button-hover-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 3px 16px rgba(0, 0, 0, 0.08)","--ck-body-color":"#000000","--ck-body-color-muted":"#93989F","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#ffffff","--ck-tertiary-border-radius":"22px","--ck-tertiary-box-shadow":"inset 0 0 0 2px #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-body-action-color":"#93989F","--ck-body-divider":"#DFE4EC","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#F9FAFB","--ck-body-disclaimer-font-size":"14px","--ck-body-disclaimer-font-weight":"700","--ck-body-disclaimer-color":"#959697","--ck-body-disclaimer-link-color":"#646464","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":" 0 0 0 2px #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 2px #DFE4EC, 0 2px 0 2px #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#F5F7F9","--ck-dropdown-pending-color":"#848D9A","--ck-dropdown-active-color":"#000000","--ck-dropdown-active-static-color":"#848D9A","--ck-dropdown-active-background":"#F5F7F9","--ck-dropdown-color":"#848D9A","--ck-dropdown-background":"#FFFFFF","--ck-dropdown-box-shadow":"0px 2px 15px rgba(0, 0, 0, 0.15)","--ck-dropdown-border-radius":"16px","--ck-alert-color":"#848D9A","--ck-alert-background":"#F5F7F9","--ck-qr-border-radius":"24px","--ck-qr-dot-color":"#111111","--ck-qr-border-color":"#DFE4EC","--ck-modal-h1-font-weight":"700","--ck-modal-heading-font-weight":"700","--ck-primary-button-font-weight":"700","--ck-siwe-border":"#DFE4EC"},oIe={"--ck-font-family":'"PT Root UI",ui-rounded,"Nunito",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"24px","--ck-connectbutton-font-size":"16px","--ck-connectbutton-font-weight":"700","--ck-connectbutton-border-radius":"10px","--ck-connectbutton-color":"#151C3B","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 1px #D6D8E1","--ck-connectbutton-hover-background":"#E9EBF3","--ck-connectbutton-hover-box-shadow":"inset 0 0 0 1px #D4D8E8","--ck-connectbutton-active-background":"#D4D8E8","--ck-connectbutton-active-box-shadow":"inset 0 0 0 1px #D4D8E8","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#F6F7F9","--ck-connectbutton-balance-box-shadow":"none","--ck-connectbutton-balance-hover-background":"#f1f1f3","--ck-primary-button-border-radius":"16px","--ck-primary-button-color":"#151C3B","--ck-primary-button-background":"#ffffff","--ck-primary-button-font-weight":"700","--ck-primary-button-hover-background":"#DEE1ED","--ck-secondary-button-border-radius":"16px","--ck-secondary-button-color":"#151C3B","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-font-weight":"700","--ck-secondary-button-hover-background":"#DEE1ED","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-overlay-background":"rgba(213, 215, 225, 0.8)","--ck-overlay-backdrop-filter":"blur(6px)","--ck-body-color":"#151C3B","--ck-body-color-muted":"#757A8E","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#F4F4F8","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#E9E9F1","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-tertiary":"#E9E9F1","--ck-tertiary-border-radius":"24px","--ck-body-action-color":"#79809C","--ck-body-divider":"#D9DBE3","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#F9FAFA","--ck-body-disclaimer-color":"#AFB1B6","--ck-body-disclaimer-link-color":"#787B84","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#79809C","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#DEE1ED","--ck-dropdown-button-hover-box-shadow":"0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-color":"#757A8E","--ck-dropdown-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-alert-color":"#9196A1","--ck-alert-background":"#F6F8FA","--ck-alert-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-alert-border-radius":"8px","--ck-qr-border-radius":"24px","--ck-qr-dot-color":"#000000","--ck-qr-background":"#ffffff","--ck-siwe-border":"#DFE4EC","--ck-graphic-primary-background":"#fff","--ck-graphic-compass-background":"#fff","--ck-graphic-primary-box-shadow":"0px 2.94737px 14.7368px rgba(0, 0, 0, 0.1)","--ck-graphic-compass-box-shadow":"0px 2px 9px rgba(0, 0, 0, 0.15)"},Ji={base:Zke,web95:Jke,retro:Qke,soft:eIe,midnight:tIe,minimal:rIe,rounded:nIe,nouns:oIe};const bc={default:{"--ck-font-family":`-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, + 'Apple Color Emoji', Arial, sans-serif, 'Segoe UI Emoji', + 'Segoe UI Symbol'`,"--ck-border-radius":"20px","--ck-secondary-button-border-radius":"16px"},graphics:{light:{"--ck-graphic-wave-stop-01":"#E8F17D","--ck-graphic-wave-stop-02":"#A8ECDE","--ck-graphic-wave-stop-03":"#7AA1F2","--ck-graphic-wave-stop-04":"#DEA1E8","--ck-graphic-wave-stop-05":"#F46D98","--ck-graphic-scaniconwithlogos-01":"#4E4E4E","--ck-graphic-scaniconwithlogos-02":"#272727","--ck-graphic-scaniconwithlogos-03":"#F8D74A","--ck-graphic-scaniconwithlogos-04":"#F6F7F9","--ck-chain-ethereum-01":"#25292E","--ck-chain-ethereum-02":"#fff","--ck-chain-ethereum-03":"#DFE0E0"},dark:{"--ck-graphic-wave-stop-01":"#E8F17D","--ck-graphic-wave-stop-02":"#A8ECDE","--ck-graphic-wave-stop-03":"#7AA1F2","--ck-graphic-wave-stop-04":"#DEA1E8","--ck-graphic-wave-stop-05":"#F46D98","--ck-graphic-scaniconwithlogos-01":"#AFAFAF","--ck-graphic-scaniconwithlogos-02":"#696969","--ck-graphic-scaniconwithlogos-03":"#F8D74A","--ck-graphic-scaniconwithlogos-04":"#3D3D3D"}},ens:{light:{"--ck-ens-01-start":"#FF3B30","--ck-ens-01-stop":"#FF9500","--ck-ens-02-start":"#FF9500","--ck-ens-02-stop":"#FFCC00","--ck-ens-03-start":"#FFCC00","--ck-ens-03-stop":"#34C759","--ck-ens-04-start":"#5856D6","--ck-ens-04-stop":"#AF52DE","--ck-ens-05-start":"#5AC8FA","--ck-ens-05-stop":"#007AFF","--ck-ens-06-start":"#007AFF","--ck-ens-06-stop":"#5856D6","--ck-ens-07-start":"#5856D6","--ck-ens-07-stop":"#AF52DE","--ck-ens-08-start":"#AF52DE","--ck-ens-08-stop":"#FF2D55"},dark:{"--ck-ens-01-start":"#FF453A","--ck-ens-01-stop":"#FF9F0A","--ck-ens-02-start":"#FF9F0A","--ck-ens-02-stop":"#FFD60A","--ck-ens-03-start":"#FFD60A","--ck-ens-03-stop":"#32D74B","--ck-ens-04-start":"#32D74B","--ck-ens-04-stop":"#64D2FF","--ck-ens-05-start":"#64D2FF","--ck-ens-05-stop":"#0A84FF","--ck-ens-06-start":"#0A84FF","--ck-ens-06-stop":"#5E5CE6","--ck-ens-07-start":"#5E5CE6","--ck-ens-07-stop":"#BF5AF2","--ck-ens-08-start":"#BF5AF2","--ck-ens-08-stop":"#FF2D55"}},brand:{"--ck-family-brand":"#1A88F8","--ck-brand-walletConnect":"#3B99FC","--ck-brand-coinbaseWallet":"#0052FF","--ck-brand-metamask":"#f6851b","--ck-brand-metamask-01":"#F6851B","--ck-brand-metamask-02":"#E2761B","--ck-brand-metamask-03":"#CD6116","--ck-brand-metamask-04":"#161616","--ck-brand-metamask-05":"#763D16","--ck-brand-metamask-06":"#D7C1B3","--ck-brand-metamask-07":"#C0AD9E","--ck-brand-metamask-08":"#E4761B","--ck-brand-metamask-09":"#233447","--ck-brand-metamask-10":"#E4751F","--ck-brand-metamask-11":"#FEF5E7","--ck-brand-metamask-12":"#E3C8AB","--ck-brand-trust-01":"#3375BB","--ck-brand-trust-02":"#ffffff","--ck-brand-trust-01b":"#ffffff","--ck-brand-trust-02b":"#3375BB","--ck-brand-argent":"#f36a3d","--ck-brand-imtoken-01":"#11C4D1","--ck-brand-imtoken-02":"#0062AD"}},iIe=e=>{const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(t==null)return e;const r={r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)};return`color(display-p3 ${r.r/255} ${r.g/255} ${r.b/255})`},wc=(e,t)=>ur` + ${Object.keys(e).map(r=>{const n=e[r];return n&&`${r}:${n};`})} + `,Qi={light:Ji.base.light,dark:Ji.base.dark,web95:Ji.web95,retro:Ji.retro,soft:Ji.soft,midnight:Ji.midnight,minimal:Ji.minimal,rounded:Ji.rounded,nouns:Ji.nouns},di=(e,t)=>{const r=t?" !important":"";return ur` + ${Object.keys(e).map(n=>{const o=e[n];return o&&`${n}:${o}${r};`})} + @supports (color: color(display-p3 1 1 1)) { + ${Object.keys(e).map(n=>{const o=e[n];return`${n}:${iIe(o)}${r};`})} + } + `},ao={default:wc(bc.default),light:di(Qi.light),dark:di(Qi.dark),web95:di(Qi.web95),retro:di(Qi.retro),soft:di(Qi.soft),midnight:di(Qi.midnight),minimal:di(Qi.minimal),rounded:di(Qi.rounded),nouns:di(Qi.nouns)},Qc={brand:wc(bc.brand),ensLight:wc(bc.ens.light),ensDark:wc(bc.ens.dark),graphicsLight:wc(bc.graphics.light),graphicsDark:wc(bc.graphics.dark)},r$=ur` + ${Qc.brand} + ${Qc.ensLight} + ${Qc.graphicsLight} +`,n$=ur` + ${Qc.brand} + ${Qc.ensDark} + ${Qc.graphicsDark} +`;let fi="auto";const O8=st(ut.div)` + ${ao.default} + + ${e=>{switch(e.$useTheme){case"web95":return fi="light",ao.web95;case"retro":return fi="light",ao.retro;case"soft":return fi="light",ao.soft;case"midnight":return fi="dark",ao.midnight;case"minimal":return fi="light",ao.minimal;case"rounded":return fi="light",ao.rounded;case"nouns":return fi="light",ao.nouns;default:return e.$useMode==="light"?(fi="light",ao.light):e.$useMode==="dark"?(fi="dark",ao.dark):ur` + @media (prefers-color-scheme: light) { + ${ao.light} + } + @media (prefers-color-scheme: dark) { + ${ao.dark} + } + `}}} + + ${e=>{switch(fi){case"light":return r$;case"dark":return n$;default:return ur` + ${r$} + @media (prefers-color-scheme: dark) { + ${n$} + } + `}}} + + + ${e=>{if(e.$customTheme)return di(e.$customTheme,!0)}} + + all: initial; + text-align: left; + text-direction: ltr; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-text-stroke: 0.001px transparent; + text-size-adjust: none; + font-size: 16px; + + button { + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-text-stroke: 0.001px transparent; + } + + &, + * { + font-family: var(--ck-font-family); + box-sizing: border-box; + outline: none; + border: none; + } + /* + @media (prefers-reduced-motion) { + * { + animation-duration: 60ms !important; + transition-duration: 60ms !important; + } + } + */ + img, + svg { + max-width: 100%; + } + strong { + font-weight: 600; + } + a:focus-visible, + button:focus-visible { + outline: 2px solid var(--ck-focus-color); + } +`,aIe=({...e})=>L.jsx("svg",{"aria-hidden":"true",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:L.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 11C20 15.9706 15.9706 20 11 20C6.02944 20 2 15.9706 2 11C2 6.02944 6.02944 2 11 2C15.9706 2 20 6.02944 20 11ZM22 11C22 17.0751 17.0751 22 11 22C4.92487 22 0 17.0751 0 11C0 4.92487 4.92487 0 11 0C17.0751 0 22 4.92487 22 11ZM11.6445 12.7051C11.6445 13.1348 11.3223 13.4678 10.7744 13.4678C10.2266 13.4678 9.92578 13.1885 9.92578 12.6191V12.4795C9.92578 11.4268 10.4951 10.8574 11.2686 10.3203C12.2031 9.67578 12.665 9.32129 12.665 8.59082C12.665 7.76367 12.0205 7.21582 11.043 7.21582C10.3232 7.21582 9.80762 7.57031 9.45312 8.16113C9.38282 8.24242 9.32286 8.32101 9.2667 8.39461C9.04826 8.68087 8.88747 8.8916 8.40039 8.8916C8.0459 8.8916 7.66992 8.62305 7.66992 8.15039C7.66992 7.96777 7.70215 7.7959 7.75586 7.61328C8.05664 6.625 9.27051 5.75488 11.1182 5.75488C12.9336 5.75488 14.5234 6.71094 14.5234 8.50488C14.5234 9.7832 13.7822 10.417 12.7402 11.1045C11.999 11.5986 11.6445 11.9746 11.6445 12.5762V12.7051ZM11.9131 15.5625C11.9131 16.1855 11.376 16.6797 10.7529 16.6797C10.1299 16.6797 9.59277 16.1748 9.59277 15.5625C9.59277 14.9395 10.1191 14.4453 10.7529 14.4453C11.3867 14.4453 11.9131 14.9287 11.9131 15.5625Z",fill:"currentColor"})}),o$=({...e})=>L.jsxs(ut.svg,{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[L.jsx("path",{d:"M1 13L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),L.jsx("path",{d:"M1 0.999999L13 13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),sIe=({...e})=>L.jsx(ut.svg,{width:9,height:16,viewBox:"0 0 9 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:L.jsx("path",{d:"M8 1L1 8L8 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Bw=.22,lIe={initial:{zIndex:2,opacity:0},animate:{opacity:1,scale:1,transition:{duration:Bw*.75,delay:Bw*.25,ease:[.26,.08,.25,1]}},exit:{zIndex:1,opacity:0,pointerEvents:"none",position:"absolute",left:["50%","50%"],x:["-50%","-50%"],transition:{duration:Bw,ease:[.26,.08,.25,1]}}},vn={CONNECTORS:"CONNECTORS",PROFILE:"PROFILE",CONNECT:"CONNECT"},cIe=({open:e,pages:t,pageId:r,positionInside:n,inline:o,onClose:i,onBack:a,onInfo:s})=>{const l=oi(),c=S8(),[u,f]=CU({timeout:160,preEnter:!0,mountOnEnter:!0,unmountOnExit:!0}),d=!(u==="exited"||u==="unmounted"),p=u==="preEnter"||u!=="exiting",h=l.route===vn.CONNECTORS?0:1,m=Kke(h,h);$.useEffect(()=>{f(e),e&&C(void 0)},[e]);const[_,w]=$.useState({width:void 0,height:void 0}),[y,C]=$.useState(void 0),I=V=>{const P={width:V==null?void 0:V.offsetWidth,height:V==null?void 0:V.offsetHeight};w({width:`${P==null?void 0:P.width}px`,height:`${P==null?void 0:P.height}px`})},F=$.useRef(null),O=$.useRef(),g=$.useCallback(V=>{V&&(F.current=V,C(y!==void 0),clearTimeout(O.current),O.current=setTimeout(()=>C(!1),360),I(V))},[y,O,F]);$.useEffect(()=>{F.current&&I(F.current)},[c]),$.useEffect(()=>{if(!d){w({width:void 0,height:void 0});return}const V=P=>{P.key==="Escape"&&i&&i()};return document.addEventListener("keydown",V),()=>{document.removeEventListener("keydown",V)}},[d,i]);const D={"--height":_.height,"--width":_.width};function H(){switch(l.route){case vn.CONNECTORS:return"Connectors";case vn.PROFILE:return"Profile";default:return""}}const G=L.jsx(O8,{$useTheme:l.theme,$useMode:l.mode,$customTheme:l.customTheme,children:L.jsxs(Hke,{role:"dialog",style:{pointerEvents:p?"auto":"none",position:n?"absolute":void 0},children:[!o&&L.jsx(Fke,{$active:p,onClick:i}),L.jsxs(Vke,{style:D,initial:!1,children:[L.jsx("div",{style:{pointerEvents:y?"all":"none",position:"absolute",top:0,bottom:0,left:"50%",transform:"translateX(-50%)",width:"var(--width)",zIndex:9,transition:"width 200ms ease"}}),L.jsxs(VG,{className:`${p&&"active"}`,children:[L.jsx(Ko,{initial:!1,children:l.errorMessage&&L.jsxs(Ike,{initial:{y:"10%",x:"-50%"},animate:{y:"-100%"},exit:{y:"100%"},transition:{duration:.2,ease:"easeInOut"},children:[L.jsx("span",{children:l.errorMessage}),L.jsx("div",{onClick:()=>console.log("click"),style:{position:"absolute",right:24,top:24},children:L.jsx(o$,{})})]})}),L.jsxs(WG,{children:[i&&L.jsx(Ox,{"aria-label":"close",onClick:i,children:L.jsx(o$,{})}),L.jsx("div",{style:{position:"absolute",top:23,left:20,width:32,height:32},children:L.jsx(Ko,{children:a?L.jsx(Ax,{disabled:y,"aria-label":"back",onClick:a,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:c?0:.1,delay:c?.01:0},children:L.jsx(sIe,{})},"backButton"):l.route===vn.PROFILE&&s&&L.jsx(kx,{disabled:y,"aria-label":"more info",onClick:s,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:c?0:.1,delay:c?.01:0},children:L.jsx(aIe,{})},"infoButton")})})]}),L.jsx(wm,{children:L.jsx(Ko,{children:L.jsx(ut.div,{style:{position:"absolute",top:0,bottom:0,left:52,right:52,display:"flex",justifyContent:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:c?0:.17,delay:c?.01:0},children:L.jsx(P8,{children:H()})},`${l.route}-''}`)})}),L.jsx(Uke,{children:t.map(({id:V,content:P})=>L.jsx(uIe,{open:V===r,initial:!n&&u!=="entered",enterAnim:V===r?h>m?"active-scale-up":"active":"",exitAnim:V!==r?h{const[i,a]=CU({timeout:400,preEnter:!0,initialEntered:t,mountOnEnter:!0,unmountOnExit:!0}),s=!(i==="exited"||i==="unmounted"),l=i==="preEnter"||i!=="exiting";return $.useEffect(()=>{a(t)},[t]),s?L.jsx(qG,{className:`${l?n:o}`,style:{animationDuration:r?"0ms":void 0,animationDelay:r?"0ms":void 0},children:e}):null},i$=({children:e})=>L.jsx(Rke,{children:L.jsx("span",{children:e??"or"})}),fIe=({background:e=!1,...t})=>L.jsx("svg",{...t,"aria-hidden":"true",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e?{background:"var(--ck-brand-walletConnect)"}:void 0,children:L.jsx("path",{d:"M9.58818 11.8556C13.1293 8.31442 18.8706 8.31442 22.4117 11.8556L22.8379 12.2818C23.015 12.4588 23.015 12.7459 22.8379 12.9229L21.3801 14.3808C21.2915 14.4693 21.148 14.4693 21.0595 14.3808L20.473 13.7943C18.0026 11.3239 13.9973 11.3239 11.5269 13.7943L10.8989 14.4223C10.8104 14.5109 10.6668 14.5109 10.5783 14.4223L9.12041 12.9645C8.94336 12.7875 8.94336 12.5004 9.12041 12.3234L9.58818 11.8556ZM25.4268 14.8706L26.7243 16.1682C26.9013 16.3452 26.9013 16.6323 26.7243 16.8093L20.8737 22.6599C20.6966 22.8371 20.4096 22.8371 20.2325 22.6599L16.0802 18.5076C16.0359 18.4634 15.9641 18.4634 15.9199 18.5076L11.7675 22.6599C11.5905 22.8371 11.3034 22.8371 11.1264 22.66C11.1264 22.66 11.1264 22.6599 11.1264 22.6599L5.27561 16.8092C5.09856 16.6322 5.09856 16.3451 5.27561 16.168L6.57313 14.8706C6.75019 14.6934 7.03726 14.6934 7.21431 14.8706L11.3668 19.023C11.411 19.0672 11.4828 19.0672 11.5271 19.023L15.6793 14.8706C15.8563 14.6934 16.1434 14.6934 16.3205 14.8706L20.473 19.023C20.5172 19.0672 20.589 19.0672 20.6332 19.023L24.7856 14.8706C24.9627 14.6935 25.2498 14.6935 25.4268 14.8706Z",fill:e?"white":"var(--ck-brand-walletConnect)"})}),dIe=({...e})=>L.jsx("svg",{...e,"aria-hidden":"true",width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:"black"},children:L.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M37.2106 16H16V29.4577H19.2182V19.2182L37.2106 19.1011V16ZM37.3568 33.4073V54.6179H50.8146V51.3997H40.575L40.458 33.4073H37.3568ZM16 72.1714H37.2106V69.0703L19.2182 68.9533V58.7137H16V72.1714ZM50.9609 16H72.1714V29.4577H68.9533V19.2182L50.9609 19.1011V16ZM72.1714 72.1714H50.9609V69.0703L68.9533 68.9533V58.7137H72.1714V72.1714Z",fill:"white"})}),pIe=({...e})=>L.jsx("svg",{...e,version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:"36.000000pt",height:"36.000000pt",viewBox:"0 0 108.000000 108.000000",preserveAspectRatio:"xMidYMid meet",children:L.jsxs("g",{transform:"translate(0.000000,108.000000) scale(0.100000,-0.100000)",fill:"#000000",stroke:"none",children:[L.jsx("path",{d:`M655 871 l-30 -6 -3 -108 -3 -109 31 6 c16 3 44 9 60 12 l30 6 0 104 +0 104 -27 -1 c-16 -1 -41 -4 -58 -8z`}),L.jsx("path",{d:`M381 831 c-19 -3 -36 -10 -37 -16 -2 -5 54 -136 124 -290 l128 -280 +64 3 c35 1 68 6 73 11 5 5 -48 133 -120 292 l-129 284 -34 1 c-19 1 -50 -1 +-69 -5z`}),L.jsx("path",{d:`M390 426 l-55 -11 -3 -114 -3 -114 52 7 c90 12 90 12 87 133 -2 60 +-7 107 -13 109 -5 1 -35 -3 -65 -10z`})]})});var Rr={AlephiumIcon:pIe,WalletConnect:fIe,Ledger:dIe};let KG=[];typeof window<"u"&&(KG=[{id:"injected",name:"Extension Wallet",shortName:"Browser",logos:{default:L.jsx(Rr.AlephiumIcon,{}),mobile:L.jsx("div",{style:{padding:5,background:"var(--ck-body-background-tertiary)",borderRadius:"27%",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.02)"},children:L.jsx("div",{style:{transform:"scale(0.75)",position:"relative",width:"100%"},children:L.jsx(Rr.AlephiumIcon,{})})}),transparent:L.jsx(Rr.AlephiumIcon,{})},scannable:!1,extensionIsInstalled:()=>!!window.alephiumProviders},{id:"desktopWallet",name:"Desktop wallet",shortName:"Desktop wallet",logos:{default:L.jsx(Rr.AlephiumIcon,{}),mobile:L.jsx("div",{style:{padding:5,background:"var(--ck-body-background-tertiary)",borderRadius:"27%",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.02)"},children:L.jsx("div",{style:{transform:"scale(0.75)",position:"relative",width:"100%"},children:L.jsx(Rr.AlephiumIcon,{})})}),transparent:L.jsx(Rr.AlephiumIcon,{})},scannable:!1},{id:"walletConnect",name:"WalletConnect",shortName:"WalletConnect",logos:{default:L.jsx(Rr.WalletConnect,{}),mobile:L.jsx("div",{style:{padding:5,background:"var(--ck-body-background-secondary)",borderRadius:"21%",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.02)"},children:L.jsx(Rr.WalletConnect,{})}),transparent:L.jsx(Rr.WalletConnect,{background:!1}),connectorButton:L.jsx(Rr.WalletConnect,{}),qrCode:L.jsx(Rr.WalletConnect,{background:!0})},logoBackground:"var(--ck-brand-walletConnect)",scannable:!0}]);var El=KG;const hIe=st(ut.div)` + display: flex; + flex-direction: column; + gap: 12px; + padding: 0 0 16px; +`,vIe=st(ut.button)` + cursor: pointer; + user-select: none; + position: relative; + display: flex; + align-items: center; + padding: 0 20px; + width: 100%; + height: 64px; + font-size: 17px; + font-weight: var(--ck-primary-button-font-weight, 500); + line-height: 20px; + text-align: var(--ck-body-button-text-align, left); + transition: 180ms ease; + transition-property: background, color, box-shadow, transform; + will-change: transform, box-shadow, background-color, color; + + --fallback-color: var(--ck-primary-button-color); + --fallback-background: var(--ck-primary-button-background); + --fallback-box-shadow: var(--ck-primary-button-box-shadow); + --fallback-border-radius: var(--ck-primary-button-border-radius); + + --color: var(--ck-primary-button-color, var(--fallback-color)); + --background: var(--ck-primary-button-background, var(--fallback-background)); + --box-shadow: var(--ck-primary-button-box-shadow, var(--fallback-box-shadow)); + --border-radius: var(--ck-primary-button-border-radius, var(--fallback-border-radius)); + + --hover-color: var(--ck-primary-button-hover-color, var(--color)); + --hover-background: var(--ck-primary-button-hover-background, var(--background)); + --hover-box-shadow: var(--ck-primary-button-hover-box-shadow, var(--box-shadow)); + --hover-border-radius: var(--ck-primary-button-hover-border-radius, var(--border-radius)); + + --active-color: var(--ck-primary-button-active-color, var(--hover-color)); + --active-background: var(--ck-primary-button-active-background, var(--hover-background)); + --active-box-shadow: var(--ck-primary-button-active-box-shadow, var(--hover-box-shadow)); + --active-border-radius: var(--ck-primary-button-active-border-radius, var(--hover-border-radius)); + + color: var(--color); + background: var(--background); + box-shadow: var(--box-shadow); + border-radius: var(--border-radius); + + &:disabled { + transition: 180ms ease; + } + + &:not(:disabled) { + &:hover { + color: var(--hover-color); + background: var(--hover-background); + box-shadow: var(--hover-box-shadow); + border-radius: var(--hover-border-radius); + } + &:focus-visible { + transition-duration: 100ms; + color: var(--hover-color); + background: var(--hover-background); + box-shadow: var(--hover-box-shadow); + border-radius: var(--hover-border-radius); + } + &:active { + color: var(--active-color); + background: var(--active-background); + box-shadow: var(--active-box-shadow); + border-radius: var(--active-border-radius); + } + } +`,gIe=st(ut.span)` + width: 100%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + padding-right: 38px; +`,mIe=st(ut.div)` + position: absolute; + right: 20px; + width: 32px; + height: 32px; + overflow: hidden; + svg { + display: block; + width: 100%; + height: 100%; + } +`,yIe=st(ut.div)` + display: flex; + flex-direction: row; + align-items: flex-start; + justify-content: space-between; + padding: 14px 0 28px; + margin: 0 0; +`,bIe=st(ut.button)` + --background: var(--ck-body-background-secondary); + cursor: pointer; + user-select: none; + position: relative; + padding: 0; + width: 100%; + min-width: 25%; + font-size: 13px; + font-weight: 500; + line-height: 13px; + text-align: center; + transition: transform 100ms ease; + + background: none; + + &:disabled { + cursor: not-allowed; + opacity: 0.4; + } + + &:not(:disabled) { + &:active { + transform: scale(0.97); + } + } +`,wIe=st(ut.span)` + display: block; + padding: 10px 0 0; + color: var(--ck-body-color); + opacity: 0.75; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +`,xIe=st(ut.div)` + margin: 0 auto; + width: 60px; + height: 60px; + overflow: hidden; + svg { + border-radius: inherit; + display: block; + position: relative; + transform: translate3d(0, 0, 0); + width: 100%; + height: 100%; + } +`,_Ie=()=>{const e=El.find(t=>t.id==="desktopWallet");if(!e)throw new Error("Desktop wallet connector configuration not found");return e},EIe=e=>{const t=typeof window<"u",r=S8()&&!t;return{id:"injected",name:"Extension Wallet",shortName:"browser",scannable:!1,logos:{default:L.jsx(Rr.AlephiumIcon,{})},installed:!!(!r&&t)}},SIe=e=>({id:"walletConnect",name:"Other Wallets",logos:{default:L.jsx(Rr.WalletConnect,{}),mobile:L.jsx(Rr.WalletConnect,{}),transparent:L.jsx(Rr.WalletConnect,{background:!1}),connectorButton:L.jsx(Rr.WalletConnect,{}),qrCode:L.jsx(Rr.WalletConnect,{background:!0})},logoBackground:"var(--ck-brand-walletConnect)",scannable:!0}),CIe=({})=>[EIe(),SIe(),_Ie()];function PIe(){return CIe({})}const OIe=()=>{const e=oi(),t=S8(),r=PIe();return L.jsx(Ps,{style:{width:312},children:t?L.jsx(L.Fragment,{children:L.jsx(yIe,{children:El.map(n=>{var o,i,a,s,l;const c=El.filter(d=>d.id===n.id)[0];if(!c)return null;let u=c.logos,f=(i=(o=c.shortName)!==null&&o!==void 0?o:c.name)!==null&&i!==void 0?i:n.name;if(c.id==="injected"&&n.name){const d=a$(n.name,r);d&&(u=d.logos,f=d.name.replace(" Wallet",""))}return c.id==="walletConnect"?f="Wallet Connect":c.id==="desktopWallet"&&(f="Desktop wallet"),L.jsxs(bIe,{onClick:()=>{e.setRoute(vn.CONNECT),e.setConnectorId(n.id)},children:[L.jsx(xIe,{children:(l=(s=(a=u.mobile)!==null&&a!==void 0?a:u.appIcon)!==null&&s!==void 0?s:u.connectorButton)!==null&&l!==void 0?l:u.default}),L.jsx(wIe,{children:f})]},`m-${n.id}`)})})}):L.jsx(L.Fragment,{children:L.jsx(hIe,{children:El.map(n=>{var o,i;const a=El.filter(u=>u.id===n.id)[0];if(!a)return null;let s=a.logos,l=(o=a.name)!==null&&o!==void 0?o:n.name;if(a.id==="walletConnect"?l="WalletConnect":a.id==="desktopWallet"&&(l="Desktop wallet"),a.id==="injected"&&n.name){const u=a$(n.name,r);u&&(s=u.logos,l=u.name)}let c=(i=s.connectorButton)!==null&&i!==void 0?i:s.default;return a.extensionIsInstalled&&s.appIcon&&a.extensionIsInstalled()&&(c=s.appIcon),L.jsxs(vIe,{disabled:e.route!==vn.CONNECTORS,onClick:()=>{e.setRoute(vn.CONNECT),e.setConnectorId(n.id)},children:[L.jsx(mIe,{children:c}),L.jsx(gIe,{children:l})]},n.id)})})})})},a$=(e,t)=>{let r=e.split(/[(),]+/);r.shift(),r=r.map(i=>i.trim());const n=r.filter(i=>t.map(s=>s.name).includes(i)?i:null);return n.length===0?null:t.filter(i=>i.installed&&i.name===n[0])[0]},dc=st(ut.div)` + display: flex; + flex-direction: column; + gap: 6px; + position: relative; + left: 0; + right: 0; + ${uo} { + padding: 0 8px 32px; + gap: 12px; + } +`,jw=2,AIe=Jn` + 0%{ transform:none; } + 25%{ transform:translateX(${jw}px); } + 50%{ transform:translateX(-${jw}px); } + 75%{ transform:translateX(${jw}px); } + 100%{ transform:none; } +`,kIe=Jn` + 0%{ opacity:1; } + 100%{ opacity:0; } +`,Md=st(ut.div)` + /* + background: var( + --ck-body-background + ); // To stop the overlay issue during transition for the squircle spinner + */ +`,IIe=st(ut.div)` + display: flex; + align-items: center; + justify-content: center; + margin: 10px auto 16px; + height: 120px; + //transform: scale(1.001); // fixes shifting issue between states +`,$Ie=st(ut.div)` + user-select: none; + position: relative; + --spinner-error-opacity: 0; + &:before { + content: ''; + position: absolute; + inset: -5px; + opacity: 0; + background: var(--ck-body-color-danger); + ${e=>e.$circle&&ur` + border-radius: 50%; + background: none; + box-shadow: inset 0 0 0 3.5px var(--ck-body-color-danger); + `} + } + ${e=>e.$shake&&ur` + animation: ${AIe} 220ms ease-out both; + &:before { + animation: ${kIe} 220ms ease-out 750ms both; + } + `} +`,TIe=st(ut.button)` + z-index: 5; + appearance: none; + position: absolute; + right: 2px; + bottom: 2px; + padding: 0; + display: flex; + align-items: center; + justify-content: center; + width: 32px; + height: 32px; + border-radius: 16px; + cursor: pointer; + overflow: hidden; + background: none; + + color: var(--ck-body-background); + transition: color 200ms ease; + box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.15); + + &:before { + z-index: 3; + content: ''; + position: absolute; + inset: 0; + opacity: 0; + transition: opacity 200ms ease; + background: var(--ck-body-color); + } + + &:hover:before { + opacity: 0.1; + } +`,DIe=st(ut.div)` + position: absolute; + inset: 0; + + &:before { + z-index: 1; + content: ''; + position: absolute; + inset: 3px; + border-radius: 16px; + background: conic-gradient(from 90deg, currentColor 10%, var(--ck-body-color) 80%); + } + + svg { + z-index: 2; + display: block; + position: relative; + width: 100%; + height: 100%; + } +`,s$=Jn` + 0%{ transform: rotate(0deg); } + 100%{ transform: rotate(360deg); } +`,MIe=st(ut.div)` + position: absolute; + right: 16px; + top: 0; + bottom: 0; + display: flex; + align-items: center; + justify-content: center; + animation: ${s$} 1s linear infinite; + svg { + display: block; + position: relative; + animation: ${s$} 1s ease-in-out infinite; + } +`,eu=st.svg` + --x: -3px; + --stroke-width: 2; + position: relative; + top: 1px; + left: -0.5px; + display: inline-block; + vertical-align: middle; + margin-left: 9px; + margin-right: 1px; + transition: all 100ms ease; + transform: translateX(var(--x, -3px)); + color: var(--ck-secondary-button-color, var(--ck-body-color)); + opacity: 0.4; +`,Rd=st.path``,Nd=st.line` + transition: inherit; + transition-property: transform; + transform-origin: 90% 50%; + transform: scaleX(0.1); +`,Ix=st.div` + display: inline-block; + vertical-align: middle; + position: relative; + margin-right: 6px; + color: var(--ck-secondary-button-color, var(--ck-body-color)); +`,RIe=st.div` + transform: rotate(90deg); + ${eu} { + margin: 0 auto; + } +`,NIe=st(ut.div)` + display: flex; + align-items: center; + justify-content: center; + inset: 0; + height: 100%; +`,FIe=st.button` + + ${({disabled:e})=>e&&ur` + cursor: not-allowed; + pointer-events: none; + `} + + ${({$variant:e})=>{if(e==="primary")return ur` + --color: var(--ck-primary-button-color, var(--ck-body-color)); + --background: var(--ck-primary-button-background, var(--ck-body-background-primary)); + --box-shadow: var(--ck-primary-button-box-shadow); + --border-radius: var(--ck-primary-button-border-radius); + --font-weight: var(--ck-primary-button-font-weight, 500); + + --hover-color: var(--ck-button-primary-hover-color, var(--color)); + --hover-background: var(--ck-primary-button-hover-background, var(--background)); + --hover-box-shadow: var(--ck-primary-button-hover-box-shadow, var(--box-shadow)); + --hover-border-radius: var(--ck-primary-button-hover-border-radius, var(--border-radius)); + --hover-font-weight: var(--ck-primary-button-font-weight, var(--font-weight)); + `;if(e==="secondary")return ur` + --color: var(--ck-secondary-button-color, var(--ck-body-color)); + --background: var(--ck-secondary-button-background, var(--ck-body-background-secondary)); + --box-shadow: var(--ck-secondary-button-box-shadow); + --border-radius: var(--ck-secondary-button-border-radius); + --font-weight: var(--ck-secondary-button-font-weight, 500); + + --hover-color: var(--ck-secondary-button-hover-color, var(--color)); + --hover-background: var(--ck-secondary-button-hover-background, var(--background)); + --hover-box-shadow: var(--ck-secondary-button-hover-box-shadow, var(--box-shadow)); + --hover-border-radius: var(--ck-secondary-button-hover-border-radius, var(--border-radius)); + --hover-font-weight: var(--ck-secondary-button-font-weight, var(--font-weight)); + `;if(e==="tertiary")return ur` + --color: var(--ck-tertiary-button-color, var(--ck-secondary-button-color)); + --background: var(--ck-tertiary-button-background, var(--ck-secondary-button-background)); + --box-shadow: var(--ck-tertiary-button-box-shadow, var(--ck-secondary-button-box-shadow)); + --border-radius: var(--ck-tertiary-button-border-radius, var(--ck-secondary-button-border-radius)); + --font-weight: var(--ck-tertiary-button-font-weight, var(--ck-secondary-button-font-weight)); + + --hover-color: var(--button-tertiary-hover-color, var(--ck-tertiary-button-color)); + --hover-background: var(--ck-tertiary-button-hover-background, var(--ck-tertiary-button-background)); + --hover-box-shadow: var(--ck-tertiary-button-hover-box-shadow, var(--ck-tertiary-button-box-shadow)); + --hover-border-radius: var( + --ck-tertiary-button-hover-border-radius, + var(--ck-tertiary-button-border-radius, var(--border-radius)) + ); + --hover-font-weight: var(--ck-tertiary-button-font-weight, var(--ck-secondary-button-font-weight)); + `}} + + appearance: none; + cursor: pointer; + user-select: none; + min-width: fit-content; + width: 100%; + display:block; + text-align: center; + height: 48px; + margin: 12px 0 0; + line-height: 48px; + padding: 0 4px; + font-size: 16px; + font-weight: var(--font-weight,500); + text-decoration: none; + white-space: nowrap; + transition: 100ms ease; + transition-property: box-shadow, background-color; + color: var(--color); + background: var(--background); + border-radius: var(--border-radius); + box-shadow: var(--box-shadow); + will-change: transform, box-shadow, background-color, color; + + ${Ix} { + ${eu} { + transform: translateX(0); + ${Nd} { + transform: none; + } + ${Rd} { + } + } + } +} + + @media only screen and (min-width: ${Ca.mobileWidth+1}px) { + &:hover, + &:focus-visible { + color: var(--ck-accent-text-color, var(--hover-color)); + background: var(--ck-accent-color, var(--hover-background)); + border-radius: var(--hover-border-radius); + box-shadow: var(--hover-box-shadow); + + ${eu} { + transform: translateX(0); + ${Nd} { + transform: none; + } + ${Rd} { + } + } + ${Ix} { + ${eu} { + transform: translateX(var(--x)); + ${Nd} { + transform: scaleX(0.1); + } + ${Rd} { + } + } + } + } + &:active { + box-shadow: var(--ck-secondary-button-active-box-shadow, var(--hover-box-shadow)); + } + } + @media only screen and (max-width: ${Ca.mobileWidth}px) { + transition: transform 100ms ease; + transform: scale(1); + font-size: 17px; + &:active { + } + } +`,BIe=st.div` + transform: translateZ(0); // Shifting fix + position: relative; + display: inline-block; + vertical-align: middle; + max-width: calc(100% - 42px); + /* + overflow: hidden; + text-overflow: ellipsis; + */ +`,l$=st(ut.div)` + position: relative; + display: inline-block; + vertical-align: middle; + max-width: 20px; + max-height: 20px; + margin: 0 10px; + &:first-child { + margin-left: 0; + } + &:last-child { + margin-right: 0; + } + ${e=>e.$rounded&&ur` + overflow: hidden; + border-radius: 5px; + `} + svg { + display: block; + position: relative; + max-width: 100%; + height: auto; + } +`,xm={duration:.4,ease:[.175,.885,.32,.98]},jIe=()=>L.jsx(MIe,{initial:{opacity:0,rotate:180},animate:{opacity:1,rotate:0},exit:{position:"absolute",opacity:0,rotate:-180,transition:{...xm}},transition:{...xm,delay:.2},children:L.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[L.jsx("circle",{cx:"9",cy:"9",r:"7",stroke:"currentColor",strokeOpacity:"0.1",strokeWidth:"2.5"}),L.jsx("path",{d:"M16 9C16 5.13401 12.866 2 9 2",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})]})}),jc=({children:e,variant:t="secondary",disabled:r,icon:n,iconPosition:o="left",roundedIcon:i,waiting:a,arrow:s,download:l,href:c,style:u,onClick:f})=>{const d=typeof e=="string"?e:Ex(e).join(""),p=typeof c=="string"?c:Ex(c).join("");return L.jsx(FIe,{as:c?"a":void 0,onClick:h=>{!r&&f&&f(h)},href:p,target:c&&"_blank",rel:c&&"noopener noreferrer",disabled:r,$variant:t,style:u,children:L.jsxs(Ko,{initial:!1,children:[L.jsxs(NIe,{initial:{opacity:0,y:-10},animate:{opacity:1,y:-1},exit:{position:"absolute",opacity:0,y:10,transition:{...xm}},transition:{...xm,delay:.2},children:[n&&o==="left"&&L.jsx(l$,{$rounded:i,children:n}),l&&L.jsx(Ix,{children:L.jsx(RIe,{children:L.jsxs(eu,{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[L.jsx(Nd,{stroke:"currentColor",x1:"1",y1:"6",x2:"12",y2:"6",strokeWidth:"var(--stroke-width)",strokeLinecap:"round"}),L.jsx(Rd,{stroke:"currentColor",d:"M7.51431 1.5L11.757 5.74264M7.5 10.4858L11.7426 6.24314",strokeWidth:"var(--stroke-width)",strokeLinecap:"round"})]})})}),L.jsx(BIe,{style:{paddingLeft:s?6:0},children:L.jsx(P8,{children:e})}),n&&o==="right"&&L.jsx(l$,{$rounded:i,children:n}),s&&L.jsxs(eu,{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[L.jsx(Nd,{stroke:"currentColor",x1:"1",y1:"6",x2:"12",y2:"6",strokeWidth:"2",strokeLinecap:"round"}),L.jsx(Rd,{stroke:"currentColor",d:"M7.51431 1.5L11.757 5.74264M7.5 10.4858L11.7426 6.24314",strokeWidth:"2",strokeLinecap:"round"})]})]},d),a&&L.jsx(jIe,{})]})})},LIe=st(ut.div)` + z-index: 2147483647; + position: fixed; + inset: 0; + pointer-events: none; +`,zIe=st(ut.div)` + --shadow: var(--ck-tooltip-shadow); + z-index: 2147483647; + position: absolute; + top: 0; + left: 0; + display: flex; + gap: 8px; + width: fit-content; + align-items: center; + justify-content: center; + border-radius: var(--ck-tooltip-border-radius, ${e=>e.$size==="small"?11:14}px); + border-radius: ; + padding: 10px 16px 10px 12px; + font-size: 14px; + line-height: 19px; + font-weight: 500; + letter-spacing: -0.1px; + color: var(--ck-tooltip-color); + background: var(--ck-tooltip-background); + box-shadow: var(--shadow); + > span { + z-index: 3; + position: relative; + } + > div { + margin: -4px 0; // offset for icon + } + strong { + color: var(--ck-spinner-color); + } + + .ck-tt-logo { + display: inline-block; + vertical-align: text-bottom; + height: 1em; + width: 1.25em; + svg { + display: block; + height: 100%; + transform: translate(0.5px, -1px) scale(1.75); + } + } +`,UIe=st(ut.div)` + z-index: 2; + position: absolute; + display: flex; + align-items: center; + justify-content: center; + width: ${e=>e.$size==="small"?14:18}px; + right: 100%; + top: 0; + bottom: 0; + overflow: hidden; + &:before { + content: ''; + position: absolute; + box-shadow: var(--shadow); + width: ${e=>e.$size==="small"?14:18}px; + height: ${e=>e.$size==="small"?14:18}px; + transform: translate(75%, 0) rotate(45deg); + background: var(--ck-tooltip-background); + border-radius: ${e=>e.$size==="small"?2:3}px 0 0 0; + } +`,HIe=({children:e,message:t,open:r,xOffset:n=0,yOffset:o=0,delay:i})=>{const a=oi(),[s,l]=$.useState(!1),[c,u]=$.useState(!1),[f,d]=$.useState("small"),[p,h]=$.useState(!1),[m]=$.useState(a.route),_=$.useRef(null),[w,y]=$U({debounce:p?0:220,offsetSize:!0,scroll:!0}),C=()=>{let O=!1;const g=n+y.left+y.width,D=o+y.top+y.height*.5;return(g>window.innerWidth||g<0||D>window.innerHeight||D<0)&&(O=!0),O};return(typeof window<"u"?$.useLayoutEffect:$.useEffect)(()=>{if(!_.current||y.top+y.bottom+y.left+y.right+y.height+y.width===0)return;const O=n+y.left+y.width,g=o+y.top+y.height*.5;!p&&O!==0&&g!==0&&h(!0),_.current.style.left=`${O}px`,_.current.style.top=`${g}px`,d(_.current.offsetHeight<=40?"small":"large"),u(C())},[y,r,s]),$.useEffect(()=>{a.open||l(!1)},[a.open]),$.useEffect(()=>{l(!!r)},[r]),L.jsxs(L.Fragment,{children:[L.jsx(ut.div,{ref:w,style:r===void 0?{cursor:"help"}:{},onHoverStart:()=>l(!0),onHoverEnd:()=>l(!1),onClick:()=>l(!1),children:e}),L.jsx(zG,{children:L.jsx(Ko,{children:m===a.route&&!c&&s&&L.jsx(O8,{$useTheme:a.theme,$useMode:a.mode,$customTheme:a.customTheme,children:L.jsx(LIe,{children:L.jsxs(zIe,{role:"tooltip",$size:f,ref:_,initial:"collapsed",animate:p?"open":{},exit:"collapsed",variants:{collapsed:{transformOrigin:"20px 50%",opacity:0,scale:.9,z:.01,y:"-50%",x:20,transition:{duration:.1}},open:{willChange:"opacity,transform",opacity:1,scale:1,z:.01,y:"-50%",x:20,transition:{ease:[.76,0,.24,1],duration:.15,delay:i||.5}}},children:[t,L.jsx(UIe,{$size:f})]})})})})})]})},VIe=st(ut.div)` + display: flex; + gap: 8px; + position: relative; + border-radius: 9px; + margin: 0 auto; + padding: 10px; + text-align: left; + font-size: 14px; + line-height: 17px; + font-weight: 400; + max-width: 260px; + min-width: 100%; + + border-radius: var(--ck-alert-border-radius, 12px); + color: var(--ck-alert-color, var(--ck-body-color-muted)); + background: var(--ck-alert-background, var(--ck-body-background-secondary)); + box-shadow: var(--ck-alert-box-shadow, var(--ck-body-box-shadow)); + + @media only screen and (max-width: ${Ca.mobileWidth}px) { + padding: 16px; + font-size: 16px; + line-height: 21px; + border-radius: 24px; + text-align: center; + } +`,WIe=st(ut.div)` + width: 24px; + height: 24px; + display: flex; + align-items: center; + justify-content: center; + svg { + display: block; + width: 100%; + height: auto; + } +`,_m=ae.forwardRef(({children:e,icon:t},r)=>L.jsxs(VIe,{children:[t&&L.jsx(WIe,{children:t}),L.jsx("div",{children:e})]}));_m.displayName="Alert";const qIe=st(ut.div)` + z-index: 4; + position: relative; + width: 100px; + height: 100px; + svg { + z-index: 3; + position: relative; + display: block; + } +`,GIe=st(ut.div)` + z-index: 2; + position: absolute; + //overflow: hidden; + inset: 6px; + border-radius: 50px; + background: var(--ck-body-background); + display: flex; + align-items: center; + justify-content: center; + svg, + img { + pointer-events: none; + display: block; + margin: 0 auto; + width: 100%; + height: 100%; + ${e=>e.$small&&ur` + width: 60%; + height: 60%; + `} + } +`,KIe=st(ut.div)` + position: absolute; + inset: -5px; +`,YIe=st(ut.div)` + pointer-events: none; + user-select: none; + z-index: 1; + position: absolute; + inset: -25%; + background: var(--ck-body-background); + div:first-child { + position: absolute; + left: 50%; + right: 0; + top: 0; + bottom: 0; + overflow: hidden; + &:before { + position: absolute; + content: ''; + inset: 0; + background: var(--ck-spinner-color); + transform-origin: 0% 50%; + animation: rotateExpiringSpinner 5000ms ease-in both; + } + } + div:last-child { + position: absolute; + left: 0; + right: 50%; + top: 0; + bottom: 0; + overflow: hidden; + &:before { + position: absolute; + content: ''; + inset: 0; + background: var(--ck-spinner-color); + transform-origin: 100% 50%; + animation: rotateExpiringSpinner 5000ms ease-out 5000ms both; + } + } + @keyframes rotateExpiringSpinner { + 0% { + transform: rotate(-180deg); + } + 100% { + transform: rotate(0deg); + } + } +`,XIe=st(ut.div)` + pointer-events: none; + user-select: none; + z-index: 1; + position: absolute; + inset: 0; + svg { + display: block; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + animation: rotateSpinner 1200ms linear infinite; + } + @keyframes rotateSpinner { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } + } +`,ZIe=({logo:e,smallLogo:t,connecting:r=!0,unavailable:n=!1,countdown:o=!1})=>L.jsxs(qIe,{transition:{duration:.5,ease:[.175,.885,.32,.98]},children:[L.jsx(GIe,{$small:!n&&t,style:n?{borderRadius:0}:void 0,children:e}),L.jsx(KIe,{children:L.jsxs(Ko,{children:[r&&L.jsx(XIe,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{duration:o?1:0}},children:L.jsxs("svg",{"aria-hidden":"true",width:"102",height:"102",viewBox:"0 0 102 102",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[L.jsx("path",{d:"M52 100C24.3858 100 2 77.6142 2 50",stroke:"url(#paint0_linear_1943_4139)",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round"}),L.jsx("defs",{children:L.jsxs("linearGradient",{id:"paint0_linear_1943_4139",x1:"2",y1:"48.5",x2:"53",y2:"100",gradientUnits:"userSpaceOnUse",children:[L.jsx("stop",{stopColor:"var(--ck-spinner-color)"}),L.jsx("stop",{offset:"1",stopColor:"var(--ck-spinner-color)",stopOpacity:"0"})]})})]})},"Spinner"),o&&L.jsxs(YIe,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.25},children:[L.jsx("div",{}),L.jsx("div",{})]},"ExpiringSpinner")]})})]}),c$=({...e})=>L.jsx("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:L.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 2.82561C0 1.26507 1.26507 0 2.82561 0H4.59161C6.15215 0 7.41722 1.26507 7.41722 2.82561V4.59161C7.41722 6.15215 6.15215 7.41722 4.59161 7.41722H2.82561C1.26507 7.41722 0 6.15215 0 4.59161V2.82561ZM2.82561 1.69536C2.20139 1.69536 1.69536 2.20139 1.69536 2.82561V4.59161C1.69536 5.21583 2.20139 5.72185 2.82561 5.72185H4.59161C5.21583 5.72185 5.72185 5.21583 5.72185 4.59161V2.82561C5.72185 2.20139 5.21583 1.69536 4.59161 1.69536H2.82561ZM0 11.4084C0 9.84791 1.26507 8.58284 2.82561 8.58284H4.59161C6.15215 8.58284 7.41722 9.8479 7.41722 11.4084V13.1744C7.41722 14.735 6.15215 16.0001 4.59161 16.0001H2.82561C1.26507 16.0001 0 14.735 0 13.1744V11.4084ZM2.82561 10.2782C2.20139 10.2782 1.69536 10.7842 1.69536 11.4084V13.1744C1.69536 13.7987 2.20139 14.3047 2.82561 14.3047H4.59161C5.21583 14.3047 5.72185 13.7987 5.72185 13.1744V11.4084C5.72185 10.7842 5.21583 10.2782 4.59161 10.2782H2.82561ZM11.4083 0C9.84779 0 8.58272 1.26507 8.58272 2.82561V4.59161C8.58272 6.15215 9.84779 7.41722 11.4083 7.41722H13.1743C14.7349 7.41722 15.9999 6.15215 15.9999 4.59161V2.82561C15.9999 1.26507 14.7349 0 13.1743 0H11.4083ZM10.2781 2.82561C10.2781 2.20139 10.7841 1.69536 11.4083 1.69536H13.1743C13.7985 1.69536 14.3046 2.20139 14.3046 2.82561V4.59161C14.3046 5.21583 13.7985 5.72185 13.1743 5.72185H11.4083C10.7841 5.72185 10.2781 5.21583 10.2781 4.59161V2.82561ZM15.7351 9.96026C15.7351 10.7795 15.0709 11.4437 14.2516 11.4437C13.4323 11.4437 12.7682 10.7795 12.7682 9.96026C12.7682 9.14098 13.4323 8.47682 14.2516 8.47682C15.0709 8.47682 15.7351 9.14098 15.7351 9.96026ZM9.96026 11.4437C10.7795 11.4437 11.4437 10.7795 11.4437 9.96026C11.4437 9.14098 10.7795 8.47682 9.96026 8.47682C9.14098 8.47682 8.47682 9.14098 8.47682 9.96026C8.47682 10.7795 9.14098 11.4437 9.96026 11.4437ZM15.7351 14.2517C15.7351 15.071 15.0709 15.7352 14.2516 15.7352C13.4323 15.7352 12.7682 15.071 12.7682 14.2517C12.7682 13.4325 13.4323 12.7683 14.2516 12.7683C15.0709 12.7683 15.7351 13.4325 15.7351 14.2517ZM9.96026 15.7352C10.7795 15.7352 11.4437 15.071 11.4437 14.2517C11.4437 13.4325 10.7795 12.7683 9.96026 12.7683C9.14098 12.7683 8.47682 13.4325 8.47682 14.2517C8.47682 15.071 9.14098 15.7352 9.96026 15.7352Z",fill:"currentColor",fillOpacity:"0.3"})}),JIe=({...e})=>L.jsxs("svg",{"aria-hidden":"true",width:"19",height:"18",viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[L.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.81753 1.60122C7.39283 0.530035 8.46953 0 9.50409 0C10.5507 0 11.6022 0.539558 12.1805 1.59767L18.6047 13.3334C18.882 13.8283 19 14.3568 19 14.8622C19 16.5296 17.7949 18 15.9149 18H3.08514C1.20508 18 0 16.5296 0 14.8622C0 14.3454 0.131445 13.8172 0.405555 13.3379L6.81753 1.60122ZM9.50409 2C9.13355 2 8.77256 2.18675 8.57866 2.54907L8.57458 2.5567L2.14992 14.3166L2.144 14.3268C2.04638 14.4959 2 14.6817 2 14.8622C2 15.5497 2.43032 16 3.08514 16H15.9149C16.5697 16 17 15.5497 17 14.8622C17 14.6681 16.9554 14.4805 16.8588 14.309L16.8529 14.2986L10.4259 2.55741C10.2191 2.1792 9.86395 2 9.50409 2Z",fill:"currentColor"}),L.jsx("path",{d:"M9.5 11.2297C9.01639 11.2297 8.7459 10.9419 8.72951 10.4186L8.60656 6.4157C8.59016 5.88372 8.95902 5.5 9.4918 5.5C10.0164 5.5 10.4016 5.89244 10.3852 6.42442L10.2623 10.4099C10.2377 10.9419 9.96721 11.2297 9.5 11.2297ZM9.5 14.5C8.95082 14.5 8.5 14.0901 8.5 13.5058C8.5 12.9215 8.95082 12.5116 9.5 12.5116C10.0492 12.5116 10.5 12.9128 10.5 13.5058C10.5 14.0988 10.041 14.5 9.5 14.5Z",fill:"currentColor"})]}),QIe=({...e})=>L.jsx("svg",{"aria-hidden":"true",width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{left:0,top:0},...e,children:L.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 0C1.79086 0 0 1.79086 0 4V10C0 12.2091 1.79086 14 4 14H6C6.55228 14 7 13.5523 7 13C7 12.4477 6.55228 12 6 12H4C2.89543 12 2 11.1046 2 10V4C2 2.89543 2.89543 2 4 2H6C6.55228 2 7 1.55228 7 1C7 0.447715 6.55228 0 6 0H4ZM11.7071 3.29289C11.3166 2.90237 10.6834 2.90237 10.2929 3.29289C9.90237 3.68342 9.90237 4.31658 10.2929 4.70711L11.5858 6H9.5H6C5.44772 6 5 6.44772 5 7C5 7.55228 5.44772 8 6 8H9.5H11.5858L10.2929 9.29289C9.90237 9.68342 9.90237 10.3166 10.2929 10.7071C10.6834 11.0976 11.3166 11.0976 11.7071 10.7071L14.7071 7.70711C15.0976 7.31658 15.0976 6.68342 14.7071 6.29289L11.7071 3.29289Z",fill:"currentColor",fillOpacity:"0.4"})}),e$e=({...e})=>L.jsx("svg",{"aria-hidden":"true",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:L.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 18C13.9706 18 18 13.9706 18 9C18 4.02944 13.9706 0 9 0C4.02944 0 0 4.02944 0 9C0 13.9706 4.02944 18 9 18ZM13.274 7.13324C13.6237 6.70579 13.5607 6.07577 13.1332 5.72604C12.7058 5.37632 12.0758 5.43932 11.726 5.86676L7.92576 10.5115L6.20711 8.79289C5.81658 8.40237 5.18342 8.40237 4.79289 8.79289C4.40237 9.18342 4.40237 9.81658 4.79289 10.2071L7.29289 12.7071C7.49267 12.9069 7.76764 13.0128 8.04981 12.9988C8.33199 12.9847 8.59505 12.8519 8.77396 12.6332L13.274 7.13324Z",fill:"currentColor"})}),t$e=({...e})=>L.jsx("svg",{"aria-hidden":"true",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:L.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16ZM24.5001 8.74263C25.0834 8.74263 25.5563 9.21551 25.5563 9.79883V14.5997C25.5563 15.183 25.0834 15.6559 24.5001 15.6559H19.6992C19.1159 15.6559 18.643 15.183 18.643 14.5997C18.643 14.0164 19.1159 13.5435 19.6992 13.5435H21.8378L20.071 11.8798C20.0632 11.8724 20.0555 11.865 20.048 11.8574C19.1061 10.915 17.8835 10.3042 16.5643 10.1171C15.2452 9.92999 13.9009 10.1767 12.7341 10.82C11.5674 11.4634 10.6413 12.4685 10.0955 13.684C9.54968 14.8994 9.41368 16.2593 9.70801 17.5588C10.0023 18.8583 10.711 20.0269 11.7273 20.8885C12.7436 21.7502 14.0124 22.2582 15.3425 22.336C16.6726 22.4138 17.9919 22.0572 19.1017 21.3199C19.5088 21.0495 19.8795 20.7333 20.2078 20.3793C20.6043 19.9515 21.2726 19.9262 21.7004 20.3228C22.1282 20.7194 22.1534 21.3876 21.7569 21.8154C21.3158 22.2912 20.8176 22.7161 20.2706 23.0795C18.7793 24.0702 17.0064 24.5493 15.2191 24.4448C13.4318 24.3402 11.7268 23.6576 10.3612 22.4998C8.9956 21.3419 8.0433 19.7716 7.6478 18.0254C7.2523 16.2793 7.43504 14.4519 8.16848 12.8186C8.90192 11.1854 10.1463 9.83471 11.7142 8.97021C13.282 8.10572 15.0884 7.77421 16.861 8.02565C18.6282 8.27631 20.2664 9.09278 21.5304 10.3525L23.4439 12.1544V9.79883C23.4439 9.21551 23.9168 8.74263 24.5001 8.74263Z",fill:"currentColor"})}),r$e=({...e})=>L.jsxs("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[L.jsx("path",{d:"M14 9.5V7C14 5.89543 13.1046 5 12 5H7C5.89543 5 5 5.89543 5 7V12C5 13.1046 5.89543 14 7 14H9.5",stroke:"var(--ck-body-color-muted)",strokeWidth:"2"}),L.jsx("rect",{x:"10",y:"10",width:"9",height:"9",rx:"2",stroke:"var(--ck-body-color-muted)",strokeWidth:"2"}),L.jsx("path",{d:"M1 3L3 5L7 1",stroke:"var(--ck-body-color)",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),n$e=st(ut.div)` + display: flex; + align-items: center; + justify-content: center; + max-width: 32px; + max-height: 32px; + width: 100%; + height: 100%; + svg { + display: block; + width: 100%; + height: 100%; + } +`,o$e=L.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[L.jsx("g",{filter:"url(#filter0_ii_927_5781)",children:L.jsxs("g",{clipPath:"url(#clip0_927_5781)",children:[L.jsx("path",{d:"M1.58771 0V12.2727H6.06498L10.0002 5.45455H20.0002V0H1.58771Z",fill:"#DB4437"}),L.jsx("path",{d:"M1.58771 0V12.2727H6.06498L10.0002 5.45455H20.0002V0H1.58771Z",fill:"url(#paint0_linear_927_5781)"}),L.jsx("path",{d:"M6.17038 12.2272L1.64538 4.46582L1.57947 4.57946L6.07265 12.284L6.17038 12.2272Z",fill:"black",fillOpacity:"0.15"}),L.jsx("path",{d:"M0 20.0003H9.51932L13.9375 15.5821V12.273H6.0625L0 1.87305V20.0003Z",fill:"#0F9D58"}),L.jsx("path",{d:"M0 20.0003H9.51932L13.9375 15.5821V12.273H6.0625L0 1.87305V20.0003Z",fill:"url(#paint1_linear_927_5781)"}),L.jsx("path",{d:"M13.8412 12.4208L13.7469 12.3662L9.38324 19.9969H9.51392L13.8435 12.4242L13.8412 12.4208Z",fill:"#263238",fillOpacity:"0.15"}),L.jsx("path",{d:"M10.0006 5.45459L13.9381 12.2728L9.51996 20H20.0006V5.45459H10.0006Z",fill:"#FFCD40"}),L.jsx("path",{d:"M10.0006 5.45459L13.9381 12.2728L9.51996 20H20.0006V5.45459H10.0006Z",fill:"url(#paint2_linear_927_5781)"}),L.jsx("path",{d:"M9.9996 5.45459L13.9371 12.2728L9.51892 20H19.9996V5.45459H9.9996Z",fill:"#FFCD40"}),L.jsx("path",{d:"M9.9996 5.45459L13.9371 12.2728L9.51892 20H19.9996V5.45459H9.9996Z",fill:"url(#paint3_linear_927_5781)"}),L.jsx("path",{d:"M1.58691 0V12.2727H6.06419L9.99941 5.45455H19.9994V0H1.58691Z",fill:"#DB4437"}),L.jsx("path",{d:"M1.58691 0V12.2727H6.06419L9.99941 5.45455H19.9994V0H1.58691Z",fill:"url(#paint4_linear_927_5781)"}),L.jsx("path",{d:"M10 5.45459V7.83527L18.9091 5.45459H10Z",fill:"url(#paint5_radial_927_5781)"}),L.jsx("path",{d:"M0 19.9998H9.51932L11.9318 15.9089L13.9375 12.2726H6.0625L0 1.87256V19.9998Z",fill:"#0F9D58"}),L.jsx("path",{d:"M0 19.9998H9.51932L12.1023 15.5112L13.9375 12.2726H6.0625L0 1.87256V19.9998Z",fill:"url(#paint6_linear_927_5781)"}),L.jsx("path",{d:"M1.58771 4.59668L8.09339 11.1012L6.06384 12.2728L1.58771 4.59668Z",fill:"url(#paint7_radial_927_5781)"}),L.jsx("path",{d:"M9.52661 19.9884L11.9084 11.1021L13.938 12.2725L9.52661 19.9884Z",fill:"url(#paint8_radial_927_5781)"}),L.jsx("path",{d:"M10.0003 14.5455C12.5107 14.5455 14.5458 12.5104 14.5458 10C14.5458 7.48966 12.5107 5.45459 10.0003 5.45459C7.48996 5.45459 5.4549 7.48966 5.4549 10C5.4549 12.5104 7.48996 14.5455 10.0003 14.5455Z",fill:"#F1F1F1"}),L.jsx("path",{d:"M9.99995 13.6365C12.0083 13.6365 13.6363 12.0084 13.6363 10.0001C13.6363 7.99183 12.0083 6.36377 9.99995 6.36377C7.99164 6.36377 6.36359 7.99183 6.36359 10.0001C6.36359 12.0084 7.99164 13.6365 9.99995 13.6365Z",fill:"#4285F4"}),L.jsx("path",{d:"M10.0003 5.34082C7.48899 5.34082 5.4549 7.37491 5.4549 9.88628V9.99991C5.4549 7.48855 7.48899 5.45446 10.0003 5.45446H20.0003V5.34082H10.0003Z",fill:"black",fillOpacity:"0.2"}),L.jsx("path",{d:"M13.9318 12.273C13.1455 13.6299 11.6818 14.5458 10 14.5458C8.31818 14.5458 6.85227 13.6299 6.06818 12.273H6.06364L0 1.87305V1.98668L6.06818 12.3867C6.85455 13.7435 8.31818 14.6594 10 14.6594C11.6818 14.6594 13.1455 13.7446 13.9318 12.3867H13.9375V12.273H13.9307H13.9318Z",fill:"white",fillOpacity:"0.1"}),L.jsx("path",{opacity:"0.1",d:"M10.1133 5.45459C10.094 5.45459 10.0758 5.45686 10.0565 5.458C12.5406 5.48868 14.5452 7.50913 14.5452 10C14.5452 12.491 12.5406 14.5114 10.0565 14.5421C10.0758 14.5421 10.094 14.5455 10.1133 14.5455C12.6247 14.5455 14.6588 12.5114 14.6588 10C14.6588 7.48868 12.6247 5.45459 10.1133 5.45459Z",fill:"black"}),L.jsx("path",{d:"M13.9769 12.4204C14.3632 11.7522 14.5871 10.9795 14.5871 10.1522C14.5874 9.68602 14.5157 9.22262 14.3746 8.77832C14.4826 9.16696 14.5451 9.57377 14.5451 9.99764C14.5451 10.8249 14.3212 11.5976 13.9348 12.2658L13.9371 12.2704L9.51892 19.9976H9.65074L13.9769 12.4204Z",fill:"white",fillOpacity:"0.2"}),L.jsx("path",{d:"M10 0.113636C15.5034 0.113636 19.9682 4.56023 20 10.0568C20 10.0375 20.0011 10.0193 20.0011 10C20.0011 4.47727 15.5239 0 10.0011 0C4.47841 0 0 4.47727 0 10C0 10.0193 0.00113639 10.0375 0.00113639 10.0568C0.0318182 4.56023 4.49659 0.113636 10 0.113636Z",fill:"white",fillOpacity:"0.2"}),L.jsx("path",{d:"M10 19.8865C15.5034 19.8865 19.9682 15.4399 20 9.94336C20 9.96268 20.0011 9.98086 20.0011 10.0002C20.0011 15.5229 15.5239 20.0002 10.0011 20.0002C4.47841 20.0002 0 15.5229 0 10.0002C0 9.98086 0.00113639 9.96268 0.00113639 9.94336C0.0318182 15.4399 4.49659 19.8865 10.0011 19.8865H10Z",fill:"black",fillOpacity:"0.15"})]})}),L.jsxs("defs",{children:[L.jsxs("filter",{id:"filter0_ii_927_5781",x:0,y:"-0.235294",width:20,height:"20.4706",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[L.jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),L.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),L.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),L.jsx("feOffset",{dy:"0.235294"}),L.jsx("feGaussianBlur",{stdDeviation:"0.235294"}),L.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),L.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.25 0"}),L.jsx("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_927_5781"}),L.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),L.jsx("feOffset",{dy:"-0.235294"}),L.jsx("feGaussianBlur",{stdDeviation:"0.235294"}),L.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),L.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"}),L.jsx("feBlend",{mode:"normal",in2:"effect1_innerShadow_927_5781",result:"effect2_innerShadow_927_5781"})]}),L.jsxs("linearGradient",{id:"paint0_linear_927_5781",x1:"2.42521",y1:"7.61591",x2:"8.39112",y2:"4.13068",gradientUnits:"userSpaceOnUse",children:[L.jsx("stop",{stopColor:"#A52714",stopOpacity:"0.6"}),L.jsx("stop",{offset:"0.66",stopColor:"#A52714",stopOpacity:0})]}),L.jsxs("linearGradient",{id:"paint1_linear_927_5781",x1:"11.6932",y1:"17.7844",x2:"5.06136",y2:"13.8981",gradientUnits:"userSpaceOnUse",children:[L.jsx("stop",{stopColor:"#055524",stopOpacity:"0.4"}),L.jsx("stop",{offset:"0.33",stopColor:"#055524",stopOpacity:0})]}),L.jsxs("linearGradient",{id:"paint2_linear_927_5781",x1:"12.9438",y1:"4.75004",x2:"14.6143",y2:"12.0569",gradientUnits:"userSpaceOnUse",children:[L.jsx("stop",{stopColor:"#EA6100",stopOpacity:"0.3"}),L.jsx("stop",{offset:"0.66",stopColor:"#EA6100",stopOpacity:0})]}),L.jsxs("linearGradient",{id:"paint3_linear_927_5781",x1:"12.9428",y1:"4.75004",x2:"14.6132",y2:"12.0569",gradientUnits:"userSpaceOnUse",children:[L.jsx("stop",{stopColor:"#EA6100",stopOpacity:"0.3"}),L.jsx("stop",{offset:"0.66",stopColor:"#EA6100",stopOpacity:0})]}),L.jsxs("linearGradient",{id:"paint4_linear_927_5781",x1:"2.42441",y1:"7.61591",x2:"8.39032",y2:"4.13068",gradientUnits:"userSpaceOnUse",children:[L.jsx("stop",{stopColor:"#A52714",stopOpacity:"0.6"}),L.jsx("stop",{offset:"0.66",stopColor:"#A52714",stopOpacity:0})]}),L.jsxs("radialGradient",{id:"paint5_radial_927_5781",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.56818 5.44891) scale(9.55455)",children:[L.jsx("stop",{stopColor:"#3E2723",stopOpacity:"0.2"}),L.jsx("stop",{offset:1,stopColor:"#3E2723",stopOpacity:0})]}),L.jsxs("linearGradient",{id:"paint6_linear_927_5781",x1:"11.6932",y1:"17.7839",x2:"5.06136",y2:"13.8976",gradientUnits:"userSpaceOnUse",children:[L.jsx("stop",{stopColor:"#055524",stopOpacity:"0.4"}),L.jsx("stop",{offset:"0.33",stopColor:"#055524",stopOpacity:0})]}),L.jsxs("radialGradient",{id:"paint7_radial_927_5781",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(1.57975 4.60463) scale(8.86818)",children:[L.jsx("stop",{stopColor:"#3E2723",stopOpacity:"0.2"}),L.jsx("stop",{offset:1,stopColor:"#3E2723",stopOpacity:0})]}),L.jsxs("radialGradient",{id:"paint8_radial_927_5781",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.97775 10.0157) scale(9.98523)",children:[L.jsx("stop",{stopColor:"#263238",stopOpacity:"0.2"}),L.jsx("stop",{offset:1,stopColor:"#263238",stopOpacity:0})]}),L.jsx("clipPath",{id:"clip0_927_5781",children:L.jsx("rect",{width:20,height:20,rx:10,fill:"white"})})]})]}),i$e=L.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[L.jsxs("g",{clipPath:"url(#clip0_927_5847)",children:[L.jsx("path",{d:"M19.011 6.71023C18.5898 5.69685 17.7355 4.60269 17.0665 4.25681C17.5436 5.18063 17.8747 6.17276 18.0481 7.19792L18.0499 7.21417C16.954 4.48315 15.0963 3.38023 13.5782 0.981835C13.5014 0.860539 13.4246 0.738994 13.3498 0.610696C13.3071 0.537418 13.2728 0.471393 13.2431 0.410621C13.1801 0.288713 13.1316 0.159878 13.0985 0.0267267C13.0985 0.0205825 13.0963 0.0146369 13.0923 0.0100242C13.0882 0.00541151 13.0826 0.00245454 13.0765 0.00171737C13.0705 7.85858e-05 13.0642 7.85858e-05 13.0582 0.00171737C13.057 0.00171737 13.055 0.00396821 13.0535 0.0044684C13.052 0.00496859 13.0487 0.00721943 13.0465 0.00821981L13.0502 0.00171737C10.6156 1.42725 9.78901 4.06574 9.71399 5.38624C8.74136 5.45292 7.81141 5.81121 7.04549 6.41437C6.96561 6.34671 6.88212 6.28343 6.79539 6.2248C6.57456 5.45174 6.56514 4.6336 6.76813 3.85566C5.87401 4.28877 5.07954 4.90279 4.43501 5.65884H4.43051C4.04636 5.17191 4.07337 3.5663 4.09538 3.23093C3.98174 3.2766 3.87326 3.33419 3.77176 3.40274C3.43264 3.64477 3.11562 3.91635 2.8244 4.2143C2.49255 4.55075 2.18946 4.91441 1.91831 5.30146V5.30296V5.3012C1.29521 6.18444 0.853213 7.18234 0.617826 8.23731L0.604821 8.30133C0.586564 8.38661 0.52079 8.81377 0.509535 8.90656C0.509535 8.91381 0.508035 8.92056 0.507285 8.92781C0.42244 9.36882 0.369864 9.81542 0.349976 10.2641V10.3141C0.354259 12.7396 1.26772 15.0754 2.91002 16.8604C4.55233 18.6454 6.80415 19.7498 9.22094 19.9556C11.6377 20.1615 14.0439 19.4538 15.9644 17.9723C17.8849 16.4908 19.1803 14.3431 19.5947 11.9532C19.6109 11.8282 19.6242 11.7044 19.6387 11.5781C19.8384 9.92791 19.6222 8.25404 19.01 6.70873L19.011 6.71023ZM7.83928 14.2981C7.88455 14.3198 7.92707 14.3433 7.97358 14.3641L7.98034 14.3684C7.93332 14.3458 7.8863 14.3224 7.83928 14.2981ZM18.0501 7.21692V7.20767L18.0519 7.21792L18.0501 7.21692Z",fill:"url(#paint0_linear_927_5847)"}),L.jsx("path",{d:"M19.0109 6.71026C18.5898 5.69688 17.7354 4.60272 17.0664 4.25684C17.5435 5.18066 17.8746 6.17278 18.0481 7.19794V7.20719L18.0498 7.21745C18.797 9.35551 18.689 11.6997 17.7482 13.7599C16.6373 16.1435 13.9493 18.5867 9.7402 18.4667C5.19349 18.3379 1.18699 14.9629 0.439211 10.5437C0.30291 9.84668 0.439211 9.4933 0.507737 8.92684C0.414265 9.36685 0.362102 9.81463 0.351929 10.2643V10.3144C0.356212 12.7399 1.26967 15.0757 2.91198 16.8607C4.55429 18.6456 6.8061 19.7501 9.2229 19.9559C11.6397 20.1617 14.0458 19.4541 15.9664 17.9725C17.8869 16.491 19.1822 14.3434 19.5966 11.9535C19.6129 11.8284 19.6262 11.7046 19.6407 11.5783C19.8403 9.92819 19.6242 8.25431 19.0119 6.70901L19.0109 6.71026Z",fill:"url(#paint1_radial_927_5847)"}),L.jsx("path",{d:"M19.0109 6.71026C18.5898 5.69688 17.7354 4.60272 17.0664 4.25684C17.5435 5.18066 17.8746 6.17278 18.0481 7.19794V7.20719L18.0498 7.21745C18.797 9.35551 18.689 11.6997 17.7482 13.7599C16.6373 16.1435 13.9493 18.5867 9.7402 18.4667C5.19349 18.3379 1.18699 14.9629 0.439211 10.5437C0.30291 9.84668 0.439211 9.4933 0.507737 8.92684C0.414265 9.36685 0.362102 9.81463 0.351929 10.2643V10.3144C0.356212 12.7399 1.26967 15.0757 2.91198 16.8607C4.55429 18.6456 6.8061 19.7501 9.2229 19.9559C11.6397 20.1617 14.0458 19.4541 15.9664 17.9725C17.8869 16.491 19.1822 14.3434 19.5966 11.9535C19.6129 11.8284 19.6262 11.7046 19.6407 11.5783C19.8403 9.92819 19.6242 8.25431 19.0119 6.70901L19.0109 6.71026Z",fill:"url(#paint2_radial_927_5847)"}),L.jsx("path",{d:"M14.2993 7.84794C14.3203 7.8627 14.3398 7.87745 14.3595 7.89221C14.1161 7.46047 13.813 7.06519 13.4592 6.71802C10.4456 3.70439 12.6696 0.18557 13.0445 0.00550206L13.0483 0C10.6136 1.42553 9.78706 4.06402 9.71204 5.38452C9.82508 5.37677 9.93712 5.36726 10.0527 5.36726C10.9164 5.36893 11.7644 5.59929 12.5103 6.03492C13.2562 6.47055 13.8734 7.09592 14.2993 7.84744V7.84794Z",fill:"url(#paint3_radial_927_5847)"}),L.jsx("path",{d:"M10.0577 8.45061C10.0417 8.6917 9.18992 9.52326 8.89206 9.52326C6.13602 9.52326 5.68835 11.1906 5.68835 11.1906C5.8104 12.5947 6.78877 13.7516 7.97146 14.3618C8.02548 14.3898 8.08025 14.4151 8.13502 14.4399C8.22989 14.4819 8.32476 14.5207 8.41963 14.5564C8.82553 14.7 9.25065 14.7821 9.68085 14.7997C14.5127 15.0263 15.448 9.02257 11.9615 7.27942C12.7839 7.1724 13.6168 7.37463 14.2986 7.84688C13.8727 7.09536 13.2555 6.46999 12.5096 6.03436C11.7637 5.59873 10.9158 5.36837 10.052 5.3667C9.93695 5.3667 9.82441 5.3762 9.71136 5.38396C8.73874 5.45064 7.80879 5.80893 7.04286 6.41209C7.19067 6.53714 7.35748 6.7042 7.70886 7.05058C8.36661 7.69857 10.0535 8.36983 10.0572 8.44861L10.0577 8.45061Z",fill:"url(#paint4_radial_927_5847)"}),L.jsx("path",{d:"M10.0577 8.45061C10.0417 8.6917 9.18992 9.52326 8.89206 9.52326C6.13602 9.52326 5.68835 11.1906 5.68835 11.1906C5.8104 12.5947 6.78877 13.7516 7.97146 14.3618C8.02548 14.3898 8.08025 14.4151 8.13502 14.4399C8.22989 14.4819 8.32476 14.5207 8.41963 14.5564C8.82553 14.7 9.25065 14.7821 9.68085 14.7997C14.5127 15.0263 15.448 9.02257 11.9615 7.27942C12.7839 7.1724 13.6168 7.37463 14.2986 7.84688C13.8727 7.09536 13.2555 6.46999 12.5096 6.03436C11.7637 5.59873 10.9158 5.36837 10.052 5.3667C9.93695 5.3667 9.82441 5.3762 9.71136 5.38396C8.73874 5.45064 7.80879 5.80893 7.04286 6.41209C7.19067 6.53714 7.35748 6.7042 7.70886 7.05058C8.36661 7.69857 10.0535 8.36983 10.0572 8.44861L10.0577 8.45061Z",fill:"url(#paint5_radial_927_5847)"}),L.jsx("path",{d:"M6.59134 6.0923C6.66987 6.14231 6.73464 6.18583 6.79141 6.2251C6.57058 5.45204 6.56117 4.63389 6.76415 3.85596C5.87003 4.28907 5.07556 4.90308 4.43103 5.65913C4.4783 5.65788 5.88432 5.63262 6.59134 6.0923Z",fill:"url(#paint6_radial_927_5847)"}),L.jsx("path",{d:"M0.437567 10.5439C1.1856 14.963 5.19185 18.3393 9.73855 18.4668C13.9476 18.5859 16.6361 16.1425 17.7466 13.7601C18.6873 11.6998 18.7954 9.35569 18.0482 7.21762V7.20837C18.0482 7.20111 18.0467 7.19686 18.0482 7.19911L18.0499 7.21537C18.3938 9.46046 17.2519 11.6345 15.4665 13.1076L15.4609 13.1201C11.9821 15.9536 8.6534 14.8292 7.98064 14.3706C7.93363 14.348 7.88661 14.3246 7.83959 14.3003C5.81158 13.3309 4.97352 11.4842 5.15358 9.89862C4.67218 9.90573 4.19905 9.77307 3.79151 9.51672C3.38397 9.26038 3.05952 8.89134 2.85747 8.45433C3.38987 8.1282 3.99692 7.94382 4.62077 7.91878C5.24461 7.89374 5.86448 8.02887 6.42131 8.31128C7.56906 8.83225 8.87507 8.8836 10.0602 8.45433C10.0564 8.37555 8.36954 7.70405 7.71179 7.05631C7.36041 6.70993 7.1936 6.54312 7.04579 6.41782C6.96591 6.35016 6.88243 6.28688 6.7957 6.22825C6.73818 6.18898 6.6734 6.14647 6.59562 6.09545C5.88861 5.63578 4.48258 5.66104 4.43607 5.66229H4.43156C4.04742 5.17535 4.07443 3.56975 4.09644 3.23438C3.9828 3.28005 3.87431 3.33764 3.77282 3.40619C3.4337 3.64822 3.11667 3.91979 2.82546 4.21774C2.49242 4.55325 2.18808 4.91607 1.91562 5.3024V5.3039V5.30215C1.29252 6.18539 0.850521 7.18329 0.615133 8.23825C0.610381 8.25801 0.266002 9.76357 0.435816 10.5444L0.437567 10.5439Z",fill:"url(#paint7_radial_927_5847)"}),L.jsx("path",{d:"M13.459 6.71761C13.8128 7.06516 14.1159 7.46087 14.3593 7.89305C14.4126 7.93331 14.4624 7.97333 14.5046 8.01209C16.7022 10.0378 15.5508 12.9014 15.465 13.104C17.2502 11.6332 18.3911 9.45763 18.0485 7.21179C16.952 4.47826 15.0923 3.37535 13.5768 0.976952C13.5 0.855657 13.4232 0.734111 13.3484 0.605813C13.3057 0.532535 13.2714 0.466511 13.2417 0.405738C13.1787 0.283831 13.1302 0.154995 13.0971 0.0218439C13.0971 0.0156997 13.0949 0.0097541 13.0909 0.0051414C13.0868 0.000528701 13.0812 -0.00242828 13.0751 -0.00316545C13.0691 -0.00480423 13.0628 -0.00480423 13.0568 -0.00316545C13.0556 -0.00316545 13.0536 -0.000914601 13.0521 -0.000414413C13.0506 8.57743e-05 13.0473 0.00233662 13.0451 0.00333699C12.6702 0.181154 10.4466 3.70222 13.4602 6.71335L13.459 6.71761Z",fill:"url(#paint8_radial_927_5847)"}),L.jsx("path",{d:"M14.5043 8.01315C14.462 7.97439 14.4122 7.93437 14.359 7.8941C14.3392 7.87935 14.3197 7.86459 14.2987 7.84984C13.6169 7.37759 12.784 7.17536 11.9616 7.28238C15.4479 9.02553 14.5125 15.0278 9.68095 14.8027C9.25075 14.785 8.82562 14.703 8.41973 14.5594C8.32486 14.5238 8.22999 14.485 8.13512 14.4428C8.08035 14.4178 8.02558 14.3928 7.97156 14.3648L7.97831 14.369C8.65206 14.829 11.9798 15.9526 15.4586 13.1186L15.4641 13.1061C15.5509 12.9035 16.7023 10.0399 14.5038 8.01415L14.5043 8.01315Z",fill:"url(#paint9_radial_927_5847)"}),L.jsx("path",{d:"M5.68842 11.1892C5.68842 11.1892 6.13583 9.52179 8.89212 9.52179C9.18998 9.52179 10.0425 8.69023 10.0578 8.44914C8.8727 8.8784 7.56669 8.82706 6.41894 8.30608C5.86211 8.02367 5.24224 7.88855 4.61839 7.91359C3.99455 7.93863 3.3875 8.123 2.8551 8.44914C3.05715 8.88615 3.3816 9.25518 3.78914 9.51153C4.19668 9.76787 4.66981 9.90053 5.15121 9.89343C4.97165 11.4783 5.80946 13.3247 7.83722 14.2951C7.88249 14.3168 7.925 14.3403 7.97152 14.3611C6.78783 13.7496 5.81046 12.5932 5.68842 11.1899V11.1892Z",fill:"url(#paint10_radial_927_5847)"}),L.jsx("path",{d:"M19.0112 6.71023C18.59 5.69685 17.7357 4.60269 17.0667 4.25681C17.5438 5.18063 17.8749 6.17276 18.0483 7.19792L18.0501 7.21417C16.9542 4.48315 15.0965 3.38023 13.5784 0.981835C13.5016 0.860539 13.4249 0.738994 13.3501 0.610696C13.3073 0.537418 13.2731 0.471393 13.2433 0.410621C13.1803 0.288713 13.1318 0.159878 13.0987 0.0267267C13.0988 0.0205825 13.0966 0.0146369 13.0925 0.0100242C13.0884 0.00541151 13.0828 0.00245454 13.0767 0.00171737C13.0708 7.85859e-05 13.0644 7.85859e-05 13.0585 0.00171737C13.0572 0.00171737 13.0552 0.00396821 13.0537 0.0044684C13.0522 0.00496859 13.049 0.00721943 13.0467 0.00821981L13.0505 0.00171737C10.6158 1.42725 9.78925 4.06574 9.71422 5.38624C9.82726 5.37848 9.9393 5.36898 10.0548 5.36898C10.9186 5.37065 11.7666 5.60101 12.5125 6.03664C13.2584 6.47227 13.8756 7.09764 14.3014 7.84916C13.6196 7.37691 12.7868 7.17468 11.9643 7.2817C15.4506 9.02485 14.5153 15.0271 9.68371 14.802C9.25351 14.7843 8.82838 14.7023 8.42248 14.5587C8.32761 14.5232 8.23275 14.4843 8.13788 14.4421C8.08311 14.4171 8.02834 14.3921 7.97432 14.3641L7.98107 14.3684C7.93405 14.3458 7.88703 14.3224 7.84002 14.2981C7.88528 14.3198 7.9278 14.3433 7.97432 14.3641C6.79062 13.7524 5.81326 12.5959 5.69121 11.1929C5.69121 11.1929 6.13863 9.52554 8.89491 9.52554C9.19277 9.52554 10.0453 8.69398 10.0606 8.45289C10.0568 8.37411 8.36996 7.7026 7.71222 7.05486C7.36084 6.70848 7.19402 6.54167 7.04622 6.41637C6.96634 6.34871 6.88285 6.28543 6.79612 6.2268C6.57529 5.45374 6.56588 4.6356 6.76886 3.85766C5.87474 4.29077 5.08027 4.90479 4.43574 5.66084H4.43124C4.04709 5.17391 4.0741 3.5683 4.09611 3.23293C3.98247 3.2786 3.87399 3.33619 3.77249 3.40474C3.43337 3.64677 3.11635 3.91835 2.82514 4.2163C2.49328 4.55275 2.19019 4.91641 1.91905 5.30345V5.30496V5.30321C1.29595 6.18644 0.853946 7.18434 0.618558 8.23931L0.605554 8.30333C0.587297 8.38861 0.505516 8.82177 0.493762 8.91481C0.418959 9.36194 0.371188 9.81318 0.350708 10.2661V10.3161C0.354992 12.7416 1.26845 15.0774 2.91076 16.8624C4.55307 18.6474 6.80488 19.7518 9.22168 19.9576C11.6385 20.1635 14.0446 19.4558 15.9652 17.9743C17.8857 16.4928 19.181 14.3451 19.5954 11.9552C19.6117 11.8302 19.6249 11.7064 19.6394 11.5801C19.8391 9.92991 19.623 8.25604 19.0107 6.71073L19.0112 6.71023ZM18.0496 7.20817L18.0513 7.21842L18.0496 7.20817Z",fill:"url(#paint11_linear_927_5847)"})]}),L.jsxs("defs",{children:[L.jsxs("linearGradient",{id:"paint0_linear_927_5847",x1:"17.728",y1:"3.09786",x2:"1.63621",y2:"18.6237",gradientUnits:"userSpaceOnUse",children:[L.jsx("stop",{offset:"0.048",stopColor:"#FFF44F"}),L.jsx("stop",{offset:"0.111",stopColor:"#FFE847"}),L.jsx("stop",{offset:"0.225",stopColor:"#FFC830"}),L.jsx("stop",{offset:"0.368",stopColor:"#FF980E"}),L.jsx("stop",{offset:"0.401",stopColor:"#FF8B16"}),L.jsx("stop",{offset:"0.462",stopColor:"#FF672A"}),L.jsx("stop",{offset:"0.534",stopColor:"#FF3647"}),L.jsx("stop",{offset:"0.705",stopColor:"#E31587"})]}),L.jsxs("radialGradient",{id:"paint1_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(17.1052 2.25108) scale(20.2076)",children:[L.jsx("stop",{offset:"0.129",stopColor:"#FFBD4F"}),L.jsx("stop",{offset:"0.186",stopColor:"#FFAC31"}),L.jsx("stop",{offset:"0.247",stopColor:"#FF9D17"}),L.jsx("stop",{offset:"0.283",stopColor:"#FF980E"}),L.jsx("stop",{offset:"0.403",stopColor:"#FF563B"}),L.jsx("stop",{offset:"0.467",stopColor:"#FF3750"}),L.jsx("stop",{offset:"0.71",stopColor:"#F5156C"}),L.jsx("stop",{offset:"0.782",stopColor:"#EB0878"}),L.jsx("stop",{offset:"0.86",stopColor:"#E50080"})]}),L.jsxs("radialGradient",{id:"paint2_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.6024 10.5042) scale(20.2076)",children:[L.jsx("stop",{offset:"0.3",stopColor:"#960E18"}),L.jsx("stop",{offset:"0.351",stopColor:"#B11927",stopOpacity:"0.74"}),L.jsx("stop",{offset:"0.435",stopColor:"#DB293D",stopOpacity:"0.343"}),L.jsx("stop",{offset:"0.497",stopColor:"#F5334B",stopOpacity:"0.094"}),L.jsx("stop",{offset:"0.53",stopColor:"#FF3750",stopOpacity:0})]}),L.jsxs("radialGradient",{id:"paint3_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(12.1034 -2.25084) scale(14.638)",children:[L.jsx("stop",{offset:"0.132",stopColor:"#FFF44F"}),L.jsx("stop",{offset:"0.252",stopColor:"#FFDC3E"}),L.jsx("stop",{offset:"0.506",stopColor:"#FF9D12"}),L.jsx("stop",{offset:"0.526",stopColor:"#FF980E"})]}),L.jsxs("radialGradient",{id:"paint4_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(7.35173 15.7558) scale(9.62111)",children:[L.jsx("stop",{offset:"0.353",stopColor:"#3A8EE6"}),L.jsx("stop",{offset:"0.472",stopColor:"#5C79F0"}),L.jsx("stop",{offset:"0.669",stopColor:"#9059FF"}),L.jsx("stop",{offset:1,stopColor:"#C139E6"})]}),L.jsxs("radialGradient",{id:"paint5_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.5799 8.76923) rotate(-13.5916) scale(5.10194 5.97309)",children:[L.jsx("stop",{offset:"0.206",stopColor:"#9059FF",stopOpacity:0}),L.jsx("stop",{offset:"0.278",stopColor:"#8C4FF3",stopOpacity:"0.064"}),L.jsx("stop",{offset:"0.747",stopColor:"#7716A8",stopOpacity:"0.45"}),L.jsx("stop",{offset:"0.975",stopColor:"#6E008B",stopOpacity:"0.6"})]}),L.jsxs("radialGradient",{id:"paint6_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.35238 1.50057) scale(6.9226)",children:[L.jsx("stop",{stopColor:"#FFE226"}),L.jsx("stop",{offset:"0.121",stopColor:"#FFDB27"}),L.jsx("stop",{offset:"0.295",stopColor:"#FFC82A"}),L.jsx("stop",{offset:"0.502",stopColor:"#FFA930"}),L.jsx("stop",{offset:"0.732",stopColor:"#FF7E37"}),L.jsx("stop",{offset:"0.792",stopColor:"#FF7139"})]}),L.jsxs("radialGradient",{id:"paint7_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(14.8545 -3.00121) scale(29.5361)",children:[L.jsx("stop",{offset:"0.113",stopColor:"#FFF44F"}),L.jsx("stop",{offset:"0.456",stopColor:"#FF980E"}),L.jsx("stop",{offset:"0.622",stopColor:"#FF5634"}),L.jsx("stop",{offset:"0.716",stopColor:"#FF3647"}),L.jsx("stop",{offset:"0.904",stopColor:"#E31587"})]}),L.jsxs("radialGradient",{id:"paint8_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(12.3996 -1.36343) rotate(83.976) scale(21.6445 14.2051)",children:[L.jsx("stop",{stopColor:"#FFF44F"}),L.jsx("stop",{offset:"0.06",stopColor:"#FFE847"}),L.jsx("stop",{offset:"0.168",stopColor:"#FFC830"}),L.jsx("stop",{offset:"0.304",stopColor:"#FF980E"}),L.jsx("stop",{offset:"0.356",stopColor:"#FF8B16"}),L.jsx("stop",{offset:"0.455",stopColor:"#FF672A"}),L.jsx("stop",{offset:"0.57",stopColor:"#FF3647"}),L.jsx("stop",{offset:"0.737",stopColor:"#E31587"})]}),L.jsxs("radialGradient",{id:"paint9_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.35233 4.00165) scale(18.4369)",children:[L.jsx("stop",{offset:"0.137",stopColor:"#FFF44F"}),L.jsx("stop",{offset:"0.48",stopColor:"#FF980E"}),L.jsx("stop",{offset:"0.592",stopColor:"#FF5634"}),L.jsx("stop",{offset:"0.655",stopColor:"#FF3647"}),L.jsx("stop",{offset:"0.904",stopColor:"#E31587"})]}),L.jsxs("radialGradient",{id:"paint10_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(14.1041 5.00184) scale(20.1801)",children:[L.jsx("stop",{offset:"0.094",stopColor:"#FFF44F"}),L.jsx("stop",{offset:"0.231",stopColor:"#FFE141"}),L.jsx("stop",{offset:"0.509",stopColor:"#FFAF1E"}),L.jsx("stop",{offset:"0.626",stopColor:"#FF980E"})]}),L.jsxs("linearGradient",{id:"paint11_linear_927_5847",x1:"17.5331",y1:"3.01533",x2:"3.84302",y2:"16.708",gradientUnits:"userSpaceOnUse",children:[L.jsx("stop",{offset:"0.167",stopColor:"#FFF44F",stopOpacity:"0.8"}),L.jsx("stop",{offset:"0.266",stopColor:"#FFF44F",stopOpacity:"0.634"}),L.jsx("stop",{offset:"0.489",stopColor:"#FFF44F",stopOpacity:"0.217"}),L.jsx("stop",{offset:"0.6",stopColor:"#FFF44F",stopOpacity:0})]}),L.jsx("clipPath",{id:"clip0_927_5847",children:L.jsx("rect",{width:20,height:20,fill:"white"})})]})]}),a$e=L.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[L.jsx("path",{d:"M17.2924 5.22043L17.7256 4.15905L16.4982 2.8883C15.8339 2.22404 14.4187 2.61393 14.4187 2.61393L12.8158 0.794434H7.16242L5.55231 2.62115C5.55231 2.62115 4.13715 2.23848 3.47289 2.8883L2.24545 4.15183L2.67866 5.21321L2.13715 6.78721L3.9422 13.6681C4.31765 15.141 4.57036 15.7114 5.63173 16.4623L8.93137 18.7006C9.24906 18.8955 9.63895 19.2349 9.99274 19.2349C10.3465 19.2349 10.7364 18.8955 11.0541 18.7006L14.3538 16.4623C15.4151 15.7114 15.6678 15.141 16.0433 13.6681L17.8483 6.78721L17.2924 5.22043Z",fill:"url(#paint0_linear_927_5861)"}),L.jsx("path",{d:"M13.9711 3.78343C13.9711 3.78343 16.0433 6.28884 16.0433 6.81592C16.0433 7.35744 15.7834 7.49462 15.5234 7.77621L13.9711 9.43686C13.8267 9.58126 13.5162 9.82675 13.6967 10.2527C13.8772 10.686 14.1299 11.2203 13.8411 11.769C13.5523 12.3249 13.0469 12.6932 12.722 12.6354C12.2387 12.4786 11.7777 12.2602 11.3502 11.9856C11.0758 11.8051 10.1949 11.0758 10.1949 10.7943C10.1949 10.5127 11.1047 10 11.278 9.89895C11.444 9.78343 12.2166 9.33577 12.231 9.16249C12.2455 8.9892 12.2455 8.94588 12.0144 8.51267C11.7834 8.07946 11.379 7.50184 11.4368 7.12639C11.509 6.75094 12.1588 6.54877 12.6426 6.36827L14.1372 5.80509C14.2527 5.74733 14.2238 5.69679 13.8772 5.66068C13.5307 5.6318 12.5559 5.50184 12.1155 5.62458C11.6751 5.74733 10.9386 5.93505 10.8664 6.03614C10.8086 6.13722 10.7509 6.13722 10.8159 6.48379L11.2346 8.75816C11.2635 9.04697 11.3213 9.24191 11.018 9.31411C10.7003 9.38632 10.1733 9.50906 9.99276 9.50906C9.81225 9.50906 9.27796 9.38632 8.96749 9.31411C8.65702 9.24191 8.71478 9.04697 8.75088 8.75816C8.77976 8.46935 9.09745 6.82314 9.16243 6.48379C9.23464 6.13722 9.16965 6.13722 9.11189 6.03614C9.03969 5.93505 8.29601 5.74733 7.85558 5.62458C7.42236 5.50184 6.44041 5.6318 6.09384 5.66791C5.74727 5.69679 5.71839 5.74011 5.83391 5.81231L7.3285 6.36827C7.80503 6.54877 8.46929 6.75094 8.53428 7.12639C8.60648 7.50906 8.19493 8.07946 7.95666 8.51267C7.71839 8.94588 7.72561 8.9892 7.74005 9.16249C7.75449 9.33577 8.53428 9.78343 8.69312 9.89895C8.86641 10.0073 9.77615 10.5127 9.77615 10.7943C9.77615 11.0758 8.91695 11.8051 8.62814 11.9856C8.20063 12.2602 7.73957 12.4786 7.2563 12.6354C6.93139 12.6932 6.42597 12.3249 6.12994 11.769C5.84113 11.2203 6.10106 10.686 6.27435 10.2527C6.45485 9.81953 6.1516 9.58848 5.99998 9.43686L4.44763 7.77621C4.19493 7.50906 3.935 7.36466 3.935 6.83036C3.935 6.29606 6.0072 3.79787 6.0072 3.79787L7.97832 4.11556C8.20937 4.11556 8.722 3.92061 9.19132 3.75455C9.66063 3.61014 9.98554 3.5957 9.98554 3.5957C9.98554 3.5957 10.3032 3.5957 10.7798 3.75455C11.2563 3.91339 11.7617 4.11556 11.9928 4.11556C12.231 4.11556 13.9783 3.77621 13.9783 3.77621L13.9711 3.78343ZM12.4188 13.3719C12.5487 13.4441 12.4693 13.6029 12.3465 13.6896L10.5126 15.1192C10.3682 15.2636 10.1372 15.4802 9.98554 15.4802C9.83391 15.4802 9.61009 15.2636 9.45846 15.1192C8.8506 14.6351 8.23683 14.1586 7.61731 13.6896C7.50178 13.6029 7.42236 13.4513 7.54511 13.3719L8.62814 12.7943C9.05864 12.5665 9.51417 12.3897 9.98554 12.2672C10.0938 12.2672 10.7798 12.5127 11.3357 12.7943L12.4188 13.3719Z",fill:"white"}),L.jsx("path",{d:"M14.4332 2.62115L12.8159 0.794434H7.16243L5.55232 2.62115C5.55232 2.62115 4.13716 2.23848 3.4729 2.8883C3.4729 2.8883 5.35016 2.72223 5.99998 3.77638L7.99276 4.11573C8.2238 4.11573 8.73644 3.92079 9.20575 3.75472C9.67507 3.61032 9.99998 3.59588 9.99998 3.59588C9.99998 3.59588 10.3177 3.59588 10.7942 3.75472C11.2707 3.91357 11.7761 4.11573 12.0072 4.11573C12.2455 4.11573 13.9928 3.77638 13.9928 3.77638C14.6426 2.72223 16.5198 2.8883 16.5198 2.8883C15.8556 2.22404 14.4404 2.61393 14.4404 2.61393",fill:"url(#paint1_linear_927_5861)"}),L.jsxs("defs",{children:[L.jsxs("linearGradient",{id:"paint0_linear_927_5861",x1:"2.13715",y1:"10.1991",x2:"17.8483",y2:"10.1991",gradientUnits:"userSpaceOnUse",children:[L.jsx("stop",{offset:"0.4",stopColor:"#FF5500"}),L.jsx("stop",{offset:"0.6",stopColor:"#FF2000"})]}),L.jsxs("linearGradient",{id:"paint1_linear_927_5861",x1:"3.73384",y1:"2.4883",x2:"16.5198",y2:"2.4883",gradientUnits:"userSpaceOnUse",children:[L.jsx("stop",{stopColor:"#FF452A"}),L.jsx("stop",{offset:1,stopColor:"#FF2000"})]})]})]}),s$e=L.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[L.jsxs("g",{clipPath:"url(#clip0_927_5865)",children:[L.jsx("path",{d:"M18.0547 14.8828C17.7865 15.0222 17.5099 15.1448 17.2266 15.25C16.3293 15.584 15.3792 15.7533 14.4219 15.75C10.7266 15.75 7.50781 13.2109 7.50781 9.94531C7.51262 9.50803 7.63385 9.07993 7.85905 8.70506C8.08424 8.33019 8.40526 8.0221 8.78906 7.8125C5.44531 7.95312 4.58594 11.4375 4.58594 13.4766C4.58594 19.2578 9.90625 19.8359 11.0547 19.8359C11.6719 19.8359 12.6016 19.6562 13.1641 19.4766L13.2656 19.4453C15.4183 18.7014 17.2534 17.2465 18.4688 15.3203C18.5041 15.2618 18.5192 15.1933 18.5119 15.1253C18.5046 15.0574 18.4752 14.9937 18.4282 14.944C18.3812 14.8944 18.3192 14.8615 18.2518 14.8505C18.1843 14.8394 18.1151 14.8508 18.0547 14.8828Z",fill:"url(#paint0_linear_927_5865)"}),L.jsx("path",{opacity:"0.35",d:"M18.0547 14.8828C17.7865 15.0222 17.5099 15.1448 17.2266 15.25C16.3293 15.584 15.3792 15.7533 14.4219 15.75C10.7266 15.75 7.50781 13.2109 7.50781 9.94531C7.51262 9.50803 7.63385 9.07993 7.85905 8.70506C8.08424 8.33019 8.40526 8.0221 8.78906 7.8125C5.44531 7.95312 4.58594 11.4375 4.58594 13.4766C4.58594 19.2578 9.90625 19.8359 11.0547 19.8359C11.6719 19.8359 12.6016 19.6562 13.1641 19.4766L13.2656 19.4453C15.4183 18.7014 17.2534 17.2465 18.4688 15.3203C18.5041 15.2618 18.5192 15.1933 18.5119 15.1253C18.5046 15.0574 18.4752 14.9937 18.4282 14.944C18.3812 14.8944 18.3192 14.8615 18.2518 14.8505C18.1843 14.8394 18.1151 14.8508 18.0547 14.8828Z",fill:"url(#paint1_radial_927_5865)"}),L.jsx("path",{d:"M8.2578 18.8516C7.56239 18.4196 6.95961 17.854 6.48436 17.1875C5.94166 16.4447 5.56809 15.5921 5.38987 14.6896C5.21165 13.787 5.23311 12.8565 5.45272 11.9631C5.67234 11.0697 6.08479 10.2353 6.66115 9.51826C7.23751 8.80123 7.96379 8.21903 8.78905 7.8125C9.03905 7.69531 9.45311 7.49219 10.0078 7.5C10.3981 7.50302 10.7824 7.59627 11.1308 7.77245C11.4791 7.94864 11.7819 8.20299 12.0156 8.51562C12.3299 8.93835 12.5023 9.4498 12.5078 9.97656C12.5078 9.96094 14.4219 3.75781 6.2578 3.75781C2.82811 3.75781 0.00780015 7.00781 0.00780015 9.86719C-0.00584162 11.3776 0.317079 12.8721 0.953112 14.2422C1.99473 16.4602 3.81447 18.2185 6.06689 19.1834C8.3193 20.1483 10.8476 20.2526 13.1719 19.4766C12.3576 19.7337 11.4972 19.811 10.6501 19.7031C9.80297 19.5952 8.98941 19.3047 8.26561 18.8516H8.2578Z",fill:"url(#paint2_linear_927_5865)"}),L.jsx("path",{opacity:"0.41",d:"M8.2578 18.8516C7.56239 18.4196 6.95961 17.854 6.48436 17.1875C5.94166 16.4447 5.56809 15.5921 5.38987 14.6896C5.21165 13.787 5.23311 12.8565 5.45272 11.9631C5.67234 11.0697 6.08479 10.2353 6.66115 9.51826C7.23751 8.80123 7.96379 8.21903 8.78905 7.8125C9.03905 7.69531 9.45311 7.49219 10.0078 7.5C10.3981 7.50302 10.7824 7.59627 11.1308 7.77245C11.4791 7.94864 11.7819 8.20299 12.0156 8.51562C12.3299 8.93835 12.5023 9.4498 12.5078 9.97656C12.5078 9.96094 14.4219 3.75781 6.2578 3.75781C2.82811 3.75781 0.00780015 7.00781 0.00780015 9.86719C-0.00584162 11.3776 0.317079 12.8721 0.953112 14.2422C1.99473 16.4602 3.81447 18.2185 6.06689 19.1834C8.3193 20.1483 10.8476 20.2526 13.1719 19.4766C12.3576 19.7337 11.4972 19.811 10.6501 19.7031C9.80297 19.5952 8.98941 19.3047 8.26561 18.8516H8.2578Z",fill:"url(#paint3_radial_927_5865)"}),L.jsx("path",{d:"M11.9062 11.625C11.8359 11.7031 11.6406 11.8203 11.6406 12.0625C11.6406 12.2656 11.7734 12.4688 12.0156 12.6328C13.1328 13.4141 15.25 13.3047 15.2578 13.3047C16.0907 13.3041 16.9081 13.0802 17.625 12.6562C18.3467 12.2341 18.9456 11.6307 19.3622 10.9057C19.7788 10.1808 19.9986 9.35955 20 8.52344C20.0234 6.77344 19.375 5.60937 19.1172 5.09375C17.4531 1.85937 13.8828 4.89564e-08 10 4.89564e-08C7.37202 -0.00025981 4.84956 1.03398 2.97819 2.87904C1.10682 4.7241 0.0369559 7.23166 0 9.85938C0.0390625 7.00781 2.875 4.70312 6.25 4.70312C6.52344 4.70312 8.08594 4.72656 9.53125 5.48438C10.5466 5.98895 11.3875 6.78627 11.9453 7.77344C12.4219 8.60156 12.5078 9.65625 12.5078 10.0781C12.5078 10.5 12.2969 11.1172 11.8984 11.6328L11.9062 11.625Z",fill:"url(#paint4_radial_927_5865)"}),L.jsx("path",{d:"M11.9062 11.625C11.8359 11.7031 11.6406 11.8203 11.6406 12.0625C11.6406 12.2656 11.7734 12.4688 12.0156 12.6328C13.1328 13.4141 15.25 13.3047 15.2578 13.3047C16.0907 13.3041 16.9081 13.0802 17.625 12.6562C18.3467 12.2341 18.9456 11.6307 19.3622 10.9057C19.7788 10.1808 19.9986 9.35955 20 8.52344C20.0234 6.77344 19.375 5.60937 19.1172 5.09375C17.4531 1.85937 13.8828 4.89564e-08 10 4.89564e-08C7.37202 -0.00025981 4.84956 1.03398 2.97819 2.87904C1.10682 4.7241 0.0369559 7.23166 0 9.85938C0.0390625 7.00781 2.875 4.70312 6.25 4.70312C6.52344 4.70312 8.08594 4.72656 9.53125 5.48438C10.5466 5.98895 11.3875 6.78627 11.9453 7.77344C12.4219 8.60156 12.5078 9.65625 12.5078 10.0781C12.5078 10.5 12.2969 11.1172 11.8984 11.6328L11.9062 11.625Z",fill:"url(#paint5_radial_927_5865)"})]}),L.jsxs("defs",{children:[L.jsxs("linearGradient",{id:"paint0_linear_927_5865",x1:"4.58594",y1:"13.8281",x2:"18.5234",y2:"13.8281",gradientUnits:"userSpaceOnUse",children:[L.jsx("stop",{stopColor:"#0C59A4"}),L.jsx("stop",{offset:1,stopColor:"#114A8B"})]}),L.jsxs("radialGradient",{id:"paint1_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(12.2813 13.9332) scale(7.45313 7.08047)",children:[L.jsx("stop",{offset:"0.7",stopOpacity:0}),L.jsx("stop",{offset:"0.9",stopOpacity:"0.5"}),L.jsx("stop",{offset:1})]}),L.jsxs("linearGradient",{id:"paint2_linear_927_5865",x1:"11.9297",y1:"7.78125",x2:"3.23436",y2:"17.2578",gradientUnits:"userSpaceOnUse",children:[L.jsx("stop",{stopColor:"#1B9DE2"}),L.jsx("stop",{offset:"0.2",stopColor:"#1595DF"}),L.jsx("stop",{offset:"0.7",stopColor:"#0680D7"}),L.jsx("stop",{offset:1,stopColor:"#0078D4"})]}),L.jsxs("radialGradient",{id:"paint3_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(5.51209 15.5419) rotate(-81.3844) scale(11.202 9.05011)",children:[L.jsx("stop",{offset:"0.8",stopOpacity:0}),L.jsx("stop",{offset:"0.9",stopOpacity:"0.5"}),L.jsx("stop",{offset:1})]}),L.jsxs("radialGradient",{id:"paint4_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(2.02266 3.69656) rotate(92.2906) scale(15.8251 33.7043)",children:[L.jsx("stop",{stopColor:"#35C1F1"}),L.jsx("stop",{offset:"0.1",stopColor:"#34C1ED"}),L.jsx("stop",{offset:"0.2",stopColor:"#2FC2DF"}),L.jsx("stop",{offset:"0.3",stopColor:"#2BC3D2"}),L.jsx("stop",{offset:"0.7",stopColor:"#36C752"})]}),L.jsxs("radialGradient",{id:"paint5_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(18.7547 6.03906) rotate(73.7398) scale(7.60156 6.18159)",children:[L.jsx("stop",{stopColor:"#66EB6E"}),L.jsx("stop",{offset:1,stopColor:"#66EB6E",stopOpacity:0})]}),L.jsx("clipPath",{id:"clip0_927_5865",children:L.jsx("rect",{width:20,height:20,fill:"white"})})]})]});var Lw={Chrome:o$e,FireFox:i$e,Brave:a$e,Edge:s$e};const $x=ae.forwardRef(({browser:e},t)=>{const r=e??UG();let n;switch(r){case"chrome":n=Lw.Chrome;break;case"firefox":n=Lw.FireFox;break;case"edge":n=Lw.Edge;break}return n?L.jsx(n$e,{children:n}):L.jsx(L.Fragment,{})});$x.displayName="BrowserIcon";const u$="6e2562e43678dd68a9070a62b6d52207";function gh(e){const{addressGroup:t,networkId:r}=e,{connectorId:n,keyType:o}=oi(),{signerProvider:i,setSignerProvider:a,setAccount:s}=Da(),l=$.useCallback(()=>{a(void 0),s(void 0)},[a,s]),c=$.useCallback(async()=>{(n==="walletConnect"||n==="desktopWallet")&&i&&await i.disconnect()},[n,i]),u=$.useCallback(async()=>{const _=await G3.WalletConnectProvider.init({projectId:u$,networkId:r,addressGroup:t,onDisconnected:l});_.on("displayUri",w=>{ZI.open(w,()=>console.log("qr closed"))}),_.on("session_delete",l);try{await _.connect(),_.account&&(s({..._.account,network:r}),a(_))}catch(w){console.log("wallet connect error"),console.error(w)}ZI.close()},[r,t,s,a,l]),f=$.useCallback(async()=>{const _=await G3.WalletConnectProvider.init({projectId:u$,networkId:r,addressGroup:t,onDisconnected:l});_.on("displayUri",w=>{window.open(`alephium://wc?uri=${w}`)}),_.on("session_delete",l);try{await _.connect(),_.account&&(s({..._.account,network:r}),a(_))}catch(w){console.log("wallet connect error"),console.error(w)}},[r,t,s,a,l]),d=$.useCallback(()=>{m1().then(_=>{_&&_.disconnect()}).catch(_=>{console.error(_)})},[]),p=$.useMemo(()=>({addressGroup:t,networkId:r,keyType:o,onDisconnected:l}),[r,t,o,l]),h=$.useCallback(async()=>{const _=await m1(),w=await(_==null?void 0:_.enable(p).catch(()=>{}));return _&&w&&(a(_),s({...w,network:p.networkId})),w},[p,a,s]),m=$.useCallback(async()=>{const _=await m1(),w=await(_==null?void 0:_.enableIfConnected(p).catch(()=>{}));_&&w&&(a(_),s({...w,network:p.networkId}))},[p,a,s]);return $.useMemo(()=>({injected:{connect:h,disconnect:d,autoConnect:m},walletConnect:{connect:u,disconnect:c},desktopWallet:{connect:f,disconnect:c}})[`${n}`],[n,h,d,m,u,f,c])}const Nt={CONNECTED:"connected",CONNECTING:"connecting",EXPIRING:"expiring",FAILED:"failed",REJECTED:"rejected",NOTCONNECTED:"notconnected",UNAVAILABLE:"unavailable"},pc={initial:{willChange:"transform,opacity",position:"relative",opacity:0,scale:.95},animate:{position:"relative",opacity:1,scale:1,transition:{ease:[.16,1,.3,1],duration:.4,delay:.05,position:{delay:0}}},exit:{position:"absolute",opacity:0,scale:.95,transition:{ease:[.16,1,.3,1],duration:.3}}},l$e=({connectorId:e,switchConnectMethod:t,forceState:r})=>{var n,o;const{addressGroup:i,network:a,setOpen:s}=oi(),{connect:l}=gh({addressGroup:i,networkId:a}),[c,u]=$.useState(e),[f,d]=$.useState(!1),p=El.filter(g=>g.id===c)[0],h=9;$.useState(h);const m=p.extensionIsInstalled&&p.extensionIsInstalled(),_=UG(),w=p.extensions?p.extensions[_]:void 0,y=p.extensions?{name:Object.keys(p.extensions)[0],label:Object.keys(p.extensions)[0].charAt(0).toUpperCase()+Object.keys(p.extensions)[0].slice(1),url:p.extensions[Object.keys(p.extensions)[0]]}:void 0,[C,I]=$.useState(r||(m?Nt.CONNECTING:Nt.UNAVAILABLE)),F=$.useCallback(()=>{m&&l().then(g=>{g&&I(Nt.CONNECTED),s(!1)})},[m,s,l]),O=$.useRef();return $.useEffect(()=>{if(C!==Nt.UNAVAILABLE)return O.current=setTimeout(F,600),()=>{clearTimeout(O.current)}},[C,F]),p?p.id==="walletConnect"?L.jsx(Ps,{children:L.jsxs(Md,{children:[L.jsx(wm,{children:"Invalid State"}),L.jsx(uo,{children:L.jsx(_m,{children:"WalletConnect does not have an injection flow. This state should never happen."})})]})}):L.jsx(Ps,{children:L.jsxs(Md,{children:[L.jsx(IIe,{children:L.jsxs($Ie,{$shake:C===Nt.FAILED||C===Nt.REJECTED,$circle:!0,children:[L.jsx(Ko,{children:(C===Nt.FAILED||C===Nt.REJECTED)&&L.jsx(TIe,{"aria-label":"Retry",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},whileTap:{scale:.9},transition:{duration:.1},onClick:F,children:L.jsx(DIe,{children:L.jsx(HIe,{open:f&&(C===Nt.FAILED||C===Nt.REJECTED),message:"try again",xOffset:-6,children:L.jsx(t$e,{})})})})}),L.jsx(ZIe,{logo:C===Nt.UNAVAILABLE?L.jsx("div",{style:{transform:"scale(1.14)",position:"relative",width:"100%"},children:(n=p.logos.transparent)!==null&&n!==void 0?n:p.logos.default}):L.jsx(L.Fragment,{children:(o=p.logos.transparent)!==null&&o!==void 0?o:p.logos.default}),smallLogo:p.id==="injected",connecting:C===Nt.CONNECTING,unavailable:C===Nt.UNAVAILABLE,countdown:C===Nt.EXPIRING})]})}),L.jsx(Nke,{children:L.jsxs(Ko,{initial:!1,children:[C===Nt.FAILED&&L.jsxs(dc,{initial:"initial",animate:"animate",exit:"exit",variants:pc,children:[L.jsxs(uo,{children:[L.jsxs(Ga,{$error:!0,children:[L.jsx(JIe,{}),"failed"]}),L.jsx(Px,{children:"failed"})]}),p.scannable&&L.jsxs(L.Fragment,{children:[L.jsx(i$,{}),L.jsx(jc,{icon:L.jsx(c$,{}),onClick:()=>t(c),children:"scan qr code"})]})]},Nt.FAILED),C===Nt.REJECTED&&L.jsxs(dc,{initial:"initial",animate:"animate",exit:"exit",variants:pc,children:[L.jsxs(uo,{style:{paddingBottom:28},children:[L.jsx(Ga,{children:"rejected"}),L.jsx(Px,{children:"rejected"})]}),p.scannable&&L.jsxs(L.Fragment,{children:[L.jsx(i$,{}),L.jsx(jc,{icon:L.jsx(c$,{}),onClick:()=>t(c),children:"scan the qr code"})]})]},Nt.REJECTED),(C===Nt.CONNECTING||C===Nt.EXPIRING)&&L.jsx(dc,{initial:"initial",animate:"animate",exit:"exit",variants:pc,children:L.jsx(uo,{style:{paddingBottom:28},children:L.jsx(Ga,{children:p.id==="injected"?"connecting":"rejected"})})},Nt.CONNECTING),C===Nt.CONNECTED&&L.jsx(dc,{initial:"initial",animate:"animate",exit:"exit",variants:pc,children:L.jsx(uo,{children:L.jsxs(Ga,{$valid:!0,children:[L.jsx(e$e,{})," ","Connected"]})})},Nt.CONNECTED),C===Nt.NOTCONNECTED&&L.jsx(dc,{initial:"initial",animate:"animate",exit:"exit",variants:pc,children:L.jsx(uo,{children:L.jsx(Ga,{children:"Not Connected"})})},Nt.NOTCONNECTED),C===Nt.UNAVAILABLE&&L.jsx(dc,{initial:"initial",animate:"animate",exit:"exit",variants:pc,children:w?L.jsxs(L.Fragment,{children:[L.jsx(uo,{style:{paddingBottom:18},children:L.jsx(Ga,{children:"Install"})}),!m&&w&&L.jsx(jc,{href:w,icon:L.jsx($x,{}),children:"Install the extension"})]}):L.jsxs(L.Fragment,{children:[L.jsx(uo,{style:{paddingBottom:12},children:L.jsx(Ga,{children:"Not Available"})}),!m&&y&&L.jsxs(jc,{href:y==null?void 0:y.url,icon:L.jsx($x,{browser:y==null?void 0:y.name}),children:["Install on ",y==null?void 0:y.label]})]})},Nt.UNAVAILABLE)]})})]})}):L.jsx(Ps,{children:L.jsxs(Md,{children:[L.jsx(wm,{children:"Invalid State"}),L.jsx(uo,{children:L.jsx(_m,{children:"No connectors match the id given. This state should never happen."})})]})})};let f$=!1;const c$e=()=>{const{addressGroup:e,network:t,setOpen:r}=oi(),[n,o]=$.useState(),{connect:i}=gh({addressGroup:e,networkId:t});return $.useEffect(()=>{f$||i().then(()=>{f$=!0,r(!1),o(void 0)}).catch(a=>o(`${a}`))},[i,r]),L.jsx(Ps,{children:L.jsx(Md,{children:n!==void 0?n:"Connecting to wallet connect"})})},u$e=()=>{const e=oi(),[t,r]=$.useState(),{connect:n}=gh({addressGroup:e.addressGroup,networkId:e.network});return $.useEffect(()=>{n().catch(o=>r(`${o}`))},[n]),L.jsx(Ps,{children:L.jsx(Md,{children:t!==void 0?t:"Opening desktop wallet..."})})},Ha={QRCODE:"QRCODE",INJECTOR:"INJECTOR",DESKTOPWALLET:"DESKTOPWALLET"},f$e=({connectorId:e})=>{const[t,r]=$.useState(e),n=El.filter(l=>l.id===t)[0],o=n.extensionIsInstalled&&n.extensionIsInstalled(),i=(!n.scannable||o)&&e!=="desktopWallet",[a,s]=$.useState(i?Ha.INJECTOR:e==="desktopWallet"?Ha.DESKTOPWALLET:Ha.QRCODE);return n?a===Ha.QRCODE?L.jsx(c$e,{}):a===Ha.DESKTOPWALLET?L.jsx(u$e,{}):L.jsx(Ko,{children:a===Ha.INJECTOR&&L.jsx(ut.div,{initial:"initial",animate:"animate",exit:"exit",variants:lIe,children:L.jsx(l$e,{connectorId:t,switchConnectMethod:l=>{l&&r(l),s(Ha.QRCODE)}})},Ha.INJECTOR)}):L.jsx(_m,{children:"Connector not found"})},d$e=st(ut.div)` + transition: all 220ms cubic-bezier(0.175, 0.885, 0.32, 1.1); + display: flex; + align-items: center; + justify-content: center; + width: 16px; + svg { + display: block; + } + svg, + svg path, + svg rect { + transition: inherit; + } + svg path:first-child { + transform-origin: 50% 50%; + fill: var(--bg); + stroke: var(--color); + } + svg rect { + transform-origin: 53% 63%; + fill: var(--bg); + stroke: var(--color); + } + svg path:last-child { + opacity: 0; + stroke: var(--bg); + transform: translate(11.75px, 10px) rotate(90deg) scale(0.6); + } + ${e=>e.$clipboard?ur` + --color: var(--ck-focus-color) !important; + --bg: var(--ck-body-background); + svg { + transition-delay: 0ms; + path:first-child { + opacity: 0; + transform: rotate(-90deg) scale(0.2); + } + rect { + rx: 10px; + fill: var(--color); + transform: rotate(-90deg) scale(1.45); + } + path:last-child { + transition-delay: 100ms; + opacity: 1; + transform: translate(7.75px, 9.5px); + } + } + `:ur` + &:hover { + } + &:hover:active { + } + `} +`,d$=({copied:e,small:t})=>L.jsx(d$e,{$clipboard:e,children:L.jsx(r$e,{style:{transform:t?"scale(1)":"translateX(3px) scale(1.5)",opacity:t||e?1:.3}})}),p$e=st.div` + --color: var(--ck-copytoclipboard-stroke); + --bg: var(--ck-body-background); + transition: all 220ms cubic-bezier(0.175, 0.885, 0.32, 1.1); + + cursor: pointer; + display: inline-flex; + align-items: center; + justify-content: center; + + ${e=>e.$disabled?ur` + cursor: not-allowed; + opacity: 0.4; + `:ur` + &:hover { + --color: var(--ck-body-color-muted); + } + `} +`,h$e=st.div` + display: block; + position: relative; + transition: inherit; + svg { + position: absolute; + left: 100%; + display: block; + top: -1px; + margin: 0; + margin-left: 4px; + } +`,v$e=({string:e,children:t,variant:r})=>{const[n,o]=$.useState(!1);let i;const a=()=>{if(!e)return;const s=e.trim();navigator.clipboard&&navigator.clipboard.writeText(s),o(!0),clearTimeout(i),i=setTimeout(()=>o(!1),1e3)};return r==="button"?L.jsx(jc,{disabled:!e,onClick:a,icon:L.jsx(d$,{copied:n}),children:t}):L.jsx(p$e,{onClick:a,$disabled:!e,children:L.jsxs(h$e,{children:[t,L.jsx(d$,{copied:n,small:!0})]})})},g$e=({closeModal:e})=>{const{addressGroup:t,network:r,displayAccount:n,setOpen:o}=oi(),{account:i}=Da(),{disconnect:a}=gh({addressGroup:t,networkId:r}),[s,l]=$.useState(!1),c=i?n?n(i):i.address:void 0;return $.useEffect(()=>{if(s)return e?e():o(!1),()=>{a(),o(!1)}},[s,a,e,o]),L.jsxs(Ps,{children:[L.jsx(uo,{style:{paddingBottom:22,gap:6},children:L.jsx(Ga,{children:L.jsx(v$e,{string:c,children:c&&C8(c)})})}),L.jsx(jc,{onClick:()=>l(!0),icon:L.jsx(QIe,{}),children:"Disconnect"})]})},m$e={},y$e=({mode:e="auto",theme:t="auto",customTheme:r=m$e})=>{const{network:n,addressGroup:o,route:i,setRoute:a,open:s,setOpen:l,connectorId:c,setMode:u,setTheme:f,setCustomTheme:d}=oi(),p=$.useRef(n),{account:h}=Da(),m=!!h,{autoConnect:_,disconnect:w}=gh({networkId:n,addressGroup:o});$.useEffect(()=>{_!==void 0&&!m&&_()},[_,m]),$.useEffect(()=>{p.current!==n&&m&&w(),p.current=n},[n,p,w,m]);const y=i!==vn.CONNECTORS&&i!==vn.PROFILE,C=()=>{a(vn.CONNECTORS)},I=[{id:"CONNECTORS",content:L.jsx(OIe,{})},{id:"CONNECT",content:L.jsx(f$e,{connectorId:c})},{id:"PROFILE",content:L.jsx(g$e,{})}],F=$.useCallback(()=>{l(!1)},[l]);return $.useEffect(()=>{m&&i!==vn.PROFILE&&F()},[m,i,F]),$.useEffect(()=>u(e),[u,e]),$.useEffect(()=>f(t),[f,t]),$.useEffect(()=>d(r),[d,r]),$.useEffect(()=>{const O="alephium";if(!s)return;const g=document.createElement("meta");return g.setAttribute("property","og:title"),g.setAttribute("content",O),document.head.prepend(g),()=>{document.head.removeChild(g)}},[s]),L.jsx(cIe,{open:s,pages:I,pageId:i,onClose:F,onInfo:void 0,onBack:y?C:void 0})},b$e=({useTheme:e="auto",useMode:t="auto",useCustomTheme:r,network:n,addressGroup:o,keyType:i,children:a})=>{if($.useContext(xx))throw new Error("Multiple, nested usages of ConnectSettingContext detected. Please use only one.");const[l,c]=$.useState(e),[u,f]=$.useState(t),[d,p]=$.useState(r??{}),[h,m]=$.useState(!1),[_,w]=$.useState("injected"),[y,C]=$.useState(vn.CONNECTORS),[I,F]=$.useState("");$.useEffect(()=>c(l),[l]);const O={open:h,setOpen:m,route:y,setRoute:C,connectorId:_,setConnectorId:w,network:n,theme:l,setTheme:c,mode:u,setMode:f,customTheme:d,setCustomTheme:p,addressGroup:o,keyType:i??"default",errorMessage:I};return L.jsx(xx.Provider,{value:O,children:L.jsxs(s3e,{theme:Oke,children:[a,L.jsx(y$e,{theme:l,mode:u,customTheme:d})]})})};function w$e(){try{return At.web3.getCurrentNodeProvider()}catch{return}}const x$e=({children:e})=>{if($.useContext(_x))throw new Error("Multiple, nested usages of AlephiumConnectProvider detected. Please use only one.");const[r,n]=$.useState(),[o,i]=$.useState(),a={account:r,setAccount:n,signerProvider:o,setSignerProvider:i};return L.jsx(_x.Provider,{value:a,children:e})},_$e=({children:e})=>{if($.useContext(e$))throw new Error("Multiple, nested usages of AlephiumBalanceProvider detected. Please use only one.");const{account:r,signerProvider:n}=Da(),[o,i]=$.useState(),a=$.useCallback(async()=>{var c;const u=(c=w$e())!==null&&c!==void 0?c:n==null?void 0:n.nodeProvider;if(u&&r){const f=await u.addresses.getAddressesAddressBalance(r.address);i(d=>d!==void 0&&At.isBalanceEqual(d,f)?d:f)}else r===void 0&&i(void 0)},[r,n]),s=$.useCallback((c,u)=>{if(r===void 0)throw new Error("Wallet is not connected");const f=u??1,m={pollingInterval:r.network==="devnet"?1e3:4e3,messageCallback:async _=>{_.type==="Confirmed"&&_.chainConfirmations>=f&&await a()},errorCallback:(_,w)=>(w.unsubscribe(),console.error(`tx status subscription error: ${_}`),Promise.resolve())};At.subscribeToTxStatus(m,c,void 0,void 0,f)},[a,r]);$.useEffect(()=>{r===void 0&&i(void 0)},[r]);const l={balance:o,updateBalance:a,updateBalanceForTx:s};return L.jsx(e$.Provider,{value:l,children:e})},E$e=({useTheme:e,useMode:t,useCustomTheme:r,network:n,addressGroup:o,keyType:i,children:a})=>L.jsx(x$e,{children:L.jsx(b$e,{useTheme:e,useMode:t,useCustomTheme:r,network:n,addressGroup:o,keyType:i,children:L.jsx(_$e,{children:a})})});function YG(){const[e,t]=$.useState(!1);return $.useEffect(()=>t(!0),[]),e}const zw=st(ut.div)` + top: 0; + bottom: 0; + left: 0; + display: inline-flex; + align-items: center; + justify-content: center; + white-space: nowrap; +`,Tx=st(ut.div)` + display: flex; + align-items: center; + justify-content: flex-start; + position: relative; + height: 40px; + padding: 0; + line-height: 0; + letter-spacing: -0.2px; + font-size: var(--ck-connectbutton-font-size, 16px); + font-weight: var(--ck-connectbutton-font-weight, 500); + text-align: center; + transition: 100ms ease; + transition-property: color, background, box-shadow, border-radius; + + color: var(--color); + background: var(--background); + box-shadow: var(--box-shadow); + border-radius: var(--border-radius); + + &.primary { + --color: var(--ck-connectbutton-color); + --background: var(--ck-connectbutton-background); + --box-shadow: var(--ck-connectbutton-box-shadow); + --border-radius: var(--ck-connectbutton-border-radius, 12px); + + --hover-color: var(--ck-connectbutton-hover-color, var(--color)); + --hover-background: var(--ck-connectbutton-hover-background, var(--background)); + --hover-box-shadow: var(--ck-connectbutton-hover-box-shadow, var(--box-shadow)); + --hover-border-radius: var(--ck-connectbutton-hover-border-radius, var(--border-radius)); + + --active-color: var(--ck-connectbutton-active-color, var(--hover-color)); + --active-background: var(--ck-connectbutton-active-background, var(--hover-background)); + --active-box-shadow: var(--ck-connectbutton-active-box-shadow, var(--hover-box-shadow)); + --active-border-radius: var(--ck-connectbutton-active-border-radius, var(--hover-border-radius)); + } + &.secondary { + --color: var(--ck-connectbutton-balance-color); + --background: var(--ck-connectbutton-balance-background); + --box-shadow: var(--ck-connectbutton-balance-box-shadow); + --border-radius: var(--ck-connectbutton-balance-border-radius, var(--ck-connectbutton-border-radius, 12px)); + + --hover-color: var(--ck-connectbutton-balance-hover-color, var(--color)); + --hover-background: var(--ck-connectbutton-balance-hover-background, var(--background)); + --hover-box-shadow: var(--ck-connectbutton-balance-hover-box-shadow, var(--box-shadow)); + --hover-border-radius: var(--ck-connectbutton-balance-hover-border-radius, var(--border-radius)); + + --active-color: var(--ck-connectbutton-balance-active-color, var(--hover-color)); + --active-background: var(--ck-connectbutton-balance-active-background, var(--hover-background)); + --active-box-shadow: var(--ck-connectbutton-balance-active-box-shadow, var(--hover-box-shadow)); + --active-border-radius: var(--ck-connectbutton-balance-active-border-radius, var(--hover-border-radius)); + } +`,S$e=st.button` + all: initial; + appearance: none; + user-select: none; + position: relative; + padding: 0; + margin: 0; + background: none; + border-radius: var(--ck-border-radius); + + &:disabled { + pointer-events: none; + opacity: 0.3; + } + + display: flex; + flex-wrap: nowrap; + background: none; + cursor: pointer; + * { + cursor: pointer; + } + &:hover { + ${Tx} { + color: var(--hover-color, var(--color)); + background: var(--hover-background, var(--background)); + box-shadow: var(--hover-box-shadow, var(--box-shadow)); + border-radius: var(--hover-border-radius, var(--border-radius)); + } + } + &:active { + ${Tx} { + color: var(--active-color, var(--hover-color, var(--color))); + background: var(--active-background, var(--hover-background, var(--background))); + box-shadow: var(--active-box-shadow, var(--hover-box-shadow, var(--box-shadow))); + border-radius: var(--active-border-radius, var(--hover-border-radius, var(--border-radius))); + } + } + &:focus-visible { + outline: 2px solid var(--ck-family-brand); + } +`,C$e=({children:e,variant:t="primary",autoSize:r=!0,duration:n=.3,style:o})=>{const[i,a]=$U();return L.jsx(Tx,{className:t,initial:!1,animate:r?{width:a.width>10?a.width:"auto"}:void 0,transition:{duration:n,ease:[.25,1,.5,1],delay:.01},style:o,children:L.jsx("div",{ref:i,style:{whiteSpace:"nowrap",width:"fit-content",position:"relative",padding:"0 12px"},children:e})})},P$e={initial:{zIndex:2,opacity:0,x:"-100%"},animate:{opacity:1,x:.1,transition:{duration:.4,ease:[.25,1,.5,1]}},exit:{zIndex:1,opacity:0,x:"-100%",pointerEvents:"none",position:"absolute",transition:{duration:.4,ease:[.25,1,.5,1]}}},O$e={initial:{zIndex:2,opacity:0,x:"100%"},animate:{x:.2,opacity:1,transition:{duration:.4,ease:[.25,1,.5,1]}},exit:{zIndex:1,x:"100%",opacity:0,pointerEvents:"none",position:"absolute",transition:{duration:.4,ease:[.25,1,.5,1]}}},A$e={initial:{opacity:0},animate:{opacity:1,transition:{duration:.3,ease:[.25,1,.5,1]}},exit:{position:"absolute",opacity:0,transition:{duration:.3,ease:[.25,1,.5,1]}}},XG=({displayAccount:e,children:t})=>{const r=YG(),n=oi(),{account:o}=Da(),i=!1;function a(){n.setOpen(!1)}function s(){n.setOpen(!0),n.setRoute(vn.CONNECTORS)}if(!t||!r)return null;const l=o?e(o):void 0;return L.jsx(L.Fragment,{children:t({show:s,hide:a,isConnected:!!o,isConnecting:i,address:l,truncatedAddress:l?C8(l):void 0})})};XG.displayName="AlephiumConnectButton.Custom";function k$e({label:e,displayAccount:t}){const{account:r}=Da();return L.jsx(Ko,{initial:!1,children:r?L.jsx(zw,{initial:"initial",animate:"animate",exit:"exit",variants:O$e,style:{height:40},children:L.jsx("div",{style:{position:"relative",paddingRight:0},children:L.jsx(Ko,{initial:!1,children:L.jsx(zw,{initial:"initial",animate:"animate",exit:"exit",variants:A$e,style:{position:"relative"},children:C8(t(r))},"ckTruncatedAddress")})})},"connectedText"):L.jsx(zw,{initial:"initial",animate:"animate",exit:"exit",variants:P$e,style:{height:40},children:e||"Connect Alephium"},"connectWalletText")})}function ZG({label:e,onClick:t,displayAccount:r}){const n=YG(),o=oi(),{account:i}=Da(),a=!!i;function s(){o.setOpen(!0),o.setRoute(a?vn.PROFILE:vn.CONNECTORS)}return n?L.jsx(O8,{$useTheme:o.theme,$useMode:o.mode,$customTheme:o.customTheme,children:L.jsx(S$e,{onClick:()=>{t?t(s):s()},children:L.jsx(C$e,{style:{overflow:"hidden"},children:L.jsx(k$e,{label:e,displayAccount:r??(l=>l.address)})})})}):null}ZG.Custom=XG;function A8(){const{account:e,signerProvider:t}=Da();return $.useMemo(()=>{if(e!==void 0&&t!==void 0)return{signer:t,account:e,nodeProvider:t.nodeProvider}},[t,e])}var I$e={};const $$e=0,T$e=[],D$e={networkId:$$e,nftCollections:T$e},M$e=1,R$e=[{id:"06544de23e447cff2c5d98d7f431a5b2c0f5b7a2ff69c7ef4ef5fcbf4a9de600"}],N$e={networkId:M$e,nftCollections:R$e},F$e=0,B$e=[{id:"c0c0af7a481e3e50c50e418bf8ff6923dc4d878ac3744474e8c708a8adccfb00",name:"Alf",symbol:"ALF",decimals:0,description:"Alf, first token deployed on the mainnet",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/ALF.png"},{id:"b2d71c116408ae47b931482a440f675dc9ea64453db24ee931dacd578cae9002",name:"ALPHpaca",symbol:"PACA",decimals:0,description:"Part Alpaca, part ecosystem, part coin and part meme. ALPHpaca is rapidly trying to expand it's uses across the Alephium ecosystem.",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/PACA.png"},{id:"b522184377a33e376e997a950288fa76c1f48e97bc29cd10779adc7cfb673200",name:"Berry",symbol:"BERRY",decimals:0,description:"Mr Berry's coin",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/BERRY.png"},{id:"1516c410b54470d667e1315ce2faa81870c76c5c7a491e3e86eeec8366495502",name:"Montycoin",symbol:"TAIL",decimals:0,description:"Montycoin is an incentivization token made for fun and immersion into MontaiL's DJ'ing career. With widely growing uses.",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/TAIL.png"},{id:"1a281053ba8601a658368594da034c2e99a0fb951b86498d05e76aedfe666800",name:"AYIN",symbol:"AYIN",decimals:18,description:"$AYIN is a DEX token, that incentivises users through fees and other mechanisms to participate in trading on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/AYIN.png"}],j$e=[],L$e={networkId:F$e,tokens:B$e,nftCollections:j$e},z$e=1,U$e=[{id:"bed35ce97166170f91a8cdb35948b8696aa67dbd573ee0c5cc572bb8c44ddb01",name:"Test BTC",symbol:"TBTC",decimals:8,description:"Testing BTC on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/TBTC.png"},{id:"4d765e05a5f08c39ab441c10fea45310cbd7b8c7bc7b4cd4e93d4531fdf2b601",name:"Test ETH",symbol:"TETH",decimals:18,description:"Testing ETH on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/TETH.png"},{id:"9a8cda8bc3423347b7fe2932ef7981ed67e8825dba3a5ee36011f578d1d70f00",name:"Wrapped Ether (Wormhole)",symbol:"WETH",decimals:18,description:"ETH Bridged to Alephium from Wormhole",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/WETH.png"},{id:"4db93c3e58ca4c3392b9d47be17b62fcbabccba61a7d7c1fa1c3baa40181f700",name:"Wrapped BNB (Wormhole)",symbol:"WBNB",decimals:18,description:"BNB Bridged to Alephium from Wormhole",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/WBNB.png"},{id:"92982a9d35b38ff1d0b43dec536631b523cdccde0cf2fc1d5c349790c59d2701",name:"Test DAI",symbol:"TDAI",decimals:18,description:"Testing DAI on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/TDAI.png"},{id:"416800f4e2a7326ef2c129d38e4db35de11cec2d4aff98972558ca2c6f976e01",name:"Test USDT",symbol:"TUSDT",decimals:6,description:"Testing USDT on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/TUSDT.png"},{id:"ecc6dd103bbb3cfad3ada8d6a22d73a599a9d39a43b81a734bc9784acc261b01",name:"Test USDC",symbol:"TUSDC",decimals:6,description:"Testing USDC on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/TUSDC.png"},{id:"f393e2366ee780141240e840aa32f26eade79559864d103b453f0d595425af00",name:"Fetatoken",symbol:"FETA",decimals:18,description:"DJ Fetamin fanclub token",logoURI:"https://raw.githubusercontent.com/alephium/tokens-meta/master/logos/FETA.png"}],H$e={networkId:z$e,tokens:U$e};var JG={};Object.defineProperty(JG,"__esModule",{value:!0});(function(e){var t=Le&&Le.__createBinding||(Object.create?function(l,c,u,f){f===void 0&&(f=u);var d=Object.getOwnPropertyDescriptor(c,u);(!d||("get"in d?!c.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return c[u]}}),Object.defineProperty(l,f,d)}:function(l,c,u,f){f===void 0&&(f=u),l[f]=c[u]}),r=Le&&Le.__exportStar||function(l,c){for(var u in l)u!=="default"&&!Object.prototype.hasOwnProperty.call(c,u)&&t(c,l,u)},n=Le&&Le.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.ALPH=e.testnetNFTCollectionsMetadata=e.mainnetNFTCollectionsMetadata=e.testnetTokensMetadata=e.mainnetTokensMetadata=void 0;const o=n(D$e),i=n(N$e),a=n(L$e),s=n(H$e);r(JG,e),e.mainnetTokensMetadata=a.default,e.testnetTokensMetadata=s.default,e.mainnetNFTCollectionsMetadata=o.default,e.testnetNFTCollectionsMetadata=i.default,e.default={mainnet:{tokens:e.mainnetTokensMetadata,nftCollections:e.mainnetNFTCollectionsMetadata},testnet:{tokens:e.testnetTokensMetadata,nftCollections:e.testnetNFTCollectionsMetadata}},e.ALPH={id:"".padStart(64,"0"),name:"Alephium",symbol:"ALPH",decimals:18}})(I$e);const V$e="https://wallet-v20.mainnet.alephium.org",W$e="https://wallet-v20.testnet.alephium.org",q$e="http://127.0.0.1:22973",G$e="https://backend-v113.mainnet.alephium.org",K$e="https://backend-v113.testnet.alephium.org",Y$e="http://127.0.0.1:9090",X$e="https://explorer.alephium.org",Z$e="https://testnet.alephium.org",J$e="http://localhost:23000",Q$e="alephium-network";function mh(){const[e,t]=vR({key:Q$e,defaultValue:"mainnet",getInitialValueInEffect:!1});return[e,t]}function yh(){const[e]=mh();return new At.NodeProvider(e==="mainnet"?V$e:e==="testnet"?W$e:q$e)}function eTe(){const[e]=mh();return new At.ExplorerProvider(e==="mainnet"?G$e:e==="testnet"?K$e:Y$e)}function tTe(){const[e]=mh();return e==="mainnet"?X$e:e==="testnet"?Z$e:J$e}const rTe=at(e=>({link:{display:"flex",alignItems:"center",height:"100%",paddingLeft:e.spacing.md,paddingRight:e.spacing.md,textDecoration:"none",color:e.colorScheme==="dark"?e.white:e.black,fontWeight:500,fontSize:e.fontSizes.sm,[e.fn.smallerThan("sm")]:{height:me(42),display:"flex",alignItems:"center",width:"100%"},...e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]})},subLink:{width:"100%",padding:`${e.spacing.xs} ${e.spacing.md}`,borderRadius:e.radius.md,...e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[0]}),"&:active":e.activeStyles},dropdownFooter:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[0],margin:`calc(${e.spacing.md} * -1)`,marginTop:e.spacing.sm,padding:`${e.spacing.md} calc(${e.spacing.md} * 2)`,paddingBottom:e.spacing.xl,borderTop:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}`},hiddenMobile:{[e.fn.smallerThan("sm")]:{display:"none"}},hiddenDesktop:{[e.fn.largerThan("sm")]:{display:"none"}}}));function nTe(){const[e,{toggle:t}]=yR(!1),{classes:r}=rTe(),[n,o]=mh();return L.jsx(mN,{height:60,px:"md",children:L.jsxs(Kt,{position:"apart",sx:{height:"100%"},children:[L.jsx(St,{component:RL,to:"/",fw:"bold",fz:"1.5rem",variant:"gradient",gradient:{from:"indigo",to:"cyan",deg:45},children:"Alephium Toolkit"}),L.jsxs(Kt,{className:r.hiddenMobile,children:[L.jsx(Tme,{}),L.jsxs(ho,{children:[L.jsx(ho.Target,{children:L.jsx(xr,{size:"md",w:"5.25rem",tt:"capitalize",radius:"md",compact:!0,variant:"outline",children:n})}),L.jsxs(ho.Dropdown,{children:[L.jsx(ho.Item,{onClick:()=>o("mainnet"),children:"Mainnet"}),L.jsx(ho.Item,{onClick:()=>o("testnet"),children:"Testnet"}),L.jsx(ho.Item,{onClick:()=>o("devnet"),children:"Devnet"})]})]}),L.jsx(ZG,{})]}),L.jsx(GF,{opened:e,onClick:t,className:r.hiddenDesktop})]})})}function tu({children:e,...t}){return L.jsx(rt,{mx:"auto",px:"lg",py:"lg",sx:r=>({backgroundColor:r.colorScheme==="dark"?r.colors.dark[7]:"white",borderRadius:r.radius.md,boxShadow:r.shadows.sm}),...t,children:e})}function oTe({caption:e}){const t=Lr();return L.jsx(St,{fw:"bold",c:t.colorScheme==="dark"?t.colors.gray[0]:t.colors.dark[8],children:e})}function xb({w:e,px:t,py:r,data:n,horizontalSpacing:o,verticalSpacing:i}){const a=Object.entries(n).map(([s,l])=>L.jsxs("tr",{children:[L.jsx("td",{width:"30%",children:L.jsx(oTe,{caption:s})}),L.jsx("td",{width:"70%",children:l})]},s));return L.jsx(tu,{w:e,mx:"auto",px:t??"lg",py:r??"lg",ta:"center",children:L.jsx(xL,{horizontalSpacing:o??"xs",verticalSpacing:i??"xl",fontSize:"md",withColumnBorders:!0,children:L.jsx("tbody",{children:a})})})}const iTe=at(e=>({root:{paddingTop:me(80),paddingBottom:me(120),backgroundColor:e.fn.variant({variant:"filled",color:e.primaryColor}).background},label:{textAlign:"center",fontWeight:900,fontSize:me(150),lineHeight:1,marginBottom:`calc(${e.spacing.xl} * 1.5)`,color:e.colors[e.primaryColor][3],[e.fn.smallerThan("sm")]:{fontSize:me(120)}},title:{fontFamily:`Greycliff CF, ${e.fontFamily}`,textAlign:"center",fontWeight:900,fontSize:me(38),color:e.white,[e.fn.smallerThan("sm")]:{fontSize:me(32)}},description:{maxWidth:me(540),margin:"auto",marginTop:e.spacing.xl,marginBottom:`calc(${e.spacing.xl} * 1.5)`,color:e.colors[e.primaryColor][1]}}));function aTe(){const{classes:e}=iTe();return L.jsx(rt,{maw:me("70%"),mx:"auto",mt:me("15%"),children:L.jsx("div",{className:e.root,children:L.jsxs(S_,{children:[L.jsx("div",{className:e.label,children:"No Wallet"}),L.jsx(T_,{className:e.title,children:"Please connect your wallet"})]})})})}function Os({value:e,color:t}){return L.jsx(vy,{value:e,timeout:1e3,children:({copied:r,copy:n})=>L.jsx(Yp.Floating,{label:r?"Copied":"Copy",position:"right",children:L.jsx(xr,{variant:"subtle",color:t,onClick:n,styles:{root:{height:"auto",padding:"0.5rem"},label:{whiteSpace:"normal",wordBreak:"break-all",lineHeight:"1.5rem"}},children:e})})})}function sTe(){const e=A8();if($.useEffect(()=>{console.log("===== useEffect")}),e===void 0)return L.jsx(aTe,{});const t=e.account;return L.jsx(hy,{mt:"10%",children:L.jsx(xb,{w:900,data:{"Network Type":L.jsx(St,{tt:"capitalize",children:t==null?void 0:t.network}),"Address Group":t==null?void 0:t.group,Address:L.jsx(Os,{value:(t==null?void 0:t.address)??"???"}),"Public Key":L.jsx(Os,{value:(t==null?void 0:t.publicKey)??"???"})}})})}const lTe=at(e=>({root:{paddingTop:"5rem",paddingBottom:me(120),backgroundColor:e.fn.variant({variant:"filled",color:e.primaryColor}).background},label:{textAlign:"center",fontWeight:900,fontSize:me(220),lineHeight:1,marginBottom:`calc(${e.spacing.xl} * 1.5)`,color:e.colors[e.primaryColor][3],[e.fn.smallerThan("sm")]:{fontSize:me(120)}},title:{fontFamily:`Greycliff CF, ${e.fontFamily}`,textAlign:"center",fontWeight:900,fontSize:me(38),color:e.white,[e.fn.smallerThan("sm")]:{fontSize:me(32)}},description:{maxWidth:me(540),margin:"auto",marginTop:e.spacing.xl,marginBottom:`calc(${e.spacing.xl} * 1.5)`,color:e.colors[e.primaryColor][1]}}));function Do(){const{classes:e}=lTe();return L.jsx(rt,{maw:me("70%"),mx:"auto",mt:me("15%"),children:L.jsx("div",{className:e.root,children:L.jsxs(S_,{children:[L.jsx("div",{className:e.label,children:"WIP"}),L.jsx(T_,{className:e.title,children:"We are working on it..."})]})})})}function p$({value:e,label:t}){return L.jsx(vy,{value:e,timeout:1e3,children:({copied:r,copy:n})=>L.jsx(Yp,{label:r?"Copied":"Copy",withArrow:!0,position:"right",color:"indigo",children:L.jsx(xr,{variant:"subtle",onClick:n,children:t??e})})})}function cTe(){const[e,t]=$.useState(""),[r,n]=$.useState(),o=yh(),i=$.useCallback(async a=>{if(t(a),a){const s=await o.fetchFungibleTokenMetaData(a),l=!1,c=At.addressFromTokenId(a);n({...s,verified:l,tokenId:a,tokenAddress:c})}else n(void 0)},[]);return L.jsx(hy,{h:me("80%"),children:L.jsxs(my,{children:[L.jsx(_s,{w:me("40rem"),mx:"auto",size:"md",value:e,onChange:a=>i(a.currentTarget.value),placeholder:"Search token address or token id",radius:"xl",withAsterisk:!0}),L.jsx(rt,{mt:"xl",w:me("55rem"),children:L.jsx(xb,{data:{Verified:`${r==null?void 0:r.verified}`,Name:`${r?At.hexToString(r.name):void 0}`,Symbol:`${r?At.hexToString(r.symbol):void 0}`,Decimals:`${r==null?void 0:r.decimals}`,"Total Supply":`${r?At.prettifyTokenAmount(r.totalSupply,r.decimals):void 0}`,"Token ID":r?L.jsx(p$,{value:`${r.tokenId}`}):"undefined","Token Address":r?L.jsx(p$,{value:`${r.tokenAddress}`}):"undefined"}})})]})})}var uTe=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;o--!==0;){var a=i[o];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r};const h$=ri(uTe);function Dx(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,r)=>{const n=e[r];return n!=null&&n!==!1&&(t[r]=n),t},{})}var fTe=Object.defineProperty,v$=Object.getOwnPropertySymbols,dTe=Object.prototype.hasOwnProperty,pTe=Object.prototype.propertyIsEnumerable,g$=(e,t,r)=>t in e?fTe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hTe=(e,t)=>{for(var r in t||(t={}))dTe.call(t,r)&&g$(e,r,t[r]);if(v$)for(var r of v$(t))pTe.call(t,r)&&g$(e,r,t[r]);return e};function QG(e,t){if(t===null||typeof t!="object")return{};const r=hTe({},t);return Object.keys(t).forEach(n=>{n.includes(`${String(e)}.`)&&delete r[n]}),r}const Fd="__MANTINE_FORM_INDEX__";function m$(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]/g,`.${Fd}`)):!1:!1}function y$(e,t,r){typeof r.value=="object"&&(r.value=Lc(r.value)),!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"?Object.defineProperty(e,t,r):e[t]=r.value}function Lc(e){if(typeof e!="object")return e;var t=0,r,n,o,i=Object.prototype.toString.call(e);if(i==="[object Object]"?o=Object.create(e.__proto__||null):i==="[object Array]"?o=Array(e.length):i==="[object Set]"?(o=new Set,e.forEach(function(a){o.add(Lc(a))})):i==="[object Map]"?(o=new Map,e.forEach(function(a,s){o.set(Lc(s),Lc(a))})):i==="[object Date]"?o=new Date(+e):i==="[object RegExp]"?o=new RegExp(e.source,e.flags):i==="[object DataView]"?o=new e.constructor(Lc(e.buffer)):i==="[object ArrayBuffer]"?o=e.slice(0):i.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(n=Object.getOwnPropertySymbols(e);t0,errors:t}}function Mx(e,t,r="",n={}){return typeof e!="object"||e===null?n:Object.keys(e).reduce((o,i)=>{const a=e[i],s=`${r===""?"":`${r}.`}${i}`,l=ia(s,t);let c=!1;return typeof a=="function"&&(o[s]=a(l,t,s)),typeof a=="object"&&Array.isArray(l)&&(c=!0,l.forEach((u,f)=>Mx(a,t,`${s}.${f}`,o))),typeof a=="object"&&typeof l=="object"&&l!==null&&(c||Mx(a,t,s,o)),o},n)}function Rx(e,t){return b$(typeof e=="function"?e(t):Mx(e,t))}function j0(e,t,r){if(typeof e!="string")return{hasError:!1,error:null};const n=Rx(t,r),o=Object.keys(n.errors).find(i=>e.split(".").every((a,s)=>a===i.split(".")[s]));return{hasError:!!o,error:o?n.errors[o]:null}}function vTe(e,{from:t,to:r},n){const o=ia(e,n);if(!Array.isArray(o))return n;const i=[...o],a=o[t];return i.splice(t,1),i.splice(r,0,a),_b(e,i,n)}var gTe=Object.defineProperty,w$=Object.getOwnPropertySymbols,mTe=Object.prototype.hasOwnProperty,yTe=Object.prototype.propertyIsEnumerable,x$=(e,t,r)=>t in e?gTe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bTe=(e,t)=>{for(var r in t||(t={}))mTe.call(t,r)&&x$(e,r,t[r]);if(w$)for(var r of w$(t))yTe.call(t,r)&&x$(e,r,t[r]);return e};function wTe(e,{from:t,to:r},n){const o=`${e}.${t}`,i=`${e}.${r}`,a=bTe({},n);return Object.keys(n).every(s=>{let l,c;if(s.startsWith(o)&&(l=s,c=s.replace(o,i)),s.startsWith(i)&&(l=s.replace(i,o),c=s),l&&c){const u=a[l],f=a[c];return f===void 0?delete a[l]:a[l]=f,u===void 0?delete a[c]:a[c]=u,!1}return!0}),a}function xTe(e,t,r){const n=ia(e,r);return Array.isArray(n)?_b(e,n.filter((o,i)=>i!==t),r):r}var _Te=Object.defineProperty,_$=Object.getOwnPropertySymbols,ETe=Object.prototype.hasOwnProperty,STe=Object.prototype.propertyIsEnumerable,E$=(e,t,r)=>t in e?_Te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,CTe=(e,t)=>{for(var r in t||(t={}))ETe.call(t,r)&&E$(e,r,t[r]);if(_$)for(var r of _$(t))STe.call(t,r)&&E$(e,r,t[r]);return e};function S$(e,t){const r=e.substring(t.length+1).split(".")[0];return parseInt(r,10)}function C$(e,t,r,n){if(t===void 0)return r;const o=`${String(e)}`;let i=r;n===-1&&(i=QG(`${o}.${t}`,i));const a=CTe({},i),s=new Set;return Object.entries(i).filter(([l])=>{if(!l.startsWith(`${o}.`))return!1;const c=S$(l,o);return Number.isNaN(c)?!1:c>=t}).forEach(([l,c])=>{const u=S$(l,o),f=l.replace(`${o}.${u}`,`${o}.${u+n}`);a[f]=c,s.add(f),s.has(l)||delete a[l]}),a}function PTe(e,t,r,n){const o=ia(e,n);if(!Array.isArray(o))return n;const i=[...o];return i.splice(typeof r=="number"?r:i.length,0,t),_b(e,i,n)}function P$(e,t){const r=Object.keys(e);if(typeof t=="string"){const n=r.filter(o=>o.startsWith(`${t}.`));return e[t]||n.some(o=>e[o])||!1}return r.some(n=>e[n])}function OTe(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){const{currentTarget:r}=t;r instanceof HTMLInputElement?r.type==="checkbox"?e(r.checked):e(r.value):(r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)&&e(r.value)}else e(t)}}var ATe=Object.defineProperty,kTe=Object.defineProperties,ITe=Object.getOwnPropertyDescriptors,O$=Object.getOwnPropertySymbols,$Te=Object.prototype.hasOwnProperty,TTe=Object.prototype.propertyIsEnumerable,A$=(e,t,r)=>t in e?ATe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Va=(e,t)=>{for(var r in t||(t={}))$Te.call(t,r)&&A$(e,r,t[r]);if(O$)for(var r of O$(t))TTe.call(t,r)&&A$(e,r,t[r]);return e},Uw=(e,t)=>kTe(e,ITe(t));function tK({initialValues:e={},initialErrors:t={},initialDirty:r={},initialTouched:n={},clearInputErrorOnChange:o=!0,validateInputOnChange:i=!1,validateInputOnBlur:a=!1,transformValues:s=c=>c,validate:l}={}){const[c,u]=$.useState(n),[f,d]=$.useState(r),[p,h]=$.useState(e),[m,_]=$.useState(Dx(t)),w=$.useRef(e),y=te=>{w.current=te},C=$.useCallback(()=>u({}),[]),I=te=>{const ne=te?Va(Va({},p),te):p;y(ne),d({})},F=$.useCallback(te=>_(ne=>Dx(typeof te=="function"?te(ne):te)),[]),O=$.useCallback(()=>_({}),[]),g=$.useCallback(()=>{h(e),O(),y(e),d({}),C()},[]),D=$.useCallback((te,ne)=>F(ce=>Uw(Va({},ce),{[te]:ne})),[]),H=$.useCallback(te=>F(ne=>{if(typeof te!="string")return ne;const ce=Va({},ne);return delete ce[te],ce}),[]),G=$.useCallback(te=>d(ne=>{if(typeof te!="string")return ne;const ce=QG(te,ne);return delete ce[te],ce}),[]),V=$.useCallback((te,ne)=>{const ce=m$(te,i);G(te),u(ie=>Uw(Va({},ie),{[te]:!0})),h(ie=>{const ue=_b(te,ne,ie);if(ce){const A=j0(te,l,ue);A.hasError?D(te,A.error):H(te)}return ue}),!ce&&o&&D(te,null)},[]),P=$.useCallback(te=>{h(ne=>{const ce=typeof te=="function"?te(ne):te;return Va(Va({},ne),ce)}),o&&O()},[]),S=$.useCallback((te,ne)=>{G(te),h(ce=>vTe(te,ne,ce)),_(ce=>wTe(te,ne,ce))},[]),v=$.useCallback((te,ne)=>{G(te),h(ce=>xTe(te,ne,ce)),_(ce=>C$(te,ne,ce,-1))},[]),b=$.useCallback((te,ne,ce)=>{G(te),h(ie=>PTe(te,ne,ce,ie)),_(ie=>C$(te,ce,ie,1))},[]),B=$.useCallback(()=>{const te=Rx(l,p);return _(te.errors),te},[p,l]),M=$.useCallback(te=>{const ne=j0(te,l,p);return ne.hasError?D(te,ne.error):H(te),ne},[p,l]),j=(te,{type:ne="input",withError:ce=!0,withFocus:ie=!0}={})=>{const A={onChange:OTe(K=>V(te,K))};return ce&&(A.error=m[te]),ne==="checkbox"?A.checked=ia(te,p):A.value=ia(te,p),ie&&(A.onFocus=()=>u(K=>Uw(Va({},K),{[te]:!0})),A.onBlur=()=>{if(m$(te,a)){const K=j0(te,l,p);K.hasError?D(te,K.error):H(te)}}),A},U=(te,ne)=>ce=>{ce==null||ce.preventDefault();const ie=B();ie.hasErrors?ne==null||ne(ie.errors,p,ce):te==null||te(s(p),ce)},E=te=>s(te||p),N=$.useCallback(te=>{te.preventDefault(),g()},[]),T=te=>{if(te){const ce=ia(te,f);if(typeof ce=="boolean")return ce;const ie=ia(te,p),ue=ia(te,w.current);return!h$(ie,ue)}return Object.keys(f).length>0?P$(f):!h$(p,w.current)},q=$.useCallback(te=>P$(c,te),[c]),J=$.useCallback(te=>te?!j0(te,l,p).hasError:!Rx(l,p).hasErrors,[p,l]);return{values:p,errors:m,setValues:P,setErrors:F,setFieldValue:V,setFieldError:D,clearFieldError:H,clearErrors:O,reset:g,validate:B,validateField:M,reorderListItem:S,removeListItem:v,insertListItem:b,getInputProps:j,onSubmit:U,onReset:N,isDirty:T,isTouched:q,setTouched:u,setDirty:d,resetTouched:C,resetDirty:I,isValid:J,getTransformedValues:E}}function Nx(e,t){return Nx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Nx(e,t)}function rK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Nx(e,t)}function Op(e){"@babel/helpers - typeof";return Op=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},Op(e)}function DTe(e,t){if(Op(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Op(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MTe(e){var t=DTe(e,"string");return Op(t)==="symbol"?t:String(t)}function RTe(e,t,r){return t=MTe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function I$(e){for(var t=1;t"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(_n(1));return r(nK)(e,t)}if(typeof e!="function")throw new Error(_n(2));var o=e,i=t,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function u(){if(l)throw new Error(_n(3));return i}function f(m){if(typeof m!="function")throw new Error(_n(4));if(l)throw new Error(_n(5));var _=!0;return c(),s.push(m),function(){if(_){if(l)throw new Error(_n(6));_=!1,c();var y=s.indexOf(m);s.splice(y,1),a=null}}}function d(m){if(!NTe(m))throw new Error(_n(7));if(typeof m.type>"u")throw new Error(_n(8));if(l)throw new Error(_n(9));try{l=!0,i=o(i,m)}finally{l=!1}for(var _=a=s,w=0;w<_.length;w++){var y=_[w];y()}return m}function p(m){if(typeof m!="function")throw new Error(_n(10));o=m,d({type:T$.REPLACE})}function h(){var m,_=f;return m={subscribe:function(y){if(typeof y!="object"||y===null)throw new Error(_n(11));function C(){y.next&&y.next(u())}C();var I=_(C);return{unsubscribe:I}}},m[$$]=function(){return this},m}return d({type:T$.INIT}),n={dispatch:d,subscribe:f,getState:u,replaceReducer:p},n[$$]=h,n}function D$(e,t){return function(){return t(e.apply(this,arguments))}}function M$(e,t){if(typeof e=="function")return D$(e,t);if(typeof e!="object"||e===null)throw new Error(_n(16));var r={};for(var n in e){var o=e[n];typeof o=="function"&&(r[n]=D$(o,t))}return r}function oK(){for(var e=arguments.length,t=new Array(e),r=0;r=0;n--){var o=t[n](e);if(o)return o}return function(i,a){throw new Error("Invalid value of type "+typeof e+" for "+r+" argument when connecting component "+a.wrappedComponentName+".")}}function ODe(e,t){return e===t}function ADe(e){var t=e===void 0?{}:e,r=t.connectHOC,n=r===void 0?lDe:r,o=t.mapStateToPropsFactories,i=o===void 0?gDe:o,a=t.mapDispatchToPropsFactories,s=a===void 0?pDe:a,l=t.mergePropsFactories,c=l===void 0?xDe:l,u=t.selectorFactory,f=u===void 0?CDe:u;return function(p,h,m,_){_===void 0&&(_={});var w=_,y=w.pure,C=y===void 0?!0:y,I=w.areStatesEqual,F=I===void 0?ODe:I,O=w.areOwnPropsEqual,g=O===void 0?Vw:O,D=w.areStatePropsEqual,H=D===void 0?Vw:D,G=w.areMergedPropsEqual,V=G===void 0?Vw:G,P=lp(w,PDe),S=Ww(p,i,"mapStateToProps"),v=Ww(h,s,"mapDispatchToProps"),b=Ww(m,c,"mergeProps");return n(f,Ze({methodName:"connect",getDisplayName:function(M){return"Connect("+M+")"},shouldHandleStateChanges:!!p,initMapStateToProps:S,initMapDispatchToProps:v,initMergeProps:b,pure:C,areStatesEqual:F,areOwnPropsEqual:g,areStatePropsEqual:H,areMergedPropsEqual:V},P))}}const gK=ADe();jTe(Us.unstable_batchedUpdates);function kDe(e,t){if(e.length!==t.length)return!1;for(var r=0;r");return n.callbacks},n.setCallbacks=function(s){n.callbacks=s},n}var r=t.prototype;return r.componentDidMount=function(){this.unbind=go(window,[{eventName:"error",fn:this.onWindowError}])},r.componentDidCatch=function(o){if(o instanceof Cm){this.setState({});return}throw o},r.componentWillUnmount=function(){this.unbind()},r.render=function(){return this.props.children(this.setCallbacks)},t}(ae.Component),zDe=` + Press space bar to start a drag. + When dragging you can use the arrow keys to move the item around and escape to cancel. + Some screen readers may require you to be in focus mode or to use your pass through key +`,Pm=function(t){return t+1},UDe=function(t){return` + You have lifted an item in position `+Pm(t.source.index)+` +`},xK=function(t,r){var n=t.droppableId===r.droppableId,o=Pm(t.index),i=Pm(r.index);return n?` + You have moved the item from position `+o+` + to position `+i+` + `:` + You have moved the item from position `+o+` + in list `+t.droppableId+` + to list `+r.droppableId+` + in position `+i+` + `},_K=function(t,r,n){var o=r.droppableId===n.droppableId;return o?` + The item `+t+` + has been combined with `+n.draggableId:` + The item `+t+` + in list `+r.droppableId+` + has been combined with `+n.draggableId+` + in list `+n.droppableId+` + `},HDe=function(t){var r=t.destination;if(r)return xK(t.source,r);var n=t.combine;return n?_K(t.draggableId,t.source,n):"You are over an area that cannot be dropped on"},z$=function(t){return` + The item has returned to its starting position + of `+Pm(t.index)+` +`},VDe=function(t){if(t.reason==="CANCEL")return` + Movement cancelled. + `+z$(t.source)+` + `;var r=t.destination,n=t.combine;return r?` + You have dropped the item. + `+xK(t.source,r)+` + `:n?` + You have dropped the item. + `+_K(t.draggableId,t.source,n)+` + `:` + The item has been dropped while not over a drop area. + `+z$(t.source)+` + `},_1={dragHandleUsageInstructions:zDe,onDragStart:UDe,onDragUpdate:HDe,onDragEnd:VDe},Or={x:0,y:0},Fr=function(t,r){return{x:t.x+r.x,y:t.y+r.y}},zn=function(t,r){return{x:t.x-r.x,y:t.y-r.y}},ks=function(t,r){return t.x===r.x&&t.y===r.y},of=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},Bl=function(t,r,n){var o;return n===void 0&&(n=0),o={},o[t]=r,o[t==="x"?"y":"x"]=n,o},kp=function(t,r){return Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))},U$=function(t,r){return Math.min.apply(Math,r.map(function(n){return kp(t,n)}))},EK=function(t){return function(r){return{x:t(r.x),y:t(r.y)}}},WDe=function(e,t){var r=Ho({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return r.width<=0||r.height<=0?null:r},Ah=function(t,r){return{top:t.top+r.y,left:t.left+r.x,bottom:t.bottom+r.y,right:t.right+r.x}},H$=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},qDe={top:0,right:0,bottom:0,left:0},GDe=function(t,r){return r?Ah(t,r.scroll.diff.displacement):t},KDe=function(t,r,n){if(n&&n.increasedBy){var o;return Ze({},t,(o={},o[r.end]=t[r.end]+n.increasedBy[r.line],o))}return t},YDe=function(t,r){return r&&r.shouldClipSubject?WDe(r.pageMarginBox,t):Ho(t)},$u=function(e){var t=e.page,r=e.withPlaceholder,n=e.axis,o=e.frame,i=GDe(t.marginBox,o),a=KDe(i,n,r),s=YDe(a,o);return{page:t,withPlaceholder:r,active:s}},D8=function(e,t){e.frame||Ge(!1);var r=e.frame,n=zn(t,r.scroll.initial),o=of(n),i=Ze({},r,{scroll:{initial:r.scroll.initial,current:t,diff:{value:n,displacement:o},max:r.scroll.max}}),a=$u({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i}),s=Ze({},e,{frame:i,subject:a});return s};function Om(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function M8(e,t){if(e.findIndex)return e.findIndex(t);for(var r=0;re.bottom,c=n.lefte.right,u=l&&c;if(u)return!0;var f=l&&a||c&&i;return f}},QDe=function(e){var t=yo(e.top,e.bottom),r=yo(e.left,e.right);return function(n){var o=t(n.top)&&t(n.bottom)&&r(n.left)&&r(n.right);return o}},N8={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},kK={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},eMe=function(e){return function(t){var r=yo(t.top,t.bottom),n=yo(t.left,t.right);return function(o){return e===N8?r(o.top)&&r(o.bottom):n(o.left)&&n(o.right)}}},tMe=function(t,r){var n=r.frame?r.frame.scroll.diff.displacement:Or;return Ah(t,n)},rMe=function(t,r,n){return r.subject.active?n(r.subject.active)(t):!1},nMe=function(t,r,n){return n(r)(t)},F8=function(t){var r=t.target,n=t.destination,o=t.viewport,i=t.withDroppableDisplacement,a=t.isVisibleThroughFrameFn,s=i?tMe(r,n):r;return rMe(s,n,a)&&nMe(s,o,a)},oMe=function(t){return F8(Ze({},t,{isVisibleThroughFrameFn:AK}))},IK=function(t){return F8(Ze({},t,{isVisibleThroughFrameFn:QDe}))},iMe=function(t){return F8(Ze({},t,{isVisibleThroughFrameFn:eMe(t.destination.axis)}))},aMe=function(t,r,n){if(typeof n=="boolean")return n;if(!r)return!0;var o=r.invisible,i=r.visible;if(o[t])return!1;var a=i[t];return a?a.shouldAnimate:!0};function sMe(e,t){var r=e.page.marginBox,n={top:t.point.y,right:0,bottom:0,left:t.point.x};return Ho($8(r,n))}function $p(e){var t=e.afterDragging,r=e.destination,n=e.displacedBy,o=e.viewport,i=e.forceShouldAnimate,a=e.last;return t.reduce(function(l,c){var u=sMe(c,n),f=c.descriptor.id;l.all.push(f);var d=oMe({target:u,destination:r,viewport:o,withDroppableDisplacement:!0});if(!d)return l.invisible[c.descriptor.id]=!0,l;var p=aMe(f,a,i),h={draggableId:f,shouldAnimate:p};return l.visible[f]=h,l},{all:[],visible:{},invisible:{}})}function lMe(e,t){if(!e.length)return 0;var r=e[e.length-1].descriptor.index;return t.inHomeList?r:r+1}function V$(e){var t=e.insideDestination,r=e.inHomeList,n=e.displacedBy,o=e.destination,i=lMe(t,{inHomeList:r});return{displaced:Ip,displacedBy:n,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:i}}}}function Am(e){var t=e.draggable,r=e.insideDestination,n=e.destination,o=e.viewport,i=e.displacedBy,a=e.last,s=e.index,l=e.forceShouldAnimate,c=sf(t,n);if(s==null)return V$({insideDestination:r,inHomeList:c,displacedBy:i,destination:n});var u=Zs(r,function(m){return m.descriptor.index===s});if(!u)return V$({insideDestination:r,inHomeList:c,displacedBy:i,destination:n});var f=Ob(t,r),d=r.indexOf(u),p=f.slice(d),h=$p({afterDragging:p,destination:n,displacedBy:i,last:a,viewport:o.frame,forceShouldAnimate:l});return{displaced:h,displacedBy:i,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:s}}}}function Bs(e,t){return!!t.effected[e]}var cMe=function(e){var t=e.isMovingForward,r=e.destination,n=e.draggables,o=e.combine,i=e.afterCritical;if(!r.isCombineEnabled)return null;var a=o.draggableId,s=n[a],l=s.descriptor.index,c=Bs(a,i);return c?t?l:l-1:t?l+1:l},uMe=function(e){var t=e.isMovingForward,r=e.isInHomeList,n=e.insideDestination,o=e.location;if(!n.length)return null;var i=o.index,a=t?i+1:i-1,s=n[0].descriptor.index,l=n[n.length-1].descriptor.index,c=r?l:l+1;return ac?null:a},fMe=function(e){var t=e.isMovingForward,r=e.isInHomeList,n=e.draggable,o=e.draggables,i=e.destination,a=e.insideDestination,s=e.previousImpact,l=e.viewport,c=e.afterCritical,u=s.at;if(u||Ge(!1),u.type==="REORDER"){var f=uMe({isMovingForward:t,isInHomeList:r,location:u.destination,insideDestination:a});return f==null?null:Am({draggable:n,insideDestination:a,destination:i,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:f})}var d=cMe({isMovingForward:t,destination:i,displaced:s.displaced,draggables:o,combine:u.combine,afterCritical:c});return d==null?null:Am({draggable:n,insideDestination:a,destination:i,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:d})},dMe=function(e){var t=e.displaced,r=e.afterCritical,n=e.combineWith,o=e.displacedBy,i=!!(t.visible[n]||t.invisible[n]);return Bs(n,r)?i?Or:of(o.point):i?o.point:Or},pMe=function(e){var t=e.afterCritical,r=e.impact,n=e.draggables,o=Pb(r);o||Ge(!1);var i=o.draggableId,a=n[i].page.borderBox.center,s=dMe({displaced:r.displaced,afterCritical:t,combineWith:i,displacedBy:r.displacedBy});return Fr(a,s)},$K=function(t,r){return r.margin[t.start]+r.borderBox[t.size]/2},hMe=function(t,r){return r.margin[t.end]+r.borderBox[t.size]/2},B8=function(t,r,n){return r[t.crossAxisStart]+n.margin[t.crossAxisStart]+n.borderBox[t.crossAxisSize]/2},W$=function(t){var r=t.axis,n=t.moveRelativeTo,o=t.isMoving;return Bl(r.line,n.marginBox[r.end]+$K(r,o),B8(r,n.marginBox,o))},q$=function(t){var r=t.axis,n=t.moveRelativeTo,o=t.isMoving;return Bl(r.line,n.marginBox[r.start]-hMe(r,o),B8(r,n.marginBox,o))},vMe=function(t){var r=t.axis,n=t.moveInto,o=t.isMoving;return Bl(r.line,n.contentBox[r.start]+$K(r,o),B8(r,n.contentBox,o))},gMe=function(e){var t=e.impact,r=e.draggable,n=e.draggables,o=e.droppable,i=e.afterCritical,a=af(o.descriptor.id,n),s=r.page,l=o.axis;if(!a.length)return vMe({axis:l,moveInto:o.page,isMoving:s});var c=t.displaced,u=t.displacedBy,f=c.all[0];if(f){var d=n[f];if(Bs(f,i))return q$({axis:l,moveRelativeTo:d.page,isMoving:s});var p=Em(d.page,u.point);return q$({axis:l,moveRelativeTo:p,isMoving:s})}var h=a[a.length-1];if(h.descriptor.id===r.descriptor.id)return s.borderBox.center;if(Bs(h.descriptor.id,i)){var m=Em(h.page,of(i.displacedBy.point));return W$({axis:l,moveRelativeTo:m,isMoving:s})}return W$({axis:l,moveRelativeTo:h.page,isMoving:s})},Fx=function(e,t){var r=e.frame;return r?Fr(t,r.scroll.diff.displacement):t},mMe=function(t){var r=t.impact,n=t.draggable,o=t.droppable,i=t.draggables,a=t.afterCritical,s=n.page.borderBox.center,l=r.at;return!o||!l?s:l.type==="REORDER"?gMe({impact:r,draggable:n,draggables:i,droppable:o,afterCritical:a}):pMe({impact:r,draggables:i,afterCritical:a})},Ab=function(e){var t=mMe(e),r=e.droppable,n=r?Fx(r,t):t;return n},TK=function(e,t){var r=zn(t,e.scroll.initial),n=of(r),o=Ho({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),i={frame:o,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:r,displacement:n}}};return i};function G$(e,t){return e.map(function(r){return t[r]})}function yMe(e,t){for(var r=0;r1?u.sort(function(f,d){return cn(f)[s.start]-cn(d)[s.start]})[0]:c.sort(function(f,d){var p=U$(r,H$(cn(f))),h=U$(r,H$(cn(d)));return p!==h?p-h:cn(f)[s.start]-cn(d)[s.start]})[0]},K$=function(t,r){var n=t.page.borderBox.center;return Bs(t.descriptor.id,r)?zn(n,r.displacedBy.point):n},EMe=function(t,r){var n=t.page.borderBox;return Bs(t.descriptor.id,r)?Ah(n,of(r.displacedBy.point)):n},SMe=function(e){var t=e.pageBorderBoxCenter,r=e.viewport,n=e.destination,o=e.insideDestination,i=e.afterCritical,a=o.filter(function(s){return IK({target:EMe(s,i),destination:n,viewport:r.frame,withDroppableDisplacement:!0})}).sort(function(s,l){var c=kp(t,Fx(n,K$(s,i))),u=kp(t,Fx(n,K$(l,i)));return ct.left&&e.topt.top}function TMe(e){var t=e.pageBorderBox,r=e.draggable,n=e.candidates,o=r.page.borderBox.center,i=n.map(function(a){var s=a.axis,l=Bl(a.axis.line,t.center[s.line],a.page.borderBox.center[s.crossAxisLine]);return{id:a.descriptor.id,distance:kp(o,l)}}).sort(function(a,s){return s.distance-a.distance});return i[0]?i[0].id:null}function DMe(e){var t=e.pageBorderBox,r=e.draggable,n=e.droppables,o=Cb(n).filter(function(i){if(!i.isEnabled)return!1;var a=i.subject.active;if(!a||!$Me(t,a))return!1;if(NK(a)(t.center))return!0;var s=i.axis,l=a.center[s.crossAxisLine],c=t[s.crossAxisStart],u=t[s.crossAxisEnd],f=yo(a[s.crossAxisStart],a[s.crossAxisEnd]),d=f(c),p=f(u);return!d&&!p?!0:d?cl});return o.length?o.length===1?o[0].descriptor.id:TMe({pageBorderBox:t,draggable:r,candidates:o}):null}var FK=function(t,r){return Ho(Ah(t,r))},MMe=function(e,t){var r=e.frame;return r?FK(t,r.scroll.diff.value):t};function BK(e){var t=e.displaced,r=e.id;return!!(t.visible[r]||t.invisible[r])}function RMe(e){var t=e.draggable,r=e.closest,n=e.inHomeList;return r?n&&r.descriptor.index>t.descriptor.index?r.descriptor.index-1:r.descriptor.index:null}var NMe=function(e){var t=e.pageBorderBoxWithDroppableScroll,r=e.draggable,n=e.destination,o=e.insideDestination,i=e.last,a=e.viewport,s=e.afterCritical,l=n.axis,c=kh(n.axis,r.displaceBy),u=c.value,f=t[l.start],d=t[l.end],p=Ob(r,o),h=Zs(p,function(_){var w=_.descriptor.id,y=_.page.borderBox.center[l.line],C=Bs(w,s),I=BK({displaced:i,id:w});return C?I?d<=y:fw[s.start]+C&&fw[s.start]-c+C&&uw[s.start]+c+C&&fw[s.start]+C&&u=Z$)return GK;var i=o/Z$,a=Lx+pRe*i,s=n==="CANCEL"?a*hRe:a;return Number(s.toFixed(2))},gRe=function(e){var t=e.impact,r=e.draggable,n=e.dimensions,o=e.viewport,i=e.afterCritical,a=n.draggables,s=n.droppables,l=Wn(t),c=l?s[l]:null,u=s[r.descriptor.droppableId],f=zK({impact:t,draggable:r,draggables:a,afterCritical:i,droppable:c||u,viewport:o}),d=zn(f,r.client.borderBox.center);return d},mRe=function(e){var t=e.draggables,r=e.reason,n=e.lastImpact,o=e.home,i=e.viewport,a=e.onLiftImpact;if(!n.at||r!=="DROP"){var s=LK({draggables:t,impact:a,destination:o,viewport:i,forceShouldAnimate:!0});return{impact:s,didDropInsideDroppable:!1}}if(n.at.type==="REORDER")return{impact:n,didDropInsideDroppable:!0};var l=Ze({},n,{displaced:Ip});return{impact:l,didDropInsideDroppable:!0}},yRe=function(e){var t=e.getState,r=e.dispatch;return function(n){return function(o){if(o.type!=="DROP"){n(o);return}var i=t(),a=o.payload.reason;if(i.phase==="COLLECTING"){r(uRe({reason:a}));return}if(i.phase!=="IDLE"){var s=i.phase==="DROP_PENDING"&&i.isWaiting;s&&Ge(!1),i.phase==="DRAGGING"||i.phase==="DROP_PENDING"||Ge(!1);var l=i.critical,c=i.dimensions,u=c.draggables[i.critical.draggable.id],f=mRe({reason:a,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),d=f.impact,p=f.didDropInsideDroppable,h=p?R8(d):null,m=p?Pb(d):null,_={index:l.draggable.index,droppableId:l.droppable.id},w={draggableId:u.descriptor.id,type:u.descriptor.type,source:_,reason:a,mode:i.movementMode,destination:h,combine:m},y=gRe({impact:d,draggable:u,dimensions:c,viewport:i.viewport,afterCritical:i.afterCritical}),C={critical:i.critical,afterCritical:i.afterCritical,result:w,impact:d},I=!ks(i.current.client.offset,y)||!!w.combine;if(!I){r(U8({completed:C}));return}var F=vRe({current:i.current.client.offset,destination:y,reason:a}),O={newHomeClientOffset:y,dropDuration:F,completed:C};r(cRe(O))}}}},KK=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function bRe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(r){r.target!==window&&r.target!==window.document||e()}}}function wRe(e){var t=e.onWindowScroll;function r(){t(KK())}var n=Ap(r),o=bRe(n),i=As;function a(){return i!==As}function s(){a()&&Ge(!1),i=go(window,[o])}function l(){a()||Ge(!1),n.cancel(),i(),i=As}return{start:s,stop:l,isActive:a}}var xRe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},_Re=function(e){var t=wRe({onWindowScroll:function(n){e.dispatch(nRe({newScroll:n}))}});return function(r){return function(n){!t.isActive()&&n.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&xRe(n)&&t.stop(),r(n)}}},ERe=function(e){var t=!1,r=!1,n=setTimeout(function(){r=!0}),o=function(a){t||r||(t=!0,e(a),clearTimeout(n))};return o.wasCalled=function(){return t},o},SRe=function(){var e=[],t=function(i){var a=M8(e,function(c){return c.timerId===i});a===-1&&Ge(!1);var s=e.splice(a,1),l=s[0];l.callback()},r=function(i){var a=setTimeout(function(){return t(a)}),s={timerId:a,callback:i};e.push(s)},n=function(){if(e.length){var i=[].concat(e);e.length=0,i.forEach(function(a){clearTimeout(a.timerId),a.callback()})}};return{add:r,flush:n}},CRe=function(t,r){return t==null&&r==null?!0:t==null||r==null?!1:t.droppableId===r.droppableId&&t.index===r.index},PRe=function(t,r){return t==null&&r==null?!0:t==null||r==null?!1:t.draggableId===r.draggableId&&t.droppableId===r.droppableId},ORe=function(t,r){if(t===r)return!0;var n=t.draggable.id===r.draggable.id&&t.draggable.droppableId===r.draggable.droppableId&&t.draggable.type===r.draggable.type&&t.draggable.index===r.draggable.index,o=t.droppable.id===r.droppable.id&&t.droppable.type===r.droppable.type;return n&&o},Zf=function(t,r){r()},L0=function(t,r){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:r}},Xw=function(t,r,n,o){if(!t){n(o(r));return}var i=ERe(n),a={announce:i};t(r,a),i.wasCalled()||n(o(r))},ARe=function(e,t){var r=SRe(),n=null,o=function(d,p){n&&Ge(!1),Zf("onBeforeCapture",function(){var h=e().onBeforeCapture;if(h){var m={draggableId:d,mode:p};h(m)}})},i=function(d,p){n&&Ge(!1),Zf("onBeforeDragStart",function(){var h=e().onBeforeDragStart;h&&h(L0(d,p))})},a=function(d,p){n&&Ge(!1);var h=L0(d,p);n={mode:p,lastCritical:d,lastLocation:h.source,lastCombine:null},r.add(function(){Zf("onDragStart",function(){return Xw(e().onDragStart,h,t,_1.onDragStart)})})},s=function(d,p){var h=R8(p),m=Pb(p);n||Ge(!1);var _=!ORe(d,n.lastCritical);_&&(n.lastCritical=d);var w=!CRe(n.lastLocation,h);w&&(n.lastLocation=h);var y=!PRe(n.lastCombine,m);if(y&&(n.lastCombine=m),!(!_&&!w&&!y)){var C=Ze({},L0(d,n.mode),{combine:m,destination:h});r.add(function(){Zf("onDragUpdate",function(){return Xw(e().onDragUpdate,C,t,_1.onDragUpdate)})})}},l=function(){n||Ge(!1),r.flush()},c=function(d){n||Ge(!1),n=null,Zf("onDragEnd",function(){return Xw(e().onDragEnd,d,t,_1.onDragEnd)})},u=function(){if(n){var d=Ze({},L0(n.lastCritical,n.mode),{combine:null,destination:null,reason:"CANCEL"});c(d)}};return{beforeCapture:o,beforeStart:i,start:a,update:s,flush:l,drop:c,abort:u}},kRe=function(e,t){var r=ARe(e,t);return function(n){return function(o){return function(i){if(i.type==="BEFORE_INITIAL_CAPTURE"){r.beforeCapture(i.payload.draggableId,i.payload.movementMode);return}if(i.type==="INITIAL_PUBLISH"){var a=i.payload.critical;r.beforeStart(a,i.payload.movementMode),o(i),r.start(a,i.payload.movementMode);return}if(i.type==="DROP_COMPLETE"){var s=i.payload.completed.result;r.flush(),o(i),r.drop(s);return}if(o(i),i.type==="FLUSH"){r.abort();return}var l=n.getState();l.phase==="DRAGGING"&&r.update(l.critical,l.impact)}}}},IRe=function(e){return function(t){return function(r){if(r.type!=="DROP_ANIMATION_FINISHED"){t(r);return}var n=e.getState();n.phase!=="DROP_ANIMATING"&&Ge(!1),e.dispatch(U8({completed:n.completed}))}}},$Re=function(e){var t=null,r=null;function n(){r&&(cancelAnimationFrame(r),r=null),t&&(t(),t=null)}return function(o){return function(i){if((i.type==="FLUSH"||i.type==="DROP_COMPLETE"||i.type==="DROP_ANIMATION_FINISHED")&&n(),o(i),i.type==="DROP_ANIMATE"){var a={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var l=e.getState();l.phase==="DROP_ANIMATING"&&e.dispatch(qK())}};r=requestAnimationFrame(function(){r=null,t=go(window,[a])})}}}},TRe=function(e){return function(){return function(t){return function(r){(r.type==="DROP_COMPLETE"||r.type==="FLUSH"||r.type==="DROP_ANIMATE")&&e.stopPublishing(),t(r)}}}},DRe=function(e){var t=!1;return function(){return function(r){return function(n){if(n.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(n.payload.critical.draggable.id),r(n),e.tryRestoreFocusRecorded();return}if(r(n),!!t){if(n.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(n.type==="DROP_COMPLETE"){t=!1;var o=n.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},MRe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},RRe=function(e){return function(t){return function(r){return function(n){if(MRe(n)){e.stop(),r(n);return}if(n.type==="INITIAL_PUBLISH"){r(n);var o=t.getState();o.phase!=="DRAGGING"&&Ge(!1),e.start(o);return}r(n),e.scroll(t.getState())}}}},NRe=function(e){return function(t){return function(r){if(t(r),r.type==="PUBLISH_WHILE_DRAGGING"){var n=e.getState();n.phase==="DROP_PENDING"&&(n.isWaiting||e.dispatch(WK({reason:n.reason})))}}}},FRe=oK,BRe=function(e){var t=e.dimensionMarshal,r=e.focusMarshal,n=e.styleMarshal,o=e.getResponders,i=e.announce,a=e.autoScroller;return nK(KMe,FRe(FTe(dRe(n),TRe(t),fRe(t),yRe,IRe,$Re,NRe,RRe(a),_Re,DRe(r),kRe(o,i))))},Zw=function(){return{additions:{},removals:{},modified:{}}};function jRe(e){var t=e.registry,r=e.callbacks,n=Zw(),o=null,i=function(){o||(r.collectionStarting(),o=requestAnimationFrame(function(){o=null;var u=n,f=u.additions,d=u.removals,p=u.modified,h=Object.keys(f).map(function(w){return t.draggable.getById(w).getDimension(Or)}).sort(function(w,y){return w.descriptor.index-y.descriptor.index}),m=Object.keys(p).map(function(w){var y=t.droppable.getById(w),C=y.callbacks.getScrollWhileDragging();return{droppableId:w,scroll:C}}),_={additions:h,removals:Object.keys(d),modified:m};n=Zw(),r.publish(_)}))},a=function(u){var f=u.descriptor.id;n.additions[f]=u,n.modified[u.descriptor.droppableId]=!0,n.removals[f]&&delete n.removals[f],i()},s=function(u){var f=u.descriptor;n.removals[f.id]=!0,n.modified[f.droppableId]=!0,n.additions[f.id]&&delete n.additions[f.id],i()},l=function(){o&&(cancelAnimationFrame(o),o=null,n=Zw())};return{add:a,remove:s,stop:l}}var YK=function(e){var t=e.scrollHeight,r=e.scrollWidth,n=e.height,o=e.width,i=zn({x:r,y:t},{x:o,y:n}),a={x:Math.max(0,i.x),y:Math.max(0,i.y)};return a},XK=function(){var e=document.documentElement;return e||Ge(!1),e},ZK=function(){var e=XK(),t=YK({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},LRe=function(){var e=KK(),t=ZK(),r=e.y,n=e.x,o=XK(),i=o.clientWidth,a=o.clientHeight,s=n+i,l=r+a,c=Ho({top:r,left:n,right:s,bottom:l}),u={frame:c,scroll:{initial:e,current:e,max:t,diff:{value:Or,displacement:Or}}};return u},zRe=function(e){var t=e.critical,r=e.scrollOptions,n=e.registry,o=LRe(),i=o.scroll.current,a=t.droppable,s=n.droppable.getAllByType(a.type).map(function(f){return f.callbacks.getDimensionAndWatchScroll(i,r)}),l=n.draggable.getAllByType(t.draggable.type).map(function(f){return f.getDimension(i)}),c={draggables:PK(l),droppables:CK(s)},u={dimensions:c,critical:t,viewport:o};return u};function J$(e,t,r){if(r.descriptor.id===t.id||r.descriptor.type!==t.type)return!1;var n=e.droppable.getById(r.descriptor.droppableId);return n.descriptor.mode==="virtual"}var URe=function(e,t){var r=null,n=jRe({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=function(p,h){e.droppable.exists(p)||Ge(!1),r&&t.updateDroppableIsEnabled({id:p,isEnabled:h})},i=function(p,h){r&&(e.droppable.exists(p)||Ge(!1),t.updateDroppableIsCombineEnabled({id:p,isCombineEnabled:h}))},a=function(p,h){r&&(e.droppable.exists(p)||Ge(!1),t.updateDroppableScroll({id:p,newScroll:h}))},s=function(p,h){r&&e.droppable.getById(p).callbacks.scroll(h)},l=function(){if(r){n.stop();var p=r.critical.droppable;e.droppable.getAllByType(p.type).forEach(function(h){return h.callbacks.dragStopped()}),r.unsubscribe(),r=null}},c=function(p){r||Ge(!1);var h=r.critical.draggable;p.type==="ADDITION"&&J$(e,h,p.value)&&n.add(p.value),p.type==="REMOVAL"&&J$(e,h,p.value)&&n.remove(p.value)},u=function(p){r&&Ge(!1);var h=e.draggable.getById(p.draggableId),m=e.droppable.getById(h.descriptor.droppableId),_={draggable:h.descriptor,droppable:m.descriptor},w=e.subscribe(c);return r={critical:_,unsubscribe:w},zRe({critical:_,registry:e,scrollOptions:p.scrollOptions})},f={updateDroppableIsEnabled:o,updateDroppableIsCombineEnabled:i,scrollDroppable:s,updateDroppableScroll:a,startPublishing:u,stopPublishing:l};return f},JK=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},HRe=function(e){window.scrollBy(e.x,e.y)},VRe=Cr(function(e){return Cb(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),WRe=function(t,r){var n=Zs(VRe(r),function(o){return o.frame||Ge(!1),NK(o.frame.pageMarginBox)(t)});return n},qRe=function(e){var t=e.center,r=e.destination,n=e.droppables;if(r){var o=n[r];return o.frame?o:null}var i=WRe(t,n);return i},Is={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},GRe=function(e,t){var r=e[t.size]*Is.startFromPercentage,n=e[t.size]*Is.maxScrollAtPercentage,o={startScrollingFrom:r,maxScrollValueAt:n};return o},QK=function(e){var t=e.startOfRange,r=e.endOfRange,n=e.current,o=r-t;if(o===0)return 0;var i=n-t,a=i/o;return a},W8=1,KRe=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return Is.maxPixelScroll;if(e===t.startScrollingFrom)return W8;var r=QK({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),n=1-r,o=Is.maxPixelScroll*Is.ease(n);return Math.ceil(o)},Q$=Is.durationDampening.accelerateAt,eT=Is.durationDampening.stopDampeningAt,YRe=function(e,t){var r=t,n=eT,o=Date.now(),i=o-r;if(i>=eT)return e;if(it.height,i=r.width>t.width;return!i&&!o?n:i&&o?null:{x:i?0:n.x,y:o?0:n.y}},ZRe=EK(function(e){return e===0?0:e}),eY=function(e){var t=e.dragStartTime,r=e.container,n=e.subject,o=e.center,i=e.shouldUseTimeDampening,a={top:o.y-r.top,right:r.right-o.x,bottom:r.bottom-o.y,left:o.x-r.left},s=rT({container:r,distanceToEdges:a,dragStartTime:t,axis:N8,shouldUseTimeDampening:i}),l=rT({container:r,distanceToEdges:a,dragStartTime:t,axis:kK,shouldUseTimeDampening:i}),c=ZRe({x:l,y:s});if(ks(c,Or))return null;var u=XRe({container:r,subject:n,proposedScroll:c});return u?ks(u,Or)?null:u:null},JRe=EK(function(e){return e===0?0:e>0?1:-1}),q8=function(){var e=function(r,n){return r<0?r:r>n?r-n:0};return function(t){var r=t.current,n=t.max,o=t.change,i=Fr(r,o),a={x:e(i.x,n.x),y:e(i.y,n.y)};return ks(a,Or)?null:a}}(),tY=function(t){var r=t.max,n=t.current,o=t.change,i={x:Math.max(n.x,r.x),y:Math.max(n.y,r.y)},a=JRe(o),s=q8({max:i,current:n,change:a});return!s||a.x!==0&&s.x===0||a.y!==0&&s.y===0},G8=function(t,r){return tY({current:t.scroll.current,max:t.scroll.max,change:r})},QRe=function(t,r){if(!G8(t,r))return null;var n=t.scroll.max,o=t.scroll.current;return q8({current:o,max:n,change:r})},K8=function(t,r){var n=t.frame;return n?tY({current:n.scroll.current,max:n.scroll.max,change:r}):!1},eNe=function(t,r){var n=t.frame;return!n||!K8(t,r)?null:q8({current:n.scroll.current,max:n.scroll.max,change:r})},tNe=function(e){var t=e.viewport,r=e.subject,n=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=eY({dragStartTime:o,container:t.frame,subject:r,center:n,shouldUseTimeDampening:i});return a&&G8(t,a)?a:null},rNe=function(e){var t=e.droppable,r=e.subject,n=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var s=eY({dragStartTime:o,container:a.pageMarginBox,subject:r,center:n,shouldUseTimeDampening:i});return s&&K8(t,s)?s:null},nT=function(e){var t=e.state,r=e.dragStartTime,n=e.shouldUseTimeDampening,o=e.scrollWindow,i=e.scrollDroppable,a=t.current.page.borderBoxCenter,s=t.dimensions.draggables[t.critical.draggable.id],l=s.page.marginBox;if(t.isWindowScrollAllowed){var c=t.viewport,u=tNe({dragStartTime:r,viewport:c,subject:l,center:a,shouldUseTimeDampening:n});if(u){o(u);return}}var f=qRe({center:a,destination:Wn(t.impact),droppables:t.dimensions.droppables});if(f){var d=rNe({dragStartTime:r,droppable:f,subject:l,center:a,shouldUseTimeDampening:n});d&&i(f.descriptor.id,d)}},nNe=function(e){var t=e.scrollWindow,r=e.scrollDroppable,n=Ap(t),o=Ap(r),i=null,a=function(u){i||Ge(!1);var f=i,d=f.shouldUseTimeDampening,p=f.dragStartTime;nT({state:u,scrollWindow:n,scrollDroppable:o,dragStartTime:p,shouldUseTimeDampening:d})},s=function(u){i&&Ge(!1);var f=Date.now(),d=!1,p=function(){d=!0};nT({state:u,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:p,scrollDroppable:p}),i={dragStartTime:f,shouldUseTimeDampening:d},d&&a(u)},l=function(){i&&(n.cancel(),o.cancel(),i=null)};return{start:s,stop:l,scroll:a}},oNe=function(e){var t=e.move,r=e.scrollDroppable,n=e.scrollWindow,o=function(c,u){var f=Fr(c.current.client.selection,u);t({client:f})},i=function(c,u){if(!K8(c,u))return u;var f=eNe(c,u);if(!f)return r(c.descriptor.id,u),null;var d=zn(u,f);r(c.descriptor.id,d);var p=zn(u,d);return p},a=function(c,u,f){if(!c||!G8(u,f))return f;var d=QRe(u,f);if(!d)return n(f),null;var p=zn(f,d);n(p);var h=zn(f,p);return h},s=function(c){var u=c.scrollJumpRequest;if(u){var f=Wn(c.impact);f||Ge(!1);var d=i(c.dimensions.droppables[f],u);if(d){var p=c.viewport,h=a(c.isWindowScrollAllowed,p,d);h&&o(c,h)}}};return s},iNe=function(e){var t=e.scrollDroppable,r=e.scrollWindow,n=e.move,o=nNe({scrollWindow:r,scrollDroppable:t}),i=oNe({move:n,scrollWindow:r,scrollDroppable:t}),a=function(c){if(c.phase==="DRAGGING"){if(c.movementMode==="FLUID"){o.scroll(c);return}c.scrollJumpRequest&&i(c)}},s={scroll:a,start:o.start,stop:o.stop};return s},Tu="data-rbd",Du=function(){var e=Tu+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),zx=function(){var e=Tu+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),aNe=function(){var e=Tu+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),oT={contextId:Tu+"-scroll-container-context-id"},sNe=function(t){return function(r){return"["+r+'="'+t+'"]'}},Jf=function(t,r){return t.map(function(n){var o=n.styles[r];return o?n.selector+" { "+o+" }":""}).join(" ")},lNe="pointer-events: none;",cNe=function(e){var t=sNe(e),r=function(){var s=` + cursor: -webkit-grab; + cursor: grab; + `;return{selector:t(Du.contextId),styles:{always:` + -webkit-touch-callout: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + touch-action: manipulation; + `,resting:s,dragging:lNe,dropAnimating:s}}}(),n=function(){var s=` + transition: `+jd.outOfTheWay+`; + `;return{selector:t(zx.contextId),styles:{dragging:s,dropAnimating:s,userCancel:s}}}(),o={selector:t(aNe.contextId),styles:{always:"overflow-anchor: none;"}},i={selector:"body",styles:{dragging:` + cursor: grabbing; + cursor: -webkit-grabbing; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + overflow-anchor: none; + `}},a=[n,r,o,i];return{always:Jf(a,"always"),resting:Jf(a,"resting"),dragging:Jf(a,"dragging"),dropAnimating:Jf(a,"dropAnimating"),userCancel:Jf(a,"userCancel")}},qn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?$.useLayoutEffect:$.useEffect,Jw=function(){var t=document.querySelector("head");return t||Ge(!1),t},iT=function(t){var r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.type="text/css",r};function uNe(e,t){var r=Pt(function(){return cNe(e)},[e]),n=$.useRef(null),o=$.useRef(null),i=lt(Cr(function(f){var d=o.current;d||Ge(!1),d.textContent=f}),[]),a=lt(function(f){var d=n.current;d||Ge(!1),d.textContent=f},[]);qn(function(){!n.current&&!o.current||Ge(!1);var f=iT(t),d=iT(t);return n.current=f,o.current=d,f.setAttribute(Tu+"-always",e),d.setAttribute(Tu+"-dynamic",e),Jw().appendChild(f),Jw().appendChild(d),a(r.always),i(r.resting),function(){var p=function(m){var _=m.current;_||Ge(!1),Jw().removeChild(_),m.current=null};p(n),p(o)}},[t,a,i,r.always,r.resting,e]);var s=lt(function(){return i(r.dragging)},[i,r.dragging]),l=lt(function(f){if(f==="DROP"){i(r.dropAnimating);return}i(r.userCancel)},[i,r.dropAnimating,r.userCancel]),c=lt(function(){o.current&&i(r.resting)},[i,r.resting]),u=Pt(function(){return{dragging:s,dropping:l,resting:c}},[s,l,c]);return u}var rY=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function kb(e){return e instanceof rY(e).HTMLElement}function fNe(e,t){var r="["+Du.contextId+'="'+e+'"]',n=SK(document.querySelectorAll(r));if(!n.length)return null;var o=Zs(n,function(i){return i.getAttribute(Du.draggableId)===t});return!o||!kb(o)?null:o}function dNe(e){var t=$.useRef({}),r=$.useRef(null),n=$.useRef(null),o=$.useRef(!1),i=lt(function(d,p){var h={id:d,focus:p};return t.current[d]=h,function(){var _=t.current,w=_[d];w!==h&&delete _[d]}},[]),a=lt(function(d){var p=fNe(e,d);p&&p!==document.activeElement&&p.focus()},[e]),s=lt(function(d,p){r.current===d&&(r.current=p)},[]),l=lt(function(){n.current||o.current&&(n.current=requestAnimationFrame(function(){n.current=null;var d=r.current;d&&a(d)}))},[a]),c=lt(function(d){r.current=null;var p=document.activeElement;p&&p.getAttribute(Du.draggableId)===d&&(r.current=d)},[]);qn(function(){return o.current=!0,function(){o.current=!1;var d=n.current;d&&cancelAnimationFrame(d)}},[]);var u=Pt(function(){return{register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}},[i,c,l,s]);return u}function pNe(){var e={draggables:{},droppables:{}},t=[];function r(f){return t.push(f),function(){var p=t.indexOf(f);p!==-1&&t.splice(p,1)}}function n(f){t.length&&t.forEach(function(d){return d(f)})}function o(f){return e.draggables[f]||null}function i(f){var d=o(f);return d||Ge(!1),d}var a={register:function(d){e.draggables[d.descriptor.id]=d,n({type:"ADDITION",value:d})},update:function(d,p){var h=e.draggables[p.descriptor.id];h&&h.uniqueId===d.uniqueId&&(delete e.draggables[p.descriptor.id],e.draggables[d.descriptor.id]=d)},unregister:function(d){var p=d.descriptor.id,h=o(p);h&&d.uniqueId===h.uniqueId&&(delete e.draggables[p],n({type:"REMOVAL",value:d}))},getById:i,findById:o,exists:function(d){return!!o(d)},getAllByType:function(d){return Om(e.draggables).filter(function(p){return p.descriptor.type===d})}};function s(f){return e.droppables[f]||null}function l(f){var d=s(f);return d||Ge(!1),d}var c={register:function(d){e.droppables[d.descriptor.id]=d},unregister:function(d){var p=s(d.descriptor.id);p&&d.uniqueId===p.uniqueId&&delete e.droppables[d.descriptor.id]},getById:l,findById:s,exists:function(d){return!!s(d)},getAllByType:function(d){return Om(e.droppables).filter(function(p){return p.descriptor.type===d})}};function u(){e.draggables={},e.droppables={},t.length=0}return{draggable:a,droppable:c,subscribe:r,clean:u}}function hNe(){var e=Pt(pNe,[]);return $.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var Y8=ae.createContext(null),km=function(){var e=document.body;return e||Ge(!1),e},vNe={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},gNe=function(t){return"rbd-announcement-"+t};function mNe(e){var t=Pt(function(){return gNe(e)},[e]),r=$.useRef(null);$.useEffect(function(){var i=document.createElement("div");return r.current=i,i.id=t,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),Ze(i.style,vNe),km().appendChild(i),function(){setTimeout(function(){var l=km();l.contains(i)&&l.removeChild(i),i===r.current&&(r.current=null)})}},[t]);var n=lt(function(o){var i=r.current;if(i){i.textContent=o;return}},[]);return n}var yNe=0,bNe={separator:"::"};function X8(e,t){return t===void 0&&(t=bNe),Pt(function(){return""+e+t.separator+yNe++},[t.separator,e])}function wNe(e){var t=e.contextId,r=e.uniqueId;return"rbd-hidden-text-"+t+"-"+r}function xNe(e){var t=e.contextId,r=e.text,n=X8("hidden-text",{separator:"-"}),o=Pt(function(){return wNe({contextId:t,uniqueId:n})},[n,t]);return $.useEffect(function(){var a=document.createElement("div");return a.id=o,a.textContent=r,a.style.display="none",km().appendChild(a),function(){var l=km();l.contains(a)&&l.removeChild(a)}},[o,r]),o}var Ib=ae.createContext(null);function nY(e){var t=$.useRef(e);return $.useEffect(function(){t.current=e}),t}function _Ne(){var e=null;function t(){return!!e}function r(a){return a===e}function n(a){e&&Ge(!1);var s={abandon:a};return e=s,s}function o(){e||Ge(!1),e=null}function i(){e&&(e.abandon(),o())}return{isClaimed:t,isActive:r,claim:n,release:o,tryAbandon:i}}var ENe=9,SNe=13,Z8=27,oY=32,CNe=33,PNe=34,ONe=35,ANe=36,kNe=37,INe=38,$Ne=39,TNe=40,z0,DNe=(z0={},z0[SNe]=!0,z0[ENe]=!0,z0),iY=function(e){DNe[e.keyCode]&&e.preventDefault()},$b=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],r=Zs(t,function(n){return"on"+n in document});return r||e}(),aY=0,aT=5;function MNe(e,t){return Math.abs(t.x-e.x)>=aT||Math.abs(t.y-e.y)>=aT}var sT={type:"IDLE"};function RNe(e){var t=e.cancel,r=e.completed,n=e.getPhase,o=e.setPhase;return[{eventName:"mousemove",fn:function(a){var s=a.button,l=a.clientX,c=a.clientY;if(s===aY){var u={x:l,y:c},f=n();if(f.type==="DRAGGING"){a.preventDefault(),f.actions.move(u);return}f.type!=="PENDING"&&Ge(!1);var d=f.point;if(MNe(d,u)){a.preventDefault();var p=f.actions.fluidLift(u);o({type:"DRAGGING",actions:p})}}}},{eventName:"mouseup",fn:function(a){var s=n();if(s.type!=="DRAGGING"){t();return}a.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),r()}},{eventName:"mousedown",fn:function(a){n().type==="DRAGGING"&&a.preventDefault(),t()}},{eventName:"keydown",fn:function(a){var s=n();if(s.type==="PENDING"){t();return}if(a.keyCode===Z8){a.preventDefault(),t();return}iY(a)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){n().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(a){var s=n();if(s.type==="IDLE"&&Ge(!1),s.actions.shouldRespectForcePress()){t();return}a.preventDefault()}},{eventName:$b,fn:t}]}function NNe(e){var t=$.useRef(sT),r=$.useRef(As),n=Pt(function(){return{eventName:"mousedown",fn:function(f){if(!f.defaultPrevented&&f.button===aY&&!(f.ctrlKey||f.metaKey||f.shiftKey||f.altKey)){var d=e.findClosestDraggableId(f);if(d){var p=e.tryGetLock(d,a,{sourceEvent:f});if(p){f.preventDefault();var h={x:f.clientX,y:f.clientY};r.current(),c(p,h)}}}}}},[e]),o=Pt(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(f){if(!f.defaultPrevented){var d=e.findClosestDraggableId(f);if(d){var p=e.findOptionsForDraggable(d);p&&(p.shouldRespectForcePress||e.canGetLock(d)&&f.preventDefault())}}}}},[e]),i=lt(function(){var f={passive:!1,capture:!0};r.current=go(window,[o,n],f)},[o,n]),a=lt(function(){var u=t.current;u.type!=="IDLE"&&(t.current=sT,r.current(),i())},[i]),s=lt(function(){var u=t.current;a(),u.type==="DRAGGING"&&u.actions.cancel({shouldBlockNextClick:!0}),u.type==="PENDING"&&u.actions.abort()},[a]),l=lt(function(){var f={capture:!0,passive:!1},d=RNe({cancel:s,completed:a,getPhase:function(){return t.current},setPhase:function(h){t.current=h}});r.current=go(window,d,f)},[s,a]),c=lt(function(f,d){t.current.type!=="IDLE"&&Ge(!1),t.current={type:"PENDING",point:d,actions:f},l()},[l]);qn(function(){return i(),function(){r.current()}},[i])}var hc;function FNe(){}var BNe=(hc={},hc[PNe]=!0,hc[CNe]=!0,hc[ANe]=!0,hc[ONe]=!0,hc);function jNe(e,t){function r(){t(),e.cancel()}function n(){t(),e.drop()}return[{eventName:"keydown",fn:function(i){if(i.keyCode===Z8){i.preventDefault(),r();return}if(i.keyCode===oY){i.preventDefault(),n();return}if(i.keyCode===TNe){i.preventDefault(),e.moveDown();return}if(i.keyCode===INe){i.preventDefault(),e.moveUp();return}if(i.keyCode===$Ne){i.preventDefault(),e.moveRight();return}if(i.keyCode===kNe){i.preventDefault(),e.moveLeft();return}if(BNe[i.keyCode]){i.preventDefault();return}iY(i)}},{eventName:"mousedown",fn:r},{eventName:"mouseup",fn:r},{eventName:"click",fn:r},{eventName:"touchstart",fn:r},{eventName:"resize",fn:r},{eventName:"wheel",fn:r,options:{passive:!0}},{eventName:$b,fn:r}]}function LNe(e){var t=$.useRef(FNe),r=Pt(function(){return{eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==oY)return;var a=e.findClosestDraggableId(i);if(!a)return;var s=e.tryGetLock(a,u,{sourceEvent:i});if(!s)return;i.preventDefault();var l=!0,c=s.snapLift();t.current();function u(){l||Ge(!1),l=!1,t.current(),n()}t.current=go(window,jNe(c,u),{capture:!0,passive:!1})}}},[e]),n=lt(function(){var i={passive:!1,capture:!0};t.current=go(window,[r],i)},[r]);qn(function(){return n(),function(){t.current()}},[n])}var Qw={type:"IDLE"},zNe=120,UNe=.15;function HNe(e){var t=e.cancel,r=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(o){o.preventDefault()}},{eventName:"keydown",fn:function(o){if(r().type!=="DRAGGING"){t();return}o.keyCode===Z8&&o.preventDefault(),t()}},{eventName:$b,fn:t}]}function VNe(e){var t=e.cancel,r=e.completed,n=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(i){var a=n();if(a.type!=="DRAGGING"){t();return}a.hasMoved=!0;var s=i.touches[0],l=s.clientX,c=s.clientY,u={x:l,y:c};i.preventDefault(),a.actions.move(u)}},{eventName:"touchend",fn:function(i){var a=n();if(a.type!=="DRAGGING"){t();return}i.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),r()}},{eventName:"touchcancel",fn:function(i){if(n().type!=="DRAGGING"){t();return}i.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(i){var a=n();a.type==="IDLE"&&Ge(!1);var s=i.touches[0];if(s){var l=s.force>=UNe;if(l){var c=a.actions.shouldRespectForcePress();if(a.type==="PENDING"){c&&t();return}if(c){if(a.hasMoved){i.preventDefault();return}t();return}i.preventDefault()}}}},{eventName:$b,fn:t}]}function WNe(e){var t=$.useRef(Qw),r=$.useRef(As),n=lt(function(){return t.current},[]),o=lt(function(p){t.current=p},[]),i=Pt(function(){return{eventName:"touchstart",fn:function(p){if(!p.defaultPrevented){var h=e.findClosestDraggableId(p);if(h){var m=e.tryGetLock(h,s,{sourceEvent:p});if(m){var _=p.touches[0],w=_.clientX,y=_.clientY,C={x:w,y};r.current(),f(m,C)}}}}}},[e]),a=lt(function(){var p={capture:!0,passive:!1};r.current=go(window,[i],p)},[i]),s=lt(function(){var d=t.current;d.type!=="IDLE"&&(d.type==="PENDING"&&clearTimeout(d.longPressTimerId),o(Qw),r.current(),a())},[a,o]),l=lt(function(){var d=t.current;s(),d.type==="DRAGGING"&&d.actions.cancel({shouldBlockNextClick:!0}),d.type==="PENDING"&&d.actions.abort()},[s]),c=lt(function(){var p={capture:!0,passive:!1},h={cancel:l,completed:s,getPhase:n},m=go(window,VNe(h),p),_=go(window,HNe(h),p);r.current=function(){m(),_()}},[l,n,s]),u=lt(function(){var p=n();p.type!=="PENDING"&&Ge(!1);var h=p.actions.fluidLift(p.point);o({type:"DRAGGING",actions:h,hasMoved:!1})},[n,o]),f=lt(function(p,h){n().type!=="IDLE"&&Ge(!1);var m=setTimeout(u,zNe);o({type:"PENDING",point:h,actions:p,longPressTimerId:m}),c()},[c,n,o,u]);qn(function(){return a(),function(){r.current();var h=n();h.type==="PENDING"&&(clearTimeout(h.longPressTimerId),o(Qw))}},[n,a,o]),qn(function(){var p=go(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return p},[])}var qNe={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function sY(e,t){if(t==null)return!1;var r=!!qNe[t.tagName.toLowerCase()];if(r)return!0;var n=t.getAttribute("contenteditable");return n==="true"||n===""?!0:t===e?!1:sY(e,t.parentElement)}function GNe(e,t){var r=t.target;return kb(r)?sY(e,r):!1}var KNe=function(e){return Ho(e.getBoundingClientRect()).center};function YNe(e){return e instanceof rY(e).Element}var XNe=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],r=Zs(t,function(n){return n in Element.prototype});return r||e}();function lY(e,t){return e==null?null:e[XNe](t)?e:lY(e.parentElement,t)}function ZNe(e,t){return e.closest?e.closest(t):lY(e,t)}function JNe(e){return"["+Du.contextId+'="'+e+'"]'}function QNe(e,t){var r=t.target;if(!YNe(r))return null;var n=JNe(e),o=ZNe(r,n);return!o||!kb(o)?null:o}function eFe(e,t){var r=QNe(e,t);return r?r.getAttribute(Du.draggableId):null}function tFe(e,t){var r="["+zx.contextId+'="'+e+'"]',n=SK(document.querySelectorAll(r)),o=Zs(n,function(i){return i.getAttribute(zx.id)===t});return!o||!kb(o)?null:o}function rFe(e){e.preventDefault()}function U0(e){var t=e.expected,r=e.phase,n=e.isLockActive;return e.shouldWarn,!(!n()||t!==r)}function cY(e){var t=e.lockAPI,r=e.store,n=e.registry,o=e.draggableId;if(t.isClaimed())return!1;var i=n.draggable.findById(o);return!(!i||!i.options.isEnabled||!JK(r.getState(),o))}function nFe(e){var t=e.lockAPI,r=e.contextId,n=e.store,o=e.registry,i=e.draggableId,a=e.forceSensorStop,s=e.sourceEvent,l=cY({lockAPI:t,store:n,registry:o,draggableId:i});if(!l)return null;var c=o.draggable.getById(i),u=tFe(r,c.descriptor.id);if(!u||s&&!c.options.canDragInteractiveElements&&GNe(u,s))return null;var f=t.claim(a||As),d="PRE_DRAG";function p(){return c.options.shouldRespectForcePress}function h(){return t.isActive(f)}function m(O,g){U0({expected:O,phase:d,isLockActive:h,shouldWarn:!0})&&n.dispatch(g())}var _=m.bind(null,"DRAGGING");function w(O){function g(){t.release(),d="COMPLETED"}d!=="PRE_DRAG"&&(g(),d!=="PRE_DRAG"&&Ge(!1)),n.dispatch(XMe(O.liftActionArgs)),d="DRAGGING";function D(H,G){if(G===void 0&&(G={shouldBlockNextClick:!1}),O.cleanup(),G.shouldBlockNextClick){var V=go(window,[{eventName:"click",fn:rFe,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(V)}g(),n.dispatch(WK({reason:H}))}return Ze({isActive:function(){return U0({expected:"DRAGGING",phase:d,isLockActive:h,shouldWarn:!1})},shouldRespectForcePress:p,drop:function(G){return D("DROP",G)},cancel:function(G){return D("CANCEL",G)}},O.actions)}function y(O){var g=Ap(function(H){_(function(){return VK({client:H})})}),D=w({liftActionArgs:{id:i,clientSelection:O,movementMode:"FLUID"},cleanup:function(){return g.cancel()},actions:{move:g}});return Ze({},D,{move:g})}function C(){var O={moveUp:function(){return _(iRe)},moveRight:function(){return _(sRe)},moveDown:function(){return _(aRe)},moveLeft:function(){return _(lRe)}};return w({liftActionArgs:{id:i,clientSelection:KNe(u),movementMode:"SNAP"},cleanup:As,actions:O})}function I(){var O=U0({expected:"PRE_DRAG",phase:d,isLockActive:h,shouldWarn:!0});O&&t.release()}var F={isActive:function(){return U0({expected:"PRE_DRAG",phase:d,isLockActive:h,shouldWarn:!1})},shouldRespectForcePress:p,fluidLift:y,snapLift:C,abort:I};return F}var oFe=[NNe,LNe,WNe];function iFe(e){var t=e.contextId,r=e.store,n=e.registry,o=e.customSensors,i=e.enableDefaultSensors,a=[].concat(i?oFe:[],o||[]),s=$.useState(function(){return _Ne()})[0],l=lt(function(y,C){y.isDragging&&!C.isDragging&&s.tryAbandon()},[s]);qn(function(){var y=r.getState(),C=r.subscribe(function(){var I=r.getState();l(y,I),y=I});return C},[s,r,l]),qn(function(){return s.tryAbandon},[s.tryAbandon]);for(var c=lt(function(w){return cY({lockAPI:s,registry:n,store:r,draggableId:w})},[s,n,r]),u=lt(function(w,y,C){return nFe({lockAPI:s,registry:n,contextId:t,store:r,draggableId:w,forceSensorStop:y,sourceEvent:C&&C.sourceEvent?C.sourceEvent:null})},[t,s,n,r]),f=lt(function(w){return eFe(t,w)},[t]),d=lt(function(w){var y=n.draggable.findById(w);return y?y.options:null},[n.draggable]),p=lt(function(){s.isClaimed()&&(s.tryAbandon(),r.getState().phase!=="IDLE"&&r.dispatch(z8()))},[s,r]),h=lt(s.isClaimed,[s]),m=Pt(function(){return{canGetLock:c,tryGetLock:u,findClosestDraggableId:f,findOptionsForDraggable:d,tryReleaseLock:p,isLockClaimed:h}},[c,u,f,d,p,h]),_=0;_r.name!==e)))}function mY(e){return lf().find(r=>r.name===e)!==void 0}function yY(e){return At.isHexString(e)&&e.length===66}function rBe(e){return At.isHexString(e)&&e.length===128}function Tb(e){const t=e.pubkeys.map(i=>{const a=At.hexToBinUnsafe(i.pubkey);return Vy.blake2b(a,void 0,32)}),r=e.pubkeys.length,n=[Uint8Array.from([1]),At.encodeI256(BigInt(r))].concat(t).concat([At.encodeI256(BigInt(e.mOfN))]),o=Uint8Array.from(n.reduce((i,a)=>Uint8Array.from([...i,...a]),new Uint8Array));return At.bs58.encode(o)}function bY(){return lf()}function wY(e){const t=lf().find(r=>r.name===e);if(t===void 0)throw new Error(`The multisig ${e} does not exist`);return t}function nBe(e){const t=yh(),[r,n]=$.useState();return $.useEffect(()=>{e!==void 0&&t.addresses.getAddressesAddressBalance(e).then(n).catch(o=>{console.error(`Get balance error: ${o}`)})},[e]),r}function oBe(e){return e===void 0?"":At.prettifyAttoAlphAmount(BigInt(e.balance))}async function iBe(e,t,r){const n=await e.addresses.getAddressesAddressBalance(t),o=BigInt(n.balance)-BigInt(n.lockedBalance);if(o<=r){const i=At.prettifyAttoAlphAmount(r),a=At.prettifyAttoAlphAmount(o);throw new Error(`Not enough balance, expect ${i} ALPH, got ${a} ALPH`)}}async function aBe(e,t,r,n){const o=wY(t);if(r.length!==o.mOfN)throw new Error(`Please select ${o.mOfN} signers`);const i=r.map(l=>o.pubkeys.find(c=>c.name===l).pubkey);let a=0n;const s=n.map(l=>{const c=At.convertAlphAmountWithDecimals(l.alphAmount);return a+=c,{address:l.address,attoAlphAmount:c.toString()}});return await iBe(e,o.address,a),await e.multisig.postMultisigBuild({fromAddress:o.address,fromPublicKeys:i,destinations:s})}async function sBe(e,t){const r=await e.getSelectedAccount(),{signature:n}=await e.signUnsignedTx({signerAddress:r.address,signerKeyType:r.keyType,unsignedTx:t});return{signer:r.publicKey,signature:n}}async function lBe(e,t,r,n,o){const i=wY(t);if(o.length!==i.mOfN)throw new Error(`Expect ${i.mOfN} signatures`);const a=At.binToHex(Vy.blake2b(At.hexToBinUnsafe(n),void 0,32)),s=o.map(c=>{const u=i.pubkeys.find(f=>f.name===c.name).pubkey;return{name:c.name,pubkey:u,signature:c.signature}}),l=Array(i.pubkeys.length).fill("");return s.forEach(c=>{const u=i.pubkeys.findIndex(f=>f.pubkey===c.pubkey);if(u===-1)throw new Error(`Unknown signer: ${c.name}`);if(cBe(i,r,a,c,c.signature),l[u]!=="")throw new Error(`Duplicate signature from signer ${c.name}`);l[u]=c.signature}),await e.multisig.postMultisigSubmit({unsignedTx:n,signatures:l.filter(c=>c!=="")})}function cBe(e,t,r,n,o){if(At.verifySignature(r,n.pubkey,o))return;throw t.map(a=>e.pubkeys.find(s=>s.name===a)).forEach(a=>{if(a.pubkey!==n.pubkey&&At.verifySignature(r,a.pubkey,o))throw new Error(`The signature ${pT(o)} is from ${a.name}, not ${n.name}`)}),new Error(`Invalid signature ${pT(o)}`)}function pT(e){return`${e.slice(0,6)}...${e.slice(-6)}`}async function xY(e,t,r=30){try{await e.transactions.getTransactionsTransactionHash(t);return}catch(n){if(console.error(`Get transaction status error: ${n}`),r===0)throw n}await new Promise(n=>setTimeout(n,4e3)),await xY(e,t,r-1)}function uBe(e){const t={...e};delete t.address;const r=JSON.stringify(t),n=At.binToHex(Vy.blake2b(r,void 0,32));return btoa(r+n)}function fBe(e){const t=atob(e);if(t.length<=64)throw new Error("Invalid config");const r=t.length-64,n=t.slice(r),o=t.slice(0,r),i=At.binToHex(Vy.blake2b(o,void 0,32));if(n!==i)throw new Error("Invalid config hash");return dBe(JSON.parse(o))}function dBe(e){const t=e.name;if(t===void 0||t==="")throw new Error("Invalid config name");if(mY(t))throw new Error("The multisig already exists");const r=e.pubkeys;if(r===void 0||!Array.isArray(r))throw new Error("Expected a non-empty pubkey array");const n=r.length;if(n===0)throw new Error("The pubkey list is empty");r.forEach((i,a)=>{const s=i.name;if(s===void 0||s==="")throw new Error(`Invalid name in the pubkeys list, index: ${a}`);const l=i.pubkey;if(l===void 0||!yY(l))throw new Error(`Invalid pubkey in the pubkeys list, index: ${a}`)});const o=e.mOfN;if(o===void 0||typeof o!="number")throw new Error("Invalid mOfN");if(o<1||o>n)throw new Error("Invalid value of mOfN");return e}function hT(e){const t=e.indexOf("."),r=e.lastIndexOf(".");return parseInt(e.slice(t+1,r))}function pBe(){const e=$.useMemo(()=>{const a=window.localStorage.getItem(E1);if(a)try{return JSON.parse(a)}catch{return console.log("Failed to parse stored value"),Vx}},[]),t=tK({validateInputOnChange:[`pubkeys.${Fd}.pubkey`],initialValues:e,validate:{name:a=>a===""?"Empty name":mY(a)?"The multisig already exists":null,pubkeys:{pubkey:(a,s,l)=>{if(a==="")return"Empty public key";if(!yY(a))return"Invalid public key";const c=s.pubkeys.findIndex(u=>u.pubkey===a);return hT(l)!==c?"Duplicate public key":null},name:(a,s,l)=>{if(a==="")return"Empty name";const c=s.pubkeys.findIndex(u=>u.name===a);return hT(l)!==c?"Duplicate name":null}}}}),r=$.useRef(),n=Zp();$.useEffect(()=>{window.localStorage.setItem(E1,JSON.stringify(t.values))},[t.values]),$.useEffect(()=>{t.values.pubkeys.lengtht.onSubmit(a=>{const s={...a,address:Tb(a)};window.localStorage.setItem(E1,JSON.stringify(s)),gY(s),QFe(),n("/multisig/show?name="+a.name)}),[t,n]),i=t.values.pubkeys.map((a,s)=>L.jsx(GFe,{index:s,draggableId:s.toString(),children:l=>L.jsxs(Kt,{position:"apart",spacing:"xl",ref:l.innerRef,mt:"xs",...l.draggableProps,children:[L.jsx(hy,{...l.dragHandleProps,children:L.jsx(xme,{size:"1.2rem"})}),L.jsx(_s,{radius:"md",placeholder:"Name",ta:"left",...t.getInputProps(`pubkeys.${s}.name`)}),L.jsx(_s,{radius:"md",placeholder:"Public Key",w:"32rem",ta:"left",...t.getInputProps(`pubkeys.${s}.pubkey`)}),L.jsx(Yp,{label:"Remove Signer",disabled:t.values.pubkeys.length===1,children:L.jsx(Cme,{size:"1.2rem",onClick:()=>t.values.pubkeys.length!==1&&t.removeListItem("pubkeys",s)})})]})},s));return L.jsx(rt,{maw:900,mx:"auto",mt:"5rem",children:L.jsxs("form",{onSubmit:o,children:[L.jsxs(Kt,{position:"center",children:[L.jsx(St,{fw:"700",size:"xl",children:"Choose a Name"}),L.jsx(_s,{placeholder:"Multisig Name",ta:"left",size:"md",...t.getInputProps("name")})]}),L.jsxs(tu,{mt:"2rem",px:"2rem",py:"1.5rem",children:[L.jsx(St,{ta:"left",fw:"700",children:"Signers"}),L.jsx(uFe,{onDragEnd:({destination:a,source:s})=>t.reorderListItem("pubkeys",{from:s.index,to:a.index}),children:L.jsx(vY,{droppableId:"dnd-list",direction:"vertical",children:a=>L.jsxs("div",{...a.droppableProps,ref:a.innerRef,children:[i,a.placeholder]})})}),L.jsxs(Kt,{position:"apart",mt:"lg",children:[L.jsx(xr,{variant:"light",radius:"md",onClick:()=>t.setValues(Vx),children:"Reset Signers"}),L.jsx(xr,{variant:"light",radius:"md",onClick:()=>t.insertListItem("pubkeys",{name:"",pubkey:""}),children:"Add Signer"})]})]}),L.jsxs(tu,{mt:"xl",px:"2rem",py:"1.5rem",children:[L.jsx(St,{weight:700,ta:"left",children:"Signatures Required"}),L.jsxs(Kt,{position:"apart",children:[L.jsx(sL,{mt:me("2.5rem"),w:"70%",pb:"md",px:"md",min:0,max:t.values.pubkeys.length,step:1,value:t.values.mOfN,label:a=>`${a} of ${t.values.pubkeys.length}`,labelAlwaysOn:!0,thumbSize:1,styles:a=>({label:{backgroundColor:a.colorScheme==="dark"?a.colors.dark[3]:a.colors.blue[3]}})}),L.jsxs(Kt,{spacing:5,mt:"md",children:[L.jsx(sv,{size:36,variant:"default",onClick:()=>r.current.decrement(),children:"–"}),L.jsx(k_,{hideControls:!0,value:t.values.mOfN,size:"xs",onChange:a=>t.setValues({mOfN:a!==""?a:1}),handlersRef:r,max:t.values.pubkeys.length,min:1,step:1,styles:{input:{width:me(54),textAlign:"center"}}}),L.jsx(sv,{size:36,variant:"default",onClick:()=>r.current.increment(),children:"+"})]})]})]}),L.jsx(Kt,{position:"right",mt:"xl",mx:"lg",children:L.jsx(xr,{type:"submit",children:"Create Multisig"})})]})})}function hBe(){const[e,t]=$.useState(),[r,n]=$.useState(),o=Zp(),i=$.useCallback(()=>{r!==void 0&&(gY({...r,address:Tb(r)}),o("/multisig/show?name="+r.name))},[r,o]),a=$.useCallback(s=>{if(t(void 0),s===""){t("Please input the configuration");return}try{n(fBe(s))}catch(l){t(`${l}`)}},[n,t]);return L.jsxs(rt,{maw:800,mx:"auto",mt:"5rem",children:[L.jsx(St,{ta:"left",fw:"700",size:"xl",children:"Multisig Configuration"}),L.jsx(Ci.Description,{ta:"left",size:"md",children:"You can import the multisig configuration shared by the creator of the multisig address."}),L.jsx(A_,{placeholder:"Paste the configuration here",minRows:8,mt:"lg",onChange:s=>a(s.target.value)}),e?L.jsx(St,{color:"red",mt:"md",ta:"right",children:e}):null,L.jsxs(Kt,{position:"right",mt:"lg",children:[L.jsx("div",{style:{flex:1}}),L.jsx(xr,{onClick:i,disabled:e!==void 0||r===void 0,children:"Import Multisig"})]})]})}function vBe(){const e=bY(),t=Uu(),r=new URLSearchParams(t.search),n=r.get("name");if(console.log(t.search,r,n),n){const o=e.find(i=>i.name===n);return o===void 0?[e,n,void 0]:[e,n,o]}else return[e,void 0,void 0]}function gBe(){const[e,t,r]=vBe(),[n,{open:o,close:i}]=yR(!1),a=A8(),s=Zp();return L.jsxs(rt,{maw:850,mx:"auto",mt:"5rem",ta:"left",children:[L.jsxs(Kt,{position:"center",children:[L.jsx(St,{fw:"700",size:"xl",children:"Select Multisig"}),L.jsx(I_,{size:"md",placeholder:"Pick one",data:e.map(l=>({value:l.name,label:l.name})),value:t,onChange:l=>s("/multisig/show?name="+l)})]}),L.jsxs(Ia,{opened:n,onClose:i,withCloseButton:!1,styles:{inner:{right:0}},children:[L.jsxs(eN,{icon:L.jsx(pme,{size:"1rem"}),title:"Attention!",color:"red",mt:"lg",children:["This action will remove multisig ",L.jsx(O_,{children:t})," from your browser. You will need to re-import the configuration to use it again."]}),L.jsx(Kt,{position:"center",mt:"lg",children:L.jsx(xr,{color:"red",onClick:()=>{i(),t&&(tBe(t),s("/multisig/show"))},children:"Confirm"})})]}),t&&r&&L.jsxs(rt,{mx:"auto",mt:"2rem",w:"100%",children:[L.jsx(xb,{data:{Address:L.jsx(Kt,{position:"center",mx:"auto",children:L.jsx(Os,{value:Tb(r)})}),"Number of Signers":r.pubkeys.length,"Required Signers":r.mOfN,Signers:L.jsx(xs,{children:r.pubkeys.map(({name:l,pubkey:c})=>{const u=At.addressFromPublicKey(c);return[L.jsx(xs.Col,{span:2,children:L.jsx(my,{h:"100%",children:L.jsxs(St,{fw:"450",my:"auto",ta:"right",children:[l,":"]})})},l),L.jsx(xs.Col,{span:10,children:L.jsx(Os,{value:u,color:(a==null?void 0:a.account.address)===u?"yellow":void 0})},c)]})})}}),L.jsxs(Kt,{position:"apart",mt:"2rem",mx:"lg",children:[L.jsx(xr,{onClick:o,children:"Remove"}),L.jsx(vy,{value:uBe(r),timeout:1e3,children:({copied:l,copy:c})=>L.jsx(Yp,{label:l?"Copied":null,opened:l,withArrow:!0,children:L.jsx(xr,{onClick:c,children:"Export"})})})]})]})]})}function mBe(){const[e,t]=$.useState(),[r,n]=$.useState(),[o,i]=$.useState(!1),[a,s]=$.useState(),[l,c]=$.useState(),[u,f]=$.useState(),d=A8(),[p,h]=$.useState(),m=yh(),_=$.useCallback(async F=>{try{if(i(!0),!At.isHexString(F))throw new Error("Invalid unsigned tx");const O=await wBe(m,F),g=bBe(O.unsignedTx.inputs[0].unlockScript),D=O.unsignedTx.fixedOutputs[0],H=yBe(g);c(g),s(H),f({recipient:D.address,amount:At.prettifyAttoAlphAmount(BigInt(D.attoAlphAmount)),fee:At.prettifyAttoAlphAmount(BigInt(O.unsignedTx.gasPrice)*BigInt(O.unsignedTx.gasAmount)),txId:O.unsignedTx.txId}),i(!1),h(void 0)}catch(O){i(!1),h(`Error: ${O}`),console.error(O)}},[s,i]),[w,y]=$.useState();$.useEffect(()=>{y(void 0)},[d]);const C=$.useCallback(async()=>{try{if(r===void 0||!At.isHexString(r))throw new Error("Invalid unsigned tx");if(d===void 0)throw new Error("Wallet is not connected");if(l!==void 0&&l.find(O=>O.pubkey===d.account.publicKey)===void 0)throw new Error("The currently connected account is not the expected signer");const F=await sBe(d.signer,r);t(F)}catch(F){y(`Error: ${F}`),console.error(F)}},[d,r,t,l]),I=$.useCallback(()=>{i(!1),t(void 0),s(void 0),f(void 0),h(void 0),y(void 0),c(void 0)},[i,t,s]);return L.jsxs(rt,{maw:900,mx:"auto",mt:"5rem",children:[L.jsx(St,{ta:"left",fw:"700",size:"xl",children:"Transaction to sign"}),L.jsx(Ci.Description,{ta:"left",size:"md",children:"The transaction must be created by the multisig address."}),L.jsx(A_,{placeholder:"Paste your multisig transaction here",minRows:6,mt:"md",onChange:F=>{I(),F.target.value===""?n(void 0):(n(F.target.value),_(F.target.value))},styles:{input:{color:"gray",opacity:.9}}}),p?L.jsx(St,{color:"red",mt:"md",mx:"lg",ta:"left",children:p}):o||!r?null:L.jsxs(rt,{mt:"xl",children:[L.jsx(St,{ta:"left",fw:"700",mb:"lg",children:"Transaction Details"}),L.jsx(xb,{px:0,py:0,verticalSpacing:"sm",data:{Multisig:a?L.jsx(n3,{href:`/alephium-toolkit/#/multisig/show?name=${a.name}`,target:"_blank",children:a.name}):L.jsx(O_,{color:"red",children:"unknown"}),Recipient:L.jsx(Os,{value:(u==null?void 0:u.recipient)??""}),"ALPH Amount":(u==null?void 0:u.amount)+" ALPH","Transaction fee":(u==null?void 0:u.fee)+" ALPH","Tx Hash":L.jsx(Os,{value:(u==null?void 0:u.txId)??""})}})]}),w&&L.jsx(St,{color:"red",mt:"md",mx:"lg",ta:"left",children:w}),e?L.jsxs(rt,{children:[L.jsx(St,{ta:"left",fw:"700",mt:"xl",children:"Copy and share the signature:"}),L.jsx(Kt,{position:"apart",mt:"md",children:L.jsx(Os,{value:e.signature})})]}):L.jsx(Kt,{position:"right",mt:"xl",mx:"md",children:L.jsx(xr,{disabled:o||!!p||!r,onClick:C,children:"Sign Transaction"})})]})}function yBe(e){const t=e[e.length-1].index;return lf().find(n=>n.mOfN!==e.length||n.pubkeys.lengthn.pubkeys[i].pubkey===o))}function bBe(e){if(!e.startsWith("01"))throw new Error("Invalid p2mpk unlock script");const t=[],r=parseInt(e.slice(2,4),16);let n=4;for(let o=0;oi.unlockScript===n))throw new Error("Invalid unsigned tx, the input from different address");return r}function xBe(){const e=$.useMemo(()=>{const O=window.localStorage.getItem(Hx);if(O)try{return JSON.parse(O)}catch{return console.log("Failed to parse stored value"),Wx}},[]),t=tK({validateInputOnChange:[`destinations.${Fd}.address`,`destinations.${Fd}.alphAmount`,`signatures.${Fd}.signature`],initialValues:e,validate:{multisig:O=>O===""?"Please select multisig":null,destinations:{address:O=>O===""?"Empty address":At.isBase58(O)?null:"Invalid address",alphAmount:O=>{if(O==="")return"Empty amount";const g=At.convertAlphAmountWithDecimals(O);return g===void 0||g<=0n?"Invalid amount":null}},signatures:{signature:O=>rBe(O)?null:"Invalid signature"}}}),r=bY(),[n,o]=$.useState(),i=yh(),a=eTe(),[s,l]=$.useState(),c=nBe(s);$.useEffect(()=>{if(t.values.multisig==="")l(void 0);else{const O=r.find(g=>g.name===t.values.multisig);O!==void 0&&l(Tb(O))}},[t.values.multisig,r]);const[u,f]=$.useState(),d=$.useCallback(O=>{const g=t.getInputProps(O);return{...g,onChange:H=>{g.onChange(H),f(void 0)}}},[t,f]),p=$.useCallback(async()=>{try{if(t.values.destinations.some((D,H)=>{const G=t.validateField(`destinations.${H}.address`),V=t.validateField(`destinations.${H}.alphAmount`);return G.hasError||V.hasError}))throw new Error("Invalid destinations");const g=await aBe(i,t.values.multisig,t.values.signers,t.values.destinations);f(void 0),console.log(`Build multisig tx result: ${JSON.stringify(g)}`),t.setValues({unsignedTx:g.unsignedTx,step:1})}catch(O){f(`Error in build multisig tx: ${O}`),console.error(O)}},[t]),[h,m]=$.useState(!1),[_,w]=$.useState(),y=$.useCallback(async()=>{try{if(t.values.unsignedTx===void 0)throw new Error("There is no unsigned tx");if(t.values.signatures.some((D,H)=>t.validateField(`signatures.${H}.signature`).hasError))throw new Error("Invalid signatures");const g=await lBe(i,t.values.multisig,t.values.signers,t.values.unsignedTx,t.values.signatures);console.log(`Submit multisig tx result: ${JSON.stringify(g)}`),o(g),t.setValues({step:3}),await xY(a,g.txId),m(!0),w(void 0),eBe()}catch(O){w(`Error in tx submission: ${O}`),console.error(O)}},[t,o]),C=tTe(),I=$.useMemo(()=>{if(t.values.multisig!=="")return r.find(O=>O.name===t.values.multisig)},[t.values.multisig,r]);$.useEffect(()=>{window.localStorage.setItem(Hx,JSON.stringify(t.values))},[t.values]);const F=$.useCallback(()=>{t.setValues(Wx),f(void 0)},[t,f]);return L.jsx(rt,{maw:1200,mx:"auto",mt:"5rem",children:L.jsxs(xs,{columns:13,children:[L.jsx(xs.Col,{span:9,children:t.values.step===0?L.jsxs(rt,{mx:"auto",mt:"xl",ta:"left",children:[L.jsx(I_,{w:"20rem",mx:"auto",size:"md",placeholder:"Select Multisig",data:r.map(O=>({value:O.name,label:O.name})),value:t.values.multisig,onChange:O=>{F(),t.setValues({multisig:O??""})}}),I&&L.jsxs(L.Fragment,{children:[L.jsxs(tu,{mx:"xl",mt:"xl",children:[L.jsxs(St,{ta:"left",fw:"700",children:["Select ",I.mOfN,"-of-",I.pubkeys.length," Signers"]}),L.jsx(Gv.Group,{multiple:!0,onChange:O=>{const g=O.sort((H,G)=>{const V=I.pubkeys.findIndex(S=>S.name===H),P=I.pubkeys.findIndex(S=>S.name===G);return console.log(V,P),V-P}),D=g.map(H=>({name:H,signature:""}));t.setValues({signers:g,signatures:D})},children:L.jsxs(Kt,{position:"center",mt:"lg",children:[...I.pubkeys.map(O=>L.jsx(Gv,{value:O.name,variant:"light",radius:"xl",checked:t.values.signers.includes(O.name),disabled:t.values.signers.length>=I.mOfN&&!t.values.signers.includes(O.name),style:{marginRight:"0.5rem",marginBottom:"0.5rem"},children:O.name}))]})})]}),L.jsxs(tu,{mx:"xl",mt:"xl",children:[L.jsx(St,{ta:"left",fw:"700",children:"Send Assets"}),L.jsxs(Kt,{mt:"lg",position:"apart",mx:"0.5rem",children:[L.jsx(_s,{label:"Recipient",ta:"left",placeholder:"Address",icon:L.jsx(hme,{size:"1.25rem"}),...t.getInputProps("destinations.0.address"),w:"28rem"}),L.jsx(k_,{label:`Balance: ${oBe(c)}`,ta:"left",precision:6,placeholder:"Amount",hideControls:!0,rightSection:"ALPH",rightSectionWidth:"4rem",...d("destinations.0.alphAmount")})]})]}),u&&L.jsx(St,{color:"red",mt:"lg",mx:"lg",children:u}),L.jsxs(Kt,{mt:"lg",position:"apart",mx:"2rem",children:[L.jsx(xr,{onClick:F,children:"Reset"}),L.jsx(xr,{onClick:p,children:"Build Transaction"})]})]})]}):t.values.step===1?L.jsxs(rt,{maw:800,mx:"lg",mt:"xl",ta:"left",children:[L.jsx(St,{fw:"700",size:"lg",children:"Copy and share the transaction to signers"}),L.jsxs(Ci.Description,{ta:"left",size:"md",children:["Signers should paste the transaction on the page"," ",L.jsx(n3,{href:"/alephium-toolkit/#/multisig/sign-tx",target:"_blank",children:"sign-tx"})]}),L.jsx(uL,{h:"lg"}),L.jsx(Os,{value:t.values.unsignedTx??""}),L.jsxs(Kt,{mt:"xl",position:"apart",mx:"lg",children:[L.jsx(xr,{onClick:()=>{t.setValues({step:0})},children:"Back"}),L.jsx(xr,{onClick:()=>{t.setValues({step:2})},children:"Next"})]})]}):t.values.step===2?L.jsxs(rt,{mx:"auto",mt:"xl",ta:"left",children:[L.jsxs(tu,{mx:"lg",children:[L.jsx(St,{ta:"left",fw:"700",children:"Signatures"}),t.values.signers.map((O,g)=>L.jsxs(Kt,{position:"apart",mt:"md",mx:"5rem",children:[L.jsxs(St,{children:[O,":"]}),L.jsx(_s,{w:"32rem",placeholder:"Signature",...t.getInputProps(`signatures.${g}.signature`)})]},O))]}),_&&L.jsx(St,{color:"red",mt:"lg",mx:"lg",children:_}),L.jsxs(Kt,{mt:"xl",position:"apart",mx:"2rem",children:[L.jsx(xr,{onClick:()=>{t.setValues({step:1})},children:"Back"}),L.jsx(xr,{onClick:y,children:"Submit"})]})]}):L.jsxs(rt,{maw:900,mx:"auto",mt:"xl",ta:"left",children:[L.jsx(Kt,{position:"center",mt:"lg",children:h?L.jsx(Gj,{sections:[{value:100,color:"teal"}],size:16*20,thickness:16*2,label:L.jsx(hy,{children:L.jsx($_,{color:"teal",variant:"light",radius:"xl",size:"xl",children:L.jsx(gme,{size:42})})})}):L.jsx(uu,{color:"teal",size:"16rem"})}),h&&L.jsxs(my,{mt:"lg",mx:"2rem",children:[L.jsx(St,{fw:400,fz:"1.5rem",ta:"center",children:"Transaction Submitted"}),L.jsx(n3,{href:`${C}/transactions/${n==null?void 0:n.txId}`,target:"_blank",mx:"auto",children:"View on Explorer"}),L.jsx(xr,{mx:"auto",onClick:()=>{F(),t.setValues({step:0})},children:"Create more transactions"})]})]})}),L.jsx(xs.Col,{offset:1,span:3,children:L.jsx(rt,{maw:400,mx:"auto",mt:"2.5rem",ta:"left",children:L.jsxs(ts,{active:t.values.step,onStepClick:O=>t.setValues({step:O}),orientation:"vertical",allowNextStepsSelect:!1,children:[L.jsx(ts.Step,{label:"Create",description:"Create a new transaction",allowStepSelect:t.values.step!==3&&t.values.step>0}),L.jsx(ts.Step,{label:"Sign",description:"Share the transaction to all signers for signatures",allowStepSelect:t.values.step!==3&&t.values.step>1}),L.jsx(ts.Step,{label:"Submit",description:"Aggregate all signatures and submit the transaction",allowStepSelect:t.values.step!==3&&t.values.step>2}),L.jsx(ts.Step,{label:"Transaction",description:"Available on the explorer"})]})})})]})})}function _Be(){const e=Lr(),t=Da(),r=yh();return $.useEffect(()=>{var n;((n=t.signerProvider)==null?void 0:n.nodeProvider)!==void 0&&At.web3.setCurrentNodeProvider(r)},[t.signerProvider]),L.jsx(Jge,{children:L.jsx(_N,{styles:{main:{background:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0]}},navbarOffsetBreakpoint:"sm",asideOffsetBreakpoint:"sm",navbar:L.jsx($me,{}),footer:L.jsx(yN,{height:60,p:"md",children:L.jsx(St,{fw:"bold",fz:"sm",children:"Powered by BlockFlow, Stateful UTXO, PoLW"})}),header:L.jsx(nTe,{}),children:L.jsxs(qge,{children:[L.jsx(pr,{path:"/",element:L.jsx(sTe,{})}),L.jsx(pr,{path:"/token/all",element:L.jsx(Do,{})}),L.jsx(pr,{path:"/token/info",element:L.jsx(cTe,{})}),L.jsx(pr,{path:"/token/new",element:L.jsx(Do,{})}),L.jsx(pr,{path:"/token/burn",element:L.jsx(Do,{})}),L.jsx(pr,{path:"/nft/all",element:L.jsx(Do,{})}),L.jsx(pr,{path:"/nft/info",element:L.jsx(Do,{})}),L.jsx(pr,{path:"/nft/new-collection",element:L.jsx(Do,{})}),L.jsx(pr,{path:"/nft/burn",element:L.jsx(Do,{})}),L.jsx(pr,{path:"/contract/play",element:L.jsx(Do,{})}),L.jsx(pr,{path:"/contract/info",element:L.jsx(Do,{})}),L.jsx(pr,{path:"/contract/deploy",element:L.jsx(Do,{})}),L.jsx(pr,{path:"/multisig",element:L.jsx(Do,{})}),L.jsx(pr,{path:"/multisig/create",element:L.jsx(pBe,{})}),L.jsx(pr,{path:"/multisig/import",element:L.jsx(hBe,{})}),L.jsx(pr,{path:"/multisig/show",element:L.jsx(gBe,{})}),L.jsx(pr,{path:"/multisig/build-tx",element:L.jsx(xBe,{})}),L.jsx(pr,{path:"/multisig/sign-tx",element:L.jsx(mBe,{})})]})})})}function EBe(){const[e,t]=vR({key:"mantine-color-scheme",defaultValue:"light",getInitialValueInEffect:!1}),[r]=mh(),n=o=>t(o||(e==="dark"?"light":"dark"));return lre([["mod+J",()=>n()]]),L.jsx(E$e,{useTheme:"rounded",network:r,children:L.jsx("div",{className:"App",children:L.jsx(lR,{colorScheme:e,toggleColorScheme:n,children:L.jsx(aR,{withGlobalStyles:!0,withNormalizeCSS:!0,theme:{colorScheme:e},children:L.jsx(rB,{children:L.jsx(_Be,{})})})})})})}r5.createRoot(document.getElementById("root")).render(L.jsx(EBe,{})); diff --git a/index.html b/index.html index c247aa8..2c94a7b 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Vite + React + TS - +