diff --git a/assets/100-4mziT57m.png b/assets/100-4mziT57m.png deleted file mode 100644 index 72cb09d..0000000 Binary files a/assets/100-4mziT57m.png and /dev/null differ diff --git a/assets/1101-MpTks0Nz.png b/assets/1101-MpTks0Nz.png deleted file mode 100644 index 3b9704c..0000000 Binary files a/assets/1101-MpTks0Nz.png and /dev/null differ diff --git a/assets/42161-RT4vZgCg.png b/assets/42161-RT4vZgCg.png deleted file mode 100644 index 353bd81..0000000 Binary files a/assets/42161-RT4vZgCg.png and /dev/null differ diff --git a/assets/56-nhC7rjaG.png b/assets/56-nhC7rjaG.png deleted file mode 100644 index 9b30961..0000000 Binary files a/assets/56-nhC7rjaG.png and /dev/null differ diff --git a/assets/index-_Oy4LPwH.js b/assets/index-7AC-HYeB.js similarity index 62% rename from assets/index-_Oy4LPwH.js rename to assets/index-7AC-HYeB.js index bb89507..bbf8dca 100644 --- a/assets/index-_Oy4LPwH.js +++ b/assets/index-7AC-HYeB.js @@ -1,4 +1,4 @@ -function _S(t,e){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var d5=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function TS(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var h5={exports:{}},th={},v5={exports:{}},Pe={};/** +function Ck(t,e){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var a5=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ek(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var l5={exports:{}},th={},c5={exports:{}},Ie={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function _S(t,e){for(var r=0;r>>1,d=b[g];if(0>>1;gi(x,M))Bi($,x)?(b[g]=$,b[B]=M,g=B):(b[g]=x,b[D]=M,g=D);else if(Bi($,M))b[g]=$,b[B]=M,g=B;else break e}}return _}function i(b,_){var M=b.sortIndex-_.sortIndex;return M!==0?M:b.id-_.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],f=1,u=null,h=3,y=!1,m=!1,p=!1,S=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(b){for(var _=r(c);_!==null;){if(_.callback===null)n(c);else if(_.startTime<=b)n(c),_.sortIndex=_.expirationTime,e(l,_);else break;_=r(c)}}function I(b){if(p=!1,k(b),!m)if(r(l)!==null)m=!0,P(R);else{var _=r(c);_!==null&&N(I,_.startTime-b)}}function R(b,_){m=!1,p&&(p=!1,w(j),j=-1),y=!0;var M=h;try{for(k(_),u=r(l);u!==null&&(!(u.expirationTime>_)||b&&!Z());){var g=u.callback;if(typeof g=="function"){u.callback=null,h=u.priorityLevel;var d=g(u.expirationTime<=_);_=t.unstable_now(),typeof d=="function"?u.callback=d:u===r(l)&&n(l),k(_)}else n(l);u=r(l)}if(u!==null)var T=!0;else{var D=r(c);D!==null&&N(I,D.startTime-_),T=!1}return T}finally{u=null,h=M,y=!1}}var F=!1,z=null,j=-1,K=5,J=-1;function Z(){return!(t.unstable_now()-Jb||125g?(b.sortIndex=M,e(c,b),r(l)===null&&b===r(c)&&(p?(w(j),j=-1):p=!0,N(I,M-g))):(b.sortIndex=d,e(l,b),m||y||(m=!0,P(R))),b},t.unstable_shouldYield=Z,t.unstable_wrapCallback=function(b){var _=h;return function(){var M=h;h=_;try{return b.apply(this,arguments)}finally{h=M}}}})(S5);E5.exports=S5;var YS=E5.exports;/** + */(function(t){function e(b,_){var R=b.length;b.push(_);e:for(;0>>1,d=b[g];if(0>>1;gi(x,R))$i(L,x)?(b[g]=L,b[$]=R,g=$):(b[g]=x,b[O]=R,g=O);else if($i(L,R))b[g]=L,b[$]=R,g=$;else break e}}return _}function i(b,_){var R=b.sortIndex-_.sortIndex;return R!==0?R:b.id-_.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],f=1,u=null,h=3,y=!1,m=!1,p=!1,k=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(b){for(var _=r(c);_!==null;){if(_.callback===null)n(c);else if(_.startTime<=b)n(c),_.sortIndex=_.expirationTime,e(l,_);else break;_=r(c)}}function I(b){if(p=!1,A(b),!m)if(r(l)!==null)m=!0,P(M);else{var _=r(c);_!==null&&N(I,_.startTime-b)}}function M(b,_){m=!1,p&&(p=!1,w(j),j=-1),y=!0;var R=h;try{for(A(_),u=r(l);u!==null&&(!(u.expirationTime>_)||b&&!Z());){var g=u.callback;if(typeof g=="function"){u.callback=null,h=u.priorityLevel;var d=g(u.expirationTime<=_);_=t.unstable_now(),typeof d=="function"?u.callback=d:u===r(l)&&n(l),A(_)}else n(l);u=r(l)}if(u!==null)var T=!0;else{var O=r(c);O!==null&&N(I,O.startTime-_),T=!1}return T}finally{u=null,h=R,y=!1}}var B=!1,U=null,j=-1,K=5,J=-1;function Z(){return!(t.unstable_now()-Jb||125g?(b.sortIndex=R,e(c,b),r(l)===null&&b===r(c)&&(p?(w(j),j=-1):p=!0,N(I,R-g))):(b.sortIndex=d,e(l,b),m||y||(m=!0,P(M))),b},t.unstable_shouldYield=Z,t.unstable_wrapCallback=function(b){var _=h;return function(){var R=h;h=_;try{return b.apply(this,arguments)}finally{h=R}}}})(b5);x5.exports=b5;var qk=x5.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ function _S(t,e){for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Lv=Object.prototype.hasOwnProperty,XS=/^[: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]*$/,Wx={},qx={};function ZS(t){return Lv.call(qx,t)?!0:Lv.call(Wx,t)?!1:XS.test(t)?qx[t]=!0:(Wx[t]=!0,!1)}function ek(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function tk(t,e,r,n){if(e===null||typeof e>"u"||ek(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Kr(t,e,r,n,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Er={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Er[t]=new Kr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Er[e]=new Kr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Er[t]=new Kr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Er[t]=new Kr(t,2,!1,t,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(t){Er[t]=new Kr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Er[t]=new Kr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Er[t]=new Kr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Er[t]=new Kr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Er[t]=new Kr(t,5,!1,t.toLowerCase(),null,!1,!1)});var Jp=/[\-:]([a-z])/g;function Qp(t){return t[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(t){var e=t.replace(Jp,Qp);Er[e]=new Kr(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Jp,Qp);Er[e]=new Kr(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Jp,Qp);Er[e]=new Kr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Er[t]=new Kr(t,1,!1,t.toLowerCase(),null,!1,!1)});Er.xlinkHref=new Kr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Er[t]=new Kr(t,1,!1,t.toLowerCase(),null,!0,!0)});function Yp(t,e,r,n){var i=Er.hasOwnProperty(e)?Er[e]:null;(i!==null?i.type!==0:n||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Lv=Object.prototype.hasOwnProperty,Gk=/^[: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]*$/,Wx={},qx={};function Kk(t){return Lv.call(qx,t)?!0:Lv.call(Wx,t)?!1:Gk.test(t)?qx[t]=!0:(Wx[t]=!0,!1)}function Jk(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function Yk(t,e,r,n){if(e===null||typeof e>"u"||Jk(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Kr(t,e,r,n,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Sr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Sr[t]=new Kr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Sr[e]=new Kr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Sr[t]=new Kr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Sr[t]=new Kr(t,2,!1,t,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(t){Sr[t]=new Kr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Sr[t]=new Kr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Sr[t]=new Kr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Sr[t]=new Kr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Sr[t]=new Kr(t,5,!1,t.toLowerCase(),null,!1,!1)});var Jp=/[\-:]([a-z])/g;function Yp(t){return t[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(t){var e=t.replace(Jp,Yp);Sr[e]=new Kr(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Jp,Yp);Sr[e]=new Kr(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Jp,Yp);Sr[e]=new Kr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Sr[t]=new Kr(t,1,!1,t.toLowerCase(),null,!1,!1)});Sr.xlinkHref=new Kr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Sr[t]=new Kr(t,1,!1,t.toLowerCase(),null,!0,!0)});function Qp(t,e,r,n){var i=Sr.hasOwnProperty(e)?Sr[e]:null;(i!==null?i.type!==0:n||!(2a||i[o]!==s[a]){var l=` -`+i[o].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{b1=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Pc(t):""}function rk(t){switch(t.tag){case 5:return Pc(t.type);case 16:return Pc("Lazy");case 13:return Pc("Suspense");case 19:return Pc("SuspenseList");case 0:case 2:case 15:return t=w1(t.type,!1),t;case 11:return t=w1(t.type.render,!1),t;case 1:return t=w1(t.type,!0),t;default:return""}}function zv(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Ha:return"Fragment";case Va:return"Portal";case $v:return"Profiler";case Xp:return"StrictMode";case Fv:return"Suspense";case jv:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case P5:return(t.displayName||"Context")+".Consumer";case T5:return(t._context.displayName||"Context")+".Provider";case Zp:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case eg:return e=t.displayName||null,e!==null?e:zv(t.type)||"Memo";case Es:e=t._payload,t=t._init;try{return zv(t(e))}catch{}}return null}function nk(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return zv(e);case 8:return e===Xp?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Ys(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function M5(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function ik(t){var e=M5(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Cu(t){t._valueTracker||(t._valueTracker=ik(t))}function R5(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=M5(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Ld(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Uv(t,e){var r=e.checked;return $t({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function Kx(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Ys(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function N5(t,e){e=e.checked,e!=null&&Yp(t,"checked",e,!1)}function Vv(t,e){N5(t,e);var r=Ys(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Hv(t,e.type,r):e.hasOwnProperty("defaultValue")&&Hv(t,e.type,Ys(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Jx(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function Hv(t,e,r){(e!=="number"||Ld(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Ic=Array.isArray;function ll(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=Au.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function yf(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Bc={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},sk=["Webkit","ms","Moz","O"];Object.keys(Bc).forEach(function(t){sk.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Bc[e]=Bc[t]})});function L5(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Bc.hasOwnProperty(t)&&Bc[t]?(""+e).trim():e+"px"}function $5(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=L5(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var ok=$t({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 Gv(t,e){if(e){if(ok[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ne(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ne(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ne(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ne(62))}}function Kv(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 Jv=null;function tg(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Qv=null,cl=null,fl=null;function Xx(t){if(t=eu(t)){if(typeof Qv!="function")throw Error(ne(280));var e=t.stateNode;e&&(e=oh(e),Qv(t.stateNode,t.type,e))}}function F5(t){cl?fl?fl.push(t):fl=[t]:cl=t}function j5(){if(cl){var t=cl,e=fl;if(fl=cl=null,Xx(t),e)for(t=0;t>>=0,t===0?32:31-(gk(t)/mk|0)|0}var Eu=64,Su=4194304;function Mc(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function zd(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,s=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~i;a!==0?n=Mc(a):(s&=o,s!==0&&(n=Mc(s)))}else o=r&~i,o!==0?n=Mc(o):s!==0&&(n=Mc(s));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function Xf(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Zn(e),t[e]=r}function Ck(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=$c),ab=" ",lb=!1;function o3(t,e){switch(t){case"keyup":return Qk.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function a3(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Wa=!1;function Xk(t,e){switch(t){case"compositionend":return a3(e);case"keypress":return e.which!==32?null:(lb=!0,ab);case"textInput":return t=e.data,t===ab&&lb?null:t;default:return null}}function Zk(t,e){if(Wa)return t==="compositionend"||!cg&&o3(t,e)?(t=i3(),ad=og=Is=null,Wa=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=db(r)}}function u3(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?u3(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function d3(){for(var t=window,e=Ld();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Ld(t.document)}return e}function fg(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function l_(t){var e=d3(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&u3(r.ownerDocument.documentElement,r)){if(n!==null&&fg(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!t.extend&&s>n&&(i=n,n=s,s=i),i=hb(r,s);var o=hb(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,qa=null,ry=null,jc=null,ny=!1;function vb(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ny||qa==null||qa!==Ld(n)||(n=qa,"selectionStart"in n&&fg(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}),jc&&wf(jc,n)||(jc=n,n=Hd(ry,"onSelect"),0Ja||(t.current=cy[Ja],cy[Ja]=null,Ja--)}function Ke(t,e){Ja++,cy[Ja]=t.current,t.current=e}var Xs={},Or=fo(Xs),tn=fo(!1),ia=Xs;function Sl(t,e){var r=t.type.contextTypes;if(!r)return Xs;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=e[s];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function rn(t){return t=t.childContextTypes,t!=null}function qd(){kt(tn),kt(Or)}function wb(t,e,r){if(Or.current!==Xs)throw Error(ne(168));Ke(Or,e),Ke(tn,r)}function w3(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(ne(108,nk(t)||"Unknown",i));return $t({},r,n)}function Gd(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Xs,ia=Or.current,Ke(Or,t),Ke(tn,tn.current),!0}function Cb(t,e,r){var n=t.stateNode;if(!n)throw Error(ne(169));r?(t=w3(t,e,ia),n.__reactInternalMemoizedMergedChildContext=t,kt(tn),kt(Or),Ke(Or,t)):kt(tn),Ke(tn,r)}var ji=null,ah=!1,D1=!1;function C3(t){ji===null?ji=[t]:ji.push(t)}function b_(t){ah=!0,C3(t)}function uo(){if(!D1&&ji!==null){D1=!0;var t=0,e=Le;try{var r=ji;for(Le=1;t>=o,i-=o,Hi=1<<32-Zn(e)+i|r<j?(K=z,z=null):K=z.sibling;var J=h(w,z,k[j],I);if(J===null){z===null&&(z=K);break}t&&z&&J.alternate===null&&e(w,z),A=s(J,A,j),F===null?R=J:F.sibling=J,F=J,z=K}if(j===k.length)return r(w,z),Rt&&Do(w,j),R;if(z===null){for(;jj?(K=z,z=null):K=z.sibling;var Z=h(w,z,J.value,I);if(Z===null){z===null&&(z=K);break}t&&z&&Z.alternate===null&&e(w,z),A=s(Z,A,j),F===null?R=Z:F.sibling=Z,F=Z,z=K}if(J.done)return r(w,z),Rt&&Do(w,j),R;if(z===null){for(;!J.done;j++,J=k.next())J=u(w,J.value,I),J!==null&&(A=s(J,A,j),F===null?R=J:F.sibling=J,F=J);return Rt&&Do(w,j),R}for(z=n(w,z);!J.done;j++,J=k.next())J=y(z,w,j,J.value,I),J!==null&&(t&&J.alternate!==null&&z.delete(J.key===null?j:J.key),A=s(J,A,j),F===null?R=J:F.sibling=J,F=J);return t&&z.forEach(function(ie){return e(w,ie)}),Rt&&Do(w,j),R}function S(w,A,k,I){if(typeof k=="object"&&k!==null&&k.type===Ha&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case wu:e:{for(var R=k.key,F=A;F!==null;){if(F.key===R){if(R=k.type,R===Ha){if(F.tag===7){r(w,F.sibling),A=i(F,k.props.children),A.return=w,w=A;break e}}else if(F.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Es&&Pb(R)===F.type){r(w,F.sibling),A=i(F,k.props),A.ref=pc(w,F,k),A.return=w,w=A;break e}r(w,F);break}else e(w,F);F=F.sibling}k.type===Ha?(A=Jo(k.props.children,w.mode,I,k.key),A.return=w,w=A):(I=yd(k.type,k.key,k.props,null,w.mode,I),I.ref=pc(w,A,k),I.return=w,w=I)}return o(w);case Va:e:{for(F=k.key;A!==null;){if(A.key===F)if(A.tag===4&&A.stateNode.containerInfo===k.containerInfo&&A.stateNode.implementation===k.implementation){r(w,A.sibling),A=i(A,k.children||[]),A.return=w,w=A;break e}else{r(w,A);break}else e(w,A);A=A.sibling}A=V1(k,w.mode,I),A.return=w,w=A}return o(w);case Es:return F=k._init,S(w,A,F(k._payload),I)}if(Ic(k))return m(w,A,k,I);if(uc(k))return p(w,A,k,I);Ru(w,k)}return typeof k=="string"&&k!==""||typeof k=="number"?(k=""+k,A!==null&&A.tag===6?(r(w,A.sibling),A=i(A,k),A.return=w,w=A):(r(w,A),A=U1(k,w.mode,I),A.return=w,w=A),o(w)):r(w,A)}return S}var _l=I3(!0),M3=I3(!1),tu={},bi=fo(tu),Sf=fo(tu),kf=fo(tu);function Ho(t){if(t===tu)throw Error(ne(174));return t}function xg(t,e){switch(Ke(kf,e),Ke(Sf,t),Ke(bi,tu),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:qv(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=qv(e,t)}kt(bi),Ke(bi,e)}function Tl(){kt(bi),kt(Sf),kt(kf)}function R3(t){Ho(kf.current);var e=Ho(bi.current),r=qv(e,t.type);e!==r&&(Ke(Sf,t),Ke(bi,r))}function bg(t){Sf.current===t&&(kt(bi),kt(Sf))}var Bt=fo(0);function Zd(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var B1=[];function wg(){for(var t=0;tr?r:4,t(!0);var n=L1.transition;L1.transition={};try{t(!1),e()}finally{Le=r,L1.transition=n}}function K3(){return Mn().memoizedState}function E_(t,e,r){var n=Vs(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},J3(t))Q3(e,r);else if(r=k3(t,e,r,n),r!==null){var i=Hr();ei(r,t,n,i),Y3(r,e,n)}}function S_(t,e,r){var n=Vs(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(J3(t))Q3(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,r);if(i.hasEagerState=!0,i.eagerState=a,ni(a,o)){var l=e.interleaved;l===null?(i.next=i,gg(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=k3(t,e,i,n),r!==null&&(i=Hr(),ei(r,t,n,i),Y3(r,e,n))}}function J3(t){var e=t.alternate;return t===Lt||e!==null&&e===Lt}function Q3(t,e){zc=e0=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function Y3(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,ng(t,r)}}var t0={readContext:In,useCallback:kr,useContext:kr,useEffect:kr,useImperativeHandle:kr,useInsertionEffect:kr,useLayoutEffect:kr,useMemo:kr,useReducer:kr,useRef:kr,useState:kr,useDebugValue:kr,useDeferredValue:kr,useTransition:kr,useMutableSource:kr,useSyncExternalStore:kr,useId:kr,unstable_isNewReconciler:!1},k_={readContext:In,useCallback:function(t,e){return li().memoizedState=[t,e===void 0?null:e],t},useContext:In,useEffect:Mb,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,ud(4194308,4,V3.bind(null,e,t),r)},useLayoutEffect:function(t,e){return ud(4194308,4,t,e)},useInsertionEffect:function(t,e){return ud(4,2,t,e)},useMemo:function(t,e){var r=li();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=li();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=E_.bind(null,Lt,t),[n.memoizedState,t]},useRef:function(t){var e=li();return t={current:t},e.memoizedState=t},useState:Ib,useDebugValue:kg,useDeferredValue:function(t){return li().memoizedState=t},useTransition:function(){var t=Ib(!1),e=t[0];return t=A_.bind(null,t[1]),li().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Lt,i=li();if(Rt){if(r===void 0)throw Error(ne(407));r=r()}else{if(r=e(),yr===null)throw Error(ne(349));oa&30||D3(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,Mb(L3.bind(null,n,s,t),[t]),n.flags|=2048,Pf(9,B3.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=li(),e=yr.identifierPrefix;if(Rt){var r=Wi,n=Hi;r=(n&~(1<<32-Zn(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=_f++,0")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{b1=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Pc(t):""}function Qk(t){switch(t.tag){case 5:return Pc(t.type);case 16:return Pc("Lazy");case 13:return Pc("Suspense");case 19:return Pc("SuspenseList");case 0:case 2:case 15:return t=w1(t.type,!1),t;case 11:return t=w1(t.type.render,!1),t;case 1:return t=w1(t.type,!0),t;default:return""}}function zv(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Ha:return"Fragment";case Va:return"Portal";case Bv:return"Profiler";case Xp:return"StrictMode";case Fv:return"Suspense";case jv:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case S5:return(t.displayName||"Context")+".Consumer";case E5:return(t._context.displayName||"Context")+".Provider";case Zp:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case eg:return e=t.displayName||null,e!==null?e:zv(t.type)||"Memo";case Ss:e=t._payload,t=t._init;try{return zv(t(e))}catch{}}return null}function Xk(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return zv(e);case 8:return e===Xp?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Qs(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function A5(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Zk(t){var e=A5(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Cu(t){t._valueTracker||(t._valueTracker=Zk(t))}function _5(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=A5(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Ld(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Uv(t,e){var r=e.checked;return Bt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function Kx(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Qs(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function T5(t,e){e=e.checked,e!=null&&Qp(t,"checked",e,!1)}function Vv(t,e){T5(t,e);var r=Qs(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Hv(t,e.type,r):e.hasOwnProperty("defaultValue")&&Hv(t,e.type,Qs(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Jx(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function Hv(t,e,r){(e!=="number"||Ld(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Ic=Array.isArray;function ll(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=Eu.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function yf(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Dc={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},eA=["Webkit","ms","Moz","O"];Object.keys(Dc).forEach(function(t){eA.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Dc[e]=Dc[t]})});function M5(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Dc.hasOwnProperty(t)&&Dc[t]?(""+e).trim():e+"px"}function N5(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=M5(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var tA=Bt({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 Gv(t,e){if(e){if(tA[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ne(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ne(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ne(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ne(62))}}function Kv(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 Jv=null;function tg(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Yv=null,cl=null,fl=null;function Xx(t){if(t=eu(t)){if(typeof Yv!="function")throw Error(ne(280));var e=t.stateNode;e&&(e=oh(e),Yv(t.stateNode,t.type,e))}}function O5(t){cl?fl?fl.push(t):fl=[t]:cl=t}function $5(){if(cl){var t=cl,e=fl;if(fl=cl=null,Xx(t),e)for(t=0;t>>=0,t===0?32:31-(dA(t)/hA|0)|0}var Su=64,ku=4194304;function Rc(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function zd(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,s=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~i;a!==0?n=Rc(a):(s&=o,s!==0&&(n=Rc(s)))}else o=r&~i,o!==0?n=Rc(o):s!==0&&(n=Rc(s));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function Xf(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Zn(e),t[e]=r}function gA(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=Bc),ab=" ",lb=!1;function t3(t,e){switch(t){case"keyup":return WA.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function r3(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Wa=!1;function GA(t,e){switch(t){case"compositionend":return r3(e);case"keypress":return e.which!==32?null:(lb=!0,ab);case"textInput":return t=e.data,t===ab&&lb?null:t;default:return null}}function KA(t,e){if(Wa)return t==="compositionend"||!cg&&t3(t,e)?(t=Z5(),ad=og=Is=null,Wa=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=db(r)}}function o3(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?o3(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function a3(){for(var t=window,e=Ld();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Ld(t.document)}return e}function fg(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function n_(t){var e=a3(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&o3(r.ownerDocument.documentElement,r)){if(n!==null&&fg(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!t.extend&&s>n&&(i=n,n=s,s=i),i=hb(r,s);var o=hb(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,qa=null,ry=null,jc=null,ny=!1;function vb(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ny||qa==null||qa!==Ld(n)||(n=qa,"selectionStart"in n&&fg(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}),jc&&wf(jc,n)||(jc=n,n=Hd(ry,"onSelect"),0Ja||(t.current=cy[Ja],cy[Ja]=null,Ja--)}function Ye(t,e){Ja++,cy[Ja]=t.current,t.current=e}var Xs={},Or=fo(Xs),tn=fo(!1),ia=Xs;function kl(t,e){var r=t.type.contextTypes;if(!r)return Xs;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=e[s];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function rn(t){return t=t.childContextTypes,t!=null}function qd(){_t(tn),_t(Or)}function wb(t,e,r){if(Or.current!==Xs)throw Error(ne(168));Ye(Or,e),Ye(tn,r)}function p3(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(ne(108,Xk(t)||"Unknown",i));return Bt({},r,n)}function Gd(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Xs,ia=Or.current,Ye(Or,t),Ye(tn,tn.current),!0}function Cb(t,e,r){var n=t.stateNode;if(!n)throw Error(ne(169));r?(t=p3(t,e,ia),n.__reactInternalMemoizedMergedChildContext=t,_t(tn),_t(Or),Ye(Or,t)):_t(tn),Ye(tn,r)}var ji=null,ah=!1,$1=!1;function g3(t){ji===null?ji=[t]:ji.push(t)}function y_(t){ah=!0,g3(t)}function uo(){if(!$1&&ji!==null){$1=!0;var t=0,e=Fe;try{var r=ji;for(Fe=1;t>=o,i-=o,Hi=1<<32-Zn(e)+i|r<j?(K=U,U=null):K=U.sibling;var J=h(w,U,A[j],I);if(J===null){U===null&&(U=K);break}t&&U&&J.alternate===null&&e(w,U),E=s(J,E,j),B===null?M=J:B.sibling=J,B=J,U=K}if(j===A.length)return r(w,U),Mt&&$o(w,j),M;if(U===null){for(;jj?(K=U,U=null):K=U.sibling;var Z=h(w,U,J.value,I);if(Z===null){U===null&&(U=K);break}t&&U&&Z.alternate===null&&e(w,U),E=s(Z,E,j),B===null?M=Z:B.sibling=Z,B=Z,U=K}if(J.done)return r(w,U),Mt&&$o(w,j),M;if(U===null){for(;!J.done;j++,J=A.next())J=u(w,J.value,I),J!==null&&(E=s(J,E,j),B===null?M=J:B.sibling=J,B=J);return Mt&&$o(w,j),M}for(U=n(w,U);!J.done;j++,J=A.next())J=y(U,w,j,J.value,I),J!==null&&(t&&J.alternate!==null&&U.delete(J.key===null?j:J.key),E=s(J,E,j),B===null?M=J:B.sibling=J,B=J);return t&&U.forEach(function(ie){return e(w,ie)}),Mt&&$o(w,j),M}function k(w,E,A,I){if(typeof A=="object"&&A!==null&&A.type===Ha&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case wu:e:{for(var M=A.key,B=E;B!==null;){if(B.key===M){if(M=A.type,M===Ha){if(B.tag===7){r(w,B.sibling),E=i(B,A.props.children),E.return=w,w=E;break e}}else if(B.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===Ss&&Pb(M)===B.type){r(w,B.sibling),E=i(B,A.props),E.ref=pc(w,B,A),E.return=w,w=E;break e}r(w,B);break}else e(w,B);B=B.sibling}A.type===Ha?(E=Jo(A.props.children,w.mode,I,A.key),E.return=w,w=E):(I=yd(A.type,A.key,A.props,null,w.mode,I),I.ref=pc(w,E,A),I.return=w,w=I)}return o(w);case Va:e:{for(B=A.key;E!==null;){if(E.key===B)if(E.tag===4&&E.stateNode.containerInfo===A.containerInfo&&E.stateNode.implementation===A.implementation){r(w,E.sibling),E=i(E,A.children||[]),E.return=w,w=E;break e}else{r(w,E);break}else e(w,E);E=E.sibling}E=V1(A,w.mode,I),E.return=w,w=E}return o(w);case Ss:return B=A._init,k(w,E,B(A._payload),I)}if(Ic(A))return m(w,E,A,I);if(uc(A))return p(w,E,A,I);Mu(w,A)}return typeof A=="string"&&A!==""||typeof A=="number"?(A=""+A,E!==null&&E.tag===6?(r(w,E.sibling),E=i(E,A),E.return=w,w=E):(r(w,E),E=U1(A,w.mode,I),E.return=w,w=E),o(w)):r(w,E)}return k}var _l=k3(!0),A3=k3(!1),tu={},bi=fo(tu),kf=fo(tu),Af=fo(tu);function Ho(t){if(t===tu)throw Error(ne(174));return t}function xg(t,e){switch(Ye(Af,e),Ye(kf,t),Ye(bi,tu),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:qv(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=qv(e,t)}_t(bi),Ye(bi,e)}function Tl(){_t(bi),_t(kf),_t(Af)}function _3(t){Ho(Af.current);var e=Ho(bi.current),r=qv(e,t.type);e!==r&&(Ye(kf,t),Ye(bi,r))}function bg(t){kf.current===t&&(_t(bi),_t(kf))}var Dt=fo(0);function Zd(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var D1=[];function wg(){for(var t=0;tr?r:4,t(!0);var n=L1.transition;L1.transition={};try{t(!1),e()}finally{Fe=r,L1.transition=n}}function V3(){return Rn().memoizedState}function x_(t,e,r){var n=Vs(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},H3(t))W3(e,r);else if(r=w3(t,e,r,n),r!==null){var i=Hr();ei(r,t,n,i),q3(r,e,n)}}function b_(t,e,r){var n=Vs(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(H3(t))W3(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,r);if(i.hasEagerState=!0,i.eagerState=a,ni(a,o)){var l=e.interleaved;l===null?(i.next=i,gg(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=w3(t,e,i,n),r!==null&&(i=Hr(),ei(r,t,n,i),q3(r,e,n))}}function H3(t){var e=t.alternate;return t===Lt||e!==null&&e===Lt}function W3(t,e){zc=e0=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function q3(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,ng(t,r)}}var t0={readContext:In,useCallback:Ar,useContext:Ar,useEffect:Ar,useImperativeHandle:Ar,useInsertionEffect:Ar,useLayoutEffect:Ar,useMemo:Ar,useReducer:Ar,useRef:Ar,useState:Ar,useDebugValue:Ar,useDeferredValue:Ar,useTransition:Ar,useMutableSource:Ar,useSyncExternalStore:Ar,useId:Ar,unstable_isNewReconciler:!1},w_={readContext:In,useCallback:function(t,e){return li().memoizedState=[t,e===void 0?null:e],t},useContext:In,useEffect:Rb,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,ud(4194308,4,B3.bind(null,e,t),r)},useLayoutEffect:function(t,e){return ud(4194308,4,t,e)},useInsertionEffect:function(t,e){return ud(4,2,t,e)},useMemo:function(t,e){var r=li();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=li();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=x_.bind(null,Lt,t),[n.memoizedState,t]},useRef:function(t){var e=li();return t={current:t},e.memoizedState=t},useState:Ib,useDebugValue:Ag,useDeferredValue:function(t){return li().memoizedState=t},useTransition:function(){var t=Ib(!1),e=t[0];return t=m_.bind(null,t[1]),li().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Lt,i=li();if(Mt){if(r===void 0)throw Error(ne(407));r=r()}else{if(r=e(),yr===null)throw Error(ne(349));oa&30||I3(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,Rb(M3.bind(null,n,s,t),[t]),n.flags|=2048,Pf(9,R3.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=li(),e=yr.identifierPrefix;if(Mt){var r=Wi,n=Hi;r=(n&~(1<<32-Zn(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=_f++,0<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[di]=e,t[Ef]=n,o4(t,e,!1,!1),e.stateNode=t;e:{switch(o=Kv(r,n),r){case"dialog":At("cancel",t),At("close",t),i=n;break;case"iframe":case"object":case"embed":At("load",t),i=n;break;case"video":case"audio":for(i=0;iIl&&(e.flags|=128,n=!0,gc(s,!1),e.lanes=4194304)}else{if(!n)if(t=Zd(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),gc(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Rt)return _r(e),null}else 2*Jt()-s.renderingStartTime>Il&&r!==1073741824&&(e.flags|=128,n=!0,gc(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(r=s.last,r!==null?r.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Jt(),e.sibling=null,r=Bt.current,Ke(Bt,n?r&1|2:r&1),e):(_r(e),null);case 22:case 23:return Rg(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?ln&1073741824&&(_r(e),e.subtreeFlags&6&&(e.flags|=8192)):_r(e),null;case 24:return null;case 25:return null}throw Error(ne(156,e.tag))}function O_(t,e){switch(dg(e),e.tag){case 1:return rn(e.type)&&qd(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Tl(),kt(tn),kt(Or),wg(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return bg(e),null;case 13:if(kt(Bt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ne(340));kl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return kt(Bt),null;case 4:return Tl(),null;case 10:return pg(e.type._context),null;case 22:case 23:return Rg(),null;case 24:return null;default:return null}}var Ou=!1,Pr=!1,D_=typeof WeakSet=="function"?WeakSet:Set,ae=null;function Za(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){zt(t,e,n)}else r.current=null}function wy(t,e,r){try{r()}catch(n){zt(t,e,n)}}var jb=!1;function B_(t,e){if(iy=Ud,t=d3(),fg(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,c=0,f=0,u=t,h=null;t:for(;;){for(var y;u!==r||i!==0&&u.nodeType!==3||(a=o+i),u!==s||n!==0&&u.nodeType!==3||(l=o+n),u.nodeType===3&&(o+=u.nodeValue.length),(y=u.firstChild)!==null;)h=u,u=y;for(;;){if(u===t)break t;if(h===r&&++c===i&&(a=o),h===s&&++f===n&&(l=o),(y=u.nextSibling)!==null)break;u=h,h=u.parentNode}u=y}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(sy={focusedElem:t,selectionRange:r},Ud=!1,ae=e;ae!==null;)if(e=ae,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ae=t;else for(;ae!==null;){e=ae;try{var m=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var p=m.memoizedProps,S=m.memoizedState,w=e.stateNode,A=w.getSnapshotBeforeUpdate(e.elementType===e.type?p:Wn(e.type,p),S);w.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var k=e.stateNode.containerInfo;k.nodeType===1?k.textContent="":k.nodeType===9&&k.documentElement&&k.removeChild(k.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(I){zt(e,e.return,I)}if(t=e.sibling,t!==null){t.return=e.return,ae=t;break}ae=e.return}return m=jb,jb=!1,m}function Uc(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&wy(e,r,s)}i=i.next}while(i!==n)}}function fh(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Cy(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function c4(t){var e=t.alternate;e!==null&&(t.alternate=null,c4(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[di],delete e[Ef],delete e[ly],delete e[m_],delete e[x_])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function f4(t){return t.tag===5||t.tag===3||t.tag===4}function zb(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||f4(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Ay(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Wd));else if(n!==4&&(t=t.child,t!==null))for(Ay(t,e,r),t=t.sibling;t!==null;)Ay(t,e,r),t=t.sibling}function Ey(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Ey(t,e,r),t=t.sibling;t!==null;)Ey(t,e,r),t=t.sibling}var xr=null,Gn=!1;function xs(t,e,r){for(r=r.child;r!==null;)u4(t,e,r),r=r.sibling}function u4(t,e,r){if(xi&&typeof xi.onCommitFiberUnmount=="function")try{xi.onCommitFiberUnmount(rh,r)}catch{}switch(r.tag){case 5:Pr||Za(r,e);case 6:var n=xr,i=Gn;xr=null,xs(t,e,r),xr=n,Gn=i,xr!==null&&(Gn?(t=xr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):xr.removeChild(r.stateNode));break;case 18:xr!==null&&(Gn?(t=xr,r=r.stateNode,t.nodeType===8?O1(t.parentNode,r):t.nodeType===1&&O1(t,r),xf(t)):O1(xr,r.stateNode));break;case 4:n=xr,i=Gn,xr=r.stateNode.containerInfo,Gn=!0,xs(t,e,r),xr=n,Gn=i;break;case 0:case 11:case 14:case 15:if(!Pr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&wy(r,e,o),i=i.next}while(i!==n)}xs(t,e,r);break;case 1:if(!Pr&&(Za(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){zt(r,e,a)}xs(t,e,r);break;case 21:xs(t,e,r);break;case 22:r.mode&1?(Pr=(n=Pr)||r.memoizedState!==null,xs(t,e,r),Pr=n):xs(t,e,r);break;default:xs(t,e,r)}}function Ub(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new D_),e.forEach(function(n){var i=W_.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Ln(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~s}if(n=i,n=Jt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*$_(n/1960))-n,10t?16:t,Ms===null)var n=!1;else{if(t=Ms,Ms=null,i0=0,Oe&6)throw Error(ne(331));var i=Oe;for(Oe|=4,ae=t.current;ae!==null;){var s=ae,o=s.child;if(ae.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lJt()-Ig?Ko(t,0):Pg|=r),nn(t,e)}function x4(t,e){e===0&&(t.mode&1?(e=Su,Su<<=1,!(Su&130023424)&&(Su=4194304)):e=1);var r=Hr();t=Yi(t,e),t!==null&&(Xf(t,e,r),nn(t,r))}function H_(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),x4(t,r)}function W_(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(ne(314))}n!==null&&n.delete(e),x4(t,r)}var b4;b4=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||tn.current)Zr=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Zr=!1,R_(t,e,r);Zr=!!(t.flags&131072)}else Zr=!1,Rt&&e.flags&1048576&&A3(e,Jd,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;dd(t,e),t=e.pendingProps;var i=Sl(e,Or.current);dl(e,r),i=Ag(null,e,n,t,i,r);var s=Eg();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,rn(n)?(s=!0,Gd(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,mg(e),i.updater=lh,e.stateNode=i,i._reactInternals=e,vy(e,n,t,r),e=gy(null,e,n,!0,s,r)):(e.tag=0,Rt&&s&&ug(e),zr(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(dd(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=G_(n),t=Wn(n,t),i){case 0:e=py(null,e,n,t,r);break e;case 1:e=Lb(null,e,n,t,r);break e;case 11:e=Db(null,e,n,t,r);break e;case 14:e=Bb(null,e,n,Wn(n.type,t),r);break e}throw Error(ne(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Wn(n,i),py(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Wn(n,i),Lb(t,e,n,i,r);case 3:e:{if(n4(e),t===null)throw Error(ne(387));n=e.pendingProps,s=e.memoizedState,i=s.element,_3(t,e),Xd(e,n,null,r);var o=e.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=Pl(Error(ne(423)),e),e=$b(t,e,n,r,i);break e}else if(n!==i){i=Pl(Error(ne(424)),e),e=$b(t,e,n,r,i);break e}else for(dn=js(e.stateNode.containerInfo.firstChild),hn=e,Rt=!0,Kn=null,r=M3(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(kl(),n===i){e=Xi(t,e,r);break e}zr(t,e,n,r)}e=e.child}return e;case 5:return R3(e),t===null&&uy(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,oy(n,i)?o=null:s!==null&&oy(n,s)&&(e.flags|=32),r4(t,e),zr(t,e,o,r),e.child;case 6:return t===null&&uy(e),null;case 13:return i4(t,e,r);case 4:return xg(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=_l(e,null,n,r):zr(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Wn(n,i),Db(t,e,n,i,r);case 7:return zr(t,e,e.pendingProps,r),e.child;case 8:return zr(t,e,e.pendingProps.children,r),e.child;case 12:return zr(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,Ke(Qd,n._currentValue),n._currentValue=o,s!==null)if(ni(s.value,o)){if(s.children===i.children&&!tn.current){e=Xi(t,e,r);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=Gi(-1,r&-r),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),dy(s.return,r,e),a.lanes|=r;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(ne(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),dy(o,r,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}zr(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,dl(e,r),i=In(i),n=n(i),e.flags|=1,zr(t,e,n,r),e.child;case 14:return n=e.type,i=Wn(n,e.pendingProps),i=Wn(n.type,i),Bb(t,e,n,i,r);case 15:return e4(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Wn(n,i),dd(t,e),e.tag=1,rn(n)?(t=!0,Gd(e)):t=!1,dl(e,r),P3(e,n,i),vy(e,n,i,r),gy(null,e,n,!0,t,r);case 19:return s4(t,e,r);case 22:return t4(t,e,r)}throw Error(ne(156,e.tag))};function w4(t,e){return G5(t,e)}function q_(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 _n(t,e,r,n){return new q_(t,e,r,n)}function Og(t){return t=t.prototype,!(!t||!t.isReactComponent)}function G_(t){if(typeof t=="function")return Og(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Zp)return 11;if(t===eg)return 14}return 2}function Hs(t,e){var r=t.alternate;return r===null?(r=_n(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function yd(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")Og(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Ha:return Jo(r.children,i,s,e);case Xp:o=8,i|=8;break;case $v:return t=_n(12,r,e,i|2),t.elementType=$v,t.lanes=s,t;case Fv:return t=_n(13,r,e,i),t.elementType=Fv,t.lanes=s,t;case jv:return t=_n(19,r,e,i),t.elementType=jv,t.lanes=s,t;case I5:return dh(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case T5:o=10;break e;case P5:o=9;break e;case Zp:o=11;break e;case eg:o=14;break e;case Es:o=16,n=null;break e}throw Error(ne(130,t==null?t:typeof t,""))}return e=_n(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function Jo(t,e,r,n){return t=_n(7,t,n,e),t.lanes=r,t}function dh(t,e,r,n){return t=_n(22,t,n,e),t.elementType=I5,t.lanes=r,t.stateNode={isHidden:!1},t}function U1(t,e,r){return t=_n(6,t,null,e),t.lanes=r,t}function V1(t,e,r){return e=_n(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function K_(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=A1(0),this.expirationTimes=A1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=A1(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Dg(t,e,r,n,i,s,o,a,l){return t=new K_(t,e,r,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=_n(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},mg(s),t}function J_(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(S4)}catch(t){console.error(t)}}S4(),A5.exports=mn;var ho=A5.exports;const eT=lo(ho),Fg=E.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),gh=E.createContext({});function tT(){return E.useContext(gh).visualElement}const ru=E.createContext(null),mh=typeof document<"u",a0=mh?E.useLayoutEffect:E.useEffect,k4=E.createContext({strict:!1});function rT(t,e,r,n){const i=tT(),s=E.useContext(k4),o=E.useContext(ru),a=E.useContext(Fg).reducedMotion,l=E.useRef();n=n||s.renderer,!l.current&&n&&(l.current=n(t,{visualState:e,parent:i,props:r,presenceId:o?o.id:void 0,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;return a0(()=>{c&&c.render()}),(window.HandoffAppearAnimations?a0:E.useEffect)(()=>{c&&c.animationState&&c.animationState.animateChanges()}),c}function tl(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function nT(t,e,r){return E.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):tl(r)&&(r.current=n))},[e])}function Mf(t){return typeof t=="string"||Array.isArray(t)}function xh(t){return typeof t=="object"&&typeof t.start=="function"}const iT=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function bh(t){return xh(t.animate)||iT.some(e=>Mf(t[e]))}function _4(t){return!!(bh(t)||t.variants)}function sT(t,e){if(bh(t)){const{initial:r,animate:n}=t;return{initial:r===!1||Mf(r)?r:void 0,animate:Mf(n)?n:void 0}}return t.inherit!==!1?e:{}}function oT(t){const{initial:e,animate:r}=sT(t,E.useContext(gh));return E.useMemo(()=>({initial:e,animate:r}),[Qb(e),Qb(r)])}function Qb(t){return Array.isArray(t)?t.join(" "):t}const Oi=t=>({isEnabled:e=>t.some(r=>!!e[r])}),Rf={measureLayout:Oi(["layout","layoutId","drag"]),animation:Oi(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Oi(["exit"]),drag:Oi(["drag","dragControls"]),focus:Oi(["whileFocus"]),hover:Oi(["whileHover","onHoverStart","onHoverEnd"]),tap:Oi(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Oi(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Oi(["whileInView","onViewportEnter","onViewportLeave"])};function aT(t){for(const e in t)e==="projectionNodeConstructor"?Rf.projectionNodeConstructor=t[e]:Rf[e].Component=t[e]}function wh(t){const e=E.useRef(null);return e.current===null&&(e.current=t()),e.current}const Wc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let lT=1;function cT(){return wh(()=>{if(Wc.hasEverUpdated)return lT++})}const jg=E.createContext({});class fT extends sr.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}}const T4=E.createContext({}),uT=Symbol.for("motionComponentSymbol");function dT({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:i,Component:s}){t&&aT(t);function o(l,c){const f={...E.useContext(Fg),...l,layoutId:hT(l)},{isStatic:u}=f;let h=null;const y=oT(l),m=u?void 0:cT(),p=i(l,u);if(!u&&mh){y.visualElement=rT(s,p,f,e);const S=E.useContext(k4).strict,w=E.useContext(T4);y.visualElement&&(h=y.visualElement.loadFeatures(f,S,t,m,r||Rf.projectionNodeConstructor,w))}return E.createElement(fT,{visualElement:y.visualElement,props:f},h,E.createElement(gh.Provider,{value:y},n(s,l,m,nT(p,y.visualElement,c),p,u,y.visualElement)))}const a=E.forwardRef(o);return a[uT]=s,a}function hT({layoutId:t}){const e=E.useContext(jg).id;return e&&t!==void 0?e+"-"+t:t}function vT(t){function e(n,i={}){return dT(t(n,i))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,i)=>(r.has(i)||r.set(i,e(i)),r.get(i))})}const yT=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function zg(t){return typeof t!="string"||t.includes("-")?!1:!!(yT.indexOf(t)>-1||/[A-Z]/.test(t))}const l0={};function pT(t){Object.assign(l0,t)}const c0=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Jl=new Set(c0);function P4(t,{layout:e,layoutId:r}){return Jl.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!l0[t]||t==="opacity")}const sn=t=>!!(t!=null&&t.getVelocity),gT={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},mT=(t,e)=>c0.indexOf(t)-c0.indexOf(e);function xT({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},i,s){let o="";e.sort(mT);for(const a of e)o+=`${gT[a]||a}(${t[a]}) `;return r&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,i?"":o):n&&i&&(o="none"),o}function I4(t){return t.startsWith("--")}const bT=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Ml=(t,e,r)=>Math.min(Math.max(r,t),e),ba={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},qc={...ba,transform:t=>Ml(0,1,t)},Lu={...ba,default:1},Gc=t=>Math.round(t*1e5)/1e5,Nf=/(-)?([\d]*\.?[\d])+/g,Py=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,wT=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function nu(t){return typeof t=="string"}const iu=t=>({test:e=>nu(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Cs=iu("deg"),wi=iu("%"),ye=iu("px"),CT=iu("vh"),AT=iu("vw"),Yb={...wi,parse:t=>wi.parse(t)/100,transform:t=>wi.transform(t*100)},Xb={...ba,transform:Math.round},M4={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,size:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,rotate:Cs,rotateX:Cs,rotateY:Cs,rotateZ:Cs,scale:Lu,scaleX:Lu,scaleY:Lu,scaleZ:Lu,skew:Cs,skewX:Cs,skewY:Cs,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:qc,originX:Yb,originY:Yb,originZ:ye,zIndex:Xb,fillOpacity:qc,strokeOpacity:qc,numOctaves:Xb};function Ug(t,e,r,n){const{style:i,vars:s,transform:o,transformKeys:a,transformOrigin:l}=t;a.length=0;let c=!1,f=!1,u=!0;for(const h in e){const y=e[h];if(I4(h)){s[h]=y;continue}const m=M4[h],p=bT(y,m);if(Jl.has(h)){if(c=!0,o[h]=p,a.push(h),!u)continue;y!==(m.default||0)&&(u=!1)}else h.startsWith("origin")?(f=!0,l[h]=p):i[h]=p}if(e.transform||(c||n?i.transform=xT(t,r,u,n):i.transform&&(i.transform="none")),f){const{originX:h="50%",originY:y="50%",originZ:m=0}=l;i.transformOrigin=`${h} ${y} ${m}`}}const Vg=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function R4(t,e,r){for(const n in e)!sn(e[n])&&!P4(n,r)&&(t[n]=e[n])}function ET({transformTemplate:t},e,r){return E.useMemo(()=>{const n=Vg();return Ug(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function ST(t,e,r){const n=t.style||{},i={};return R4(i,n,t),Object.assign(i,ET(t,e,r)),t.transformValues?t.transformValues(i):i}function kT(t,e,r){const n={},i=ST(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const _T=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","viewport"]);function f0(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||_T.has(t)}let N4=t=>!f0(t);function TT(t){t&&(N4=e=>e.startsWith("on")?!f0(e):t(e))}try{TT(require("@emotion/is-prop-valid").default)}catch{}function PT(t,e,r){const n={};for(const i in t)i==="values"&&typeof t.values=="object"||(N4(i)||r===!0&&f0(i)||!e&&!f0(i)||t.draggable&&i.startsWith("onDrag"))&&(n[i]=t[i]);return n}function Zb(t,e,r){return typeof t=="string"?t:ye.transform(e+r*t)}function IT(t,e,r){const n=Zb(e,t.x,t.width),i=Zb(r,t.y,t.height);return`${n} ${i}`}const MT={offset:"stroke-dashoffset",array:"stroke-dasharray"},RT={offset:"strokeDashoffset",array:"strokeDasharray"};function NT(t,e,r=1,n=0,i=!0){t.pathLength=1;const s=i?MT:RT;t[s.offset]=ye.transform(-n);const o=ye.transform(e),a=ye.transform(r);t[s.array]=`${o} ${a}`}function Hg(t,{attrX:e,attrY:r,originX:n,originY:i,pathLength:s,pathSpacing:o=1,pathOffset:a=0,...l},c,f,u){if(Ug(t,l,c,u),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:y,dimensions:m}=t;h.transform&&(m&&(y.transform=h.transform),delete h.transform),m&&(n!==void 0||i!==void 0||y.transform)&&(y.transformOrigin=IT(m,n!==void 0?n:.5,i!==void 0?i:.5)),e!==void 0&&(h.x=e),r!==void 0&&(h.y=r),s!==void 0&&NT(h,s,o,a,!1)}const O4=()=>({...Vg(),attrs:{}}),Wg=t=>typeof t=="string"&&t.toLowerCase()==="svg";function OT(t,e,r,n){const i=E.useMemo(()=>{const s=O4();return Hg(s,e,{enableHardwareAcceleration:!1},Wg(n),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};R4(s,t.style,t),i.style={...s,...i.style}}return i}function DT(t=!1){return(r,n,i,s,{latestValues:o},a)=>{const c=(zg(r)?OT:kT)(n,o,a,r),u={...PT(n,typeof r=="string",t),...c,ref:s},{children:h}=n,y=E.useMemo(()=>sn(h)?h.get():h,[h]);return i&&(u["data-projection-id"]=i),E.createElement(r,{...u,children:y})}}const qg=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function D4(t,{style:e,vars:r},n,i){Object.assign(t.style,e,i&&i.getProjectionStyles(n));for(const s in r)t.style.setProperty(s,r[s])}const B4=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function L4(t,e,r,n){D4(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(B4.has(i)?i:qg(i),e.attrs[i])}function Gg(t,e){const{style:r}=t,n={};for(const i in r)(sn(r[i])||e.style&&sn(e.style[i])||P4(i,t))&&(n[i]=r[i]);return n}function $4(t,e){const r=Gg(t,e);for(const n in t)if(sn(t[n])||sn(e[n])){const i=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[i]=t[n]}return r}function Kg(t,e,r,n={},i={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,i)),e}const u0=t=>Array.isArray(t),BT=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),LT=t=>u0(t)?t[t.length-1]||0:t;function pd(t){const e=sn(t)?t.get():t;return BT(e)?e.toValue():e}function $T({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,i,s){const o={latestValues:FT(n,i,s,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const F4=t=>(e,r)=>{const n=E.useContext(gh),i=E.useContext(ru),s=()=>$T(t,e,n,i);return r?s():wh(s)};function FT(t,e,r,n){const i={},s=n(t,{});for(const h in s)i[h]=pd(s[h]);let{initial:o,animate:a}=t;const l=bh(t),c=_4(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let f=r?r.initial===!1:!1;f=f||o===!1;const u=f?a:o;return u&&typeof u!="boolean"&&!xh(u)&&(Array.isArray(u)?u:[u]).forEach(y=>{const m=Kg(t,y);if(!m)return;const{transitionEnd:p,transition:S,...w}=m;for(const A in w){let k=w[A];if(Array.isArray(k)){const I=f?k.length-1:0;k=k[I]}k!==null&&(i[A]=k)}for(const A in p)i[A]=p[A]}),i}const jT={useVisualState:F4({scrapeMotionValuesFromProps:$4,createRenderState:O4,onMount:(t,e,{renderState:r,latestValues:n})=>{try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}Hg(r,n,{enableHardwareAcceleration:!1},Wg(e.tagName),t.transformTemplate),L4(e,r)}})},zT={useVisualState:F4({scrapeMotionValuesFromProps:Gg,createRenderState:Vg})};function UT(t,{forwardMotionProps:e=!1},r,n,i){return{...zg(t)?jT:zT,preloadedFeatures:r,useRender:DT(e),createVisualElement:n,projectionNodeConstructor:i,Component:t}}var Ge;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(Ge||(Ge={}));function Qo(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function d0(t,e,r,n){E.useEffect(()=>{const i=t.current;if(r&&i)return Qo(i,e,r,n)},[t,e,r,n])}function VT({whileFocus:t,visualElement:e}){const r=E.useRef(!1),{animationState:n}=e,i=E.useCallback(()=>{let o=!1;try{o=e.current.matches(":focus-visible")}catch{o=!0}!o||!n||(n.setActive(Ge.Focus,!0),r.current=!0)},[n]),s=E.useCallback(()=>{!r.current||!n||(n.setActive(Ge.Focus,!1),r.current=!1)},[n]);d0(e,"focus",t?i:void 0),d0(e,"blur",t?s:void 0)}const j4=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Ch(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const z4=t=>e=>j4(e)&&t(e,Ch(e));function vl(t,e,r,n){return Qo(t,e,z4(r),n)}function h0(t,e,r,n){return d0(t,e,r&&z4(r),n)}function U4(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const e2=U4("dragHorizontal"),t2=U4("dragVertical");function V4(t){let e=!1;if(t==="y")e=t2();else if(t==="x")e=e2();else{const r=e2(),n=t2();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function H4(){const t=V4(!0);return t?(t(),!1):!0}function r2(t,e,r,n){return(i,s)=>{i.type==="touch"||H4()||(r&&t.animationState&&t.animationState.setActive(Ge.Hover,e),n&&n(i,s))}}function HT({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){h0(n,"pointerenter",E.useMemo(()=>t||r?r2(n,!0,!!r,t):void 0,[t,!!r,n]),{passive:!t}),h0(n,"pointerleave",E.useMemo(()=>e||r?r2(n,!1,!!r,e):void 0,[t,!!r,n]),{passive:!e})}const W4=(t,e)=>e?t===e?!0:W4(t,e.parentElement):!1;function Jg(t){return E.useEffect(()=>()=>t(),[])}const WT=(t,e)=>r=>e(t(r)),Ah=(...t)=>t.reduce(WT);function H1(t,e){if(!e)return;const r=new PointerEvent("pointer"+t);e(r,Ch(r))}function qT({onTap:t,onTapStart:e,onTapCancel:r,whileTap:n,visualElement:i,...s}){const o=t||e||r||n,a=E.useRef(!1),l=E.useRef(null),c={passive:!(e||t||r||s.onPointerDown)};function f(){l.current&&l.current(),l.current=null}function u(){return f(),a.current=!1,i.getProps().whileTap&&i.animationState&&i.animationState.setActive(Ge.Tap,!1),!H4()}function h(A,k){var I,R,F,z;u()&&(W4(i.current,A.target)?(z=(F=i.getProps()).onTap)===null||z===void 0||z.call(F,A,k):(R=(I=i.getProps()).onTapCancel)===null||R===void 0||R.call(I,A,k))}function y(A,k){var I,R;u()&&((R=(I=i.getProps()).onTapCancel)===null||R===void 0||R.call(I,A,k))}function m(A,k){var I;const R=i.getProps();R.whileTap&&i.animationState&&i.animationState.setActive(Ge.Tap,!0),(I=R.onTapStart)===null||I===void 0||I.call(R,A,k)}const p=[!!e,!!t,!!n,i],S=E.useCallback((A,k)=>{f(),!a.current&&(a.current=!0,l.current=Ah(vl(window,"pointerup",h,c),vl(window,"pointercancel",y,c)),m(A,k))},p);h0(i,"pointerdown",o?S:void 0,c);const w=E.useCallback(()=>{const A=Qo(i.current,"keydown",I=>{I.key!=="Enter"||a.current||(a.current=!0,l.current=Qo(i.current,"keyup",()=>{I.key!=="Enter"||!u()||H1("up",i.getProps().onTap)},c),H1("down",m))}),k=Qo(i.current,"blur",()=>{A(),k(),a.current&&H1("cancel",y)})},p);d0(i,"focus",o?w:void 0),Jg(f)}const Iy=new WeakMap,W1=new WeakMap,GT=t=>{const e=Iy.get(t.target);e&&e(t)},KT=t=>{t.forEach(GT)};function JT({root:t,...e}){const r=t||document;W1.has(r)||W1.set(r,{});const n=W1.get(r),i=JSON.stringify(e);return n[i]||(n[i]=new IntersectionObserver(KT,{root:t,...e})),n[i]}function QT(t,e,r){const n=JT(e);return Iy.set(t,r),n.observe(t),()=>{Iy.delete(t),n.unobserve(t)}}function YT({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:i={}}){const s=E.useRef({hasEnteredView:!1,isInView:!1});let o=!!(e||r||n);i.once&&s.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?eP:ZT)(o,s.current,t,i)}const XT={some:0,all:1};function ZT(t,e,r,{root:n,margin:i,amount:s="some",once:o}){E.useEffect(()=>{if(!t||!r.current)return;const a={root:n==null?void 0:n.current,rootMargin:i,threshold:typeof s=="number"?s:XT[s]},l=c=>{const{isIntersecting:f}=c;if(e.isInView===f||(e.isInView=f,o&&!f&&e.hasEnteredView))return;f&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(Ge.InView,f);const u=r.getProps(),h=f?u.onViewportEnter:u.onViewportLeave;h&&h(c)};return QT(r.current,a,l)},[t,n,i,s])}function eP(t,e,r,{fallback:n=!0}){E.useEffect(()=>{!t||!n||requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:i}=r.getProps();i&&i(null),r.animationState&&r.animationState.setActive(Ge.InView,!0)})},[t])}const Rs=t=>e=>(t(e),null),tP={inView:Rs(YT),tap:Rs(qT),focus:Rs(VT),hover:Rs(HT)};function q4(){const t=E.useContext(ru);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,i=E.useId();return E.useEffect(()=>n(i),[]),!e&&r?[!1,()=>r&&r(i)]:[!0]}function G4(t,e){if(!Array.isArray(e))return!1;const r=e.length;if(r!==t.length)return!1;for(let n=0;n/^\-?\d*\.?\d+$/.test(t),nP=t=>/^0[^.\s]+$/.test(t),Ki={delta:0,timestamp:0},K4=1/60*1e3,iP=typeof performance<"u"?()=>performance.now():()=>Date.now(),J4=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(iP()),K4);function sP(t){let e=[],r=[],n=0,i=!1,s=!1;const o=new WeakSet,a={schedule:(l,c=!1,f=!1)=>{const u=f&&i,h=u?e:r;return c&&o.add(l),h.indexOf(l)===-1&&(h.push(l),u&&i&&(n=e.length)),l},cancel:l=>{const c=r.indexOf(l);c!==-1&&r.splice(c,1),o.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let c=0;c(t[e]=sP(()=>Of=!0),t),{}),Rr=su.reduce((t,e)=>{const r=Eh[e];return t[e]=(n,i=!1,s=!1)=>(Of||lP(),r.schedule(n,i,s)),t},{}),Zs=su.reduce((t,e)=>(t[e]=Eh[e].cancel,t),{}),q1=su.reduce((t,e)=>(t[e]=()=>Eh[e].process(Ki),t),{}),aP=t=>Eh[t].process(Ki),Q4=t=>{Of=!1,Ki.delta=My?K4:Math.max(Math.min(t-Ki.timestamp,oP),1),Ki.timestamp=t,Ry=!0,su.forEach(aP),Ry=!1,Of&&(My=!1,J4(Q4))},lP=()=>{Of=!0,My=!0,Ry||J4(Q4)};function Qg(t,e){t.indexOf(e)===-1&&t.push(e)}function Yg(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class Xg{constructor(){this.subscriptions=[]}add(e){return Qg(this.subscriptions,e),()=>Yg(this.subscriptions,e)}notify(e,r,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,r,n);else for(let s=0;s!isNaN(parseFloat(t));class fP{constructor(e,r={}){this.version="9.0.1",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,i=!0)=>{this.prev=this.current,this.current=n;const{delta:s,timestamp:o}=Ki;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,Rr.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Rr.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=cP(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new Xg);const n=this.events[e].add(r);return e==="change"?()=>{n(),Rr.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e,r=!0){!r||!this.passiveEffect?this.updateAndNotify(e,r):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,r,n){this.set(r),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Zg(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Rl(t,e){return new fP(t,e)}const em=(t,e)=>r=>!!(nu(r)&&wT.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),Y4=(t,e,r)=>n=>{if(!nu(n))return n;const[i,s,o,a]=n.match(Nf);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},uP=t=>Ml(0,255,t),G1={...ba,transform:t=>Math.round(uP(t))},Wo={test:em("rgb","red"),parse:Y4("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+G1.transform(t)+", "+G1.transform(e)+", "+G1.transform(r)+", "+Gc(qc.transform(n))+")"};function dP(t){let e="",r="",n="",i="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,r+=r,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const Ny={test:em("#"),parse:dP,transform:Wo.transform},rl={test:em("hsl","hue"),parse:Y4("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+wi.transform(Gc(e))+", "+wi.transform(Gc(r))+", "+Gc(qc.transform(n))+")"},jr={test:t=>Wo.test(t)||Ny.test(t)||rl.test(t),parse:t=>Wo.test(t)?Wo.parse(t):rl.test(t)?rl.parse(t):Ny.parse(t),transform:t=>nu(t)?t:t.hasOwnProperty("red")?Wo.transform(t):rl.transform(t)},X4="${c}",Z4="${n}";function hP(t){var e,r;return isNaN(t)&&nu(t)&&(((e=t.match(Nf))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(Py))===null||r===void 0?void 0:r.length)||0)>0}function v0(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const i=t.match(Py);i&&(r=i.length,t=t.replace(Py,X4),e.push(...i.map(jr.parse)));const s=t.match(Nf);return s&&(n=s.length,t=t.replace(Nf,Z4),e.push(...s.map(ba.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function e8(t){return v0(t).values}function t8(t){const{values:e,numColors:r,tokenised:n}=v0(t),i=e.length;return s=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function yP(t){const e=e8(t);return t8(t)(e.map(vP))}const eo={test:hP,parse:e8,createTransformer:t8,getAnimatableNone:yP},pP=new Set(["brightness","contrast","saturate","opacity"]);function gP(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(Nf)||[];if(!n)return t;const i=r.replace(n,"");let s=pP.has(e)?1:0;return n!==r&&(s*=100),e+"("+s+i+")"}const mP=/([a-z-]*)\(.*?\)/g,Oy={...eo,getAnimatableNone:t=>{const e=t.match(mP);return e?e.map(gP).join(" "):t}},xP={...M4,color:jr,backgroundColor:jr,outlineColor:jr,fill:jr,stroke:jr,borderColor:jr,borderTopColor:jr,borderRightColor:jr,borderBottomColor:jr,borderLeftColor:jr,filter:Oy,WebkitFilter:Oy},tm=t=>xP[t];function rm(t,e){var r;let n=tm(t);return n!==Oy&&(n=eo),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const r8=t=>e=>e.test(t),bP={test:t=>t==="auto",parse:t=>t},n8=[ba,ye,wi,Cs,AT,CT,bP],xc=t=>n8.find(r8(t)),wP=[...n8,jr,eo],CP=t=>wP.find(r8(t));function AP(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function EP(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function Sh(t,e,r){const n=t.getProps();return Kg(n,e,r!==void 0?r:n.custom,AP(t),EP(t))}function SP(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,Rl(r))}function kP(t,e){const r=Sh(t,e);let{transitionEnd:n={},transition:i={},...s}=r?t.makeTargetAnimatable(r,!1):{};s={...s,...n};for(const o in s){const a=LT(s[o]);SP(t,o,a)}}function _P(t,e,r){var n,i;const s=Object.keys(e).filter(a=>!t.hasValue(a)),o=s.length;if(o)for(let a=0;at*1e3,RP={current:!1},nm=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,im=t=>e=>1-t(1-e),sm=t=>t*t,NP=im(sm),om=nm(sm),Wt=(t,e,r)=>-r*t+r*e+t;function K1(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function OP({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,s=0,o=0;if(!e)i=s=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;i=K1(l,a,t+1/3),s=K1(l,a,t),o=K1(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}const J1=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},DP=[Ny,Wo,rl],BP=t=>DP.find(e=>e.test(t));function n2(t){const e=BP(t);let r=e.parse(t);return e===rl&&(r=OP(r)),r}const i8=(t,e)=>{const r=n2(t),n=n2(e),i={...r};return s=>(i.red=J1(r.red,n.red,s),i.green=J1(r.green,n.green,s),i.blue=J1(r.blue,n.blue,s),i.alpha=Wt(r.alpha,n.alpha,s),Wo.transform(i))};function s8(t,e){return typeof t=="number"?r=>Wt(t,e,r):jr.test(t)?i8(t,e):a8(t,e)}const o8=(t,e)=>{const r=[...t],n=r.length,i=t.map((s,o)=>s8(s,e[o]));return s=>{for(let o=0;o{const r={...t,...e},n={};for(const i in r)t[i]!==void 0&&e[i]!==void 0&&(n[i]=s8(t[i],e[i]));return i=>{for(const s in n)r[s]=n[s](i);return r}},a8=(t,e)=>{const r=eo.createTransformer(e),n=v0(t),i=v0(e);return n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?Ah(o8(n.values,i.values),r):o=>`${o>0?e:t}`},g0=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},i2=(t,e)=>r=>Wt(t,e,r);function $P(t){return typeof t=="number"?i2:typeof t=="string"?jr.test(t)?i8:a8:Array.isArray(t)?o8:typeof t=="object"?LP:i2}function FP(t,e,r){const n=[],i=r||$P(t[0]),s=t.length-1;for(let o=0;ot[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=FP(e,n,i),a=o.length,l=c=>{let f=0;if(a>1)for(;fl(Ml(t[0],t[s-1],c)):l}const am=t=>t,c8=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,jP=1e-7,zP=12;function UP(t,e,r,n,i){let s,o,a=0;do o=e+(r-e)/2,s=c8(o,n,i)-t,s>0?r=o:e=o;while(Math.abs(s)>jP&&++aUP(s,0,1,t,r);return s=>s===0||s===1?s:c8(i(s),e,n)}const u8=t=>1-Math.sin(Math.acos(t)),lm=im(u8),VP=nm(lm),d8=f8(.33,1.53,.69,.99),cm=im(d8),HP=nm(cm),WP=t=>(t*=2)<1?.5*cm(t):.5*(2-Math.pow(2,-10*(t-1))),qP={linear:am,easeIn:sm,easeInOut:om,easeOut:NP,circIn:u8,circInOut:VP,circOut:lm,backIn:cm,backInOut:HP,backOut:d8,anticipate:WP},s2=t=>{if(Array.isArray(t)){p0(t.length===4);const[e,r,n,i]=t;return f8(e,r,n,i)}else if(typeof t=="string")return qP[t];return t},GP=t=>Array.isArray(t)&&typeof t[0]!="number";function KP(t,e){return t.map(()=>e||om).splice(0,t.length-1)}function JP(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function QP(t,e){return t.map(r=>r*e)}function Dy({keyframes:t,ease:e=om,times:r,duration:n=300}){t=[...t];const i=GP(e)?e.map(s2):s2(e),s={done:!1,value:t[0]},o=QP(r&&r.length===t.length?r:JP(t),n);function a(){return l8(o,t,{ease:Array.isArray(i)?i:KP(t,i)})}let l=a();return{next:c=>(s.value=l(c),s.done=c>=n,s),flipTarget:()=>{t.reverse(),l=a()}}}const Q1=.001,YP=.01,XP=10,ZP=.05,eI=1;function tI({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s,o=1-e;o=Ml(ZP,eI,o),t=Ml(YP,XP,t/1e3),o<1?(i=c=>{const f=c*o,u=f*t,h=f-r,y=By(c,o),m=Math.exp(-u);return Q1-h/y*m},s=c=>{const u=c*o*t,h=u*r+r,y=Math.pow(o,2)*Math.pow(c,2)*t,m=Math.exp(-u),p=By(Math.pow(c,2),o);return(-i(c)+Q1>0?-1:1)*((h-y)*m)/p}):(i=c=>{const f=Math.exp(-c*t),u=(c-r)*t+1;return-Q1+f*u},s=c=>{const f=Math.exp(-c*t),u=(r-c)*(t*t);return f*u});const a=5/t,l=nI(i,s,a);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:t}}}const rI=12;function nI(t,e,r){let n=r;for(let i=1;it[r]!==void 0)}function oI(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!o2(t,sI)&&o2(t,iI)){const r=tI(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const aI=5;function h8({keyframes:t,restDelta:e,restSpeed:r,...n}){let i=t[0],s=t[t.length-1];const o={done:!1,value:i},{stiffness:a,damping:l,mass:c,velocity:f,duration:u,isResolvedFromDuration:h}=oI(n);let y=lI,m=f?-(f/1e3):0;const p=l/(2*Math.sqrt(a*c));function S(){const w=s-i,A=Math.sqrt(a/c)/1e3,k=Math.abs(w)<5;if(r||(r=k?.01:2),e||(e=k?.005:.5),p<1){const I=By(A,p);y=R=>{const F=Math.exp(-p*A*R);return s-F*((m+p*A*w)/I*Math.sin(I*R)+w*Math.cos(I*R))}}else if(p===1)y=I=>s-Math.exp(-A*I)*(w+(m+A*w)*I);else{const I=A*Math.sqrt(p*p-1);y=R=>{const F=Math.exp(-p*A*R),z=Math.min(I*R,300);return s-F*((m+p*A*w)*Math.sinh(z)+I*w*Math.cosh(z))/I}}}return S(),{next:w=>{const A=y(w);if(h)o.done=w>=u;else{let k=m;if(w!==0)if(p<1){const F=Math.max(0,w-aI);k=Zg(A-y(F),w-F)}else k=0;const I=Math.abs(k)<=r,R=Math.abs(s-A)<=e;o.done=I&&R}return o.value=o.done?s:A,o},flipTarget:()=>{m=-m,[i,s]=[s,i],S()}}}h8.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const lI=t=>0;function cI({keyframes:t=[0],velocity:e=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){const o=t[0],a={done:!1,value:o};let l=r*e;const c=o+l,f=s===void 0?c:s(c);return f!==c&&(l=f-o),{next:u=>{const h=-l*Math.exp(-u/n);return a.done=!(h>i||h<-i),a.value=a.done?f:f+h,a},flipTarget:()=>{}}}const fI={decay:cI,keyframes:Dy,tween:Dy,spring:h8};function v8(t,e,r=0){return t-e-r}function uI(t,e=0,r=0,n=!0){return n?v8(e+-t,e,r):e-(t-e)+r}function dI(t,e,r,n){return n?t>=e+r:t<=-r}const hI=t=>{const e=({delta:r})=>t(r);return{start:()=>Rr.update(e,!0),stop:()=>Zs.update(e)}};function m0({duration:t,driver:e=hI,elapsed:r=0,repeat:n=0,repeatType:i="loop",repeatDelay:s=0,keyframes:o,autoplay:a=!0,onPlay:l,onStop:c,onComplete:f,onRepeat:u,onUpdate:h,type:y="keyframes",...m}){var p,S;const w=r;let A,k=0,I=t,R=!1,F=!0,z;const j=fI[o.length>2?"keyframes":y]||Dy,K=o[0],J=o[o.length-1];let Z={done:!1,value:K};!((S=(p=j).needsInterpolation)===null||S===void 0)&&S.call(p,K,J)&&(z=l8([0,100],[K,J],{clamp:!1}),o=[0,100]);const ie=j({...m,duration:t,keyframes:o});function L(){k++,i==="reverse"?(F=k%2===0,r=uI(r,I,s,F)):(r=v8(r,I,s),i==="mirror"&&ie.flipTarget()),R=!1,u&&u()}function v(){A&&A.stop(),f&&f()}function C(N){F||(N=-N),r+=N,R||(Z=ie.next(Math.max(0,r)),z&&(Z.value=z(Z.value)),R=F?Z.done:r<=0),h&&h(Z.value),R&&(k===0&&(I=I!==void 0?I:r),k{c&&c(),A&&A.stop()},set currentTime(N){r=w,C(N)},sample:N=>{r=w;const b=t&&typeof t=="number"?Math.max(t*.5,50):50;let _=0;for(C(0);_<=N;){const M=N-_;C(Math.min(M,b)),_+=b}return Z}}}function vI(t){return!t||Array.isArray(t)||typeof t=="string"&&y8[t]}const Nc=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,y8={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Nc([0,.65,.55,1]),circOut:Nc([.55,0,1,.45]),backIn:Nc([.31,.01,.66,-.59]),backOut:Nc([.33,1.53,.69,.99])};function yI(t){if(t)return Array.isArray(t)?Nc(t):y8[t]}function pI(t,e,r,{delay:n=0,duration:i,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){return t.animate({[e]:r,offset:l},{delay:n,duration:i,easing:yI(a),fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const a2={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Y1={},p8={};for(const t in a2)p8[t]=()=>(Y1[t]===void 0&&(Y1[t]=a2[t]()),Y1[t]);function gI(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const mI=new Set(["opacity"]),$u=10;function xI(t,e,{onUpdate:r,onComplete:n,...i}){if(!(p8.waapi()&&mI.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:l=0,ease:c}=i;if(i.type==="spring"||!vI(i.ease)){if(i.repeat===1/0)return;const u=m0({...i,elapsed:0});let h={done:!1,value:o[0]};const y=[];let m=0;for(;!h.done&&m<2e4;)h=u.sample(m),y.push(h.value),m+=$u;o=y,a=m-$u,c="linear"}const f=pI(t.owner.current,e,o,{...i,delay:-l,duration:a,ease:c});return f.onfinish=()=>{t.set(gI(o,i)),Rr.update(()=>f.cancel()),n&&n()},{get currentTime(){return f.currentTime||0},set currentTime(u){f.currentTime=u},stop:()=>{const{currentTime:u}=f;if(u){const h=m0({...i,autoplay:!1});t.setWithVelocity(h.sample(u-$u).value,h.sample(u).value,$u)}Rr.update(()=>f.cancel())}}}function g8(t,e){const r=performance.now(),n=({timestamp:i})=>{const s=i-r;s>=e&&(Zs.read(n),t(s-e))};return Rr.read(n,!0),()=>Zs.read(n)}function bI({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const i=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:g8(i,-e)}:i()}function wI({keyframes:t,velocity:e=0,min:r,max:n,power:i=.8,timeConstant:s=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:c,driver:f,onUpdate:u,onComplete:h,onStop:y}){const m=t[0];let p;function S(I){return r!==void 0&&In}function w(I){return r===void 0?n:n===void 0||Math.abs(r-I){var F;u==null||u(R),(F=I.onUpdate)===null||F===void 0||F.call(I,R)},onComplete:h,onStop:y})}function k(I){A({type:"spring",stiffness:o,damping:a,restDelta:l,...I})}if(S(m))k({velocity:e,keyframes:[m,w(m)]});else{let I=i*e+m;typeof c<"u"&&(I=c(I));const R=w(I),F=R===r?-1:1;let z,j;const K=J=>{z=j,j=J,e=Zg(J-z,Ki.delta),(F===1&&J>R||F===-1&&Jp==null?void 0:p.stop()}}const Ro=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Fu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),X1=()=>({type:"keyframes",ease:"linear",duration:.3}),CI={type:"keyframes",duration:.8},l2={x:Ro,y:Ro,z:Ro,rotate:Ro,rotateX:Ro,rotateY:Ro,rotateZ:Ro,scaleX:Fu,scaleY:Fu,scale:Fu,opacity:X1,backgroundColor:X1,color:X1,default:Fu},AI=(t,{keyframes:e})=>e.length>2?CI:(l2[t]||l2.default)(e[1]),Ly=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&eo.test(e)&&!e.startsWith("url("));function EI({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...f}){return!!Object.keys(f).length}function c2(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function f2(t){return typeof t=="number"?0:rm("",t)}function m8(t,e){return t[e]||t.default||t}function SI(t,e,r,n){const i=Ly(e,r);let s=n.from!==void 0?n.from:t.get();return s==="none"&&i&&typeof r=="string"?s=rm(e,r):c2(s)&&typeof r=="string"?s=f2(r):!Array.isArray(r)&&c2(r)&&typeof s=="string"&&(r=f2(s)),Array.isArray(r)?(r[0]===null&&(r[0]=s),r):[s,r]}const fm=(t,e,r,n={})=>i=>{const s=m8(n,t)||{},o=s.delay||n.delay||0;let{elapsed:a=0}=n;a=a-gd(o);const l=SI(e,t,r,s),c=l[0],f=l[l.length-1],u=Ly(t,c),h=Ly(t,f);let y={keyframes:l,velocity:e.getVelocity(),...s,elapsed:a,onUpdate:S=>{e.set(S),s.onUpdate&&s.onUpdate(S)},onComplete:()=>{i(),s.onComplete&&s.onComplete()}};if(!u||!h||RP.current||s.type===!1)return bI(y);if(s.type==="inertia")return wI(y);EI(s)||(y={...y,...AI(t,y)}),y.duration&&(y.duration=gd(y.duration)),y.repeatDelay&&(y.repeatDelay=gd(y.repeatDelay));const m=e.owner,p=m&&m.current;if(m&&p instanceof HTMLElement&&!(m!=null&&m.getProps().onUpdate)){const S=xI(e,t,y);if(S)return S}return m0(y)};function kI(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const i=e.map(s=>$y(t,s,r));n=Promise.all(i)}else if(typeof e=="string")n=$y(t,e,r);else{const i=typeof e=="function"?Sh(t,e,r.custom):e;n=x8(t,i,r)}return n.then(()=>t.notify("AnimationComplete",e))}function $y(t,e,r={}){var n;const i=Sh(t,e,r.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(s=r.transitionOverride);const o=i?()=>x8(t,i,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:u,staggerDirection:h}=s;return _I(t,e,f+c,u,h,r)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,f]=l==="beforeChildren"?[o,a]:[a,o];return c().then(f)}else return Promise.all([o(),a(r.delay)])}function x8(t,e,{delay:r=0,transitionOverride:n,type:i}={}){var s;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");n&&(o=n);const f=[],u=i&&((s=t.animationState)===null||s===void 0?void 0:s.getState()[i]);for(const h in l){const y=t.getValue(h),m=l[h];if(!y||m===void 0||u&&PI(u,h))continue;const p={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!y.hasAnimated){const w=t.getProps()[MP];w&&(p.elapsed=window.HandoffAppearAnimations(w,h,y,Rr))}let S=y.start(fm(h,y,m,t.shouldReduceMotion&&Jl.has(h)?{type:!1}:p));y0(c)&&(c.add(h),S=S.then(()=>c.remove(h))),f.push(S)}return Promise.all(f).then(()=>{a&&kP(t,a)})}function _I(t,e,r=0,n=0,i=1,s){const o=[],a=(t.variantChildren.size-1)*n,l=i===1?(c=0)=>c*n:(c=0)=>a-c*n;return Array.from(t.variantChildren).sort(TI).forEach((c,f)=>{c.notify("AnimationStart",e),o.push($y(c,e,{...s,delay:r+l(f)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function TI(t,e){return t.sortNodePosition(e)}function PI({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const um=[Ge.Animate,Ge.InView,Ge.Focus,Ge.Hover,Ge.Tap,Ge.Drag,Ge.Exit],II=[...um].reverse(),MI=um.length;function RI(t){return e=>Promise.all(e.map(({animation:r,options:n})=>kI(t,r,n)))}function NI(t){let e=RI(t);const r=DI();let n=!0;const i=(l,c)=>{const f=Sh(t,c);if(f){const{transition:u,transitionEnd:h,...y}=f;l={...l,...y,...h}}return l};function s(l){e=l(t)}function o(l,c){const f=t.getProps(),u=t.getVariantContext(!0)||{},h=[],y=new Set;let m={},p=1/0;for(let w=0;wp&&R;const J=Array.isArray(I)?I:[I];let Z=J.reduce(i,{});F===!1&&(Z={});const{prevResolvedValues:ie={}}=k,L={...ie,...Z},v=C=>{K=!0,y.delete(C),k.needsAnimating[C]=!0};for(const C in L){const P=Z[C],N=ie[C];m.hasOwnProperty(C)||(P!==N?u0(P)&&u0(N)?!G4(P,N)||j?v(C):k.protectedKeys[C]=!0:P!==void 0?v(C):y.add(C):P!==void 0&&y.has(C)?v(C):k.protectedKeys[C]=!0)}k.prevProp=I,k.prevResolvedValues=Z,k.isActive&&(m={...m,...Z}),n&&t.blockInitialAnimation&&(K=!1),K&&!z&&h.push(...J.map(C=>({animation:C,options:{type:A,...l}})))}if(y.size){const w={};y.forEach(A=>{const k=t.getBaseTarget(A);k!==void 0&&(w[A]=k)}),h.push({animation:w})}let S=!!h.length;return n&&f.initial===!1&&!t.manuallyAnimateOnMount&&(S=!1),n=!1,S?e(h):Promise.resolve()}function a(l,c,f){var u;if(r[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(y=>{var m;return(m=y.animationState)===null||m===void 0?void 0:m.setActive(l,c)}),r[l].isActive=c;const h=o(f,l);for(const y in r)r[y].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>r}}function OI(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!G4(e,t):!1}function No(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function DI(){return{[Ge.Animate]:No(!0),[Ge.InView]:No(),[Ge.Hover]:No(),[Ge.Tap]:No(),[Ge.Drag]:No(),[Ge.Focus]:No(),[Ge.Exit]:No()}}const BI={animation:Rs(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=NI(t)),xh(e)&&E.useEffect(()=>e.subscribe(t),[e])}),exit:Rs(t=>{const{custom:e,visualElement:r}=t,[n,i]=q4(),s=E.useContext(ru);E.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(Ge.Exit,!n,{custom:s&&s.custom||e});o&&!n&&o.then(i)},[n])})},u2=(t,e)=>Math.abs(t-e);function LI(t,e){const r=u2(t.x,e.x),n=u2(t.y,e.y);return Math.sqrt(r**2+n**2)}class b8{constructor(e,r,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=ev(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,u=LI(c.offset,{x:0,y:0})>=3;if(!f&&!u)return;const{point:h}=c,{timestamp:y}=Ki;this.history.push({...h,timestamp:y});const{onStart:m,onMove:p}=this.handlers;f||(m&&m(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=Z1(f,this.transformPagePoint),Rr.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:h}=this.handlers,y=ev(c.type==="pointercancel"?this.lastMoveEventInfo:Z1(f,this.transformPagePoint),this.history);this.startEvent&&u&&u(c,y),h&&h(c,y)},!j4(e))return;this.handlers=r,this.transformPagePoint=n;const i=Ch(e),s=Z1(i,this.transformPagePoint),{point:o}=s,{timestamp:a}=Ki;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=r;l&&l(e,ev(s,this.history)),this.removeListeners=Ah(vl(window,"pointermove",this.handlePointerMove),vl(window,"pointerup",this.handlePointerUp),vl(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Zs.update(this.updatePoint)}}function Z1(t,e){return e?{point:e(t.point)}:t}function d2(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ev({point:t},e){return{point:t,delta:d2(t,w8(e)),offset:d2(t,$I(e)),velocity:FI(e,.1)}}function $I(t){return t[0]}function w8(t){return t[t.length-1]}function FI(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const i=w8(t);for(;r>=0&&(n=t[r],!(i.timestamp-n.timestamp>gd(e)));)r--;if(!n)return{x:0,y:0};const s=(i.timestamp-n.timestamp)/1e3;if(s===0)return{x:0,y:0};const o={x:(i.x-n.x)/s,y:(i.y-n.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function pn(t){return t.max-t.min}function Fy(t,e=0,r=.01){return Math.abs(t-e)<=r}function h2(t,e,r,n=.5){t.origin=n,t.originPoint=Wt(e.min,e.max,t.origin),t.scale=pn(r)/pn(e),(Fy(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Wt(r.min,r.max,t.origin)-t.originPoint,(Fy(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Kc(t,e,r,n){h2(t.x,e.x,r.x,n==null?void 0:n.originX),h2(t.y,e.y,r.y,n==null?void 0:n.originY)}function v2(t,e,r){t.min=r.min+e.min,t.max=t.min+pn(e)}function jI(t,e,r){v2(t.x,e.x,r.x),v2(t.y,e.y,r.y)}function y2(t,e,r){t.min=e.min-r.min,t.max=t.min+pn(e)}function Jc(t,e,r){y2(t.x,e.x,r.x),y2(t.y,e.y,r.y)}function zI(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?Wt(r,t,n.max):Math.min(t,r)),t}function p2(t,e,r){return{min:e!==void 0?t.min+e:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function UI(t,{top:e,left:r,bottom:n,right:i}){return{x:p2(t.x,r,i),y:p2(t.y,e,n)}}function g2(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=g0(e.min,e.max-n,t.min):n>i&&(r=g0(t.min,t.max-i,e.min)),Ml(0,1,r)}function WI(t,e){const r={};return e.min!==void 0&&(r.min=e.min-t.min),e.max!==void 0&&(r.max=e.max-t.min),r}const jy=.35;function qI(t=jy){return t===!1?t=0:t===!0&&(t=jy),{x:m2(t,"left","right"),y:m2(t,"top","bottom")}}function m2(t,e,r){return{min:x2(t,e),max:x2(t,r)}}function x2(t,e){return typeof t=="number"?t:t[e]||0}const b2=()=>({translate:0,scale:1,origin:0,originPoint:0}),Qc=()=>({x:b2(),y:b2()}),w2=()=>({min:0,max:0}),nr=()=>({x:w2(),y:w2()});function ci(t){return[t("x"),t("y")]}function C8({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function GI({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function KI(t,e){if(!e)return t;const r=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function tv(t){return t===void 0||t===1}function zy({scale:t,scaleX:e,scaleY:r}){return!tv(t)||!tv(e)||!tv(r)}function Lo(t){return zy(t)||A8(t)||t.z||t.rotate||t.rotateX||t.rotateY}function A8(t){return C2(t.x)||C2(t.y)}function C2(t){return t&&t!=="0%"}function x0(t,e,r){const n=t-r,i=e*n;return r+i}function A2(t,e,r,n,i){return i!==void 0&&(t=x0(t,i,n)),x0(t,r,n)+e}function Uy(t,e=0,r=1,n,i){t.min=A2(t.min,e,r,n,i),t.max=A2(t.max,e,r,n,i)}function E8(t,{x:e,y:r}){Uy(t.x,e.translate,e.scale,e.originPoint),Uy(t.y,r.translate,r.scale,r.originPoint)}function JI(t,e,r,n=!1){var i,s;const o=r.length;if(!o)return;e.x=e.y=1;let a,l;for(let c=0;c1.0000000000001||t<.999999999999?t:1}function ks(t,e){t.min=t.min+e,t.max=t.max+e}function S2(t,e,[r,n,i]){const s=e[i]!==void 0?e[i]:.5,o=Wt(t.min,t.max,s);Uy(t,e[r],e[n],o,e.scale)}const QI=["x","scaleX","originX"],YI=["y","scaleY","originY"];function nl(t,e){S2(t.x,e,QI),S2(t.y,e,YI)}function S8(t,e){return C8(KI(t.getBoundingClientRect(),e))}function XI(t,e,r){const n=S8(t,r),{scroll:i}=e;return i&&(ks(n.x,i.offset.x),ks(n.y,i.offset.y)),n}const ZI=new WeakMap;class eM{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=nr(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(Ch(a,"page").point)},i=(a,l)=>{var c;const{drag:f,dragPropagation:u,onDragStart:h}=this.getProps();f&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=V4(f),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ci(y=>{var m,p;let S=this.getAxisMotionValue(y).get()||0;if(wi.test(S)){const w=(p=(m=this.visualElement.projection)===null||m===void 0?void 0:m.layout)===null||p===void 0?void 0:p.layoutBox[y];w&&(S=pn(w)*(parseFloat(S)/100))}this.originPoint[y]=S}),h==null||h(a,l),(c=this.visualElement.animationState)===null||c===void 0||c.setActive(Ge.Drag,!0))},s=(a,l)=>{const{dragPropagation:c,dragDirectionLock:f,onDirectionLock:u,onDrag:h}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:y}=l;if(f&&this.currentDirection===null){this.currentDirection=tM(y),this.currentDirection!==null&&(u==null||u(this.currentDirection));return}this.updateAxis("x",l.point,y),this.updateAxis("y",l.point,y),this.visualElement.render(),h==null||h(a,l)},o=(a,l)=>this.stop(a,l);this.panSession=new b8(e,{onSessionStart:n,onStart:i,onMove:s,onSessionEnd:o},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s==null||s(e,r)}cancel(){var e,r;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(r=this.visualElement.animationState)===null||r===void 0||r.setActive(Ge.Drag,!1)}updateAxis(e,r,n){const{drag:i}=this.getProps();if(!n||!ju(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=zI(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},i=this.constraints;e&&tl(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=UI(n.layoutBox,e):this.constraints=!1,this.elastic=qI(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&ci(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=WI(n.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!tl(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=XI(n,i.root,this.visualElement.getTransformPagePoint());let o=VI(i.layout.layoutBox,s);if(r){const a=r(GI(o));this.hasMutatedConstraints=!!a,a&&(o=C8(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ci(f=>{if(!ju(f,r,this.currentDirection))return;let u=(l==null?void 0:l[f])||{};o&&(u={min:0,max:0});const h=i?200:1e6,y=i?40:1e7,m={type:"inertia",velocity:n?e[f]:0,bounceStiffness:h,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(f,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(fm(e,n,0,r))}stopAnimation(){ci(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var r;const n="_drag"+e.toUpperCase(),i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,((r=this.visualElement.getProps().initial)===null||r===void 0?void 0:r[e])||0)}snapToCursor(e){ci(r=>{const{drag:n}=this.getProps();if(!ju(r,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(r);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[r];s.set(e[r]-Wt(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!tl(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};ci(a=>{const l=this.getAxisMotionValue(a);if(l){const c=l.get();s[a]=HI({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",(e=i.root)===null||e===void 0||e.updateScroll(),i.updateLayout(),this.resolveConstraints(),ci(a=>{if(!ju(a,r,null))return;const l=this.getAxisMotionValue(a),{min:c,max:f}=this.constraints[a];l.set(Wt(c,f,s[a]))})}addListeners(){var e;if(!this.visualElement.current)return;ZI.set(this.visualElement,this);const r=this.visualElement.current,n=vl(r,"pointerdown",c=>{const{drag:f,dragListener:u=!0}=this.getProps();f&&u&&this.start(c)}),i=()=>{const{dragConstraints:c}=this.getProps();tl(c)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&((e=s.root)===null||e===void 0||e.updateScroll(),s.updateLayout()),i();const a=Qo(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f})=>{this.isDragging&&f&&(ci(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=c[u].translate,h.set(h.get()+c[u].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l==null||l()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=jy,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function ju(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function tM(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function rM(t){const{dragControls:e,visualElement:r}=t,n=wh(()=>new eM(r));E.useEffect(()=>e&&e.subscribe(n),[n,e]),E.useEffect(()=>n.addListeners(),[n])}function nM({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:i}){const s=t||e||r||n,o=E.useRef(null),{transformPagePoint:a}=E.useContext(Fg),l={onSessionStart:n,onStart:e,onMove:t,onEnd:(f,u)=>{o.current=null,r&&r(f,u)}};E.useEffect(()=>{o.current!==null&&o.current.updateHandlers(l)});function c(f){o.current=new b8(f,l,{transformPagePoint:a})}h0(i,"pointerdown",s&&c),Jg(()=>o.current&&o.current.end())}const iM={pan:Rs(nM),drag:Rs(rM)};function Vy(t){return typeof t=="string"&&t.startsWith("var(--")}const k8=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function sM(t){const e=k8.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function Hy(t,e,r=1){const[n,i]=sM(t);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);return s?s.trim():Vy(i)?Hy(i,e,r+1):i}function oM(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(i=>{const s=i.get();if(!Vy(s))return;const o=Hy(s,n);o&&i.set(o)});for(const i in e){const s=e[i];if(!Vy(s))continue;const o=Hy(s,n);o&&(e[i]=o,r&&r[i]===void 0&&(r[i]=s))}return{target:e,transitionEnd:r}}const aM=new Set(["width","height","top","left","right","bottom","x","y"]),_8=t=>aM.has(t),lM=t=>Object.keys(t).some(_8),k2=t=>t===ba||t===ye;var _2;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(_2||(_2={}));const T2=(t,e)=>parseFloat(t.split(", ")[e]),P2=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/);if(i)return T2(i[1],e);{const s=n.match(/^matrix\((.+)\)$/);return s?T2(s[1],t):0}},cM=new Set(["x","y","z"]),fM=c0.filter(t=>!cM.has(t));function uM(t){const e=[];return fM.forEach(r=>{const n=t.getValue(r);n!==void 0&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),e.length&&t.render(),e}const I2={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:P2(4,13),y:P2(5,14)},dM=(t,e,r)=>{const n=e.measureViewportBox(),i=e.current,s=getComputedStyle(i),{display:o}=s,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(c=>{a[c]=I2[c](n,s)}),e.render();const l=e.measureViewportBox();return r.forEach(c=>{const f=e.getValue(c);f&&f.jump(a[c]),t[c]=I2[c](l,s)}),t},hM=(t,e,r={},n={})=>{e={...e},n={...n};const i=Object.keys(e).filter(_8);let s=[],o=!1;const a=[];if(i.forEach(l=>{const c=t.getValue(l);if(!t.hasValue(l))return;let f=r[l],u=xc(f);const h=e[l];let y;if(u0(h)){const m=h.length,p=h[0]===null?1:0;f=h[p],u=xc(f);for(let S=p;S=0?window.pageYOffset:null,c=dM(e,t,a);return s.length&&s.forEach(([f,u])=>{t.getValue(f).set(u)}),t.render(),mh&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:n}}else return{target:e,transitionEnd:n}};function vM(t,e,r,n){return lM(e)?hM(t,e,r,n):{target:e,transitionEnd:n}}const yM=(t,e,r,n)=>{const i=oM(t,e,n);return e=i.target,n=i.transitionEnd,vM(t,e,r,n)},Wy={current:null},T8={current:!1};function pM(){if(T8.current=!0,!!mh)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Wy.current=t.matches;t.addListener(e),e()}else Wy.current=!1}function gM(t,e,r){const{willChange:n}=e;for(const i in e){const s=e[i],o=r[i];if(sn(s))t.addValue(i,s),y0(n)&&n.add(i);else if(sn(o))t.addValue(i,Rl(s,{owner:t})),y0(n)&&n.remove(i);else if(o!==s)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(s)}else{const a=t.getStaticValue(i);t.addValue(i,Rl(a!==void 0?a:s,{owner:t}))}}for(const i in r)e[i]===void 0&&t.removeValue(i);return e}const P8=Object.keys(Rf),mM=P8.length,M2=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class xM{constructor({parent:e,props:r,reducedMotionConfig:n,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Rr.render(this.render,!1,!0);const{latestValues:o,renderState:a}=i;this.latestValues=o,this.baseTarget={...o},this.initialValues=r.initial?{...o}:{},this.renderState=a,this.parent=e,this.props=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=s,this.isControllingVariants=bh(r),this.isVariantNode=_4(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(r,{});for(const f in c){const u=c[f];o[f]!==void 0&&sn(u)&&(u.set(o[f],!1),y0(l)&&l.add(f))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){var r;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(r=this.parent)===null||r===void 0?void 0:r.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),T8.current||pM(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Wy.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,r,n;(e=this.projection)===null||e===void 0||e.unmount(),Zs.update(this.notifyUpdate),Zs.render(this.render),this.valueSubscriptions.forEach(i=>i()),(r=this.removeFromVariantTree)===null||r===void 0||r.call(this),(n=this.parent)===null||n===void 0||n.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(e,r){const n=Jl.has(e),i=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Rr.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),s()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,i,s,o,a){const l=[];for(let c=0;cthis.scheduleRender(),animationType:typeof f=="string"?f:"both",initialPromotionConfig:a,layoutScroll:y,layoutRoot:m})}return l}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):nr()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}makeTargetAnimatable(e,r=!0){return this.makeTargetAnimatableFromInstance(e,this.props,r)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender();const r=this.props;this.props=e;for(let n=0;nn.variantChildren.delete(e)}addValue(e,r){r!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,r)),this.values.set(e,r),this.latestValues[e]=r.get()}removeValue(e){var r;this.values.delete(e),(r=this.valueSubscriptions.get(e))===null||r===void 0||r(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&r!==void 0&&(n=Rl(r,{owner:this}),this.addValue(e,n)),n}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,r){this.baseTarget[e]=r}getBaseTarget(e){var r;const{initial:n}=this.props,i=typeof n=="string"||typeof n=="object"?(r=Kg(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!sn(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new Xg),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}}const I8=["initial",...um],bM=I8.length;class M8 extends xM{sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){var n;return(n=e.style)===null||n===void 0?void 0:n[r]}removeValueFromRenderState(e,{vars:r,style:n}){delete r[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:r,...n},{transformValues:i},s){let o=PP(n,e||{},this);if(i&&(r&&(r=i(r)),n&&(n=i(n)),o&&(o=i(o))),s){_P(this,n,o);const a=yM(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function wM(t){return window.getComputedStyle(t)}class CM extends M8{readValueFromInstance(e,r){if(Jl.has(r)){const n=tm(r);return n&&n.default||0}else{const n=wM(e),i=(I4(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:r}){return S8(e,r)}build(e,r,n,i){Ug(e,r,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,r){return Gg(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;sn(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,i){D4(e,r,n,i)}}class AM extends M8{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return Jl.has(r)?((n=tm(r))===null||n===void 0?void 0:n.default)||0:(r=B4.has(r)?r:qg(r),e.getAttribute(r))}measureInstanceViewportBox(){return nr()}scrapeMotionValuesFromProps(e,r){return $4(e,r)}build(e,r,n,i){Hg(e,r,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,r,n,i){L4(e,r,n,i)}mount(e){this.isSVGTag=Wg(e.tagName),super.mount(e)}}const EM=(t,e)=>zg(t)?new AM(e,{enableHardwareAcceleration:!1}):new CM(e,{enableHardwareAcceleration:!0});function R2(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const bc={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ye.test(t))t=parseFloat(t);else return t;const r=R2(t,e.target.x),n=R2(t,e.target.y);return`${r}% ${n}%`}},N2="_$css",SM={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,i=t.includes("var("),s=[];i&&(t=t.replace(k8,y=>(s.push(y),N2)));const o=eo.parse(t);if(o.length>5)return n;const a=eo.createTransformer(t),l=typeof o[0]!="number"?1:0,c=r.x.scale*e.x,f=r.y.scale*e.y;o[0+l]/=c,o[1+l]/=f;const u=Wt(c,f,.5);typeof o[2+l]=="number"&&(o[2+l]/=u),typeof o[3+l]=="number"&&(o[3+l]/=u);let h=a(o);if(i){let y=0;h=h.replace(N2,()=>{const m=s[y];return y++,m})}return h}};class kM extends sr.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=e;pT(TM),s&&(r.group&&r.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Wc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o&&(o.isPresent=s,i||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||Rr.postRender(()=>{var a;!((a=o.getStack())===null||a===void 0)&&a.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),r!=null&&r.group&&r.group.remove(i),n!=null&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}}function _M(t){const[e,r]=q4(),n=E.useContext(jg);return sr.createElement(kM,{...t,layoutGroup:n,switchLayoutGroup:E.useContext(T4),isPresent:e,safeToRemove:r})}const TM={borderRadius:{...bc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bc,borderTopRightRadius:bc,borderBottomLeftRadius:bc,borderBottomRightRadius:bc,boxShadow:SM},PM={measureLayout:_M};function IM(t,e,r={}){const n=sn(t)?t:Rl(t);return n.start(fm("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const R8=["TopLeft","TopRight","BottomLeft","BottomRight"],MM=R8.length,O2=t=>typeof t=="string"?parseFloat(t):t,D2=t=>typeof t=="number"||ye.test(t);function RM(t,e,r,n,i,s){i?(t.opacity=Wt(0,r.opacity!==void 0?r.opacity:1,NM(n)),t.opacityExit=Wt(e.opacity!==void 0?e.opacity:1,0,OM(n))):s&&(t.opacity=Wt(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(g0(t,e,n))}function L2(t,e){t.min=e.min,t.max=e.max}function $n(t,e){L2(t.x,e.x),L2(t.y,e.y)}function $2(t,e,r,n,i){return t-=e,t=x0(t,1/r,n),i!==void 0&&(t=x0(t,1/i,n)),t}function DM(t,e=0,r=1,n=.5,i,s=t,o=t){if(wi.test(e)&&(e=parseFloat(e),e=Wt(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=Wt(s.min,s.max,n);t===s&&(a-=e),t.min=$2(t.min,e,r,a,i),t.max=$2(t.max,e,r,a,i)}function F2(t,e,[r,n,i],s,o){DM(t,e[r],e[n],e[i],e.scale,s,o)}const BM=["x","scaleX","originX"],LM=["y","scaleY","originY"];function j2(t,e,r,n){F2(t.x,e,BM,r==null?void 0:r.x,n==null?void 0:n.x),F2(t.y,e,LM,r==null?void 0:r.y,n==null?void 0:n.y)}function z2(t){return t.translate===0&&t.scale===1}function O8(t){return z2(t.x)&&z2(t.y)}function D8(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function U2(t){return pn(t.x)/pn(t.y)}class $M{constructor(){this.members=[]}add(e){Qg(this.members,e),e.scheduleRender()}remove(e){if(Yg(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(e){const r=this.members.findIndex(i=>e===i);if(r===0)return!1;let n;for(let i=r;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){n=s;break}}return n?(this.promote(n),!0):!1}promote(e,r){var n;const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,r&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),!((n=e.root)===null||n===void 0)&&n.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:s}=e.options;s===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var r,n,i,s,o;(n=(r=e.options).onExitComplete)===null||n===void 0||n.call(r),(o=(i=e.resumingFrom)===null||i===void 0?void 0:(s=i.options).onExitComplete)===null||o===void 0||o.call(s)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function V2(t,e,r){let n="";const i=t.x.translate/e.x,s=t.y.translate/e.y;if((i||s)&&(n=`translate3d(${i}px, ${s}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:l,rotateX:c,rotateY:f}=r;l&&(n+=`rotate(${l}deg) `),c&&(n+=`rotateX(${c}deg) `),f&&(n+=`rotateY(${f}deg) `)}const o=t.x.scale*e.x,a=t.y.scale*e.y;return(o!==1||a!==1)&&(n+=`scale(${o}, ${a})`),n||"none"}const FM=(t,e)=>t.depth-e.depth;class jM{constructor(){this.children=[],this.isDirty=!1}add(e){Qg(this.children,e),this.isDirty=!0}remove(e){Yg(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(FM),this.isDirty=!1,this.children.forEach(e)}}const H2=["","X","Y","Z"],W2=1e3;let zM=0;function B8({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=zM++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!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=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(HM),this.nodes.forEach(GM),this.nodes.forEach(KM)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let c=0;cthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=g8(y,250),Wc.hasAnimatedSinceResize&&(Wc.hasAnimatedSinceResize=!1,this.nodes.forEach(G2))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||f)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:y,hasRelativeTargetChanged:m,layout:p})=>{var S,w,A,k,I;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const R=(w=(S=this.options.transition)!==null&&S!==void 0?S:u.getDefaultTransition())!==null&&w!==void 0?w:ZM,{onLayoutAnimationStart:F,onLayoutAnimationComplete:z}=u.getProps(),j=!this.targetLayout||!D8(this.targetLayout,p)||m,K=!y&&m;if(this.options.layoutRoot||!((A=this.resumeFrom)===null||A===void 0)&&A.instance||K||y&&(j||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,K);const J={...m8(R,"layout"),onPlay:F,onComplete:z};(u.shouldReduceMotion||this.options.layoutRoot)&&(J.delay=0,J.type=!1),this.startAnimation(J)}else!y&&this.animationProgress===0&&G2(this),this.isLead()&&((I=(k=this.options).onExitComplete)===null||I===void 0||I.call(k));this.targetLayout=p})}unmount(){var o,a;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(o=this.getStack())===null||o===void 0||o.remove(this),(a=this.parent)===null||a===void 0||a.children.delete(this),this.instance=void 0,Zs.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var o;return this.isAnimationBlocked||((o=this.parent)===null||o===void 0?void 0:o.isTreeAnimationBlocked())||!1}startUpdate(){var o;this.isUpdateBlocked()||(this.isUpdating=!0,(o=this.nodes)===null||o===void 0||o.forEach(JM),this.animationId++)}getTransformTemplate(){var o;return(o=this.options.visualElement)===null||o===void 0?void 0:o.getProps().transformTemplate}willUpdate(o=!0){var a,l,c;if(this.root.isUpdateBlocked()){(l=(a=this.options).onExitComplete)===null||l===void 0||l.call(a);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var o;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var k;const I=A/1e3;K2(y.x,o.x,I),K2(y.y,o.y,I),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((k=this.relativeParent)===null||k===void 0)&&k.layout)&&(Jc(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),YM(this.relativeTarget,this.relativeTargetOrigin,m,I)),p&&(this.animationValues=h,RM(h,u,this.latestValues,I,w,S)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=I},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Zs.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Rr.update(()=>{Wc.hasAnimatedSinceResize=!0,this.currentAnimation=IM(0,W2,{...o,onUpdate:c=>{var f;this.mixTargetDelta(c),(f=o.onUpdate)===null||f===void 0||f.call(o,c)},onComplete:()=>{var c;(c=o.onComplete)===null||c===void 0||c.call(o),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var o;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(o=this.getStack())===null||o===void 0||o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var o;this.currentAnimation&&((o=this.mixTargetDelta)===null||o===void 0||o.call(this,W2),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:f}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&L8(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||nr();const u=pn(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const h=pn(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}$n(a,l),nl(a,f),Kc(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){var l,c,f;this.sharedNodes.has(o)||this.sharedNodes.set(o,new $M),this.sharedNodes.get(o).add(a),a.promote({transition:(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(f=(c=a.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(c,a)})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let f=0;f{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(q2),this.root.sharedNodes.clear()}}}function UM(t){t.updateLayout()}function VM(t){var e,r,n;const i=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&i&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=t.layout,{animationType:a}=t.options,l=i.source!==t.layout.source;a==="size"?ci(y=>{const m=l?i.measuredBox[y]:i.layoutBox[y],p=pn(m);m.min=s[y].min,m.max=m.min+p}):L8(a,i.layoutBox,s)&&ci(y=>{const m=l?i.measuredBox[y]:i.layoutBox[y],p=pn(s[y]);m.max=m.min+p});const c=Qc();Kc(c,s,i.layoutBox);const f=Qc();l?Kc(f,t.applyTransform(o,!0),i.measuredBox):Kc(f,s,i.layoutBox);const u=!O8(c);let h=!1;if(!t.resumeFrom){const y=t.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:m,layout:p}=y;if(m&&p){const S=nr();Jc(S,i.layoutBox,m.layoutBox);const w=nr();Jc(w,s,p.layoutBox),D8(S,w)||(h=!0),y.options.layoutRoot&&(t.relativeTarget=w,t.relativeTargetOrigin=S,t.relativeParent=y)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:i,delta:f,layoutDelta:c,hasLayoutChanged:u,hasRelativeTargetChanged:h})}else t.isLead()&&((n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r));t.options.transition=void 0}function HM(t){t.isProjectionDirty||(t.isProjectionDirty=!!(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=!!(t.parent&&t.parent.isTransformDirty))}function WM(t){t.clearSnapshot()}function q2(t){t.clearMeasurements()}function qM(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function G2(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function GM(t){t.resolveTargetDelta()}function KM(t){t.calcProjection()}function JM(t){t.resetRotation()}function QM(t){t.removeLeadSnapshot()}function K2(t,e,r){t.translate=Wt(e.translate,0,r),t.scale=Wt(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function J2(t,e,r,n){t.min=Wt(e.min,r.min,n),t.max=Wt(e.max,r.max,n)}function YM(t,e,r,n){J2(t.x,e.x,r.x,n),J2(t.y,e.y,r.y,n)}function XM(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const ZM={duration:.45,ease:[.4,0,.1,1]};function eR(t,e){let r=t.root;for(let s=t.path.length-1;s>=0;s--)if(t.path[s].instance){r=t.path[s];break}const i=(r&&r!==t.root?r.instance:document).querySelector(`[data-projection-id="${e}"]`);i&&t.mount(i,!0)}function Q2(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function tR(t){Q2(t.x),Q2(t.y)}function L8(t,e,r){return t==="position"||t==="preserve-aspect"&&!Fy(U2(e),U2(r),.2)}const rR=B8({attachResizeListener:(t,e)=>Qo(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rv={current:void 0},nR=B8({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!rv.current){const t=new rR(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),rv.current=t}return rv.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),iR={...BI,...tP,...iM,...PM},yl=vT((t,e)=>UT(t,e,iR,EM,nR));function $8(){const t=E.useRef(!1);return a0(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function sR(){const t=$8(),[e,r]=E.useState(0),n=E.useCallback(()=>{t.current&&r(e+1)},[e]);return[E.useCallback(()=>Rr.postRender(n),[n]),e]}class oR extends E.Component{getSnapshotBeforeUpdate(e){const r=this.props.childRef.current;if(r&&e.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function aR({children:t,isPresent:e}){const r=E.useId(),n=E.useRef(null),i=E.useRef({width:0,height:0,top:0,left:0});return E.useInsertionEffect(()=>{const{width:s,height:o,top:a,left:l}=i.current;if(e||!n.current||!s||!o)return;n.current.dataset.motionPopId=r;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` +`+s.stack}return{value:t,source:e,stack:i,digest:null}}function j1(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function yy(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var S_=typeof WeakMap=="function"?WeakMap:Map;function G3(t,e,r){r=Gi(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){n0||(n0=!0,ky=n),yy(t,e)},r}function K3(t,e,r){r=Gi(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){yy(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){yy(t,e),typeof n!="function"&&(Us===null?Us=new Set([this]):Us.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function Mb(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new S_;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=B_.bind(null,t,e,r),e.then(t,t))}function Nb(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Ob(t,e,r,n,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=Gi(-1,1),e.tag=2,zs(r,e,1))),r.lanes|=1),t)}var k_=os.ReactCurrentOwner,Zr=!1;function zr(t,e,r,n){e.child=t===null?A3(e,null,r,n):_l(e,t.child,r,n)}function $b(t,e,r,n,i){r=r.render;var s=e.ref;return dl(e,i),n=Eg(t,e,r,n,s,i),r=Sg(),t!==null&&!Zr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Xi(t,e,i)):(Mt&&r&&ug(e),e.flags|=1,zr(t,e,n,i),e.child)}function Db(t,e,r,n,i){if(t===null){var s=r.type;return typeof s=="function"&&!Og(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=s,J3(t,e,s,n,i)):(t=yd(r.type,null,n,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(r=r.compare,r=r!==null?r:wf,r(o,n)&&t.ref===e.ref)return Xi(t,e,i)}return e.flags|=1,t=Hs(s,n),t.ref=e.ref,t.return=e,e.child=t}function J3(t,e,r,n,i){if(t!==null){var s=t.memoizedProps;if(wf(s,n)&&t.ref===e.ref)if(Zr=!1,e.pendingProps=n=s,(t.lanes&i)!==0)t.flags&131072&&(Zr=!0);else return e.lanes=t.lanes,Xi(t,e,i)}return py(t,e,r,n,i)}function Y3(t,e,r){var n=e.pendingProps,i=n.children,s=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ye(el,ln),ln|=r;else{if(!(r&1073741824))return t=s!==null?s.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Ye(el,ln),ln|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,Ye(el,ln),ln|=n}else s!==null?(n=s.baseLanes|r,e.memoizedState=null):n=r,Ye(el,ln),ln|=n;return zr(t,e,i,r),e.child}function Q3(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function py(t,e,r,n,i){var s=rn(r)?ia:Or.current;return s=kl(e,s),dl(e,i),r=Eg(t,e,r,n,s,i),n=Sg(),t!==null&&!Zr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Xi(t,e,i)):(Mt&&n&&ug(e),e.flags|=1,zr(t,e,r,i),e.child)}function Lb(t,e,r,n,i){if(rn(r)){var s=!0;Gd(e)}else s=!1;if(dl(e,i),e.stateNode===null)dd(t,e),S3(e,r,n),vy(e,r,n,i),n=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=r.contextType;typeof c=="object"&&c!==null?c=In(c):(c=rn(r)?ia:Or.current,c=kl(e,c));var f=r.getDerivedStateFromProps,u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==c)&&Tb(e,o,n,c),ks=!1;var h=e.memoizedState;o.state=h,Xd(e,n,o,i),l=e.memoizedState,a!==n||h!==l||tn.current||ks?(typeof f=="function"&&(hy(e,r,f,n),l=e.memoizedState),(a=ks||_b(e,r,a,n,h,l,c))?(u||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),o.props=n,o.state=l,o.context=c,n=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,C3(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:Wn(e.type,a),o.props=c,u=e.pendingProps,h=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=In(l):(l=rn(r)?ia:Or.current,l=kl(e,l));var y=r.getDerivedStateFromProps;(f=typeof y=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||h!==l)&&Tb(e,o,n,l),ks=!1,h=e.memoizedState,o.state=h,Xd(e,n,o,i);var m=e.memoizedState;a!==u||h!==m||tn.current||ks?(typeof y=="function"&&(hy(e,r,y,n),m=e.memoizedState),(c=ks||_b(e,r,c,n,h,m,l)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,m,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=m),o.props=n,o.state=m,o.context=l,n=c):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),n=!1)}return gy(t,e,r,n,s,i)}function gy(t,e,r,n,i,s){Q3(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return i&&Cb(e,r,!1),Xi(t,e,s);n=e.stateNode,k_.current=e;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=_l(e,t.child,null,s),e.child=_l(e,null,a,s)):zr(t,e,a,s),e.memoizedState=n.state,i&&Cb(e,r,!0),e.child}function X3(t){var e=t.stateNode;e.pendingContext?wb(t,e.pendingContext,e.pendingContext!==e.context):e.context&&wb(t,e.context,!1),xg(t,e.containerInfo)}function Bb(t,e,r,n,i){return Al(),hg(i),e.flags|=256,zr(t,e,r,n),e.child}var my={dehydrated:null,treeContext:null,retryLane:0};function xy(t){return{baseLanes:t,cachePool:null,transitions:null}}function Z3(t,e,r){var n=e.pendingProps,i=Dt.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Ye(Dt,i&1),t===null)return uy(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=n.children,t=n.fallback,s?(n=e.mode,s=e.child,o={mode:"hidden",children:o},!(n&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=dh(o,n,0,null),t=Jo(t,n,r,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=xy(r),e.memoizedState=my,t):_g(e,o));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return A_(t,e,o,n,a,i,r);if(s){s=n.fallback,o=e.mode,i=t.child,a=i.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=Hs(i,l),n.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Hs(a,s):(s=Jo(s,o,r,null),s.flags|=2),s.return=e,n.return=e,n.sibling=s,e.child=n,n=s,s=e.child,o=t.child.memoizedState,o=o===null?xy(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~r,e.memoizedState=my,n}return s=t.child,t=s.sibling,n=Hs(s,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function _g(t,e){return e=dh({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Nu(t,e,r,n){return n!==null&&hg(n),_l(e,t.child,null,r),t=_g(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function A_(t,e,r,n,i,s,o){if(r)return e.flags&256?(e.flags&=-257,n=j1(Error(ne(422))),Nu(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=n.fallback,i=e.mode,n=dh({mode:"visible",children:n.children},i,0,null),s=Jo(s,i,o,null),s.flags|=2,n.return=e,s.return=e,n.sibling=s,e.child=n,e.mode&1&&_l(e,t.child,null,o),e.child.memoizedState=xy(o),e.memoizedState=my,s);if(!(e.mode&1))return Nu(t,e,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var a=n.dgst;return n=a,s=Error(ne(419)),n=j1(s,n,void 0),Nu(t,e,o,n)}if(a=(o&t.childLanes)!==0,Zr||a){if(n=yr,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Qi(t,i),ei(n,t,i,-1))}return Ng(),n=j1(Error(ne(421))),Nu(t,e,o,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=F_.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,dn=js(i.nextSibling),hn=e,Mt=!0,Kn=null,t!==null&&(Sn[kn++]=Hi,Sn[kn++]=Wi,Sn[kn++]=sa,Hi=t.id,Wi=t.overflow,sa=e),e=_g(e,n.children),e.flags|=4096,e)}function Fb(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),dy(t.return,e,r)}function z1(t,e,r,n,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=i)}function e4(t,e,r){var n=e.pendingProps,i=n.revealOrder,s=n.tail;if(zr(t,e,n.children,r),n=Dt.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Fb(t,r,e);else if(t.tag===19)Fb(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(Ye(Dt,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&Zd(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),z1(e,!1,i,r,s);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Zd(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}z1(e,!0,r,null,s);break;case"together":z1(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function dd(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Xi(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),aa|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(ne(153));if(e.child!==null){for(t=e.child,r=Hs(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=Hs(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function __(t,e,r){switch(e.tag){case 3:X3(e),Al();break;case 5:_3(e);break;case 1:rn(e.type)&&Gd(e);break;case 4:xg(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;Ye(Yd,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(Ye(Dt,Dt.current&1),e.flags|=128,null):r&e.child.childLanes?Z3(t,e,r):(Ye(Dt,Dt.current&1),t=Xi(t,e,r),t!==null?t.sibling:null);Ye(Dt,Dt.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return e4(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ye(Dt,Dt.current),n)break;return null;case 22:case 23:return e.lanes=0,Y3(t,e,r)}return Xi(t,e,r)}var t4,by,r4,n4;t4=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};by=function(){};r4=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,Ho(bi.current);var s=null;switch(r){case"input":i=Uv(t,i),n=Uv(t,n),s=[];break;case"select":i=Bt({},i,{value:void 0}),n=Bt({},n,{value:void 0}),s=[];break;case"textarea":i=Wv(t,i),n=Wv(t,n),s=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=Wd)}Gv(r,n);var o;r=null;for(c in i)if(!n.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(vf.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in n){var l=n[c];if(a=i!=null?i[c]:void 0,n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(s||(s=[]),s.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(vf.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&kt("scroll",t),s||a===l||(s=[])):(s=s||[]).push(c,l))}r&&(s=s||[]).push("style",r);var c=s;(e.updateQueue=c)&&(e.flags|=4)}};n4=function(t,e,r,n){r!==n&&(e.flags|=4)};function gc(t,e){if(!Mt)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function _r(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function T_(t,e,r){var n=e.pendingProps;switch(dg(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _r(e),null;case 1:return rn(e.type)&&qd(),_r(e),null;case 3:return n=e.stateNode,Tl(),_t(tn),_t(Or),wg(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Ru(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Kn!==null&&(Ty(Kn),Kn=null))),by(t,e),_r(e),null;case 5:bg(e);var i=Ho(Af.current);if(r=e.type,t!==null&&e.stateNode!=null)r4(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(ne(166));return _r(e),null}if(t=Ho(bi.current),Ru(e)){n=e.stateNode,r=e.type;var s=e.memoizedProps;switch(n[di]=e,n[Sf]=s,t=(e.mode&1)!==0,r){case"dialog":kt("cancel",n),kt("close",n);break;case"iframe":case"object":case"embed":kt("load",n);break;case"video":case"audio":for(i=0;i<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[di]=e,t[Sf]=n,t4(t,e,!1,!1),e.stateNode=t;e:{switch(o=Kv(r,n),r){case"dialog":kt("cancel",t),kt("close",t),i=n;break;case"iframe":case"object":case"embed":kt("load",t),i=n;break;case"video":case"audio":for(i=0;iIl&&(e.flags|=128,n=!0,gc(s,!1),e.lanes=4194304)}else{if(!n)if(t=Zd(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),gc(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Mt)return _r(e),null}else 2*Jt()-s.renderingStartTime>Il&&r!==1073741824&&(e.flags|=128,n=!0,gc(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(r=s.last,r!==null?r.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Jt(),e.sibling=null,r=Dt.current,Ye(Dt,n?r&1|2:r&1),e):(_r(e),null);case 22:case 23:return Mg(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?ln&1073741824&&(_r(e),e.subtreeFlags&6&&(e.flags|=8192)):_r(e),null;case 24:return null;case 25:return null}throw Error(ne(156,e.tag))}function P_(t,e){switch(dg(e),e.tag){case 1:return rn(e.type)&&qd(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Tl(),_t(tn),_t(Or),wg(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return bg(e),null;case 13:if(_t(Dt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ne(340));Al()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return _t(Dt),null;case 4:return Tl(),null;case 10:return pg(e.type._context),null;case 22:case 23:return Mg(),null;case 24:return null;default:return null}}var Ou=!1,Pr=!1,I_=typeof WeakSet=="function"?WeakSet:Set,le=null;function Za(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){zt(t,e,n)}else r.current=null}function wy(t,e,r){try{r()}catch(n){zt(t,e,n)}}var jb=!1;function R_(t,e){if(iy=Ud,t=a3(),fg(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,c=0,f=0,u=t,h=null;t:for(;;){for(var y;u!==r||i!==0&&u.nodeType!==3||(a=o+i),u!==s||n!==0&&u.nodeType!==3||(l=o+n),u.nodeType===3&&(o+=u.nodeValue.length),(y=u.firstChild)!==null;)h=u,u=y;for(;;){if(u===t)break t;if(h===r&&++c===i&&(a=o),h===s&&++f===n&&(l=o),(y=u.nextSibling)!==null)break;u=h,h=u.parentNode}u=y}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(sy={focusedElem:t,selectionRange:r},Ud=!1,le=e;le!==null;)if(e=le,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,le=t;else for(;le!==null;){e=le;try{var m=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var p=m.memoizedProps,k=m.memoizedState,w=e.stateNode,E=w.getSnapshotBeforeUpdate(e.elementType===e.type?p:Wn(e.type,p),k);w.__reactInternalSnapshotBeforeUpdate=E}break;case 3:var A=e.stateNode.containerInfo;A.nodeType===1?A.textContent="":A.nodeType===9&&A.documentElement&&A.removeChild(A.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(I){zt(e,e.return,I)}if(t=e.sibling,t!==null){t.return=e.return,le=t;break}le=e.return}return m=jb,jb=!1,m}function Uc(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&wy(e,r,s)}i=i.next}while(i!==n)}}function fh(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Cy(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function i4(t){var e=t.alternate;e!==null&&(t.alternate=null,i4(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[di],delete e[Sf],delete e[ly],delete e[h_],delete e[v_])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function s4(t){return t.tag===5||t.tag===3||t.tag===4}function zb(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||s4(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Ey(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Wd));else if(n!==4&&(t=t.child,t!==null))for(Ey(t,e,r),t=t.sibling;t!==null;)Ey(t,e,r),t=t.sibling}function Sy(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Sy(t,e,r),t=t.sibling;t!==null;)Sy(t,e,r),t=t.sibling}var xr=null,Gn=!1;function xs(t,e,r){for(r=r.child;r!==null;)o4(t,e,r),r=r.sibling}function o4(t,e,r){if(xi&&typeof xi.onCommitFiberUnmount=="function")try{xi.onCommitFiberUnmount(rh,r)}catch{}switch(r.tag){case 5:Pr||Za(r,e);case 6:var n=xr,i=Gn;xr=null,xs(t,e,r),xr=n,Gn=i,xr!==null&&(Gn?(t=xr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):xr.removeChild(r.stateNode));break;case 18:xr!==null&&(Gn?(t=xr,r=r.stateNode,t.nodeType===8?O1(t.parentNode,r):t.nodeType===1&&O1(t,r),xf(t)):O1(xr,r.stateNode));break;case 4:n=xr,i=Gn,xr=r.stateNode.containerInfo,Gn=!0,xs(t,e,r),xr=n,Gn=i;break;case 0:case 11:case 14:case 15:if(!Pr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&wy(r,e,o),i=i.next}while(i!==n)}xs(t,e,r);break;case 1:if(!Pr&&(Za(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){zt(r,e,a)}xs(t,e,r);break;case 21:xs(t,e,r);break;case 22:r.mode&1?(Pr=(n=Pr)||r.memoizedState!==null,xs(t,e,r),Pr=n):xs(t,e,r);break;default:xs(t,e,r)}}function Ub(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new I_),e.forEach(function(n){var i=j_.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Ln(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~s}if(n=i,n=Jt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*N_(n/1960))-n,10t?16:t,Rs===null)var n=!1;else{if(t=Rs,Rs=null,i0=0,Oe&6)throw Error(ne(331));var i=Oe;for(Oe|=4,le=t.current;le!==null;){var s=le,o=s.child;if(le.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lJt()-Ig?Ko(t,0):Pg|=r),nn(t,e)}function v4(t,e){e===0&&(t.mode&1?(e=ku,ku<<=1,!(ku&130023424)&&(ku=4194304)):e=1);var r=Hr();t=Qi(t,e),t!==null&&(Xf(t,e,r),nn(t,r))}function F_(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),v4(t,r)}function j_(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(ne(314))}n!==null&&n.delete(e),v4(t,r)}var y4;y4=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||tn.current)Zr=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Zr=!1,__(t,e,r);Zr=!!(t.flags&131072)}else Zr=!1,Mt&&e.flags&1048576&&m3(e,Jd,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;dd(t,e),t=e.pendingProps;var i=kl(e,Or.current);dl(e,r),i=Eg(null,e,n,t,i,r);var s=Sg();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,rn(n)?(s=!0,Gd(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,mg(e),i.updater=lh,e.stateNode=i,i._reactInternals=e,vy(e,n,t,r),e=gy(null,e,n,!0,s,r)):(e.tag=0,Mt&&s&&ug(e),zr(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(dd(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=U_(n),t=Wn(n,t),i){case 0:e=py(null,e,n,t,r);break e;case 1:e=Lb(null,e,n,t,r);break e;case 11:e=$b(null,e,n,t,r);break e;case 14:e=Db(null,e,n,Wn(n.type,t),r);break e}throw Error(ne(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Wn(n,i),py(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Wn(n,i),Lb(t,e,n,i,r);case 3:e:{if(X3(e),t===null)throw Error(ne(387));n=e.pendingProps,s=e.memoizedState,i=s.element,C3(t,e),Xd(e,n,null,r);var o=e.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=Pl(Error(ne(423)),e),e=Bb(t,e,n,r,i);break e}else if(n!==i){i=Pl(Error(ne(424)),e),e=Bb(t,e,n,r,i);break e}else for(dn=js(e.stateNode.containerInfo.firstChild),hn=e,Mt=!0,Kn=null,r=A3(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Al(),n===i){e=Xi(t,e,r);break e}zr(t,e,n,r)}e=e.child}return e;case 5:return _3(e),t===null&&uy(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,oy(n,i)?o=null:s!==null&&oy(n,s)&&(e.flags|=32),Q3(t,e),zr(t,e,o,r),e.child;case 6:return t===null&&uy(e),null;case 13:return Z3(t,e,r);case 4:return xg(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=_l(e,null,n,r):zr(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Wn(n,i),$b(t,e,n,i,r);case 7:return zr(t,e,e.pendingProps,r),e.child;case 8:return zr(t,e,e.pendingProps.children,r),e.child;case 12:return zr(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,Ye(Yd,n._currentValue),n._currentValue=o,s!==null)if(ni(s.value,o)){if(s.children===i.children&&!tn.current){e=Xi(t,e,r);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=Gi(-1,r&-r),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),dy(s.return,r,e),a.lanes|=r;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(ne(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),dy(o,r,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}zr(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,dl(e,r),i=In(i),n=n(i),e.flags|=1,zr(t,e,n,r),e.child;case 14:return n=e.type,i=Wn(n,e.pendingProps),i=Wn(n.type,i),Db(t,e,n,i,r);case 15:return J3(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Wn(n,i),dd(t,e),e.tag=1,rn(n)?(t=!0,Gd(e)):t=!1,dl(e,r),S3(e,n,i),vy(e,n,i,r),gy(null,e,n,!0,t,r);case 19:return e4(t,e,r);case 22:return Y3(t,e,r)}throw Error(ne(156,e.tag))};function p4(t,e){return U5(t,e)}function z_(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 _n(t,e,r,n){return new z_(t,e,r,n)}function Og(t){return t=t.prototype,!(!t||!t.isReactComponent)}function U_(t){if(typeof t=="function")return Og(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Zp)return 11;if(t===eg)return 14}return 2}function Hs(t,e){var r=t.alternate;return r===null?(r=_n(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function yd(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")Og(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Ha:return Jo(r.children,i,s,e);case Xp:o=8,i|=8;break;case Bv:return t=_n(12,r,e,i|2),t.elementType=Bv,t.lanes=s,t;case Fv:return t=_n(13,r,e,i),t.elementType=Fv,t.lanes=s,t;case jv:return t=_n(19,r,e,i),t.elementType=jv,t.lanes=s,t;case k5:return dh(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case E5:o=10;break e;case S5:o=9;break e;case Zp:o=11;break e;case eg:o=14;break e;case Ss:o=16,n=null;break e}throw Error(ne(130,t==null?t:typeof t,""))}return e=_n(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function Jo(t,e,r,n){return t=_n(7,t,n,e),t.lanes=r,t}function dh(t,e,r,n){return t=_n(22,t,n,e),t.elementType=k5,t.lanes=r,t.stateNode={isHidden:!1},t}function U1(t,e,r){return t=_n(6,t,null,e),t.lanes=r,t}function V1(t,e,r){return e=_n(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function V_(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=E1(0),this.expirationTimes=E1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=E1(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $g(t,e,r,n,i,s,o,a,l){return t=new V_(t,e,r,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=_n(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},mg(s),t}function H_(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(b4)}catch(t){console.error(t)}}b4(),m5.exports=mn;var ho=m5.exports;const J_=lo(ho),Fg=S.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),gh=S.createContext({});function Y_(){return S.useContext(gh).visualElement}const ru=S.createContext(null),mh=typeof document<"u",a0=mh?S.useLayoutEffect:S.useEffect,w4=S.createContext({strict:!1});function Q_(t,e,r,n){const i=Y_(),s=S.useContext(w4),o=S.useContext(ru),a=S.useContext(Fg).reducedMotion,l=S.useRef();n=n||s.renderer,!l.current&&n&&(l.current=n(t,{visualState:e,parent:i,props:r,presenceId:o?o.id:void 0,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;return a0(()=>{c&&c.render()}),(window.HandoffAppearAnimations?a0:S.useEffect)(()=>{c&&c.animationState&&c.animationState.animateChanges()}),c}function tl(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function X_(t,e,r){return S.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):tl(r)&&(r.current=n))},[e])}function Rf(t){return typeof t=="string"||Array.isArray(t)}function xh(t){return typeof t=="object"&&typeof t.start=="function"}const Z_=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function bh(t){return xh(t.animate)||Z_.some(e=>Rf(t[e]))}function C4(t){return!!(bh(t)||t.variants)}function eT(t,e){if(bh(t)){const{initial:r,animate:n}=t;return{initial:r===!1||Rf(r)?r:void 0,animate:Rf(n)?n:void 0}}return t.inherit!==!1?e:{}}function tT(t){const{initial:e,animate:r}=eT(t,S.useContext(gh));return S.useMemo(()=>({initial:e,animate:r}),[Yb(e),Yb(r)])}function Yb(t){return Array.isArray(t)?t.join(" "):t}const Oi=t=>({isEnabled:e=>t.some(r=>!!e[r])}),Mf={measureLayout:Oi(["layout","layoutId","drag"]),animation:Oi(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Oi(["exit"]),drag:Oi(["drag","dragControls"]),focus:Oi(["whileFocus"]),hover:Oi(["whileHover","onHoverStart","onHoverEnd"]),tap:Oi(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Oi(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Oi(["whileInView","onViewportEnter","onViewportLeave"])};function rT(t){for(const e in t)e==="projectionNodeConstructor"?Mf.projectionNodeConstructor=t[e]:Mf[e].Component=t[e]}function wh(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}const Wc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let nT=1;function iT(){return wh(()=>{if(Wc.hasEverUpdated)return nT++})}const jg=S.createContext({});class sT extends sr.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}}const E4=S.createContext({}),oT=Symbol.for("motionComponentSymbol");function aT({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:i,Component:s}){t&&rT(t);function o(l,c){const f={...S.useContext(Fg),...l,layoutId:lT(l)},{isStatic:u}=f;let h=null;const y=tT(l),m=u?void 0:iT(),p=i(l,u);if(!u&&mh){y.visualElement=Q_(s,p,f,e);const k=S.useContext(w4).strict,w=S.useContext(E4);y.visualElement&&(h=y.visualElement.loadFeatures(f,k,t,m,r||Mf.projectionNodeConstructor,w))}return S.createElement(sT,{visualElement:y.visualElement,props:f},h,S.createElement(gh.Provider,{value:y},n(s,l,m,X_(p,y.visualElement,c),p,u,y.visualElement)))}const a=S.forwardRef(o);return a[oT]=s,a}function lT({layoutId:t}){const e=S.useContext(jg).id;return e&&t!==void 0?e+"-"+t:t}function cT(t){function e(n,i={}){return aT(t(n,i))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,i)=>(r.has(i)||r.set(i,e(i)),r.get(i))})}const fT=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function zg(t){return typeof t!="string"||t.includes("-")?!1:!!(fT.indexOf(t)>-1||/[A-Z]/.test(t))}const l0={};function uT(t){Object.assign(l0,t)}const c0=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Jl=new Set(c0);function S4(t,{layout:e,layoutId:r}){return Jl.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!l0[t]||t==="opacity")}const sn=t=>!!(t!=null&&t.getVelocity),dT={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},hT=(t,e)=>c0.indexOf(t)-c0.indexOf(e);function vT({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},i,s){let o="";e.sort(hT);for(const a of e)o+=`${dT[a]||a}(${t[a]}) `;return r&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,i?"":o):n&&i&&(o="none"),o}function k4(t){return t.startsWith("--")}const yT=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Rl=(t,e,r)=>Math.min(Math.max(r,t),e),ba={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},qc={...ba,transform:t=>Rl(0,1,t)},Lu={...ba,default:1},Gc=t=>Math.round(t*1e5)/1e5,Nf=/(-)?([\d]*\.?[\d])+/g,Py=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,pT=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function nu(t){return typeof t=="string"}const iu=t=>({test:e=>nu(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Cs=iu("deg"),wi=iu("%"),ye=iu("px"),gT=iu("vh"),mT=iu("vw"),Qb={...wi,parse:t=>wi.parse(t)/100,transform:t=>wi.transform(t*100)},Xb={...ba,transform:Math.round},A4={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,size:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,rotate:Cs,rotateX:Cs,rotateY:Cs,rotateZ:Cs,scale:Lu,scaleX:Lu,scaleY:Lu,scaleZ:Lu,skew:Cs,skewX:Cs,skewY:Cs,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:qc,originX:Qb,originY:Qb,originZ:ye,zIndex:Xb,fillOpacity:qc,strokeOpacity:qc,numOctaves:Xb};function Ug(t,e,r,n){const{style:i,vars:s,transform:o,transformKeys:a,transformOrigin:l}=t;a.length=0;let c=!1,f=!1,u=!0;for(const h in e){const y=e[h];if(k4(h)){s[h]=y;continue}const m=A4[h],p=yT(y,m);if(Jl.has(h)){if(c=!0,o[h]=p,a.push(h),!u)continue;y!==(m.default||0)&&(u=!1)}else h.startsWith("origin")?(f=!0,l[h]=p):i[h]=p}if(e.transform||(c||n?i.transform=vT(t,r,u,n):i.transform&&(i.transform="none")),f){const{originX:h="50%",originY:y="50%",originZ:m=0}=l;i.transformOrigin=`${h} ${y} ${m}`}}const Vg=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function _4(t,e,r){for(const n in e)!sn(e[n])&&!S4(n,r)&&(t[n]=e[n])}function xT({transformTemplate:t},e,r){return S.useMemo(()=>{const n=Vg();return Ug(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function bT(t,e,r){const n=t.style||{},i={};return _4(i,n,t),Object.assign(i,xT(t,e,r)),t.transformValues?t.transformValues(i):i}function wT(t,e,r){const n={},i=bT(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const CT=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","viewport"]);function f0(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||CT.has(t)}let T4=t=>!f0(t);function ET(t){t&&(T4=e=>e.startsWith("on")?!f0(e):t(e))}try{ET(require("@emotion/is-prop-valid").default)}catch{}function ST(t,e,r){const n={};for(const i in t)i==="values"&&typeof t.values=="object"||(T4(i)||r===!0&&f0(i)||!e&&!f0(i)||t.draggable&&i.startsWith("onDrag"))&&(n[i]=t[i]);return n}function Zb(t,e,r){return typeof t=="string"?t:ye.transform(e+r*t)}function kT(t,e,r){const n=Zb(e,t.x,t.width),i=Zb(r,t.y,t.height);return`${n} ${i}`}const AT={offset:"stroke-dashoffset",array:"stroke-dasharray"},_T={offset:"strokeDashoffset",array:"strokeDasharray"};function TT(t,e,r=1,n=0,i=!0){t.pathLength=1;const s=i?AT:_T;t[s.offset]=ye.transform(-n);const o=ye.transform(e),a=ye.transform(r);t[s.array]=`${o} ${a}`}function Hg(t,{attrX:e,attrY:r,originX:n,originY:i,pathLength:s,pathSpacing:o=1,pathOffset:a=0,...l},c,f,u){if(Ug(t,l,c,u),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:y,dimensions:m}=t;h.transform&&(m&&(y.transform=h.transform),delete h.transform),m&&(n!==void 0||i!==void 0||y.transform)&&(y.transformOrigin=kT(m,n!==void 0?n:.5,i!==void 0?i:.5)),e!==void 0&&(h.x=e),r!==void 0&&(h.y=r),s!==void 0&&TT(h,s,o,a,!1)}const P4=()=>({...Vg(),attrs:{}}),Wg=t=>typeof t=="string"&&t.toLowerCase()==="svg";function PT(t,e,r,n){const i=S.useMemo(()=>{const s=P4();return Hg(s,e,{enableHardwareAcceleration:!1},Wg(n),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};_4(s,t.style,t),i.style={...s,...i.style}}return i}function IT(t=!1){return(r,n,i,s,{latestValues:o},a)=>{const c=(zg(r)?PT:wT)(n,o,a,r),u={...ST(n,typeof r=="string",t),...c,ref:s},{children:h}=n,y=S.useMemo(()=>sn(h)?h.get():h,[h]);return i&&(u["data-projection-id"]=i),S.createElement(r,{...u,children:y})}}const qg=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function I4(t,{style:e,vars:r},n,i){Object.assign(t.style,e,i&&i.getProjectionStyles(n));for(const s in r)t.style.setProperty(s,r[s])}const R4=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function M4(t,e,r,n){I4(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(R4.has(i)?i:qg(i),e.attrs[i])}function Gg(t,e){const{style:r}=t,n={};for(const i in r)(sn(r[i])||e.style&&sn(e.style[i])||S4(i,t))&&(n[i]=r[i]);return n}function N4(t,e){const r=Gg(t,e);for(const n in t)if(sn(t[n])||sn(e[n])){const i=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[i]=t[n]}return r}function Kg(t,e,r,n={},i={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,i)),e}const u0=t=>Array.isArray(t),RT=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),MT=t=>u0(t)?t[t.length-1]||0:t;function pd(t){const e=sn(t)?t.get():t;return RT(e)?e.toValue():e}function NT({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,i,s){const o={latestValues:OT(n,i,s,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const O4=t=>(e,r)=>{const n=S.useContext(gh),i=S.useContext(ru),s=()=>NT(t,e,n,i);return r?s():wh(s)};function OT(t,e,r,n){const i={},s=n(t,{});for(const h in s)i[h]=pd(s[h]);let{initial:o,animate:a}=t;const l=bh(t),c=C4(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let f=r?r.initial===!1:!1;f=f||o===!1;const u=f?a:o;return u&&typeof u!="boolean"&&!xh(u)&&(Array.isArray(u)?u:[u]).forEach(y=>{const m=Kg(t,y);if(!m)return;const{transitionEnd:p,transition:k,...w}=m;for(const E in w){let A=w[E];if(Array.isArray(A)){const I=f?A.length-1:0;A=A[I]}A!==null&&(i[E]=A)}for(const E in p)i[E]=p[E]}),i}const $T={useVisualState:O4({scrapeMotionValuesFromProps:N4,createRenderState:P4,onMount:(t,e,{renderState:r,latestValues:n})=>{try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}Hg(r,n,{enableHardwareAcceleration:!1},Wg(e.tagName),t.transformTemplate),M4(e,r)}})},DT={useVisualState:O4({scrapeMotionValuesFromProps:Gg,createRenderState:Vg})};function LT(t,{forwardMotionProps:e=!1},r,n,i){return{...zg(t)?$T:DT,preloadedFeatures:r,useRender:IT(e),createVisualElement:n,projectionNodeConstructor:i,Component:t}}var Je;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(Je||(Je={}));function Yo(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function d0(t,e,r,n){S.useEffect(()=>{const i=t.current;if(r&&i)return Yo(i,e,r,n)},[t,e,r,n])}function BT({whileFocus:t,visualElement:e}){const r=S.useRef(!1),{animationState:n}=e,i=S.useCallback(()=>{let o=!1;try{o=e.current.matches(":focus-visible")}catch{o=!0}!o||!n||(n.setActive(Je.Focus,!0),r.current=!0)},[n]),s=S.useCallback(()=>{!r.current||!n||(n.setActive(Je.Focus,!1),r.current=!1)},[n]);d0(e,"focus",t?i:void 0),d0(e,"blur",t?s:void 0)}const $4=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Ch(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const D4=t=>e=>$4(e)&&t(e,Ch(e));function vl(t,e,r,n){return Yo(t,e,D4(r),n)}function h0(t,e,r,n){return d0(t,e,r&&D4(r),n)}function L4(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const e2=L4("dragHorizontal"),t2=L4("dragVertical");function B4(t){let e=!1;if(t==="y")e=t2();else if(t==="x")e=e2();else{const r=e2(),n=t2();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function F4(){const t=B4(!0);return t?(t(),!1):!0}function r2(t,e,r,n){return(i,s)=>{i.type==="touch"||F4()||(r&&t.animationState&&t.animationState.setActive(Je.Hover,e),n&&n(i,s))}}function FT({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){h0(n,"pointerenter",S.useMemo(()=>t||r?r2(n,!0,!!r,t):void 0,[t,!!r,n]),{passive:!t}),h0(n,"pointerleave",S.useMemo(()=>e||r?r2(n,!1,!!r,e):void 0,[t,!!r,n]),{passive:!e})}const j4=(t,e)=>e?t===e?!0:j4(t,e.parentElement):!1;function Jg(t){return S.useEffect(()=>()=>t(),[])}const jT=(t,e)=>r=>e(t(r)),Eh=(...t)=>t.reduce(jT);function H1(t,e){if(!e)return;const r=new PointerEvent("pointer"+t);e(r,Ch(r))}function zT({onTap:t,onTapStart:e,onTapCancel:r,whileTap:n,visualElement:i,...s}){const o=t||e||r||n,a=S.useRef(!1),l=S.useRef(null),c={passive:!(e||t||r||s.onPointerDown)};function f(){l.current&&l.current(),l.current=null}function u(){return f(),a.current=!1,i.getProps().whileTap&&i.animationState&&i.animationState.setActive(Je.Tap,!1),!F4()}function h(E,A){var I,M,B,U;u()&&(j4(i.current,E.target)?(U=(B=i.getProps()).onTap)===null||U===void 0||U.call(B,E,A):(M=(I=i.getProps()).onTapCancel)===null||M===void 0||M.call(I,E,A))}function y(E,A){var I,M;u()&&((M=(I=i.getProps()).onTapCancel)===null||M===void 0||M.call(I,E,A))}function m(E,A){var I;const M=i.getProps();M.whileTap&&i.animationState&&i.animationState.setActive(Je.Tap,!0),(I=M.onTapStart)===null||I===void 0||I.call(M,E,A)}const p=[!!e,!!t,!!n,i],k=S.useCallback((E,A)=>{f(),!a.current&&(a.current=!0,l.current=Eh(vl(window,"pointerup",h,c),vl(window,"pointercancel",y,c)),m(E,A))},p);h0(i,"pointerdown",o?k:void 0,c);const w=S.useCallback(()=>{const E=Yo(i.current,"keydown",I=>{I.key!=="Enter"||a.current||(a.current=!0,l.current=Yo(i.current,"keyup",()=>{I.key!=="Enter"||!u()||H1("up",i.getProps().onTap)},c),H1("down",m))}),A=Yo(i.current,"blur",()=>{E(),A(),a.current&&H1("cancel",y)})},p);d0(i,"focus",o?w:void 0),Jg(f)}const Iy=new WeakMap,W1=new WeakMap,UT=t=>{const e=Iy.get(t.target);e&&e(t)},VT=t=>{t.forEach(UT)};function HT({root:t,...e}){const r=t||document;W1.has(r)||W1.set(r,{});const n=W1.get(r),i=JSON.stringify(e);return n[i]||(n[i]=new IntersectionObserver(VT,{root:t,...e})),n[i]}function WT(t,e,r){const n=HT(e);return Iy.set(t,r),n.observe(t),()=>{Iy.delete(t),n.unobserve(t)}}function qT({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:i={}}){const s=S.useRef({hasEnteredView:!1,isInView:!1});let o=!!(e||r||n);i.once&&s.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?JT:KT)(o,s.current,t,i)}const GT={some:0,all:1};function KT(t,e,r,{root:n,margin:i,amount:s="some",once:o}){S.useEffect(()=>{if(!t||!r.current)return;const a={root:n==null?void 0:n.current,rootMargin:i,threshold:typeof s=="number"?s:GT[s]},l=c=>{const{isIntersecting:f}=c;if(e.isInView===f||(e.isInView=f,o&&!f&&e.hasEnteredView))return;f&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(Je.InView,f);const u=r.getProps(),h=f?u.onViewportEnter:u.onViewportLeave;h&&h(c)};return WT(r.current,a,l)},[t,n,i,s])}function JT(t,e,r,{fallback:n=!0}){S.useEffect(()=>{!t||!n||requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:i}=r.getProps();i&&i(null),r.animationState&&r.animationState.setActive(Je.InView,!0)})},[t])}const Ms=t=>e=>(t(e),null),YT={inView:Ms(qT),tap:Ms(zT),focus:Ms(BT),hover:Ms(FT)};function z4(){const t=S.useContext(ru);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,i=S.useId();return S.useEffect(()=>n(i),[]),!e&&r?[!1,()=>r&&r(i)]:[!0]}function U4(t,e){if(!Array.isArray(e))return!1;const r=e.length;if(r!==t.length)return!1;for(let n=0;n/^\-?\d*\.?\d+$/.test(t),XT=t=>/^0[^.\s]+$/.test(t),Ki={delta:0,timestamp:0},V4=1/60*1e3,ZT=typeof performance<"u"?()=>performance.now():()=>Date.now(),H4=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(ZT()),V4);function eP(t){let e=[],r=[],n=0,i=!1,s=!1;const o=new WeakSet,a={schedule:(l,c=!1,f=!1)=>{const u=f&&i,h=u?e:r;return c&&o.add(l),h.indexOf(l)===-1&&(h.push(l),u&&i&&(n=e.length)),l},cancel:l=>{const c=r.indexOf(l);c!==-1&&r.splice(c,1),o.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let c=0;c(t[e]=eP(()=>Of=!0),t),{}),Mr=su.reduce((t,e)=>{const r=Sh[e];return t[e]=(n,i=!1,s=!1)=>(Of||nP(),r.schedule(n,i,s)),t},{}),Zs=su.reduce((t,e)=>(t[e]=Sh[e].cancel,t),{}),q1=su.reduce((t,e)=>(t[e]=()=>Sh[e].process(Ki),t),{}),rP=t=>Sh[t].process(Ki),W4=t=>{Of=!1,Ki.delta=Ry?V4:Math.max(Math.min(t-Ki.timestamp,tP),1),Ki.timestamp=t,My=!0,su.forEach(rP),My=!1,Of&&(Ry=!1,H4(W4))},nP=()=>{Of=!0,Ry=!0,My||H4(W4)};function Yg(t,e){t.indexOf(e)===-1&&t.push(e)}function Qg(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class Xg{constructor(){this.subscriptions=[]}add(e){return Yg(this.subscriptions,e),()=>Qg(this.subscriptions,e)}notify(e,r,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,r,n);else for(let s=0;s!isNaN(parseFloat(t));class sP{constructor(e,r={}){this.version="9.0.1",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,i=!0)=>{this.prev=this.current,this.current=n;const{delta:s,timestamp:o}=Ki;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,Mr.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Mr.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=iP(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new Xg);const n=this.events[e].add(r);return e==="change"?()=>{n(),Mr.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e,r=!0){!r||!this.passiveEffect?this.updateAndNotify(e,r):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,r,n){this.set(r),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Zg(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ml(t,e){return new sP(t,e)}const em=(t,e)=>r=>!!(nu(r)&&pT.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),q4=(t,e,r)=>n=>{if(!nu(n))return n;const[i,s,o,a]=n.match(Nf);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},oP=t=>Rl(0,255,t),G1={...ba,transform:t=>Math.round(oP(t))},Wo={test:em("rgb","red"),parse:q4("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+G1.transform(t)+", "+G1.transform(e)+", "+G1.transform(r)+", "+Gc(qc.transform(n))+")"};function aP(t){let e="",r="",n="",i="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,r+=r,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const Ny={test:em("#"),parse:aP,transform:Wo.transform},rl={test:em("hsl","hue"),parse:q4("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+wi.transform(Gc(e))+", "+wi.transform(Gc(r))+", "+Gc(qc.transform(n))+")"},jr={test:t=>Wo.test(t)||Ny.test(t)||rl.test(t),parse:t=>Wo.test(t)?Wo.parse(t):rl.test(t)?rl.parse(t):Ny.parse(t),transform:t=>nu(t)?t:t.hasOwnProperty("red")?Wo.transform(t):rl.transform(t)},G4="${c}",K4="${n}";function lP(t){var e,r;return isNaN(t)&&nu(t)&&(((e=t.match(Nf))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(Py))===null||r===void 0?void 0:r.length)||0)>0}function v0(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const i=t.match(Py);i&&(r=i.length,t=t.replace(Py,G4),e.push(...i.map(jr.parse)));const s=t.match(Nf);return s&&(n=s.length,t=t.replace(Nf,K4),e.push(...s.map(ba.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function J4(t){return v0(t).values}function Y4(t){const{values:e,numColors:r,tokenised:n}=v0(t),i=e.length;return s=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function fP(t){const e=J4(t);return Y4(t)(e.map(cP))}const eo={test:lP,parse:J4,createTransformer:Y4,getAnimatableNone:fP},uP=new Set(["brightness","contrast","saturate","opacity"]);function dP(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(Nf)||[];if(!n)return t;const i=r.replace(n,"");let s=uP.has(e)?1:0;return n!==r&&(s*=100),e+"("+s+i+")"}const hP=/([a-z-]*)\(.*?\)/g,Oy={...eo,getAnimatableNone:t=>{const e=t.match(hP);return e?e.map(dP).join(" "):t}},vP={...A4,color:jr,backgroundColor:jr,outlineColor:jr,fill:jr,stroke:jr,borderColor:jr,borderTopColor:jr,borderRightColor:jr,borderBottomColor:jr,borderLeftColor:jr,filter:Oy,WebkitFilter:Oy},tm=t=>vP[t];function rm(t,e){var r;let n=tm(t);return n!==Oy&&(n=eo),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const Q4=t=>e=>e.test(t),yP={test:t=>t==="auto",parse:t=>t},X4=[ba,ye,wi,Cs,mT,gT,yP],xc=t=>X4.find(Q4(t)),pP=[...X4,jr,eo],gP=t=>pP.find(Q4(t));function mP(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function xP(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function kh(t,e,r){const n=t.getProps();return Kg(n,e,r!==void 0?r:n.custom,mP(t),xP(t))}function bP(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,Ml(r))}function wP(t,e){const r=kh(t,e);let{transitionEnd:n={},transition:i={},...s}=r?t.makeTargetAnimatable(r,!1):{};s={...s,...n};for(const o in s){const a=MT(s[o]);bP(t,o,a)}}function CP(t,e,r){var n,i;const s=Object.keys(e).filter(a=>!t.hasValue(a)),o=s.length;if(o)for(let a=0;at*1e3,_P={current:!1},nm=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,im=t=>e=>1-t(1-e),sm=t=>t*t,TP=im(sm),om=nm(sm),Wt=(t,e,r)=>-r*t+r*e+t;function K1(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function PP({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,s=0,o=0;if(!e)i=s=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;i=K1(l,a,t+1/3),s=K1(l,a,t),o=K1(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}const J1=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},IP=[Ny,Wo,rl],RP=t=>IP.find(e=>e.test(t));function n2(t){const e=RP(t);let r=e.parse(t);return e===rl&&(r=PP(r)),r}const Z4=(t,e)=>{const r=n2(t),n=n2(e),i={...r};return s=>(i.red=J1(r.red,n.red,s),i.green=J1(r.green,n.green,s),i.blue=J1(r.blue,n.blue,s),i.alpha=Wt(r.alpha,n.alpha,s),Wo.transform(i))};function e8(t,e){return typeof t=="number"?r=>Wt(t,e,r):jr.test(t)?Z4(t,e):r8(t,e)}const t8=(t,e)=>{const r=[...t],n=r.length,i=t.map((s,o)=>e8(s,e[o]));return s=>{for(let o=0;o{const r={...t,...e},n={};for(const i in r)t[i]!==void 0&&e[i]!==void 0&&(n[i]=e8(t[i],e[i]));return i=>{for(const s in n)r[s]=n[s](i);return r}},r8=(t,e)=>{const r=eo.createTransformer(e),n=v0(t),i=v0(e);return n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?Eh(t8(n.values,i.values),r):o=>`${o>0?e:t}`},g0=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},i2=(t,e)=>r=>Wt(t,e,r);function NP(t){return typeof t=="number"?i2:typeof t=="string"?jr.test(t)?Z4:r8:Array.isArray(t)?t8:typeof t=="object"?MP:i2}function OP(t,e,r){const n=[],i=r||NP(t[0]),s=t.length-1;for(let o=0;ot[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=OP(e,n,i),a=o.length,l=c=>{let f=0;if(a>1)for(;fl(Rl(t[0],t[s-1],c)):l}const am=t=>t,i8=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,$P=1e-7,DP=12;function LP(t,e,r,n,i){let s,o,a=0;do o=e+(r-e)/2,s=i8(o,n,i)-t,s>0?r=o:e=o;while(Math.abs(s)>$P&&++aLP(s,0,1,t,r);return s=>s===0||s===1?s:i8(i(s),e,n)}const o8=t=>1-Math.sin(Math.acos(t)),lm=im(o8),BP=nm(lm),a8=s8(.33,1.53,.69,.99),cm=im(a8),FP=nm(cm),jP=t=>(t*=2)<1?.5*cm(t):.5*(2-Math.pow(2,-10*(t-1))),zP={linear:am,easeIn:sm,easeInOut:om,easeOut:TP,circIn:o8,circInOut:BP,circOut:lm,backIn:cm,backInOut:FP,backOut:a8,anticipate:jP},s2=t=>{if(Array.isArray(t)){p0(t.length===4);const[e,r,n,i]=t;return s8(e,r,n,i)}else if(typeof t=="string")return zP[t];return t},UP=t=>Array.isArray(t)&&typeof t[0]!="number";function VP(t,e){return t.map(()=>e||om).splice(0,t.length-1)}function HP(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function WP(t,e){return t.map(r=>r*e)}function $y({keyframes:t,ease:e=om,times:r,duration:n=300}){t=[...t];const i=UP(e)?e.map(s2):s2(e),s={done:!1,value:t[0]},o=WP(r&&r.length===t.length?r:HP(t),n);function a(){return n8(o,t,{ease:Array.isArray(i)?i:VP(t,i)})}let l=a();return{next:c=>(s.value=l(c),s.done=c>=n,s),flipTarget:()=>{t.reverse(),l=a()}}}const Y1=.001,qP=.01,GP=10,KP=.05,JP=1;function YP({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s,o=1-e;o=Rl(KP,JP,o),t=Rl(qP,GP,t/1e3),o<1?(i=c=>{const f=c*o,u=f*t,h=f-r,y=Dy(c,o),m=Math.exp(-u);return Y1-h/y*m},s=c=>{const u=c*o*t,h=u*r+r,y=Math.pow(o,2)*Math.pow(c,2)*t,m=Math.exp(-u),p=Dy(Math.pow(c,2),o);return(-i(c)+Y1>0?-1:1)*((h-y)*m)/p}):(i=c=>{const f=Math.exp(-c*t),u=(c-r)*t+1;return-Y1+f*u},s=c=>{const f=Math.exp(-c*t),u=(r-c)*(t*t);return f*u});const a=5/t,l=XP(i,s,a);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:t}}}const QP=12;function XP(t,e,r){let n=r;for(let i=1;it[r]!==void 0)}function tI(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!o2(t,eI)&&o2(t,ZP)){const r=YP(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const rI=5;function l8({keyframes:t,restDelta:e,restSpeed:r,...n}){let i=t[0],s=t[t.length-1];const o={done:!1,value:i},{stiffness:a,damping:l,mass:c,velocity:f,duration:u,isResolvedFromDuration:h}=tI(n);let y=nI,m=f?-(f/1e3):0;const p=l/(2*Math.sqrt(a*c));function k(){const w=s-i,E=Math.sqrt(a/c)/1e3,A=Math.abs(w)<5;if(r||(r=A?.01:2),e||(e=A?.005:.5),p<1){const I=Dy(E,p);y=M=>{const B=Math.exp(-p*E*M);return s-B*((m+p*E*w)/I*Math.sin(I*M)+w*Math.cos(I*M))}}else if(p===1)y=I=>s-Math.exp(-E*I)*(w+(m+E*w)*I);else{const I=E*Math.sqrt(p*p-1);y=M=>{const B=Math.exp(-p*E*M),U=Math.min(I*M,300);return s-B*((m+p*E*w)*Math.sinh(U)+I*w*Math.cosh(U))/I}}}return k(),{next:w=>{const E=y(w);if(h)o.done=w>=u;else{let A=m;if(w!==0)if(p<1){const B=Math.max(0,w-rI);A=Zg(E-y(B),w-B)}else A=0;const I=Math.abs(A)<=r,M=Math.abs(s-E)<=e;o.done=I&&M}return o.value=o.done?s:E,o},flipTarget:()=>{m=-m,[i,s]=[s,i],k()}}}l8.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const nI=t=>0;function iI({keyframes:t=[0],velocity:e=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){const o=t[0],a={done:!1,value:o};let l=r*e;const c=o+l,f=s===void 0?c:s(c);return f!==c&&(l=f-o),{next:u=>{const h=-l*Math.exp(-u/n);return a.done=!(h>i||h<-i),a.value=a.done?f:f+h,a},flipTarget:()=>{}}}const sI={decay:iI,keyframes:$y,tween:$y,spring:l8};function c8(t,e,r=0){return t-e-r}function oI(t,e=0,r=0,n=!0){return n?c8(e+-t,e,r):e-(t-e)+r}function aI(t,e,r,n){return n?t>=e+r:t<=-r}const lI=t=>{const e=({delta:r})=>t(r);return{start:()=>Mr.update(e,!0),stop:()=>Zs.update(e)}};function m0({duration:t,driver:e=lI,elapsed:r=0,repeat:n=0,repeatType:i="loop",repeatDelay:s=0,keyframes:o,autoplay:a=!0,onPlay:l,onStop:c,onComplete:f,onRepeat:u,onUpdate:h,type:y="keyframes",...m}){var p,k;const w=r;let E,A=0,I=t,M=!1,B=!0,U;const j=sI[o.length>2?"keyframes":y]||$y,K=o[0],J=o[o.length-1];let Z={done:!1,value:K};!((k=(p=j).needsInterpolation)===null||k===void 0)&&k.call(p,K,J)&&(U=n8([0,100],[K,J],{clamp:!1}),o=[0,100]);const ie=j({...m,duration:t,keyframes:o});function D(){A++,i==="reverse"?(B=A%2===0,r=oI(r,I,s,B)):(r=c8(r,I,s),i==="mirror"&&ie.flipTarget()),M=!1,u&&u()}function v(){E&&E.stop(),f&&f()}function C(N){B||(N=-N),r+=N,M||(Z=ie.next(Math.max(0,r)),U&&(Z.value=U(Z.value)),M=B?Z.done:r<=0),h&&h(Z.value),M&&(A===0&&(I=I!==void 0?I:r),A{c&&c(),E&&E.stop()},set currentTime(N){r=w,C(N)},sample:N=>{r=w;const b=t&&typeof t=="number"?Math.max(t*.5,50):50;let _=0;for(C(0);_<=N;){const R=N-_;C(Math.min(R,b)),_+=b}return Z}}}function cI(t){return!t||Array.isArray(t)||typeof t=="string"&&f8[t]}const Nc=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,f8={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Nc([0,.65,.55,1]),circOut:Nc([.55,0,1,.45]),backIn:Nc([.31,.01,.66,-.59]),backOut:Nc([.33,1.53,.69,.99])};function fI(t){if(t)return Array.isArray(t)?Nc(t):f8[t]}function uI(t,e,r,{delay:n=0,duration:i,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){return t.animate({[e]:r,offset:l},{delay:n,duration:i,easing:fI(a),fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const a2={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Q1={},u8={};for(const t in a2)u8[t]=()=>(Q1[t]===void 0&&(Q1[t]=a2[t]()),Q1[t]);function dI(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const hI=new Set(["opacity"]),Bu=10;function vI(t,e,{onUpdate:r,onComplete:n,...i}){if(!(u8.waapi()&&hI.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:l=0,ease:c}=i;if(i.type==="spring"||!cI(i.ease)){if(i.repeat===1/0)return;const u=m0({...i,elapsed:0});let h={done:!1,value:o[0]};const y=[];let m=0;for(;!h.done&&m<2e4;)h=u.sample(m),y.push(h.value),m+=Bu;o=y,a=m-Bu,c="linear"}const f=uI(t.owner.current,e,o,{...i,delay:-l,duration:a,ease:c});return f.onfinish=()=>{t.set(dI(o,i)),Mr.update(()=>f.cancel()),n&&n()},{get currentTime(){return f.currentTime||0},set currentTime(u){f.currentTime=u},stop:()=>{const{currentTime:u}=f;if(u){const h=m0({...i,autoplay:!1});t.setWithVelocity(h.sample(u-Bu).value,h.sample(u).value,Bu)}Mr.update(()=>f.cancel())}}}function d8(t,e){const r=performance.now(),n=({timestamp:i})=>{const s=i-r;s>=e&&(Zs.read(n),t(s-e))};return Mr.read(n,!0),()=>Zs.read(n)}function yI({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const i=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:d8(i,-e)}:i()}function pI({keyframes:t,velocity:e=0,min:r,max:n,power:i=.8,timeConstant:s=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:c,driver:f,onUpdate:u,onComplete:h,onStop:y}){const m=t[0];let p;function k(I){return r!==void 0&&In}function w(I){return r===void 0?n:n===void 0||Math.abs(r-I){var B;u==null||u(M),(B=I.onUpdate)===null||B===void 0||B.call(I,M)},onComplete:h,onStop:y})}function A(I){E({type:"spring",stiffness:o,damping:a,restDelta:l,...I})}if(k(m))A({velocity:e,keyframes:[m,w(m)]});else{let I=i*e+m;typeof c<"u"&&(I=c(I));const M=w(I),B=M===r?-1:1;let U,j;const K=J=>{U=j,j=J,e=Zg(J-U,Ki.delta),(B===1&&J>M||B===-1&&Jp==null?void 0:p.stop()}}const Mo=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Fu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),X1=()=>({type:"keyframes",ease:"linear",duration:.3}),gI={type:"keyframes",duration:.8},l2={x:Mo,y:Mo,z:Mo,rotate:Mo,rotateX:Mo,rotateY:Mo,rotateZ:Mo,scaleX:Fu,scaleY:Fu,scale:Fu,opacity:X1,backgroundColor:X1,color:X1,default:Fu},mI=(t,{keyframes:e})=>e.length>2?gI:(l2[t]||l2.default)(e[1]),Ly=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&eo.test(e)&&!e.startsWith("url("));function xI({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...f}){return!!Object.keys(f).length}function c2(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function f2(t){return typeof t=="number"?0:rm("",t)}function h8(t,e){return t[e]||t.default||t}function bI(t,e,r,n){const i=Ly(e,r);let s=n.from!==void 0?n.from:t.get();return s==="none"&&i&&typeof r=="string"?s=rm(e,r):c2(s)&&typeof r=="string"?s=f2(r):!Array.isArray(r)&&c2(r)&&typeof s=="string"&&(r=f2(s)),Array.isArray(r)?(r[0]===null&&(r[0]=s),r):[s,r]}const fm=(t,e,r,n={})=>i=>{const s=h8(n,t)||{},o=s.delay||n.delay||0;let{elapsed:a=0}=n;a=a-gd(o);const l=bI(e,t,r,s),c=l[0],f=l[l.length-1],u=Ly(t,c),h=Ly(t,f);let y={keyframes:l,velocity:e.getVelocity(),...s,elapsed:a,onUpdate:k=>{e.set(k),s.onUpdate&&s.onUpdate(k)},onComplete:()=>{i(),s.onComplete&&s.onComplete()}};if(!u||!h||_P.current||s.type===!1)return yI(y);if(s.type==="inertia")return pI(y);xI(s)||(y={...y,...mI(t,y)}),y.duration&&(y.duration=gd(y.duration)),y.repeatDelay&&(y.repeatDelay=gd(y.repeatDelay));const m=e.owner,p=m&&m.current;if(m&&p instanceof HTMLElement&&!(m!=null&&m.getProps().onUpdate)){const k=vI(e,t,y);if(k)return k}return m0(y)};function wI(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const i=e.map(s=>By(t,s,r));n=Promise.all(i)}else if(typeof e=="string")n=By(t,e,r);else{const i=typeof e=="function"?kh(t,e,r.custom):e;n=v8(t,i,r)}return n.then(()=>t.notify("AnimationComplete",e))}function By(t,e,r={}){var n;const i=kh(t,e,r.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(s=r.transitionOverride);const o=i?()=>v8(t,i,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:u,staggerDirection:h}=s;return CI(t,e,f+c,u,h,r)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,f]=l==="beforeChildren"?[o,a]:[a,o];return c().then(f)}else return Promise.all([o(),a(r.delay)])}function v8(t,e,{delay:r=0,transitionOverride:n,type:i}={}){var s;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");n&&(o=n);const f=[],u=i&&((s=t.animationState)===null||s===void 0?void 0:s.getState()[i]);for(const h in l){const y=t.getValue(h),m=l[h];if(!y||m===void 0||u&&SI(u,h))continue;const p={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!y.hasAnimated){const w=t.getProps()[AP];w&&(p.elapsed=window.HandoffAppearAnimations(w,h,y,Mr))}let k=y.start(fm(h,y,m,t.shouldReduceMotion&&Jl.has(h)?{type:!1}:p));y0(c)&&(c.add(h),k=k.then(()=>c.remove(h))),f.push(k)}return Promise.all(f).then(()=>{a&&wP(t,a)})}function CI(t,e,r=0,n=0,i=1,s){const o=[],a=(t.variantChildren.size-1)*n,l=i===1?(c=0)=>c*n:(c=0)=>a-c*n;return Array.from(t.variantChildren).sort(EI).forEach((c,f)=>{c.notify("AnimationStart",e),o.push(By(c,e,{...s,delay:r+l(f)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function EI(t,e){return t.sortNodePosition(e)}function SI({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const um=[Je.Animate,Je.InView,Je.Focus,Je.Hover,Je.Tap,Je.Drag,Je.Exit],kI=[...um].reverse(),AI=um.length;function _I(t){return e=>Promise.all(e.map(({animation:r,options:n})=>wI(t,r,n)))}function TI(t){let e=_I(t);const r=II();let n=!0;const i=(l,c)=>{const f=kh(t,c);if(f){const{transition:u,transitionEnd:h,...y}=f;l={...l,...y,...h}}return l};function s(l){e=l(t)}function o(l,c){const f=t.getProps(),u=t.getVariantContext(!0)||{},h=[],y=new Set;let m={},p=1/0;for(let w=0;wp&&M;const J=Array.isArray(I)?I:[I];let Z=J.reduce(i,{});B===!1&&(Z={});const{prevResolvedValues:ie={}}=A,D={...ie,...Z},v=C=>{K=!0,y.delete(C),A.needsAnimating[C]=!0};for(const C in D){const P=Z[C],N=ie[C];m.hasOwnProperty(C)||(P!==N?u0(P)&&u0(N)?!U4(P,N)||j?v(C):A.protectedKeys[C]=!0:P!==void 0?v(C):y.add(C):P!==void 0&&y.has(C)?v(C):A.protectedKeys[C]=!0)}A.prevProp=I,A.prevResolvedValues=Z,A.isActive&&(m={...m,...Z}),n&&t.blockInitialAnimation&&(K=!1),K&&!U&&h.push(...J.map(C=>({animation:C,options:{type:E,...l}})))}if(y.size){const w={};y.forEach(E=>{const A=t.getBaseTarget(E);A!==void 0&&(w[E]=A)}),h.push({animation:w})}let k=!!h.length;return n&&f.initial===!1&&!t.manuallyAnimateOnMount&&(k=!1),n=!1,k?e(h):Promise.resolve()}function a(l,c,f){var u;if(r[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(y=>{var m;return(m=y.animationState)===null||m===void 0?void 0:m.setActive(l,c)}),r[l].isActive=c;const h=o(f,l);for(const y in r)r[y].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>r}}function PI(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!U4(e,t):!1}function No(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function II(){return{[Je.Animate]:No(!0),[Je.InView]:No(),[Je.Hover]:No(),[Je.Tap]:No(),[Je.Drag]:No(),[Je.Focus]:No(),[Je.Exit]:No()}}const RI={animation:Ms(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=TI(t)),xh(e)&&S.useEffect(()=>e.subscribe(t),[e])}),exit:Ms(t=>{const{custom:e,visualElement:r}=t,[n,i]=z4(),s=S.useContext(ru);S.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(Je.Exit,!n,{custom:s&&s.custom||e});o&&!n&&o.then(i)},[n])})},u2=(t,e)=>Math.abs(t-e);function MI(t,e){const r=u2(t.x,e.x),n=u2(t.y,e.y);return Math.sqrt(r**2+n**2)}class y8{constructor(e,r,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=ev(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,u=MI(c.offset,{x:0,y:0})>=3;if(!f&&!u)return;const{point:h}=c,{timestamp:y}=Ki;this.history.push({...h,timestamp:y});const{onStart:m,onMove:p}=this.handlers;f||(m&&m(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=Z1(f,this.transformPagePoint),Mr.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:h}=this.handlers,y=ev(c.type==="pointercancel"?this.lastMoveEventInfo:Z1(f,this.transformPagePoint),this.history);this.startEvent&&u&&u(c,y),h&&h(c,y)},!$4(e))return;this.handlers=r,this.transformPagePoint=n;const i=Ch(e),s=Z1(i,this.transformPagePoint),{point:o}=s,{timestamp:a}=Ki;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=r;l&&l(e,ev(s,this.history)),this.removeListeners=Eh(vl(window,"pointermove",this.handlePointerMove),vl(window,"pointerup",this.handlePointerUp),vl(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Zs.update(this.updatePoint)}}function Z1(t,e){return e?{point:e(t.point)}:t}function d2(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ev({point:t},e){return{point:t,delta:d2(t,p8(e)),offset:d2(t,NI(e)),velocity:OI(e,.1)}}function NI(t){return t[0]}function p8(t){return t[t.length-1]}function OI(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const i=p8(t);for(;r>=0&&(n=t[r],!(i.timestamp-n.timestamp>gd(e)));)r--;if(!n)return{x:0,y:0};const s=(i.timestamp-n.timestamp)/1e3;if(s===0)return{x:0,y:0};const o={x:(i.x-n.x)/s,y:(i.y-n.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function pn(t){return t.max-t.min}function Fy(t,e=0,r=.01){return Math.abs(t-e)<=r}function h2(t,e,r,n=.5){t.origin=n,t.originPoint=Wt(e.min,e.max,t.origin),t.scale=pn(r)/pn(e),(Fy(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Wt(r.min,r.max,t.origin)-t.originPoint,(Fy(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Kc(t,e,r,n){h2(t.x,e.x,r.x,n==null?void 0:n.originX),h2(t.y,e.y,r.y,n==null?void 0:n.originY)}function v2(t,e,r){t.min=r.min+e.min,t.max=t.min+pn(e)}function $I(t,e,r){v2(t.x,e.x,r.x),v2(t.y,e.y,r.y)}function y2(t,e,r){t.min=e.min-r.min,t.max=t.min+pn(e)}function Jc(t,e,r){y2(t.x,e.x,r.x),y2(t.y,e.y,r.y)}function DI(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?Wt(r,t,n.max):Math.min(t,r)),t}function p2(t,e,r){return{min:e!==void 0?t.min+e:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function LI(t,{top:e,left:r,bottom:n,right:i}){return{x:p2(t.x,r,i),y:p2(t.y,e,n)}}function g2(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=g0(e.min,e.max-n,t.min):n>i&&(r=g0(t.min,t.max-i,e.min)),Rl(0,1,r)}function jI(t,e){const r={};return e.min!==void 0&&(r.min=e.min-t.min),e.max!==void 0&&(r.max=e.max-t.min),r}const jy=.35;function zI(t=jy){return t===!1?t=0:t===!0&&(t=jy),{x:m2(t,"left","right"),y:m2(t,"top","bottom")}}function m2(t,e,r){return{min:x2(t,e),max:x2(t,r)}}function x2(t,e){return typeof t=="number"?t:t[e]||0}const b2=()=>({translate:0,scale:1,origin:0,originPoint:0}),Yc=()=>({x:b2(),y:b2()}),w2=()=>({min:0,max:0}),nr=()=>({x:w2(),y:w2()});function ci(t){return[t("x"),t("y")]}function g8({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function UI({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function VI(t,e){if(!e)return t;const r=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function tv(t){return t===void 0||t===1}function zy({scale:t,scaleX:e,scaleY:r}){return!tv(t)||!tv(e)||!tv(r)}function Lo(t){return zy(t)||m8(t)||t.z||t.rotate||t.rotateX||t.rotateY}function m8(t){return C2(t.x)||C2(t.y)}function C2(t){return t&&t!=="0%"}function x0(t,e,r){const n=t-r,i=e*n;return r+i}function E2(t,e,r,n,i){return i!==void 0&&(t=x0(t,i,n)),x0(t,r,n)+e}function Uy(t,e=0,r=1,n,i){t.min=E2(t.min,e,r,n,i),t.max=E2(t.max,e,r,n,i)}function x8(t,{x:e,y:r}){Uy(t.x,e.translate,e.scale,e.originPoint),Uy(t.y,r.translate,r.scale,r.originPoint)}function HI(t,e,r,n=!1){var i,s;const o=r.length;if(!o)return;e.x=e.y=1;let a,l;for(let c=0;c1.0000000000001||t<.999999999999?t:1}function As(t,e){t.min=t.min+e,t.max=t.max+e}function k2(t,e,[r,n,i]){const s=e[i]!==void 0?e[i]:.5,o=Wt(t.min,t.max,s);Uy(t,e[r],e[n],o,e.scale)}const WI=["x","scaleX","originX"],qI=["y","scaleY","originY"];function nl(t,e){k2(t.x,e,WI),k2(t.y,e,qI)}function b8(t,e){return g8(VI(t.getBoundingClientRect(),e))}function GI(t,e,r){const n=b8(t,r),{scroll:i}=e;return i&&(As(n.x,i.offset.x),As(n.y,i.offset.y)),n}const KI=new WeakMap;class JI{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=nr(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(Ch(a,"page").point)},i=(a,l)=>{var c;const{drag:f,dragPropagation:u,onDragStart:h}=this.getProps();f&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=B4(f),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ci(y=>{var m,p;let k=this.getAxisMotionValue(y).get()||0;if(wi.test(k)){const w=(p=(m=this.visualElement.projection)===null||m===void 0?void 0:m.layout)===null||p===void 0?void 0:p.layoutBox[y];w&&(k=pn(w)*(parseFloat(k)/100))}this.originPoint[y]=k}),h==null||h(a,l),(c=this.visualElement.animationState)===null||c===void 0||c.setActive(Je.Drag,!0))},s=(a,l)=>{const{dragPropagation:c,dragDirectionLock:f,onDirectionLock:u,onDrag:h}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:y}=l;if(f&&this.currentDirection===null){this.currentDirection=YI(y),this.currentDirection!==null&&(u==null||u(this.currentDirection));return}this.updateAxis("x",l.point,y),this.updateAxis("y",l.point,y),this.visualElement.render(),h==null||h(a,l)},o=(a,l)=>this.stop(a,l);this.panSession=new y8(e,{onSessionStart:n,onStart:i,onMove:s,onSessionEnd:o},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s==null||s(e,r)}cancel(){var e,r;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(r=this.visualElement.animationState)===null||r===void 0||r.setActive(Je.Drag,!1)}updateAxis(e,r,n){const{drag:i}=this.getProps();if(!n||!ju(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=DI(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},i=this.constraints;e&&tl(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=LI(n.layoutBox,e):this.constraints=!1,this.elastic=zI(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&ci(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=jI(n.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!tl(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=GI(n,i.root,this.visualElement.getTransformPagePoint());let o=BI(i.layout.layoutBox,s);if(r){const a=r(UI(o));this.hasMutatedConstraints=!!a,a&&(o=g8(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ci(f=>{if(!ju(f,r,this.currentDirection))return;let u=(l==null?void 0:l[f])||{};o&&(u={min:0,max:0});const h=i?200:1e6,y=i?40:1e7,m={type:"inertia",velocity:n?e[f]:0,bounceStiffness:h,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(f,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(fm(e,n,0,r))}stopAnimation(){ci(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var r;const n="_drag"+e.toUpperCase(),i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,((r=this.visualElement.getProps().initial)===null||r===void 0?void 0:r[e])||0)}snapToCursor(e){ci(r=>{const{drag:n}=this.getProps();if(!ju(r,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(r);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[r];s.set(e[r]-Wt(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!tl(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};ci(a=>{const l=this.getAxisMotionValue(a);if(l){const c=l.get();s[a]=FI({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",(e=i.root)===null||e===void 0||e.updateScroll(),i.updateLayout(),this.resolveConstraints(),ci(a=>{if(!ju(a,r,null))return;const l=this.getAxisMotionValue(a),{min:c,max:f}=this.constraints[a];l.set(Wt(c,f,s[a]))})}addListeners(){var e;if(!this.visualElement.current)return;KI.set(this.visualElement,this);const r=this.visualElement.current,n=vl(r,"pointerdown",c=>{const{drag:f,dragListener:u=!0}=this.getProps();f&&u&&this.start(c)}),i=()=>{const{dragConstraints:c}=this.getProps();tl(c)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&((e=s.root)===null||e===void 0||e.updateScroll(),s.updateLayout()),i();const a=Yo(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f})=>{this.isDragging&&f&&(ci(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=c[u].translate,h.set(h.get()+c[u].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l==null||l()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=jy,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function ju(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function YI(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function QI(t){const{dragControls:e,visualElement:r}=t,n=wh(()=>new JI(r));S.useEffect(()=>e&&e.subscribe(n),[n,e]),S.useEffect(()=>n.addListeners(),[n])}function XI({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:i}){const s=t||e||r||n,o=S.useRef(null),{transformPagePoint:a}=S.useContext(Fg),l={onSessionStart:n,onStart:e,onMove:t,onEnd:(f,u)=>{o.current=null,r&&r(f,u)}};S.useEffect(()=>{o.current!==null&&o.current.updateHandlers(l)});function c(f){o.current=new y8(f,l,{transformPagePoint:a})}h0(i,"pointerdown",s&&c),Jg(()=>o.current&&o.current.end())}const ZI={pan:Ms(XI),drag:Ms(QI)};function Vy(t){return typeof t=="string"&&t.startsWith("var(--")}const w8=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function eR(t){const e=w8.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function Hy(t,e,r=1){const[n,i]=eR(t);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);return s?s.trim():Vy(i)?Hy(i,e,r+1):i}function tR(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(i=>{const s=i.get();if(!Vy(s))return;const o=Hy(s,n);o&&i.set(o)});for(const i in e){const s=e[i];if(!Vy(s))continue;const o=Hy(s,n);o&&(e[i]=o,r&&r[i]===void 0&&(r[i]=s))}return{target:e,transitionEnd:r}}const rR=new Set(["width","height","top","left","right","bottom","x","y"]),C8=t=>rR.has(t),nR=t=>Object.keys(t).some(C8),A2=t=>t===ba||t===ye;var _2;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(_2||(_2={}));const T2=(t,e)=>parseFloat(t.split(", ")[e]),P2=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/);if(i)return T2(i[1],e);{const s=n.match(/^matrix\((.+)\)$/);return s?T2(s[1],t):0}},iR=new Set(["x","y","z"]),sR=c0.filter(t=>!iR.has(t));function oR(t){const e=[];return sR.forEach(r=>{const n=t.getValue(r);n!==void 0&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),e.length&&t.render(),e}const I2={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:P2(4,13),y:P2(5,14)},aR=(t,e,r)=>{const n=e.measureViewportBox(),i=e.current,s=getComputedStyle(i),{display:o}=s,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(c=>{a[c]=I2[c](n,s)}),e.render();const l=e.measureViewportBox();return r.forEach(c=>{const f=e.getValue(c);f&&f.jump(a[c]),t[c]=I2[c](l,s)}),t},lR=(t,e,r={},n={})=>{e={...e},n={...n};const i=Object.keys(e).filter(C8);let s=[],o=!1;const a=[];if(i.forEach(l=>{const c=t.getValue(l);if(!t.hasValue(l))return;let f=r[l],u=xc(f);const h=e[l];let y;if(u0(h)){const m=h.length,p=h[0]===null?1:0;f=h[p],u=xc(f);for(let k=p;k=0?window.pageYOffset:null,c=aR(e,t,a);return s.length&&s.forEach(([f,u])=>{t.getValue(f).set(u)}),t.render(),mh&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:n}}else return{target:e,transitionEnd:n}};function cR(t,e,r,n){return nR(e)?lR(t,e,r,n):{target:e,transitionEnd:n}}const fR=(t,e,r,n)=>{const i=tR(t,e,n);return e=i.target,n=i.transitionEnd,cR(t,e,r,n)},Wy={current:null},E8={current:!1};function uR(){if(E8.current=!0,!!mh)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Wy.current=t.matches;t.addListener(e),e()}else Wy.current=!1}function dR(t,e,r){const{willChange:n}=e;for(const i in e){const s=e[i],o=r[i];if(sn(s))t.addValue(i,s),y0(n)&&n.add(i);else if(sn(o))t.addValue(i,Ml(s,{owner:t})),y0(n)&&n.remove(i);else if(o!==s)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(s)}else{const a=t.getStaticValue(i);t.addValue(i,Ml(a!==void 0?a:s,{owner:t}))}}for(const i in r)e[i]===void 0&&t.removeValue(i);return e}const S8=Object.keys(Mf),hR=S8.length,R2=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class vR{constructor({parent:e,props:r,reducedMotionConfig:n,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Mr.render(this.render,!1,!0);const{latestValues:o,renderState:a}=i;this.latestValues=o,this.baseTarget={...o},this.initialValues=r.initial?{...o}:{},this.renderState=a,this.parent=e,this.props=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=s,this.isControllingVariants=bh(r),this.isVariantNode=C4(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(r,{});for(const f in c){const u=c[f];o[f]!==void 0&&sn(u)&&(u.set(o[f],!1),y0(l)&&l.add(f))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){var r;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(r=this.parent)===null||r===void 0?void 0:r.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),E8.current||uR(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Wy.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,r,n;(e=this.projection)===null||e===void 0||e.unmount(),Zs.update(this.notifyUpdate),Zs.render(this.render),this.valueSubscriptions.forEach(i=>i()),(r=this.removeFromVariantTree)===null||r===void 0||r.call(this),(n=this.parent)===null||n===void 0||n.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(e,r){const n=Jl.has(e),i=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Mr.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),s()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,i,s,o,a){const l=[];for(let c=0;cthis.scheduleRender(),animationType:typeof f=="string"?f:"both",initialPromotionConfig:a,layoutScroll:y,layoutRoot:m})}return l}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):nr()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}makeTargetAnimatable(e,r=!0){return this.makeTargetAnimatableFromInstance(e,this.props,r)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender();const r=this.props;this.props=e;for(let n=0;nn.variantChildren.delete(e)}addValue(e,r){r!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,r)),this.values.set(e,r),this.latestValues[e]=r.get()}removeValue(e){var r;this.values.delete(e),(r=this.valueSubscriptions.get(e))===null||r===void 0||r(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&r!==void 0&&(n=Ml(r,{owner:this}),this.addValue(e,n)),n}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,r){this.baseTarget[e]=r}getBaseTarget(e){var r;const{initial:n}=this.props,i=typeof n=="string"||typeof n=="object"?(r=Kg(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!sn(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new Xg),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}}const k8=["initial",...um],yR=k8.length;class A8 extends vR{sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){var n;return(n=e.style)===null||n===void 0?void 0:n[r]}removeValueFromRenderState(e,{vars:r,style:n}){delete r[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:r,...n},{transformValues:i},s){let o=SP(n,e||{},this);if(i&&(r&&(r=i(r)),n&&(n=i(n)),o&&(o=i(o))),s){CP(this,n,o);const a=fR(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function pR(t){return window.getComputedStyle(t)}class gR extends A8{readValueFromInstance(e,r){if(Jl.has(r)){const n=tm(r);return n&&n.default||0}else{const n=pR(e),i=(k4(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:r}){return b8(e,r)}build(e,r,n,i){Ug(e,r,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,r){return Gg(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;sn(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,i){I4(e,r,n,i)}}class mR extends A8{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return Jl.has(r)?((n=tm(r))===null||n===void 0?void 0:n.default)||0:(r=R4.has(r)?r:qg(r),e.getAttribute(r))}measureInstanceViewportBox(){return nr()}scrapeMotionValuesFromProps(e,r){return N4(e,r)}build(e,r,n,i){Hg(e,r,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,r,n,i){M4(e,r,n,i)}mount(e){this.isSVGTag=Wg(e.tagName),super.mount(e)}}const xR=(t,e)=>zg(t)?new mR(e,{enableHardwareAcceleration:!1}):new gR(e,{enableHardwareAcceleration:!0});function M2(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const bc={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ye.test(t))t=parseFloat(t);else return t;const r=M2(t,e.target.x),n=M2(t,e.target.y);return`${r}% ${n}%`}},N2="_$css",bR={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,i=t.includes("var("),s=[];i&&(t=t.replace(w8,y=>(s.push(y),N2)));const o=eo.parse(t);if(o.length>5)return n;const a=eo.createTransformer(t),l=typeof o[0]!="number"?1:0,c=r.x.scale*e.x,f=r.y.scale*e.y;o[0+l]/=c,o[1+l]/=f;const u=Wt(c,f,.5);typeof o[2+l]=="number"&&(o[2+l]/=u),typeof o[3+l]=="number"&&(o[3+l]/=u);let h=a(o);if(i){let y=0;h=h.replace(N2,()=>{const m=s[y];return y++,m})}return h}};class wR extends sr.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=e;uT(ER),s&&(r.group&&r.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Wc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o&&(o.isPresent=s,i||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||Mr.postRender(()=>{var a;!((a=o.getStack())===null||a===void 0)&&a.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),r!=null&&r.group&&r.group.remove(i),n!=null&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}}function CR(t){const[e,r]=z4(),n=S.useContext(jg);return sr.createElement(wR,{...t,layoutGroup:n,switchLayoutGroup:S.useContext(E4),isPresent:e,safeToRemove:r})}const ER={borderRadius:{...bc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bc,borderTopRightRadius:bc,borderBottomLeftRadius:bc,borderBottomRightRadius:bc,boxShadow:bR},SR={measureLayout:CR};function kR(t,e,r={}){const n=sn(t)?t:Ml(t);return n.start(fm("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const _8=["TopLeft","TopRight","BottomLeft","BottomRight"],AR=_8.length,O2=t=>typeof t=="string"?parseFloat(t):t,$2=t=>typeof t=="number"||ye.test(t);function _R(t,e,r,n,i,s){i?(t.opacity=Wt(0,r.opacity!==void 0?r.opacity:1,TR(n)),t.opacityExit=Wt(e.opacity!==void 0?e.opacity:1,0,PR(n))):s&&(t.opacity=Wt(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(g0(t,e,n))}function L2(t,e){t.min=e.min,t.max=e.max}function Bn(t,e){L2(t.x,e.x),L2(t.y,e.y)}function B2(t,e,r,n,i){return t-=e,t=x0(t,1/r,n),i!==void 0&&(t=x0(t,1/i,n)),t}function IR(t,e=0,r=1,n=.5,i,s=t,o=t){if(wi.test(e)&&(e=parseFloat(e),e=Wt(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=Wt(s.min,s.max,n);t===s&&(a-=e),t.min=B2(t.min,e,r,a,i),t.max=B2(t.max,e,r,a,i)}function F2(t,e,[r,n,i],s,o){IR(t,e[r],e[n],e[i],e.scale,s,o)}const RR=["x","scaleX","originX"],MR=["y","scaleY","originY"];function j2(t,e,r,n){F2(t.x,e,RR,r==null?void 0:r.x,n==null?void 0:n.x),F2(t.y,e,MR,r==null?void 0:r.y,n==null?void 0:n.y)}function z2(t){return t.translate===0&&t.scale===1}function P8(t){return z2(t.x)&&z2(t.y)}function I8(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function U2(t){return pn(t.x)/pn(t.y)}class NR{constructor(){this.members=[]}add(e){Yg(this.members,e),e.scheduleRender()}remove(e){if(Qg(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(e){const r=this.members.findIndex(i=>e===i);if(r===0)return!1;let n;for(let i=r;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){n=s;break}}return n?(this.promote(n),!0):!1}promote(e,r){var n;const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,r&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),!((n=e.root)===null||n===void 0)&&n.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:s}=e.options;s===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var r,n,i,s,o;(n=(r=e.options).onExitComplete)===null||n===void 0||n.call(r),(o=(i=e.resumingFrom)===null||i===void 0?void 0:(s=i.options).onExitComplete)===null||o===void 0||o.call(s)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function V2(t,e,r){let n="";const i=t.x.translate/e.x,s=t.y.translate/e.y;if((i||s)&&(n=`translate3d(${i}px, ${s}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:l,rotateX:c,rotateY:f}=r;l&&(n+=`rotate(${l}deg) `),c&&(n+=`rotateX(${c}deg) `),f&&(n+=`rotateY(${f}deg) `)}const o=t.x.scale*e.x,a=t.y.scale*e.y;return(o!==1||a!==1)&&(n+=`scale(${o}, ${a})`),n||"none"}const OR=(t,e)=>t.depth-e.depth;class $R{constructor(){this.children=[],this.isDirty=!1}add(e){Yg(this.children,e),this.isDirty=!0}remove(e){Qg(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(OR),this.isDirty=!1,this.children.forEach(e)}}const H2=["","X","Y","Z"],W2=1e3;let DR=0;function R8({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=DR++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!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=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(FR),this.nodes.forEach(UR),this.nodes.forEach(VR)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let c=0;cthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=d8(y,250),Wc.hasAnimatedSinceResize&&(Wc.hasAnimatedSinceResize=!1,this.nodes.forEach(G2))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||f)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:y,hasRelativeTargetChanged:m,layout:p})=>{var k,w,E,A,I;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const M=(w=(k=this.options.transition)!==null&&k!==void 0?k:u.getDefaultTransition())!==null&&w!==void 0?w:KR,{onLayoutAnimationStart:B,onLayoutAnimationComplete:U}=u.getProps(),j=!this.targetLayout||!I8(this.targetLayout,p)||m,K=!y&&m;if(this.options.layoutRoot||!((E=this.resumeFrom)===null||E===void 0)&&E.instance||K||y&&(j||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,K);const J={...h8(M,"layout"),onPlay:B,onComplete:U};(u.shouldReduceMotion||this.options.layoutRoot)&&(J.delay=0,J.type=!1),this.startAnimation(J)}else!y&&this.animationProgress===0&&G2(this),this.isLead()&&((I=(A=this.options).onExitComplete)===null||I===void 0||I.call(A));this.targetLayout=p})}unmount(){var o,a;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(o=this.getStack())===null||o===void 0||o.remove(this),(a=this.parent)===null||a===void 0||a.children.delete(this),this.instance=void 0,Zs.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var o;return this.isAnimationBlocked||((o=this.parent)===null||o===void 0?void 0:o.isTreeAnimationBlocked())||!1}startUpdate(){var o;this.isUpdateBlocked()||(this.isUpdating=!0,(o=this.nodes)===null||o===void 0||o.forEach(HR),this.animationId++)}getTransformTemplate(){var o;return(o=this.options.visualElement)===null||o===void 0?void 0:o.getProps().transformTemplate}willUpdate(o=!0){var a,l,c;if(this.root.isUpdateBlocked()){(l=(a=this.options).onExitComplete)===null||l===void 0||l.call(a);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var o;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var A;const I=E/1e3;K2(y.x,o.x,I),K2(y.y,o.y,I),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((A=this.relativeParent)===null||A===void 0)&&A.layout)&&(Jc(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),qR(this.relativeTarget,this.relativeTargetOrigin,m,I)),p&&(this.animationValues=h,_R(h,u,this.latestValues,I,w,k)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=I},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Zs.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Mr.update(()=>{Wc.hasAnimatedSinceResize=!0,this.currentAnimation=kR(0,W2,{...o,onUpdate:c=>{var f;this.mixTargetDelta(c),(f=o.onUpdate)===null||f===void 0||f.call(o,c)},onComplete:()=>{var c;(c=o.onComplete)===null||c===void 0||c.call(o),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var o;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(o=this.getStack())===null||o===void 0||o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var o;this.currentAnimation&&((o=this.mixTargetDelta)===null||o===void 0||o.call(this,W2),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:f}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&M8(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||nr();const u=pn(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const h=pn(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}Bn(a,l),nl(a,f),Kc(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){var l,c,f;this.sharedNodes.has(o)||this.sharedNodes.set(o,new NR),this.sharedNodes.get(o).add(a),a.promote({transition:(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(f=(c=a.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(c,a)})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let f=0;f{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(q2),this.root.sharedNodes.clear()}}}function LR(t){t.updateLayout()}function BR(t){var e,r,n;const i=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&i&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=t.layout,{animationType:a}=t.options,l=i.source!==t.layout.source;a==="size"?ci(y=>{const m=l?i.measuredBox[y]:i.layoutBox[y],p=pn(m);m.min=s[y].min,m.max=m.min+p}):M8(a,i.layoutBox,s)&&ci(y=>{const m=l?i.measuredBox[y]:i.layoutBox[y],p=pn(s[y]);m.max=m.min+p});const c=Yc();Kc(c,s,i.layoutBox);const f=Yc();l?Kc(f,t.applyTransform(o,!0),i.measuredBox):Kc(f,s,i.layoutBox);const u=!P8(c);let h=!1;if(!t.resumeFrom){const y=t.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:m,layout:p}=y;if(m&&p){const k=nr();Jc(k,i.layoutBox,m.layoutBox);const w=nr();Jc(w,s,p.layoutBox),I8(k,w)||(h=!0),y.options.layoutRoot&&(t.relativeTarget=w,t.relativeTargetOrigin=k,t.relativeParent=y)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:i,delta:f,layoutDelta:c,hasLayoutChanged:u,hasRelativeTargetChanged:h})}else t.isLead()&&((n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r));t.options.transition=void 0}function FR(t){t.isProjectionDirty||(t.isProjectionDirty=!!(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=!!(t.parent&&t.parent.isTransformDirty))}function jR(t){t.clearSnapshot()}function q2(t){t.clearMeasurements()}function zR(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function G2(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function UR(t){t.resolveTargetDelta()}function VR(t){t.calcProjection()}function HR(t){t.resetRotation()}function WR(t){t.removeLeadSnapshot()}function K2(t,e,r){t.translate=Wt(e.translate,0,r),t.scale=Wt(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function J2(t,e,r,n){t.min=Wt(e.min,r.min,n),t.max=Wt(e.max,r.max,n)}function qR(t,e,r,n){J2(t.x,e.x,r.x,n),J2(t.y,e.y,r.y,n)}function GR(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const KR={duration:.45,ease:[.4,0,.1,1]};function JR(t,e){let r=t.root;for(let s=t.path.length-1;s>=0;s--)if(t.path[s].instance){r=t.path[s];break}const i=(r&&r!==t.root?r.instance:document).querySelector(`[data-projection-id="${e}"]`);i&&t.mount(i,!0)}function Y2(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function YR(t){Y2(t.x),Y2(t.y)}function M8(t,e,r){return t==="position"||t==="preserve-aspect"&&!Fy(U2(e),U2(r),.2)}const QR=R8({attachResizeListener:(t,e)=>Yo(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rv={current:void 0},XR=R8({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!rv.current){const t=new QR(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),rv.current=t}return rv.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),ZR={...RI,...YT,...ZI,...SR},yl=cT((t,e)=>LT(t,e,ZR,xR,XR));function N8(){const t=S.useRef(!1);return a0(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function eM(){const t=N8(),[e,r]=S.useState(0),n=S.useCallback(()=>{t.current&&r(e+1)},[e]);return[S.useCallback(()=>Mr.postRender(n),[n]),e]}class tM extends S.Component{getSnapshotBeforeUpdate(e){const r=this.props.childRef.current;if(r&&e.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function rM({children:t,isPresent:e}){const r=S.useId(),n=S.useRef(null),i=S.useRef({width:0,height:0,top:0,left:0});return S.useInsertionEffect(()=>{const{width:s,height:o,top:a,left:l}=i.current;if(e||!n.current||!s||!o)return;n.current.dataset.motionPopId=r;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` [data-motion-pop-id="${r}"] { position: absolute !important; width: ${s}px !important; @@ -45,12 +45,12 @@ Error generating stack: `+s.message+` top: ${a}px !important; left: ${l}px !important; } - `),()=>{document.head.removeChild(c)}},[e]),E.createElement(oR,{isPresent:e,childRef:n,sizeRef:i},E.cloneElement(t,{ref:n}))}const nv=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:s,mode:o})=>{const a=wh(lR),l=E.useId(),c=E.useMemo(()=>({id:l,initial:e,isPresent:r,custom:i,onExitComplete:f=>{a.set(f,!0);for(const u of a.values())if(!u)return;n&&n()},register:f=>(a.set(f,!1),()=>a.delete(f))}),s?void 0:[r]);return E.useMemo(()=>{a.forEach((f,u)=>a.set(u,!1))},[r]),E.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=E.createElement(aR,{isPresent:r},t)),E.createElement(ru.Provider,{value:c},t)};function lR(){return new Map}const $a=t=>t.key||"";function cR(t,e){t.forEach(r=>{const n=$a(r);e.set(n,r)})}function fR(t){const e=[];return E.Children.forEach(t,r=>{E.isValidElement(r)&&e.push(r)}),e}const F8=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{i&&(o="wait");let[a]=sR();const l=E.useContext(jg).forceRender;l&&(a=l);const c=$8(),f=fR(t);let u=f;const h=new Set,y=E.useRef(u),m=E.useRef(new Map).current,p=E.useRef(!0);if(a0(()=>{p.current=!1,cR(f,m),y.current=u}),Jg(()=>{p.current=!0,m.clear(),h.clear()}),p.current)return E.createElement(E.Fragment,null,u.map(k=>E.createElement(nv,{key:$a(k),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:s,mode:o},k)));u=[...u];const S=y.current.map($a),w=f.map($a),A=S.length;for(let k=0;k{if(w.indexOf(k)!==-1)return;const I=m.get(k);if(!I)return;const R=S.indexOf(k),F=()=>{m.delete(k),h.delete(k);const z=y.current.findIndex(j=>j.key===k);if(y.current.splice(z,1),!h.size){if(y.current=f,c.current===!1)return;a(),n&&n()}};u.splice(R,0,E.createElement(nv,{key:$a(I),isPresent:!1,onExitComplete:F,custom:e,presenceAffectsLayout:s,mode:o},I))}),u=u.map(k=>{const I=k.key;return h.has(I)?k:E.createElement(nv,{key:$a(k),isPresent:!0,presenceAffectsLayout:s,mode:o},k)}),E.createElement(E.Fragment,null,h.size?u:u.map(k=>E.cloneElement(k)))},j8={black:"#000000",white:"#ffffff",inherit:"inherit",transparent:"transparent",positive:"#1FC266",negative:"#C2501F",info:"#0076CC",warning:"#F4B03E",gradientBackdrop:`linear-gradient( + `),()=>{document.head.removeChild(c)}},[e]),S.createElement(tM,{isPresent:e,childRef:n,sizeRef:i},S.cloneElement(t,{ref:n}))}const nv=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:s,mode:o})=>{const a=wh(nM),l=S.useId(),c=S.useMemo(()=>({id:l,initial:e,isPresent:r,custom:i,onExitComplete:f=>{a.set(f,!0);for(const u of a.values())if(!u)return;n&&n()},register:f=>(a.set(f,!1),()=>a.delete(f))}),s?void 0:[r]);return S.useMemo(()=>{a.forEach((f,u)=>a.set(u,!1))},[r]),S.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=S.createElement(rM,{isPresent:r},t)),S.createElement(ru.Provider,{value:c},t)};function nM(){return new Map}const Ba=t=>t.key||"";function iM(t,e){t.forEach(r=>{const n=Ba(r);e.set(n,r)})}function sM(t){const e=[];return S.Children.forEach(t,r=>{S.isValidElement(r)&&e.push(r)}),e}const O8=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{i&&(o="wait");let[a]=eM();const l=S.useContext(jg).forceRender;l&&(a=l);const c=N8(),f=sM(t);let u=f;const h=new Set,y=S.useRef(u),m=S.useRef(new Map).current,p=S.useRef(!0);if(a0(()=>{p.current=!1,iM(f,m),y.current=u}),Jg(()=>{p.current=!0,m.clear(),h.clear()}),p.current)return S.createElement(S.Fragment,null,u.map(A=>S.createElement(nv,{key:Ba(A),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:s,mode:o},A)));u=[...u];const k=y.current.map(Ba),w=f.map(Ba),E=k.length;for(let A=0;A{if(w.indexOf(A)!==-1)return;const I=m.get(A);if(!I)return;const M=k.indexOf(A),B=()=>{m.delete(A),h.delete(A);const U=y.current.findIndex(j=>j.key===A);if(y.current.splice(U,1),!h.size){if(y.current=f,c.current===!1)return;a(),n&&n()}};u.splice(M,0,S.createElement(nv,{key:Ba(I),isPresent:!1,onExitComplete:B,custom:e,presenceAffectsLayout:s,mode:o},I))}),u=u.map(A=>{const I=A.key;return h.has(I)?A:S.createElement(nv,{key:Ba(A),isPresent:!0,presenceAffectsLayout:s,mode:o},A)}),S.createElement(S.Fragment,null,h.size?u:u.map(A=>S.cloneElement(A)))},$8={black:"#000000",white:"#ffffff",inherit:"inherit",transparent:"transparent",positive:"#1FC266",negative:"#C2501F",info:"#0076CC",warning:"#F4B03E",gradientBackdrop:`linear-gradient( 243.18deg, rgba(86, 52, 189, 0.85) 0%, rgba(49, 41, 223, 0.85) 63.54%, rgba(7, 98, 149, 0.85) 100% - )`,gradientPrimary:"linear-gradient(89.69deg, #4411E1 0.27%, #7537F9 99.73%)",gradientSecondary:"linear-gradient(32.51deg, #951990 -15.23%, #3A35B1 48.55%, #20A8B0 100%)",arbitrumDark:"#212D44",arbitrumLight:"#93D4FF",avalanceDark:"#810C0C",avalanceLight:"#FF8080",bscDark:"#584508",bscLight:"#FCCF43",ethereumDark:"#132362",ethereumLight:"#AABBFF",gnosisDark:"#084246",gnosisLight:"#8CF6FD",polygonDark:"#350881",polygonLight:"#C7A6FF"},uR={...j8,text100:"rgba(255, 255, 255, 1)",text80:"rgba(255, 255, 255, 0.8)",text50:"rgba(255, 255, 255, 0.5)",textInverse100:"rgba(0, 0, 0, 1)",backgroundPrimary:"rgba(0, 0, 0, 1)",backgroundSecondary:"rgba(255, 255, 255, 0.1)",backgroundContrast:"rgba(0, 0, 0, 0.5)",backgroundMuted:"rgba(255, 255, 255, 0.05)",backgroundControl:"rgba(255, 255, 255, 0.25)",backgroundInverse:"rgba(255, 255, 255, 1)",backgroundBackdrop:"rgba(34, 34, 34, 0.9)",backgroundOverlay:"rgba(0, 0, 0, 0.7)",backgroundRaised:"rgba(54, 54, 54, 0.7)",buttonGlass:"rgba(255, 255, 255, 0.15)",buttonEmphasis:"rgba(0, 0, 0, 0.5)",buttonInverse:"rgba(255, 255, 255, 0.8)",borderNormal:"rgba(255, 255, 255, 0.25)",borderFocus:"rgba(255, 255, 255, 0.5)"},dR={...j8,text100:"rgba(0, 0, 0, 1)",text80:"rgba(0, 0, 0, 0.8)",text50:"rgba(0, 0, 0, 0.5)",textInverse100:"rgba(255, 255, 255, 1)",backgroundPrimary:"rgba(244, 244, 244, 1)",backgroundSecondary:"rgba(0, 0, 0, 0.1)",backgroundContrast:"rgba(244, 244, 244, 0.5)",backgroundMuted:"rgba(0, 0, 0, 0.05)",backgroundControl:"rgba(0, 0, 0, 0.25)",backgroundInverse:"rgba(0, 0, 0, 1)",backgroundBackdrop:"rgba(221, 221, 221, 0.9)",backgroundOverlay:"rgba(244, 244, 244, 0.7)",backgroundRaised:"rgba(192, 192, 192, 0.7)",buttonGlass:"rgba(0, 0, 0, 0.15)",buttonEmphasis:"rgba(255, 255, 255, 0.5)",buttonInverse:"rgba(0, 0, 0, 0.8)",borderNormal:"rgba(0, 0, 0, 0.25)",borderFocus:"rgba(0, 0, 0, 0.5)"},hR={dark:uR,light:dR},vR={inherit:{fontFamily:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit",fontWeight:"inherit"},xlarge:{fontFamily:"body",fontSize:"xlarge",lineHeight:"9",letterSpacing:"none",fontWeight:"bold"},large:{fontFamily:"body",fontSize:"large",lineHeight:"7",letterSpacing:"normal",fontWeight:"semibold"},medium:{fontFamily:"body",fontSize:"medium",lineHeight:"6",letterSpacing:"normal",fontWeight:"bold"},normal:{fontFamily:"body",fontSize:"normal",lineHeight:"5",letterSpacing:"wide",fontWeight:"normal"},small:{fontFamily:"body",fontSize:"small",lineHeight:"4",letterSpacing:"wide",fontWeight:"medium"},xsmall:{fontFamily:"body",fontSize:"xsmall",lineHeight:"4",letterSpacing:"wide",fontWeight:"bold"},code:{fontFamily:"mono",fontSize:"normal",lineHeight:"5",letterSpacing:"none",fontWeight:"normal"}};var Y2={colors:{black:"var(--colors-black)",white:"var(--colors-white)",inherit:"var(--colors-inherit)",transparent:"var(--colors-transparent)",positive:"var(--colors-positive)",negative:"var(--colors-negative)",info:"var(--colors-info)",warning:"var(--colors-warning)",gradientBackdrop:"var(--colors-gradient-backdrop)",gradientPrimary:"var(--colors-gradient-primary)",gradientSecondary:"var(--colors-gradient-secondary)",arbitrumDark:"var(--colors-arbitrum-dark)",arbitrumLight:"var(--colors-arbitrum-light)",avalanceDark:"var(--colors-avalance-dark)",avalanceLight:"var(--colors-avalance-light)",bscDark:"var(--colors-bsc-dark)",bscLight:"var(--colors-bsc-light)",ethereumDark:"var(--colors-ethereum-dark)",ethereumLight:"var(--colors-ethereum-light)",gnosisDark:"var(--colors-gnosis-dark)",gnosisLight:"var(--colors-gnosis-light)",polygonDark:"var(--colors-polygon-dark)",polygonLight:"var(--colors-polygon-light)",text100:"var(--colors-text100)",text80:"var(--colors-text80)",text50:"var(--colors-text50)",textInverse100:"var(--colors-text-inverse100)",backgroundPrimary:"var(--colors-background-primary)",backgroundSecondary:"var(--colors-background-secondary)",backgroundContrast:"var(--colors-background-contrast)",backgroundMuted:"var(--colors-background-muted)",backgroundControl:"var(--colors-background-control)",backgroundInverse:"var(--colors-background-inverse)",backgroundBackdrop:"var(--colors-background-backdrop)",backgroundOverlay:"var(--colors-background-overlay)",backgroundRaised:"var(--colors-background-raised)",buttonGlass:"var(--colors-button-glass)",buttonEmphasis:"var(--colors-button-emphasis)",buttonInverse:"var(--colors-button-inverse)",borderNormal:"var(--colors-border-normal)",borderFocus:"var(--colors-border-focus)"}};function yR(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function pR(t){var e=yR(t,"string");return typeof e=="symbol"?e:String(e)}function gR(t,e,r){return e=pR(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function X2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function iv(t){for(var e=1;efunction(){for(var e=arguments.length,r=new Array(e),n=0;nl.styles)),s=Object.keys(i),o=s.filter(l=>"mappings"in i[l]),a=l=>{var c=[],f={},u=iv({},l),h=!1;for(var y of o){var m=l[y];if(m!=null){var p=i[y];h=!0;for(var S of p.mappings)f[S]=m,u[S]==null&&delete u[S]}}var w=h?iv(iv({},f),u):l,A=function(){var F=w[k],z=i[k];try{if(z.mappings)return"continue";if(typeof F=="string"||typeof F=="number")c.push(z.values[F].defaultClass);else if(Array.isArray(F))for(var j=0;jt,bR=function(){return mR(xR)(...arguments)},z8=bR({conditions:{defaultCondition:"sm",conditionNames:["sm","md","lg","xl"],responsiveArray:void 0},styles:{borderWidth:{mappings:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"]},borderRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderLeftRadius:{mappings:["borderBottomLeftRadius","borderTopLeftRadius"]},borderRightRadius:{mappings:["borderBottomRightRadius","borderTopRightRadius"]},borderTopRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius"]},borderBottomRadius:{mappings:["borderBottomLeftRadius","borderBottomRightRadius"]},margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},overflow:{mappings:["overflowX","overflowY"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},placeItems:{mappings:["justifyContent","alignItems"]},inset:{mappings:["top","bottom","left","right"]},width:{values:{0:{conditions:{sm:"fyvr10",md:"fyvr11",lg:"fyvr12",xl:"fyvr13"},defaultClass:"fyvr10"},1:{conditions:{sm:"fyvr14",md:"fyvr15",lg:"fyvr16",xl:"fyvr17"},defaultClass:"fyvr14"},2:{conditions:{sm:"fyvr18",md:"fyvr19",lg:"fyvr1a",xl:"fyvr1b"},defaultClass:"fyvr18"},3:{conditions:{sm:"fyvr1c",md:"fyvr1d",lg:"fyvr1e",xl:"fyvr1f"},defaultClass:"fyvr1c"},4:{conditions:{sm:"fyvr1g",md:"fyvr1h",lg:"fyvr1i",xl:"fyvr1j"},defaultClass:"fyvr1g"},5:{conditions:{sm:"fyvr1k",md:"fyvr1l",lg:"fyvr1m",xl:"fyvr1n"},defaultClass:"fyvr1k"},6:{conditions:{sm:"fyvr1o",md:"fyvr1p",lg:"fyvr1q",xl:"fyvr1r"},defaultClass:"fyvr1o"},7:{conditions:{sm:"fyvr1s",md:"fyvr1t",lg:"fyvr1u",xl:"fyvr1v"},defaultClass:"fyvr1s"},8:{conditions:{sm:"fyvr1w",md:"fyvr1x",lg:"fyvr1y",xl:"fyvr1z"},defaultClass:"fyvr1w"},9:{conditions:{sm:"fyvr110",md:"fyvr111",lg:"fyvr112",xl:"fyvr113"},defaultClass:"fyvr110"},10:{conditions:{sm:"fyvr114",md:"fyvr115",lg:"fyvr116",xl:"fyvr117"},defaultClass:"fyvr114"},12:{conditions:{sm:"fyvr118",md:"fyvr119",lg:"fyvr11a",xl:"fyvr11b"},defaultClass:"fyvr118"},14:{conditions:{sm:"fyvr11c",md:"fyvr11d",lg:"fyvr11e",xl:"fyvr11f"},defaultClass:"fyvr11c"},16:{conditions:{sm:"fyvr11g",md:"fyvr11h",lg:"fyvr11i",xl:"fyvr11j"},defaultClass:"fyvr11g"},"0.25":{conditions:{sm:"fyvr11k",md:"fyvr11l",lg:"fyvr11m",xl:"fyvr11n"},defaultClass:"fyvr11k"},"0.5":{conditions:{sm:"fyvr11o",md:"fyvr11p",lg:"fyvr11q",xl:"fyvr11r"},defaultClass:"fyvr11o"},"1.5":{conditions:{sm:"fyvr11s",md:"fyvr11t",lg:"fyvr11u",xl:"fyvr11v"},defaultClass:"fyvr11s"},none:{conditions:{sm:"fyvr11w",md:"fyvr11x",lg:"fyvr11y",xl:"fyvr11z"},defaultClass:"fyvr11w"},px:{conditions:{sm:"fyvr120",md:"fyvr121",lg:"fyvr122",xl:"fyvr123"},defaultClass:"fyvr120"},auto:{conditions:{sm:"fyvr124",md:"fyvr125",lg:"fyvr126",xl:"fyvr127"},defaultClass:"fyvr124"},full:{conditions:{sm:"fyvr128",md:"fyvr129",lg:"fyvr12a",xl:"fyvr12b"},defaultClass:"fyvr128"},"1/2":{conditions:{sm:"fyvr12c",md:"fyvr12d",lg:"fyvr12e",xl:"fyvr12f"},defaultClass:"fyvr12c"},"1/3":{conditions:{sm:"fyvr12g",md:"fyvr12h",lg:"fyvr12i",xl:"fyvr12j"},defaultClass:"fyvr12g"},"2/3":{conditions:{sm:"fyvr12k",md:"fyvr12l",lg:"fyvr12m",xl:"fyvr12n"},defaultClass:"fyvr12k"},"1/4":{conditions:{sm:"fyvr12o",md:"fyvr12p",lg:"fyvr12q",xl:"fyvr12r"},defaultClass:"fyvr12o"},"3/4":{conditions:{sm:"fyvr12s",md:"fyvr12t",lg:"fyvr12u",xl:"fyvr12v"},defaultClass:"fyvr12s"},fit:{conditions:{sm:"fyvr12w",md:"fyvr12x",lg:"fyvr12y",xl:"fyvr12z"},defaultClass:"fyvr12w"},max:{conditions:{sm:"fyvr130",md:"fyvr131",lg:"fyvr132",xl:"fyvr133"},defaultClass:"fyvr130"},min:{conditions:{sm:"fyvr134",md:"fyvr135",lg:"fyvr136",xl:"fyvr137"},defaultClass:"fyvr134"},vw:{conditions:{sm:"fyvr138",md:"fyvr139",lg:"fyvr13a",xl:"fyvr13b"},defaultClass:"fyvr138"},vh:{conditions:{sm:"fyvr13c",md:"fyvr13d",lg:"fyvr13e",xl:"fyvr13f"},defaultClass:"fyvr13c"}}},height:{values:{0:{conditions:{sm:"fyvr13g",md:"fyvr13h",lg:"fyvr13i",xl:"fyvr13j"},defaultClass:"fyvr13g"},1:{conditions:{sm:"fyvr13k",md:"fyvr13l",lg:"fyvr13m",xl:"fyvr13n"},defaultClass:"fyvr13k"},2:{conditions:{sm:"fyvr13o",md:"fyvr13p",lg:"fyvr13q",xl:"fyvr13r"},defaultClass:"fyvr13o"},3:{conditions:{sm:"fyvr13s",md:"fyvr13t",lg:"fyvr13u",xl:"fyvr13v"},defaultClass:"fyvr13s"},4:{conditions:{sm:"fyvr13w",md:"fyvr13x",lg:"fyvr13y",xl:"fyvr13z"},defaultClass:"fyvr13w"},5:{conditions:{sm:"fyvr140",md:"fyvr141",lg:"fyvr142",xl:"fyvr143"},defaultClass:"fyvr140"},6:{conditions:{sm:"fyvr144",md:"fyvr145",lg:"fyvr146",xl:"fyvr147"},defaultClass:"fyvr144"},7:{conditions:{sm:"fyvr148",md:"fyvr149",lg:"fyvr14a",xl:"fyvr14b"},defaultClass:"fyvr148"},8:{conditions:{sm:"fyvr14c",md:"fyvr14d",lg:"fyvr14e",xl:"fyvr14f"},defaultClass:"fyvr14c"},9:{conditions:{sm:"fyvr14g",md:"fyvr14h",lg:"fyvr14i",xl:"fyvr14j"},defaultClass:"fyvr14g"},10:{conditions:{sm:"fyvr14k",md:"fyvr14l",lg:"fyvr14m",xl:"fyvr14n"},defaultClass:"fyvr14k"},12:{conditions:{sm:"fyvr14o",md:"fyvr14p",lg:"fyvr14q",xl:"fyvr14r"},defaultClass:"fyvr14o"},14:{conditions:{sm:"fyvr14s",md:"fyvr14t",lg:"fyvr14u",xl:"fyvr14v"},defaultClass:"fyvr14s"},16:{conditions:{sm:"fyvr14w",md:"fyvr14x",lg:"fyvr14y",xl:"fyvr14z"},defaultClass:"fyvr14w"},"0.25":{conditions:{sm:"fyvr150",md:"fyvr151",lg:"fyvr152",xl:"fyvr153"},defaultClass:"fyvr150"},"0.5":{conditions:{sm:"fyvr154",md:"fyvr155",lg:"fyvr156",xl:"fyvr157"},defaultClass:"fyvr154"},"1.5":{conditions:{sm:"fyvr158",md:"fyvr159",lg:"fyvr15a",xl:"fyvr15b"},defaultClass:"fyvr158"},none:{conditions:{sm:"fyvr15c",md:"fyvr15d",lg:"fyvr15e",xl:"fyvr15f"},defaultClass:"fyvr15c"},px:{conditions:{sm:"fyvr15g",md:"fyvr15h",lg:"fyvr15i",xl:"fyvr15j"},defaultClass:"fyvr15g"},auto:{conditions:{sm:"fyvr15k",md:"fyvr15l",lg:"fyvr15m",xl:"fyvr15n"},defaultClass:"fyvr15k"},full:{conditions:{sm:"fyvr15o",md:"fyvr15p",lg:"fyvr15q",xl:"fyvr15r"},defaultClass:"fyvr15o"},"1/2":{conditions:{sm:"fyvr15s",md:"fyvr15t",lg:"fyvr15u",xl:"fyvr15v"},defaultClass:"fyvr15s"},"1/3":{conditions:{sm:"fyvr15w",md:"fyvr15x",lg:"fyvr15y",xl:"fyvr15z"},defaultClass:"fyvr15w"},"2/3":{conditions:{sm:"fyvr160",md:"fyvr161",lg:"fyvr162",xl:"fyvr163"},defaultClass:"fyvr160"},"1/4":{conditions:{sm:"fyvr164",md:"fyvr165",lg:"fyvr166",xl:"fyvr167"},defaultClass:"fyvr164"},"3/4":{conditions:{sm:"fyvr168",md:"fyvr169",lg:"fyvr16a",xl:"fyvr16b"},defaultClass:"fyvr168"},fit:{conditions:{sm:"fyvr16c",md:"fyvr16d",lg:"fyvr16e",xl:"fyvr16f"},defaultClass:"fyvr16c"},max:{conditions:{sm:"fyvr16g",md:"fyvr16h",lg:"fyvr16i",xl:"fyvr16j"},defaultClass:"fyvr16g"},min:{conditions:{sm:"fyvr16k",md:"fyvr16l",lg:"fyvr16m",xl:"fyvr16n"},defaultClass:"fyvr16k"},vw:{conditions:{sm:"fyvr16o",md:"fyvr16p",lg:"fyvr16q",xl:"fyvr16r"},defaultClass:"fyvr16o"},vh:{conditions:{sm:"fyvr16s",md:"fyvr16t",lg:"fyvr16u",xl:"fyvr16v"},defaultClass:"fyvr16s"}}},maxWidth:{values:{0:{conditions:{sm:"fyvr16w",md:"fyvr16x",lg:"fyvr16y",xl:"fyvr16z"},defaultClass:"fyvr16w"},1:{conditions:{sm:"fyvr170",md:"fyvr171",lg:"fyvr172",xl:"fyvr173"},defaultClass:"fyvr170"},2:{conditions:{sm:"fyvr174",md:"fyvr175",lg:"fyvr176",xl:"fyvr177"},defaultClass:"fyvr174"},3:{conditions:{sm:"fyvr178",md:"fyvr179",lg:"fyvr17a",xl:"fyvr17b"},defaultClass:"fyvr178"},4:{conditions:{sm:"fyvr17c",md:"fyvr17d",lg:"fyvr17e",xl:"fyvr17f"},defaultClass:"fyvr17c"},5:{conditions:{sm:"fyvr17g",md:"fyvr17h",lg:"fyvr17i",xl:"fyvr17j"},defaultClass:"fyvr17g"},6:{conditions:{sm:"fyvr17k",md:"fyvr17l",lg:"fyvr17m",xl:"fyvr17n"},defaultClass:"fyvr17k"},7:{conditions:{sm:"fyvr17o",md:"fyvr17p",lg:"fyvr17q",xl:"fyvr17r"},defaultClass:"fyvr17o"},8:{conditions:{sm:"fyvr17s",md:"fyvr17t",lg:"fyvr17u",xl:"fyvr17v"},defaultClass:"fyvr17s"},9:{conditions:{sm:"fyvr17w",md:"fyvr17x",lg:"fyvr17y",xl:"fyvr17z"},defaultClass:"fyvr17w"},10:{conditions:{sm:"fyvr180",md:"fyvr181",lg:"fyvr182",xl:"fyvr183"},defaultClass:"fyvr180"},12:{conditions:{sm:"fyvr184",md:"fyvr185",lg:"fyvr186",xl:"fyvr187"},defaultClass:"fyvr184"},14:{conditions:{sm:"fyvr188",md:"fyvr189",lg:"fyvr18a",xl:"fyvr18b"},defaultClass:"fyvr188"},16:{conditions:{sm:"fyvr18c",md:"fyvr18d",lg:"fyvr18e",xl:"fyvr18f"},defaultClass:"fyvr18c"},"0.25":{conditions:{sm:"fyvr18g",md:"fyvr18h",lg:"fyvr18i",xl:"fyvr18j"},defaultClass:"fyvr18g"},"0.5":{conditions:{sm:"fyvr18k",md:"fyvr18l",lg:"fyvr18m",xl:"fyvr18n"},defaultClass:"fyvr18k"},"1.5":{conditions:{sm:"fyvr18o",md:"fyvr18p",lg:"fyvr18q",xl:"fyvr18r"},defaultClass:"fyvr18o"},none:{conditions:{sm:"fyvr18s",md:"fyvr18t",lg:"fyvr18u",xl:"fyvr18v"},defaultClass:"fyvr18s"},px:{conditions:{sm:"fyvr18w",md:"fyvr18x",lg:"fyvr18y",xl:"fyvr18z"},defaultClass:"fyvr18w"},auto:{conditions:{sm:"fyvr190",md:"fyvr191",lg:"fyvr192",xl:"fyvr193"},defaultClass:"fyvr190"},full:{conditions:{sm:"fyvr194",md:"fyvr195",lg:"fyvr196",xl:"fyvr197"},defaultClass:"fyvr194"},"1/2":{conditions:{sm:"fyvr198",md:"fyvr199",lg:"fyvr19a",xl:"fyvr19b"},defaultClass:"fyvr198"},"1/3":{conditions:{sm:"fyvr19c",md:"fyvr19d",lg:"fyvr19e",xl:"fyvr19f"},defaultClass:"fyvr19c"},"2/3":{conditions:{sm:"fyvr19g",md:"fyvr19h",lg:"fyvr19i",xl:"fyvr19j"},defaultClass:"fyvr19g"},"1/4":{conditions:{sm:"fyvr19k",md:"fyvr19l",lg:"fyvr19m",xl:"fyvr19n"},defaultClass:"fyvr19k"},"3/4":{conditions:{sm:"fyvr19o",md:"fyvr19p",lg:"fyvr19q",xl:"fyvr19r"},defaultClass:"fyvr19o"},fit:{conditions:{sm:"fyvr19s",md:"fyvr19t",lg:"fyvr19u",xl:"fyvr19v"},defaultClass:"fyvr19s"},max:{conditions:{sm:"fyvr19w",md:"fyvr19x",lg:"fyvr19y",xl:"fyvr19z"},defaultClass:"fyvr19w"},min:{conditions:{sm:"fyvr1a0",md:"fyvr1a1",lg:"fyvr1a2",xl:"fyvr1a3"},defaultClass:"fyvr1a0"},vw:{conditions:{sm:"fyvr1a4",md:"fyvr1a5",lg:"fyvr1a6",xl:"fyvr1a7"},defaultClass:"fyvr1a4"},vh:{conditions:{sm:"fyvr1a8",md:"fyvr1a9",lg:"fyvr1aa",xl:"fyvr1ab"},defaultClass:"fyvr1a8"}}},maxHeight:{values:{0:{conditions:{sm:"fyvr1ac",md:"fyvr1ad",lg:"fyvr1ae",xl:"fyvr1af"},defaultClass:"fyvr1ac"},1:{conditions:{sm:"fyvr1ag",md:"fyvr1ah",lg:"fyvr1ai",xl:"fyvr1aj"},defaultClass:"fyvr1ag"},2:{conditions:{sm:"fyvr1ak",md:"fyvr1al",lg:"fyvr1am",xl:"fyvr1an"},defaultClass:"fyvr1ak"},3:{conditions:{sm:"fyvr1ao",md:"fyvr1ap",lg:"fyvr1aq",xl:"fyvr1ar"},defaultClass:"fyvr1ao"},4:{conditions:{sm:"fyvr1as",md:"fyvr1at",lg:"fyvr1au",xl:"fyvr1av"},defaultClass:"fyvr1as"},5:{conditions:{sm:"fyvr1aw",md:"fyvr1ax",lg:"fyvr1ay",xl:"fyvr1az"},defaultClass:"fyvr1aw"},6:{conditions:{sm:"fyvr1b0",md:"fyvr1b1",lg:"fyvr1b2",xl:"fyvr1b3"},defaultClass:"fyvr1b0"},7:{conditions:{sm:"fyvr1b4",md:"fyvr1b5",lg:"fyvr1b6",xl:"fyvr1b7"},defaultClass:"fyvr1b4"},8:{conditions:{sm:"fyvr1b8",md:"fyvr1b9",lg:"fyvr1ba",xl:"fyvr1bb"},defaultClass:"fyvr1b8"},9:{conditions:{sm:"fyvr1bc",md:"fyvr1bd",lg:"fyvr1be",xl:"fyvr1bf"},defaultClass:"fyvr1bc"},10:{conditions:{sm:"fyvr1bg",md:"fyvr1bh",lg:"fyvr1bi",xl:"fyvr1bj"},defaultClass:"fyvr1bg"},12:{conditions:{sm:"fyvr1bk",md:"fyvr1bl",lg:"fyvr1bm",xl:"fyvr1bn"},defaultClass:"fyvr1bk"},14:{conditions:{sm:"fyvr1bo",md:"fyvr1bp",lg:"fyvr1bq",xl:"fyvr1br"},defaultClass:"fyvr1bo"},16:{conditions:{sm:"fyvr1bs",md:"fyvr1bt",lg:"fyvr1bu",xl:"fyvr1bv"},defaultClass:"fyvr1bs"},"0.25":{conditions:{sm:"fyvr1bw",md:"fyvr1bx",lg:"fyvr1by",xl:"fyvr1bz"},defaultClass:"fyvr1bw"},"0.5":{conditions:{sm:"fyvr1c0",md:"fyvr1c1",lg:"fyvr1c2",xl:"fyvr1c3"},defaultClass:"fyvr1c0"},"1.5":{conditions:{sm:"fyvr1c4",md:"fyvr1c5",lg:"fyvr1c6",xl:"fyvr1c7"},defaultClass:"fyvr1c4"},none:{conditions:{sm:"fyvr1c8",md:"fyvr1c9",lg:"fyvr1ca",xl:"fyvr1cb"},defaultClass:"fyvr1c8"},px:{conditions:{sm:"fyvr1cc",md:"fyvr1cd",lg:"fyvr1ce",xl:"fyvr1cf"},defaultClass:"fyvr1cc"},auto:{conditions:{sm:"fyvr1cg",md:"fyvr1ch",lg:"fyvr1ci",xl:"fyvr1cj"},defaultClass:"fyvr1cg"},full:{conditions:{sm:"fyvr1ck",md:"fyvr1cl",lg:"fyvr1cm",xl:"fyvr1cn"},defaultClass:"fyvr1ck"},"1/2":{conditions:{sm:"fyvr1co",md:"fyvr1cp",lg:"fyvr1cq",xl:"fyvr1cr"},defaultClass:"fyvr1co"},"1/3":{conditions:{sm:"fyvr1cs",md:"fyvr1ct",lg:"fyvr1cu",xl:"fyvr1cv"},defaultClass:"fyvr1cs"},"2/3":{conditions:{sm:"fyvr1cw",md:"fyvr1cx",lg:"fyvr1cy",xl:"fyvr1cz"},defaultClass:"fyvr1cw"},"1/4":{conditions:{sm:"fyvr1d0",md:"fyvr1d1",lg:"fyvr1d2",xl:"fyvr1d3"},defaultClass:"fyvr1d0"},"3/4":{conditions:{sm:"fyvr1d4",md:"fyvr1d5",lg:"fyvr1d6",xl:"fyvr1d7"},defaultClass:"fyvr1d4"},fit:{conditions:{sm:"fyvr1d8",md:"fyvr1d9",lg:"fyvr1da",xl:"fyvr1db"},defaultClass:"fyvr1d8"},max:{conditions:{sm:"fyvr1dc",md:"fyvr1dd",lg:"fyvr1de",xl:"fyvr1df"},defaultClass:"fyvr1dc"},min:{conditions:{sm:"fyvr1dg",md:"fyvr1dh",lg:"fyvr1di",xl:"fyvr1dj"},defaultClass:"fyvr1dg"},vw:{conditions:{sm:"fyvr1dk",md:"fyvr1dl",lg:"fyvr1dm",xl:"fyvr1dn"},defaultClass:"fyvr1dk"},vh:{conditions:{sm:"fyvr1do",md:"fyvr1dp",lg:"fyvr1dq",xl:"fyvr1dr"},defaultClass:"fyvr1do"}}},minWidth:{values:{0:{conditions:{sm:"fyvr1ds",md:"fyvr1dt",lg:"fyvr1du",xl:"fyvr1dv"},defaultClass:"fyvr1ds"},1:{conditions:{sm:"fyvr1dw",md:"fyvr1dx",lg:"fyvr1dy",xl:"fyvr1dz"},defaultClass:"fyvr1dw"},2:{conditions:{sm:"fyvr1e0",md:"fyvr1e1",lg:"fyvr1e2",xl:"fyvr1e3"},defaultClass:"fyvr1e0"},3:{conditions:{sm:"fyvr1e4",md:"fyvr1e5",lg:"fyvr1e6",xl:"fyvr1e7"},defaultClass:"fyvr1e4"},4:{conditions:{sm:"fyvr1e8",md:"fyvr1e9",lg:"fyvr1ea",xl:"fyvr1eb"},defaultClass:"fyvr1e8"},5:{conditions:{sm:"fyvr1ec",md:"fyvr1ed",lg:"fyvr1ee",xl:"fyvr1ef"},defaultClass:"fyvr1ec"},6:{conditions:{sm:"fyvr1eg",md:"fyvr1eh",lg:"fyvr1ei",xl:"fyvr1ej"},defaultClass:"fyvr1eg"},7:{conditions:{sm:"fyvr1ek",md:"fyvr1el",lg:"fyvr1em",xl:"fyvr1en"},defaultClass:"fyvr1ek"},8:{conditions:{sm:"fyvr1eo",md:"fyvr1ep",lg:"fyvr1eq",xl:"fyvr1er"},defaultClass:"fyvr1eo"},9:{conditions:{sm:"fyvr1es",md:"fyvr1et",lg:"fyvr1eu",xl:"fyvr1ev"},defaultClass:"fyvr1es"},10:{conditions:{sm:"fyvr1ew",md:"fyvr1ex",lg:"fyvr1ey",xl:"fyvr1ez"},defaultClass:"fyvr1ew"},12:{conditions:{sm:"fyvr1f0",md:"fyvr1f1",lg:"fyvr1f2",xl:"fyvr1f3"},defaultClass:"fyvr1f0"},14:{conditions:{sm:"fyvr1f4",md:"fyvr1f5",lg:"fyvr1f6",xl:"fyvr1f7"},defaultClass:"fyvr1f4"},16:{conditions:{sm:"fyvr1f8",md:"fyvr1f9",lg:"fyvr1fa",xl:"fyvr1fb"},defaultClass:"fyvr1f8"},"0.25":{conditions:{sm:"fyvr1fc",md:"fyvr1fd",lg:"fyvr1fe",xl:"fyvr1ff"},defaultClass:"fyvr1fc"},"0.5":{conditions:{sm:"fyvr1fg",md:"fyvr1fh",lg:"fyvr1fi",xl:"fyvr1fj"},defaultClass:"fyvr1fg"},"1.5":{conditions:{sm:"fyvr1fk",md:"fyvr1fl",lg:"fyvr1fm",xl:"fyvr1fn"},defaultClass:"fyvr1fk"},none:{conditions:{sm:"fyvr1fo",md:"fyvr1fp",lg:"fyvr1fq",xl:"fyvr1fr"},defaultClass:"fyvr1fo"},px:{conditions:{sm:"fyvr1fs",md:"fyvr1ft",lg:"fyvr1fu",xl:"fyvr1fv"},defaultClass:"fyvr1fs"},auto:{conditions:{sm:"fyvr1fw",md:"fyvr1fx",lg:"fyvr1fy",xl:"fyvr1fz"},defaultClass:"fyvr1fw"},full:{conditions:{sm:"fyvr1g0",md:"fyvr1g1",lg:"fyvr1g2",xl:"fyvr1g3"},defaultClass:"fyvr1g0"},"1/2":{conditions:{sm:"fyvr1g4",md:"fyvr1g5",lg:"fyvr1g6",xl:"fyvr1g7"},defaultClass:"fyvr1g4"},"1/3":{conditions:{sm:"fyvr1g8",md:"fyvr1g9",lg:"fyvr1ga",xl:"fyvr1gb"},defaultClass:"fyvr1g8"},"2/3":{conditions:{sm:"fyvr1gc",md:"fyvr1gd",lg:"fyvr1ge",xl:"fyvr1gf"},defaultClass:"fyvr1gc"},"1/4":{conditions:{sm:"fyvr1gg",md:"fyvr1gh",lg:"fyvr1gi",xl:"fyvr1gj"},defaultClass:"fyvr1gg"},"3/4":{conditions:{sm:"fyvr1gk",md:"fyvr1gl",lg:"fyvr1gm",xl:"fyvr1gn"},defaultClass:"fyvr1gk"},fit:{conditions:{sm:"fyvr1go",md:"fyvr1gp",lg:"fyvr1gq",xl:"fyvr1gr"},defaultClass:"fyvr1go"},max:{conditions:{sm:"fyvr1gs",md:"fyvr1gt",lg:"fyvr1gu",xl:"fyvr1gv"},defaultClass:"fyvr1gs"},min:{conditions:{sm:"fyvr1gw",md:"fyvr1gx",lg:"fyvr1gy",xl:"fyvr1gz"},defaultClass:"fyvr1gw"},vw:{conditions:{sm:"fyvr1h0",md:"fyvr1h1",lg:"fyvr1h2",xl:"fyvr1h3"},defaultClass:"fyvr1h0"},vh:{conditions:{sm:"fyvr1h4",md:"fyvr1h5",lg:"fyvr1h6",xl:"fyvr1h7"},defaultClass:"fyvr1h4"}}},minHeight:{values:{0:{conditions:{sm:"fyvr1h8",md:"fyvr1h9",lg:"fyvr1ha",xl:"fyvr1hb"},defaultClass:"fyvr1h8"},1:{conditions:{sm:"fyvr1hc",md:"fyvr1hd",lg:"fyvr1he",xl:"fyvr1hf"},defaultClass:"fyvr1hc"},2:{conditions:{sm:"fyvr1hg",md:"fyvr1hh",lg:"fyvr1hi",xl:"fyvr1hj"},defaultClass:"fyvr1hg"},3:{conditions:{sm:"fyvr1hk",md:"fyvr1hl",lg:"fyvr1hm",xl:"fyvr1hn"},defaultClass:"fyvr1hk"},4:{conditions:{sm:"fyvr1ho",md:"fyvr1hp",lg:"fyvr1hq",xl:"fyvr1hr"},defaultClass:"fyvr1ho"},5:{conditions:{sm:"fyvr1hs",md:"fyvr1ht",lg:"fyvr1hu",xl:"fyvr1hv"},defaultClass:"fyvr1hs"},6:{conditions:{sm:"fyvr1hw",md:"fyvr1hx",lg:"fyvr1hy",xl:"fyvr1hz"},defaultClass:"fyvr1hw"},7:{conditions:{sm:"fyvr1i0",md:"fyvr1i1",lg:"fyvr1i2",xl:"fyvr1i3"},defaultClass:"fyvr1i0"},8:{conditions:{sm:"fyvr1i4",md:"fyvr1i5",lg:"fyvr1i6",xl:"fyvr1i7"},defaultClass:"fyvr1i4"},9:{conditions:{sm:"fyvr1i8",md:"fyvr1i9",lg:"fyvr1ia",xl:"fyvr1ib"},defaultClass:"fyvr1i8"},10:{conditions:{sm:"fyvr1ic",md:"fyvr1id",lg:"fyvr1ie",xl:"fyvr1if"},defaultClass:"fyvr1ic"},12:{conditions:{sm:"fyvr1ig",md:"fyvr1ih",lg:"fyvr1ii",xl:"fyvr1ij"},defaultClass:"fyvr1ig"},14:{conditions:{sm:"fyvr1ik",md:"fyvr1il",lg:"fyvr1im",xl:"fyvr1in"},defaultClass:"fyvr1ik"},16:{conditions:{sm:"fyvr1io",md:"fyvr1ip",lg:"fyvr1iq",xl:"fyvr1ir"},defaultClass:"fyvr1io"},"0.25":{conditions:{sm:"fyvr1is",md:"fyvr1it",lg:"fyvr1iu",xl:"fyvr1iv"},defaultClass:"fyvr1is"},"0.5":{conditions:{sm:"fyvr1iw",md:"fyvr1ix",lg:"fyvr1iy",xl:"fyvr1iz"},defaultClass:"fyvr1iw"},"1.5":{conditions:{sm:"fyvr1j0",md:"fyvr1j1",lg:"fyvr1j2",xl:"fyvr1j3"},defaultClass:"fyvr1j0"},none:{conditions:{sm:"fyvr1j4",md:"fyvr1j5",lg:"fyvr1j6",xl:"fyvr1j7"},defaultClass:"fyvr1j4"},px:{conditions:{sm:"fyvr1j8",md:"fyvr1j9",lg:"fyvr1ja",xl:"fyvr1jb"},defaultClass:"fyvr1j8"},auto:{conditions:{sm:"fyvr1jc",md:"fyvr1jd",lg:"fyvr1je",xl:"fyvr1jf"},defaultClass:"fyvr1jc"},full:{conditions:{sm:"fyvr1jg",md:"fyvr1jh",lg:"fyvr1ji",xl:"fyvr1jj"},defaultClass:"fyvr1jg"},"1/2":{conditions:{sm:"fyvr1jk",md:"fyvr1jl",lg:"fyvr1jm",xl:"fyvr1jn"},defaultClass:"fyvr1jk"},"1/3":{conditions:{sm:"fyvr1jo",md:"fyvr1jp",lg:"fyvr1jq",xl:"fyvr1jr"},defaultClass:"fyvr1jo"},"2/3":{conditions:{sm:"fyvr1js",md:"fyvr1jt",lg:"fyvr1ju",xl:"fyvr1jv"},defaultClass:"fyvr1js"},"1/4":{conditions:{sm:"fyvr1jw",md:"fyvr1jx",lg:"fyvr1jy",xl:"fyvr1jz"},defaultClass:"fyvr1jw"},"3/4":{conditions:{sm:"fyvr1k0",md:"fyvr1k1",lg:"fyvr1k2",xl:"fyvr1k3"},defaultClass:"fyvr1k0"},fit:{conditions:{sm:"fyvr1k4",md:"fyvr1k5",lg:"fyvr1k6",xl:"fyvr1k7"},defaultClass:"fyvr1k4"},max:{conditions:{sm:"fyvr1k8",md:"fyvr1k9",lg:"fyvr1ka",xl:"fyvr1kb"},defaultClass:"fyvr1k8"},min:{conditions:{sm:"fyvr1kc",md:"fyvr1kd",lg:"fyvr1ke",xl:"fyvr1kf"},defaultClass:"fyvr1kc"},vw:{conditions:{sm:"fyvr1kg",md:"fyvr1kh",lg:"fyvr1ki",xl:"fyvr1kj"},defaultClass:"fyvr1kg"},vh:{conditions:{sm:"fyvr1kk",md:"fyvr1kl",lg:"fyvr1km",xl:"fyvr1kn"},defaultClass:"fyvr1kk"}}},top:{values:{0:{conditions:{sm:"fyvr1ko",md:"fyvr1kp",lg:"fyvr1kq",xl:"fyvr1kr"},defaultClass:"fyvr1ko"},1:{conditions:{sm:"fyvr1ks",md:"fyvr1kt",lg:"fyvr1ku",xl:"fyvr1kv"},defaultClass:"fyvr1ks"},2:{conditions:{sm:"fyvr1kw",md:"fyvr1kx",lg:"fyvr1ky",xl:"fyvr1kz"},defaultClass:"fyvr1kw"},3:{conditions:{sm:"fyvr1l0",md:"fyvr1l1",lg:"fyvr1l2",xl:"fyvr1l3"},defaultClass:"fyvr1l0"},4:{conditions:{sm:"fyvr1l4",md:"fyvr1l5",lg:"fyvr1l6",xl:"fyvr1l7"},defaultClass:"fyvr1l4"},5:{conditions:{sm:"fyvr1l8",md:"fyvr1l9",lg:"fyvr1la",xl:"fyvr1lb"},defaultClass:"fyvr1l8"},6:{conditions:{sm:"fyvr1lc",md:"fyvr1ld",lg:"fyvr1le",xl:"fyvr1lf"},defaultClass:"fyvr1lc"},7:{conditions:{sm:"fyvr1lg",md:"fyvr1lh",lg:"fyvr1li",xl:"fyvr1lj"},defaultClass:"fyvr1lg"},8:{conditions:{sm:"fyvr1lk",md:"fyvr1ll",lg:"fyvr1lm",xl:"fyvr1ln"},defaultClass:"fyvr1lk"},9:{conditions:{sm:"fyvr1lo",md:"fyvr1lp",lg:"fyvr1lq",xl:"fyvr1lr"},defaultClass:"fyvr1lo"},10:{conditions:{sm:"fyvr1ls",md:"fyvr1lt",lg:"fyvr1lu",xl:"fyvr1lv"},defaultClass:"fyvr1ls"},12:{conditions:{sm:"fyvr1lw",md:"fyvr1lx",lg:"fyvr1ly",xl:"fyvr1lz"},defaultClass:"fyvr1lw"},14:{conditions:{sm:"fyvr1m0",md:"fyvr1m1",lg:"fyvr1m2",xl:"fyvr1m3"},defaultClass:"fyvr1m0"},16:{conditions:{sm:"fyvr1m4",md:"fyvr1m5",lg:"fyvr1m6",xl:"fyvr1m7"},defaultClass:"fyvr1m4"},"0.25":{conditions:{sm:"fyvr1m8",md:"fyvr1m9",lg:"fyvr1ma",xl:"fyvr1mb"},defaultClass:"fyvr1m8"},"0.5":{conditions:{sm:"fyvr1mc",md:"fyvr1md",lg:"fyvr1me",xl:"fyvr1mf"},defaultClass:"fyvr1mc"},"1.5":{conditions:{sm:"fyvr1mg",md:"fyvr1mh",lg:"fyvr1mi",xl:"fyvr1mj"},defaultClass:"fyvr1mg"},auto:{conditions:{sm:"fyvr1mk",md:"fyvr1ml",lg:"fyvr1mm",xl:"fyvr1mn"},defaultClass:"fyvr1mk"}}},bottom:{values:{0:{conditions:{sm:"fyvr1mo",md:"fyvr1mp",lg:"fyvr1mq",xl:"fyvr1mr"},defaultClass:"fyvr1mo"},1:{conditions:{sm:"fyvr1ms",md:"fyvr1mt",lg:"fyvr1mu",xl:"fyvr1mv"},defaultClass:"fyvr1ms"},2:{conditions:{sm:"fyvr1mw",md:"fyvr1mx",lg:"fyvr1my",xl:"fyvr1mz"},defaultClass:"fyvr1mw"},3:{conditions:{sm:"fyvr1n0",md:"fyvr1n1",lg:"fyvr1n2",xl:"fyvr1n3"},defaultClass:"fyvr1n0"},4:{conditions:{sm:"fyvr1n4",md:"fyvr1n5",lg:"fyvr1n6",xl:"fyvr1n7"},defaultClass:"fyvr1n4"},5:{conditions:{sm:"fyvr1n8",md:"fyvr1n9",lg:"fyvr1na",xl:"fyvr1nb"},defaultClass:"fyvr1n8"},6:{conditions:{sm:"fyvr1nc",md:"fyvr1nd",lg:"fyvr1ne",xl:"fyvr1nf"},defaultClass:"fyvr1nc"},7:{conditions:{sm:"fyvr1ng",md:"fyvr1nh",lg:"fyvr1ni",xl:"fyvr1nj"},defaultClass:"fyvr1ng"},8:{conditions:{sm:"fyvr1nk",md:"fyvr1nl",lg:"fyvr1nm",xl:"fyvr1nn"},defaultClass:"fyvr1nk"},9:{conditions:{sm:"fyvr1no",md:"fyvr1np",lg:"fyvr1nq",xl:"fyvr1nr"},defaultClass:"fyvr1no"},10:{conditions:{sm:"fyvr1ns",md:"fyvr1nt",lg:"fyvr1nu",xl:"fyvr1nv"},defaultClass:"fyvr1ns"},12:{conditions:{sm:"fyvr1nw",md:"fyvr1nx",lg:"fyvr1ny",xl:"fyvr1nz"},defaultClass:"fyvr1nw"},14:{conditions:{sm:"fyvr1o0",md:"fyvr1o1",lg:"fyvr1o2",xl:"fyvr1o3"},defaultClass:"fyvr1o0"},16:{conditions:{sm:"fyvr1o4",md:"fyvr1o5",lg:"fyvr1o6",xl:"fyvr1o7"},defaultClass:"fyvr1o4"},"0.25":{conditions:{sm:"fyvr1o8",md:"fyvr1o9",lg:"fyvr1oa",xl:"fyvr1ob"},defaultClass:"fyvr1o8"},"0.5":{conditions:{sm:"fyvr1oc",md:"fyvr1od",lg:"fyvr1oe",xl:"fyvr1of"},defaultClass:"fyvr1oc"},"1.5":{conditions:{sm:"fyvr1og",md:"fyvr1oh",lg:"fyvr1oi",xl:"fyvr1oj"},defaultClass:"fyvr1og"},auto:{conditions:{sm:"fyvr1ok",md:"fyvr1ol",lg:"fyvr1om",xl:"fyvr1on"},defaultClass:"fyvr1ok"}}},left:{values:{0:{conditions:{sm:"fyvr1oo",md:"fyvr1op",lg:"fyvr1oq",xl:"fyvr1or"},defaultClass:"fyvr1oo"},1:{conditions:{sm:"fyvr1os",md:"fyvr1ot",lg:"fyvr1ou",xl:"fyvr1ov"},defaultClass:"fyvr1os"},2:{conditions:{sm:"fyvr1ow",md:"fyvr1ox",lg:"fyvr1oy",xl:"fyvr1oz"},defaultClass:"fyvr1ow"},3:{conditions:{sm:"fyvr1p0",md:"fyvr1p1",lg:"fyvr1p2",xl:"fyvr1p3"},defaultClass:"fyvr1p0"},4:{conditions:{sm:"fyvr1p4",md:"fyvr1p5",lg:"fyvr1p6",xl:"fyvr1p7"},defaultClass:"fyvr1p4"},5:{conditions:{sm:"fyvr1p8",md:"fyvr1p9",lg:"fyvr1pa",xl:"fyvr1pb"},defaultClass:"fyvr1p8"},6:{conditions:{sm:"fyvr1pc",md:"fyvr1pd",lg:"fyvr1pe",xl:"fyvr1pf"},defaultClass:"fyvr1pc"},7:{conditions:{sm:"fyvr1pg",md:"fyvr1ph",lg:"fyvr1pi",xl:"fyvr1pj"},defaultClass:"fyvr1pg"},8:{conditions:{sm:"fyvr1pk",md:"fyvr1pl",lg:"fyvr1pm",xl:"fyvr1pn"},defaultClass:"fyvr1pk"},9:{conditions:{sm:"fyvr1po",md:"fyvr1pp",lg:"fyvr1pq",xl:"fyvr1pr"},defaultClass:"fyvr1po"},10:{conditions:{sm:"fyvr1ps",md:"fyvr1pt",lg:"fyvr1pu",xl:"fyvr1pv"},defaultClass:"fyvr1ps"},12:{conditions:{sm:"fyvr1pw",md:"fyvr1px",lg:"fyvr1py",xl:"fyvr1pz"},defaultClass:"fyvr1pw"},14:{conditions:{sm:"fyvr1q0",md:"fyvr1q1",lg:"fyvr1q2",xl:"fyvr1q3"},defaultClass:"fyvr1q0"},16:{conditions:{sm:"fyvr1q4",md:"fyvr1q5",lg:"fyvr1q6",xl:"fyvr1q7"},defaultClass:"fyvr1q4"},"0.25":{conditions:{sm:"fyvr1q8",md:"fyvr1q9",lg:"fyvr1qa",xl:"fyvr1qb"},defaultClass:"fyvr1q8"},"0.5":{conditions:{sm:"fyvr1qc",md:"fyvr1qd",lg:"fyvr1qe",xl:"fyvr1qf"},defaultClass:"fyvr1qc"},"1.5":{conditions:{sm:"fyvr1qg",md:"fyvr1qh",lg:"fyvr1qi",xl:"fyvr1qj"},defaultClass:"fyvr1qg"},auto:{conditions:{sm:"fyvr1qk",md:"fyvr1ql",lg:"fyvr1qm",xl:"fyvr1qn"},defaultClass:"fyvr1qk"}}},right:{values:{0:{conditions:{sm:"fyvr1qo",md:"fyvr1qp",lg:"fyvr1qq",xl:"fyvr1qr"},defaultClass:"fyvr1qo"},1:{conditions:{sm:"fyvr1qs",md:"fyvr1qt",lg:"fyvr1qu",xl:"fyvr1qv"},defaultClass:"fyvr1qs"},2:{conditions:{sm:"fyvr1qw",md:"fyvr1qx",lg:"fyvr1qy",xl:"fyvr1qz"},defaultClass:"fyvr1qw"},3:{conditions:{sm:"fyvr1r0",md:"fyvr1r1",lg:"fyvr1r2",xl:"fyvr1r3"},defaultClass:"fyvr1r0"},4:{conditions:{sm:"fyvr1r4",md:"fyvr1r5",lg:"fyvr1r6",xl:"fyvr1r7"},defaultClass:"fyvr1r4"},5:{conditions:{sm:"fyvr1r8",md:"fyvr1r9",lg:"fyvr1ra",xl:"fyvr1rb"},defaultClass:"fyvr1r8"},6:{conditions:{sm:"fyvr1rc",md:"fyvr1rd",lg:"fyvr1re",xl:"fyvr1rf"},defaultClass:"fyvr1rc"},7:{conditions:{sm:"fyvr1rg",md:"fyvr1rh",lg:"fyvr1ri",xl:"fyvr1rj"},defaultClass:"fyvr1rg"},8:{conditions:{sm:"fyvr1rk",md:"fyvr1rl",lg:"fyvr1rm",xl:"fyvr1rn"},defaultClass:"fyvr1rk"},9:{conditions:{sm:"fyvr1ro",md:"fyvr1rp",lg:"fyvr1rq",xl:"fyvr1rr"},defaultClass:"fyvr1ro"},10:{conditions:{sm:"fyvr1rs",md:"fyvr1rt",lg:"fyvr1ru",xl:"fyvr1rv"},defaultClass:"fyvr1rs"},12:{conditions:{sm:"fyvr1rw",md:"fyvr1rx",lg:"fyvr1ry",xl:"fyvr1rz"},defaultClass:"fyvr1rw"},14:{conditions:{sm:"fyvr1s0",md:"fyvr1s1",lg:"fyvr1s2",xl:"fyvr1s3"},defaultClass:"fyvr1s0"},16:{conditions:{sm:"fyvr1s4",md:"fyvr1s5",lg:"fyvr1s6",xl:"fyvr1s7"},defaultClass:"fyvr1s4"},"0.25":{conditions:{sm:"fyvr1s8",md:"fyvr1s9",lg:"fyvr1sa",xl:"fyvr1sb"},defaultClass:"fyvr1s8"},"0.5":{conditions:{sm:"fyvr1sc",md:"fyvr1sd",lg:"fyvr1se",xl:"fyvr1sf"},defaultClass:"fyvr1sc"},"1.5":{conditions:{sm:"fyvr1sg",md:"fyvr1sh",lg:"fyvr1si",xl:"fyvr1sj"},defaultClass:"fyvr1sg"},auto:{conditions:{sm:"fyvr1sk",md:"fyvr1sl",lg:"fyvr1sm",xl:"fyvr1sn"},defaultClass:"fyvr1sk"}}},paddingTop:{values:{0:{conditions:{sm:"fyvr1so",md:"fyvr1sp",lg:"fyvr1sq",xl:"fyvr1sr"},defaultClass:"fyvr1so"},1:{conditions:{sm:"fyvr1ss",md:"fyvr1st",lg:"fyvr1su",xl:"fyvr1sv"},defaultClass:"fyvr1ss"},2:{conditions:{sm:"fyvr1sw",md:"fyvr1sx",lg:"fyvr1sy",xl:"fyvr1sz"},defaultClass:"fyvr1sw"},3:{conditions:{sm:"fyvr1t0",md:"fyvr1t1",lg:"fyvr1t2",xl:"fyvr1t3"},defaultClass:"fyvr1t0"},4:{conditions:{sm:"fyvr1t4",md:"fyvr1t5",lg:"fyvr1t6",xl:"fyvr1t7"},defaultClass:"fyvr1t4"},5:{conditions:{sm:"fyvr1t8",md:"fyvr1t9",lg:"fyvr1ta",xl:"fyvr1tb"},defaultClass:"fyvr1t8"},6:{conditions:{sm:"fyvr1tc",md:"fyvr1td",lg:"fyvr1te",xl:"fyvr1tf"},defaultClass:"fyvr1tc"},7:{conditions:{sm:"fyvr1tg",md:"fyvr1th",lg:"fyvr1ti",xl:"fyvr1tj"},defaultClass:"fyvr1tg"},8:{conditions:{sm:"fyvr1tk",md:"fyvr1tl",lg:"fyvr1tm",xl:"fyvr1tn"},defaultClass:"fyvr1tk"},9:{conditions:{sm:"fyvr1to",md:"fyvr1tp",lg:"fyvr1tq",xl:"fyvr1tr"},defaultClass:"fyvr1to"},10:{conditions:{sm:"fyvr1ts",md:"fyvr1tt",lg:"fyvr1tu",xl:"fyvr1tv"},defaultClass:"fyvr1ts"},12:{conditions:{sm:"fyvr1tw",md:"fyvr1tx",lg:"fyvr1ty",xl:"fyvr1tz"},defaultClass:"fyvr1tw"},14:{conditions:{sm:"fyvr1u0",md:"fyvr1u1",lg:"fyvr1u2",xl:"fyvr1u3"},defaultClass:"fyvr1u0"},16:{conditions:{sm:"fyvr1u4",md:"fyvr1u5",lg:"fyvr1u6",xl:"fyvr1u7"},defaultClass:"fyvr1u4"},"0.25":{conditions:{sm:"fyvr1u8",md:"fyvr1u9",lg:"fyvr1ua",xl:"fyvr1ub"},defaultClass:"fyvr1u8"},"0.5":{conditions:{sm:"fyvr1uc",md:"fyvr1ud",lg:"fyvr1ue",xl:"fyvr1uf"},defaultClass:"fyvr1uc"},"1.5":{conditions:{sm:"fyvr1ug",md:"fyvr1uh",lg:"fyvr1ui",xl:"fyvr1uj"},defaultClass:"fyvr1ug"}}},paddingBottom:{values:{0:{conditions:{sm:"fyvr1uk",md:"fyvr1ul",lg:"fyvr1um",xl:"fyvr1un"},defaultClass:"fyvr1uk"},1:{conditions:{sm:"fyvr1uo",md:"fyvr1up",lg:"fyvr1uq",xl:"fyvr1ur"},defaultClass:"fyvr1uo"},2:{conditions:{sm:"fyvr1us",md:"fyvr1ut",lg:"fyvr1uu",xl:"fyvr1uv"},defaultClass:"fyvr1us"},3:{conditions:{sm:"fyvr1uw",md:"fyvr1ux",lg:"fyvr1uy",xl:"fyvr1uz"},defaultClass:"fyvr1uw"},4:{conditions:{sm:"fyvr1v0",md:"fyvr1v1",lg:"fyvr1v2",xl:"fyvr1v3"},defaultClass:"fyvr1v0"},5:{conditions:{sm:"fyvr1v4",md:"fyvr1v5",lg:"fyvr1v6",xl:"fyvr1v7"},defaultClass:"fyvr1v4"},6:{conditions:{sm:"fyvr1v8",md:"fyvr1v9",lg:"fyvr1va",xl:"fyvr1vb"},defaultClass:"fyvr1v8"},7:{conditions:{sm:"fyvr1vc",md:"fyvr1vd",lg:"fyvr1ve",xl:"fyvr1vf"},defaultClass:"fyvr1vc"},8:{conditions:{sm:"fyvr1vg",md:"fyvr1vh",lg:"fyvr1vi",xl:"fyvr1vj"},defaultClass:"fyvr1vg"},9:{conditions:{sm:"fyvr1vk",md:"fyvr1vl",lg:"fyvr1vm",xl:"fyvr1vn"},defaultClass:"fyvr1vk"},10:{conditions:{sm:"fyvr1vo",md:"fyvr1vp",lg:"fyvr1vq",xl:"fyvr1vr"},defaultClass:"fyvr1vo"},12:{conditions:{sm:"fyvr1vs",md:"fyvr1vt",lg:"fyvr1vu",xl:"fyvr1vv"},defaultClass:"fyvr1vs"},14:{conditions:{sm:"fyvr1vw",md:"fyvr1vx",lg:"fyvr1vy",xl:"fyvr1vz"},defaultClass:"fyvr1vw"},16:{conditions:{sm:"fyvr1w0",md:"fyvr1w1",lg:"fyvr1w2",xl:"fyvr1w3"},defaultClass:"fyvr1w0"},"0.25":{conditions:{sm:"fyvr1w4",md:"fyvr1w5",lg:"fyvr1w6",xl:"fyvr1w7"},defaultClass:"fyvr1w4"},"0.5":{conditions:{sm:"fyvr1w8",md:"fyvr1w9",lg:"fyvr1wa",xl:"fyvr1wb"},defaultClass:"fyvr1w8"},"1.5":{conditions:{sm:"fyvr1wc",md:"fyvr1wd",lg:"fyvr1we",xl:"fyvr1wf"},defaultClass:"fyvr1wc"}}},paddingLeft:{values:{0:{conditions:{sm:"fyvr1wg",md:"fyvr1wh",lg:"fyvr1wi",xl:"fyvr1wj"},defaultClass:"fyvr1wg"},1:{conditions:{sm:"fyvr1wk",md:"fyvr1wl",lg:"fyvr1wm",xl:"fyvr1wn"},defaultClass:"fyvr1wk"},2:{conditions:{sm:"fyvr1wo",md:"fyvr1wp",lg:"fyvr1wq",xl:"fyvr1wr"},defaultClass:"fyvr1wo"},3:{conditions:{sm:"fyvr1ws",md:"fyvr1wt",lg:"fyvr1wu",xl:"fyvr1wv"},defaultClass:"fyvr1ws"},4:{conditions:{sm:"fyvr1ww",md:"fyvr1wx",lg:"fyvr1wy",xl:"fyvr1wz"},defaultClass:"fyvr1ww"},5:{conditions:{sm:"fyvr1x0",md:"fyvr1x1",lg:"fyvr1x2",xl:"fyvr1x3"},defaultClass:"fyvr1x0"},6:{conditions:{sm:"fyvr1x4",md:"fyvr1x5",lg:"fyvr1x6",xl:"fyvr1x7"},defaultClass:"fyvr1x4"},7:{conditions:{sm:"fyvr1x8",md:"fyvr1x9",lg:"fyvr1xa",xl:"fyvr1xb"},defaultClass:"fyvr1x8"},8:{conditions:{sm:"fyvr1xc",md:"fyvr1xd",lg:"fyvr1xe",xl:"fyvr1xf"},defaultClass:"fyvr1xc"},9:{conditions:{sm:"fyvr1xg",md:"fyvr1xh",lg:"fyvr1xi",xl:"fyvr1xj"},defaultClass:"fyvr1xg"},10:{conditions:{sm:"fyvr1xk",md:"fyvr1xl",lg:"fyvr1xm",xl:"fyvr1xn"},defaultClass:"fyvr1xk"},12:{conditions:{sm:"fyvr1xo",md:"fyvr1xp",lg:"fyvr1xq",xl:"fyvr1xr"},defaultClass:"fyvr1xo"},14:{conditions:{sm:"fyvr1xs",md:"fyvr1xt",lg:"fyvr1xu",xl:"fyvr1xv"},defaultClass:"fyvr1xs"},16:{conditions:{sm:"fyvr1xw",md:"fyvr1xx",lg:"fyvr1xy",xl:"fyvr1xz"},defaultClass:"fyvr1xw"},"0.25":{conditions:{sm:"fyvr1y0",md:"fyvr1y1",lg:"fyvr1y2",xl:"fyvr1y3"},defaultClass:"fyvr1y0"},"0.5":{conditions:{sm:"fyvr1y4",md:"fyvr1y5",lg:"fyvr1y6",xl:"fyvr1y7"},defaultClass:"fyvr1y4"},"1.5":{conditions:{sm:"fyvr1y8",md:"fyvr1y9",lg:"fyvr1ya",xl:"fyvr1yb"},defaultClass:"fyvr1y8"}}},paddingRight:{values:{0:{conditions:{sm:"fyvr1yc",md:"fyvr1yd",lg:"fyvr1ye",xl:"fyvr1yf"},defaultClass:"fyvr1yc"},1:{conditions:{sm:"fyvr1yg",md:"fyvr1yh",lg:"fyvr1yi",xl:"fyvr1yj"},defaultClass:"fyvr1yg"},2:{conditions:{sm:"fyvr1yk",md:"fyvr1yl",lg:"fyvr1ym",xl:"fyvr1yn"},defaultClass:"fyvr1yk"},3:{conditions:{sm:"fyvr1yo",md:"fyvr1yp",lg:"fyvr1yq",xl:"fyvr1yr"},defaultClass:"fyvr1yo"},4:{conditions:{sm:"fyvr1ys",md:"fyvr1yt",lg:"fyvr1yu",xl:"fyvr1yv"},defaultClass:"fyvr1ys"},5:{conditions:{sm:"fyvr1yw",md:"fyvr1yx",lg:"fyvr1yy",xl:"fyvr1yz"},defaultClass:"fyvr1yw"},6:{conditions:{sm:"fyvr1z0",md:"fyvr1z1",lg:"fyvr1z2",xl:"fyvr1z3"},defaultClass:"fyvr1z0"},7:{conditions:{sm:"fyvr1z4",md:"fyvr1z5",lg:"fyvr1z6",xl:"fyvr1z7"},defaultClass:"fyvr1z4"},8:{conditions:{sm:"fyvr1z8",md:"fyvr1z9",lg:"fyvr1za",xl:"fyvr1zb"},defaultClass:"fyvr1z8"},9:{conditions:{sm:"fyvr1zc",md:"fyvr1zd",lg:"fyvr1ze",xl:"fyvr1zf"},defaultClass:"fyvr1zc"},10:{conditions:{sm:"fyvr1zg",md:"fyvr1zh",lg:"fyvr1zi",xl:"fyvr1zj"},defaultClass:"fyvr1zg"},12:{conditions:{sm:"fyvr1zk",md:"fyvr1zl",lg:"fyvr1zm",xl:"fyvr1zn"},defaultClass:"fyvr1zk"},14:{conditions:{sm:"fyvr1zo",md:"fyvr1zp",lg:"fyvr1zq",xl:"fyvr1zr"},defaultClass:"fyvr1zo"},16:{conditions:{sm:"fyvr1zs",md:"fyvr1zt",lg:"fyvr1zu",xl:"fyvr1zv"},defaultClass:"fyvr1zs"},"0.25":{conditions:{sm:"fyvr1zw",md:"fyvr1zx",lg:"fyvr1zy",xl:"fyvr1zz"},defaultClass:"fyvr1zw"},"0.5":{conditions:{sm:"fyvr1100",md:"fyvr1101",lg:"fyvr1102",xl:"fyvr1103"},defaultClass:"fyvr1100"},"1.5":{conditions:{sm:"fyvr1104",md:"fyvr1105",lg:"fyvr1106",xl:"fyvr1107"},defaultClass:"fyvr1104"}}},marginTop:{values:{0:{conditions:{sm:"fyvr1108",md:"fyvr1109",lg:"fyvr110a",xl:"fyvr110b"},defaultClass:"fyvr1108"},1:{conditions:{sm:"fyvr110c",md:"fyvr110d",lg:"fyvr110e",xl:"fyvr110f"},defaultClass:"fyvr110c"},2:{conditions:{sm:"fyvr110g",md:"fyvr110h",lg:"fyvr110i",xl:"fyvr110j"},defaultClass:"fyvr110g"},3:{conditions:{sm:"fyvr110k",md:"fyvr110l",lg:"fyvr110m",xl:"fyvr110n"},defaultClass:"fyvr110k"},4:{conditions:{sm:"fyvr110o",md:"fyvr110p",lg:"fyvr110q",xl:"fyvr110r"},defaultClass:"fyvr110o"},5:{conditions:{sm:"fyvr110s",md:"fyvr110t",lg:"fyvr110u",xl:"fyvr110v"},defaultClass:"fyvr110s"},6:{conditions:{sm:"fyvr110w",md:"fyvr110x",lg:"fyvr110y",xl:"fyvr110z"},defaultClass:"fyvr110w"},7:{conditions:{sm:"fyvr1110",md:"fyvr1111",lg:"fyvr1112",xl:"fyvr1113"},defaultClass:"fyvr1110"},8:{conditions:{sm:"fyvr1114",md:"fyvr1115",lg:"fyvr1116",xl:"fyvr1117"},defaultClass:"fyvr1114"},9:{conditions:{sm:"fyvr1118",md:"fyvr1119",lg:"fyvr111a",xl:"fyvr111b"},defaultClass:"fyvr1118"},10:{conditions:{sm:"fyvr111c",md:"fyvr111d",lg:"fyvr111e",xl:"fyvr111f"},defaultClass:"fyvr111c"},12:{conditions:{sm:"fyvr111g",md:"fyvr111h",lg:"fyvr111i",xl:"fyvr111j"},defaultClass:"fyvr111g"},14:{conditions:{sm:"fyvr111k",md:"fyvr111l",lg:"fyvr111m",xl:"fyvr111n"},defaultClass:"fyvr111k"},16:{conditions:{sm:"fyvr111o",md:"fyvr111p",lg:"fyvr111q",xl:"fyvr111r"},defaultClass:"fyvr111o"},"0.25":{conditions:{sm:"fyvr111s",md:"fyvr111t",lg:"fyvr111u",xl:"fyvr111v"},defaultClass:"fyvr111s"},"0.5":{conditions:{sm:"fyvr111w",md:"fyvr111x",lg:"fyvr111y",xl:"fyvr111z"},defaultClass:"fyvr111w"},"1.5":{conditions:{sm:"fyvr1120",md:"fyvr1121",lg:"fyvr1122",xl:"fyvr1123"},defaultClass:"fyvr1120"},auto:{conditions:{sm:"fyvr1124",md:"fyvr1125",lg:"fyvr1126",xl:"fyvr1127"},defaultClass:"fyvr1124"}}},marginBottom:{values:{0:{conditions:{sm:"fyvr1128",md:"fyvr1129",lg:"fyvr112a",xl:"fyvr112b"},defaultClass:"fyvr1128"},1:{conditions:{sm:"fyvr112c",md:"fyvr112d",lg:"fyvr112e",xl:"fyvr112f"},defaultClass:"fyvr112c"},2:{conditions:{sm:"fyvr112g",md:"fyvr112h",lg:"fyvr112i",xl:"fyvr112j"},defaultClass:"fyvr112g"},3:{conditions:{sm:"fyvr112k",md:"fyvr112l",lg:"fyvr112m",xl:"fyvr112n"},defaultClass:"fyvr112k"},4:{conditions:{sm:"fyvr112o",md:"fyvr112p",lg:"fyvr112q",xl:"fyvr112r"},defaultClass:"fyvr112o"},5:{conditions:{sm:"fyvr112s",md:"fyvr112t",lg:"fyvr112u",xl:"fyvr112v"},defaultClass:"fyvr112s"},6:{conditions:{sm:"fyvr112w",md:"fyvr112x",lg:"fyvr112y",xl:"fyvr112z"},defaultClass:"fyvr112w"},7:{conditions:{sm:"fyvr1130",md:"fyvr1131",lg:"fyvr1132",xl:"fyvr1133"},defaultClass:"fyvr1130"},8:{conditions:{sm:"fyvr1134",md:"fyvr1135",lg:"fyvr1136",xl:"fyvr1137"},defaultClass:"fyvr1134"},9:{conditions:{sm:"fyvr1138",md:"fyvr1139",lg:"fyvr113a",xl:"fyvr113b"},defaultClass:"fyvr1138"},10:{conditions:{sm:"fyvr113c",md:"fyvr113d",lg:"fyvr113e",xl:"fyvr113f"},defaultClass:"fyvr113c"},12:{conditions:{sm:"fyvr113g",md:"fyvr113h",lg:"fyvr113i",xl:"fyvr113j"},defaultClass:"fyvr113g"},14:{conditions:{sm:"fyvr113k",md:"fyvr113l",lg:"fyvr113m",xl:"fyvr113n"},defaultClass:"fyvr113k"},16:{conditions:{sm:"fyvr113o",md:"fyvr113p",lg:"fyvr113q",xl:"fyvr113r"},defaultClass:"fyvr113o"},"0.25":{conditions:{sm:"fyvr113s",md:"fyvr113t",lg:"fyvr113u",xl:"fyvr113v"},defaultClass:"fyvr113s"},"0.5":{conditions:{sm:"fyvr113w",md:"fyvr113x",lg:"fyvr113y",xl:"fyvr113z"},defaultClass:"fyvr113w"},"1.5":{conditions:{sm:"fyvr1140",md:"fyvr1141",lg:"fyvr1142",xl:"fyvr1143"},defaultClass:"fyvr1140"},auto:{conditions:{sm:"fyvr1144",md:"fyvr1145",lg:"fyvr1146",xl:"fyvr1147"},defaultClass:"fyvr1144"}}},marginLeft:{values:{0:{conditions:{sm:"fyvr1148",md:"fyvr1149",lg:"fyvr114a",xl:"fyvr114b"},defaultClass:"fyvr1148"},1:{conditions:{sm:"fyvr114c",md:"fyvr114d",lg:"fyvr114e",xl:"fyvr114f"},defaultClass:"fyvr114c"},2:{conditions:{sm:"fyvr114g",md:"fyvr114h",lg:"fyvr114i",xl:"fyvr114j"},defaultClass:"fyvr114g"},3:{conditions:{sm:"fyvr114k",md:"fyvr114l",lg:"fyvr114m",xl:"fyvr114n"},defaultClass:"fyvr114k"},4:{conditions:{sm:"fyvr114o",md:"fyvr114p",lg:"fyvr114q",xl:"fyvr114r"},defaultClass:"fyvr114o"},5:{conditions:{sm:"fyvr114s",md:"fyvr114t",lg:"fyvr114u",xl:"fyvr114v"},defaultClass:"fyvr114s"},6:{conditions:{sm:"fyvr114w",md:"fyvr114x",lg:"fyvr114y",xl:"fyvr114z"},defaultClass:"fyvr114w"},7:{conditions:{sm:"fyvr1150",md:"fyvr1151",lg:"fyvr1152",xl:"fyvr1153"},defaultClass:"fyvr1150"},8:{conditions:{sm:"fyvr1154",md:"fyvr1155",lg:"fyvr1156",xl:"fyvr1157"},defaultClass:"fyvr1154"},9:{conditions:{sm:"fyvr1158",md:"fyvr1159",lg:"fyvr115a",xl:"fyvr115b"},defaultClass:"fyvr1158"},10:{conditions:{sm:"fyvr115c",md:"fyvr115d",lg:"fyvr115e",xl:"fyvr115f"},defaultClass:"fyvr115c"},12:{conditions:{sm:"fyvr115g",md:"fyvr115h",lg:"fyvr115i",xl:"fyvr115j"},defaultClass:"fyvr115g"},14:{conditions:{sm:"fyvr115k",md:"fyvr115l",lg:"fyvr115m",xl:"fyvr115n"},defaultClass:"fyvr115k"},16:{conditions:{sm:"fyvr115o",md:"fyvr115p",lg:"fyvr115q",xl:"fyvr115r"},defaultClass:"fyvr115o"},"0.25":{conditions:{sm:"fyvr115s",md:"fyvr115t",lg:"fyvr115u",xl:"fyvr115v"},defaultClass:"fyvr115s"},"0.5":{conditions:{sm:"fyvr115w",md:"fyvr115x",lg:"fyvr115y",xl:"fyvr115z"},defaultClass:"fyvr115w"},"1.5":{conditions:{sm:"fyvr1160",md:"fyvr1161",lg:"fyvr1162",xl:"fyvr1163"},defaultClass:"fyvr1160"},auto:{conditions:{sm:"fyvr1164",md:"fyvr1165",lg:"fyvr1166",xl:"fyvr1167"},defaultClass:"fyvr1164"}}},marginRight:{values:{0:{conditions:{sm:"fyvr1168",md:"fyvr1169",lg:"fyvr116a",xl:"fyvr116b"},defaultClass:"fyvr1168"},1:{conditions:{sm:"fyvr116c",md:"fyvr116d",lg:"fyvr116e",xl:"fyvr116f"},defaultClass:"fyvr116c"},2:{conditions:{sm:"fyvr116g",md:"fyvr116h",lg:"fyvr116i",xl:"fyvr116j"},defaultClass:"fyvr116g"},3:{conditions:{sm:"fyvr116k",md:"fyvr116l",lg:"fyvr116m",xl:"fyvr116n"},defaultClass:"fyvr116k"},4:{conditions:{sm:"fyvr116o",md:"fyvr116p",lg:"fyvr116q",xl:"fyvr116r"},defaultClass:"fyvr116o"},5:{conditions:{sm:"fyvr116s",md:"fyvr116t",lg:"fyvr116u",xl:"fyvr116v"},defaultClass:"fyvr116s"},6:{conditions:{sm:"fyvr116w",md:"fyvr116x",lg:"fyvr116y",xl:"fyvr116z"},defaultClass:"fyvr116w"},7:{conditions:{sm:"fyvr1170",md:"fyvr1171",lg:"fyvr1172",xl:"fyvr1173"},defaultClass:"fyvr1170"},8:{conditions:{sm:"fyvr1174",md:"fyvr1175",lg:"fyvr1176",xl:"fyvr1177"},defaultClass:"fyvr1174"},9:{conditions:{sm:"fyvr1178",md:"fyvr1179",lg:"fyvr117a",xl:"fyvr117b"},defaultClass:"fyvr1178"},10:{conditions:{sm:"fyvr117c",md:"fyvr117d",lg:"fyvr117e",xl:"fyvr117f"},defaultClass:"fyvr117c"},12:{conditions:{sm:"fyvr117g",md:"fyvr117h",lg:"fyvr117i",xl:"fyvr117j"},defaultClass:"fyvr117g"},14:{conditions:{sm:"fyvr117k",md:"fyvr117l",lg:"fyvr117m",xl:"fyvr117n"},defaultClass:"fyvr117k"},16:{conditions:{sm:"fyvr117o",md:"fyvr117p",lg:"fyvr117q",xl:"fyvr117r"},defaultClass:"fyvr117o"},"0.25":{conditions:{sm:"fyvr117s",md:"fyvr117t",lg:"fyvr117u",xl:"fyvr117v"},defaultClass:"fyvr117s"},"0.5":{conditions:{sm:"fyvr117w",md:"fyvr117x",lg:"fyvr117y",xl:"fyvr117z"},defaultClass:"fyvr117w"},"1.5":{conditions:{sm:"fyvr1180",md:"fyvr1181",lg:"fyvr1182",xl:"fyvr1183"},defaultClass:"fyvr1180"},auto:{conditions:{sm:"fyvr1184",md:"fyvr1185",lg:"fyvr1186",xl:"fyvr1187"},defaultClass:"fyvr1184"}}},gap:{values:{0:{conditions:{sm:"fyvr1188",md:"fyvr1189",lg:"fyvr118a",xl:"fyvr118b"},defaultClass:"fyvr1188"},1:{conditions:{sm:"fyvr118c",md:"fyvr118d",lg:"fyvr118e",xl:"fyvr118f"},defaultClass:"fyvr118c"},2:{conditions:{sm:"fyvr118g",md:"fyvr118h",lg:"fyvr118i",xl:"fyvr118j"},defaultClass:"fyvr118g"},3:{conditions:{sm:"fyvr118k",md:"fyvr118l",lg:"fyvr118m",xl:"fyvr118n"},defaultClass:"fyvr118k"},4:{conditions:{sm:"fyvr118o",md:"fyvr118p",lg:"fyvr118q",xl:"fyvr118r"},defaultClass:"fyvr118o"},5:{conditions:{sm:"fyvr118s",md:"fyvr118t",lg:"fyvr118u",xl:"fyvr118v"},defaultClass:"fyvr118s"},6:{conditions:{sm:"fyvr118w",md:"fyvr118x",lg:"fyvr118y",xl:"fyvr118z"},defaultClass:"fyvr118w"},7:{conditions:{sm:"fyvr1190",md:"fyvr1191",lg:"fyvr1192",xl:"fyvr1193"},defaultClass:"fyvr1190"},8:{conditions:{sm:"fyvr1194",md:"fyvr1195",lg:"fyvr1196",xl:"fyvr1197"},defaultClass:"fyvr1194"},9:{conditions:{sm:"fyvr1198",md:"fyvr1199",lg:"fyvr119a",xl:"fyvr119b"},defaultClass:"fyvr1198"},10:{conditions:{sm:"fyvr119c",md:"fyvr119d",lg:"fyvr119e",xl:"fyvr119f"},defaultClass:"fyvr119c"},12:{conditions:{sm:"fyvr119g",md:"fyvr119h",lg:"fyvr119i",xl:"fyvr119j"},defaultClass:"fyvr119g"},14:{conditions:{sm:"fyvr119k",md:"fyvr119l",lg:"fyvr119m",xl:"fyvr119n"},defaultClass:"fyvr119k"},16:{conditions:{sm:"fyvr119o",md:"fyvr119p",lg:"fyvr119q",xl:"fyvr119r"},defaultClass:"fyvr119o"},"0.25":{conditions:{sm:"fyvr119s",md:"fyvr119t",lg:"fyvr119u",xl:"fyvr119v"},defaultClass:"fyvr119s"},"0.5":{conditions:{sm:"fyvr119w",md:"fyvr119x",lg:"fyvr119y",xl:"fyvr119z"},defaultClass:"fyvr119w"},"1.5":{conditions:{sm:"fyvr11a0",md:"fyvr11a1",lg:"fyvr11a2",xl:"fyvr11a3"},defaultClass:"fyvr11a0"}}},borderBottomWidth:{values:{none:{conditions:{sm:"fyvr11a4",md:"fyvr11a5",lg:"fyvr11a6",xl:"fyvr11a7"},defaultClass:"fyvr11a4"},thin:{conditions:{sm:"fyvr11a8",md:"fyvr11a9",lg:"fyvr11aa",xl:"fyvr11ab"},defaultClass:"fyvr11a8"},thick:{conditions:{sm:"fyvr11ac",md:"fyvr11ad",lg:"fyvr11ae",xl:"fyvr11af"},defaultClass:"fyvr11ac"}}},borderLeftWidth:{values:{none:{conditions:{sm:"fyvr11ag",md:"fyvr11ah",lg:"fyvr11ai",xl:"fyvr11aj"},defaultClass:"fyvr11ag"},thin:{conditions:{sm:"fyvr11ak",md:"fyvr11al",lg:"fyvr11am",xl:"fyvr11an"},defaultClass:"fyvr11ak"},thick:{conditions:{sm:"fyvr11ao",md:"fyvr11ap",lg:"fyvr11aq",xl:"fyvr11ar"},defaultClass:"fyvr11ao"}}},borderRightWidth:{values:{none:{conditions:{sm:"fyvr11as",md:"fyvr11at",lg:"fyvr11au",xl:"fyvr11av"},defaultClass:"fyvr11as"},thin:{conditions:{sm:"fyvr11aw",md:"fyvr11ax",lg:"fyvr11ay",xl:"fyvr11az"},defaultClass:"fyvr11aw"},thick:{conditions:{sm:"fyvr11b0",md:"fyvr11b1",lg:"fyvr11b2",xl:"fyvr11b3"},defaultClass:"fyvr11b0"}}},borderTopWidth:{values:{none:{conditions:{sm:"fyvr11b4",md:"fyvr11b5",lg:"fyvr11b6",xl:"fyvr11b7"},defaultClass:"fyvr11b4"},thin:{conditions:{sm:"fyvr11b8",md:"fyvr11b9",lg:"fyvr11ba",xl:"fyvr11bb"},defaultClass:"fyvr11b8"},thick:{conditions:{sm:"fyvr11bc",md:"fyvr11bd",lg:"fyvr11be",xl:"fyvr11bf"},defaultClass:"fyvr11bc"}}},borderBottomLeftRadius:{values:{none:{conditions:{sm:"fyvr11bg",md:"fyvr11bh",lg:"fyvr11bi",xl:"fyvr11bj"},defaultClass:"fyvr11bg"},xs:{conditions:{sm:"fyvr11bk",md:"fyvr11bl",lg:"fyvr11bm",xl:"fyvr11bn"},defaultClass:"fyvr11bk"},sm:{conditions:{sm:"fyvr11bo",md:"fyvr11bp",lg:"fyvr11bq",xl:"fyvr11br"},defaultClass:"fyvr11bo"},md:{conditions:{sm:"fyvr11bs",md:"fyvr11bt",lg:"fyvr11bu",xl:"fyvr11bv"},defaultClass:"fyvr11bs"},lg:{conditions:{sm:"fyvr11bw",md:"fyvr11bx",lg:"fyvr11by",xl:"fyvr11bz"},defaultClass:"fyvr11bw"},circle:{conditions:{sm:"fyvr11c0",md:"fyvr11c1",lg:"fyvr11c2",xl:"fyvr11c3"},defaultClass:"fyvr11c0"}}},borderBottomRightRadius:{values:{none:{conditions:{sm:"fyvr11c4",md:"fyvr11c5",lg:"fyvr11c6",xl:"fyvr11c7"},defaultClass:"fyvr11c4"},xs:{conditions:{sm:"fyvr11c8",md:"fyvr11c9",lg:"fyvr11ca",xl:"fyvr11cb"},defaultClass:"fyvr11c8"},sm:{conditions:{sm:"fyvr11cc",md:"fyvr11cd",lg:"fyvr11ce",xl:"fyvr11cf"},defaultClass:"fyvr11cc"},md:{conditions:{sm:"fyvr11cg",md:"fyvr11ch",lg:"fyvr11ci",xl:"fyvr11cj"},defaultClass:"fyvr11cg"},lg:{conditions:{sm:"fyvr11ck",md:"fyvr11cl",lg:"fyvr11cm",xl:"fyvr11cn"},defaultClass:"fyvr11ck"},circle:{conditions:{sm:"fyvr11co",md:"fyvr11cp",lg:"fyvr11cq",xl:"fyvr11cr"},defaultClass:"fyvr11co"}}},borderTopLeftRadius:{values:{none:{conditions:{sm:"fyvr11cs",md:"fyvr11ct",lg:"fyvr11cu",xl:"fyvr11cv"},defaultClass:"fyvr11cs"},xs:{conditions:{sm:"fyvr11cw",md:"fyvr11cx",lg:"fyvr11cy",xl:"fyvr11cz"},defaultClass:"fyvr11cw"},sm:{conditions:{sm:"fyvr11d0",md:"fyvr11d1",lg:"fyvr11d2",xl:"fyvr11d3"},defaultClass:"fyvr11d0"},md:{conditions:{sm:"fyvr11d4",md:"fyvr11d5",lg:"fyvr11d6",xl:"fyvr11d7"},defaultClass:"fyvr11d4"},lg:{conditions:{sm:"fyvr11d8",md:"fyvr11d9",lg:"fyvr11da",xl:"fyvr11db"},defaultClass:"fyvr11d8"},circle:{conditions:{sm:"fyvr11dc",md:"fyvr11dd",lg:"fyvr11de",xl:"fyvr11df"},defaultClass:"fyvr11dc"}}},borderTopRightRadius:{values:{none:{conditions:{sm:"fyvr11dg",md:"fyvr11dh",lg:"fyvr11di",xl:"fyvr11dj"},defaultClass:"fyvr11dg"},xs:{conditions:{sm:"fyvr11dk",md:"fyvr11dl",lg:"fyvr11dm",xl:"fyvr11dn"},defaultClass:"fyvr11dk"},sm:{conditions:{sm:"fyvr11do",md:"fyvr11dp",lg:"fyvr11dq",xl:"fyvr11dr"},defaultClass:"fyvr11do"},md:{conditions:{sm:"fyvr11ds",md:"fyvr11dt",lg:"fyvr11du",xl:"fyvr11dv"},defaultClass:"fyvr11ds"},lg:{conditions:{sm:"fyvr11dw",md:"fyvr11dx",lg:"fyvr11dy",xl:"fyvr11dz"},defaultClass:"fyvr11dw"},circle:{conditions:{sm:"fyvr11e0",md:"fyvr11e1",lg:"fyvr11e2",xl:"fyvr11e3"},defaultClass:"fyvr11e0"}}},fontSize:{values:{inherit:{conditions:{sm:"fyvr11e4",md:"fyvr11e5",lg:"fyvr11e6",xl:"fyvr11e7"},defaultClass:"fyvr11e4"},xsmall:{conditions:{sm:"fyvr11e8",md:"fyvr11e9",lg:"fyvr11ea",xl:"fyvr11eb"},defaultClass:"fyvr11e8"},small:{conditions:{sm:"fyvr11ec",md:"fyvr11ed",lg:"fyvr11ee",xl:"fyvr11ef"},defaultClass:"fyvr11ec"},normal:{conditions:{sm:"fyvr11eg",md:"fyvr11eh",lg:"fyvr11ei",xl:"fyvr11ej"},defaultClass:"fyvr11eg"},medium:{conditions:{sm:"fyvr11ek",md:"fyvr11el",lg:"fyvr11em",xl:"fyvr11en"},defaultClass:"fyvr11ek"},large:{conditions:{sm:"fyvr11eo",md:"fyvr11ep",lg:"fyvr11eq",xl:"fyvr11er"},defaultClass:"fyvr11eo"},xlarge:{conditions:{sm:"fyvr11es",md:"fyvr11et",lg:"fyvr11eu",xl:"fyvr11ev"},defaultClass:"fyvr11es"}}},fontWeight:{values:{inherit:{conditions:{sm:"fyvr11ew",md:"fyvr11ex",lg:"fyvr11ey",xl:"fyvr11ez"},defaultClass:"fyvr11ew"},normal:{conditions:{sm:"fyvr11f0",md:"fyvr11f1",lg:"fyvr11f2",xl:"fyvr11f3"},defaultClass:"fyvr11f0"},medium:{conditions:{sm:"fyvr11f4",md:"fyvr11f5",lg:"fyvr11f6",xl:"fyvr11f7"},defaultClass:"fyvr11f4"},semibold:{conditions:{sm:"fyvr11f8",md:"fyvr11f9",lg:"fyvr11fa",xl:"fyvr11fb"},defaultClass:"fyvr11f8"},bold:{conditions:{sm:"fyvr11fc",md:"fyvr11fd",lg:"fyvr11fe",xl:"fyvr11ff"},defaultClass:"fyvr11fc"}}},letterSpacing:{values:{inherit:{conditions:{sm:"fyvr11fg",md:"fyvr11fh",lg:"fyvr11fi",xl:"fyvr11fj"},defaultClass:"fyvr11fg"},none:{conditions:{sm:"fyvr11fk",md:"fyvr11fl",lg:"fyvr11fm",xl:"fyvr11fn"},defaultClass:"fyvr11fk"},normal:{conditions:{sm:"fyvr11fo",md:"fyvr11fp",lg:"fyvr11fq",xl:"fyvr11fr"},defaultClass:"fyvr11fo"},wide:{conditions:{sm:"fyvr11fs",md:"fyvr11ft",lg:"fyvr11fu",xl:"fyvr11fv"},defaultClass:"fyvr11fs"}}},lineHeight:{values:{4:{conditions:{sm:"fyvr11fw",md:"fyvr11fx",lg:"fyvr11fy",xl:"fyvr11fz"},defaultClass:"fyvr11fw"},5:{conditions:{sm:"fyvr11g0",md:"fyvr11g1",lg:"fyvr11g2",xl:"fyvr11g3"},defaultClass:"fyvr11g0"},6:{conditions:{sm:"fyvr11g4",md:"fyvr11g5",lg:"fyvr11g6",xl:"fyvr11g7"},defaultClass:"fyvr11g4"},7:{conditions:{sm:"fyvr11g8",md:"fyvr11g9",lg:"fyvr11ga",xl:"fyvr11gb"},defaultClass:"fyvr11g8"},9:{conditions:{sm:"fyvr11gc",md:"fyvr11gd",lg:"fyvr11ge",xl:"fyvr11gf"},defaultClass:"fyvr11gc"},inherit:{conditions:{sm:"fyvr11gg",md:"fyvr11gh",lg:"fyvr11gi",xl:"fyvr11gj"},defaultClass:"fyvr11gg"}}},textAlign:{values:{center:{conditions:{sm:"fyvr11gk",md:"fyvr11gl",lg:"fyvr11gm",xl:"fyvr11gn"},defaultClass:"fyvr11gk"},left:{conditions:{sm:"fyvr11go",md:"fyvr11gp",lg:"fyvr11gq",xl:"fyvr11gr"},defaultClass:"fyvr11go"},right:{conditions:{sm:"fyvr11gs",md:"fyvr11gt",lg:"fyvr11gu",xl:"fyvr11gv"},defaultClass:"fyvr11gs"}}},display:{values:{block:{conditions:{sm:"fyvr11gw",md:"fyvr11gx",lg:"fyvr11gy",xl:"fyvr11gz"},defaultClass:"fyvr11gw"},flex:{conditions:{sm:"fyvr11h0",md:"fyvr11h1",lg:"fyvr11h2",xl:"fyvr11h3"},defaultClass:"fyvr11h0"},grid:{conditions:{sm:"fyvr11h4",md:"fyvr11h5",lg:"fyvr11h6",xl:"fyvr11h7"},defaultClass:"fyvr11h4"},"inline-block":{conditions:{sm:"fyvr11h8",md:"fyvr11h9",lg:"fyvr11ha",xl:"fyvr11hb"},defaultClass:"fyvr11h8"},"inline-flex":{conditions:{sm:"fyvr11hc",md:"fyvr11hd",lg:"fyvr11he",xl:"fyvr11hf"},defaultClass:"fyvr11hc"},none:{conditions:{sm:"fyvr11hg",md:"fyvr11hh",lg:"fyvr11hi",xl:"fyvr11hj"},defaultClass:"fyvr11hg"},contents:{conditions:{sm:"fyvr11hk",md:"fyvr11hl",lg:"fyvr11hm",xl:"fyvr11hn"},defaultClass:"fyvr11hk"}}},position:{values:{absolute:{conditions:{sm:"fyvr11ho",md:"fyvr11hp",lg:"fyvr11hq",xl:"fyvr11hr"},defaultClass:"fyvr11ho"},fixed:{conditions:{sm:"fyvr11hs",md:"fyvr11ht",lg:"fyvr11hu",xl:"fyvr11hv"},defaultClass:"fyvr11hs"},relative:{conditions:{sm:"fyvr11hw",md:"fyvr11hx",lg:"fyvr11hy",xl:"fyvr11hz"},defaultClass:"fyvr11hw"},sticky:{conditions:{sm:"fyvr11i0",md:"fyvr11i1",lg:"fyvr11i2",xl:"fyvr11i3"},defaultClass:"fyvr11i0"}}},flexDirection:{values:{column:{conditions:{sm:"fyvr11i4",md:"fyvr11i5",lg:"fyvr11i6",xl:"fyvr11i7"},defaultClass:"fyvr11i4"},"column-reverse":{conditions:{sm:"fyvr11i8",md:"fyvr11i9",lg:"fyvr11ia",xl:"fyvr11ib"},defaultClass:"fyvr11i8"},row:{conditions:{sm:"fyvr11ic",md:"fyvr11id",lg:"fyvr11ie",xl:"fyvr11if"},defaultClass:"fyvr11ic"},"row-reverse":{conditions:{sm:"fyvr11ig",md:"fyvr11ih",lg:"fyvr11ii",xl:"fyvr11ij"},defaultClass:"fyvr11ig"}}},flexShrink:{values:{0:{conditions:{sm:"fyvr11ik",md:"fyvr11il",lg:"fyvr11im",xl:"fyvr11in"},defaultClass:"fyvr11ik"},1:{conditions:{sm:"fyvr11io",md:"fyvr11ip",lg:"fyvr11iq",xl:"fyvr11ir"},defaultClass:"fyvr11io"}}},flexGrow:{values:{0:{conditions:{sm:"fyvr11is",md:"fyvr11it",lg:"fyvr11iu",xl:"fyvr11iv"},defaultClass:"fyvr11is"},1:{conditions:{sm:"fyvr11iw",md:"fyvr11ix",lg:"fyvr11iy",xl:"fyvr11iz"},defaultClass:"fyvr11iw"}}},flexWrap:{values:{nowrap:{conditions:{sm:"fyvr11j0",md:"fyvr11j1",lg:"fyvr11j2",xl:"fyvr11j3"},defaultClass:"fyvr11j0"},wrap:{conditions:{sm:"fyvr11j4",md:"fyvr11j5",lg:"fyvr11j6",xl:"fyvr11j7"},defaultClass:"fyvr11j4"},"wrap-reverse":{conditions:{sm:"fyvr11j8",md:"fyvr11j9",lg:"fyvr11ja",xl:"fyvr11jb"},defaultClass:"fyvr11j8"}}},justifyContent:{values:{"flex-start":{conditions:{sm:"fyvr11jc",md:"fyvr11jd",lg:"fyvr11je",xl:"fyvr11jf"},defaultClass:"fyvr11jc"},center:{conditions:{sm:"fyvr11jg",md:"fyvr11jh",lg:"fyvr11ji",xl:"fyvr11jj"},defaultClass:"fyvr11jg"},"flex-end":{conditions:{sm:"fyvr11jk",md:"fyvr11jl",lg:"fyvr11jm",xl:"fyvr11jn"},defaultClass:"fyvr11jk"},stretch:{conditions:{sm:"fyvr11jo",md:"fyvr11jp",lg:"fyvr11jq",xl:"fyvr11jr"},defaultClass:"fyvr11jo"},"space-around":{conditions:{sm:"fyvr11js",md:"fyvr11jt",lg:"fyvr11ju",xl:"fyvr11jv"},defaultClass:"fyvr11js"},"space-between":{conditions:{sm:"fyvr11jw",md:"fyvr11jx",lg:"fyvr11jy",xl:"fyvr11jz"},defaultClass:"fyvr11jw"},"space-evenly":{conditions:{sm:"fyvr11k0",md:"fyvr11k1",lg:"fyvr11k2",xl:"fyvr11k3"},defaultClass:"fyvr11k0"}}},justifySelf:{values:{"flex-start":{conditions:{sm:"fyvr11k4",md:"fyvr11k5",lg:"fyvr11k6",xl:"fyvr11k7"},defaultClass:"fyvr11k4"},center:{conditions:{sm:"fyvr11k8",md:"fyvr11k9",lg:"fyvr11ka",xl:"fyvr11kb"},defaultClass:"fyvr11k8"},"flex-end":{conditions:{sm:"fyvr11kc",md:"fyvr11kd",lg:"fyvr11ke",xl:"fyvr11kf"},defaultClass:"fyvr11kc"},stretch:{conditions:{sm:"fyvr11kg",md:"fyvr11kh",lg:"fyvr11ki",xl:"fyvr11kj"},defaultClass:"fyvr11kg"}}},alignItems:{values:{"flex-start":{conditions:{sm:"fyvr11kk",md:"fyvr11kl",lg:"fyvr11km",xl:"fyvr11kn"},defaultClass:"fyvr11kk"},center:{conditions:{sm:"fyvr11ko",md:"fyvr11kp",lg:"fyvr11kq",xl:"fyvr11kr"},defaultClass:"fyvr11ko"},"flex-end":{conditions:{sm:"fyvr11ks",md:"fyvr11kt",lg:"fyvr11ku",xl:"fyvr11kv"},defaultClass:"fyvr11ks"},stretch:{conditions:{sm:"fyvr11kw",md:"fyvr11kx",lg:"fyvr11ky",xl:"fyvr11kz"},defaultClass:"fyvr11kw"},baseline:{conditions:{sm:"fyvr11l0",md:"fyvr11l1",lg:"fyvr11l2",xl:"fyvr11l3"},defaultClass:"fyvr11l0"}}},alignSelf:{values:{"flex-start":{conditions:{sm:"fyvr11l4",md:"fyvr11l5",lg:"fyvr11l6",xl:"fyvr11l7"},defaultClass:"fyvr11l4"},center:{conditions:{sm:"fyvr11l8",md:"fyvr11l9",lg:"fyvr11la",xl:"fyvr11lb"},defaultClass:"fyvr11l8"},"flex-end":{conditions:{sm:"fyvr11lc",md:"fyvr11ld",lg:"fyvr11le",xl:"fyvr11lf"},defaultClass:"fyvr11lc"},stretch:{conditions:{sm:"fyvr11lg",md:"fyvr11lh",lg:"fyvr11li",xl:"fyvr11lj"},defaultClass:"fyvr11lg"},baseline:{conditions:{sm:"fyvr11lk",md:"fyvr11ll",lg:"fyvr11lm",xl:"fyvr11ln"},defaultClass:"fyvr11lk"}}},overflowX:{values:{auto:{conditions:{sm:"fyvr11lo",md:"fyvr11lp",lg:"fyvr11lq",xl:"fyvr11lr"},defaultClass:"fyvr11lo"},hidden:{conditions:{sm:"fyvr11ls",md:"fyvr11lt",lg:"fyvr11lu",xl:"fyvr11lv"},defaultClass:"fyvr11ls"},scroll:{conditions:{sm:"fyvr11lw",md:"fyvr11lx",lg:"fyvr11ly",xl:"fyvr11lz"},defaultClass:"fyvr11lw"},visible:{conditions:{sm:"fyvr11m0",md:"fyvr11m1",lg:"fyvr11m2",xl:"fyvr11m3"},defaultClass:"fyvr11m0"}}},overflowY:{values:{auto:{conditions:{sm:"fyvr11m4",md:"fyvr11m5",lg:"fyvr11m6",xl:"fyvr11m7"},defaultClass:"fyvr11m4"},hidden:{conditions:{sm:"fyvr11m8",md:"fyvr11m9",lg:"fyvr11ma",xl:"fyvr11mb"},defaultClass:"fyvr11m8"},scroll:{conditions:{sm:"fyvr11mc",md:"fyvr11md",lg:"fyvr11me",xl:"fyvr11mf"},defaultClass:"fyvr11mc"},visible:{conditions:{sm:"fyvr11mg",md:"fyvr11mh",lg:"fyvr11mi",xl:"fyvr11mj"},defaultClass:"fyvr11mg"}}},visibility:{values:{hidden:{conditions:{sm:"fyvr11mk",md:"fyvr11ml",lg:"fyvr11mm",xl:"fyvr11mn"},defaultClass:"fyvr11mk"},visible:{conditions:{sm:"fyvr11mo",md:"fyvr11mp",lg:"fyvr11mq",xl:"fyvr11mr"},defaultClass:"fyvr11mo"}}}}},{conditions:void 0,styles:{backdropFilter:{values:{blur:{defaultClass:"fyvr11ms"},none:{defaultClass:"fyvr11mt"}}},fontFamily:{values:{inherit:{defaultClass:"fyvr11mu"},body:{defaultClass:"fyvr11mv"},mono:{defaultClass:"fyvr11mw"}}},textOverflow:{values:{ellipsis:{defaultClass:"fyvr11mx"},clip:{defaultClass:"fyvr11my"}}},textTransform:{values:{capitalize:{defaultClass:"fyvr11mz"},lowercase:{defaultClass:"fyvr11n0"},uppercase:{defaultClass:"fyvr11n1"}}},userSelect:{values:{none:{defaultClass:"fyvr11n2"},text:{defaultClass:"fyvr11n3"},all:{defaultClass:"fyvr11n4"},auto:{defaultClass:"fyvr11n5"}}},whiteSpace:{values:{normal:{defaultClass:"fyvr11n6"},nowrap:{defaultClass:"fyvr11n7"},initial:{defaultClass:"fyvr11n8"},inherit:{defaultClass:"fyvr11n9"}}},wordBreak:{values:{"break-word":{defaultClass:"fyvr11na"}}},wordWrap:{values:{normal:{defaultClass:"fyvr11nb"},"break-word":{defaultClass:"fyvr11nc"},initial:{defaultClass:"fyvr11nd"},inherit:{defaultClass:"fyvr11ne"}}},zIndex:{values:{0:{defaultClass:"fyvr11nf"},1:{defaultClass:"fyvr11ng"},10:{defaultClass:"fyvr11nh"},20:{defaultClass:"fyvr11ni"},30:{defaultClass:"fyvr11nj"},40:{defaultClass:"fyvr11nk"},50:{defaultClass:"fyvr11nl"},"-1":{defaultClass:"fyvr11nm"},auto:{defaultClass:"fyvr11nn"}}},aspectRatio:{values:{"1/1":{defaultClass:"fyvr11no"},"16/9":{defaultClass:"fyvr11np"},"4/3":{defaultClass:"fyvr11nq"},"3/1":{defaultClass:"fyvr11nr"},auto:{defaultClass:"fyvr11ns"}}}}},{conditions:{defaultCondition:"base",conditionNames:["base","active","disabled","focus","hover","checked"],responsiveArray:void 0},styles:{borderColor:{mappings:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]},borderStyle:{mappings:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"]},focusRing:{mappings:["boxShadow","outline"]},background:{values:{black:{conditions:{base:"fyvr11nt",active:"fyvr11nu",disabled:"fyvr11nv",focus:"fyvr11nw",hover:"fyvr11nx",checked:"fyvr11ny"},defaultClass:"fyvr11nt"},white:{conditions:{base:"fyvr11nz",active:"fyvr11o0",disabled:"fyvr11o1",focus:"fyvr11o2",hover:"fyvr11o3",checked:"fyvr11o4"},defaultClass:"fyvr11nz"},inherit:{conditions:{base:"fyvr11o5",active:"fyvr11o6",disabled:"fyvr11o7",focus:"fyvr11o8",hover:"fyvr11o9",checked:"fyvr11oa"},defaultClass:"fyvr11o5"},transparent:{conditions:{base:"fyvr11ob",active:"fyvr11oc",disabled:"fyvr11od",focus:"fyvr11oe",hover:"fyvr11of",checked:"fyvr11og"},defaultClass:"fyvr11ob"},positive:{conditions:{base:"fyvr11oh",active:"fyvr11oi",disabled:"fyvr11oj",focus:"fyvr11ok",hover:"fyvr11ol",checked:"fyvr11om"},defaultClass:"fyvr11oh"},negative:{conditions:{base:"fyvr11on",active:"fyvr11oo",disabled:"fyvr11op",focus:"fyvr11oq",hover:"fyvr11or",checked:"fyvr11os"},defaultClass:"fyvr11on"},info:{conditions:{base:"fyvr11ot",active:"fyvr11ou",disabled:"fyvr11ov",focus:"fyvr11ow",hover:"fyvr11ox",checked:"fyvr11oy"},defaultClass:"fyvr11ot"},warning:{conditions:{base:"fyvr11oz",active:"fyvr11p0",disabled:"fyvr11p1",focus:"fyvr11p2",hover:"fyvr11p3",checked:"fyvr11p4"},defaultClass:"fyvr11oz"},gradientBackdrop:{conditions:{base:"fyvr11p5",active:"fyvr11p6",disabled:"fyvr11p7",focus:"fyvr11p8",hover:"fyvr11p9",checked:"fyvr11pa"},defaultClass:"fyvr11p5"},gradientPrimary:{conditions:{base:"fyvr11pb",active:"fyvr11pc",disabled:"fyvr11pd",focus:"fyvr11pe",hover:"fyvr11pf",checked:"fyvr11pg"},defaultClass:"fyvr11pb"},gradientSecondary:{conditions:{base:"fyvr11ph",active:"fyvr11pi",disabled:"fyvr11pj",focus:"fyvr11pk",hover:"fyvr11pl",checked:"fyvr11pm"},defaultClass:"fyvr11ph"},arbitrumDark:{conditions:{base:"fyvr11pn",active:"fyvr11po",disabled:"fyvr11pp",focus:"fyvr11pq",hover:"fyvr11pr",checked:"fyvr11ps"},defaultClass:"fyvr11pn"},arbitrumLight:{conditions:{base:"fyvr11pt",active:"fyvr11pu",disabled:"fyvr11pv",focus:"fyvr11pw",hover:"fyvr11px",checked:"fyvr11py"},defaultClass:"fyvr11pt"},avalanceDark:{conditions:{base:"fyvr11pz",active:"fyvr11q0",disabled:"fyvr11q1",focus:"fyvr11q2",hover:"fyvr11q3",checked:"fyvr11q4"},defaultClass:"fyvr11pz"},avalanceLight:{conditions:{base:"fyvr11q5",active:"fyvr11q6",disabled:"fyvr11q7",focus:"fyvr11q8",hover:"fyvr11q9",checked:"fyvr11qa"},defaultClass:"fyvr11q5"},bscDark:{conditions:{base:"fyvr11qb",active:"fyvr11qc",disabled:"fyvr11qd",focus:"fyvr11qe",hover:"fyvr11qf",checked:"fyvr11qg"},defaultClass:"fyvr11qb"},bscLight:{conditions:{base:"fyvr11qh",active:"fyvr11qi",disabled:"fyvr11qj",focus:"fyvr11qk",hover:"fyvr11ql",checked:"fyvr11qm"},defaultClass:"fyvr11qh"},ethereumDark:{conditions:{base:"fyvr11qn",active:"fyvr11qo",disabled:"fyvr11qp",focus:"fyvr11qq",hover:"fyvr11qr",checked:"fyvr11qs"},defaultClass:"fyvr11qn"},ethereumLight:{conditions:{base:"fyvr11qt",active:"fyvr11qu",disabled:"fyvr11qv",focus:"fyvr11qw",hover:"fyvr11qx",checked:"fyvr11qy"},defaultClass:"fyvr11qt"},gnosisDark:{conditions:{base:"fyvr11qz",active:"fyvr11r0",disabled:"fyvr11r1",focus:"fyvr11r2",hover:"fyvr11r3",checked:"fyvr11r4"},defaultClass:"fyvr11qz"},gnosisLight:{conditions:{base:"fyvr11r5",active:"fyvr11r6",disabled:"fyvr11r7",focus:"fyvr11r8",hover:"fyvr11r9",checked:"fyvr11ra"},defaultClass:"fyvr11r5"},polygonDark:{conditions:{base:"fyvr11rb",active:"fyvr11rc",disabled:"fyvr11rd",focus:"fyvr11re",hover:"fyvr11rf",checked:"fyvr11rg"},defaultClass:"fyvr11rb"},polygonLight:{conditions:{base:"fyvr11rh",active:"fyvr11ri",disabled:"fyvr11rj",focus:"fyvr11rk",hover:"fyvr11rl",checked:"fyvr11rm"},defaultClass:"fyvr11rh"},text100:{conditions:{base:"fyvr11rn",active:"fyvr11ro",disabled:"fyvr11rp",focus:"fyvr11rq",hover:"fyvr11rr",checked:"fyvr11rs"},defaultClass:"fyvr11rn"},text80:{conditions:{base:"fyvr11rt",active:"fyvr11ru",disabled:"fyvr11rv",focus:"fyvr11rw",hover:"fyvr11rx",checked:"fyvr11ry"},defaultClass:"fyvr11rt"},text50:{conditions:{base:"fyvr11rz",active:"fyvr11s0",disabled:"fyvr11s1",focus:"fyvr11s2",hover:"fyvr11s3",checked:"fyvr11s4"},defaultClass:"fyvr11rz"},textInverse100:{conditions:{base:"fyvr11s5",active:"fyvr11s6",disabled:"fyvr11s7",focus:"fyvr11s8",hover:"fyvr11s9",checked:"fyvr11sa"},defaultClass:"fyvr11s5"},backgroundPrimary:{conditions:{base:"fyvr11sb",active:"fyvr11sc",disabled:"fyvr11sd",focus:"fyvr11se",hover:"fyvr11sf",checked:"fyvr11sg"},defaultClass:"fyvr11sb"},backgroundSecondary:{conditions:{base:"fyvr11sh",active:"fyvr11si",disabled:"fyvr11sj",focus:"fyvr11sk",hover:"fyvr11sl",checked:"fyvr11sm"},defaultClass:"fyvr11sh"},backgroundContrast:{conditions:{base:"fyvr11sn",active:"fyvr11so",disabled:"fyvr11sp",focus:"fyvr11sq",hover:"fyvr11sr",checked:"fyvr11ss"},defaultClass:"fyvr11sn"},backgroundMuted:{conditions:{base:"fyvr11st",active:"fyvr11su",disabled:"fyvr11sv",focus:"fyvr11sw",hover:"fyvr11sx",checked:"fyvr11sy"},defaultClass:"fyvr11st"},backgroundControl:{conditions:{base:"fyvr11sz",active:"fyvr11t0",disabled:"fyvr11t1",focus:"fyvr11t2",hover:"fyvr11t3",checked:"fyvr11t4"},defaultClass:"fyvr11sz"},backgroundInverse:{conditions:{base:"fyvr11t5",active:"fyvr11t6",disabled:"fyvr11t7",focus:"fyvr11t8",hover:"fyvr11t9",checked:"fyvr11ta"},defaultClass:"fyvr11t5"},backgroundBackdrop:{conditions:{base:"fyvr11tb",active:"fyvr11tc",disabled:"fyvr11td",focus:"fyvr11te",hover:"fyvr11tf",checked:"fyvr11tg"},defaultClass:"fyvr11tb"},backgroundOverlay:{conditions:{base:"fyvr11th",active:"fyvr11ti",disabled:"fyvr11tj",focus:"fyvr11tk",hover:"fyvr11tl",checked:"fyvr11tm"},defaultClass:"fyvr11th"},backgroundRaised:{conditions:{base:"fyvr11tn",active:"fyvr11to",disabled:"fyvr11tp",focus:"fyvr11tq",hover:"fyvr11tr",checked:"fyvr11ts"},defaultClass:"fyvr11tn"},buttonGlass:{conditions:{base:"fyvr11tt",active:"fyvr11tu",disabled:"fyvr11tv",focus:"fyvr11tw",hover:"fyvr11tx",checked:"fyvr11ty"},defaultClass:"fyvr11tt"},buttonEmphasis:{conditions:{base:"fyvr11tz",active:"fyvr11u0",disabled:"fyvr11u1",focus:"fyvr11u2",hover:"fyvr11u3",checked:"fyvr11u4"},defaultClass:"fyvr11tz"},buttonInverse:{conditions:{base:"fyvr11u5",active:"fyvr11u6",disabled:"fyvr11u7",focus:"fyvr11u8",hover:"fyvr11u9",checked:"fyvr11ua"},defaultClass:"fyvr11u5"},borderNormal:{conditions:{base:"fyvr11ub",active:"fyvr11uc",disabled:"fyvr11ud",focus:"fyvr11ue",hover:"fyvr11uf",checked:"fyvr11ug"},defaultClass:"fyvr11ub"},borderFocus:{conditions:{base:"fyvr11uh",active:"fyvr11ui",disabled:"fyvr11uj",focus:"fyvr11uk",hover:"fyvr11ul",checked:"fyvr11um"},defaultClass:"fyvr11uh"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11un",active:"fyvr11uo",disabled:"fyvr11up",focus:"fyvr11uq",hover:"fyvr11ur",checked:"fyvr11us"},defaultClass:"fyvr11un"},white:{conditions:{base:"fyvr11ut",active:"fyvr11uu",disabled:"fyvr11uv",focus:"fyvr11uw",hover:"fyvr11ux",checked:"fyvr11uy"},defaultClass:"fyvr11ut"},inherit:{conditions:{base:"fyvr11uz",active:"fyvr11v0",disabled:"fyvr11v1",focus:"fyvr11v2",hover:"fyvr11v3",checked:"fyvr11v4"},defaultClass:"fyvr11uz"},transparent:{conditions:{base:"fyvr11v5",active:"fyvr11v6",disabled:"fyvr11v7",focus:"fyvr11v8",hover:"fyvr11v9",checked:"fyvr11va"},defaultClass:"fyvr11v5"},positive:{conditions:{base:"fyvr11vb",active:"fyvr11vc",disabled:"fyvr11vd",focus:"fyvr11ve",hover:"fyvr11vf",checked:"fyvr11vg"},defaultClass:"fyvr11vb"},negative:{conditions:{base:"fyvr11vh",active:"fyvr11vi",disabled:"fyvr11vj",focus:"fyvr11vk",hover:"fyvr11vl",checked:"fyvr11vm"},defaultClass:"fyvr11vh"},info:{conditions:{base:"fyvr11vn",active:"fyvr11vo",disabled:"fyvr11vp",focus:"fyvr11vq",hover:"fyvr11vr",checked:"fyvr11vs"},defaultClass:"fyvr11vn"},warning:{conditions:{base:"fyvr11vt",active:"fyvr11vu",disabled:"fyvr11vv",focus:"fyvr11vw",hover:"fyvr11vx",checked:"fyvr11vy"},defaultClass:"fyvr11vt"},gradientBackdrop:{conditions:{base:"fyvr11vz",active:"fyvr11w0",disabled:"fyvr11w1",focus:"fyvr11w2",hover:"fyvr11w3",checked:"fyvr11w4"},defaultClass:"fyvr11vz"},gradientPrimary:{conditions:{base:"fyvr11w5",active:"fyvr11w6",disabled:"fyvr11w7",focus:"fyvr11w8",hover:"fyvr11w9",checked:"fyvr11wa"},defaultClass:"fyvr11w5"},gradientSecondary:{conditions:{base:"fyvr11wb",active:"fyvr11wc",disabled:"fyvr11wd",focus:"fyvr11we",hover:"fyvr11wf",checked:"fyvr11wg"},defaultClass:"fyvr11wb"},arbitrumDark:{conditions:{base:"fyvr11wh",active:"fyvr11wi",disabled:"fyvr11wj",focus:"fyvr11wk",hover:"fyvr11wl",checked:"fyvr11wm"},defaultClass:"fyvr11wh"},arbitrumLight:{conditions:{base:"fyvr11wn",active:"fyvr11wo",disabled:"fyvr11wp",focus:"fyvr11wq",hover:"fyvr11wr",checked:"fyvr11ws"},defaultClass:"fyvr11wn"},avalanceDark:{conditions:{base:"fyvr11wt",active:"fyvr11wu",disabled:"fyvr11wv",focus:"fyvr11ww",hover:"fyvr11wx",checked:"fyvr11wy"},defaultClass:"fyvr11wt"},avalanceLight:{conditions:{base:"fyvr11wz",active:"fyvr11x0",disabled:"fyvr11x1",focus:"fyvr11x2",hover:"fyvr11x3",checked:"fyvr11x4"},defaultClass:"fyvr11wz"},bscDark:{conditions:{base:"fyvr11x5",active:"fyvr11x6",disabled:"fyvr11x7",focus:"fyvr11x8",hover:"fyvr11x9",checked:"fyvr11xa"},defaultClass:"fyvr11x5"},bscLight:{conditions:{base:"fyvr11xb",active:"fyvr11xc",disabled:"fyvr11xd",focus:"fyvr11xe",hover:"fyvr11xf",checked:"fyvr11xg"},defaultClass:"fyvr11xb"},ethereumDark:{conditions:{base:"fyvr11xh",active:"fyvr11xi",disabled:"fyvr11xj",focus:"fyvr11xk",hover:"fyvr11xl",checked:"fyvr11xm"},defaultClass:"fyvr11xh"},ethereumLight:{conditions:{base:"fyvr11xn",active:"fyvr11xo",disabled:"fyvr11xp",focus:"fyvr11xq",hover:"fyvr11xr",checked:"fyvr11xs"},defaultClass:"fyvr11xn"},gnosisDark:{conditions:{base:"fyvr11xt",active:"fyvr11xu",disabled:"fyvr11xv",focus:"fyvr11xw",hover:"fyvr11xx",checked:"fyvr11xy"},defaultClass:"fyvr11xt"},gnosisLight:{conditions:{base:"fyvr11xz",active:"fyvr11y0",disabled:"fyvr11y1",focus:"fyvr11y2",hover:"fyvr11y3",checked:"fyvr11y4"},defaultClass:"fyvr11xz"},polygonDark:{conditions:{base:"fyvr11y5",active:"fyvr11y6",disabled:"fyvr11y7",focus:"fyvr11y8",hover:"fyvr11y9",checked:"fyvr11ya"},defaultClass:"fyvr11y5"},polygonLight:{conditions:{base:"fyvr11yb",active:"fyvr11yc",disabled:"fyvr11yd",focus:"fyvr11ye",hover:"fyvr11yf",checked:"fyvr11yg"},defaultClass:"fyvr11yb"},text100:{conditions:{base:"fyvr11yh",active:"fyvr11yi",disabled:"fyvr11yj",focus:"fyvr11yk",hover:"fyvr11yl",checked:"fyvr11ym"},defaultClass:"fyvr11yh"},text80:{conditions:{base:"fyvr11yn",active:"fyvr11yo",disabled:"fyvr11yp",focus:"fyvr11yq",hover:"fyvr11yr",checked:"fyvr11ys"},defaultClass:"fyvr11yn"},text50:{conditions:{base:"fyvr11yt",active:"fyvr11yu",disabled:"fyvr11yv",focus:"fyvr11yw",hover:"fyvr11yx",checked:"fyvr11yy"},defaultClass:"fyvr11yt"},textInverse100:{conditions:{base:"fyvr11yz",active:"fyvr11z0",disabled:"fyvr11z1",focus:"fyvr11z2",hover:"fyvr11z3",checked:"fyvr11z4"},defaultClass:"fyvr11yz"},backgroundPrimary:{conditions:{base:"fyvr11z5",active:"fyvr11z6",disabled:"fyvr11z7",focus:"fyvr11z8",hover:"fyvr11z9",checked:"fyvr11za"},defaultClass:"fyvr11z5"},backgroundSecondary:{conditions:{base:"fyvr11zb",active:"fyvr11zc",disabled:"fyvr11zd",focus:"fyvr11ze",hover:"fyvr11zf",checked:"fyvr11zg"},defaultClass:"fyvr11zb"},backgroundContrast:{conditions:{base:"fyvr11zh",active:"fyvr11zi",disabled:"fyvr11zj",focus:"fyvr11zk",hover:"fyvr11zl",checked:"fyvr11zm"},defaultClass:"fyvr11zh"},backgroundMuted:{conditions:{base:"fyvr11zn",active:"fyvr11zo",disabled:"fyvr11zp",focus:"fyvr11zq",hover:"fyvr11zr",checked:"fyvr11zs"},defaultClass:"fyvr11zn"},backgroundControl:{conditions:{base:"fyvr11zt",active:"fyvr11zu",disabled:"fyvr11zv",focus:"fyvr11zw",hover:"fyvr11zx",checked:"fyvr11zy"},defaultClass:"fyvr11zt"},backgroundInverse:{conditions:{base:"fyvr11zz",active:"fyvr1200",disabled:"fyvr1201",focus:"fyvr1202",hover:"fyvr1203",checked:"fyvr1204"},defaultClass:"fyvr11zz"},backgroundBackdrop:{conditions:{base:"fyvr1205",active:"fyvr1206",disabled:"fyvr1207",focus:"fyvr1208",hover:"fyvr1209",checked:"fyvr120a"},defaultClass:"fyvr1205"},backgroundOverlay:{conditions:{base:"fyvr120b",active:"fyvr120c",disabled:"fyvr120d",focus:"fyvr120e",hover:"fyvr120f",checked:"fyvr120g"},defaultClass:"fyvr120b"},backgroundRaised:{conditions:{base:"fyvr120h",active:"fyvr120i",disabled:"fyvr120j",focus:"fyvr120k",hover:"fyvr120l",checked:"fyvr120m"},defaultClass:"fyvr120h"},buttonGlass:{conditions:{base:"fyvr120n",active:"fyvr120o",disabled:"fyvr120p",focus:"fyvr120q",hover:"fyvr120r",checked:"fyvr120s"},defaultClass:"fyvr120n"},buttonEmphasis:{conditions:{base:"fyvr120t",active:"fyvr120u",disabled:"fyvr120v",focus:"fyvr120w",hover:"fyvr120x",checked:"fyvr120y"},defaultClass:"fyvr120t"},buttonInverse:{conditions:{base:"fyvr120z",active:"fyvr1210",disabled:"fyvr1211",focus:"fyvr1212",hover:"fyvr1213",checked:"fyvr1214"},defaultClass:"fyvr120z"},borderNormal:{conditions:{base:"fyvr1215",active:"fyvr1216",disabled:"fyvr1217",focus:"fyvr1218",hover:"fyvr1219",checked:"fyvr121a"},defaultClass:"fyvr1215"},borderFocus:{conditions:{base:"fyvr121b",active:"fyvr121c",disabled:"fyvr121d",focus:"fyvr121e",hover:"fyvr121f",checked:"fyvr121g"},defaultClass:"fyvr121b"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr121h",active:"fyvr121i",disabled:"fyvr121j",focus:"fyvr121k",hover:"fyvr121l",checked:"fyvr121m"},defaultClass:"fyvr121h"},dashed:{conditions:{base:"fyvr121n",active:"fyvr121o",disabled:"fyvr121p",focus:"fyvr121q",hover:"fyvr121r",checked:"fyvr121s"},defaultClass:"fyvr121n"},dotted:{conditions:{base:"fyvr121t",active:"fyvr121u",disabled:"fyvr121v",focus:"fyvr121w",hover:"fyvr121x",checked:"fyvr121y"},defaultClass:"fyvr121t"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr121z",active:"fyvr1220",disabled:"fyvr1221",focus:"fyvr1222",hover:"fyvr1223",checked:"fyvr1224"},defaultClass:"fyvr121z"},white:{conditions:{base:"fyvr1225",active:"fyvr1226",disabled:"fyvr1227",focus:"fyvr1228",hover:"fyvr1229",checked:"fyvr122a"},defaultClass:"fyvr1225"},inherit:{conditions:{base:"fyvr122b",active:"fyvr122c",disabled:"fyvr122d",focus:"fyvr122e",hover:"fyvr122f",checked:"fyvr122g"},defaultClass:"fyvr122b"},transparent:{conditions:{base:"fyvr122h",active:"fyvr122i",disabled:"fyvr122j",focus:"fyvr122k",hover:"fyvr122l",checked:"fyvr122m"},defaultClass:"fyvr122h"},positive:{conditions:{base:"fyvr122n",active:"fyvr122o",disabled:"fyvr122p",focus:"fyvr122q",hover:"fyvr122r",checked:"fyvr122s"},defaultClass:"fyvr122n"},negative:{conditions:{base:"fyvr122t",active:"fyvr122u",disabled:"fyvr122v",focus:"fyvr122w",hover:"fyvr122x",checked:"fyvr122y"},defaultClass:"fyvr122t"},info:{conditions:{base:"fyvr122z",active:"fyvr1230",disabled:"fyvr1231",focus:"fyvr1232",hover:"fyvr1233",checked:"fyvr1234"},defaultClass:"fyvr122z"},warning:{conditions:{base:"fyvr1235",active:"fyvr1236",disabled:"fyvr1237",focus:"fyvr1238",hover:"fyvr1239",checked:"fyvr123a"},defaultClass:"fyvr1235"},gradientBackdrop:{conditions:{base:"fyvr123b",active:"fyvr123c",disabled:"fyvr123d",focus:"fyvr123e",hover:"fyvr123f",checked:"fyvr123g"},defaultClass:"fyvr123b"},gradientPrimary:{conditions:{base:"fyvr123h",active:"fyvr123i",disabled:"fyvr123j",focus:"fyvr123k",hover:"fyvr123l",checked:"fyvr123m"},defaultClass:"fyvr123h"},gradientSecondary:{conditions:{base:"fyvr123n",active:"fyvr123o",disabled:"fyvr123p",focus:"fyvr123q",hover:"fyvr123r",checked:"fyvr123s"},defaultClass:"fyvr123n"},arbitrumDark:{conditions:{base:"fyvr123t",active:"fyvr123u",disabled:"fyvr123v",focus:"fyvr123w",hover:"fyvr123x",checked:"fyvr123y"},defaultClass:"fyvr123t"},arbitrumLight:{conditions:{base:"fyvr123z",active:"fyvr1240",disabled:"fyvr1241",focus:"fyvr1242",hover:"fyvr1243",checked:"fyvr1244"},defaultClass:"fyvr123z"},avalanceDark:{conditions:{base:"fyvr1245",active:"fyvr1246",disabled:"fyvr1247",focus:"fyvr1248",hover:"fyvr1249",checked:"fyvr124a"},defaultClass:"fyvr1245"},avalanceLight:{conditions:{base:"fyvr124b",active:"fyvr124c",disabled:"fyvr124d",focus:"fyvr124e",hover:"fyvr124f",checked:"fyvr124g"},defaultClass:"fyvr124b"},bscDark:{conditions:{base:"fyvr124h",active:"fyvr124i",disabled:"fyvr124j",focus:"fyvr124k",hover:"fyvr124l",checked:"fyvr124m"},defaultClass:"fyvr124h"},bscLight:{conditions:{base:"fyvr124n",active:"fyvr124o",disabled:"fyvr124p",focus:"fyvr124q",hover:"fyvr124r",checked:"fyvr124s"},defaultClass:"fyvr124n"},ethereumDark:{conditions:{base:"fyvr124t",active:"fyvr124u",disabled:"fyvr124v",focus:"fyvr124w",hover:"fyvr124x",checked:"fyvr124y"},defaultClass:"fyvr124t"},ethereumLight:{conditions:{base:"fyvr124z",active:"fyvr1250",disabled:"fyvr1251",focus:"fyvr1252",hover:"fyvr1253",checked:"fyvr1254"},defaultClass:"fyvr124z"},gnosisDark:{conditions:{base:"fyvr1255",active:"fyvr1256",disabled:"fyvr1257",focus:"fyvr1258",hover:"fyvr1259",checked:"fyvr125a"},defaultClass:"fyvr1255"},gnosisLight:{conditions:{base:"fyvr125b",active:"fyvr125c",disabled:"fyvr125d",focus:"fyvr125e",hover:"fyvr125f",checked:"fyvr125g"},defaultClass:"fyvr125b"},polygonDark:{conditions:{base:"fyvr125h",active:"fyvr125i",disabled:"fyvr125j",focus:"fyvr125k",hover:"fyvr125l",checked:"fyvr125m"},defaultClass:"fyvr125h"},polygonLight:{conditions:{base:"fyvr125n",active:"fyvr125o",disabled:"fyvr125p",focus:"fyvr125q",hover:"fyvr125r",checked:"fyvr125s"},defaultClass:"fyvr125n"},text100:{conditions:{base:"fyvr125t",active:"fyvr125u",disabled:"fyvr125v",focus:"fyvr125w",hover:"fyvr125x",checked:"fyvr125y"},defaultClass:"fyvr125t"},text80:{conditions:{base:"fyvr125z",active:"fyvr1260",disabled:"fyvr1261",focus:"fyvr1262",hover:"fyvr1263",checked:"fyvr1264"},defaultClass:"fyvr125z"},text50:{conditions:{base:"fyvr1265",active:"fyvr1266",disabled:"fyvr1267",focus:"fyvr1268",hover:"fyvr1269",checked:"fyvr126a"},defaultClass:"fyvr1265"},textInverse100:{conditions:{base:"fyvr126b",active:"fyvr126c",disabled:"fyvr126d",focus:"fyvr126e",hover:"fyvr126f",checked:"fyvr126g"},defaultClass:"fyvr126b"},backgroundPrimary:{conditions:{base:"fyvr126h",active:"fyvr126i",disabled:"fyvr126j",focus:"fyvr126k",hover:"fyvr126l",checked:"fyvr126m"},defaultClass:"fyvr126h"},backgroundSecondary:{conditions:{base:"fyvr126n",active:"fyvr126o",disabled:"fyvr126p",focus:"fyvr126q",hover:"fyvr126r",checked:"fyvr126s"},defaultClass:"fyvr126n"},backgroundContrast:{conditions:{base:"fyvr126t",active:"fyvr126u",disabled:"fyvr126v",focus:"fyvr126w",hover:"fyvr126x",checked:"fyvr126y"},defaultClass:"fyvr126t"},backgroundMuted:{conditions:{base:"fyvr126z",active:"fyvr1270",disabled:"fyvr1271",focus:"fyvr1272",hover:"fyvr1273",checked:"fyvr1274"},defaultClass:"fyvr126z"},backgroundControl:{conditions:{base:"fyvr1275",active:"fyvr1276",disabled:"fyvr1277",focus:"fyvr1278",hover:"fyvr1279",checked:"fyvr127a"},defaultClass:"fyvr1275"},backgroundInverse:{conditions:{base:"fyvr127b",active:"fyvr127c",disabled:"fyvr127d",focus:"fyvr127e",hover:"fyvr127f",checked:"fyvr127g"},defaultClass:"fyvr127b"},backgroundBackdrop:{conditions:{base:"fyvr127h",active:"fyvr127i",disabled:"fyvr127j",focus:"fyvr127k",hover:"fyvr127l",checked:"fyvr127m"},defaultClass:"fyvr127h"},backgroundOverlay:{conditions:{base:"fyvr127n",active:"fyvr127o",disabled:"fyvr127p",focus:"fyvr127q",hover:"fyvr127r",checked:"fyvr127s"},defaultClass:"fyvr127n"},backgroundRaised:{conditions:{base:"fyvr127t",active:"fyvr127u",disabled:"fyvr127v",focus:"fyvr127w",hover:"fyvr127x",checked:"fyvr127y"},defaultClass:"fyvr127t"},buttonGlass:{conditions:{base:"fyvr127z",active:"fyvr1280",disabled:"fyvr1281",focus:"fyvr1282",hover:"fyvr1283",checked:"fyvr1284"},defaultClass:"fyvr127z"},buttonEmphasis:{conditions:{base:"fyvr1285",active:"fyvr1286",disabled:"fyvr1287",focus:"fyvr1288",hover:"fyvr1289",checked:"fyvr128a"},defaultClass:"fyvr1285"},buttonInverse:{conditions:{base:"fyvr128b",active:"fyvr128c",disabled:"fyvr128d",focus:"fyvr128e",hover:"fyvr128f",checked:"fyvr128g"},defaultClass:"fyvr128b"},borderNormal:{conditions:{base:"fyvr128h",active:"fyvr128i",disabled:"fyvr128j",focus:"fyvr128k",hover:"fyvr128l",checked:"fyvr128m"},defaultClass:"fyvr128h"},borderFocus:{conditions:{base:"fyvr128n",active:"fyvr128o",disabled:"fyvr128p",focus:"fyvr128q",hover:"fyvr128r",checked:"fyvr128s"},defaultClass:"fyvr128n"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr128t",active:"fyvr128u",disabled:"fyvr128v",focus:"fyvr128w",hover:"fyvr128x",checked:"fyvr128y"},defaultClass:"fyvr128t"},dashed:{conditions:{base:"fyvr128z",active:"fyvr1290",disabled:"fyvr1291",focus:"fyvr1292",hover:"fyvr1293",checked:"fyvr1294"},defaultClass:"fyvr128z"},dotted:{conditions:{base:"fyvr1295",active:"fyvr1296",disabled:"fyvr1297",focus:"fyvr1298",hover:"fyvr1299",checked:"fyvr129a"},defaultClass:"fyvr1295"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr129b",active:"fyvr129c",disabled:"fyvr129d",focus:"fyvr129e",hover:"fyvr129f",checked:"fyvr129g"},defaultClass:"fyvr129b"},white:{conditions:{base:"fyvr129h",active:"fyvr129i",disabled:"fyvr129j",focus:"fyvr129k",hover:"fyvr129l",checked:"fyvr129m"},defaultClass:"fyvr129h"},inherit:{conditions:{base:"fyvr129n",active:"fyvr129o",disabled:"fyvr129p",focus:"fyvr129q",hover:"fyvr129r",checked:"fyvr129s"},defaultClass:"fyvr129n"},transparent:{conditions:{base:"fyvr129t",active:"fyvr129u",disabled:"fyvr129v",focus:"fyvr129w",hover:"fyvr129x",checked:"fyvr129y"},defaultClass:"fyvr129t"},positive:{conditions:{base:"fyvr129z",active:"fyvr12a0",disabled:"fyvr12a1",focus:"fyvr12a2",hover:"fyvr12a3",checked:"fyvr12a4"},defaultClass:"fyvr129z"},negative:{conditions:{base:"fyvr12a5",active:"fyvr12a6",disabled:"fyvr12a7",focus:"fyvr12a8",hover:"fyvr12a9",checked:"fyvr12aa"},defaultClass:"fyvr12a5"},info:{conditions:{base:"fyvr12ab",active:"fyvr12ac",disabled:"fyvr12ad",focus:"fyvr12ae",hover:"fyvr12af",checked:"fyvr12ag"},defaultClass:"fyvr12ab"},warning:{conditions:{base:"fyvr12ah",active:"fyvr12ai",disabled:"fyvr12aj",focus:"fyvr12ak",hover:"fyvr12al",checked:"fyvr12am"},defaultClass:"fyvr12ah"},gradientBackdrop:{conditions:{base:"fyvr12an",active:"fyvr12ao",disabled:"fyvr12ap",focus:"fyvr12aq",hover:"fyvr12ar",checked:"fyvr12as"},defaultClass:"fyvr12an"},gradientPrimary:{conditions:{base:"fyvr12at",active:"fyvr12au",disabled:"fyvr12av",focus:"fyvr12aw",hover:"fyvr12ax",checked:"fyvr12ay"},defaultClass:"fyvr12at"},gradientSecondary:{conditions:{base:"fyvr12az",active:"fyvr12b0",disabled:"fyvr12b1",focus:"fyvr12b2",hover:"fyvr12b3",checked:"fyvr12b4"},defaultClass:"fyvr12az"},arbitrumDark:{conditions:{base:"fyvr12b5",active:"fyvr12b6",disabled:"fyvr12b7",focus:"fyvr12b8",hover:"fyvr12b9",checked:"fyvr12ba"},defaultClass:"fyvr12b5"},arbitrumLight:{conditions:{base:"fyvr12bb",active:"fyvr12bc",disabled:"fyvr12bd",focus:"fyvr12be",hover:"fyvr12bf",checked:"fyvr12bg"},defaultClass:"fyvr12bb"},avalanceDark:{conditions:{base:"fyvr12bh",active:"fyvr12bi",disabled:"fyvr12bj",focus:"fyvr12bk",hover:"fyvr12bl",checked:"fyvr12bm"},defaultClass:"fyvr12bh"},avalanceLight:{conditions:{base:"fyvr12bn",active:"fyvr12bo",disabled:"fyvr12bp",focus:"fyvr12bq",hover:"fyvr12br",checked:"fyvr12bs"},defaultClass:"fyvr12bn"},bscDark:{conditions:{base:"fyvr12bt",active:"fyvr12bu",disabled:"fyvr12bv",focus:"fyvr12bw",hover:"fyvr12bx",checked:"fyvr12by"},defaultClass:"fyvr12bt"},bscLight:{conditions:{base:"fyvr12bz",active:"fyvr12c0",disabled:"fyvr12c1",focus:"fyvr12c2",hover:"fyvr12c3",checked:"fyvr12c4"},defaultClass:"fyvr12bz"},ethereumDark:{conditions:{base:"fyvr12c5",active:"fyvr12c6",disabled:"fyvr12c7",focus:"fyvr12c8",hover:"fyvr12c9",checked:"fyvr12ca"},defaultClass:"fyvr12c5"},ethereumLight:{conditions:{base:"fyvr12cb",active:"fyvr12cc",disabled:"fyvr12cd",focus:"fyvr12ce",hover:"fyvr12cf",checked:"fyvr12cg"},defaultClass:"fyvr12cb"},gnosisDark:{conditions:{base:"fyvr12ch",active:"fyvr12ci",disabled:"fyvr12cj",focus:"fyvr12ck",hover:"fyvr12cl",checked:"fyvr12cm"},defaultClass:"fyvr12ch"},gnosisLight:{conditions:{base:"fyvr12cn",active:"fyvr12co",disabled:"fyvr12cp",focus:"fyvr12cq",hover:"fyvr12cr",checked:"fyvr12cs"},defaultClass:"fyvr12cn"},polygonDark:{conditions:{base:"fyvr12ct",active:"fyvr12cu",disabled:"fyvr12cv",focus:"fyvr12cw",hover:"fyvr12cx",checked:"fyvr12cy"},defaultClass:"fyvr12ct"},polygonLight:{conditions:{base:"fyvr12cz",active:"fyvr12d0",disabled:"fyvr12d1",focus:"fyvr12d2",hover:"fyvr12d3",checked:"fyvr12d4"},defaultClass:"fyvr12cz"},text100:{conditions:{base:"fyvr12d5",active:"fyvr12d6",disabled:"fyvr12d7",focus:"fyvr12d8",hover:"fyvr12d9",checked:"fyvr12da"},defaultClass:"fyvr12d5"},text80:{conditions:{base:"fyvr12db",active:"fyvr12dc",disabled:"fyvr12dd",focus:"fyvr12de",hover:"fyvr12df",checked:"fyvr12dg"},defaultClass:"fyvr12db"},text50:{conditions:{base:"fyvr12dh",active:"fyvr12di",disabled:"fyvr12dj",focus:"fyvr12dk",hover:"fyvr12dl",checked:"fyvr12dm"},defaultClass:"fyvr12dh"},textInverse100:{conditions:{base:"fyvr12dn",active:"fyvr12do",disabled:"fyvr12dp",focus:"fyvr12dq",hover:"fyvr12dr",checked:"fyvr12ds"},defaultClass:"fyvr12dn"},backgroundPrimary:{conditions:{base:"fyvr12dt",active:"fyvr12du",disabled:"fyvr12dv",focus:"fyvr12dw",hover:"fyvr12dx",checked:"fyvr12dy"},defaultClass:"fyvr12dt"},backgroundSecondary:{conditions:{base:"fyvr12dz",active:"fyvr12e0",disabled:"fyvr12e1",focus:"fyvr12e2",hover:"fyvr12e3",checked:"fyvr12e4"},defaultClass:"fyvr12dz"},backgroundContrast:{conditions:{base:"fyvr12e5",active:"fyvr12e6",disabled:"fyvr12e7",focus:"fyvr12e8",hover:"fyvr12e9",checked:"fyvr12ea"},defaultClass:"fyvr12e5"},backgroundMuted:{conditions:{base:"fyvr12eb",active:"fyvr12ec",disabled:"fyvr12ed",focus:"fyvr12ee",hover:"fyvr12ef",checked:"fyvr12eg"},defaultClass:"fyvr12eb"},backgroundControl:{conditions:{base:"fyvr12eh",active:"fyvr12ei",disabled:"fyvr12ej",focus:"fyvr12ek",hover:"fyvr12el",checked:"fyvr12em"},defaultClass:"fyvr12eh"},backgroundInverse:{conditions:{base:"fyvr12en",active:"fyvr12eo",disabled:"fyvr12ep",focus:"fyvr12eq",hover:"fyvr12er",checked:"fyvr12es"},defaultClass:"fyvr12en"},backgroundBackdrop:{conditions:{base:"fyvr12et",active:"fyvr12eu",disabled:"fyvr12ev",focus:"fyvr12ew",hover:"fyvr12ex",checked:"fyvr12ey"},defaultClass:"fyvr12et"},backgroundOverlay:{conditions:{base:"fyvr12ez",active:"fyvr12f0",disabled:"fyvr12f1",focus:"fyvr12f2",hover:"fyvr12f3",checked:"fyvr12f4"},defaultClass:"fyvr12ez"},backgroundRaised:{conditions:{base:"fyvr12f5",active:"fyvr12f6",disabled:"fyvr12f7",focus:"fyvr12f8",hover:"fyvr12f9",checked:"fyvr12fa"},defaultClass:"fyvr12f5"},buttonGlass:{conditions:{base:"fyvr12fb",active:"fyvr12fc",disabled:"fyvr12fd",focus:"fyvr12fe",hover:"fyvr12ff",checked:"fyvr12fg"},defaultClass:"fyvr12fb"},buttonEmphasis:{conditions:{base:"fyvr12fh",active:"fyvr12fi",disabled:"fyvr12fj",focus:"fyvr12fk",hover:"fyvr12fl",checked:"fyvr12fm"},defaultClass:"fyvr12fh"},buttonInverse:{conditions:{base:"fyvr12fn",active:"fyvr12fo",disabled:"fyvr12fp",focus:"fyvr12fq",hover:"fyvr12fr",checked:"fyvr12fs"},defaultClass:"fyvr12fn"},borderNormal:{conditions:{base:"fyvr12ft",active:"fyvr12fu",disabled:"fyvr12fv",focus:"fyvr12fw",hover:"fyvr12fx",checked:"fyvr12fy"},defaultClass:"fyvr12ft"},borderFocus:{conditions:{base:"fyvr12fz",active:"fyvr12g0",disabled:"fyvr12g1",focus:"fyvr12g2",hover:"fyvr12g3",checked:"fyvr12g4"},defaultClass:"fyvr12fz"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12g5",active:"fyvr12g6",disabled:"fyvr12g7",focus:"fyvr12g8",hover:"fyvr12g9",checked:"fyvr12ga"},defaultClass:"fyvr12g5"},dashed:{conditions:{base:"fyvr12gb",active:"fyvr12gc",disabled:"fyvr12gd",focus:"fyvr12ge",hover:"fyvr12gf",checked:"fyvr12gg"},defaultClass:"fyvr12gb"},dotted:{conditions:{base:"fyvr12gh",active:"fyvr12gi",disabled:"fyvr12gj",focus:"fyvr12gk",hover:"fyvr12gl",checked:"fyvr12gm"},defaultClass:"fyvr12gh"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12gn",active:"fyvr12go",disabled:"fyvr12gp",focus:"fyvr12gq",hover:"fyvr12gr",checked:"fyvr12gs"},defaultClass:"fyvr12gn"},white:{conditions:{base:"fyvr12gt",active:"fyvr12gu",disabled:"fyvr12gv",focus:"fyvr12gw",hover:"fyvr12gx",checked:"fyvr12gy"},defaultClass:"fyvr12gt"},inherit:{conditions:{base:"fyvr12gz",active:"fyvr12h0",disabled:"fyvr12h1",focus:"fyvr12h2",hover:"fyvr12h3",checked:"fyvr12h4"},defaultClass:"fyvr12gz"},transparent:{conditions:{base:"fyvr12h5",active:"fyvr12h6",disabled:"fyvr12h7",focus:"fyvr12h8",hover:"fyvr12h9",checked:"fyvr12ha"},defaultClass:"fyvr12h5"},positive:{conditions:{base:"fyvr12hb",active:"fyvr12hc",disabled:"fyvr12hd",focus:"fyvr12he",hover:"fyvr12hf",checked:"fyvr12hg"},defaultClass:"fyvr12hb"},negative:{conditions:{base:"fyvr12hh",active:"fyvr12hi",disabled:"fyvr12hj",focus:"fyvr12hk",hover:"fyvr12hl",checked:"fyvr12hm"},defaultClass:"fyvr12hh"},info:{conditions:{base:"fyvr12hn",active:"fyvr12ho",disabled:"fyvr12hp",focus:"fyvr12hq",hover:"fyvr12hr",checked:"fyvr12hs"},defaultClass:"fyvr12hn"},warning:{conditions:{base:"fyvr12ht",active:"fyvr12hu",disabled:"fyvr12hv",focus:"fyvr12hw",hover:"fyvr12hx",checked:"fyvr12hy"},defaultClass:"fyvr12ht"},gradientBackdrop:{conditions:{base:"fyvr12hz",active:"fyvr12i0",disabled:"fyvr12i1",focus:"fyvr12i2",hover:"fyvr12i3",checked:"fyvr12i4"},defaultClass:"fyvr12hz"},gradientPrimary:{conditions:{base:"fyvr12i5",active:"fyvr12i6",disabled:"fyvr12i7",focus:"fyvr12i8",hover:"fyvr12i9",checked:"fyvr12ia"},defaultClass:"fyvr12i5"},gradientSecondary:{conditions:{base:"fyvr12ib",active:"fyvr12ic",disabled:"fyvr12id",focus:"fyvr12ie",hover:"fyvr12if",checked:"fyvr12ig"},defaultClass:"fyvr12ib"},arbitrumDark:{conditions:{base:"fyvr12ih",active:"fyvr12ii",disabled:"fyvr12ij",focus:"fyvr12ik",hover:"fyvr12il",checked:"fyvr12im"},defaultClass:"fyvr12ih"},arbitrumLight:{conditions:{base:"fyvr12in",active:"fyvr12io",disabled:"fyvr12ip",focus:"fyvr12iq",hover:"fyvr12ir",checked:"fyvr12is"},defaultClass:"fyvr12in"},avalanceDark:{conditions:{base:"fyvr12it",active:"fyvr12iu",disabled:"fyvr12iv",focus:"fyvr12iw",hover:"fyvr12ix",checked:"fyvr12iy"},defaultClass:"fyvr12it"},avalanceLight:{conditions:{base:"fyvr12iz",active:"fyvr12j0",disabled:"fyvr12j1",focus:"fyvr12j2",hover:"fyvr12j3",checked:"fyvr12j4"},defaultClass:"fyvr12iz"},bscDark:{conditions:{base:"fyvr12j5",active:"fyvr12j6",disabled:"fyvr12j7",focus:"fyvr12j8",hover:"fyvr12j9",checked:"fyvr12ja"},defaultClass:"fyvr12j5"},bscLight:{conditions:{base:"fyvr12jb",active:"fyvr12jc",disabled:"fyvr12jd",focus:"fyvr12je",hover:"fyvr12jf",checked:"fyvr12jg"},defaultClass:"fyvr12jb"},ethereumDark:{conditions:{base:"fyvr12jh",active:"fyvr12ji",disabled:"fyvr12jj",focus:"fyvr12jk",hover:"fyvr12jl",checked:"fyvr12jm"},defaultClass:"fyvr12jh"},ethereumLight:{conditions:{base:"fyvr12jn",active:"fyvr12jo",disabled:"fyvr12jp",focus:"fyvr12jq",hover:"fyvr12jr",checked:"fyvr12js"},defaultClass:"fyvr12jn"},gnosisDark:{conditions:{base:"fyvr12jt",active:"fyvr12ju",disabled:"fyvr12jv",focus:"fyvr12jw",hover:"fyvr12jx",checked:"fyvr12jy"},defaultClass:"fyvr12jt"},gnosisLight:{conditions:{base:"fyvr12jz",active:"fyvr12k0",disabled:"fyvr12k1",focus:"fyvr12k2",hover:"fyvr12k3",checked:"fyvr12k4"},defaultClass:"fyvr12jz"},polygonDark:{conditions:{base:"fyvr12k5",active:"fyvr12k6",disabled:"fyvr12k7",focus:"fyvr12k8",hover:"fyvr12k9",checked:"fyvr12ka"},defaultClass:"fyvr12k5"},polygonLight:{conditions:{base:"fyvr12kb",active:"fyvr12kc",disabled:"fyvr12kd",focus:"fyvr12ke",hover:"fyvr12kf",checked:"fyvr12kg"},defaultClass:"fyvr12kb"},text100:{conditions:{base:"fyvr12kh",active:"fyvr12ki",disabled:"fyvr12kj",focus:"fyvr12kk",hover:"fyvr12kl",checked:"fyvr12km"},defaultClass:"fyvr12kh"},text80:{conditions:{base:"fyvr12kn",active:"fyvr12ko",disabled:"fyvr12kp",focus:"fyvr12kq",hover:"fyvr12kr",checked:"fyvr12ks"},defaultClass:"fyvr12kn"},text50:{conditions:{base:"fyvr12kt",active:"fyvr12ku",disabled:"fyvr12kv",focus:"fyvr12kw",hover:"fyvr12kx",checked:"fyvr12ky"},defaultClass:"fyvr12kt"},textInverse100:{conditions:{base:"fyvr12kz",active:"fyvr12l0",disabled:"fyvr12l1",focus:"fyvr12l2",hover:"fyvr12l3",checked:"fyvr12l4"},defaultClass:"fyvr12kz"},backgroundPrimary:{conditions:{base:"fyvr12l5",active:"fyvr12l6",disabled:"fyvr12l7",focus:"fyvr12l8",hover:"fyvr12l9",checked:"fyvr12la"},defaultClass:"fyvr12l5"},backgroundSecondary:{conditions:{base:"fyvr12lb",active:"fyvr12lc",disabled:"fyvr12ld",focus:"fyvr12le",hover:"fyvr12lf",checked:"fyvr12lg"},defaultClass:"fyvr12lb"},backgroundContrast:{conditions:{base:"fyvr12lh",active:"fyvr12li",disabled:"fyvr12lj",focus:"fyvr12lk",hover:"fyvr12ll",checked:"fyvr12lm"},defaultClass:"fyvr12lh"},backgroundMuted:{conditions:{base:"fyvr12ln",active:"fyvr12lo",disabled:"fyvr12lp",focus:"fyvr12lq",hover:"fyvr12lr",checked:"fyvr12ls"},defaultClass:"fyvr12ln"},backgroundControl:{conditions:{base:"fyvr12lt",active:"fyvr12lu",disabled:"fyvr12lv",focus:"fyvr12lw",hover:"fyvr12lx",checked:"fyvr12ly"},defaultClass:"fyvr12lt"},backgroundInverse:{conditions:{base:"fyvr12lz",active:"fyvr12m0",disabled:"fyvr12m1",focus:"fyvr12m2",hover:"fyvr12m3",checked:"fyvr12m4"},defaultClass:"fyvr12lz"},backgroundBackdrop:{conditions:{base:"fyvr12m5",active:"fyvr12m6",disabled:"fyvr12m7",focus:"fyvr12m8",hover:"fyvr12m9",checked:"fyvr12ma"},defaultClass:"fyvr12m5"},backgroundOverlay:{conditions:{base:"fyvr12mb",active:"fyvr12mc",disabled:"fyvr12md",focus:"fyvr12me",hover:"fyvr12mf",checked:"fyvr12mg"},defaultClass:"fyvr12mb"},backgroundRaised:{conditions:{base:"fyvr12mh",active:"fyvr12mi",disabled:"fyvr12mj",focus:"fyvr12mk",hover:"fyvr12ml",checked:"fyvr12mm"},defaultClass:"fyvr12mh"},buttonGlass:{conditions:{base:"fyvr12mn",active:"fyvr12mo",disabled:"fyvr12mp",focus:"fyvr12mq",hover:"fyvr12mr",checked:"fyvr12ms"},defaultClass:"fyvr12mn"},buttonEmphasis:{conditions:{base:"fyvr12mt",active:"fyvr12mu",disabled:"fyvr12mv",focus:"fyvr12mw",hover:"fyvr12mx",checked:"fyvr12my"},defaultClass:"fyvr12mt"},buttonInverse:{conditions:{base:"fyvr12mz",active:"fyvr12n0",disabled:"fyvr12n1",focus:"fyvr12n2",hover:"fyvr12n3",checked:"fyvr12n4"},defaultClass:"fyvr12mz"},borderNormal:{conditions:{base:"fyvr12n5",active:"fyvr12n6",disabled:"fyvr12n7",focus:"fyvr12n8",hover:"fyvr12n9",checked:"fyvr12na"},defaultClass:"fyvr12n5"},borderFocus:{conditions:{base:"fyvr12nb",active:"fyvr12nc",disabled:"fyvr12nd",focus:"fyvr12ne",hover:"fyvr12nf",checked:"fyvr12ng"},defaultClass:"fyvr12nb"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12nh",active:"fyvr12ni",disabled:"fyvr12nj",focus:"fyvr12nk",hover:"fyvr12nl",checked:"fyvr12nm"},defaultClass:"fyvr12nh"},dashed:{conditions:{base:"fyvr12nn",active:"fyvr12no",disabled:"fyvr12np",focus:"fyvr12nq",hover:"fyvr12nr",checked:"fyvr12ns"},defaultClass:"fyvr12nn"},dotted:{conditions:{base:"fyvr12nt",active:"fyvr12nu",disabled:"fyvr12nv",focus:"fyvr12nw",hover:"fyvr12nx",checked:"fyvr12ny"},defaultClass:"fyvr12nt"}}},color:{values:{black:{conditions:{base:"fyvr12nz",active:"fyvr12o0",disabled:"fyvr12o1",focus:"fyvr12o2",hover:"fyvr12o3",checked:"fyvr12o4"},defaultClass:"fyvr12nz"},white:{conditions:{base:"fyvr12o5",active:"fyvr12o6",disabled:"fyvr12o7",focus:"fyvr12o8",hover:"fyvr12o9",checked:"fyvr12oa"},defaultClass:"fyvr12o5"},inherit:{conditions:{base:"fyvr12ob",active:"fyvr12oc",disabled:"fyvr12od",focus:"fyvr12oe",hover:"fyvr12of",checked:"fyvr12og"},defaultClass:"fyvr12ob"},transparent:{conditions:{base:"fyvr12oh",active:"fyvr12oi",disabled:"fyvr12oj",focus:"fyvr12ok",hover:"fyvr12ol",checked:"fyvr12om"},defaultClass:"fyvr12oh"},positive:{conditions:{base:"fyvr12on",active:"fyvr12oo",disabled:"fyvr12op",focus:"fyvr12oq",hover:"fyvr12or",checked:"fyvr12os"},defaultClass:"fyvr12on"},negative:{conditions:{base:"fyvr12ot",active:"fyvr12ou",disabled:"fyvr12ov",focus:"fyvr12ow",hover:"fyvr12ox",checked:"fyvr12oy"},defaultClass:"fyvr12ot"},info:{conditions:{base:"fyvr12oz",active:"fyvr12p0",disabled:"fyvr12p1",focus:"fyvr12p2",hover:"fyvr12p3",checked:"fyvr12p4"},defaultClass:"fyvr12oz"},warning:{conditions:{base:"fyvr12p5",active:"fyvr12p6",disabled:"fyvr12p7",focus:"fyvr12p8",hover:"fyvr12p9",checked:"fyvr12pa"},defaultClass:"fyvr12p5"},gradientBackdrop:{conditions:{base:"fyvr12pb",active:"fyvr12pc",disabled:"fyvr12pd",focus:"fyvr12pe",hover:"fyvr12pf",checked:"fyvr12pg"},defaultClass:"fyvr12pb"},gradientPrimary:{conditions:{base:"fyvr12ph",active:"fyvr12pi",disabled:"fyvr12pj",focus:"fyvr12pk",hover:"fyvr12pl",checked:"fyvr12pm"},defaultClass:"fyvr12ph"},gradientSecondary:{conditions:{base:"fyvr12pn",active:"fyvr12po",disabled:"fyvr12pp",focus:"fyvr12pq",hover:"fyvr12pr",checked:"fyvr12ps"},defaultClass:"fyvr12pn"},arbitrumDark:{conditions:{base:"fyvr12pt",active:"fyvr12pu",disabled:"fyvr12pv",focus:"fyvr12pw",hover:"fyvr12px",checked:"fyvr12py"},defaultClass:"fyvr12pt"},arbitrumLight:{conditions:{base:"fyvr12pz",active:"fyvr12q0",disabled:"fyvr12q1",focus:"fyvr12q2",hover:"fyvr12q3",checked:"fyvr12q4"},defaultClass:"fyvr12pz"},avalanceDark:{conditions:{base:"fyvr12q5",active:"fyvr12q6",disabled:"fyvr12q7",focus:"fyvr12q8",hover:"fyvr12q9",checked:"fyvr12qa"},defaultClass:"fyvr12q5"},avalanceLight:{conditions:{base:"fyvr12qb",active:"fyvr12qc",disabled:"fyvr12qd",focus:"fyvr12qe",hover:"fyvr12qf",checked:"fyvr12qg"},defaultClass:"fyvr12qb"},bscDark:{conditions:{base:"fyvr12qh",active:"fyvr12qi",disabled:"fyvr12qj",focus:"fyvr12qk",hover:"fyvr12ql",checked:"fyvr12qm"},defaultClass:"fyvr12qh"},bscLight:{conditions:{base:"fyvr12qn",active:"fyvr12qo",disabled:"fyvr12qp",focus:"fyvr12qq",hover:"fyvr12qr",checked:"fyvr12qs"},defaultClass:"fyvr12qn"},ethereumDark:{conditions:{base:"fyvr12qt",active:"fyvr12qu",disabled:"fyvr12qv",focus:"fyvr12qw",hover:"fyvr12qx",checked:"fyvr12qy"},defaultClass:"fyvr12qt"},ethereumLight:{conditions:{base:"fyvr12qz",active:"fyvr12r0",disabled:"fyvr12r1",focus:"fyvr12r2",hover:"fyvr12r3",checked:"fyvr12r4"},defaultClass:"fyvr12qz"},gnosisDark:{conditions:{base:"fyvr12r5",active:"fyvr12r6",disabled:"fyvr12r7",focus:"fyvr12r8",hover:"fyvr12r9",checked:"fyvr12ra"},defaultClass:"fyvr12r5"},gnosisLight:{conditions:{base:"fyvr12rb",active:"fyvr12rc",disabled:"fyvr12rd",focus:"fyvr12re",hover:"fyvr12rf",checked:"fyvr12rg"},defaultClass:"fyvr12rb"},polygonDark:{conditions:{base:"fyvr12rh",active:"fyvr12ri",disabled:"fyvr12rj",focus:"fyvr12rk",hover:"fyvr12rl",checked:"fyvr12rm"},defaultClass:"fyvr12rh"},polygonLight:{conditions:{base:"fyvr12rn",active:"fyvr12ro",disabled:"fyvr12rp",focus:"fyvr12rq",hover:"fyvr12rr",checked:"fyvr12rs"},defaultClass:"fyvr12rn"},text100:{conditions:{base:"fyvr12rt",active:"fyvr12ru",disabled:"fyvr12rv",focus:"fyvr12rw",hover:"fyvr12rx",checked:"fyvr12ry"},defaultClass:"fyvr12rt"},text80:{conditions:{base:"fyvr12rz",active:"fyvr12s0",disabled:"fyvr12s1",focus:"fyvr12s2",hover:"fyvr12s3",checked:"fyvr12s4"},defaultClass:"fyvr12rz"},text50:{conditions:{base:"fyvr12s5",active:"fyvr12s6",disabled:"fyvr12s7",focus:"fyvr12s8",hover:"fyvr12s9",checked:"fyvr12sa"},defaultClass:"fyvr12s5"},textInverse100:{conditions:{base:"fyvr12sb",active:"fyvr12sc",disabled:"fyvr12sd",focus:"fyvr12se",hover:"fyvr12sf",checked:"fyvr12sg"},defaultClass:"fyvr12sb"},backgroundPrimary:{conditions:{base:"fyvr12sh",active:"fyvr12si",disabled:"fyvr12sj",focus:"fyvr12sk",hover:"fyvr12sl",checked:"fyvr12sm"},defaultClass:"fyvr12sh"},backgroundSecondary:{conditions:{base:"fyvr12sn",active:"fyvr12so",disabled:"fyvr12sp",focus:"fyvr12sq",hover:"fyvr12sr",checked:"fyvr12ss"},defaultClass:"fyvr12sn"},backgroundContrast:{conditions:{base:"fyvr12st",active:"fyvr12su",disabled:"fyvr12sv",focus:"fyvr12sw",hover:"fyvr12sx",checked:"fyvr12sy"},defaultClass:"fyvr12st"},backgroundMuted:{conditions:{base:"fyvr12sz",active:"fyvr12t0",disabled:"fyvr12t1",focus:"fyvr12t2",hover:"fyvr12t3",checked:"fyvr12t4"},defaultClass:"fyvr12sz"},backgroundControl:{conditions:{base:"fyvr12t5",active:"fyvr12t6",disabled:"fyvr12t7",focus:"fyvr12t8",hover:"fyvr12t9",checked:"fyvr12ta"},defaultClass:"fyvr12t5"},backgroundInverse:{conditions:{base:"fyvr12tb",active:"fyvr12tc",disabled:"fyvr12td",focus:"fyvr12te",hover:"fyvr12tf",checked:"fyvr12tg"},defaultClass:"fyvr12tb"},backgroundBackdrop:{conditions:{base:"fyvr12th",active:"fyvr12ti",disabled:"fyvr12tj",focus:"fyvr12tk",hover:"fyvr12tl",checked:"fyvr12tm"},defaultClass:"fyvr12th"},backgroundOverlay:{conditions:{base:"fyvr12tn",active:"fyvr12to",disabled:"fyvr12tp",focus:"fyvr12tq",hover:"fyvr12tr",checked:"fyvr12ts"},defaultClass:"fyvr12tn"},backgroundRaised:{conditions:{base:"fyvr12tt",active:"fyvr12tu",disabled:"fyvr12tv",focus:"fyvr12tw",hover:"fyvr12tx",checked:"fyvr12ty"},defaultClass:"fyvr12tt"},buttonGlass:{conditions:{base:"fyvr12tz",active:"fyvr12u0",disabled:"fyvr12u1",focus:"fyvr12u2",hover:"fyvr12u3",checked:"fyvr12u4"},defaultClass:"fyvr12tz"},buttonEmphasis:{conditions:{base:"fyvr12u5",active:"fyvr12u6",disabled:"fyvr12u7",focus:"fyvr12u8",hover:"fyvr12u9",checked:"fyvr12ua"},defaultClass:"fyvr12u5"},buttonInverse:{conditions:{base:"fyvr12ub",active:"fyvr12uc",disabled:"fyvr12ud",focus:"fyvr12ue",hover:"fyvr12uf",checked:"fyvr12ug"},defaultClass:"fyvr12ub"},borderNormal:{conditions:{base:"fyvr12uh",active:"fyvr12ui",disabled:"fyvr12uj",focus:"fyvr12uk",hover:"fyvr12ul",checked:"fyvr12um"},defaultClass:"fyvr12uh"},borderFocus:{conditions:{base:"fyvr12un",active:"fyvr12uo",disabled:"fyvr12up",focus:"fyvr12uq",hover:"fyvr12ur",checked:"fyvr12us"},defaultClass:"fyvr12un"}}},cursor:{values:{default:{conditions:{base:"fyvr12ut",active:"fyvr12uu",disabled:"fyvr12uv",focus:"fyvr12uw",hover:"fyvr12ux",checked:"fyvr12uy"},defaultClass:"fyvr12ut"},pointer:{conditions:{base:"fyvr12uz",active:"fyvr12v0",disabled:"fyvr12v1",focus:"fyvr12v2",hover:"fyvr12v3",checked:"fyvr12v4"},defaultClass:"fyvr12uz"},text:{conditions:{base:"fyvr12v5",active:"fyvr12v6",disabled:"fyvr12v7",focus:"fyvr12v8",hover:"fyvr12v9",checked:"fyvr12va"},defaultClass:"fyvr12v5"}}},opacity:{values:{0:{conditions:{base:"fyvr12vb",active:"fyvr12vc",disabled:"fyvr12vd",focus:"fyvr12ve",hover:"fyvr12vf",checked:"fyvr12vg"},defaultClass:"fyvr12vb"},50:{conditions:{base:"fyvr12vh",active:"fyvr12vi",disabled:"fyvr12vj",focus:"fyvr12vk",hover:"fyvr12vl",checked:"fyvr12vm"},defaultClass:"fyvr12vh"},80:{conditions:{base:"fyvr12vn",active:"fyvr12vo",disabled:"fyvr12vp",focus:"fyvr12vq",hover:"fyvr12vr",checked:"fyvr12vs"},defaultClass:"fyvr12vn"},100:{conditions:{base:"fyvr12vt",active:"fyvr12vu",disabled:"fyvr12vv",focus:"fyvr12vw",hover:"fyvr12vx",checked:"fyvr12vy"},defaultClass:"fyvr12vt"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr12vz",active:"fyvr12w0",disabled:"fyvr12w1",focus:"fyvr12w2",hover:"fyvr12w3",checked:"fyvr12w4"},defaultClass:"fyvr12vz"},auto:{conditions:{base:"fyvr12w5",active:"fyvr12w6",disabled:"fyvr12w7",focus:"fyvr12w8",hover:"fyvr12w9",checked:"fyvr12wa"},defaultClass:"fyvr12w5"}}},outline:{values:{none:{conditions:{base:"fyvr12wb",active:"fyvr12wc",disabled:"fyvr12wd",focus:"fyvr12we",hover:"fyvr12wf",checked:"fyvr12wg"},defaultClass:"fyvr12wb"}}},boxShadow:{values:{none:{conditions:{base:"fyvr12wh",active:"fyvr12wi",disabled:"fyvr12wj",focus:"fyvr12wk",hover:"fyvr12wl",checked:"fyvr12wm"},defaultClass:"fyvr12wh"}}}}});const wR=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],qy=t=>(t.display||(t.display=Object.keys(t).some(e=>wR.includes(e))?"flex":void 0),z8(t));qy.properties=z8.properties;function U8(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e{const{as:r="div",sx:n={},className:i,...s}=t,o={},a={};for(const c in s)qy.properties.has(c)?o[c]=s[c]:a[c]=s[c];const l=qy({...o,...n});return E.createElement(r,{className:an(l,i),...a,ref:e})});var V8={exports:{}},wc={};/** + )`,gradientPrimary:"linear-gradient(89.69deg, #4411E1 0.27%, #7537F9 99.73%)",gradientSecondary:"linear-gradient(32.51deg, #951990 -15.23%, #3A35B1 48.55%, #20A8B0 100%)",arbitrumDark:"#212D44",arbitrumLight:"#93D4FF",avalanceDark:"#810C0C",avalanceLight:"#FF8080",bscDark:"#584508",bscLight:"#FCCF43",ethereumDark:"#132362",ethereumLight:"#AABBFF",gnosisDark:"#084246",gnosisLight:"#8CF6FD",polygonDark:"#350881",polygonLight:"#C7A6FF"},oM={...$8,text100:"rgba(255, 255, 255, 1)",text80:"rgba(255, 255, 255, 0.8)",text50:"rgba(255, 255, 255, 0.5)",textInverse100:"rgba(0, 0, 0, 1)",backgroundPrimary:"rgba(0, 0, 0, 1)",backgroundSecondary:"rgba(255, 255, 255, 0.1)",backgroundContrast:"rgba(0, 0, 0, 0.5)",backgroundMuted:"rgba(255, 255, 255, 0.05)",backgroundControl:"rgba(255, 255, 255, 0.25)",backgroundInverse:"rgba(255, 255, 255, 1)",backgroundBackdrop:"rgba(34, 34, 34, 0.9)",backgroundOverlay:"rgba(0, 0, 0, 0.7)",backgroundRaised:"rgba(54, 54, 54, 0.7)",buttonGlass:"rgba(255, 255, 255, 0.15)",buttonEmphasis:"rgba(0, 0, 0, 0.5)",buttonInverse:"rgba(255, 255, 255, 0.8)",borderNormal:"rgba(255, 255, 255, 0.25)",borderFocus:"rgba(255, 255, 255, 0.5)"},aM={...$8,text100:"rgba(0, 0, 0, 1)",text80:"rgba(0, 0, 0, 0.8)",text50:"rgba(0, 0, 0, 0.5)",textInverse100:"rgba(255, 255, 255, 1)",backgroundPrimary:"rgba(244, 244, 244, 1)",backgroundSecondary:"rgba(0, 0, 0, 0.1)",backgroundContrast:"rgba(244, 244, 244, 0.5)",backgroundMuted:"rgba(0, 0, 0, 0.05)",backgroundControl:"rgba(0, 0, 0, 0.25)",backgroundInverse:"rgba(0, 0, 0, 1)",backgroundBackdrop:"rgba(221, 221, 221, 0.9)",backgroundOverlay:"rgba(244, 244, 244, 0.7)",backgroundRaised:"rgba(192, 192, 192, 0.7)",buttonGlass:"rgba(0, 0, 0, 0.15)",buttonEmphasis:"rgba(255, 255, 255, 0.5)",buttonInverse:"rgba(0, 0, 0, 0.8)",borderNormal:"rgba(0, 0, 0, 0.25)",borderFocus:"rgba(0, 0, 0, 0.5)"},lM={dark:oM,light:aM},cM={inherit:{fontFamily:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit",fontWeight:"inherit"},xlarge:{fontFamily:"body",fontSize:"xlarge",lineHeight:"9",letterSpacing:"none",fontWeight:"bold"},large:{fontFamily:"body",fontSize:"large",lineHeight:"7",letterSpacing:"normal",fontWeight:"semibold"},medium:{fontFamily:"body",fontSize:"medium",lineHeight:"6",letterSpacing:"normal",fontWeight:"bold"},normal:{fontFamily:"body",fontSize:"normal",lineHeight:"5",letterSpacing:"wide",fontWeight:"normal"},small:{fontFamily:"body",fontSize:"small",lineHeight:"4",letterSpacing:"wide",fontWeight:"medium"},xsmall:{fontFamily:"body",fontSize:"xsmall",lineHeight:"4",letterSpacing:"wide",fontWeight:"bold"},code:{fontFamily:"mono",fontSize:"normal",lineHeight:"5",letterSpacing:"none",fontWeight:"normal"}};var Q2={colors:{black:"var(--colors-black)",white:"var(--colors-white)",inherit:"var(--colors-inherit)",transparent:"var(--colors-transparent)",positive:"var(--colors-positive)",negative:"var(--colors-negative)",info:"var(--colors-info)",warning:"var(--colors-warning)",gradientBackdrop:"var(--colors-gradient-backdrop)",gradientPrimary:"var(--colors-gradient-primary)",gradientSecondary:"var(--colors-gradient-secondary)",arbitrumDark:"var(--colors-arbitrum-dark)",arbitrumLight:"var(--colors-arbitrum-light)",avalanceDark:"var(--colors-avalance-dark)",avalanceLight:"var(--colors-avalance-light)",bscDark:"var(--colors-bsc-dark)",bscLight:"var(--colors-bsc-light)",ethereumDark:"var(--colors-ethereum-dark)",ethereumLight:"var(--colors-ethereum-light)",gnosisDark:"var(--colors-gnosis-dark)",gnosisLight:"var(--colors-gnosis-light)",polygonDark:"var(--colors-polygon-dark)",polygonLight:"var(--colors-polygon-light)",text100:"var(--colors-text100)",text80:"var(--colors-text80)",text50:"var(--colors-text50)",textInverse100:"var(--colors-text-inverse100)",backgroundPrimary:"var(--colors-background-primary)",backgroundSecondary:"var(--colors-background-secondary)",backgroundContrast:"var(--colors-background-contrast)",backgroundMuted:"var(--colors-background-muted)",backgroundControl:"var(--colors-background-control)",backgroundInverse:"var(--colors-background-inverse)",backgroundBackdrop:"var(--colors-background-backdrop)",backgroundOverlay:"var(--colors-background-overlay)",backgroundRaised:"var(--colors-background-raised)",buttonGlass:"var(--colors-button-glass)",buttonEmphasis:"var(--colors-button-emphasis)",buttonInverse:"var(--colors-button-inverse)",borderNormal:"var(--colors-border-normal)",borderFocus:"var(--colors-border-focus)"}};function fM(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function uM(t){var e=fM(t,"string");return typeof e=="symbol"?e:String(e)}function dM(t,e,r){return e=uM(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function X2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function iv(t){for(var e=1;efunction(){for(var e=arguments.length,r=new Array(e),n=0;nl.styles)),s=Object.keys(i),o=s.filter(l=>"mappings"in i[l]),a=l=>{var c=[],f={},u=iv({},l),h=!1;for(var y of o){var m=l[y];if(m!=null){var p=i[y];h=!0;for(var k of p.mappings)f[k]=m,u[k]==null&&delete u[k]}}var w=h?iv(iv({},f),u):l,E=function(){var B=w[A],U=i[A];try{if(U.mappings)return"continue";if(typeof B=="string"||typeof B=="number")c.push(U.values[B].defaultClass);else if(Array.isArray(B))for(var j=0;jt,yM=function(){return hM(vM)(...arguments)},D8=yM({conditions:{defaultCondition:"sm",conditionNames:["sm","md","lg","xl"],responsiveArray:void 0},styles:{borderWidth:{mappings:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"]},borderRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderLeftRadius:{mappings:["borderBottomLeftRadius","borderTopLeftRadius"]},borderRightRadius:{mappings:["borderBottomRightRadius","borderTopRightRadius"]},borderTopRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius"]},borderBottomRadius:{mappings:["borderBottomLeftRadius","borderBottomRightRadius"]},margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},overflow:{mappings:["overflowX","overflowY"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},placeItems:{mappings:["justifyContent","alignItems"]},inset:{mappings:["top","bottom","left","right"]},width:{values:{0:{conditions:{sm:"fyvr10",md:"fyvr11",lg:"fyvr12",xl:"fyvr13"},defaultClass:"fyvr10"},1:{conditions:{sm:"fyvr14",md:"fyvr15",lg:"fyvr16",xl:"fyvr17"},defaultClass:"fyvr14"},2:{conditions:{sm:"fyvr18",md:"fyvr19",lg:"fyvr1a",xl:"fyvr1b"},defaultClass:"fyvr18"},3:{conditions:{sm:"fyvr1c",md:"fyvr1d",lg:"fyvr1e",xl:"fyvr1f"},defaultClass:"fyvr1c"},4:{conditions:{sm:"fyvr1g",md:"fyvr1h",lg:"fyvr1i",xl:"fyvr1j"},defaultClass:"fyvr1g"},5:{conditions:{sm:"fyvr1k",md:"fyvr1l",lg:"fyvr1m",xl:"fyvr1n"},defaultClass:"fyvr1k"},6:{conditions:{sm:"fyvr1o",md:"fyvr1p",lg:"fyvr1q",xl:"fyvr1r"},defaultClass:"fyvr1o"},7:{conditions:{sm:"fyvr1s",md:"fyvr1t",lg:"fyvr1u",xl:"fyvr1v"},defaultClass:"fyvr1s"},8:{conditions:{sm:"fyvr1w",md:"fyvr1x",lg:"fyvr1y",xl:"fyvr1z"},defaultClass:"fyvr1w"},9:{conditions:{sm:"fyvr110",md:"fyvr111",lg:"fyvr112",xl:"fyvr113"},defaultClass:"fyvr110"},10:{conditions:{sm:"fyvr114",md:"fyvr115",lg:"fyvr116",xl:"fyvr117"},defaultClass:"fyvr114"},12:{conditions:{sm:"fyvr118",md:"fyvr119",lg:"fyvr11a",xl:"fyvr11b"},defaultClass:"fyvr118"},14:{conditions:{sm:"fyvr11c",md:"fyvr11d",lg:"fyvr11e",xl:"fyvr11f"},defaultClass:"fyvr11c"},16:{conditions:{sm:"fyvr11g",md:"fyvr11h",lg:"fyvr11i",xl:"fyvr11j"},defaultClass:"fyvr11g"},"0.25":{conditions:{sm:"fyvr11k",md:"fyvr11l",lg:"fyvr11m",xl:"fyvr11n"},defaultClass:"fyvr11k"},"0.5":{conditions:{sm:"fyvr11o",md:"fyvr11p",lg:"fyvr11q",xl:"fyvr11r"},defaultClass:"fyvr11o"},"1.5":{conditions:{sm:"fyvr11s",md:"fyvr11t",lg:"fyvr11u",xl:"fyvr11v"},defaultClass:"fyvr11s"},none:{conditions:{sm:"fyvr11w",md:"fyvr11x",lg:"fyvr11y",xl:"fyvr11z"},defaultClass:"fyvr11w"},px:{conditions:{sm:"fyvr120",md:"fyvr121",lg:"fyvr122",xl:"fyvr123"},defaultClass:"fyvr120"},auto:{conditions:{sm:"fyvr124",md:"fyvr125",lg:"fyvr126",xl:"fyvr127"},defaultClass:"fyvr124"},full:{conditions:{sm:"fyvr128",md:"fyvr129",lg:"fyvr12a",xl:"fyvr12b"},defaultClass:"fyvr128"},"1/2":{conditions:{sm:"fyvr12c",md:"fyvr12d",lg:"fyvr12e",xl:"fyvr12f"},defaultClass:"fyvr12c"},"1/3":{conditions:{sm:"fyvr12g",md:"fyvr12h",lg:"fyvr12i",xl:"fyvr12j"},defaultClass:"fyvr12g"},"2/3":{conditions:{sm:"fyvr12k",md:"fyvr12l",lg:"fyvr12m",xl:"fyvr12n"},defaultClass:"fyvr12k"},"1/4":{conditions:{sm:"fyvr12o",md:"fyvr12p",lg:"fyvr12q",xl:"fyvr12r"},defaultClass:"fyvr12o"},"3/4":{conditions:{sm:"fyvr12s",md:"fyvr12t",lg:"fyvr12u",xl:"fyvr12v"},defaultClass:"fyvr12s"},fit:{conditions:{sm:"fyvr12w",md:"fyvr12x",lg:"fyvr12y",xl:"fyvr12z"},defaultClass:"fyvr12w"},max:{conditions:{sm:"fyvr130",md:"fyvr131",lg:"fyvr132",xl:"fyvr133"},defaultClass:"fyvr130"},min:{conditions:{sm:"fyvr134",md:"fyvr135",lg:"fyvr136",xl:"fyvr137"},defaultClass:"fyvr134"},vw:{conditions:{sm:"fyvr138",md:"fyvr139",lg:"fyvr13a",xl:"fyvr13b"},defaultClass:"fyvr138"},vh:{conditions:{sm:"fyvr13c",md:"fyvr13d",lg:"fyvr13e",xl:"fyvr13f"},defaultClass:"fyvr13c"}}},height:{values:{0:{conditions:{sm:"fyvr13g",md:"fyvr13h",lg:"fyvr13i",xl:"fyvr13j"},defaultClass:"fyvr13g"},1:{conditions:{sm:"fyvr13k",md:"fyvr13l",lg:"fyvr13m",xl:"fyvr13n"},defaultClass:"fyvr13k"},2:{conditions:{sm:"fyvr13o",md:"fyvr13p",lg:"fyvr13q",xl:"fyvr13r"},defaultClass:"fyvr13o"},3:{conditions:{sm:"fyvr13s",md:"fyvr13t",lg:"fyvr13u",xl:"fyvr13v"},defaultClass:"fyvr13s"},4:{conditions:{sm:"fyvr13w",md:"fyvr13x",lg:"fyvr13y",xl:"fyvr13z"},defaultClass:"fyvr13w"},5:{conditions:{sm:"fyvr140",md:"fyvr141",lg:"fyvr142",xl:"fyvr143"},defaultClass:"fyvr140"},6:{conditions:{sm:"fyvr144",md:"fyvr145",lg:"fyvr146",xl:"fyvr147"},defaultClass:"fyvr144"},7:{conditions:{sm:"fyvr148",md:"fyvr149",lg:"fyvr14a",xl:"fyvr14b"},defaultClass:"fyvr148"},8:{conditions:{sm:"fyvr14c",md:"fyvr14d",lg:"fyvr14e",xl:"fyvr14f"},defaultClass:"fyvr14c"},9:{conditions:{sm:"fyvr14g",md:"fyvr14h",lg:"fyvr14i",xl:"fyvr14j"},defaultClass:"fyvr14g"},10:{conditions:{sm:"fyvr14k",md:"fyvr14l",lg:"fyvr14m",xl:"fyvr14n"},defaultClass:"fyvr14k"},12:{conditions:{sm:"fyvr14o",md:"fyvr14p",lg:"fyvr14q",xl:"fyvr14r"},defaultClass:"fyvr14o"},14:{conditions:{sm:"fyvr14s",md:"fyvr14t",lg:"fyvr14u",xl:"fyvr14v"},defaultClass:"fyvr14s"},16:{conditions:{sm:"fyvr14w",md:"fyvr14x",lg:"fyvr14y",xl:"fyvr14z"},defaultClass:"fyvr14w"},"0.25":{conditions:{sm:"fyvr150",md:"fyvr151",lg:"fyvr152",xl:"fyvr153"},defaultClass:"fyvr150"},"0.5":{conditions:{sm:"fyvr154",md:"fyvr155",lg:"fyvr156",xl:"fyvr157"},defaultClass:"fyvr154"},"1.5":{conditions:{sm:"fyvr158",md:"fyvr159",lg:"fyvr15a",xl:"fyvr15b"},defaultClass:"fyvr158"},none:{conditions:{sm:"fyvr15c",md:"fyvr15d",lg:"fyvr15e",xl:"fyvr15f"},defaultClass:"fyvr15c"},px:{conditions:{sm:"fyvr15g",md:"fyvr15h",lg:"fyvr15i",xl:"fyvr15j"},defaultClass:"fyvr15g"},auto:{conditions:{sm:"fyvr15k",md:"fyvr15l",lg:"fyvr15m",xl:"fyvr15n"},defaultClass:"fyvr15k"},full:{conditions:{sm:"fyvr15o",md:"fyvr15p",lg:"fyvr15q",xl:"fyvr15r"},defaultClass:"fyvr15o"},"1/2":{conditions:{sm:"fyvr15s",md:"fyvr15t",lg:"fyvr15u",xl:"fyvr15v"},defaultClass:"fyvr15s"},"1/3":{conditions:{sm:"fyvr15w",md:"fyvr15x",lg:"fyvr15y",xl:"fyvr15z"},defaultClass:"fyvr15w"},"2/3":{conditions:{sm:"fyvr160",md:"fyvr161",lg:"fyvr162",xl:"fyvr163"},defaultClass:"fyvr160"},"1/4":{conditions:{sm:"fyvr164",md:"fyvr165",lg:"fyvr166",xl:"fyvr167"},defaultClass:"fyvr164"},"3/4":{conditions:{sm:"fyvr168",md:"fyvr169",lg:"fyvr16a",xl:"fyvr16b"},defaultClass:"fyvr168"},fit:{conditions:{sm:"fyvr16c",md:"fyvr16d",lg:"fyvr16e",xl:"fyvr16f"},defaultClass:"fyvr16c"},max:{conditions:{sm:"fyvr16g",md:"fyvr16h",lg:"fyvr16i",xl:"fyvr16j"},defaultClass:"fyvr16g"},min:{conditions:{sm:"fyvr16k",md:"fyvr16l",lg:"fyvr16m",xl:"fyvr16n"},defaultClass:"fyvr16k"},vw:{conditions:{sm:"fyvr16o",md:"fyvr16p",lg:"fyvr16q",xl:"fyvr16r"},defaultClass:"fyvr16o"},vh:{conditions:{sm:"fyvr16s",md:"fyvr16t",lg:"fyvr16u",xl:"fyvr16v"},defaultClass:"fyvr16s"}}},maxWidth:{values:{0:{conditions:{sm:"fyvr16w",md:"fyvr16x",lg:"fyvr16y",xl:"fyvr16z"},defaultClass:"fyvr16w"},1:{conditions:{sm:"fyvr170",md:"fyvr171",lg:"fyvr172",xl:"fyvr173"},defaultClass:"fyvr170"},2:{conditions:{sm:"fyvr174",md:"fyvr175",lg:"fyvr176",xl:"fyvr177"},defaultClass:"fyvr174"},3:{conditions:{sm:"fyvr178",md:"fyvr179",lg:"fyvr17a",xl:"fyvr17b"},defaultClass:"fyvr178"},4:{conditions:{sm:"fyvr17c",md:"fyvr17d",lg:"fyvr17e",xl:"fyvr17f"},defaultClass:"fyvr17c"},5:{conditions:{sm:"fyvr17g",md:"fyvr17h",lg:"fyvr17i",xl:"fyvr17j"},defaultClass:"fyvr17g"},6:{conditions:{sm:"fyvr17k",md:"fyvr17l",lg:"fyvr17m",xl:"fyvr17n"},defaultClass:"fyvr17k"},7:{conditions:{sm:"fyvr17o",md:"fyvr17p",lg:"fyvr17q",xl:"fyvr17r"},defaultClass:"fyvr17o"},8:{conditions:{sm:"fyvr17s",md:"fyvr17t",lg:"fyvr17u",xl:"fyvr17v"},defaultClass:"fyvr17s"},9:{conditions:{sm:"fyvr17w",md:"fyvr17x",lg:"fyvr17y",xl:"fyvr17z"},defaultClass:"fyvr17w"},10:{conditions:{sm:"fyvr180",md:"fyvr181",lg:"fyvr182",xl:"fyvr183"},defaultClass:"fyvr180"},12:{conditions:{sm:"fyvr184",md:"fyvr185",lg:"fyvr186",xl:"fyvr187"},defaultClass:"fyvr184"},14:{conditions:{sm:"fyvr188",md:"fyvr189",lg:"fyvr18a",xl:"fyvr18b"},defaultClass:"fyvr188"},16:{conditions:{sm:"fyvr18c",md:"fyvr18d",lg:"fyvr18e",xl:"fyvr18f"},defaultClass:"fyvr18c"},"0.25":{conditions:{sm:"fyvr18g",md:"fyvr18h",lg:"fyvr18i",xl:"fyvr18j"},defaultClass:"fyvr18g"},"0.5":{conditions:{sm:"fyvr18k",md:"fyvr18l",lg:"fyvr18m",xl:"fyvr18n"},defaultClass:"fyvr18k"},"1.5":{conditions:{sm:"fyvr18o",md:"fyvr18p",lg:"fyvr18q",xl:"fyvr18r"},defaultClass:"fyvr18o"},none:{conditions:{sm:"fyvr18s",md:"fyvr18t",lg:"fyvr18u",xl:"fyvr18v"},defaultClass:"fyvr18s"},px:{conditions:{sm:"fyvr18w",md:"fyvr18x",lg:"fyvr18y",xl:"fyvr18z"},defaultClass:"fyvr18w"},auto:{conditions:{sm:"fyvr190",md:"fyvr191",lg:"fyvr192",xl:"fyvr193"},defaultClass:"fyvr190"},full:{conditions:{sm:"fyvr194",md:"fyvr195",lg:"fyvr196",xl:"fyvr197"},defaultClass:"fyvr194"},"1/2":{conditions:{sm:"fyvr198",md:"fyvr199",lg:"fyvr19a",xl:"fyvr19b"},defaultClass:"fyvr198"},"1/3":{conditions:{sm:"fyvr19c",md:"fyvr19d",lg:"fyvr19e",xl:"fyvr19f"},defaultClass:"fyvr19c"},"2/3":{conditions:{sm:"fyvr19g",md:"fyvr19h",lg:"fyvr19i",xl:"fyvr19j"},defaultClass:"fyvr19g"},"1/4":{conditions:{sm:"fyvr19k",md:"fyvr19l",lg:"fyvr19m",xl:"fyvr19n"},defaultClass:"fyvr19k"},"3/4":{conditions:{sm:"fyvr19o",md:"fyvr19p",lg:"fyvr19q",xl:"fyvr19r"},defaultClass:"fyvr19o"},fit:{conditions:{sm:"fyvr19s",md:"fyvr19t",lg:"fyvr19u",xl:"fyvr19v"},defaultClass:"fyvr19s"},max:{conditions:{sm:"fyvr19w",md:"fyvr19x",lg:"fyvr19y",xl:"fyvr19z"},defaultClass:"fyvr19w"},min:{conditions:{sm:"fyvr1a0",md:"fyvr1a1",lg:"fyvr1a2",xl:"fyvr1a3"},defaultClass:"fyvr1a0"},vw:{conditions:{sm:"fyvr1a4",md:"fyvr1a5",lg:"fyvr1a6",xl:"fyvr1a7"},defaultClass:"fyvr1a4"},vh:{conditions:{sm:"fyvr1a8",md:"fyvr1a9",lg:"fyvr1aa",xl:"fyvr1ab"},defaultClass:"fyvr1a8"}}},maxHeight:{values:{0:{conditions:{sm:"fyvr1ac",md:"fyvr1ad",lg:"fyvr1ae",xl:"fyvr1af"},defaultClass:"fyvr1ac"},1:{conditions:{sm:"fyvr1ag",md:"fyvr1ah",lg:"fyvr1ai",xl:"fyvr1aj"},defaultClass:"fyvr1ag"},2:{conditions:{sm:"fyvr1ak",md:"fyvr1al",lg:"fyvr1am",xl:"fyvr1an"},defaultClass:"fyvr1ak"},3:{conditions:{sm:"fyvr1ao",md:"fyvr1ap",lg:"fyvr1aq",xl:"fyvr1ar"},defaultClass:"fyvr1ao"},4:{conditions:{sm:"fyvr1as",md:"fyvr1at",lg:"fyvr1au",xl:"fyvr1av"},defaultClass:"fyvr1as"},5:{conditions:{sm:"fyvr1aw",md:"fyvr1ax",lg:"fyvr1ay",xl:"fyvr1az"},defaultClass:"fyvr1aw"},6:{conditions:{sm:"fyvr1b0",md:"fyvr1b1",lg:"fyvr1b2",xl:"fyvr1b3"},defaultClass:"fyvr1b0"},7:{conditions:{sm:"fyvr1b4",md:"fyvr1b5",lg:"fyvr1b6",xl:"fyvr1b7"},defaultClass:"fyvr1b4"},8:{conditions:{sm:"fyvr1b8",md:"fyvr1b9",lg:"fyvr1ba",xl:"fyvr1bb"},defaultClass:"fyvr1b8"},9:{conditions:{sm:"fyvr1bc",md:"fyvr1bd",lg:"fyvr1be",xl:"fyvr1bf"},defaultClass:"fyvr1bc"},10:{conditions:{sm:"fyvr1bg",md:"fyvr1bh",lg:"fyvr1bi",xl:"fyvr1bj"},defaultClass:"fyvr1bg"},12:{conditions:{sm:"fyvr1bk",md:"fyvr1bl",lg:"fyvr1bm",xl:"fyvr1bn"},defaultClass:"fyvr1bk"},14:{conditions:{sm:"fyvr1bo",md:"fyvr1bp",lg:"fyvr1bq",xl:"fyvr1br"},defaultClass:"fyvr1bo"},16:{conditions:{sm:"fyvr1bs",md:"fyvr1bt",lg:"fyvr1bu",xl:"fyvr1bv"},defaultClass:"fyvr1bs"},"0.25":{conditions:{sm:"fyvr1bw",md:"fyvr1bx",lg:"fyvr1by",xl:"fyvr1bz"},defaultClass:"fyvr1bw"},"0.5":{conditions:{sm:"fyvr1c0",md:"fyvr1c1",lg:"fyvr1c2",xl:"fyvr1c3"},defaultClass:"fyvr1c0"},"1.5":{conditions:{sm:"fyvr1c4",md:"fyvr1c5",lg:"fyvr1c6",xl:"fyvr1c7"},defaultClass:"fyvr1c4"},none:{conditions:{sm:"fyvr1c8",md:"fyvr1c9",lg:"fyvr1ca",xl:"fyvr1cb"},defaultClass:"fyvr1c8"},px:{conditions:{sm:"fyvr1cc",md:"fyvr1cd",lg:"fyvr1ce",xl:"fyvr1cf"},defaultClass:"fyvr1cc"},auto:{conditions:{sm:"fyvr1cg",md:"fyvr1ch",lg:"fyvr1ci",xl:"fyvr1cj"},defaultClass:"fyvr1cg"},full:{conditions:{sm:"fyvr1ck",md:"fyvr1cl",lg:"fyvr1cm",xl:"fyvr1cn"},defaultClass:"fyvr1ck"},"1/2":{conditions:{sm:"fyvr1co",md:"fyvr1cp",lg:"fyvr1cq",xl:"fyvr1cr"},defaultClass:"fyvr1co"},"1/3":{conditions:{sm:"fyvr1cs",md:"fyvr1ct",lg:"fyvr1cu",xl:"fyvr1cv"},defaultClass:"fyvr1cs"},"2/3":{conditions:{sm:"fyvr1cw",md:"fyvr1cx",lg:"fyvr1cy",xl:"fyvr1cz"},defaultClass:"fyvr1cw"},"1/4":{conditions:{sm:"fyvr1d0",md:"fyvr1d1",lg:"fyvr1d2",xl:"fyvr1d3"},defaultClass:"fyvr1d0"},"3/4":{conditions:{sm:"fyvr1d4",md:"fyvr1d5",lg:"fyvr1d6",xl:"fyvr1d7"},defaultClass:"fyvr1d4"},fit:{conditions:{sm:"fyvr1d8",md:"fyvr1d9",lg:"fyvr1da",xl:"fyvr1db"},defaultClass:"fyvr1d8"},max:{conditions:{sm:"fyvr1dc",md:"fyvr1dd",lg:"fyvr1de",xl:"fyvr1df"},defaultClass:"fyvr1dc"},min:{conditions:{sm:"fyvr1dg",md:"fyvr1dh",lg:"fyvr1di",xl:"fyvr1dj"},defaultClass:"fyvr1dg"},vw:{conditions:{sm:"fyvr1dk",md:"fyvr1dl",lg:"fyvr1dm",xl:"fyvr1dn"},defaultClass:"fyvr1dk"},vh:{conditions:{sm:"fyvr1do",md:"fyvr1dp",lg:"fyvr1dq",xl:"fyvr1dr"},defaultClass:"fyvr1do"}}},minWidth:{values:{0:{conditions:{sm:"fyvr1ds",md:"fyvr1dt",lg:"fyvr1du",xl:"fyvr1dv"},defaultClass:"fyvr1ds"},1:{conditions:{sm:"fyvr1dw",md:"fyvr1dx",lg:"fyvr1dy",xl:"fyvr1dz"},defaultClass:"fyvr1dw"},2:{conditions:{sm:"fyvr1e0",md:"fyvr1e1",lg:"fyvr1e2",xl:"fyvr1e3"},defaultClass:"fyvr1e0"},3:{conditions:{sm:"fyvr1e4",md:"fyvr1e5",lg:"fyvr1e6",xl:"fyvr1e7"},defaultClass:"fyvr1e4"},4:{conditions:{sm:"fyvr1e8",md:"fyvr1e9",lg:"fyvr1ea",xl:"fyvr1eb"},defaultClass:"fyvr1e8"},5:{conditions:{sm:"fyvr1ec",md:"fyvr1ed",lg:"fyvr1ee",xl:"fyvr1ef"},defaultClass:"fyvr1ec"},6:{conditions:{sm:"fyvr1eg",md:"fyvr1eh",lg:"fyvr1ei",xl:"fyvr1ej"},defaultClass:"fyvr1eg"},7:{conditions:{sm:"fyvr1ek",md:"fyvr1el",lg:"fyvr1em",xl:"fyvr1en"},defaultClass:"fyvr1ek"},8:{conditions:{sm:"fyvr1eo",md:"fyvr1ep",lg:"fyvr1eq",xl:"fyvr1er"},defaultClass:"fyvr1eo"},9:{conditions:{sm:"fyvr1es",md:"fyvr1et",lg:"fyvr1eu",xl:"fyvr1ev"},defaultClass:"fyvr1es"},10:{conditions:{sm:"fyvr1ew",md:"fyvr1ex",lg:"fyvr1ey",xl:"fyvr1ez"},defaultClass:"fyvr1ew"},12:{conditions:{sm:"fyvr1f0",md:"fyvr1f1",lg:"fyvr1f2",xl:"fyvr1f3"},defaultClass:"fyvr1f0"},14:{conditions:{sm:"fyvr1f4",md:"fyvr1f5",lg:"fyvr1f6",xl:"fyvr1f7"},defaultClass:"fyvr1f4"},16:{conditions:{sm:"fyvr1f8",md:"fyvr1f9",lg:"fyvr1fa",xl:"fyvr1fb"},defaultClass:"fyvr1f8"},"0.25":{conditions:{sm:"fyvr1fc",md:"fyvr1fd",lg:"fyvr1fe",xl:"fyvr1ff"},defaultClass:"fyvr1fc"},"0.5":{conditions:{sm:"fyvr1fg",md:"fyvr1fh",lg:"fyvr1fi",xl:"fyvr1fj"},defaultClass:"fyvr1fg"},"1.5":{conditions:{sm:"fyvr1fk",md:"fyvr1fl",lg:"fyvr1fm",xl:"fyvr1fn"},defaultClass:"fyvr1fk"},none:{conditions:{sm:"fyvr1fo",md:"fyvr1fp",lg:"fyvr1fq",xl:"fyvr1fr"},defaultClass:"fyvr1fo"},px:{conditions:{sm:"fyvr1fs",md:"fyvr1ft",lg:"fyvr1fu",xl:"fyvr1fv"},defaultClass:"fyvr1fs"},auto:{conditions:{sm:"fyvr1fw",md:"fyvr1fx",lg:"fyvr1fy",xl:"fyvr1fz"},defaultClass:"fyvr1fw"},full:{conditions:{sm:"fyvr1g0",md:"fyvr1g1",lg:"fyvr1g2",xl:"fyvr1g3"},defaultClass:"fyvr1g0"},"1/2":{conditions:{sm:"fyvr1g4",md:"fyvr1g5",lg:"fyvr1g6",xl:"fyvr1g7"},defaultClass:"fyvr1g4"},"1/3":{conditions:{sm:"fyvr1g8",md:"fyvr1g9",lg:"fyvr1ga",xl:"fyvr1gb"},defaultClass:"fyvr1g8"},"2/3":{conditions:{sm:"fyvr1gc",md:"fyvr1gd",lg:"fyvr1ge",xl:"fyvr1gf"},defaultClass:"fyvr1gc"},"1/4":{conditions:{sm:"fyvr1gg",md:"fyvr1gh",lg:"fyvr1gi",xl:"fyvr1gj"},defaultClass:"fyvr1gg"},"3/4":{conditions:{sm:"fyvr1gk",md:"fyvr1gl",lg:"fyvr1gm",xl:"fyvr1gn"},defaultClass:"fyvr1gk"},fit:{conditions:{sm:"fyvr1go",md:"fyvr1gp",lg:"fyvr1gq",xl:"fyvr1gr"},defaultClass:"fyvr1go"},max:{conditions:{sm:"fyvr1gs",md:"fyvr1gt",lg:"fyvr1gu",xl:"fyvr1gv"},defaultClass:"fyvr1gs"},min:{conditions:{sm:"fyvr1gw",md:"fyvr1gx",lg:"fyvr1gy",xl:"fyvr1gz"},defaultClass:"fyvr1gw"},vw:{conditions:{sm:"fyvr1h0",md:"fyvr1h1",lg:"fyvr1h2",xl:"fyvr1h3"},defaultClass:"fyvr1h0"},vh:{conditions:{sm:"fyvr1h4",md:"fyvr1h5",lg:"fyvr1h6",xl:"fyvr1h7"},defaultClass:"fyvr1h4"}}},minHeight:{values:{0:{conditions:{sm:"fyvr1h8",md:"fyvr1h9",lg:"fyvr1ha",xl:"fyvr1hb"},defaultClass:"fyvr1h8"},1:{conditions:{sm:"fyvr1hc",md:"fyvr1hd",lg:"fyvr1he",xl:"fyvr1hf"},defaultClass:"fyvr1hc"},2:{conditions:{sm:"fyvr1hg",md:"fyvr1hh",lg:"fyvr1hi",xl:"fyvr1hj"},defaultClass:"fyvr1hg"},3:{conditions:{sm:"fyvr1hk",md:"fyvr1hl",lg:"fyvr1hm",xl:"fyvr1hn"},defaultClass:"fyvr1hk"},4:{conditions:{sm:"fyvr1ho",md:"fyvr1hp",lg:"fyvr1hq",xl:"fyvr1hr"},defaultClass:"fyvr1ho"},5:{conditions:{sm:"fyvr1hs",md:"fyvr1ht",lg:"fyvr1hu",xl:"fyvr1hv"},defaultClass:"fyvr1hs"},6:{conditions:{sm:"fyvr1hw",md:"fyvr1hx",lg:"fyvr1hy",xl:"fyvr1hz"},defaultClass:"fyvr1hw"},7:{conditions:{sm:"fyvr1i0",md:"fyvr1i1",lg:"fyvr1i2",xl:"fyvr1i3"},defaultClass:"fyvr1i0"},8:{conditions:{sm:"fyvr1i4",md:"fyvr1i5",lg:"fyvr1i6",xl:"fyvr1i7"},defaultClass:"fyvr1i4"},9:{conditions:{sm:"fyvr1i8",md:"fyvr1i9",lg:"fyvr1ia",xl:"fyvr1ib"},defaultClass:"fyvr1i8"},10:{conditions:{sm:"fyvr1ic",md:"fyvr1id",lg:"fyvr1ie",xl:"fyvr1if"},defaultClass:"fyvr1ic"},12:{conditions:{sm:"fyvr1ig",md:"fyvr1ih",lg:"fyvr1ii",xl:"fyvr1ij"},defaultClass:"fyvr1ig"},14:{conditions:{sm:"fyvr1ik",md:"fyvr1il",lg:"fyvr1im",xl:"fyvr1in"},defaultClass:"fyvr1ik"},16:{conditions:{sm:"fyvr1io",md:"fyvr1ip",lg:"fyvr1iq",xl:"fyvr1ir"},defaultClass:"fyvr1io"},"0.25":{conditions:{sm:"fyvr1is",md:"fyvr1it",lg:"fyvr1iu",xl:"fyvr1iv"},defaultClass:"fyvr1is"},"0.5":{conditions:{sm:"fyvr1iw",md:"fyvr1ix",lg:"fyvr1iy",xl:"fyvr1iz"},defaultClass:"fyvr1iw"},"1.5":{conditions:{sm:"fyvr1j0",md:"fyvr1j1",lg:"fyvr1j2",xl:"fyvr1j3"},defaultClass:"fyvr1j0"},none:{conditions:{sm:"fyvr1j4",md:"fyvr1j5",lg:"fyvr1j6",xl:"fyvr1j7"},defaultClass:"fyvr1j4"},px:{conditions:{sm:"fyvr1j8",md:"fyvr1j9",lg:"fyvr1ja",xl:"fyvr1jb"},defaultClass:"fyvr1j8"},auto:{conditions:{sm:"fyvr1jc",md:"fyvr1jd",lg:"fyvr1je",xl:"fyvr1jf"},defaultClass:"fyvr1jc"},full:{conditions:{sm:"fyvr1jg",md:"fyvr1jh",lg:"fyvr1ji",xl:"fyvr1jj"},defaultClass:"fyvr1jg"},"1/2":{conditions:{sm:"fyvr1jk",md:"fyvr1jl",lg:"fyvr1jm",xl:"fyvr1jn"},defaultClass:"fyvr1jk"},"1/3":{conditions:{sm:"fyvr1jo",md:"fyvr1jp",lg:"fyvr1jq",xl:"fyvr1jr"},defaultClass:"fyvr1jo"},"2/3":{conditions:{sm:"fyvr1js",md:"fyvr1jt",lg:"fyvr1ju",xl:"fyvr1jv"},defaultClass:"fyvr1js"},"1/4":{conditions:{sm:"fyvr1jw",md:"fyvr1jx",lg:"fyvr1jy",xl:"fyvr1jz"},defaultClass:"fyvr1jw"},"3/4":{conditions:{sm:"fyvr1k0",md:"fyvr1k1",lg:"fyvr1k2",xl:"fyvr1k3"},defaultClass:"fyvr1k0"},fit:{conditions:{sm:"fyvr1k4",md:"fyvr1k5",lg:"fyvr1k6",xl:"fyvr1k7"},defaultClass:"fyvr1k4"},max:{conditions:{sm:"fyvr1k8",md:"fyvr1k9",lg:"fyvr1ka",xl:"fyvr1kb"},defaultClass:"fyvr1k8"},min:{conditions:{sm:"fyvr1kc",md:"fyvr1kd",lg:"fyvr1ke",xl:"fyvr1kf"},defaultClass:"fyvr1kc"},vw:{conditions:{sm:"fyvr1kg",md:"fyvr1kh",lg:"fyvr1ki",xl:"fyvr1kj"},defaultClass:"fyvr1kg"},vh:{conditions:{sm:"fyvr1kk",md:"fyvr1kl",lg:"fyvr1km",xl:"fyvr1kn"},defaultClass:"fyvr1kk"}}},top:{values:{0:{conditions:{sm:"fyvr1ko",md:"fyvr1kp",lg:"fyvr1kq",xl:"fyvr1kr"},defaultClass:"fyvr1ko"},1:{conditions:{sm:"fyvr1ks",md:"fyvr1kt",lg:"fyvr1ku",xl:"fyvr1kv"},defaultClass:"fyvr1ks"},2:{conditions:{sm:"fyvr1kw",md:"fyvr1kx",lg:"fyvr1ky",xl:"fyvr1kz"},defaultClass:"fyvr1kw"},3:{conditions:{sm:"fyvr1l0",md:"fyvr1l1",lg:"fyvr1l2",xl:"fyvr1l3"},defaultClass:"fyvr1l0"},4:{conditions:{sm:"fyvr1l4",md:"fyvr1l5",lg:"fyvr1l6",xl:"fyvr1l7"},defaultClass:"fyvr1l4"},5:{conditions:{sm:"fyvr1l8",md:"fyvr1l9",lg:"fyvr1la",xl:"fyvr1lb"},defaultClass:"fyvr1l8"},6:{conditions:{sm:"fyvr1lc",md:"fyvr1ld",lg:"fyvr1le",xl:"fyvr1lf"},defaultClass:"fyvr1lc"},7:{conditions:{sm:"fyvr1lg",md:"fyvr1lh",lg:"fyvr1li",xl:"fyvr1lj"},defaultClass:"fyvr1lg"},8:{conditions:{sm:"fyvr1lk",md:"fyvr1ll",lg:"fyvr1lm",xl:"fyvr1ln"},defaultClass:"fyvr1lk"},9:{conditions:{sm:"fyvr1lo",md:"fyvr1lp",lg:"fyvr1lq",xl:"fyvr1lr"},defaultClass:"fyvr1lo"},10:{conditions:{sm:"fyvr1ls",md:"fyvr1lt",lg:"fyvr1lu",xl:"fyvr1lv"},defaultClass:"fyvr1ls"},12:{conditions:{sm:"fyvr1lw",md:"fyvr1lx",lg:"fyvr1ly",xl:"fyvr1lz"},defaultClass:"fyvr1lw"},14:{conditions:{sm:"fyvr1m0",md:"fyvr1m1",lg:"fyvr1m2",xl:"fyvr1m3"},defaultClass:"fyvr1m0"},16:{conditions:{sm:"fyvr1m4",md:"fyvr1m5",lg:"fyvr1m6",xl:"fyvr1m7"},defaultClass:"fyvr1m4"},"0.25":{conditions:{sm:"fyvr1m8",md:"fyvr1m9",lg:"fyvr1ma",xl:"fyvr1mb"},defaultClass:"fyvr1m8"},"0.5":{conditions:{sm:"fyvr1mc",md:"fyvr1md",lg:"fyvr1me",xl:"fyvr1mf"},defaultClass:"fyvr1mc"},"1.5":{conditions:{sm:"fyvr1mg",md:"fyvr1mh",lg:"fyvr1mi",xl:"fyvr1mj"},defaultClass:"fyvr1mg"},auto:{conditions:{sm:"fyvr1mk",md:"fyvr1ml",lg:"fyvr1mm",xl:"fyvr1mn"},defaultClass:"fyvr1mk"}}},bottom:{values:{0:{conditions:{sm:"fyvr1mo",md:"fyvr1mp",lg:"fyvr1mq",xl:"fyvr1mr"},defaultClass:"fyvr1mo"},1:{conditions:{sm:"fyvr1ms",md:"fyvr1mt",lg:"fyvr1mu",xl:"fyvr1mv"},defaultClass:"fyvr1ms"},2:{conditions:{sm:"fyvr1mw",md:"fyvr1mx",lg:"fyvr1my",xl:"fyvr1mz"},defaultClass:"fyvr1mw"},3:{conditions:{sm:"fyvr1n0",md:"fyvr1n1",lg:"fyvr1n2",xl:"fyvr1n3"},defaultClass:"fyvr1n0"},4:{conditions:{sm:"fyvr1n4",md:"fyvr1n5",lg:"fyvr1n6",xl:"fyvr1n7"},defaultClass:"fyvr1n4"},5:{conditions:{sm:"fyvr1n8",md:"fyvr1n9",lg:"fyvr1na",xl:"fyvr1nb"},defaultClass:"fyvr1n8"},6:{conditions:{sm:"fyvr1nc",md:"fyvr1nd",lg:"fyvr1ne",xl:"fyvr1nf"},defaultClass:"fyvr1nc"},7:{conditions:{sm:"fyvr1ng",md:"fyvr1nh",lg:"fyvr1ni",xl:"fyvr1nj"},defaultClass:"fyvr1ng"},8:{conditions:{sm:"fyvr1nk",md:"fyvr1nl",lg:"fyvr1nm",xl:"fyvr1nn"},defaultClass:"fyvr1nk"},9:{conditions:{sm:"fyvr1no",md:"fyvr1np",lg:"fyvr1nq",xl:"fyvr1nr"},defaultClass:"fyvr1no"},10:{conditions:{sm:"fyvr1ns",md:"fyvr1nt",lg:"fyvr1nu",xl:"fyvr1nv"},defaultClass:"fyvr1ns"},12:{conditions:{sm:"fyvr1nw",md:"fyvr1nx",lg:"fyvr1ny",xl:"fyvr1nz"},defaultClass:"fyvr1nw"},14:{conditions:{sm:"fyvr1o0",md:"fyvr1o1",lg:"fyvr1o2",xl:"fyvr1o3"},defaultClass:"fyvr1o0"},16:{conditions:{sm:"fyvr1o4",md:"fyvr1o5",lg:"fyvr1o6",xl:"fyvr1o7"},defaultClass:"fyvr1o4"},"0.25":{conditions:{sm:"fyvr1o8",md:"fyvr1o9",lg:"fyvr1oa",xl:"fyvr1ob"},defaultClass:"fyvr1o8"},"0.5":{conditions:{sm:"fyvr1oc",md:"fyvr1od",lg:"fyvr1oe",xl:"fyvr1of"},defaultClass:"fyvr1oc"},"1.5":{conditions:{sm:"fyvr1og",md:"fyvr1oh",lg:"fyvr1oi",xl:"fyvr1oj"},defaultClass:"fyvr1og"},auto:{conditions:{sm:"fyvr1ok",md:"fyvr1ol",lg:"fyvr1om",xl:"fyvr1on"},defaultClass:"fyvr1ok"}}},left:{values:{0:{conditions:{sm:"fyvr1oo",md:"fyvr1op",lg:"fyvr1oq",xl:"fyvr1or"},defaultClass:"fyvr1oo"},1:{conditions:{sm:"fyvr1os",md:"fyvr1ot",lg:"fyvr1ou",xl:"fyvr1ov"},defaultClass:"fyvr1os"},2:{conditions:{sm:"fyvr1ow",md:"fyvr1ox",lg:"fyvr1oy",xl:"fyvr1oz"},defaultClass:"fyvr1ow"},3:{conditions:{sm:"fyvr1p0",md:"fyvr1p1",lg:"fyvr1p2",xl:"fyvr1p3"},defaultClass:"fyvr1p0"},4:{conditions:{sm:"fyvr1p4",md:"fyvr1p5",lg:"fyvr1p6",xl:"fyvr1p7"},defaultClass:"fyvr1p4"},5:{conditions:{sm:"fyvr1p8",md:"fyvr1p9",lg:"fyvr1pa",xl:"fyvr1pb"},defaultClass:"fyvr1p8"},6:{conditions:{sm:"fyvr1pc",md:"fyvr1pd",lg:"fyvr1pe",xl:"fyvr1pf"},defaultClass:"fyvr1pc"},7:{conditions:{sm:"fyvr1pg",md:"fyvr1ph",lg:"fyvr1pi",xl:"fyvr1pj"},defaultClass:"fyvr1pg"},8:{conditions:{sm:"fyvr1pk",md:"fyvr1pl",lg:"fyvr1pm",xl:"fyvr1pn"},defaultClass:"fyvr1pk"},9:{conditions:{sm:"fyvr1po",md:"fyvr1pp",lg:"fyvr1pq",xl:"fyvr1pr"},defaultClass:"fyvr1po"},10:{conditions:{sm:"fyvr1ps",md:"fyvr1pt",lg:"fyvr1pu",xl:"fyvr1pv"},defaultClass:"fyvr1ps"},12:{conditions:{sm:"fyvr1pw",md:"fyvr1px",lg:"fyvr1py",xl:"fyvr1pz"},defaultClass:"fyvr1pw"},14:{conditions:{sm:"fyvr1q0",md:"fyvr1q1",lg:"fyvr1q2",xl:"fyvr1q3"},defaultClass:"fyvr1q0"},16:{conditions:{sm:"fyvr1q4",md:"fyvr1q5",lg:"fyvr1q6",xl:"fyvr1q7"},defaultClass:"fyvr1q4"},"0.25":{conditions:{sm:"fyvr1q8",md:"fyvr1q9",lg:"fyvr1qa",xl:"fyvr1qb"},defaultClass:"fyvr1q8"},"0.5":{conditions:{sm:"fyvr1qc",md:"fyvr1qd",lg:"fyvr1qe",xl:"fyvr1qf"},defaultClass:"fyvr1qc"},"1.5":{conditions:{sm:"fyvr1qg",md:"fyvr1qh",lg:"fyvr1qi",xl:"fyvr1qj"},defaultClass:"fyvr1qg"},auto:{conditions:{sm:"fyvr1qk",md:"fyvr1ql",lg:"fyvr1qm",xl:"fyvr1qn"},defaultClass:"fyvr1qk"}}},right:{values:{0:{conditions:{sm:"fyvr1qo",md:"fyvr1qp",lg:"fyvr1qq",xl:"fyvr1qr"},defaultClass:"fyvr1qo"},1:{conditions:{sm:"fyvr1qs",md:"fyvr1qt",lg:"fyvr1qu",xl:"fyvr1qv"},defaultClass:"fyvr1qs"},2:{conditions:{sm:"fyvr1qw",md:"fyvr1qx",lg:"fyvr1qy",xl:"fyvr1qz"},defaultClass:"fyvr1qw"},3:{conditions:{sm:"fyvr1r0",md:"fyvr1r1",lg:"fyvr1r2",xl:"fyvr1r3"},defaultClass:"fyvr1r0"},4:{conditions:{sm:"fyvr1r4",md:"fyvr1r5",lg:"fyvr1r6",xl:"fyvr1r7"},defaultClass:"fyvr1r4"},5:{conditions:{sm:"fyvr1r8",md:"fyvr1r9",lg:"fyvr1ra",xl:"fyvr1rb"},defaultClass:"fyvr1r8"},6:{conditions:{sm:"fyvr1rc",md:"fyvr1rd",lg:"fyvr1re",xl:"fyvr1rf"},defaultClass:"fyvr1rc"},7:{conditions:{sm:"fyvr1rg",md:"fyvr1rh",lg:"fyvr1ri",xl:"fyvr1rj"},defaultClass:"fyvr1rg"},8:{conditions:{sm:"fyvr1rk",md:"fyvr1rl",lg:"fyvr1rm",xl:"fyvr1rn"},defaultClass:"fyvr1rk"},9:{conditions:{sm:"fyvr1ro",md:"fyvr1rp",lg:"fyvr1rq",xl:"fyvr1rr"},defaultClass:"fyvr1ro"},10:{conditions:{sm:"fyvr1rs",md:"fyvr1rt",lg:"fyvr1ru",xl:"fyvr1rv"},defaultClass:"fyvr1rs"},12:{conditions:{sm:"fyvr1rw",md:"fyvr1rx",lg:"fyvr1ry",xl:"fyvr1rz"},defaultClass:"fyvr1rw"},14:{conditions:{sm:"fyvr1s0",md:"fyvr1s1",lg:"fyvr1s2",xl:"fyvr1s3"},defaultClass:"fyvr1s0"},16:{conditions:{sm:"fyvr1s4",md:"fyvr1s5",lg:"fyvr1s6",xl:"fyvr1s7"},defaultClass:"fyvr1s4"},"0.25":{conditions:{sm:"fyvr1s8",md:"fyvr1s9",lg:"fyvr1sa",xl:"fyvr1sb"},defaultClass:"fyvr1s8"},"0.5":{conditions:{sm:"fyvr1sc",md:"fyvr1sd",lg:"fyvr1se",xl:"fyvr1sf"},defaultClass:"fyvr1sc"},"1.5":{conditions:{sm:"fyvr1sg",md:"fyvr1sh",lg:"fyvr1si",xl:"fyvr1sj"},defaultClass:"fyvr1sg"},auto:{conditions:{sm:"fyvr1sk",md:"fyvr1sl",lg:"fyvr1sm",xl:"fyvr1sn"},defaultClass:"fyvr1sk"}}},paddingTop:{values:{0:{conditions:{sm:"fyvr1so",md:"fyvr1sp",lg:"fyvr1sq",xl:"fyvr1sr"},defaultClass:"fyvr1so"},1:{conditions:{sm:"fyvr1ss",md:"fyvr1st",lg:"fyvr1su",xl:"fyvr1sv"},defaultClass:"fyvr1ss"},2:{conditions:{sm:"fyvr1sw",md:"fyvr1sx",lg:"fyvr1sy",xl:"fyvr1sz"},defaultClass:"fyvr1sw"},3:{conditions:{sm:"fyvr1t0",md:"fyvr1t1",lg:"fyvr1t2",xl:"fyvr1t3"},defaultClass:"fyvr1t0"},4:{conditions:{sm:"fyvr1t4",md:"fyvr1t5",lg:"fyvr1t6",xl:"fyvr1t7"},defaultClass:"fyvr1t4"},5:{conditions:{sm:"fyvr1t8",md:"fyvr1t9",lg:"fyvr1ta",xl:"fyvr1tb"},defaultClass:"fyvr1t8"},6:{conditions:{sm:"fyvr1tc",md:"fyvr1td",lg:"fyvr1te",xl:"fyvr1tf"},defaultClass:"fyvr1tc"},7:{conditions:{sm:"fyvr1tg",md:"fyvr1th",lg:"fyvr1ti",xl:"fyvr1tj"},defaultClass:"fyvr1tg"},8:{conditions:{sm:"fyvr1tk",md:"fyvr1tl",lg:"fyvr1tm",xl:"fyvr1tn"},defaultClass:"fyvr1tk"},9:{conditions:{sm:"fyvr1to",md:"fyvr1tp",lg:"fyvr1tq",xl:"fyvr1tr"},defaultClass:"fyvr1to"},10:{conditions:{sm:"fyvr1ts",md:"fyvr1tt",lg:"fyvr1tu",xl:"fyvr1tv"},defaultClass:"fyvr1ts"},12:{conditions:{sm:"fyvr1tw",md:"fyvr1tx",lg:"fyvr1ty",xl:"fyvr1tz"},defaultClass:"fyvr1tw"},14:{conditions:{sm:"fyvr1u0",md:"fyvr1u1",lg:"fyvr1u2",xl:"fyvr1u3"},defaultClass:"fyvr1u0"},16:{conditions:{sm:"fyvr1u4",md:"fyvr1u5",lg:"fyvr1u6",xl:"fyvr1u7"},defaultClass:"fyvr1u4"},"0.25":{conditions:{sm:"fyvr1u8",md:"fyvr1u9",lg:"fyvr1ua",xl:"fyvr1ub"},defaultClass:"fyvr1u8"},"0.5":{conditions:{sm:"fyvr1uc",md:"fyvr1ud",lg:"fyvr1ue",xl:"fyvr1uf"},defaultClass:"fyvr1uc"},"1.5":{conditions:{sm:"fyvr1ug",md:"fyvr1uh",lg:"fyvr1ui",xl:"fyvr1uj"},defaultClass:"fyvr1ug"}}},paddingBottom:{values:{0:{conditions:{sm:"fyvr1uk",md:"fyvr1ul",lg:"fyvr1um",xl:"fyvr1un"},defaultClass:"fyvr1uk"},1:{conditions:{sm:"fyvr1uo",md:"fyvr1up",lg:"fyvr1uq",xl:"fyvr1ur"},defaultClass:"fyvr1uo"},2:{conditions:{sm:"fyvr1us",md:"fyvr1ut",lg:"fyvr1uu",xl:"fyvr1uv"},defaultClass:"fyvr1us"},3:{conditions:{sm:"fyvr1uw",md:"fyvr1ux",lg:"fyvr1uy",xl:"fyvr1uz"},defaultClass:"fyvr1uw"},4:{conditions:{sm:"fyvr1v0",md:"fyvr1v1",lg:"fyvr1v2",xl:"fyvr1v3"},defaultClass:"fyvr1v0"},5:{conditions:{sm:"fyvr1v4",md:"fyvr1v5",lg:"fyvr1v6",xl:"fyvr1v7"},defaultClass:"fyvr1v4"},6:{conditions:{sm:"fyvr1v8",md:"fyvr1v9",lg:"fyvr1va",xl:"fyvr1vb"},defaultClass:"fyvr1v8"},7:{conditions:{sm:"fyvr1vc",md:"fyvr1vd",lg:"fyvr1ve",xl:"fyvr1vf"},defaultClass:"fyvr1vc"},8:{conditions:{sm:"fyvr1vg",md:"fyvr1vh",lg:"fyvr1vi",xl:"fyvr1vj"},defaultClass:"fyvr1vg"},9:{conditions:{sm:"fyvr1vk",md:"fyvr1vl",lg:"fyvr1vm",xl:"fyvr1vn"},defaultClass:"fyvr1vk"},10:{conditions:{sm:"fyvr1vo",md:"fyvr1vp",lg:"fyvr1vq",xl:"fyvr1vr"},defaultClass:"fyvr1vo"},12:{conditions:{sm:"fyvr1vs",md:"fyvr1vt",lg:"fyvr1vu",xl:"fyvr1vv"},defaultClass:"fyvr1vs"},14:{conditions:{sm:"fyvr1vw",md:"fyvr1vx",lg:"fyvr1vy",xl:"fyvr1vz"},defaultClass:"fyvr1vw"},16:{conditions:{sm:"fyvr1w0",md:"fyvr1w1",lg:"fyvr1w2",xl:"fyvr1w3"},defaultClass:"fyvr1w0"},"0.25":{conditions:{sm:"fyvr1w4",md:"fyvr1w5",lg:"fyvr1w6",xl:"fyvr1w7"},defaultClass:"fyvr1w4"},"0.5":{conditions:{sm:"fyvr1w8",md:"fyvr1w9",lg:"fyvr1wa",xl:"fyvr1wb"},defaultClass:"fyvr1w8"},"1.5":{conditions:{sm:"fyvr1wc",md:"fyvr1wd",lg:"fyvr1we",xl:"fyvr1wf"},defaultClass:"fyvr1wc"}}},paddingLeft:{values:{0:{conditions:{sm:"fyvr1wg",md:"fyvr1wh",lg:"fyvr1wi",xl:"fyvr1wj"},defaultClass:"fyvr1wg"},1:{conditions:{sm:"fyvr1wk",md:"fyvr1wl",lg:"fyvr1wm",xl:"fyvr1wn"},defaultClass:"fyvr1wk"},2:{conditions:{sm:"fyvr1wo",md:"fyvr1wp",lg:"fyvr1wq",xl:"fyvr1wr"},defaultClass:"fyvr1wo"},3:{conditions:{sm:"fyvr1ws",md:"fyvr1wt",lg:"fyvr1wu",xl:"fyvr1wv"},defaultClass:"fyvr1ws"},4:{conditions:{sm:"fyvr1ww",md:"fyvr1wx",lg:"fyvr1wy",xl:"fyvr1wz"},defaultClass:"fyvr1ww"},5:{conditions:{sm:"fyvr1x0",md:"fyvr1x1",lg:"fyvr1x2",xl:"fyvr1x3"},defaultClass:"fyvr1x0"},6:{conditions:{sm:"fyvr1x4",md:"fyvr1x5",lg:"fyvr1x6",xl:"fyvr1x7"},defaultClass:"fyvr1x4"},7:{conditions:{sm:"fyvr1x8",md:"fyvr1x9",lg:"fyvr1xa",xl:"fyvr1xb"},defaultClass:"fyvr1x8"},8:{conditions:{sm:"fyvr1xc",md:"fyvr1xd",lg:"fyvr1xe",xl:"fyvr1xf"},defaultClass:"fyvr1xc"},9:{conditions:{sm:"fyvr1xg",md:"fyvr1xh",lg:"fyvr1xi",xl:"fyvr1xj"},defaultClass:"fyvr1xg"},10:{conditions:{sm:"fyvr1xk",md:"fyvr1xl",lg:"fyvr1xm",xl:"fyvr1xn"},defaultClass:"fyvr1xk"},12:{conditions:{sm:"fyvr1xo",md:"fyvr1xp",lg:"fyvr1xq",xl:"fyvr1xr"},defaultClass:"fyvr1xo"},14:{conditions:{sm:"fyvr1xs",md:"fyvr1xt",lg:"fyvr1xu",xl:"fyvr1xv"},defaultClass:"fyvr1xs"},16:{conditions:{sm:"fyvr1xw",md:"fyvr1xx",lg:"fyvr1xy",xl:"fyvr1xz"},defaultClass:"fyvr1xw"},"0.25":{conditions:{sm:"fyvr1y0",md:"fyvr1y1",lg:"fyvr1y2",xl:"fyvr1y3"},defaultClass:"fyvr1y0"},"0.5":{conditions:{sm:"fyvr1y4",md:"fyvr1y5",lg:"fyvr1y6",xl:"fyvr1y7"},defaultClass:"fyvr1y4"},"1.5":{conditions:{sm:"fyvr1y8",md:"fyvr1y9",lg:"fyvr1ya",xl:"fyvr1yb"},defaultClass:"fyvr1y8"}}},paddingRight:{values:{0:{conditions:{sm:"fyvr1yc",md:"fyvr1yd",lg:"fyvr1ye",xl:"fyvr1yf"},defaultClass:"fyvr1yc"},1:{conditions:{sm:"fyvr1yg",md:"fyvr1yh",lg:"fyvr1yi",xl:"fyvr1yj"},defaultClass:"fyvr1yg"},2:{conditions:{sm:"fyvr1yk",md:"fyvr1yl",lg:"fyvr1ym",xl:"fyvr1yn"},defaultClass:"fyvr1yk"},3:{conditions:{sm:"fyvr1yo",md:"fyvr1yp",lg:"fyvr1yq",xl:"fyvr1yr"},defaultClass:"fyvr1yo"},4:{conditions:{sm:"fyvr1ys",md:"fyvr1yt",lg:"fyvr1yu",xl:"fyvr1yv"},defaultClass:"fyvr1ys"},5:{conditions:{sm:"fyvr1yw",md:"fyvr1yx",lg:"fyvr1yy",xl:"fyvr1yz"},defaultClass:"fyvr1yw"},6:{conditions:{sm:"fyvr1z0",md:"fyvr1z1",lg:"fyvr1z2",xl:"fyvr1z3"},defaultClass:"fyvr1z0"},7:{conditions:{sm:"fyvr1z4",md:"fyvr1z5",lg:"fyvr1z6",xl:"fyvr1z7"},defaultClass:"fyvr1z4"},8:{conditions:{sm:"fyvr1z8",md:"fyvr1z9",lg:"fyvr1za",xl:"fyvr1zb"},defaultClass:"fyvr1z8"},9:{conditions:{sm:"fyvr1zc",md:"fyvr1zd",lg:"fyvr1ze",xl:"fyvr1zf"},defaultClass:"fyvr1zc"},10:{conditions:{sm:"fyvr1zg",md:"fyvr1zh",lg:"fyvr1zi",xl:"fyvr1zj"},defaultClass:"fyvr1zg"},12:{conditions:{sm:"fyvr1zk",md:"fyvr1zl",lg:"fyvr1zm",xl:"fyvr1zn"},defaultClass:"fyvr1zk"},14:{conditions:{sm:"fyvr1zo",md:"fyvr1zp",lg:"fyvr1zq",xl:"fyvr1zr"},defaultClass:"fyvr1zo"},16:{conditions:{sm:"fyvr1zs",md:"fyvr1zt",lg:"fyvr1zu",xl:"fyvr1zv"},defaultClass:"fyvr1zs"},"0.25":{conditions:{sm:"fyvr1zw",md:"fyvr1zx",lg:"fyvr1zy",xl:"fyvr1zz"},defaultClass:"fyvr1zw"},"0.5":{conditions:{sm:"fyvr1100",md:"fyvr1101",lg:"fyvr1102",xl:"fyvr1103"},defaultClass:"fyvr1100"},"1.5":{conditions:{sm:"fyvr1104",md:"fyvr1105",lg:"fyvr1106",xl:"fyvr1107"},defaultClass:"fyvr1104"}}},marginTop:{values:{0:{conditions:{sm:"fyvr1108",md:"fyvr1109",lg:"fyvr110a",xl:"fyvr110b"},defaultClass:"fyvr1108"},1:{conditions:{sm:"fyvr110c",md:"fyvr110d",lg:"fyvr110e",xl:"fyvr110f"},defaultClass:"fyvr110c"},2:{conditions:{sm:"fyvr110g",md:"fyvr110h",lg:"fyvr110i",xl:"fyvr110j"},defaultClass:"fyvr110g"},3:{conditions:{sm:"fyvr110k",md:"fyvr110l",lg:"fyvr110m",xl:"fyvr110n"},defaultClass:"fyvr110k"},4:{conditions:{sm:"fyvr110o",md:"fyvr110p",lg:"fyvr110q",xl:"fyvr110r"},defaultClass:"fyvr110o"},5:{conditions:{sm:"fyvr110s",md:"fyvr110t",lg:"fyvr110u",xl:"fyvr110v"},defaultClass:"fyvr110s"},6:{conditions:{sm:"fyvr110w",md:"fyvr110x",lg:"fyvr110y",xl:"fyvr110z"},defaultClass:"fyvr110w"},7:{conditions:{sm:"fyvr1110",md:"fyvr1111",lg:"fyvr1112",xl:"fyvr1113"},defaultClass:"fyvr1110"},8:{conditions:{sm:"fyvr1114",md:"fyvr1115",lg:"fyvr1116",xl:"fyvr1117"},defaultClass:"fyvr1114"},9:{conditions:{sm:"fyvr1118",md:"fyvr1119",lg:"fyvr111a",xl:"fyvr111b"},defaultClass:"fyvr1118"},10:{conditions:{sm:"fyvr111c",md:"fyvr111d",lg:"fyvr111e",xl:"fyvr111f"},defaultClass:"fyvr111c"},12:{conditions:{sm:"fyvr111g",md:"fyvr111h",lg:"fyvr111i",xl:"fyvr111j"},defaultClass:"fyvr111g"},14:{conditions:{sm:"fyvr111k",md:"fyvr111l",lg:"fyvr111m",xl:"fyvr111n"},defaultClass:"fyvr111k"},16:{conditions:{sm:"fyvr111o",md:"fyvr111p",lg:"fyvr111q",xl:"fyvr111r"},defaultClass:"fyvr111o"},"0.25":{conditions:{sm:"fyvr111s",md:"fyvr111t",lg:"fyvr111u",xl:"fyvr111v"},defaultClass:"fyvr111s"},"0.5":{conditions:{sm:"fyvr111w",md:"fyvr111x",lg:"fyvr111y",xl:"fyvr111z"},defaultClass:"fyvr111w"},"1.5":{conditions:{sm:"fyvr1120",md:"fyvr1121",lg:"fyvr1122",xl:"fyvr1123"},defaultClass:"fyvr1120"},auto:{conditions:{sm:"fyvr1124",md:"fyvr1125",lg:"fyvr1126",xl:"fyvr1127"},defaultClass:"fyvr1124"}}},marginBottom:{values:{0:{conditions:{sm:"fyvr1128",md:"fyvr1129",lg:"fyvr112a",xl:"fyvr112b"},defaultClass:"fyvr1128"},1:{conditions:{sm:"fyvr112c",md:"fyvr112d",lg:"fyvr112e",xl:"fyvr112f"},defaultClass:"fyvr112c"},2:{conditions:{sm:"fyvr112g",md:"fyvr112h",lg:"fyvr112i",xl:"fyvr112j"},defaultClass:"fyvr112g"},3:{conditions:{sm:"fyvr112k",md:"fyvr112l",lg:"fyvr112m",xl:"fyvr112n"},defaultClass:"fyvr112k"},4:{conditions:{sm:"fyvr112o",md:"fyvr112p",lg:"fyvr112q",xl:"fyvr112r"},defaultClass:"fyvr112o"},5:{conditions:{sm:"fyvr112s",md:"fyvr112t",lg:"fyvr112u",xl:"fyvr112v"},defaultClass:"fyvr112s"},6:{conditions:{sm:"fyvr112w",md:"fyvr112x",lg:"fyvr112y",xl:"fyvr112z"},defaultClass:"fyvr112w"},7:{conditions:{sm:"fyvr1130",md:"fyvr1131",lg:"fyvr1132",xl:"fyvr1133"},defaultClass:"fyvr1130"},8:{conditions:{sm:"fyvr1134",md:"fyvr1135",lg:"fyvr1136",xl:"fyvr1137"},defaultClass:"fyvr1134"},9:{conditions:{sm:"fyvr1138",md:"fyvr1139",lg:"fyvr113a",xl:"fyvr113b"},defaultClass:"fyvr1138"},10:{conditions:{sm:"fyvr113c",md:"fyvr113d",lg:"fyvr113e",xl:"fyvr113f"},defaultClass:"fyvr113c"},12:{conditions:{sm:"fyvr113g",md:"fyvr113h",lg:"fyvr113i",xl:"fyvr113j"},defaultClass:"fyvr113g"},14:{conditions:{sm:"fyvr113k",md:"fyvr113l",lg:"fyvr113m",xl:"fyvr113n"},defaultClass:"fyvr113k"},16:{conditions:{sm:"fyvr113o",md:"fyvr113p",lg:"fyvr113q",xl:"fyvr113r"},defaultClass:"fyvr113o"},"0.25":{conditions:{sm:"fyvr113s",md:"fyvr113t",lg:"fyvr113u",xl:"fyvr113v"},defaultClass:"fyvr113s"},"0.5":{conditions:{sm:"fyvr113w",md:"fyvr113x",lg:"fyvr113y",xl:"fyvr113z"},defaultClass:"fyvr113w"},"1.5":{conditions:{sm:"fyvr1140",md:"fyvr1141",lg:"fyvr1142",xl:"fyvr1143"},defaultClass:"fyvr1140"},auto:{conditions:{sm:"fyvr1144",md:"fyvr1145",lg:"fyvr1146",xl:"fyvr1147"},defaultClass:"fyvr1144"}}},marginLeft:{values:{0:{conditions:{sm:"fyvr1148",md:"fyvr1149",lg:"fyvr114a",xl:"fyvr114b"},defaultClass:"fyvr1148"},1:{conditions:{sm:"fyvr114c",md:"fyvr114d",lg:"fyvr114e",xl:"fyvr114f"},defaultClass:"fyvr114c"},2:{conditions:{sm:"fyvr114g",md:"fyvr114h",lg:"fyvr114i",xl:"fyvr114j"},defaultClass:"fyvr114g"},3:{conditions:{sm:"fyvr114k",md:"fyvr114l",lg:"fyvr114m",xl:"fyvr114n"},defaultClass:"fyvr114k"},4:{conditions:{sm:"fyvr114o",md:"fyvr114p",lg:"fyvr114q",xl:"fyvr114r"},defaultClass:"fyvr114o"},5:{conditions:{sm:"fyvr114s",md:"fyvr114t",lg:"fyvr114u",xl:"fyvr114v"},defaultClass:"fyvr114s"},6:{conditions:{sm:"fyvr114w",md:"fyvr114x",lg:"fyvr114y",xl:"fyvr114z"},defaultClass:"fyvr114w"},7:{conditions:{sm:"fyvr1150",md:"fyvr1151",lg:"fyvr1152",xl:"fyvr1153"},defaultClass:"fyvr1150"},8:{conditions:{sm:"fyvr1154",md:"fyvr1155",lg:"fyvr1156",xl:"fyvr1157"},defaultClass:"fyvr1154"},9:{conditions:{sm:"fyvr1158",md:"fyvr1159",lg:"fyvr115a",xl:"fyvr115b"},defaultClass:"fyvr1158"},10:{conditions:{sm:"fyvr115c",md:"fyvr115d",lg:"fyvr115e",xl:"fyvr115f"},defaultClass:"fyvr115c"},12:{conditions:{sm:"fyvr115g",md:"fyvr115h",lg:"fyvr115i",xl:"fyvr115j"},defaultClass:"fyvr115g"},14:{conditions:{sm:"fyvr115k",md:"fyvr115l",lg:"fyvr115m",xl:"fyvr115n"},defaultClass:"fyvr115k"},16:{conditions:{sm:"fyvr115o",md:"fyvr115p",lg:"fyvr115q",xl:"fyvr115r"},defaultClass:"fyvr115o"},"0.25":{conditions:{sm:"fyvr115s",md:"fyvr115t",lg:"fyvr115u",xl:"fyvr115v"},defaultClass:"fyvr115s"},"0.5":{conditions:{sm:"fyvr115w",md:"fyvr115x",lg:"fyvr115y",xl:"fyvr115z"},defaultClass:"fyvr115w"},"1.5":{conditions:{sm:"fyvr1160",md:"fyvr1161",lg:"fyvr1162",xl:"fyvr1163"},defaultClass:"fyvr1160"},auto:{conditions:{sm:"fyvr1164",md:"fyvr1165",lg:"fyvr1166",xl:"fyvr1167"},defaultClass:"fyvr1164"}}},marginRight:{values:{0:{conditions:{sm:"fyvr1168",md:"fyvr1169",lg:"fyvr116a",xl:"fyvr116b"},defaultClass:"fyvr1168"},1:{conditions:{sm:"fyvr116c",md:"fyvr116d",lg:"fyvr116e",xl:"fyvr116f"},defaultClass:"fyvr116c"},2:{conditions:{sm:"fyvr116g",md:"fyvr116h",lg:"fyvr116i",xl:"fyvr116j"},defaultClass:"fyvr116g"},3:{conditions:{sm:"fyvr116k",md:"fyvr116l",lg:"fyvr116m",xl:"fyvr116n"},defaultClass:"fyvr116k"},4:{conditions:{sm:"fyvr116o",md:"fyvr116p",lg:"fyvr116q",xl:"fyvr116r"},defaultClass:"fyvr116o"},5:{conditions:{sm:"fyvr116s",md:"fyvr116t",lg:"fyvr116u",xl:"fyvr116v"},defaultClass:"fyvr116s"},6:{conditions:{sm:"fyvr116w",md:"fyvr116x",lg:"fyvr116y",xl:"fyvr116z"},defaultClass:"fyvr116w"},7:{conditions:{sm:"fyvr1170",md:"fyvr1171",lg:"fyvr1172",xl:"fyvr1173"},defaultClass:"fyvr1170"},8:{conditions:{sm:"fyvr1174",md:"fyvr1175",lg:"fyvr1176",xl:"fyvr1177"},defaultClass:"fyvr1174"},9:{conditions:{sm:"fyvr1178",md:"fyvr1179",lg:"fyvr117a",xl:"fyvr117b"},defaultClass:"fyvr1178"},10:{conditions:{sm:"fyvr117c",md:"fyvr117d",lg:"fyvr117e",xl:"fyvr117f"},defaultClass:"fyvr117c"},12:{conditions:{sm:"fyvr117g",md:"fyvr117h",lg:"fyvr117i",xl:"fyvr117j"},defaultClass:"fyvr117g"},14:{conditions:{sm:"fyvr117k",md:"fyvr117l",lg:"fyvr117m",xl:"fyvr117n"},defaultClass:"fyvr117k"},16:{conditions:{sm:"fyvr117o",md:"fyvr117p",lg:"fyvr117q",xl:"fyvr117r"},defaultClass:"fyvr117o"},"0.25":{conditions:{sm:"fyvr117s",md:"fyvr117t",lg:"fyvr117u",xl:"fyvr117v"},defaultClass:"fyvr117s"},"0.5":{conditions:{sm:"fyvr117w",md:"fyvr117x",lg:"fyvr117y",xl:"fyvr117z"},defaultClass:"fyvr117w"},"1.5":{conditions:{sm:"fyvr1180",md:"fyvr1181",lg:"fyvr1182",xl:"fyvr1183"},defaultClass:"fyvr1180"},auto:{conditions:{sm:"fyvr1184",md:"fyvr1185",lg:"fyvr1186",xl:"fyvr1187"},defaultClass:"fyvr1184"}}},gap:{values:{0:{conditions:{sm:"fyvr1188",md:"fyvr1189",lg:"fyvr118a",xl:"fyvr118b"},defaultClass:"fyvr1188"},1:{conditions:{sm:"fyvr118c",md:"fyvr118d",lg:"fyvr118e",xl:"fyvr118f"},defaultClass:"fyvr118c"},2:{conditions:{sm:"fyvr118g",md:"fyvr118h",lg:"fyvr118i",xl:"fyvr118j"},defaultClass:"fyvr118g"},3:{conditions:{sm:"fyvr118k",md:"fyvr118l",lg:"fyvr118m",xl:"fyvr118n"},defaultClass:"fyvr118k"},4:{conditions:{sm:"fyvr118o",md:"fyvr118p",lg:"fyvr118q",xl:"fyvr118r"},defaultClass:"fyvr118o"},5:{conditions:{sm:"fyvr118s",md:"fyvr118t",lg:"fyvr118u",xl:"fyvr118v"},defaultClass:"fyvr118s"},6:{conditions:{sm:"fyvr118w",md:"fyvr118x",lg:"fyvr118y",xl:"fyvr118z"},defaultClass:"fyvr118w"},7:{conditions:{sm:"fyvr1190",md:"fyvr1191",lg:"fyvr1192",xl:"fyvr1193"},defaultClass:"fyvr1190"},8:{conditions:{sm:"fyvr1194",md:"fyvr1195",lg:"fyvr1196",xl:"fyvr1197"},defaultClass:"fyvr1194"},9:{conditions:{sm:"fyvr1198",md:"fyvr1199",lg:"fyvr119a",xl:"fyvr119b"},defaultClass:"fyvr1198"},10:{conditions:{sm:"fyvr119c",md:"fyvr119d",lg:"fyvr119e",xl:"fyvr119f"},defaultClass:"fyvr119c"},12:{conditions:{sm:"fyvr119g",md:"fyvr119h",lg:"fyvr119i",xl:"fyvr119j"},defaultClass:"fyvr119g"},14:{conditions:{sm:"fyvr119k",md:"fyvr119l",lg:"fyvr119m",xl:"fyvr119n"},defaultClass:"fyvr119k"},16:{conditions:{sm:"fyvr119o",md:"fyvr119p",lg:"fyvr119q",xl:"fyvr119r"},defaultClass:"fyvr119o"},"0.25":{conditions:{sm:"fyvr119s",md:"fyvr119t",lg:"fyvr119u",xl:"fyvr119v"},defaultClass:"fyvr119s"},"0.5":{conditions:{sm:"fyvr119w",md:"fyvr119x",lg:"fyvr119y",xl:"fyvr119z"},defaultClass:"fyvr119w"},"1.5":{conditions:{sm:"fyvr11a0",md:"fyvr11a1",lg:"fyvr11a2",xl:"fyvr11a3"},defaultClass:"fyvr11a0"}}},borderBottomWidth:{values:{none:{conditions:{sm:"fyvr11a4",md:"fyvr11a5",lg:"fyvr11a6",xl:"fyvr11a7"},defaultClass:"fyvr11a4"},thin:{conditions:{sm:"fyvr11a8",md:"fyvr11a9",lg:"fyvr11aa",xl:"fyvr11ab"},defaultClass:"fyvr11a8"},thick:{conditions:{sm:"fyvr11ac",md:"fyvr11ad",lg:"fyvr11ae",xl:"fyvr11af"},defaultClass:"fyvr11ac"}}},borderLeftWidth:{values:{none:{conditions:{sm:"fyvr11ag",md:"fyvr11ah",lg:"fyvr11ai",xl:"fyvr11aj"},defaultClass:"fyvr11ag"},thin:{conditions:{sm:"fyvr11ak",md:"fyvr11al",lg:"fyvr11am",xl:"fyvr11an"},defaultClass:"fyvr11ak"},thick:{conditions:{sm:"fyvr11ao",md:"fyvr11ap",lg:"fyvr11aq",xl:"fyvr11ar"},defaultClass:"fyvr11ao"}}},borderRightWidth:{values:{none:{conditions:{sm:"fyvr11as",md:"fyvr11at",lg:"fyvr11au",xl:"fyvr11av"},defaultClass:"fyvr11as"},thin:{conditions:{sm:"fyvr11aw",md:"fyvr11ax",lg:"fyvr11ay",xl:"fyvr11az"},defaultClass:"fyvr11aw"},thick:{conditions:{sm:"fyvr11b0",md:"fyvr11b1",lg:"fyvr11b2",xl:"fyvr11b3"},defaultClass:"fyvr11b0"}}},borderTopWidth:{values:{none:{conditions:{sm:"fyvr11b4",md:"fyvr11b5",lg:"fyvr11b6",xl:"fyvr11b7"},defaultClass:"fyvr11b4"},thin:{conditions:{sm:"fyvr11b8",md:"fyvr11b9",lg:"fyvr11ba",xl:"fyvr11bb"},defaultClass:"fyvr11b8"},thick:{conditions:{sm:"fyvr11bc",md:"fyvr11bd",lg:"fyvr11be",xl:"fyvr11bf"},defaultClass:"fyvr11bc"}}},borderBottomLeftRadius:{values:{none:{conditions:{sm:"fyvr11bg",md:"fyvr11bh",lg:"fyvr11bi",xl:"fyvr11bj"},defaultClass:"fyvr11bg"},xs:{conditions:{sm:"fyvr11bk",md:"fyvr11bl",lg:"fyvr11bm",xl:"fyvr11bn"},defaultClass:"fyvr11bk"},sm:{conditions:{sm:"fyvr11bo",md:"fyvr11bp",lg:"fyvr11bq",xl:"fyvr11br"},defaultClass:"fyvr11bo"},md:{conditions:{sm:"fyvr11bs",md:"fyvr11bt",lg:"fyvr11bu",xl:"fyvr11bv"},defaultClass:"fyvr11bs"},lg:{conditions:{sm:"fyvr11bw",md:"fyvr11bx",lg:"fyvr11by",xl:"fyvr11bz"},defaultClass:"fyvr11bw"},circle:{conditions:{sm:"fyvr11c0",md:"fyvr11c1",lg:"fyvr11c2",xl:"fyvr11c3"},defaultClass:"fyvr11c0"}}},borderBottomRightRadius:{values:{none:{conditions:{sm:"fyvr11c4",md:"fyvr11c5",lg:"fyvr11c6",xl:"fyvr11c7"},defaultClass:"fyvr11c4"},xs:{conditions:{sm:"fyvr11c8",md:"fyvr11c9",lg:"fyvr11ca",xl:"fyvr11cb"},defaultClass:"fyvr11c8"},sm:{conditions:{sm:"fyvr11cc",md:"fyvr11cd",lg:"fyvr11ce",xl:"fyvr11cf"},defaultClass:"fyvr11cc"},md:{conditions:{sm:"fyvr11cg",md:"fyvr11ch",lg:"fyvr11ci",xl:"fyvr11cj"},defaultClass:"fyvr11cg"},lg:{conditions:{sm:"fyvr11ck",md:"fyvr11cl",lg:"fyvr11cm",xl:"fyvr11cn"},defaultClass:"fyvr11ck"},circle:{conditions:{sm:"fyvr11co",md:"fyvr11cp",lg:"fyvr11cq",xl:"fyvr11cr"},defaultClass:"fyvr11co"}}},borderTopLeftRadius:{values:{none:{conditions:{sm:"fyvr11cs",md:"fyvr11ct",lg:"fyvr11cu",xl:"fyvr11cv"},defaultClass:"fyvr11cs"},xs:{conditions:{sm:"fyvr11cw",md:"fyvr11cx",lg:"fyvr11cy",xl:"fyvr11cz"},defaultClass:"fyvr11cw"},sm:{conditions:{sm:"fyvr11d0",md:"fyvr11d1",lg:"fyvr11d2",xl:"fyvr11d3"},defaultClass:"fyvr11d0"},md:{conditions:{sm:"fyvr11d4",md:"fyvr11d5",lg:"fyvr11d6",xl:"fyvr11d7"},defaultClass:"fyvr11d4"},lg:{conditions:{sm:"fyvr11d8",md:"fyvr11d9",lg:"fyvr11da",xl:"fyvr11db"},defaultClass:"fyvr11d8"},circle:{conditions:{sm:"fyvr11dc",md:"fyvr11dd",lg:"fyvr11de",xl:"fyvr11df"},defaultClass:"fyvr11dc"}}},borderTopRightRadius:{values:{none:{conditions:{sm:"fyvr11dg",md:"fyvr11dh",lg:"fyvr11di",xl:"fyvr11dj"},defaultClass:"fyvr11dg"},xs:{conditions:{sm:"fyvr11dk",md:"fyvr11dl",lg:"fyvr11dm",xl:"fyvr11dn"},defaultClass:"fyvr11dk"},sm:{conditions:{sm:"fyvr11do",md:"fyvr11dp",lg:"fyvr11dq",xl:"fyvr11dr"},defaultClass:"fyvr11do"},md:{conditions:{sm:"fyvr11ds",md:"fyvr11dt",lg:"fyvr11du",xl:"fyvr11dv"},defaultClass:"fyvr11ds"},lg:{conditions:{sm:"fyvr11dw",md:"fyvr11dx",lg:"fyvr11dy",xl:"fyvr11dz"},defaultClass:"fyvr11dw"},circle:{conditions:{sm:"fyvr11e0",md:"fyvr11e1",lg:"fyvr11e2",xl:"fyvr11e3"},defaultClass:"fyvr11e0"}}},fontSize:{values:{inherit:{conditions:{sm:"fyvr11e4",md:"fyvr11e5",lg:"fyvr11e6",xl:"fyvr11e7"},defaultClass:"fyvr11e4"},xsmall:{conditions:{sm:"fyvr11e8",md:"fyvr11e9",lg:"fyvr11ea",xl:"fyvr11eb"},defaultClass:"fyvr11e8"},small:{conditions:{sm:"fyvr11ec",md:"fyvr11ed",lg:"fyvr11ee",xl:"fyvr11ef"},defaultClass:"fyvr11ec"},normal:{conditions:{sm:"fyvr11eg",md:"fyvr11eh",lg:"fyvr11ei",xl:"fyvr11ej"},defaultClass:"fyvr11eg"},medium:{conditions:{sm:"fyvr11ek",md:"fyvr11el",lg:"fyvr11em",xl:"fyvr11en"},defaultClass:"fyvr11ek"},large:{conditions:{sm:"fyvr11eo",md:"fyvr11ep",lg:"fyvr11eq",xl:"fyvr11er"},defaultClass:"fyvr11eo"},xlarge:{conditions:{sm:"fyvr11es",md:"fyvr11et",lg:"fyvr11eu",xl:"fyvr11ev"},defaultClass:"fyvr11es"}}},fontWeight:{values:{inherit:{conditions:{sm:"fyvr11ew",md:"fyvr11ex",lg:"fyvr11ey",xl:"fyvr11ez"},defaultClass:"fyvr11ew"},normal:{conditions:{sm:"fyvr11f0",md:"fyvr11f1",lg:"fyvr11f2",xl:"fyvr11f3"},defaultClass:"fyvr11f0"},medium:{conditions:{sm:"fyvr11f4",md:"fyvr11f5",lg:"fyvr11f6",xl:"fyvr11f7"},defaultClass:"fyvr11f4"},semibold:{conditions:{sm:"fyvr11f8",md:"fyvr11f9",lg:"fyvr11fa",xl:"fyvr11fb"},defaultClass:"fyvr11f8"},bold:{conditions:{sm:"fyvr11fc",md:"fyvr11fd",lg:"fyvr11fe",xl:"fyvr11ff"},defaultClass:"fyvr11fc"}}},letterSpacing:{values:{inherit:{conditions:{sm:"fyvr11fg",md:"fyvr11fh",lg:"fyvr11fi",xl:"fyvr11fj"},defaultClass:"fyvr11fg"},none:{conditions:{sm:"fyvr11fk",md:"fyvr11fl",lg:"fyvr11fm",xl:"fyvr11fn"},defaultClass:"fyvr11fk"},normal:{conditions:{sm:"fyvr11fo",md:"fyvr11fp",lg:"fyvr11fq",xl:"fyvr11fr"},defaultClass:"fyvr11fo"},wide:{conditions:{sm:"fyvr11fs",md:"fyvr11ft",lg:"fyvr11fu",xl:"fyvr11fv"},defaultClass:"fyvr11fs"}}},lineHeight:{values:{4:{conditions:{sm:"fyvr11fw",md:"fyvr11fx",lg:"fyvr11fy",xl:"fyvr11fz"},defaultClass:"fyvr11fw"},5:{conditions:{sm:"fyvr11g0",md:"fyvr11g1",lg:"fyvr11g2",xl:"fyvr11g3"},defaultClass:"fyvr11g0"},6:{conditions:{sm:"fyvr11g4",md:"fyvr11g5",lg:"fyvr11g6",xl:"fyvr11g7"},defaultClass:"fyvr11g4"},7:{conditions:{sm:"fyvr11g8",md:"fyvr11g9",lg:"fyvr11ga",xl:"fyvr11gb"},defaultClass:"fyvr11g8"},9:{conditions:{sm:"fyvr11gc",md:"fyvr11gd",lg:"fyvr11ge",xl:"fyvr11gf"},defaultClass:"fyvr11gc"},inherit:{conditions:{sm:"fyvr11gg",md:"fyvr11gh",lg:"fyvr11gi",xl:"fyvr11gj"},defaultClass:"fyvr11gg"}}},textAlign:{values:{center:{conditions:{sm:"fyvr11gk",md:"fyvr11gl",lg:"fyvr11gm",xl:"fyvr11gn"},defaultClass:"fyvr11gk"},left:{conditions:{sm:"fyvr11go",md:"fyvr11gp",lg:"fyvr11gq",xl:"fyvr11gr"},defaultClass:"fyvr11go"},right:{conditions:{sm:"fyvr11gs",md:"fyvr11gt",lg:"fyvr11gu",xl:"fyvr11gv"},defaultClass:"fyvr11gs"}}},display:{values:{block:{conditions:{sm:"fyvr11gw",md:"fyvr11gx",lg:"fyvr11gy",xl:"fyvr11gz"},defaultClass:"fyvr11gw"},flex:{conditions:{sm:"fyvr11h0",md:"fyvr11h1",lg:"fyvr11h2",xl:"fyvr11h3"},defaultClass:"fyvr11h0"},grid:{conditions:{sm:"fyvr11h4",md:"fyvr11h5",lg:"fyvr11h6",xl:"fyvr11h7"},defaultClass:"fyvr11h4"},"inline-block":{conditions:{sm:"fyvr11h8",md:"fyvr11h9",lg:"fyvr11ha",xl:"fyvr11hb"},defaultClass:"fyvr11h8"},"inline-flex":{conditions:{sm:"fyvr11hc",md:"fyvr11hd",lg:"fyvr11he",xl:"fyvr11hf"},defaultClass:"fyvr11hc"},none:{conditions:{sm:"fyvr11hg",md:"fyvr11hh",lg:"fyvr11hi",xl:"fyvr11hj"},defaultClass:"fyvr11hg"},contents:{conditions:{sm:"fyvr11hk",md:"fyvr11hl",lg:"fyvr11hm",xl:"fyvr11hn"},defaultClass:"fyvr11hk"}}},position:{values:{absolute:{conditions:{sm:"fyvr11ho",md:"fyvr11hp",lg:"fyvr11hq",xl:"fyvr11hr"},defaultClass:"fyvr11ho"},fixed:{conditions:{sm:"fyvr11hs",md:"fyvr11ht",lg:"fyvr11hu",xl:"fyvr11hv"},defaultClass:"fyvr11hs"},relative:{conditions:{sm:"fyvr11hw",md:"fyvr11hx",lg:"fyvr11hy",xl:"fyvr11hz"},defaultClass:"fyvr11hw"},sticky:{conditions:{sm:"fyvr11i0",md:"fyvr11i1",lg:"fyvr11i2",xl:"fyvr11i3"},defaultClass:"fyvr11i0"}}},flexDirection:{values:{column:{conditions:{sm:"fyvr11i4",md:"fyvr11i5",lg:"fyvr11i6",xl:"fyvr11i7"},defaultClass:"fyvr11i4"},"column-reverse":{conditions:{sm:"fyvr11i8",md:"fyvr11i9",lg:"fyvr11ia",xl:"fyvr11ib"},defaultClass:"fyvr11i8"},row:{conditions:{sm:"fyvr11ic",md:"fyvr11id",lg:"fyvr11ie",xl:"fyvr11if"},defaultClass:"fyvr11ic"},"row-reverse":{conditions:{sm:"fyvr11ig",md:"fyvr11ih",lg:"fyvr11ii",xl:"fyvr11ij"},defaultClass:"fyvr11ig"}}},flexShrink:{values:{0:{conditions:{sm:"fyvr11ik",md:"fyvr11il",lg:"fyvr11im",xl:"fyvr11in"},defaultClass:"fyvr11ik"},1:{conditions:{sm:"fyvr11io",md:"fyvr11ip",lg:"fyvr11iq",xl:"fyvr11ir"},defaultClass:"fyvr11io"}}},flexGrow:{values:{0:{conditions:{sm:"fyvr11is",md:"fyvr11it",lg:"fyvr11iu",xl:"fyvr11iv"},defaultClass:"fyvr11is"},1:{conditions:{sm:"fyvr11iw",md:"fyvr11ix",lg:"fyvr11iy",xl:"fyvr11iz"},defaultClass:"fyvr11iw"}}},flexWrap:{values:{nowrap:{conditions:{sm:"fyvr11j0",md:"fyvr11j1",lg:"fyvr11j2",xl:"fyvr11j3"},defaultClass:"fyvr11j0"},wrap:{conditions:{sm:"fyvr11j4",md:"fyvr11j5",lg:"fyvr11j6",xl:"fyvr11j7"},defaultClass:"fyvr11j4"},"wrap-reverse":{conditions:{sm:"fyvr11j8",md:"fyvr11j9",lg:"fyvr11ja",xl:"fyvr11jb"},defaultClass:"fyvr11j8"}}},justifyContent:{values:{"flex-start":{conditions:{sm:"fyvr11jc",md:"fyvr11jd",lg:"fyvr11je",xl:"fyvr11jf"},defaultClass:"fyvr11jc"},center:{conditions:{sm:"fyvr11jg",md:"fyvr11jh",lg:"fyvr11ji",xl:"fyvr11jj"},defaultClass:"fyvr11jg"},"flex-end":{conditions:{sm:"fyvr11jk",md:"fyvr11jl",lg:"fyvr11jm",xl:"fyvr11jn"},defaultClass:"fyvr11jk"},stretch:{conditions:{sm:"fyvr11jo",md:"fyvr11jp",lg:"fyvr11jq",xl:"fyvr11jr"},defaultClass:"fyvr11jo"},"space-around":{conditions:{sm:"fyvr11js",md:"fyvr11jt",lg:"fyvr11ju",xl:"fyvr11jv"},defaultClass:"fyvr11js"},"space-between":{conditions:{sm:"fyvr11jw",md:"fyvr11jx",lg:"fyvr11jy",xl:"fyvr11jz"},defaultClass:"fyvr11jw"},"space-evenly":{conditions:{sm:"fyvr11k0",md:"fyvr11k1",lg:"fyvr11k2",xl:"fyvr11k3"},defaultClass:"fyvr11k0"}}},justifySelf:{values:{"flex-start":{conditions:{sm:"fyvr11k4",md:"fyvr11k5",lg:"fyvr11k6",xl:"fyvr11k7"},defaultClass:"fyvr11k4"},center:{conditions:{sm:"fyvr11k8",md:"fyvr11k9",lg:"fyvr11ka",xl:"fyvr11kb"},defaultClass:"fyvr11k8"},"flex-end":{conditions:{sm:"fyvr11kc",md:"fyvr11kd",lg:"fyvr11ke",xl:"fyvr11kf"},defaultClass:"fyvr11kc"},stretch:{conditions:{sm:"fyvr11kg",md:"fyvr11kh",lg:"fyvr11ki",xl:"fyvr11kj"},defaultClass:"fyvr11kg"}}},alignItems:{values:{"flex-start":{conditions:{sm:"fyvr11kk",md:"fyvr11kl",lg:"fyvr11km",xl:"fyvr11kn"},defaultClass:"fyvr11kk"},center:{conditions:{sm:"fyvr11ko",md:"fyvr11kp",lg:"fyvr11kq",xl:"fyvr11kr"},defaultClass:"fyvr11ko"},"flex-end":{conditions:{sm:"fyvr11ks",md:"fyvr11kt",lg:"fyvr11ku",xl:"fyvr11kv"},defaultClass:"fyvr11ks"},stretch:{conditions:{sm:"fyvr11kw",md:"fyvr11kx",lg:"fyvr11ky",xl:"fyvr11kz"},defaultClass:"fyvr11kw"},baseline:{conditions:{sm:"fyvr11l0",md:"fyvr11l1",lg:"fyvr11l2",xl:"fyvr11l3"},defaultClass:"fyvr11l0"}}},alignSelf:{values:{"flex-start":{conditions:{sm:"fyvr11l4",md:"fyvr11l5",lg:"fyvr11l6",xl:"fyvr11l7"},defaultClass:"fyvr11l4"},center:{conditions:{sm:"fyvr11l8",md:"fyvr11l9",lg:"fyvr11la",xl:"fyvr11lb"},defaultClass:"fyvr11l8"},"flex-end":{conditions:{sm:"fyvr11lc",md:"fyvr11ld",lg:"fyvr11le",xl:"fyvr11lf"},defaultClass:"fyvr11lc"},stretch:{conditions:{sm:"fyvr11lg",md:"fyvr11lh",lg:"fyvr11li",xl:"fyvr11lj"},defaultClass:"fyvr11lg"},baseline:{conditions:{sm:"fyvr11lk",md:"fyvr11ll",lg:"fyvr11lm",xl:"fyvr11ln"},defaultClass:"fyvr11lk"}}},overflowX:{values:{auto:{conditions:{sm:"fyvr11lo",md:"fyvr11lp",lg:"fyvr11lq",xl:"fyvr11lr"},defaultClass:"fyvr11lo"},hidden:{conditions:{sm:"fyvr11ls",md:"fyvr11lt",lg:"fyvr11lu",xl:"fyvr11lv"},defaultClass:"fyvr11ls"},scroll:{conditions:{sm:"fyvr11lw",md:"fyvr11lx",lg:"fyvr11ly",xl:"fyvr11lz"},defaultClass:"fyvr11lw"},visible:{conditions:{sm:"fyvr11m0",md:"fyvr11m1",lg:"fyvr11m2",xl:"fyvr11m3"},defaultClass:"fyvr11m0"}}},overflowY:{values:{auto:{conditions:{sm:"fyvr11m4",md:"fyvr11m5",lg:"fyvr11m6",xl:"fyvr11m7"},defaultClass:"fyvr11m4"},hidden:{conditions:{sm:"fyvr11m8",md:"fyvr11m9",lg:"fyvr11ma",xl:"fyvr11mb"},defaultClass:"fyvr11m8"},scroll:{conditions:{sm:"fyvr11mc",md:"fyvr11md",lg:"fyvr11me",xl:"fyvr11mf"},defaultClass:"fyvr11mc"},visible:{conditions:{sm:"fyvr11mg",md:"fyvr11mh",lg:"fyvr11mi",xl:"fyvr11mj"},defaultClass:"fyvr11mg"}}},visibility:{values:{hidden:{conditions:{sm:"fyvr11mk",md:"fyvr11ml",lg:"fyvr11mm",xl:"fyvr11mn"},defaultClass:"fyvr11mk"},visible:{conditions:{sm:"fyvr11mo",md:"fyvr11mp",lg:"fyvr11mq",xl:"fyvr11mr"},defaultClass:"fyvr11mo"}}}}},{conditions:void 0,styles:{backdropFilter:{values:{blur:{defaultClass:"fyvr11ms"},none:{defaultClass:"fyvr11mt"}}},fontFamily:{values:{inherit:{defaultClass:"fyvr11mu"},body:{defaultClass:"fyvr11mv"},mono:{defaultClass:"fyvr11mw"}}},textOverflow:{values:{ellipsis:{defaultClass:"fyvr11mx"},clip:{defaultClass:"fyvr11my"}}},textTransform:{values:{capitalize:{defaultClass:"fyvr11mz"},lowercase:{defaultClass:"fyvr11n0"},uppercase:{defaultClass:"fyvr11n1"}}},userSelect:{values:{none:{defaultClass:"fyvr11n2"},text:{defaultClass:"fyvr11n3"},all:{defaultClass:"fyvr11n4"},auto:{defaultClass:"fyvr11n5"}}},whiteSpace:{values:{normal:{defaultClass:"fyvr11n6"},nowrap:{defaultClass:"fyvr11n7"},initial:{defaultClass:"fyvr11n8"},inherit:{defaultClass:"fyvr11n9"}}},wordBreak:{values:{"break-word":{defaultClass:"fyvr11na"}}},wordWrap:{values:{normal:{defaultClass:"fyvr11nb"},"break-word":{defaultClass:"fyvr11nc"},initial:{defaultClass:"fyvr11nd"},inherit:{defaultClass:"fyvr11ne"}}},zIndex:{values:{0:{defaultClass:"fyvr11nf"},1:{defaultClass:"fyvr11ng"},10:{defaultClass:"fyvr11nh"},20:{defaultClass:"fyvr11ni"},30:{defaultClass:"fyvr11nj"},40:{defaultClass:"fyvr11nk"},50:{defaultClass:"fyvr11nl"},"-1":{defaultClass:"fyvr11nm"},auto:{defaultClass:"fyvr11nn"}}},aspectRatio:{values:{"1/1":{defaultClass:"fyvr11no"},"16/9":{defaultClass:"fyvr11np"},"4/3":{defaultClass:"fyvr11nq"},"3/1":{defaultClass:"fyvr11nr"},auto:{defaultClass:"fyvr11ns"}}}}},{conditions:{defaultCondition:"base",conditionNames:["base","active","disabled","focus","hover","checked"],responsiveArray:void 0},styles:{borderColor:{mappings:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]},borderStyle:{mappings:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"]},focusRing:{mappings:["boxShadow","outline"]},background:{values:{black:{conditions:{base:"fyvr11nt",active:"fyvr11nu",disabled:"fyvr11nv",focus:"fyvr11nw",hover:"fyvr11nx",checked:"fyvr11ny"},defaultClass:"fyvr11nt"},white:{conditions:{base:"fyvr11nz",active:"fyvr11o0",disabled:"fyvr11o1",focus:"fyvr11o2",hover:"fyvr11o3",checked:"fyvr11o4"},defaultClass:"fyvr11nz"},inherit:{conditions:{base:"fyvr11o5",active:"fyvr11o6",disabled:"fyvr11o7",focus:"fyvr11o8",hover:"fyvr11o9",checked:"fyvr11oa"},defaultClass:"fyvr11o5"},transparent:{conditions:{base:"fyvr11ob",active:"fyvr11oc",disabled:"fyvr11od",focus:"fyvr11oe",hover:"fyvr11of",checked:"fyvr11og"},defaultClass:"fyvr11ob"},positive:{conditions:{base:"fyvr11oh",active:"fyvr11oi",disabled:"fyvr11oj",focus:"fyvr11ok",hover:"fyvr11ol",checked:"fyvr11om"},defaultClass:"fyvr11oh"},negative:{conditions:{base:"fyvr11on",active:"fyvr11oo",disabled:"fyvr11op",focus:"fyvr11oq",hover:"fyvr11or",checked:"fyvr11os"},defaultClass:"fyvr11on"},info:{conditions:{base:"fyvr11ot",active:"fyvr11ou",disabled:"fyvr11ov",focus:"fyvr11ow",hover:"fyvr11ox",checked:"fyvr11oy"},defaultClass:"fyvr11ot"},warning:{conditions:{base:"fyvr11oz",active:"fyvr11p0",disabled:"fyvr11p1",focus:"fyvr11p2",hover:"fyvr11p3",checked:"fyvr11p4"},defaultClass:"fyvr11oz"},gradientBackdrop:{conditions:{base:"fyvr11p5",active:"fyvr11p6",disabled:"fyvr11p7",focus:"fyvr11p8",hover:"fyvr11p9",checked:"fyvr11pa"},defaultClass:"fyvr11p5"},gradientPrimary:{conditions:{base:"fyvr11pb",active:"fyvr11pc",disabled:"fyvr11pd",focus:"fyvr11pe",hover:"fyvr11pf",checked:"fyvr11pg"},defaultClass:"fyvr11pb"},gradientSecondary:{conditions:{base:"fyvr11ph",active:"fyvr11pi",disabled:"fyvr11pj",focus:"fyvr11pk",hover:"fyvr11pl",checked:"fyvr11pm"},defaultClass:"fyvr11ph"},arbitrumDark:{conditions:{base:"fyvr11pn",active:"fyvr11po",disabled:"fyvr11pp",focus:"fyvr11pq",hover:"fyvr11pr",checked:"fyvr11ps"},defaultClass:"fyvr11pn"},arbitrumLight:{conditions:{base:"fyvr11pt",active:"fyvr11pu",disabled:"fyvr11pv",focus:"fyvr11pw",hover:"fyvr11px",checked:"fyvr11py"},defaultClass:"fyvr11pt"},avalanceDark:{conditions:{base:"fyvr11pz",active:"fyvr11q0",disabled:"fyvr11q1",focus:"fyvr11q2",hover:"fyvr11q3",checked:"fyvr11q4"},defaultClass:"fyvr11pz"},avalanceLight:{conditions:{base:"fyvr11q5",active:"fyvr11q6",disabled:"fyvr11q7",focus:"fyvr11q8",hover:"fyvr11q9",checked:"fyvr11qa"},defaultClass:"fyvr11q5"},bscDark:{conditions:{base:"fyvr11qb",active:"fyvr11qc",disabled:"fyvr11qd",focus:"fyvr11qe",hover:"fyvr11qf",checked:"fyvr11qg"},defaultClass:"fyvr11qb"},bscLight:{conditions:{base:"fyvr11qh",active:"fyvr11qi",disabled:"fyvr11qj",focus:"fyvr11qk",hover:"fyvr11ql",checked:"fyvr11qm"},defaultClass:"fyvr11qh"},ethereumDark:{conditions:{base:"fyvr11qn",active:"fyvr11qo",disabled:"fyvr11qp",focus:"fyvr11qq",hover:"fyvr11qr",checked:"fyvr11qs"},defaultClass:"fyvr11qn"},ethereumLight:{conditions:{base:"fyvr11qt",active:"fyvr11qu",disabled:"fyvr11qv",focus:"fyvr11qw",hover:"fyvr11qx",checked:"fyvr11qy"},defaultClass:"fyvr11qt"},gnosisDark:{conditions:{base:"fyvr11qz",active:"fyvr11r0",disabled:"fyvr11r1",focus:"fyvr11r2",hover:"fyvr11r3",checked:"fyvr11r4"},defaultClass:"fyvr11qz"},gnosisLight:{conditions:{base:"fyvr11r5",active:"fyvr11r6",disabled:"fyvr11r7",focus:"fyvr11r8",hover:"fyvr11r9",checked:"fyvr11ra"},defaultClass:"fyvr11r5"},polygonDark:{conditions:{base:"fyvr11rb",active:"fyvr11rc",disabled:"fyvr11rd",focus:"fyvr11re",hover:"fyvr11rf",checked:"fyvr11rg"},defaultClass:"fyvr11rb"},polygonLight:{conditions:{base:"fyvr11rh",active:"fyvr11ri",disabled:"fyvr11rj",focus:"fyvr11rk",hover:"fyvr11rl",checked:"fyvr11rm"},defaultClass:"fyvr11rh"},text100:{conditions:{base:"fyvr11rn",active:"fyvr11ro",disabled:"fyvr11rp",focus:"fyvr11rq",hover:"fyvr11rr",checked:"fyvr11rs"},defaultClass:"fyvr11rn"},text80:{conditions:{base:"fyvr11rt",active:"fyvr11ru",disabled:"fyvr11rv",focus:"fyvr11rw",hover:"fyvr11rx",checked:"fyvr11ry"},defaultClass:"fyvr11rt"},text50:{conditions:{base:"fyvr11rz",active:"fyvr11s0",disabled:"fyvr11s1",focus:"fyvr11s2",hover:"fyvr11s3",checked:"fyvr11s4"},defaultClass:"fyvr11rz"},textInverse100:{conditions:{base:"fyvr11s5",active:"fyvr11s6",disabled:"fyvr11s7",focus:"fyvr11s8",hover:"fyvr11s9",checked:"fyvr11sa"},defaultClass:"fyvr11s5"},backgroundPrimary:{conditions:{base:"fyvr11sb",active:"fyvr11sc",disabled:"fyvr11sd",focus:"fyvr11se",hover:"fyvr11sf",checked:"fyvr11sg"},defaultClass:"fyvr11sb"},backgroundSecondary:{conditions:{base:"fyvr11sh",active:"fyvr11si",disabled:"fyvr11sj",focus:"fyvr11sk",hover:"fyvr11sl",checked:"fyvr11sm"},defaultClass:"fyvr11sh"},backgroundContrast:{conditions:{base:"fyvr11sn",active:"fyvr11so",disabled:"fyvr11sp",focus:"fyvr11sq",hover:"fyvr11sr",checked:"fyvr11ss"},defaultClass:"fyvr11sn"},backgroundMuted:{conditions:{base:"fyvr11st",active:"fyvr11su",disabled:"fyvr11sv",focus:"fyvr11sw",hover:"fyvr11sx",checked:"fyvr11sy"},defaultClass:"fyvr11st"},backgroundControl:{conditions:{base:"fyvr11sz",active:"fyvr11t0",disabled:"fyvr11t1",focus:"fyvr11t2",hover:"fyvr11t3",checked:"fyvr11t4"},defaultClass:"fyvr11sz"},backgroundInverse:{conditions:{base:"fyvr11t5",active:"fyvr11t6",disabled:"fyvr11t7",focus:"fyvr11t8",hover:"fyvr11t9",checked:"fyvr11ta"},defaultClass:"fyvr11t5"},backgroundBackdrop:{conditions:{base:"fyvr11tb",active:"fyvr11tc",disabled:"fyvr11td",focus:"fyvr11te",hover:"fyvr11tf",checked:"fyvr11tg"},defaultClass:"fyvr11tb"},backgroundOverlay:{conditions:{base:"fyvr11th",active:"fyvr11ti",disabled:"fyvr11tj",focus:"fyvr11tk",hover:"fyvr11tl",checked:"fyvr11tm"},defaultClass:"fyvr11th"},backgroundRaised:{conditions:{base:"fyvr11tn",active:"fyvr11to",disabled:"fyvr11tp",focus:"fyvr11tq",hover:"fyvr11tr",checked:"fyvr11ts"},defaultClass:"fyvr11tn"},buttonGlass:{conditions:{base:"fyvr11tt",active:"fyvr11tu",disabled:"fyvr11tv",focus:"fyvr11tw",hover:"fyvr11tx",checked:"fyvr11ty"},defaultClass:"fyvr11tt"},buttonEmphasis:{conditions:{base:"fyvr11tz",active:"fyvr11u0",disabled:"fyvr11u1",focus:"fyvr11u2",hover:"fyvr11u3",checked:"fyvr11u4"},defaultClass:"fyvr11tz"},buttonInverse:{conditions:{base:"fyvr11u5",active:"fyvr11u6",disabled:"fyvr11u7",focus:"fyvr11u8",hover:"fyvr11u9",checked:"fyvr11ua"},defaultClass:"fyvr11u5"},borderNormal:{conditions:{base:"fyvr11ub",active:"fyvr11uc",disabled:"fyvr11ud",focus:"fyvr11ue",hover:"fyvr11uf",checked:"fyvr11ug"},defaultClass:"fyvr11ub"},borderFocus:{conditions:{base:"fyvr11uh",active:"fyvr11ui",disabled:"fyvr11uj",focus:"fyvr11uk",hover:"fyvr11ul",checked:"fyvr11um"},defaultClass:"fyvr11uh"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11un",active:"fyvr11uo",disabled:"fyvr11up",focus:"fyvr11uq",hover:"fyvr11ur",checked:"fyvr11us"},defaultClass:"fyvr11un"},white:{conditions:{base:"fyvr11ut",active:"fyvr11uu",disabled:"fyvr11uv",focus:"fyvr11uw",hover:"fyvr11ux",checked:"fyvr11uy"},defaultClass:"fyvr11ut"},inherit:{conditions:{base:"fyvr11uz",active:"fyvr11v0",disabled:"fyvr11v1",focus:"fyvr11v2",hover:"fyvr11v3",checked:"fyvr11v4"},defaultClass:"fyvr11uz"},transparent:{conditions:{base:"fyvr11v5",active:"fyvr11v6",disabled:"fyvr11v7",focus:"fyvr11v8",hover:"fyvr11v9",checked:"fyvr11va"},defaultClass:"fyvr11v5"},positive:{conditions:{base:"fyvr11vb",active:"fyvr11vc",disabled:"fyvr11vd",focus:"fyvr11ve",hover:"fyvr11vf",checked:"fyvr11vg"},defaultClass:"fyvr11vb"},negative:{conditions:{base:"fyvr11vh",active:"fyvr11vi",disabled:"fyvr11vj",focus:"fyvr11vk",hover:"fyvr11vl",checked:"fyvr11vm"},defaultClass:"fyvr11vh"},info:{conditions:{base:"fyvr11vn",active:"fyvr11vo",disabled:"fyvr11vp",focus:"fyvr11vq",hover:"fyvr11vr",checked:"fyvr11vs"},defaultClass:"fyvr11vn"},warning:{conditions:{base:"fyvr11vt",active:"fyvr11vu",disabled:"fyvr11vv",focus:"fyvr11vw",hover:"fyvr11vx",checked:"fyvr11vy"},defaultClass:"fyvr11vt"},gradientBackdrop:{conditions:{base:"fyvr11vz",active:"fyvr11w0",disabled:"fyvr11w1",focus:"fyvr11w2",hover:"fyvr11w3",checked:"fyvr11w4"},defaultClass:"fyvr11vz"},gradientPrimary:{conditions:{base:"fyvr11w5",active:"fyvr11w6",disabled:"fyvr11w7",focus:"fyvr11w8",hover:"fyvr11w9",checked:"fyvr11wa"},defaultClass:"fyvr11w5"},gradientSecondary:{conditions:{base:"fyvr11wb",active:"fyvr11wc",disabled:"fyvr11wd",focus:"fyvr11we",hover:"fyvr11wf",checked:"fyvr11wg"},defaultClass:"fyvr11wb"},arbitrumDark:{conditions:{base:"fyvr11wh",active:"fyvr11wi",disabled:"fyvr11wj",focus:"fyvr11wk",hover:"fyvr11wl",checked:"fyvr11wm"},defaultClass:"fyvr11wh"},arbitrumLight:{conditions:{base:"fyvr11wn",active:"fyvr11wo",disabled:"fyvr11wp",focus:"fyvr11wq",hover:"fyvr11wr",checked:"fyvr11ws"},defaultClass:"fyvr11wn"},avalanceDark:{conditions:{base:"fyvr11wt",active:"fyvr11wu",disabled:"fyvr11wv",focus:"fyvr11ww",hover:"fyvr11wx",checked:"fyvr11wy"},defaultClass:"fyvr11wt"},avalanceLight:{conditions:{base:"fyvr11wz",active:"fyvr11x0",disabled:"fyvr11x1",focus:"fyvr11x2",hover:"fyvr11x3",checked:"fyvr11x4"},defaultClass:"fyvr11wz"},bscDark:{conditions:{base:"fyvr11x5",active:"fyvr11x6",disabled:"fyvr11x7",focus:"fyvr11x8",hover:"fyvr11x9",checked:"fyvr11xa"},defaultClass:"fyvr11x5"},bscLight:{conditions:{base:"fyvr11xb",active:"fyvr11xc",disabled:"fyvr11xd",focus:"fyvr11xe",hover:"fyvr11xf",checked:"fyvr11xg"},defaultClass:"fyvr11xb"},ethereumDark:{conditions:{base:"fyvr11xh",active:"fyvr11xi",disabled:"fyvr11xj",focus:"fyvr11xk",hover:"fyvr11xl",checked:"fyvr11xm"},defaultClass:"fyvr11xh"},ethereumLight:{conditions:{base:"fyvr11xn",active:"fyvr11xo",disabled:"fyvr11xp",focus:"fyvr11xq",hover:"fyvr11xr",checked:"fyvr11xs"},defaultClass:"fyvr11xn"},gnosisDark:{conditions:{base:"fyvr11xt",active:"fyvr11xu",disabled:"fyvr11xv",focus:"fyvr11xw",hover:"fyvr11xx",checked:"fyvr11xy"},defaultClass:"fyvr11xt"},gnosisLight:{conditions:{base:"fyvr11xz",active:"fyvr11y0",disabled:"fyvr11y1",focus:"fyvr11y2",hover:"fyvr11y3",checked:"fyvr11y4"},defaultClass:"fyvr11xz"},polygonDark:{conditions:{base:"fyvr11y5",active:"fyvr11y6",disabled:"fyvr11y7",focus:"fyvr11y8",hover:"fyvr11y9",checked:"fyvr11ya"},defaultClass:"fyvr11y5"},polygonLight:{conditions:{base:"fyvr11yb",active:"fyvr11yc",disabled:"fyvr11yd",focus:"fyvr11ye",hover:"fyvr11yf",checked:"fyvr11yg"},defaultClass:"fyvr11yb"},text100:{conditions:{base:"fyvr11yh",active:"fyvr11yi",disabled:"fyvr11yj",focus:"fyvr11yk",hover:"fyvr11yl",checked:"fyvr11ym"},defaultClass:"fyvr11yh"},text80:{conditions:{base:"fyvr11yn",active:"fyvr11yo",disabled:"fyvr11yp",focus:"fyvr11yq",hover:"fyvr11yr",checked:"fyvr11ys"},defaultClass:"fyvr11yn"},text50:{conditions:{base:"fyvr11yt",active:"fyvr11yu",disabled:"fyvr11yv",focus:"fyvr11yw",hover:"fyvr11yx",checked:"fyvr11yy"},defaultClass:"fyvr11yt"},textInverse100:{conditions:{base:"fyvr11yz",active:"fyvr11z0",disabled:"fyvr11z1",focus:"fyvr11z2",hover:"fyvr11z3",checked:"fyvr11z4"},defaultClass:"fyvr11yz"},backgroundPrimary:{conditions:{base:"fyvr11z5",active:"fyvr11z6",disabled:"fyvr11z7",focus:"fyvr11z8",hover:"fyvr11z9",checked:"fyvr11za"},defaultClass:"fyvr11z5"},backgroundSecondary:{conditions:{base:"fyvr11zb",active:"fyvr11zc",disabled:"fyvr11zd",focus:"fyvr11ze",hover:"fyvr11zf",checked:"fyvr11zg"},defaultClass:"fyvr11zb"},backgroundContrast:{conditions:{base:"fyvr11zh",active:"fyvr11zi",disabled:"fyvr11zj",focus:"fyvr11zk",hover:"fyvr11zl",checked:"fyvr11zm"},defaultClass:"fyvr11zh"},backgroundMuted:{conditions:{base:"fyvr11zn",active:"fyvr11zo",disabled:"fyvr11zp",focus:"fyvr11zq",hover:"fyvr11zr",checked:"fyvr11zs"},defaultClass:"fyvr11zn"},backgroundControl:{conditions:{base:"fyvr11zt",active:"fyvr11zu",disabled:"fyvr11zv",focus:"fyvr11zw",hover:"fyvr11zx",checked:"fyvr11zy"},defaultClass:"fyvr11zt"},backgroundInverse:{conditions:{base:"fyvr11zz",active:"fyvr1200",disabled:"fyvr1201",focus:"fyvr1202",hover:"fyvr1203",checked:"fyvr1204"},defaultClass:"fyvr11zz"},backgroundBackdrop:{conditions:{base:"fyvr1205",active:"fyvr1206",disabled:"fyvr1207",focus:"fyvr1208",hover:"fyvr1209",checked:"fyvr120a"},defaultClass:"fyvr1205"},backgroundOverlay:{conditions:{base:"fyvr120b",active:"fyvr120c",disabled:"fyvr120d",focus:"fyvr120e",hover:"fyvr120f",checked:"fyvr120g"},defaultClass:"fyvr120b"},backgroundRaised:{conditions:{base:"fyvr120h",active:"fyvr120i",disabled:"fyvr120j",focus:"fyvr120k",hover:"fyvr120l",checked:"fyvr120m"},defaultClass:"fyvr120h"},buttonGlass:{conditions:{base:"fyvr120n",active:"fyvr120o",disabled:"fyvr120p",focus:"fyvr120q",hover:"fyvr120r",checked:"fyvr120s"},defaultClass:"fyvr120n"},buttonEmphasis:{conditions:{base:"fyvr120t",active:"fyvr120u",disabled:"fyvr120v",focus:"fyvr120w",hover:"fyvr120x",checked:"fyvr120y"},defaultClass:"fyvr120t"},buttonInverse:{conditions:{base:"fyvr120z",active:"fyvr1210",disabled:"fyvr1211",focus:"fyvr1212",hover:"fyvr1213",checked:"fyvr1214"},defaultClass:"fyvr120z"},borderNormal:{conditions:{base:"fyvr1215",active:"fyvr1216",disabled:"fyvr1217",focus:"fyvr1218",hover:"fyvr1219",checked:"fyvr121a"},defaultClass:"fyvr1215"},borderFocus:{conditions:{base:"fyvr121b",active:"fyvr121c",disabled:"fyvr121d",focus:"fyvr121e",hover:"fyvr121f",checked:"fyvr121g"},defaultClass:"fyvr121b"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr121h",active:"fyvr121i",disabled:"fyvr121j",focus:"fyvr121k",hover:"fyvr121l",checked:"fyvr121m"},defaultClass:"fyvr121h"},dashed:{conditions:{base:"fyvr121n",active:"fyvr121o",disabled:"fyvr121p",focus:"fyvr121q",hover:"fyvr121r",checked:"fyvr121s"},defaultClass:"fyvr121n"},dotted:{conditions:{base:"fyvr121t",active:"fyvr121u",disabled:"fyvr121v",focus:"fyvr121w",hover:"fyvr121x",checked:"fyvr121y"},defaultClass:"fyvr121t"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr121z",active:"fyvr1220",disabled:"fyvr1221",focus:"fyvr1222",hover:"fyvr1223",checked:"fyvr1224"},defaultClass:"fyvr121z"},white:{conditions:{base:"fyvr1225",active:"fyvr1226",disabled:"fyvr1227",focus:"fyvr1228",hover:"fyvr1229",checked:"fyvr122a"},defaultClass:"fyvr1225"},inherit:{conditions:{base:"fyvr122b",active:"fyvr122c",disabled:"fyvr122d",focus:"fyvr122e",hover:"fyvr122f",checked:"fyvr122g"},defaultClass:"fyvr122b"},transparent:{conditions:{base:"fyvr122h",active:"fyvr122i",disabled:"fyvr122j",focus:"fyvr122k",hover:"fyvr122l",checked:"fyvr122m"},defaultClass:"fyvr122h"},positive:{conditions:{base:"fyvr122n",active:"fyvr122o",disabled:"fyvr122p",focus:"fyvr122q",hover:"fyvr122r",checked:"fyvr122s"},defaultClass:"fyvr122n"},negative:{conditions:{base:"fyvr122t",active:"fyvr122u",disabled:"fyvr122v",focus:"fyvr122w",hover:"fyvr122x",checked:"fyvr122y"},defaultClass:"fyvr122t"},info:{conditions:{base:"fyvr122z",active:"fyvr1230",disabled:"fyvr1231",focus:"fyvr1232",hover:"fyvr1233",checked:"fyvr1234"},defaultClass:"fyvr122z"},warning:{conditions:{base:"fyvr1235",active:"fyvr1236",disabled:"fyvr1237",focus:"fyvr1238",hover:"fyvr1239",checked:"fyvr123a"},defaultClass:"fyvr1235"},gradientBackdrop:{conditions:{base:"fyvr123b",active:"fyvr123c",disabled:"fyvr123d",focus:"fyvr123e",hover:"fyvr123f",checked:"fyvr123g"},defaultClass:"fyvr123b"},gradientPrimary:{conditions:{base:"fyvr123h",active:"fyvr123i",disabled:"fyvr123j",focus:"fyvr123k",hover:"fyvr123l",checked:"fyvr123m"},defaultClass:"fyvr123h"},gradientSecondary:{conditions:{base:"fyvr123n",active:"fyvr123o",disabled:"fyvr123p",focus:"fyvr123q",hover:"fyvr123r",checked:"fyvr123s"},defaultClass:"fyvr123n"},arbitrumDark:{conditions:{base:"fyvr123t",active:"fyvr123u",disabled:"fyvr123v",focus:"fyvr123w",hover:"fyvr123x",checked:"fyvr123y"},defaultClass:"fyvr123t"},arbitrumLight:{conditions:{base:"fyvr123z",active:"fyvr1240",disabled:"fyvr1241",focus:"fyvr1242",hover:"fyvr1243",checked:"fyvr1244"},defaultClass:"fyvr123z"},avalanceDark:{conditions:{base:"fyvr1245",active:"fyvr1246",disabled:"fyvr1247",focus:"fyvr1248",hover:"fyvr1249",checked:"fyvr124a"},defaultClass:"fyvr1245"},avalanceLight:{conditions:{base:"fyvr124b",active:"fyvr124c",disabled:"fyvr124d",focus:"fyvr124e",hover:"fyvr124f",checked:"fyvr124g"},defaultClass:"fyvr124b"},bscDark:{conditions:{base:"fyvr124h",active:"fyvr124i",disabled:"fyvr124j",focus:"fyvr124k",hover:"fyvr124l",checked:"fyvr124m"},defaultClass:"fyvr124h"},bscLight:{conditions:{base:"fyvr124n",active:"fyvr124o",disabled:"fyvr124p",focus:"fyvr124q",hover:"fyvr124r",checked:"fyvr124s"},defaultClass:"fyvr124n"},ethereumDark:{conditions:{base:"fyvr124t",active:"fyvr124u",disabled:"fyvr124v",focus:"fyvr124w",hover:"fyvr124x",checked:"fyvr124y"},defaultClass:"fyvr124t"},ethereumLight:{conditions:{base:"fyvr124z",active:"fyvr1250",disabled:"fyvr1251",focus:"fyvr1252",hover:"fyvr1253",checked:"fyvr1254"},defaultClass:"fyvr124z"},gnosisDark:{conditions:{base:"fyvr1255",active:"fyvr1256",disabled:"fyvr1257",focus:"fyvr1258",hover:"fyvr1259",checked:"fyvr125a"},defaultClass:"fyvr1255"},gnosisLight:{conditions:{base:"fyvr125b",active:"fyvr125c",disabled:"fyvr125d",focus:"fyvr125e",hover:"fyvr125f",checked:"fyvr125g"},defaultClass:"fyvr125b"},polygonDark:{conditions:{base:"fyvr125h",active:"fyvr125i",disabled:"fyvr125j",focus:"fyvr125k",hover:"fyvr125l",checked:"fyvr125m"},defaultClass:"fyvr125h"},polygonLight:{conditions:{base:"fyvr125n",active:"fyvr125o",disabled:"fyvr125p",focus:"fyvr125q",hover:"fyvr125r",checked:"fyvr125s"},defaultClass:"fyvr125n"},text100:{conditions:{base:"fyvr125t",active:"fyvr125u",disabled:"fyvr125v",focus:"fyvr125w",hover:"fyvr125x",checked:"fyvr125y"},defaultClass:"fyvr125t"},text80:{conditions:{base:"fyvr125z",active:"fyvr1260",disabled:"fyvr1261",focus:"fyvr1262",hover:"fyvr1263",checked:"fyvr1264"},defaultClass:"fyvr125z"},text50:{conditions:{base:"fyvr1265",active:"fyvr1266",disabled:"fyvr1267",focus:"fyvr1268",hover:"fyvr1269",checked:"fyvr126a"},defaultClass:"fyvr1265"},textInverse100:{conditions:{base:"fyvr126b",active:"fyvr126c",disabled:"fyvr126d",focus:"fyvr126e",hover:"fyvr126f",checked:"fyvr126g"},defaultClass:"fyvr126b"},backgroundPrimary:{conditions:{base:"fyvr126h",active:"fyvr126i",disabled:"fyvr126j",focus:"fyvr126k",hover:"fyvr126l",checked:"fyvr126m"},defaultClass:"fyvr126h"},backgroundSecondary:{conditions:{base:"fyvr126n",active:"fyvr126o",disabled:"fyvr126p",focus:"fyvr126q",hover:"fyvr126r",checked:"fyvr126s"},defaultClass:"fyvr126n"},backgroundContrast:{conditions:{base:"fyvr126t",active:"fyvr126u",disabled:"fyvr126v",focus:"fyvr126w",hover:"fyvr126x",checked:"fyvr126y"},defaultClass:"fyvr126t"},backgroundMuted:{conditions:{base:"fyvr126z",active:"fyvr1270",disabled:"fyvr1271",focus:"fyvr1272",hover:"fyvr1273",checked:"fyvr1274"},defaultClass:"fyvr126z"},backgroundControl:{conditions:{base:"fyvr1275",active:"fyvr1276",disabled:"fyvr1277",focus:"fyvr1278",hover:"fyvr1279",checked:"fyvr127a"},defaultClass:"fyvr1275"},backgroundInverse:{conditions:{base:"fyvr127b",active:"fyvr127c",disabled:"fyvr127d",focus:"fyvr127e",hover:"fyvr127f",checked:"fyvr127g"},defaultClass:"fyvr127b"},backgroundBackdrop:{conditions:{base:"fyvr127h",active:"fyvr127i",disabled:"fyvr127j",focus:"fyvr127k",hover:"fyvr127l",checked:"fyvr127m"},defaultClass:"fyvr127h"},backgroundOverlay:{conditions:{base:"fyvr127n",active:"fyvr127o",disabled:"fyvr127p",focus:"fyvr127q",hover:"fyvr127r",checked:"fyvr127s"},defaultClass:"fyvr127n"},backgroundRaised:{conditions:{base:"fyvr127t",active:"fyvr127u",disabled:"fyvr127v",focus:"fyvr127w",hover:"fyvr127x",checked:"fyvr127y"},defaultClass:"fyvr127t"},buttonGlass:{conditions:{base:"fyvr127z",active:"fyvr1280",disabled:"fyvr1281",focus:"fyvr1282",hover:"fyvr1283",checked:"fyvr1284"},defaultClass:"fyvr127z"},buttonEmphasis:{conditions:{base:"fyvr1285",active:"fyvr1286",disabled:"fyvr1287",focus:"fyvr1288",hover:"fyvr1289",checked:"fyvr128a"},defaultClass:"fyvr1285"},buttonInverse:{conditions:{base:"fyvr128b",active:"fyvr128c",disabled:"fyvr128d",focus:"fyvr128e",hover:"fyvr128f",checked:"fyvr128g"},defaultClass:"fyvr128b"},borderNormal:{conditions:{base:"fyvr128h",active:"fyvr128i",disabled:"fyvr128j",focus:"fyvr128k",hover:"fyvr128l",checked:"fyvr128m"},defaultClass:"fyvr128h"},borderFocus:{conditions:{base:"fyvr128n",active:"fyvr128o",disabled:"fyvr128p",focus:"fyvr128q",hover:"fyvr128r",checked:"fyvr128s"},defaultClass:"fyvr128n"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr128t",active:"fyvr128u",disabled:"fyvr128v",focus:"fyvr128w",hover:"fyvr128x",checked:"fyvr128y"},defaultClass:"fyvr128t"},dashed:{conditions:{base:"fyvr128z",active:"fyvr1290",disabled:"fyvr1291",focus:"fyvr1292",hover:"fyvr1293",checked:"fyvr1294"},defaultClass:"fyvr128z"},dotted:{conditions:{base:"fyvr1295",active:"fyvr1296",disabled:"fyvr1297",focus:"fyvr1298",hover:"fyvr1299",checked:"fyvr129a"},defaultClass:"fyvr1295"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr129b",active:"fyvr129c",disabled:"fyvr129d",focus:"fyvr129e",hover:"fyvr129f",checked:"fyvr129g"},defaultClass:"fyvr129b"},white:{conditions:{base:"fyvr129h",active:"fyvr129i",disabled:"fyvr129j",focus:"fyvr129k",hover:"fyvr129l",checked:"fyvr129m"},defaultClass:"fyvr129h"},inherit:{conditions:{base:"fyvr129n",active:"fyvr129o",disabled:"fyvr129p",focus:"fyvr129q",hover:"fyvr129r",checked:"fyvr129s"},defaultClass:"fyvr129n"},transparent:{conditions:{base:"fyvr129t",active:"fyvr129u",disabled:"fyvr129v",focus:"fyvr129w",hover:"fyvr129x",checked:"fyvr129y"},defaultClass:"fyvr129t"},positive:{conditions:{base:"fyvr129z",active:"fyvr12a0",disabled:"fyvr12a1",focus:"fyvr12a2",hover:"fyvr12a3",checked:"fyvr12a4"},defaultClass:"fyvr129z"},negative:{conditions:{base:"fyvr12a5",active:"fyvr12a6",disabled:"fyvr12a7",focus:"fyvr12a8",hover:"fyvr12a9",checked:"fyvr12aa"},defaultClass:"fyvr12a5"},info:{conditions:{base:"fyvr12ab",active:"fyvr12ac",disabled:"fyvr12ad",focus:"fyvr12ae",hover:"fyvr12af",checked:"fyvr12ag"},defaultClass:"fyvr12ab"},warning:{conditions:{base:"fyvr12ah",active:"fyvr12ai",disabled:"fyvr12aj",focus:"fyvr12ak",hover:"fyvr12al",checked:"fyvr12am"},defaultClass:"fyvr12ah"},gradientBackdrop:{conditions:{base:"fyvr12an",active:"fyvr12ao",disabled:"fyvr12ap",focus:"fyvr12aq",hover:"fyvr12ar",checked:"fyvr12as"},defaultClass:"fyvr12an"},gradientPrimary:{conditions:{base:"fyvr12at",active:"fyvr12au",disabled:"fyvr12av",focus:"fyvr12aw",hover:"fyvr12ax",checked:"fyvr12ay"},defaultClass:"fyvr12at"},gradientSecondary:{conditions:{base:"fyvr12az",active:"fyvr12b0",disabled:"fyvr12b1",focus:"fyvr12b2",hover:"fyvr12b3",checked:"fyvr12b4"},defaultClass:"fyvr12az"},arbitrumDark:{conditions:{base:"fyvr12b5",active:"fyvr12b6",disabled:"fyvr12b7",focus:"fyvr12b8",hover:"fyvr12b9",checked:"fyvr12ba"},defaultClass:"fyvr12b5"},arbitrumLight:{conditions:{base:"fyvr12bb",active:"fyvr12bc",disabled:"fyvr12bd",focus:"fyvr12be",hover:"fyvr12bf",checked:"fyvr12bg"},defaultClass:"fyvr12bb"},avalanceDark:{conditions:{base:"fyvr12bh",active:"fyvr12bi",disabled:"fyvr12bj",focus:"fyvr12bk",hover:"fyvr12bl",checked:"fyvr12bm"},defaultClass:"fyvr12bh"},avalanceLight:{conditions:{base:"fyvr12bn",active:"fyvr12bo",disabled:"fyvr12bp",focus:"fyvr12bq",hover:"fyvr12br",checked:"fyvr12bs"},defaultClass:"fyvr12bn"},bscDark:{conditions:{base:"fyvr12bt",active:"fyvr12bu",disabled:"fyvr12bv",focus:"fyvr12bw",hover:"fyvr12bx",checked:"fyvr12by"},defaultClass:"fyvr12bt"},bscLight:{conditions:{base:"fyvr12bz",active:"fyvr12c0",disabled:"fyvr12c1",focus:"fyvr12c2",hover:"fyvr12c3",checked:"fyvr12c4"},defaultClass:"fyvr12bz"},ethereumDark:{conditions:{base:"fyvr12c5",active:"fyvr12c6",disabled:"fyvr12c7",focus:"fyvr12c8",hover:"fyvr12c9",checked:"fyvr12ca"},defaultClass:"fyvr12c5"},ethereumLight:{conditions:{base:"fyvr12cb",active:"fyvr12cc",disabled:"fyvr12cd",focus:"fyvr12ce",hover:"fyvr12cf",checked:"fyvr12cg"},defaultClass:"fyvr12cb"},gnosisDark:{conditions:{base:"fyvr12ch",active:"fyvr12ci",disabled:"fyvr12cj",focus:"fyvr12ck",hover:"fyvr12cl",checked:"fyvr12cm"},defaultClass:"fyvr12ch"},gnosisLight:{conditions:{base:"fyvr12cn",active:"fyvr12co",disabled:"fyvr12cp",focus:"fyvr12cq",hover:"fyvr12cr",checked:"fyvr12cs"},defaultClass:"fyvr12cn"},polygonDark:{conditions:{base:"fyvr12ct",active:"fyvr12cu",disabled:"fyvr12cv",focus:"fyvr12cw",hover:"fyvr12cx",checked:"fyvr12cy"},defaultClass:"fyvr12ct"},polygonLight:{conditions:{base:"fyvr12cz",active:"fyvr12d0",disabled:"fyvr12d1",focus:"fyvr12d2",hover:"fyvr12d3",checked:"fyvr12d4"},defaultClass:"fyvr12cz"},text100:{conditions:{base:"fyvr12d5",active:"fyvr12d6",disabled:"fyvr12d7",focus:"fyvr12d8",hover:"fyvr12d9",checked:"fyvr12da"},defaultClass:"fyvr12d5"},text80:{conditions:{base:"fyvr12db",active:"fyvr12dc",disabled:"fyvr12dd",focus:"fyvr12de",hover:"fyvr12df",checked:"fyvr12dg"},defaultClass:"fyvr12db"},text50:{conditions:{base:"fyvr12dh",active:"fyvr12di",disabled:"fyvr12dj",focus:"fyvr12dk",hover:"fyvr12dl",checked:"fyvr12dm"},defaultClass:"fyvr12dh"},textInverse100:{conditions:{base:"fyvr12dn",active:"fyvr12do",disabled:"fyvr12dp",focus:"fyvr12dq",hover:"fyvr12dr",checked:"fyvr12ds"},defaultClass:"fyvr12dn"},backgroundPrimary:{conditions:{base:"fyvr12dt",active:"fyvr12du",disabled:"fyvr12dv",focus:"fyvr12dw",hover:"fyvr12dx",checked:"fyvr12dy"},defaultClass:"fyvr12dt"},backgroundSecondary:{conditions:{base:"fyvr12dz",active:"fyvr12e0",disabled:"fyvr12e1",focus:"fyvr12e2",hover:"fyvr12e3",checked:"fyvr12e4"},defaultClass:"fyvr12dz"},backgroundContrast:{conditions:{base:"fyvr12e5",active:"fyvr12e6",disabled:"fyvr12e7",focus:"fyvr12e8",hover:"fyvr12e9",checked:"fyvr12ea"},defaultClass:"fyvr12e5"},backgroundMuted:{conditions:{base:"fyvr12eb",active:"fyvr12ec",disabled:"fyvr12ed",focus:"fyvr12ee",hover:"fyvr12ef",checked:"fyvr12eg"},defaultClass:"fyvr12eb"},backgroundControl:{conditions:{base:"fyvr12eh",active:"fyvr12ei",disabled:"fyvr12ej",focus:"fyvr12ek",hover:"fyvr12el",checked:"fyvr12em"},defaultClass:"fyvr12eh"},backgroundInverse:{conditions:{base:"fyvr12en",active:"fyvr12eo",disabled:"fyvr12ep",focus:"fyvr12eq",hover:"fyvr12er",checked:"fyvr12es"},defaultClass:"fyvr12en"},backgroundBackdrop:{conditions:{base:"fyvr12et",active:"fyvr12eu",disabled:"fyvr12ev",focus:"fyvr12ew",hover:"fyvr12ex",checked:"fyvr12ey"},defaultClass:"fyvr12et"},backgroundOverlay:{conditions:{base:"fyvr12ez",active:"fyvr12f0",disabled:"fyvr12f1",focus:"fyvr12f2",hover:"fyvr12f3",checked:"fyvr12f4"},defaultClass:"fyvr12ez"},backgroundRaised:{conditions:{base:"fyvr12f5",active:"fyvr12f6",disabled:"fyvr12f7",focus:"fyvr12f8",hover:"fyvr12f9",checked:"fyvr12fa"},defaultClass:"fyvr12f5"},buttonGlass:{conditions:{base:"fyvr12fb",active:"fyvr12fc",disabled:"fyvr12fd",focus:"fyvr12fe",hover:"fyvr12ff",checked:"fyvr12fg"},defaultClass:"fyvr12fb"},buttonEmphasis:{conditions:{base:"fyvr12fh",active:"fyvr12fi",disabled:"fyvr12fj",focus:"fyvr12fk",hover:"fyvr12fl",checked:"fyvr12fm"},defaultClass:"fyvr12fh"},buttonInverse:{conditions:{base:"fyvr12fn",active:"fyvr12fo",disabled:"fyvr12fp",focus:"fyvr12fq",hover:"fyvr12fr",checked:"fyvr12fs"},defaultClass:"fyvr12fn"},borderNormal:{conditions:{base:"fyvr12ft",active:"fyvr12fu",disabled:"fyvr12fv",focus:"fyvr12fw",hover:"fyvr12fx",checked:"fyvr12fy"},defaultClass:"fyvr12ft"},borderFocus:{conditions:{base:"fyvr12fz",active:"fyvr12g0",disabled:"fyvr12g1",focus:"fyvr12g2",hover:"fyvr12g3",checked:"fyvr12g4"},defaultClass:"fyvr12fz"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12g5",active:"fyvr12g6",disabled:"fyvr12g7",focus:"fyvr12g8",hover:"fyvr12g9",checked:"fyvr12ga"},defaultClass:"fyvr12g5"},dashed:{conditions:{base:"fyvr12gb",active:"fyvr12gc",disabled:"fyvr12gd",focus:"fyvr12ge",hover:"fyvr12gf",checked:"fyvr12gg"},defaultClass:"fyvr12gb"},dotted:{conditions:{base:"fyvr12gh",active:"fyvr12gi",disabled:"fyvr12gj",focus:"fyvr12gk",hover:"fyvr12gl",checked:"fyvr12gm"},defaultClass:"fyvr12gh"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12gn",active:"fyvr12go",disabled:"fyvr12gp",focus:"fyvr12gq",hover:"fyvr12gr",checked:"fyvr12gs"},defaultClass:"fyvr12gn"},white:{conditions:{base:"fyvr12gt",active:"fyvr12gu",disabled:"fyvr12gv",focus:"fyvr12gw",hover:"fyvr12gx",checked:"fyvr12gy"},defaultClass:"fyvr12gt"},inherit:{conditions:{base:"fyvr12gz",active:"fyvr12h0",disabled:"fyvr12h1",focus:"fyvr12h2",hover:"fyvr12h3",checked:"fyvr12h4"},defaultClass:"fyvr12gz"},transparent:{conditions:{base:"fyvr12h5",active:"fyvr12h6",disabled:"fyvr12h7",focus:"fyvr12h8",hover:"fyvr12h9",checked:"fyvr12ha"},defaultClass:"fyvr12h5"},positive:{conditions:{base:"fyvr12hb",active:"fyvr12hc",disabled:"fyvr12hd",focus:"fyvr12he",hover:"fyvr12hf",checked:"fyvr12hg"},defaultClass:"fyvr12hb"},negative:{conditions:{base:"fyvr12hh",active:"fyvr12hi",disabled:"fyvr12hj",focus:"fyvr12hk",hover:"fyvr12hl",checked:"fyvr12hm"},defaultClass:"fyvr12hh"},info:{conditions:{base:"fyvr12hn",active:"fyvr12ho",disabled:"fyvr12hp",focus:"fyvr12hq",hover:"fyvr12hr",checked:"fyvr12hs"},defaultClass:"fyvr12hn"},warning:{conditions:{base:"fyvr12ht",active:"fyvr12hu",disabled:"fyvr12hv",focus:"fyvr12hw",hover:"fyvr12hx",checked:"fyvr12hy"},defaultClass:"fyvr12ht"},gradientBackdrop:{conditions:{base:"fyvr12hz",active:"fyvr12i0",disabled:"fyvr12i1",focus:"fyvr12i2",hover:"fyvr12i3",checked:"fyvr12i4"},defaultClass:"fyvr12hz"},gradientPrimary:{conditions:{base:"fyvr12i5",active:"fyvr12i6",disabled:"fyvr12i7",focus:"fyvr12i8",hover:"fyvr12i9",checked:"fyvr12ia"},defaultClass:"fyvr12i5"},gradientSecondary:{conditions:{base:"fyvr12ib",active:"fyvr12ic",disabled:"fyvr12id",focus:"fyvr12ie",hover:"fyvr12if",checked:"fyvr12ig"},defaultClass:"fyvr12ib"},arbitrumDark:{conditions:{base:"fyvr12ih",active:"fyvr12ii",disabled:"fyvr12ij",focus:"fyvr12ik",hover:"fyvr12il",checked:"fyvr12im"},defaultClass:"fyvr12ih"},arbitrumLight:{conditions:{base:"fyvr12in",active:"fyvr12io",disabled:"fyvr12ip",focus:"fyvr12iq",hover:"fyvr12ir",checked:"fyvr12is"},defaultClass:"fyvr12in"},avalanceDark:{conditions:{base:"fyvr12it",active:"fyvr12iu",disabled:"fyvr12iv",focus:"fyvr12iw",hover:"fyvr12ix",checked:"fyvr12iy"},defaultClass:"fyvr12it"},avalanceLight:{conditions:{base:"fyvr12iz",active:"fyvr12j0",disabled:"fyvr12j1",focus:"fyvr12j2",hover:"fyvr12j3",checked:"fyvr12j4"},defaultClass:"fyvr12iz"},bscDark:{conditions:{base:"fyvr12j5",active:"fyvr12j6",disabled:"fyvr12j7",focus:"fyvr12j8",hover:"fyvr12j9",checked:"fyvr12ja"},defaultClass:"fyvr12j5"},bscLight:{conditions:{base:"fyvr12jb",active:"fyvr12jc",disabled:"fyvr12jd",focus:"fyvr12je",hover:"fyvr12jf",checked:"fyvr12jg"},defaultClass:"fyvr12jb"},ethereumDark:{conditions:{base:"fyvr12jh",active:"fyvr12ji",disabled:"fyvr12jj",focus:"fyvr12jk",hover:"fyvr12jl",checked:"fyvr12jm"},defaultClass:"fyvr12jh"},ethereumLight:{conditions:{base:"fyvr12jn",active:"fyvr12jo",disabled:"fyvr12jp",focus:"fyvr12jq",hover:"fyvr12jr",checked:"fyvr12js"},defaultClass:"fyvr12jn"},gnosisDark:{conditions:{base:"fyvr12jt",active:"fyvr12ju",disabled:"fyvr12jv",focus:"fyvr12jw",hover:"fyvr12jx",checked:"fyvr12jy"},defaultClass:"fyvr12jt"},gnosisLight:{conditions:{base:"fyvr12jz",active:"fyvr12k0",disabled:"fyvr12k1",focus:"fyvr12k2",hover:"fyvr12k3",checked:"fyvr12k4"},defaultClass:"fyvr12jz"},polygonDark:{conditions:{base:"fyvr12k5",active:"fyvr12k6",disabled:"fyvr12k7",focus:"fyvr12k8",hover:"fyvr12k9",checked:"fyvr12ka"},defaultClass:"fyvr12k5"},polygonLight:{conditions:{base:"fyvr12kb",active:"fyvr12kc",disabled:"fyvr12kd",focus:"fyvr12ke",hover:"fyvr12kf",checked:"fyvr12kg"},defaultClass:"fyvr12kb"},text100:{conditions:{base:"fyvr12kh",active:"fyvr12ki",disabled:"fyvr12kj",focus:"fyvr12kk",hover:"fyvr12kl",checked:"fyvr12km"},defaultClass:"fyvr12kh"},text80:{conditions:{base:"fyvr12kn",active:"fyvr12ko",disabled:"fyvr12kp",focus:"fyvr12kq",hover:"fyvr12kr",checked:"fyvr12ks"},defaultClass:"fyvr12kn"},text50:{conditions:{base:"fyvr12kt",active:"fyvr12ku",disabled:"fyvr12kv",focus:"fyvr12kw",hover:"fyvr12kx",checked:"fyvr12ky"},defaultClass:"fyvr12kt"},textInverse100:{conditions:{base:"fyvr12kz",active:"fyvr12l0",disabled:"fyvr12l1",focus:"fyvr12l2",hover:"fyvr12l3",checked:"fyvr12l4"},defaultClass:"fyvr12kz"},backgroundPrimary:{conditions:{base:"fyvr12l5",active:"fyvr12l6",disabled:"fyvr12l7",focus:"fyvr12l8",hover:"fyvr12l9",checked:"fyvr12la"},defaultClass:"fyvr12l5"},backgroundSecondary:{conditions:{base:"fyvr12lb",active:"fyvr12lc",disabled:"fyvr12ld",focus:"fyvr12le",hover:"fyvr12lf",checked:"fyvr12lg"},defaultClass:"fyvr12lb"},backgroundContrast:{conditions:{base:"fyvr12lh",active:"fyvr12li",disabled:"fyvr12lj",focus:"fyvr12lk",hover:"fyvr12ll",checked:"fyvr12lm"},defaultClass:"fyvr12lh"},backgroundMuted:{conditions:{base:"fyvr12ln",active:"fyvr12lo",disabled:"fyvr12lp",focus:"fyvr12lq",hover:"fyvr12lr",checked:"fyvr12ls"},defaultClass:"fyvr12ln"},backgroundControl:{conditions:{base:"fyvr12lt",active:"fyvr12lu",disabled:"fyvr12lv",focus:"fyvr12lw",hover:"fyvr12lx",checked:"fyvr12ly"},defaultClass:"fyvr12lt"},backgroundInverse:{conditions:{base:"fyvr12lz",active:"fyvr12m0",disabled:"fyvr12m1",focus:"fyvr12m2",hover:"fyvr12m3",checked:"fyvr12m4"},defaultClass:"fyvr12lz"},backgroundBackdrop:{conditions:{base:"fyvr12m5",active:"fyvr12m6",disabled:"fyvr12m7",focus:"fyvr12m8",hover:"fyvr12m9",checked:"fyvr12ma"},defaultClass:"fyvr12m5"},backgroundOverlay:{conditions:{base:"fyvr12mb",active:"fyvr12mc",disabled:"fyvr12md",focus:"fyvr12me",hover:"fyvr12mf",checked:"fyvr12mg"},defaultClass:"fyvr12mb"},backgroundRaised:{conditions:{base:"fyvr12mh",active:"fyvr12mi",disabled:"fyvr12mj",focus:"fyvr12mk",hover:"fyvr12ml",checked:"fyvr12mm"},defaultClass:"fyvr12mh"},buttonGlass:{conditions:{base:"fyvr12mn",active:"fyvr12mo",disabled:"fyvr12mp",focus:"fyvr12mq",hover:"fyvr12mr",checked:"fyvr12ms"},defaultClass:"fyvr12mn"},buttonEmphasis:{conditions:{base:"fyvr12mt",active:"fyvr12mu",disabled:"fyvr12mv",focus:"fyvr12mw",hover:"fyvr12mx",checked:"fyvr12my"},defaultClass:"fyvr12mt"},buttonInverse:{conditions:{base:"fyvr12mz",active:"fyvr12n0",disabled:"fyvr12n1",focus:"fyvr12n2",hover:"fyvr12n3",checked:"fyvr12n4"},defaultClass:"fyvr12mz"},borderNormal:{conditions:{base:"fyvr12n5",active:"fyvr12n6",disabled:"fyvr12n7",focus:"fyvr12n8",hover:"fyvr12n9",checked:"fyvr12na"},defaultClass:"fyvr12n5"},borderFocus:{conditions:{base:"fyvr12nb",active:"fyvr12nc",disabled:"fyvr12nd",focus:"fyvr12ne",hover:"fyvr12nf",checked:"fyvr12ng"},defaultClass:"fyvr12nb"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12nh",active:"fyvr12ni",disabled:"fyvr12nj",focus:"fyvr12nk",hover:"fyvr12nl",checked:"fyvr12nm"},defaultClass:"fyvr12nh"},dashed:{conditions:{base:"fyvr12nn",active:"fyvr12no",disabled:"fyvr12np",focus:"fyvr12nq",hover:"fyvr12nr",checked:"fyvr12ns"},defaultClass:"fyvr12nn"},dotted:{conditions:{base:"fyvr12nt",active:"fyvr12nu",disabled:"fyvr12nv",focus:"fyvr12nw",hover:"fyvr12nx",checked:"fyvr12ny"},defaultClass:"fyvr12nt"}}},color:{values:{black:{conditions:{base:"fyvr12nz",active:"fyvr12o0",disabled:"fyvr12o1",focus:"fyvr12o2",hover:"fyvr12o3",checked:"fyvr12o4"},defaultClass:"fyvr12nz"},white:{conditions:{base:"fyvr12o5",active:"fyvr12o6",disabled:"fyvr12o7",focus:"fyvr12o8",hover:"fyvr12o9",checked:"fyvr12oa"},defaultClass:"fyvr12o5"},inherit:{conditions:{base:"fyvr12ob",active:"fyvr12oc",disabled:"fyvr12od",focus:"fyvr12oe",hover:"fyvr12of",checked:"fyvr12og"},defaultClass:"fyvr12ob"},transparent:{conditions:{base:"fyvr12oh",active:"fyvr12oi",disabled:"fyvr12oj",focus:"fyvr12ok",hover:"fyvr12ol",checked:"fyvr12om"},defaultClass:"fyvr12oh"},positive:{conditions:{base:"fyvr12on",active:"fyvr12oo",disabled:"fyvr12op",focus:"fyvr12oq",hover:"fyvr12or",checked:"fyvr12os"},defaultClass:"fyvr12on"},negative:{conditions:{base:"fyvr12ot",active:"fyvr12ou",disabled:"fyvr12ov",focus:"fyvr12ow",hover:"fyvr12ox",checked:"fyvr12oy"},defaultClass:"fyvr12ot"},info:{conditions:{base:"fyvr12oz",active:"fyvr12p0",disabled:"fyvr12p1",focus:"fyvr12p2",hover:"fyvr12p3",checked:"fyvr12p4"},defaultClass:"fyvr12oz"},warning:{conditions:{base:"fyvr12p5",active:"fyvr12p6",disabled:"fyvr12p7",focus:"fyvr12p8",hover:"fyvr12p9",checked:"fyvr12pa"},defaultClass:"fyvr12p5"},gradientBackdrop:{conditions:{base:"fyvr12pb",active:"fyvr12pc",disabled:"fyvr12pd",focus:"fyvr12pe",hover:"fyvr12pf",checked:"fyvr12pg"},defaultClass:"fyvr12pb"},gradientPrimary:{conditions:{base:"fyvr12ph",active:"fyvr12pi",disabled:"fyvr12pj",focus:"fyvr12pk",hover:"fyvr12pl",checked:"fyvr12pm"},defaultClass:"fyvr12ph"},gradientSecondary:{conditions:{base:"fyvr12pn",active:"fyvr12po",disabled:"fyvr12pp",focus:"fyvr12pq",hover:"fyvr12pr",checked:"fyvr12ps"},defaultClass:"fyvr12pn"},arbitrumDark:{conditions:{base:"fyvr12pt",active:"fyvr12pu",disabled:"fyvr12pv",focus:"fyvr12pw",hover:"fyvr12px",checked:"fyvr12py"},defaultClass:"fyvr12pt"},arbitrumLight:{conditions:{base:"fyvr12pz",active:"fyvr12q0",disabled:"fyvr12q1",focus:"fyvr12q2",hover:"fyvr12q3",checked:"fyvr12q4"},defaultClass:"fyvr12pz"},avalanceDark:{conditions:{base:"fyvr12q5",active:"fyvr12q6",disabled:"fyvr12q7",focus:"fyvr12q8",hover:"fyvr12q9",checked:"fyvr12qa"},defaultClass:"fyvr12q5"},avalanceLight:{conditions:{base:"fyvr12qb",active:"fyvr12qc",disabled:"fyvr12qd",focus:"fyvr12qe",hover:"fyvr12qf",checked:"fyvr12qg"},defaultClass:"fyvr12qb"},bscDark:{conditions:{base:"fyvr12qh",active:"fyvr12qi",disabled:"fyvr12qj",focus:"fyvr12qk",hover:"fyvr12ql",checked:"fyvr12qm"},defaultClass:"fyvr12qh"},bscLight:{conditions:{base:"fyvr12qn",active:"fyvr12qo",disabled:"fyvr12qp",focus:"fyvr12qq",hover:"fyvr12qr",checked:"fyvr12qs"},defaultClass:"fyvr12qn"},ethereumDark:{conditions:{base:"fyvr12qt",active:"fyvr12qu",disabled:"fyvr12qv",focus:"fyvr12qw",hover:"fyvr12qx",checked:"fyvr12qy"},defaultClass:"fyvr12qt"},ethereumLight:{conditions:{base:"fyvr12qz",active:"fyvr12r0",disabled:"fyvr12r1",focus:"fyvr12r2",hover:"fyvr12r3",checked:"fyvr12r4"},defaultClass:"fyvr12qz"},gnosisDark:{conditions:{base:"fyvr12r5",active:"fyvr12r6",disabled:"fyvr12r7",focus:"fyvr12r8",hover:"fyvr12r9",checked:"fyvr12ra"},defaultClass:"fyvr12r5"},gnosisLight:{conditions:{base:"fyvr12rb",active:"fyvr12rc",disabled:"fyvr12rd",focus:"fyvr12re",hover:"fyvr12rf",checked:"fyvr12rg"},defaultClass:"fyvr12rb"},polygonDark:{conditions:{base:"fyvr12rh",active:"fyvr12ri",disabled:"fyvr12rj",focus:"fyvr12rk",hover:"fyvr12rl",checked:"fyvr12rm"},defaultClass:"fyvr12rh"},polygonLight:{conditions:{base:"fyvr12rn",active:"fyvr12ro",disabled:"fyvr12rp",focus:"fyvr12rq",hover:"fyvr12rr",checked:"fyvr12rs"},defaultClass:"fyvr12rn"},text100:{conditions:{base:"fyvr12rt",active:"fyvr12ru",disabled:"fyvr12rv",focus:"fyvr12rw",hover:"fyvr12rx",checked:"fyvr12ry"},defaultClass:"fyvr12rt"},text80:{conditions:{base:"fyvr12rz",active:"fyvr12s0",disabled:"fyvr12s1",focus:"fyvr12s2",hover:"fyvr12s3",checked:"fyvr12s4"},defaultClass:"fyvr12rz"},text50:{conditions:{base:"fyvr12s5",active:"fyvr12s6",disabled:"fyvr12s7",focus:"fyvr12s8",hover:"fyvr12s9",checked:"fyvr12sa"},defaultClass:"fyvr12s5"},textInverse100:{conditions:{base:"fyvr12sb",active:"fyvr12sc",disabled:"fyvr12sd",focus:"fyvr12se",hover:"fyvr12sf",checked:"fyvr12sg"},defaultClass:"fyvr12sb"},backgroundPrimary:{conditions:{base:"fyvr12sh",active:"fyvr12si",disabled:"fyvr12sj",focus:"fyvr12sk",hover:"fyvr12sl",checked:"fyvr12sm"},defaultClass:"fyvr12sh"},backgroundSecondary:{conditions:{base:"fyvr12sn",active:"fyvr12so",disabled:"fyvr12sp",focus:"fyvr12sq",hover:"fyvr12sr",checked:"fyvr12ss"},defaultClass:"fyvr12sn"},backgroundContrast:{conditions:{base:"fyvr12st",active:"fyvr12su",disabled:"fyvr12sv",focus:"fyvr12sw",hover:"fyvr12sx",checked:"fyvr12sy"},defaultClass:"fyvr12st"},backgroundMuted:{conditions:{base:"fyvr12sz",active:"fyvr12t0",disabled:"fyvr12t1",focus:"fyvr12t2",hover:"fyvr12t3",checked:"fyvr12t4"},defaultClass:"fyvr12sz"},backgroundControl:{conditions:{base:"fyvr12t5",active:"fyvr12t6",disabled:"fyvr12t7",focus:"fyvr12t8",hover:"fyvr12t9",checked:"fyvr12ta"},defaultClass:"fyvr12t5"},backgroundInverse:{conditions:{base:"fyvr12tb",active:"fyvr12tc",disabled:"fyvr12td",focus:"fyvr12te",hover:"fyvr12tf",checked:"fyvr12tg"},defaultClass:"fyvr12tb"},backgroundBackdrop:{conditions:{base:"fyvr12th",active:"fyvr12ti",disabled:"fyvr12tj",focus:"fyvr12tk",hover:"fyvr12tl",checked:"fyvr12tm"},defaultClass:"fyvr12th"},backgroundOverlay:{conditions:{base:"fyvr12tn",active:"fyvr12to",disabled:"fyvr12tp",focus:"fyvr12tq",hover:"fyvr12tr",checked:"fyvr12ts"},defaultClass:"fyvr12tn"},backgroundRaised:{conditions:{base:"fyvr12tt",active:"fyvr12tu",disabled:"fyvr12tv",focus:"fyvr12tw",hover:"fyvr12tx",checked:"fyvr12ty"},defaultClass:"fyvr12tt"},buttonGlass:{conditions:{base:"fyvr12tz",active:"fyvr12u0",disabled:"fyvr12u1",focus:"fyvr12u2",hover:"fyvr12u3",checked:"fyvr12u4"},defaultClass:"fyvr12tz"},buttonEmphasis:{conditions:{base:"fyvr12u5",active:"fyvr12u6",disabled:"fyvr12u7",focus:"fyvr12u8",hover:"fyvr12u9",checked:"fyvr12ua"},defaultClass:"fyvr12u5"},buttonInverse:{conditions:{base:"fyvr12ub",active:"fyvr12uc",disabled:"fyvr12ud",focus:"fyvr12ue",hover:"fyvr12uf",checked:"fyvr12ug"},defaultClass:"fyvr12ub"},borderNormal:{conditions:{base:"fyvr12uh",active:"fyvr12ui",disabled:"fyvr12uj",focus:"fyvr12uk",hover:"fyvr12ul",checked:"fyvr12um"},defaultClass:"fyvr12uh"},borderFocus:{conditions:{base:"fyvr12un",active:"fyvr12uo",disabled:"fyvr12up",focus:"fyvr12uq",hover:"fyvr12ur",checked:"fyvr12us"},defaultClass:"fyvr12un"}}},cursor:{values:{default:{conditions:{base:"fyvr12ut",active:"fyvr12uu",disabled:"fyvr12uv",focus:"fyvr12uw",hover:"fyvr12ux",checked:"fyvr12uy"},defaultClass:"fyvr12ut"},pointer:{conditions:{base:"fyvr12uz",active:"fyvr12v0",disabled:"fyvr12v1",focus:"fyvr12v2",hover:"fyvr12v3",checked:"fyvr12v4"},defaultClass:"fyvr12uz"},text:{conditions:{base:"fyvr12v5",active:"fyvr12v6",disabled:"fyvr12v7",focus:"fyvr12v8",hover:"fyvr12v9",checked:"fyvr12va"},defaultClass:"fyvr12v5"}}},opacity:{values:{0:{conditions:{base:"fyvr12vb",active:"fyvr12vc",disabled:"fyvr12vd",focus:"fyvr12ve",hover:"fyvr12vf",checked:"fyvr12vg"},defaultClass:"fyvr12vb"},50:{conditions:{base:"fyvr12vh",active:"fyvr12vi",disabled:"fyvr12vj",focus:"fyvr12vk",hover:"fyvr12vl",checked:"fyvr12vm"},defaultClass:"fyvr12vh"},80:{conditions:{base:"fyvr12vn",active:"fyvr12vo",disabled:"fyvr12vp",focus:"fyvr12vq",hover:"fyvr12vr",checked:"fyvr12vs"},defaultClass:"fyvr12vn"},100:{conditions:{base:"fyvr12vt",active:"fyvr12vu",disabled:"fyvr12vv",focus:"fyvr12vw",hover:"fyvr12vx",checked:"fyvr12vy"},defaultClass:"fyvr12vt"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr12vz",active:"fyvr12w0",disabled:"fyvr12w1",focus:"fyvr12w2",hover:"fyvr12w3",checked:"fyvr12w4"},defaultClass:"fyvr12vz"},auto:{conditions:{base:"fyvr12w5",active:"fyvr12w6",disabled:"fyvr12w7",focus:"fyvr12w8",hover:"fyvr12w9",checked:"fyvr12wa"},defaultClass:"fyvr12w5"}}},outline:{values:{none:{conditions:{base:"fyvr12wb",active:"fyvr12wc",disabled:"fyvr12wd",focus:"fyvr12we",hover:"fyvr12wf",checked:"fyvr12wg"},defaultClass:"fyvr12wb"}}},boxShadow:{values:{none:{conditions:{base:"fyvr12wh",active:"fyvr12wi",disabled:"fyvr12wj",focus:"fyvr12wk",hover:"fyvr12wl",checked:"fyvr12wm"},defaultClass:"fyvr12wh"}}}}});const pM=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],qy=t=>(t.display||(t.display=Object.keys(t).some(e=>pM.includes(e))?"flex":void 0),D8(t));qy.properties=D8.properties;function L8(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e{const{as:r="div",sx:n={},className:i,...s}=t,o={},a={};for(const c in s)qy.properties.has(c)?o[c]=s[c]:a[c]=s[c];const l=qy({...o,...n});return S.createElement(r,{className:an(l,i),...a,ref:e})});var B8={exports:{}},wc={};/** * @license React * react-jsx-runtime.production.min.js * @@ -58,8 +58,8 @@ Error generating stack: `+s.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Z2;function CR(){if(Z2)return wc;Z2=1;var t=sr,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,c){var f,u={},h=null,y=null;c!==void 0&&(h=""+c),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(y=l.ref);for(f in l)n.call(l,f)&&!s.hasOwnProperty(f)&&(u[f]=l[f]);if(a&&a.defaultProps)for(f in l=a.defaultProps,l)u[f]===void 0&&(u[f]=l[f]);return{$$typeof:e,type:a,key:h,ref:y,props:u,_owner:i.current}}return wc.Fragment=r,wc.jsx=o,wc.jsxs=o,wc}V8.exports=CR();var Q=V8.exports;function AR(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ER(t){var e=AR(t,"string");return typeof e=="symbol"?e:String(e)}function SR(t,e,r){return e=ER(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ew(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function tw(t){for(var e=1;e{for(var n of Object.keys(t)){var i;if(t[n]!==((i=e[n])!==null&&i!==void 0?i:r[n]))return!1}return!0},Ft=t=>{var e=r=>{var n=t.defaultClassName,i=tw(tw({},t.defaultVariants),r);for(var s in i){var o,a=(o=i[s])!==null&&o!==void 0?o:t.defaultVariants[s];if(a!=null){var l=a;typeof l=="boolean"&&(l=l===!0?"true":"false");var c=t.variantClassNames[s][l];c&&(n+=" "+c)}}for(var[f,u]of t.compoundVariants)kR(f,i,t.defaultVariants)&&(n+=" "+u);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return rw(t.variantClassNames,r=>rw(r,n=>n.split(" ")[0]))}},e};Ft({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"fyvr11ot",warning:"fyvr11oz",success:"fyvr11oh",error:"fyvr11on"},size:{sm:"_1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr1wo fyvr1yk fyvr13w fyvr1e8",md:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ws fyvr1yo fyvr140 fyvr1ec",lg:"_1qxj1ib9 fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc fyvr1ww fyvr1ys fyvr144 fyvr1eg"}},defaultVariants:{},compoundVariants:[]});const nw=t=>{const{color:e="borderNormal",marginY:r="4",...n}=t;return Q.jsx(ue,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var _R=Ft({defaultClassName:"_1qxj1ib9",variantClassNames:{variant:{inherit:"fyvr11mu fyvr11e4 fyvr11gg fyvr11fg fyvr11ew",xlarge:"fyvr11mv fyvr11es fyvr11gc fyvr11fk fyvr11fc",large:"fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8",medium:"fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc",normal:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",small:"fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4",xsmall:"fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc",code:"fyvr11mw fyvr11eg fyvr11g0 fyvr11fk fyvr11f0"},ellipsis:{true:"fyvr11ls fyvr11m8 fyvr11n7 fyvr11mx"},italic:{true:"_1qxj1ibj"},underline:{true:"_1qxj1ibk"},uppercase:{true:"_1qxj1ibl"},capitalize:{true:"_1qxj1ibm"},hidden:{true:"_1qxj1ibn"}},defaultVariants:{},compoundVariants:[]});const Ut=E.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:i,hidden:s,italic:o,underline:a,children:l,ellipsis:c,uppercase:f,capitalize:u,...h}=t,y=vR[n];return Q.jsx(ue,{as:r,className:an(i,_R({hidden:s,ellipsis:c,italic:o,underline:a,uppercase:f,capitalize:u})),ref:e,...y,...h,children:l})});var TR=Ft({defaultClassName:"_140wn8ng fyvr11ls fyvr11m8 fyvr11n7 fyvr11ko fyvr11h0",variantClassNames:{variant:{base:"_140wn8nh",feature:"_140wn8ni fyvr11ph fyvr12o5",primary:"fyvr11pb fyvr12o5",glass:"fyvr11tt fyvr12rt",emphasis:"fyvr11tz fyvr12rt",raised:"fyvr11tn fyvr12rt",danger:"fyvr11on fyvr12o5",text:"_140wn8no _1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11ob fyvr12s5"},shape:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"fyvr12ut fyvr12vh",false:"fyvr12uz fyvr12vt fyvr12vr"},size:{xs:"_140wn8nt _1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr1ws fyvr1yo",sm:"_140wn8nu _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys",md:"_140wn8nv _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw",lg:"_140wn8nw _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw"},iconOnly:{true:"_140wn8nx"},hasLeftIcon:{true:"_140wn8ny"},hasRightIcon:{true:"_140wn8nz"},activeOutline:{light:"_140wn8n10",bold:"_140wn8n11"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8n12"],[{iconOnly:!0,size:"sm"},"_140wn8n13"],[{iconOnly:!0,size:"md"},"_140wn8n14"],[{iconOnly:!0,size:"lg"},"_140wn8n15"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n16"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n17"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n18"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n19"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n1a"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n1b"]]});const We=E.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:i,disabled:s=!1,display:o="inline-flex",fontWeight:a="bold",pending:l=!1,label:c,leftIcon:f,rightIcon:u,size:h="md",variant:y="glass",width:m="fit",shape:p="circle",type:S="button",...w}=t,A=f!==void 0&&c!==void 0,k=u!==void 0&&c!==void 0,I=f!==void 0&&c===void 0,R=h==="xs"?"xs":"sm";return Q.jsx(ue,{as:r,className:an(i,TR({activeOutline:n,disabled:s||l,hasLeftIcon:A,hasRightIcon:k,iconOnly:I,size:y==="text"?void 0:h,shape:y==="text"?void 0:p,variant:y})),disabled:s||l,display:o,fontWeight:a,ref:e,type:S,width:m,...w,children:I?Q.jsx(f,{size:R}):Q.jsxs(ue,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:h==="xs"?"1":"2",children:[Q.jsxs(ue,{justifyContent:"flex-start",alignItems:"center",gap:h==="xs"?"1":"2",children:[f&&Q.jsx(f,{size:R}),Q.jsx(Ut,{children:c})]}),u&&Q.jsx(u,{size:R})]})})});var PR=Ft({defaultClassName:"rhmai63",variantClassNames:{clickable:{true:"fyvr12vr fyvr12uz"},disabled:{true:"rhmai65"},outlined:{true:"fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12n5 fyvr12ft fyvr1215 fyvr128h fyvr12nh fyvr12g5 fyvr121h fyvr128t"},blur:{true:"fyvr11ms"}},defaultVariants:{},compoundVariants:[]});const IR=E.forwardRef((t,e)=>{const{className:r,children:n,clickable:i,outlined:s,disabled:o,blur:a,width:l="full",...c}=t;return Q.jsx(ue,{className:an(r,PR({clickable:i,outlined:s,disabled:o,blur:a})),background:s?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:l,ref:e,...c,children:n})});function qt(){return qt=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>MR(r,e))}function _t(...t){return E.useCallback(H8(...t),t)}function Dr(t,e=[]){let r=[];function n(s,o){const a=E.createContext(o),l=r.length;r=[...r,o];function c(u){const{scope:h,children:y,...m}=u,p=(h==null?void 0:h[t][l])||a,S=E.useMemo(()=>m,Object.values(m));return E.createElement(p.Provider,{value:S},y)}function f(u,h){const y=(h==null?void 0:h[t][l])||a,m=E.useContext(y);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,f]}const i=()=>{const s=r.map(o=>E.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return E.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[n,RR(i,...e)]}function RR(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(s)[`__scope${c}`];return{...a,...u}},{});return E.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function ge(t,e,{checkForDefaultPrevented:r=!0}={}){return function(i){if(t==null||t(i),r===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function Rn(t){const e=E.useRef(t);return E.useEffect(()=>{e.current=t}),E.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function ca({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,i]=NR({defaultProp:e,onChange:r}),s=t!==void 0,o=s?t:n,a=Rn(r),l=E.useCallback(c=>{if(s){const u=typeof c=="function"?c(t):c;u!==t&&a(u)}else i(c)},[s,t,i,a]);return[o,l]}function NR({defaultProp:t,onChange:e}){const r=E.useState(t),[n]=r,i=E.useRef(n),s=Rn(e);return E.useEffect(()=>{i.current!==n&&(s(n),i.current=n)},[n,i,s]),r}function dm(t){const e=E.useRef({value:t,previous:t});return E.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const gn=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{};function hm(t){const[e,r]=E.useState(void 0);return gn(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function OR(t,e){return E.useReducer((r,n)=>{const i=e[r][n];return i??r},t)}const vo=t=>{const{present:e,children:r}=t,n=DR(e),i=typeof r=="function"?r({present:n.isPresent}):E.Children.only(r),s=_t(n.ref,i.ref);return typeof r=="function"||n.isPresent?E.cloneElement(i,{ref:s}):null};vo.displayName="Presence";function DR(t){const[e,r]=E.useState(),n=E.useRef({}),i=E.useRef(t),s=E.useRef("none"),o=t?"mounted":"unmounted",[a,l]=OR(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const c=zu(n.current);s.current=a==="mounted"?c:"none"},[a]),gn(()=>{const c=n.current,f=i.current;if(f!==t){const h=s.current,y=zu(c);t?l("MOUNT"):y==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&h!==y?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),gn(()=>{if(e){const c=u=>{const y=zu(n.current).includes(u.animationName);u.target===e&&y&&ho.flushSync(()=>l("ANIMATION_END"))},f=u=>{u.target===e&&(s.current=zu(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:E.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function zu(t){return(t==null?void 0:t.animationName)||"none"}function xe(){return xe=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{children:r,...n}=t,i=E.Children.toArray(r),s=i.find(LR);if(s){const o=s.props.children,a=i.map(l=>l===s?E.Children.count(o)>1?E.Children.only(null):E.isValidElement(o)?o.props.children:null:l);return E.createElement(Gy,xe({},n,{ref:e}),E.isValidElement(o)?E.cloneElement(o,void 0,a):null)}return E.createElement(Gy,xe({},n,{ref:e}),r)});Nl.displayName="Slot";const Gy=E.forwardRef((t,e)=>{const{children:r,...n}=t;return E.isValidElement(r)?E.cloneElement(r,{...$R(n,r.props),ref:e?H8(e,r.ref):r.ref}):E.Children.count(r)>1?E.Children.only(null):null});Gy.displayName="SlotClone";const BR=({children:t})=>E.createElement(E.Fragment,null,t);function LR(t){return E.isValidElement(t)&&t.type===BR}function $R(t,e){const r={...e};for(const n in e){const i=t[n],s=e[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...a)=>{s(...a),i(...a)}:i&&(r[n]=i):n==="style"?r[n]={...i,...s}:n==="className"&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...t,...r}}const FR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],De=FR.reduce((t,e)=>{const r=E.forwardRef((n,i)=>{const{asChild:s,...o}=n,a=s?Nl:e;return E.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),E.createElement(a,qt({},o,{ref:i}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function vm(t,e){t&&ho.flushSync(()=>t.dispatchEvent(e))}const W8="Checkbox",[jR,oJ]=Dr(W8),[zR,UR]=jR(W8),VR=E.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,h]=E.useState(null),y=_t(e,k=>h(k)),m=E.useRef(!1),p=u?!!u.closest("form"):!0,[S=!1,w]=ca({prop:i,defaultProp:s,onChange:c}),A=E.useRef(S);return E.useEffect(()=>{const k=u==null?void 0:u.form;if(k){const I=()=>w(A.current);return k.addEventListener("reset",I),()=>k.removeEventListener("reset",I)}},[u,w]),E.createElement(zR,{scope:r,state:S,disabled:a},E.createElement(De.button,qt({type:"button",role:"checkbox","aria-checked":Yo(S)?"mixed":S,"aria-required":o,"data-state":q8(S),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:y,onKeyDown:ge(t.onKeyDown,k=>{k.key==="Enter"&&k.preventDefault()}),onClick:ge(t.onClick,k=>{w(I=>Yo(I)?!0:!I),p&&(m.current=k.isPropagationStopped(),m.current||k.stopPropagation())})})),p&&E.createElement(qR,{control:u,bubbles:!m.current,name:n,value:l,checked:S,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),HR="CheckboxIndicator",WR=E.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...i}=t,s=UR(HR,r);return E.createElement(vo,{present:n||Yo(s.state)||s.state===!0},E.createElement(De.span,qt({"data-state":q8(s.state),"data-disabled":s.disabled?"":void 0},i,{ref:e,style:{pointerEvents:"none",...t.style}})))}),qR=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=E.useRef(null),o=dm(r),a=hm(e);return E.useEffect(()=>{const l=s.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const h=new Event("click",{bubbles:n});l.indeterminate=Yo(r),u.call(l,Yo(r)?!1:r),l.dispatchEvent(h)}},[o,r,n]),E.createElement("input",qt({type:"checkbox","aria-hidden":!0,defaultChecked:Yo(r)?!1:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Yo(t){return t==="indeterminate"}function q8(t){return Yo(t)?"indeterminate":t?"checked":"unchecked"}const GR=VR,KR=WR;var JR=Ft({defaultClassName:"_43lu9r4",variantClassNames:{labelLocation:{top:"fyvr11kw fyvr11i4 fyvr118k fyvr11h0",left:"_43lu9r6 fyvr11ko fyvr11ic fyvr118k fyvr11h0",right:"_43lu9r7 fyvr11ko fyvr11ic fyvr118k fyvr11h0",hidden:"fyvr1188 fyvr11h0"}},defaultVariants:{},compoundVariants:[]});const Ql=t=>{const{id:e,label:r,description:n,labelLocation:i="top",children:s,...o}=t,a=()=>r||n?Q.jsxs(ue,{flexDirection:"column",gap:"0.5",children:[r&&Q.jsx(Ut,{variant:"small",color:"text100",hidden:i==="hidden",children:r}),n&&Q.jsx(Ut,{variant:"small",color:"text50",hidden:i==="hidden",children:n})]}):null;return Q.jsxs(ue,{as:"label",className:JR({labelLocation:i}),htmlFor:e,...o,children:[["left","top","hidden"].includes(i)&&a(),s,i==="right"&&a()]})};var Yl=Ft({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const QR=t=>Q.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Q.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),G8=({size:t="sm",...e})=>Q.jsx(ue,{as:QR,className:Yl({size:t}),...e}),YR=t=>Q.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Q.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m3.888 7.53 1.06-1.06 5.47 5.47 5.47-5.47 1.06 1.06-6.53 6.53-6.53-6.53Z",clipRule:"evenodd"})}),K8=({size:t="sm",...e})=>Q.jsx(ue,{as:YR,className:Yl({size:t}),...e}),XR=t=>Q.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Q.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.418 11.06 4.47 4.47 1.06-1.06L11.48 10l4.47-4.47-1.06-1.06-4.47 4.47-4.47-4.47-1.06 1.06L9.357 10l-4.47 4.47 1.06 1.06 4.47-4.47Z",clipRule:"evenodd"})}),ym=({size:t="sm",...e})=>Q.jsx(ue,{as:XR,className:Yl({size:t}),...e}),ZR=t=>Q.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Q.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.608 6.75h-5.19v-1.5h7.75V13h-1.5V7.81l-7.72 7.72-1.06-1.06 7.72-7.72Z",clipRule:"evenodd"})}),eN=({size:t="sm",...e})=>Q.jsx(ue,{as:ZR,className:Yl({size:t}),...e}),tN=t=>Q.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Q.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.918 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-.677 4.383a5.5 5.5 0 1 1 1.06-1.06l2.648 2.647-1.061 1.06-2.647-2.647Z",clipRule:"evenodd"})}),rN=({size:t="sm",...e})=>Q.jsx(ue,{as:tN,className:Yl({size:t}),...e}),nN=t=>Q.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Q.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m12.28 2.856-6.71 8.887h4.134l-1.424 6.2 6.887-8.71h-4.322l1.435-6.377Z",clipRule:"evenodd"})}),iN=({size:t="sm",...e})=>Q.jsx(ue,{as:nN,className:Yl({size:t}),...e});var sN=Ft({defaultClassName:"_1c9x66f1 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12nb fyvr12fz fyvr121b fyvr128n fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11h0 fyvr11ko fyvr11jg fyvr12vt fyvr12vr fyvr12vj fyvr12uz fyvr12uv",variantClassNames:{size:{sm:"_1c9x66f2",lg:"_1c9x66f3"}},defaultVariants:{},compoundVariants:[]}),oN=Ft({defaultClassName:"_1c9x66f5 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12rt fyvr11rz",variantClassNames:{size:{sm:"_1c9x66f6",lg:"_1c9x66f7"}},defaultVariants:{},compoundVariants:[]});const aN=({size:t="sm"})=>Q.jsx(KR,{className:oN({size:t}),children:Q.jsx(G8,{size:t})});E.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:i,label:s="",labelLocation:o="left",size:a="sm",...l}=t;return Q.jsx(Ql,{disabled:r,display:"flex",id:n??i,label:s,labelLocation:o,whiteSpace:"nowrap",children:Q.jsx(GR,{className:sN({size:a}),disabled:r,id:n??i,name:i,ref:e,...l,children:Q.jsx(aN,{})})})});sr.createContext(null);const lN=HS.useId||(()=>{});let cN=0;function Ws(t){const[e,r]=E.useState(lN());return gn(()=>{t||r(n=>n??String(cN++))},[t]),t||(e?`radix-${e}`:"")}const J8="Collapsible",[fN,aJ]=Dr(J8),[uN,pm]=fN(J8),dN=E.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:s,onOpenChange:o,...a}=t,[l=!1,c]=ca({prop:n,defaultProp:i,onChange:o});return E.createElement(uN,{scope:r,disabled:s,contentId:Ws(),open:l,onOpenToggle:E.useCallback(()=>c(f=>!f),[c])},E.createElement(De.div,qt({"data-state":gm(l),"data-disabled":s?"":void 0},a,{ref:e})))}),hN="CollapsibleTrigger",vN=E.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,i=pm(hN,r);return E.createElement(De.button,qt({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":gm(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},n,{ref:e,onClick:ge(t.onClick,i.onOpenToggle)}))}),Q8="CollapsibleContent",yN=E.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=pm(Q8,t.__scopeCollapsible);return E.createElement(vo,{present:r||i.open},({present:s})=>E.createElement(pN,qt({},n,{ref:e,present:s})))}),pN=E.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:i,...s}=t,o=pm(Q8,r),[a,l]=E.useState(n),c=E.useRef(null),f=_t(e,c),u=E.useRef(0),h=u.current,y=E.useRef(0),m=y.current,p=o.open||a,S=E.useRef(p),w=E.useRef();return E.useEffect(()=>{const A=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(A)},[]),gn(()=>{const A=c.current;if(A){w.current=w.current||{transitionDuration:A.style.transitionDuration,animationName:A.style.animationName},A.style.transitionDuration="0s",A.style.animationName="none";const k=A.getBoundingClientRect();u.current=k.height,y.current=k.width,S.current||(A.style.transitionDuration=w.current.transitionDuration,A.style.animationName=w.current.animationName),l(n)}},[o.open,n]),E.createElement(De.div,qt({"data-state":gm(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!p},s,{ref:f,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...t.style}}),p&&i)});function gm(t){return t?"open":"closed"}const gN=dN,mN=vN,xN=yN;var iw="64px",bN="_4j62fl4 fyvr1ww fyvr1ys fyvr1so fyvr1v0 fyvr128",wN="_4j62fl5",CN="_4j62fl0",AN="_4j62fl2 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11h0 fyvr11ko fyvr11ob fyvr128 fyvr12uz fyvr11n2";const EN=t=>{const{className:e,children:r,defaultOpen:n,onOpenChange:i,label:s,...o}=t,[a,l]=E.useState(n),c=f=>{l(f),i==null||i(f)};return Q.jsx(gN,{defaultOpen:n,onOpenChange:c,asChild:!0,children:Q.jsxs(ue,{as:yl.div,className:an(e,CN),initial:{height:n?"auto":iw},animate:{height:a?"auto":iw},transition:{ease:"easeOut",duration:.3},borderRadius:"md",background:"backgroundSecondary",position:"relative",overflow:"hidden",width:"full",...o,children:[Q.jsxs(mN,{className:AN,children:[Q.jsx(Ut,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:s}),Q.jsx(ue,{as:yl.div,position:"absolute",right:"0",marginRight:"4",initial:{rotate:n?180:0},animate:{rotate:a?180:0},transition:{ease:"linear",duration:.1},children:Q.jsx(K8,{className:wN,color:"text50"})})]}),Q.jsx(F8,{children:a&&Q.jsx(xN,{className:bN,asChild:!0,forceMount:!0,children:Q.jsx(yl.div,{initial:{opacity:n?1:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"easeOut",duration:.3},children:r})})})]})})};function kh(t){const e=t+"CollectionProvider",[r,n]=Dr(e),[i,s]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=y=>{const{scope:m,children:p}=y,S=sr.useRef(null),w=sr.useRef(new Map).current;return sr.createElement(i,{scope:m,itemMap:w,collectionRef:S},p)},a=t+"CollectionSlot",l=sr.forwardRef((y,m)=>{const{scope:p,children:S}=y,w=s(a,p),A=_t(m,w.collectionRef);return sr.createElement(Nl,{ref:A},S)}),c=t+"CollectionItemSlot",f="data-radix-collection-item",u=sr.forwardRef((y,m)=>{const{scope:p,children:S,...w}=y,A=sr.useRef(null),k=_t(m,A),I=s(c,p);return sr.useEffect(()=>(I.itemMap.set(A,{ref:A,...w}),()=>void I.itemMap.delete(A))),sr.createElement(Nl,{[f]:"",ref:k},S)});function h(y){const m=s(t+"CollectionConsumer",y);return sr.useCallback(()=>{const S=m.collectionRef.current;if(!S)return[];const w=Array.from(S.querySelectorAll(`[${f}]`));return Array.from(m.itemMap.values()).sort((I,R)=>w.indexOf(I.ref.current)-w.indexOf(R.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:o,Slot:l,ItemSlot:u},h,n]}const SN=E.createContext(void 0);function mm(t){const e=E.useContext(SN);return t||e||"ltr"}function kN(t,e=globalThis==null?void 0:globalThis.document){const r=Rn(t);E.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const Ky="dismissableLayer.update",_N="dismissableLayer.pointerDownOutside",TN="dismissableLayer.focusOutside";let sw;const PN=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xm=E.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=t,f=E.useContext(PN),[u,h]=E.useState(null),y=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,m]=E.useState({}),p=_t(e,j=>h(j)),S=Array.from(f.layers),[w]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),A=S.indexOf(w),k=u?S.indexOf(u):-1,I=f.layersWithOutsidePointerEventsDisabled.size>0,R=k>=A,F=IN(j=>{const K=j.target,J=[...f.branches].some(Z=>Z.contains(K));!R||J||(s==null||s(j),a==null||a(j),j.defaultPrevented||l==null||l())},y),z=MN(j=>{const K=j.target;[...f.branches].some(Z=>Z.contains(K))||(o==null||o(j),a==null||a(j),j.defaultPrevented||l==null||l())},y);return kN(j=>{k===f.layers.size-1&&(i==null||i(j),!j.defaultPrevented&&l&&(j.preventDefault(),l()))},y),E.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(sw=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),ow(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=sw)}},[u,y,n,f]),E.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),ow())},[u,f]),E.useEffect(()=>{const j=()=>m({});return document.addEventListener(Ky,j),()=>document.removeEventListener(Ky,j)},[]),E.createElement(De.div,xe({},c,{ref:p,style:{pointerEvents:I?R?"auto":"none":void 0,...t.style},onFocusCapture:ge(t.onFocusCapture,z.onFocusCapture),onBlurCapture:ge(t.onBlurCapture,z.onBlurCapture),onPointerDownCapture:ge(t.onPointerDownCapture,F.onPointerDownCapture)}))});function IN(t,e=globalThis==null?void 0:globalThis.document){const r=Rn(t),n=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let l=function(){Y8(_N,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function MN(t,e=globalThis==null?void 0:globalThis.document){const r=Rn(t),n=E.useRef(!1);return E.useEffect(()=>{const i=s=>{s.target&&!n.current&&Y8(TN,r,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ow(){const t=new CustomEvent(Ky);document.dispatchEvent(t)}function Y8(t,e,r,{discrete:n}){const i=r.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),n?vm(i,s):i.dispatchEvent(s)}const RN=xm;let sv=0;function X8(){E.useEffect(()=>{var t,e;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=r[0])!==null&&t!==void 0?t:aw()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:aw()),sv++,()=>{sv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),sv--}},[])}function aw(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}const ov="focusScope.autoFocusOnMount",av="focusScope.autoFocusOnUnmount",lw={bubbles:!1,cancelable:!0},Z8=E.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,l]=E.useState(null),c=Rn(i),f=Rn(s),u=E.useRef(null),h=_t(e,p=>l(p)),y=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(n){let p=function(k){if(y.paused||!a)return;const I=k.target;a.contains(I)?u.current=I:As(u.current,{select:!0})},S=function(k){if(y.paused||!a)return;const I=k.relatedTarget;I!==null&&(a.contains(I)||As(u.current,{select:!0}))},w=function(k){if(document.activeElement===document.body)for(const R of k)R.removedNodes.length>0&&As(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",S);const A=new MutationObserver(w);return a&&A.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",S),A.disconnect()}}},[n,a,y.paused]),E.useEffect(()=>{if(a){fw.add(y);const p=document.activeElement;if(!a.contains(p)){const w=new CustomEvent(ov,lw);a.addEventListener(ov,c),a.dispatchEvent(w),w.defaultPrevented||(NN($N(eC(a)),{select:!0}),document.activeElement===p&&As(a))}return()=>{a.removeEventListener(ov,c),setTimeout(()=>{const w=new CustomEvent(av,lw);a.addEventListener(av,f),a.dispatchEvent(w),w.defaultPrevented||As(p??document.body,{select:!0}),a.removeEventListener(av,f),fw.remove(y)},0)}}},[a,c,f,y]);const m=E.useCallback(p=>{if(!r&&!n||y.paused)return;const S=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,w=document.activeElement;if(S&&w){const A=p.currentTarget,[k,I]=ON(A);k&&I?!p.shiftKey&&w===I?(p.preventDefault(),r&&As(k,{select:!0})):p.shiftKey&&w===k&&(p.preventDefault(),r&&As(I,{select:!0})):w===A&&p.preventDefault()}},[r,n,y.paused]);return E.createElement(De.div,xe({tabIndex:-1},o,{ref:h,onKeyDown:m}))});function NN(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(As(n,{select:e}),document.activeElement!==r)return}function ON(t){const e=eC(t),r=cw(e,t),n=cw(e.reverse(),t);return[r,n]}function eC(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function cw(t,e){for(const r of t)if(!DN(r,{upTo:e}))return r}function DN(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function BN(t){return t instanceof HTMLInputElement&&"select"in t}function As(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&BN(t)&&e&&t.select()}}const fw=LN();function LN(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=uw(t,e),t.unshift(e)},remove(e){var r;t=uw(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function uw(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function $N(t){return t.filter(e=>e.tagName!=="A")}const FN=["top","right","bottom","left"],to=Math.min,un=Math.max,b0=Math.round,Uu=Math.floor,ro=t=>({x:t,y:t}),jN={left:"right",right:"left",bottom:"top",top:"bottom"},zN={start:"end",end:"start"};function Jy(t,e,r){return un(t,to(e,r))}function Zi(t,e){return typeof t=="function"?t(e):t}function es(t){return t.split("-")[0]}function Xl(t){return t.split("-")[1]}function bm(t){return t==="x"?"y":"x"}function wm(t){return t==="y"?"height":"width"}function Zl(t){return["top","bottom"].includes(es(t))?"y":"x"}function Cm(t){return bm(Zl(t))}function UN(t,e,r){r===void 0&&(r=!1);const n=Xl(t),i=Cm(t),s=wm(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=w0(o)),[o,w0(o)]}function VN(t){const e=w0(t);return[Qy(t),e,Qy(e)]}function Qy(t){return t.replace(/start|end/g,e=>zN[e])}function HN(t,e,r){const n=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?i:n:e?n:i;case"left":case"right":return e?s:o;default:return[]}}function WN(t,e,r,n){const i=Xl(t);let s=HN(es(t),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Qy)))),s}function w0(t){return t.replace(/left|right|bottom|top/g,e=>jN[e])}function qN(t){return{top:0,right:0,bottom:0,left:0,...t}}function tC(t){return typeof t!="number"?qN(t):{top:t,right:t,bottom:t,left:t}}function C0(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function dw(t,e,r){let{reference:n,floating:i}=t;const s=Zl(e),o=Cm(e),a=wm(o),l=es(e),c=s==="y",f=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,h=n[a]/2-i[a]/2;let y;switch(l){case"top":y={x:f,y:n.y-i.height};break;case"bottom":y={x:f,y:n.y+n.height};break;case"right":y={x:n.x+n.width,y:u};break;case"left":y={x:n.x-i.width,y:u};break;default:y={x:n.x,y:n.y}}switch(Xl(e)){case"start":y[o]-=h*(r&&c?-1:1);break;case"end":y[o]+=h*(r&&c?-1:1);break}return y}const GN=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=dw(c,n,l),h=n,y={},m=0;for(let p=0;p({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:f=0}=Zi(t,e)||{};if(c==null)return{};const u=tC(f),h={x:r,y:n},y=Cm(i),m=wm(y),p=await o.getDimensions(c),S=y==="y",w=S?"top":"left",A=S?"bottom":"right",k=S?"clientHeight":"clientWidth",I=s.reference[m]+s.reference[y]-h[y]-s.floating[m],R=h[y]-s.reference[y],F=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let z=F?F[k]:0;(!z||!await(o.isElement==null?void 0:o.isElement(F)))&&(z=a.floating[k]||s.floating[m]);const j=I/2-R/2,K=z/2-p[m]/2-1,J=to(u[w],K),Z=to(u[A],K),ie=J,L=z-p[m]-Z,v=z/2-p[m]/2+j,C=Jy(ie,v,L),P=!l.arrow&&Xl(i)!=null&&v!=C&&s.reference[m]/2-(vie<=0)){var K,J;const ie=(((K=s.flip)==null?void 0:K.index)||0)+1,L=R[ie];if(L)return{data:{index:ie,overflows:j},reset:{placement:L}};let v=(J=j.filter(C=>C.overflows[0]<=0).sort((C,P)=>C.overflows[1]-P.overflows[1])[0])==null?void 0:J.placement;if(!v)switch(y){case"bestFit":{var Z;const C=(Z=j.map(P=>[P.placement,P.overflows.filter(N=>N>0).reduce((N,b)=>N+b,0)]).sort((P,N)=>P[1]-N[1])[0])==null?void 0:Z[0];C&&(v=C);break}case"initialPlacement":v=a;break}if(i!==v)return{reset:{placement:v}}}return{}}}};function vw(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function yw(t){return FN.some(e=>t[e]>=0)}const JN=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...i}=Zi(t,e);switch(n){case"referenceHidden":{const s=await Df(e,{...i,elementContext:"reference"}),o=vw(s,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:yw(o)}}}case"escaped":{const s=await Df(e,{...i,altBoundary:!0}),o=vw(s,r.floating);return{data:{escapedOffsets:o,escaped:yw(o)}}}default:return{}}}}};async function QN(t,e){const{placement:r,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=es(r),a=Xl(r),l=Zl(r)==="y",c=["left","top"].includes(o)?-1:1,f=s&&l?-1:1,u=Zi(e,t);let{mainAxis:h,crossAxis:y,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&typeof m=="number"&&(y=a==="end"?m*-1:m),l?{x:y*f,y:h*c}:{x:h*c,y:y*f}}const YN=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,i=await QN(e,t);return{x:r+i.x,y:n+i.y,data:i}}}},XN=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:S=>{let{x:w,y:A}=S;return{x:w,y:A}}},...l}=Zi(t,e),c={x:r,y:n},f=await Df(e,l),u=Zl(es(i)),h=bm(u);let y=c[h],m=c[u];if(s){const S=h==="y"?"top":"left",w=h==="y"?"bottom":"right",A=y+f[S],k=y-f[w];y=Jy(A,y,k)}if(o){const S=u==="y"?"top":"left",w=u==="y"?"bottom":"right",A=m+f[S],k=m-f[w];m=Jy(A,m,k)}const p=a.fn({...e,[h]:y,[u]:m});return{...p,data:{x:p.x-r,y:p.y-n}}}}},ZN=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Zi(t,e),f={x:r,y:n},u=Zl(i),h=bm(u);let y=f[h],m=f[u];const p=Zi(a,e),S=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const k=h==="y"?"height":"width",I=s.reference[h]-s.floating[k]+S.mainAxis,R=s.reference[h]+s.reference[k]-S.mainAxis;yR&&(y=R)}if(c){var w,A;const k=h==="y"?"width":"height",I=["top","left"].includes(es(i)),R=s.reference[u]-s.floating[k]+(I&&((w=o.offset)==null?void 0:w[u])||0)+(I?0:S.crossAxis),F=s.reference[u]+s.reference[k]+(I?0:((A=o.offset)==null?void 0:A[u])||0)-(I?S.crossAxis:0);mF&&(m=F)}return{[h]:y,[u]:m}}}},eO=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:i,elements:s}=e,{apply:o=()=>{},...a}=Zi(t,e),l=await Df(e,a),c=es(r),f=Xl(r),u=Zl(r)==="y",{width:h,height:y}=n.floating;let m,p;c==="top"||c==="bottom"?(m=c,p=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(p=c,m=f==="end"?"top":"bottom");const S=y-l[m],w=h-l[p],A=!e.middlewareData.shift;let k=S,I=w;if(u){const F=h-l.left-l.right;I=f||A?to(w,F):F}else{const F=y-l.top-l.bottom;k=f||A?to(S,F):F}if(A&&!f){const F=un(l.left,0),z=un(l.right,0),j=un(l.top,0),K=un(l.bottom,0);u?I=h-2*(F!==0||z!==0?F+z:un(l.left,l.right)):k=y-2*(j!==0||K!==0?j+K:un(l.top,l.bottom))}await o({...e,availableWidth:I,availableHeight:k});const R=await i.getDimensions(s.floating);return h!==R.width||y!==R.height?{reset:{rects:!0}}:{}}}};function no(t){return rC(t)?(t.nodeName||"").toLowerCase():"#document"}function vn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function as(t){var e;return(e=(rC(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function rC(t){return t instanceof Node||t instanceof vn(t).Node}function ts(t){return t instanceof Element||t instanceof vn(t).Element}function ki(t){return t instanceof HTMLElement||t instanceof vn(t).HTMLElement}function pw(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof vn(t).ShadowRoot}function ou(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=Nn(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function tO(t){return["table","td","th"].includes(no(t))}function Am(t){const e=Em(),r=Nn(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(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 rO(t){let e=Ol(t);for(;ki(e)&&!_h(e);){if(Am(e))return e;e=Ol(e)}return null}function Em(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _h(t){return["html","body","#document"].includes(no(t))}function Nn(t){return vn(t).getComputedStyle(t)}function Th(t){return ts(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ol(t){if(no(t)==="html")return t;const e=t.assignedSlot||t.parentNode||pw(t)&&t.host||as(t);return pw(e)?e.host:e}function nC(t){const e=Ol(t);return _h(e)?t.ownerDocument?t.ownerDocument.body:t.body:ki(e)&&ou(e)?e:nC(e)}function Bf(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=nC(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=vn(i);return s?e.concat(o,o.visualViewport||[],ou(i)?i:[],o.frameElement&&r?Bf(o.frameElement):[]):e.concat(i,Bf(i,[],r))}function iC(t){const e=Nn(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=ki(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=b0(r)!==s||b0(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function Sm(t){return ts(t)?t:t.contextElement}function pl(t){const e=Sm(t);if(!ki(e))return ro(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:s}=iC(e);let o=(s?b0(r.width):r.width)/n,a=(s?b0(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const nO=ro(0);function sC(t){const e=vn(t);return!Em()||!e.visualViewport?nO:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function iO(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==vn(t)?!1:e}function fa(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=Sm(t);let o=ro(1);e&&(n?ts(n)&&(o=pl(n)):o=pl(t));const a=iO(s,r,n)?sC(s):ro(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,f=i.width/o.x,u=i.height/o.y;if(s){const h=vn(s),y=n&&ts(n)?vn(n):n;let m=h.frameElement;for(;m&&n&&y!==h;){const p=pl(m),S=m.getBoundingClientRect(),w=Nn(m),A=S.left+(m.clientLeft+parseFloat(w.paddingLeft))*p.x,k=S.top+(m.clientTop+parseFloat(w.paddingTop))*p.y;l*=p.x,c*=p.y,f*=p.x,u*=p.y,l+=A,c+=k,m=vn(m).frameElement}}return C0({width:f,height:u,x:l,y:c})}function sO(t){let{rect:e,offsetParent:r,strategy:n}=t;const i=ki(r),s=as(r);if(r===s)return e;let o={scrollLeft:0,scrollTop:0},a=ro(1);const l=ro(0);if((i||!i&&n!=="fixed")&&((no(r)!=="body"||ou(s))&&(o=Th(r)),ki(r))){const c=fa(r);a=pl(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}}function oO(t){return Array.from(t.getClientRects())}function oC(t){return fa(as(t)).left+Th(t).scrollLeft}function aO(t){const e=as(t),r=Th(t),n=t.ownerDocument.body,i=un(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=un(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+oC(t);const a=-r.scrollTop;return Nn(n).direction==="rtl"&&(o+=un(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}function lO(t,e){const r=vn(t),n=as(t),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=Em();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function cO(t,e){const r=fa(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,s=ki(t)?pl(t):ro(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,c=n*s.y;return{width:o,height:a,x:l,y:c}}function gw(t,e,r){let n;if(e==="viewport")n=lO(t,r);else if(e==="document")n=aO(as(t));else if(ts(e))n=cO(e,r);else{const i=sC(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return C0(n)}function aC(t,e){const r=Ol(t);return r===e||!ts(r)||_h(r)?!1:Nn(r).position==="fixed"||aC(r,e)}function fO(t,e){const r=e.get(t);if(r)return r;let n=Bf(t,[],!1).filter(a=>ts(a)&&no(a)!=="body"),i=null;const s=Nn(t).position==="fixed";let o=s?Ol(t):t;for(;ts(o)&&!_h(o);){const a=Nn(o),l=Am(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||ou(o)&&!l&&aC(t,o))?n=n.filter(f=>f!==o):i=a,o=Ol(o)}return e.set(t,n),n}function uO(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const o=[...r==="clippingAncestors"?fO(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,f)=>{const u=gw(e,f,i);return c.top=un(u.top,c.top),c.right=to(u.right,c.right),c.bottom=to(u.bottom,c.bottom),c.left=un(u.left,c.left),c},gw(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function dO(t){return iC(t)}function hO(t,e,r){const n=ki(e),i=as(e),s=r==="fixed",o=fa(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=ro(0);if(n||!n&&!s)if((no(e)!=="body"||ou(i))&&(a=Th(e)),n){const c=fa(e,!0,s,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else i&&(l.x=oC(i));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function mw(t,e){return!ki(t)||Nn(t).position==="fixed"?null:e?e(t):t.offsetParent}function lC(t,e){const r=vn(t);if(!ki(t))return r;let n=mw(t,e);for(;n&&tO(n)&&Nn(n).position==="static";)n=mw(n,e);return n&&(no(n)==="html"||no(n)==="body"&&Nn(n).position==="static"&&!Am(n))?r:n||rO(t)||r}const vO=async function(t){let{reference:e,floating:r,strategy:n}=t;const i=this.getOffsetParent||lC,s=this.getDimensions;return{reference:hO(e,await i(r),n),floating:{x:0,y:0,...await s(r)}}};function yO(t){return Nn(t).direction==="rtl"}const pO={convertOffsetParentRelativeRectToViewportRelativeRect:sO,getDocumentElement:as,getClippingRect:uO,getOffsetParent:lC,getElementRects:vO,getClientRects:oO,getDimensions:dO,getScale:pl,isElement:ts,isRTL:yO};function gO(t,e){let r=null,n;const i=as(t);function s(){clearTimeout(n),r&&r.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:f,width:u,height:h}=t.getBoundingClientRect();if(a||e(),!u||!h)return;const y=Uu(f),m=Uu(i.clientWidth-(c+u)),p=Uu(i.clientHeight-(f+h)),S=Uu(c),A={rootMargin:-y+"px "+-m+"px "+-p+"px "+-S+"px",threshold:un(0,to(1,l))||1};let k=!0;function I(R){const F=R[0].intersectionRatio;if(F!==l){if(!k)return o();F?o(!1,F):n=setTimeout(()=>{o(!1,1e-7)},100)}k=!1}try{r=new IntersectionObserver(I,{...A,root:i.ownerDocument})}catch{r=new IntersectionObserver(I,A)}r.observe(t)}return o(!0),s}function mO(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Sm(t),f=i||s?[...c?Bf(c):[],...Bf(e)]:[];f.forEach(w=>{i&&w.addEventListener("scroll",r,{passive:!0}),s&&w.addEventListener("resize",r)});const u=c&&a?gO(c,r):null;let h=-1,y=null;o&&(y=new ResizeObserver(w=>{let[A]=w;A&&A.target===c&&y&&(y.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{y&&y.observe(e)})),r()}),c&&!l&&y.observe(c),y.observe(e));let m,p=l?fa(t):null;l&&S();function S(){const w=fa(t);p&&(w.x!==p.x||w.y!==p.y||w.width!==p.width||w.height!==p.height)&&r(),p=w,m=requestAnimationFrame(S)}return r(),()=>{f.forEach(w=>{i&&w.removeEventListener("scroll",r),s&&w.removeEventListener("resize",r)}),u&&u(),y&&y.disconnect(),y=null,l&&cancelAnimationFrame(m)}}const xO=(t,e,r)=>{const n=new Map,i={platform:pO,...r},s={...i.platform,_c:n};return GN(t,e,{...i,platform:s})},bO=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:i}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?hw({element:n.current,padding:i}).fn(r):{}:n?hw({element:n,padding:i}).fn(r):{}}}};var md=typeof document<"u"?E.useLayoutEffect:E.useEffect;function A0(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!A0(t[n],e[n]))return!1;return!0}if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){const s=i[n];if(!(s==="_owner"&&t.$$typeof)&&!A0(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function cC(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function xw(t,e){const r=cC(t);return Math.round(e*r)/r}function bw(t){const e=E.useRef(t);return md(()=>{e.current=t}),e}function wO(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[f,u]=E.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[h,y]=E.useState(n);A0(h,n)||y(n);const[m,p]=E.useState(null),[S,w]=E.useState(null),A=E.useCallback(P=>{P!=F.current&&(F.current=P,p(P))},[p]),k=E.useCallback(P=>{P!==z.current&&(z.current=P,w(P))},[w]),I=s||m,R=o||S,F=E.useRef(null),z=E.useRef(null),j=E.useRef(f),K=bw(l),J=bw(i),Z=E.useCallback(()=>{if(!F.current||!z.current)return;const P={placement:e,strategy:r,middleware:h};J.current&&(P.platform=J.current),xO(F.current,z.current,P).then(N=>{const b={...N,isPositioned:!0};ie.current&&!A0(j.current,b)&&(j.current=b,ho.flushSync(()=>{u(b)}))})},[h,e,r,J]);md(()=>{c===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,u(P=>({...P,isPositioned:!1})))},[c]);const ie=E.useRef(!1);md(()=>(ie.current=!0,()=>{ie.current=!1}),[]),md(()=>{if(I&&(F.current=I),R&&(z.current=R),I&&R){if(K.current)return K.current(I,R,Z);Z()}},[I,R,Z,K]);const L=E.useMemo(()=>({reference:F,floating:z,setReference:A,setFloating:k}),[A,k]),v=E.useMemo(()=>({reference:I,floating:R}),[I,R]),C=E.useMemo(()=>{const P={position:r,left:0,top:0};if(!v.floating)return P;const N=xw(v.floating,f.x),b=xw(v.floating,f.y);return a?{...P,transform:"translate("+N+"px, "+b+"px)",...cC(v.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:N,top:b}},[r,a,v.floating,f.x,f.y]);return E.useMemo(()=>({...f,update:Z,refs:L,elements:v,floatingStyles:C}),[f,Z,L,v,C])}const fC="Popper",[uC,ec]=Dr(fC),[CO,dC]=uC(fC),AO=t=>{const{__scopePopper:e,children:r}=t,[n,i]=E.useState(null);return E.createElement(CO,{scope:e,anchor:n,onAnchorChange:i},r)},EO="PopperAnchor",SO=E.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...i}=t,s=dC(EO,r),o=E.useRef(null),a=_t(e,o);return E.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:E.createElement(De.div,xe({},i,{ref:a}))}),hC="PopperContent",[kO,lJ]=uC(hC),_O=E.forwardRef((t,e)=>{var r,n,i,s,o,a,l,c;const{__scopePopper:f,side:u="bottom",sideOffset:h=0,align:y="center",alignOffset:m=0,arrowPadding:p=0,avoidCollisions:S=!0,collisionBoundary:w=[],collisionPadding:A=0,sticky:k="partial",hideWhenDetached:I=!1,updatePositionStrategy:R="optimized",onPlaced:F,...z}=t,j=dC(hC,f),[K,J]=E.useState(null),Z=_t(e,fe=>J(fe)),[ie,L]=E.useState(null),v=hm(ie),C=(r=v==null?void 0:v.width)!==null&&r!==void 0?r:0,P=(n=v==null?void 0:v.height)!==null&&n!==void 0?n:0,N=u+(y!=="center"?"-"+y:""),b=typeof A=="number"?A:{top:0,right:0,bottom:0,left:0,...A},_=Array.isArray(w)?w:[w],M=_.length>0,g={padding:b,boundary:_.filter(TO),altBoundary:M},{refs:d,floatingStyles:T,placement:D,isPositioned:x,middlewareData:B}=wO({strategy:"fixed",placement:N,whileElementsMounted:(...fe)=>mO(...fe,{animationFrame:R==="always"}),elements:{reference:j.anchor},middleware:[YN({mainAxis:h+P,alignmentAxis:m}),S&&XN({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?ZN():void 0,...g}),S&&KN({...g}),eO({...g,apply:({elements:fe,rects:Tt,availableWidth:Me,availableHeight:Ee})=>{const{width:Pt,height:He}=Tt.reference,Be=fe.floating.style;Be.setProperty("--radix-popper-available-width",`${Me}px`),Be.setProperty("--radix-popper-available-height",`${Ee}px`),Be.setProperty("--radix-popper-anchor-width",`${Pt}px`),Be.setProperty("--radix-popper-anchor-height",`${He}px`)}}),ie&&bO({element:ie,padding:p}),PO({arrowWidth:C,arrowHeight:P}),I&&JN({strategy:"referenceHidden",...g})]}),[$,O]=vC(D),U=Rn(F);gn(()=>{x&&(U==null||U())},[x,U]);const W=(i=B.arrow)===null||i===void 0?void 0:i.x,H=(s=B.arrow)===null||s===void 0?void 0:s.y,G=((o=B.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[oe,re]=E.useState();return gn(()=>{K&&re(window.getComputedStyle(K).zIndex)},[K]),E.createElement("div",{ref:d.setFloating,"data-radix-popper-content-wrapper":"",style:{...T,transform:x?T.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[(a=B.transformOrigin)===null||a===void 0?void 0:a.x,(l=B.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},E.createElement(kO,{scope:f,placedSide:$,onArrowChange:L,arrowX:W,arrowY:H,shouldHideArrow:G},E.createElement(De.div,xe({"data-side":$,"data-align":O},z,{ref:Z,style:{...z.style,animation:x?void 0:"none",opacity:(c=B.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function TO(t){return t!==null}const PO=t=>({name:"transformOrigin",options:t,fn(e){var r,n,i,s,o;const{placement:a,rects:l,middlewareData:c}=e,u=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,h=u?0:t.arrowWidth,y=u?0:t.arrowHeight,[m,p]=vC(a),S={start:"0%",center:"50%",end:"100%"}[p],w=((n=(i=c.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+h/2,A=((s=(o=c.arrow)===null||o===void 0?void 0:o.y)!==null&&s!==void 0?s:0)+y/2;let k="",I="";return m==="bottom"?(k=u?S:`${w}px`,I=`${-y}px`):m==="top"?(k=u?S:`${w}px`,I=`${l.floating.height+y}px`):m==="right"?(k=`${-y}px`,I=u?S:`${A}px`):m==="left"&&(k=`${l.floating.width+y}px`,I=u?S:`${A}px`),{data:{x:k,y:I}}}});function vC(t){const[e,r="center"]=t.split("-");return[e,r]}const IO=AO,MO=SO,RO=_O,yC=E.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...i}=t;return n?eT.createPortal(E.createElement(De.div,xe({},i,{ref:e})),n):null}),lv="rovingFocusGroup.onEntryFocus",NO={bubbles:!1,cancelable:!0},km="RovingFocusGroup",[Yy,pC,OO]=kh(km),[DO,tc]=Dr(km,[OO]),[BO,LO]=DO(km),$O=E.forwardRef((t,e)=>E.createElement(Yy.Provider,{scope:t.__scopeRovingFocusGroup},E.createElement(Yy.Slot,{scope:t.__scopeRovingFocusGroup},E.createElement(FO,qt({},t,{ref:e}))))),FO=E.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,...f}=t,u=E.useRef(null),h=_t(e,u),y=mm(s),[m=null,p]=ca({prop:o,defaultProp:a,onChange:l}),[S,w]=E.useState(!1),A=Rn(c),k=pC(r),I=E.useRef(!1),[R,F]=E.useState(0);return E.useEffect(()=>{const z=u.current;if(z)return z.addEventListener(lv,A),()=>z.removeEventListener(lv,A)},[A]),E.createElement(BO,{scope:r,orientation:n,dir:y,loop:i,currentTabStopId:m,onItemFocus:E.useCallback(z=>p(z),[p]),onItemShiftTab:E.useCallback(()=>w(!0),[]),onFocusableItemAdd:E.useCallback(()=>F(z=>z+1),[]),onFocusableItemRemove:E.useCallback(()=>F(z=>z-1),[])},E.createElement(De.div,qt({tabIndex:S||R===0?-1:0,"data-orientation":n},f,{ref:h,style:{outline:"none",...t.style},onMouseDown:ge(t.onMouseDown,()=>{I.current=!0}),onFocus:ge(t.onFocus,z=>{const j=!I.current;if(z.target===z.currentTarget&&j&&!S){const K=new CustomEvent(lv,NO);if(z.currentTarget.dispatchEvent(K),!K.defaultPrevented){const J=k().filter(C=>C.focusable),Z=J.find(C=>C.active),ie=J.find(C=>C.id===m),v=[Z,ie,...J].filter(Boolean).map(C=>C.ref.current);gC(v)}}I.current=!1}),onBlur:ge(t.onBlur,()=>w(!1))})))}),jO="RovingFocusGroupItem",zO=E.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:s,...o}=t,a=Ws(),l=s||a,c=LO(jO,r),f=c.currentTabStopId===l,u=pC(r),{onFocusableItemAdd:h,onFocusableItemRemove:y}=c;return E.useEffect(()=>{if(n)return h(),()=>y()},[n,h,y]),E.createElement(Yy.ItemSlot,{scope:r,id:l,focusable:n,active:i},E.createElement(De.span,qt({tabIndex:f?0:-1,"data-orientation":c.orientation},o,{ref:e,onMouseDown:ge(t.onMouseDown,m=>{n?c.onItemFocus(l):m.preventDefault()}),onFocus:ge(t.onFocus,()=>c.onItemFocus(l)),onKeyDown:ge(t.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){c.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const p=HO(m,c.orientation,c.dir);if(p!==void 0){m.preventDefault();let w=u().filter(A=>A.focusable).map(A=>A.ref.current);if(p==="last")w.reverse();else if(p==="prev"||p==="next"){p==="prev"&&w.reverse();const A=w.indexOf(m.currentTarget);w=c.loop?WO(w,A+1):w.slice(A+1)}setTimeout(()=>gC(w))}})})))}),UO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function VO(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function HO(t,e,r){const n=VO(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return UO[n]}function gC(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function WO(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const qO=$O,mC=zO;var GO=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Ia=new WeakMap,Vu=new WeakMap,Hu={},cv=0,xC=function(t){return t&&(t.host||xC(t.parentNode))},KO=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=xC(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},JO=function(t,e,r,n){var i=KO(e,Array.isArray(t)?t:[t]);Hu[r]||(Hu[r]=new WeakMap);var s=Hu[r],o=[],a=new Set,l=new Set(i),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};i.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(h){if(a.has(h))f(h);else{var y=h.getAttribute(n),m=y!==null&&y!=="false",p=(Ia.get(h)||0)+1,S=(s.get(h)||0)+1;Ia.set(h,p),s.set(h,S),o.push(h),p===1&&m&&Vu.set(h,!0),S===1&&h.setAttribute(r,"true"),m||h.setAttribute(n,"true")}})};return f(e),a.clear(),cv++,function(){o.forEach(function(u){var h=Ia.get(u)-1,y=s.get(u)-1;Ia.set(u,h),s.set(u,y),h||(Vu.has(u)||u.removeAttribute(n),Vu.delete(u)),y||u.removeAttribute(r)}),cv--,cv||(Ia=new WeakMap,Ia=new WeakMap,Vu=new WeakMap,Hu={})}},bC=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),i=e||GO(t);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),JO(n,i,r,"aria-hidden")):function(){return null}},hi=function(){return hi=Object.assign||function(e){for(var r,n=1,i=arguments.length;n"u")return dD;var e=hD(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},yD=EC(),pD=function(t,e,r,n){var i=t.left,s=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` - .`.concat(YO,` { + */var Z2;function gM(){if(Z2)return wc;Z2=1;var t=sr,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,c){var f,u={},h=null,y=null;c!==void 0&&(h=""+c),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(y=l.ref);for(f in l)n.call(l,f)&&!s.hasOwnProperty(f)&&(u[f]=l[f]);if(a&&a.defaultProps)for(f in l=a.defaultProps,l)u[f]===void 0&&(u[f]=l[f]);return{$$typeof:e,type:a,key:h,ref:y,props:u,_owner:i.current}}return wc.Fragment=r,wc.jsx=o,wc.jsxs=o,wc}B8.exports=gM();var Y=B8.exports;function mM(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function xM(t){var e=mM(t,"string");return typeof e=="symbol"?e:String(e)}function bM(t,e,r){return e=xM(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ew(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function tw(t){for(var e=1;e{for(var n of Object.keys(t)){var i;if(t[n]!==((i=e[n])!==null&&i!==void 0?i:r[n]))return!1}return!0},Ft=t=>{var e=r=>{var n=t.defaultClassName,i=tw(tw({},t.defaultVariants),r);for(var s in i){var o,a=(o=i[s])!==null&&o!==void 0?o:t.defaultVariants[s];if(a!=null){var l=a;typeof l=="boolean"&&(l=l===!0?"true":"false");var c=t.variantClassNames[s][l];c&&(n+=" "+c)}}for(var[f,u]of t.compoundVariants)wM(f,i,t.defaultVariants)&&(n+=" "+u);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return rw(t.variantClassNames,r=>rw(r,n=>n.split(" ")[0]))}},e};Ft({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"fyvr11ot",warning:"fyvr11oz",success:"fyvr11oh",error:"fyvr11on"},size:{sm:"_1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr1wo fyvr1yk fyvr13w fyvr1e8",md:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ws fyvr1yo fyvr140 fyvr1ec",lg:"_1qxj1ib9 fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc fyvr1ww fyvr1ys fyvr144 fyvr1eg"}},defaultVariants:{},compoundVariants:[]});const nw=t=>{const{color:e="borderNormal",marginY:r="4",...n}=t;return Y.jsx(ue,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var CM=Ft({defaultClassName:"_1qxj1ib9",variantClassNames:{variant:{inherit:"fyvr11mu fyvr11e4 fyvr11gg fyvr11fg fyvr11ew",xlarge:"fyvr11mv fyvr11es fyvr11gc fyvr11fk fyvr11fc",large:"fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8",medium:"fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc",normal:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",small:"fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4",xsmall:"fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc",code:"fyvr11mw fyvr11eg fyvr11g0 fyvr11fk fyvr11f0"},ellipsis:{true:"fyvr11ls fyvr11m8 fyvr11n7 fyvr11mx"},italic:{true:"_1qxj1ibj"},underline:{true:"_1qxj1ibk"},uppercase:{true:"_1qxj1ibl"},capitalize:{true:"_1qxj1ibm"},hidden:{true:"_1qxj1ibn"}},defaultVariants:{},compoundVariants:[]});const Ut=S.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:i,hidden:s,italic:o,underline:a,children:l,ellipsis:c,uppercase:f,capitalize:u,...h}=t,y=cM[n];return Y.jsx(ue,{as:r,className:an(i,CM({hidden:s,ellipsis:c,italic:o,underline:a,uppercase:f,capitalize:u})),ref:e,...y,...h,children:l})});var EM=Ft({defaultClassName:"_140wn8ng fyvr11ls fyvr11m8 fyvr11n7 fyvr11ko fyvr11h0",variantClassNames:{variant:{base:"_140wn8nh",feature:"_140wn8ni fyvr11ph fyvr12o5",primary:"fyvr11pb fyvr12o5",glass:"fyvr11tt fyvr12rt",emphasis:"fyvr11tz fyvr12rt",raised:"fyvr11tn fyvr12rt",danger:"fyvr11on fyvr12o5",text:"_140wn8no _1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11ob fyvr12s5"},shape:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"fyvr12ut fyvr12vh",false:"fyvr12uz fyvr12vt fyvr12vr"},size:{xs:"_140wn8nt _1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr1ws fyvr1yo",sm:"_140wn8nu _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys",md:"_140wn8nv _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw",lg:"_140wn8nw _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw"},iconOnly:{true:"_140wn8nx"},hasLeftIcon:{true:"_140wn8ny"},hasRightIcon:{true:"_140wn8nz"},activeOutline:{light:"_140wn8n10",bold:"_140wn8n11"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8n12"],[{iconOnly:!0,size:"sm"},"_140wn8n13"],[{iconOnly:!0,size:"md"},"_140wn8n14"],[{iconOnly:!0,size:"lg"},"_140wn8n15"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n16"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n17"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n18"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n19"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n1a"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n1b"]]});const qe=S.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:i,disabled:s=!1,display:o="inline-flex",fontWeight:a="bold",pending:l=!1,label:c,leftIcon:f,rightIcon:u,size:h="md",variant:y="glass",width:m="fit",shape:p="circle",type:k="button",...w}=t,E=f!==void 0&&c!==void 0,A=u!==void 0&&c!==void 0,I=f!==void 0&&c===void 0,M=h==="xs"?"xs":"sm";return Y.jsx(ue,{as:r,className:an(i,EM({activeOutline:n,disabled:s||l,hasLeftIcon:E,hasRightIcon:A,iconOnly:I,size:y==="text"?void 0:h,shape:y==="text"?void 0:p,variant:y})),disabled:s||l,display:o,fontWeight:a,ref:e,type:k,width:m,...w,children:I?Y.jsx(f,{size:M}):Y.jsxs(ue,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:h==="xs"?"1":"2",children:[Y.jsxs(ue,{justifyContent:"flex-start",alignItems:"center",gap:h==="xs"?"1":"2",children:[f&&Y.jsx(f,{size:M}),Y.jsx(Ut,{children:c})]}),u&&Y.jsx(u,{size:M})]})})});var SM=Ft({defaultClassName:"rhmai63",variantClassNames:{clickable:{true:"fyvr12vr fyvr12uz"},disabled:{true:"rhmai65"},outlined:{true:"fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12n5 fyvr12ft fyvr1215 fyvr128h fyvr12nh fyvr12g5 fyvr121h fyvr128t"},blur:{true:"fyvr11ms"}},defaultVariants:{},compoundVariants:[]});const kM=S.forwardRef((t,e)=>{const{className:r,children:n,clickable:i,outlined:s,disabled:o,blur:a,width:l="full",...c}=t;return Y.jsx(ue,{className:an(r,SM({clickable:i,outlined:s,disabled:o,blur:a})),background:s?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:l,ref:e,...c,children:n})});function qt(){return qt=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>AM(r,e))}function Tt(...t){return S.useCallback(F8(...t),t)}function $r(t,e=[]){let r=[];function n(s,o){const a=S.createContext(o),l=r.length;r=[...r,o];function c(u){const{scope:h,children:y,...m}=u,p=(h==null?void 0:h[t][l])||a,k=S.useMemo(()=>m,Object.values(m));return S.createElement(p.Provider,{value:k},y)}function f(u,h){const y=(h==null?void 0:h[t][l])||a,m=S.useContext(y);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,f]}const i=()=>{const s=r.map(o=>S.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return S.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[n,_M(i,...e)]}function _M(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(s)[`__scope${c}`];return{...a,...u}},{});return S.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function ge(t,e,{checkForDefaultPrevented:r=!0}={}){return function(i){if(t==null||t(i),r===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function Mn(t){const e=S.useRef(t);return S.useEffect(()=>{e.current=t}),S.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function ca({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,i]=TM({defaultProp:e,onChange:r}),s=t!==void 0,o=s?t:n,a=Mn(r),l=S.useCallback(c=>{if(s){const u=typeof c=="function"?c(t):c;u!==t&&a(u)}else i(c)},[s,t,i,a]);return[o,l]}function TM({defaultProp:t,onChange:e}){const r=S.useState(t),[n]=r,i=S.useRef(n),s=Mn(e);return S.useEffect(()=>{i.current!==n&&(s(n),i.current=n)},[n,i,s]),r}function dm(t){const e=S.useRef({value:t,previous:t});return S.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const gn=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{};function hm(t){const[e,r]=S.useState(void 0);return gn(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function PM(t,e){return S.useReducer((r,n)=>{const i=e[r][n];return i??r},t)}const vo=t=>{const{present:e,children:r}=t,n=IM(e),i=typeof r=="function"?r({present:n.isPresent}):S.Children.only(r),s=Tt(n.ref,i.ref);return typeof r=="function"||n.isPresent?S.cloneElement(i,{ref:s}):null};vo.displayName="Presence";function IM(t){const[e,r]=S.useState(),n=S.useRef({}),i=S.useRef(t),s=S.useRef("none"),o=t?"mounted":"unmounted",[a,l]=PM(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const c=zu(n.current);s.current=a==="mounted"?c:"none"},[a]),gn(()=>{const c=n.current,f=i.current;if(f!==t){const h=s.current,y=zu(c);t?l("MOUNT"):y==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&h!==y?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),gn(()=>{if(e){const c=u=>{const y=zu(n.current).includes(u.animationName);u.target===e&&y&&ho.flushSync(()=>l("ANIMATION_END"))},f=u=>{u.target===e&&(s.current=zu(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:S.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function zu(t){return(t==null?void 0:t.animationName)||"none"}function xe(){return xe=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{children:r,...n}=t,i=S.Children.toArray(r),s=i.find(MM);if(s){const o=s.props.children,a=i.map(l=>l===s?S.Children.count(o)>1?S.Children.only(null):S.isValidElement(o)?o.props.children:null:l);return S.createElement(Gy,xe({},n,{ref:e}),S.isValidElement(o)?S.cloneElement(o,void 0,a):null)}return S.createElement(Gy,xe({},n,{ref:e}),r)});Nl.displayName="Slot";const Gy=S.forwardRef((t,e)=>{const{children:r,...n}=t;return S.isValidElement(r)?S.cloneElement(r,{...NM(n,r.props),ref:e?F8(e,r.ref):r.ref}):S.Children.count(r)>1?S.Children.only(null):null});Gy.displayName="SlotClone";const RM=({children:t})=>S.createElement(S.Fragment,null,t);function MM(t){return S.isValidElement(t)&&t.type===RM}function NM(t,e){const r={...e};for(const n in e){const i=t[n],s=e[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...a)=>{s(...a),i(...a)}:i&&(r[n]=i):n==="style"?r[n]={...i,...s}:n==="className"&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...t,...r}}const OM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],$e=OM.reduce((t,e)=>{const r=S.forwardRef((n,i)=>{const{asChild:s,...o}=n,a=s?Nl:e;return S.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),S.createElement(a,qt({},o,{ref:i}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function vm(t,e){t&&ho.flushSync(()=>t.dispatchEvent(e))}const j8="Checkbox",[$M,QK]=$r(j8),[DM,LM]=$M(j8),BM=S.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,h]=S.useState(null),y=Tt(e,A=>h(A)),m=S.useRef(!1),p=u?!!u.closest("form"):!0,[k=!1,w]=ca({prop:i,defaultProp:s,onChange:c}),E=S.useRef(k);return S.useEffect(()=>{const A=u==null?void 0:u.form;if(A){const I=()=>w(E.current);return A.addEventListener("reset",I),()=>A.removeEventListener("reset",I)}},[u,w]),S.createElement(DM,{scope:r,state:k,disabled:a},S.createElement($e.button,qt({type:"button",role:"checkbox","aria-checked":Qo(k)?"mixed":k,"aria-required":o,"data-state":z8(k),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:y,onKeyDown:ge(t.onKeyDown,A=>{A.key==="Enter"&&A.preventDefault()}),onClick:ge(t.onClick,A=>{w(I=>Qo(I)?!0:!I),p&&(m.current=A.isPropagationStopped(),m.current||A.stopPropagation())})})),p&&S.createElement(zM,{control:u,bubbles:!m.current,name:n,value:l,checked:k,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),FM="CheckboxIndicator",jM=S.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...i}=t,s=LM(FM,r);return S.createElement(vo,{present:n||Qo(s.state)||s.state===!0},S.createElement($e.span,qt({"data-state":z8(s.state),"data-disabled":s.disabled?"":void 0},i,{ref:e,style:{pointerEvents:"none",...t.style}})))}),zM=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=S.useRef(null),o=dm(r),a=hm(e);return S.useEffect(()=>{const l=s.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const h=new Event("click",{bubbles:n});l.indeterminate=Qo(r),u.call(l,Qo(r)?!1:r),l.dispatchEvent(h)}},[o,r,n]),S.createElement("input",qt({type:"checkbox","aria-hidden":!0,defaultChecked:Qo(r)?!1:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Qo(t){return t==="indeterminate"}function z8(t){return Qo(t)?"indeterminate":t?"checked":"unchecked"}const UM=BM,VM=jM;var HM=Ft({defaultClassName:"_43lu9r4",variantClassNames:{labelLocation:{top:"fyvr11kw fyvr11i4 fyvr118k fyvr11h0",left:"_43lu9r6 fyvr11ko fyvr11ic fyvr118k fyvr11h0",right:"_43lu9r7 fyvr11ko fyvr11ic fyvr118k fyvr11h0",hidden:"fyvr1188 fyvr11h0"}},defaultVariants:{},compoundVariants:[]});const Yl=t=>{const{id:e,label:r,description:n,labelLocation:i="top",children:s,...o}=t,a=()=>r||n?Y.jsxs(ue,{flexDirection:"column",gap:"0.5",children:[r&&Y.jsx(Ut,{variant:"small",color:"text100",hidden:i==="hidden",children:r}),n&&Y.jsx(Ut,{variant:"small",color:"text50",hidden:i==="hidden",children:n})]}):null;return Y.jsxs(ue,{as:"label",className:HM({labelLocation:i}),htmlFor:e,...o,children:[["left","top","hidden"].includes(i)&&a(),s,i==="right"&&a()]})};var Ql=Ft({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const WM=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),U8=({size:t="sm",...e})=>Y.jsx(ue,{as:WM,className:Ql({size:t}),...e}),qM=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m3.888 7.53 1.06-1.06 5.47 5.47 5.47-5.47 1.06 1.06-6.53 6.53-6.53-6.53Z",clipRule:"evenodd"})}),V8=({size:t="sm",...e})=>Y.jsx(ue,{as:qM,className:Ql({size:t}),...e}),GM=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.418 11.06 4.47 4.47 1.06-1.06L11.48 10l4.47-4.47-1.06-1.06-4.47 4.47-4.47-4.47-1.06 1.06L9.357 10l-4.47 4.47 1.06 1.06 4.47-4.47Z",clipRule:"evenodd"})}),ym=({size:t="sm",...e})=>Y.jsx(ue,{as:GM,className:Ql({size:t}),...e}),KM=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.608 6.75h-5.19v-1.5h7.75V13h-1.5V7.81l-7.72 7.72-1.06-1.06 7.72-7.72Z",clipRule:"evenodd"})}),JM=({size:t="sm",...e})=>Y.jsx(ue,{as:KM,className:Ql({size:t}),...e}),YM=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.918 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-.677 4.383a5.5 5.5 0 1 1 1.06-1.06l2.648 2.647-1.061 1.06-2.647-2.647Z",clipRule:"evenodd"})}),QM=({size:t="sm",...e})=>Y.jsx(ue,{as:YM,className:Ql({size:t}),...e}),XM=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m12.28 2.856-6.71 8.887h4.134l-1.424 6.2 6.887-8.71h-4.322l1.435-6.377Z",clipRule:"evenodd"})}),ZM=({size:t="sm",...e})=>Y.jsx(ue,{as:XM,className:Ql({size:t}),...e});var eN=Ft({defaultClassName:"_1c9x66f1 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12nb fyvr12fz fyvr121b fyvr128n fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11h0 fyvr11ko fyvr11jg fyvr12vt fyvr12vr fyvr12vj fyvr12uz fyvr12uv",variantClassNames:{size:{sm:"_1c9x66f2",lg:"_1c9x66f3"}},defaultVariants:{},compoundVariants:[]}),tN=Ft({defaultClassName:"_1c9x66f5 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12rt fyvr11rz",variantClassNames:{size:{sm:"_1c9x66f6",lg:"_1c9x66f7"}},defaultVariants:{},compoundVariants:[]});const rN=({size:t="sm"})=>Y.jsx(VM,{className:tN({size:t}),children:Y.jsx(U8,{size:t})});S.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:i,label:s="",labelLocation:o="left",size:a="sm",...l}=t;return Y.jsx(Yl,{disabled:r,display:"flex",id:n??i,label:s,labelLocation:o,whiteSpace:"nowrap",children:Y.jsx(UM,{className:eN({size:a}),disabled:r,id:n??i,name:i,ref:e,...l,children:Y.jsx(rN,{})})})});sr.createContext(null);const nN=Fk.useId||(()=>{});let iN=0;function Ws(t){const[e,r]=S.useState(nN());return gn(()=>{t||r(n=>n??String(iN++))},[t]),t||(e?`radix-${e}`:"")}const H8="Collapsible",[sN,XK]=$r(H8),[oN,pm]=sN(H8),aN=S.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:s,onOpenChange:o,...a}=t,[l=!1,c]=ca({prop:n,defaultProp:i,onChange:o});return S.createElement(oN,{scope:r,disabled:s,contentId:Ws(),open:l,onOpenToggle:S.useCallback(()=>c(f=>!f),[c])},S.createElement($e.div,qt({"data-state":gm(l),"data-disabled":s?"":void 0},a,{ref:e})))}),lN="CollapsibleTrigger",cN=S.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,i=pm(lN,r);return S.createElement($e.button,qt({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":gm(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},n,{ref:e,onClick:ge(t.onClick,i.onOpenToggle)}))}),W8="CollapsibleContent",fN=S.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=pm(W8,t.__scopeCollapsible);return S.createElement(vo,{present:r||i.open},({present:s})=>S.createElement(uN,qt({},n,{ref:e,present:s})))}),uN=S.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:i,...s}=t,o=pm(W8,r),[a,l]=S.useState(n),c=S.useRef(null),f=Tt(e,c),u=S.useRef(0),h=u.current,y=S.useRef(0),m=y.current,p=o.open||a,k=S.useRef(p),w=S.useRef();return S.useEffect(()=>{const E=requestAnimationFrame(()=>k.current=!1);return()=>cancelAnimationFrame(E)},[]),gn(()=>{const E=c.current;if(E){w.current=w.current||{transitionDuration:E.style.transitionDuration,animationName:E.style.animationName},E.style.transitionDuration="0s",E.style.animationName="none";const A=E.getBoundingClientRect();u.current=A.height,y.current=A.width,k.current||(E.style.transitionDuration=w.current.transitionDuration,E.style.animationName=w.current.animationName),l(n)}},[o.open,n]),S.createElement($e.div,qt({"data-state":gm(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!p},s,{ref:f,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...t.style}}),p&&i)});function gm(t){return t?"open":"closed"}const dN=aN,hN=cN,vN=fN;var iw="64px",yN="_4j62fl4 fyvr1ww fyvr1ys fyvr1so fyvr1v0 fyvr128",pN="_4j62fl5",gN="_4j62fl0",mN="_4j62fl2 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11h0 fyvr11ko fyvr11ob fyvr128 fyvr12uz fyvr11n2";const xN=t=>{const{className:e,children:r,defaultOpen:n,onOpenChange:i,label:s,...o}=t,[a,l]=S.useState(n),c=f=>{l(f),i==null||i(f)};return Y.jsx(dN,{defaultOpen:n,onOpenChange:c,asChild:!0,children:Y.jsxs(ue,{as:yl.div,className:an(e,gN),initial:{height:n?"auto":iw},animate:{height:a?"auto":iw},transition:{ease:"easeOut",duration:.3},borderRadius:"md",background:"backgroundSecondary",position:"relative",overflow:"hidden",width:"full",...o,children:[Y.jsxs(hN,{className:mN,children:[Y.jsx(Ut,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:s}),Y.jsx(ue,{as:yl.div,position:"absolute",right:"0",marginRight:"4",initial:{rotate:n?180:0},animate:{rotate:a?180:0},transition:{ease:"linear",duration:.1},children:Y.jsx(V8,{className:pN,color:"text50"})})]}),Y.jsx(O8,{children:a&&Y.jsx(vN,{className:yN,asChild:!0,forceMount:!0,children:Y.jsx(yl.div,{initial:{opacity:n?1:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"easeOut",duration:.3},children:r})})})]})})};function Ah(t){const e=t+"CollectionProvider",[r,n]=$r(e),[i,s]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=y=>{const{scope:m,children:p}=y,k=sr.useRef(null),w=sr.useRef(new Map).current;return sr.createElement(i,{scope:m,itemMap:w,collectionRef:k},p)},a=t+"CollectionSlot",l=sr.forwardRef((y,m)=>{const{scope:p,children:k}=y,w=s(a,p),E=Tt(m,w.collectionRef);return sr.createElement(Nl,{ref:E},k)}),c=t+"CollectionItemSlot",f="data-radix-collection-item",u=sr.forwardRef((y,m)=>{const{scope:p,children:k,...w}=y,E=sr.useRef(null),A=Tt(m,E),I=s(c,p);return sr.useEffect(()=>(I.itemMap.set(E,{ref:E,...w}),()=>void I.itemMap.delete(E))),sr.createElement(Nl,{[f]:"",ref:A},k)});function h(y){const m=s(t+"CollectionConsumer",y);return sr.useCallback(()=>{const k=m.collectionRef.current;if(!k)return[];const w=Array.from(k.querySelectorAll(`[${f}]`));return Array.from(m.itemMap.values()).sort((I,M)=>w.indexOf(I.ref.current)-w.indexOf(M.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:o,Slot:l,ItemSlot:u},h,n]}const bN=S.createContext(void 0);function mm(t){const e=S.useContext(bN);return t||e||"ltr"}function wN(t,e=globalThis==null?void 0:globalThis.document){const r=Mn(t);S.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const Ky="dismissableLayer.update",CN="dismissableLayer.pointerDownOutside",EN="dismissableLayer.focusOutside";let sw;const SN=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xm=S.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=t,f=S.useContext(SN),[u,h]=S.useState(null),y=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,m]=S.useState({}),p=Tt(e,j=>h(j)),k=Array.from(f.layers),[w]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),E=k.indexOf(w),A=u?k.indexOf(u):-1,I=f.layersWithOutsidePointerEventsDisabled.size>0,M=A>=E,B=kN(j=>{const K=j.target,J=[...f.branches].some(Z=>Z.contains(K));!M||J||(s==null||s(j),a==null||a(j),j.defaultPrevented||l==null||l())},y),U=AN(j=>{const K=j.target;[...f.branches].some(Z=>Z.contains(K))||(o==null||o(j),a==null||a(j),j.defaultPrevented||l==null||l())},y);return wN(j=>{A===f.layers.size-1&&(i==null||i(j),!j.defaultPrevented&&l&&(j.preventDefault(),l()))},y),S.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(sw=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),ow(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=sw)}},[u,y,n,f]),S.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),ow())},[u,f]),S.useEffect(()=>{const j=()=>m({});return document.addEventListener(Ky,j),()=>document.removeEventListener(Ky,j)},[]),S.createElement($e.div,xe({},c,{ref:p,style:{pointerEvents:I?M?"auto":"none":void 0,...t.style},onFocusCapture:ge(t.onFocusCapture,U.onFocusCapture),onBlurCapture:ge(t.onBlurCapture,U.onBlurCapture),onPointerDownCapture:ge(t.onPointerDownCapture,B.onPointerDownCapture)}))});function kN(t,e=globalThis==null?void 0:globalThis.document){const r=Mn(t),n=S.useRef(!1),i=S.useRef(()=>{});return S.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let l=function(){q8(CN,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function AN(t,e=globalThis==null?void 0:globalThis.document){const r=Mn(t),n=S.useRef(!1);return S.useEffect(()=>{const i=s=>{s.target&&!n.current&&q8(EN,r,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ow(){const t=new CustomEvent(Ky);document.dispatchEvent(t)}function q8(t,e,r,{discrete:n}){const i=r.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),n?vm(i,s):i.dispatchEvent(s)}const _N=xm;let sv=0;function G8(){S.useEffect(()=>{var t,e;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=r[0])!==null&&t!==void 0?t:aw()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:aw()),sv++,()=>{sv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),sv--}},[])}function aw(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}const ov="focusScope.autoFocusOnMount",av="focusScope.autoFocusOnUnmount",lw={bubbles:!1,cancelable:!0},K8=S.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,l]=S.useState(null),c=Mn(i),f=Mn(s),u=S.useRef(null),h=Tt(e,p=>l(p)),y=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(n){let p=function(A){if(y.paused||!a)return;const I=A.target;a.contains(I)?u.current=I:Es(u.current,{select:!0})},k=function(A){if(y.paused||!a)return;const I=A.relatedTarget;I!==null&&(a.contains(I)||Es(u.current,{select:!0}))},w=function(A){if(document.activeElement===document.body)for(const M of A)M.removedNodes.length>0&&Es(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",k);const E=new MutationObserver(w);return a&&E.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",k),E.disconnect()}}},[n,a,y.paused]),S.useEffect(()=>{if(a){fw.add(y);const p=document.activeElement;if(!a.contains(p)){const w=new CustomEvent(ov,lw);a.addEventListener(ov,c),a.dispatchEvent(w),w.defaultPrevented||(TN(NN(J8(a)),{select:!0}),document.activeElement===p&&Es(a))}return()=>{a.removeEventListener(ov,c),setTimeout(()=>{const w=new CustomEvent(av,lw);a.addEventListener(av,f),a.dispatchEvent(w),w.defaultPrevented||Es(p??document.body,{select:!0}),a.removeEventListener(av,f),fw.remove(y)},0)}}},[a,c,f,y]);const m=S.useCallback(p=>{if(!r&&!n||y.paused)return;const k=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,w=document.activeElement;if(k&&w){const E=p.currentTarget,[A,I]=PN(E);A&&I?!p.shiftKey&&w===I?(p.preventDefault(),r&&Es(A,{select:!0})):p.shiftKey&&w===A&&(p.preventDefault(),r&&Es(I,{select:!0})):w===E&&p.preventDefault()}},[r,n,y.paused]);return S.createElement($e.div,xe({tabIndex:-1},o,{ref:h,onKeyDown:m}))});function TN(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Es(n,{select:e}),document.activeElement!==r)return}function PN(t){const e=J8(t),r=cw(e,t),n=cw(e.reverse(),t);return[r,n]}function J8(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function cw(t,e){for(const r of t)if(!IN(r,{upTo:e}))return r}function IN(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function RN(t){return t instanceof HTMLInputElement&&"select"in t}function Es(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&RN(t)&&e&&t.select()}}const fw=MN();function MN(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=uw(t,e),t.unshift(e)},remove(e){var r;t=uw(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function uw(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function NN(t){return t.filter(e=>e.tagName!=="A")}const ON=["top","right","bottom","left"],to=Math.min,un=Math.max,b0=Math.round,Uu=Math.floor,ro=t=>({x:t,y:t}),$N={left:"right",right:"left",bottom:"top",top:"bottom"},DN={start:"end",end:"start"};function Jy(t,e,r){return un(t,to(e,r))}function Zi(t,e){return typeof t=="function"?t(e):t}function es(t){return t.split("-")[0]}function Xl(t){return t.split("-")[1]}function bm(t){return t==="x"?"y":"x"}function wm(t){return t==="y"?"height":"width"}function Zl(t){return["top","bottom"].includes(es(t))?"y":"x"}function Cm(t){return bm(Zl(t))}function LN(t,e,r){r===void 0&&(r=!1);const n=Xl(t),i=Cm(t),s=wm(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=w0(o)),[o,w0(o)]}function BN(t){const e=w0(t);return[Yy(t),e,Yy(e)]}function Yy(t){return t.replace(/start|end/g,e=>DN[e])}function FN(t,e,r){const n=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?i:n:e?n:i;case"left":case"right":return e?s:o;default:return[]}}function jN(t,e,r,n){const i=Xl(t);let s=FN(es(t),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Yy)))),s}function w0(t){return t.replace(/left|right|bottom|top/g,e=>$N[e])}function zN(t){return{top:0,right:0,bottom:0,left:0,...t}}function Y8(t){return typeof t!="number"?zN(t):{top:t,right:t,bottom:t,left:t}}function C0(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function dw(t,e,r){let{reference:n,floating:i}=t;const s=Zl(e),o=Cm(e),a=wm(o),l=es(e),c=s==="y",f=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,h=n[a]/2-i[a]/2;let y;switch(l){case"top":y={x:f,y:n.y-i.height};break;case"bottom":y={x:f,y:n.y+n.height};break;case"right":y={x:n.x+n.width,y:u};break;case"left":y={x:n.x-i.width,y:u};break;default:y={x:n.x,y:n.y}}switch(Xl(e)){case"start":y[o]-=h*(r&&c?-1:1);break;case"end":y[o]+=h*(r&&c?-1:1);break}return y}const UN=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=dw(c,n,l),h=n,y={},m=0;for(let p=0;p({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:f=0}=Zi(t,e)||{};if(c==null)return{};const u=Y8(f),h={x:r,y:n},y=Cm(i),m=wm(y),p=await o.getDimensions(c),k=y==="y",w=k?"top":"left",E=k?"bottom":"right",A=k?"clientHeight":"clientWidth",I=s.reference[m]+s.reference[y]-h[y]-s.floating[m],M=h[y]-s.reference[y],B=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let U=B?B[A]:0;(!U||!await(o.isElement==null?void 0:o.isElement(B)))&&(U=a.floating[A]||s.floating[m]);const j=I/2-M/2,K=U/2-p[m]/2-1,J=to(u[w],K),Z=to(u[E],K),ie=J,D=U-p[m]-Z,v=U/2-p[m]/2+j,C=Jy(ie,v,D),P=!l.arrow&&Xl(i)!=null&&v!=C&&s.reference[m]/2-(vie<=0)){var K,J;const ie=(((K=s.flip)==null?void 0:K.index)||0)+1,D=M[ie];if(D)return{data:{index:ie,overflows:j},reset:{placement:D}};let v=(J=j.filter(C=>C.overflows[0]<=0).sort((C,P)=>C.overflows[1]-P.overflows[1])[0])==null?void 0:J.placement;if(!v)switch(y){case"bestFit":{var Z;const C=(Z=j.map(P=>[P.placement,P.overflows.filter(N=>N>0).reduce((N,b)=>N+b,0)]).sort((P,N)=>P[1]-N[1])[0])==null?void 0:Z[0];C&&(v=C);break}case"initialPlacement":v=a;break}if(i!==v)return{reset:{placement:v}}}return{}}}};function vw(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function yw(t){return ON.some(e=>t[e]>=0)}const HN=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...i}=Zi(t,e);switch(n){case"referenceHidden":{const s=await $f(e,{...i,elementContext:"reference"}),o=vw(s,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:yw(o)}}}case"escaped":{const s=await $f(e,{...i,altBoundary:!0}),o=vw(s,r.floating);return{data:{escapedOffsets:o,escaped:yw(o)}}}default:return{}}}}};async function WN(t,e){const{placement:r,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=es(r),a=Xl(r),l=Zl(r)==="y",c=["left","top"].includes(o)?-1:1,f=s&&l?-1:1,u=Zi(e,t);let{mainAxis:h,crossAxis:y,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&typeof m=="number"&&(y=a==="end"?m*-1:m),l?{x:y*f,y:h*c}:{x:h*c,y:y*f}}const qN=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,i=await WN(e,t);return{x:r+i.x,y:n+i.y,data:i}}}},GN=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:k=>{let{x:w,y:E}=k;return{x:w,y:E}}},...l}=Zi(t,e),c={x:r,y:n},f=await $f(e,l),u=Zl(es(i)),h=bm(u);let y=c[h],m=c[u];if(s){const k=h==="y"?"top":"left",w=h==="y"?"bottom":"right",E=y+f[k],A=y-f[w];y=Jy(E,y,A)}if(o){const k=u==="y"?"top":"left",w=u==="y"?"bottom":"right",E=m+f[k],A=m-f[w];m=Jy(E,m,A)}const p=a.fn({...e,[h]:y,[u]:m});return{...p,data:{x:p.x-r,y:p.y-n}}}}},KN=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Zi(t,e),f={x:r,y:n},u=Zl(i),h=bm(u);let y=f[h],m=f[u];const p=Zi(a,e),k=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const A=h==="y"?"height":"width",I=s.reference[h]-s.floating[A]+k.mainAxis,M=s.reference[h]+s.reference[A]-k.mainAxis;yM&&(y=M)}if(c){var w,E;const A=h==="y"?"width":"height",I=["top","left"].includes(es(i)),M=s.reference[u]-s.floating[A]+(I&&((w=o.offset)==null?void 0:w[u])||0)+(I?0:k.crossAxis),B=s.reference[u]+s.reference[A]+(I?0:((E=o.offset)==null?void 0:E[u])||0)-(I?k.crossAxis:0);mB&&(m=B)}return{[h]:y,[u]:m}}}},JN=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:i,elements:s}=e,{apply:o=()=>{},...a}=Zi(t,e),l=await $f(e,a),c=es(r),f=Xl(r),u=Zl(r)==="y",{width:h,height:y}=n.floating;let m,p;c==="top"||c==="bottom"?(m=c,p=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(p=c,m=f==="end"?"top":"bottom");const k=y-l[m],w=h-l[p],E=!e.middlewareData.shift;let A=k,I=w;if(u){const B=h-l.left-l.right;I=f||E?to(w,B):B}else{const B=y-l.top-l.bottom;A=f||E?to(k,B):B}if(E&&!f){const B=un(l.left,0),U=un(l.right,0),j=un(l.top,0),K=un(l.bottom,0);u?I=h-2*(B!==0||U!==0?B+U:un(l.left,l.right)):A=y-2*(j!==0||K!==0?j+K:un(l.top,l.bottom))}await o({...e,availableWidth:I,availableHeight:A});const M=await i.getDimensions(s.floating);return h!==M.width||y!==M.height?{reset:{rects:!0}}:{}}}};function no(t){return Q8(t)?(t.nodeName||"").toLowerCase():"#document"}function vn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function as(t){var e;return(e=(Q8(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Q8(t){return t instanceof Node||t instanceof vn(t).Node}function ts(t){return t instanceof Element||t instanceof vn(t).Element}function Ai(t){return t instanceof HTMLElement||t instanceof vn(t).HTMLElement}function pw(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof vn(t).ShadowRoot}function ou(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=Nn(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function YN(t){return["table","td","th"].includes(no(t))}function Em(t){const e=Sm(),r=Nn(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(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 QN(t){let e=Ol(t);for(;Ai(e)&&!_h(e);){if(Em(e))return e;e=Ol(e)}return null}function Sm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _h(t){return["html","body","#document"].includes(no(t))}function Nn(t){return vn(t).getComputedStyle(t)}function Th(t){return ts(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ol(t){if(no(t)==="html")return t;const e=t.assignedSlot||t.parentNode||pw(t)&&t.host||as(t);return pw(e)?e.host:e}function X8(t){const e=Ol(t);return _h(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ai(e)&&ou(e)?e:X8(e)}function Df(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=X8(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=vn(i);return s?e.concat(o,o.visualViewport||[],ou(i)?i:[],o.frameElement&&r?Df(o.frameElement):[]):e.concat(i,Df(i,[],r))}function Z8(t){const e=Nn(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=Ai(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=b0(r)!==s||b0(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function km(t){return ts(t)?t:t.contextElement}function pl(t){const e=km(t);if(!Ai(e))return ro(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:s}=Z8(e);let o=(s?b0(r.width):r.width)/n,a=(s?b0(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const XN=ro(0);function eC(t){const e=vn(t);return!Sm()||!e.visualViewport?XN:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ZN(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==vn(t)?!1:e}function fa(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=km(t);let o=ro(1);e&&(n?ts(n)&&(o=pl(n)):o=pl(t));const a=ZN(s,r,n)?eC(s):ro(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,f=i.width/o.x,u=i.height/o.y;if(s){const h=vn(s),y=n&&ts(n)?vn(n):n;let m=h.frameElement;for(;m&&n&&y!==h;){const p=pl(m),k=m.getBoundingClientRect(),w=Nn(m),E=k.left+(m.clientLeft+parseFloat(w.paddingLeft))*p.x,A=k.top+(m.clientTop+parseFloat(w.paddingTop))*p.y;l*=p.x,c*=p.y,f*=p.x,u*=p.y,l+=E,c+=A,m=vn(m).frameElement}}return C0({width:f,height:u,x:l,y:c})}function eO(t){let{rect:e,offsetParent:r,strategy:n}=t;const i=Ai(r),s=as(r);if(r===s)return e;let o={scrollLeft:0,scrollTop:0},a=ro(1);const l=ro(0);if((i||!i&&n!=="fixed")&&((no(r)!=="body"||ou(s))&&(o=Th(r)),Ai(r))){const c=fa(r);a=pl(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}}function tO(t){return Array.from(t.getClientRects())}function tC(t){return fa(as(t)).left+Th(t).scrollLeft}function rO(t){const e=as(t),r=Th(t),n=t.ownerDocument.body,i=un(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=un(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+tC(t);const a=-r.scrollTop;return Nn(n).direction==="rtl"&&(o+=un(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}function nO(t,e){const r=vn(t),n=as(t),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=Sm();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function iO(t,e){const r=fa(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,s=Ai(t)?pl(t):ro(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,c=n*s.y;return{width:o,height:a,x:l,y:c}}function gw(t,e,r){let n;if(e==="viewport")n=nO(t,r);else if(e==="document")n=rO(as(t));else if(ts(e))n=iO(e,r);else{const i=eC(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return C0(n)}function rC(t,e){const r=Ol(t);return r===e||!ts(r)||_h(r)?!1:Nn(r).position==="fixed"||rC(r,e)}function sO(t,e){const r=e.get(t);if(r)return r;let n=Df(t,[],!1).filter(a=>ts(a)&&no(a)!=="body"),i=null;const s=Nn(t).position==="fixed";let o=s?Ol(t):t;for(;ts(o)&&!_h(o);){const a=Nn(o),l=Em(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||ou(o)&&!l&&rC(t,o))?n=n.filter(f=>f!==o):i=a,o=Ol(o)}return e.set(t,n),n}function oO(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const o=[...r==="clippingAncestors"?sO(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,f)=>{const u=gw(e,f,i);return c.top=un(u.top,c.top),c.right=to(u.right,c.right),c.bottom=to(u.bottom,c.bottom),c.left=un(u.left,c.left),c},gw(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function aO(t){return Z8(t)}function lO(t,e,r){const n=Ai(e),i=as(e),s=r==="fixed",o=fa(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=ro(0);if(n||!n&&!s)if((no(e)!=="body"||ou(i))&&(a=Th(e)),n){const c=fa(e,!0,s,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else i&&(l.x=tC(i));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function mw(t,e){return!Ai(t)||Nn(t).position==="fixed"?null:e?e(t):t.offsetParent}function nC(t,e){const r=vn(t);if(!Ai(t))return r;let n=mw(t,e);for(;n&&YN(n)&&Nn(n).position==="static";)n=mw(n,e);return n&&(no(n)==="html"||no(n)==="body"&&Nn(n).position==="static"&&!Em(n))?r:n||QN(t)||r}const cO=async function(t){let{reference:e,floating:r,strategy:n}=t;const i=this.getOffsetParent||nC,s=this.getDimensions;return{reference:lO(e,await i(r),n),floating:{x:0,y:0,...await s(r)}}};function fO(t){return Nn(t).direction==="rtl"}const uO={convertOffsetParentRelativeRectToViewportRelativeRect:eO,getDocumentElement:as,getClippingRect:oO,getOffsetParent:nC,getElementRects:cO,getClientRects:tO,getDimensions:aO,getScale:pl,isElement:ts,isRTL:fO};function dO(t,e){let r=null,n;const i=as(t);function s(){clearTimeout(n),r&&r.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:f,width:u,height:h}=t.getBoundingClientRect();if(a||e(),!u||!h)return;const y=Uu(f),m=Uu(i.clientWidth-(c+u)),p=Uu(i.clientHeight-(f+h)),k=Uu(c),E={rootMargin:-y+"px "+-m+"px "+-p+"px "+-k+"px",threshold:un(0,to(1,l))||1};let A=!0;function I(M){const B=M[0].intersectionRatio;if(B!==l){if(!A)return o();B?o(!1,B):n=setTimeout(()=>{o(!1,1e-7)},100)}A=!1}try{r=new IntersectionObserver(I,{...E,root:i.ownerDocument})}catch{r=new IntersectionObserver(I,E)}r.observe(t)}return o(!0),s}function hO(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=km(t),f=i||s?[...c?Df(c):[],...Df(e)]:[];f.forEach(w=>{i&&w.addEventListener("scroll",r,{passive:!0}),s&&w.addEventListener("resize",r)});const u=c&&a?dO(c,r):null;let h=-1,y=null;o&&(y=new ResizeObserver(w=>{let[E]=w;E&&E.target===c&&y&&(y.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{y&&y.observe(e)})),r()}),c&&!l&&y.observe(c),y.observe(e));let m,p=l?fa(t):null;l&&k();function k(){const w=fa(t);p&&(w.x!==p.x||w.y!==p.y||w.width!==p.width||w.height!==p.height)&&r(),p=w,m=requestAnimationFrame(k)}return r(),()=>{f.forEach(w=>{i&&w.removeEventListener("scroll",r),s&&w.removeEventListener("resize",r)}),u&&u(),y&&y.disconnect(),y=null,l&&cancelAnimationFrame(m)}}const vO=(t,e,r)=>{const n=new Map,i={platform:uO,...r},s={...i.platform,_c:n};return UN(t,e,{...i,platform:s})},yO=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:i}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?hw({element:n.current,padding:i}).fn(r):{}:n?hw({element:n,padding:i}).fn(r):{}}}};var md=typeof document<"u"?S.useLayoutEffect:S.useEffect;function E0(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!E0(t[n],e[n]))return!1;return!0}if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){const s=i[n];if(!(s==="_owner"&&t.$$typeof)&&!E0(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function iC(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function xw(t,e){const r=iC(t);return Math.round(e*r)/r}function bw(t){const e=S.useRef(t);return md(()=>{e.current=t}),e}function pO(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[f,u]=S.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[h,y]=S.useState(n);E0(h,n)||y(n);const[m,p]=S.useState(null),[k,w]=S.useState(null),E=S.useCallback(P=>{P!=B.current&&(B.current=P,p(P))},[p]),A=S.useCallback(P=>{P!==U.current&&(U.current=P,w(P))},[w]),I=s||m,M=o||k,B=S.useRef(null),U=S.useRef(null),j=S.useRef(f),K=bw(l),J=bw(i),Z=S.useCallback(()=>{if(!B.current||!U.current)return;const P={placement:e,strategy:r,middleware:h};J.current&&(P.platform=J.current),vO(B.current,U.current,P).then(N=>{const b={...N,isPositioned:!0};ie.current&&!E0(j.current,b)&&(j.current=b,ho.flushSync(()=>{u(b)}))})},[h,e,r,J]);md(()=>{c===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,u(P=>({...P,isPositioned:!1})))},[c]);const ie=S.useRef(!1);md(()=>(ie.current=!0,()=>{ie.current=!1}),[]),md(()=>{if(I&&(B.current=I),M&&(U.current=M),I&&M){if(K.current)return K.current(I,M,Z);Z()}},[I,M,Z,K]);const D=S.useMemo(()=>({reference:B,floating:U,setReference:E,setFloating:A}),[E,A]),v=S.useMemo(()=>({reference:I,floating:M}),[I,M]),C=S.useMemo(()=>{const P={position:r,left:0,top:0};if(!v.floating)return P;const N=xw(v.floating,f.x),b=xw(v.floating,f.y);return a?{...P,transform:"translate("+N+"px, "+b+"px)",...iC(v.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:N,top:b}},[r,a,v.floating,f.x,f.y]);return S.useMemo(()=>({...f,update:Z,refs:D,elements:v,floatingStyles:C}),[f,Z,D,v,C])}const sC="Popper",[oC,ec]=$r(sC),[gO,aC]=oC(sC),mO=t=>{const{__scopePopper:e,children:r}=t,[n,i]=S.useState(null);return S.createElement(gO,{scope:e,anchor:n,onAnchorChange:i},r)},xO="PopperAnchor",bO=S.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...i}=t,s=aC(xO,r),o=S.useRef(null),a=Tt(e,o);return S.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:S.createElement($e.div,xe({},i,{ref:a}))}),lC="PopperContent",[wO,ZK]=oC(lC),CO=S.forwardRef((t,e)=>{var r,n,i,s,o,a,l,c;const{__scopePopper:f,side:u="bottom",sideOffset:h=0,align:y="center",alignOffset:m=0,arrowPadding:p=0,avoidCollisions:k=!0,collisionBoundary:w=[],collisionPadding:E=0,sticky:A="partial",hideWhenDetached:I=!1,updatePositionStrategy:M="optimized",onPlaced:B,...U}=t,j=aC(lC,f),[K,J]=S.useState(null),Z=Tt(e,ae=>J(ae)),[ie,D]=S.useState(null),v=hm(ie),C=(r=v==null?void 0:v.width)!==null&&r!==void 0?r:0,P=(n=v==null?void 0:v.height)!==null&&n!==void 0?n:0,N=u+(y!=="center"?"-"+y:""),b=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},_=Array.isArray(w)?w:[w],R=_.length>0,g={padding:b,boundary:_.filter(EO),altBoundary:R},{refs:d,floatingStyles:T,placement:O,isPositioned:x,middlewareData:$}=pO({strategy:"fixed",placement:N,whileElementsMounted:(...ae)=>hO(...ae,{animationFrame:M==="always"}),elements:{reference:j.anchor},middleware:[qN({mainAxis:h+P,alignmentAxis:m}),k&&GN({mainAxis:!0,crossAxis:!1,limiter:A==="partial"?KN():void 0,...g}),k&&VN({...g}),JN({...g,apply:({elements:ae,rects:De,availableWidth:Ee,availableHeight:Ce})=>{const{width:Pt,height:We}=De.reference,Le=ae.floating.style;Le.setProperty("--radix-popper-available-width",`${Ee}px`),Le.setProperty("--radix-popper-available-height",`${Ce}px`),Le.setProperty("--radix-popper-anchor-width",`${Pt}px`),Le.setProperty("--radix-popper-anchor-height",`${We}px`)}}),ie&&yO({element:ie,padding:p}),SO({arrowWidth:C,arrowHeight:P}),I&&HN({strategy:"referenceHidden",...g})]}),[L,z]=cC(O),G=Mn(B);gn(()=>{x&&(G==null||G())},[x,G]);const F=(i=$.arrow)===null||i===void 0?void 0:i.x,V=(s=$.arrow)===null||s===void 0?void 0:s.y,W=((o=$.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[oe,re]=S.useState();return gn(()=>{K&&re(window.getComputedStyle(K).zIndex)},[K]),S.createElement("div",{ref:d.setFloating,"data-radix-popper-content-wrapper":"",style:{...T,transform:x?T.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[(a=$.transformOrigin)===null||a===void 0?void 0:a.x,(l=$.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},S.createElement(wO,{scope:f,placedSide:L,onArrowChange:D,arrowX:F,arrowY:V,shouldHideArrow:W},S.createElement($e.div,xe({"data-side":L,"data-align":z},U,{ref:Z,style:{...U.style,animation:x?void 0:"none",opacity:(c=$.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function EO(t){return t!==null}const SO=t=>({name:"transformOrigin",options:t,fn(e){var r,n,i,s,o;const{placement:a,rects:l,middlewareData:c}=e,u=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,h=u?0:t.arrowWidth,y=u?0:t.arrowHeight,[m,p]=cC(a),k={start:"0%",center:"50%",end:"100%"}[p],w=((n=(i=c.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+h/2,E=((s=(o=c.arrow)===null||o===void 0?void 0:o.y)!==null&&s!==void 0?s:0)+y/2;let A="",I="";return m==="bottom"?(A=u?k:`${w}px`,I=`${-y}px`):m==="top"?(A=u?k:`${w}px`,I=`${l.floating.height+y}px`):m==="right"?(A=`${-y}px`,I=u?k:`${E}px`):m==="left"&&(A=`${l.floating.width+y}px`,I=u?k:`${E}px`),{data:{x:A,y:I}}}});function cC(t){const[e,r="center"]=t.split("-");return[e,r]}const kO=mO,AO=bO,_O=CO,fC=S.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...i}=t;return n?J_.createPortal(S.createElement($e.div,xe({},i,{ref:e})),n):null}),lv="rovingFocusGroup.onEntryFocus",TO={bubbles:!1,cancelable:!0},Am="RovingFocusGroup",[Qy,uC,PO]=Ah(Am),[IO,tc]=$r(Am,[PO]),[RO,MO]=IO(Am),NO=S.forwardRef((t,e)=>S.createElement(Qy.Provider,{scope:t.__scopeRovingFocusGroup},S.createElement(Qy.Slot,{scope:t.__scopeRovingFocusGroup},S.createElement(OO,qt({},t,{ref:e}))))),OO=S.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,...f}=t,u=S.useRef(null),h=Tt(e,u),y=mm(s),[m=null,p]=ca({prop:o,defaultProp:a,onChange:l}),[k,w]=S.useState(!1),E=Mn(c),A=uC(r),I=S.useRef(!1),[M,B]=S.useState(0);return S.useEffect(()=>{const U=u.current;if(U)return U.addEventListener(lv,E),()=>U.removeEventListener(lv,E)},[E]),S.createElement(RO,{scope:r,orientation:n,dir:y,loop:i,currentTabStopId:m,onItemFocus:S.useCallback(U=>p(U),[p]),onItemShiftTab:S.useCallback(()=>w(!0),[]),onFocusableItemAdd:S.useCallback(()=>B(U=>U+1),[]),onFocusableItemRemove:S.useCallback(()=>B(U=>U-1),[])},S.createElement($e.div,qt({tabIndex:k||M===0?-1:0,"data-orientation":n},f,{ref:h,style:{outline:"none",...t.style},onMouseDown:ge(t.onMouseDown,()=>{I.current=!0}),onFocus:ge(t.onFocus,U=>{const j=!I.current;if(U.target===U.currentTarget&&j&&!k){const K=new CustomEvent(lv,TO);if(U.currentTarget.dispatchEvent(K),!K.defaultPrevented){const J=A().filter(C=>C.focusable),Z=J.find(C=>C.active),ie=J.find(C=>C.id===m),v=[Z,ie,...J].filter(Boolean).map(C=>C.ref.current);dC(v)}}I.current=!1}),onBlur:ge(t.onBlur,()=>w(!1))})))}),$O="RovingFocusGroupItem",DO=S.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:s,...o}=t,a=Ws(),l=s||a,c=MO($O,r),f=c.currentTabStopId===l,u=uC(r),{onFocusableItemAdd:h,onFocusableItemRemove:y}=c;return S.useEffect(()=>{if(n)return h(),()=>y()},[n,h,y]),S.createElement(Qy.ItemSlot,{scope:r,id:l,focusable:n,active:i},S.createElement($e.span,qt({tabIndex:f?0:-1,"data-orientation":c.orientation},o,{ref:e,onMouseDown:ge(t.onMouseDown,m=>{n?c.onItemFocus(l):m.preventDefault()}),onFocus:ge(t.onFocus,()=>c.onItemFocus(l)),onKeyDown:ge(t.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){c.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const p=FO(m,c.orientation,c.dir);if(p!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(p==="last")w.reverse();else if(p==="prev"||p==="next"){p==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=c.loop?jO(w,E+1):w.slice(E+1)}setTimeout(()=>dC(w))}})})))}),LO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function BO(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function FO(t,e,r){const n=BO(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return LO[n]}function dC(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function jO(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const zO=NO,hC=DO;var UO=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Ia=new WeakMap,Vu=new WeakMap,Hu={},cv=0,vC=function(t){return t&&(t.host||vC(t.parentNode))},VO=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=vC(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},HO=function(t,e,r,n){var i=VO(e,Array.isArray(t)?t:[t]);Hu[r]||(Hu[r]=new WeakMap);var s=Hu[r],o=[],a=new Set,l=new Set(i),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};i.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(h){if(a.has(h))f(h);else{var y=h.getAttribute(n),m=y!==null&&y!=="false",p=(Ia.get(h)||0)+1,k=(s.get(h)||0)+1;Ia.set(h,p),s.set(h,k),o.push(h),p===1&&m&&Vu.set(h,!0),k===1&&h.setAttribute(r,"true"),m||h.setAttribute(n,"true")}})};return f(e),a.clear(),cv++,function(){o.forEach(function(u){var h=Ia.get(u)-1,y=s.get(u)-1;Ia.set(u,h),s.set(u,y),h||(Vu.has(u)||u.removeAttribute(n),Vu.delete(u)),y||u.removeAttribute(r)}),cv--,cv||(Ia=new WeakMap,Ia=new WeakMap,Vu=new WeakMap,Hu={})}},yC=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),i=e||UO(t);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),HO(n,i,r,"aria-hidden")):function(){return null}},hi=function(){return hi=Object.assign||function(e){for(var r,n=1,i=arguments.length;n"u")return a$;var e=l$(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},f$=xC(),u$=function(t,e,r,n){var i=t.left,s=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` + .`.concat(qO,` { overflow: hidden `).concat(n,`; padding-right: `).concat(a,"px ").concat(n,`; } @@ -93,52 +93,52 @@ Error generating stack: `+s.message+` } body { - `).concat(XO,": ").concat(a,`px; + `).concat(GO,": ").concat(a,`px; } -`)},gD=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,i=n===void 0?"margin":n,s=E.useMemo(function(){return vD(i)},[i]);return E.createElement(yD,{styles:pD(s,!e,i,r?"":"!important")})},Xy=!1;if(typeof window<"u")try{var Wu=Object.defineProperty({},"passive",{get:function(){return Xy=!0,!0}});window.addEventListener("test",Wu,Wu),window.removeEventListener("test",Wu,Wu)}catch{Xy=!1}var Ma=Xy?{passive:!1}:!1,mD=function(t){return t.tagName==="TEXTAREA"},SC=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!mD(t)&&r[e]==="visible")},xD=function(t){return SC(t,"overflowY")},bD=function(t){return SC(t,"overflowX")},ww=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=kC(t,r);if(n){var i=_C(t,r),s=i[1],o=i[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},wD=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},CD=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},kC=function(t,e){return t==="v"?xD(e):bD(e)},_C=function(t,e){return t==="v"?wD(e):CD(e)},AD=function(t,e){return t==="h"&&e==="rtl"?-1:1},ED=function(t,e,r,n,i){var s=AD(t,window.getComputedStyle(e).direction),o=s*n,a=r.target,l=e.contains(a),c=!1,f=o>0,u=0,h=0;do{var y=_C(t,a),m=y[0],p=y[1],S=y[2],w=p-S-s*m;(m||w)&&kC(t,a)&&(u+=w,h+=m),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(f&&(i&&u===0||!i&&o>u)||!f&&(i&&h===0||!i&&-o>h))&&(c=!0),c},qu=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Cw=function(t){return[t.deltaX,t.deltaY]},Aw=function(t){return t&&"current"in t?t.current:t},SD=function(t,e){return t[0]===e[0]&&t[1]===e[1]},kD=function(t){return` +`)},d$=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,i=n===void 0?"margin":n,s=S.useMemo(function(){return c$(i)},[i]);return S.createElement(f$,{styles:u$(s,!e,i,r?"":"!important")})},Xy=!1;if(typeof window<"u")try{var Wu=Object.defineProperty({},"passive",{get:function(){return Xy=!0,!0}});window.addEventListener("test",Wu,Wu),window.removeEventListener("test",Wu,Wu)}catch{Xy=!1}var Ra=Xy?{passive:!1}:!1,h$=function(t){return t.tagName==="TEXTAREA"},bC=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!h$(t)&&r[e]==="visible")},v$=function(t){return bC(t,"overflowY")},y$=function(t){return bC(t,"overflowX")},ww=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=wC(t,r);if(n){var i=CC(t,r),s=i[1],o=i[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},p$=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},g$=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},wC=function(t,e){return t==="v"?v$(e):y$(e)},CC=function(t,e){return t==="v"?p$(e):g$(e)},m$=function(t,e){return t==="h"&&e==="rtl"?-1:1},x$=function(t,e,r,n,i){var s=m$(t,window.getComputedStyle(e).direction),o=s*n,a=r.target,l=e.contains(a),c=!1,f=o>0,u=0,h=0;do{var y=CC(t,a),m=y[0],p=y[1],k=y[2],w=p-k-s*m;(m||w)&&wC(t,a)&&(u+=w,h+=m),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(f&&(i&&u===0||!i&&o>u)||!f&&(i&&h===0||!i&&-o>h))&&(c=!0),c},qu=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Cw=function(t){return[t.deltaX,t.deltaY]},Ew=function(t){return t&&"current"in t?t.current:t},b$=function(t,e){return t[0]===e[0]&&t[1]===e[1]},w$=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},_D=0,Ra=[];function TD(t){var e=E.useRef([]),r=E.useRef([0,0]),n=E.useRef(),i=E.useState(_D++)[0],s=E.useState(function(){return EC()})[0],o=E.useRef(t);E.useEffect(function(){o.current=t},[t]),E.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var p=QO([t.lockRef.current],(t.shards||[]).map(Aw),!0).filter(Boolean);return p.forEach(function(S){return S.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),p.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=E.useCallback(function(p,S){if("touches"in p&&p.touches.length===2)return!o.current.allowPinchZoom;var w=qu(p),A=r.current,k="deltaX"in p?p.deltaX:A[0]-w[0],I="deltaY"in p?p.deltaY:A[1]-w[1],R,F=p.target,z=Math.abs(k)>Math.abs(I)?"h":"v";if("touches"in p&&z==="h"&&F.type==="range")return!1;var j=ww(z,F);if(!j)return!0;if(j?R=z:(R=z==="v"?"h":"v",j=ww(z,F)),!j)return!1;if(!n.current&&"changedTouches"in p&&(k||I)&&(n.current=R),!R)return!0;var K=n.current||R;return ED(K,S,p,K==="h"?k:I,!0)},[]),l=E.useCallback(function(p){var S=p;if(!(!Ra.length||Ra[Ra.length-1]!==s)){var w="deltaY"in S?Cw(S):qu(S),A=e.current.filter(function(R){return R.name===S.type&&R.target===S.target&&SD(R.delta,w)})[0];if(A&&A.should){S.cancelable&&S.preventDefault();return}if(!A){var k=(o.current.shards||[]).map(Aw).filter(Boolean).filter(function(R){return R.contains(S.target)}),I=k.length>0?a(S,k[0]):!o.current.noIsolation;I&&S.cancelable&&S.preventDefault()}}},[]),c=E.useCallback(function(p,S,w,A){var k={name:p,delta:S,target:w,should:A};e.current.push(k),setTimeout(function(){e.current=e.current.filter(function(I){return I!==k})},1)},[]),f=E.useCallback(function(p){r.current=qu(p),n.current=void 0},[]),u=E.useCallback(function(p){c(p.type,Cw(p),p.target,a(p,t.lockRef.current))},[]),h=E.useCallback(function(p){c(p.type,qu(p),p.target,a(p,t.lockRef.current))},[]);E.useEffect(function(){return Ra.push(s),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Ma),document.addEventListener("touchmove",l,Ma),document.addEventListener("touchstart",f,Ma),function(){Ra=Ra.filter(function(p){return p!==s}),document.removeEventListener("wheel",l,Ma),document.removeEventListener("touchmove",l,Ma),document.removeEventListener("touchstart",f,Ma)}},[]);var y=t.removeScrollBar,m=t.inert;return E.createElement(E.Fragment,null,m?E.createElement(s,{styles:kD(i)}):null,y?E.createElement(gD,{gapMode:"margin"}):null)}const PD=sD(AC,TD);var TC=E.forwardRef(function(t,e){return E.createElement(Ph,hi({},t,{ref:e,sideCar:PD}))});TC.classNames=Ph.classNames;const PC=TC,ID=["Enter"," "],Ih="Menu",[MD,cJ,RD]=kh(Ih),[wa,IC]=Dr(Ih,[RD,ec,tc]);ec();const ND=tc();wa(Ih);const[fJ,OD]=wa(Ih),DD="MenuPortal";wa(DD,{forceMount:void 0});const BD="MenuContent",[uJ,MC]=wa(BD),Zy="MenuItem",Ew="menu.itemSelect",RC=E.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...i}=t,s=E.useRef(null),o=OD(Zy,t.__scopeMenu),a=MC(Zy,t.__scopeMenu),l=_t(e,s),c=E.useRef(!1),f=()=>{const u=s.current;if(!r&&u){const h=new CustomEvent(Ew,{bubbles:!0,cancelable:!0});u.addEventListener(Ew,y=>n==null?void 0:n(y),{once:!0}),vm(u,h),h.defaultPrevented?c.current=!1:o.onClose()}};return E.createElement(LD,xe({},i,{ref:l,disabled:r,onClick:ge(t.onClick,f),onPointerDown:u=>{var h;(h=t.onPointerDown)===null||h===void 0||h.call(t,u),c.current=!0},onPointerUp:ge(t.onPointerUp,u=>{var h;c.current||(h=u.currentTarget)===null||h===void 0||h.click()}),onKeyDown:ge(t.onKeyDown,u=>{const h=a.searchRef.current!=="";r||h&&u.key===" "||ID.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),LD=E.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...s}=t,o=MC(Zy,r),a=ND(r),l=E.useRef(null),c=_t(e,l),[f,u]=E.useState(!1),[h,y]=E.useState("");return E.useEffect(()=>{const m=l.current;if(m){var p;y(((p=m.textContent)!==null&&p!==void 0?p:"").trim())}},[s.children]),E.createElement(MD.ItemSlot,{scope:r,disabled:n,textValue:i??h},E.createElement(mC,xe({asChild:!0},a,{focusable:!n}),E.createElement(De.div,xe({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},s,{ref:c,onPointerMove:ge(t.onPointerMove,Sw(m=>{n?o.onItemLeave(m):(o.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus())})),onPointerLeave:ge(t.onPointerLeave,Sw(m=>o.onItemLeave(m))),onFocus:ge(t.onFocus,()=>u(!0)),onBlur:ge(t.onBlur,()=>u(!1))}))))}),$D=E.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...i}=t;return E.createElement(OC,{scope:t.__scopeMenu,checked:r},E.createElement(RC,xe({role:"menuitemcheckbox","aria-checked":E0(r)?"mixed":r},i,{ref:e,"data-state":_m(r),onSelect:ge(i.onSelect,()=>n==null?void 0:n(E0(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),FD="MenuRadioGroup",[dJ,jD]=wa(FD,{value:void 0,onValueChange:()=>{}}),zD="MenuRadioItem",UD=E.forwardRef((t,e)=>{const{value:r,...n}=t,i=jD(zD,t.__scopeMenu),s=r===i.value;return E.createElement(OC,{scope:t.__scopeMenu,checked:s},E.createElement(RC,xe({role:"menuitemradio","aria-checked":s},n,{ref:e,"data-state":_m(s),onSelect:ge(n.onSelect,()=>{var o;return(o=i.onValueChange)===null||o===void 0?void 0:o.call(i,r)},{checkForDefaultPrevented:!1})})))}),NC="MenuItemIndicator",[OC,VD]=wa(NC,{checked:!1}),HD=E.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...i}=t,s=VD(NC,r);return E.createElement(vo,{present:n||E0(s.checked)||s.checked===!0},E.createElement(De.span,xe({},i,{ref:e,"data-state":_m(s.checked)})))}),WD="MenuSub";wa(WD);function E0(t){return t==="indeterminate"}function _m(t){return E0(t)?"indeterminate":t?"checked":"unchecked"}function Sw(t){return e=>e.pointerType==="mouse"?t(e):void 0}const qD=$D,GD=UD,KD=HD,DC="DropdownMenu",[JD,hJ]=Dr(DC,[IC]),Tm=IC();JD(DC);const QD=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=Tm(r);return E.createElement(qD,xe({},i,n,{ref:e}))}),YD=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=Tm(r);return E.createElement(GD,xe({},i,n,{ref:e}))}),XD=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=Tm(r);return E.createElement(KD,xe({},i,n,{ref:e}))}),ZD=QD,eB=YD,BC=XD;var LC="_1k2mbvi5",$C="_1k2mbvi4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12wk fyvr12we fyvr11h0 fyvr11ko fyvr11jw fyvr12uz fyvr11n2 fyvr11hw fyvr12rz";const tB=({children:t})=>Q.jsx(BC,{className:LC,children:t});E.forwardRef(({className:t,children:e,...r},n)=>Q.jsxs(ZD,{className:an($C,t),...r,ref:n,children:[Q.jsx(tB,{children:Q.jsx(G8,{size:"xs"})}),Q.jsx(Ut,{variant:"small",children:e})]}));E.forwardRef(({className:t,children:e,...r},n)=>Q.jsxs(eB,{className:an($C,t),...r,ref:n,children:[Q.jsx(BC,{className:LC,children:Q.jsx(Ut,{children:"•"})}),Q.jsx(Ut,{variant:"small",children:e})]}));const Pm=E.forwardRef((t,e)=>{const{icon:r,size:n="md",...i}=t;return Q.jsx(We,{leftIcon:r,size:n,flexShrink:"0",ref:e,...i})}),rB=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var nB="fyvr12wh fyvr12wb fyvr11ho fyvr12vb fyvr1ko fyvr1oo fyvr1mo fyvr1qo",iB="_1hq71vk1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12n5 fyvr12ft fyvr1215 fyvr128h fyvr12nn fyvr12gb fyvr121n fyvr128z fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",sB=Ft({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const oB={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*",pdf:".pdf,application/pdf"};E.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:i=!1,id:s,label:o="",labelLocation:a="hidden",name:l,onValueChange:c,placeholder:f="Upload a file",validExtensions:u,...h}=t,y=E.useRef(null),m=rB(y,e),[p,S]=E.useState(null),w=k=>{const I=k.currentTarget.files;if(!I||!I[0])return;const R=I[0],F=R.name,z=R.size/1e3;S({name:F,size:z,extension:F.split(".").pop()??""}),c==null||c(R)},A=u.map(k=>oB[k]).join(",");return Q.jsx(Ql,{description:n,disabled:i,display:"grid",id:s??l,label:o,labelLocation:a,children:Q.jsxs(ue,{width:"full",minWidth:"0",justifyContent:p?"space-between":"flex-start",gap:"2",color:p?"text100":"text50",className:an(iB,sB({borderRadius:r})),children:[p?Q.jsxs(ue,{flexDirection:"row",gap:"2",alignItems:"center",minWidth:"0",children:[Q.jsx(Ut,{ellipsis:!0,children:p.name}),Q.jsxs(Ut,{color:"text50",variant:"xsmall",whiteSpace:"nowrap",children:[p.size.toFixed(2)," kb"]})]}):Q.jsx(Ut,{ellipsis:!0,children:f}),Q.jsx(ue,{accept:A,as:"input",className:nB,cursor:"pointer",disabled:i,id:s??l,name:l,onChange:w,ref:m,type:"file",...h}),p&&Q.jsx(Pm,{cursor:"pointer",icon:ym,size:"xs",onClick:k=>{var I;k.preventDefault(),k.stopPropagation(),(I=y.current)!=null&&I.value&&(y.current.value=""),c==null||c(null),S(null)},zIndex:"10"})]})})});var aB=Ft({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const ep=1e3,gl=64,dv=gl/2,hv=(t,e=ep)=>t%e/(ep/gl),$o=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let i=0,s;i>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)},lB=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),i=t%360,s=(t+120)%360,o=r%360;return{id:$o(n),a:`hsl(${i}deg 100% 40%)`,b:`hsl(${s}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}},cB=(t,e)=>{const r=[];for(let n=0;n{const s=gl/10+hv(n.r,ep*1.5/(i+1));return{...lB(n.a,n.b,n.c),x:hv(n.x),y:hv(n.y),r:s}})};E.memo(t=>{const{className:e,address:r,size:n="md",complexity:i=1,...s}=t,o=cB(r,i);return Q.jsxs(ue,{as:"svg",className:an(e,aB({size:n})),viewBox:`0 0 ${gl} ${gl}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...s,children:[Q.jsxs("defs",{children:[Q.jsx("clipPath",{id:"circle-clip",children:Q.jsx("circle",{cx:dv,cy:dv,r:dv})}),Q.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[Q.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Q.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),Q.jsx("feGaussianBlur",{stdDeviation:gl/10,result:"effect1_foregroundBlur"})]}),Q.jsxs("linearGradient",{id:`gradient-background-${o[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[Q.jsx("stop",{offset:"0",stopColor:o[0].c}),Q.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map(a=>Q.jsxs(E.Fragment,{children:[Q.jsxs("radialGradient",{id:`gradient-primary-${a.id}`,children:[Q.jsx("stop",{offset:"0",stopColor:a.a}),Q.jsx("stop",{offset:"1",stopColor:a.b})]}),Q.jsxs("radialGradient",{id:`gradient-secondary-${a.id}`,children:[Q.jsx("stop",{offset:"0",stopColor:a.c}),Q.jsx("stop",{offset:"1",stopColor:a.b})]})]},a.id))]}),Q.jsxs("g",{clipPath:"url(#circle-clip)",children:[Q.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${o[0].id})`}),Q.jsx("g",{filter:"url(#blur)",children:o.map(a=>Q.jsxs(E.Fragment,{children:[Q.jsx("circle",{fill:`url(#gradient-primary-${a.id})`,cx:a.x,cy:a.y,r:a.r}),Q.jsx("circle",{fill:`url(#gradient-secondary-${a.id})`,cx:a.y,cy:a.x,r:a.r/2})]},a.id))})]})]})});const FC=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[i,s]=E.useState(!1),o=a=>{s(!0),r==null||r(a)};return Q.jsx(ue,{as:yl.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:i?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},jC="Dialog",[zC,vJ]=Dr(jC),[fB,yo]=zC(jC),uB=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:i,onOpenChange:s,modal:o=!0}=t,a=E.useRef(null),l=E.useRef(null),[c=!1,f]=ca({prop:n,defaultProp:i,onChange:s});return E.createElement(fB,{scope:e,triggerRef:a,contentRef:l,contentId:Ws(),titleId:Ws(),descriptionId:Ws(),open:c,onOpenChange:f,onOpenToggle:E.useCallback(()=>f(u=>!u),[f]),modal:o},r)},UC="DialogPortal",[dB,VC]=zC(UC,{forceMount:void 0}),hB=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:i}=t,s=yo(UC,e);return E.createElement(dB,{scope:e,forceMount:r},E.Children.map(n,o=>E.createElement(vo,{present:r||s.open},E.createElement(yC,{asChild:!0,container:i},o))))},tp="DialogOverlay",vB=E.forwardRef((t,e)=>{const r=VC(tp,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=yo(tp,t.__scopeDialog);return s.modal?E.createElement(vo,{present:n||s.open},E.createElement(yB,xe({},i,{ref:e}))):null}),yB=E.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=yo(tp,r);return E.createElement(PC,{as:Nl,allowPinchZoom:!0,shards:[i.contentRef]},E.createElement(De.div,xe({"data-state":WC(i.open)},n,{ref:e,style:{pointerEvents:"auto",...n.style}})))}),Lf="DialogContent",pB=E.forwardRef((t,e)=>{const r=VC(Lf,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=yo(Lf,t.__scopeDialog);return E.createElement(vo,{present:n||s.open},s.modal?E.createElement(gB,xe({},i,{ref:e})):E.createElement(mB,xe({},i,{ref:e})))}),gB=E.forwardRef((t,e)=>{const r=yo(Lf,t.__scopeDialog),n=E.useRef(null),i=_t(e,r.contentRef,n);return E.useEffect(()=>{const s=n.current;if(s)return bC(s)},[]),E.createElement(HC,xe({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ge(t.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=r.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:ge(t.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:ge(t.onFocusOutside,s=>s.preventDefault())}))}),mB=E.forwardRef((t,e)=>{const r=yo(Lf,t.__scopeDialog),n=E.useRef(!1),i=E.useRef(!1);return E.createElement(HC,xe({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,s),!s.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),s.preventDefault()}n.current=!1,i.current=!1},onInteractOutside:s=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=s.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}}))}),HC=E.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=t,a=yo(Lf,r),l=E.useRef(null),c=_t(e,l);return X8(),E.createElement(E.Fragment,null,E.createElement(Z8,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s},E.createElement(xm,xe({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":WC(a.open)},o,{ref:c,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),xB="DialogClose",bB=E.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=yo(xB,r);return E.createElement(De.button,xe({type:"button"},n,{ref:e,onClick:ge(t.onClick,()=>i.onOpenChange(!1))}))});function WC(t){return t?"open":"closed"}const wB=uB,CB=hB,AB=vB,EB=pB,SB=bB;var kB=Ft({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]}),_B=Ft({defaultClassName:"_1vqx0w91 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]});const TB=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:i,...s}=t;return Q.jsx(ue,{className:kB({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...s,children:Q.jsx(ue,{className:_B({direction:n}),background:"backgroundPrimary",...i,children:e})})};function PB(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}function IB(t,e){var r=t;for(var n of e){if(!(n in r))throw new Error("Path ".concat(e.join(" -> ")," does not exist in object"));r=r[n]}return r}function qC(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n=t.constructor();for(var i in t){var s=t[i],o=[...r,i];typeof s=="string"||typeof s=="number"||s==null?n[i]=e(s,o):typeof s=="object"&&!Array.isArray(s)?n[i]=qC(s,e,o):console.warn('Skipping invalid key "'.concat(o.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(s)?"Array":typeof s,'"'))}return n}function kw(t,e,r){t.style.setProperty(PB(e),r)}function _w(t,e,r){if(typeof r=="object"){var n=e;qC(r,(a,l)=>{a!=null&&kw(t,IB(n,l),String(a))})}else{var i=e;for(var s in i){var o=i[s];o!=null&&kw(t,s,i[s])}}}const Im=["dark","light"],MB="dark",RB="data-theme",Tw="@sequence.theme",NB=t=>Im.includes(t),OB=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),GC=t=>t?`${Tw}.${t}`:Tw,DB=t=>{const e=localStorage.getItem(GC(t));return e&&Im.includes(e)?e:MB},KC=E.createContext(null),BB=t=>{const[e,r]=E.useState(t.theme||DB(t.scope));E.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),E.useEffect(()=>{t.theme&&r(t.theme)},[t.theme]),E.useEffect(()=>{const i=document.querySelector(t.root||":root");i&&(NB(e)?(i.setAttribute(RB,e),_w(i,Y2,{colors:hR[e]})):OB(e)&&_w(i,Y2,{colors:e}))},[e,t.root]);const n=E.useMemo(()=>({theme:e,root:t.root,setTheme:i=>{Im.includes(i)&&(localStorage.setItem(GC(t.scope),i),r(i))}}),[e,t.root,t.scope]);return Q.jsx(KC.Provider,{value:n,children:t.children})},LB=()=>{const t=E.useContext(KC);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t};var $B="fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11ni",FB=Ft({defaultClassName:"_5b32m95 fyvr11d8 fyvr11dw fyvr11bg fyvr11by fyvr11c4 fyvr11cm fyvr11ls fyvr11m8 fyvr12wk fyvr12we fyvr11h0 fyvr11i4 fyvr11hs fyvr11sb fyvr1mo fyvr1om",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]}),jB="fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",zB="fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11ni fyvr1ko fyvr1oo fyvr1qo fyvr1mo";const UB=t=>{const{autoHeight:e=!1,backdropColor:r="backgroundBackdrop",children:n,disableAnimation:i=!1,isDismissible:s=!0,onClose:o,scroll:a=!0,size:l="lg",overlayProps:c,contentProps:f}=t,{root:u}=LB(),h=document.querySelector(u||"body");return Q.jsx(wB,{modal:!0,defaultOpen:!0,onOpenChange:o,children:Q.jsx(CB,{forceMount:!0,container:h,children:Q.jsxs(ue,{className:zB,children:[Q.jsx(ue,{as:AB,asChild:!0,background:r,className:jB,forceMount:!0,children:Q.jsx(yl.div,{initial:i?!1:{opacity:0},animate:i?!1:{opacity:1},exit:i?void 0:{opacity:0},transition:{type:"tween",ease:"linear"},...c},"modal-overlay")}),Q.jsx(EB,{asChild:!0,className:FB({autoHeight:e,size:l}),forceMount:!0,onEscapeKeyDown:y=>{s?o==null||o():y.preventDefault()},onInteractOutside:y=>{s||y.preventDefault()},children:Q.jsxs(yl.div,{initial:i?!1:{y:"100%",opacity:l==="sm"?0:1},animate:i?!1:{y:0,opacity:1},exit:i?void 0:{y:"100%",opacity:l==="sm"?0:1},transition:{type:"tween",ease:"easeOut"},...f,children:[a?Q.jsx(TB,{children:n}):n,s&&Q.jsx(SB,{asChild:!0,children:Q.jsx(Pm,{icon:ym,backdropFilter:"blur",size:"xs",className:$B,"aria-label":"Close"})})]},"modal-content")})]})})})};var VB=Ft({defaultClassName:"_1acm19ya fyvr1t4 fyvr1v0 fyvr12wh fyvr12wb fyvr11gw fyvr128 fyvr15o",variantClassNames:{numeric:{false:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",true:"_1qxj1ib9 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8"}},defaultVariants:{},compoundVariants:[]}),HB="_1acm19y1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12rt fyvr1g0 fyvr118g",WB=Ft({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const Mm=E.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",leftIcon:f,rightIcon:u,name:h,controls:y,type:m="text",numeric:p=!1,...S}=t;return Q.jsx(Ql,{description:s,disabled:o,display:"grid",id:a??h,label:l,labelLocation:c,children:Q.jsx(ue,{width:"full",children:Q.jsxs(ue,{className:an(HB,WB({borderRadius:i})),children:[f&&Q.jsx(f,{size:"sm"}),Q.jsx(ue,{as:r,autoComplete:n,spellCheck:"false",className:VB({numeric:p}),disabled:o,id:a??h,name:h,ref:e,type:m,...S}),u&&Q.jsx(u,{size:"sm"}),y]})})})}),qB=RegExp("^\\d*(?:\\\\[.])?\\d*$");function GB(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}E.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:i,onBlur:s,...o}=t,a=c=>{let{value:f}=c.target;f=f.replace(/,/g,"."),f.startsWith(".")&&(f="0"+f),f.startsWith("0")&&(f=f.replace(/^0+(?=\d)/,"")),(f===""||qB.test(GB(f)))&&(i==null||i({...c,target:{...c.target,value:f}}))},l=c=>{const{value:f}=c.target;let u=f;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),s==null||s(c),u!==f&&(i==null||i({...c,target:{...c.target,value:u}}))};return Q.jsx(Mm,{name:r,onChange:a,onBlur:l,inputMode:"decimal",autoComplete:"off",autoCorrect:"off",type:"text",pattern:"^[0-9]*[.,]?[0-9]*$",placeholder:n||"0",minLength:1,maxLength:79,spellCheck:"false",numeric:!0,ref:e,...o})});Ft({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const JC="Progress",Mh=100,[KB,yJ]=Dr(JC),[JB,pJ]=KB(JC),QB=E.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:i,getValueLabel:s=YB,...o}=t,a=rp(i)?i:Mh,l=QC(n,a)?n:null,c=S0(l)?s(l,a):void 0;return E.createElement(JB,{scope:r,value:l,max:a},E.createElement(De.div,qt({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":S0(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":XB(l,a),"data-value":l??void 0,"data-max":a},o,{ref:e})))});QB.propTypes={max(t,e,r){const n=t[e],i=String(n);return n&&!rp(n)?new Error(ZB(i,r)):null},value(t,e,r){const n=t[e],i=String(n),s=rp(t.max)?t.max:Mh;return n!=null&&!QC(n,s)?new Error(eL(i,r)):null}};function YB(t,e){return`${Math.round(t/e*100)}%`}function XB(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function S0(t){return typeof t=="number"}function rp(t){return S0(t)&&!isNaN(t)&&t>0}function QC(t,e){return S0(t)&&!isNaN(t)&&t<=e&&t>=0}function ZB(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Mh}\`.`}function eL(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: +`)},C$=0,Ma=[];function E$(t){var e=S.useRef([]),r=S.useRef([0,0]),n=S.useRef(),i=S.useState(C$++)[0],s=S.useState(function(){return xC()})[0],o=S.useRef(t);S.useEffect(function(){o.current=t},[t]),S.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var p=WO([t.lockRef.current],(t.shards||[]).map(Ew),!0).filter(Boolean);return p.forEach(function(k){return k.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),p.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=S.useCallback(function(p,k){if("touches"in p&&p.touches.length===2)return!o.current.allowPinchZoom;var w=qu(p),E=r.current,A="deltaX"in p?p.deltaX:E[0]-w[0],I="deltaY"in p?p.deltaY:E[1]-w[1],M,B=p.target,U=Math.abs(A)>Math.abs(I)?"h":"v";if("touches"in p&&U==="h"&&B.type==="range")return!1;var j=ww(U,B);if(!j)return!0;if(j?M=U:(M=U==="v"?"h":"v",j=ww(U,B)),!j)return!1;if(!n.current&&"changedTouches"in p&&(A||I)&&(n.current=M),!M)return!0;var K=n.current||M;return x$(K,k,p,K==="h"?A:I,!0)},[]),l=S.useCallback(function(p){var k=p;if(!(!Ma.length||Ma[Ma.length-1]!==s)){var w="deltaY"in k?Cw(k):qu(k),E=e.current.filter(function(M){return M.name===k.type&&M.target===k.target&&b$(M.delta,w)})[0];if(E&&E.should){k.cancelable&&k.preventDefault();return}if(!E){var A=(o.current.shards||[]).map(Ew).filter(Boolean).filter(function(M){return M.contains(k.target)}),I=A.length>0?a(k,A[0]):!o.current.noIsolation;I&&k.cancelable&&k.preventDefault()}}},[]),c=S.useCallback(function(p,k,w,E){var A={name:p,delta:k,target:w,should:E};e.current.push(A),setTimeout(function(){e.current=e.current.filter(function(I){return I!==A})},1)},[]),f=S.useCallback(function(p){r.current=qu(p),n.current=void 0},[]),u=S.useCallback(function(p){c(p.type,Cw(p),p.target,a(p,t.lockRef.current))},[]),h=S.useCallback(function(p){c(p.type,qu(p),p.target,a(p,t.lockRef.current))},[]);S.useEffect(function(){return Ma.push(s),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Ra),document.addEventListener("touchmove",l,Ra),document.addEventListener("touchstart",f,Ra),function(){Ma=Ma.filter(function(p){return p!==s}),document.removeEventListener("wheel",l,Ra),document.removeEventListener("touchmove",l,Ra),document.removeEventListener("touchstart",f,Ra)}},[]);var y=t.removeScrollBar,m=t.inert;return S.createElement(S.Fragment,null,m?S.createElement(s,{styles:w$(i)}):null,y?S.createElement(d$,{gapMode:"margin"}):null)}const S$=e$(mC,E$);var EC=S.forwardRef(function(t,e){return S.createElement(Ph,hi({},t,{ref:e,sideCar:S$}))});EC.classNames=Ph.classNames;const SC=EC,k$=["Enter"," "],Ih="Menu",[A$,eJ,_$]=Ah(Ih),[wa,kC]=$r(Ih,[_$,ec,tc]);ec();const T$=tc();wa(Ih);const[tJ,P$]=wa(Ih),I$="MenuPortal";wa(I$,{forceMount:void 0});const R$="MenuContent",[rJ,AC]=wa(R$),Zy="MenuItem",Sw="menu.itemSelect",_C=S.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...i}=t,s=S.useRef(null),o=P$(Zy,t.__scopeMenu),a=AC(Zy,t.__scopeMenu),l=Tt(e,s),c=S.useRef(!1),f=()=>{const u=s.current;if(!r&&u){const h=new CustomEvent(Sw,{bubbles:!0,cancelable:!0});u.addEventListener(Sw,y=>n==null?void 0:n(y),{once:!0}),vm(u,h),h.defaultPrevented?c.current=!1:o.onClose()}};return S.createElement(M$,xe({},i,{ref:l,disabled:r,onClick:ge(t.onClick,f),onPointerDown:u=>{var h;(h=t.onPointerDown)===null||h===void 0||h.call(t,u),c.current=!0},onPointerUp:ge(t.onPointerUp,u=>{var h;c.current||(h=u.currentTarget)===null||h===void 0||h.click()}),onKeyDown:ge(t.onKeyDown,u=>{const h=a.searchRef.current!=="";r||h&&u.key===" "||k$.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),M$=S.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...s}=t,o=AC(Zy,r),a=T$(r),l=S.useRef(null),c=Tt(e,l),[f,u]=S.useState(!1),[h,y]=S.useState("");return S.useEffect(()=>{const m=l.current;if(m){var p;y(((p=m.textContent)!==null&&p!==void 0?p:"").trim())}},[s.children]),S.createElement(A$.ItemSlot,{scope:r,disabled:n,textValue:i??h},S.createElement(hC,xe({asChild:!0},a,{focusable:!n}),S.createElement($e.div,xe({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},s,{ref:c,onPointerMove:ge(t.onPointerMove,kw(m=>{n?o.onItemLeave(m):(o.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus())})),onPointerLeave:ge(t.onPointerLeave,kw(m=>o.onItemLeave(m))),onFocus:ge(t.onFocus,()=>u(!0)),onBlur:ge(t.onBlur,()=>u(!1))}))))}),N$=S.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...i}=t;return S.createElement(PC,{scope:t.__scopeMenu,checked:r},S.createElement(_C,xe({role:"menuitemcheckbox","aria-checked":S0(r)?"mixed":r},i,{ref:e,"data-state":_m(r),onSelect:ge(i.onSelect,()=>n==null?void 0:n(S0(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),O$="MenuRadioGroup",[nJ,$$]=wa(O$,{value:void 0,onValueChange:()=>{}}),D$="MenuRadioItem",L$=S.forwardRef((t,e)=>{const{value:r,...n}=t,i=$$(D$,t.__scopeMenu),s=r===i.value;return S.createElement(PC,{scope:t.__scopeMenu,checked:s},S.createElement(_C,xe({role:"menuitemradio","aria-checked":s},n,{ref:e,"data-state":_m(s),onSelect:ge(n.onSelect,()=>{var o;return(o=i.onValueChange)===null||o===void 0?void 0:o.call(i,r)},{checkForDefaultPrevented:!1})})))}),TC="MenuItemIndicator",[PC,B$]=wa(TC,{checked:!1}),F$=S.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...i}=t,s=B$(TC,r);return S.createElement(vo,{present:n||S0(s.checked)||s.checked===!0},S.createElement($e.span,xe({},i,{ref:e,"data-state":_m(s.checked)})))}),j$="MenuSub";wa(j$);function S0(t){return t==="indeterminate"}function _m(t){return S0(t)?"indeterminate":t?"checked":"unchecked"}function kw(t){return e=>e.pointerType==="mouse"?t(e):void 0}const z$=N$,U$=L$,V$=F$,IC="DropdownMenu",[H$,iJ]=$r(IC,[kC]),Tm=kC();H$(IC);const W$=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=Tm(r);return S.createElement(z$,xe({},i,n,{ref:e}))}),q$=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=Tm(r);return S.createElement(U$,xe({},i,n,{ref:e}))}),G$=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=Tm(r);return S.createElement(V$,xe({},i,n,{ref:e}))}),K$=W$,J$=q$,RC=G$;var MC="_1k2mbvi5",NC="_1k2mbvi4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12wk fyvr12we fyvr11h0 fyvr11ko fyvr11jw fyvr12uz fyvr11n2 fyvr11hw fyvr12rz";const Y$=({children:t})=>Y.jsx(RC,{className:MC,children:t});S.forwardRef(({className:t,children:e,...r},n)=>Y.jsxs(K$,{className:an(NC,t),...r,ref:n,children:[Y.jsx(Y$,{children:Y.jsx(U8,{size:"xs"})}),Y.jsx(Ut,{variant:"small",children:e})]}));S.forwardRef(({className:t,children:e,...r},n)=>Y.jsxs(J$,{className:an(NC,t),...r,ref:n,children:[Y.jsx(RC,{className:MC,children:Y.jsx(Ut,{children:"•"})}),Y.jsx(Ut,{variant:"small",children:e})]}));const Pm=S.forwardRef((t,e)=>{const{icon:r,size:n="md",...i}=t;return Y.jsx(qe,{leftIcon:r,size:n,flexShrink:"0",ref:e,...i})}),Q$=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var X$="fyvr12wh fyvr12wb fyvr11ho fyvr12vb fyvr1ko fyvr1oo fyvr1mo fyvr1qo",Z$="_1hq71vk1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12n5 fyvr12ft fyvr1215 fyvr128h fyvr12nn fyvr12gb fyvr121n fyvr128z fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",eD=Ft({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const tD={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*",pdf:".pdf,application/pdf"};S.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:i=!1,id:s,label:o="",labelLocation:a="hidden",name:l,onValueChange:c,placeholder:f="Upload a file",validExtensions:u,...h}=t,y=S.useRef(null),m=Q$(y,e),[p,k]=S.useState(null),w=A=>{const I=A.currentTarget.files;if(!I||!I[0])return;const M=I[0],B=M.name,U=M.size/1e3;k({name:B,size:U,extension:B.split(".").pop()??""}),c==null||c(M)},E=u.map(A=>tD[A]).join(",");return Y.jsx(Yl,{description:n,disabled:i,display:"grid",id:s??l,label:o,labelLocation:a,children:Y.jsxs(ue,{width:"full",minWidth:"0",justifyContent:p?"space-between":"flex-start",gap:"2",color:p?"text100":"text50",className:an(Z$,eD({borderRadius:r})),children:[p?Y.jsxs(ue,{flexDirection:"row",gap:"2",alignItems:"center",minWidth:"0",children:[Y.jsx(Ut,{ellipsis:!0,children:p.name}),Y.jsxs(Ut,{color:"text50",variant:"xsmall",whiteSpace:"nowrap",children:[p.size.toFixed(2)," kb"]})]}):Y.jsx(Ut,{ellipsis:!0,children:f}),Y.jsx(ue,{accept:E,as:"input",className:X$,cursor:"pointer",disabled:i,id:s??l,name:l,onChange:w,ref:m,type:"file",...h}),p&&Y.jsx(Pm,{cursor:"pointer",icon:ym,size:"xs",onClick:A=>{var I;A.preventDefault(),A.stopPropagation(),(I=y.current)!=null&&I.value&&(y.current.value=""),c==null||c(null),k(null)},zIndex:"10"})]})})});var rD=Ft({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const ep=1e3,gl=64,dv=gl/2,hv=(t,e=ep)=>t%e/(ep/gl),Bo=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let i=0,s;i>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)},nD=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),i=t%360,s=(t+120)%360,o=r%360;return{id:Bo(n),a:`hsl(${i}deg 100% 40%)`,b:`hsl(${s}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}},iD=(t,e)=>{const r=[];for(let n=0;n{const s=gl/10+hv(n.r,ep*1.5/(i+1));return{...nD(n.a,n.b,n.c),x:hv(n.x),y:hv(n.y),r:s}})};S.memo(t=>{const{className:e,address:r,size:n="md",complexity:i=1,...s}=t,o=iD(r,i);return Y.jsxs(ue,{as:"svg",className:an(e,rD({size:n})),viewBox:`0 0 ${gl} ${gl}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...s,children:[Y.jsxs("defs",{children:[Y.jsx("clipPath",{id:"circle-clip",children:Y.jsx("circle",{cx:dv,cy:dv,r:dv})}),Y.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[Y.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Y.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),Y.jsx("feGaussianBlur",{stdDeviation:gl/10,result:"effect1_foregroundBlur"})]}),Y.jsxs("linearGradient",{id:`gradient-background-${o[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[Y.jsx("stop",{offset:"0",stopColor:o[0].c}),Y.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map(a=>Y.jsxs(S.Fragment,{children:[Y.jsxs("radialGradient",{id:`gradient-primary-${a.id}`,children:[Y.jsx("stop",{offset:"0",stopColor:a.a}),Y.jsx("stop",{offset:"1",stopColor:a.b})]}),Y.jsxs("radialGradient",{id:`gradient-secondary-${a.id}`,children:[Y.jsx("stop",{offset:"0",stopColor:a.c}),Y.jsx("stop",{offset:"1",stopColor:a.b})]})]},a.id))]}),Y.jsxs("g",{clipPath:"url(#circle-clip)",children:[Y.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${o[0].id})`}),Y.jsx("g",{filter:"url(#blur)",children:o.map(a=>Y.jsxs(S.Fragment,{children:[Y.jsx("circle",{fill:`url(#gradient-primary-${a.id})`,cx:a.x,cy:a.y,r:a.r}),Y.jsx("circle",{fill:`url(#gradient-secondary-${a.id})`,cx:a.y,cy:a.x,r:a.r/2})]},a.id))})]})]})});const OC=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[i,s]=S.useState(!1),o=a=>{s(!0),r==null||r(a)};return Y.jsx(ue,{as:yl.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:i?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},$C="Dialog",[DC,sJ]=$r($C),[sD,yo]=DC($C),oD=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:i,onOpenChange:s,modal:o=!0}=t,a=S.useRef(null),l=S.useRef(null),[c=!1,f]=ca({prop:n,defaultProp:i,onChange:s});return S.createElement(sD,{scope:e,triggerRef:a,contentRef:l,contentId:Ws(),titleId:Ws(),descriptionId:Ws(),open:c,onOpenChange:f,onOpenToggle:S.useCallback(()=>f(u=>!u),[f]),modal:o},r)},LC="DialogPortal",[aD,BC]=DC(LC,{forceMount:void 0}),lD=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:i}=t,s=yo(LC,e);return S.createElement(aD,{scope:e,forceMount:r},S.Children.map(n,o=>S.createElement(vo,{present:r||s.open},S.createElement(fC,{asChild:!0,container:i},o))))},tp="DialogOverlay",cD=S.forwardRef((t,e)=>{const r=BC(tp,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=yo(tp,t.__scopeDialog);return s.modal?S.createElement(vo,{present:n||s.open},S.createElement(fD,xe({},i,{ref:e}))):null}),fD=S.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=yo(tp,r);return S.createElement(SC,{as:Nl,allowPinchZoom:!0,shards:[i.contentRef]},S.createElement($e.div,xe({"data-state":jC(i.open)},n,{ref:e,style:{pointerEvents:"auto",...n.style}})))}),Lf="DialogContent",uD=S.forwardRef((t,e)=>{const r=BC(Lf,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=yo(Lf,t.__scopeDialog);return S.createElement(vo,{present:n||s.open},s.modal?S.createElement(dD,xe({},i,{ref:e})):S.createElement(hD,xe({},i,{ref:e})))}),dD=S.forwardRef((t,e)=>{const r=yo(Lf,t.__scopeDialog),n=S.useRef(null),i=Tt(e,r.contentRef,n);return S.useEffect(()=>{const s=n.current;if(s)return yC(s)},[]),S.createElement(FC,xe({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ge(t.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=r.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:ge(t.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:ge(t.onFocusOutside,s=>s.preventDefault())}))}),hD=S.forwardRef((t,e)=>{const r=yo(Lf,t.__scopeDialog),n=S.useRef(!1),i=S.useRef(!1);return S.createElement(FC,xe({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,s),!s.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),s.preventDefault()}n.current=!1,i.current=!1},onInteractOutside:s=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=s.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}}))}),FC=S.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=t,a=yo(Lf,r),l=S.useRef(null),c=Tt(e,l);return G8(),S.createElement(S.Fragment,null,S.createElement(K8,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s},S.createElement(xm,xe({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":jC(a.open)},o,{ref:c,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),vD="DialogClose",yD=S.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=yo(vD,r);return S.createElement($e.button,xe({type:"button"},n,{ref:e,onClick:ge(t.onClick,()=>i.onOpenChange(!1))}))});function jC(t){return t?"open":"closed"}const pD=oD,gD=lD,mD=cD,xD=uD,bD=yD;var wD=Ft({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]}),CD=Ft({defaultClassName:"_1vqx0w91 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]});const ED=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:i,...s}=t;return Y.jsx(ue,{className:wD({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...s,children:Y.jsx(ue,{className:CD({direction:n}),background:"backgroundPrimary",...i,children:e})})};function SD(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}function kD(t,e){var r=t;for(var n of e){if(!(n in r))throw new Error("Path ".concat(e.join(" -> ")," does not exist in object"));r=r[n]}return r}function zC(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n=t.constructor();for(var i in t){var s=t[i],o=[...r,i];typeof s=="string"||typeof s=="number"||s==null?n[i]=e(s,o):typeof s=="object"&&!Array.isArray(s)?n[i]=zC(s,e,o):console.warn('Skipping invalid key "'.concat(o.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(s)?"Array":typeof s,'"'))}return n}function Aw(t,e,r){t.style.setProperty(SD(e),r)}function _w(t,e,r){if(typeof r=="object"){var n=e;zC(r,(a,l)=>{a!=null&&Aw(t,kD(n,l),String(a))})}else{var i=e;for(var s in i){var o=i[s];o!=null&&Aw(t,s,i[s])}}}const Im=["dark","light"],AD="dark",_D="data-theme",Tw="@sequence.theme",TD=t=>Im.includes(t),PD=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),UC=t=>t?`${Tw}.${t}`:Tw,ID=t=>{const e=localStorage.getItem(UC(t));return e&&Im.includes(e)?e:AD},VC=S.createContext(null),RD=t=>{const[e,r]=S.useState(t.theme||ID(t.scope));S.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),S.useEffect(()=>{t.theme&&r(t.theme)},[t.theme]),S.useEffect(()=>{const i=document.querySelector(t.root||":root");i&&(TD(e)?(i.setAttribute(_D,e),_w(i,Q2,{colors:lM[e]})):PD(e)&&_w(i,Q2,{colors:e}))},[e,t.root]);const n=S.useMemo(()=>({theme:e,root:t.root,setTheme:i=>{Im.includes(i)&&(localStorage.setItem(UC(t.scope),i),r(i))}}),[e,t.root,t.scope]);return Y.jsx(VC.Provider,{value:n,children:t.children})},MD=()=>{const t=S.useContext(VC);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t};var ND="fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11ni",OD=Ft({defaultClassName:"_5b32m95 fyvr11d8 fyvr11dw fyvr11bg fyvr11by fyvr11c4 fyvr11cm fyvr11ls fyvr11m8 fyvr12wk fyvr12we fyvr11h0 fyvr11i4 fyvr11hs fyvr11sb fyvr1mo fyvr1om",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]}),$D="fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",DD="fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11ni fyvr1ko fyvr1oo fyvr1qo fyvr1mo";const LD=t=>{const{autoHeight:e=!1,backdropColor:r="backgroundBackdrop",children:n,disableAnimation:i=!1,isDismissible:s=!0,onClose:o,scroll:a=!0,size:l="lg",overlayProps:c,contentProps:f}=t,{root:u}=MD(),h=document.querySelector(u||"body");return Y.jsx(pD,{modal:!0,defaultOpen:!0,onOpenChange:o,children:Y.jsx(gD,{forceMount:!0,container:h,children:Y.jsxs(ue,{className:DD,children:[Y.jsx(ue,{as:mD,asChild:!0,background:r,className:$D,forceMount:!0,children:Y.jsx(yl.div,{initial:i?!1:{opacity:0},animate:i?!1:{opacity:1},exit:i?void 0:{opacity:0},transition:{type:"tween",ease:"linear"},...c},"modal-overlay")}),Y.jsx(xD,{asChild:!0,className:OD({autoHeight:e,size:l}),forceMount:!0,onEscapeKeyDown:y=>{s?o==null||o():y.preventDefault()},onInteractOutside:y=>{s||y.preventDefault()},children:Y.jsxs(yl.div,{initial:i?!1:{y:"100%",opacity:l==="sm"?0:1},animate:i?!1:{y:0,opacity:1},exit:i?void 0:{y:"100%",opacity:l==="sm"?0:1},transition:{type:"tween",ease:"easeOut"},...f,children:[a?Y.jsx(ED,{children:n}):n,s&&Y.jsx(bD,{asChild:!0,children:Y.jsx(Pm,{icon:ym,backdropFilter:"blur",size:"xs",className:ND,"aria-label":"Close"})})]},"modal-content")})]})})})};var BD=Ft({defaultClassName:"_1acm19ya fyvr1t4 fyvr1v0 fyvr12wh fyvr12wb fyvr11gw fyvr128 fyvr15o",variantClassNames:{numeric:{false:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",true:"_1qxj1ib9 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8"}},defaultVariants:{},compoundVariants:[]}),FD="_1acm19y1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12rt fyvr1g0 fyvr118g",jD=Ft({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const Rm=S.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",leftIcon:f,rightIcon:u,name:h,controls:y,type:m="text",numeric:p=!1,...k}=t;return Y.jsx(Yl,{description:s,disabled:o,display:"grid",id:a??h,label:l,labelLocation:c,children:Y.jsx(ue,{width:"full",children:Y.jsxs(ue,{className:an(FD,jD({borderRadius:i})),children:[f&&Y.jsx(f,{size:"sm"}),Y.jsx(ue,{as:r,autoComplete:n,spellCheck:"false",className:BD({numeric:p}),disabled:o,id:a??h,name:h,ref:e,type:m,...k}),u&&Y.jsx(u,{size:"sm"}),y]})})})}),zD=RegExp("^\\d*(?:\\\\[.])?\\d*$");function UD(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}S.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:i,onBlur:s,...o}=t,a=c=>{let{value:f}=c.target;f=f.replace(/,/g,"."),f.startsWith(".")&&(f="0"+f),f.startsWith("0")&&(f=f.replace(/^0+(?=\d)/,"")),(f===""||zD.test(UD(f)))&&(i==null||i({...c,target:{...c.target,value:f}}))},l=c=>{const{value:f}=c.target;let u=f;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),s==null||s(c),u!==f&&(i==null||i({...c,target:{...c.target,value:u}}))};return Y.jsx(Rm,{name:r,onChange:a,onBlur:l,inputMode:"decimal",autoComplete:"off",autoCorrect:"off",type:"text",pattern:"^[0-9]*[.,]?[0-9]*$",placeholder:n||"0",minLength:1,maxLength:79,spellCheck:"false",numeric:!0,ref:e,...o})});Ft({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const HC="Progress",Rh=100,[VD,oJ]=$r(HC),[HD,aJ]=VD(HC),WD=S.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:i,getValueLabel:s=qD,...o}=t,a=rp(i)?i:Rh,l=WC(n,a)?n:null,c=k0(l)?s(l,a):void 0;return S.createElement(HD,{scope:r,value:l,max:a},S.createElement($e.div,qt({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":k0(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":GD(l,a),"data-value":l??void 0,"data-max":a},o,{ref:e})))});WD.propTypes={max(t,e,r){const n=t[e],i=String(n);return n&&!rp(n)?new Error(KD(i,r)):null},value(t,e,r){const n=t[e],i=String(n),s=rp(t.max)?t.max:Rh;return n!=null&&!WC(n,s)?new Error(JD(i,r)):null}};function qD(t,e){return`${Math.round(t/e*100)}%`}function GD(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function k0(t){return typeof t=="number"}function rp(t){return k0(t)&&!isNaN(t)&&t>0}function WC(t,e){return k0(t)&&!isNaN(t)&&t<=e&&t>=0}function KD(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Rh}\`.`}function JD(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: - a positive number - - less than the value passed to \`max\` (or ${Mh} if no \`max\` prop is set) + - less than the value passed to \`max\` (or ${Rh} if no \`max\` prop is set) - \`null\` if the progress is indeterminate. -Defaulting to \`null\`.`}const YC="Radio",[tL,XC]=Dr(YC),[rL,nL]=tL(YC),iL=E.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:i=!1,required:s,disabled:o,value:a="on",onCheck:l,...c}=t,[f,u]=E.useState(null),h=_t(e,p=>u(p)),y=E.useRef(!1),m=f?!!f.closest("form"):!0;return E.createElement(rL,{scope:r,checked:i,disabled:o},E.createElement(De.button,qt({type:"button",role:"radio","aria-checked":i,"data-state":ZC(i),"data-disabled":o?"":void 0,disabled:o,value:a},c,{ref:h,onClick:ge(t.onClick,p=>{i||l==null||l(),m&&(y.current=p.isPropagationStopped(),y.current||p.stopPropagation())})})),m&&E.createElement(aL,{control:f,bubbles:!y.current,name:n,value:a,checked:i,required:s,disabled:o,style:{transform:"translateX(-100%)"}}))}),sL="RadioIndicator",oL=E.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...i}=t,s=nL(sL,r);return E.createElement(vo,{present:n||s.checked},E.createElement(De.span,qt({"data-state":ZC(s.checked),"data-disabled":s.disabled?"":void 0},i,{ref:e})))}),aL=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=E.useRef(null),o=dm(r),a=hm(e);return E.useEffect(()=>{const l=s.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const h=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(h)}},[o,r,n]),E.createElement("input",qt({type:"radio","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ZC(t){return t?"checked":"unchecked"}const lL=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],eA="RadioGroup",[cL,gJ]=Dr(eA,[tc,XC]),tA=tc(),rA=XC(),[fL,uL]=cL(eA),dL=E.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:f=!0,onValueChange:u,...h}=t,y=tA(r),m=mm(c),[p,S]=ca({prop:s,defaultProp:i,onChange:u});return E.createElement(fL,{scope:r,name:n,required:o,disabled:a,value:p,onValueChange:S},E.createElement(qO,qt({asChild:!0},y,{orientation:l,dir:m,loop:f}),E.createElement(De.div,qt({role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:m},h,{ref:e}))))}),hL="RadioGroupItem",vL=E.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...i}=t,s=uL(hL,r),o=s.disabled||n,a=tA(r),l=rA(r),c=E.useRef(null),f=_t(e,c),u=s.value===i.value,h=E.useRef(!1);return E.useEffect(()=>{const y=p=>{lL.includes(p.key)&&(h.current=!0)},m=()=>h.current=!1;return document.addEventListener("keydown",y),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",y),document.removeEventListener("keyup",m)}},[]),E.createElement(mC,qt({asChild:!0},a,{focusable:!o,active:u}),E.createElement(iL,qt({disabled:o,required:s.required,checked:u},l,i,{name:s.name,ref:f,onCheck:()=>s.onValueChange(i.value),onKeyDown:ge(y=>{y.key==="Enter"&&y.preventDefault()}),onFocus:ge(i.onFocus,()=>{var y;h.current&&((y=c.current)===null||y===void 0||y.click())})})))}),yL=E.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,i=rA(r);return E.createElement(oL,qt({},i,n,{ref:e}))}),pL=dL,gL=vL,mL=yL;var xL=Ft({defaultClassName:"io59uy8 io59uy7 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12rt",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]}),bL=Ft({defaultClassName:"io59uy3 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr12nb fyvr12fz fyvr121b fyvr128n fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11ob fyvr12uz fyvr12uv fyvr12vj",variantClassNames:{size:{sm:"io59uy4 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy5 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]});const wL=t=>{const{id:e,label:r,size:n="sm",value:i,disabled:s}=t;return Q.jsx(ue,{alignItems:"center",children:Q.jsx(Ql,{disabled:s,display:"flex",id:e,label:r,labelLocation:"right",children:Q.jsx(gL,{className:bL({size:n}),value:i,id:e,disabled:s,children:Q.jsx(mL,{className:xL({size:n})})})})})};E.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:i="2",name:s,options:o,size:a="sm",...l}=t;return Q.jsx(pL,{disabled:n,name:s,ref:e,...l,children:Q.jsx(ue,{flexDirection:r,gap:i,children:o.map(({label:c,value:f,disabled:u})=>Q.jsx(wL,{id:`${s}-${f}`,label:c,size:a,value:f,disabled:u},f))})})});function Pw(t,[e,r]){return Math.min(r,Math.max(e,t))}const nA=E.forwardRef((t,e)=>E.createElement(De.span,xe({},t,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}))),CL=[" ","Enter","ArrowUp","ArrowDown"],AL=[" ","Enter"],Rh="Select",[Nh,Rm,EL]=kh(Rh),[rc,mJ]=Dr(Rh,[EL,ec]),Nm=ec(),[SL,Ca]=rc(Rh),[kL,_L]=rc(Rh),TL=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:l,dir:c,name:f,autoComplete:u,disabled:h,required:y}=t,m=Nm(e),[p,S]=E.useState(null),[w,A]=E.useState(null),[k,I]=E.useState(!1),R=mm(c),[F=!1,z]=ca({prop:n,defaultProp:i,onChange:s}),[j,K]=ca({prop:o,defaultProp:a,onChange:l}),J=E.useRef(null),Z=p?!!p.closest("form"):!0,[ie,L]=E.useState(new Set),v=Array.from(ie).map(C=>C.props.value).join(";");return E.createElement(IO,m,E.createElement(SL,{required:y,scope:e,trigger:p,onTriggerChange:S,valueNode:w,onValueNodeChange:A,valueNodeHasChildren:k,onValueNodeHasChildrenChange:I,contentId:Ws(),value:j,onValueChange:K,open:F,onOpenChange:z,dir:R,triggerPointerDownPosRef:J,disabled:h},E.createElement(Nh.Provider,{scope:e},E.createElement(kL,{scope:t.__scopeSelect,onNativeOptionAdd:E.useCallback(C=>{L(P=>new Set(P).add(C))},[]),onNativeOptionRemove:E.useCallback(C=>{L(P=>{const N=new Set(P);return N.delete(C),N})},[])},r)),Z?E.createElement(oA,{key:v,"aria-hidden":!0,required:y,tabIndex:-1,name:f,autoComplete:u,value:j,onChange:C=>K(C.target.value),disabled:h},j===void 0?E.createElement("option",{value:""}):null,Array.from(ie)):null))},PL="SelectTrigger",IL=E.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...i}=t,s=Nm(r),o=Ca(PL,r),a=o.disabled||n,l=_t(e,o.onTriggerChange),c=Rm(r),[f,u,h]=aA(m=>{const p=c().filter(A=>!A.disabled),S=p.find(A=>A.value===o.value),w=lA(p,m,S);w!==void 0&&o.onValueChange(w.value)}),y=()=>{a||(o.onOpenChange(!0),h())};return E.createElement(MO,xe({asChild:!0},s),E.createElement(De.button,xe({type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":sA(o.value)?"":void 0},i,{ref:l,onClick:ge(i.onClick,m=>{m.currentTarget.focus()}),onPointerDown:ge(i.onPointerDown,m=>{const p=m.target;p.hasPointerCapture(m.pointerId)&&p.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&(y(),o.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)},m.preventDefault())}),onKeyDown:ge(i.onKeyDown,m=>{const p=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&u(m.key),!(p&&m.key===" ")&&CL.includes(m.key)&&(y(),m.preventDefault())})})))}),ML="SelectValue",RL=E.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,children:s,placeholder:o="",...a}=t,l=Ca(ML,r),{onValueNodeHasChildrenChange:c}=l,f=s!==void 0,u=_t(e,l.onValueNodeChange);return gn(()=>{c(f)},[c,f]),E.createElement(De.span,xe({},a,{ref:u,style:{pointerEvents:"none"}}),sA(l.value)?E.createElement(E.Fragment,null,o):s)}),NL=E.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...i}=t;return E.createElement(De.span,xe({"aria-hidden":!0},i,{ref:e}),n||"▼")}),Dl="SelectContent",OL=E.forwardRef((t,e)=>{const r=Ca(Dl,t.__scopeSelect),[n,i]=E.useState();if(gn(()=>{i(new DocumentFragment)},[]),!r.open){const s=n;return s?ho.createPortal(E.createElement(iA,{scope:t.__scopeSelect},E.createElement(Nh.Slot,{scope:t.__scopeSelect},E.createElement("div",null,t.children))),s):null}return E.createElement(DL,xe({},t,{ref:e}))}),Bi=10,[iA,Oh]=rc(Dl),DL=E.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:h,collisionPadding:y,sticky:m,hideWhenDetached:p,avoidCollisions:S,...w}=t,A=Ca(Dl,r),[k,I]=E.useState(null),[R,F]=E.useState(null),z=_t(e,$=>I($)),[j,K]=E.useState(null),[J,Z]=E.useState(null),ie=Rm(r),[L,v]=E.useState(!1),C=E.useRef(!1);E.useEffect(()=>{if(k)return bC(k)},[k]),X8();const P=E.useCallback($=>{const[O,...U]=ie().map(G=>G.ref.current),[W]=U.slice(-1),H=document.activeElement;for(const G of $)if(G===H||(G==null||G.scrollIntoView({block:"nearest"}),G===O&&R&&(R.scrollTop=0),G===W&&R&&(R.scrollTop=R.scrollHeight),G==null||G.focus(),document.activeElement!==H))return},[ie,R]),N=E.useCallback(()=>P([j,k]),[P,j,k]);E.useEffect(()=>{L&&N()},[L,N]);const{onOpenChange:b,triggerPointerDownPosRef:_}=A;E.useEffect(()=>{if(k){let $={x:0,y:0};const O=W=>{var H,G,oe,re;$={x:Math.abs(Math.round(W.pageX)-((H=(G=_.current)===null||G===void 0?void 0:G.x)!==null&&H!==void 0?H:0)),y:Math.abs(Math.round(W.pageY)-((oe=(re=_.current)===null||re===void 0?void 0:re.y)!==null&&oe!==void 0?oe:0))}},U=W=>{$.x<=10&&$.y<=10?W.preventDefault():k.contains(W.target)||b(!1),document.removeEventListener("pointermove",O),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",O),document.addEventListener("pointerup",U,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",O),document.removeEventListener("pointerup",U,{capture:!0})}}},[k,b,_]),E.useEffect(()=>{const $=()=>b(!1);return window.addEventListener("blur",$),window.addEventListener("resize",$),()=>{window.removeEventListener("blur",$),window.removeEventListener("resize",$)}},[b]);const[M,g]=aA($=>{const O=ie().filter(H=>!H.disabled),U=O.find(H=>H.ref.current===document.activeElement),W=lA(O,$,U);W&&setTimeout(()=>W.ref.current.focus())}),d=E.useCallback(($,O,U)=>{const W=!C.current&&!U;(A.value!==void 0&&A.value===O||W)&&(K($),W&&(C.current=!0))},[A.value]),T=E.useCallback(()=>k==null?void 0:k.focus(),[k]),D=E.useCallback(($,O,U)=>{const W=!C.current&&!U;(A.value!==void 0&&A.value===O||W)&&Z($)},[A.value]),x=n==="popper"?Iw:BL,B=x===Iw?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:h,collisionPadding:y,sticky:m,hideWhenDetached:p,avoidCollisions:S}:{};return E.createElement(iA,{scope:r,content:k,viewport:R,onViewportChange:F,itemRefCallback:d,selectedItem:j,onItemLeave:T,itemTextRefCallback:D,focusSelectedItem:N,selectedItemText:J,position:n,isPositioned:L,searchRef:M},E.createElement(PC,{as:Nl,allowPinchZoom:!0},E.createElement(Z8,{asChild:!0,trapped:A.open,onMountAutoFocus:$=>{$.preventDefault()},onUnmountAutoFocus:ge(i,$=>{var O;(O=A.trigger)===null||O===void 0||O.focus({preventScroll:!0}),$.preventDefault()})},E.createElement(xm,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:$=>$.preventDefault(),onDismiss:()=>A.onOpenChange(!1)},E.createElement(x,xe({role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed",dir:A.dir,onContextMenu:$=>$.preventDefault()},w,B,{onPlaced:()=>v(!0),ref:z,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:ge(w.onKeyDown,$=>{const O=$.ctrlKey||$.altKey||$.metaKey;if($.key==="Tab"&&$.preventDefault(),!O&&$.key.length===1&&g($.key),["ArrowUp","ArrowDown","Home","End"].includes($.key)){let W=ie().filter(H=>!H.disabled).map(H=>H.ref.current);if(["ArrowUp","End"].includes($.key)&&(W=W.slice().reverse()),["ArrowUp","ArrowDown"].includes($.key)){const H=$.target,G=W.indexOf(H);W=W.slice(G+1)}setTimeout(()=>P(W)),$.preventDefault()}})}))))))}),BL=E.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...i}=t,s=Ca(Dl,r),o=Oh(Dl,r),[a,l]=E.useState(null),[c,f]=E.useState(null),u=_t(e,z=>f(z)),h=Rm(r),y=E.useRef(!1),m=E.useRef(!0),{viewport:p,selectedItem:S,selectedItemText:w,focusSelectedItem:A}=o,k=E.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&c&&p&&S&&w){const z=s.trigger.getBoundingClientRect(),j=c.getBoundingClientRect(),K=s.valueNode.getBoundingClientRect(),J=w.getBoundingClientRect();if(s.dir!=="rtl"){const H=J.left-j.left,G=K.left-H,oe=z.left-G,re=z.width+oe,fe=Math.max(re,j.width),Tt=window.innerWidth-Bi,Me=Pw(G,[Bi,Tt-fe]);a.style.minWidth=re+"px",a.style.left=Me+"px"}else{const H=j.right-J.right,G=window.innerWidth-K.right-H,oe=window.innerWidth-z.right-G,re=z.width+oe,fe=Math.max(re,j.width),Tt=window.innerWidth-Bi,Me=Pw(G,[Bi,Tt-fe]);a.style.minWidth=re+"px",a.style.right=Me+"px"}const Z=h(),ie=window.innerHeight-Bi*2,L=p.scrollHeight,v=window.getComputedStyle(c),C=parseInt(v.borderTopWidth,10),P=parseInt(v.paddingTop,10),N=parseInt(v.borderBottomWidth,10),b=parseInt(v.paddingBottom,10),_=C+P+L+b+N,M=Math.min(S.offsetHeight*5,_),g=window.getComputedStyle(p),d=parseInt(g.paddingTop,10),T=parseInt(g.paddingBottom,10),D=z.top+z.height/2-Bi,x=ie-D,B=S.offsetHeight/2,$=S.offsetTop+B,O=C+P+$,U=_-O;if(O<=D){const H=S===Z[Z.length-1].ref.current;a.style.bottom="0px";const G=c.clientHeight-p.offsetTop-p.offsetHeight,oe=Math.max(x,B+(H?T:0)+G+N),re=O+oe;a.style.height=re+"px"}else{const H=S===Z[0].ref.current;a.style.top="0px";const oe=Math.max(D,C+p.offsetTop+(H?d:0)+B)+U;a.style.height=oe+"px",p.scrollTop=O-D+p.offsetTop}a.style.margin=`${Bi}px 0`,a.style.minHeight=M+"px",a.style.maxHeight=ie+"px",n==null||n(),requestAnimationFrame(()=>y.current=!0)}},[h,s.trigger,s.valueNode,a,c,p,S,w,s.dir,n]);gn(()=>k(),[k]);const[I,R]=E.useState();gn(()=>{c&&R(window.getComputedStyle(c).zIndex)},[c]);const F=E.useCallback(z=>{z&&m.current===!0&&(k(),A==null||A(),m.current=!1)},[k,A]);return E.createElement(LL,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:y,onScrollButtonChange:F},E.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:I}},E.createElement(De.div,xe({},i,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),Iw=E.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=Bi,...s}=t,o=Nm(r);return E.createElement(RO,xe({},o,s,{ref:e,align:n,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[LL,$L]=rc(Dl,{}),Mw="SelectViewport",FL=E.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=Oh(Mw,r),s=$L(Mw,r),o=_t(e,i.onViewportChange),a=E.useRef(0);return E.createElement(E.Fragment,null,E.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),E.createElement(Nh.Slot,{scope:r},E.createElement(De.div,xe({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:ge(n.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:u}=s;if(u!=null&&u.current&&f){const h=Math.abs(a.current-c.scrollTop);if(h>0){const y=window.innerHeight-Bi*2,m=parseFloat(f.style.minHeight),p=parseFloat(f.style.height),S=Math.max(m,p);if(S0?k:0,f.style.justifyContent="flex-end")}}}a.current=c.scrollTop})}))))}),jL="SelectGroup",[zL,xJ]=rc(jL),UL=E.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=Ws();return E.createElement(zL,{scope:r,id:i},E.createElement(De.div,xe({role:"group","aria-labelledby":i},n,{ref:e})))}),np="SelectItem",[VL,HL]=rc(np),WL=E.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:s,...o}=t,a=Ca(np,r),l=Oh(np,r),c=a.value===n,[f,u]=E.useState(s??""),[h,y]=E.useState(!1),m=_t(e,w=>{var A;return(A=l.itemRefCallback)===null||A===void 0?void 0:A.call(l,w,n,i)}),p=Ws(),S=()=>{i||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return E.createElement(VL,{scope:r,value:n,disabled:i,textId:p,isSelected:c,onItemTextChange:E.useCallback(w=>{u(A=>{var k;return A||((k=w==null?void 0:w.textContent)!==null&&k!==void 0?k:"").trim()})},[])},E.createElement(Nh.ItemSlot,{scope:r,value:n,disabled:i,textValue:f},E.createElement(De.div,xe({role:"option","aria-labelledby":p,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},o,{ref:m,onFocus:ge(o.onFocus,()=>y(!0)),onBlur:ge(o.onBlur,()=>y(!1)),onPointerUp:ge(o.onPointerUp,S),onPointerMove:ge(o.onPointerMove,w=>{if(i){var A;(A=l.onItemLeave)===null||A===void 0||A.call(l)}else w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ge(o.onPointerLeave,w=>{if(w.currentTarget===document.activeElement){var A;(A=l.onItemLeave)===null||A===void 0||A.call(l)}}),onKeyDown:ge(o.onKeyDown,w=>{var A;((A=l.searchRef)===null||A===void 0?void 0:A.current)!==""&&w.key===" "||(AL.includes(w.key)&&S(),w.key===" "&&w.preventDefault())})}))))}),Gu="SelectItemText",qL=E.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,...s}=t,o=Ca(Gu,r),a=Oh(Gu,r),l=HL(Gu,r),c=_L(Gu,r),[f,u]=E.useState(null),h=_t(e,w=>u(w),l.onItemTextChange,w=>{var A;return(A=a.itemTextRefCallback)===null||A===void 0?void 0:A.call(a,w,l.value,l.disabled)}),y=f==null?void 0:f.textContent,m=E.useMemo(()=>E.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},y),[l.disabled,l.value,y]),{onNativeOptionAdd:p,onNativeOptionRemove:S}=c;return gn(()=>(p(m),()=>S(m)),[p,S,m]),E.createElement(E.Fragment,null,E.createElement(De.span,xe({id:l.textId},s,{ref:h})),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?ho.createPortal(s.children,o.valueNode):null)});function sA(t){return t===""||t===void 0}const oA=E.forwardRef((t,e)=>{const{value:r,...n}=t,i=E.useRef(null),s=_t(e,i),o=dm(r);return E.useEffect(()=>{const a=i.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&f){const u=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(u)}},[o,r]),E.createElement(nA,{asChild:!0},E.createElement("select",xe({},n,{ref:s,defaultValue:r})))});oA.displayName="BubbleSelect";function aA(t){const e=Rn(t),r=E.useRef(""),n=E.useRef(0),i=E.useCallback(o=>{const a=r.current+o;e(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),s=E.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,s]}function lA(t,e,r){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,s=r?t.indexOf(r):-1;let o=GL(t,Math.max(s,0));i.length===1&&(o=o.filter(c=>c!==r));const l=o.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==r?l:void 0}function GL(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const KL=TL,JL=IL,QL=RL,YL=NL,XL=OL,ZL=FL,e$=UL,t$=WL,r$=qL;var n$="gohwuma fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11tt fyvr12rt fyvr11nj",i$="gohwume _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12wk fyvr12wl fyvr12we fyvr12wf fyvr11h0 fyvr11jw fyvr11ko fyvr12uz fyvr12uv fyvr12rt fyvr12vt fyvr12vj",s$="gohwum1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12rt fyvr118c fyvr11jw fyvr11n2 fyvr12uz",o$=Ft({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const a$=E.forwardRef(({children:t,className:e,...r},n)=>Q.jsx(t$,{className:an(i$,e),...r,ref:n,children:Q.jsx(r$,{children:t})})),Rw=E.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:i,label:s="",description:o,labelLocation:a="hidden",name:l,options:c,placeholder:f,...u}=t;return Q.jsx(Ql,{disabled:n,display:"grid",id:i??l,label:s,labelLocation:a,description:o,whiteSpace:"nowrap",children:Q.jsxs(KL,{disabled:n,name:l,...u,children:[Q.jsxs(JL,{id:i??l,className:an(s$,o$({borderRadius:r})),ref:e,children:[Q.jsx(QL,{placeholder:f}),Q.jsx(ue,{as:YL,display:"inline-flex",children:Q.jsx(K8,{})})]}),Q.jsx(XL,{className:n$,children:Q.jsx(ZL,{children:Q.jsx(e$,{children:c.map(({value:h,label:y,...m})=>Q.jsx(a$,{value:h,...m,children:y},h))})})})]})})});E.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:i="Search",name:s="search",value:o,...a}=t,l=o?Q.jsx(Pm,{icon:ym,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return Q.jsx(Mm,{ref:e,name:s,leftIcon:rN,controls:r||l,placeholder:i,value:o,onChange:c=>n==null?void 0:n(c),...a})});var l$=Ft({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});E.forwardRef((t,e)=>{const{size:r="md",...n}=t;return Q.jsx(ue,{className:l$({size:r}),color:"text50",ref:e,...n,children:Q.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[Q.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),Q.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});E.forwardRef(({children:t},e)=>Q.jsx(ue,{ref:e,width:"fit",height:"fit",onClick:r=>{r.preventDefault(),r.stopPropagation()},onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),r.stopPropagation())},children:t}));const cA="Switch",[c$,bJ]=Dr(cA);c$(cA);Ft({defaultClassName:"nwwh3z7",variantClassNames:{variant:{pill:"nwwh3z8",line:"nwwh3z9 fyvr11g0"},active:{true:"fyvr12vx",false:"nwwh3zb"},disabled:{true:"fyvr12vh"}},defaultVariants:{},compoundVariants:[[{active:!0,variant:"pill"},"fyvr11u5 fyvr12sb"],[{active:!1,variant:"pill"},"fyvr11ob fyvr12rz"],[{active:!0,variant:"line"},"fyvr12rt"],[{active:!1,variant:"line"},"fyvr12rz"]]});const fA="Tabs",[f$,wJ]=Dr(fA,[tc]);tc();f$(fA);var u$="_1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n7";E.forwardRef((t,e)=>{const{icon:r,label:n,...i}=t;return Q.jsxs(ue,{className:u$,ref:e,background:"buttonGlass",...i,children:[r&&Q.jsx(r,{size:"xs"}),Q.jsx(Ut,{children:n})]})});const d$="ToastProvider",[h$,CJ,v$]=kh("Toast"),[uA,AJ]=Dr("Toast",[v$]),[EJ,dA]=uA(d$),Nw="toast.viewportPause",Ow="toast.viewportResume",Dh="Toast",y$="toast.swipeStart",p$="toast.swipeMove",g$="toast.swipeCancel",m$="toast.swipeEnd",[x$,b$]=uA(Dh,{onClose(){}}),w$=E.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:f,onSwipeMove:u,onSwipeCancel:h,onSwipeEnd:y,...m}=t,p=dA(Dh,r),[S,w]=E.useState(null),A=_t(e,v=>w(v)),k=E.useRef(null),I=E.useRef(null),R=i||p.duration,F=E.useRef(0),z=E.useRef(R),j=E.useRef(0),{onToastAdd:K,onToastRemove:J}=p,Z=Rn(()=>{var v;(S==null?void 0:S.contains(document.activeElement))&&((v=p.viewport)===null||v===void 0||v.focus()),o()}),ie=E.useCallback(v=>{!v||v===1/0||(window.clearTimeout(j.current),F.current=new Date().getTime(),j.current=window.setTimeout(Z,v))},[Z]);E.useEffect(()=>{const v=p.viewport;if(v){const C=()=>{ie(z.current),c==null||c()},P=()=>{const N=new Date().getTime()-F.current;z.current=z.current-N,window.clearTimeout(j.current),l==null||l()};return v.addEventListener(Nw,P),v.addEventListener(Ow,C),()=>{v.removeEventListener(Nw,P),v.removeEventListener(Ow,C)}}},[p.viewport,R,l,c,ie]),E.useEffect(()=>{s&&!p.isClosePausedRef.current&&ie(R)},[s,R,p.isClosePausedRef,ie]),E.useEffect(()=>(K(),()=>J()),[K,J]);const L=E.useMemo(()=>S?vA(S):null,[S]);return p.viewport?E.createElement(E.Fragment,null,L&&E.createElement(C$,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},L),E.createElement(x$,{scope:r,onClose:Z},ho.createPortal(E.createElement(h$.ItemSlot,{scope:r},E.createElement(RN,{asChild:!0,onEscapeKeyDown:ge(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||Z(),p.isFocusedToastEscapeKeyDownRef.current=!1})},E.createElement(De.li,xe({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection},m,{ref:A,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ge(t.onKeyDown,v=>{v.key==="Escape"&&(a==null||a(v.nativeEvent),v.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,Z()))}),onPointerDown:ge(t.onPointerDown,v=>{v.button===0&&(k.current={x:v.clientX,y:v.clientY})}),onPointerMove:ge(t.onPointerMove,v=>{if(!k.current)return;const C=v.clientX-k.current.x,P=v.clientY-k.current.y,N=!!I.current,b=["left","right"].includes(p.swipeDirection),_=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,M=b?_(0,C):0,g=b?0:_(0,P),d=v.pointerType==="touch"?10:2,T={x:M,y:g},D={originalEvent:v,delta:T};N?(I.current=T,Ku(p$,u,D,{discrete:!1})):Dw(T,p.swipeDirection,d)?(I.current=T,Ku(y$,f,D,{discrete:!1}),v.target.setPointerCapture(v.pointerId)):(Math.abs(C)>d||Math.abs(P)>d)&&(k.current=null)}),onPointerUp:ge(t.onPointerUp,v=>{const C=I.current,P=v.target;if(P.hasPointerCapture(v.pointerId)&&P.releasePointerCapture(v.pointerId),I.current=null,k.current=null,C){const N=v.currentTarget,b={originalEvent:v,delta:C};Dw(C,p.swipeDirection,p.swipeThreshold)?Ku(m$,y,b,{discrete:!0}):Ku(g$,h,b,{discrete:!0}),N.addEventListener("click",_=>_.preventDefault(),{once:!0})}})})))),p.viewport))):null});w$.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${Dh}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const C$=t=>{const{__scopeToast:e,children:r,...n}=t,i=dA(Dh,e),[s,o]=E.useState(!1),[a,l]=E.useState(!1);return _$(()=>o(!0)),E.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:E.createElement(yC,{asChild:!0},E.createElement(nA,n,s&&E.createElement(E.Fragment,null,i.label," ",r)))},A$="ToastAction",E$=E.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?E.createElement(hA,{altText:r,asChild:!0},E.createElement(k$,xe({},n,{ref:e}))):null});E$.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${A$}\``)}};const S$="ToastClose",k$=E.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,i=b$(S$,r);return E.createElement(hA,{asChild:!0},E.createElement(De.button,xe({type:"button"},n,{ref:e,onClick:ge(t.onClick,i.onClose)})))}),hA=E.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...i}=t;return E.createElement(De.div,xe({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},i,{ref:e}))});function vA(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),T$(n)){const i=n.ariaHidden||n.hidden||n.style.display==="none",s=n.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...vA(n))}}),e}function Ku(t,e,r,{discrete:n}){const i=r.originalEvent.currentTarget,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),n?vm(i,s):i.dispatchEvent(s)}const Dw=(t,e,r=0)=>{const n=Math.abs(t.x),i=Math.abs(t.y),s=n>i;return e==="left"||e==="right"?s&&n>r:!s&&i>r};function _$(t=()=>{}){const e=Rn(t);gn(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function T$(t){return t.nodeType===t.ELEMENT_NODE}Ft({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});E.createContext(null);var P$="_15pztn2",I$="_15pztn1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12rt fyvr128 fyvr11h0";E.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",name:f,rows:u,resize:h=!1,...y}=t;return Q.jsx(Ql,{description:s,disabled:o,display:"grid",id:a??f,label:l,labelLocation:c,children:Q.jsx(ue,{as:r,autoComplete:n,spellCheck:"false",className:an(I$,h&&P$),disabled:o,id:a??f,name:f,ref:e,rows:u,borderRadius:i,...y})})});var M$="bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11sh fyvr128 fyvr15o fyvr11h0",R$="bnrrebe",N$=Ft({defaultClassName:"bnrreb5 fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"bnrreb6",sm:"bnrreb7",md:"bnrreb8",lg:"bnrreb9"},borderRadius:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]});const O$=E.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:i,src:s,symbol:o,size:a="md",...l}=t;return Q.jsx(ue,{className:an(r,N$({borderRadius:e,size:a})),style:i,flexShrink:"0",...l,children:s?Q.jsx(FC,{className:R$,disableAnimation:n,src:s}):Q.jsx(Ut,{className:M$,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})}),[Bh,SJ]=Dr("Tooltip",[ec]);ec();const D$="TooltipProvider";Bh(D$);const yA="Tooltip";Bh(yA);const B$="TooltipPortal";Bh(B$,{forceMount:void 0});Bh(yA,{isInside:!1});var pA,Bw=ho;pA=Bw.createRoot,Bw.hydrateRoot;var Om={exports:{}};const L$={},$$=Object.freeze(Object.defineProperty({__proto__:null,default:L$},Symbol.toStringTag,{value:"Module"})),F$=TS($$);Om.exports;(function(t){(function(e,r){function n(L,v){if(!L)throw new Error(v||"Assertion failed")}function i(L,v){L.super_=v;var C=function(){};C.prototype=v.prototype,L.prototype=new C,L.prototype.constructor=L}function s(L,v,C){if(s.isBN(L))return L;this.negative=0,this.words=null,this.length=0,this.red=null,L!==null&&((v==="le"||v==="be")&&(C=v,v=10),this._init(L||0,v||10,C||"be"))}typeof e=="object"?e.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=F$.Buffer}catch{}s.isBN=function(v){return v instanceof s?!0:v!==null&&typeof v=="object"&&v.constructor.wordSize===s.wordSize&&Array.isArray(v.words)},s.max=function(v,C){return v.cmp(C)>0?v:C},s.min=function(v,C){return v.cmp(C)<0?v:C},s.prototype._init=function(v,C,P){if(typeof v=="number")return this._initNumber(v,C,P);if(typeof v=="object")return this._initArray(v,C,P);C==="hex"&&(C=16),n(C===(C|0)&&C>=2&&C<=36),v=v.toString().replace(/\s+/g,"");var N=0;v[0]==="-"&&(N++,this.negative=1),N=0;N-=3)_=v[N]|v[N-1]<<8|v[N-2]<<16,this.words[b]|=_<>>26-M&67108863,M+=24,M>=26&&(M-=26,b++);else if(P==="le")for(N=0,b=0;N>>26-M&67108863,M+=24,M>=26&&(M-=26,b++);return this._strip()};function a(L,v){var C=L.charCodeAt(v);if(C>=48&&C<=57)return C-48;if(C>=65&&C<=70)return C-55;if(C>=97&&C<=102)return C-87;n(!1,"Invalid character in "+L)}function l(L,v,C){var P=a(L,C);return C-1>=v&&(P|=a(L,C-1)<<4),P}s.prototype._parseHex=function(v,C,P){this.length=Math.ceil((v.length-C)/6),this.words=new Array(this.length);for(var N=0;N=C;N-=2)M=l(v,C,N)<=18?(b-=18,_+=1,this.words[_]|=M>>>26):b+=8;else{var g=v.length-C;for(N=g%2===0?C+1:C;N=18?(b-=18,_+=1,this.words[_]|=M>>>26):b+=8}this._strip()};function c(L,v,C,P){for(var N=0,b=0,_=Math.min(L.length,C),M=v;M<_;M++){var g=L.charCodeAt(M)-48;N*=P,g>=49?b=g-49+10:g>=17?b=g-17+10:b=g,n(g>=0&&b1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch{s.prototype.inspect=u}else s.prototype.inspect=u;function u(){return(this.red?""}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],y=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],m=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(v,C){v=v||10,C=C|0||1;var P;if(v===16||v==="hex"){P="";for(var N=0,b=0,_=0;_>>24-N&16777215,N+=2,N>=26&&(N-=26,_--),b!==0||_!==this.length-1?P=h[6-g.length]+g+P:P=g+P}for(b!==0&&(P=b.toString(16)+P);P.length%C!==0;)P="0"+P;return this.negative!==0&&(P="-"+P),P}if(v===(v|0)&&v>=2&&v<=36){var d=y[v],T=m[v];P="";var D=this.clone();for(D.negative=0;!D.isZero();){var x=D.modrn(T).toString(v);D=D.idivn(T),D.isZero()?P=x+P:P=h[d-x.length]+x+P}for(this.isZero()&&(P="0"+P);P.length%C!==0;)P="0"+P;return this.negative!==0&&(P="-"+P),P}n(!1,"Base should be between 2 and 36")},s.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},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(v,C){return this.toArrayLike(o,v,C)}),s.prototype.toArray=function(v,C){return this.toArrayLike(Array,v,C)};var p=function(v,C){return v.allocUnsafe?v.allocUnsafe(C):new v(C)};s.prototype.toArrayLike=function(v,C,P){this._strip();var N=this.byteLength(),b=P||Math.max(1,N);n(N<=b,"byte array longer than desired length"),n(b>0,"Requested array length <= 0");var _=p(v,b),M=C==="le"?"LE":"BE";return this["_toArrayLike"+M](_,N),_},s.prototype._toArrayLikeLE=function(v,C){for(var P=0,N=0,b=0,_=0;b>8&255),P>16&255),_===6?(P>24&255),N=0,_=0):(N=M>>>24,_+=2)}if(P=0&&(v[P--]=M>>8&255),P>=0&&(v[P--]=M>>16&255),_===6?(P>=0&&(v[P--]=M>>24&255),N=0,_=0):(N=M>>>24,_+=2)}if(P>=0)for(v[P--]=N;P>=0;)v[P--]=0},Math.clz32?s.prototype._countBits=function(v){return 32-Math.clz32(v)}:s.prototype._countBits=function(v){var C=v,P=0;return C>=4096&&(P+=13,C>>>=13),C>=64&&(P+=7,C>>>=7),C>=8&&(P+=4,C>>>=4),C>=2&&(P+=2,C>>>=2),P+C},s.prototype._zeroBits=function(v){if(v===0)return 26;var C=v,P=0;return C&8191||(P+=13,C>>>=13),C&127||(P+=7,C>>>=7),C&15||(P+=4,C>>>=4),C&3||(P+=2,C>>>=2),C&1||P++,P},s.prototype.bitLength=function(){var v=this.words[this.length-1],C=this._countBits(v);return(this.length-1)*26+C};function S(L){for(var v=new Array(L.bitLength()),C=0;C>>N&1}return v}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var v=0,C=0;Cv.length?this.clone().ior(v):v.clone().ior(this)},s.prototype.uor=function(v){return this.length>v.length?this.clone().iuor(v):v.clone().iuor(this)},s.prototype.iuand=function(v){var C;this.length>v.length?C=v:C=this;for(var P=0;Pv.length?this.clone().iand(v):v.clone().iand(this)},s.prototype.uand=function(v){return this.length>v.length?this.clone().iuand(v):v.clone().iuand(this)},s.prototype.iuxor=function(v){var C,P;this.length>v.length?(C=this,P=v):(C=v,P=this);for(var N=0;Nv.length?this.clone().ixor(v):v.clone().ixor(this)},s.prototype.uxor=function(v){return this.length>v.length?this.clone().iuxor(v):v.clone().iuxor(this)},s.prototype.inotn=function(v){n(typeof v=="number"&&v>=0);var C=Math.ceil(v/26)|0,P=v%26;this._expand(C),P>0&&C--;for(var N=0;N0&&(this.words[N]=~this.words[N]&67108863>>26-P),this._strip()},s.prototype.notn=function(v){return this.clone().inotn(v)},s.prototype.setn=function(v,C){n(typeof v=="number"&&v>=0);var P=v/26|0,N=v%26;return this._expand(P+1),C?this.words[P]=this.words[P]|1<v.length?(P=this,N=v):(P=v,N=this);for(var b=0,_=0;_>>26;for(;b!==0&&_>>26;if(this.length=P.length,b!==0)this.words[this.length]=b,this.length++;else if(P!==this)for(;_v.length?this.clone().iadd(v):v.clone().iadd(this)},s.prototype.isub=function(v){if(v.negative!==0){v.negative=0;var C=this.iadd(v);return v.negative=1,C._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(v),this.negative=1,this._normSign();var P=this.cmp(v);if(P===0)return this.negative=0,this.length=1,this.words[0]=0,this;var N,b;P>0?(N=this,b=v):(N=v,b=this);for(var _=0,M=0;M>26,this.words[M]=C&67108863;for(;_!==0&&M>26,this.words[M]=C&67108863;if(_===0&&M>>26,D=g&67108863,x=Math.min(d,v.length-1),B=Math.max(0,d-L.length+1);B<=x;B++){var $=d-B|0;N=L.words[$]|0,b=v.words[B]|0,_=N*b+D,T+=_/67108864|0,D=_&67108863}C.words[d]=D|0,g=T|0}return g!==0?C.words[d]=g|0:C.length--,C._strip()}var A=function(v,C,P){var N=v.words,b=C.words,_=P.words,M=0,g,d,T,D=N[0]|0,x=D&8191,B=D>>>13,$=N[1]|0,O=$&8191,U=$>>>13,W=N[2]|0,H=W&8191,G=W>>>13,oe=N[3]|0,re=oe&8191,fe=oe>>>13,Tt=N[4]|0,Me=Tt&8191,Ee=Tt>>>13,Pt=N[5]|0,He=Pt&8191,Be=Pt>>>13,mo=N[6]|0,Je=mo&8191,Qe=mo>>>13,xo=N[7]|0,Ye=xo&8191,Xe=xo>>>13,bo=N[8]|0,Ze=bo&8191,et=bo>>>13,wo=N[9]|0,tt=wo&8191,rt=wo>>>13,Co=b[0]|0,nt=Co&8191,it=Co>>>13,Ao=b[1]|0,st=Ao&8191,ot=Ao>>>13,Eo=b[2]|0,at=Eo&8191,lt=Eo>>>13,So=b[3]|0,ct=So&8191,ft=So>>>13,ko=b[4]|0,ut=ko&8191,dt=ko>>>13,_o=b[5]|0,ht=_o&8191,vt=_o>>>13,To=b[6]|0,yt=To&8191,pt=To>>>13,Po=b[7]|0,gt=Po&8191,mt=Po>>>13,Io=b[8]|0,xt=Io&8191,bt=Io>>>13,Mo=b[9]|0,wt=Mo&8191,Ct=Mo>>>13;P.negative=v.negative^C.negative,P.length=19,g=Math.imul(x,nt),d=Math.imul(x,it),d=d+Math.imul(B,nt)|0,T=Math.imul(B,it);var vs=(M+g|0)+((d&8191)<<13)|0;M=(T+(d>>>13)|0)+(vs>>>26)|0,vs&=67108863,g=Math.imul(O,nt),d=Math.imul(O,it),d=d+Math.imul(U,nt)|0,T=Math.imul(U,it),g=g+Math.imul(x,st)|0,d=d+Math.imul(x,ot)|0,d=d+Math.imul(B,st)|0,T=T+Math.imul(B,ot)|0;var ys=(M+g|0)+((d&8191)<<13)|0;M=(T+(d>>>13)|0)+(ys>>>26)|0,ys&=67108863,g=Math.imul(H,nt),d=Math.imul(H,it),d=d+Math.imul(G,nt)|0,T=Math.imul(G,it),g=g+Math.imul(O,st)|0,d=d+Math.imul(O,ot)|0,d=d+Math.imul(U,st)|0,T=T+Math.imul(U,ot)|0,g=g+Math.imul(x,at)|0,d=d+Math.imul(x,lt)|0,d=d+Math.imul(B,at)|0,T=T+Math.imul(B,lt)|0;var ps=(M+g|0)+((d&8191)<<13)|0;M=(T+(d>>>13)|0)+(ps>>>26)|0,ps&=67108863,g=Math.imul(re,nt),d=Math.imul(re,it),d=d+Math.imul(fe,nt)|0,T=Math.imul(fe,it),g=g+Math.imul(H,st)|0,d=d+Math.imul(H,ot)|0,d=d+Math.imul(G,st)|0,T=T+Math.imul(G,ot)|0,g=g+Math.imul(O,at)|0,d=d+Math.imul(O,lt)|0,d=d+Math.imul(U,at)|0,T=T+Math.imul(U,lt)|0,g=g+Math.imul(x,ct)|0,d=d+Math.imul(x,ft)|0,d=d+Math.imul(B,ct)|0,T=T+Math.imul(B,ft)|0;var gs=(M+g|0)+((d&8191)<<13)|0;M=(T+(d>>>13)|0)+(gs>>>26)|0,gs&=67108863,g=Math.imul(Me,nt),d=Math.imul(Me,it),d=d+Math.imul(Ee,nt)|0,T=Math.imul(Ee,it),g=g+Math.imul(re,st)|0,d=d+Math.imul(re,ot)|0,d=d+Math.imul(fe,st)|0,T=T+Math.imul(fe,ot)|0,g=g+Math.imul(H,at)|0,d=d+Math.imul(H,lt)|0,d=d+Math.imul(G,at)|0,T=T+Math.imul(G,lt)|0,g=g+Math.imul(O,ct)|0,d=d+Math.imul(O,ft)|0,d=d+Math.imul(U,ct)|0,T=T+Math.imul(U,ft)|0,g=g+Math.imul(x,ut)|0,d=d+Math.imul(x,dt)|0,d=d+Math.imul(B,ut)|0,T=T+Math.imul(B,dt)|0;var ms=(M+g|0)+((d&8191)<<13)|0;M=(T+(d>>>13)|0)+(ms>>>26)|0,ms&=67108863,g=Math.imul(He,nt),d=Math.imul(He,it),d=d+Math.imul(Be,nt)|0,T=Math.imul(Be,it),g=g+Math.imul(Me,st)|0,d=d+Math.imul(Me,ot)|0,d=d+Math.imul(Ee,st)|0,T=T+Math.imul(Ee,ot)|0,g=g+Math.imul(re,at)|0,d=d+Math.imul(re,lt)|0,d=d+Math.imul(fe,at)|0,T=T+Math.imul(fe,lt)|0,g=g+Math.imul(H,ct)|0,d=d+Math.imul(H,ft)|0,d=d+Math.imul(G,ct)|0,T=T+Math.imul(G,ft)|0,g=g+Math.imul(O,ut)|0,d=d+Math.imul(O,dt)|0,d=d+Math.imul(U,ut)|0,T=T+Math.imul(U,dt)|0,g=g+Math.imul(x,ht)|0,d=d+Math.imul(x,vt)|0,d=d+Math.imul(B,ht)|0,T=T+Math.imul(B,vt)|0;var i1=(M+g|0)+((d&8191)<<13)|0;M=(T+(d>>>13)|0)+(i1>>>26)|0,i1&=67108863,g=Math.imul(Je,nt),d=Math.imul(Je,it),d=d+Math.imul(Qe,nt)|0,T=Math.imul(Qe,it),g=g+Math.imul(He,st)|0,d=d+Math.imul(He,ot)|0,d=d+Math.imul(Be,st)|0,T=T+Math.imul(Be,ot)|0,g=g+Math.imul(Me,at)|0,d=d+Math.imul(Me,lt)|0,d=d+Math.imul(Ee,at)|0,T=T+Math.imul(Ee,lt)|0,g=g+Math.imul(re,ct)|0,d=d+Math.imul(re,ft)|0,d=d+Math.imul(fe,ct)|0,T=T+Math.imul(fe,ft)|0,g=g+Math.imul(H,ut)|0,d=d+Math.imul(H,dt)|0,d=d+Math.imul(G,ut)|0,T=T+Math.imul(G,dt)|0,g=g+Math.imul(O,ht)|0,d=d+Math.imul(O,vt)|0,d=d+Math.imul(U,ht)|0,T=T+Math.imul(U,vt)|0,g=g+Math.imul(x,yt)|0,d=d+Math.imul(x,pt)|0,d=d+Math.imul(B,yt)|0,T=T+Math.imul(B,pt)|0;var s1=(M+g|0)+((d&8191)<<13)|0;M=(T+(d>>>13)|0)+(s1>>>26)|0,s1&=67108863,g=Math.imul(Ye,nt),d=Math.imul(Ye,it),d=d+Math.imul(Xe,nt)|0,T=Math.imul(Xe,it),g=g+Math.imul(Je,st)|0,d=d+Math.imul(Je,ot)|0,d=d+Math.imul(Qe,st)|0,T=T+Math.imul(Qe,ot)|0,g=g+Math.imul(He,at)|0,d=d+Math.imul(He,lt)|0,d=d+Math.imul(Be,at)|0,T=T+Math.imul(Be,lt)|0,g=g+Math.imul(Me,ct)|0,d=d+Math.imul(Me,ft)|0,d=d+Math.imul(Ee,ct)|0,T=T+Math.imul(Ee,ft)|0,g=g+Math.imul(re,ut)|0,d=d+Math.imul(re,dt)|0,d=d+Math.imul(fe,ut)|0,T=T+Math.imul(fe,dt)|0,g=g+Math.imul(H,ht)|0,d=d+Math.imul(H,vt)|0,d=d+Math.imul(G,ht)|0,T=T+Math.imul(G,vt)|0,g=g+Math.imul(O,yt)|0,d=d+Math.imul(O,pt)|0,d=d+Math.imul(U,yt)|0,T=T+Math.imul(U,pt)|0,g=g+Math.imul(x,gt)|0,d=d+Math.imul(x,mt)|0,d=d+Math.imul(B,gt)|0,T=T+Math.imul(B,mt)|0;var o1=(M+g|0)+((d&8191)<<13)|0;M=(T+(d>>>13)|0)+(o1>>>26)|0,o1&=67108863,g=Math.imul(Ze,nt),d=Math.imul(Ze,it),d=d+Math.imul(et,nt)|0,T=Math.imul(et,it),g=g+Math.imul(Ye,st)|0,d=d+Math.imul(Ye,ot)|0,d=d+Math.imul(Xe,st)|0,T=T+Math.imul(Xe,ot)|0,g=g+Math.imul(Je,at)|0,d=d+Math.imul(Je,lt)|0,d=d+Math.imul(Qe,at)|0,T=T+Math.imul(Qe,lt)|0,g=g+Math.imul(He,ct)|0,d=d+Math.imul(He,ft)|0,d=d+Math.imul(Be,ct)|0,T=T+Math.imul(Be,ft)|0,g=g+Math.imul(Me,ut)|0,d=d+Math.imul(Me,dt)|0,d=d+Math.imul(Ee,ut)|0,T=T+Math.imul(Ee,dt)|0,g=g+Math.imul(re,ht)|0,d=d+Math.imul(re,vt)|0,d=d+Math.imul(fe,ht)|0,T=T+Math.imul(fe,vt)|0,g=g+Math.imul(H,yt)|0,d=d+Math.imul(H,pt)|0,d=d+Math.imul(G,yt)|0,T=T+Math.imul(G,pt)|0,g=g+Math.imul(O,gt)|0,d=d+Math.imul(O,mt)|0,d=d+Math.imul(U,gt)|0,T=T+Math.imul(U,mt)|0,g=g+Math.imul(x,xt)|0,d=d+Math.imul(x,bt)|0,d=d+Math.imul(B,xt)|0,T=T+Math.imul(B,bt)|0;var a1=(M+g|0)+((d&8191)<<13)|0;M=(T+(d>>>13)|0)+(a1>>>26)|0,a1&=67108863,g=Math.imul(tt,nt),d=Math.imul(tt,it),d=d+Math.imul(rt,nt)|0,T=Math.imul(rt,it),g=g+Math.imul(Ze,st)|0,d=d+Math.imul(Ze,ot)|0,d=d+Math.imul(et,st)|0,T=T+Math.imul(et,ot)|0,g=g+Math.imul(Ye,at)|0,d=d+Math.imul(Ye,lt)|0,d=d+Math.imul(Xe,at)|0,T=T+Math.imul(Xe,lt)|0,g=g+Math.imul(Je,ct)|0,d=d+Math.imul(Je,ft)|0,d=d+Math.imul(Qe,ct)|0,T=T+Math.imul(Qe,ft)|0,g=g+Math.imul(He,ut)|0,d=d+Math.imul(He,dt)|0,d=d+Math.imul(Be,ut)|0,T=T+Math.imul(Be,dt)|0,g=g+Math.imul(Me,ht)|0,d=d+Math.imul(Me,vt)|0,d=d+Math.imul(Ee,ht)|0,T=T+Math.imul(Ee,vt)|0,g=g+Math.imul(re,yt)|0,d=d+Math.imul(re,pt)|0,d=d+Math.imul(fe,yt)|0,T=T+Math.imul(fe,pt)|0,g=g+Math.imul(H,gt)|0,d=d+Math.imul(H,mt)|0,d=d+Math.imul(G,gt)|0,T=T+Math.imul(G,mt)|0,g=g+Math.imul(O,xt)|0,d=d+Math.imul(O,bt)|0,d=d+Math.imul(U,xt)|0,T=T+Math.imul(U,bt)|0,g=g+Math.imul(x,wt)|0,d=d+Math.imul(x,Ct)|0,d=d+Math.imul(B,wt)|0,T=T+Math.imul(B,Ct)|0;var l1=(M+g|0)+((d&8191)<<13)|0;M=(T+(d>>>13)|0)+(l1>>>26)|0,l1&=67108863,g=Math.imul(tt,st),d=Math.imul(tt,ot),d=d+Math.imul(rt,st)|0,T=Math.imul(rt,ot),g=g+Math.imul(Ze,at)|0,d=d+Math.imul(Ze,lt)|0,d=d+Math.imul(et,at)|0,T=T+Math.imul(et,lt)|0,g=g+Math.imul(Ye,ct)|0,d=d+Math.imul(Ye,ft)|0,d=d+Math.imul(Xe,ct)|0,T=T+Math.imul(Xe,ft)|0,g=g+Math.imul(Je,ut)|0,d=d+Math.imul(Je,dt)|0,d=d+Math.imul(Qe,ut)|0,T=T+Math.imul(Qe,dt)|0,g=g+Math.imul(He,ht)|0,d=d+Math.imul(He,vt)|0,d=d+Math.imul(Be,ht)|0,T=T+Math.imul(Be,vt)|0,g=g+Math.imul(Me,yt)|0,d=d+Math.imul(Me,pt)|0,d=d+Math.imul(Ee,yt)|0,T=T+Math.imul(Ee,pt)|0,g=g+Math.imul(re,gt)|0,d=d+Math.imul(re,mt)|0,d=d+Math.imul(fe,gt)|0,T=T+Math.imul(fe,mt)|0,g=g+Math.imul(H,xt)|0,d=d+Math.imul(H,bt)|0,d=d+Math.imul(G,xt)|0,T=T+Math.imul(G,bt)|0,g=g+Math.imul(O,wt)|0,d=d+Math.imul(O,Ct)|0,d=d+Math.imul(U,wt)|0,T=T+Math.imul(U,Ct)|0;var c1=(M+g|0)+((d&8191)<<13)|0;M=(T+(d>>>13)|0)+(c1>>>26)|0,c1&=67108863,g=Math.imul(tt,at),d=Math.imul(tt,lt),d=d+Math.imul(rt,at)|0,T=Math.imul(rt,lt),g=g+Math.imul(Ze,ct)|0,d=d+Math.imul(Ze,ft)|0,d=d+Math.imul(et,ct)|0,T=T+Math.imul(et,ft)|0,g=g+Math.imul(Ye,ut)|0,d=d+Math.imul(Ye,dt)|0,d=d+Math.imul(Xe,ut)|0,T=T+Math.imul(Xe,dt)|0,g=g+Math.imul(Je,ht)|0,d=d+Math.imul(Je,vt)|0,d=d+Math.imul(Qe,ht)|0,T=T+Math.imul(Qe,vt)|0,g=g+Math.imul(He,yt)|0,d=d+Math.imul(He,pt)|0,d=d+Math.imul(Be,yt)|0,T=T+Math.imul(Be,pt)|0,g=g+Math.imul(Me,gt)|0,d=d+Math.imul(Me,mt)|0,d=d+Math.imul(Ee,gt)|0,T=T+Math.imul(Ee,mt)|0,g=g+Math.imul(re,xt)|0,d=d+Math.imul(re,bt)|0,d=d+Math.imul(fe,xt)|0,T=T+Math.imul(fe,bt)|0,g=g+Math.imul(H,wt)|0,d=d+Math.imul(H,Ct)|0,d=d+Math.imul(G,wt)|0,T=T+Math.imul(G,Ct)|0;var f1=(M+g|0)+((d&8191)<<13)|0;M=(T+(d>>>13)|0)+(f1>>>26)|0,f1&=67108863,g=Math.imul(tt,ct),d=Math.imul(tt,ft),d=d+Math.imul(rt,ct)|0,T=Math.imul(rt,ft),g=g+Math.imul(Ze,ut)|0,d=d+Math.imul(Ze,dt)|0,d=d+Math.imul(et,ut)|0,T=T+Math.imul(et,dt)|0,g=g+Math.imul(Ye,ht)|0,d=d+Math.imul(Ye,vt)|0,d=d+Math.imul(Xe,ht)|0,T=T+Math.imul(Xe,vt)|0,g=g+Math.imul(Je,yt)|0,d=d+Math.imul(Je,pt)|0,d=d+Math.imul(Qe,yt)|0,T=T+Math.imul(Qe,pt)|0,g=g+Math.imul(He,gt)|0,d=d+Math.imul(He,mt)|0,d=d+Math.imul(Be,gt)|0,T=T+Math.imul(Be,mt)|0,g=g+Math.imul(Me,xt)|0,d=d+Math.imul(Me,bt)|0,d=d+Math.imul(Ee,xt)|0,T=T+Math.imul(Ee,bt)|0,g=g+Math.imul(re,wt)|0,d=d+Math.imul(re,Ct)|0,d=d+Math.imul(fe,wt)|0,T=T+Math.imul(fe,Ct)|0;var u1=(M+g|0)+((d&8191)<<13)|0;M=(T+(d>>>13)|0)+(u1>>>26)|0,u1&=67108863,g=Math.imul(tt,ut),d=Math.imul(tt,dt),d=d+Math.imul(rt,ut)|0,T=Math.imul(rt,dt),g=g+Math.imul(Ze,ht)|0,d=d+Math.imul(Ze,vt)|0,d=d+Math.imul(et,ht)|0,T=T+Math.imul(et,vt)|0,g=g+Math.imul(Ye,yt)|0,d=d+Math.imul(Ye,pt)|0,d=d+Math.imul(Xe,yt)|0,T=T+Math.imul(Xe,pt)|0,g=g+Math.imul(Je,gt)|0,d=d+Math.imul(Je,mt)|0,d=d+Math.imul(Qe,gt)|0,T=T+Math.imul(Qe,mt)|0,g=g+Math.imul(He,xt)|0,d=d+Math.imul(He,bt)|0,d=d+Math.imul(Be,xt)|0,T=T+Math.imul(Be,bt)|0,g=g+Math.imul(Me,wt)|0,d=d+Math.imul(Me,Ct)|0,d=d+Math.imul(Ee,wt)|0,T=T+Math.imul(Ee,Ct)|0;var d1=(M+g|0)+((d&8191)<<13)|0;M=(T+(d>>>13)|0)+(d1>>>26)|0,d1&=67108863,g=Math.imul(tt,ht),d=Math.imul(tt,vt),d=d+Math.imul(rt,ht)|0,T=Math.imul(rt,vt),g=g+Math.imul(Ze,yt)|0,d=d+Math.imul(Ze,pt)|0,d=d+Math.imul(et,yt)|0,T=T+Math.imul(et,pt)|0,g=g+Math.imul(Ye,gt)|0,d=d+Math.imul(Ye,mt)|0,d=d+Math.imul(Xe,gt)|0,T=T+Math.imul(Xe,mt)|0,g=g+Math.imul(Je,xt)|0,d=d+Math.imul(Je,bt)|0,d=d+Math.imul(Qe,xt)|0,T=T+Math.imul(Qe,bt)|0,g=g+Math.imul(He,wt)|0,d=d+Math.imul(He,Ct)|0,d=d+Math.imul(Be,wt)|0,T=T+Math.imul(Be,Ct)|0;var h1=(M+g|0)+((d&8191)<<13)|0;M=(T+(d>>>13)|0)+(h1>>>26)|0,h1&=67108863,g=Math.imul(tt,yt),d=Math.imul(tt,pt),d=d+Math.imul(rt,yt)|0,T=Math.imul(rt,pt),g=g+Math.imul(Ze,gt)|0,d=d+Math.imul(Ze,mt)|0,d=d+Math.imul(et,gt)|0,T=T+Math.imul(et,mt)|0,g=g+Math.imul(Ye,xt)|0,d=d+Math.imul(Ye,bt)|0,d=d+Math.imul(Xe,xt)|0,T=T+Math.imul(Xe,bt)|0,g=g+Math.imul(Je,wt)|0,d=d+Math.imul(Je,Ct)|0,d=d+Math.imul(Qe,wt)|0,T=T+Math.imul(Qe,Ct)|0;var v1=(M+g|0)+((d&8191)<<13)|0;M=(T+(d>>>13)|0)+(v1>>>26)|0,v1&=67108863,g=Math.imul(tt,gt),d=Math.imul(tt,mt),d=d+Math.imul(rt,gt)|0,T=Math.imul(rt,mt),g=g+Math.imul(Ze,xt)|0,d=d+Math.imul(Ze,bt)|0,d=d+Math.imul(et,xt)|0,T=T+Math.imul(et,bt)|0,g=g+Math.imul(Ye,wt)|0,d=d+Math.imul(Ye,Ct)|0,d=d+Math.imul(Xe,wt)|0,T=T+Math.imul(Xe,Ct)|0;var y1=(M+g|0)+((d&8191)<<13)|0;M=(T+(d>>>13)|0)+(y1>>>26)|0,y1&=67108863,g=Math.imul(tt,xt),d=Math.imul(tt,bt),d=d+Math.imul(rt,xt)|0,T=Math.imul(rt,bt),g=g+Math.imul(Ze,wt)|0,d=d+Math.imul(Ze,Ct)|0,d=d+Math.imul(et,wt)|0,T=T+Math.imul(et,Ct)|0;var p1=(M+g|0)+((d&8191)<<13)|0;M=(T+(d>>>13)|0)+(p1>>>26)|0,p1&=67108863,g=Math.imul(tt,wt),d=Math.imul(tt,Ct),d=d+Math.imul(rt,wt)|0,T=Math.imul(rt,Ct);var g1=(M+g|0)+((d&8191)<<13)|0;return M=(T+(d>>>13)|0)+(g1>>>26)|0,g1&=67108863,_[0]=vs,_[1]=ys,_[2]=ps,_[3]=gs,_[4]=ms,_[5]=i1,_[6]=s1,_[7]=o1,_[8]=a1,_[9]=l1,_[10]=c1,_[11]=f1,_[12]=u1,_[13]=d1,_[14]=h1,_[15]=v1,_[16]=y1,_[17]=p1,_[18]=g1,M!==0&&(_[19]=M,P.length++),P};Math.imul||(A=w);function k(L,v,C){C.negative=v.negative^L.negative,C.length=L.length+v.length;for(var P=0,N=0,b=0;b>>26)|0,N+=_>>>26,_&=67108863}C.words[b]=M,P=_,_=N}return P!==0?C.words[b]=P:C.length--,C._strip()}function I(L,v,C){return k(L,v,C)}s.prototype.mulTo=function(v,C){var P,N=this.length+v.length;return this.length===10&&v.length===10?P=A(this,v,C):N<63?P=w(this,v,C):N<1024?P=k(this,v,C):P=I(this,v,C),P},s.prototype.mul=function(v){var C=new s(null);return C.words=new Array(this.length+v.length),this.mulTo(v,C)},s.prototype.mulf=function(v){var C=new s(null);return C.words=new Array(this.length+v.length),I(this,v,C)},s.prototype.imul=function(v){return this.clone().mulTo(v,this)},s.prototype.imuln=function(v){var C=v<0;C&&(v=-v),n(typeof v=="number"),n(v<67108864);for(var P=0,N=0;N>=26,P+=b/67108864|0,P+=_>>>26,this.words[N]=_&67108863}return P!==0&&(this.words[N]=P,this.length++),C?this.ineg():this},s.prototype.muln=function(v){return this.clone().imuln(v)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(v){var C=S(v);if(C.length===0)return new s(1);for(var P=this,N=0;N=0);var C=v%26,P=(v-C)/26,N=67108863>>>26-C<<26-C,b;if(C!==0){var _=0;for(b=0;b>>26-C}_&&(this.words[b]=_,this.length++)}if(P!==0){for(b=this.length-1;b>=0;b--)this.words[b+P]=this.words[b];for(b=0;b=0);var N;C?N=(C-C%26)/26:N=0;var b=v%26,_=Math.min((v-b)/26,this.length),M=67108863^67108863>>>b<_)for(this.length-=_,d=0;d=0&&(T!==0||d>=N);d--){var D=this.words[d]|0;this.words[d]=T<<26-b|D>>>b,T=D&M}return g&&T!==0&&(g.words[g.length++]=T),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(v,C,P){return n(this.negative===0),this.iushrn(v,C,P)},s.prototype.shln=function(v){return this.clone().ishln(v)},s.prototype.ushln=function(v){return this.clone().iushln(v)},s.prototype.shrn=function(v){return this.clone().ishrn(v)},s.prototype.ushrn=function(v){return this.clone().iushrn(v)},s.prototype.testn=function(v){n(typeof v=="number"&&v>=0);var C=v%26,P=(v-C)/26,N=1<=0);var C=v%26,P=(v-C)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=P)return this;if(C!==0&&P++,this.length=Math.min(P,this.length),C!==0){var N=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},s.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 C=0;C>26)-(g/67108864|0),this.words[b+P]=_&67108863}for(;b>26,this.words[b+P]=_&67108863;if(M===0)return this._strip();for(n(M===-1),M=0,b=0;b>26,this.words[b]=_&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(v,C){var P=this.length-v.length,N=this.clone(),b=v,_=b.words[b.length-1]|0,M=this._countBits(_);P=26-M,P!==0&&(b=b.ushln(P),N.iushln(P),_=b.words[b.length-1]|0);var g=N.length-b.length,d;if(C!=="mod"){d=new s(null),d.length=g+1,d.words=new Array(d.length);for(var T=0;T=0;x--){var B=(N.words[b.length+x]|0)*67108864+(N.words[b.length+x-1]|0);for(B=Math.min(B/_|0,67108863),N._ishlnsubmul(b,B,x);N.negative!==0;)B--,N.negative=0,N._ishlnsubmul(b,1,x),N.isZero()||(N.negative^=1);d&&(d.words[x]=B)}return d&&d._strip(),N._strip(),C!=="div"&&P!==0&&N.iushrn(P),{div:d||null,mod:N}},s.prototype.divmod=function(v,C,P){if(n(!v.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var N,b,_;return this.negative!==0&&v.negative===0?(_=this.neg().divmod(v,C),C!=="mod"&&(N=_.div.neg()),C!=="div"&&(b=_.mod.neg(),P&&b.negative!==0&&b.iadd(v)),{div:N,mod:b}):this.negative===0&&v.negative!==0?(_=this.divmod(v.neg(),C),C!=="mod"&&(N=_.div.neg()),{div:N,mod:_.mod}):this.negative&v.negative?(_=this.neg().divmod(v.neg(),C),C!=="div"&&(b=_.mod.neg(),P&&b.negative!==0&&b.isub(v)),{div:_.div,mod:b}):v.length>this.length||this.cmp(v)<0?{div:new s(0),mod:this}:v.length===1?C==="div"?{div:this.divn(v.words[0]),mod:null}:C==="mod"?{div:null,mod:new s(this.modrn(v.words[0]))}:{div:this.divn(v.words[0]),mod:new s(this.modrn(v.words[0]))}:this._wordDiv(v,C)},s.prototype.div=function(v){return this.divmod(v,"div",!1).div},s.prototype.mod=function(v){return this.divmod(v,"mod",!1).mod},s.prototype.umod=function(v){return this.divmod(v,"mod",!0).mod},s.prototype.divRound=function(v){var C=this.divmod(v);if(C.mod.isZero())return C.div;var P=C.div.negative!==0?C.mod.isub(v):C.mod,N=v.ushrn(1),b=v.andln(1),_=P.cmp(N);return _<0||b===1&&_===0?C.div:C.div.negative!==0?C.div.isubn(1):C.div.iaddn(1)},s.prototype.modrn=function(v){var C=v<0;C&&(v=-v),n(v<=67108863);for(var P=(1<<26)%v,N=0,b=this.length-1;b>=0;b--)N=(P*N+(this.words[b]|0))%v;return C?-N:N},s.prototype.modn=function(v){return this.modrn(v)},s.prototype.idivn=function(v){var C=v<0;C&&(v=-v),n(v<=67108863);for(var P=0,N=this.length-1;N>=0;N--){var b=(this.words[N]|0)+P*67108864;this.words[N]=b/v|0,P=b%v}return this._strip(),C?this.ineg():this},s.prototype.divn=function(v){return this.clone().idivn(v)},s.prototype.egcd=function(v){n(v.negative===0),n(!v.isZero());var C=this,P=v.clone();C.negative!==0?C=C.umod(v):C=C.clone();for(var N=new s(1),b=new s(0),_=new s(0),M=new s(1),g=0;C.isEven()&&P.isEven();)C.iushrn(1),P.iushrn(1),++g;for(var d=P.clone(),T=C.clone();!C.isZero();){for(var D=0,x=1;!(C.words[0]&x)&&D<26;++D,x<<=1);if(D>0)for(C.iushrn(D);D-- >0;)(N.isOdd()||b.isOdd())&&(N.iadd(d),b.isub(T)),N.iushrn(1),b.iushrn(1);for(var B=0,$=1;!(P.words[0]&$)&&B<26;++B,$<<=1);if(B>0)for(P.iushrn(B);B-- >0;)(_.isOdd()||M.isOdd())&&(_.iadd(d),M.isub(T)),_.iushrn(1),M.iushrn(1);C.cmp(P)>=0?(C.isub(P),N.isub(_),b.isub(M)):(P.isub(C),_.isub(N),M.isub(b))}return{a:_,b:M,gcd:P.iushln(g)}},s.prototype._invmp=function(v){n(v.negative===0),n(!v.isZero());var C=this,P=v.clone();C.negative!==0?C=C.umod(v):C=C.clone();for(var N=new s(1),b=new s(0),_=P.clone();C.cmpn(1)>0&&P.cmpn(1)>0;){for(var M=0,g=1;!(C.words[0]&g)&&M<26;++M,g<<=1);if(M>0)for(C.iushrn(M);M-- >0;)N.isOdd()&&N.iadd(_),N.iushrn(1);for(var d=0,T=1;!(P.words[0]&T)&&d<26;++d,T<<=1);if(d>0)for(P.iushrn(d);d-- >0;)b.isOdd()&&b.iadd(_),b.iushrn(1);C.cmp(P)>=0?(C.isub(P),N.isub(b)):(P.isub(C),b.isub(N))}var D;return C.cmpn(1)===0?D=N:D=b,D.cmpn(0)<0&&D.iadd(v),D},s.prototype.gcd=function(v){if(this.isZero())return v.abs();if(v.isZero())return this.abs();var C=this.clone(),P=v.clone();C.negative=0,P.negative=0;for(var N=0;C.isEven()&&P.isEven();N++)C.iushrn(1),P.iushrn(1);do{for(;C.isEven();)C.iushrn(1);for(;P.isEven();)P.iushrn(1);var b=C.cmp(P);if(b<0){var _=C;C=P,P=_}else if(b===0||P.cmpn(1)===0)break;C.isub(P)}while(!0);return P.iushln(N)},s.prototype.invm=function(v){return this.egcd(v).a.umod(v)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(v){return this.words[0]&v},s.prototype.bincn=function(v){n(typeof v=="number");var C=v%26,P=(v-C)/26,N=1<>>26,M&=67108863,this.words[_]=M}return b!==0&&(this.words[_]=b,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(v){var C=v<0;if(this.negative!==0&&!C)return-1;if(this.negative===0&&C)return 1;this._strip();var P;if(this.length>1)P=1;else{C&&(v=-v),n(v<=67108863,"Number is too big");var N=this.words[0]|0;P=N===v?0:Nv.length)return 1;if(this.length=0;P--){var N=this.words[P]|0,b=v.words[P]|0;if(N!==b){Nb&&(C=1);break}}return C},s.prototype.gtn=function(v){return this.cmpn(v)===1},s.prototype.gt=function(v){return this.cmp(v)===1},s.prototype.gten=function(v){return this.cmpn(v)>=0},s.prototype.gte=function(v){return this.cmp(v)>=0},s.prototype.ltn=function(v){return this.cmpn(v)===-1},s.prototype.lt=function(v){return this.cmp(v)===-1},s.prototype.lten=function(v){return this.cmpn(v)<=0},s.prototype.lte=function(v){return this.cmp(v)<=0},s.prototype.eqn=function(v){return this.cmpn(v)===0},s.prototype.eq=function(v){return this.cmp(v)===0},s.red=function(v){return new Z(v)},s.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)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(v){return this.red=v,this},s.prototype.forceRed=function(v){return n(!this.red,"Already a number in reduction context"),this._forceRed(v)},s.prototype.redAdd=function(v){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,v)},s.prototype.redIAdd=function(v){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,v)},s.prototype.redSub=function(v){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,v)},s.prototype.redISub=function(v){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,v)},s.prototype.redShl=function(v){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,v)},s.prototype.redMul=function(v){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.mul(this,v)},s.prototype.redIMul=function(v){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.imul(this,v)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(v){return n(this.red&&!v.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,v)};var R={k256:null,p224:null,p192:null,p25519:null};function F(L,v){this.name=L,this.p=new s(v,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}F.prototype._tmp=function(){var v=new s(null);return v.words=new Array(Math.ceil(this.n/13)),v},F.prototype.ireduce=function(v){var C=v,P;do this.split(C,this.tmp),C=this.imulK(C),C=C.iadd(this.tmp),P=C.bitLength();while(P>this.n);var N=P0?C.isub(this.p):C.strip!==void 0?C.strip():C._strip(),C},F.prototype.split=function(v,C){v.iushrn(this.n,0,C)},F.prototype.imulK=function(v){return v.imul(this.k)};function z(){F.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(z,F),z.prototype.split=function(v,C){for(var P=4194303,N=Math.min(v.length,9),b=0;b>>22,_=M}_>>>=22,v.words[b-10]=_,_===0&&v.length>10?v.length-=10:v.length-=9},z.prototype.imulK=function(v){v.words[v.length]=0,v.words[v.length+1]=0,v.length+=2;for(var C=0,P=0;P>>=26,v.words[P]=b,C=N}return C!==0&&(v.words[v.length++]=C),v},s._prime=function(v){if(R[v])return R[v];var C;if(v==="k256")C=new z;else if(v==="p224")C=new j;else if(v==="p192")C=new K;else if(v==="p25519")C=new J;else throw new Error("Unknown prime "+v);return R[v]=C,C};function Z(L){if(typeof L=="string"){var v=s._prime(L);this.m=v.p,this.prime=v}else n(L.gtn(1),"modulus must be greater than 1"),this.m=L,this.prime=null}Z.prototype._verify1=function(v){n(v.negative===0,"red works only with positives"),n(v.red,"red works only with red numbers")},Z.prototype._verify2=function(v,C){n((v.negative|C.negative)===0,"red works only with positives"),n(v.red&&v.red===C.red,"red works only with red numbers")},Z.prototype.imod=function(v){return this.prime?this.prime.ireduce(v)._forceRed(this):(f(v,v.umod(this.m)._forceRed(this)),v)},Z.prototype.neg=function(v){return v.isZero()?v.clone():this.m.sub(v)._forceRed(this)},Z.prototype.add=function(v,C){this._verify2(v,C);var P=v.add(C);return P.cmp(this.m)>=0&&P.isub(this.m),P._forceRed(this)},Z.prototype.iadd=function(v,C){this._verify2(v,C);var P=v.iadd(C);return P.cmp(this.m)>=0&&P.isub(this.m),P},Z.prototype.sub=function(v,C){this._verify2(v,C);var P=v.sub(C);return P.cmpn(0)<0&&P.iadd(this.m),P._forceRed(this)},Z.prototype.isub=function(v,C){this._verify2(v,C);var P=v.isub(C);return P.cmpn(0)<0&&P.iadd(this.m),P},Z.prototype.shl=function(v,C){return this._verify1(v),this.imod(v.ushln(C))},Z.prototype.imul=function(v,C){return this._verify2(v,C),this.imod(v.imul(C))},Z.prototype.mul=function(v,C){return this._verify2(v,C),this.imod(v.mul(C))},Z.prototype.isqr=function(v){return this.imul(v,v.clone())},Z.prototype.sqr=function(v){return this.mul(v,v)},Z.prototype.sqrt=function(v){if(v.isZero())return v.clone();var C=this.m.andln(3);if(n(C%2===1),C===3){var P=this.m.add(new s(1)).iushrn(2);return this.pow(v,P)}for(var N=this.m.subn(1),b=0;!N.isZero()&&N.andln(1)===0;)b++,N.iushrn(1);n(!N.isZero());var _=new s(1).toRed(this),M=_.redNeg(),g=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new s(2*d*d).toRed(this);this.pow(d,g).cmp(M)!==0;)d.redIAdd(M);for(var T=this.pow(d,N),D=this.pow(v,N.addn(1).iushrn(1)),x=this.pow(v,N),B=b;x.cmp(_)!==0;){for(var $=x,O=0;$.cmp(_)!==0;O++)$=$.redSqr();n(O=0;b--){for(var T=C.words[b],D=d-1;D>=0;D--){var x=T>>D&1;if(_!==N[0]&&(_=this.sqr(_)),x===0&&M===0){g=0;continue}M<<=1,M|=x,g++,!(g!==P&&(b!==0||D!==0))&&(_=this.mul(_,N[M]),g=0,M=0)}d=26}return _},Z.prototype.convertTo=function(v){var C=v.umod(this.m);return C===v?C.clone():C},Z.prototype.convertFrom=function(v){var C=v.clone();return C.red=null,C},s.mont=function(v){return new ie(v)};function ie(L){Z.call(this,L),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(ie,Z),ie.prototype.convertTo=function(v){return this.imod(v.ushln(this.shift))},ie.prototype.convertFrom=function(v){var C=this.imod(v.mul(this.rinv));return C.red=null,C},ie.prototype.imul=function(v,C){if(v.isZero()||C.isZero())return v.words[0]=0,v.length=1,v;var P=v.imul(C),N=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=P.isub(N).iushrn(this.shift),_=b;return b.cmp(this.m)>=0?_=b.isub(this.m):b.cmpn(0)<0&&(_=b.iadd(this.m)),_._forceRed(this)},ie.prototype.mul=function(v,C){if(v.isZero()||C.isZero())return new s(0)._forceRed(this);var P=v.mul(C),N=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=P.isub(N).iushrn(this.shift),_=b;return b.cmp(this.m)>=0?_=b.isub(this.m):b.cmpn(0)<0&&(_=b.iadd(this.m)),_._forceRed(this)},ie.prototype.invm=function(v){var C=this.imod(v._invmp(this.m).mul(this.r2));return C._forceRed(this)}})(t,d5)})(Om);var j$=Om.exports;const be=lo(j$),z$="logger/5.7.0";let Lw=!1,$w=!1;const wd={debug:1,default:2,info:2,warning:3,error:4,off:5};let Fw=wd.default,vv=null;function U$(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(t){return t.message}return null}const jw=U$();var ip;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(ip||(ip={}));var qn;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(qn||(qn={}));const zw="0123456789abcdef";let q=class rr{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();wd[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Fw>wd[n])&&console.log.apply(console,r)}debug(...e){this._log(rr.levels.DEBUG,e)}info(...e){this._log(rr.levels.INFO,e)}warn(...e){this._log(rr.levels.WARNING,e)}makeError(e,r,n){if($w)return this.makeError("censored error",r,{});r||(r=rr.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(l=>{const c=n[l];try{if(c instanceof Uint8Array){let f="";for(let u=0;u>4],f+=zw[c[u]&15];i.push(l+"=Uint8Array(0x"+f+")")}else i.push(l+"="+JSON.stringify(c))}catch{i.push(l+"="+JSON.stringify(n[l].toString()))}}),i.push(`code=${r}`),i.push(`version=${this.version}`);const s=e;let o="";switch(r){case qn.NUMERIC_FAULT:{o="NUMERIC_FAULT";const l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":o+="-"+l;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case qn.CALL_EXCEPTION:case qn.INSUFFICIENT_FUNDS:case qn.MISSING_NEW:case qn.NONCE_EXPIRED:case qn.REPLACEMENT_UNDERPRICED:case qn.TRANSACTION_REPLACED:case qn.UNPREDICTABLE_GAS_LIMIT:o=r;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const a=new Error(e);return a.reason=s,a.code=r,Object.keys(n).forEach(function(l){a[l]=n[l]}),a}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,rr.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,i){e||this.throwError(r,n,i)}assertArgument(e,r,n,i){e||this.throwArgumentError(r,n,i)}checkNormalize(e){jw&&this.throwError("platform missing String.prototype.normalize",rr.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:jw})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,rr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,rr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,rr.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",rr.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",rr.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",rr.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return vv||(vv=new rr(z$)),vv}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",rr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Lw){if(!e)return;this.globalLogger().throwError("error censorship permanent",rr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}$w=!!e,Lw=!!r}static setLogLevel(e){const r=wd[e.toLowerCase()];if(r==null){rr.globalLogger().warn("invalid log level - "+e);return}Fw=r}static from(e){return new rr(e)}};q.errors=qn;q.levels=ip;const V$="bytes/5.7.0",jt=new q(V$);function gA(t){return!!t.toHexString}function ml(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return ml(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function rs(t){return Te(t)&&!(t.length%2)||ls(t)}function Uw(t){return typeof t=="number"&&t==t&&t%1===0}function ls(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!Uw(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function X(t,e){if(e||(e={}),typeof t=="number"){jt.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),ml(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),gA(t)&&(t=t.toHexString()),Te(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":jt.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;iX(i)),r=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(r);return e.reduce((i,s)=>(n.set(s,i),i+s.length),0),ml(n)}function Ci(t){let e=X(t);if(e.length===0)return e;let r=0;for(;re&&jt.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),ml(r)}function Te(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const yv="0123456789abcdef";function Y(t,e){if(e||(e={}),typeof t=="number"){jt.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=yv[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),gA(t))return t.toHexString();if(Te(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":jt.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(ls(t)){let r="0x";for(let n=0;n>4]+yv[i&15]}return r}return jt.throwArgumentError("invalid hexlify value","value",t)}function _i(t){if(typeof t!="string")t=Y(t);else if(!Te(t)||t.length%2)return null;return(t.length-2)/2}function Vt(t,e,r){return typeof t!="string"?t=Y(t):(!Te(t)||t.length%2)&&jt.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function Ur(t){let e="0x";return t.forEach(r=>{e+=Y(r).substring(2)}),e}function ti(t){const e=mA(Y(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function mA(t){typeof t!="string"&&(t=Y(t)),Te(t)||jt.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&jt.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function Aa(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(rs(t)){let r=X(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=Y(r.slice(0,32)),e.s=Y(r.slice(32,64))):r.length===65?(e.r=Y(r.slice(0,32)),e.s=Y(r.slice(32,64)),e.v=r[64]):jt.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:jt.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=Y(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){const i=Yc(X(e._vs),32);e._vs=Y(i);const s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&jt.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const o=Y(i);e.s==null?e.s=o:e.s!==o&&jt.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?jt.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&jt.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!Te(e.r)?jt.throwArgumentError("signature missing or invalid r","signature",t):e.r=Ue(e.r,32),e.s==null||!Te(e.s)?jt.throwArgumentError("signature missing or invalid s","signature",t):e.s=Ue(e.s,32);const r=X(e.s);r[0]>=128&&jt.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=Y(r);e._vs&&(Te(e._vs)||jt.throwArgumentError("signature invalid _vs","signature",t),e._vs=Ue(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&jt.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function sp(t){return t=Aa(t),Y(ze([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const xA="bignumber/5.7.0";var $f=be.BN;const Li=new q(xA),pv={},Vw=9007199254740991;function H$(t){return t!=null&&(V.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Te(t)||typeof t=="bigint"||ls(t))}let Hw=!1;class V{constructor(e,r){e!==pv&&Li.throwError("cannot call constructor directly; use BigNumber.from",q.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Jr(ke(this).fromTwos(e))}toTwos(e){return Jr(ke(this).toTwos(e))}abs(){return this._hex[0]==="-"?V.from(this._hex.substring(1)):this}add(e){return Jr(ke(this).add(ke(e)))}sub(e){return Jr(ke(this).sub(ke(e)))}div(e){return V.from(e).isZero()&&wn("division-by-zero","div"),Jr(ke(this).div(ke(e)))}mul(e){return Jr(ke(this).mul(ke(e)))}mod(e){const r=ke(e);return r.isNeg()&&wn("division-by-zero","mod"),Jr(ke(this).umod(r))}pow(e){const r=ke(e);return r.isNeg()&&wn("negative-power","pow"),Jr(ke(this).pow(r))}and(e){const r=ke(e);return(this.isNegative()||r.isNeg())&&wn("unbound-bitwise-result","and"),Jr(ke(this).and(r))}or(e){const r=ke(e);return(this.isNegative()||r.isNeg())&&wn("unbound-bitwise-result","or"),Jr(ke(this).or(r))}xor(e){const r=ke(e);return(this.isNegative()||r.isNeg())&&wn("unbound-bitwise-result","xor"),Jr(ke(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&wn("negative-width","mask"),Jr(ke(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&wn("negative-width","shl"),Jr(ke(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&wn("negative-width","shr"),Jr(ke(this).shrn(e))}eq(e){return ke(this).eq(ke(e))}lt(e){return ke(this).lt(ke(e))}lte(e){return ke(this).lte(ke(e))}gt(e){return ke(this).gt(ke(e))}gte(e){return ke(this).gte(ke(e))}isNegative(){return this._hex[0]==="-"}isZero(){return ke(this).isZero()}toNumber(){try{return ke(this).toNumber()}catch{wn("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Li.throwError("this platform does not support BigInt",q.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Hw||(Hw=!0,Li.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Li.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",q.errors.UNEXPECTED_ARGUMENT,{}):Li.throwError("BigNumber.toString does not accept parameters",q.errors.UNEXPECTED_ARGUMENT,{})),ke(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof V)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new V(pv,Ff(e)):e.match(/^-?[0-9]+$/)?new V(pv,Ff(new $f(e))):Li.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&wn("underflow","BigNumber.from",e),(e>=Vw||e<=-Vw)&&wn("overflow","BigNumber.from",e),V.from(String(e));const r=e;if(typeof r=="bigint")return V.from(r.toString());if(ls(r))return V.from(Y(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return V.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(Te(n)||n[0]==="-"&&Te(n.substring(1))))return V.from(n)}return Li.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function Ff(t){if(typeof t!="string")return Ff(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Li.throwArgumentError("invalid hex","value",t),t=Ff(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function Jr(t){return V.from(Ff(t))}function ke(t){const e=V.from(t).toHexString();return e[0]==="-"?new $f("-"+e.substring(3),16):new $f(e.substring(2),16)}function wn(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),Li.throwError(t,q.errors.NUMERIC_FAULT,n)}function W$(t){return new $f(t,36).toString(16)}function q$(t){return new $f(t,16).toString(36)}const Vr=new q(xA),Xc={},bA=V.from(0),wA=V.from(-1);function CA(t,e,r,n){const i={fault:e,operation:r};return n!==void 0&&(i.value=n),Vr.throwError(t,q.errors.NUMERIC_FAULT,i)}let Zc="0";for(;Zc.length<256;)Zc+=Zc;function Dm(t){if(typeof t!="number")try{t=V.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+Zc.substring(0,t):Vr.throwArgumentError("invalid decimal size","decimals",t)}function Cd(t,e){e==null&&(e=0);const r=Dm(e);t=V.from(t);const n=t.lt(bA);n&&(t=t.mul(wA));let i=t.mod(r).toString();for(;i.length2&&Vr.throwArgumentError("too many decimal points","value",t);let s=i[0],o=i[1];for(s||(s="0"),o||(o="0");o[o.length-1]==="0";)o=o.substring(0,o.length-1);for(o.length>r.length-1&&CA("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?l:(typeof e[o]!==a&&Vr.throwArgumentError("invalid fixed format ("+o+" not "+a+")","format."+o,e[o]),e[o]);r=s("signed","boolean",r),n=s("width","number",n),i=s("decimals","number",i)}return n%8&&Vr.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&Vr.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new xl(Xc,r,n,i)}}class mr{constructor(e,r,n,i){e!==Xc&&Vr.throwError("cannot use FixedNumber constructor; use FixedNumber.from",q.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Vr.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=ai(this._value,this.format.decimals),n=ai(e._value,e.format.decimals);return mr.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=ai(this._value,this.format.decimals),n=ai(e._value,e.format.decimals);return mr.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=ai(this._value,this.format.decimals),n=ai(e._value,e.format.decimals);return mr.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=ai(this._value,this.format.decimals),n=ai(e._value,e.format.decimals);return mr.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=mr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(Ww.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=mr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(Ww.toFormat(r.format))),r}round(e){e==null&&(e=0);const r=this.toString().split(".");if(r.length===1&&r.push("0"),(e<0||e>80||e%1)&&Vr.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=mr.from("1"+Zc.substring(0,e),this.format),i=G$.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&Vr.throwArgumentError("invalid byte width","width",e);const r=V.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return Ue(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return mr.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!H$(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),mr.fromString(Cd(e,r),xl.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=xl.from(r),i=ai(e,n.decimals);!n.signed&&i.lt(bA)&&CA("unsigned value cannot be negative","overflow","value",e);let s=null;n.signed?s=i.toTwos(n.width).toHexString():(s=i.toHexString(),s=Ue(s,n.width/8));const o=Cd(i,n.decimals);return new mr(Xc,s,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=xl.from(r);if(X(e).length>n.width/8)throw new Error("overflow");let i=V.from(e);n.signed&&(i=i.fromTwos(n.width));const s=i.toTwos((n.signed?0:1)+n.width).toHexString(),o=Cd(i,n.decimals);return new mr(Xc,s,o,n)}static from(e,r){if(typeof e=="string")return mr.fromString(e,r);if(ls(e))return mr.fromBytes(e,r);try{return mr.fromValue(e,0,r)}catch(n){if(n.code!==q.errors.INVALID_ARGUMENT)throw n}return Vr.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const Ww=mr.from(1),G$=mr.from("0.5"),K$="properties/5.7.0";var J$=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const k0=new q(K$);function ee(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function Yn(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function qe(t){return J$(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const i=t[n];return Promise.resolve(i).then(s=>({key:n,value:s}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function Bm(t,e){(!t||typeof t!="object")&&k0.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||k0.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function er(t){const e={};for(const r in t)e[r]=t[r];return e}const Q$={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function AA(t){if(t==null||Q$[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let r=0;rTi(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&ee(e,r,Ti(n))}return e}return k0.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function Ti(t){return Y$(t)}class Ea{constructor(e){for(const r in e)this[r]=Ti(e[r])}}const au="abi/5.7.0",Re=new q(au),ua={};let qw={calldata:!0,memory:!0,storage:!0},X$={calldata:!0,memory:!0};function Ju(t,e){if(t==="bytes"||t==="string"){if(qw[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&X$[e])return!0;return(qw[e]||e==="payable")&&Re.throwArgumentError("invalid modifier","name",e),!1}function Z$(t,e){let r=t;function n(a){Re.throwArgumentError(`unexpected character at position ${a}`,"param",t)}t=t.replace(/\s/g," ");function i(a){let l={type:"",name:"",parent:a,state:{allowType:!0}};return e&&(l.indexed=!1),l}let s={type:"",name:"",state:{allowType:!0}},o=s;for(let a=0;aJSON.parse(i.format(e)))),JSON.stringify(n)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==Ne.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===Ne.full?", ":",")+")"):r+=this.type,e!==Ne.sighash&&(this.indexed===!0&&(r+=" indexed"),e===Ne.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?ar.fromString(e,r):ar.fromObject(e)}static fromObject(e){return ar.isParamType(e)?e:new ar(ua,{name:e.name||null,type:Fa(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(ar.fromObject):null})}static fromString(e,r){function n(i){return ar.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(Z$(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function jf(t,e){return rF(t).map(r=>ar.fromString(r,e))}class yi{constructor(e,r){e!==ua&&Re.throwError("use a static from method",q.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Ad(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return yi.isFragment(e)?e:typeof e=="string"?yi.fromString(e):yi.fromObject(e)}static fromObject(e){if(yi.isFragment(e))return e;switch(e.type){case"function":return Qn.fromObject(e);case"event":return vi.fromObject(e);case"constructor":return Jn.fromObject(e);case"error":return Ui.fromObject(e);case"fallback":case"receive":return null}return Re.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?vi.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Qn.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Jn.fromString(e.trim()):e.split(" ")[0]==="error"?Ui.fromString(e.substring(5).trim()):Re.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class vi extends yi{format(e){if(e||(e=Ne.sighash),Ne[e]||Re.throwArgumentError("invalid format type","format",e),e===Ne.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Ne.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Ne.full?", ":",")+") ",e!==Ne.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?vi.fromString(e):vi.fromObject(e)}static fromObject(e){if(vi.isEventFragment(e))return e;e.type!=="event"&&Re.throwArgumentError("invalid event object","value",e);const r={name:zf(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(ar.fromObject):[],type:"event"};return new vi(ua,r)}static fromString(e){let r=e.match(Uf);r||Re.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:Re.warn("unknown modifier: "+i)}}),vi.fromObject({name:r[1].trim(),anonymous:n,inputs:jf(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function EA(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&Re.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||Re.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=V.from(r[1]),r[0]):t}function SA(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+r)}})}function kA(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&Re.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&Re.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&Re.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Re.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&Re.throwArgumentError("unable to determine stateMutability","value",t),e}class Jn extends yi{format(e){if(e||(e=Ne.sighash),Ne[e]||Re.throwArgumentError("invalid format type","format",e),e===Ne.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===Ne.sighash&&Re.throwError("cannot format a constructor for sighash",q.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===Ne.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?Jn.fromString(e):Jn.fromObject(e)}static fromObject(e){if(Jn.isConstructorFragment(e))return e;e.type!=="constructor"&&Re.throwArgumentError("invalid constructor object","value",e);let r=kA(e);r.constant&&Re.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(ar.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?V.from(e.gas):null};return new Jn(ua,n)}static fromString(e){let r={type:"constructor"};e=EA(e,r);let n=e.match(Uf);return(!n||n[1].trim()!=="constructor")&&Re.throwArgumentError("invalid constructor string","value",e),r.inputs=jf(n[2].trim(),!1),SA(n[3].trim(),r),Jn.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class Qn extends Jn{format(e){if(e||(e=Ne.sighash),Ne[e]||Re.throwArgumentError("invalid format type","format",e),e===Ne.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Ne.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Ne.full?", ":",")+") ",e!==Ne.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?Qn.fromString(e):Qn.fromObject(e)}static fromObject(e){if(Qn.isFunctionFragment(e))return e;e.type!=="function"&&Re.throwArgumentError("invalid function object","value",e);let r=kA(e);const n={type:e.type,name:zf(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(ar.fromObject):[],outputs:e.outputs?e.outputs.map(ar.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?V.from(e.gas):null};return new Qn(ua,n)}static fromString(e){let r={type:"function"};e=EA(e,r);let n=e.split(" returns ");n.length>2&&Re.throwArgumentError("invalid function string","value",e);let i=n[0].match(Uf);if(i||Re.throwArgumentError("invalid function signature","value",e),r.name=i[1].trim(),r.name&&zf(r.name),r.inputs=jf(i[2],!1),SA(i[3].trim(),r),n.length>1){let s=n[1].match(Uf);(s[1].trim()!=""||s[3].trim()!="")&&Re.throwArgumentError("unexpected tokens","value",e),r.outputs=jf(s[2],!1)}else r.outputs=[];return Qn.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function Gw(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Re.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Ui extends yi{format(e){if(e||(e=Ne.sighash),Ne[e]||Re.throwArgumentError("invalid format type","format",e),e===Ne.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Ne.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Ne.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?Ui.fromString(e):Ui.fromObject(e)}static fromObject(e){if(Ui.isErrorFragment(e))return e;e.type!=="error"&&Re.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:zf(e.name),inputs:e.inputs?e.inputs.map(ar.fromObject):[]};return Gw(new Ui(ua,r))}static fromString(e){let r={type:"error"},n=e.match(Uf);return n||Re.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&zf(r.name),r.inputs=jf(n[2],!1),Gw(Ui.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function Fa(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const tF=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function zf(t){return(!t||!t.match(tF))&&Re.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const Uf=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function rF(t){t=t.trim();let e=[],r="",n=0;for(let i=0;ithis.wordSize&&Lm.throwError("value out-of-bounds",q.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=ze([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r)}}}class _0{constructor(e,r,n,i){ee(this,"_data",X(e)),ee(this,"wordSize",r||32),ee(this,"_coerceFunc",n),ee(this,"allowLoose",i),this._offset=0}get data(){return Y(this._data)}get consumed(){return this._offset}static coerce(e,r){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):_0.coerce(e,r)}_peekBytes(e,r,n){let i=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?i=r:Lm.throwError("data out-of-bounds",q.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new _0(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let n=this._peekBytes(0,e,!!r);return this._offset+=n.length,n.slice(0,e)}readValue(){return V.from(this.readBytes(this.wordSize))}}var TA={exports:{}};/** +Defaulting to \`null\`.`}const qC="Radio",[YD,GC]=$r(qC),[QD,XD]=YD(qC),ZD=S.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:i=!1,required:s,disabled:o,value:a="on",onCheck:l,...c}=t,[f,u]=S.useState(null),h=Tt(e,p=>u(p)),y=S.useRef(!1),m=f?!!f.closest("form"):!0;return S.createElement(QD,{scope:r,checked:i,disabled:o},S.createElement($e.button,qt({type:"button",role:"radio","aria-checked":i,"data-state":KC(i),"data-disabled":o?"":void 0,disabled:o,value:a},c,{ref:h,onClick:ge(t.onClick,p=>{i||l==null||l(),m&&(y.current=p.isPropagationStopped(),y.current||p.stopPropagation())})})),m&&S.createElement(rL,{control:f,bubbles:!y.current,name:n,value:a,checked:i,required:s,disabled:o,style:{transform:"translateX(-100%)"}}))}),eL="RadioIndicator",tL=S.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...i}=t,s=XD(eL,r);return S.createElement(vo,{present:n||s.checked},S.createElement($e.span,qt({"data-state":KC(s.checked),"data-disabled":s.disabled?"":void 0},i,{ref:e})))}),rL=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=S.useRef(null),o=dm(r),a=hm(e);return S.useEffect(()=>{const l=s.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const h=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(h)}},[o,r,n]),S.createElement("input",qt({type:"radio","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function KC(t){return t?"checked":"unchecked"}const nL=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],JC="RadioGroup",[iL,lJ]=$r(JC,[tc,GC]),YC=tc(),QC=GC(),[sL,oL]=iL(JC),aL=S.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:f=!0,onValueChange:u,...h}=t,y=YC(r),m=mm(c),[p,k]=ca({prop:s,defaultProp:i,onChange:u});return S.createElement(sL,{scope:r,name:n,required:o,disabled:a,value:p,onValueChange:k},S.createElement(zO,qt({asChild:!0},y,{orientation:l,dir:m,loop:f}),S.createElement($e.div,qt({role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:m},h,{ref:e}))))}),lL="RadioGroupItem",cL=S.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...i}=t,s=oL(lL,r),o=s.disabled||n,a=YC(r),l=QC(r),c=S.useRef(null),f=Tt(e,c),u=s.value===i.value,h=S.useRef(!1);return S.useEffect(()=>{const y=p=>{nL.includes(p.key)&&(h.current=!0)},m=()=>h.current=!1;return document.addEventListener("keydown",y),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",y),document.removeEventListener("keyup",m)}},[]),S.createElement(hC,qt({asChild:!0},a,{focusable:!o,active:u}),S.createElement(ZD,qt({disabled:o,required:s.required,checked:u},l,i,{name:s.name,ref:f,onCheck:()=>s.onValueChange(i.value),onKeyDown:ge(y=>{y.key==="Enter"&&y.preventDefault()}),onFocus:ge(i.onFocus,()=>{var y;h.current&&((y=c.current)===null||y===void 0||y.click())})})))}),fL=S.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,i=QC(r);return S.createElement(tL,qt({},i,n,{ref:e}))}),uL=aL,dL=cL,hL=fL;var vL=Ft({defaultClassName:"io59uy8 io59uy7 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12rt",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]}),yL=Ft({defaultClassName:"io59uy3 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr12nb fyvr12fz fyvr121b fyvr128n fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11ob fyvr12uz fyvr12uv fyvr12vj",variantClassNames:{size:{sm:"io59uy4 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy5 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]});const pL=t=>{const{id:e,label:r,size:n="sm",value:i,disabled:s}=t;return Y.jsx(ue,{alignItems:"center",children:Y.jsx(Yl,{disabled:s,display:"flex",id:e,label:r,labelLocation:"right",children:Y.jsx(dL,{className:yL({size:n}),value:i,id:e,disabled:s,children:Y.jsx(hL,{className:vL({size:n})})})})})};S.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:i="2",name:s,options:o,size:a="sm",...l}=t;return Y.jsx(uL,{disabled:n,name:s,ref:e,...l,children:Y.jsx(ue,{flexDirection:r,gap:i,children:o.map(({label:c,value:f,disabled:u})=>Y.jsx(pL,{id:`${s}-${f}`,label:c,size:a,value:f,disabled:u},f))})})});function Pw(t,[e,r]){return Math.min(r,Math.max(e,t))}const XC=S.forwardRef((t,e)=>S.createElement($e.span,xe({},t,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}))),gL=[" ","Enter","ArrowUp","ArrowDown"],mL=[" ","Enter"],Mh="Select",[Nh,Mm,xL]=Ah(Mh),[rc,cJ]=$r(Mh,[xL,ec]),Nm=ec(),[bL,Ca]=rc(Mh),[wL,CL]=rc(Mh),EL=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:l,dir:c,name:f,autoComplete:u,disabled:h,required:y}=t,m=Nm(e),[p,k]=S.useState(null),[w,E]=S.useState(null),[A,I]=S.useState(!1),M=mm(c),[B=!1,U]=ca({prop:n,defaultProp:i,onChange:s}),[j,K]=ca({prop:o,defaultProp:a,onChange:l}),J=S.useRef(null),Z=p?!!p.closest("form"):!0,[ie,D]=S.useState(new Set),v=Array.from(ie).map(C=>C.props.value).join(";");return S.createElement(kO,m,S.createElement(bL,{required:y,scope:e,trigger:p,onTriggerChange:k,valueNode:w,onValueNodeChange:E,valueNodeHasChildren:A,onValueNodeHasChildrenChange:I,contentId:Ws(),value:j,onValueChange:K,open:B,onOpenChange:U,dir:M,triggerPointerDownPosRef:J,disabled:h},S.createElement(Nh.Provider,{scope:e},S.createElement(wL,{scope:t.__scopeSelect,onNativeOptionAdd:S.useCallback(C=>{D(P=>new Set(P).add(C))},[]),onNativeOptionRemove:S.useCallback(C=>{D(P=>{const N=new Set(P);return N.delete(C),N})},[])},r)),Z?S.createElement(tE,{key:v,"aria-hidden":!0,required:y,tabIndex:-1,name:f,autoComplete:u,value:j,onChange:C=>K(C.target.value),disabled:h},j===void 0?S.createElement("option",{value:""}):null,Array.from(ie)):null))},SL="SelectTrigger",kL=S.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...i}=t,s=Nm(r),o=Ca(SL,r),a=o.disabled||n,l=Tt(e,o.onTriggerChange),c=Mm(r),[f,u,h]=rE(m=>{const p=c().filter(E=>!E.disabled),k=p.find(E=>E.value===o.value),w=nE(p,m,k);w!==void 0&&o.onValueChange(w.value)}),y=()=>{a||(o.onOpenChange(!0),h())};return S.createElement(AO,xe({asChild:!0},s),S.createElement($e.button,xe({type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":eE(o.value)?"":void 0},i,{ref:l,onClick:ge(i.onClick,m=>{m.currentTarget.focus()}),onPointerDown:ge(i.onPointerDown,m=>{const p=m.target;p.hasPointerCapture(m.pointerId)&&p.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&(y(),o.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)},m.preventDefault())}),onKeyDown:ge(i.onKeyDown,m=>{const p=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&u(m.key),!(p&&m.key===" ")&&gL.includes(m.key)&&(y(),m.preventDefault())})})))}),AL="SelectValue",_L=S.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,children:s,placeholder:o="",...a}=t,l=Ca(AL,r),{onValueNodeHasChildrenChange:c}=l,f=s!==void 0,u=Tt(e,l.onValueNodeChange);return gn(()=>{c(f)},[c,f]),S.createElement($e.span,xe({},a,{ref:u,style:{pointerEvents:"none"}}),eE(l.value)?S.createElement(S.Fragment,null,o):s)}),TL=S.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...i}=t;return S.createElement($e.span,xe({"aria-hidden":!0},i,{ref:e}),n||"▼")}),$l="SelectContent",PL=S.forwardRef((t,e)=>{const r=Ca($l,t.__scopeSelect),[n,i]=S.useState();if(gn(()=>{i(new DocumentFragment)},[]),!r.open){const s=n;return s?ho.createPortal(S.createElement(ZC,{scope:t.__scopeSelect},S.createElement(Nh.Slot,{scope:t.__scopeSelect},S.createElement("div",null,t.children))),s):null}return S.createElement(IL,xe({},t,{ref:e}))}),Di=10,[ZC,Oh]=rc($l),IL=S.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:h,collisionPadding:y,sticky:m,hideWhenDetached:p,avoidCollisions:k,...w}=t,E=Ca($l,r),[A,I]=S.useState(null),[M,B]=S.useState(null),U=Tt(e,L=>I(L)),[j,K]=S.useState(null),[J,Z]=S.useState(null),ie=Mm(r),[D,v]=S.useState(!1),C=S.useRef(!1);S.useEffect(()=>{if(A)return yC(A)},[A]),G8();const P=S.useCallback(L=>{const[z,...G]=ie().map(W=>W.ref.current),[F]=G.slice(-1),V=document.activeElement;for(const W of L)if(W===V||(W==null||W.scrollIntoView({block:"nearest"}),W===z&&M&&(M.scrollTop=0),W===F&&M&&(M.scrollTop=M.scrollHeight),W==null||W.focus(),document.activeElement!==V))return},[ie,M]),N=S.useCallback(()=>P([j,A]),[P,j,A]);S.useEffect(()=>{D&&N()},[D,N]);const{onOpenChange:b,triggerPointerDownPosRef:_}=E;S.useEffect(()=>{if(A){let L={x:0,y:0};const z=F=>{var V,W,oe,re;L={x:Math.abs(Math.round(F.pageX)-((V=(W=_.current)===null||W===void 0?void 0:W.x)!==null&&V!==void 0?V:0)),y:Math.abs(Math.round(F.pageY)-((oe=(re=_.current)===null||re===void 0?void 0:re.y)!==null&&oe!==void 0?oe:0))}},G=F=>{L.x<=10&&L.y<=10?F.preventDefault():A.contains(F.target)||b(!1),document.removeEventListener("pointermove",z),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",z),document.addEventListener("pointerup",G,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",z),document.removeEventListener("pointerup",G,{capture:!0})}}},[A,b,_]),S.useEffect(()=>{const L=()=>b(!1);return window.addEventListener("blur",L),window.addEventListener("resize",L),()=>{window.removeEventListener("blur",L),window.removeEventListener("resize",L)}},[b]);const[R,g]=rE(L=>{const z=ie().filter(V=>!V.disabled),G=z.find(V=>V.ref.current===document.activeElement),F=nE(z,L,G);F&&setTimeout(()=>F.ref.current.focus())}),d=S.useCallback((L,z,G)=>{const F=!C.current&&!G;(E.value!==void 0&&E.value===z||F)&&(K(L),F&&(C.current=!0))},[E.value]),T=S.useCallback(()=>A==null?void 0:A.focus(),[A]),O=S.useCallback((L,z,G)=>{const F=!C.current&&!G;(E.value!==void 0&&E.value===z||F)&&Z(L)},[E.value]),x=n==="popper"?Iw:RL,$=x===Iw?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:h,collisionPadding:y,sticky:m,hideWhenDetached:p,avoidCollisions:k}:{};return S.createElement(ZC,{scope:r,content:A,viewport:M,onViewportChange:B,itemRefCallback:d,selectedItem:j,onItemLeave:T,itemTextRefCallback:O,focusSelectedItem:N,selectedItemText:J,position:n,isPositioned:D,searchRef:R},S.createElement(SC,{as:Nl,allowPinchZoom:!0},S.createElement(K8,{asChild:!0,trapped:E.open,onMountAutoFocus:L=>{L.preventDefault()},onUnmountAutoFocus:ge(i,L=>{var z;(z=E.trigger)===null||z===void 0||z.focus({preventScroll:!0}),L.preventDefault()})},S.createElement(xm,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:L=>L.preventDefault(),onDismiss:()=>E.onOpenChange(!1)},S.createElement(x,xe({role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:L=>L.preventDefault()},w,$,{onPlaced:()=>v(!0),ref:U,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:ge(w.onKeyDown,L=>{const z=L.ctrlKey||L.altKey||L.metaKey;if(L.key==="Tab"&&L.preventDefault(),!z&&L.key.length===1&&g(L.key),["ArrowUp","ArrowDown","Home","End"].includes(L.key)){let F=ie().filter(V=>!V.disabled).map(V=>V.ref.current);if(["ArrowUp","End"].includes(L.key)&&(F=F.slice().reverse()),["ArrowUp","ArrowDown"].includes(L.key)){const V=L.target,W=F.indexOf(V);F=F.slice(W+1)}setTimeout(()=>P(F)),L.preventDefault()}})}))))))}),RL=S.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...i}=t,s=Ca($l,r),o=Oh($l,r),[a,l]=S.useState(null),[c,f]=S.useState(null),u=Tt(e,U=>f(U)),h=Mm(r),y=S.useRef(!1),m=S.useRef(!0),{viewport:p,selectedItem:k,selectedItemText:w,focusSelectedItem:E}=o,A=S.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&c&&p&&k&&w){const U=s.trigger.getBoundingClientRect(),j=c.getBoundingClientRect(),K=s.valueNode.getBoundingClientRect(),J=w.getBoundingClientRect();if(s.dir!=="rtl"){const V=J.left-j.left,W=K.left-V,oe=U.left-W,re=U.width+oe,ae=Math.max(re,j.width),De=window.innerWidth-Di,Ee=Pw(W,[Di,De-ae]);a.style.minWidth=re+"px",a.style.left=Ee+"px"}else{const V=j.right-J.right,W=window.innerWidth-K.right-V,oe=window.innerWidth-U.right-W,re=U.width+oe,ae=Math.max(re,j.width),De=window.innerWidth-Di,Ee=Pw(W,[Di,De-ae]);a.style.minWidth=re+"px",a.style.right=Ee+"px"}const Z=h(),ie=window.innerHeight-Di*2,D=p.scrollHeight,v=window.getComputedStyle(c),C=parseInt(v.borderTopWidth,10),P=parseInt(v.paddingTop,10),N=parseInt(v.borderBottomWidth,10),b=parseInt(v.paddingBottom,10),_=C+P+D+b+N,R=Math.min(k.offsetHeight*5,_),g=window.getComputedStyle(p),d=parseInt(g.paddingTop,10),T=parseInt(g.paddingBottom,10),O=U.top+U.height/2-Di,x=ie-O,$=k.offsetHeight/2,L=k.offsetTop+$,z=C+P+L,G=_-z;if(z<=O){const V=k===Z[Z.length-1].ref.current;a.style.bottom="0px";const W=c.clientHeight-p.offsetTop-p.offsetHeight,oe=Math.max(x,$+(V?T:0)+W+N),re=z+oe;a.style.height=re+"px"}else{const V=k===Z[0].ref.current;a.style.top="0px";const oe=Math.max(O,C+p.offsetTop+(V?d:0)+$)+G;a.style.height=oe+"px",p.scrollTop=z-O+p.offsetTop}a.style.margin=`${Di}px 0`,a.style.minHeight=R+"px",a.style.maxHeight=ie+"px",n==null||n(),requestAnimationFrame(()=>y.current=!0)}},[h,s.trigger,s.valueNode,a,c,p,k,w,s.dir,n]);gn(()=>A(),[A]);const[I,M]=S.useState();gn(()=>{c&&M(window.getComputedStyle(c).zIndex)},[c]);const B=S.useCallback(U=>{U&&m.current===!0&&(A(),E==null||E(),m.current=!1)},[A,E]);return S.createElement(ML,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:y,onScrollButtonChange:B},S.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:I}},S.createElement($e.div,xe({},i,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),Iw=S.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=Di,...s}=t,o=Nm(r);return S.createElement(_O,xe({},o,s,{ref:e,align:n,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[ML,NL]=rc($l,{}),Rw="SelectViewport",OL=S.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=Oh(Rw,r),s=NL(Rw,r),o=Tt(e,i.onViewportChange),a=S.useRef(0);return S.createElement(S.Fragment,null,S.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),S.createElement(Nh.Slot,{scope:r},S.createElement($e.div,xe({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:ge(n.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:u}=s;if(u!=null&&u.current&&f){const h=Math.abs(a.current-c.scrollTop);if(h>0){const y=window.innerHeight-Di*2,m=parseFloat(f.style.minHeight),p=parseFloat(f.style.height),k=Math.max(m,p);if(k0?A:0,f.style.justifyContent="flex-end")}}}a.current=c.scrollTop})}))))}),$L="SelectGroup",[DL,fJ]=rc($L),LL=S.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=Ws();return S.createElement(DL,{scope:r,id:i},S.createElement($e.div,xe({role:"group","aria-labelledby":i},n,{ref:e})))}),np="SelectItem",[BL,FL]=rc(np),jL=S.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:s,...o}=t,a=Ca(np,r),l=Oh(np,r),c=a.value===n,[f,u]=S.useState(s??""),[h,y]=S.useState(!1),m=Tt(e,w=>{var E;return(E=l.itemRefCallback)===null||E===void 0?void 0:E.call(l,w,n,i)}),p=Ws(),k=()=>{i||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return S.createElement(BL,{scope:r,value:n,disabled:i,textId:p,isSelected:c,onItemTextChange:S.useCallback(w=>{u(E=>{var A;return E||((A=w==null?void 0:w.textContent)!==null&&A!==void 0?A:"").trim()})},[])},S.createElement(Nh.ItemSlot,{scope:r,value:n,disabled:i,textValue:f},S.createElement($e.div,xe({role:"option","aria-labelledby":p,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},o,{ref:m,onFocus:ge(o.onFocus,()=>y(!0)),onBlur:ge(o.onBlur,()=>y(!1)),onPointerUp:ge(o.onPointerUp,k),onPointerMove:ge(o.onPointerMove,w=>{if(i){var E;(E=l.onItemLeave)===null||E===void 0||E.call(l)}else w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ge(o.onPointerLeave,w=>{if(w.currentTarget===document.activeElement){var E;(E=l.onItemLeave)===null||E===void 0||E.call(l)}}),onKeyDown:ge(o.onKeyDown,w=>{var E;((E=l.searchRef)===null||E===void 0?void 0:E.current)!==""&&w.key===" "||(mL.includes(w.key)&&k(),w.key===" "&&w.preventDefault())})}))))}),Gu="SelectItemText",zL=S.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,...s}=t,o=Ca(Gu,r),a=Oh(Gu,r),l=FL(Gu,r),c=CL(Gu,r),[f,u]=S.useState(null),h=Tt(e,w=>u(w),l.onItemTextChange,w=>{var E;return(E=a.itemTextRefCallback)===null||E===void 0?void 0:E.call(a,w,l.value,l.disabled)}),y=f==null?void 0:f.textContent,m=S.useMemo(()=>S.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},y),[l.disabled,l.value,y]),{onNativeOptionAdd:p,onNativeOptionRemove:k}=c;return gn(()=>(p(m),()=>k(m)),[p,k,m]),S.createElement(S.Fragment,null,S.createElement($e.span,xe({id:l.textId},s,{ref:h})),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?ho.createPortal(s.children,o.valueNode):null)});function eE(t){return t===""||t===void 0}const tE=S.forwardRef((t,e)=>{const{value:r,...n}=t,i=S.useRef(null),s=Tt(e,i),o=dm(r);return S.useEffect(()=>{const a=i.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&f){const u=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(u)}},[o,r]),S.createElement(XC,{asChild:!0},S.createElement("select",xe({},n,{ref:s,defaultValue:r})))});tE.displayName="BubbleSelect";function rE(t){const e=Mn(t),r=S.useRef(""),n=S.useRef(0),i=S.useCallback(o=>{const a=r.current+o;e(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),s=S.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,s]}function nE(t,e,r){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,s=r?t.indexOf(r):-1;let o=UL(t,Math.max(s,0));i.length===1&&(o=o.filter(c=>c!==r));const l=o.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==r?l:void 0}function UL(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const VL=EL,HL=kL,WL=_L,qL=TL,GL=PL,KL=OL,JL=LL,YL=jL,QL=zL;var XL="gohwuma fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11tt fyvr12rt fyvr11nj",ZL="gohwume _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12wk fyvr12wl fyvr12we fyvr12wf fyvr11h0 fyvr11jw fyvr11ko fyvr12uz fyvr12uv fyvr12rt fyvr12vt fyvr12vj",eB="gohwum1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12rt fyvr118c fyvr11jw fyvr11n2 fyvr12uz",tB=Ft({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const rB=S.forwardRef(({children:t,className:e,...r},n)=>Y.jsx(YL,{className:an(ZL,e),...r,ref:n,children:Y.jsx(QL,{children:t})})),Mw=S.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:i,label:s="",description:o,labelLocation:a="hidden",name:l,options:c,placeholder:f,...u}=t;return Y.jsx(Yl,{disabled:n,display:"grid",id:i??l,label:s,labelLocation:a,description:o,whiteSpace:"nowrap",children:Y.jsxs(VL,{disabled:n,name:l,...u,children:[Y.jsxs(HL,{id:i??l,className:an(eB,tB({borderRadius:r})),ref:e,children:[Y.jsx(WL,{placeholder:f}),Y.jsx(ue,{as:qL,display:"inline-flex",children:Y.jsx(V8,{})})]}),Y.jsx(GL,{className:XL,children:Y.jsx(KL,{children:Y.jsx(JL,{children:c.map(({value:h,label:y,...m})=>Y.jsx(rB,{value:h,...m,children:y},h))})})})]})})});S.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:i="Search",name:s="search",value:o,...a}=t,l=o?Y.jsx(Pm,{icon:ym,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return Y.jsx(Rm,{ref:e,name:s,leftIcon:QM,controls:r||l,placeholder:i,value:o,onChange:c=>n==null?void 0:n(c),...a})});var nB=Ft({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});S.forwardRef((t,e)=>{const{size:r="md",...n}=t;return Y.jsx(ue,{className:nB({size:r}),color:"text50",ref:e,...n,children:Y.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[Y.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),Y.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});S.forwardRef(({children:t},e)=>Y.jsx(ue,{ref:e,width:"fit",height:"fit",onClick:r=>{r.preventDefault(),r.stopPropagation()},onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),r.stopPropagation())},children:t}));const iE="Switch",[iB,uJ]=$r(iE);iB(iE);Ft({defaultClassName:"nwwh3z7",variantClassNames:{variant:{pill:"nwwh3z8",line:"nwwh3z9 fyvr11g0"},active:{true:"fyvr12vx",false:"nwwh3zb"},disabled:{true:"fyvr12vh"}},defaultVariants:{},compoundVariants:[[{active:!0,variant:"pill"},"fyvr11u5 fyvr12sb"],[{active:!1,variant:"pill"},"fyvr11ob fyvr12rz"],[{active:!0,variant:"line"},"fyvr12rt"],[{active:!1,variant:"line"},"fyvr12rz"]]});const sE="Tabs",[sB,dJ]=$r(sE,[tc]);tc();sB(sE);var oB="_1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n7";S.forwardRef((t,e)=>{const{icon:r,label:n,...i}=t;return Y.jsxs(ue,{className:oB,ref:e,background:"buttonGlass",...i,children:[r&&Y.jsx(r,{size:"xs"}),Y.jsx(Ut,{children:n})]})});const aB="ToastProvider",[lB,hJ,cB]=Ah("Toast"),[oE,vJ]=$r("Toast",[cB]),[yJ,aE]=oE(aB),Nw="toast.viewportPause",Ow="toast.viewportResume",$h="Toast",fB="toast.swipeStart",uB="toast.swipeMove",dB="toast.swipeCancel",hB="toast.swipeEnd",[vB,yB]=oE($h,{onClose(){}}),pB=S.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:f,onSwipeMove:u,onSwipeCancel:h,onSwipeEnd:y,...m}=t,p=aE($h,r),[k,w]=S.useState(null),E=Tt(e,v=>w(v)),A=S.useRef(null),I=S.useRef(null),M=i||p.duration,B=S.useRef(0),U=S.useRef(M),j=S.useRef(0),{onToastAdd:K,onToastRemove:J}=p,Z=Mn(()=>{var v;(k==null?void 0:k.contains(document.activeElement))&&((v=p.viewport)===null||v===void 0||v.focus()),o()}),ie=S.useCallback(v=>{!v||v===1/0||(window.clearTimeout(j.current),B.current=new Date().getTime(),j.current=window.setTimeout(Z,v))},[Z]);S.useEffect(()=>{const v=p.viewport;if(v){const C=()=>{ie(U.current),c==null||c()},P=()=>{const N=new Date().getTime()-B.current;U.current=U.current-N,window.clearTimeout(j.current),l==null||l()};return v.addEventListener(Nw,P),v.addEventListener(Ow,C),()=>{v.removeEventListener(Nw,P),v.removeEventListener(Ow,C)}}},[p.viewport,M,l,c,ie]),S.useEffect(()=>{s&&!p.isClosePausedRef.current&&ie(M)},[s,M,p.isClosePausedRef,ie]),S.useEffect(()=>(K(),()=>J()),[K,J]);const D=S.useMemo(()=>k?cE(k):null,[k]);return p.viewport?S.createElement(S.Fragment,null,D&&S.createElement(gB,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},D),S.createElement(vB,{scope:r,onClose:Z},ho.createPortal(S.createElement(lB.ItemSlot,{scope:r},S.createElement(_N,{asChild:!0,onEscapeKeyDown:ge(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||Z(),p.isFocusedToastEscapeKeyDownRef.current=!1})},S.createElement($e.li,xe({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection},m,{ref:E,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ge(t.onKeyDown,v=>{v.key==="Escape"&&(a==null||a(v.nativeEvent),v.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,Z()))}),onPointerDown:ge(t.onPointerDown,v=>{v.button===0&&(A.current={x:v.clientX,y:v.clientY})}),onPointerMove:ge(t.onPointerMove,v=>{if(!A.current)return;const C=v.clientX-A.current.x,P=v.clientY-A.current.y,N=!!I.current,b=["left","right"].includes(p.swipeDirection),_=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,R=b?_(0,C):0,g=b?0:_(0,P),d=v.pointerType==="touch"?10:2,T={x:R,y:g},O={originalEvent:v,delta:T};N?(I.current=T,Ku(uB,u,O,{discrete:!1})):$w(T,p.swipeDirection,d)?(I.current=T,Ku(fB,f,O,{discrete:!1}),v.target.setPointerCapture(v.pointerId)):(Math.abs(C)>d||Math.abs(P)>d)&&(A.current=null)}),onPointerUp:ge(t.onPointerUp,v=>{const C=I.current,P=v.target;if(P.hasPointerCapture(v.pointerId)&&P.releasePointerCapture(v.pointerId),I.current=null,A.current=null,C){const N=v.currentTarget,b={originalEvent:v,delta:C};$w(C,p.swipeDirection,p.swipeThreshold)?Ku(hB,y,b,{discrete:!0}):Ku(dB,h,b,{discrete:!0}),N.addEventListener("click",_=>_.preventDefault(),{once:!0})}})})))),p.viewport))):null});pB.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${$h}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const gB=t=>{const{__scopeToast:e,children:r,...n}=t,i=aE($h,e),[s,o]=S.useState(!1),[a,l]=S.useState(!1);return CB(()=>o(!0)),S.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:S.createElement(fC,{asChild:!0},S.createElement(XC,n,s&&S.createElement(S.Fragment,null,i.label," ",r)))},mB="ToastAction",xB=S.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?S.createElement(lE,{altText:r,asChild:!0},S.createElement(wB,xe({},n,{ref:e}))):null});xB.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${mB}\``)}};const bB="ToastClose",wB=S.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,i=yB(bB,r);return S.createElement(lE,{asChild:!0},S.createElement($e.button,xe({type:"button"},n,{ref:e,onClick:ge(t.onClick,i.onClose)})))}),lE=S.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...i}=t;return S.createElement($e.div,xe({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},i,{ref:e}))});function cE(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),EB(n)){const i=n.ariaHidden||n.hidden||n.style.display==="none",s=n.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...cE(n))}}),e}function Ku(t,e,r,{discrete:n}){const i=r.originalEvent.currentTarget,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),n?vm(i,s):i.dispatchEvent(s)}const $w=(t,e,r=0)=>{const n=Math.abs(t.x),i=Math.abs(t.y),s=n>i;return e==="left"||e==="right"?s&&n>r:!s&&i>r};function CB(t=()=>{}){const e=Mn(t);gn(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function EB(t){return t.nodeType===t.ELEMENT_NODE}Ft({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});S.createContext(null);var SB="_15pztn2",kB="_15pztn1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12rt fyvr128 fyvr11h0";S.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",name:f,rows:u,resize:h=!1,...y}=t;return Y.jsx(Yl,{description:s,disabled:o,display:"grid",id:a??f,label:l,labelLocation:c,children:Y.jsx(ue,{as:r,autoComplete:n,spellCheck:"false",className:an(kB,h&&SB),disabled:o,id:a??f,name:f,ref:e,rows:u,borderRadius:i,...y})})});var AB="bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11sh fyvr128 fyvr15o fyvr11h0",_B="bnrrebe",TB=Ft({defaultClassName:"bnrreb5 fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"bnrreb6",sm:"bnrreb7",md:"bnrreb8",lg:"bnrreb9"},borderRadius:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]});const PB=S.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:i,src:s,symbol:o,size:a="md",...l}=t;return Y.jsx(ue,{className:an(r,TB({borderRadius:e,size:a})),style:i,flexShrink:"0",...l,children:s?Y.jsx(OC,{className:_B,disableAnimation:n,src:s}):Y.jsx(Ut,{className:AB,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})}),[Dh,pJ]=$r("Tooltip",[ec]);ec();const IB="TooltipProvider";Dh(IB);const fE="Tooltip";Dh(fE);const RB="TooltipPortal";Dh(RB,{forceMount:void 0});Dh(fE,{isInside:!1});var uE,Dw=ho;uE=Dw.createRoot,Dw.hydrateRoot;var Om={exports:{}};const MB={},NB=Object.freeze(Object.defineProperty({__proto__:null,default:MB},Symbol.toStringTag,{value:"Module"})),OB=Ek(NB);Om.exports;(function(t){(function(e,r){function n(D,v){if(!D)throw new Error(v||"Assertion failed")}function i(D,v){D.super_=v;var C=function(){};C.prototype=v.prototype,D.prototype=new C,D.prototype.constructor=D}function s(D,v,C){if(s.isBN(D))return D;this.negative=0,this.words=null,this.length=0,this.red=null,D!==null&&((v==="le"||v==="be")&&(C=v,v=10),this._init(D||0,v||10,C||"be"))}typeof e=="object"?e.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=OB.Buffer}catch{}s.isBN=function(v){return v instanceof s?!0:v!==null&&typeof v=="object"&&v.constructor.wordSize===s.wordSize&&Array.isArray(v.words)},s.max=function(v,C){return v.cmp(C)>0?v:C},s.min=function(v,C){return v.cmp(C)<0?v:C},s.prototype._init=function(v,C,P){if(typeof v=="number")return this._initNumber(v,C,P);if(typeof v=="object")return this._initArray(v,C,P);C==="hex"&&(C=16),n(C===(C|0)&&C>=2&&C<=36),v=v.toString().replace(/\s+/g,"");var N=0;v[0]==="-"&&(N++,this.negative=1),N=0;N-=3)_=v[N]|v[N-1]<<8|v[N-2]<<16,this.words[b]|=_<>>26-R&67108863,R+=24,R>=26&&(R-=26,b++);else if(P==="le")for(N=0,b=0;N>>26-R&67108863,R+=24,R>=26&&(R-=26,b++);return this._strip()};function a(D,v){var C=D.charCodeAt(v);if(C>=48&&C<=57)return C-48;if(C>=65&&C<=70)return C-55;if(C>=97&&C<=102)return C-87;n(!1,"Invalid character in "+D)}function l(D,v,C){var P=a(D,C);return C-1>=v&&(P|=a(D,C-1)<<4),P}s.prototype._parseHex=function(v,C,P){this.length=Math.ceil((v.length-C)/6),this.words=new Array(this.length);for(var N=0;N=C;N-=2)R=l(v,C,N)<=18?(b-=18,_+=1,this.words[_]|=R>>>26):b+=8;else{var g=v.length-C;for(N=g%2===0?C+1:C;N=18?(b-=18,_+=1,this.words[_]|=R>>>26):b+=8}this._strip()};function c(D,v,C,P){for(var N=0,b=0,_=Math.min(D.length,C),R=v;R<_;R++){var g=D.charCodeAt(R)-48;N*=P,g>=49?b=g-49+10:g>=17?b=g-17+10:b=g,n(g>=0&&b1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch{s.prototype.inspect=u}else s.prototype.inspect=u;function u(){return(this.red?""}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],y=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],m=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(v,C){v=v||10,C=C|0||1;var P;if(v===16||v==="hex"){P="";for(var N=0,b=0,_=0;_>>24-N&16777215,N+=2,N>=26&&(N-=26,_--),b!==0||_!==this.length-1?P=h[6-g.length]+g+P:P=g+P}for(b!==0&&(P=b.toString(16)+P);P.length%C!==0;)P="0"+P;return this.negative!==0&&(P="-"+P),P}if(v===(v|0)&&v>=2&&v<=36){var d=y[v],T=m[v];P="";var O=this.clone();for(O.negative=0;!O.isZero();){var x=O.modrn(T).toString(v);O=O.idivn(T),O.isZero()?P=x+P:P=h[d-x.length]+x+P}for(this.isZero()&&(P="0"+P);P.length%C!==0;)P="0"+P;return this.negative!==0&&(P="-"+P),P}n(!1,"Base should be between 2 and 36")},s.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},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(v,C){return this.toArrayLike(o,v,C)}),s.prototype.toArray=function(v,C){return this.toArrayLike(Array,v,C)};var p=function(v,C){return v.allocUnsafe?v.allocUnsafe(C):new v(C)};s.prototype.toArrayLike=function(v,C,P){this._strip();var N=this.byteLength(),b=P||Math.max(1,N);n(N<=b,"byte array longer than desired length"),n(b>0,"Requested array length <= 0");var _=p(v,b),R=C==="le"?"LE":"BE";return this["_toArrayLike"+R](_,N),_},s.prototype._toArrayLikeLE=function(v,C){for(var P=0,N=0,b=0,_=0;b>8&255),P>16&255),_===6?(P>24&255),N=0,_=0):(N=R>>>24,_+=2)}if(P=0&&(v[P--]=R>>8&255),P>=0&&(v[P--]=R>>16&255),_===6?(P>=0&&(v[P--]=R>>24&255),N=0,_=0):(N=R>>>24,_+=2)}if(P>=0)for(v[P--]=N;P>=0;)v[P--]=0},Math.clz32?s.prototype._countBits=function(v){return 32-Math.clz32(v)}:s.prototype._countBits=function(v){var C=v,P=0;return C>=4096&&(P+=13,C>>>=13),C>=64&&(P+=7,C>>>=7),C>=8&&(P+=4,C>>>=4),C>=2&&(P+=2,C>>>=2),P+C},s.prototype._zeroBits=function(v){if(v===0)return 26;var C=v,P=0;return C&8191||(P+=13,C>>>=13),C&127||(P+=7,C>>>=7),C&15||(P+=4,C>>>=4),C&3||(P+=2,C>>>=2),C&1||P++,P},s.prototype.bitLength=function(){var v=this.words[this.length-1],C=this._countBits(v);return(this.length-1)*26+C};function k(D){for(var v=new Array(D.bitLength()),C=0;C>>N&1}return v}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var v=0,C=0;Cv.length?this.clone().ior(v):v.clone().ior(this)},s.prototype.uor=function(v){return this.length>v.length?this.clone().iuor(v):v.clone().iuor(this)},s.prototype.iuand=function(v){var C;this.length>v.length?C=v:C=this;for(var P=0;Pv.length?this.clone().iand(v):v.clone().iand(this)},s.prototype.uand=function(v){return this.length>v.length?this.clone().iuand(v):v.clone().iuand(this)},s.prototype.iuxor=function(v){var C,P;this.length>v.length?(C=this,P=v):(C=v,P=this);for(var N=0;Nv.length?this.clone().ixor(v):v.clone().ixor(this)},s.prototype.uxor=function(v){return this.length>v.length?this.clone().iuxor(v):v.clone().iuxor(this)},s.prototype.inotn=function(v){n(typeof v=="number"&&v>=0);var C=Math.ceil(v/26)|0,P=v%26;this._expand(C),P>0&&C--;for(var N=0;N0&&(this.words[N]=~this.words[N]&67108863>>26-P),this._strip()},s.prototype.notn=function(v){return this.clone().inotn(v)},s.prototype.setn=function(v,C){n(typeof v=="number"&&v>=0);var P=v/26|0,N=v%26;return this._expand(P+1),C?this.words[P]=this.words[P]|1<v.length?(P=this,N=v):(P=v,N=this);for(var b=0,_=0;_>>26;for(;b!==0&&_>>26;if(this.length=P.length,b!==0)this.words[this.length]=b,this.length++;else if(P!==this)for(;_v.length?this.clone().iadd(v):v.clone().iadd(this)},s.prototype.isub=function(v){if(v.negative!==0){v.negative=0;var C=this.iadd(v);return v.negative=1,C._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(v),this.negative=1,this._normSign();var P=this.cmp(v);if(P===0)return this.negative=0,this.length=1,this.words[0]=0,this;var N,b;P>0?(N=this,b=v):(N=v,b=this);for(var _=0,R=0;R>26,this.words[R]=C&67108863;for(;_!==0&&R>26,this.words[R]=C&67108863;if(_===0&&R>>26,O=g&67108863,x=Math.min(d,v.length-1),$=Math.max(0,d-D.length+1);$<=x;$++){var L=d-$|0;N=D.words[L]|0,b=v.words[$]|0,_=N*b+O,T+=_/67108864|0,O=_&67108863}C.words[d]=O|0,g=T|0}return g!==0?C.words[d]=g|0:C.length--,C._strip()}var E=function(v,C,P){var N=v.words,b=C.words,_=P.words,R=0,g,d,T,O=N[0]|0,x=O&8191,$=O>>>13,L=N[1]|0,z=L&8191,G=L>>>13,F=N[2]|0,V=F&8191,W=F>>>13,oe=N[3]|0,re=oe&8191,ae=oe>>>13,De=N[4]|0,Ee=De&8191,Ce=De>>>13,Pt=N[5]|0,We=Pt&8191,Le=Pt>>>13,mo=N[6]|0,Qe=mo&8191,Xe=mo>>>13,xo=N[7]|0,Ze=xo&8191,et=xo>>>13,bo=N[8]|0,tt=bo&8191,rt=bo>>>13,wo=N[9]|0,nt=wo&8191,it=wo>>>13,Co=b[0]|0,st=Co&8191,ot=Co>>>13,Eo=b[1]|0,at=Eo&8191,lt=Eo>>>13,So=b[2]|0,ct=So&8191,ft=So>>>13,ko=b[3]|0,ut=ko&8191,dt=ko>>>13,Ao=b[4]|0,ht=Ao&8191,vt=Ao>>>13,_o=b[5]|0,yt=_o&8191,pt=_o>>>13,To=b[6]|0,gt=To&8191,mt=To>>>13,Po=b[7]|0,xt=Po&8191,bt=Po>>>13,Io=b[8]|0,wt=Io&8191,Ct=Io>>>13,Ro=b[9]|0,Et=Ro&8191,St=Ro>>>13;P.negative=v.negative^C.negative,P.length=19,g=Math.imul(x,st),d=Math.imul(x,ot),d=d+Math.imul($,st)|0,T=Math.imul($,ot);var vs=(R+g|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(vs>>>26)|0,vs&=67108863,g=Math.imul(z,st),d=Math.imul(z,ot),d=d+Math.imul(G,st)|0,T=Math.imul(G,ot),g=g+Math.imul(x,at)|0,d=d+Math.imul(x,lt)|0,d=d+Math.imul($,at)|0,T=T+Math.imul($,lt)|0;var ys=(R+g|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(ys>>>26)|0,ys&=67108863,g=Math.imul(V,st),d=Math.imul(V,ot),d=d+Math.imul(W,st)|0,T=Math.imul(W,ot),g=g+Math.imul(z,at)|0,d=d+Math.imul(z,lt)|0,d=d+Math.imul(G,at)|0,T=T+Math.imul(G,lt)|0,g=g+Math.imul(x,ct)|0,d=d+Math.imul(x,ft)|0,d=d+Math.imul($,ct)|0,T=T+Math.imul($,ft)|0;var ps=(R+g|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(ps>>>26)|0,ps&=67108863,g=Math.imul(re,st),d=Math.imul(re,ot),d=d+Math.imul(ae,st)|0,T=Math.imul(ae,ot),g=g+Math.imul(V,at)|0,d=d+Math.imul(V,lt)|0,d=d+Math.imul(W,at)|0,T=T+Math.imul(W,lt)|0,g=g+Math.imul(z,ct)|0,d=d+Math.imul(z,ft)|0,d=d+Math.imul(G,ct)|0,T=T+Math.imul(G,ft)|0,g=g+Math.imul(x,ut)|0,d=d+Math.imul(x,dt)|0,d=d+Math.imul($,ut)|0,T=T+Math.imul($,dt)|0;var gs=(R+g|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(gs>>>26)|0,gs&=67108863,g=Math.imul(Ee,st),d=Math.imul(Ee,ot),d=d+Math.imul(Ce,st)|0,T=Math.imul(Ce,ot),g=g+Math.imul(re,at)|0,d=d+Math.imul(re,lt)|0,d=d+Math.imul(ae,at)|0,T=T+Math.imul(ae,lt)|0,g=g+Math.imul(V,ct)|0,d=d+Math.imul(V,ft)|0,d=d+Math.imul(W,ct)|0,T=T+Math.imul(W,ft)|0,g=g+Math.imul(z,ut)|0,d=d+Math.imul(z,dt)|0,d=d+Math.imul(G,ut)|0,T=T+Math.imul(G,dt)|0,g=g+Math.imul(x,ht)|0,d=d+Math.imul(x,vt)|0,d=d+Math.imul($,ht)|0,T=T+Math.imul($,vt)|0;var ms=(R+g|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(ms>>>26)|0,ms&=67108863,g=Math.imul(We,st),d=Math.imul(We,ot),d=d+Math.imul(Le,st)|0,T=Math.imul(Le,ot),g=g+Math.imul(Ee,at)|0,d=d+Math.imul(Ee,lt)|0,d=d+Math.imul(Ce,at)|0,T=T+Math.imul(Ce,lt)|0,g=g+Math.imul(re,ct)|0,d=d+Math.imul(re,ft)|0,d=d+Math.imul(ae,ct)|0,T=T+Math.imul(ae,ft)|0,g=g+Math.imul(V,ut)|0,d=d+Math.imul(V,dt)|0,d=d+Math.imul(W,ut)|0,T=T+Math.imul(W,dt)|0,g=g+Math.imul(z,ht)|0,d=d+Math.imul(z,vt)|0,d=d+Math.imul(G,ht)|0,T=T+Math.imul(G,vt)|0,g=g+Math.imul(x,yt)|0,d=d+Math.imul(x,pt)|0,d=d+Math.imul($,yt)|0,T=T+Math.imul($,pt)|0;var i1=(R+g|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(i1>>>26)|0,i1&=67108863,g=Math.imul(Qe,st),d=Math.imul(Qe,ot),d=d+Math.imul(Xe,st)|0,T=Math.imul(Xe,ot),g=g+Math.imul(We,at)|0,d=d+Math.imul(We,lt)|0,d=d+Math.imul(Le,at)|0,T=T+Math.imul(Le,lt)|0,g=g+Math.imul(Ee,ct)|0,d=d+Math.imul(Ee,ft)|0,d=d+Math.imul(Ce,ct)|0,T=T+Math.imul(Ce,ft)|0,g=g+Math.imul(re,ut)|0,d=d+Math.imul(re,dt)|0,d=d+Math.imul(ae,ut)|0,T=T+Math.imul(ae,dt)|0,g=g+Math.imul(V,ht)|0,d=d+Math.imul(V,vt)|0,d=d+Math.imul(W,ht)|0,T=T+Math.imul(W,vt)|0,g=g+Math.imul(z,yt)|0,d=d+Math.imul(z,pt)|0,d=d+Math.imul(G,yt)|0,T=T+Math.imul(G,pt)|0,g=g+Math.imul(x,gt)|0,d=d+Math.imul(x,mt)|0,d=d+Math.imul($,gt)|0,T=T+Math.imul($,mt)|0;var s1=(R+g|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(s1>>>26)|0,s1&=67108863,g=Math.imul(Ze,st),d=Math.imul(Ze,ot),d=d+Math.imul(et,st)|0,T=Math.imul(et,ot),g=g+Math.imul(Qe,at)|0,d=d+Math.imul(Qe,lt)|0,d=d+Math.imul(Xe,at)|0,T=T+Math.imul(Xe,lt)|0,g=g+Math.imul(We,ct)|0,d=d+Math.imul(We,ft)|0,d=d+Math.imul(Le,ct)|0,T=T+Math.imul(Le,ft)|0,g=g+Math.imul(Ee,ut)|0,d=d+Math.imul(Ee,dt)|0,d=d+Math.imul(Ce,ut)|0,T=T+Math.imul(Ce,dt)|0,g=g+Math.imul(re,ht)|0,d=d+Math.imul(re,vt)|0,d=d+Math.imul(ae,ht)|0,T=T+Math.imul(ae,vt)|0,g=g+Math.imul(V,yt)|0,d=d+Math.imul(V,pt)|0,d=d+Math.imul(W,yt)|0,T=T+Math.imul(W,pt)|0,g=g+Math.imul(z,gt)|0,d=d+Math.imul(z,mt)|0,d=d+Math.imul(G,gt)|0,T=T+Math.imul(G,mt)|0,g=g+Math.imul(x,xt)|0,d=d+Math.imul(x,bt)|0,d=d+Math.imul($,xt)|0,T=T+Math.imul($,bt)|0;var o1=(R+g|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(o1>>>26)|0,o1&=67108863,g=Math.imul(tt,st),d=Math.imul(tt,ot),d=d+Math.imul(rt,st)|0,T=Math.imul(rt,ot),g=g+Math.imul(Ze,at)|0,d=d+Math.imul(Ze,lt)|0,d=d+Math.imul(et,at)|0,T=T+Math.imul(et,lt)|0,g=g+Math.imul(Qe,ct)|0,d=d+Math.imul(Qe,ft)|0,d=d+Math.imul(Xe,ct)|0,T=T+Math.imul(Xe,ft)|0,g=g+Math.imul(We,ut)|0,d=d+Math.imul(We,dt)|0,d=d+Math.imul(Le,ut)|0,T=T+Math.imul(Le,dt)|0,g=g+Math.imul(Ee,ht)|0,d=d+Math.imul(Ee,vt)|0,d=d+Math.imul(Ce,ht)|0,T=T+Math.imul(Ce,vt)|0,g=g+Math.imul(re,yt)|0,d=d+Math.imul(re,pt)|0,d=d+Math.imul(ae,yt)|0,T=T+Math.imul(ae,pt)|0,g=g+Math.imul(V,gt)|0,d=d+Math.imul(V,mt)|0,d=d+Math.imul(W,gt)|0,T=T+Math.imul(W,mt)|0,g=g+Math.imul(z,xt)|0,d=d+Math.imul(z,bt)|0,d=d+Math.imul(G,xt)|0,T=T+Math.imul(G,bt)|0,g=g+Math.imul(x,wt)|0,d=d+Math.imul(x,Ct)|0,d=d+Math.imul($,wt)|0,T=T+Math.imul($,Ct)|0;var a1=(R+g|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(a1>>>26)|0,a1&=67108863,g=Math.imul(nt,st),d=Math.imul(nt,ot),d=d+Math.imul(it,st)|0,T=Math.imul(it,ot),g=g+Math.imul(tt,at)|0,d=d+Math.imul(tt,lt)|0,d=d+Math.imul(rt,at)|0,T=T+Math.imul(rt,lt)|0,g=g+Math.imul(Ze,ct)|0,d=d+Math.imul(Ze,ft)|0,d=d+Math.imul(et,ct)|0,T=T+Math.imul(et,ft)|0,g=g+Math.imul(Qe,ut)|0,d=d+Math.imul(Qe,dt)|0,d=d+Math.imul(Xe,ut)|0,T=T+Math.imul(Xe,dt)|0,g=g+Math.imul(We,ht)|0,d=d+Math.imul(We,vt)|0,d=d+Math.imul(Le,ht)|0,T=T+Math.imul(Le,vt)|0,g=g+Math.imul(Ee,yt)|0,d=d+Math.imul(Ee,pt)|0,d=d+Math.imul(Ce,yt)|0,T=T+Math.imul(Ce,pt)|0,g=g+Math.imul(re,gt)|0,d=d+Math.imul(re,mt)|0,d=d+Math.imul(ae,gt)|0,T=T+Math.imul(ae,mt)|0,g=g+Math.imul(V,xt)|0,d=d+Math.imul(V,bt)|0,d=d+Math.imul(W,xt)|0,T=T+Math.imul(W,bt)|0,g=g+Math.imul(z,wt)|0,d=d+Math.imul(z,Ct)|0,d=d+Math.imul(G,wt)|0,T=T+Math.imul(G,Ct)|0,g=g+Math.imul(x,Et)|0,d=d+Math.imul(x,St)|0,d=d+Math.imul($,Et)|0,T=T+Math.imul($,St)|0;var l1=(R+g|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(l1>>>26)|0,l1&=67108863,g=Math.imul(nt,at),d=Math.imul(nt,lt),d=d+Math.imul(it,at)|0,T=Math.imul(it,lt),g=g+Math.imul(tt,ct)|0,d=d+Math.imul(tt,ft)|0,d=d+Math.imul(rt,ct)|0,T=T+Math.imul(rt,ft)|0,g=g+Math.imul(Ze,ut)|0,d=d+Math.imul(Ze,dt)|0,d=d+Math.imul(et,ut)|0,T=T+Math.imul(et,dt)|0,g=g+Math.imul(Qe,ht)|0,d=d+Math.imul(Qe,vt)|0,d=d+Math.imul(Xe,ht)|0,T=T+Math.imul(Xe,vt)|0,g=g+Math.imul(We,yt)|0,d=d+Math.imul(We,pt)|0,d=d+Math.imul(Le,yt)|0,T=T+Math.imul(Le,pt)|0,g=g+Math.imul(Ee,gt)|0,d=d+Math.imul(Ee,mt)|0,d=d+Math.imul(Ce,gt)|0,T=T+Math.imul(Ce,mt)|0,g=g+Math.imul(re,xt)|0,d=d+Math.imul(re,bt)|0,d=d+Math.imul(ae,xt)|0,T=T+Math.imul(ae,bt)|0,g=g+Math.imul(V,wt)|0,d=d+Math.imul(V,Ct)|0,d=d+Math.imul(W,wt)|0,T=T+Math.imul(W,Ct)|0,g=g+Math.imul(z,Et)|0,d=d+Math.imul(z,St)|0,d=d+Math.imul(G,Et)|0,T=T+Math.imul(G,St)|0;var c1=(R+g|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(c1>>>26)|0,c1&=67108863,g=Math.imul(nt,ct),d=Math.imul(nt,ft),d=d+Math.imul(it,ct)|0,T=Math.imul(it,ft),g=g+Math.imul(tt,ut)|0,d=d+Math.imul(tt,dt)|0,d=d+Math.imul(rt,ut)|0,T=T+Math.imul(rt,dt)|0,g=g+Math.imul(Ze,ht)|0,d=d+Math.imul(Ze,vt)|0,d=d+Math.imul(et,ht)|0,T=T+Math.imul(et,vt)|0,g=g+Math.imul(Qe,yt)|0,d=d+Math.imul(Qe,pt)|0,d=d+Math.imul(Xe,yt)|0,T=T+Math.imul(Xe,pt)|0,g=g+Math.imul(We,gt)|0,d=d+Math.imul(We,mt)|0,d=d+Math.imul(Le,gt)|0,T=T+Math.imul(Le,mt)|0,g=g+Math.imul(Ee,xt)|0,d=d+Math.imul(Ee,bt)|0,d=d+Math.imul(Ce,xt)|0,T=T+Math.imul(Ce,bt)|0,g=g+Math.imul(re,wt)|0,d=d+Math.imul(re,Ct)|0,d=d+Math.imul(ae,wt)|0,T=T+Math.imul(ae,Ct)|0,g=g+Math.imul(V,Et)|0,d=d+Math.imul(V,St)|0,d=d+Math.imul(W,Et)|0,T=T+Math.imul(W,St)|0;var f1=(R+g|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(f1>>>26)|0,f1&=67108863,g=Math.imul(nt,ut),d=Math.imul(nt,dt),d=d+Math.imul(it,ut)|0,T=Math.imul(it,dt),g=g+Math.imul(tt,ht)|0,d=d+Math.imul(tt,vt)|0,d=d+Math.imul(rt,ht)|0,T=T+Math.imul(rt,vt)|0,g=g+Math.imul(Ze,yt)|0,d=d+Math.imul(Ze,pt)|0,d=d+Math.imul(et,yt)|0,T=T+Math.imul(et,pt)|0,g=g+Math.imul(Qe,gt)|0,d=d+Math.imul(Qe,mt)|0,d=d+Math.imul(Xe,gt)|0,T=T+Math.imul(Xe,mt)|0,g=g+Math.imul(We,xt)|0,d=d+Math.imul(We,bt)|0,d=d+Math.imul(Le,xt)|0,T=T+Math.imul(Le,bt)|0,g=g+Math.imul(Ee,wt)|0,d=d+Math.imul(Ee,Ct)|0,d=d+Math.imul(Ce,wt)|0,T=T+Math.imul(Ce,Ct)|0,g=g+Math.imul(re,Et)|0,d=d+Math.imul(re,St)|0,d=d+Math.imul(ae,Et)|0,T=T+Math.imul(ae,St)|0;var u1=(R+g|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(u1>>>26)|0,u1&=67108863,g=Math.imul(nt,ht),d=Math.imul(nt,vt),d=d+Math.imul(it,ht)|0,T=Math.imul(it,vt),g=g+Math.imul(tt,yt)|0,d=d+Math.imul(tt,pt)|0,d=d+Math.imul(rt,yt)|0,T=T+Math.imul(rt,pt)|0,g=g+Math.imul(Ze,gt)|0,d=d+Math.imul(Ze,mt)|0,d=d+Math.imul(et,gt)|0,T=T+Math.imul(et,mt)|0,g=g+Math.imul(Qe,xt)|0,d=d+Math.imul(Qe,bt)|0,d=d+Math.imul(Xe,xt)|0,T=T+Math.imul(Xe,bt)|0,g=g+Math.imul(We,wt)|0,d=d+Math.imul(We,Ct)|0,d=d+Math.imul(Le,wt)|0,T=T+Math.imul(Le,Ct)|0,g=g+Math.imul(Ee,Et)|0,d=d+Math.imul(Ee,St)|0,d=d+Math.imul(Ce,Et)|0,T=T+Math.imul(Ce,St)|0;var d1=(R+g|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(d1>>>26)|0,d1&=67108863,g=Math.imul(nt,yt),d=Math.imul(nt,pt),d=d+Math.imul(it,yt)|0,T=Math.imul(it,pt),g=g+Math.imul(tt,gt)|0,d=d+Math.imul(tt,mt)|0,d=d+Math.imul(rt,gt)|0,T=T+Math.imul(rt,mt)|0,g=g+Math.imul(Ze,xt)|0,d=d+Math.imul(Ze,bt)|0,d=d+Math.imul(et,xt)|0,T=T+Math.imul(et,bt)|0,g=g+Math.imul(Qe,wt)|0,d=d+Math.imul(Qe,Ct)|0,d=d+Math.imul(Xe,wt)|0,T=T+Math.imul(Xe,Ct)|0,g=g+Math.imul(We,Et)|0,d=d+Math.imul(We,St)|0,d=d+Math.imul(Le,Et)|0,T=T+Math.imul(Le,St)|0;var h1=(R+g|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(h1>>>26)|0,h1&=67108863,g=Math.imul(nt,gt),d=Math.imul(nt,mt),d=d+Math.imul(it,gt)|0,T=Math.imul(it,mt),g=g+Math.imul(tt,xt)|0,d=d+Math.imul(tt,bt)|0,d=d+Math.imul(rt,xt)|0,T=T+Math.imul(rt,bt)|0,g=g+Math.imul(Ze,wt)|0,d=d+Math.imul(Ze,Ct)|0,d=d+Math.imul(et,wt)|0,T=T+Math.imul(et,Ct)|0,g=g+Math.imul(Qe,Et)|0,d=d+Math.imul(Qe,St)|0,d=d+Math.imul(Xe,Et)|0,T=T+Math.imul(Xe,St)|0;var v1=(R+g|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(v1>>>26)|0,v1&=67108863,g=Math.imul(nt,xt),d=Math.imul(nt,bt),d=d+Math.imul(it,xt)|0,T=Math.imul(it,bt),g=g+Math.imul(tt,wt)|0,d=d+Math.imul(tt,Ct)|0,d=d+Math.imul(rt,wt)|0,T=T+Math.imul(rt,Ct)|0,g=g+Math.imul(Ze,Et)|0,d=d+Math.imul(Ze,St)|0,d=d+Math.imul(et,Et)|0,T=T+Math.imul(et,St)|0;var y1=(R+g|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(y1>>>26)|0,y1&=67108863,g=Math.imul(nt,wt),d=Math.imul(nt,Ct),d=d+Math.imul(it,wt)|0,T=Math.imul(it,Ct),g=g+Math.imul(tt,Et)|0,d=d+Math.imul(tt,St)|0,d=d+Math.imul(rt,Et)|0,T=T+Math.imul(rt,St)|0;var p1=(R+g|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(p1>>>26)|0,p1&=67108863,g=Math.imul(nt,Et),d=Math.imul(nt,St),d=d+Math.imul(it,Et)|0,T=Math.imul(it,St);var g1=(R+g|0)+((d&8191)<<13)|0;return R=(T+(d>>>13)|0)+(g1>>>26)|0,g1&=67108863,_[0]=vs,_[1]=ys,_[2]=ps,_[3]=gs,_[4]=ms,_[5]=i1,_[6]=s1,_[7]=o1,_[8]=a1,_[9]=l1,_[10]=c1,_[11]=f1,_[12]=u1,_[13]=d1,_[14]=h1,_[15]=v1,_[16]=y1,_[17]=p1,_[18]=g1,R!==0&&(_[19]=R,P.length++),P};Math.imul||(E=w);function A(D,v,C){C.negative=v.negative^D.negative,C.length=D.length+v.length;for(var P=0,N=0,b=0;b>>26)|0,N+=_>>>26,_&=67108863}C.words[b]=R,P=_,_=N}return P!==0?C.words[b]=P:C.length--,C._strip()}function I(D,v,C){return A(D,v,C)}s.prototype.mulTo=function(v,C){var P,N=this.length+v.length;return this.length===10&&v.length===10?P=E(this,v,C):N<63?P=w(this,v,C):N<1024?P=A(this,v,C):P=I(this,v,C),P},s.prototype.mul=function(v){var C=new s(null);return C.words=new Array(this.length+v.length),this.mulTo(v,C)},s.prototype.mulf=function(v){var C=new s(null);return C.words=new Array(this.length+v.length),I(this,v,C)},s.prototype.imul=function(v){return this.clone().mulTo(v,this)},s.prototype.imuln=function(v){var C=v<0;C&&(v=-v),n(typeof v=="number"),n(v<67108864);for(var P=0,N=0;N>=26,P+=b/67108864|0,P+=_>>>26,this.words[N]=_&67108863}return P!==0&&(this.words[N]=P,this.length++),C?this.ineg():this},s.prototype.muln=function(v){return this.clone().imuln(v)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(v){var C=k(v);if(C.length===0)return new s(1);for(var P=this,N=0;N=0);var C=v%26,P=(v-C)/26,N=67108863>>>26-C<<26-C,b;if(C!==0){var _=0;for(b=0;b>>26-C}_&&(this.words[b]=_,this.length++)}if(P!==0){for(b=this.length-1;b>=0;b--)this.words[b+P]=this.words[b];for(b=0;b=0);var N;C?N=(C-C%26)/26:N=0;var b=v%26,_=Math.min((v-b)/26,this.length),R=67108863^67108863>>>b<_)for(this.length-=_,d=0;d=0&&(T!==0||d>=N);d--){var O=this.words[d]|0;this.words[d]=T<<26-b|O>>>b,T=O&R}return g&&T!==0&&(g.words[g.length++]=T),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(v,C,P){return n(this.negative===0),this.iushrn(v,C,P)},s.prototype.shln=function(v){return this.clone().ishln(v)},s.prototype.ushln=function(v){return this.clone().iushln(v)},s.prototype.shrn=function(v){return this.clone().ishrn(v)},s.prototype.ushrn=function(v){return this.clone().iushrn(v)},s.prototype.testn=function(v){n(typeof v=="number"&&v>=0);var C=v%26,P=(v-C)/26,N=1<=0);var C=v%26,P=(v-C)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=P)return this;if(C!==0&&P++,this.length=Math.min(P,this.length),C!==0){var N=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},s.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 C=0;C>26)-(g/67108864|0),this.words[b+P]=_&67108863}for(;b>26,this.words[b+P]=_&67108863;if(R===0)return this._strip();for(n(R===-1),R=0,b=0;b>26,this.words[b]=_&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(v,C){var P=this.length-v.length,N=this.clone(),b=v,_=b.words[b.length-1]|0,R=this._countBits(_);P=26-R,P!==0&&(b=b.ushln(P),N.iushln(P),_=b.words[b.length-1]|0);var g=N.length-b.length,d;if(C!=="mod"){d=new s(null),d.length=g+1,d.words=new Array(d.length);for(var T=0;T=0;x--){var $=(N.words[b.length+x]|0)*67108864+(N.words[b.length+x-1]|0);for($=Math.min($/_|0,67108863),N._ishlnsubmul(b,$,x);N.negative!==0;)$--,N.negative=0,N._ishlnsubmul(b,1,x),N.isZero()||(N.negative^=1);d&&(d.words[x]=$)}return d&&d._strip(),N._strip(),C!=="div"&&P!==0&&N.iushrn(P),{div:d||null,mod:N}},s.prototype.divmod=function(v,C,P){if(n(!v.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var N,b,_;return this.negative!==0&&v.negative===0?(_=this.neg().divmod(v,C),C!=="mod"&&(N=_.div.neg()),C!=="div"&&(b=_.mod.neg(),P&&b.negative!==0&&b.iadd(v)),{div:N,mod:b}):this.negative===0&&v.negative!==0?(_=this.divmod(v.neg(),C),C!=="mod"&&(N=_.div.neg()),{div:N,mod:_.mod}):this.negative&v.negative?(_=this.neg().divmod(v.neg(),C),C!=="div"&&(b=_.mod.neg(),P&&b.negative!==0&&b.isub(v)),{div:_.div,mod:b}):v.length>this.length||this.cmp(v)<0?{div:new s(0),mod:this}:v.length===1?C==="div"?{div:this.divn(v.words[0]),mod:null}:C==="mod"?{div:null,mod:new s(this.modrn(v.words[0]))}:{div:this.divn(v.words[0]),mod:new s(this.modrn(v.words[0]))}:this._wordDiv(v,C)},s.prototype.div=function(v){return this.divmod(v,"div",!1).div},s.prototype.mod=function(v){return this.divmod(v,"mod",!1).mod},s.prototype.umod=function(v){return this.divmod(v,"mod",!0).mod},s.prototype.divRound=function(v){var C=this.divmod(v);if(C.mod.isZero())return C.div;var P=C.div.negative!==0?C.mod.isub(v):C.mod,N=v.ushrn(1),b=v.andln(1),_=P.cmp(N);return _<0||b===1&&_===0?C.div:C.div.negative!==0?C.div.isubn(1):C.div.iaddn(1)},s.prototype.modrn=function(v){var C=v<0;C&&(v=-v),n(v<=67108863);for(var P=(1<<26)%v,N=0,b=this.length-1;b>=0;b--)N=(P*N+(this.words[b]|0))%v;return C?-N:N},s.prototype.modn=function(v){return this.modrn(v)},s.prototype.idivn=function(v){var C=v<0;C&&(v=-v),n(v<=67108863);for(var P=0,N=this.length-1;N>=0;N--){var b=(this.words[N]|0)+P*67108864;this.words[N]=b/v|0,P=b%v}return this._strip(),C?this.ineg():this},s.prototype.divn=function(v){return this.clone().idivn(v)},s.prototype.egcd=function(v){n(v.negative===0),n(!v.isZero());var C=this,P=v.clone();C.negative!==0?C=C.umod(v):C=C.clone();for(var N=new s(1),b=new s(0),_=new s(0),R=new s(1),g=0;C.isEven()&&P.isEven();)C.iushrn(1),P.iushrn(1),++g;for(var d=P.clone(),T=C.clone();!C.isZero();){for(var O=0,x=1;!(C.words[0]&x)&&O<26;++O,x<<=1);if(O>0)for(C.iushrn(O);O-- >0;)(N.isOdd()||b.isOdd())&&(N.iadd(d),b.isub(T)),N.iushrn(1),b.iushrn(1);for(var $=0,L=1;!(P.words[0]&L)&&$<26;++$,L<<=1);if($>0)for(P.iushrn($);$-- >0;)(_.isOdd()||R.isOdd())&&(_.iadd(d),R.isub(T)),_.iushrn(1),R.iushrn(1);C.cmp(P)>=0?(C.isub(P),N.isub(_),b.isub(R)):(P.isub(C),_.isub(N),R.isub(b))}return{a:_,b:R,gcd:P.iushln(g)}},s.prototype._invmp=function(v){n(v.negative===0),n(!v.isZero());var C=this,P=v.clone();C.negative!==0?C=C.umod(v):C=C.clone();for(var N=new s(1),b=new s(0),_=P.clone();C.cmpn(1)>0&&P.cmpn(1)>0;){for(var R=0,g=1;!(C.words[0]&g)&&R<26;++R,g<<=1);if(R>0)for(C.iushrn(R);R-- >0;)N.isOdd()&&N.iadd(_),N.iushrn(1);for(var d=0,T=1;!(P.words[0]&T)&&d<26;++d,T<<=1);if(d>0)for(P.iushrn(d);d-- >0;)b.isOdd()&&b.iadd(_),b.iushrn(1);C.cmp(P)>=0?(C.isub(P),N.isub(b)):(P.isub(C),b.isub(N))}var O;return C.cmpn(1)===0?O=N:O=b,O.cmpn(0)<0&&O.iadd(v),O},s.prototype.gcd=function(v){if(this.isZero())return v.abs();if(v.isZero())return this.abs();var C=this.clone(),P=v.clone();C.negative=0,P.negative=0;for(var N=0;C.isEven()&&P.isEven();N++)C.iushrn(1),P.iushrn(1);do{for(;C.isEven();)C.iushrn(1);for(;P.isEven();)P.iushrn(1);var b=C.cmp(P);if(b<0){var _=C;C=P,P=_}else if(b===0||P.cmpn(1)===0)break;C.isub(P)}while(!0);return P.iushln(N)},s.prototype.invm=function(v){return this.egcd(v).a.umod(v)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(v){return this.words[0]&v},s.prototype.bincn=function(v){n(typeof v=="number");var C=v%26,P=(v-C)/26,N=1<>>26,R&=67108863,this.words[_]=R}return b!==0&&(this.words[_]=b,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(v){var C=v<0;if(this.negative!==0&&!C)return-1;if(this.negative===0&&C)return 1;this._strip();var P;if(this.length>1)P=1;else{C&&(v=-v),n(v<=67108863,"Number is too big");var N=this.words[0]|0;P=N===v?0:Nv.length)return 1;if(this.length=0;P--){var N=this.words[P]|0,b=v.words[P]|0;if(N!==b){Nb&&(C=1);break}}return C},s.prototype.gtn=function(v){return this.cmpn(v)===1},s.prototype.gt=function(v){return this.cmp(v)===1},s.prototype.gten=function(v){return this.cmpn(v)>=0},s.prototype.gte=function(v){return this.cmp(v)>=0},s.prototype.ltn=function(v){return this.cmpn(v)===-1},s.prototype.lt=function(v){return this.cmp(v)===-1},s.prototype.lten=function(v){return this.cmpn(v)<=0},s.prototype.lte=function(v){return this.cmp(v)<=0},s.prototype.eqn=function(v){return this.cmpn(v)===0},s.prototype.eq=function(v){return this.cmp(v)===0},s.red=function(v){return new Z(v)},s.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)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(v){return this.red=v,this},s.prototype.forceRed=function(v){return n(!this.red,"Already a number in reduction context"),this._forceRed(v)},s.prototype.redAdd=function(v){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,v)},s.prototype.redIAdd=function(v){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,v)},s.prototype.redSub=function(v){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,v)},s.prototype.redISub=function(v){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,v)},s.prototype.redShl=function(v){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,v)},s.prototype.redMul=function(v){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.mul(this,v)},s.prototype.redIMul=function(v){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.imul(this,v)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(v){return n(this.red&&!v.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,v)};var M={k256:null,p224:null,p192:null,p25519:null};function B(D,v){this.name=D,this.p=new s(v,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}B.prototype._tmp=function(){var v=new s(null);return v.words=new Array(Math.ceil(this.n/13)),v},B.prototype.ireduce=function(v){var C=v,P;do this.split(C,this.tmp),C=this.imulK(C),C=C.iadd(this.tmp),P=C.bitLength();while(P>this.n);var N=P0?C.isub(this.p):C.strip!==void 0?C.strip():C._strip(),C},B.prototype.split=function(v,C){v.iushrn(this.n,0,C)},B.prototype.imulK=function(v){return v.imul(this.k)};function U(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(U,B),U.prototype.split=function(v,C){for(var P=4194303,N=Math.min(v.length,9),b=0;b>>22,_=R}_>>>=22,v.words[b-10]=_,_===0&&v.length>10?v.length-=10:v.length-=9},U.prototype.imulK=function(v){v.words[v.length]=0,v.words[v.length+1]=0,v.length+=2;for(var C=0,P=0;P>>=26,v.words[P]=b,C=N}return C!==0&&(v.words[v.length++]=C),v},s._prime=function(v){if(M[v])return M[v];var C;if(v==="k256")C=new U;else if(v==="p224")C=new j;else if(v==="p192")C=new K;else if(v==="p25519")C=new J;else throw new Error("Unknown prime "+v);return M[v]=C,C};function Z(D){if(typeof D=="string"){var v=s._prime(D);this.m=v.p,this.prime=v}else n(D.gtn(1),"modulus must be greater than 1"),this.m=D,this.prime=null}Z.prototype._verify1=function(v){n(v.negative===0,"red works only with positives"),n(v.red,"red works only with red numbers")},Z.prototype._verify2=function(v,C){n((v.negative|C.negative)===0,"red works only with positives"),n(v.red&&v.red===C.red,"red works only with red numbers")},Z.prototype.imod=function(v){return this.prime?this.prime.ireduce(v)._forceRed(this):(f(v,v.umod(this.m)._forceRed(this)),v)},Z.prototype.neg=function(v){return v.isZero()?v.clone():this.m.sub(v)._forceRed(this)},Z.prototype.add=function(v,C){this._verify2(v,C);var P=v.add(C);return P.cmp(this.m)>=0&&P.isub(this.m),P._forceRed(this)},Z.prototype.iadd=function(v,C){this._verify2(v,C);var P=v.iadd(C);return P.cmp(this.m)>=0&&P.isub(this.m),P},Z.prototype.sub=function(v,C){this._verify2(v,C);var P=v.sub(C);return P.cmpn(0)<0&&P.iadd(this.m),P._forceRed(this)},Z.prototype.isub=function(v,C){this._verify2(v,C);var P=v.isub(C);return P.cmpn(0)<0&&P.iadd(this.m),P},Z.prototype.shl=function(v,C){return this._verify1(v),this.imod(v.ushln(C))},Z.prototype.imul=function(v,C){return this._verify2(v,C),this.imod(v.imul(C))},Z.prototype.mul=function(v,C){return this._verify2(v,C),this.imod(v.mul(C))},Z.prototype.isqr=function(v){return this.imul(v,v.clone())},Z.prototype.sqr=function(v){return this.mul(v,v)},Z.prototype.sqrt=function(v){if(v.isZero())return v.clone();var C=this.m.andln(3);if(n(C%2===1),C===3){var P=this.m.add(new s(1)).iushrn(2);return this.pow(v,P)}for(var N=this.m.subn(1),b=0;!N.isZero()&&N.andln(1)===0;)b++,N.iushrn(1);n(!N.isZero());var _=new s(1).toRed(this),R=_.redNeg(),g=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new s(2*d*d).toRed(this);this.pow(d,g).cmp(R)!==0;)d.redIAdd(R);for(var T=this.pow(d,N),O=this.pow(v,N.addn(1).iushrn(1)),x=this.pow(v,N),$=b;x.cmp(_)!==0;){for(var L=x,z=0;L.cmp(_)!==0;z++)L=L.redSqr();n(z<$);var G=this.pow(T,new s(1).iushln($-z-1));O=O.redMul(G),T=G.redSqr(),x=x.redMul(T),$=z}return O},Z.prototype.invm=function(v){var C=v._invmp(this.m);return C.negative!==0?(C.negative=0,this.imod(C).redNeg()):this.imod(C)},Z.prototype.pow=function(v,C){if(C.isZero())return new s(1).toRed(this);if(C.cmpn(1)===0)return v.clone();var P=4,N=new Array(1<=0;b--){for(var T=C.words[b],O=d-1;O>=0;O--){var x=T>>O&1;if(_!==N[0]&&(_=this.sqr(_)),x===0&&R===0){g=0;continue}R<<=1,R|=x,g++,!(g!==P&&(b!==0||O!==0))&&(_=this.mul(_,N[R]),g=0,R=0)}d=26}return _},Z.prototype.convertTo=function(v){var C=v.umod(this.m);return C===v?C.clone():C},Z.prototype.convertFrom=function(v){var C=v.clone();return C.red=null,C},s.mont=function(v){return new ie(v)};function ie(D){Z.call(this,D),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(ie,Z),ie.prototype.convertTo=function(v){return this.imod(v.ushln(this.shift))},ie.prototype.convertFrom=function(v){var C=this.imod(v.mul(this.rinv));return C.red=null,C},ie.prototype.imul=function(v,C){if(v.isZero()||C.isZero())return v.words[0]=0,v.length=1,v;var P=v.imul(C),N=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=P.isub(N).iushrn(this.shift),_=b;return b.cmp(this.m)>=0?_=b.isub(this.m):b.cmpn(0)<0&&(_=b.iadd(this.m)),_._forceRed(this)},ie.prototype.mul=function(v,C){if(v.isZero()||C.isZero())return new s(0)._forceRed(this);var P=v.mul(C),N=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=P.isub(N).iushrn(this.shift),_=b;return b.cmp(this.m)>=0?_=b.isub(this.m):b.cmpn(0)<0&&(_=b.iadd(this.m)),_._forceRed(this)},ie.prototype.invm=function(v){var C=this.imod(v._invmp(this.m).mul(this.r2));return C._forceRed(this)}})(t,a5)})(Om);var $B=Om.exports;const be=lo($B),DB="logger/5.7.0";let Lw=!1,Bw=!1;const wd={debug:1,default:2,info:2,warning:3,error:4,off:5};let Fw=wd.default,vv=null;function LB(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(t){return t.message}return null}const jw=LB();var ip;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(ip||(ip={}));var qn;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(qn||(qn={}));const zw="0123456789abcdef";let q=class rr{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();wd[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Fw>wd[n])&&console.log.apply(console,r)}debug(...e){this._log(rr.levels.DEBUG,e)}info(...e){this._log(rr.levels.INFO,e)}warn(...e){this._log(rr.levels.WARNING,e)}makeError(e,r,n){if(Bw)return this.makeError("censored error",r,{});r||(r=rr.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(l=>{const c=n[l];try{if(c instanceof Uint8Array){let f="";for(let u=0;u>4],f+=zw[c[u]&15];i.push(l+"=Uint8Array(0x"+f+")")}else i.push(l+"="+JSON.stringify(c))}catch{i.push(l+"="+JSON.stringify(n[l].toString()))}}),i.push(`code=${r}`),i.push(`version=${this.version}`);const s=e;let o="";switch(r){case qn.NUMERIC_FAULT:{o="NUMERIC_FAULT";const l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":o+="-"+l;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case qn.CALL_EXCEPTION:case qn.INSUFFICIENT_FUNDS:case qn.MISSING_NEW:case qn.NONCE_EXPIRED:case qn.REPLACEMENT_UNDERPRICED:case qn.TRANSACTION_REPLACED:case qn.UNPREDICTABLE_GAS_LIMIT:o=r;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const a=new Error(e);return a.reason=s,a.code=r,Object.keys(n).forEach(function(l){a[l]=n[l]}),a}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,rr.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,i){e||this.throwError(r,n,i)}assertArgument(e,r,n,i){e||this.throwArgumentError(r,n,i)}checkNormalize(e){jw&&this.throwError("platform missing String.prototype.normalize",rr.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:jw})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,rr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,rr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,rr.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",rr.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",rr.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",rr.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return vv||(vv=new rr(DB)),vv}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",rr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Lw){if(!e)return;this.globalLogger().throwError("error censorship permanent",rr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Bw=!!e,Lw=!!r}static setLogLevel(e){const r=wd[e.toLowerCase()];if(r==null){rr.globalLogger().warn("invalid log level - "+e);return}Fw=r}static from(e){return new rr(e)}};q.errors=qn;q.levels=ip;const BB="bytes/5.7.0",jt=new q(BB);function dE(t){return!!t.toHexString}function ml(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return ml(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function rs(t){return Pe(t)&&!(t.length%2)||ls(t)}function Uw(t){return typeof t=="number"&&t==t&&t%1===0}function ls(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!Uw(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function X(t,e){if(e||(e={}),typeof t=="number"){jt.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),ml(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),dE(t)&&(t=t.toHexString()),Pe(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":jt.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;iX(i)),r=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(r);return e.reduce((i,s)=>(n.set(s,i),i+s.length),0),ml(n)}function Ci(t){let e=X(t);if(e.length===0)return e;let r=0;for(;re&&jt.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),ml(r)}function Pe(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const yv="0123456789abcdef";function Q(t,e){if(e||(e={}),typeof t=="number"){jt.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=yv[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),dE(t))return t.toHexString();if(Pe(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":jt.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(ls(t)){let r="0x";for(let n=0;n>4]+yv[i&15]}return r}return jt.throwArgumentError("invalid hexlify value","value",t)}function _i(t){if(typeof t!="string")t=Q(t);else if(!Pe(t)||t.length%2)return null;return(t.length-2)/2}function Vt(t,e,r){return typeof t!="string"?t=Q(t):(!Pe(t)||t.length%2)&&jt.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function Ur(t){let e="0x";return t.forEach(r=>{e+=Q(r).substring(2)}),e}function ti(t){const e=hE(Q(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function hE(t){typeof t!="string"&&(t=Q(t)),Pe(t)||jt.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&jt.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function Ea(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(rs(t)){let r=X(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=Q(r.slice(0,32)),e.s=Q(r.slice(32,64))):r.length===65?(e.r=Q(r.slice(0,32)),e.s=Q(r.slice(32,64)),e.v=r[64]):jt.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:jt.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=Q(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){const i=Qc(X(e._vs),32);e._vs=Q(i);const s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&jt.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const o=Q(i);e.s==null?e.s=o:e.s!==o&&jt.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?jt.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&jt.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!Pe(e.r)?jt.throwArgumentError("signature missing or invalid r","signature",t):e.r=Ve(e.r,32),e.s==null||!Pe(e.s)?jt.throwArgumentError("signature missing or invalid s","signature",t):e.s=Ve(e.s,32);const r=X(e.s);r[0]>=128&&jt.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=Q(r);e._vs&&(Pe(e._vs)||jt.throwArgumentError("signature invalid _vs","signature",t),e._vs=Ve(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&jt.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function sp(t){return t=Ea(t),Q(Ue([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const vE="bignumber/5.7.0";var Bf=be.BN;const Li=new q(vE),pv={},Vw=9007199254740991;function FB(t){return t!=null&&(H.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Pe(t)||typeof t=="bigint"||ls(t))}let Hw=!1;class H{constructor(e,r){e!==pv&&Li.throwError("cannot call constructor directly; use BigNumber.from",q.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Jr(_e(this).fromTwos(e))}toTwos(e){return Jr(_e(this).toTwos(e))}abs(){return this._hex[0]==="-"?H.from(this._hex.substring(1)):this}add(e){return Jr(_e(this).add(_e(e)))}sub(e){return Jr(_e(this).sub(_e(e)))}div(e){return H.from(e).isZero()&&wn("division-by-zero","div"),Jr(_e(this).div(_e(e)))}mul(e){return Jr(_e(this).mul(_e(e)))}mod(e){const r=_e(e);return r.isNeg()&&wn("division-by-zero","mod"),Jr(_e(this).umod(r))}pow(e){const r=_e(e);return r.isNeg()&&wn("negative-power","pow"),Jr(_e(this).pow(r))}and(e){const r=_e(e);return(this.isNegative()||r.isNeg())&&wn("unbound-bitwise-result","and"),Jr(_e(this).and(r))}or(e){const r=_e(e);return(this.isNegative()||r.isNeg())&&wn("unbound-bitwise-result","or"),Jr(_e(this).or(r))}xor(e){const r=_e(e);return(this.isNegative()||r.isNeg())&&wn("unbound-bitwise-result","xor"),Jr(_e(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&wn("negative-width","mask"),Jr(_e(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&wn("negative-width","shl"),Jr(_e(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&wn("negative-width","shr"),Jr(_e(this).shrn(e))}eq(e){return _e(this).eq(_e(e))}lt(e){return _e(this).lt(_e(e))}lte(e){return _e(this).lte(_e(e))}gt(e){return _e(this).gt(_e(e))}gte(e){return _e(this).gte(_e(e))}isNegative(){return this._hex[0]==="-"}isZero(){return _e(this).isZero()}toNumber(){try{return _e(this).toNumber()}catch{wn("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Li.throwError("this platform does not support BigInt",q.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Hw||(Hw=!0,Li.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Li.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",q.errors.UNEXPECTED_ARGUMENT,{}):Li.throwError("BigNumber.toString does not accept parameters",q.errors.UNEXPECTED_ARGUMENT,{})),_e(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof H)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new H(pv,Ff(e)):e.match(/^-?[0-9]+$/)?new H(pv,Ff(new Bf(e))):Li.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&wn("underflow","BigNumber.from",e),(e>=Vw||e<=-Vw)&&wn("overflow","BigNumber.from",e),H.from(String(e));const r=e;if(typeof r=="bigint")return H.from(r.toString());if(ls(r))return H.from(Q(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return H.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(Pe(n)||n[0]==="-"&&Pe(n.substring(1))))return H.from(n)}return Li.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function Ff(t){if(typeof t!="string")return Ff(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Li.throwArgumentError("invalid hex","value",t),t=Ff(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function Jr(t){return H.from(Ff(t))}function _e(t){const e=H.from(t).toHexString();return e[0]==="-"?new Bf("-"+e.substring(3),16):new Bf(e.substring(2),16)}function wn(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),Li.throwError(t,q.errors.NUMERIC_FAULT,n)}function jB(t){return new Bf(t,36).toString(16)}function zB(t){return new Bf(t,16).toString(36)}const Vr=new q(vE),Xc={},yE=H.from(0),pE=H.from(-1);function gE(t,e,r,n){const i={fault:e,operation:r};return n!==void 0&&(i.value=n),Vr.throwError(t,q.errors.NUMERIC_FAULT,i)}let Zc="0";for(;Zc.length<256;)Zc+=Zc;function $m(t){if(typeof t!="number")try{t=H.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+Zc.substring(0,t):Vr.throwArgumentError("invalid decimal size","decimals",t)}function Cd(t,e){e==null&&(e=0);const r=$m(e);t=H.from(t);const n=t.lt(yE);n&&(t=t.mul(pE));let i=t.mod(r).toString();for(;i.length2&&Vr.throwArgumentError("too many decimal points","value",t);let s=i[0],o=i[1];for(s||(s="0"),o||(o="0");o[o.length-1]==="0";)o=o.substring(0,o.length-1);for(o.length>r.length-1&&gE("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?l:(typeof e[o]!==a&&Vr.throwArgumentError("invalid fixed format ("+o+" not "+a+")","format."+o,e[o]),e[o]);r=s("signed","boolean",r),n=s("width","number",n),i=s("decimals","number",i)}return n%8&&Vr.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&Vr.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new xl(Xc,r,n,i)}}class mr{constructor(e,r,n,i){e!==Xc&&Vr.throwError("cannot use FixedNumber constructor; use FixedNumber.from",q.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Vr.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=ai(this._value,this.format.decimals),n=ai(e._value,e.format.decimals);return mr.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=ai(this._value,this.format.decimals),n=ai(e._value,e.format.decimals);return mr.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=ai(this._value,this.format.decimals),n=ai(e._value,e.format.decimals);return mr.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=ai(this._value,this.format.decimals),n=ai(e._value,e.format.decimals);return mr.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=mr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(Ww.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=mr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(Ww.toFormat(r.format))),r}round(e){e==null&&(e=0);const r=this.toString().split(".");if(r.length===1&&r.push("0"),(e<0||e>80||e%1)&&Vr.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=mr.from("1"+Zc.substring(0,e),this.format),i=UB.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&Vr.throwArgumentError("invalid byte width","width",e);const r=H.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return Ve(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return mr.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!FB(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),mr.fromString(Cd(e,r),xl.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=xl.from(r),i=ai(e,n.decimals);!n.signed&&i.lt(yE)&&gE("unsigned value cannot be negative","overflow","value",e);let s=null;n.signed?s=i.toTwos(n.width).toHexString():(s=i.toHexString(),s=Ve(s,n.width/8));const o=Cd(i,n.decimals);return new mr(Xc,s,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=xl.from(r);if(X(e).length>n.width/8)throw new Error("overflow");let i=H.from(e);n.signed&&(i=i.fromTwos(n.width));const s=i.toTwos((n.signed?0:1)+n.width).toHexString(),o=Cd(i,n.decimals);return new mr(Xc,s,o,n)}static from(e,r){if(typeof e=="string")return mr.fromString(e,r);if(ls(e))return mr.fromBytes(e,r);try{return mr.fromValue(e,0,r)}catch(n){if(n.code!==q.errors.INVALID_ARGUMENT)throw n}return Vr.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const Ww=mr.from(1),UB=mr.from("0.5"),VB="properties/5.7.0";var HB=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const A0=new q(VB);function te(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function Qn(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function Ge(t){return HB(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const i=t[n];return Promise.resolve(i).then(s=>({key:n,value:s}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function Dm(t,e){(!t||typeof t!="object")&&A0.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||A0.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function er(t){const e={};for(const r in t)e[r]=t[r];return e}const WB={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function mE(t){if(t==null||WB[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let r=0;rTi(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&te(e,r,Ti(n))}return e}return A0.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function Ti(t){return qB(t)}class Sa{constructor(e){for(const r in e)this[r]=Ti(e[r])}}const au="abi/5.7.0",Me=new q(au),ua={};let qw={calldata:!0,memory:!0,storage:!0},GB={calldata:!0,memory:!0};function Ju(t,e){if(t==="bytes"||t==="string"){if(qw[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&GB[e])return!0;return(qw[e]||e==="payable")&&Me.throwArgumentError("invalid modifier","name",e),!1}function KB(t,e){let r=t;function n(a){Me.throwArgumentError(`unexpected character at position ${a}`,"param",t)}t=t.replace(/\s/g," ");function i(a){let l={type:"",name:"",parent:a,state:{allowType:!0}};return e&&(l.indexed=!1),l}let s={type:"",name:"",state:{allowType:!0}},o=s;for(let a=0;aJSON.parse(i.format(e)))),JSON.stringify(n)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==Ne.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===Ne.full?", ":",")+")"):r+=this.type,e!==Ne.sighash&&(this.indexed===!0&&(r+=" indexed"),e===Ne.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?ar.fromString(e,r):ar.fromObject(e)}static fromObject(e){return ar.isParamType(e)?e:new ar(ua,{name:e.name||null,type:Fa(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(ar.fromObject):null})}static fromString(e,r){function n(i){return ar.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(KB(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function jf(t,e){return QB(t).map(r=>ar.fromString(r,e))}class yi{constructor(e,r){e!==ua&&Me.throwError("use a static from method",q.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Ed(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return yi.isFragment(e)?e:typeof e=="string"?yi.fromString(e):yi.fromObject(e)}static fromObject(e){if(yi.isFragment(e))return e;switch(e.type){case"function":return Yn.fromObject(e);case"event":return vi.fromObject(e);case"constructor":return Jn.fromObject(e);case"error":return Ui.fromObject(e);case"fallback":case"receive":return null}return Me.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?vi.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Yn.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Jn.fromString(e.trim()):e.split(" ")[0]==="error"?Ui.fromString(e.substring(5).trim()):Me.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class vi extends yi{format(e){if(e||(e=Ne.sighash),Ne[e]||Me.throwArgumentError("invalid format type","format",e),e===Ne.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Ne.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Ne.full?", ":",")+") ",e!==Ne.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?vi.fromString(e):vi.fromObject(e)}static fromObject(e){if(vi.isEventFragment(e))return e;e.type!=="event"&&Me.throwArgumentError("invalid event object","value",e);const r={name:zf(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(ar.fromObject):[],type:"event"};return new vi(ua,r)}static fromString(e){let r=e.match(Uf);r||Me.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:Me.warn("unknown modifier: "+i)}}),vi.fromObject({name:r[1].trim(),anonymous:n,inputs:jf(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function xE(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&Me.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||Me.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=H.from(r[1]),r[0]):t}function bE(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+r)}})}function wE(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&Me.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&Me.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&Me.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Me.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&Me.throwArgumentError("unable to determine stateMutability","value",t),e}class Jn extends yi{format(e){if(e||(e=Ne.sighash),Ne[e]||Me.throwArgumentError("invalid format type","format",e),e===Ne.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===Ne.sighash&&Me.throwError("cannot format a constructor for sighash",q.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===Ne.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?Jn.fromString(e):Jn.fromObject(e)}static fromObject(e){if(Jn.isConstructorFragment(e))return e;e.type!=="constructor"&&Me.throwArgumentError("invalid constructor object","value",e);let r=wE(e);r.constant&&Me.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(ar.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?H.from(e.gas):null};return new Jn(ua,n)}static fromString(e){let r={type:"constructor"};e=xE(e,r);let n=e.match(Uf);return(!n||n[1].trim()!=="constructor")&&Me.throwArgumentError("invalid constructor string","value",e),r.inputs=jf(n[2].trim(),!1),bE(n[3].trim(),r),Jn.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class Yn extends Jn{format(e){if(e||(e=Ne.sighash),Ne[e]||Me.throwArgumentError("invalid format type","format",e),e===Ne.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Ne.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Ne.full?", ":",")+") ",e!==Ne.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?Yn.fromString(e):Yn.fromObject(e)}static fromObject(e){if(Yn.isFunctionFragment(e))return e;e.type!=="function"&&Me.throwArgumentError("invalid function object","value",e);let r=wE(e);const n={type:e.type,name:zf(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(ar.fromObject):[],outputs:e.outputs?e.outputs.map(ar.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?H.from(e.gas):null};return new Yn(ua,n)}static fromString(e){let r={type:"function"};e=xE(e,r);let n=e.split(" returns ");n.length>2&&Me.throwArgumentError("invalid function string","value",e);let i=n[0].match(Uf);if(i||Me.throwArgumentError("invalid function signature","value",e),r.name=i[1].trim(),r.name&&zf(r.name),r.inputs=jf(i[2],!1),bE(i[3].trim(),r),n.length>1){let s=n[1].match(Uf);(s[1].trim()!=""||s[3].trim()!="")&&Me.throwArgumentError("unexpected tokens","value",e),r.outputs=jf(s[2],!1)}else r.outputs=[];return Yn.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function Gw(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Me.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Ui extends yi{format(e){if(e||(e=Ne.sighash),Ne[e]||Me.throwArgumentError("invalid format type","format",e),e===Ne.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Ne.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Ne.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?Ui.fromString(e):Ui.fromObject(e)}static fromObject(e){if(Ui.isErrorFragment(e))return e;e.type!=="error"&&Me.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:zf(e.name),inputs:e.inputs?e.inputs.map(ar.fromObject):[]};return Gw(new Ui(ua,r))}static fromString(e){let r={type:"error"},n=e.match(Uf);return n||Me.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&zf(r.name),r.inputs=jf(n[2],!1),Gw(Ui.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function Fa(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const YB=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function zf(t){return(!t||!t.match(YB))&&Me.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const Uf=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function QB(t){t=t.trim();let e=[],r="",n=0;for(let i=0;ithis.wordSize&&Lm.throwError("value out-of-bounds",q.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=Ue([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r)}}}class _0{constructor(e,r,n,i){te(this,"_data",X(e)),te(this,"wordSize",r||32),te(this,"_coerceFunc",n),te(this,"allowLoose",i),this._offset=0}get data(){return Q(this._data)}get consumed(){return this._offset}static coerce(e,r){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):_0.coerce(e,r)}_peekBytes(e,r,n){let i=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?i=r:Lm.throwError("data out-of-bounds",q.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new _0(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let n=this._peekBytes(0,e,!!r);return this._offset+=n.length,n.slice(0,e)}readValue(){return H.from(this.readBytes(this.wordSize))}}var EE={exports:{}};/** * [js-sha3]{@link https://github.com/emn178/js-sha3} * * @version 0.8.0 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2015-2018 * @license MIT - */(function(t){(function(){var e="input is invalid type",r="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var s=!n&&typeof self=="object",o=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?i=d5:s&&(i=self);var a=!i.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,l=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",c="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],u=[4,1024,262144,67108864],h=[1,256,65536,16777216],y=[6,1536,393216,100663296],m=[0,8,16,24],p=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],S=[224,256,384,512],w=[128,256],A=["hex","buffer","arrayBuffer","array","digest"],k={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(x){return Object.prototype.toString.call(x)==="[object Array]"}),l&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(x){return typeof x=="object"&&x.buffer&&x.buffer.constructor===ArrayBuffer});for(var I=function(x,B,$){return function(O){return new d(x,B,x).update(O)[$]()}},R=function(x,B,$){return function(O,U){return new d(x,B,U).update(O)[$]()}},F=function(x,B,$){return function(O,U,W,H){return v["cshake"+x].update(O,U,W,H)[$]()}},z=function(x,B,$){return function(O,U,W,H){return v["kmac"+x].update(O,U,W,H)[$]()}},j=function(x,B,$,O){for(var U=0;U>5,this.byteCount=this.blockCount<<2,this.outputBlocks=$>>5,this.extraBytes=($&31)>>3;for(var O=0;O<50;++O)this.s[O]=0}d.prototype.update=function(x){if(this.finalized)throw new Error(r);var B,$=typeof x;if($!=="string"){if($==="object"){if(x===null)throw new Error(e);if(l&&x.constructor===ArrayBuffer)x=new Uint8Array(x);else if(!Array.isArray(x)&&(!l||!ArrayBuffer.isView(x)))throw new Error(e)}else throw new Error(e);B=!0}for(var O=this.blocks,U=this.byteCount,W=x.length,H=this.blockCount,G=0,oe=this.s,re,fe;G>2]|=x[G]<>2]|=fe<>2]|=(192|fe>>6)<>2]|=(128|fe&63)<=57344?(O[re>>2]|=(224|fe>>12)<>2]|=(128|fe>>6&63)<>2]|=(128|fe&63)<>2]|=(240|fe>>18)<>2]|=(128|fe>>12&63)<>2]|=(128|fe>>6&63)<>2]|=(128|fe&63)<=U){for(this.start=re-U,this.block=O[H],re=0;re>8,$=x&255;$>0;)U.unshift($),x=x>>8,$=x&255,++O;return B?U.push(O):U.unshift(O),this.update(U),U.length},d.prototype.encodeString=function(x){var B,$=typeof x;if($!=="string"){if($==="object"){if(x===null)throw new Error(e);if(l&&x.constructor===ArrayBuffer)x=new Uint8Array(x);else if(!Array.isArray(x)&&(!l||!ArrayBuffer.isView(x)))throw new Error(e)}else throw new Error(e);B=!0}var O=0,U=x.length;if(B)O=U;else for(var W=0;W=57344?O+=3:(H=65536+((H&1023)<<10|x.charCodeAt(++W)&1023),O+=4)}return O+=this.encode(O*8),this.update(x),O},d.prototype.bytepad=function(x,B){for(var $=this.encode(B),O=0;O>2]|=this.padding[B&3],this.lastByteIndex===this.byteCount)for(x[0]=x[$],B=1;B<$+1;++B)x[B]=0;for(x[$-1]|=2147483648,B=0;B<$;++B)O[B]^=x[B];D(O)}},d.prototype.toString=d.prototype.hex=function(){this.finalize();for(var x=this.blockCount,B=this.s,$=this.outputBlocks,O=this.extraBytes,U=0,W=0,H="",G;W<$;){for(U=0;U>4&15]+c[G&15]+c[G>>12&15]+c[G>>8&15]+c[G>>20&15]+c[G>>16&15]+c[G>>28&15]+c[G>>24&15];W%x===0&&(D(B),U=0)}return O&&(G=B[U],H+=c[G>>4&15]+c[G&15],O>1&&(H+=c[G>>12&15]+c[G>>8&15]),O>2&&(H+=c[G>>20&15]+c[G>>16&15])),H},d.prototype.arrayBuffer=function(){this.finalize();var x=this.blockCount,B=this.s,$=this.outputBlocks,O=this.extraBytes,U=0,W=0,H=this.outputBits>>3,G;O?G=new ArrayBuffer($+1<<2):G=new ArrayBuffer(H);for(var oe=new Uint32Array(G);W<$;){for(U=0;U>8&255,H[G+2]=oe>>16&255,H[G+3]=oe>>24&255;W%x===0&&D(B)}return O&&(G=W<<2,oe=B[U],H[G]=oe&255,O>1&&(H[G+1]=oe>>8&255),O>2&&(H[G+2]=oe>>16&255)),H};function T(x,B,$){d.call(this,x,B,$)}T.prototype=new d,T.prototype.finalize=function(){return this.encode(this.outputBits,!0),d.prototype.finalize.call(this)};var D=function(x){var B,$,O,U,W,H,G,oe,re,fe,Tt,Me,Ee,Pt,He,Be,mo,Je,Qe,xo,Ye,Xe,bo,Ze,et,wo,tt,rt,Co,nt,it,Ao,st,ot,Eo,at,lt,So,ct,ft,ko,ut,dt,_o,ht,vt,To,yt,pt,Po,gt,mt,Io,xt,bt,Mo,wt,Ct,vs,ys,ps,gs,ms;for(O=0;O<48;O+=2)U=x[0]^x[10]^x[20]^x[30]^x[40],W=x[1]^x[11]^x[21]^x[31]^x[41],H=x[2]^x[12]^x[22]^x[32]^x[42],G=x[3]^x[13]^x[23]^x[33]^x[43],oe=x[4]^x[14]^x[24]^x[34]^x[44],re=x[5]^x[15]^x[25]^x[35]^x[45],fe=x[6]^x[16]^x[26]^x[36]^x[46],Tt=x[7]^x[17]^x[27]^x[37]^x[47],Me=x[8]^x[18]^x[28]^x[38]^x[48],Ee=x[9]^x[19]^x[29]^x[39]^x[49],B=Me^(H<<1|G>>>31),$=Ee^(G<<1|H>>>31),x[0]^=B,x[1]^=$,x[10]^=B,x[11]^=$,x[20]^=B,x[21]^=$,x[30]^=B,x[31]^=$,x[40]^=B,x[41]^=$,B=U^(oe<<1|re>>>31),$=W^(re<<1|oe>>>31),x[2]^=B,x[3]^=$,x[12]^=B,x[13]^=$,x[22]^=B,x[23]^=$,x[32]^=B,x[33]^=$,x[42]^=B,x[43]^=$,B=H^(fe<<1|Tt>>>31),$=G^(Tt<<1|fe>>>31),x[4]^=B,x[5]^=$,x[14]^=B,x[15]^=$,x[24]^=B,x[25]^=$,x[34]^=B,x[35]^=$,x[44]^=B,x[45]^=$,B=oe^(Me<<1|Ee>>>31),$=re^(Ee<<1|Me>>>31),x[6]^=B,x[7]^=$,x[16]^=B,x[17]^=$,x[26]^=B,x[27]^=$,x[36]^=B,x[37]^=$,x[46]^=B,x[47]^=$,B=fe^(U<<1|W>>>31),$=Tt^(W<<1|U>>>31),x[8]^=B,x[9]^=$,x[18]^=B,x[19]^=$,x[28]^=B,x[29]^=$,x[38]^=B,x[39]^=$,x[48]^=B,x[49]^=$,Pt=x[0],He=x[1],vt=x[11]<<4|x[10]>>>28,To=x[10]<<4|x[11]>>>28,rt=x[20]<<3|x[21]>>>29,Co=x[21]<<3|x[20]>>>29,ys=x[31]<<9|x[30]>>>23,ps=x[30]<<9|x[31]>>>23,ut=x[40]<<18|x[41]>>>14,dt=x[41]<<18|x[40]>>>14,ot=x[2]<<1|x[3]>>>31,Eo=x[3]<<1|x[2]>>>31,Be=x[13]<<12|x[12]>>>20,mo=x[12]<<12|x[13]>>>20,yt=x[22]<<10|x[23]>>>22,pt=x[23]<<10|x[22]>>>22,nt=x[33]<<13|x[32]>>>19,it=x[32]<<13|x[33]>>>19,gs=x[42]<<2|x[43]>>>30,ms=x[43]<<2|x[42]>>>30,xt=x[5]<<30|x[4]>>>2,bt=x[4]<<30|x[5]>>>2,at=x[14]<<6|x[15]>>>26,lt=x[15]<<6|x[14]>>>26,Je=x[25]<<11|x[24]>>>21,Qe=x[24]<<11|x[25]>>>21,Po=x[34]<<15|x[35]>>>17,gt=x[35]<<15|x[34]>>>17,Ao=x[45]<<29|x[44]>>>3,st=x[44]<<29|x[45]>>>3,Ze=x[6]<<28|x[7]>>>4,et=x[7]<<28|x[6]>>>4,Mo=x[17]<<23|x[16]>>>9,wt=x[16]<<23|x[17]>>>9,So=x[26]<<25|x[27]>>>7,ct=x[27]<<25|x[26]>>>7,xo=x[36]<<21|x[37]>>>11,Ye=x[37]<<21|x[36]>>>11,mt=x[47]<<24|x[46]>>>8,Io=x[46]<<24|x[47]>>>8,_o=x[8]<<27|x[9]>>>5,ht=x[9]<<27|x[8]>>>5,wo=x[18]<<20|x[19]>>>12,tt=x[19]<<20|x[18]>>>12,Ct=x[29]<<7|x[28]>>>25,vs=x[28]<<7|x[29]>>>25,ft=x[38]<<8|x[39]>>>24,ko=x[39]<<8|x[38]>>>24,Xe=x[48]<<14|x[49]>>>18,bo=x[49]<<14|x[48]>>>18,x[0]=Pt^~Be&Je,x[1]=He^~mo&Qe,x[10]=Ze^~wo&rt,x[11]=et^~tt&Co,x[20]=ot^~at&So,x[21]=Eo^~lt&ct,x[30]=_o^~vt&yt,x[31]=ht^~To&pt,x[40]=xt^~Mo&Ct,x[41]=bt^~wt&vs,x[2]=Be^~Je&xo,x[3]=mo^~Qe&Ye,x[12]=wo^~rt&nt,x[13]=tt^~Co&it,x[22]=at^~So&ft,x[23]=lt^~ct&ko,x[32]=vt^~yt&Po,x[33]=To^~pt>,x[42]=Mo^~Ct&ys,x[43]=wt^~vs&ps,x[4]=Je^~xo&Xe,x[5]=Qe^~Ye&bo,x[14]=rt^~nt&Ao,x[15]=Co^~it&st,x[24]=So^~ft&ut,x[25]=ct^~ko&dt,x[34]=yt^~Po&mt,x[35]=pt^~gt&Io,x[44]=Ct^~ys&gs,x[45]=vs^~ps&ms,x[6]=xo^~Xe&Pt,x[7]=Ye^~bo&He,x[16]=nt^~Ao&Ze,x[17]=it^~st&et,x[26]=ft^~ut&ot,x[27]=ko^~dt&Eo,x[36]=Po^~mt&_o,x[37]=gt^~Io&ht,x[46]=ys^~gs&xt,x[47]=ps^~ms&bt,x[8]=Xe^~Pt&Be,x[9]=bo^~He&mo,x[18]=Ao^~Ze&wo,x[19]=st^~et&tt,x[28]=ut^~ot&at,x[29]=dt^~Eo<,x[38]=mt^~_o&vt,x[39]=Io^~ht&To,x[48]=gs^~xt&Mo,x[49]=ms^~bt&wt,x[0]^=p[O],x[1]^=p[O+1]};if(a)t.exports=v;else for(P=0;P>=8;return e}function Jw(t,e,r){let n=0;for(let i=0;ie+1+n&&fi.throwError("child data too short",q.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function IA(t,e){if(t.length===0&&fi.throwError("data too short",q.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&fi.throwError("data short segment too short",q.errors.BUFFER_OVERRUN,{});const n=Jw(t,e+1,r);return e+1+r+n>t.length&&fi.throwError("data long segment too short",q.errors.BUFFER_OVERRUN,{}),Qw(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&fi.throwError("data array too short",q.errors.BUFFER_OVERRUN,{}),Qw(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&fi.throwError("data array too short",q.errors.BUFFER_OVERRUN,{});const n=Jw(t,e+1,r);e+1+r+n>t.length&&fi.throwError("data array too short",q.errors.BUFFER_OVERRUN,{});const i=Y(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:i}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&fi.throwError("data too short",q.errors.BUFFER_OVERRUN,{});const n=Y(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:Y(t[e])}}function Lh(t){const e=X(t),r=IA(e,0);return r.consumed!==e.length&&fi.throwArgumentError("invalid rlp data","data",t),r.result}const oF=Object.freeze(Object.defineProperty({__proto__:null,decode:Lh,encode:da},Symbol.toStringTag,{value:"Module"})),aF="address/5.7.0",Ns=new q(aF);function Yw(t){Te(t,20)||Ns.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=X(pe(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const lF=9007199254740991;function cF(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const $m={};for(let t=0;t<10;t++)$m[String(t)]=String(t);for(let t=0;t<26;t++)$m[String.fromCharCode(65+t)]=String(10+t);const Xw=Math.floor(cF(lF));function MA(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>$m[n]).join("");for(;e.length>=Xw;){let n=e.substring(0,Xw);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function we(t){let e=null;if(typeof t!="string"&&Ns.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=Yw(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Ns.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==MA(t)&&Ns.throwArgumentError("bad icap checksum","address",t),e=W$(t.substring(4));e.length<40;)e="0"+e;e=Yw("0x"+e)}else Ns.throwArgumentError("invalid address","address",t);return e}function RA(t){try{return we(t),!0}catch{}return!1}function fF(t){let e=q$(we(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+MA("XE00"+e)+e}function Fm(t){let e=null;try{e=we(t.from)}catch{Ns.throwArgumentError("missing from address","transaction",t)}const r=Ci(X(V.from(t.nonce).toHexString()));return we(Vt(pe(da([e,r])),12))}function uF(t,e,r){return _i(e)!==32&&Ns.throwArgumentError("salt must be 32 bytes","salt",e),_i(r)!==32&&Ns.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),we(Vt(pe(ze(["0xff",we(t),e,r])),12))}class dF extends cs{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=we(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return we(Ue(e.readValue().toHexString(),20))}}class hF extends cs{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}const il=new q(au);function NA(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let l={};n=e.map(c=>{const f=c.localName;return f||il.throwError("cannot encode object for signature with missing names",q.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]&&il.throwError("cannot encode object for signature with duplicate names",q.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]=!0,r[f]})}else il.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&il.throwArgumentError("types/value length mismatch","tuple",r);let i=new op(t.wordSize),s=new op(t.wordSize),o=[];e.forEach((l,c)=>{let f=n[c];if(l.dynamic){let u=s.length;l.encode(s,f);let h=i.writeUpdatableValue();o.push(y=>{h(y+u)})}else l.encode(i,f)}),o.forEach(l=>{l(i.length)});let a=t.appendWriter(i);return a+=t.appendWriter(s),a}function OA(t,e){let r=[],n=t.subReader(0);e.forEach(s=>{let o=null;if(s.dynamic){let a=t.readValue(),l=n.subReader(a.toNumber());try{o=s.decode(l)}catch(c){if(c.code===q.errors.BUFFER_OVERRUN)throw c;o=c,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(t)}catch(a){if(a.code===q.errors.BUFFER_OVERRUN)throw a;o=a,o.baseType=s.name,o.name=s.localName,o.type=s.type}o!=null&&r.push(o)});const i=e.reduce((s,o)=>{const a=o.localName;return a&&(s[a]||(s[a]=0),s[a]++),s},{});e.forEach((s,o)=>{let a=s.localName;if(!a||i[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;const l=r[o];l instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw l}}):r[a]=l});for(let s=0;s{throw o}})}return Object.freeze(r)}class vF extends cs{constructor(e,r,n){const i=e.type+"["+(r>=0?r:"")+"]",s=r===-1||e.dynamic;super("array",i,n,s),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&il.throwError("insufficient data length",q.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let i=0;i>6===2;o++)s++;return s}return t===Yr.OVERRUN?r.length-e-1:0}function EF(t,e,r,n,i){return t===Yr.OVERLONG?(n.push(i),0):(n.push(65533),FA(t,e,r))}const jA=Object.freeze({error:AF,ignore:FA,replace:EF});function zm(t,e){e==null&&(e=jA.error),t=X(t);const r=[];let n=0;for(;n>7)){r.push(i);continue}let s=null,o=null;if((i&224)===192)s=1,o=127;else if((i&240)===224)s=2,o=2047;else if((i&248)===240)s=3,o=65535;else{(i&192)===128?n+=e(Yr.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(Yr.BAD_PREFIX,n-1,t,r);continue}if(n-1+s>=t.length){n+=e(Yr.OVERRUN,n-1,t,r);continue}let a=i&(1<<8-s-1)-1;for(let l=0;l1114111){n+=e(Yr.OUT_OF_RANGE,n-1-s,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(Yr.UTF16_SURROGATE,n-1-s,t,r,a);continue}if(a<=o){n+=e(Yr.OVERLONG,n-1-s,t,r,a);continue}r.push(a)}}return r}function Ve(t,e=Pi.current){e!=Pi.current&&($A.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const s=t.charCodeAt(n);if(n>=t.length||(s&64512)!==56320)throw new Error("invalid utf-8 string");const o=65536+((i&1023)<<10)+(s&1023);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return X(r)}function gv(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function SF(t,e){return'"'+zm(t,e).map(r=>{if(r<256){switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(r>=32&&r<127)return String.fromCharCode(r)}return r<=65535?gv(r):(r-=65536,gv((r>>10&1023)+55296)+gv((r&1023)+56320))}).join("")+'"'}function ap(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function fs(t,e){return ap(zm(t,e))}function P0(t,e=Pi.current){return zm(Ve(t,e))}function kF(t){const e=Ve(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Y(ze([e,T0]).slice(0,32))}function _F(t){const e=X(t);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;e[r-1]===0;)r--;return fs(e.slice(0,r))}function TF(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{let s=i.split(":");r+=parseInt(s[0],16),n[r]=e(s[1])}),n}function zA(t){let e=0;return t.split(",").map(r=>{let n=r.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function Vm(t,e){let r=0;for(let n=0;n=r&&t<=r+i.h&&(t-r)%(i.d||1)===0){if(i.e&&i.e.indexOf(t-r)!==-1)continue;return i}}return null}const PF=zA("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),IF="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),MF=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],RF=Um("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),NF=Um("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),OF=Um("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",TF),DF=zA("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function BF(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function LF(t){return!!Vm(t,PF)}function $F(t){let e=Vm(t,MF);if(e)return[t+e.s];let r=RF[t];if(r)return r;let n=NF[t];if(n)return[t+n[0]];let i=OF[t];return i||null}function FF(t){return!!Vm(t,DF)}function jF(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=P0(t);e=BF(e.map(n=>{if(IF.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=$F(n);return i||[n]})),e=P0(ap(e),Pi.NFKC),e.forEach(n=>{if(FF(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(LF(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=ap(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}class zF extends DA{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,Ve(r))}decode(e){return fs(super.decode(e))}}class Qu extends cs{constructor(e,r){let n=!1;const i=[];e.forEach(o=>{o.dynamic&&(n=!0),i.push(o.type)});const s="tuple("+i.join(",")+")";super("tuple",s,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,i)=>{const s=i.localName;return s&&(n[s]||(n[s]=0),n[s]++),n},{});return this.coders.forEach((n,i)=>{let s=n.localName;!s||r[s]!==1||(s==="length"&&(s="_length"),e[s]==null&&(e[s]=e[i]))}),Object.freeze(e)}encode(e,r){return NA(e,this.coders,r)}decode(e){return e.coerce(this.name,OA(e,this.coders))}}const Yu=new q(au),UF=new RegExp(/^bytes([0-9]*)$/),VF=new RegExp(/^(u?int)([0-9]*)$/);class Hm{constructor(e){ee(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new dF(e.name);case"bool":return new yF(e.name);case"string":return new zF(e.name);case"bytes":return new pF(e.name);case"array":return new vF(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new Qu((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new mF(e.name)}let r=e.type.match(VF);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&Yu.throwArgumentError("invalid "+r[1]+" bit length","param",e),new wF(n/8,r[1]==="int",e.name)}if(r=e.type.match(UF),r){let n=parseInt(r[1]);return(n===0||n>32)&&Yu.throwArgumentError("invalid bytes length","param",e),new gF(n,e.name)}return Yu.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new _0(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new op(this._getWordSize())}getDefaultValue(e){const r=e.map(i=>this._getCoder(ar.from(i)));return new Qu(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&Yu.throwError("types/values length mismatch",q.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(o=>this._getCoder(ar.from(o))),i=new Qu(n,"_"),s=this._getWriter();return i.encode(s,r),s.data}decode(e,r,n){const i=e.map(o=>this._getCoder(ar.from(o)));return new Qu(i,"_").decode(this._getReader(X(r),n))}}const qr=new Hm;function Os(t){return pe(Ve(t))}const UA="hash/5.7.0";function Wm(t){t=atob(t);const e=[];for(let r=0;r0&&Array.isArray(a)?i(a,o-1):r.push(a)})};return i(t,e),r}function WF(t){const e={};for(let r=0;r>--l&1}const u=31,h=Math.pow(2,u),y=h>>>1,m=y>>1,p=h-1;let S=0;for(let R=0;R1;){let J=F+z>>>1;R>>1|f(),j=j<<1^y,K=(K^y)<<1|y|1;A=j,k=1+K-j}let I=n-4;return w.map(R=>{switch(R-I){case 3:return I+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return I+256+(t[a++]<<8|t[a++]);case 1:return I+t[a++];default:return R-1}})}function GF(t){let e=0;return()=>t[e++]}function KF(t){return GF(qF(t))}function JF(t){return t&1?~t>>1:t>>1}function QF(t,e){let r=Array(t);for(let n=0;ne[o]):r}function XF(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(ej(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(tj(r,t))}return WF(VA(e))}function ZF(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function HA(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;in[o].push(s));return n}function ej(t,e){let r=1+e(),n=e(),i=ZF(e),s=HA(i.length,1+t,e);return VA(s.map((o,a)=>{const l=o[0],c=o.slice(1);return Array(i[a]).fill(void 0).map((f,u)=>{let h=u*n;return[l+u*r,c.map(y=>y+h)]})}))}function tj(t,e){let r=1+e();return HA(r,1+t,e).map(i=>[i[0],i.slice(1)])}function rj(t){let e=I0(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let c=I0(t,e);if(c.length==0)break;n.push({set:new Set(c),node:r()})}n.sort((c,f)=>f.set.size-c.set.size);let i=t(),s=i%3;i=i/3|0;let o=!!(i&1);i>>=1;let a=i==1,l=i==2;return{branches:n,valid:s,fe0f:o,save:a,check:l}}}function nj(){return KF(Wm("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const $h=nj(),ij=new Set(I0($h)),sj=new Set(I0($h)),oj=XF($h),aj=rj($h),e6=45,t6=95;function WA(t){return P0(t)}function lj(t){return t.filter(e=>e!=65039)}function qA(t){for(let e of t.split(".")){let r=WA(e);try{for(let n=r.lastIndexOf(t6)-1;n>=0;n--)if(r[n]!==t6)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===e6&&r[3]===e6)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function cj(t){return qA(fj(t,lj))}function fj(t,e){let r=WA(t).reverse(),n=[];for(;r.length;){let i=dj(r);if(i){n.push(...e(i));continue}let s=r.pop();if(ij.has(s)){n.push(s);continue}if(sj.has(s))continue;let o=oj[s];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${s.toString(16).toUpperCase()}`)}return qA(uj(String.fromCodePoint(...n)))}function uj(t){return t.normalize("NFC")}function dj(t,e){var r;let n=aj,i,s,o=[],a=t.length;for(e&&(e.length=0);a;){let l=t[--a];if(n=(r=n.branches.find(c=>c.set.has(l)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)s=l;else if(n.check&&l===s)break;o.push(l),n.fe0f&&(o.push(65039),a>0&&t[a-1]==65039&&a--),n.valid&&(i=o.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return i}const hj=new q(UA),GA=new Uint8Array(32);GA.fill(0);function r6(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function Gm(t){const e=Ve(cj(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return r.push(r6(e.slice(n))),r}function vj(t){try{return Gm(t).length!==0}catch{}return!1}function ef(t){typeof t!="string"&&hj.throwArgumentError("invalid ENS name; not a string","name",t);let e=GA;const r=Gm(t);for(;r.length;)e=pe(ze([e,pe(r.pop())]));return Y(e)}function KA(t){return Y(ze(Gm(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}const yj=`Ethereum Signed Message: -`;function Fh(t){return typeof t=="string"&&(t=Ve(t)),pe(ze([Ve(yj),Ve(String(t.length)),t]))}var pj=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Dt=new q(UA),JA=new Uint8Array(32);JA.fill(0);const gj=V.from(-1),QA=V.from(0),YA=V.from(1),mj=V.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function xj(t){const e=X(t),r=e.length%32;return r?Ur([e,JA.slice(r)]):Y(e)}const bj=Ue(YA.toHexString(),32),wj=Ue(QA.toHexString(),32),n6={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},mv=["name","version","chainId","verifyingContract","salt"];function i6(t){return function(e){return typeof e!="string"&&Dt.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const Cj={name:i6("name"),version:i6("version"),chainId:function(t){try{return V.from(t).toString()}catch{}return Dt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return we(t).toLowerCase()}catch{}return Dt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=X(t);if(e.length!==32)throw new Error("bad length");return Y(e)}catch{}return Dt.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function xv(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&Dt.throwArgumentError("invalid numeric width","type",t);const i=mj.mask(r?n-1:n),s=r?i.add(YA).mul(gj):QA;return function(o){const a=V.from(o);return(a.lt(s)||a.gt(i))&&Dt.throwArgumentError(`value out-of-bounds for ${t}`,"value",o),Ue(a.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&&Dt.throwArgumentError("invalid bytes width","type",t),function(n){return X(n).length!==r&&Dt.throwArgumentError(`invalid length for ${t}`,"value",n),xj(n)}}}switch(t){case"address":return function(e){return Ue(we(e),32)};case"bool":return function(e){return e?bj:wj};case"bytes":return function(e){return pe(e)};case"string":return function(e){return Os(e)}}return null}function s6(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class Yt{constructor(e){ee(this,"types",Object.freeze(Ti(e))),ee(this,"_encoderCache",{}),ee(this,"_types",{});const r={},n={},i={};Object.keys(e).forEach(a=>{r[a]={},n[a]=[],i[a]={}});for(const a in e){const l={};e[a].forEach(c=>{l[c.name]&&Dt.throwArgumentError(`duplicate variable name ${JSON.stringify(c.name)} in ${JSON.stringify(a)}`,"types",e),l[c.name]=!0;const f=c.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===a&&Dt.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!xv(f)&&(n[f]||Dt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),n[f].push(a),r[a][f]=!0)})}const s=Object.keys(n).filter(a=>n[a].length===0);s.length===0?Dt.throwArgumentError("missing primary type","types",e):s.length>1&&Dt.throwArgumentError(`ambiguous primary types or unused types: ${s.map(a=>JSON.stringify(a)).join(", ")}`,"types",e),ee(this,"primaryType",s[0]);function o(a,l){l[a]&&Dt.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),l[a]=!0,Object.keys(r[a]).forEach(c=>{n[c]&&(o(c,l),Object.keys(l).forEach(f=>{i[f][c]=!0}))}),delete l[a]}o(this.primaryType,{});for(const a in i){const l=Object.keys(i[a]);l.sort(),this._types[a]=s6(a,e[a])+l.map(c=>s6(c,e[c])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=xv(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],s=this.getEncoder(i),o=parseInt(r[3]);return a=>{o>=0&&a.length!==o&&Dt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let l=a.map(s);return this._types[i]&&(l=l.map(pe)),pe(Ur(l))}}const n=this.types[e];if(n){const i=Os(this._types[e]);return s=>{const o=n.map(({name:a,type:l})=>{const c=this.getEncoder(l)(s[a]);return this._types[l]?pe(c):c});return o.unshift(i),Ur(o)}}return Dt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||Dt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return pe(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(xv(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const o=i[1],a=parseInt(i[3]);return a>=0&&r.length!==a&&Dt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(l=>this._visit(o,l,n))}const s=this.types[e];return s?s.reduce((o,{name:a,type:l})=>(o[a]=this._visit(l,r[a],n),o),{}):Dt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Yt(e)}static getPrimaryType(e){return Yt.from(e).primaryType}static hashStruct(e,r,n){return Yt.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const i=n6[n];i||Dt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>mv.indexOf(n.name)-mv.indexOf(i.name)),Yt.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Ur(["0x1901",Yt.hashDomain(e),Yt.from(r).hash(n)])}static hash(e,r,n){return pe(Yt.encode(e,r,n))}static resolveNames(e,r,n,i){return pj(this,void 0,void 0,function*(){e=er(e);const s={};e.verifyingContract&&!Te(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const o=Yt.from(r);o.visit(n,(a,l)=>(a==="address"&&!Te(l,20)&&(s[l]="0x"),l));for(const a in s)s[a]=yield i(a);return e.verifyingContract&&s[e.verifyingContract]&&(e.verifyingContract=s[e.verifyingContract]),n=o.visit(n,(a,l)=>a==="address"&&s[l]?s[l]:l),{domain:e,value:n}})}static getPayload(e,r,n){Yt.hashDomain(e);const i={},s=[];mv.forEach(l=>{const c=e[l];c!=null&&(i[l]=Cj[l](c),s.push({name:l,type:n6[l]}))});const o=Yt.from(r),a=er(r);return a.EIP712Domain?Dt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):a.EIP712Domain=s,o.encode(n),{types:a,domain:i,primaryType:o.primaryType,message:o.visit(n,(l,c)=>{if(l.match(/^bytes(\d*)/))return Y(X(c));if(l.match(/^u?int/))return V.from(c).toString();switch(l){case"address":return c.toLowerCase();case"bool":return!!c;case"string":return typeof c!="string"&&Dt.throwArgumentError("invalid string","value",c),c}return Dt.throwArgumentError("unsupported type","type",l)})}}}const Ot=new q(au);class XA extends Ea{}class ZA extends Ea{}class Aj extends Ea{}class M0 extends Ea{static isIndexed(e){return!!(e&&e._isIndexed)}}const Ej={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function o6(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class tr{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,ee(this,"fragments",r.map(n=>yi.from(n)).filter(n=>n!=null)),ee(this,"_abiCoder",Yn(new.target,"getAbiCoder")()),ee(this,"functions",{}),ee(this,"errors",{}),ee(this,"events",{}),ee(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){Ot.warn("duplicate definition - constructor");return}ee(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let s=n.format();if(i[s]){Ot.warn("duplicate definition - "+s);return}i[s]=n}),this.deploy||ee(this,"deploy",Jn.from({payable:!1,type:"constructor"})),ee(this,"_isInterface",!0)}format(e){e||(e=Ne.full),e===Ne.sighash&&Ot.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===Ne.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return qr}static getAddress(e){return we(e)}static getSighash(e){return Vt(Os(e.format()),0,4)}static getEventTopic(e){return Os(e.format())}getFunction(e){if(Te(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];Ot.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.functions).filter(s=>s.split("(")[0]===n);return i.length===0?Ot.throwArgumentError("no matching function","name",n):i.length>1&&Ot.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const r=this.functions[Qn.fromString(e).format()];return r||Ot.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(Te(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];Ot.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.events).filter(s=>s.split("(")[0]===n);return i.length===0?Ot.throwArgumentError("no matching event","name",n):i.length>1&&Ot.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const r=this.events[vi.fromString(e).format()];return r||Ot.throwArgumentError("no matching event","signature",e),r}getError(e){if(Te(e)){const n=Yn(this.constructor,"getSighash");for(const i in this.errors){const s=this.errors[i];if(e===n(s))return this.errors[i]}Ot.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.errors).filter(s=>s.split("(")[0]===n);return i.length===0?Ot.throwArgumentError("no matching error","name",n):i.length>1&&Ot.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const r=this.errors[Qn.fromString(e).format()];return r||Ot.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(r){try{e=this.getError(e)}catch{throw r}}return Yn(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),Yn(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));const n=X(r);return Y(n.slice(0,4))!==this.getSighash(e)&&Ot.throwArgumentError(`data signature does not match error ${e.name}.`,"data",Y(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),Y(ze([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=X(r);return Y(n.slice(0,4))!==this.getSighash(e)&&Ot.throwArgumentError(`data signature does not match function ${e.name}.`,"data",Y(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),Y(ze([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=X(r),i=null,s="",o=null,a=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const c=Y(n.slice(0,4)),f=Ej[c];if(f)o=this._abiCoder.decode(f.inputs,n.slice(4)),a=f.name,l=f.signature,f.reason&&(i=o[0]),a==="Error"?s=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:a==="Panic"&&(s=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const u=this.getError(c);o=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,l=u.format()}catch{}break}}return Ot.throwError("call revert exception"+s,q.errors.CALL_EXCEPTION,{method:e.format(),data:Y(r),errorArgs:o,errorName:a,errorSignature:l,reason:i})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),Y(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&Ot.throwError("too many arguments for "+e.format(),q.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(s,o)=>s.type==="string"?Os(o):s.type==="bytes"?pe(Y(o)):(s.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),s.type.match(/^u?int/)&&(o=V.from(o).toHexString()),s.type==="address"&&this._abiCoder.encode(["address"],[o]),Ue(Y(o),32));for(r.forEach((s,o)=>{let a=e.inputs[o];if(!a.indexed){s!=null&&Ot.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,s);return}s==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?Ot.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,s):Array.isArray(s)?n.push(s.map(l=>i(a,l))):n.push(i(a,s))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],i=[],s=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&Ot.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const l=r[a];if(o.indexed)if(o.type==="string")n.push(Os(l));else if(o.type==="bytes")n.push(pe(l));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([o.type],[l]))}else i.push(o),s.push(l)}),{data:this._abiCoder.encode(i,s),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let h=this.getEventTopic(e);(!Te(n[0],32)||n[0].toLowerCase()!==h)&&Ot.throwError("fragment/topic mismatch",q.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:h,value:n[0]}),n=n.slice(1)}let i=[],s=[],o=[];e.inputs.forEach((h,y)=>{h.indexed?h.type==="string"||h.type==="bytes"||h.baseType==="tuple"||h.baseType==="array"?(i.push(ar.fromObject({type:"bytes32",name:h.name})),o.push(!0)):(i.push(h),o.push(!1)):(s.push(h),o.push(!1))});let a=n!=null?this._abiCoder.decode(i,ze(n)):null,l=this._abiCoder.decode(s,r,!0),c=[],f=0,u=0;e.inputs.forEach((h,y)=>{if(h.indexed)if(a==null)c[y]=new M0({_isIndexed:!0,hash:null});else if(o[y])c[y]=new M0({_isIndexed:!0,hash:a[u++]});else try{c[y]=a[u++]}catch(m){c[y]=m}else try{c[y]=l[f++]}catch(m){c[y]=m}if(h.name&&c[h.name]==null){const m=c[y];m instanceof Error?Object.defineProperty(c,h.name,{enumerable:!0,get:()=>{throw o6(`property ${JSON.stringify(h.name)}`,m)}}):c[h.name]=m}});for(let h=0;h{throw o6(`index ${h}`,y)}})}return Object.freeze(c)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new ZA({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:V.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new XA({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=Y(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new Aj({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const Sj="abstract-provider/5.7.0";var kj=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const _j=new q(Sj);class Tj extends Ea{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class po{constructor(){_j.checkAbstract(new.target,po),ee(this,"_isProvider",!0)}getFeeData(){return kj(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield qe({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(o=>null)});let n=null,i=null,s=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,s=V.from("1500000000"),i=e.baseFeePerGas.mul(2).add(s)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:s,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const Pj="abstract-signer/5.7.0";var Fn=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Cn=new q(Pj),Ij=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Mj=[q.errors.INSUFFICIENT_FUNDS,q.errors.NONCE_EXPIRED,q.errors.REPLACEMENT_UNDERPRICED];let io=class eE{constructor(){Cn.checkAbstract(new.target,eE),ee(this,"_isSigner",!0)}getBalance(e){return Fn(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Fn(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Fn(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield qe(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return Fn(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield qe(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return Fn(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return Fn(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Fn(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Fn(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Fn(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)Ij.indexOf(n)===-1&&Cn.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=er(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&Cn.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return Fn(this,void 0,void 0,function*(){const r=yield qe(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>Fn(this,void 0,void 0,function*(){if(i==null)return null;const s=yield this.resolveName(i);return s==null&&Cn.throwArgumentError("provided ENS name resolves to null","tx.to",i),s})),r.to.catch(i=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?Cn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&Cn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(r.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const s=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=s,r.maxPriorityFeePerGas=s}else r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&Cn.throwError("network does not support EIP-1559",q.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):Cn.throwError("failed to get consistent fee data",q.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(i=>{if(Mj.indexOf(i.code)>=0)throw i;return Cn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",q.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&Cn.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield qe(r)})}_checkProvider(e){this.provider||Cn.throwError("missing provider",q.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}};class Km extends io{constructor(e,r){super(),ee(this,"address",e),ee(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{Cn.throwError(e,q.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new Km(this.address,e)}}var tE={},Ie={},lu=rE;function rE(t,e){if(!t)throw new Error(e||"Assertion failed")}rE.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var lp={exports:{}};typeof Object.create=="function"?lp.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:lp.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var Rj=lp.exports,Nj=lu,Oj=Rj;Ie.inherits=Oj;function Dj(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function Bj(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=s&63|128):Dj(t,i)?(s=65536+((s&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=s&63|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=s&63|128)}else for(i=0;i>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Ie.htonl=nE;function $j(t,e){for(var r="",n=0;n>>0}return s}Ie.join32=Fj;function jj(t,e){for(var r=new Array(t.length*4),n=0,i=0;n>>24,r[i+1]=s>>>16&255,r[i+2]=s>>>8&255,r[i+3]=s&255):(r[i+3]=s>>>24,r[i+2]=s>>>16&255,r[i+1]=s>>>8&255,r[i]=s&255)}return r}Ie.split32=jj;function zj(t,e){return t>>>e|t<<32-e}Ie.rotr32=zj;function Uj(t,e){return t<>>32-e}Ie.rotl32=Uj;function Vj(t,e){return t+e>>>0}Ie.sum32=Vj;function Hj(t,e,r){return t+e+r>>>0}Ie.sum32_3=Hj;function Wj(t,e,r,n){return t+e+r+n>>>0}Ie.sum32_4=Wj;function qj(t,e,r,n,i){return t+e+r+n+i>>>0}Ie.sum32_5=qj;function Gj(t,e,r,n){var i=t[e],s=t[e+1],o=n+s>>>0,a=(o>>0,t[e+1]=o}Ie.sum64=Gj;function Kj(t,e,r,n){var i=e+n>>>0,s=(i>>0}Ie.sum64_hi=Kj;function Jj(t,e,r,n){var i=e+n;return i>>>0}Ie.sum64_lo=Jj;function Qj(t,e,r,n,i,s,o,a){var l=0,c=e;c=c+n>>>0,l+=c>>0,l+=c>>0,l+=c>>0}Ie.sum64_4_hi=Qj;function Yj(t,e,r,n,i,s,o,a){var l=e+n+s+a;return l>>>0}Ie.sum64_4_lo=Yj;function Xj(t,e,r,n,i,s,o,a,l,c){var f=0,u=e;u=u+n>>>0,f+=u>>0,f+=u>>0,f+=u>>0,f+=u>>0}Ie.sum64_5_hi=Xj;function Zj(t,e,r,n,i,s,o,a,l,c){var f=e+n+s+a+c;return f>>>0}Ie.sum64_5_lo=Zj;function ez(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Ie.rotr64_hi=ez;function tz(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Ie.rotr64_lo=tz;function rz(t,e,r){return t>>>r}Ie.shr64_hi=rz;function nz(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Ie.shr64_lo=nz;var nc={},a6=Ie,iz=lu;function jh(){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}nc.BlockHash=jh;jh.prototype.update=function(e,r){if(e=a6.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=a6.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[s++]=e>>>16&255,i[s++]=e>>>8&255,i[s++]=e&255}else for(i[s++]=e&255,i[s++]=e>>>8&255,i[s++]=e>>>16&255,i[s++]=e>>>24&255,i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=0,o=8;o>>3}Ni.g0_256=cz;function fz(t){return Ai(t,17)^Ai(t,19)^t>>>10}Ni.g1_256=fz;var Bl=Ie,uz=nc,dz=Ni,bv=Bl.rotl32,Cc=Bl.sum32,hz=Bl.sum32_5,vz=dz.ft_1,cE=uz.BlockHash,yz=[1518500249,1859775393,2400959708,3395469782];function Ii(){if(!(this instanceof Ii))return new Ii;cE.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Bl.inherits(Ii,cE);var pz=Ii;Ii.blockSize=512;Ii.outSize=160;Ii.hmacStrength=80;Ii.padLength=64;Ii.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;ithis.blockSize&&(e=new this.Hash().update(e).digest()),nU(e.length<=this.blockSize);for(var r=e.length;r>8,h=f&255;u?l.push(u,h):l.push(h)}return l}r.toArray=n;function i(o){return o.length===1?"0"+o:o}r.zero2=i;function s(o){for(var a="",l=0;l(h>>1)-1?p=(h>>1)-S:p=S,y.isubn(p)):p=0,u[m]=p,y.iushrn(1)}return u}r.getNAF=n;function i(l,c){var f=[[],[]];l=l.clone(),c=c.clone();for(var u=0,h=0,y;l.cmpn(-u)>0||c.cmpn(-h)>0;){var m=l.andln(3)+u&3,p=c.andln(3)+h&3;m===3&&(m=-1),p===3&&(p=-1);var S;m&1?(y=l.andln(7)+u&7,(y===3||y===5)&&p===2?S=-m:S=m):S=0,f[0].push(S);var w;p&1?(y=c.andln(7)+h&7,(y===3||y===5)&&m===2?w=-p:w=p):w=0,f[1].push(w),2*u===S+1&&(u=1-u),2*h===w+1&&(h=1-h),l.iushrn(1),c.iushrn(1)}return f}r.getJSF=i;function s(l,c,f){var u="_"+c;l.prototype[c]=function(){return this[u]!==void 0?this[u]:this[u]=f.call(this)}}r.cachedProperty=s;function o(l){return typeof l=="string"?r.toArray(l,"hex"):l}r.parseBytes=o;function a(l){return new be(l,"hex","le")}r.intFromLE=a}),R0=bn.getNAF,oU=bn.getJSF,N0=bn.assert;function go(t,e){this.type=t,this.p=new be(e.p,16),this.red=e.prime?be.red(e.prime):be.mont(this.p),this.zero=new be(0).toRed(this.red),this.one=new be(1).toRed(this.red),this.two=new be(2).toRed(this.red),this.n=e.n&&new be(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Sa=go;go.prototype.point=function(){throw new Error("Not implemented")};go.prototype.validate=function(){throw new Error("Not implemented")};go.prototype._fixedNafMul=function(e,r){N0(e.precomputed);var n=e._getDoubles(),i=R0(r,1,this._bitLength),s=(1<=a;c--)l=(l<<1)+i[c];o.push(l)}for(var f=this.jpoint(null,null,null),u=this.jpoint(null,null,null),h=s;h>0;h--){for(a=0;a=0;l--){for(var c=0;l>=0&&o[l]===0;l--)c++;if(l>=0&&c++,a=a.dblp(c),l<0)break;var f=o[l];N0(f!==0),e.type==="affine"?f>0?a=a.mixedAdd(s[f-1>>1]):a=a.mixedAdd(s[-f-1>>1].neg()):f>0?a=a.add(s[f-1>>1]):a=a.add(s[-f-1>>1].neg())}return e.type==="affine"?a.toP():a};go.prototype._wnafMulAdd=function(e,r,n,i,s){var o=this._wnafT1,a=this._wnafT2,l=this._wnafT3,c=0,f,u,h;for(f=0;f=1;f-=2){var m=f-1,p=f;if(o[m]!==1||o[p]!==1){l[m]=R0(n[m],o[m],this._bitLength),l[p]=R0(n[p],o[p],this._bitLength),c=Math.max(l[m].length,c),c=Math.max(l[p].length,c);continue}var S=[r[m],null,null,r[p]];r[m].y.cmp(r[p].y)===0?(S[1]=r[m].add(r[p]),S[2]=r[m].toJ().mixedAdd(r[p].neg())):r[m].y.cmp(r[p].y.redNeg())===0?(S[1]=r[m].toJ().mixedAdd(r[p]),S[2]=r[m].add(r[p].neg())):(S[1]=r[m].toJ().mixedAdd(r[p]),S[2]=r[m].toJ().mixedAdd(r[p].neg()));var w=[-3,-1,-5,-7,0,7,5,1,3],A=oU(n[m],n[p]);for(c=Math.max(A[0].length,c),l[m]=new Array(c),l[p]=new Array(c),u=0;u=0;f--){for(var z=0;f>=0;){var j=!0;for(u=0;u=0&&z++,R=R.dblp(z),f<0)break;for(u=0;u0?h=a[u][K-1>>1]:K<0&&(h=a[u][-K-1>>1].neg()),h.type==="affine"?R=R.mixedAdd(h):R=R.add(h))}}for(f=0;f=Math.ceil((e.bitLength()+1)/r.step):!1};Dn.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,s=0;s=0&&(y=c,m=f),u.negative&&(u=u.neg(),h=h.neg()),y.negative&&(y=y.neg(),m=m.neg()),[{a:u,b:h},{a:y,b:m}]};Bn.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],s=i.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=s.mul(n.a),l=o.mul(i.a),c=s.mul(n.b),f=o.mul(i.b),u=e.sub(a).sub(l),h=c.add(f).neg();return{k1:u,k2:h}};Bn.prototype.pointFromX=function(e,r){e=new be(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var s=i.fromRed().isOdd();return(r&&!s||!r&&s)&&(i=i.redNeg()),this.point(e,i)};Bn.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),s=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(s).cmpn(0)===0};Bn.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,s=this._endoWnafT2,o=0;o":""};gr.prototype.isInfinity=function(){return this.inf};gr.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};gr.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),s=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),o=s.redSqr().redISub(this.x.redAdd(this.x)),a=s.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)};gr.prototype.getX=function(){return this.x.fromRed()};gr.prototype.getY=function(){return this.y.fromRed()};gr.prototype.mul=function(e){return e=new be(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};gr.prototype.mulAdd=function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s):this.curve._wnafMulAdd(1,i,s,2)};gr.prototype.jmulAdd=function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s,!0):this.curve._wnafMulAdd(1,i,s,2,!0)};gr.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};gr.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(s){return s.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};gr.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Sr(t,e,r,n){Sa.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new be(0)):(this.x=new be(e,16),this.y=new be(r,16),this.z=new be(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}Qm(Sr,Sa.BasePoint);Bn.prototype.jpoint=function(e,r,n){return new Sr(this,e,r,n)};Sr.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};Sr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Sr.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),s=e.x.redMul(n),o=this.y.redMul(r.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),l=i.redSub(s),c=o.redSub(a);if(l.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),u=f.redMul(l),h=i.redMul(f),y=c.redSqr().redIAdd(u).redISub(h).redISub(h),m=c.redMul(h.redISub(y)).redISub(o.redMul(u)),p=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(y,m,p)};Sr.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),s=this.y,o=e.y.redMul(r).redMul(this.z),a=n.redSub(i),l=s.redSub(o);if(a.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),f=c.redMul(a),u=n.redMul(c),h=l.redSqr().redIAdd(f).redISub(u).redISub(u),y=l.redMul(u.redISub(h)).redISub(s.redMul(f)),m=this.z.redMul(a);return this.curve.jpoint(h,y,m)};Sr.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)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(s),this.x.cmp(n)===0)return!0}};Sr.prototype.inspect=function(){return this.isInfinity()?"":""};Sr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Ed=oc(function(t,e){var r=e;r.base=Sa,r.short=lU,r.mont=null,r.edwards=null}),Sd=oc(function(t,e){var r=e,n=bn.assert;function i(a){a.type==="short"?this.curve=new Ed.short(a):a.type==="edwards"?this.curve=new Ed.edwards(a):this.curve=new Ed.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=i;function s(a,l){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){var c=new i(l);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:c}),c}})}s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Qr.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Qr.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Qr.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Qr.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Qr.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Qr.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Qr.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var o;try{o=null.crash()}catch{o=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Qr.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function so(t){if(!(this instanceof so))return new so(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Xn.toArray(t.entropy,t.entropyEnc||"hex"),r=Xn.toArray(t.nonce,t.nonceEnc||"hex"),n=Xn.toArray(t.pers,t.persEnc||"hex");Jm(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var wE=so;so.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};so.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=Xn.toArray(n,i||"hex"),this._update(n));for(var s=[];s.length"};var cU=bn.assert;function zh(t,e){if(t instanceof zh)return t;this._importDER(t,e)||(cU(t.r&&t.s,"Signature without r or s"),this.r=new be(t.r,16),this.s=new be(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Uh=zh;function fU(){this.place=0}function Av(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var i=0,s=0,o=e.place;s>>=0;return i<=127?!1:(e.place=o,i)}function u6(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}zh.prototype.toDER=function(e){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=u6(r),n=u6(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];Ev(i,r.length),i=i.concat(r),i.push(2),Ev(i,n.length);var s=i.concat(n),o=[48];return Ev(o,s.length),o=o.concat(s),bn.encode(o,e)};var uU=function(){throw new Error("unsupported")},CE=bn.assert;function On(t){if(!(this instanceof On))return new On(t);typeof t=="string"&&(CE(Object.prototype.hasOwnProperty.call(Sd,t),"Unknown curve "+t),t=Sd[t]),t instanceof Sd.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var dU=On;On.prototype.keyPair=function(e){return new Ym(this,e)};On.prototype.keyFromPrivate=function(e,r){return Ym.fromPrivate(this,e,r)};On.prototype.keyFromPublic=function(e,r){return Ym.fromPublic(this,e,r)};On.prototype.genKeyPair=function(e){e||(e={});for(var r=new wE({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||uU(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new be(2));;){var s=new be(r.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}};On.prototype._truncateToN=function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};On.prototype.sign=function(e,r,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new be(e,16));for(var s=this.n.byteLength(),o=r.getPrivate().toArray("be",s),a=e.toArray("be",s),l=new wE({hash:this.hash,entropy:o,nonce:a,pers:i.pers,persEnc:i.persEnc||"utf8"}),c=this.n.sub(new be(1)),f=0;;f++){var u=i.k?i.k(f):new be(l.generate(this.n.byteLength()));if(u=this._truncateToN(u,!0),!(u.cmpn(1)<=0||u.cmp(c)>=0)){var h=this.g.mul(u);if(!h.isInfinity()){var y=h.getX(),m=y.umod(this.n);if(m.cmpn(0)!==0){var p=u.invm(this.n).mul(m.mul(r.getPrivate()).iadd(e));if(p=p.umod(this.n),p.cmpn(0)!==0){var S=(h.getY().isOdd()?1:0)|(y.cmp(m)!==0?2:0);return i.canonical&&p.cmp(this.nh)>0&&(p=this.n.sub(p),S^=1),new Uh({r:m,s:p,recoveryParam:S})}}}}}};On.prototype.verify=function(e,r,n,i){e=this._truncateToN(new be(e,16)),n=this.keyFromPublic(n,i),r=new Uh(r,"hex");var s=r.r,o=r.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a=o.invm(this.n),l=a.mul(e).umod(this.n),c=a.mul(s).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.eqXToP(s)):(f=this.g.mulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.getX().umod(this.n).cmp(s)===0)};On.prototype.recoverPubKey=function(t,e,r,n){CE((3&r)===r,"The recovery param is more than two bits"),e=new Uh(e,n);var i=this.n,s=new be(t),o=e.r,a=e.s,l=r&1,c=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");c?o=this.curve.pointFromX(o.add(this.curve.n),l):o=this.curve.pointFromX(o,l);var f=e.r.invm(i),u=i.sub(s).mul(f).umod(i),h=a.mul(f).umod(i);return this.g.mulAdd(u,o,h)};On.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Uh(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(t,e,i)}catch{continue}if(s.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var hU=oc(function(t,e){var r=e;r.version="6.5.4",r.utils=bn,r.rand=function(){throw new Error("unsupported")},r.curve=Ed,r.curves=Sd,r.ec=dU,r.eddsa=null}),vU=hU.ec;const yU="signing-key/5.7.0",dp=new q(yU);let Sv=null;function ui(){return Sv||(Sv=new vU("secp256k1")),Sv}class Xo{constructor(e){ee(this,"curve","secp256k1"),ee(this,"privateKey",Y(e)),_i(this.privateKey)!==32&&dp.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=ui().keyFromPrivate(X(this.privateKey));ee(this,"publicKey","0x"+r.getPublic(!1,"hex")),ee(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),ee(this,"_isSigningKey",!0)}_addPoint(e){const r=ui().keyFromPublic(X(this.publicKey)),n=ui().keyFromPublic(X(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=ui().keyFromPrivate(X(this.privateKey)),n=X(e);n.length!==32&&dp.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return Aa({recoveryParam:i.recoveryParam,r:Ue("0x"+i.r.toString(16),32),s:Ue("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=ui().keyFromPrivate(X(this.privateKey)),n=ui().keyFromPublic(X(Xm(e)));return Ue("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function AE(t,e){const r=Aa(e),n={r:X(r.r),s:X(r.s)};return"0x"+ui().recoverPubKey(X(t),n,r.recoveryParam).encode("hex",!1)}function Xm(t,e){const r=X(t);if(r.length===32){const n=new Xo(r);return e?"0x"+ui().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?Y(r):"0x"+ui().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+ui().keyFromPublic(r).getPublic(!0,"hex"):Y(r)}return dp.throwArgumentError("invalid public or private key","key","[REDACTED]")}const pU="transactions/5.7.0",Mr=new q(pU);var hp;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(hp||(hp={}));function Zm(t){return t==="0x"?null:we(t)}function Ir(t){return t==="0x"?Nt:V.from(t)}const gU=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],mU={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function qs(t){const e=Xm(t);return we(Vt(pe(Vt(e,1)),12))}function va(t,e){return qs(AE(X(t),e))}function cn(t,e){const r=Ci(V.from(t).toHexString());return r.length>32&&Mr.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function kv(t,e){return{address:we(t),storageKeys:(e||[]).map((r,n)=>(_i(r)!==32&&Mr.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function ka(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Mr.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),kv(r[0],r[1])):kv(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,s)=>(i[s]=!0,i),{});return kv(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function EE(t){return ka(t).map(e=>[e.address,e.storageKeys])}function SE(t,e){if(t.gasPrice!=null){const n=V.from(t.gasPrice),i=V.from(t.maxFeePerGas||0);n.eq(i)||Mr.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const r=[cn(t.chainId||0,"chainId"),cn(t.nonce||0,"nonce"),cn(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),cn(t.maxFeePerGas||0,"maxFeePerGas"),cn(t.gasLimit||0,"gasLimit"),t.to!=null?we(t.to):"0x",cn(t.value||0,"value"),t.data||"0x",EE(t.accessList||[])];if(e){const n=Aa(e);r.push(cn(n.recoveryParam,"recoveryParam")),r.push(Ci(n.r)),r.push(Ci(n.s))}return Ur(["0x02",da(r)])}function kE(t,e){const r=[cn(t.chainId||0,"chainId"),cn(t.nonce||0,"nonce"),cn(t.gasPrice||0,"gasPrice"),cn(t.gasLimit||0,"gasLimit"),t.to!=null?we(t.to):"0x",cn(t.value||0,"value"),t.data||"0x",EE(t.accessList||[])];if(e){const n=Aa(e);r.push(cn(n.recoveryParam,"recoveryParam")),r.push(Ci(n.r)),r.push(Ci(n.s))}return Ur(["0x01",da(r)])}function xU(t,e){Bm(t,mU);const r=[];gU.forEach(function(o){let a=t[o.name]||[];const l={};o.numeric&&(l.hexPad="left"),a=X(Y(a,l)),o.length&&a.length!==o.length&&a.length>0&&Mr.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a),o.maxLength&&(a=Ci(a),a.length>o.maxLength&&Mr.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a)),r.push(Y(a))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Mr.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!rs(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(Y(n)),r.push("0x"),r.push("0x")),!e)return da(r);const i=Aa(e);let s=27+i.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),s+=n*2+8,i.v>28&&i.v!==s&&Mr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==s&&Mr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(Y(s)),r.push(Ci(X(i.r))),r.push(Ci(X(i.s))),da(r)}function vp(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Mr.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),xU(t,e);switch(t.type){case 1:return kE(t,e);case 2:return SE(t,e)}return Mr.throwError(`unsupported transaction type: ${t.type}`,q.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function _E(t,e,r){try{const n=Ir(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Mr.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=Ue(e[1],32),t.s=Ue(e[2],32);try{const n=pe(r(t));t.from=va(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function bU(t){const e=Lh(t.slice(1));e.length!==9&&e.length!==12&&Mr.throwArgumentError("invalid component count for transaction type: 2","payload",Y(t));const r=Ir(e[2]),n=Ir(e[3]),i={type:2,chainId:Ir(e[0]).toNumber(),nonce:Ir(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Ir(e[4]),to:Zm(e[5]),value:Ir(e[6]),data:e[7],accessList:ka(e[8])};return e.length===9||(i.hash=pe(t),_E(i,e.slice(9),SE)),i}function wU(t){const e=Lh(t.slice(1));e.length!==8&&e.length!==11&&Mr.throwArgumentError("invalid component count for transaction type: 1","payload",Y(t));const r={type:1,chainId:Ir(e[0]).toNumber(),nonce:Ir(e[1]).toNumber(),gasPrice:Ir(e[2]),gasLimit:Ir(e[3]),to:Zm(e[4]),value:Ir(e[5]),data:e[6],accessList:ka(e[7])};return e.length===8||(r.hash=pe(t),_E(r,e.slice(8),kE)),r}function CU(t){const e=Lh(t);e.length!==9&&e.length!==6&&Mr.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:Ir(e[0]).toNumber(),gasPrice:Ir(e[1]),gasLimit:Ir(e[2]),to:Zm(e[3]),value:Ir(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=V.from(e[6]).toNumber()}catch{return r}if(r.r=Ue(e[7],32),r.s=Ue(e[8],32),V.from(r.r).isZero()&&V.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const i=e.slice(0,6);r.chainId!==0&&(i.push(Y(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);const s=pe(da(i));try{r.from=va(s,{r:Y(r.r),s:Y(r.s),recoveryParam:n})}catch{}r.hash=pe(t)}return r.type=null,r}function TE(t){const e=X(t);if(e[0]>127)return CU(e);switch(e[0]){case 1:return wU(e);case 2:return bU(e)}return Mr.throwError(`unsupported transaction type: ${e[0]}`,q.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const AU="contracts/5.7.0";var ya=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Gt=new q(AU);function O0(t,e){return ya(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&Gt.throwArgumentError("invalid address or ENS name","name",r);try{return we(r)}catch{}t||Gt.throwError("a provider or signer is needed to resolve ENS names",q.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&Gt.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function kd(t,e,r){return ya(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,i)=>kd(t,Array.isArray(e)?e[i]:e[n.name],n))):r.type==="address"?yield O0(t,e):r.type==="tuple"?yield kd(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>kd(t,n,r.arrayChildren))):Promise.reject(Gt.makeError("invalid value for array",q.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Vh(t,e,r){return ya(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=er(r.pop())),Gt.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=qe({override:O0(t.signer,n.from),signer:t.signer.getAddress()}).then(c=>ya(this,void 0,void 0,function*(){return we(c.signer)!==c.override&&Gt.throwError("Contract with a Signer cannot override from",q.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),c.override})):n.from=t.signer.getAddress():n.from&&(n.from=O0(t.provider,n.from));const i=yield qe({args:kd(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:qe(n)||{}}),s=t.interface.encodeFunctionData(e,i.args),o={data:s,to:i.address},a=i.overrides;if(a.nonce!=null&&(o.nonce=V.from(a.nonce).toNumber()),a.gasLimit!=null&&(o.gasLimit=V.from(a.gasLimit)),a.gasPrice!=null&&(o.gasPrice=V.from(a.gasPrice)),a.maxFeePerGas!=null&&(o.maxFeePerGas=V.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=V.from(a.maxPriorityFeePerGas)),a.from!=null&&(o.from=a.from),a.type!=null&&(o.type=a.type),a.accessList!=null&&(o.accessList=ka(a.accessList)),o.gasLimit==null&&e.gas!=null){let c=21e3;const f=X(s);for(let u=0;un[c]!=null);return l.length&&Gt.throwError(`cannot override ${l.map(c=>JSON.stringify(c)).join(",")}`,q.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),o})}function EU(t,e){return function(...r){return Vh(t,e,r)}}function SU(t,e){const r=t.signer||t.provider;return function(...n){return ya(this,void 0,void 0,function*(){r||Gt.throwError("estimate require a provider or signer",q.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield Vh(t,e,n);return yield r.estimateGas(i)})}}function kU(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(i=>(i.events=i.logs.map(s=>{let o=Ti(s),a=null;try{a=t.interface.parseLog(s)}catch{}return a&&(o.args=a.args,o.decode=(l,c)=>t.interface.decodeEventLog(a.eventFragment,l,c),o.event=a.name,o.eventSignature=a.signature),o.removeListener=()=>t.provider,o.getBlock=()=>t.provider.getBlock(i.blockHash),o.getTransaction=()=>t.provider.getTransaction(i.transactionHash),o.getTransactionReceipt=()=>Promise.resolve(i),o}),i))}function PE(t,e,r){const n=t.signer||t.provider;return function(...i){return ya(this,void 0,void 0,function*(){let s;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const l=er(i.pop());l.blockTag!=null&&(s=yield l.blockTag),delete l.blockTag,i.push(l)}t.deployTransaction!=null&&(yield t._deployed(s));const o=yield Vh(t,e,i),a=yield n.call(o,s);try{let l=t.interface.decodeFunctionResult(e,a);return r&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===q.errors.CALL_EXCEPTION&&(l.address=t.address,l.args=i,l.transaction=o),l}})}}function _U(t,e){return function(...r){return ya(this,void 0,void 0,function*(){t.signer||Gt.throwError("sending a transaction requires a signer",q.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield Vh(t,e,r),i=yield t.signer.sendTransaction(n);return kU(t,i),i})}}function d6(t,e,r){return e.constant?PE(t,e,r):_U(t,e)}function IE(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class Vf{constructor(e,r){ee(this,"tag",e),ee(this,"filter",r),this._listeners=[]}addListener(e,r){this._listeners.push({listener:e,once:r})}removeListener(e){let r=!1;this._listeners=this._listeners.filter(n=>r||n.listener!==e?!0:(r=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const r=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class TU extends Vf{constructor(){super("error",null)}}class h6 extends Vf{constructor(e,r,n,i){const s={address:e};let o=r.getEventTopic(n);i?(o!==i[0]&&Gt.throwArgumentError("topic mismatch","topics",i),s.topics=i.slice()):s.topics=[o],super(IE(s),s),ee(this,"address",e),ee(this,"interface",r),ee(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(r,n)=>this.interface.decodeEventLog(this.fragment,r,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(r){e.args=null,e.decodeError=r}}getEmit(e){const r=_A(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class v6 extends Vf{constructor(e,r){super("*",{address:e}),ee(this,"address",e),ee(this,"interface",r)}prepareEvent(e){super.prepareEvent(e);try{const r=this.interface.parseLog(e);e.event=r.name,e.eventSignature=r.signature,e.decode=(n,i)=>this.interface.decodeEventLog(r.eventFragment,n,i),e.args=r.args}catch{}}}class PU{constructor(e,r,n){ee(this,"interface",Yn(new.target,"getInterface")(r)),n==null?(ee(this,"provider",null),ee(this,"signer",null)):io.isSigner(n)?(ee(this,"provider",n.provider||null),ee(this,"signer",n)):po.isProvider(n)?(ee(this,"provider",n),ee(this,"signer",null)):Gt.throwArgumentError("invalid signer or provider","signerOrProvider",n),ee(this,"callStatic",{}),ee(this,"estimateGas",{}),ee(this,"functions",{}),ee(this,"populateTransaction",{}),ee(this,"filters",{});{const o={};Object.keys(this.interface.events).forEach(a=>{const l=this.interface.events[a];ee(this.filters,a,(...c)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,c)})),o[l.name]||(o[l.name]=[]),o[l.name].push(a)}),Object.keys(o).forEach(a=>{const l=o[a];l.length===1?ee(this.filters,a,this.filters[l[0]]):Gt.warn(`Duplicate definition of ${a} (${l.join(", ")})`)})}if(ee(this,"_runningEvents",{}),ee(this,"_wrappedEmits",{}),e==null&&Gt.throwArgumentError("invalid contract address or ENS name","addressOrName",e),ee(this,"address",e),this.provider)ee(this,"resolvedAddress",O0(this.provider,e));else try{ee(this,"resolvedAddress",Promise.resolve(we(e)))}catch{Gt.throwError("provider is required to use ENS name as contract address",q.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(o=>{});const i={},s={};Object.keys(this.interface.functions).forEach(o=>{const a=this.interface.functions[o];if(s[o]){Gt.warn(`Duplicate ABI entry for ${JSON.stringify(o)}`);return}s[o]=!0;{const l=a.name;i[`%${l}`]||(i[`%${l}`]=[]),i[`%${l}`].push(o)}this[o]==null&&ee(this,o,d6(this,a,!0)),this.functions[o]==null&&ee(this.functions,o,d6(this,a,!1)),this.callStatic[o]==null&&ee(this.callStatic,o,PE(this,a,!0)),this.populateTransaction[o]==null&&ee(this.populateTransaction,o,EU(this,a)),this.estimateGas[o]==null&&ee(this.estimateGas,o,SU(this,a))}),Object.keys(i).forEach(o=>{const a=i[o];if(a.length>1)return;o=o.substring(1);const l=a[0];try{this[o]==null&&ee(this,o,this[l])}catch{}this.functions[o]==null&&ee(this.functions,o,this.functions[l]),this.callStatic[o]==null&&ee(this.callStatic,o,this.callStatic[l]),this.populateTransaction[o]==null&&ee(this.populateTransaction,o,this.populateTransaction[l]),this.estimateGas[o]==null&&ee(this.estimateGas,o,this.estimateGas[l])})}static getContractAddress(e){return Fm(e)}static getInterface(e){return tr.isInterface(e)?e:new tr(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(r=>(r==="0x"&&Gt.throwError("contract not deployed",q.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Gt.throwError("sending a transactions require a signer",q.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=er(e||{});return["from","to"].forEach(function(n){r[n]!=null&&Gt.throwError("cannot override "+n,q.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new Km(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&ee(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return M0.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new TU);if(e==="event")return this._normalizeRunningEvent(new Vf("event",null));if(e==="*")return this._normalizeRunningEvent(new v6(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new h6(this.address,this.interface,r))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const i=this.interface.getEvent(n);return this._normalizeRunningEvent(new h6(this.address,this.interface,i,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new Vf(IE(r),r))}return this._normalizeRunningEvent(new v6(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const r=this._wrappedEmits[e.tag];r&&e.filter&&(this.provider.off(e.filter,r),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,r,n){const i=Ti(r);return i.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(r.blockHash),i.getTransaction=()=>this.provider.getTransaction(r.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(i),i}_addEventListener(e,r,n){if(this.provider||Gt.throwError("events require a provider or a signer with a provider",q.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const i=s=>{let o=this._wrapEvent(e,s,r);if(o.decodeError==null)try{const a=e.getEmit(o);this.emit(e.filter,...a)}catch(a){o.decodeError=a.error}e.filter!=null&&this.emit("event",o),o.decodeError!=null&&this.emit("error",o.decodeError,o)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,r,n){const i=this._getRunningEvent(e),s=er(i.filter);return typeof r=="string"&&Te(r,32)?(n!=null&&Gt.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),s.blockHash=r):(s.fromBlock=r??0,s.toBlock=n??"latest"),this.provider.getLogs(s).then(o=>o.map(a=>this._wrapEvent(i,a,null)))}on(e,r){return this._addEventListener(this._getRunningEvent(e),r,!1),this}once(e,r){return this._addEventListener(this._getRunningEvent(e),r,!0),this}emit(e,...r){if(!this.provider)return!1;const n=this._getRunningEvent(e),i=n.run(r)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((r,n)=>r+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const r=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{r.push(i)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}const r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}off(e,r){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(r),this._checkRunningEvents(n),this}removeListener(e,r){return this.off(e,r)}}class _a extends PU{}class ME{constructor(e){ee(this,"alphabet",e),ee(this,"base",e.length),ee(this,"_alphabetMap",{}),ee(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(o%this.base),o=o/this.base|0}let i="";for(let s=0;r[s]===0&&s=0;--s)i+=this.alphabet[n[s]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;s>0;)r.push(s&255),s>>=8}for(let n=0;e[n]===this._leader&&n>24&255,l[e.length+1]=u>>16&255,l[e.length+2]=u>>8&255,l[e.length+3]=u&255;let h=X(Hf(i,t,l));s||(s=h.length,f=new Uint8Array(s),o=Math.ceil(n/s),c=n-(o-1)*s),f.set(h);for(let p=1;p>5,this.byteCount=this.blockCount<<2,this.outputBlocks=L>>5,this.extraBytes=(L&31)>>3;for(var z=0;z<50;++z)this.s[z]=0}d.prototype.update=function(x){if(this.finalized)throw new Error(r);var $,L=typeof x;if(L!=="string"){if(L==="object"){if(x===null)throw new Error(e);if(l&&x.constructor===ArrayBuffer)x=new Uint8Array(x);else if(!Array.isArray(x)&&(!l||!ArrayBuffer.isView(x)))throw new Error(e)}else throw new Error(e);$=!0}for(var z=this.blocks,G=this.byteCount,F=x.length,V=this.blockCount,W=0,oe=this.s,re,ae;W>2]|=x[W]<>2]|=ae<>2]|=(192|ae>>6)<>2]|=(128|ae&63)<=57344?(z[re>>2]|=(224|ae>>12)<>2]|=(128|ae>>6&63)<>2]|=(128|ae&63)<>2]|=(240|ae>>18)<>2]|=(128|ae>>12&63)<>2]|=(128|ae>>6&63)<>2]|=(128|ae&63)<=G){for(this.start=re-G,this.block=z[V],re=0;re>8,L=x&255;L>0;)G.unshift(L),x=x>>8,L=x&255,++z;return $?G.push(z):G.unshift(z),this.update(G),G.length},d.prototype.encodeString=function(x){var $,L=typeof x;if(L!=="string"){if(L==="object"){if(x===null)throw new Error(e);if(l&&x.constructor===ArrayBuffer)x=new Uint8Array(x);else if(!Array.isArray(x)&&(!l||!ArrayBuffer.isView(x)))throw new Error(e)}else throw new Error(e);$=!0}var z=0,G=x.length;if($)z=G;else for(var F=0;F=57344?z+=3:(V=65536+((V&1023)<<10|x.charCodeAt(++F)&1023),z+=4)}return z+=this.encode(z*8),this.update(x),z},d.prototype.bytepad=function(x,$){for(var L=this.encode($),z=0;z>2]|=this.padding[$&3],this.lastByteIndex===this.byteCount)for(x[0]=x[L],$=1;$>4&15]+c[W&15]+c[W>>12&15]+c[W>>8&15]+c[W>>20&15]+c[W>>16&15]+c[W>>28&15]+c[W>>24&15];F%x===0&&(O($),G=0)}return z&&(W=$[G],V+=c[W>>4&15]+c[W&15],z>1&&(V+=c[W>>12&15]+c[W>>8&15]),z>2&&(V+=c[W>>20&15]+c[W>>16&15])),V},d.prototype.arrayBuffer=function(){this.finalize();var x=this.blockCount,$=this.s,L=this.outputBlocks,z=this.extraBytes,G=0,F=0,V=this.outputBits>>3,W;z?W=new ArrayBuffer(L+1<<2):W=new ArrayBuffer(V);for(var oe=new Uint32Array(W);F>8&255,V[W+2]=oe>>16&255,V[W+3]=oe>>24&255;F%x===0&&O($)}return z&&(W=F<<2,oe=$[G],V[W]=oe&255,z>1&&(V[W+1]=oe>>8&255),z>2&&(V[W+2]=oe>>16&255)),V};function T(x,$,L){d.call(this,x,$,L)}T.prototype=new d,T.prototype.finalize=function(){return this.encode(this.outputBits,!0),d.prototype.finalize.call(this)};var O=function(x){var $,L,z,G,F,V,W,oe,re,ae,De,Ee,Ce,Pt,We,Le,mo,Qe,Xe,xo,Ze,et,bo,tt,rt,wo,nt,it,Co,st,ot,Eo,at,lt,So,ct,ft,ko,ut,dt,Ao,ht,vt,_o,yt,pt,To,gt,mt,Po,xt,bt,Io,wt,Ct,Ro,Et,St,vs,ys,ps,gs,ms;for(z=0;z<48;z+=2)G=x[0]^x[10]^x[20]^x[30]^x[40],F=x[1]^x[11]^x[21]^x[31]^x[41],V=x[2]^x[12]^x[22]^x[32]^x[42],W=x[3]^x[13]^x[23]^x[33]^x[43],oe=x[4]^x[14]^x[24]^x[34]^x[44],re=x[5]^x[15]^x[25]^x[35]^x[45],ae=x[6]^x[16]^x[26]^x[36]^x[46],De=x[7]^x[17]^x[27]^x[37]^x[47],Ee=x[8]^x[18]^x[28]^x[38]^x[48],Ce=x[9]^x[19]^x[29]^x[39]^x[49],$=Ee^(V<<1|W>>>31),L=Ce^(W<<1|V>>>31),x[0]^=$,x[1]^=L,x[10]^=$,x[11]^=L,x[20]^=$,x[21]^=L,x[30]^=$,x[31]^=L,x[40]^=$,x[41]^=L,$=G^(oe<<1|re>>>31),L=F^(re<<1|oe>>>31),x[2]^=$,x[3]^=L,x[12]^=$,x[13]^=L,x[22]^=$,x[23]^=L,x[32]^=$,x[33]^=L,x[42]^=$,x[43]^=L,$=V^(ae<<1|De>>>31),L=W^(De<<1|ae>>>31),x[4]^=$,x[5]^=L,x[14]^=$,x[15]^=L,x[24]^=$,x[25]^=L,x[34]^=$,x[35]^=L,x[44]^=$,x[45]^=L,$=oe^(Ee<<1|Ce>>>31),L=re^(Ce<<1|Ee>>>31),x[6]^=$,x[7]^=L,x[16]^=$,x[17]^=L,x[26]^=$,x[27]^=L,x[36]^=$,x[37]^=L,x[46]^=$,x[47]^=L,$=ae^(G<<1|F>>>31),L=De^(F<<1|G>>>31),x[8]^=$,x[9]^=L,x[18]^=$,x[19]^=L,x[28]^=$,x[29]^=L,x[38]^=$,x[39]^=L,x[48]^=$,x[49]^=L,Pt=x[0],We=x[1],pt=x[11]<<4|x[10]>>>28,To=x[10]<<4|x[11]>>>28,it=x[20]<<3|x[21]>>>29,Co=x[21]<<3|x[20]>>>29,ys=x[31]<<9|x[30]>>>23,ps=x[30]<<9|x[31]>>>23,ht=x[40]<<18|x[41]>>>14,vt=x[41]<<18|x[40]>>>14,lt=x[2]<<1|x[3]>>>31,So=x[3]<<1|x[2]>>>31,Le=x[13]<<12|x[12]>>>20,mo=x[12]<<12|x[13]>>>20,gt=x[22]<<10|x[23]>>>22,mt=x[23]<<10|x[22]>>>22,st=x[33]<<13|x[32]>>>19,ot=x[32]<<13|x[33]>>>19,gs=x[42]<<2|x[43]>>>30,ms=x[43]<<2|x[42]>>>30,wt=x[5]<<30|x[4]>>>2,Ct=x[4]<<30|x[5]>>>2,ct=x[14]<<6|x[15]>>>26,ft=x[15]<<6|x[14]>>>26,Qe=x[25]<<11|x[24]>>>21,Xe=x[24]<<11|x[25]>>>21,Po=x[34]<<15|x[35]>>>17,xt=x[35]<<15|x[34]>>>17,Eo=x[45]<<29|x[44]>>>3,at=x[44]<<29|x[45]>>>3,tt=x[6]<<28|x[7]>>>4,rt=x[7]<<28|x[6]>>>4,Ro=x[17]<<23|x[16]>>>9,Et=x[16]<<23|x[17]>>>9,ko=x[26]<<25|x[27]>>>7,ut=x[27]<<25|x[26]>>>7,xo=x[36]<<21|x[37]>>>11,Ze=x[37]<<21|x[36]>>>11,bt=x[47]<<24|x[46]>>>8,Io=x[46]<<24|x[47]>>>8,_o=x[8]<<27|x[9]>>>5,yt=x[9]<<27|x[8]>>>5,wo=x[18]<<20|x[19]>>>12,nt=x[19]<<20|x[18]>>>12,St=x[29]<<7|x[28]>>>25,vs=x[28]<<7|x[29]>>>25,dt=x[38]<<8|x[39]>>>24,Ao=x[39]<<8|x[38]>>>24,et=x[48]<<14|x[49]>>>18,bo=x[49]<<14|x[48]>>>18,x[0]=Pt^~Le&Qe,x[1]=We^~mo&Xe,x[10]=tt^~wo&it,x[11]=rt^~nt&Co,x[20]=lt^~ct&ko,x[21]=So^~ft&ut,x[30]=_o^~pt>,x[31]=yt^~To&mt,x[40]=wt^~Ro&St,x[41]=Ct^~Et&vs,x[2]=Le^~Qe&xo,x[3]=mo^~Xe&Ze,x[12]=wo^~it&st,x[13]=nt^~Co&ot,x[22]=ct^~ko&dt,x[23]=ft^~ut&Ao,x[32]=pt^~gt&Po,x[33]=To^~mt&xt,x[42]=Ro^~St&ys,x[43]=Et^~vs&ps,x[4]=Qe^~xo&et,x[5]=Xe^~Ze&bo,x[14]=it^~st&Eo,x[15]=Co^~ot&at,x[24]=ko^~dt&ht,x[25]=ut^~Ao&vt,x[34]=gt^~Po&bt,x[35]=mt^~xt&Io,x[44]=St^~ys&gs,x[45]=vs^~ps&ms,x[6]=xo^~et&Pt,x[7]=Ze^~bo&We,x[16]=st^~Eo&tt,x[17]=ot^~at&rt,x[26]=dt^~ht<,x[27]=Ao^~vt&So,x[36]=Po^~bt&_o,x[37]=xt^~Io&yt,x[46]=ys^~gs&wt,x[47]=ps^~ms&Ct,x[8]=et^~Pt&Le,x[9]=bo^~We&mo,x[18]=Eo^~tt&wo,x[19]=at^~rt&nt,x[28]=ht^~lt&ct,x[29]=vt^~So&ft,x[38]=bt^~_o&pt,x[39]=Io^~yt&To,x[48]=gs^~wt&Ro,x[49]=ms^~Ct&Et,x[0]^=p[z],x[1]^=p[z+1]};if(a)t.exports=v;else for(P=0;P>=8;return e}function Jw(t,e,r){let n=0;for(let i=0;ie+1+n&&fi.throwError("child data too short",q.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function kE(t,e){if(t.length===0&&fi.throwError("data too short",q.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&fi.throwError("data short segment too short",q.errors.BUFFER_OVERRUN,{});const n=Jw(t,e+1,r);return e+1+r+n>t.length&&fi.throwError("data long segment too short",q.errors.BUFFER_OVERRUN,{}),Yw(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&fi.throwError("data array too short",q.errors.BUFFER_OVERRUN,{}),Yw(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&fi.throwError("data array too short",q.errors.BUFFER_OVERRUN,{});const n=Jw(t,e+1,r);e+1+r+n>t.length&&fi.throwError("data array too short",q.errors.BUFFER_OVERRUN,{});const i=Q(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:i}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&fi.throwError("data too short",q.errors.BUFFER_OVERRUN,{});const n=Q(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:Q(t[e])}}function Lh(t){const e=X(t),r=kE(e,0);return r.consumed!==e.length&&fi.throwArgumentError("invalid rlp data","data",t),r.result}const tF=Object.freeze(Object.defineProperty({__proto__:null,decode:Lh,encode:da},Symbol.toStringTag,{value:"Module"})),rF="address/5.7.0",Ns=new q(rF);function Qw(t){Pe(t,20)||Ns.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=X(pe(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const nF=9007199254740991;function iF(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const Bm={};for(let t=0;t<10;t++)Bm[String(t)]=String(t);for(let t=0;t<26;t++)Bm[String.fromCharCode(65+t)]=String(10+t);const Xw=Math.floor(iF(nF));function AE(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>Bm[n]).join("");for(;e.length>=Xw;){let n=e.substring(0,Xw);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function we(t){let e=null;if(typeof t!="string"&&Ns.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=Qw(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Ns.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==AE(t)&&Ns.throwArgumentError("bad icap checksum","address",t),e=jB(t.substring(4));e.length<40;)e="0"+e;e=Qw("0x"+e)}else Ns.throwArgumentError("invalid address","address",t);return e}function _E(t){try{return we(t),!0}catch{}return!1}function sF(t){let e=zB(we(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+AE("XE00"+e)+e}function Fm(t){let e=null;try{e=we(t.from)}catch{Ns.throwArgumentError("missing from address","transaction",t)}const r=Ci(X(H.from(t.nonce).toHexString()));return we(Vt(pe(da([e,r])),12))}function oF(t,e,r){return _i(e)!==32&&Ns.throwArgumentError("salt must be 32 bytes","salt",e),_i(r)!==32&&Ns.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),we(Vt(pe(Ue(["0xff",we(t),e,r])),12))}class aF extends cs{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=we(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return we(Ve(e.readValue().toHexString(),20))}}class lF extends cs{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}const il=new q(au);function TE(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let l={};n=e.map(c=>{const f=c.localName;return f||il.throwError("cannot encode object for signature with missing names",q.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]&&il.throwError("cannot encode object for signature with duplicate names",q.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]=!0,r[f]})}else il.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&il.throwArgumentError("types/value length mismatch","tuple",r);let i=new op(t.wordSize),s=new op(t.wordSize),o=[];e.forEach((l,c)=>{let f=n[c];if(l.dynamic){let u=s.length;l.encode(s,f);let h=i.writeUpdatableValue();o.push(y=>{h(y+u)})}else l.encode(i,f)}),o.forEach(l=>{l(i.length)});let a=t.appendWriter(i);return a+=t.appendWriter(s),a}function PE(t,e){let r=[],n=t.subReader(0);e.forEach(s=>{let o=null;if(s.dynamic){let a=t.readValue(),l=n.subReader(a.toNumber());try{o=s.decode(l)}catch(c){if(c.code===q.errors.BUFFER_OVERRUN)throw c;o=c,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(t)}catch(a){if(a.code===q.errors.BUFFER_OVERRUN)throw a;o=a,o.baseType=s.name,o.name=s.localName,o.type=s.type}o!=null&&r.push(o)});const i=e.reduce((s,o)=>{const a=o.localName;return a&&(s[a]||(s[a]=0),s[a]++),s},{});e.forEach((s,o)=>{let a=s.localName;if(!a||i[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;const l=r[o];l instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw l}}):r[a]=l});for(let s=0;s{throw o}})}return Object.freeze(r)}class cF extends cs{constructor(e,r,n){const i=e.type+"["+(r>=0?r:"")+"]",s=r===-1||e.dynamic;super("array",i,n,s),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&il.throwError("insufficient data length",q.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let i=0;i>6===2;o++)s++;return s}return t===Qr.OVERRUN?r.length-e-1:0}function xF(t,e,r,n,i){return t===Qr.OVERLONG?(n.push(i),0):(n.push(65533),OE(t,e,r))}const $E=Object.freeze({error:mF,ignore:OE,replace:xF});function zm(t,e){e==null&&(e=$E.error),t=X(t);const r=[];let n=0;for(;n>7)){r.push(i);continue}let s=null,o=null;if((i&224)===192)s=1,o=127;else if((i&240)===224)s=2,o=2047;else if((i&248)===240)s=3,o=65535;else{(i&192)===128?n+=e(Qr.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(Qr.BAD_PREFIX,n-1,t,r);continue}if(n-1+s>=t.length){n+=e(Qr.OVERRUN,n-1,t,r);continue}let a=i&(1<<8-s-1)-1;for(let l=0;l1114111){n+=e(Qr.OUT_OF_RANGE,n-1-s,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(Qr.UTF16_SURROGATE,n-1-s,t,r,a);continue}if(a<=o){n+=e(Qr.OVERLONG,n-1-s,t,r,a);continue}r.push(a)}}return r}function He(t,e=Pi.current){e!=Pi.current&&(NE.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const s=t.charCodeAt(n);if(n>=t.length||(s&64512)!==56320)throw new Error("invalid utf-8 string");const o=65536+((i&1023)<<10)+(s&1023);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return X(r)}function gv(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function bF(t,e){return'"'+zm(t,e).map(r=>{if(r<256){switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(r>=32&&r<127)return String.fromCharCode(r)}return r<=65535?gv(r):(r-=65536,gv((r>>10&1023)+55296)+gv((r&1023)+56320))}).join("")+'"'}function ap(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function fs(t,e){return ap(zm(t,e))}function P0(t,e=Pi.current){return zm(He(t,e))}function wF(t){const e=He(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Q(Ue([e,T0]).slice(0,32))}function CF(t){const e=X(t);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;e[r-1]===0;)r--;return fs(e.slice(0,r))}function EF(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{let s=i.split(":");r+=parseInt(s[0],16),n[r]=e(s[1])}),n}function DE(t){let e=0;return t.split(",").map(r=>{let n=r.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function Vm(t,e){let r=0;for(let n=0;n=r&&t<=r+i.h&&(t-r)%(i.d||1)===0){if(i.e&&i.e.indexOf(t-r)!==-1)continue;return i}}return null}const SF=DE("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),kF="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),AF=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],_F=Um("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),TF=Um("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),PF=Um("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",EF),IF=DE("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function RF(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function MF(t){return!!Vm(t,SF)}function NF(t){let e=Vm(t,AF);if(e)return[t+e.s];let r=_F[t];if(r)return r;let n=TF[t];if(n)return[t+n[0]];let i=PF[t];return i||null}function OF(t){return!!Vm(t,IF)}function $F(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=P0(t);e=RF(e.map(n=>{if(kF.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=NF(n);return i||[n]})),e=P0(ap(e),Pi.NFKC),e.forEach(n=>{if(OF(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(MF(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=ap(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}class DF extends IE{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,He(r))}decode(e){return fs(super.decode(e))}}class Yu extends cs{constructor(e,r){let n=!1;const i=[];e.forEach(o=>{o.dynamic&&(n=!0),i.push(o.type)});const s="tuple("+i.join(",")+")";super("tuple",s,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,i)=>{const s=i.localName;return s&&(n[s]||(n[s]=0),n[s]++),n},{});return this.coders.forEach((n,i)=>{let s=n.localName;!s||r[s]!==1||(s==="length"&&(s="_length"),e[s]==null&&(e[s]=e[i]))}),Object.freeze(e)}encode(e,r){return TE(e,this.coders,r)}decode(e){return e.coerce(this.name,PE(e,this.coders))}}const Qu=new q(au),LF=new RegExp(/^bytes([0-9]*)$/),BF=new RegExp(/^(u?int)([0-9]*)$/);class Hm{constructor(e){te(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new aF(e.name);case"bool":return new fF(e.name);case"string":return new DF(e.name);case"bytes":return new uF(e.name);case"array":return new cF(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new Yu((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new hF(e.name)}let r=e.type.match(BF);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&Qu.throwArgumentError("invalid "+r[1]+" bit length","param",e),new pF(n/8,r[1]==="int",e.name)}if(r=e.type.match(LF),r){let n=parseInt(r[1]);return(n===0||n>32)&&Qu.throwArgumentError("invalid bytes length","param",e),new dF(n,e.name)}return Qu.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new _0(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new op(this._getWordSize())}getDefaultValue(e){const r=e.map(i=>this._getCoder(ar.from(i)));return new Yu(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&Qu.throwError("types/values length mismatch",q.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(o=>this._getCoder(ar.from(o))),i=new Yu(n,"_"),s=this._getWriter();return i.encode(s,r),s.data}decode(e,r,n){const i=e.map(o=>this._getCoder(ar.from(o)));return new Yu(i,"_").decode(this._getReader(X(r),n))}}const qr=new Hm;function Os(t){return pe(He(t))}const LE="hash/5.7.0";function Wm(t){t=atob(t);const e=[];for(let r=0;r0&&Array.isArray(a)?i(a,o-1):r.push(a)})};return i(t,e),r}function jF(t){const e={};for(let r=0;r>--l&1}const u=31,h=Math.pow(2,u),y=h>>>1,m=y>>1,p=h-1;let k=0;for(let M=0;M1;){let J=B+U>>>1;M>>1|f(),j=j<<1^y,K=(K^y)<<1|y|1;E=j,A=1+K-j}let I=n-4;return w.map(M=>{switch(M-I){case 3:return I+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return I+256+(t[a++]<<8|t[a++]);case 1:return I+t[a++];default:return M-1}})}function UF(t){let e=0;return()=>t[e++]}function VF(t){return UF(zF(t))}function HF(t){return t&1?~t>>1:t>>1}function WF(t,e){let r=Array(t);for(let n=0;ne[o]):r}function GF(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(JF(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(YF(r,t))}return jF(BE(e))}function KF(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function FE(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;in[o].push(s));return n}function JF(t,e){let r=1+e(),n=e(),i=KF(e),s=FE(i.length,1+t,e);return BE(s.map((o,a)=>{const l=o[0],c=o.slice(1);return Array(i[a]).fill(void 0).map((f,u)=>{let h=u*n;return[l+u*r,c.map(y=>y+h)]})}))}function YF(t,e){let r=1+e();return FE(r,1+t,e).map(i=>[i[0],i.slice(1)])}function QF(t){let e=I0(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let c=I0(t,e);if(c.length==0)break;n.push({set:new Set(c),node:r()})}n.sort((c,f)=>f.set.size-c.set.size);let i=t(),s=i%3;i=i/3|0;let o=!!(i&1);i>>=1;let a=i==1,l=i==2;return{branches:n,valid:s,fe0f:o,save:a,check:l}}}function XF(){return VF(Wm("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const Bh=XF(),ZF=new Set(I0(Bh)),ej=new Set(I0(Bh)),tj=GF(Bh),rj=QF(Bh),e6=45,t6=95;function jE(t){return P0(t)}function nj(t){return t.filter(e=>e!=65039)}function zE(t){for(let e of t.split(".")){let r=jE(e);try{for(let n=r.lastIndexOf(t6)-1;n>=0;n--)if(r[n]!==t6)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===e6&&r[3]===e6)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function ij(t){return zE(sj(t,nj))}function sj(t,e){let r=jE(t).reverse(),n=[];for(;r.length;){let i=aj(r);if(i){n.push(...e(i));continue}let s=r.pop();if(ZF.has(s)){n.push(s);continue}if(ej.has(s))continue;let o=tj[s];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${s.toString(16).toUpperCase()}`)}return zE(oj(String.fromCodePoint(...n)))}function oj(t){return t.normalize("NFC")}function aj(t,e){var r;let n=rj,i,s,o=[],a=t.length;for(e&&(e.length=0);a;){let l=t[--a];if(n=(r=n.branches.find(c=>c.set.has(l)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)s=l;else if(n.check&&l===s)break;o.push(l),n.fe0f&&(o.push(65039),a>0&&t[a-1]==65039&&a--),n.valid&&(i=o.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return i}const lj=new q(LE),UE=new Uint8Array(32);UE.fill(0);function r6(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function Gm(t){const e=He(ij(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return r.push(r6(e.slice(n))),r}function cj(t){try{return Gm(t).length!==0}catch{}return!1}function ef(t){typeof t!="string"&&lj.throwArgumentError("invalid ENS name; not a string","name",t);let e=UE;const r=Gm(t);for(;r.length;)e=pe(Ue([e,pe(r.pop())]));return Q(e)}function VE(t){return Q(Ue(Gm(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}const fj=`Ethereum Signed Message: +`;function Fh(t){return typeof t=="string"&&(t=He(t)),pe(Ue([He(fj),He(String(t.length)),t]))}var uj=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const $t=new q(LE),HE=new Uint8Array(32);HE.fill(0);const dj=H.from(-1),WE=H.from(0),qE=H.from(1),hj=H.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function vj(t){const e=X(t),r=e.length%32;return r?Ur([e,HE.slice(r)]):Q(e)}const yj=Ve(qE.toHexString(),32),pj=Ve(WE.toHexString(),32),n6={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},mv=["name","version","chainId","verifyingContract","salt"];function i6(t){return function(e){return typeof e!="string"&&$t.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const gj={name:i6("name"),version:i6("version"),chainId:function(t){try{return H.from(t).toString()}catch{}return $t.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return we(t).toLowerCase()}catch{}return $t.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=X(t);if(e.length!==32)throw new Error("bad length");return Q(e)}catch{}return $t.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function xv(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&$t.throwArgumentError("invalid numeric width","type",t);const i=hj.mask(r?n-1:n),s=r?i.add(qE).mul(dj):WE;return function(o){const a=H.from(o);return(a.lt(s)||a.gt(i))&&$t.throwArgumentError(`value out-of-bounds for ${t}`,"value",o),Ve(a.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&&$t.throwArgumentError("invalid bytes width","type",t),function(n){return X(n).length!==r&&$t.throwArgumentError(`invalid length for ${t}`,"value",n),vj(n)}}}switch(t){case"address":return function(e){return Ve(we(e),32)};case"bool":return function(e){return e?yj:pj};case"bytes":return function(e){return pe(e)};case"string":return function(e){return Os(e)}}return null}function s6(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class Qt{constructor(e){te(this,"types",Object.freeze(Ti(e))),te(this,"_encoderCache",{}),te(this,"_types",{});const r={},n={},i={};Object.keys(e).forEach(a=>{r[a]={},n[a]=[],i[a]={}});for(const a in e){const l={};e[a].forEach(c=>{l[c.name]&&$t.throwArgumentError(`duplicate variable name ${JSON.stringify(c.name)} in ${JSON.stringify(a)}`,"types",e),l[c.name]=!0;const f=c.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===a&&$t.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!xv(f)&&(n[f]||$t.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),n[f].push(a),r[a][f]=!0)})}const s=Object.keys(n).filter(a=>n[a].length===0);s.length===0?$t.throwArgumentError("missing primary type","types",e):s.length>1&&$t.throwArgumentError(`ambiguous primary types or unused types: ${s.map(a=>JSON.stringify(a)).join(", ")}`,"types",e),te(this,"primaryType",s[0]);function o(a,l){l[a]&&$t.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),l[a]=!0,Object.keys(r[a]).forEach(c=>{n[c]&&(o(c,l),Object.keys(l).forEach(f=>{i[f][c]=!0}))}),delete l[a]}o(this.primaryType,{});for(const a in i){const l=Object.keys(i[a]);l.sort(),this._types[a]=s6(a,e[a])+l.map(c=>s6(c,e[c])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=xv(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],s=this.getEncoder(i),o=parseInt(r[3]);return a=>{o>=0&&a.length!==o&&$t.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let l=a.map(s);return this._types[i]&&(l=l.map(pe)),pe(Ur(l))}}const n=this.types[e];if(n){const i=Os(this._types[e]);return s=>{const o=n.map(({name:a,type:l})=>{const c=this.getEncoder(l)(s[a]);return this._types[l]?pe(c):c});return o.unshift(i),Ur(o)}}return $t.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||$t.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return pe(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(xv(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const o=i[1],a=parseInt(i[3]);return a>=0&&r.length!==a&&$t.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(l=>this._visit(o,l,n))}const s=this.types[e];return s?s.reduce((o,{name:a,type:l})=>(o[a]=this._visit(l,r[a],n),o),{}):$t.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Qt(e)}static getPrimaryType(e){return Qt.from(e).primaryType}static hashStruct(e,r,n){return Qt.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const i=n6[n];i||$t.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>mv.indexOf(n.name)-mv.indexOf(i.name)),Qt.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Ur(["0x1901",Qt.hashDomain(e),Qt.from(r).hash(n)])}static hash(e,r,n){return pe(Qt.encode(e,r,n))}static resolveNames(e,r,n,i){return uj(this,void 0,void 0,function*(){e=er(e);const s={};e.verifyingContract&&!Pe(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const o=Qt.from(r);o.visit(n,(a,l)=>(a==="address"&&!Pe(l,20)&&(s[l]="0x"),l));for(const a in s)s[a]=yield i(a);return e.verifyingContract&&s[e.verifyingContract]&&(e.verifyingContract=s[e.verifyingContract]),n=o.visit(n,(a,l)=>a==="address"&&s[l]?s[l]:l),{domain:e,value:n}})}static getPayload(e,r,n){Qt.hashDomain(e);const i={},s=[];mv.forEach(l=>{const c=e[l];c!=null&&(i[l]=gj[l](c),s.push({name:l,type:n6[l]}))});const o=Qt.from(r),a=er(r);return a.EIP712Domain?$t.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):a.EIP712Domain=s,o.encode(n),{types:a,domain:i,primaryType:o.primaryType,message:o.visit(n,(l,c)=>{if(l.match(/^bytes(\d*)/))return Q(X(c));if(l.match(/^u?int/))return H.from(c).toString();switch(l){case"address":return c.toLowerCase();case"bool":return!!c;case"string":return typeof c!="string"&&$t.throwArgumentError("invalid string","value",c),c}return $t.throwArgumentError("unsupported type","type",l)})}}}const Ot=new q(au);class GE extends Sa{}class KE extends Sa{}class mj extends Sa{}class R0 extends Sa{static isIndexed(e){return!!(e&&e._isIndexed)}}const xj={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function o6(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class tr{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,te(this,"fragments",r.map(n=>yi.from(n)).filter(n=>n!=null)),te(this,"_abiCoder",Qn(new.target,"getAbiCoder")()),te(this,"functions",{}),te(this,"errors",{}),te(this,"events",{}),te(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){Ot.warn("duplicate definition - constructor");return}te(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let s=n.format();if(i[s]){Ot.warn("duplicate definition - "+s);return}i[s]=n}),this.deploy||te(this,"deploy",Jn.from({payable:!1,type:"constructor"})),te(this,"_isInterface",!0)}format(e){e||(e=Ne.full),e===Ne.sighash&&Ot.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===Ne.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return qr}static getAddress(e){return we(e)}static getSighash(e){return Vt(Os(e.format()),0,4)}static getEventTopic(e){return Os(e.format())}getFunction(e){if(Pe(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];Ot.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.functions).filter(s=>s.split("(")[0]===n);return i.length===0?Ot.throwArgumentError("no matching function","name",n):i.length>1&&Ot.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const r=this.functions[Yn.fromString(e).format()];return r||Ot.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(Pe(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];Ot.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.events).filter(s=>s.split("(")[0]===n);return i.length===0?Ot.throwArgumentError("no matching event","name",n):i.length>1&&Ot.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const r=this.events[vi.fromString(e).format()];return r||Ot.throwArgumentError("no matching event","signature",e),r}getError(e){if(Pe(e)){const n=Qn(this.constructor,"getSighash");for(const i in this.errors){const s=this.errors[i];if(e===n(s))return this.errors[i]}Ot.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.errors).filter(s=>s.split("(")[0]===n);return i.length===0?Ot.throwArgumentError("no matching error","name",n):i.length>1&&Ot.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const r=this.errors[Yn.fromString(e).format()];return r||Ot.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(r){try{e=this.getError(e)}catch{throw r}}return Qn(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),Qn(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));const n=X(r);return Q(n.slice(0,4))!==this.getSighash(e)&&Ot.throwArgumentError(`data signature does not match error ${e.name}.`,"data",Q(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),Q(Ue([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=X(r);return Q(n.slice(0,4))!==this.getSighash(e)&&Ot.throwArgumentError(`data signature does not match function ${e.name}.`,"data",Q(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),Q(Ue([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=X(r),i=null,s="",o=null,a=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const c=Q(n.slice(0,4)),f=xj[c];if(f)o=this._abiCoder.decode(f.inputs,n.slice(4)),a=f.name,l=f.signature,f.reason&&(i=o[0]),a==="Error"?s=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:a==="Panic"&&(s=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const u=this.getError(c);o=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,l=u.format()}catch{}break}}return Ot.throwError("call revert exception"+s,q.errors.CALL_EXCEPTION,{method:e.format(),data:Q(r),errorArgs:o,errorName:a,errorSignature:l,reason:i})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),Q(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&Ot.throwError("too many arguments for "+e.format(),q.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(s,o)=>s.type==="string"?Os(o):s.type==="bytes"?pe(Q(o)):(s.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),s.type.match(/^u?int/)&&(o=H.from(o).toHexString()),s.type==="address"&&this._abiCoder.encode(["address"],[o]),Ve(Q(o),32));for(r.forEach((s,o)=>{let a=e.inputs[o];if(!a.indexed){s!=null&&Ot.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,s);return}s==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?Ot.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,s):Array.isArray(s)?n.push(s.map(l=>i(a,l))):n.push(i(a,s))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],i=[],s=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&Ot.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const l=r[a];if(o.indexed)if(o.type==="string")n.push(Os(l));else if(o.type==="bytes")n.push(pe(l));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([o.type],[l]))}else i.push(o),s.push(l)}),{data:this._abiCoder.encode(i,s),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let h=this.getEventTopic(e);(!Pe(n[0],32)||n[0].toLowerCase()!==h)&&Ot.throwError("fragment/topic mismatch",q.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:h,value:n[0]}),n=n.slice(1)}let i=[],s=[],o=[];e.inputs.forEach((h,y)=>{h.indexed?h.type==="string"||h.type==="bytes"||h.baseType==="tuple"||h.baseType==="array"?(i.push(ar.fromObject({type:"bytes32",name:h.name})),o.push(!0)):(i.push(h),o.push(!1)):(s.push(h),o.push(!1))});let a=n!=null?this._abiCoder.decode(i,Ue(n)):null,l=this._abiCoder.decode(s,r,!0),c=[],f=0,u=0;e.inputs.forEach((h,y)=>{if(h.indexed)if(a==null)c[y]=new R0({_isIndexed:!0,hash:null});else if(o[y])c[y]=new R0({_isIndexed:!0,hash:a[u++]});else try{c[y]=a[u++]}catch(m){c[y]=m}else try{c[y]=l[f++]}catch(m){c[y]=m}if(h.name&&c[h.name]==null){const m=c[y];m instanceof Error?Object.defineProperty(c,h.name,{enumerable:!0,get:()=>{throw o6(`property ${JSON.stringify(h.name)}`,m)}}):c[h.name]=m}});for(let h=0;h{throw o6(`index ${h}`,y)}})}return Object.freeze(c)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new KE({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:H.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new GE({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=Q(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new mj({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const bj="abstract-provider/5.7.0";var wj=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Cj=new q(bj);class Ej extends Sa{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class po{constructor(){Cj.checkAbstract(new.target,po),te(this,"_isProvider",!0)}getFeeData(){return wj(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield Ge({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(o=>null)});let n=null,i=null,s=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,s=H.from("1500000000"),i=e.baseFeePerGas.mul(2).add(s)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:s,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const Sj="abstract-signer/5.7.0";var Fn=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Cn=new q(Sj),kj=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Aj=[q.errors.INSUFFICIENT_FUNDS,q.errors.NONCE_EXPIRED,q.errors.REPLACEMENT_UNDERPRICED];let io=class JE{constructor(){Cn.checkAbstract(new.target,JE),te(this,"_isSigner",!0)}getBalance(e){return Fn(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Fn(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Fn(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield Ge(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return Fn(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield Ge(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return Fn(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return Fn(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Fn(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Fn(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Fn(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)kj.indexOf(n)===-1&&Cn.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=er(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&Cn.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return Fn(this,void 0,void 0,function*(){const r=yield Ge(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>Fn(this,void 0,void 0,function*(){if(i==null)return null;const s=yield this.resolveName(i);return s==null&&Cn.throwArgumentError("provided ENS name resolves to null","tx.to",i),s})),r.to.catch(i=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?Cn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&Cn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(r.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const s=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=s,r.maxPriorityFeePerGas=s}else r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&Cn.throwError("network does not support EIP-1559",q.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):Cn.throwError("failed to get consistent fee data",q.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(i=>{if(Aj.indexOf(i.code)>=0)throw i;return Cn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",q.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&Cn.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Ge(r)})}_checkProvider(e){this.provider||Cn.throwError("missing provider",q.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}};class Km extends io{constructor(e,r){super(),te(this,"address",e),te(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{Cn.throwError(e,q.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new Km(this.address,e)}}var YE={},Re={},lu=QE;function QE(t,e){if(!t)throw new Error(e||"Assertion failed")}QE.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var lp={exports:{}};typeof Object.create=="function"?lp.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:lp.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var _j=lp.exports,Tj=lu,Pj=_j;Re.inherits=Pj;function Ij(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function Rj(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=s&63|128):Ij(t,i)?(s=65536+((s&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=s&63|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=s&63|128)}else for(i=0;i>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Re.htonl=XE;function Nj(t,e){for(var r="",n=0;n>>0}return s}Re.join32=Oj;function $j(t,e){for(var r=new Array(t.length*4),n=0,i=0;n>>24,r[i+1]=s>>>16&255,r[i+2]=s>>>8&255,r[i+3]=s&255):(r[i+3]=s>>>24,r[i+2]=s>>>16&255,r[i+1]=s>>>8&255,r[i]=s&255)}return r}Re.split32=$j;function Dj(t,e){return t>>>e|t<<32-e}Re.rotr32=Dj;function Lj(t,e){return t<>>32-e}Re.rotl32=Lj;function Bj(t,e){return t+e>>>0}Re.sum32=Bj;function Fj(t,e,r){return t+e+r>>>0}Re.sum32_3=Fj;function jj(t,e,r,n){return t+e+r+n>>>0}Re.sum32_4=jj;function zj(t,e,r,n,i){return t+e+r+n+i>>>0}Re.sum32_5=zj;function Uj(t,e,r,n){var i=t[e],s=t[e+1],o=n+s>>>0,a=(o>>0,t[e+1]=o}Re.sum64=Uj;function Vj(t,e,r,n){var i=e+n>>>0,s=(i>>0}Re.sum64_hi=Vj;function Hj(t,e,r,n){var i=e+n;return i>>>0}Re.sum64_lo=Hj;function Wj(t,e,r,n,i,s,o,a){var l=0,c=e;c=c+n>>>0,l+=c>>0,l+=c>>0,l+=c>>0}Re.sum64_4_hi=Wj;function qj(t,e,r,n,i,s,o,a){var l=e+n+s+a;return l>>>0}Re.sum64_4_lo=qj;function Gj(t,e,r,n,i,s,o,a,l,c){var f=0,u=e;u=u+n>>>0,f+=u>>0,f+=u>>0,f+=u>>0,f+=u>>0}Re.sum64_5_hi=Gj;function Kj(t,e,r,n,i,s,o,a,l,c){var f=e+n+s+a+c;return f>>>0}Re.sum64_5_lo=Kj;function Jj(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Re.rotr64_hi=Jj;function Yj(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Re.rotr64_lo=Yj;function Qj(t,e,r){return t>>>r}Re.shr64_hi=Qj;function Xj(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Re.shr64_lo=Xj;var nc={},a6=Re,Zj=lu;function jh(){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}nc.BlockHash=jh;jh.prototype.update=function(e,r){if(e=a6.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=a6.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[s++]=e>>>16&255,i[s++]=e>>>8&255,i[s++]=e&255}else for(i[s++]=e&255,i[s++]=e>>>8&255,i[s++]=e>>>16&255,i[s++]=e>>>24&255,i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=0,o=8;o>>3}Ni.g0_256=iz;function sz(t){return Ei(t,17)^Ei(t,19)^t>>>10}Ni.g1_256=sz;var Dl=Re,oz=nc,az=Ni,bv=Dl.rotl32,Cc=Dl.sum32,lz=Dl.sum32_5,cz=az.ft_1,i7=oz.BlockHash,fz=[1518500249,1859775393,2400959708,3395469782];function Ii(){if(!(this instanceof Ii))return new Ii;i7.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Dl.inherits(Ii,i7);var uz=Ii;Ii.blockSize=512;Ii.outSize=160;Ii.hmacStrength=80;Ii.padLength=64;Ii.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;ithis.blockSize&&(e=new this.Hash().update(e).digest()),Xz(e.length<=this.blockSize);for(var r=e.length;r>8,h=f&255;u?l.push(u,h):l.push(h)}return l}r.toArray=n;function i(o){return o.length===1?"0"+o:o}r.zero2=i;function s(o){for(var a="",l=0;l(h>>1)-1?p=(h>>1)-k:p=k,y.isubn(p)):p=0,u[m]=p,y.iushrn(1)}return u}r.getNAF=n;function i(l,c){var f=[[],[]];l=l.clone(),c=c.clone();for(var u=0,h=0,y;l.cmpn(-u)>0||c.cmpn(-h)>0;){var m=l.andln(3)+u&3,p=c.andln(3)+h&3;m===3&&(m=-1),p===3&&(p=-1);var k;m&1?(y=l.andln(7)+u&7,(y===3||y===5)&&p===2?k=-m:k=m):k=0,f[0].push(k);var w;p&1?(y=c.andln(7)+h&7,(y===3||y===5)&&m===2?w=-p:w=p):w=0,f[1].push(w),2*u===k+1&&(u=1-u),2*h===w+1&&(h=1-h),l.iushrn(1),c.iushrn(1)}return f}r.getJSF=i;function s(l,c,f){var u="_"+c;l.prototype[c]=function(){return this[u]!==void 0?this[u]:this[u]=f.call(this)}}r.cachedProperty=s;function o(l){return typeof l=="string"?r.toArray(l,"hex"):l}r.parseBytes=o;function a(l){return new be(l,"hex","le")}r.intFromLE=a}),M0=bn.getNAF,tU=bn.getJSF,N0=bn.assert;function go(t,e){this.type=t,this.p=new be(e.p,16),this.red=e.prime?be.red(e.prime):be.mont(this.p),this.zero=new be(0).toRed(this.red),this.one=new be(1).toRed(this.red),this.two=new be(2).toRed(this.red),this.n=e.n&&new be(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var ka=go;go.prototype.point=function(){throw new Error("Not implemented")};go.prototype.validate=function(){throw new Error("Not implemented")};go.prototype._fixedNafMul=function(e,r){N0(e.precomputed);var n=e._getDoubles(),i=M0(r,1,this._bitLength),s=(1<=a;c--)l=(l<<1)+i[c];o.push(l)}for(var f=this.jpoint(null,null,null),u=this.jpoint(null,null,null),h=s;h>0;h--){for(a=0;a=0;l--){for(var c=0;l>=0&&o[l]===0;l--)c++;if(l>=0&&c++,a=a.dblp(c),l<0)break;var f=o[l];N0(f!==0),e.type==="affine"?f>0?a=a.mixedAdd(s[f-1>>1]):a=a.mixedAdd(s[-f-1>>1].neg()):f>0?a=a.add(s[f-1>>1]):a=a.add(s[-f-1>>1].neg())}return e.type==="affine"?a.toP():a};go.prototype._wnafMulAdd=function(e,r,n,i,s){var o=this._wnafT1,a=this._wnafT2,l=this._wnafT3,c=0,f,u,h;for(f=0;f=1;f-=2){var m=f-1,p=f;if(o[m]!==1||o[p]!==1){l[m]=M0(n[m],o[m],this._bitLength),l[p]=M0(n[p],o[p],this._bitLength),c=Math.max(l[m].length,c),c=Math.max(l[p].length,c);continue}var k=[r[m],null,null,r[p]];r[m].y.cmp(r[p].y)===0?(k[1]=r[m].add(r[p]),k[2]=r[m].toJ().mixedAdd(r[p].neg())):r[m].y.cmp(r[p].y.redNeg())===0?(k[1]=r[m].toJ().mixedAdd(r[p]),k[2]=r[m].add(r[p].neg())):(k[1]=r[m].toJ().mixedAdd(r[p]),k[2]=r[m].toJ().mixedAdd(r[p].neg()));var w=[-3,-1,-5,-7,0,7,5,1,3],E=tU(n[m],n[p]);for(c=Math.max(E[0].length,c),l[m]=new Array(c),l[p]=new Array(c),u=0;u=0;f--){for(var U=0;f>=0;){var j=!0;for(u=0;u=0&&U++,M=M.dblp(U),f<0)break;for(u=0;u0?h=a[u][K-1>>1]:K<0&&(h=a[u][-K-1>>1].neg()),h.type==="affine"?M=M.mixedAdd(h):M=M.add(h))}}for(f=0;f=Math.ceil((e.bitLength()+1)/r.step):!1};$n.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,s=0;s=0&&(y=c,m=f),u.negative&&(u=u.neg(),h=h.neg()),y.negative&&(y=y.neg(),m=m.neg()),[{a:u,b:h},{a:y,b:m}]};Dn.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],s=i.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=s.mul(n.a),l=o.mul(i.a),c=s.mul(n.b),f=o.mul(i.b),u=e.sub(a).sub(l),h=c.add(f).neg();return{k1:u,k2:h}};Dn.prototype.pointFromX=function(e,r){e=new be(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var s=i.fromRed().isOdd();return(r&&!s||!r&&s)&&(i=i.redNeg()),this.point(e,i)};Dn.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),s=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(s).cmpn(0)===0};Dn.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,s=this._endoWnafT2,o=0;o":""};gr.prototype.isInfinity=function(){return this.inf};gr.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};gr.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),s=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),o=s.redSqr().redISub(this.x.redAdd(this.x)),a=s.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)};gr.prototype.getX=function(){return this.x.fromRed()};gr.prototype.getY=function(){return this.y.fromRed()};gr.prototype.mul=function(e){return e=new be(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};gr.prototype.mulAdd=function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s):this.curve._wnafMulAdd(1,i,s,2)};gr.prototype.jmulAdd=function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s,!0):this.curve._wnafMulAdd(1,i,s,2,!0)};gr.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};gr.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(s){return s.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};gr.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function kr(t,e,r,n){ka.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new be(0)):(this.x=new be(e,16),this.y=new be(r,16),this.z=new be(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}Ym(kr,ka.BasePoint);Dn.prototype.jpoint=function(e,r,n){return new kr(this,e,r,n)};kr.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};kr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};kr.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),s=e.x.redMul(n),o=this.y.redMul(r.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),l=i.redSub(s),c=o.redSub(a);if(l.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),u=f.redMul(l),h=i.redMul(f),y=c.redSqr().redIAdd(u).redISub(h).redISub(h),m=c.redMul(h.redISub(y)).redISub(o.redMul(u)),p=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(y,m,p)};kr.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),s=this.y,o=e.y.redMul(r).redMul(this.z),a=n.redSub(i),l=s.redSub(o);if(a.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),f=c.redMul(a),u=n.redMul(c),h=l.redSqr().redIAdd(f).redISub(u).redISub(u),y=l.redMul(u.redISub(h)).redISub(s.redMul(f)),m=this.z.redMul(a);return this.curve.jpoint(h,y,m)};kr.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)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(s),this.x.cmp(n)===0)return!0}};kr.prototype.inspect=function(){return this.isInfinity()?"":""};kr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Sd=oc(function(t,e){var r=e;r.base=ka,r.short=nU,r.mont=null,r.edwards=null}),kd=oc(function(t,e){var r=e,n=bn.assert;function i(a){a.type==="short"?this.curve=new Sd.short(a):a.type==="edwards"?this.curve=new Sd.edwards(a):this.curve=new Sd.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=i;function s(a,l){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){var c=new i(l);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:c}),c}})}s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Yr.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Yr.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Yr.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Yr.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Yr.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Yr.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Yr.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var o;try{o=null.crash()}catch{o=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Yr.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function so(t){if(!(this instanceof so))return new so(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Xn.toArray(t.entropy,t.entropyEnc||"hex"),r=Xn.toArray(t.nonce,t.nonceEnc||"hex"),n=Xn.toArray(t.pers,t.persEnc||"hex");Jm(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var p7=so;so.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};so.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=Xn.toArray(n,i||"hex"),this._update(n));for(var s=[];s.length"};var iU=bn.assert;function zh(t,e){if(t instanceof zh)return t;this._importDER(t,e)||(iU(t.r&&t.s,"Signature without r or s"),this.r=new be(t.r,16),this.s=new be(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Uh=zh;function sU(){this.place=0}function Ev(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var i=0,s=0,o=e.place;s>>=0;return i<=127?!1:(e.place=o,i)}function u6(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}zh.prototype.toDER=function(e){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=u6(r),n=u6(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];Sv(i,r.length),i=i.concat(r),i.push(2),Sv(i,n.length);var s=i.concat(n),o=[48];return Sv(o,s.length),o=o.concat(s),bn.encode(o,e)};var oU=function(){throw new Error("unsupported")},g7=bn.assert;function On(t){if(!(this instanceof On))return new On(t);typeof t=="string"&&(g7(Object.prototype.hasOwnProperty.call(kd,t),"Unknown curve "+t),t=kd[t]),t instanceof kd.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var aU=On;On.prototype.keyPair=function(e){return new Qm(this,e)};On.prototype.keyFromPrivate=function(e,r){return Qm.fromPrivate(this,e,r)};On.prototype.keyFromPublic=function(e,r){return Qm.fromPublic(this,e,r)};On.prototype.genKeyPair=function(e){e||(e={});for(var r=new p7({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||oU(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new be(2));;){var s=new be(r.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}};On.prototype._truncateToN=function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};On.prototype.sign=function(e,r,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new be(e,16));for(var s=this.n.byteLength(),o=r.getPrivate().toArray("be",s),a=e.toArray("be",s),l=new p7({hash:this.hash,entropy:o,nonce:a,pers:i.pers,persEnc:i.persEnc||"utf8"}),c=this.n.sub(new be(1)),f=0;;f++){var u=i.k?i.k(f):new be(l.generate(this.n.byteLength()));if(u=this._truncateToN(u,!0),!(u.cmpn(1)<=0||u.cmp(c)>=0)){var h=this.g.mul(u);if(!h.isInfinity()){var y=h.getX(),m=y.umod(this.n);if(m.cmpn(0)!==0){var p=u.invm(this.n).mul(m.mul(r.getPrivate()).iadd(e));if(p=p.umod(this.n),p.cmpn(0)!==0){var k=(h.getY().isOdd()?1:0)|(y.cmp(m)!==0?2:0);return i.canonical&&p.cmp(this.nh)>0&&(p=this.n.sub(p),k^=1),new Uh({r:m,s:p,recoveryParam:k})}}}}}};On.prototype.verify=function(e,r,n,i){e=this._truncateToN(new be(e,16)),n=this.keyFromPublic(n,i),r=new Uh(r,"hex");var s=r.r,o=r.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a=o.invm(this.n),l=a.mul(e).umod(this.n),c=a.mul(s).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.eqXToP(s)):(f=this.g.mulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.getX().umod(this.n).cmp(s)===0)};On.prototype.recoverPubKey=function(t,e,r,n){g7((3&r)===r,"The recovery param is more than two bits"),e=new Uh(e,n);var i=this.n,s=new be(t),o=e.r,a=e.s,l=r&1,c=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");c?o=this.curve.pointFromX(o.add(this.curve.n),l):o=this.curve.pointFromX(o,l);var f=e.r.invm(i),u=i.sub(s).mul(f).umod(i),h=a.mul(f).umod(i);return this.g.mulAdd(u,o,h)};On.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Uh(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(t,e,i)}catch{continue}if(s.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var lU=oc(function(t,e){var r=e;r.version="6.5.4",r.utils=bn,r.rand=function(){throw new Error("unsupported")},r.curve=Sd,r.curves=kd,r.ec=aU,r.eddsa=null}),cU=lU.ec;const fU="signing-key/5.7.0",dp=new q(fU);let kv=null;function ui(){return kv||(kv=new cU("secp256k1")),kv}class Xo{constructor(e){te(this,"curve","secp256k1"),te(this,"privateKey",Q(e)),_i(this.privateKey)!==32&&dp.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=ui().keyFromPrivate(X(this.privateKey));te(this,"publicKey","0x"+r.getPublic(!1,"hex")),te(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),te(this,"_isSigningKey",!0)}_addPoint(e){const r=ui().keyFromPublic(X(this.publicKey)),n=ui().keyFromPublic(X(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=ui().keyFromPrivate(X(this.privateKey)),n=X(e);n.length!==32&&dp.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return Ea({recoveryParam:i.recoveryParam,r:Ve("0x"+i.r.toString(16),32),s:Ve("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=ui().keyFromPrivate(X(this.privateKey)),n=ui().keyFromPublic(X(Xm(e)));return Ve("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function m7(t,e){const r=Ea(e),n={r:X(r.r),s:X(r.s)};return"0x"+ui().recoverPubKey(X(t),n,r.recoveryParam).encode("hex",!1)}function Xm(t,e){const r=X(t);if(r.length===32){const n=new Xo(r);return e?"0x"+ui().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?Q(r):"0x"+ui().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+ui().keyFromPublic(r).getPublic(!0,"hex"):Q(r)}return dp.throwArgumentError("invalid public or private key","key","[REDACTED]")}const uU="transactions/5.7.0",Rr=new q(uU);var hp;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(hp||(hp={}));function Zm(t){return t==="0x"?null:we(t)}function Ir(t){return t==="0x"?Nt:H.from(t)}const dU=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],hU={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function qs(t){const e=Xm(t);return we(Vt(pe(Vt(e,1)),12))}function va(t,e){return qs(m7(X(t),e))}function cn(t,e){const r=Ci(H.from(t).toHexString());return r.length>32&&Rr.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function Av(t,e){return{address:we(t),storageKeys:(e||[]).map((r,n)=>(_i(r)!==32&&Rr.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function Aa(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Rr.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),Av(r[0],r[1])):Av(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,s)=>(i[s]=!0,i),{});return Av(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function x7(t){return Aa(t).map(e=>[e.address,e.storageKeys])}function b7(t,e){if(t.gasPrice!=null){const n=H.from(t.gasPrice),i=H.from(t.maxFeePerGas||0);n.eq(i)||Rr.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const r=[cn(t.chainId||0,"chainId"),cn(t.nonce||0,"nonce"),cn(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),cn(t.maxFeePerGas||0,"maxFeePerGas"),cn(t.gasLimit||0,"gasLimit"),t.to!=null?we(t.to):"0x",cn(t.value||0,"value"),t.data||"0x",x7(t.accessList||[])];if(e){const n=Ea(e);r.push(cn(n.recoveryParam,"recoveryParam")),r.push(Ci(n.r)),r.push(Ci(n.s))}return Ur(["0x02",da(r)])}function w7(t,e){const r=[cn(t.chainId||0,"chainId"),cn(t.nonce||0,"nonce"),cn(t.gasPrice||0,"gasPrice"),cn(t.gasLimit||0,"gasLimit"),t.to!=null?we(t.to):"0x",cn(t.value||0,"value"),t.data||"0x",x7(t.accessList||[])];if(e){const n=Ea(e);r.push(cn(n.recoveryParam,"recoveryParam")),r.push(Ci(n.r)),r.push(Ci(n.s))}return Ur(["0x01",da(r)])}function vU(t,e){Dm(t,hU);const r=[];dU.forEach(function(o){let a=t[o.name]||[];const l={};o.numeric&&(l.hexPad="left"),a=X(Q(a,l)),o.length&&a.length!==o.length&&a.length>0&&Rr.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a),o.maxLength&&(a=Ci(a),a.length>o.maxLength&&Rr.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a)),r.push(Q(a))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Rr.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!rs(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(Q(n)),r.push("0x"),r.push("0x")),!e)return da(r);const i=Ea(e);let s=27+i.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),s+=n*2+8,i.v>28&&i.v!==s&&Rr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==s&&Rr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(Q(s)),r.push(Ci(X(i.r))),r.push(Ci(X(i.s))),da(r)}function vp(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Rr.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),vU(t,e);switch(t.type){case 1:return w7(t,e);case 2:return b7(t,e)}return Rr.throwError(`unsupported transaction type: ${t.type}`,q.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function C7(t,e,r){try{const n=Ir(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Rr.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=Ve(e[1],32),t.s=Ve(e[2],32);try{const n=pe(r(t));t.from=va(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function yU(t){const e=Lh(t.slice(1));e.length!==9&&e.length!==12&&Rr.throwArgumentError("invalid component count for transaction type: 2","payload",Q(t));const r=Ir(e[2]),n=Ir(e[3]),i={type:2,chainId:Ir(e[0]).toNumber(),nonce:Ir(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Ir(e[4]),to:Zm(e[5]),value:Ir(e[6]),data:e[7],accessList:Aa(e[8])};return e.length===9||(i.hash=pe(t),C7(i,e.slice(9),b7)),i}function pU(t){const e=Lh(t.slice(1));e.length!==8&&e.length!==11&&Rr.throwArgumentError("invalid component count for transaction type: 1","payload",Q(t));const r={type:1,chainId:Ir(e[0]).toNumber(),nonce:Ir(e[1]).toNumber(),gasPrice:Ir(e[2]),gasLimit:Ir(e[3]),to:Zm(e[4]),value:Ir(e[5]),data:e[6],accessList:Aa(e[7])};return e.length===8||(r.hash=pe(t),C7(r,e.slice(8),w7)),r}function gU(t){const e=Lh(t);e.length!==9&&e.length!==6&&Rr.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:Ir(e[0]).toNumber(),gasPrice:Ir(e[1]),gasLimit:Ir(e[2]),to:Zm(e[3]),value:Ir(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=H.from(e[6]).toNumber()}catch{return r}if(r.r=Ve(e[7],32),r.s=Ve(e[8],32),H.from(r.r).isZero()&&H.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const i=e.slice(0,6);r.chainId!==0&&(i.push(Q(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);const s=pe(da(i));try{r.from=va(s,{r:Q(r.r),s:Q(r.s),recoveryParam:n})}catch{}r.hash=pe(t)}return r.type=null,r}function E7(t){const e=X(t);if(e[0]>127)return gU(e);switch(e[0]){case 1:return pU(e);case 2:return yU(e)}return Rr.throwError(`unsupported transaction type: ${e[0]}`,q.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const mU="contracts/5.7.0";var ya=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Gt=new q(mU);function O0(t,e){return ya(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&Gt.throwArgumentError("invalid address or ENS name","name",r);try{return we(r)}catch{}t||Gt.throwError("a provider or signer is needed to resolve ENS names",q.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&Gt.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function Ad(t,e,r){return ya(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,i)=>Ad(t,Array.isArray(e)?e[i]:e[n.name],n))):r.type==="address"?yield O0(t,e):r.type==="tuple"?yield Ad(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>Ad(t,n,r.arrayChildren))):Promise.reject(Gt.makeError("invalid value for array",q.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Vh(t,e,r){return ya(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=er(r.pop())),Gt.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=Ge({override:O0(t.signer,n.from),signer:t.signer.getAddress()}).then(c=>ya(this,void 0,void 0,function*(){return we(c.signer)!==c.override&&Gt.throwError("Contract with a Signer cannot override from",q.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),c.override})):n.from=t.signer.getAddress():n.from&&(n.from=O0(t.provider,n.from));const i=yield Ge({args:Ad(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:Ge(n)||{}}),s=t.interface.encodeFunctionData(e,i.args),o={data:s,to:i.address},a=i.overrides;if(a.nonce!=null&&(o.nonce=H.from(a.nonce).toNumber()),a.gasLimit!=null&&(o.gasLimit=H.from(a.gasLimit)),a.gasPrice!=null&&(o.gasPrice=H.from(a.gasPrice)),a.maxFeePerGas!=null&&(o.maxFeePerGas=H.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=H.from(a.maxPriorityFeePerGas)),a.from!=null&&(o.from=a.from),a.type!=null&&(o.type=a.type),a.accessList!=null&&(o.accessList=Aa(a.accessList)),o.gasLimit==null&&e.gas!=null){let c=21e3;const f=X(s);for(let u=0;un[c]!=null);return l.length&&Gt.throwError(`cannot override ${l.map(c=>JSON.stringify(c)).join(",")}`,q.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),o})}function xU(t,e){return function(...r){return Vh(t,e,r)}}function bU(t,e){const r=t.signer||t.provider;return function(...n){return ya(this,void 0,void 0,function*(){r||Gt.throwError("estimate require a provider or signer",q.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield Vh(t,e,n);return yield r.estimateGas(i)})}}function wU(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(i=>(i.events=i.logs.map(s=>{let o=Ti(s),a=null;try{a=t.interface.parseLog(s)}catch{}return a&&(o.args=a.args,o.decode=(l,c)=>t.interface.decodeEventLog(a.eventFragment,l,c),o.event=a.name,o.eventSignature=a.signature),o.removeListener=()=>t.provider,o.getBlock=()=>t.provider.getBlock(i.blockHash),o.getTransaction=()=>t.provider.getTransaction(i.transactionHash),o.getTransactionReceipt=()=>Promise.resolve(i),o}),i))}function S7(t,e,r){const n=t.signer||t.provider;return function(...i){return ya(this,void 0,void 0,function*(){let s;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const l=er(i.pop());l.blockTag!=null&&(s=yield l.blockTag),delete l.blockTag,i.push(l)}t.deployTransaction!=null&&(yield t._deployed(s));const o=yield Vh(t,e,i),a=yield n.call(o,s);try{let l=t.interface.decodeFunctionResult(e,a);return r&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===q.errors.CALL_EXCEPTION&&(l.address=t.address,l.args=i,l.transaction=o),l}})}}function CU(t,e){return function(...r){return ya(this,void 0,void 0,function*(){t.signer||Gt.throwError("sending a transaction requires a signer",q.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield Vh(t,e,r),i=yield t.signer.sendTransaction(n);return wU(t,i),i})}}function d6(t,e,r){return e.constant?S7(t,e,r):CU(t,e)}function k7(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class Vf{constructor(e,r){te(this,"tag",e),te(this,"filter",r),this._listeners=[]}addListener(e,r){this._listeners.push({listener:e,once:r})}removeListener(e){let r=!1;this._listeners=this._listeners.filter(n=>r||n.listener!==e?!0:(r=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const r=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class EU extends Vf{constructor(){super("error",null)}}class h6 extends Vf{constructor(e,r,n,i){const s={address:e};let o=r.getEventTopic(n);i?(o!==i[0]&&Gt.throwArgumentError("topic mismatch","topics",i),s.topics=i.slice()):s.topics=[o],super(k7(s),s),te(this,"address",e),te(this,"interface",r),te(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(r,n)=>this.interface.decodeEventLog(this.fragment,r,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(r){e.args=null,e.decodeError=r}}getEmit(e){const r=CE(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class v6 extends Vf{constructor(e,r){super("*",{address:e}),te(this,"address",e),te(this,"interface",r)}prepareEvent(e){super.prepareEvent(e);try{const r=this.interface.parseLog(e);e.event=r.name,e.eventSignature=r.signature,e.decode=(n,i)=>this.interface.decodeEventLog(r.eventFragment,n,i),e.args=r.args}catch{}}}class SU{constructor(e,r,n){te(this,"interface",Qn(new.target,"getInterface")(r)),n==null?(te(this,"provider",null),te(this,"signer",null)):io.isSigner(n)?(te(this,"provider",n.provider||null),te(this,"signer",n)):po.isProvider(n)?(te(this,"provider",n),te(this,"signer",null)):Gt.throwArgumentError("invalid signer or provider","signerOrProvider",n),te(this,"callStatic",{}),te(this,"estimateGas",{}),te(this,"functions",{}),te(this,"populateTransaction",{}),te(this,"filters",{});{const o={};Object.keys(this.interface.events).forEach(a=>{const l=this.interface.events[a];te(this.filters,a,(...c)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,c)})),o[l.name]||(o[l.name]=[]),o[l.name].push(a)}),Object.keys(o).forEach(a=>{const l=o[a];l.length===1?te(this.filters,a,this.filters[l[0]]):Gt.warn(`Duplicate definition of ${a} (${l.join(", ")})`)})}if(te(this,"_runningEvents",{}),te(this,"_wrappedEmits",{}),e==null&&Gt.throwArgumentError("invalid contract address or ENS name","addressOrName",e),te(this,"address",e),this.provider)te(this,"resolvedAddress",O0(this.provider,e));else try{te(this,"resolvedAddress",Promise.resolve(we(e)))}catch{Gt.throwError("provider is required to use ENS name as contract address",q.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(o=>{});const i={},s={};Object.keys(this.interface.functions).forEach(o=>{const a=this.interface.functions[o];if(s[o]){Gt.warn(`Duplicate ABI entry for ${JSON.stringify(o)}`);return}s[o]=!0;{const l=a.name;i[`%${l}`]||(i[`%${l}`]=[]),i[`%${l}`].push(o)}this[o]==null&&te(this,o,d6(this,a,!0)),this.functions[o]==null&&te(this.functions,o,d6(this,a,!1)),this.callStatic[o]==null&&te(this.callStatic,o,S7(this,a,!0)),this.populateTransaction[o]==null&&te(this.populateTransaction,o,xU(this,a)),this.estimateGas[o]==null&&te(this.estimateGas,o,bU(this,a))}),Object.keys(i).forEach(o=>{const a=i[o];if(a.length>1)return;o=o.substring(1);const l=a[0];try{this[o]==null&&te(this,o,this[l])}catch{}this.functions[o]==null&&te(this.functions,o,this.functions[l]),this.callStatic[o]==null&&te(this.callStatic,o,this.callStatic[l]),this.populateTransaction[o]==null&&te(this.populateTransaction,o,this.populateTransaction[l]),this.estimateGas[o]==null&&te(this.estimateGas,o,this.estimateGas[l])})}static getContractAddress(e){return Fm(e)}static getInterface(e){return tr.isInterface(e)?e:new tr(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(r=>(r==="0x"&&Gt.throwError("contract not deployed",q.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Gt.throwError("sending a transactions require a signer",q.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=er(e||{});return["from","to"].forEach(function(n){r[n]!=null&&Gt.throwError("cannot override "+n,q.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new Km(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&te(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return R0.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new EU);if(e==="event")return this._normalizeRunningEvent(new Vf("event",null));if(e==="*")return this._normalizeRunningEvent(new v6(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new h6(this.address,this.interface,r))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const i=this.interface.getEvent(n);return this._normalizeRunningEvent(new h6(this.address,this.interface,i,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new Vf(k7(r),r))}return this._normalizeRunningEvent(new v6(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const r=this._wrappedEmits[e.tag];r&&e.filter&&(this.provider.off(e.filter,r),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,r,n){const i=Ti(r);return i.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(r.blockHash),i.getTransaction=()=>this.provider.getTransaction(r.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(i),i}_addEventListener(e,r,n){if(this.provider||Gt.throwError("events require a provider or a signer with a provider",q.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const i=s=>{let o=this._wrapEvent(e,s,r);if(o.decodeError==null)try{const a=e.getEmit(o);this.emit(e.filter,...a)}catch(a){o.decodeError=a.error}e.filter!=null&&this.emit("event",o),o.decodeError!=null&&this.emit("error",o.decodeError,o)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,r,n){const i=this._getRunningEvent(e),s=er(i.filter);return typeof r=="string"&&Pe(r,32)?(n!=null&&Gt.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),s.blockHash=r):(s.fromBlock=r??0,s.toBlock=n??"latest"),this.provider.getLogs(s).then(o=>o.map(a=>this._wrapEvent(i,a,null)))}on(e,r){return this._addEventListener(this._getRunningEvent(e),r,!1),this}once(e,r){return this._addEventListener(this._getRunningEvent(e),r,!0),this}emit(e,...r){if(!this.provider)return!1;const n=this._getRunningEvent(e),i=n.run(r)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((r,n)=>r+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const r=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{r.push(i)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}const r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}off(e,r){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(r),this._checkRunningEvents(n),this}removeListener(e,r){return this.off(e,r)}}class _a extends SU{}class A7{constructor(e){te(this,"alphabet",e),te(this,"base",e.length),te(this,"_alphabetMap",{}),te(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(o%this.base),o=o/this.base|0}let i="";for(let s=0;r[s]===0&&s=0;--s)i+=this.alphabet[n[s]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;s>0;)r.push(s&255),s>>=8}for(let n=0;e[n]===this._leader&&n>24&255,l[e.length+1]=u>>16&255,l[e.length+2]=u>>8&255,l[e.length+3]=u&255;let h=X(Hf(i,t,l));s||(s=h.length,f=new Uint8Array(s),o=Math.ceil(n/s),c=n-(o-1)*s),f.set(h);for(let p=1;p=256)throw new Error("Depth too large!");return g6(ze([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",Y(this.depth),this.parentFingerprint,Ue(Y(this.index),4),this.chainCode,this.privateKey!=null?ze(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new fn(Na,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&~ja));const n=new Uint8Array(37);if(e&ja){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(X(this.privateKey),1),r&&(r+="'")}else n.set(X(this.publicKey));for(let u=24;u>=0;u-=8)n[33+(u>>3)]=e>>24-u&255;const i=X(Hf(jl.sha512,this.chainCode,n)),s=i.slice(0,32),o=i.slice(32);let a=null,l=null;this.privateKey?a=Zu(V.from(s).add(this.privateKey).mod($U)):l=new Xo(Y(s))._addPoint(this.publicKey);let c=r;const f=this.mnemonic;return f&&(c=Object.freeze({phrase:f.phrase,path:r,locale:f.locale||"en"})),new fn(Na,a,l,this.fingerprint,Zu(o),e,this.depth+1,c)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let i=0;i=ja)throw new Error("invalid path index - "+s);n=n._derive(ja+o)}else if(s.match(/^[0-9]+$/)){const o=parseInt(s);if(o>=ja)throw new Error("invalid path index - "+s);n=n._derive(o)}else throw new Error("invalid path component - "+s)}return n}static _fromSeed(e,r){const n=X(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=X(Hf(jl.sha512,FU,n));return new fn(Na,Zu(i.slice(0,32)),null,"0x00000000",Zu(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=tx(n),e=Wh(Hh(e,n),n),fn._fromSeed(DE(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return fn._fromSeed(e,null)}static fromExtendedKey(e){const r=Fl.decode(e);(r.length!==82||g6(r.slice(0,78))!==e)&&Wf.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=Y(r.slice(5,9)),s=parseInt(Y(r.slice(9,13)).substring(2),16),o=Y(r.slice(13,45)),a=r.slice(45,78);switch(Y(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new fn(Na,null,Y(a),i,o,s,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new fn(Na,Y(a.slice(1)),null,i,o,s,n,null)}return Wf.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function DE(t,e){e||(e="");const r=Ve("mnemonic"+e,Pi.NFKD);return ex(Ve(t,Pi.NFKD),r,2048,64,"sha512")}function Hh(t,e){e=tx(e),Wf.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=X(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let c=0;c>3]|=1<<7-i%8),i++}const s=32*r.length/3,o=r.length/3,a=OE(o);if((X(ss(n.slice(0,s/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return Y(n.slice(0,s/8))}function Wh(t,e){if(e=tx(e),t=X(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let o=0;o8?(r[r.length-1]<<=8,r[r.length-1]|=t[o],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[o]>>8-n,r.push(t[o]&jU(8-n)),n+=3);const i=t.length/4,s=X(ss(t))[0]&OE(i);return r[r.length-1]<<=i,r[r.length-1]|=s>>8-i,e.join(r.map(o=>e.getWord(o)))}function zU(t,e){try{return Hh(t,e),!0}catch{}return!1}function UU(t){return(typeof t!="number"||t<0||t>=ja||t%1)&&Wf.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const VU="random/5.7.0",yp=new q(VU);function HU(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const m6=HU();let _d=m6.crypto||m6.msCrypto;(!_d||!_d.getRandomValues)&&(yp.warn("WARNING: Missing strong random number source"),_d={getRandomValues:function(t){return yp.throwError("no secure random source avaialble",q.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function pi(t){(t<=0||t>1024||t%1||t!=t)&&yp.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return _d.getRandomValues(e),X(e)}function WU(t){t=t.slice();for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}var BE={exports:{}};(function(t,e){(function(r){function n(g){return parseInt(g)===g}function i(g){if(!n(g.length))return!1;for(var d=0;d255)return!1;return!0}function s(g,d){if(g.buffer&&ArrayBuffer.isView(g)&&g.name==="Uint8Array")return d&&(g.slice?g=g.slice():g=Array.prototype.slice.call(g)),g;if(Array.isArray(g)){if(!i(g))throw new Error("Array contains invalid value: "+g);return new Uint8Array(g)}if(n(g.length)&&i(g))return new Uint8Array(g);throw new Error("unsupported array-like object")}function o(g){return new Uint8Array(g)}function a(g,d,T,D,x){(D!=null||x!=null)&&(g.slice?g=g.slice(D,x):g=Array.prototype.slice.call(g,D,x)),d.set(g,T)}var l=function(){function g(T){var D=[],x=0;for(T=encodeURI(T);x191&&B<224?(D.push(String.fromCharCode((B&31)<<6|T[x+1]&63)),x+=2):(D.push(String.fromCharCode((B&15)<<12|(T[x+1]&63)<<6|T[x+2]&63)),x+=3)}return D.join("")}return{toBytes:g,fromBytes:d}}(),c=function(){function g(D){for(var x=[],B=0;B>4]+d[$&15])}return x.join("")}return{toBytes:g,fromBytes:T}}(),f={16:10,24:12,32:14},u=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],h=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],y=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],m=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],S=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],w=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],A=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],k=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],I=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],R=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],F=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],z=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],j=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],K=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function J(g){for(var d=[],T=0;T>2,this._Ke[B][d%4]=x[d],this._Kd[g-B][d%4]=x[d];for(var $=0,O=D,U;O>16&255]<<24^h[U>>8&255]<<16^h[U&255]<<8^h[U>>24&255]^u[$]<<24,$+=1,D!=8)for(var d=1;d>8&255]<<8^h[U>>16&255]<<16^h[U>>24&255]<<24;for(var d=D/2+1;d>2,H=O%4,this._Ke[W][H]=x[d],this._Kd[g-W][H]=x[d++],O++}for(var W=1;W>24&255]^z[U>>16&255]^j[U>>8&255]^K[U&255]},Z.prototype.encrypt=function(g){if(g.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var d=this._Ke.length-1,T=[0,0,0,0],D=J(g),x=0;x<4;x++)D[x]^=this._Ke[0][x];for(var B=1;B>24&255]^p[D[(x+1)%4]>>16&255]^S[D[(x+2)%4]>>8&255]^w[D[(x+3)%4]&255]^this._Ke[B][x];D=T.slice()}for(var $=o(16),O,x=0;x<4;x++)O=this._Ke[d][x],$[4*x]=(h[D[x]>>24&255]^O>>24)&255,$[4*x+1]=(h[D[(x+1)%4]>>16&255]^O>>16)&255,$[4*x+2]=(h[D[(x+2)%4]>>8&255]^O>>8)&255,$[4*x+3]=(h[D[(x+3)%4]&255]^O)&255;return $},Z.prototype.decrypt=function(g){if(g.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var d=this._Kd.length-1,T=[0,0,0,0],D=J(g),x=0;x<4;x++)D[x]^=this._Kd[0][x];for(var B=1;B>24&255]^k[D[(x+3)%4]>>16&255]^I[D[(x+2)%4]>>8&255]^R[D[(x+1)%4]&255]^this._Kd[B][x];D=T.slice()}for(var $=o(16),O,x=0;x<4;x++)O=this._Kd[d][x],$[4*x]=(y[D[x]>>24&255]^O>>24)&255,$[4*x+1]=(y[D[(x+3)%4]>>16&255]^O>>16)&255,$[4*x+2]=(y[D[(x+2)%4]>>8&255]^O>>8)&255,$[4*x+3]=(y[D[(x+1)%4]&255]^O)&255;return $};var ie=function(g){if(!(this instanceof ie))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new Z(g)};ie.prototype.encrypt=function(g){if(g=s(g),g.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var d=o(g.length),T=o(16),D=0;D=0;--d)this._counter[d]=g%256,g=g>>8},P.prototype.setBytes=function(g){if(g=s(g,!0),g.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=g},P.prototype.increment=function(){for(var g=15;g>=0;g--)if(this._counter[g]===255)this._counter[g]=0;else{this._counter[g]++;break}};var N=function(g,d){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",d instanceof P||(d=new P(d)),this._counter=d,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new Z(g)};N.prototype.encrypt=function(g){for(var d=s(g,!0),T=0;T16)throw new Error("PKCS#7 padding byte out of range");for(var T=g.length-d,D=0;D=64;){let M=w,g=A,d=k,T=I,D=R,x=F,B=z,$=j,O,U,W,H,G;for(U=0;U<16;U++)W=b+U*4,K[U]=(N[W]&255)<<24|(N[W+1]&255)<<16|(N[W+2]&255)<<8|N[W+3]&255;for(U=16;U<64;U++)O=K[U-2],H=(O>>>17|O<<15)^(O>>>19|O<<13)^O>>>10,O=K[U-15],G=(O>>>7|O<<25)^(O>>>18|O<<14)^O>>>3,K[U]=(H+K[U-7]|0)+(G+K[U-16]|0)|0;for(U=0;U<64;U++)H=(((D>>>6|D<<26)^(D>>>11|D<<21)^(D>>>25|D<<7))+(D&x^~D&B)|0)+($+(S[U]+K[U]|0)|0)|0,G=((M>>>2|M<<30)^(M>>>13|M<<19)^(M>>>22|M<<10))+(M&g^M&d^g&d)|0,$=B,B=x,x=D,D=T+H|0,T=d,d=g,g=M,M=H+G|0;w=w+M|0,A=A+g|0,k=k+d|0,I=I+T|0,R=R+D|0,F=F+x|0,z=z+B|0,j=j+$|0,b+=64,_-=64}}J(p);let Z,ie=p.length%64,L=p.length/536870912|0,v=p.length<<3,C=ie<56?56:120,P=p.slice(p.length-ie,p.length);for(P.push(128),Z=ie+1;Z>>24&255),P.push(L>>>16&255),P.push(L>>>8&255),P.push(L>>>0&255),P.push(v>>>24&255),P.push(v>>>16&255),P.push(v>>>8&255),P.push(v>>>0&255),J(P),[w>>>24&255,w>>>16&255,w>>>8&255,w>>>0&255,A>>>24&255,A>>>16&255,A>>>8&255,A>>>0&255,k>>>24&255,k>>>16&255,k>>>8&255,k>>>0&255,I>>>24&255,I>>>16&255,I>>>8&255,I>>>0&255,R>>>24&255,R>>>16&255,R>>>8&255,R>>>0&255,F>>>24&255,F>>>16&255,F>>>8&255,F>>>0&255,z>>>24&255,z>>>16&255,z>>>8&255,z>>>0&255,j>>>24&255,j>>>16&255,j>>>8&255,j>>>0&255]}function s(p,S,w){p=p.length<=64?p:i(p);const A=64+S.length+4,k=new Array(A),I=new Array(64);let R,F=[];for(R=0;R<64;R++)k[R]=54;for(R=0;R=A-4;j--){if(k[j]++,k[j]<=255)return;k[j]=0}}for(;w>=32;)z(),F=F.concat(i(I.concat(i(k)))),w-=32;return w>0&&(z(),F=F.concat(i(I.concat(i(k))).slice(0,w))),F}function o(p,S,w,A,k){let I;for(f(p,(2*w-1)*16,k,0,16),I=0;I<2*w;I++)c(p,I*16,k,16),l(k,A),f(k,0,p,S+I*16,16);for(I=0;I>>32-S}function l(p,S){f(p,0,S,0,16);for(let w=8;w>0;w-=2)S[4]^=a(S[0]+S[12],7),S[8]^=a(S[4]+S[0],9),S[12]^=a(S[8]+S[4],13),S[0]^=a(S[12]+S[8],18),S[9]^=a(S[5]+S[1],7),S[13]^=a(S[9]+S[5],9),S[1]^=a(S[13]+S[9],13),S[5]^=a(S[1]+S[13],18),S[14]^=a(S[10]+S[6],7),S[2]^=a(S[14]+S[10],9),S[6]^=a(S[2]+S[14],13),S[10]^=a(S[6]+S[2],18),S[3]^=a(S[15]+S[11],7),S[7]^=a(S[3]+S[15],9),S[11]^=a(S[7]+S[3],13),S[15]^=a(S[11]+S[7],18),S[1]^=a(S[0]+S[3],7),S[2]^=a(S[1]+S[0],9),S[3]^=a(S[2]+S[1],13),S[0]^=a(S[3]+S[2],18),S[6]^=a(S[5]+S[4],7),S[7]^=a(S[6]+S[5],9),S[4]^=a(S[7]+S[6],13),S[5]^=a(S[4]+S[7],18),S[11]^=a(S[10]+S[9],7),S[8]^=a(S[11]+S[10],9),S[9]^=a(S[8]+S[11],13),S[10]^=a(S[9]+S[8],18),S[12]^=a(S[15]+S[14],7),S[13]^=a(S[12]+S[15],9),S[14]^=a(S[13]+S[12],13),S[15]^=a(S[14]+S[13],18);for(let w=0;w<16;++w)p[w]+=S[w]}function c(p,S,w,A){for(let k=0;k=256)return!1}return!0}function h(p,S){if(typeof p!="number"||p%1)throw new Error("invalid "+S);return p}function y(p,S,w,A,k,I,R){if(w=h(w,"N"),A=h(A,"r"),k=h(k,"p"),I=h(I,"dkLen"),w===0||w&w-1)throw new Error("N must be power of 2");if(w>2147483647/128/A)throw new Error("N too large");if(A>2147483647/128/k)throw new Error("r too large");if(!u(p))throw new Error("password must be an array or buffer");if(p=Array.prototype.slice.call(p),!u(S))throw new Error("salt must be an array or buffer");S=Array.prototype.slice.call(S);let F=s(p,S,k*128*A);const z=new Uint32Array(k*32*A);for(let D=0;Dg&&(D=g);for(let B=0;Bg&&(D=g);for(let B=0;B>0&255),F.push(z[B]>>8&255),F.push(z[B]>>16&255),F.push(z[B]>>24&255);const x=s(p,F,I);return R&&R(null,1,x),x}R&&d(T)};if(!R)for(;;){const D=T();if(D!=null)return D}T()}const m={scrypt:function(p,S,w,A,k,I,R){return new Promise(function(F,z){let j=0;R&&R(0),y(p,S,w,A,k,I,function(K,J,Z){if(K)z(K);else if(Z)R&&j!==1&&R(1),F(new Uint8Array(Z));else if(R&&J!==j)return j=J,R(J)})})},syncScrypt:function(p,S,w,A,k,I){return new Uint8Array(y(p,S,w,A,k,I))}};t.exports=m})()})(FE);var YU=FE.exports;const sx=lo(YU);var XU=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const pp=new q(LE);function x6(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class ZU extends Ea{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function eV(t,e,r){if(Kt(t,"crypto/cipher")==="aes-128-ctr"){const i=Zo(Kt(t,"crypto/cipherparams/iv")),s=new gi.Counter(i),o=new gi.ModeOfOperation.ctr(e,s);return X(o.decrypt(r))}return null}function jE(t,e){const r=Zo(Kt(t,"crypto/ciphertext"));if(Y(pe(ze([e.slice(16,32),r]))).substring(2)!==Kt(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const i=eV(t,e.slice(0,16),r);i||pp.throwError("unsupported cipher",q.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const s=e.slice(32,64),o=qs(i);if(t.address){let l=t.address.toLowerCase();if(l.substring(0,2)!=="0x"&&(l="0x"+l),we(l)!==o)throw new Error("address mismatch")}const a={_isKeystoreAccount:!0,address:o,privateKey:Y(i)};if(Kt(t,"x-ethers/version")==="0.1"){const l=Zo(Kt(t,"x-ethers/mnemonicCiphertext")),c=Zo(Kt(t,"x-ethers/mnemonicCounter")),f=new gi.Counter(c),u=new gi.ModeOfOperation.ctr(s,f),h=Kt(t,"x-ethers/path")||zl,y=Kt(t,"x-ethers/locale")||"en",m=X(u.decrypt(l));try{const p=Wh(m,y),S=fn.fromMnemonic(p,null,y).derivePath(h);if(S.privateKey!=a.privateKey)throw new Error("mnemonic mismatch");a.mnemonic=S.mnemonic}catch(p){if(p.code!==q.errors.INVALID_ARGUMENT||p.argument!=="wordlist")throw p}}return new ZU(a)}function zE(t,e,r,n,i){return X(ex(t,e,r,n,i))}function tV(t,e,r,n,i){return Promise.resolve(zE(t,e,r,n,i))}function UE(t,e,r,n,i){const s=rx(e),o=Kt(t,"crypto/kdf");if(o&&typeof o=="string"){const a=function(l,c){return pp.throwArgumentError("invalid key-derivation function parameters",l,c)};if(o.toLowerCase()==="scrypt"){const l=Zo(Kt(t,"crypto/kdfparams/salt")),c=parseInt(Kt(t,"crypto/kdfparams/n")),f=parseInt(Kt(t,"crypto/kdfparams/r")),u=parseInt(Kt(t,"crypto/kdfparams/p"));(!c||!f||!u)&&a("kdf",o),c&c-1&&a("N",c);const h=parseInt(Kt(t,"crypto/kdfparams/dklen"));return h!==32&&a("dklen",h),n(s,l,c,f,u,64,i)}else if(o.toLowerCase()==="pbkdf2"){const l=Zo(Kt(t,"crypto/kdfparams/salt"));let c=null;const f=Kt(t,"crypto/kdfparams/prf");f==="hmac-sha256"?c="sha256":f==="hmac-sha512"?c="sha512":a("prf",f);const u=parseInt(Kt(t,"crypto/kdfparams/c")),h=parseInt(Kt(t,"crypto/kdfparams/dklen"));return h!==32&&a("dklen",h),r(s,l,u,h,c)}}return pp.throwArgumentError("unsupported key-derivation function","kdf",o)}function rV(t,e){const r=JSON.parse(t),n=UE(r,e,zE,sx.syncScrypt);return jE(r,n)}function nV(t,e,r){return XU(this,void 0,void 0,function*(){const n=JSON.parse(t),i=yield UE(n,e,tV,sx.scrypt,r);return jE(n,i)})}function iV(t,e,r,n){try{if(we(t.address)!==qs(t.privateKey))throw new Error("address/privateKey mismatch");if(x6(t)){const S=t.mnemonic;if(fn.fromMnemonic(S.phrase,null,S.locale).derivePath(S.path||zl).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(S){return Promise.reject(S)}typeof r=="function"&&!n&&(n=r,r={}),r||(r={});const i=X(t.privateKey),s=rx(e);let o=null,a=null,l=null;if(x6(t)){const S=t.mnemonic;o=X(Hh(S.phrase,S.locale||"en")),a=S.path||zl,l=S.locale||"en"}let c=r.client;c||(c="ethers.js");let f=null;r.salt?f=X(r.salt):f=pi(32);let u=null;if(r.iv){if(u=X(r.iv),u.length!==16)throw new Error("invalid iv")}else u=pi(16);let h=null;if(r.uuid){if(h=X(r.uuid),h.length!==16)throw new Error("invalid uuid")}else h=pi(16);let y=1<<17,m=8,p=1;return r.scrypt&&(r.scrypt.N&&(y=r.scrypt.N),r.scrypt.r&&(m=r.scrypt.r),r.scrypt.p&&(p=r.scrypt.p)),sx.scrypt(s,f,y,m,p,64,n).then(S=>{S=X(S);const w=S.slice(0,16),A=S.slice(16,32),k=S.slice(32,64),I=new gi.Counter(u),R=new gi.ModeOfOperation.ctr(w,I),F=X(R.encrypt(i)),z=pe(ze([A,F])),j={address:t.address.substring(2).toLowerCase(),id:GU(h),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:Y(u).substring(2)},ciphertext:Y(F).substring(2),kdf:"scrypt",kdfparams:{salt:Y(f).substring(2),n:y,dklen:32,p,r:m},mac:z.substring(2)}};if(o){const K=pi(16),J=new gi.Counter(K),Z=new gi.ModeOfOperation.ctr(k,J),ie=X(Z.encrypt(o)),L=new Date,v=L.getUTCFullYear()+"-"+Ec(L.getUTCMonth()+1,2)+"-"+Ec(L.getUTCDate(),2)+"T"+Ec(L.getUTCHours(),2)+"-"+Ec(L.getUTCMinutes(),2)+"-"+Ec(L.getUTCSeconds(),2)+".0Z";j["x-ethers"]={client:c,gethFilename:"UTC--"+v+"--"+j.address,mnemonicCounter:Y(K).substring(2),mnemonicCiphertext:Y(ie).substring(2),path:a,locale:l,version:"0.1"}}return JSON.stringify(j)})}function sV(t,e,r){if(nx(t)){r&&r(0);const n=$E(t,e);return r&&r(1),Promise.resolve(n)}return ix(t)?nV(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function oV(t,e){if(nx(t))return $E(t,e);if(ix(t))return rV(t,e);throw new Error("invalid JSON wallet")}const aV="wallet/5.7.0";var b6=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Oa=new q(aV);function lV(t){return t!=null&&Te(t.privateKey,32)&&t.address!=null}function cV(t){const e=t.mnemonic;return e&&e.phrase}let fV=class za extends io{constructor(e,r){if(super(),lV(e)){const n=new Xo(e.privateKey);if(ee(this,"_signingKey",()=>n),ee(this,"address",qs(this.publicKey)),this.address!==we(e.address)&&Oa.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),cV(e)){const i=e.mnemonic;ee(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||zl,locale:i.locale||"en"}));const s=this.mnemonic,o=fn.fromMnemonic(s.phrase,null,s.locale).derivePath(s.path);qs(o.privateKey)!==this.address&&Oa.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else ee(this,"_mnemonic",()=>null)}else{if(Xo.isSigningKey(e))e.curve!=="secp256k1"&&Oa.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),ee(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const n=new Xo(e);ee(this,"_signingKey",()=>n)}ee(this,"_mnemonic",()=>null),ee(this,"address",qs(this.publicKey))}r&&!po.isProvider(r)&&Oa.throwArgumentError("invalid provider","provider",r),ee(this,"provider",r||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new za(this,e)}signTransaction(e){return qe(e).then(r=>{r.from!=null&&(we(r.from)!==this.address&&Oa.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);const n=this._signingKey().signDigest(pe(vp(r)));return vp(r,n)})}signMessage(e){return b6(this,void 0,void 0,function*(){return sp(this._signingKey().signDigest(Fh(e)))})}_signTypedData(e,r,n){return b6(this,void 0,void 0,function*(){const i=yield Yt.resolveNames(e,r,n,s=>(this.provider==null&&Oa.throwError("cannot resolve ENS names without a provider",q.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:s}),this.provider.resolveName(s)));return sp(this._signingKey().signDigest(Yt.hash(i.domain,r,i.value)))})}encrypt(e,r,n){if(typeof r=="function"&&!n&&(n=r,r={}),n&&typeof n!="function")throw new Error("invalid callback");return r||(r={}),iV(this,e,r,n)}static createRandom(e){let r=pi(16);e||(e={}),e.extraEntropy&&(r=X(Vt(pe(ze([r,e.extraEntropy])),0,16)));const n=Wh(r,e.locale);return za.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return sV(e,r,n).then(i=>new za(i))}static fromEncryptedJsonSync(e,r){return new za(oV(e,r))}static fromMnemonic(e,r,n){return r||(r=zl),new za(fn.fromMnemonic(e,null,n).derivePath(r))}};function VE(t,e){return va(Fh(t),e)}function uV(t,e,r,n){return va(Yt.hash(t,e,r),n)}const dV="networks/5.7.1",w6=new q(dV);function hV(t){return t&&typeof t.renetwork=="function"}function zi(t){const e=function(r,n){n==null&&(n={});const i=[];if(r.InfuraProvider&&n.infura!=="-")try{i.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{i.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{i.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const s=["goerli","ropsten","rinkeby","sepolia"];try{const o=new r.PocketProvider(t,n.pocket);o.network&&s.indexOf(o.network.name)===-1&&i.push(o)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const s=["ropsten"],o=new r.AnkrProvider(t,n.ankr);o.network&&s.indexOf(o.network.name)===-1&&i.push(o)}catch{}if(i.length===0)return null;if(r.FallbackProvider){let s=1;return n.quorum!=null?s=n.quorum:t==="homestead"&&(s=2),new r.FallbackProvider(i,s)}return i[0]};return e.renetwork=function(r){return zi(r)},e}function D0(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return D0(t,n)},r}const C6={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:zi("homestead")},A6={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:zi("ropsten")},E6={chainId:63,name:"classicMordor",_defaultProvider:D0("https://www.ethercluster.com/mordor","classicMordor")},ed={unspecified:{chainId:0,name:"unspecified"},homestead:C6,mainnet:C6,morden:{chainId:2,name:"morden"},ropsten:A6,testnet:A6,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:zi("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:zi("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:zi("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:zi("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:D0("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:E6,classicTestnet:E6,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:D0("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:zi("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:zi("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function vV(t){if(t==null)return null;if(typeof t=="number"){for(const n in ed){const i=ed[n];if(i.chainId===t)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=ed[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=ed[t.name];if(!e)return typeof t.chainId!="number"&&w6.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&w6.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(hV(e._defaultProvider)?r=e._defaultProvider.renetwork(t):r=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}const yV="web/5.7.1";var pV=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};function gV(t,e){return pV(this,void 0,void 0,function*(){e==null&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),e.fetchOptions!=null){const o=e.fetchOptions;o.mode&&(r.mode=o.mode),o.cache&&(r.cache=o.cache),o.credentials&&(r.credentials=o.credentials),o.redirect&&(r.redirect=o.redirect),o.referrer&&(r.referrer=o.referrer)}const n=yield fetch(t,r),i=yield n.arrayBuffer(),s={};return n.headers.forEach?n.headers.forEach((o,a)=>{s[a.toLowerCase()]=o}):n.headers.keys().forEach(o=>{s[o.toLowerCase()]=n.headers.get(o)}),{headers:s,statusCode:n.status,statusMessage:n.statusText,body:X(new Uint8Array(i))}})}var mV=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Vn=new q(yV);function S6(t){return new Promise(e=>{setTimeout(e,t)})}function ws(t,e){if(t==null)return null;if(typeof t=="string")return t;if(rs(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return fs(t)}catch{}return Y(t)}return t}function xV(t){return Ve(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function HE(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;Vn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const i=typeof t=="object"?t.throttleCallback:null,s=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;Vn.assertArgument(s>0&&s%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",s);const o=typeof t=="object"?!!t.errorPassThrough:!1,a={};let l=null;const c={method:"GET"};let f=!1,u=2*60*1e3;if(typeof t=="string")l=t;else if(typeof t=="object"){if((t==null||t.url==null)&&Vn.throwArgumentError("missing URL","connection.url",t),l=t.url,typeof t.timeout=="number"&&t.timeout>0&&(u=t.timeout),t.headers)for(const w in t.headers)a[w.toLowerCase()]={key:w,value:String(t.headers[w])},["if-none-match","if-modified-since"].indexOf(w.toLowerCase())>=0&&(f=!0);if(c.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){l.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&Vn.throwError("basic authentication requires a secure https url",q.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:t.user,password:"[REDACTED]"});const w=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+qm(Ve(w))}}t.skipFetchSetup!=null&&(c.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(c.fetchOptions=er(t.fetchOptions))}const h=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),y=l?l.match(h):null;if(y)try{const w={statusCode:200,statusMessage:"OK",headers:{"content-type":y[1]||"text/plain"},body:y[2]?Wm(y[3]):xV(y[3])};let A=w.body;return r&&(A=r(w.body,w)),Promise.resolve(A)}catch(w){Vn.throwError("processing response error",q.errors.SERVER_ERROR,{body:ws(y[1],y[2]),error:w,requestBody:null,requestMethod:"GET",url:l})}e&&(c.method="POST",c.body=e,a["content-type"]==null&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),a["content-length"]==null&&(a["content-length"]={key:"Content-Length",value:String(e.length)}));const m={};Object.keys(a).forEach(w=>{const A=a[w];m[A.key]=A.value}),c.headers=m;const p=function(){let w=null;return{promise:new Promise(function(I,R){u&&(w=setTimeout(()=>{w!=null&&(w=null,R(Vn.makeError("timeout",q.errors.TIMEOUT,{requestBody:ws(c.body,m["content-type"]),requestMethod:c.method,timeout:u,url:l})))},u))}),cancel:function(){w!=null&&(clearTimeout(w),w=null)}}}(),S=function(){return mV(this,void 0,void 0,function*(){for(let w=0;w=300)&&(p.cancel(),Vn.throwError("bad response",q.errors.SERVER_ERROR,{status:A.statusCode,headers:A.headers,body:ws(k,A.headers?A.headers["content-type"]:null),requestBody:ws(c.body,m["content-type"]),requestMethod:c.method,url:l})),r)try{const I=yield r(k,A);return p.cancel(),I}catch(I){if(I.throttleRetry&&w{let a=null;if(s!=null)try{a=JSON.parse(fs(s))}catch(l){Vn.throwError("invalid JSON",q.errors.SERVER_ERROR,{body:s,error:l})}return r&&(a=r(a,o)),a},i=null;if(e!=null){i=Ve(e);const s=typeof t=="string"?{url:t}:er(t);s.headers?Object.keys(s.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(s.headers=er(s.headers),s.headers["content-type"]="application/json"):s.headers={"content-type":"application/json"},t=s}return HE(t,i,n)}function qo(t,e){return e||(e={}),e=er(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let i=null,s=!1;const o=()=>s?!1:(s=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{o()&&n(new Error("timeout"))},e.timeout));const a=e.retryLimit;let l=0;function c(){return t().then(function(f){if(f!==void 0)o()&&r(f);else if(e.oncePoll)e.oncePoll.once("poll",c);else if(e.onceBlock)e.onceBlock.once("block",c);else if(!s){if(l++,l>a){o()&&n(new Error("retry limit reached"));return}let u=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));ue.ceiling&&(u=e.ceiling),setTimeout(c,u)}return null},function(f){o()&&n(f)})}c()})}var B0="qpzry9x8gf2tvdw0s3jn54khce6mua7l",gp={};for(var td=0;td>25;return(t&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function WE(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=bl(e)^n>>5}for(e=bl(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=WE(t);if(typeof n=="string")throw new Error(n);for(var i=t+"1",s=0;s>5)throw new Error("Non 5-bit word");n=bl(n)^o,i+=B0.charAt(o)}for(s=0;s<6;++s)n=bl(n);for(n^=1,s=0;s<6;++s){var a=n>>(5-s)*5&31;i+=B0.charAt(a)}return i}function qE(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;t=r;var i=t.lastIndexOf("1");if(i===-1)return"No separator character for "+t;if(i===0)return"Missing prefix for "+t;var s=t.slice(0,i),o=t.slice(i+1);if(o.length<6)return"Data too short";var a=WE(s);if(typeof a=="string")return a;for(var l=[],c=0;c=o.length)&&l.push(u)}return a!==1?"Invalid checksum for "+t:{prefix:s,words:l}}function wV(){var t=qE.apply(null,arguments);if(typeof t=="object")return t}function CV(t){var e=qE.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function qh(t,e,r,n){for(var i=0,s=0,o=(1<=r;)s-=r,a.push(i>>s&o);if(n)s>0&&a.push(i<=e)return"Excess padding";if(i<this.data(u,!0);return e.transaction={hash:o,type:c,accessList:ce.allowNull(this.accessList.bind(this),null),blockHash:ce.allowNull(o,null),blockNumber:ce.allowNull(l,null),transactionIndex:ce.allowNull(l,null),confirmations:ce.allowNull(l,null),from:r,gasPrice:ce.allowNull(n),maxPriorityFeePerGas:ce.allowNull(n),maxFeePerGas:ce.allowNull(n),gasLimit:n,to:ce.allowNull(r,null),value:n,nonce:l,data:s,r:ce.allowNull(this.uint256),s:ce.allowNull(this.uint256),v:ce.allowNull(l),creates:ce.allowNull(r,null),raw:ce.allowNull(s)},e.transactionRequest={from:ce.allowNull(r),nonce:ce.allowNull(l),gasLimit:ce.allowNull(n),gasPrice:ce.allowNull(n),maxPriorityFeePerGas:ce.allowNull(n),maxFeePerGas:ce.allowNull(n),to:ce.allowNull(r),value:ce.allowNull(n),data:ce.allowNull(f),type:ce.allowNull(l),accessList:ce.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:o,address:r,topics:ce.arrayOf(o),data:s,logIndex:l,blockHash:o},e.receipt={to:ce.allowNull(this.address,null),from:ce.allowNull(this.address,null),contractAddress:ce.allowNull(r,null),transactionIndex:l,root:ce.allowNull(a),gasUsed:n,logsBloom:ce.allowNull(s),blockHash:o,transactionHash:o,logs:ce.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:ce.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:ce.allowNull(n),status:ce.allowNull(l),type:c},e.block={hash:ce.allowNull(o),parentHash:o,number:l,timestamp:l,nonce:ce.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:ce.allowNull(r),extraData:s,transactions:ce.allowNull(ce.arrayOf(o)),baseFeePerGas:ce.allowNull(n)},e.blockWithTransactions=er(e.block),e.blockWithTransactions.transactions=ce.allowNull(ce.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:ce.allowNull(i,void 0),toBlock:ce.allowNull(i,void 0),blockHash:ce.allowNull(o,void 0),address:ce.allowNull(r,void 0),topics:ce.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:ce.allowNull(l),blockHash:ce.allowNull(o),transactionIndex:l,removed:ce.allowNull(this.boolean.bind(this)),address:r,data:ce.allowFalsish(s,"0x"),topics:ce.arrayOf(o),transactionHash:o,logIndex:l},e}accessList(e){return ka(e||[])}number(e){return e==="0x"?0:V.from(e).toNumber()}type(e){return e==="0x"||e==null?0:V.from(e).toNumber()}bigNumber(e){return V.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return typeof e=="string"&&(!r&&e.substring(0,2)!=="0x"&&(e="0x"+e),Te(e))?e.toLowerCase():Sc.throwArgumentError("invalid hash","value",e)}data(e,r){const n=this.hex(e,r);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return we(e)}callAddress(e){if(!Te(e,32))return null;const r=we(Vt(e,12));return r===jm?null:r}contractAddress(e){return Fm(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||Te(e))return ti(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return _i(n)!==32?Sc.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=V.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!Te(e))throw new Error("invalid uint256");return Ue(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,i=ce.check(r,e);return i._difficulty=n==null?null:V.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return ce.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&V.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const r=ce.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;Te(n)&&(n=V.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),Te(n)&&(n=V.from(n).toNumber()),typeof n!="number"&&r.v!=null&&(n=(r.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),r.chainId=n}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r}transaction(e){return TE(e)}receiptLog(e){return ce.check(this.formats.receiptLog,e)}receipt(e){const r=ce.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=V.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&Sc.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):Sc.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&Sc.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):e!=null?this.hash(e,!0):null}filter(e){return ce.check(this.formats.filter,e)}filterLog(e){return ce.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const i in e)try{const s=e[i](r[i]);s!==void 0&&(n[i]=s)}catch(s){throw s.checkKey=i,s.checkValue=r[i],s}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(i){n.push(e(i))}),n}}}var me=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Ae=new q(uu),TV=10;function _6(t){return t==null?"null":(_i(t)!==32&&Ae.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function T6(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(i=>{r[_6(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return _6(e)}).join("&")}function PV(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const r=e.split("|").map(n=>n==="null"?null:n);return r.length===1?r[0]:r})}function Da(t){if(typeof t=="string"){if(t=t.toLowerCase(),_i(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+T6(t);if(Tj.isForkEvent(t))throw Ae.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+T6(t.topics||[])}throw new Error("invalid event - "+t)}function kc(){return new Date().getTime()}function P6(t){return new Promise(e=>{setTimeout(e,t)})}const IV=["block","network","pending","poll"];let MV=class{constructor(e,r,n){ee(this,"tag",e),ee(this,"listener",r),ee(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const r=e[1],n=PV(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||IV.indexOf(this.tag)>=0}};const RV={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Tv(t){return Ue(V.from(t).toHexString(),32)}function I6(t){return Fl.encode(ze([t,Vt(ss(ss(t)),0,4)]))}const GE=new RegExp("^(ipfs)://(.*)$","i"),M6=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),GE,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Td(t,e){try{return fs(qf(t,e))}catch{}return null}function qf(t,e){if(t==="0x")return null;const r=V.from(Vt(t,e,e+32)).toNumber(),n=V.from(Vt(t,r,r+32)).toNumber();return Vt(t,r+32,r+32+n)}function Pv(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Ae.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function R6(t){const e=X(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function NV(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function KE(t){const e=[];let r=0;for(let n=0;nV.from(e).eq(1)).catch(e=>{if(e.code===q.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return me(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Ur([e,ef(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=Ur(["0x9061b923",KE([KA(this.name),n.data])]));try{let s=yield this.provider.call(n);return X(s).length%32===4&&Ae.throwError("resolver threw error",q.errors.CALL_EXCEPTION,{transaction:n,data:s}),i&&(s=qf(s,0)),s}catch(s){if(s.code===q.errors.CALL_EXCEPTION)return null;throw s}})}_fetchBytes(e,r){return me(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?qf(n,0):null})}_getAddress(e,r){const n=RV[String(e)];if(n==null&&Ae.throwError(`unsupported coin type: ${e}`,q.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=X(r);if(n.p2pkh!=null){const s=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(s){const o=parseInt(s[1],16);if(s[2].length===o*2&&o>=1&&o<=75)return I6(ze([[n.p2pkh],"0x"+s[2]]))}}if(n.p2sh!=null){const s=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(s){const o=parseInt(s[1],16);if(s[2].length===o*2&&o>=1&&o<=75)return I6(ze([[n.p2sh],"0x"+s[2]]))}}if(n.prefix!=null){const s=i[1];let o=i[0];if(o===0?s!==20&&s!==32&&(o=-1):o=-1,o>=0&&i.length===2+s&&s>=1&&s<=75){const a=k6.toWords(i.slice(2));return a.unshift(o),k6.encode(n.prefix,a)}}return null}getAddress(e){return me(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===T0?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===q.errors.CALL_EXCEPTION)return null;throw i}const r=yield this._fetchBytes("0xf1cb7e06",Tv(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&Ae.throwError("invalid or unsupported coin data",q.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return me(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;no[l])}return Ae.throwError("invalid or unsupported content hash data",q.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return me(this,void 0,void 0,function*(){let r=Ve(e);r=ze([Tv(64),Tv(r.length),r]),r.length%32!==0&&(r=ze([r,Ue("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",Y(r));return n==null||n==="0x"?null:fs(n)})}}let Iv=null,OV=1;class ox extends po{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),ee(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=Yn(new.target,"getNetwork")(e);r?(ee(this,"_network",r),this.emit("network",r,null)):Ae.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return me(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||Ae.throwError("no network detected",q.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:ee(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return qo(()=>this._ready().then(e=>e,e=>{if(!(e.code===q.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Iv==null&&(Iv=new ce),Iv}static getNetwork(e){return vV(e??"homestead")}ccipReadFetch(e,r,n){return me(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const i=e.to.toLowerCase(),s=r.toLowerCase(),o=[];for(let a=0;a=0?null:JSON.stringify({data:s,sender:i}),u=yield fu({url:c,errorPassThrough:!0},f,(y,m)=>(y.status=m.statusCode,y));if(u.data)return u.data;const h=u.message||"unknown error";if(u.status>=400&&u.status<500)return Ae.throwError(`response not found during CCIP fetch: ${h}`,q.errors.SERVER_ERROR,{url:l,errorMessage:h});o.push(h)}return Ae.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,q.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return me(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const s=yield i;if(kc()-s.respTime<=e)return s.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=kc(),n=qe({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:s})=>{if(s)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),s;const o=kc();return i=V.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return me(this,void 0,void 0,function*(){const e=OV++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)Ae.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",Ae.makeError("network block skew detected",q.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;const s=this._emitted[i];s!=="pending"&&n-s>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{const s=i.hash;let o=this.getTransactionReceipt(s).then(a=>(!a||a.blockNumber==null||(this._emitted["t:"+s]=a.blockNumber,this.emit(s,a)),null)).catch(a=>{this.emit("error",a)});r.push(o);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);const s=i.filter;s.fromBlock=i._lastBlockNumber+1,s.toBlock=n;const o=s.toBlock-this._maxFilterBlockRange;o>s.fromBlock&&(s.fromBlock=o),s.fromBlock<0&&(s.fromBlock=0);const a=this.getLogs(s).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(c=>{c.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=c.blockNumber),this._emitted["b:"+c.blockHash]=c.blockNumber,this._emitted["t:"+c.transactionHash]=c.blockNumber,this.emit(s,c)})}).catch(l=>{this.emit("error",l),i._inflight=!1});r.push(a)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return me(this,void 0,void 0,function*(){return Ae.throwError("provider does not support network detection",q.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return me(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,e),yield P6(0),this._network;const n=Ae.makeError("underlying network changed",q.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=kc();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return me(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return me(this,void 0,void 0,function*(){const s=yield this.getTransactionReceipt(e);return(s?s.confirmations:0)>=r?s:new Promise((o,a)=>{const l=[];let c=!1;const f=function(){return c?!0:(c=!0,l.forEach(h=>{h()}),!1)},u=h=>{h.confirmations{this.removeListener(e,u)}),i){let h=i.startBlock,y=null;const m=p=>me(this,void 0,void 0,function*(){c||(yield P6(1e3),this.getTransactionCount(i.from).then(S=>me(this,void 0,void 0,function*(){if(!c){if(S<=i.nonce)h=p;else{{const w=yield this.getTransaction(e);if(w&&w.blockNumber!=null)return}for(y==null&&(y=h-3,y{c||this.once("block",m)}))});if(c)return;this.once("block",m),l.push(()=>{this.removeListener("block",m)})}if(typeof n=="number"&&n>0){const h=setTimeout(()=>{f()||a(Ae.makeError("timeout exceeded",q.errors.TIMEOUT,{timeout:n}))},n);h.unref&&h.unref(),l.push(()=>{clearTimeout(h)})}})})}getBlockNumber(){return me(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return me(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return V.from(e)}catch(r){return Ae.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return me(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield qe({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return V.from(i)}catch(s){return Ae.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:s})}})}getTransactionCount(e,r){return me(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield qe({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return V.from(i).toNumber()}catch(s){return Ae.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:s})}})}getCode(e,r){return me(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield qe({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return Y(i)}catch(s){return Ae.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:s})}})}getStorageAt(e,r,n){return me(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield qe({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>ti(o))}),s=yield this.perform("getStorageAt",i);try{return Y(s)}catch(o){return Ae.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:s,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&_i(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&Ae.throwError("Transaction hash mismatch from Provider.sendTransaction.",q.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(s,o)=>me(this,void 0,void 0,function*(){s==null&&(s=1),o==null&&(o=0);let a;s!==0&&n!=null&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const l=yield this._waitForTransaction(e.hash,s,o,a);return l==null&&s===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&Ae.throwError("transaction failed",q.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return me(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(s=>Y(s)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const s=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,s,i)}catch(s){throw s.transaction=n,s.transactionHash=n.hash,s}})}_getTransactionRequest(e){return me(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?this._getAddress(s):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?V.from(s):null))}),["type"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?Y(s):null))}),this.formatter.transactionRequest(yield qe(n))})}_getFilter(e){return me(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield qe(r))})}_call(e,r,n){return me(this,void 0,void 0,function*(){n>=TV&&Ae.throwError("CCIP read exceeded maximum redirections",q.errors.SERVER_ERROR,{redirects:n,transaction:e});const i=e.to,s=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&i!=null&&s.substring(0,10)==="0x556f1830"&&_i(s)%32===4)try{const o=Vt(s,4),a=Vt(o,0,32);V.from(a).eq(i)||Ae.throwError("CCIP Read sender did not match",q.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:s});const l=[],c=V.from(Vt(o,32,64)).toNumber(),f=V.from(Vt(o,c,c+32)).toNumber(),u=Vt(o,c+32);for(let w=0;wme(this,void 0,void 0,function*(){const s=yield this.perform("getBlock",i);if(s==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let o=null;for(let l=0;lthis._wrapTransaction(l)),a}return this.formatter.block(s)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return me(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return qo(()=>me(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return me(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return qo(()=>me(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return i}),{oncePoll:this})})}getLogs(e){return me(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield qe({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),ce.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return me(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return me(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&Ae.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return me(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const i=new mp(this,n,e);return r!==e&&!(yield i.supportsWildcard())?null:i}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return me(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||Ae.throwError("network does not support ENS",q.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+ef(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return me(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(Te(e))throw n}typeof e!="string"&&Ae.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return me(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const i=Td(yield this.call({to:n,data:"0x691f3431"+ef(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return me(this,void 0,void 0,function*(){let r=null;if(Te(e)){const s=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(s,"getAvatar");if(!o)return null;r=new mp(this,o,s);try{const a=yield r.getAvatar();if(a)return a.url}catch(a){if(a.code!==q.errors.CALL_EXCEPTION)throw a}try{const a=Td(yield this.call({to:o,data:"0x691f3431"+ef(s).substring(2)}),0);r=yield this.getResolver(a)}catch(a){if(a.code!==q.errors.CALL_EXCEPTION)throw a;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return Ae.throwError(e+" not implemented",q.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const i=new MV(Da(e),r,n);return this._events.push(i),this._startEvent(i),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let n=!1,i=[],s=Da(e);return this._events=this._events.filter(o=>o.tag!==s?!0:(setTimeout(()=>{o.listener.apply(this,r)},0),n=!0,o.once?(i.push(o),!1):!0)),i.forEach(o=>{this._stopEvent(o)}),n}listenerCount(e){if(!e)return this._events.length;let r=Da(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=Da(e);return this._events.filter(n=>n.tag===r).map(n=>n.listener)}off(e,r){if(r==null)return this.removeAllListeners(e);const n=[];let i=!1,s=Da(e);return this._events=this._events.filter(o=>o.tag!==s||o.listener!=r||i?!0:(i=!0,n.push(o),!1)),n.forEach(o=>{this._stopEvent(o)}),this}removeAllListeners(e){let r=[];if(e==null)r=this._events,this._events=[];else{const n=Da(e);this._events=this._events.filter(i=>i.tag!==n?!0:(r.push(i),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var $i=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Xt=new q(uu),DV=["call","estimateGas"];function rf(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=Te(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if(typeof t=="object"){for(const r in t){const n=rf(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return rf(JSON.parse(t),e)}catch{}return null}function JE(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const s=rf(e,!0);if(s)return s.data;Xt.throwError("missing revert data in call exception; Transaction reverted without a reason string",q.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let s=rf(e.body,!1);s==null&&(s=rf(e,!1)),s&&Xt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",q.errors.UNPREDICTABLE_GAS_LIMIT,{reason:s.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===q.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Xt.throwError("insufficient funds for intrinsic transaction cost",q.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&Xt.throwError("nonce has already been used",q.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Xt.throwError("replacement fee too low",q.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&Xt.throwError("legacy pre-eip-155 transactions not supported",q.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),DV.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Xt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",q.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function N6(t){return new Promise(function(e){setTimeout(e,t)})}function BV(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function _c(t){return t&&t.toLowerCase()}const xp={};class QE extends io{constructor(e,r,n){if(super(),e!==xp)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");ee(this,"provider",r),n==null&&(n=0),typeof n=="string"?(ee(this,"_address",this.provider.formatter.address(n)),ee(this,"_index",null)):typeof n=="number"?(ee(this,"_index",n),ee(this,"_address",null)):Xt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Xt.throwError("cannot alter JSON-RPC Signer connection",q.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new LV(xp,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Xt.throwError("unknown account #"+this._index,q.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=er(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=er(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>$i(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&Xt.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),qe({tx:qe(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Xt.throwArgumentError("from address mismatch","transaction",e):n.from=i;const s=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[s]).then(o=>o,o=>(typeof o.message=="string"&&o.message.match(/user denied/i)&&Xt.throwError("user rejected transaction",q.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),JE("sendTransaction",o,s)))})}signTransaction(e){return Xt.throwError("signing transactions is unsupported",q.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return $i(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield qo(()=>$i(this,void 0,void 0,function*(){const i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,r)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return $i(this,void 0,void 0,function*(){const r=typeof e=="string"?Ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[Y(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Xt.throwError("user rejected signing",q.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return $i(this,void 0,void 0,function*(){const r=typeof e=="string"?Ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),Y(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Xt.throwError("user rejected signing",q.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return $i(this,void 0,void 0,function*(){const i=yield Yt.resolveNames(e,r,n,o=>this.provider.resolveName(o)),s=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[s.toLowerCase(),JSON.stringify(Yt.getPayload(i.domain,r,i.value))])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&Xt.throwError("user rejected signing",q.errors.ACTION_REJECTED,{action:"_signTypedData",from:s,messageData:{domain:i.domain,types:r,value:i.value}}),o}})}unlock(e){return $i(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class LV extends QE{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(r,n)}))}}const $V={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let Ta=class extends ox{constructor(e,r){let n=r;n==null&&(n=new Promise((i,s)=>{setTimeout(()=>{this.detectNetwork().then(o=>{i(o)},o=>{s(o)})},0)})),super(n),e||(e=Yn(this.constructor,"defaultUrl")()),typeof e=="string"?ee(this,"connection",Object.freeze({url:e})):ee(this,"connection",Object.freeze(er(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return $i(this,void 0,void 0,function*(){yield N6(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const r=Yn(this.constructor,"getNetwork");try{return r(V.from(e).toNumber())}catch(n){return Xt.throwError("could not detect network",q.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Xt.throwError("could not detect network",q.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new QE(xp,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:Ti(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const s=fu(this.connection,JSON.stringify(n),BV).then(o=>(this.emit("debug",{action:"response",request:n,response:o,provider:this}),o),o=>{throw this.emit("debug",{action:"response",error:o,request:n,provider:this}),o});return i&&(this._cache[e]=s,setTimeout(()=>{this._cache[e]=null},0)),s}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[_c(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[_c(r.address),r.blockTag]];case"getCode":return["eth_getCode",[_c(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[_c(r.address),Ue(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[Yn(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[Yn(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=_c(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return $i(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=r.transaction;if(i&&i.type!=null&&V.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const s=yield this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(r=er(r),r.transaction=er(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&Xt.throwError(e+" not implemented",q.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return JE(e,i,r)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(s){if(e._pendingFilter!=r)return null;let o=Promise.resolve();return s.forEach(function(a){e._emitted["t:"+a.toLowerCase()]="pending",o=o.then(function(){return e.getTransaction(a).then(function(l){return e.emit("pending",l),null})})}),o.then(function(){return N6(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(s=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=er($V);if(r)for(const s in r)r[s]&&(n[s]=!0);Bm(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(s){if(e[s]==null)return;const o=ti(V.from(e[s]));s==="gasLimit"&&(s="gas"),i[s]=o}),["from","to","data"].forEach(function(s){e[s]!=null&&(i[s]=Y(e[s]))}),e.accessList&&(i.accessList=ka(e.accessList)),i}};var FV=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const jV=new q(uu);class L0 extends Ta{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return FV(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||jV.throwError("no network detected",q.errors.UNKNOWN_ERROR,{}),this._network==null&&(ee(this,"_network",r),this.emit("network",r,null))),r})}}const O6=new q(uu);let zV=1;function D6(t,e){const r="Web3LegacyFetcher";return function(n,i){const s={method:n,params:i,id:zV++,jsonrpc:"2.0"};return new Promise((o,a)=>{this.emit("debug",{action:"request",fetcher:r,request:Ti(s),provider:this}),e(s,(l,c)=>{if(l)return this.emit("debug",{action:"response",fetcher:r,error:l,request:s,provider:this}),a(l);if(this.emit("debug",{action:"response",fetcher:r,request:s,response:c,provider:this}),c.error){const f=new Error(c.error.message);return f.code=c.error.code,f.data=c.error.data,a(f)}o(c.result)})})}}function UV(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:Ti(n),provider:this}),t.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}class VV extends Ta{constructor(e,r){e==null&&O6.throwArgumentError("missing provider","provider",e);let n=null,i=null,s=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),s=e,e.request?(n===""&&(n="eip-1193:"),i=UV(e)):e.sendAsync?i=D6(e,e.sendAsync.bind(e)):e.send?i=D6(e,e.send.bind(e)):O6.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),ee(this,"jsonRpcFetchFunc",i),ee(this,"provider",s)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}const HV="solidity/5.7.0",WV=new RegExp("^bytes([0-9]+)$"),qV=new RegExp("^(u?int)([0-9]*)$"),GV=new RegExp("^(.*)\\[([0-9]*)\\]$"),KV="0000000000000000000000000000000000000000000000000000000000000000",Ua=new q(HV);function YE(t,e,r){switch(t){case"address":return r?Yc(e,32):X(e);case"string":return Ve(e);case"bytes":return X(e);case"bool":return e=e?"0x01":"0x00",r?Yc(e,32):X(e)}let n=t.match(qV);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Ua.throwArgumentError("invalid number type","type",t),r&&(i=256),e=V.from(e).toTwos(i),Yc(e,i/8)}if(n=t.match(WV),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Ua.throwArgumentError("invalid bytes type","type",t),X(e).byteLength!==i&&Ua.throwArgumentError(`invalid value for ${t}`,"value",e),r?X((e+KV).substring(0,66)):e}if(n=t.match(GV),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Ua.throwArgumentError(`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(YE(i,a,!0))}),ze(o)}return Ua.throwArgumentError("invalid type","type",t)}function Ce(t,e){t.length!=e.length&&Ua.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(YE(n,e[i]))}),Y(ze(r))}function Gs(t,e){return pe(Ce(t,e))}function JV(t,e){return ss(Ce(t,e))}const QV="units/5.7.0",XE=new q(QV),ZE=["wei","kwei","mwei","gwei","szabo","finney","ether"];function YV(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&XE.throwArgumentError("invalid value","value",t);let r=e[0],n="";for(r.substring(0,1)==="-"&&(n="-",r=r.substring(1));r.substring(0,1)==="0";)r=r.substring(1);r===""&&(r="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);const s=[];for(;r.length;)if(r.length<=3){s.unshift(r);break}else{const o=r.length-3;s.unshift(r.substring(o)),r=r.substring(0,o)}return n+s.join(",")+i}function e7(t,e){if(typeof e=="string"){const r=ZE.indexOf(e);r!==-1&&(e=3*r)}return Cd(t,e??18)}function $0(t,e){if(typeof t!="string"&&XE.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=ZE.indexOf(e);r!==-1&&(e=3*r)}return ai(t,e??18)}function XV(t){return e7(t,18)}function bp(t){return $0(t,18)}const ZV=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:Hm,ConstructorFragment:Jn,ErrorFragment:Ui,EventFragment:vi,FormatTypes:Ne,Fragment:yi,FunctionFragment:Qn,HDNode:fn,Indexed:M0,Interface:tr,LogDescription:XA,Logger:q,ParamType:ar,RLP:oF,SigningKey:Xo,get SupportedAlgorithm(){return jl},TransactionDescription:ZA,get TransactionTypes(){return hp},get UnicodeNormalizationForm(){return Pi},Utf8ErrorFuncs:jA,get Utf8ErrorReason(){return Yr},_TypedDataEncoder:Yt,_fetchData:HE,_toEscapedUtf8String:SF,accessListify:ka,arrayify:X,base58:Fl,base64:HF,checkProperties:Bm,checkResultErrors:_A,commify:YV,computeAddress:qs,computeHmac:Hf,computePublicKey:Xm,concat:ze,deepCopy:Ti,defaultAbiCoder:qr,defaultPath:zl,defineReadOnly:ee,dnsEncode:KA,entropyToMnemonic:Wh,fetchJson:fu,formatBytes32String:kF,formatEther:XV,formatUnits:e7,getAccountPath:UU,getAddress:we,getContractAddress:Fm,getCreate2Address:uF,getIcapAddress:fF,getJsonWalletAddress:QU,getStatic:Yn,hashMessage:Fh,hexConcat:Ur,hexDataLength:_i,hexDataSlice:Vt,hexStripZeros:mA,hexValue:ti,hexZeroPad:Ue,hexlify:Y,id:Os,isAddress:RA,isBytes:ls,isBytesLike:rs,isHexString:Te,isValidMnemonic:zU,isValidName:vj,joinSignature:sp,keccak256:pe,mnemonicToEntropy:Hh,mnemonicToSeed:DE,namehash:ef,nameprep:jF,parseBytes32String:_F,parseEther:bp,parseTransaction:TE,parseUnits:$0,poll:qo,randomBytes:pi,recoverAddress:va,recoverPublicKey:AE,resolveProperties:qe,ripemd160:RE,serializeTransaction:vp,sha256:ss,sha512:RU,shallowCopy:er,shuffled:WU,solidityKeccak256:Gs,solidityPack:Ce,soliditySha256:JV,splitSignature:Aa,stripZeros:Ci,toUtf8Bytes:Ve,toUtf8CodePoints:P0,toUtf8String:fs,verifyMessage:VE,verifyTypedData:uV,zeroPad:Yc},Symbol.toStringTag,{value:"Module"})),eH=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var tH=Object.freeze({__proto__:null,abi:eH});const rH=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],nH={isValidSignatureBytes32:"0x1626ba7e"};var iH=Object.freeze({__proto__:null,abi:rH,returns:nH});const sH=[{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC1271Revert",type:"error"},{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC6492DeployFailed",type:"error"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSig",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"allowSideEffects",type:"bool"},{internalType:"bool",name:"deployAlreadyDeployed",type:"bool"}],name:"isValidSigImpl",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffects",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffectsNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];var oH=Object.freeze({__proto__:null,abi:sH});const aH=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var lH=Object.freeze({__proto__:null,abi:aH});const cH=[{type:"function",name:"nonce",constant:!0,inputs:[],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"readNonce",constant:!0,inputs:[{type:"uint256"}],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"updateImplementation",constant:!1,inputs:[{type:"address"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"selfExecute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"execute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"},{type:"uint256"},{type:"bytes"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"createContract",inputs:[{type:"bytes"}],payable:!0,stateMutability:"payable"},{type:"function",name:"setExtraImageHash",constant:!1,inputs:[{type:"bytes32",name:"imageHash"},{type:"uint256",name:"expiration"}],outputs:[],payable:!1,stateMutability:"nonpayable"}];var fH=Object.freeze({__proto__:null,abi:cH});const uH=[{type:"function",name:"updateImageHash",constant:!0,inputs:[{type:"bytes32"}],outputs:[],payable:!1,stateMutability:"view"},{type:"function",name:"imageHash",constant:!0,inputs:[],outputs:[{type:"bytes32"}],payable:!1,stateMutability:"view"}];var dH=Object.freeze({__proto__:null,abi:uH});const hH=[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_mainModule",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"bytes32",name:"_imageHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"_threshold",type:"uint256"},{indexed:!1,internalType:"bytes",name:"_signers",type:"bytes"}],name:"RequiredConfig",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"address",name:"_signer",type:"address"}],name:"RequiredSigner",type:"event"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callBalanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callBlockNumber",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_i",type:"uint256"}],name:"callBlockhash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"callChainId",outputs:[{internalType:"uint256",name:"id",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCode",outputs:[{internalType:"bytes",name:"code",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeHash",outputs:[{internalType:"bytes32",name:"codeHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeSize",outputs:[{internalType:"uint256",name:"size",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callCoinbase",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callDifficulty",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLeft",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLimit",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasPrice",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callOrigin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"knownImageHashes",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"lastImageHashUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastSignerUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastWalletUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bool",name:"delegateCall",type:"bool"},{internalType:"bool",name:"revertOnError",type:"bool"},{internalType:"uint256",name:"gasLimit",type:"uint256"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct IModuleCalls.Transaction[]",name:"_txs",type:"tuple[]"}],name:"multiCall",outputs:[{internalType:"bool[]",name:"_successes",type:"bool[]"},{internalType:"bytes[]",name:"_results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_threshold",type:"uint256"},{components:[{internalType:"uint256",name:"weight",type:"uint256"},{internalType:"address",name:"signer",type:"address"}],internalType:"struct RequireUtils.Member[]",name:"_members",type:"tuple[]"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"uint256",name:"_sizeMembers",type:"uint256"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishInitialSigners",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"}],name:"requireMinNonce",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_expiration",type:"uint256"}],name:"requireNonExpired",outputs:[],stateMutability:"view",type:"function"}];var vH=Object.freeze({__proto__:null,abi:hH});const yH=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var pH=Object.freeze({__proto__:null,abi:yH});const pr={erc6492:oH,erc5719:tH,erc1271:iH,factory:lH,mainModule:fH,mainModuleUpgradable:dH,sequenceUtils:vH,requireFreshSigner:pH},gH=Object.freeze(Object.defineProperty({__proto__:null,walletContracts:pr},Symbol.toStringTag,{value:"Module"}));function F0(){return F0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),de({},n)).then(i=>he(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),de({},n)).then(i=>he(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),de({},n)).then(i=>he(i).then(s=>({status:s.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),de({},n)).then(i=>he(i).then(s=>({data:s.data}))),this.getAuthToken=(n,i)=>this.fetch(this.url("GetAuthToken"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.sendPasswordlessLink=(n,i)=>this.fetch(this.url("SendPasswordlessLink"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.friendList=(n,i)=>this.fetch(this.url("FriendList"),de(n,i)).then(s=>he(s).then(o=>({page:o.page,friends:o.friends}))),this.getFriendByAddress=(n,i)=>this.fetch(this.url("GetFriendByAddress"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,friend:o.friend}))),this.searchFriends=(n,i)=>this.fetch(this.url("SearchFriends"),de(n,i)).then(s=>he(s).then(o=>({friends:o.friends}))),this.addFriend=(n,i)=>this.fetch(this.url("AddFriend"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,friend:o.friend}))),this.updateFriendNickname=(n,i)=>this.fetch(this.url("UpdateFriendNickname"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,friend:o.friend}))),this.removeFriend=(n,i)=>this.fetch(this.url("RemoveFriend"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.contractCall=(n,i)=>this.fetch(this.url("ContractCall"),de(n,i)).then(s=>he(s).then(o=>({returns:o.returns}))),this.decodeContractCall=(n,i)=>this.fetch(this.url("DecodeContractCall"),de(n,i)).then(s=>he(s).then(o=>({call:o.call}))),this.lookupContractCallSelectors=(n,i)=>this.fetch(this.url("LookupContractCallSelectors"),de(n,i)).then(s=>he(s).then(o=>({signatures:o.signatures}))),this.userStorageFetch=(n,i)=>this.fetch(this.url("UserStorageFetch"),de(n,i)).then(s=>he(s).then(o=>({object:o.object}))),this.userStorageSave=(n,i)=>this.fetch(this.url("UserStorageSave"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.userStorageDelete=(n,i)=>this.fetch(this.url("UserStorageDelete"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.userStorageFetchAll=(n,i)=>this.fetch(this.url("UserStorageFetchAll"),de(n,i)).then(s=>he(s).then(o=>({objects:o.objects}))),this.getMoonpayLink=(n,i)=>this.fetch(this.url("GetMoonpayLink"),de(n,i)).then(s=>he(s).then(o=>({signedUrl:o.signedUrl}))),this.getSardineClientToken=n=>this.fetch(this.url("GetSardineClientToken"),de({},n)).then(i=>he(i).then(s=>({token:s.token}))),this.isUsingGoogleMail=(n,i)=>this.fetch(this.url("IsUsingGoogleMail"),de(n,i)).then(s=>he(s).then(o=>({yes:o.yes}))),this.resolveENSAddress=(n,i)=>this.fetch(this.url("ResolveENSAddress"),de(n,i)).then(s=>he(s).then(o=>({address:o.address,ok:o.ok}))),this.isValidSignature=(n,i)=>this.fetch(this.url("IsValidSignature"),de(n,i)).then(s=>he(s).then(o=>({isValid:o.isValid}))),this.isValidMessageSignature=(n,i)=>this.fetch(this.url("IsValidMessageSignature"),de(n,i)).then(s=>he(s).then(o=>({isValid:o.isValid}))),this.isValidTypedDataSignature=(n,i)=>this.fetch(this.url("IsValidTypedDataSignature"),de(n,i)).then(s=>he(s).then(o=>({isValid:o.isValid}))),this.isValidETHAuthProof=(n,i)=>this.fetch(this.url("IsValidETHAuthProof"),de(n,i)).then(s=>he(s).then(o=>({isValid:o.isValid}))),this.getCoinPrices=(n,i)=>this.fetch(this.url("GetCoinPrices"),de(n,i)).then(s=>he(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getCollectiblePrices=(n,i)=>this.fetch(this.url("GetCollectiblePrices"),de(n,i)).then(s=>he(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getExchangeRate=(n,i)=>this.fetch(this.url("GetExchangeRate"),de(n,i)).then(s=>he(s).then(o=>({exchangeRate:o.exchangeRate}))),this.memoryStore=(n,i)=>this.fetch(this.url("MemoryStore"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.memoryLoad=(n,i)=>this.fetch(this.url("MemoryLoad"),de(n,i)).then(s=>he(s).then(o=>({value:o.value}))),this.listPayCardsOnFile=n=>this.fetch(this.url("ListPayCardsOnFile"),de({},n)).then(i=>he(i).then(s=>({payCards:s.payCards}))),this.savePayCard=(n,i)=>this.fetch(this.url("SavePayCard"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok,payCard:o.payCard}))),this.updatePayCardCVC=(n,i)=>this.fetch(this.url("UpdatePayCardCVC"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.deletePayCard=(n,i)=>this.fetch(this.url("DeletePayCard"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.smartRampQuote=(n,i)=>this.fetch(this.url("SmartRampQuote"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,quoteDetails:o.quoteDetails}))),this.smartRampPurchase=(n,i)=>this.fetch(this.url("SmartRampPurchase"),de(n,i)).then(s=>he(s).then(o=>({processing:o.processing,receipt:o.receipt}))),this.smartRampWaitOrderConfirmation=(n,i)=>this.fetch(this.url("SmartRampWaitOrderConfirmation"),de(n,i)).then(s=>he(s).then(o=>({done:o.done,receipt:o.receipt}))),this.smartRampGetOrder=(n,i)=>this.fetch(this.url("SmartRampGetOrder"),de(n,i)).then(s=>he(s).then(o=>({order:o.order}))),this.smartRampCheckCardAuthorization=(n,i)=>this.fetch(this.url("SmartRampCheckCardAuthorization"),de(n,i)).then(s=>he(s).then(o=>({cardAuth:o.cardAuth}))),this.smartRampOrdersList=(n,i)=>this.fetch(this.url("SmartRampOrdersList"),de(n,i)).then(s=>he(s).then(o=>({page:o.page,orders:o.orders}))),this.smartRampGetOrderTxnHash=(n,i)=>this.fetch(this.url("SmartRampGetOrderTxnHash"),de(n,i)).then(s=>he(s).then(o=>({txnHash:o.txnHash,txnSuccessful:o.txnSuccessful}))),this.smartRampSubmitCardAuthorization=(n,i)=>this.fetch(this.url("SmartRampSubmitCardAuthorization"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.adminSmartRampGetOrder=(n,i)=>this.fetch(this.url("AdminSmartRampGetOrder"),de(n,i)).then(s=>he(s).then(o=>({order:o.order}))),this.adminSmartRampListCompletedOrders=(n,i)=>this.fetch(this.url("AdminSmartRampListCompletedOrders"),de(n,i)).then(s=>he(s).then(o=>({orders:o.orders}))),this.adminSmartRampListPendingOrders=(n,i)=>this.fetch(this.url("AdminSmartRampListPendingOrders"),de(n,i)).then(s=>he(s).then(o=>({pendingOrders:o.pendingOrders}))),this.getInviteInfo=n=>this.fetch(this.url("GetInviteInfo"),de({},n)).then(i=>he(i).then(s=>({inviteInfo:s.inviteInfo}))),this.isValidAccessCode=(n,i)=>this.fetch(this.url("IsValidAccessCode"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.internalClaimAccessCode=(n,i)=>this.fetch(this.url("InternalClaimAccessCode"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.walletRecover=(n,i)=>this.fetch(this.url("WalletRecover"),de(n,i)).then(s=>he(s).then(o=>({encryptedWallet:o.encryptedWallet}))),this.blockNumberAtTime=(n,i)=>this.fetch(this.url("BlockNumberAtTime"),de(n,i)).then(s=>he(s).then(o=>({blocks:o.blocks}))),this.paperSessionSecret=(n,i)=>this.fetch(this.url("PaperSessionSecret"),de(n,i)).then(s=>he(s).then(o=>({secret:o.secret}))),this.paperSessionSecret2=(n,i)=>this.fetch(this.url("PaperSessionSecret2"),de(n,i)).then(s=>he(s).then(o=>({secret:o.secret}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const de=(t={},e={})=>({method:"POST",headers:F0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),he=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),B6=typeof global=="object"?global.fetch:window.fetch;class Pd extends t7{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,B6),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(i,s)=>{const o={},a=this.jwtAuth,l=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),l&&l.length>0&&(o["X-Access-Key"]=l),s.headers=F0({},s.headers,o),B6(i,s)},this.fetch=this._fetch}}const EH=Object.freeze(Object.defineProperty({__proto__:null,API:t7,SequenceAPIClient:Pd,SmartRampOrderStatus:wH,SmartRampTxnStatus:CH,SortOrder:AH,WebRPCSchemaHash:bH,WebRPCSchemaVersion:xH,WebRPCVersion:mH},Symbol.toStringTag,{value:"Module"})),r7="3.7.5",SH=r7,kH=typeof atob=="function",_H=typeof btoa=="function",ac=typeof Buffer=="function",L6=typeof TextDecoder=="function"?new TextDecoder:void 0,$6=typeof TextEncoder=="function"?new TextEncoder:void 0,TH="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Oc=Array.prototype.slice.call(TH),rd=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(Oc),PH=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,br=String.fromCharCode.bind(String),F6=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),n7=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),i7=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),s7=t=>{let e,r,n,i,s="";const o=t.length%3;for(let a=0;a255||(n=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|i,s+=Oc[e>>18&63]+Oc[e>>12&63]+Oc[e>>6&63]+Oc[e&63]}return o?s.slice(0,o-3)+"===".substring(o):s},ax=_H?t=>btoa(t):ac?t=>Buffer.from(t,"binary").toString("base64"):s7,wp=ac?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,i=t.length;ne?n7(wp(t)):wp(t),IH=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?br(192|e>>>6)+br(128|e&63):br(224|e>>>12&15)+br(128|e>>>6&63)+br(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return br(240|e>>>18&7)+br(128|e>>>12&63)+br(128|e>>>6&63)+br(128|e&63)}},MH=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,o7=t=>t.replace(MH,IH),j6=ac?t=>Buffer.from(t,"utf8").toString("base64"):$6?t=>wp($6.encode(t)):t=>ax(o7(t)),wl=(t,e=!1)=>e?n7(j6(t)):j6(t),z6=t=>wl(t,!0),RH=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,NH=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),r=e-65536;return br((r>>>10)+55296)+br((r&1023)+56320);case 3:return br((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return br((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},a7=t=>t.replace(RH,NH),l7=t=>{if(t=t.replace(/\s+/g,""),!PH.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",n,i;for(let s=0;s>16&255):i===64?br(e>>16&255,e>>8&255):br(e>>16&255,e>>8&255,e&255);return r},lx=kH?t=>atob(i7(t)):ac?t=>Buffer.from(t,"base64").toString("binary"):l7,c7=ac?t=>F6(Buffer.from(t,"base64")):t=>F6(lx(t).split("").map(e=>e.charCodeAt(0))),f7=t=>c7(u7(t)),OH=ac?t=>Buffer.from(t,"base64").toString("utf8"):L6?t=>L6.decode(c7(t)):t=>a7(lx(t)),u7=t=>i7(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),Cp=t=>OH(u7(t)),DH=t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},d7=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),h7=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,d7(r));t("fromBase64",function(){return Cp(this)}),t("toBase64",function(e){return wl(this,e)}),t("toBase64URI",function(){return wl(this,!0)}),t("toBase64URL",function(){return wl(this,!0)}),t("toUint8Array",function(){return f7(this)})},v7=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,d7(r));t("toBase64",function(e){return Id(this,e)}),t("toBase64URI",function(){return Id(this,!0)}),t("toBase64URL",function(){return Id(this,!0)})},BH=()=>{h7(),v7()},pa={version:r7,VERSION:SH,atob:lx,atobPolyfill:l7,btoa:ax,btoaPolyfill:s7,fromBase64:Cp,toBase64:wl,encode:wl,encodeURI:z6,encodeURL:z6,utob:o7,btou:a7,decode:Cp,isValid:DH,fromUint8Array:Id,toUint8Array:f7,extendString:h7,extendUint8Array:v7,extendBuiltins:BH};var Ap=function(){return Ap=Object.assign||function(e){for(var r,n=1,i=arguments.length;n0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]0&&(i.types.Claims.push({name:"app",type:"string"}),i.message.app=this.claims.app),this.claims.iat&&this.claims.iat>0&&(i.types.Claims.push({name:"iat",type:"int64"}),i.message.iat=this.claims.iat),this.claims.exp&&this.claims.exp>0&&(i.types.Claims.push({name:"exp",type:"int64"}),i.message.exp=this.claims.exp),this.claims.n&&this.claims.n>0&&(i.types.Claims.push({name:"n",type:"uint64"}),i.message.n=this.claims.n),this.claims.typ&&this.claims.typ.length>0&&(i.types.Claims.push({name:"typ",type:"string"}),i.message.typ=this.claims.typ),this.claims.ogn&&this.claims.ogn.length>0&&(i.types.Claims.push({name:"ogn",type:"string"}),i.message.ogn=this.claims.ogn),this.claims.v&&this.claims.v.length>0&&(i.types.Claims.push({name:"v",type:"string"}),i.message.v=this.claims.v),i},t}(),$H=function(t){if(t.app==="")return{ok:!1,err:new Error("claims: app is empty")};var e=Math.round(new Date().getTime()/1e3),r=5*60,n=60*60*24*365+r;return t.v===""?{ok:!1,err:new Error("claims: ethauth version is empty")}:t.iat&&t.iat!==0&&(t.iat>e+r||t.iate+n?{ok:!1,err:new Error("claims: token has expired")}:{ok:!0}},FH=function(t,e,r){return Fo(void 0,void 0,void 0,function(){var n,i;return jo(this,function(s){return n=r.messageDigest(),i=VE(n,r.signature),i.slice(0,2)==="0x"&&i.length===42&&i.toLowerCase()===r.address.toLowerCase()?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]})})},jH=function(t,e,r){return Fo(void 0,void 0,void 0,function(){var n,i,s,o,a;return jo(this,function(l){switch(l.label){case 0:return!t||t===void 0?[2,{isValid:!1}]:(n=r.messageDigest(),[4,t.getCode(r.address)]);case 1:if(i=l.sent(),i==="0x"||i.length<=2)throw new Error("ValidateContractAccountProof failed. unable to fetch wallet contract code");return s=["function isValidSignature(bytes32, bytes) public view returns (bytes4)"],o=new _a(r.address,s,t),[4,o.isValidSignature(n,X(r.signature))];case 2:return a=l.sent(),a===zH?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},zH="0x1626ba7e",y7="1",Ep="eth",UH={name:"ETHAuth",version:y7},j0=function(){function t(){for(var e=[],r=0;r0&&(l+="."+i.extra),[2,l]}})})},this.decodeProof=function(i,s){return s===void 0&&(s=!1),Fo(n,void 0,void 0,function(){var o,a,l,c,f,u,h,y,m,p;return jo(this,function(S){switch(S.label){case 0:if(o=i.split("."),o.length<4||o.length>5)throw new Error("ethauth: invalid proof string");if(a=o[0],l=o[1],c=o[2],f=o[3],u=o[4],a!==Ep)throw new Error("ethauth: not an ethauth proof");return h=pa.decode(c),y=JSON.parse(h),m=new cx({address:l,claims:y,signature:f,extra:u}),[4,this.validateProof(m,s)];case 1:if(p=S.sent(),!p)throw new Error("ethauth: proof is invalid");return[2,m]}})})},this.validateProof=function(i,s){return s===void 0&&(s=!1),Fo(n,void 0,void 0,function(){var o,a;return jo(this,function(l){switch(l.label){case 0:if(o=this.validateProofClaims(i),o.err)throw new Error("ethauth: proof claims are invalid ".concat(o.err));return s===!0?[3,2]:[4,this.validateProofSignature(i)];case 1:if(a=l.sent(),a!==!0)throw new Error("ethauth: proof signature is invalid");l.label=2;case 2:return[2,!0]}})})},this.validateProofSignature=function(i){return Fo(n,void 0,void 0,function(){var s,l,o,a,l;return jo(this,function(c){switch(c.label){case 0:s=[],l=0,c.label=1;case 1:if(!(lpa.encode(t,!0),fx=t=>pa.encode(JSON.stringify(t),!0),HH=t=>{if(t!=null)return pa.decode(t)},ux=t=>{if(t!=null)return JSON.parse(pa.decode(t))};function p7(t){return t!=null&&(V.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Te(t)||typeof t=="bigint"||ls(t))}const dx=t=>X(pe(typeof t=="string"?Ve(t):t)),g7=(t,e,r)=>Ce(["string","uint256","address","bytes32"],["",e,t,r]),Sp=(t,e,r)=>pe(g7(t,e,r)),m7=()=>typeof window>"u"&&typeof process=="object",WH=()=>!m7(),x7=t=>{const e=t.split(".");if(e.length!==3)throw new Error("invalid jwt");return JSON.parse(pa.decode(e[1]))};function z0(){return z0=Object.assign?Object.assign.bind():function(t){for(var e=1;eve.configure(t),Gf=(t,e,r)=>{const n={};return r&&r.length>0&&(n.Authorization=`BEARER ${r}`),e&&e.length>0&&(n["X-Access-Key"]=e),{url:t,headers:n,skipFetchSetup:!0,fetchOptions:{mode:"cors",cache:"force-cache",credentials:"same-origin",redirect:"follow",referrer:"client"}}};let qH=class{constructor(){this.cache=void 0,this.cache=new Map}do(e,r,n,...i){e=`${e}:${pe(Ve(JSON.stringify(i,GH)))}`;let s=this.cache.get(e);if(s&&s.expiration&&new Date>=s.expiration&&(s=void 0,this.cache.delete(e)),!s){const o={promise:n(...i)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),s=o,this.cache.set(e,s)}return s.promise}};function GH(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function hx(t,e){return function(...r){const n=Array.prototype.slice.call(r);return new Promise(async(i,s)=>{try{n.push((o,a)=>o?s(o):i(a)),await t.apply(e,n)}catch(o){s(o)}})}}function KH(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function JH(t){const e=t.split("&"),r={};for(const n of e){const i=n.split("=");r[decodeURIComponent(i[0])]=JSON.parse(decodeURIComponent(i[1]))}return r}const vx=(t=0,e=Number.MAX_SAFE_INTEGER)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),C7=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},A7=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},E7=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},QH=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),S7=t=>{const e=z0({},t.types);return delete e.EIP712Domain,Yt.hash(t.domain,e,t.message)},du=t=>X(S7(t)),{defineReadOnly:YH,getStatic:XH,resolveProperties:ZH,checkProperties:eW,shallowCopy:tW,deepCopy:rW}=ZV,nW=t=>t.replace(/([^:]\/)\/+/g,"$1"),iW=Object.freeze(Object.defineProperty({__proto__:null,Logger:b7,PromiseCache:qH,base64Decode:HH,base64DecodeObject:ux,base64Encode:VH,base64EncodeObject:fx,checkProperties:eW,configureLogger:w7,deepCopy:rW,defineReadOnly:YH,encodeMessageDigest:dx,encodeTypedDataDigest:du,encodeTypedDataHash:S7,getEthersConnectionInfo:Gf,getRandomInt:vx,getStatic:XH,isBigNumberish:p7,isBrowser:WH,isNode:m7,jwtDecodeClaims:x7,logger:ve,packMessageData:g7,promisify:hx,queryStringFromObject:KH,queryStringToObject:JH,resolveProperties:ZH,sanitizeAlphanumeric:A7,sanitizeHost:E7,sanitizeNumberString:C7,shallowCopy:tW,sleep:QH,subDigestOf:Sp,urlClean:nW},Symbol.toStringTag,{value:"Module"}));function Mt(){return Mt=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="number"?t:t.chainId?t.chainId:V.from(t).toNumber(),oW=t=>{if(t)return k7(t)},_7=(t,e=!1,r=!1)=>{if(!t)throw new Error("invalid network config: empty config");const n=[];if(Array.isArray(t)?n.push(...t):n.push(t),n.length===0){if(e)throw new Error("invalid network config: empty config");return!1}const i=n.map(c=>c.chainId).sort(),s=i.filter((c,f)=>i.indexOf(c)!==f);if(s.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${s}`);return!1}n.forEach(c=>c.name=c.name.toLowerCase());const o=n.map(c=>c.name).sort(),a=o.filter((c,f)=>o.indexOf(c)!==f);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let c=0;c(_7(t,!0,e),t),aW=(t,e=!0)=>{const r=t.map(i=>i.chainId).sort(),n=r.filter((i,s)=>r.indexOf(i)!==s);if(n.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${n}`);return!1}return!0},lW=(t,e)=>{if(!(!t||!e)){if(!t.chainId&&!t.name)throw new Error("failed to update network config: source config is missing chainId or name");if(t.chainId!==e.chainId&&t.name!==e.name)throw new Error("failed to update network config: one of chainId or name must match");t.rpcUrl&&(e.rpcUrl=t.rpcUrl,e.provider=void 0),t.provider&&(e.provider=t.provider),t.relayer&&(e.relayer=t.relayer)}},P7=t=>T7(I7(t)),ri=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=V.from(e).toNumber();return t.find(n=>n.chainId===r)}else return t.find(r=>r.name===e||`${r.chainId}`===e);else{if(typeof e=="number")return t.find(r=>r.chainId===e);if(e.chainId)return t.find(r=>r.chainId===e.chainId);if(V.isBigNumber(e)){const r=e.toNumber();return t.find(n=>n.chainId===r)}else return}},cW=(t,e)=>t?t.name===e||t.chainId===e:!1,fW=t=>{const e={};for(let r=0;r{if(!t)return[];const e=t.sort((n,i)=>n.chainId===i.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},Gh=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let i=e[n];return typeof i=="function"?i=i():i==null?i="":typeof i=="object"||typeof i=="symbol"?i=i.toString():i=i.valueOf(),i})):"",M7=t=>Gh("https://${network}-indexer.sequence.app",{network:t}),R7=t=>Gh("https://${network}-relayer.sequence.app",{network:t}),N7=t=>Gh("https://nodes.sequence.app/${network}",{network:t});function yx(t){return ri(Ul,t)}function O7(t){return V.isBigNumber(t)?t:p7(t)?V.from(t):V.from(t.chainId)}const Qt=t=>{const e=N7(t);return{rpcUrl:e,relayer:{url:R7(t),provider:{url:e}},indexerUrl:M7(t)}},Ul=P7([Mt({},It[te.POLYGON],Qt("polygon"),{isDefaultChain:!0,isAuthChain:!0}),Mt({},It[te.MAINNET],Qt("mainnet")),Mt({},It[te.BSC],Qt("bsc")),Mt({},It[te.AVALANCHE],Qt("avalanche")),Mt({},It[te.ARBITRUM],Qt("arbitrum")),Mt({},It[te.ARBITRUM_NOVA],Qt("arbitrum-nova")),Mt({},It[te.OPTIMISM],Qt("optimism")),Mt({},It[te.OPTIMISM_SEPOLIA],Qt("optimism-sepolia")),Mt({},It[te.POLYGON_ZKEVM],Qt("polygon-zkevm")),Mt({},It[te.GNOSIS],Qt("gnosis")),Mt({},It[te.RINKEBY],Qt("rinkeby"),{disabled:!0}),Mt({},It[te.GOERLI],Qt("goerli"),{disabled:!0}),Mt({},It[te.SEPOLIA],Qt("sepolia")),Mt({},It[te.POLYGON_MUMBAI],Qt("mumbai")),Mt({},It[te.BSC_TESTNET],Qt("bsc-testnet")),Mt({},It[te.ARBITRUM_SEPOLIA],Qt("arbitrum-sepolia")),Mt({},It[te.BASE],Qt("base")),Mt({},It[te.BASE_SEPOLIA],Qt("base-sepolia")),Mt({},It[te.HOMEVERSE_TESTNET],Qt("homeverse-testnet")),Mt({},It[te.AVALANCHE_TESTNET],Qt("avalanche-testnet")),Mt({},It[te.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),Mt({},It[te.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]),Vl="2.0";class px{constructor(e,r){this.sender=void 0,this.handler=void 0,this.sender=r,e&&this.setMiddleware(e)}setMiddleware(e){this.handler=D7(e,this.sender.sendAsync)}sendAsync(e,r,n){try{this.handler(e,r,n)}catch(i){r(i,void 0)}}}const D7=(t,e)=>{if(t.length===0)return e;const r=i=>i.sendAsyncMiddleware?i.sendAsyncMiddleware:i;let n;n=r(t[t.length-1])(e);for(let i=t.length-2;i>=0;i--)n=r(t[i])(n);return n};function B7(t){return t!==void 0&&t.send!==void 0&&t.constructor.defaultUrl!==void 0&&t.detectNetwork!==void 0&&t.getSigner!==void 0&&t.perform!==void 0}function L7(t){return t!==void 0&&t.sendAsync!==void 0}let uW=0;class U0{constructor(e,r){this.send=void 0,this.request=void 0,this.defaultChainId=void 0,this.sendAsync=(n,i,s)=>{this.send(n.method,n.params,s||this.defaultChainId).then(o=>{i(void 0,{jsonrpc:"2.0",id:n.id,result:o})}).catch(o=>{i(o,void 0)})},this.defaultChainId=r,B7(e)?this.send=e.send.bind(e):L7(e)?this.send=(n,i,s)=>new Promise((o,a)=>{e.sendAsync({jsonrpc:Vl,id:++uW,method:n,params:i},(l,c)=>{l?a(l):o(c?c.result:void 0)},s||this.defaultChainId)}):this.send=e,this.request=(n,i)=>this.send(n.method,n.params,i)}}class dW{constructor(e){this.provider=e,this.sendAsync=(r,n)=>{this.provider.send(r.method,r.params).then(i=>{n(void 0,{jsonrpc:"2.0",id:r.id,result:i})}).catch(i=>{n(i,void 0)})},this.send=this.sendAsync}}class hW{constructor(e){this.sendAsyncMiddleware=void 0,this.isAllowedFunc=void 0,e?this.isAllowedFunc=e:this.isAllowedFunc=r=>!0,this.sendAsyncMiddleware=kp(this.isAllowedFunc)}setIsAllowedFunc(e){this.isAllowedFunc=e,this.sendAsyncMiddleware=kp(this.isAllowedFunc)}}const kp=t=>e=>(r,n,i)=>{if(!t(r))throw new Error("allowProvider middleware precondition is unmet.");e(r,n,i)};class gx{constructor(e){this.cachableJsonRpcMethods=["net_version","eth_chainId","eth_accounts","sequence_getWalletContext","sequence_getNetworks"],this.cachableJsonRpcMethodsByBlock=["eth_call","eth_getCode"],this.cache=void 0,this.cacheByBlock=void 0,this.cacheByBlockResetLock=!1,this.onUpdateCallback=void 0,this.defaultChainId=void 0,this.sendAsyncMiddleware=r=>(n,i,s)=>{if(this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method)){const o=this.cacheKey(n.method,n.params,s||this.defaultChainId),a=this.getCacheValue(o);if(a&&a!==""){i(void 0,{jsonrpc:"2.0",id:n.id,result:a});return}}r(n,(o,a,l)=>{if((this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method))&&a&&a.result&&this.shouldCacheResponse(n,a)){const c=this.cacheKey(n.method,n.params,l||this.defaultChainId);this.cachableJsonRpcMethods.includes(n.method)?this.setCacheValue(c,a.result):this.setCacheByBlockValue(c,a.result)}i(o,a)},s||this.defaultChainId)},this.cacheKey=(r,n,i)=>{let s="";return i?s=`${i}:${r}:`:s=`:${r}:`,!n||n.length===0?s+"[]":s+JSON.stringify(n)},this.getCache=()=>this.cache,this.setCache=r=>{this.cache=r,this.onUpdateCallback&&this.onUpdateCallback()},this.getCacheValue=r=>{if(this.cache[r])return this.cache[r];if(this.cacheByBlock[r])return this.cacheByBlock[r]},this.setCacheValue=(r,n)=>{this.cache[r]=n,this.onUpdateCallback&&this.onUpdateCallback(r,n)},this.setCacheByBlockValue=(r,n)=>{this.cacheByBlock[r]=n,this.cacheByBlockResetLock||(this.cacheByBlockResetLock=!0,setTimeout(()=>{this.cacheByBlockResetLock=!1,this.cacheByBlock={}},1500))},this.shouldCacheResponse=(r,n)=>!(!n||!n.result||r.method==="eth_getCode"&&n.result.length<=2),this.clearCache=()=>{this.cache={},this.cacheByBlock={}},this.cache={},this.cacheByBlock={},this.defaultChainId=e==null?void 0:e.defaultChainId,e!=null&&e.blockCache?(e==null?void 0:e.blockCache)!==!0&&(this.cachableJsonRpcMethodsByBlock=e==null?void 0:e.blockCache):this.cachableJsonRpcMethodsByBlock=[]}onUpdate(e){this.onUpdateCallback=e}}class $7{constructor(e){this.options=void 0,this.sendAsyncMiddleware=r=>(n,i,s)=>{const{id:o,method:a}=n;switch(a){case"net_version":if(this.options.chainId){i(void 0,{jsonrpc:"2.0",id:o,result:`${this.options.chainId}`});return}break;case"eth_chainId":if(this.options.chainId){i(void 0,{jsonrpc:"2.0",id:o,result:Y(this.options.chainId)});return}break;case"eth_accounts":if(this.options.accountAddress){i(void 0,{jsonrpc:"2.0",id:o,result:[we(this.options.accountAddress)]});return}break;case"sequence_getWalletContext":if(this.options.walletContext){i(void 0,{jsonrpc:"2.0",id:o,result:this.options.walletContext});return}break}r(n,i,s)},this.options=e}}const F7=t=>(e,r,n)=>{t(e,(i,s)=>{if(!i&&s&&s.error)throw typeof s.error=="string"?new Error(s.error):new Error(s.error.message);r(i,s)},n)},j7=t=>(e,r,n)=>{const i=n?` chainId:${n}`:"";ve.info(`[provider request]${i} id:${e.id} method:${e.method} params:`,e.params),t(e,(s,o)=>{s?ve.warn(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"error:",s):ve.info(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"response:",o),r(s,o)},n)},vW=t=>e=>(r,n,i)=>{const s=t(r),{id:o,method:a}=r;switch(a){case"net_version":n(void 0,{jsonrpc:"2.0",id:o,result:`${s}`});return;case"eth_chainId":n(void 0,{jsonrpc:"2.0",id:o,result:Y(s)});return}e(r,n,i)},z7=["personal_sign","eth_sign","eth_signTypedData","eth_signTypedData_v4","eth_sendTransaction","eth_sendRawTransaction","sequence_sign","sequence_signTypedData_v4","sequence_getWalletContext","sequence_getWalletConfig","sequence_getWalletState","sequence_getNetworks","sequence_updateConfig","sequence_publishConfig","sequence_gasRefundOptions","sequence_getNonce","sequence_relay","eth_decrypt","eth_getEncryptionPublicKey","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"];class yW{constructor(e){this.provider=void 0,this.sendAsyncMiddleware=r=>(n,i,s)=>{if(z7.includes(n.method)){this.provider.sendAsync(n,i,s);return}r(n,i,s)},this.provider=e}}class pW{constructor(e){this.privateJsonRpcMethods=["net_version","eth_chainId","eth_accounts",...z7],this.provider=void 0,this.rpcUrl=void 0,this.sendAsyncMiddleware=r=>(n,i)=>{if(this.provider&&!this.privateJsonRpcMethods.includes(n.method)){this.provider.send(n.method,n.params).then(s=>{i(void 0,{jsonrpc:"2.0",id:n.id,result:s})}).catch(s=>i(s));return}ve.debug("[public-provider] sending request to signer window",n.method),r(n,i)},e&&this.setRpcUrl(e)}getRpcUrl(){return this.rpcUrl}setRpcUrl(e){!e||e===""?(this.rpcUrl=void 0,this.provider=void 0):(this.rpcUrl=e,this.provider=new Ta(e))}}class U7{constructor(){this.singleflightJsonRpcMethods=["eth_chainId","net_version","eth_call","eth_getCode","eth_blockNumber","eth_getBalance","eth_getStorageAt","eth_getTransactionCount","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_getBlockByHash","eth_getBlockByNumber","eth_getTransactionByHash","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionReceipt","eth_getUncleByBlockHashAndIndex","eth_getUncleByBlockNumberAndIndex","eth_getLogs"],this.inflight=void 0,this.sendAsyncMiddleware=e=>(r,n,i)=>{if(!this.singleflightJsonRpcMethods.includes(r.method)){e(r,n,i);return}const s=this.requestKey(r.method,r.params||[],i);if(!this.inflight[s])this.inflight[s]=[];else{this.inflight[s].push({id:r.id,callback:n});return}e(r,(o,a,l)=>{n(o,a);for(let c=0;c{let i="";return n?i=`${n}:${e}:`:i=`:${e}:`,!r||r.length===0?i+"[]":i+JSON.stringify(r)},this.inflight={}}}class gW extends Ta{constructor(e,r){super(e,r==null?void 0:r.chainId),this._chainId=void 0,this._sender=void 0,this.send=(a,l)=>this._sender.send(a,l),this.fetch=(a,l)=>{const c={method:a,params:l,id:this._nextId++,jsonrpc:"2.0"};return fu(this.connection,JSON.stringify(c),mW).then(u=>u,u=>{throw u})};const n=r==null?void 0:r.chainId,i=r==null?void 0:r.middlewares,s=r==null?void 0:r.blockCache;this._chainId=n;const o=new px(i??[new $7({chainId:n}),new U7,new gx({defaultChainId:n,blockCache:s})],new U0(this.fetch,n));this._sender=new U0(o,n)}async getNetwork(){const e=this._chainId;if(e){const r=It[e],n=(r==null?void 0:r.name)||"",i=r==null?void 0:r.ensAddress;return{name:n,chainId:e,ensAddress:i}}else{const r=await this.send("eth_chainId",[]);return this._chainId=V.from(r).toNumber(),this.getNetwork()}}}function mW(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}const xW=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:hW,CachedProvider:gx,ChainId:te,EagerProvider:$7,JsonRpcExternalProvider:dW,JsonRpcProvider:gW,JsonRpcRouter:px,JsonRpcSender:U0,JsonRpcVersion:Vl,NetworkType:je,PublicProvider:pW,SigningProvider:yW,SingleflightMiddleware:U7,allNetworks:Ul,allowProviderMiddleware:kp,checkNetworkConfig:cW,createJsonRpcMiddlewareStack:D7,ensureUniqueNetworks:aW,ensureValidNetworks:T7,exceptionProviderMiddleware:F7,findNetworkConfig:ri,findSupportedNetwork:yx,getChainId:k7,indexerURL:M7,isJsonRpcHandler:L7,isJsonRpcProvider:B7,isNetworkConfig:sW,isValidNetworkConfig:_7,loggingProviderMiddleware:j7,maybeChainId:oW,networkProviderMiddleware:vW,networks:It,networksIndex:fW,nodesURL:N7,relayerURL:R7,sortNetworks:I7,stringTemplate:Gh,toChainIdNumber:O7,updateNetworkConfig:lW,validateAndSortNetworks:P7},Symbol.toStringTag,{value:"Module"}));function Cr(){return Cr=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(xx(i))return Ce(["uint8","uint8","address"],[ea.Address,i.weight,i.address]);if(i.isDynamic){const s=X(i.signature);return Ce(["uint8","uint8","address","uint16","bytes"],[ea.DynamicSignature,i.weight,i.address,s.length,s])}return Ce(["uint8","uint8","bytes"],[ea.EOASignature,i.weight,i.signature])});return Ce(["uint16",...new Array(n.length).fill("bytes")],[r,...n])}async function K7(t,e,r){const n=hu(e),i=await Promise.all(t.signers.map(async s=>{if(xx(s))return s;if(s.isDynamic){if(!s.address)throw new Error("Dynamic signature part must have address");if(!mx(s.address,n,s.signature,r))throw new Error(`Invalid dynamic signature part ${s.address}`);return{address:s.address,weight:s.weight,signature:s.signature}}else return{address:vu(n,s.signature),weight:s.weight,signature:s.signature}}));return{version:1,payload:e,subdigest:n,config:{version:1,threshold:t.threshold,signers:i}}}function nf(t,e,r,n){if(r.length!==0)throw new Error("Explicit subdigests not supported on v1");let i=V.from(0);const s=t.signers.map(a=>{if(!e.has(a.address))return a;const l=e.get(a.address),c=X(l.signature);return i=i.add(a.weight),l.isDynamic||c.length!==66?Cr({},a,{isDynamic:!0,signature:l.signature,address:a.address}):Cr({},a,{isDynamic:!1,signature:l.signature})});return{encoded:bx({version:1,threshold:t.threshold,signers:s}),weight:i}}const wx={decode:t=>G7(t),encode:t=>bx(t),trim:async t=>t,supportsNoChainId:!0,recover:(t,e,r)=>K7(t,e,r),encodeSigners:(t,e,r,n)=>nf(t,e,r),hasEnoughSigningPower:(t,e)=>{const{weight:r}=wx.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{throw new Error("Signature chaining not supported on v1")},hashSetImageHash:function(t){throw new Error("Image hash not supported on v1")},signaturesOf(t){return t.signers.filter(e=>e.signature!==void 0).map(e=>({address:e.address,signature:e.signature}))},signaturesOfDecoded:function(t){return t.signers.map(e=>e.signature).filter(e=>e!==void 0)}};var TW=Object.freeze({__proto__:null,SignaturePartType:ea,isAddressMember:xx,isUnrecoveredSignatureMember:W7,isUnrecoveredSignature:q7,decodeSignature:G7,encodeSignature:bx,recoverSignature:K7,encodeSigners:nf,SignatureCoder:wx});const Cx={isWalletConfig:t=>t.version===1&&t.threshold!==void 0&&t.signers!==void 0,imageHashOf:t=>t.signers.reduce((e,r)=>pe(qr.encode(["bytes32","uint8","address"],[e,r.weight,r.address])),Ce(["uint256"],[t.threshold])),hasSubdigest:(t,e)=>!1,isComplete:t=>!0,checkpointOf:t=>V.from(0),signersOf:t=>t.signers.map(e=>({address:e.address,weight:V.from(e.weight).toNumber()})),fromSimple:t=>{if(!Nt.eq(t.checkpoint))throw new Error("v1 wallet config does not support checkpoint");if(t.subdigests&&t.subdigests.length>0)throw new Error("v1 wallet config does not support subdigests");return{version:1,threshold:t.threshold,signers:t.signers}},update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new tr([...pr.mainModule.abi,...pr.mainModuleUpgradable.abi]),s=[];return(!n||n==="first")&&s.push({to:t,data:i.encodeFunctionData(i.getFunction("updateImplementation"),[r.mainModuleUpgradable]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),s.push({to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[Cx.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),{entrypoint:t,transactions:s}},decodeTransaction:function(t){throw new Error("Function not implemented.")}},toJSON:function(t){const e=t.signers.map(r=>({weight:V.from(r.weight).toString(),address:r.address}));return JSON.stringify({version:t.version,threshold:V.from(t.threshold).toString(),signers:e})},fromJSON:function(t){const e=JSON.parse(t),r=e.signers.map(n=>({weight:V.from(n.weight),address:n.address}));return{version:e.version,threshold:V.from(e.threshold),signers:r}},editConfig:function(t,e){var r;const n=t.signers.slice();if(e.checkpoint&&!Nt.eq(e.checkpoint))throw new Error("v1 wallet config does not support checkpoint");if(e.add)for(const i of e.add)n.find(s=>s.address===i.address)||n.push({weight:i.weight,address:i.address});if(e.remove)for(const i of e.remove){const s=n.findIndex(o=>o.address===i);s>=0&&n.splice(s,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,signers:n}},buildStubSignature:function(t,e){const r=new Map;for(const[i,s]of e.entries()){r.set(i,{signature:s,isDynamic:!0});const{encoded:o,weight:a}=nf(t,r,[]);if(a.gte(t.threshold))return o}const n=t.signers;for(const{address:i}of n.sort(({weight:s},{weight:o})=>V.from(s).sub(o).toNumber())){r.set(i,{signature:"0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02",isDynamic:!1});const{encoded:o,weight:a}=nf(t,r,[]);if(a.gte(t.threshold))return o}return nf(t,r,[]).encoded}};var PW=Object.freeze({__proto__:null,ConfigCoder:Cx});const J7=1,Q7={version:J7,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Vi=Object.freeze({__proto__:null,config:PW,signature:TW,version:J7,DeployedWalletContext:Q7});const Ax="0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1";function Y7(t){return pe(X7(t))}function X7(t){return Ce(["bytes32","bytes32"],[Ax,t])}function Z7(t){const e=X(t);if(e.length===64&&Y(e.slice(0,32))===Ax)return Y(e.slice(32,64))}function IW(t){return Z7(t)!==void 0}var MW=Object.freeze({__proto__:null,SetImageHashPrefix:Ax,hashSetImageHash:Y7,messageSetImageHash:X7,decodeMessageSetImageHash:Z7,isMessageSetImageHash:IW});let vr=function(t){return t[t.Legacy=0]="Legacy",t[t.Dynamic=1]="Dynamic",t[t.NoChainIdDynamic=2]="NoChainIdDynamic",t[t.Chained=3]="Chained",t}({}),Ht=function(t){return t[t.Signature=0]="Signature",t[t.Address=1]="Address",t[t.DynamicSignature=2]="DynamicSignature",t[t.Node=3]="Node",t[t.Branch=4]="Branch",t[t.Subdigest=5]="Subdigest",t[t.Nested=6]="Nested",t}({});const V0=66;function ga(t){return t.left!==void 0&&t.right!==void 0}function lc(t){return t.tree!==void 0}function yu(t){return t.unrecovered&&t.signature!==void 0&&t.isDynamic!==void 0}function H0(t){let e=X(t),r;const n=(i,s)=>i?i.right?{left:i,right:s}:{left:i.left,right:s}:{left:s};for(;e.length>0;){const i=e[0];switch(e=e.slice(1),i){case Ht.Signature:{const s=e[0],o=Y(e.slice(1,V0+1));r=n(r,{signature:o,weight:s,unrecovered:!0,isDynamic:!1}),e=e.slice(V0+1)}break;case Ht.Address:{const s=e[0],o=we(Y(e.slice(1,21)));r=n(r,{address:o,weight:s}),e=e.slice(21)}break;case Ht.DynamicSignature:{const s=e[0],o=we(Y(e.slice(1,21))),a=e[21]<<16|e[22]<<8|e[23],l=Y(e.slice(24,24+a));r=n(r,{address:o,signature:l,weight:s,unrecovered:!0,isDynamic:!0}),e=e.slice(24+a)}break;case Ht.Node:{const s=Y(e.slice(0,32));r=n(r,{nodeHash:s}),e=e.slice(32)}break;case Ht.Branch:{const s=e[0]<<16|e[1]<<8|e[2],o=H0(e.slice(3,3+s));r=n(r,o),e=e.slice(3+s)}break;case Ht.Subdigest:{const s=Y(e.slice(0,32));r=n(r,{subdigest:s}),e=e.slice(32)}break;case Ht.Nested:{const s=e[0],o=e[1]<<8|e[2],a=e[3]<<16|e[4]<<8|e[5],l=H0(e.slice(6,6+a));r=n(r,{weight:s,threshold:o,tree:l}),e=e.slice(6+a)}break;default:throw new Error(`Unknown signature part type: ${i}: ${Y(e)}`)}}if(!r)throw new Error("Empty signature tree");return r.right?r:r.left}class e9 extends Error{constructor(e){super(`Invalid signature leaf: ${JSON.stringify(e)}`),this.leaf=e}}async function ta(t,e,r){if(ga(t)){const[n,i]=await Promise.all([ta(t.left,e,r),ta(t.right,e,r)]);return{left:n,right:i}}if(lc(t))return{weight:t.weight,threshold:t.threshold,tree:await ta(t.tree,e,r)};if(yu(t))if(t.isDynamic){if(!t.address)throw new Error("Dynamic signature leaf without address");if(!await mx(t.address,e,t.signature,r))throw new e9(t);return{weight:t.weight,address:t.address,signature:t.signature,subdigest:e}}else return{weight:t.weight,address:vu(e,t.signature),signature:t.signature,subdigest:e};return t}const Tr={concat:(t,e)=>Ce(["bytes","bytes"],[t,e]),node:t=>Ce(["uint8","bytes32"],[Ht.Node,t]),branch:t=>{const e=X(t);return Ce(["uint8","uint24","bytes"],[Ht.Branch,e.length,e])},nested:(t,e,r)=>{const n=X(r);return Ce(["uint8","uint8","uint16","uint24","bytes"],[Ht.Nested,t,e,n.length,n])},subdigest:t=>Ce(["uint8","bytes32"],[Ht.Subdigest,t]),signature:(t,e)=>Ce(["uint8","uint8","bytes"],[Ht.Signature,t,e]),dynamicSignature:(t,e,r)=>{const n=X(r);return Ce(["uint8","uint8","address","uint24","bytes"],[Ht.DynamicSignature,t,e,n.length,n])},address:(t,e)=>Ce(["uint8","uint8","address"],[Ht.Address,t,e])};function sf(t,e,r,n,i={}){const s=of(t.tree,e,r,i);return V.from(n).isZero()?{encoded:Ce(["uint8","uint16","uint32","bytes"],[vr.NoChainIdDynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:V.from(t.threshold).gt(255)?{encoded:Ce(["uint8","uint16","uint32","bytes"],[vr.Dynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:{encoded:Ce(["uint8","uint8","uint32","bytes"],[vr.Legacy,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}}function of(t,e,r,n={}){const i=!n.disableTrim;if(si(t)){const s=of(t.left,e,r),o=of(t.right,e,r),a=Wr(t.left),l=Wr(t.right);return i&&s.weight.eq(0)&&o.weight.eq(0)&&!a&&!l?{encoded:Tr.node(kn(t)),weight:Nt}:i&&o.weight.eq(0)&&!l?{encoded:Tr.concat(s.encoded,Tr.node(kn(t.right))),weight:s.weight}:i&&s.weight.eq(0)&&!a?{encoded:Tr.concat(Tr.node(kn(t.left)),Tr.branch(o.encoded)),weight:o.weight}:{encoded:Tr.concat(s.encoded,Tr.branch(o.encoded)),weight:s.weight.add(o.weight)}}if(ds(t)){const s=of(t.tree,e,r);return i&&s.weight.eq(0)?{encoded:Tr.node(kn(t)),weight:Nt}:{encoded:Tr.nested(t.weight,t.threshold,s.encoded),weight:s.weight}}if(hs(t))return{encoded:Tr.node(kn(t)),weight:Nt};if(us(t)){const s=r.includes(t.subdigest);return{encoded:Tr.subdigest(t.subdigest),weight:s?LA:Nt}}if(Wr(t))if(e.has(t.address)){const o=e.get(t.address),a=o.signature;return n.forceDynamicEncoding||o.isDynamic?{encoded:Tr.dynamicSignature(t.weight,t.address,a),weight:V.from(t.weight)}:{encoded:Tr.signature(t.weight,a),weight:V.from(t.weight)}}else return{encoded:Tr.address(t.weight,t.address),weight:Nt};throw new Error(`Invalid topology - unknown error: ${JSON.stringify(t)}`)}function Ex(t){return kx(t)?Ex(t.suffix[t.suffix.length-1]):t.config}function Sx(t){return t.type!==void 0&&t.decoded!==void 0&&t.version!==void 0&&t.version===2}function pu(t){return t.suffix!==void 0&&Array.isArray(t.suffix)&&t.suffix.every(Sx)}function t9(t){return t.type!==void 0&&t.config!==void 0&&t.digest!==void 0&&t.version!==void 0&&t.version===2}function kx(t){return t.chain!==void 0&&Array.isArray(t.chain)&&t.chain.every(t9)}function Kh(t){const e=X(t),r=e[0];switch(r){case vr.Legacy:return{version:2,type:vr.Legacy,decoded:Md(e)};case vr.Dynamic:return{version:2,type:vr.Dynamic,decoded:Md(e.slice(1))};case vr.NoChainIdDynamic:return{version:2,type:vr.NoChainIdDynamic,decoded:Md(e.slice(1))};case vr.Chained:return r9(e);default:throw new Error(`Invalid signature type: ${r}`)}}function Md(t){const e=X(t),r=e[0]<<8|e[1],n=e[2]<<24|e[3]<<16|e[4]<<8|e[5],i=H0(e.slice(6));return{threshold:r,checkpoint:n,tree:i}}function r9(t){const e=X(t),r=e[0];if(r!==vr.Chained)throw new Error(`Expected chained signature type: ${r}`);const n=[];let i=1;for(;iX(Js(s))),i=Ce(n.map(()=>["uint24","bytes"]).flat(),n.map(s=>[s.length,s]).flat());return Ce(["uint8","bytes"],[vr.Chained,i])}function Js(t){if(rs(t))return Y(t);if(pu(t)||kx(t))return Jh(Js(t),(t.suffix||[]).map(Js));const e=Sx(t)?t.decoded:t.config;switch(t.type){case vr.Legacy:if(V.from(e.threshold).gt(255))throw new Error(`Legacy signature threshold is too large: ${e.threshold} (max 255)`);return _p(e);case vr.NoChainIdDynamic:case vr.Dynamic:return Ce(["uint8","bytes"],[t.type,_p(e)]);case vr.Chained:throw new Error("Unreachable code: Chained signature should be handled above");default:throw new Error(`Invalid signature type: ${t.type}`)}}function _p(t){return Ce(["uint16","uint32","bytes"],[t.threshold,t.checkpoint,af(t.tree)])}function af(t){if(si(t)||ga(t)){const e=X(af(t.right)),r=X(af(t.left));return si(t.right)||ga(t.right)?Ce(["bytes","uint8","uint24","bytes"],[r,Ht.Branch,e.length,e]):Ce(["bytes","bytes"],[r,e])}if(ds(t)||lc(t)){const e=X(af(t.tree));return Ce(["uint8","uint8","uint16","uint24","bytes"],[Ht.Nested,t.weight,t.threshold,e.length,e])}if(yu(t)||Wr(t)&&t.signature!==void 0){const e=X(t.signature);if(t.isDynamic||e.length!==V0){if(!t.address)throw new Error("Dynamic signature leaf must have address");return Ce(["uint8","uint8","address","uint24","bytes"],[Ht.DynamicSignature,t.weight,t.address,e.length,e])}else return Ce(["uint8","uint8","bytes"],[Ht.Signature,t.weight,e])}if(Wr(t))return Ce(["uint8","uint8","address"],[Ht.Address,t.weight,t.address]);if(hs(t))return Ce(["uint8","bytes32"],[Ht.Node,t.nodeHash]);if(us(t))return Ce(["uint8","bytes32"],[Ht.Subdigest,t.subdigest]);throw new Error(`Unknown signature tree type: ${t}`)}function lf(t){return si(t)?[...lf(t.left),...lf(t.right)]:ds(t)?lf(t.tree):Wr(t)&&t.signature?[{address:t.address,signature:t.signature}]:[]}function cf(t){return ga(t)?[...cf(t.left),...cf(t.right)]:lc(t)?cf(t.tree):yu(t)?[t.signature]:[]}function Rd(t){return ga(t)?[...Rd(t.left),...Rd(t.right)]:lc(t)?Rd(t.tree):us(t)?[t.subdigest]:[]}async function W0(t){const e=typeof t=="string"?Kh(t):t;if(pu(e)){const n=await Promise.all([W0(Cr({},e,{suffix:void 0})),...e.suffix.map(i=>W0(i))]);return Jh(n[0],n.slice(1))}const{trimmed:r}=await ff(e.decoded.tree);return Js(Cr({},e,{decoded:Cr({},e.decoded,{tree:r})}))}async function ff(t,e=!0){if(ga(t)){const[r,n]=await Promise.all([ff(t.left),ff(t.right)]);if(r.weight===0&&n.weight===0)try{const i=await ta(t,T0,void 0);return{weight:0,trimmed:{nodeHash:kn(i)}}}catch{}else return{weight:r.weight+n.weight,trimmed:{left:r.trimmed,right:n.trimmed}}}if(lc(t)){const r=await ff(t.tree);if(r.weight===0)try{const n=await ta(t,T0,void 0);return{weight:0,trimmed:{nodeHash:kn(n)}}}catch{}return{weight:r.weight,trimmed:{weight:t.weight,threshold:t.threshold,tree:r.trimmed}}}return hs(t)&&o9(t.nodeHash)?{weight:0,trimmed:Cr({},s9(t.nodeHash))}:yu(t)||Wr(t)&&t.signature!==void 0?{weight:V.from(t.weight).toNumber(),trimmed:t}:!e&&us(t)?{weight:1/0,trimmed:t}:{weight:0,trimmed:t}}const Qh={decode:t=>Kh(t),encode:t=>Js(t),trim:t=>W0(t),supportsNoChainId:!0,recover:(t,e,r)=>_x(t,e,r),encodeSigners:(t,e,r,n)=>sf(t,e,r,n),hasEnoughSigningPower:(t,e)=>{const{weight:r}=Qh.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{const r=e.reverse(),n=rs(t)?t:Js(t),i=r.map(s=>rs(s)?s:Js(s));return Jh(n,i)},hashSetImageHash:function(t){return Y7(t)},signaturesOf(t){return lf(t.tree)},signaturesOfDecoded:function(t){return cf(t.decoded.tree)}};var RW=Object.freeze({__proto__:null,SignatureType:vr,SignaturePartType:Ht,SignaturePartTypeLength:V0,isUnrecoveredNode:ga,isUnrecoveredNestedLeaf:lc,isUnrecoveredSignatureLeaf:yu,decodeSignatureTree:H0,InvalidSignatureLeafError:e9,recoverTopology:ta,partEncoder:Tr,encodeSigners:sf,encodeTree:of,deepestConfigOfSignature:Ex,isUnrecoveredSignature:Sx,isUnrecoveredChainedSignature:pu,isSignature:t9,isChainedSignature:kx,decodeSignature:Kh,decodeSignatureBody:Md,decodeChainedSignature:r9,setImageHashStruct:n9,recoverSignature:_x,encodeChain:Jh,encodeSignature:Js,encodeSignatureBody:_p,encodeSignatureTree:af,signaturesOf:lf,signaturesOfDecoded:cf,subdigestsOfDecoded:Rd,trimSignature:W0,trimUnrecoveredTree:ff,SignatureCoder:Qh});function Wr(t){return t.address!==void 0&&t.weight!==void 0}function us(t){return t.subdigest!==void 0&&t.address===void 0}function uf(t){return si(t)?JSON.stringify({left:uf(t.left),right:uf(t.right)}):ds(t)?JSON.stringify({weight:V.from(t.weight).toString(),threshold:V.from(t.threshold).toString(),tree:uf(t.tree)}):Wr(t)?JSON.stringify({address:t.address,weight:V.from(t.weight).toString()}):JSON.stringify(t)}function df(t){const e=typeof t=="string"?JSON.parse(t):t;return e.left!==void 0&&e.right!==void 0?{left:df(e.left),right:df(e.right)}:e.weight!==void 0&&e.threshold!==void 0&&e.tree!==void 0?{weight:V.from(e.weight),threshold:V.from(e.threshold),tree:df(e.tree)}:e.address!==void 0&&e.weight!==void 0?{address:e.address,weight:V.from(e.weight)}:e}function ds(t){return t.tree!==void 0&&t.weight!==void 0&&t.threshold!==void 0}function hs(t){return t.nodeHash!==void 0}function Tx(t){return Wr(t)||us(t)||ds(t)||hs(t)}function si(t){return t.left!==void 0&&t.right!==void 0}function NW(t){return si(t)||Tx(t)}function i9(t){return Ce(["uint96","address"],[t.weight,t.address])}function s9(t){const e=X(t);if(e.length!==32)throw new Error("Invalid encoded string length");const r=V.from(e.slice(0,12)),n=we(Y(e.slice(12)));return{weight:r,address:n}}function o9(t){const e=X(t);return e.length!==32?!1:e.slice(0,11).every(n=>n===0)}function kn(t){if(Wr(t))return i9(t);if(us(t))return Gs(["string","bytes32"],[`Sequence static digest: -`,t.subdigest]);if(ds(t)){const e=kn(t.tree);return Gs(["string","bytes32","uint256","uint256"],[`Sequence nested config: -`,e,t.threshold,t.weight])}return hs(t)?t.nodeHash:Gs(["bytes32","bytes32"],[kn(t.left),kn(t.right)])}function OW(t){const e=[];let r=t;for(;!Tx(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function DW(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function Px(t){return Gs(["bytes32","uint256"],[Gs(["bytes32","uint256"],[kn(t.tree),t.threshold]),t.checkpoint])}function a9(t){return t.threshold!==void 0&&t.weight!==void 0&&t.members!==void 0}function Cl(t){return Wr(t)||us(t)?[t]:ds(t)?[{threshold:t.threshold,weight:t.weight,members:Cl(t.tree)}]:hs(t)?[]:[...Cl(t.left),...Cl(t.right)]}function Tp(t){return hs(t)?!0:si(t)?Tp(t.left)||Tp(t.right):!1}function BW(t){return{threshold:t.threshold,checkpoint:t.checkpoint,members:Cl(t.tree)}}const l9=(t,e)=>t.map(r=>a9(r)?{tree:e(r.members),threshold:r.threshold,weight:r.weight}:r);function Ix(t){if(t.length===0)throw new Error("Empty members array");return l9(t,Ix).reduce((r,n)=>({left:r,right:n}))}function Mx(t){if(t.length===0)throw new Error("Empty members array");const e=l9(t,Mx);for(let r=e.length;r>1;r=r/2)for(let n=0;n=r?e[n]=e[i]:e[n]={left:e[i],right:e[s]}}return e[0]}function Rx(t){return t.length>8?Mx(t):Ix(t)}function c9(t,e=Rx){return{version:2,threshold:t.threshold,checkpoint:t.checkpoint,tree:e(t.members)}}function q0(t,e){return us(t)?t.subdigest===e:si(t)?q0(t.left,e)||q0(t.right,e):!1}function Pp(t){const e=[t],r=new Set;for(;e.length>0;){const n=e.pop();ds(n)?e.push(n.tree):si(n)?(e.push(n.left),e.push(n.right)):Wr(n)&&r.add({address:n.address,weight:V.from(n.weight).toNumber()})}return Array.from(r)}function G0(t){return si(t)?G0(t.left)&&G0(t.right):!hs(t)}const Yh={isWalletConfig:t=>t.version===2&&t.threshold!==void 0&&t.tree!==void 0,imageHashOf:t=>Px(t),hasSubdigest:(t,e)=>q0(t.tree,e),checkpointOf:t=>V.from(t.checkpoint),signersOf:t=>Pp(t.tree),fromSimple:t=>{var e;return c9(Cr({},t,{members:[...t.signers,...((e=t.subdigests)!=null?e:[]).map(r=>({subdigest:r}))]}))},isComplete:t=>G0(t.tree),update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new tr(pr.mainModuleUpgradable.abi);return{entrypoint:t,transactions:[{to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[Yh.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}},decodeTransaction:function(t){var e,r,n,i;const s=new tr(pr.mainModuleUpgradable.abi);if(t.transactions.length!==1)throw new Error("Invalid transaction bundle, expected 1 transaction");const o=t.transactions[0].data;if(!o)throw new Error("Invalid transaction bundle, expected data");const a=s.decodeFunctionData(s.getFunction("updateImageHash"),o);if(!a)throw new Error("Invalid transaction bundle, expected valid data");if(t.transactions[0].to!==t.entrypoint)throw new Error("Invalid transaction bundle, expected to be sent to entrypoint");if(t.transactions[0].delegateCall)throw new Error("Invalid transaction bundle, expected not to be a delegateCall");if(!t.transactions[0].revertOnError)throw new Error("Invalid transaction bundle, expected revertOnError");if(!Nt.eq((e=(r=t.transactions[0])==null?void 0:r.value)!=null?e:0))throw new Error("Invalid transaction bundle, expected value to be 0");if(!Nt.eq((n=(i=t.transactions[0])==null?void 0:i.gasLimit)!=null?n:0))throw new Error("Invalid transaction bundle, expected value to be 0");return{address:t.entrypoint,newImageHash:a[0],kind:void 0}}},toJSON:function(t){return JSON.stringify({version:t.version,threshold:V.from(t.threshold).toString(),checkpoint:V.from(t.checkpoint).toString(),tree:uf(t.tree)})},fromJSON:function(t){const e=JSON.parse(t);return{version:e.version,threshold:V.from(e.threshold),checkpoint:V.from(e.checkpoint),tree:df(e.tree)}},editConfig:function(t,e){var r,n;const i=Cl(t.tree);if(e.add)for(const s of e.add)i.find(o=>Wr(o)&&o.address===s.address)||i.push({address:s.address,weight:s.weight});if(e.remove)for(const s of e.remove){const o=i.findIndex(a=>Wr(a)&&a.address===s);o>=0&&i.splice(o,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,checkpoint:(n=e.checkpoint)!=null?n:t.checkpoint,tree:Rx(i)}},buildStubSignature:function(t,e){const r=new Map;for(const[i,s]of e.entries()){r.set(i,{signature:s,isDynamic:!0});const{encoded:o,weight:a}=sf(t,r,[],0);if(a.gte(t.threshold))return o}const n=Pp(t.tree);for(const{address:i}of n.sort(({weight:s},{weight:o})=>s-o)){r.set(i,{signature:"0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02",isDynamic:!1});const{encoded:o,weight:a}=sf(t,r,[],0);if(a.gte(t.threshold))return o}return sf(t,r,[],0).encoded}};var LW=Object.freeze({__proto__:null,isSignerLeaf:Wr,isSubdigestLeaf:us,topologyToJSON:uf,topologyFromJSON:df,isNestedLeaf:ds,isNodeLeaf:hs,isLeaf:Tx,isNode:si,isTopology:NW,encodeSignerLeaf:i9,decodeSignerLeaf:s9,isEncodedSignerLeaf:o9,hashNode:kn,leftFace:OW,isWalletConfig:DW,imageHash:Px,isSimpleNestedMember:a9,topologyToMembers:Cl,hasUnknownNodes:Tp,toSimpleWalletConfig:BW,legacyTopologyBuilder:Ix,merkleTopologyBuilder:Mx,optimized2SignersTopologyBuilder:Rx,toWalletConfig:c9,hasSubdigest:q0,signersOf:Pp,isComplete:G0,ConfigCoder:Yh}),$W=Object.freeze({__proto__:null});const FW={config:Yh,signature:Qh},f9=2,u9={version:f9,factory:"0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A",guestModule:"0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE",mainModule:"0xfBf8f1A5E00034762D928f46d438B947f5d4065d",mainModuleUpgradable:"0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Se=Object.freeze({__proto__:null,config:LW,signature:RW,context:$W,chained:MW,coders:FW,version:f9,DeployedWalletContext:u9});function Ip(t,e){const r=pe(Ce(["bytes","bytes32"],[t.walletCreationCode,Ue(t.mainModule,32)])),n=pe(Ce(["bytes1","address","bytes32","bytes32"],["0xff",t.factory,e,r]));return we(Vt(n,12))}async function jW(t,e,r,n,i,s){return(await Promise.all(A9.map(async a=>{try{const l=a.signature.SignatureCoder.decode(Y(r)),c=await a.signature.SignatureCoder.recover(l,{address:t,digest:Y(e),chainId:n},i),f=a.config.ConfigCoder.imageHashOf(c.config);if(Ip(s[a.version],f).toLowerCase()===t.toLowerCase())return!0;const h=await a.signature.SignatureCoder.recover(l,{address:t,digest:Y(e),chainId:n},i),y=a.config.ConfigCoder.imageHashOf(h.config);return Ip(s[a.version],y).toLowerCase()===t.toLowerCase()}catch{}return!1}))).some(a=>a)}function zW(t){const e=Object.keys(t).length;for(let r=1;r<=e;r++){const n=t[r];if(!n||n.version!==r)return!1}return!0}function UW(t){const e=Object.keys(t).length;return t[e]}const VW={1:Q7,2:u9};var HW=Object.freeze({__proto__:null,addressOf:Ip,isValidCounterfactual:jW,isValidVersionedContext:zW,latestContext:UW,defaultContexts:VW});const Xh=`tuple( +`)}static register(e,r){r||(r=e.locale)}}const IU="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let tf=null;function y6(t){if(tf==null&&(tf=IU.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),cu.check(t)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw tf=null,new Error("BIP39 Wordlist for en (English) FAILED")}class RU extends cu{constructor(){super("en")}getWord(e){return y6(this),tf[e]}getWordIndex(e){return y6(this),tf.indexOf(e)}}const T7=new RU;cu.register(T7);const p6={en:T7},MU="hdnode/5.7.0",Wf=new q(MU),NU=H.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),OU=He("Bitcoin seed"),ja=2147483648;function P7(t){return(1<=256)throw new Error("Depth too large!");return g6(Ue([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",Q(this.depth),this.parentFingerprint,Ve(Q(this.index),4),this.chainCode,this.privateKey!=null?Ue(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new fn(Na,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&~ja));const n=new Uint8Array(37);if(e&ja){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(X(this.privateKey),1),r&&(r+="'")}else n.set(X(this.publicKey));for(let u=24;u>=0;u-=8)n[33+(u>>3)]=e>>24-u&255;const i=X(Hf(jl.sha512,this.chainCode,n)),s=i.slice(0,32),o=i.slice(32);let a=null,l=null;this.privateKey?a=Zu(H.from(s).add(this.privateKey).mod(NU)):l=new Xo(Q(s))._addPoint(this.publicKey);let c=r;const f=this.mnemonic;return f&&(c=Object.freeze({phrase:f.phrase,path:r,locale:f.locale||"en"})),new fn(Na,a,l,this.fingerprint,Zu(o),e,this.depth+1,c)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let i=0;i=ja)throw new Error("invalid path index - "+s);n=n._derive(ja+o)}else if(s.match(/^[0-9]+$/)){const o=parseInt(s);if(o>=ja)throw new Error("invalid path index - "+s);n=n._derive(o)}else throw new Error("invalid path component - "+s)}return n}static _fromSeed(e,r){const n=X(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=X(Hf(jl.sha512,OU,n));return new fn(Na,Zu(i.slice(0,32)),null,"0x00000000",Zu(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=tx(n),e=Wh(Hh(e,n),n),fn._fromSeed(I7(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return fn._fromSeed(e,null)}static fromExtendedKey(e){const r=Fl.decode(e);(r.length!==82||g6(r.slice(0,78))!==e)&&Wf.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=Q(r.slice(5,9)),s=parseInt(Q(r.slice(9,13)).substring(2),16),o=Q(r.slice(13,45)),a=r.slice(45,78);switch(Q(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new fn(Na,null,Q(a),i,o,s,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new fn(Na,Q(a.slice(1)),null,i,o,s,n,null)}return Wf.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function I7(t,e){e||(e="");const r=He("mnemonic"+e,Pi.NFKD);return ex(He(t,Pi.NFKD),r,2048,64,"sha512")}function Hh(t,e){e=tx(e),Wf.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=X(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let c=0;c>3]|=1<<7-i%8),i++}const s=32*r.length/3,o=r.length/3,a=P7(o);if((X(ss(n.slice(0,s/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return Q(n.slice(0,s/8))}function Wh(t,e){if(e=tx(e),t=X(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let o=0;o8?(r[r.length-1]<<=8,r[r.length-1]|=t[o],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[o]>>8-n,r.push(t[o]&$U(8-n)),n+=3);const i=t.length/4,s=X(ss(t))[0]&P7(i);return r[r.length-1]<<=i,r[r.length-1]|=s>>8-i,e.join(r.map(o=>e.getWord(o)))}function DU(t,e){try{return Hh(t,e),!0}catch{}return!1}function LU(t){return(typeof t!="number"||t<0||t>=ja||t%1)&&Wf.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const BU="random/5.7.0",yp=new q(BU);function FU(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const m6=FU();let _d=m6.crypto||m6.msCrypto;(!_d||!_d.getRandomValues)&&(yp.warn("WARNING: Missing strong random number source"),_d={getRandomValues:function(t){return yp.throwError("no secure random source avaialble",q.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function pi(t){(t<=0||t>1024||t%1||t!=t)&&yp.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return _d.getRandomValues(e),X(e)}function jU(t){t=t.slice();for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}var R7={exports:{}};(function(t,e){(function(r){function n(g){return parseInt(g)===g}function i(g){if(!n(g.length))return!1;for(var d=0;d255)return!1;return!0}function s(g,d){if(g.buffer&&ArrayBuffer.isView(g)&&g.name==="Uint8Array")return d&&(g.slice?g=g.slice():g=Array.prototype.slice.call(g)),g;if(Array.isArray(g)){if(!i(g))throw new Error("Array contains invalid value: "+g);return new Uint8Array(g)}if(n(g.length)&&i(g))return new Uint8Array(g);throw new Error("unsupported array-like object")}function o(g){return new Uint8Array(g)}function a(g,d,T,O,x){(O!=null||x!=null)&&(g.slice?g=g.slice(O,x):g=Array.prototype.slice.call(g,O,x)),d.set(g,T)}var l=function(){function g(T){var O=[],x=0;for(T=encodeURI(T);x191&&$<224?(O.push(String.fromCharCode(($&31)<<6|T[x+1]&63)),x+=2):(O.push(String.fromCharCode(($&15)<<12|(T[x+1]&63)<<6|T[x+2]&63)),x+=3)}return O.join("")}return{toBytes:g,fromBytes:d}}(),c=function(){function g(O){for(var x=[],$=0;$>4]+d[L&15])}return x.join("")}return{toBytes:g,fromBytes:T}}(),f={16:10,24:12,32:14},u=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],h=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],y=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],m=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],k=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],w=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],E=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],A=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],I=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],M=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],B=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],U=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],j=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],K=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function J(g){for(var d=[],T=0;T>2,this._Ke[$][d%4]=x[d],this._Kd[g-$][d%4]=x[d];for(var L=0,z=O,G;z>16&255]<<24^h[G>>8&255]<<16^h[G&255]<<8^h[G>>24&255]^u[L]<<24,L+=1,O!=8)for(var d=1;d>8&255]<<8^h[G>>16&255]<<16^h[G>>24&255]<<24;for(var d=O/2+1;d>2,V=z%4,this._Ke[F][V]=x[d],this._Kd[g-F][V]=x[d++],z++}for(var F=1;F>24&255]^U[G>>16&255]^j[G>>8&255]^K[G&255]},Z.prototype.encrypt=function(g){if(g.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var d=this._Ke.length-1,T=[0,0,0,0],O=J(g),x=0;x<4;x++)O[x]^=this._Ke[0][x];for(var $=1;$>24&255]^p[O[(x+1)%4]>>16&255]^k[O[(x+2)%4]>>8&255]^w[O[(x+3)%4]&255]^this._Ke[$][x];O=T.slice()}for(var L=o(16),z,x=0;x<4;x++)z=this._Ke[d][x],L[4*x]=(h[O[x]>>24&255]^z>>24)&255,L[4*x+1]=(h[O[(x+1)%4]>>16&255]^z>>16)&255,L[4*x+2]=(h[O[(x+2)%4]>>8&255]^z>>8)&255,L[4*x+3]=(h[O[(x+3)%4]&255]^z)&255;return L},Z.prototype.decrypt=function(g){if(g.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var d=this._Kd.length-1,T=[0,0,0,0],O=J(g),x=0;x<4;x++)O[x]^=this._Kd[0][x];for(var $=1;$>24&255]^A[O[(x+3)%4]>>16&255]^I[O[(x+2)%4]>>8&255]^M[O[(x+1)%4]&255]^this._Kd[$][x];O=T.slice()}for(var L=o(16),z,x=0;x<4;x++)z=this._Kd[d][x],L[4*x]=(y[O[x]>>24&255]^z>>24)&255,L[4*x+1]=(y[O[(x+3)%4]>>16&255]^z>>16)&255,L[4*x+2]=(y[O[(x+2)%4]>>8&255]^z>>8)&255,L[4*x+3]=(y[O[(x+1)%4]&255]^z)&255;return L};var ie=function(g){if(!(this instanceof ie))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new Z(g)};ie.prototype.encrypt=function(g){if(g=s(g),g.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var d=o(g.length),T=o(16),O=0;O=0;--d)this._counter[d]=g%256,g=g>>8},P.prototype.setBytes=function(g){if(g=s(g,!0),g.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=g},P.prototype.increment=function(){for(var g=15;g>=0;g--)if(this._counter[g]===255)this._counter[g]=0;else{this._counter[g]++;break}};var N=function(g,d){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",d instanceof P||(d=new P(d)),this._counter=d,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new Z(g)};N.prototype.encrypt=function(g){for(var d=s(g,!0),T=0;T16)throw new Error("PKCS#7 padding byte out of range");for(var T=g.length-d,O=0;O=64;){let R=w,g=E,d=A,T=I,O=M,x=B,$=U,L=j,z,G,F,V,W;for(G=0;G<16;G++)F=b+G*4,K[G]=(N[F]&255)<<24|(N[F+1]&255)<<16|(N[F+2]&255)<<8|N[F+3]&255;for(G=16;G<64;G++)z=K[G-2],V=(z>>>17|z<<15)^(z>>>19|z<<13)^z>>>10,z=K[G-15],W=(z>>>7|z<<25)^(z>>>18|z<<14)^z>>>3,K[G]=(V+K[G-7]|0)+(W+K[G-16]|0)|0;for(G=0;G<64;G++)V=(((O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7))+(O&x^~O&$)|0)+(L+(k[G]+K[G]|0)|0)|0,W=((R>>>2|R<<30)^(R>>>13|R<<19)^(R>>>22|R<<10))+(R&g^R&d^g&d)|0,L=$,$=x,x=O,O=T+V|0,T=d,d=g,g=R,R=V+W|0;w=w+R|0,E=E+g|0,A=A+d|0,I=I+T|0,M=M+O|0,B=B+x|0,U=U+$|0,j=j+L|0,b+=64,_-=64}}J(p);let Z,ie=p.length%64,D=p.length/536870912|0,v=p.length<<3,C=ie<56?56:120,P=p.slice(p.length-ie,p.length);for(P.push(128),Z=ie+1;Z>>24&255),P.push(D>>>16&255),P.push(D>>>8&255),P.push(D>>>0&255),P.push(v>>>24&255),P.push(v>>>16&255),P.push(v>>>8&255),P.push(v>>>0&255),J(P),[w>>>24&255,w>>>16&255,w>>>8&255,w>>>0&255,E>>>24&255,E>>>16&255,E>>>8&255,E>>>0&255,A>>>24&255,A>>>16&255,A>>>8&255,A>>>0&255,I>>>24&255,I>>>16&255,I>>>8&255,I>>>0&255,M>>>24&255,M>>>16&255,M>>>8&255,M>>>0&255,B>>>24&255,B>>>16&255,B>>>8&255,B>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,j>>>24&255,j>>>16&255,j>>>8&255,j>>>0&255]}function s(p,k,w){p=p.length<=64?p:i(p);const E=64+k.length+4,A=new Array(E),I=new Array(64);let M,B=[];for(M=0;M<64;M++)A[M]=54;for(M=0;M=E-4;j--){if(A[j]++,A[j]<=255)return;A[j]=0}}for(;w>=32;)U(),B=B.concat(i(I.concat(i(A)))),w-=32;return w>0&&(U(),B=B.concat(i(I.concat(i(A))).slice(0,w))),B}function o(p,k,w,E,A){let I;for(f(p,(2*w-1)*16,A,0,16),I=0;I<2*w;I++)c(p,I*16,A,16),l(A,E),f(A,0,p,k+I*16,16);for(I=0;I>>32-k}function l(p,k){f(p,0,k,0,16);for(let w=8;w>0;w-=2)k[4]^=a(k[0]+k[12],7),k[8]^=a(k[4]+k[0],9),k[12]^=a(k[8]+k[4],13),k[0]^=a(k[12]+k[8],18),k[9]^=a(k[5]+k[1],7),k[13]^=a(k[9]+k[5],9),k[1]^=a(k[13]+k[9],13),k[5]^=a(k[1]+k[13],18),k[14]^=a(k[10]+k[6],7),k[2]^=a(k[14]+k[10],9),k[6]^=a(k[2]+k[14],13),k[10]^=a(k[6]+k[2],18),k[3]^=a(k[15]+k[11],7),k[7]^=a(k[3]+k[15],9),k[11]^=a(k[7]+k[3],13),k[15]^=a(k[11]+k[7],18),k[1]^=a(k[0]+k[3],7),k[2]^=a(k[1]+k[0],9),k[3]^=a(k[2]+k[1],13),k[0]^=a(k[3]+k[2],18),k[6]^=a(k[5]+k[4],7),k[7]^=a(k[6]+k[5],9),k[4]^=a(k[7]+k[6],13),k[5]^=a(k[4]+k[7],18),k[11]^=a(k[10]+k[9],7),k[8]^=a(k[11]+k[10],9),k[9]^=a(k[8]+k[11],13),k[10]^=a(k[9]+k[8],18),k[12]^=a(k[15]+k[14],7),k[13]^=a(k[12]+k[15],9),k[14]^=a(k[13]+k[12],13),k[15]^=a(k[14]+k[13],18);for(let w=0;w<16;++w)p[w]+=k[w]}function c(p,k,w,E){for(let A=0;A=256)return!1}return!0}function h(p,k){if(typeof p!="number"||p%1)throw new Error("invalid "+k);return p}function y(p,k,w,E,A,I,M){if(w=h(w,"N"),E=h(E,"r"),A=h(A,"p"),I=h(I,"dkLen"),w===0||w&w-1)throw new Error("N must be power of 2");if(w>2147483647/128/E)throw new Error("N too large");if(E>2147483647/128/A)throw new Error("r too large");if(!u(p))throw new Error("password must be an array or buffer");if(p=Array.prototype.slice.call(p),!u(k))throw new Error("salt must be an array or buffer");k=Array.prototype.slice.call(k);let B=s(p,k,A*128*E);const U=new Uint32Array(A*32*E);for(let O=0;Og&&(O=g);for(let $=0;$g&&(O=g);for(let $=0;$>0&255),B.push(U[$]>>8&255),B.push(U[$]>>16&255),B.push(U[$]>>24&255);const x=s(p,B,I);return M&&M(null,1,x),x}M&&d(T)};if(!M)for(;;){const O=T();if(O!=null)return O}T()}const m={scrypt:function(p,k,w,E,A,I,M){return new Promise(function(B,U){let j=0;M&&M(0),y(p,k,w,E,A,I,function(K,J,Z){if(K)U(K);else if(Z)M&&j!==1&&M(1),B(new Uint8Array(Z));else if(M&&J!==j)return j=J,M(J)})})},syncScrypt:function(p,k,w,E,A,I){return new Uint8Array(y(p,k,w,E,A,I))}};t.exports=m})()})(O7);var qU=O7.exports;const sx=lo(qU);var GU=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const pp=new q(M7);function x6(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class KU extends Sa{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function JU(t,e,r){if(Kt(t,"crypto/cipher")==="aes-128-ctr"){const i=Zo(Kt(t,"crypto/cipherparams/iv")),s=new gi.Counter(i),o=new gi.ModeOfOperation.ctr(e,s);return X(o.decrypt(r))}return null}function $7(t,e){const r=Zo(Kt(t,"crypto/ciphertext"));if(Q(pe(Ue([e.slice(16,32),r]))).substring(2)!==Kt(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const i=JU(t,e.slice(0,16),r);i||pp.throwError("unsupported cipher",q.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const s=e.slice(32,64),o=qs(i);if(t.address){let l=t.address.toLowerCase();if(l.substring(0,2)!=="0x"&&(l="0x"+l),we(l)!==o)throw new Error("address mismatch")}const a={_isKeystoreAccount:!0,address:o,privateKey:Q(i)};if(Kt(t,"x-ethers/version")==="0.1"){const l=Zo(Kt(t,"x-ethers/mnemonicCiphertext")),c=Zo(Kt(t,"x-ethers/mnemonicCounter")),f=new gi.Counter(c),u=new gi.ModeOfOperation.ctr(s,f),h=Kt(t,"x-ethers/path")||zl,y=Kt(t,"x-ethers/locale")||"en",m=X(u.decrypt(l));try{const p=Wh(m,y),k=fn.fromMnemonic(p,null,y).derivePath(h);if(k.privateKey!=a.privateKey)throw new Error("mnemonic mismatch");a.mnemonic=k.mnemonic}catch(p){if(p.code!==q.errors.INVALID_ARGUMENT||p.argument!=="wordlist")throw p}}return new KU(a)}function D7(t,e,r,n,i){return X(ex(t,e,r,n,i))}function YU(t,e,r,n,i){return Promise.resolve(D7(t,e,r,n,i))}function L7(t,e,r,n,i){const s=rx(e),o=Kt(t,"crypto/kdf");if(o&&typeof o=="string"){const a=function(l,c){return pp.throwArgumentError("invalid key-derivation function parameters",l,c)};if(o.toLowerCase()==="scrypt"){const l=Zo(Kt(t,"crypto/kdfparams/salt")),c=parseInt(Kt(t,"crypto/kdfparams/n")),f=parseInt(Kt(t,"crypto/kdfparams/r")),u=parseInt(Kt(t,"crypto/kdfparams/p"));(!c||!f||!u)&&a("kdf",o),c&c-1&&a("N",c);const h=parseInt(Kt(t,"crypto/kdfparams/dklen"));return h!==32&&a("dklen",h),n(s,l,c,f,u,64,i)}else if(o.toLowerCase()==="pbkdf2"){const l=Zo(Kt(t,"crypto/kdfparams/salt"));let c=null;const f=Kt(t,"crypto/kdfparams/prf");f==="hmac-sha256"?c="sha256":f==="hmac-sha512"?c="sha512":a("prf",f);const u=parseInt(Kt(t,"crypto/kdfparams/c")),h=parseInt(Kt(t,"crypto/kdfparams/dklen"));return h!==32&&a("dklen",h),r(s,l,u,h,c)}}return pp.throwArgumentError("unsupported key-derivation function","kdf",o)}function QU(t,e){const r=JSON.parse(t),n=L7(r,e,D7,sx.syncScrypt);return $7(r,n)}function XU(t,e,r){return GU(this,void 0,void 0,function*(){const n=JSON.parse(t),i=yield L7(n,e,YU,sx.scrypt,r);return $7(n,i)})}function ZU(t,e,r,n){try{if(we(t.address)!==qs(t.privateKey))throw new Error("address/privateKey mismatch");if(x6(t)){const k=t.mnemonic;if(fn.fromMnemonic(k.phrase,null,k.locale).derivePath(k.path||zl).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(k){return Promise.reject(k)}typeof r=="function"&&!n&&(n=r,r={}),r||(r={});const i=X(t.privateKey),s=rx(e);let o=null,a=null,l=null;if(x6(t)){const k=t.mnemonic;o=X(Hh(k.phrase,k.locale||"en")),a=k.path||zl,l=k.locale||"en"}let c=r.client;c||(c="ethers.js");let f=null;r.salt?f=X(r.salt):f=pi(32);let u=null;if(r.iv){if(u=X(r.iv),u.length!==16)throw new Error("invalid iv")}else u=pi(16);let h=null;if(r.uuid){if(h=X(r.uuid),h.length!==16)throw new Error("invalid uuid")}else h=pi(16);let y=1<<17,m=8,p=1;return r.scrypt&&(r.scrypt.N&&(y=r.scrypt.N),r.scrypt.r&&(m=r.scrypt.r),r.scrypt.p&&(p=r.scrypt.p)),sx.scrypt(s,f,y,m,p,64,n).then(k=>{k=X(k);const w=k.slice(0,16),E=k.slice(16,32),A=k.slice(32,64),I=new gi.Counter(u),M=new gi.ModeOfOperation.ctr(w,I),B=X(M.encrypt(i)),U=pe(Ue([E,B])),j={address:t.address.substring(2).toLowerCase(),id:UU(h),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:Q(u).substring(2)},ciphertext:Q(B).substring(2),kdf:"scrypt",kdfparams:{salt:Q(f).substring(2),n:y,dklen:32,p,r:m},mac:U.substring(2)}};if(o){const K=pi(16),J=new gi.Counter(K),Z=new gi.ModeOfOperation.ctr(A,J),ie=X(Z.encrypt(o)),D=new Date,v=D.getUTCFullYear()+"-"+Sc(D.getUTCMonth()+1,2)+"-"+Sc(D.getUTCDate(),2)+"T"+Sc(D.getUTCHours(),2)+"-"+Sc(D.getUTCMinutes(),2)+"-"+Sc(D.getUTCSeconds(),2)+".0Z";j["x-ethers"]={client:c,gethFilename:"UTC--"+v+"--"+j.address,mnemonicCounter:Q(K).substring(2),mnemonicCiphertext:Q(ie).substring(2),path:a,locale:l,version:"0.1"}}return JSON.stringify(j)})}function eV(t,e,r){if(nx(t)){r&&r(0);const n=N7(t,e);return r&&r(1),Promise.resolve(n)}return ix(t)?XU(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function tV(t,e){if(nx(t))return N7(t,e);if(ix(t))return QU(t,e);throw new Error("invalid JSON wallet")}const rV="wallet/5.7.0";var b6=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Oa=new q(rV);function nV(t){return t!=null&&Pe(t.privateKey,32)&&t.address!=null}function iV(t){const e=t.mnemonic;return e&&e.phrase}let sV=class za extends io{constructor(e,r){if(super(),nV(e)){const n=new Xo(e.privateKey);if(te(this,"_signingKey",()=>n),te(this,"address",qs(this.publicKey)),this.address!==we(e.address)&&Oa.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),iV(e)){const i=e.mnemonic;te(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||zl,locale:i.locale||"en"}));const s=this.mnemonic,o=fn.fromMnemonic(s.phrase,null,s.locale).derivePath(s.path);qs(o.privateKey)!==this.address&&Oa.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else te(this,"_mnemonic",()=>null)}else{if(Xo.isSigningKey(e))e.curve!=="secp256k1"&&Oa.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),te(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const n=new Xo(e);te(this,"_signingKey",()=>n)}te(this,"_mnemonic",()=>null),te(this,"address",qs(this.publicKey))}r&&!po.isProvider(r)&&Oa.throwArgumentError("invalid provider","provider",r),te(this,"provider",r||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new za(this,e)}signTransaction(e){return Ge(e).then(r=>{r.from!=null&&(we(r.from)!==this.address&&Oa.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);const n=this._signingKey().signDigest(pe(vp(r)));return vp(r,n)})}signMessage(e){return b6(this,void 0,void 0,function*(){return sp(this._signingKey().signDigest(Fh(e)))})}_signTypedData(e,r,n){return b6(this,void 0,void 0,function*(){const i=yield Qt.resolveNames(e,r,n,s=>(this.provider==null&&Oa.throwError("cannot resolve ENS names without a provider",q.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:s}),this.provider.resolveName(s)));return sp(this._signingKey().signDigest(Qt.hash(i.domain,r,i.value)))})}encrypt(e,r,n){if(typeof r=="function"&&!n&&(n=r,r={}),n&&typeof n!="function")throw new Error("invalid callback");return r||(r={}),ZU(this,e,r,n)}static createRandom(e){let r=pi(16);e||(e={}),e.extraEntropy&&(r=X(Vt(pe(Ue([r,e.extraEntropy])),0,16)));const n=Wh(r,e.locale);return za.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return eV(e,r,n).then(i=>new za(i))}static fromEncryptedJsonSync(e,r){return new za(tV(e,r))}static fromMnemonic(e,r,n){return r||(r=zl),new za(fn.fromMnemonic(e,null,n).derivePath(r))}};function B7(t,e){return va(Fh(t),e)}function oV(t,e,r,n){return va(Qt.hash(t,e,r),n)}const aV="networks/5.7.1",w6=new q(aV);function lV(t){return t&&typeof t.renetwork=="function"}function zi(t){const e=function(r,n){n==null&&(n={});const i=[];if(r.InfuraProvider&&n.infura!=="-")try{i.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{i.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{i.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const s=["goerli","ropsten","rinkeby","sepolia"];try{const o=new r.PocketProvider(t,n.pocket);o.network&&s.indexOf(o.network.name)===-1&&i.push(o)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const s=["ropsten"],o=new r.AnkrProvider(t,n.ankr);o.network&&s.indexOf(o.network.name)===-1&&i.push(o)}catch{}if(i.length===0)return null;if(r.FallbackProvider){let s=1;return n.quorum!=null?s=n.quorum:t==="homestead"&&(s=2),new r.FallbackProvider(i,s)}return i[0]};return e.renetwork=function(r){return zi(r)},e}function $0(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return $0(t,n)},r}const C6={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:zi("homestead")},E6={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:zi("ropsten")},S6={chainId:63,name:"classicMordor",_defaultProvider:$0("https://www.ethercluster.com/mordor","classicMordor")},ed={unspecified:{chainId:0,name:"unspecified"},homestead:C6,mainnet:C6,morden:{chainId:2,name:"morden"},ropsten:E6,testnet:E6,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:zi("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:zi("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:zi("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:zi("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:$0("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:S6,classicTestnet:S6,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:$0("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:zi("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:zi("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function cV(t){if(t==null)return null;if(typeof t=="number"){for(const n in ed){const i=ed[n];if(i.chainId===t)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=ed[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=ed[t.name];if(!e)return typeof t.chainId!="number"&&w6.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&w6.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(lV(e._defaultProvider)?r=e._defaultProvider.renetwork(t):r=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}const fV="web/5.7.1";var uV=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};function dV(t,e){return uV(this,void 0,void 0,function*(){e==null&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),e.fetchOptions!=null){const o=e.fetchOptions;o.mode&&(r.mode=o.mode),o.cache&&(r.cache=o.cache),o.credentials&&(r.credentials=o.credentials),o.redirect&&(r.redirect=o.redirect),o.referrer&&(r.referrer=o.referrer)}const n=yield fetch(t,r),i=yield n.arrayBuffer(),s={};return n.headers.forEach?n.headers.forEach((o,a)=>{s[a.toLowerCase()]=o}):n.headers.keys().forEach(o=>{s[o.toLowerCase()]=n.headers.get(o)}),{headers:s,statusCode:n.status,statusMessage:n.statusText,body:X(new Uint8Array(i))}})}var hV=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Vn=new q(fV);function k6(t){return new Promise(e=>{setTimeout(e,t)})}function ws(t,e){if(t==null)return null;if(typeof t=="string")return t;if(rs(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return fs(t)}catch{}return Q(t)}return t}function vV(t){return He(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function F7(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;Vn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const i=typeof t=="object"?t.throttleCallback:null,s=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;Vn.assertArgument(s>0&&s%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",s);const o=typeof t=="object"?!!t.errorPassThrough:!1,a={};let l=null;const c={method:"GET"};let f=!1,u=2*60*1e3;if(typeof t=="string")l=t;else if(typeof t=="object"){if((t==null||t.url==null)&&Vn.throwArgumentError("missing URL","connection.url",t),l=t.url,typeof t.timeout=="number"&&t.timeout>0&&(u=t.timeout),t.headers)for(const w in t.headers)a[w.toLowerCase()]={key:w,value:String(t.headers[w])},["if-none-match","if-modified-since"].indexOf(w.toLowerCase())>=0&&(f=!0);if(c.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){l.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&Vn.throwError("basic authentication requires a secure https url",q.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:t.user,password:"[REDACTED]"});const w=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+qm(He(w))}}t.skipFetchSetup!=null&&(c.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(c.fetchOptions=er(t.fetchOptions))}const h=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),y=l?l.match(h):null;if(y)try{const w={statusCode:200,statusMessage:"OK",headers:{"content-type":y[1]||"text/plain"},body:y[2]?Wm(y[3]):vV(y[3])};let E=w.body;return r&&(E=r(w.body,w)),Promise.resolve(E)}catch(w){Vn.throwError("processing response error",q.errors.SERVER_ERROR,{body:ws(y[1],y[2]),error:w,requestBody:null,requestMethod:"GET",url:l})}e&&(c.method="POST",c.body=e,a["content-type"]==null&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),a["content-length"]==null&&(a["content-length"]={key:"Content-Length",value:String(e.length)}));const m={};Object.keys(a).forEach(w=>{const E=a[w];m[E.key]=E.value}),c.headers=m;const p=function(){let w=null;return{promise:new Promise(function(I,M){u&&(w=setTimeout(()=>{w!=null&&(w=null,M(Vn.makeError("timeout",q.errors.TIMEOUT,{requestBody:ws(c.body,m["content-type"]),requestMethod:c.method,timeout:u,url:l})))},u))}),cancel:function(){w!=null&&(clearTimeout(w),w=null)}}}(),k=function(){return hV(this,void 0,void 0,function*(){for(let w=0;w=300)&&(p.cancel(),Vn.throwError("bad response",q.errors.SERVER_ERROR,{status:E.statusCode,headers:E.headers,body:ws(A,E.headers?E.headers["content-type"]:null),requestBody:ws(c.body,m["content-type"]),requestMethod:c.method,url:l})),r)try{const I=yield r(A,E);return p.cancel(),I}catch(I){if(I.throttleRetry&&w{let a=null;if(s!=null)try{a=JSON.parse(fs(s))}catch(l){Vn.throwError("invalid JSON",q.errors.SERVER_ERROR,{body:s,error:l})}return r&&(a=r(a,o)),a},i=null;if(e!=null){i=He(e);const s=typeof t=="string"?{url:t}:er(t);s.headers?Object.keys(s.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(s.headers=er(s.headers),s.headers["content-type"]="application/json"):s.headers={"content-type":"application/json"},t=s}return F7(t,i,n)}function qo(t,e){return e||(e={}),e=er(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let i=null,s=!1;const o=()=>s?!1:(s=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{o()&&n(new Error("timeout"))},e.timeout));const a=e.retryLimit;let l=0;function c(){return t().then(function(f){if(f!==void 0)o()&&r(f);else if(e.oncePoll)e.oncePoll.once("poll",c);else if(e.onceBlock)e.onceBlock.once("block",c);else if(!s){if(l++,l>a){o()&&n(new Error("retry limit reached"));return}let u=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));ue.ceiling&&(u=e.ceiling),setTimeout(c,u)}return null},function(f){o()&&n(f)})}c()})}var D0="qpzry9x8gf2tvdw0s3jn54khce6mua7l",gp={};for(var td=0;td>25;return(t&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function j7(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=bl(e)^n>>5}for(e=bl(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=j7(t);if(typeof n=="string")throw new Error(n);for(var i=t+"1",s=0;s>5)throw new Error("Non 5-bit word");n=bl(n)^o,i+=D0.charAt(o)}for(s=0;s<6;++s)n=bl(n);for(n^=1,s=0;s<6;++s){var a=n>>(5-s)*5&31;i+=D0.charAt(a)}return i}function z7(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;t=r;var i=t.lastIndexOf("1");if(i===-1)return"No separator character for "+t;if(i===0)return"Missing prefix for "+t;var s=t.slice(0,i),o=t.slice(i+1);if(o.length<6)return"Data too short";var a=j7(s);if(typeof a=="string")return a;for(var l=[],c=0;c=o.length)&&l.push(u)}return a!==1?"Invalid checksum for "+t:{prefix:s,words:l}}function pV(){var t=z7.apply(null,arguments);if(typeof t=="object")return t}function gV(t){var e=z7.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function qh(t,e,r,n){for(var i=0,s=0,o=(1<=r;)s-=r,a.push(i>>s&o);if(n)s>0&&a.push(i<=e)return"Excess padding";if(i<this.data(u,!0);return e.transaction={hash:o,type:c,accessList:fe.allowNull(this.accessList.bind(this),null),blockHash:fe.allowNull(o,null),blockNumber:fe.allowNull(l,null),transactionIndex:fe.allowNull(l,null),confirmations:fe.allowNull(l,null),from:r,gasPrice:fe.allowNull(n),maxPriorityFeePerGas:fe.allowNull(n),maxFeePerGas:fe.allowNull(n),gasLimit:n,to:fe.allowNull(r,null),value:n,nonce:l,data:s,r:fe.allowNull(this.uint256),s:fe.allowNull(this.uint256),v:fe.allowNull(l),creates:fe.allowNull(r,null),raw:fe.allowNull(s)},e.transactionRequest={from:fe.allowNull(r),nonce:fe.allowNull(l),gasLimit:fe.allowNull(n),gasPrice:fe.allowNull(n),maxPriorityFeePerGas:fe.allowNull(n),maxFeePerGas:fe.allowNull(n),to:fe.allowNull(r),value:fe.allowNull(n),data:fe.allowNull(f),type:fe.allowNull(l),accessList:fe.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:o,address:r,topics:fe.arrayOf(o),data:s,logIndex:l,blockHash:o},e.receipt={to:fe.allowNull(this.address,null),from:fe.allowNull(this.address,null),contractAddress:fe.allowNull(r,null),transactionIndex:l,root:fe.allowNull(a),gasUsed:n,logsBloom:fe.allowNull(s),blockHash:o,transactionHash:o,logs:fe.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:fe.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:fe.allowNull(n),status:fe.allowNull(l),type:c},e.block={hash:fe.allowNull(o),parentHash:o,number:l,timestamp:l,nonce:fe.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:fe.allowNull(r),extraData:s,transactions:fe.allowNull(fe.arrayOf(o)),baseFeePerGas:fe.allowNull(n)},e.blockWithTransactions=er(e.block),e.blockWithTransactions.transactions=fe.allowNull(fe.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:fe.allowNull(i,void 0),toBlock:fe.allowNull(i,void 0),blockHash:fe.allowNull(o,void 0),address:fe.allowNull(r,void 0),topics:fe.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:fe.allowNull(l),blockHash:fe.allowNull(o),transactionIndex:l,removed:fe.allowNull(this.boolean.bind(this)),address:r,data:fe.allowFalsish(s,"0x"),topics:fe.arrayOf(o),transactionHash:o,logIndex:l},e}accessList(e){return Aa(e||[])}number(e){return e==="0x"?0:H.from(e).toNumber()}type(e){return e==="0x"||e==null?0:H.from(e).toNumber()}bigNumber(e){return H.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return typeof e=="string"&&(!r&&e.substring(0,2)!=="0x"&&(e="0x"+e),Pe(e))?e.toLowerCase():kc.throwArgumentError("invalid hash","value",e)}data(e,r){const n=this.hex(e,r);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return we(e)}callAddress(e){if(!Pe(e,32))return null;const r=we(Vt(e,12));return r===jm?null:r}contractAddress(e){return Fm(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||Pe(e))return ti(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return _i(n)!==32?kc.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=H.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!Pe(e))throw new Error("invalid uint256");return Ve(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,i=fe.check(r,e);return i._difficulty=n==null?null:H.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return fe.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&H.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const r=fe.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;Pe(n)&&(n=H.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),Pe(n)&&(n=H.from(n).toNumber()),typeof n!="number"&&r.v!=null&&(n=(r.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),r.chainId=n}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r}transaction(e){return E7(e)}receiptLog(e){return fe.check(this.formats.receiptLog,e)}receipt(e){const r=fe.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=H.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&kc.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):kc.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&kc.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):e!=null?this.hash(e,!0):null}filter(e){return fe.check(this.formats.filter,e)}filterLog(e){return fe.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const i in e)try{const s=e[i](r[i]);s!==void 0&&(n[i]=s)}catch(s){throw s.checkKey=i,s.checkValue=r[i],s}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(i){n.push(e(i))}),n}}}var me=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const ke=new q(uu),EV=10;function _6(t){return t==null?"null":(_i(t)!==32&&ke.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function T6(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(i=>{r[_6(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return _6(e)}).join("&")}function SV(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const r=e.split("|").map(n=>n==="null"?null:n);return r.length===1?r[0]:r})}function $a(t){if(typeof t=="string"){if(t=t.toLowerCase(),_i(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+T6(t);if(Ej.isForkEvent(t))throw ke.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+T6(t.topics||[])}throw new Error("invalid event - "+t)}function Ac(){return new Date().getTime()}function P6(t){return new Promise(e=>{setTimeout(e,t)})}const kV=["block","network","pending","poll"];let AV=class{constructor(e,r,n){te(this,"tag",e),te(this,"listener",r),te(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const r=e[1],n=SV(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||kV.indexOf(this.tag)>=0}};const _V={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Tv(t){return Ve(H.from(t).toHexString(),32)}function I6(t){return Fl.encode(Ue([t,Vt(ss(ss(t)),0,4)]))}const U7=new RegExp("^(ipfs)://(.*)$","i"),R6=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),U7,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Td(t,e){try{return fs(qf(t,e))}catch{}return null}function qf(t,e){if(t==="0x")return null;const r=H.from(Vt(t,e,e+32)).toNumber(),n=H.from(Vt(t,r,r+32)).toNumber();return Vt(t,r+32,r+32+n)}function Pv(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):ke.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function M6(t){const e=X(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function TV(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function V7(t){const e=[];let r=0;for(let n=0;nH.from(e).eq(1)).catch(e=>{if(e.code===q.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return me(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Ur([e,ef(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=Ur(["0x9061b923",V7([VE(this.name),n.data])]));try{let s=yield this.provider.call(n);return X(s).length%32===4&&ke.throwError("resolver threw error",q.errors.CALL_EXCEPTION,{transaction:n,data:s}),i&&(s=qf(s,0)),s}catch(s){if(s.code===q.errors.CALL_EXCEPTION)return null;throw s}})}_fetchBytes(e,r){return me(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?qf(n,0):null})}_getAddress(e,r){const n=_V[String(e)];if(n==null&&ke.throwError(`unsupported coin type: ${e}`,q.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=X(r);if(n.p2pkh!=null){const s=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(s){const o=parseInt(s[1],16);if(s[2].length===o*2&&o>=1&&o<=75)return I6(Ue([[n.p2pkh],"0x"+s[2]]))}}if(n.p2sh!=null){const s=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(s){const o=parseInt(s[1],16);if(s[2].length===o*2&&o>=1&&o<=75)return I6(Ue([[n.p2sh],"0x"+s[2]]))}}if(n.prefix!=null){const s=i[1];let o=i[0];if(o===0?s!==20&&s!==32&&(o=-1):o=-1,o>=0&&i.length===2+s&&s>=1&&s<=75){const a=A6.toWords(i.slice(2));return a.unshift(o),A6.encode(n.prefix,a)}}return null}getAddress(e){return me(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===T0?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===q.errors.CALL_EXCEPTION)return null;throw i}const r=yield this._fetchBytes("0xf1cb7e06",Tv(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&ke.throwError("invalid or unsupported coin data",q.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return me(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;no[l])}return ke.throwError("invalid or unsupported content hash data",q.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return me(this,void 0,void 0,function*(){let r=He(e);r=Ue([Tv(64),Tv(r.length),r]),r.length%32!==0&&(r=Ue([r,Ve("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",Q(r));return n==null||n==="0x"?null:fs(n)})}}let Iv=null,PV=1;class ox extends po{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),te(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=Qn(new.target,"getNetwork")(e);r?(te(this,"_network",r),this.emit("network",r,null)):ke.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return me(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||ke.throwError("no network detected",q.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:te(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return qo(()=>this._ready().then(e=>e,e=>{if(!(e.code===q.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Iv==null&&(Iv=new fe),Iv}static getNetwork(e){return cV(e??"homestead")}ccipReadFetch(e,r,n){return me(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const i=e.to.toLowerCase(),s=r.toLowerCase(),o=[];for(let a=0;a=0?null:JSON.stringify({data:s,sender:i}),u=yield fu({url:c,errorPassThrough:!0},f,(y,m)=>(y.status=m.statusCode,y));if(u.data)return u.data;const h=u.message||"unknown error";if(u.status>=400&&u.status<500)return ke.throwError(`response not found during CCIP fetch: ${h}`,q.errors.SERVER_ERROR,{url:l,errorMessage:h});o.push(h)}return ke.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,q.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return me(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const s=yield i;if(Ac()-s.respTime<=e)return s.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=Ac(),n=Ge({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:s})=>{if(s)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),s;const o=Ac();return i=H.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return me(this,void 0,void 0,function*(){const e=PV++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)ke.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",ke.makeError("network block skew detected",q.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;const s=this._emitted[i];s!=="pending"&&n-s>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{const s=i.hash;let o=this.getTransactionReceipt(s).then(a=>(!a||a.blockNumber==null||(this._emitted["t:"+s]=a.blockNumber,this.emit(s,a)),null)).catch(a=>{this.emit("error",a)});r.push(o);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);const s=i.filter;s.fromBlock=i._lastBlockNumber+1,s.toBlock=n;const o=s.toBlock-this._maxFilterBlockRange;o>s.fromBlock&&(s.fromBlock=o),s.fromBlock<0&&(s.fromBlock=0);const a=this.getLogs(s).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(c=>{c.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=c.blockNumber),this._emitted["b:"+c.blockHash]=c.blockNumber,this._emitted["t:"+c.transactionHash]=c.blockNumber,this.emit(s,c)})}).catch(l=>{this.emit("error",l),i._inflight=!1});r.push(a)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return me(this,void 0,void 0,function*(){return ke.throwError("provider does not support network detection",q.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return me(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,e),yield P6(0),this._network;const n=ke.makeError("underlying network changed",q.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=Ac();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return me(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return me(this,void 0,void 0,function*(){const s=yield this.getTransactionReceipt(e);return(s?s.confirmations:0)>=r?s:new Promise((o,a)=>{const l=[];let c=!1;const f=function(){return c?!0:(c=!0,l.forEach(h=>{h()}),!1)},u=h=>{h.confirmations{this.removeListener(e,u)}),i){let h=i.startBlock,y=null;const m=p=>me(this,void 0,void 0,function*(){c||(yield P6(1e3),this.getTransactionCount(i.from).then(k=>me(this,void 0,void 0,function*(){if(!c){if(k<=i.nonce)h=p;else{{const w=yield this.getTransaction(e);if(w&&w.blockNumber!=null)return}for(y==null&&(y=h-3,y{c||this.once("block",m)}))});if(c)return;this.once("block",m),l.push(()=>{this.removeListener("block",m)})}if(typeof n=="number"&&n>0){const h=setTimeout(()=>{f()||a(ke.makeError("timeout exceeded",q.errors.TIMEOUT,{timeout:n}))},n);h.unref&&h.unref(),l.push(()=>{clearTimeout(h)})}})})}getBlockNumber(){return me(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return me(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return H.from(e)}catch(r){return ke.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return me(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Ge({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return H.from(i)}catch(s){return ke.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:s})}})}getTransactionCount(e,r){return me(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Ge({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return H.from(i).toNumber()}catch(s){return ke.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:s})}})}getCode(e,r){return me(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Ge({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return Q(i)}catch(s){return ke.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:s})}})}getStorageAt(e,r,n){return me(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield Ge({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>ti(o))}),s=yield this.perform("getStorageAt",i);try{return Q(s)}catch(o){return ke.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:s,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&_i(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&ke.throwError("Transaction hash mismatch from Provider.sendTransaction.",q.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(s,o)=>me(this,void 0,void 0,function*(){s==null&&(s=1),o==null&&(o=0);let a;s!==0&&n!=null&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const l=yield this._waitForTransaction(e.hash,s,o,a);return l==null&&s===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&ke.throwError("transaction failed",q.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return me(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(s=>Q(s)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const s=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,s,i)}catch(s){throw s.transaction=n,s.transactionHash=n.hash,s}})}_getTransactionRequest(e){return me(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?this._getAddress(s):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?H.from(s):null))}),["type"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?Q(s):null))}),this.formatter.transactionRequest(yield Ge(n))})}_getFilter(e){return me(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ge(r))})}_call(e,r,n){return me(this,void 0,void 0,function*(){n>=EV&&ke.throwError("CCIP read exceeded maximum redirections",q.errors.SERVER_ERROR,{redirects:n,transaction:e});const i=e.to,s=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&i!=null&&s.substring(0,10)==="0x556f1830"&&_i(s)%32===4)try{const o=Vt(s,4),a=Vt(o,0,32);H.from(a).eq(i)||ke.throwError("CCIP Read sender did not match",q.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:s});const l=[],c=H.from(Vt(o,32,64)).toNumber(),f=H.from(Vt(o,c,c+32)).toNumber(),u=Vt(o,c+32);for(let w=0;wme(this,void 0,void 0,function*(){const s=yield this.perform("getBlock",i);if(s==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let o=null;for(let l=0;lthis._wrapTransaction(l)),a}return this.formatter.block(s)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return me(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return qo(()=>me(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return me(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return qo(()=>me(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return i}),{oncePoll:this})})}getLogs(e){return me(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Ge({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),fe.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return me(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return me(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&ke.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return me(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const i=new mp(this,n,e);return r!==e&&!(yield i.supportsWildcard())?null:i}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return me(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||ke.throwError("network does not support ENS",q.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+ef(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return me(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(Pe(e))throw n}typeof e!="string"&&ke.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return me(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const i=Td(yield this.call({to:n,data:"0x691f3431"+ef(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return me(this,void 0,void 0,function*(){let r=null;if(Pe(e)){const s=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(s,"getAvatar");if(!o)return null;r=new mp(this,o,s);try{const a=yield r.getAvatar();if(a)return a.url}catch(a){if(a.code!==q.errors.CALL_EXCEPTION)throw a}try{const a=Td(yield this.call({to:o,data:"0x691f3431"+ef(s).substring(2)}),0);r=yield this.getResolver(a)}catch(a){if(a.code!==q.errors.CALL_EXCEPTION)throw a;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return ke.throwError(e+" not implemented",q.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const i=new AV($a(e),r,n);return this._events.push(i),this._startEvent(i),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let n=!1,i=[],s=$a(e);return this._events=this._events.filter(o=>o.tag!==s?!0:(setTimeout(()=>{o.listener.apply(this,r)},0),n=!0,o.once?(i.push(o),!1):!0)),i.forEach(o=>{this._stopEvent(o)}),n}listenerCount(e){if(!e)return this._events.length;let r=$a(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=$a(e);return this._events.filter(n=>n.tag===r).map(n=>n.listener)}off(e,r){if(r==null)return this.removeAllListeners(e);const n=[];let i=!1,s=$a(e);return this._events=this._events.filter(o=>o.tag!==s||o.listener!=r||i?!0:(i=!0,n.push(o),!1)),n.forEach(o=>{this._stopEvent(o)}),this}removeAllListeners(e){let r=[];if(e==null)r=this._events,this._events=[];else{const n=$a(e);this._events=this._events.filter(i=>i.tag!==n?!0:(r.push(i),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var Bi=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Xt=new q(uu),IV=["call","estimateGas"];function rf(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=Pe(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if(typeof t=="object"){for(const r in t){const n=rf(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return rf(JSON.parse(t),e)}catch{}return null}function H7(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const s=rf(e,!0);if(s)return s.data;Xt.throwError("missing revert data in call exception; Transaction reverted without a reason string",q.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let s=rf(e.body,!1);s==null&&(s=rf(e,!1)),s&&Xt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",q.errors.UNPREDICTABLE_GAS_LIMIT,{reason:s.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===q.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Xt.throwError("insufficient funds for intrinsic transaction cost",q.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&Xt.throwError("nonce has already been used",q.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Xt.throwError("replacement fee too low",q.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&Xt.throwError("legacy pre-eip-155 transactions not supported",q.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),IV.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Xt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",q.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function N6(t){return new Promise(function(e){setTimeout(e,t)})}function RV(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function _c(t){return t&&t.toLowerCase()}const xp={};class W7 extends io{constructor(e,r,n){if(super(),e!==xp)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");te(this,"provider",r),n==null&&(n=0),typeof n=="string"?(te(this,"_address",this.provider.formatter.address(n)),te(this,"_index",null)):typeof n=="number"?(te(this,"_index",n),te(this,"_address",null)):Xt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Xt.throwError("cannot alter JSON-RPC Signer connection",q.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new MV(xp,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Xt.throwError("unknown account #"+this._index,q.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=er(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=er(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Bi(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&Xt.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),Ge({tx:Ge(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Xt.throwArgumentError("from address mismatch","transaction",e):n.from=i;const s=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[s]).then(o=>o,o=>(typeof o.message=="string"&&o.message.match(/user denied/i)&&Xt.throwError("user rejected transaction",q.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),H7("sendTransaction",o,s)))})}signTransaction(e){return Xt.throwError("signing transactions is unsupported",q.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Bi(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield qo(()=>Bi(this,void 0,void 0,function*(){const i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,r)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return Bi(this,void 0,void 0,function*(){const r=typeof e=="string"?He(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[Q(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Xt.throwError("user rejected signing",q.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return Bi(this,void 0,void 0,function*(){const r=typeof e=="string"?He(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),Q(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Xt.throwError("user rejected signing",q.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return Bi(this,void 0,void 0,function*(){const i=yield Qt.resolveNames(e,r,n,o=>this.provider.resolveName(o)),s=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[s.toLowerCase(),JSON.stringify(Qt.getPayload(i.domain,r,i.value))])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&Xt.throwError("user rejected signing",q.errors.ACTION_REJECTED,{action:"_signTypedData",from:s,messageData:{domain:i.domain,types:r,value:i.value}}),o}})}unlock(e){return Bi(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class MV extends W7{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(r,n)}))}}const NV={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let Ta=class extends ox{constructor(e,r){let n=r;n==null&&(n=new Promise((i,s)=>{setTimeout(()=>{this.detectNetwork().then(o=>{i(o)},o=>{s(o)})},0)})),super(n),e||(e=Qn(this.constructor,"defaultUrl")()),typeof e=="string"?te(this,"connection",Object.freeze({url:e})):te(this,"connection",Object.freeze(er(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Bi(this,void 0,void 0,function*(){yield N6(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const r=Qn(this.constructor,"getNetwork");try{return r(H.from(e).toNumber())}catch(n){return Xt.throwError("could not detect network",q.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Xt.throwError("could not detect network",q.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new W7(xp,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:Ti(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const s=fu(this.connection,JSON.stringify(n),RV).then(o=>(this.emit("debug",{action:"response",request:n,response:o,provider:this}),o),o=>{throw this.emit("debug",{action:"response",error:o,request:n,provider:this}),o});return i&&(this._cache[e]=s,setTimeout(()=>{this._cache[e]=null},0)),s}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[_c(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[_c(r.address),r.blockTag]];case"getCode":return["eth_getCode",[_c(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[_c(r.address),Ve(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[Qn(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[Qn(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=_c(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return Bi(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=r.transaction;if(i&&i.type!=null&&H.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const s=yield this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(r=er(r),r.transaction=er(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&Xt.throwError(e+" not implemented",q.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return H7(e,i,r)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(s){if(e._pendingFilter!=r)return null;let o=Promise.resolve();return s.forEach(function(a){e._emitted["t:"+a.toLowerCase()]="pending",o=o.then(function(){return e.getTransaction(a).then(function(l){return e.emit("pending",l),null})})}),o.then(function(){return N6(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(s=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=er(NV);if(r)for(const s in r)r[s]&&(n[s]=!0);Dm(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(s){if(e[s]==null)return;const o=ti(H.from(e[s]));s==="gasLimit"&&(s="gas"),i[s]=o}),["from","to","data"].forEach(function(s){e[s]!=null&&(i[s]=Q(e[s]))}),e.accessList&&(i.accessList=Aa(e.accessList)),i}};var OV=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const $V=new q(uu);class L0 extends Ta{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return OV(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||$V.throwError("no network detected",q.errors.UNKNOWN_ERROR,{}),this._network==null&&(te(this,"_network",r),this.emit("network",r,null))),r})}}const O6=new q(uu);let DV=1;function $6(t,e){const r="Web3LegacyFetcher";return function(n,i){const s={method:n,params:i,id:DV++,jsonrpc:"2.0"};return new Promise((o,a)=>{this.emit("debug",{action:"request",fetcher:r,request:Ti(s),provider:this}),e(s,(l,c)=>{if(l)return this.emit("debug",{action:"response",fetcher:r,error:l,request:s,provider:this}),a(l);if(this.emit("debug",{action:"response",fetcher:r,request:s,response:c,provider:this}),c.error){const f=new Error(c.error.message);return f.code=c.error.code,f.data=c.error.data,a(f)}o(c.result)})})}}function LV(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:Ti(n),provider:this}),t.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}class BV extends Ta{constructor(e,r){e==null&&O6.throwArgumentError("missing provider","provider",e);let n=null,i=null,s=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),s=e,e.request?(n===""&&(n="eip-1193:"),i=LV(e)):e.sendAsync?i=$6(e,e.sendAsync.bind(e)):e.send?i=$6(e,e.send.bind(e)):O6.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),te(this,"jsonRpcFetchFunc",i),te(this,"provider",s)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}const FV="solidity/5.7.0",jV=new RegExp("^bytes([0-9]+)$"),zV=new RegExp("^(u?int)([0-9]*)$"),UV=new RegExp("^(.*)\\[([0-9]*)\\]$"),VV="0000000000000000000000000000000000000000000000000000000000000000",Ua=new q(FV);function q7(t,e,r){switch(t){case"address":return r?Qc(e,32):X(e);case"string":return He(e);case"bytes":return X(e);case"bool":return e=e?"0x01":"0x00",r?Qc(e,32):X(e)}let n=t.match(zV);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Ua.throwArgumentError("invalid number type","type",t),r&&(i=256),e=H.from(e).toTwos(i),Qc(e,i/8)}if(n=t.match(jV),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Ua.throwArgumentError("invalid bytes type","type",t),X(e).byteLength!==i&&Ua.throwArgumentError(`invalid value for ${t}`,"value",e),r?X((e+VV).substring(0,66)):e}if(n=t.match(UV),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Ua.throwArgumentError(`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(q7(i,a,!0))}),Ue(o)}return Ua.throwArgumentError("invalid type","type",t)}function Se(t,e){t.length!=e.length&&Ua.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(q7(n,e[i]))}),Q(Ue(r))}function Gs(t,e){return pe(Se(t,e))}function HV(t,e){return ss(Se(t,e))}const WV="units/5.7.0",G7=new q(WV),K7=["wei","kwei","mwei","gwei","szabo","finney","ether"];function qV(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&G7.throwArgumentError("invalid value","value",t);let r=e[0],n="";for(r.substring(0,1)==="-"&&(n="-",r=r.substring(1));r.substring(0,1)==="0";)r=r.substring(1);r===""&&(r="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);const s=[];for(;r.length;)if(r.length<=3){s.unshift(r);break}else{const o=r.length-3;s.unshift(r.substring(o)),r=r.substring(0,o)}return n+s.join(",")+i}function J7(t,e){if(typeof e=="string"){const r=K7.indexOf(e);r!==-1&&(e=3*r)}return Cd(t,e??18)}function B0(t,e){if(typeof t!="string"&&G7.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=K7.indexOf(e);r!==-1&&(e=3*r)}return ai(t,e??18)}function GV(t){return J7(t,18)}function bp(t){return B0(t,18)}const KV=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:Hm,ConstructorFragment:Jn,ErrorFragment:Ui,EventFragment:vi,FormatTypes:Ne,Fragment:yi,FunctionFragment:Yn,HDNode:fn,Indexed:R0,Interface:tr,LogDescription:GE,Logger:q,ParamType:ar,RLP:tF,SigningKey:Xo,get SupportedAlgorithm(){return jl},TransactionDescription:KE,get TransactionTypes(){return hp},get UnicodeNormalizationForm(){return Pi},Utf8ErrorFuncs:$E,get Utf8ErrorReason(){return Qr},_TypedDataEncoder:Qt,_fetchData:F7,_toEscapedUtf8String:bF,accessListify:Aa,arrayify:X,base58:Fl,base64:FF,checkProperties:Dm,checkResultErrors:CE,commify:qV,computeAddress:qs,computeHmac:Hf,computePublicKey:Xm,concat:Ue,deepCopy:Ti,defaultAbiCoder:qr,defaultPath:zl,defineReadOnly:te,dnsEncode:VE,entropyToMnemonic:Wh,fetchJson:fu,formatBytes32String:wF,formatEther:GV,formatUnits:J7,getAccountPath:LU,getAddress:we,getContractAddress:Fm,getCreate2Address:oF,getIcapAddress:sF,getJsonWalletAddress:WU,getStatic:Qn,hashMessage:Fh,hexConcat:Ur,hexDataLength:_i,hexDataSlice:Vt,hexStripZeros:hE,hexValue:ti,hexZeroPad:Ve,hexlify:Q,id:Os,isAddress:_E,isBytes:ls,isBytesLike:rs,isHexString:Pe,isValidMnemonic:DU,isValidName:cj,joinSignature:sp,keccak256:pe,mnemonicToEntropy:Hh,mnemonicToSeed:I7,namehash:ef,nameprep:$F,parseBytes32String:CF,parseEther:bp,parseTransaction:E7,parseUnits:B0,poll:qo,randomBytes:pi,recoverAddress:va,recoverPublicKey:m7,resolveProperties:Ge,ripemd160:_7,serializeTransaction:vp,sha256:ss,sha512:_U,shallowCopy:er,shuffled:jU,solidityKeccak256:Gs,solidityPack:Se,soliditySha256:HV,splitSignature:Ea,stripZeros:Ci,toUtf8Bytes:He,toUtf8CodePoints:P0,toUtf8String:fs,verifyMessage:B7,verifyTypedData:oV,zeroPad:Qc},Symbol.toStringTag,{value:"Module"})),JV=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var YV=Object.freeze({__proto__:null,abi:JV});const QV=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],XV={isValidSignatureBytes32:"0x1626ba7e"};var ZV=Object.freeze({__proto__:null,abi:QV,returns:XV});const eH=[{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC1271Revert",type:"error"},{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC6492DeployFailed",type:"error"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSig",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"allowSideEffects",type:"bool"},{internalType:"bool",name:"deployAlreadyDeployed",type:"bool"}],name:"isValidSigImpl",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffects",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffectsNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];var tH=Object.freeze({__proto__:null,abi:eH});const rH=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var nH=Object.freeze({__proto__:null,abi:rH});const iH=[{type:"function",name:"nonce",constant:!0,inputs:[],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"readNonce",constant:!0,inputs:[{type:"uint256"}],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"updateImplementation",constant:!1,inputs:[{type:"address"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"selfExecute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"execute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"},{type:"uint256"},{type:"bytes"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"createContract",inputs:[{type:"bytes"}],payable:!0,stateMutability:"payable"},{type:"function",name:"setExtraImageHash",constant:!1,inputs:[{type:"bytes32",name:"imageHash"},{type:"uint256",name:"expiration"}],outputs:[],payable:!1,stateMutability:"nonpayable"}];var sH=Object.freeze({__proto__:null,abi:iH});const oH=[{type:"function",name:"updateImageHash",constant:!0,inputs:[{type:"bytes32"}],outputs:[],payable:!1,stateMutability:"view"},{type:"function",name:"imageHash",constant:!0,inputs:[],outputs:[{type:"bytes32"}],payable:!1,stateMutability:"view"}];var aH=Object.freeze({__proto__:null,abi:oH});const lH=[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_mainModule",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"bytes32",name:"_imageHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"_threshold",type:"uint256"},{indexed:!1,internalType:"bytes",name:"_signers",type:"bytes"}],name:"RequiredConfig",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"address",name:"_signer",type:"address"}],name:"RequiredSigner",type:"event"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callBalanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callBlockNumber",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_i",type:"uint256"}],name:"callBlockhash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"callChainId",outputs:[{internalType:"uint256",name:"id",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCode",outputs:[{internalType:"bytes",name:"code",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeHash",outputs:[{internalType:"bytes32",name:"codeHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeSize",outputs:[{internalType:"uint256",name:"size",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callCoinbase",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callDifficulty",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLeft",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLimit",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasPrice",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callOrigin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"knownImageHashes",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"lastImageHashUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastSignerUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastWalletUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bool",name:"delegateCall",type:"bool"},{internalType:"bool",name:"revertOnError",type:"bool"},{internalType:"uint256",name:"gasLimit",type:"uint256"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct IModuleCalls.Transaction[]",name:"_txs",type:"tuple[]"}],name:"multiCall",outputs:[{internalType:"bool[]",name:"_successes",type:"bool[]"},{internalType:"bytes[]",name:"_results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_threshold",type:"uint256"},{components:[{internalType:"uint256",name:"weight",type:"uint256"},{internalType:"address",name:"signer",type:"address"}],internalType:"struct RequireUtils.Member[]",name:"_members",type:"tuple[]"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"uint256",name:"_sizeMembers",type:"uint256"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishInitialSigners",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"}],name:"requireMinNonce",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_expiration",type:"uint256"}],name:"requireNonExpired",outputs:[],stateMutability:"view",type:"function"}];var cH=Object.freeze({__proto__:null,abi:lH});const fH=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var uH=Object.freeze({__proto__:null,abi:fH});const pr={erc6492:tH,erc5719:YV,erc1271:ZV,factory:nH,mainModule:sH,mainModuleUpgradable:aH,sequenceUtils:cH,requireFreshSigner:uH},dH=Object.freeze(Object.defineProperty({__proto__:null,walletContracts:pr},Symbol.toStringTag,{value:"Module"}));function F0(){return F0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),de({},n)).then(i=>he(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),de({},n)).then(i=>he(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),de({},n)).then(i=>he(i).then(s=>({status:s.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),de({},n)).then(i=>he(i).then(s=>({data:s.data}))),this.getAuthToken=(n,i)=>this.fetch(this.url("GetAuthToken"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.sendPasswordlessLink=(n,i)=>this.fetch(this.url("SendPasswordlessLink"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.friendList=(n,i)=>this.fetch(this.url("FriendList"),de(n,i)).then(s=>he(s).then(o=>({page:o.page,friends:o.friends}))),this.getFriendByAddress=(n,i)=>this.fetch(this.url("GetFriendByAddress"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,friend:o.friend}))),this.searchFriends=(n,i)=>this.fetch(this.url("SearchFriends"),de(n,i)).then(s=>he(s).then(o=>({friends:o.friends}))),this.addFriend=(n,i)=>this.fetch(this.url("AddFriend"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,friend:o.friend}))),this.updateFriendNickname=(n,i)=>this.fetch(this.url("UpdateFriendNickname"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,friend:o.friend}))),this.removeFriend=(n,i)=>this.fetch(this.url("RemoveFriend"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.contractCall=(n,i)=>this.fetch(this.url("ContractCall"),de(n,i)).then(s=>he(s).then(o=>({returns:o.returns}))),this.decodeContractCall=(n,i)=>this.fetch(this.url("DecodeContractCall"),de(n,i)).then(s=>he(s).then(o=>({call:o.call}))),this.lookupContractCallSelectors=(n,i)=>this.fetch(this.url("LookupContractCallSelectors"),de(n,i)).then(s=>he(s).then(o=>({signatures:o.signatures}))),this.userStorageFetch=(n,i)=>this.fetch(this.url("UserStorageFetch"),de(n,i)).then(s=>he(s).then(o=>({object:o.object}))),this.userStorageSave=(n,i)=>this.fetch(this.url("UserStorageSave"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.userStorageDelete=(n,i)=>this.fetch(this.url("UserStorageDelete"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.userStorageFetchAll=(n,i)=>this.fetch(this.url("UserStorageFetchAll"),de(n,i)).then(s=>he(s).then(o=>({objects:o.objects}))),this.getMoonpayLink=(n,i)=>this.fetch(this.url("GetMoonpayLink"),de(n,i)).then(s=>he(s).then(o=>({signedUrl:o.signedUrl}))),this.getSardineClientToken=n=>this.fetch(this.url("GetSardineClientToken"),de({},n)).then(i=>he(i).then(s=>({token:s.token}))),this.isUsingGoogleMail=(n,i)=>this.fetch(this.url("IsUsingGoogleMail"),de(n,i)).then(s=>he(s).then(o=>({yes:o.yes}))),this.resolveENSAddress=(n,i)=>this.fetch(this.url("ResolveENSAddress"),de(n,i)).then(s=>he(s).then(o=>({address:o.address,ok:o.ok}))),this.isValidSignature=(n,i)=>this.fetch(this.url("IsValidSignature"),de(n,i)).then(s=>he(s).then(o=>({isValid:o.isValid}))),this.isValidMessageSignature=(n,i)=>this.fetch(this.url("IsValidMessageSignature"),de(n,i)).then(s=>he(s).then(o=>({isValid:o.isValid}))),this.isValidTypedDataSignature=(n,i)=>this.fetch(this.url("IsValidTypedDataSignature"),de(n,i)).then(s=>he(s).then(o=>({isValid:o.isValid}))),this.isValidETHAuthProof=(n,i)=>this.fetch(this.url("IsValidETHAuthProof"),de(n,i)).then(s=>he(s).then(o=>({isValid:o.isValid}))),this.getCoinPrices=(n,i)=>this.fetch(this.url("GetCoinPrices"),de(n,i)).then(s=>he(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getCollectiblePrices=(n,i)=>this.fetch(this.url("GetCollectiblePrices"),de(n,i)).then(s=>he(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getExchangeRate=(n,i)=>this.fetch(this.url("GetExchangeRate"),de(n,i)).then(s=>he(s).then(o=>({exchangeRate:o.exchangeRate}))),this.memoryStore=(n,i)=>this.fetch(this.url("MemoryStore"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.memoryLoad=(n,i)=>this.fetch(this.url("MemoryLoad"),de(n,i)).then(s=>he(s).then(o=>({value:o.value}))),this.listPayCardsOnFile=n=>this.fetch(this.url("ListPayCardsOnFile"),de({},n)).then(i=>he(i).then(s=>({payCards:s.payCards}))),this.savePayCard=(n,i)=>this.fetch(this.url("SavePayCard"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok,payCard:o.payCard}))),this.updatePayCardCVC=(n,i)=>this.fetch(this.url("UpdatePayCardCVC"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.deletePayCard=(n,i)=>this.fetch(this.url("DeletePayCard"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.smartRampQuote=(n,i)=>this.fetch(this.url("SmartRampQuote"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,quoteDetails:o.quoteDetails}))),this.smartRampPurchase=(n,i)=>this.fetch(this.url("SmartRampPurchase"),de(n,i)).then(s=>he(s).then(o=>({processing:o.processing,receipt:o.receipt}))),this.smartRampWaitOrderConfirmation=(n,i)=>this.fetch(this.url("SmartRampWaitOrderConfirmation"),de(n,i)).then(s=>he(s).then(o=>({done:o.done,receipt:o.receipt}))),this.smartRampGetOrder=(n,i)=>this.fetch(this.url("SmartRampGetOrder"),de(n,i)).then(s=>he(s).then(o=>({order:o.order}))),this.smartRampCheckCardAuthorization=(n,i)=>this.fetch(this.url("SmartRampCheckCardAuthorization"),de(n,i)).then(s=>he(s).then(o=>({cardAuth:o.cardAuth}))),this.smartRampOrdersList=(n,i)=>this.fetch(this.url("SmartRampOrdersList"),de(n,i)).then(s=>he(s).then(o=>({page:o.page,orders:o.orders}))),this.smartRampGetOrderTxnHash=(n,i)=>this.fetch(this.url("SmartRampGetOrderTxnHash"),de(n,i)).then(s=>he(s).then(o=>({txnHash:o.txnHash,txnSuccessful:o.txnSuccessful}))),this.smartRampSubmitCardAuthorization=(n,i)=>this.fetch(this.url("SmartRampSubmitCardAuthorization"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.adminSmartRampGetOrder=(n,i)=>this.fetch(this.url("AdminSmartRampGetOrder"),de(n,i)).then(s=>he(s).then(o=>({order:o.order}))),this.adminSmartRampListCompletedOrders=(n,i)=>this.fetch(this.url("AdminSmartRampListCompletedOrders"),de(n,i)).then(s=>he(s).then(o=>({orders:o.orders}))),this.adminSmartRampListPendingOrders=(n,i)=>this.fetch(this.url("AdminSmartRampListPendingOrders"),de(n,i)).then(s=>he(s).then(o=>({pendingOrders:o.pendingOrders}))),this.getInviteInfo=n=>this.fetch(this.url("GetInviteInfo"),de({},n)).then(i=>he(i).then(s=>({inviteInfo:s.inviteInfo}))),this.isValidAccessCode=(n,i)=>this.fetch(this.url("IsValidAccessCode"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.internalClaimAccessCode=(n,i)=>this.fetch(this.url("InternalClaimAccessCode"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.walletRecover=(n,i)=>this.fetch(this.url("WalletRecover"),de(n,i)).then(s=>he(s).then(o=>({encryptedWallet:o.encryptedWallet}))),this.blockNumberAtTime=(n,i)=>this.fetch(this.url("BlockNumberAtTime"),de(n,i)).then(s=>he(s).then(o=>({blocks:o.blocks}))),this.paperSessionSecret=(n,i)=>this.fetch(this.url("PaperSessionSecret"),de(n,i)).then(s=>he(s).then(o=>({secret:o.secret}))),this.paperSessionSecret2=(n,i)=>this.fetch(this.url("PaperSessionSecret2"),de(n,i)).then(s=>he(s).then(o=>({secret:o.secret}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const de=(t={},e={})=>({method:"POST",headers:F0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),he=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),D6=typeof global=="object"?global.fetch:window.fetch;class Pd extends Y7{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,D6),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(i,s)=>{const o={},a=this.jwtAuth,l=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),l&&l.length>0&&(o["X-Access-Key"]=l),s.headers=F0({},s.headers,o),D6(i,s)},this.fetch=this._fetch}}const xH=Object.freeze(Object.defineProperty({__proto__:null,API:Y7,SequenceAPIClient:Pd,SmartRampOrderStatus:pH,SmartRampTxnStatus:gH,SortOrder:mH,WebRPCSchemaHash:yH,WebRPCSchemaVersion:vH,WebRPCVersion:hH},Symbol.toStringTag,{value:"Module"})),Q7="3.7.5",bH=Q7,wH=typeof atob=="function",CH=typeof btoa=="function",ac=typeof Buffer=="function",L6=typeof TextDecoder=="function"?new TextDecoder:void 0,B6=typeof TextEncoder=="function"?new TextEncoder:void 0,EH="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Oc=Array.prototype.slice.call(EH),rd=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(Oc),SH=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,br=String.fromCharCode.bind(String),F6=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),X7=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),Z7=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),e9=t=>{let e,r,n,i,s="";const o=t.length%3;for(let a=0;a255||(n=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|i,s+=Oc[e>>18&63]+Oc[e>>12&63]+Oc[e>>6&63]+Oc[e&63]}return o?s.slice(0,o-3)+"===".substring(o):s},ax=CH?t=>btoa(t):ac?t=>Buffer.from(t,"binary").toString("base64"):e9,wp=ac?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,i=t.length;ne?X7(wp(t)):wp(t),kH=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?br(192|e>>>6)+br(128|e&63):br(224|e>>>12&15)+br(128|e>>>6&63)+br(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return br(240|e>>>18&7)+br(128|e>>>12&63)+br(128|e>>>6&63)+br(128|e&63)}},AH=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,t9=t=>t.replace(AH,kH),j6=ac?t=>Buffer.from(t,"utf8").toString("base64"):B6?t=>wp(B6.encode(t)):t=>ax(t9(t)),wl=(t,e=!1)=>e?X7(j6(t)):j6(t),z6=t=>wl(t,!0),_H=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,TH=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),r=e-65536;return br((r>>>10)+55296)+br((r&1023)+56320);case 3:return br((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return br((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},r9=t=>t.replace(_H,TH),n9=t=>{if(t=t.replace(/\s+/g,""),!SH.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",n,i;for(let s=0;s>16&255):i===64?br(e>>16&255,e>>8&255):br(e>>16&255,e>>8&255,e&255);return r},lx=wH?t=>atob(Z7(t)):ac?t=>Buffer.from(t,"base64").toString("binary"):n9,i9=ac?t=>F6(Buffer.from(t,"base64")):t=>F6(lx(t).split("").map(e=>e.charCodeAt(0))),s9=t=>i9(o9(t)),PH=ac?t=>Buffer.from(t,"base64").toString("utf8"):L6?t=>L6.decode(i9(t)):t=>r9(lx(t)),o9=t=>Z7(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),Cp=t=>PH(o9(t)),IH=t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},a9=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),l9=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,a9(r));t("fromBase64",function(){return Cp(this)}),t("toBase64",function(e){return wl(this,e)}),t("toBase64URI",function(){return wl(this,!0)}),t("toBase64URL",function(){return wl(this,!0)}),t("toUint8Array",function(){return s9(this)})},c9=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,a9(r));t("toBase64",function(e){return Id(this,e)}),t("toBase64URI",function(){return Id(this,!0)}),t("toBase64URL",function(){return Id(this,!0)})},RH=()=>{l9(),c9()},pa={version:Q7,VERSION:bH,atob:lx,atobPolyfill:n9,btoa:ax,btoaPolyfill:e9,fromBase64:Cp,toBase64:wl,encode:wl,encodeURI:z6,encodeURL:z6,utob:t9,btou:r9,decode:Cp,isValid:IH,fromUint8Array:Id,toUint8Array:s9,extendString:l9,extendUint8Array:c9,extendBuiltins:RH};var Ep=function(){return Ep=Object.assign||function(e){for(var r,n=1,i=arguments.length;n0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]0&&(i.types.Claims.push({name:"app",type:"string"}),i.message.app=this.claims.app),this.claims.iat&&this.claims.iat>0&&(i.types.Claims.push({name:"iat",type:"int64"}),i.message.iat=this.claims.iat),this.claims.exp&&this.claims.exp>0&&(i.types.Claims.push({name:"exp",type:"int64"}),i.message.exp=this.claims.exp),this.claims.n&&this.claims.n>0&&(i.types.Claims.push({name:"n",type:"uint64"}),i.message.n=this.claims.n),this.claims.typ&&this.claims.typ.length>0&&(i.types.Claims.push({name:"typ",type:"string"}),i.message.typ=this.claims.typ),this.claims.ogn&&this.claims.ogn.length>0&&(i.types.Claims.push({name:"ogn",type:"string"}),i.message.ogn=this.claims.ogn),this.claims.v&&this.claims.v.length>0&&(i.types.Claims.push({name:"v",type:"string"}),i.message.v=this.claims.v),i},t}(),NH=function(t){if(t.app==="")return{ok:!1,err:new Error("claims: app is empty")};var e=Math.round(new Date().getTime()/1e3),r=5*60,n=60*60*24*365+r;return t.v===""?{ok:!1,err:new Error("claims: ethauth version is empty")}:t.iat&&t.iat!==0&&(t.iat>e+r||t.iate+n?{ok:!1,err:new Error("claims: token has expired")}:{ok:!0}},OH=function(t,e,r){return Fo(void 0,void 0,void 0,function(){var n,i;return jo(this,function(s){return n=r.messageDigest(),i=B7(n,r.signature),i.slice(0,2)==="0x"&&i.length===42&&i.toLowerCase()===r.address.toLowerCase()?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]})})},$H=function(t,e,r){return Fo(void 0,void 0,void 0,function(){var n,i,s,o,a;return jo(this,function(l){switch(l.label){case 0:return!t||t===void 0?[2,{isValid:!1}]:(n=r.messageDigest(),[4,t.getCode(r.address)]);case 1:if(i=l.sent(),i==="0x"||i.length<=2)throw new Error("ValidateContractAccountProof failed. unable to fetch wallet contract code");return s=["function isValidSignature(bytes32, bytes) public view returns (bytes4)"],o=new _a(r.address,s,t),[4,o.isValidSignature(n,X(r.signature))];case 2:return a=l.sent(),a===DH?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},DH="0x1626ba7e",f9="1",Sp="eth",LH={name:"ETHAuth",version:f9},j0=function(){function t(){for(var e=[],r=0;r0&&(l+="."+i.extra),[2,l]}})})},this.decodeProof=function(i,s){return s===void 0&&(s=!1),Fo(n,void 0,void 0,function(){var o,a,l,c,f,u,h,y,m,p;return jo(this,function(k){switch(k.label){case 0:if(o=i.split("."),o.length<4||o.length>5)throw new Error("ethauth: invalid proof string");if(a=o[0],l=o[1],c=o[2],f=o[3],u=o[4],a!==Sp)throw new Error("ethauth: not an ethauth proof");return h=pa.decode(c),y=JSON.parse(h),m=new cx({address:l,claims:y,signature:f,extra:u}),[4,this.validateProof(m,s)];case 1:if(p=k.sent(),!p)throw new Error("ethauth: proof is invalid");return[2,m]}})})},this.validateProof=function(i,s){return s===void 0&&(s=!1),Fo(n,void 0,void 0,function(){var o,a;return jo(this,function(l){switch(l.label){case 0:if(o=this.validateProofClaims(i),o.err)throw new Error("ethauth: proof claims are invalid ".concat(o.err));return s===!0?[3,2]:[4,this.validateProofSignature(i)];case 1:if(a=l.sent(),a!==!0)throw new Error("ethauth: proof signature is invalid");l.label=2;case 2:return[2,!0]}})})},this.validateProofSignature=function(i){return Fo(n,void 0,void 0,function(){var s,l,o,a,l;return jo(this,function(c){switch(c.label){case 0:s=[],l=0,c.label=1;case 1:if(!(lpa.encode(t,!0),fx=t=>pa.encode(JSON.stringify(t),!0),FH=t=>{if(t!=null)return pa.decode(t)},ux=t=>{if(t!=null)return JSON.parse(pa.decode(t))};function u9(t){return t!=null&&(H.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Pe(t)||typeof t=="bigint"||ls(t))}const dx=t=>X(pe(typeof t=="string"?He(t):t)),d9=(t,e,r)=>Se(["string","uint256","address","bytes32"],["",e,t,r]),kp=(t,e,r)=>pe(d9(t,e,r)),h9=()=>typeof window>"u"&&typeof process=="object",jH=()=>!h9(),v9=t=>{const e=t.split(".");if(e.length!==3)throw new Error("invalid jwt");return JSON.parse(pa.decode(e[1]))};function z0(){return z0=Object.assign?Object.assign.bind():function(t){for(var e=1;eve.configure(t),Gf=(t,e,r)=>{const n={};return r&&r.length>0&&(n.Authorization=`BEARER ${r}`),e&&e.length>0&&(n["X-Access-Key"]=e),{url:t,headers:n,skipFetchSetup:!0,fetchOptions:{mode:"cors",cache:"force-cache",credentials:"same-origin",redirect:"follow",referrer:"client"}}};let zH=class{constructor(){this.cache=void 0,this.cache=new Map}do(e,r,n,...i){e=`${e}:${pe(He(JSON.stringify(i,UH)))}`;let s=this.cache.get(e);if(s&&s.expiration&&new Date>=s.expiration&&(s=void 0,this.cache.delete(e)),!s){const o={promise:n(...i)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),s=o,this.cache.set(e,s)}return s.promise}};function UH(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function hx(t,e){return function(...r){const n=Array.prototype.slice.call(r);return new Promise(async(i,s)=>{try{n.push((o,a)=>o?s(o):i(a)),await t.apply(e,n)}catch(o){s(o)}})}}function VH(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function HH(t){const e=t.split("&"),r={};for(const n of e){const i=n.split("=");r[decodeURIComponent(i[0])]=JSON.parse(decodeURIComponent(i[1]))}return r}const vx=(t=0,e=Number.MAX_SAFE_INTEGER)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),g9=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},m9=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},x9=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},WH=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),b9=t=>{const e=z0({},t.types);return delete e.EIP712Domain,Qt.hash(t.domain,e,t.message)},du=t=>X(b9(t)),{defineReadOnly:qH,getStatic:GH,resolveProperties:KH,checkProperties:JH,shallowCopy:YH,deepCopy:QH}=KV,XH=t=>t.replace(/([^:]\/)\/+/g,"$1"),ZH=Object.freeze(Object.defineProperty({__proto__:null,Logger:y9,PromiseCache:zH,base64Decode:FH,base64DecodeObject:ux,base64Encode:BH,base64EncodeObject:fx,checkProperties:JH,configureLogger:p9,deepCopy:QH,defineReadOnly:qH,encodeMessageDigest:dx,encodeTypedDataDigest:du,encodeTypedDataHash:b9,getEthersConnectionInfo:Gf,getRandomInt:vx,getStatic:GH,isBigNumberish:u9,isBrowser:jH,isNode:h9,jwtDecodeClaims:v9,logger:ve,packMessageData:d9,promisify:hx,queryStringFromObject:VH,queryStringToObject:HH,resolveProperties:KH,sanitizeAlphanumeric:m9,sanitizeHost:x9,sanitizeNumberString:g9,shallowCopy:YH,sleep:WH,subDigestOf:kp,urlClean:XH},Symbol.toStringTag,{value:"Module"}));function Rt(){return Rt=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="number"?t:t.chainId?t.chainId:H.from(t).toNumber(),tW=t=>{if(t)return w9(t)},C9=(t,e=!1,r=!1)=>{if(!t)throw new Error("invalid network config: empty config");const n=[];if(Array.isArray(t)?n.push(...t):n.push(t),n.length===0){if(e)throw new Error("invalid network config: empty config");return!1}const i=n.map(c=>c.chainId).sort(),s=i.filter((c,f)=>i.indexOf(c)!==f);if(s.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${s}`);return!1}n.forEach(c=>c.name=c.name.toLowerCase());const o=n.map(c=>c.name).sort(),a=o.filter((c,f)=>o.indexOf(c)!==f);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let c=0;c(C9(t,!0,e),t),rW=(t,e=!0)=>{const r=t.map(i=>i.chainId).sort(),n=r.filter((i,s)=>r.indexOf(i)!==s);if(n.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${n}`);return!1}return!0},nW=(t,e)=>{if(!(!t||!e)){if(!t.chainId&&!t.name)throw new Error("failed to update network config: source config is missing chainId or name");if(t.chainId!==e.chainId&&t.name!==e.name)throw new Error("failed to update network config: one of chainId or name must match");t.rpcUrl&&(e.rpcUrl=t.rpcUrl,e.provider=void 0),t.provider&&(e.provider=t.provider),t.relayer&&(e.relayer=t.relayer)}},S9=t=>E9(k9(t)),ri=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=H.from(e).toNumber();return t.find(n=>n.chainId===r)}else return t.find(r=>r.name===e||`${r.chainId}`===e);else{if(typeof e=="number")return t.find(r=>r.chainId===e);if(e.chainId)return t.find(r=>r.chainId===e.chainId);if(H.isBigNumber(e)){const r=e.toNumber();return t.find(n=>n.chainId===r)}else return}},iW=(t,e)=>t?t.name===e||t.chainId===e:!1,sW=t=>{const e={};for(let r=0;r{if(!t)return[];const e=t.sort((n,i)=>n.chainId===i.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},Gh=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let i=e[n];return typeof i=="function"?i=i():i==null?i="":typeof i=="object"||typeof i=="symbol"?i=i.toString():i=i.valueOf(),i})):"",A9=t=>Gh("https://${network}-indexer.sequence.app",{network:t}),_9=t=>Gh("https://${network}-relayer.sequence.app",{network:t}),T9=t=>Gh("https://nodes.sequence.app/${network}",{network:t});function yx(t){return ri(Ul,t)}function P9(t){return H.isBigNumber(t)?t:u9(t)?H.from(t):H.from(t.chainId)}const Yt=t=>{const e=T9(t);return{rpcUrl:e,relayer:{url:_9(t),provider:{url:e}},indexerUrl:A9(t)}},Ul=S9([Rt({},It[ee.POLYGON],Yt("polygon"),{isDefaultChain:!0,isAuthChain:!0}),Rt({},It[ee.MAINNET],Yt("mainnet")),Rt({},It[ee.BSC],Yt("bsc")),Rt({},It[ee.AVALANCHE],Yt("avalanche")),Rt({},It[ee.ARBITRUM],Yt("arbitrum")),Rt({},It[ee.ARBITRUM_NOVA],Yt("arbitrum-nova")),Rt({},It[ee.OPTIMISM],Yt("optimism")),Rt({},It[ee.OPTIMISM_SEPOLIA],Yt("optimism-sepolia")),Rt({},It[ee.POLYGON_ZKEVM],Yt("polygon-zkevm")),Rt({},It[ee.GNOSIS],Yt("gnosis")),Rt({},It[ee.RINKEBY],Yt("rinkeby"),{disabled:!0}),Rt({},It[ee.GOERLI],Yt("goerli"),{disabled:!0}),Rt({},It[ee.SEPOLIA],Yt("sepolia")),Rt({},It[ee.POLYGON_MUMBAI],Yt("mumbai")),Rt({},It[ee.BSC_TESTNET],Yt("bsc-testnet")),Rt({},It[ee.ARBITRUM_SEPOLIA],Yt("arbitrum-sepolia")),Rt({},It[ee.BASE],Yt("base")),Rt({},It[ee.BASE_SEPOLIA],Yt("base-sepolia")),Rt({},It[ee.HOMEVERSE_TESTNET],Yt("homeverse-testnet")),Rt({},It[ee.AVALANCHE_TESTNET],Yt("avalanche-testnet")),Rt({},It[ee.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),Rt({},It[ee.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]),Vl="2.0";class px{constructor(e,r){this.sender=void 0,this.handler=void 0,this.sender=r,e&&this.setMiddleware(e)}setMiddleware(e){this.handler=I9(e,this.sender.sendAsync)}sendAsync(e,r,n){try{this.handler(e,r,n)}catch(i){r(i,void 0)}}}const I9=(t,e)=>{if(t.length===0)return e;const r=i=>i.sendAsyncMiddleware?i.sendAsyncMiddleware:i;let n;n=r(t[t.length-1])(e);for(let i=t.length-2;i>=0;i--)n=r(t[i])(n);return n};function R9(t){return t!==void 0&&t.send!==void 0&&t.constructor.defaultUrl!==void 0&&t.detectNetwork!==void 0&&t.getSigner!==void 0&&t.perform!==void 0}function M9(t){return t!==void 0&&t.sendAsync!==void 0}let oW=0;class U0{constructor(e,r){this.send=void 0,this.request=void 0,this.defaultChainId=void 0,this.sendAsync=(n,i,s)=>{this.send(n.method,n.params,s||this.defaultChainId).then(o=>{i(void 0,{jsonrpc:"2.0",id:n.id,result:o})}).catch(o=>{i(o,void 0)})},this.defaultChainId=r,R9(e)?this.send=e.send.bind(e):M9(e)?this.send=(n,i,s)=>new Promise((o,a)=>{e.sendAsync({jsonrpc:Vl,id:++oW,method:n,params:i},(l,c)=>{l?a(l):o(c?c.result:void 0)},s||this.defaultChainId)}):this.send=e,this.request=(n,i)=>this.send(n.method,n.params,i)}}class aW{constructor(e){this.provider=e,this.sendAsync=(r,n)=>{this.provider.send(r.method,r.params).then(i=>{n(void 0,{jsonrpc:"2.0",id:r.id,result:i})}).catch(i=>{n(i,void 0)})},this.send=this.sendAsync}}class lW{constructor(e){this.sendAsyncMiddleware=void 0,this.isAllowedFunc=void 0,e?this.isAllowedFunc=e:this.isAllowedFunc=r=>!0,this.sendAsyncMiddleware=Ap(this.isAllowedFunc)}setIsAllowedFunc(e){this.isAllowedFunc=e,this.sendAsyncMiddleware=Ap(this.isAllowedFunc)}}const Ap=t=>e=>(r,n,i)=>{if(!t(r))throw new Error("allowProvider middleware precondition is unmet.");e(r,n,i)};class gx{constructor(e){this.cachableJsonRpcMethods=["net_version","eth_chainId","eth_accounts","sequence_getWalletContext","sequence_getNetworks"],this.cachableJsonRpcMethodsByBlock=["eth_call","eth_getCode"],this.cache=void 0,this.cacheByBlock=void 0,this.cacheByBlockResetLock=!1,this.onUpdateCallback=void 0,this.defaultChainId=void 0,this.sendAsyncMiddleware=r=>(n,i,s)=>{if(this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method)){const o=this.cacheKey(n.method,n.params,s||this.defaultChainId),a=this.getCacheValue(o);if(a&&a!==""){i(void 0,{jsonrpc:"2.0",id:n.id,result:a});return}}r(n,(o,a,l)=>{if((this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method))&&a&&a.result&&this.shouldCacheResponse(n,a)){const c=this.cacheKey(n.method,n.params,l||this.defaultChainId);this.cachableJsonRpcMethods.includes(n.method)?this.setCacheValue(c,a.result):this.setCacheByBlockValue(c,a.result)}i(o,a)},s||this.defaultChainId)},this.cacheKey=(r,n,i)=>{let s="";return i?s=`${i}:${r}:`:s=`:${r}:`,!n||n.length===0?s+"[]":s+JSON.stringify(n)},this.getCache=()=>this.cache,this.setCache=r=>{this.cache=r,this.onUpdateCallback&&this.onUpdateCallback()},this.getCacheValue=r=>{if(this.cache[r])return this.cache[r];if(this.cacheByBlock[r])return this.cacheByBlock[r]},this.setCacheValue=(r,n)=>{this.cache[r]=n,this.onUpdateCallback&&this.onUpdateCallback(r,n)},this.setCacheByBlockValue=(r,n)=>{this.cacheByBlock[r]=n,this.cacheByBlockResetLock||(this.cacheByBlockResetLock=!0,setTimeout(()=>{this.cacheByBlockResetLock=!1,this.cacheByBlock={}},1500))},this.shouldCacheResponse=(r,n)=>!(!n||!n.result||r.method==="eth_getCode"&&n.result.length<=2),this.clearCache=()=>{this.cache={},this.cacheByBlock={}},this.cache={},this.cacheByBlock={},this.defaultChainId=e==null?void 0:e.defaultChainId,e!=null&&e.blockCache?(e==null?void 0:e.blockCache)!==!0&&(this.cachableJsonRpcMethodsByBlock=e==null?void 0:e.blockCache):this.cachableJsonRpcMethodsByBlock=[]}onUpdate(e){this.onUpdateCallback=e}}class N9{constructor(e){this.options=void 0,this.sendAsyncMiddleware=r=>(n,i,s)=>{const{id:o,method:a}=n;switch(a){case"net_version":if(this.options.chainId){i(void 0,{jsonrpc:"2.0",id:o,result:`${this.options.chainId}`});return}break;case"eth_chainId":if(this.options.chainId){i(void 0,{jsonrpc:"2.0",id:o,result:Q(this.options.chainId)});return}break;case"eth_accounts":if(this.options.accountAddress){i(void 0,{jsonrpc:"2.0",id:o,result:[we(this.options.accountAddress)]});return}break;case"sequence_getWalletContext":if(this.options.walletContext){i(void 0,{jsonrpc:"2.0",id:o,result:this.options.walletContext});return}break}r(n,i,s)},this.options=e}}const O9=t=>(e,r,n)=>{t(e,(i,s)=>{if(!i&&s&&s.error)throw typeof s.error=="string"?new Error(s.error):new Error(s.error.message);r(i,s)},n)},$9=t=>(e,r,n)=>{const i=n?` chainId:${n}`:"";ve.info(`[provider request]${i} id:${e.id} method:${e.method} params:`,e.params),t(e,(s,o)=>{s?ve.warn(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"error:",s):ve.info(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"response:",o),r(s,o)},n)},cW=t=>e=>(r,n,i)=>{const s=t(r),{id:o,method:a}=r;switch(a){case"net_version":n(void 0,{jsonrpc:"2.0",id:o,result:`${s}`});return;case"eth_chainId":n(void 0,{jsonrpc:"2.0",id:o,result:Q(s)});return}e(r,n,i)},D9=["personal_sign","eth_sign","eth_signTypedData","eth_signTypedData_v4","eth_sendTransaction","eth_sendRawTransaction","sequence_sign","sequence_signTypedData_v4","sequence_getWalletContext","sequence_getWalletConfig","sequence_getWalletState","sequence_getNetworks","sequence_updateConfig","sequence_publishConfig","sequence_gasRefundOptions","sequence_getNonce","sequence_relay","eth_decrypt","eth_getEncryptionPublicKey","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"];class fW{constructor(e){this.provider=void 0,this.sendAsyncMiddleware=r=>(n,i,s)=>{if(D9.includes(n.method)){this.provider.sendAsync(n,i,s);return}r(n,i,s)},this.provider=e}}class uW{constructor(e){this.privateJsonRpcMethods=["net_version","eth_chainId","eth_accounts",...D9],this.provider=void 0,this.rpcUrl=void 0,this.sendAsyncMiddleware=r=>(n,i)=>{if(this.provider&&!this.privateJsonRpcMethods.includes(n.method)){this.provider.send(n.method,n.params).then(s=>{i(void 0,{jsonrpc:"2.0",id:n.id,result:s})}).catch(s=>i(s));return}ve.debug("[public-provider] sending request to signer window",n.method),r(n,i)},e&&this.setRpcUrl(e)}getRpcUrl(){return this.rpcUrl}setRpcUrl(e){!e||e===""?(this.rpcUrl=void 0,this.provider=void 0):(this.rpcUrl=e,this.provider=new Ta(e))}}class L9{constructor(){this.singleflightJsonRpcMethods=["eth_chainId","net_version","eth_call","eth_getCode","eth_blockNumber","eth_getBalance","eth_getStorageAt","eth_getTransactionCount","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_getBlockByHash","eth_getBlockByNumber","eth_getTransactionByHash","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionReceipt","eth_getUncleByBlockHashAndIndex","eth_getUncleByBlockNumberAndIndex","eth_getLogs"],this.inflight=void 0,this.sendAsyncMiddleware=e=>(r,n,i)=>{if(!this.singleflightJsonRpcMethods.includes(r.method)){e(r,n,i);return}const s=this.requestKey(r.method,r.params||[],i);if(!this.inflight[s])this.inflight[s]=[];else{this.inflight[s].push({id:r.id,callback:n});return}e(r,(o,a,l)=>{n(o,a);for(let c=0;c{let i="";return n?i=`${n}:${e}:`:i=`:${e}:`,!r||r.length===0?i+"[]":i+JSON.stringify(r)},this.inflight={}}}class dW extends Ta{constructor(e,r){super(e,r==null?void 0:r.chainId),this._chainId=void 0,this._sender=void 0,this.send=(a,l)=>this._sender.send(a,l),this.fetch=(a,l)=>{const c={method:a,params:l,id:this._nextId++,jsonrpc:"2.0"};return fu(this.connection,JSON.stringify(c),hW).then(u=>u,u=>{throw u})};const n=r==null?void 0:r.chainId,i=r==null?void 0:r.middlewares,s=r==null?void 0:r.blockCache;this._chainId=n;const o=new px(i??[new N9({chainId:n}),new L9,new gx({defaultChainId:n,blockCache:s})],new U0(this.fetch,n));this._sender=new U0(o,n)}async getNetwork(){const e=this._chainId;if(e){const r=It[e],n=(r==null?void 0:r.name)||"",i=r==null?void 0:r.ensAddress;return{name:n,chainId:e,ensAddress:i}}else{const r=await this.send("eth_chainId",[]);return this._chainId=H.from(r).toNumber(),this.getNetwork()}}}function hW(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}const vW=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:lW,CachedProvider:gx,ChainId:ee,EagerProvider:N9,JsonRpcExternalProvider:aW,JsonRpcProvider:dW,JsonRpcRouter:px,JsonRpcSender:U0,JsonRpcVersion:Vl,NetworkType:Be,PublicProvider:uW,SigningProvider:fW,SingleflightMiddleware:L9,allNetworks:Ul,allowProviderMiddleware:Ap,checkNetworkConfig:iW,createJsonRpcMiddlewareStack:I9,ensureUniqueNetworks:rW,ensureValidNetworks:E9,exceptionProviderMiddleware:O9,findNetworkConfig:ri,findSupportedNetwork:yx,getChainId:w9,indexerURL:A9,isJsonRpcHandler:M9,isJsonRpcProvider:R9,isNetworkConfig:eW,isValidNetworkConfig:C9,loggingProviderMiddleware:$9,maybeChainId:tW,networkProviderMiddleware:cW,networks:It,networksIndex:sW,nodesURL:T9,relayerURL:_9,sortNetworks:k9,stringTemplate:Gh,toChainIdNumber:P9,updateNetworkConfig:nW,validateAndSortNetworks:S9},Symbol.toStringTag,{value:"Module"}));function Cr(){return Cr=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(xx(i))return Se(["uint8","uint8","address"],[ea.Address,i.weight,i.address]);if(i.isDynamic){const s=X(i.signature);return Se(["uint8","uint8","address","uint16","bytes"],[ea.DynamicSignature,i.weight,i.address,s.length,s])}return Se(["uint8","uint8","bytes"],[ea.EOASignature,i.weight,i.signature])});return Se(["uint16",...new Array(n.length).fill("bytes")],[r,...n])}async function V9(t,e,r){const n=hu(e),i=await Promise.all(t.signers.map(async s=>{if(xx(s))return s;if(s.isDynamic){if(!s.address)throw new Error("Dynamic signature part must have address");if(!mx(s.address,n,s.signature,r))throw new Error(`Invalid dynamic signature part ${s.address}`);return{address:s.address,weight:s.weight,signature:s.signature}}else return{address:vu(n,s.signature),weight:s.weight,signature:s.signature}}));return{version:1,payload:e,subdigest:n,config:{version:1,threshold:t.threshold,signers:i}}}function nf(t,e,r,n){if(r.length!==0)throw new Error("Explicit subdigests not supported on v1");let i=H.from(0);const s=t.signers.map(a=>{if(!e.has(a.address))return a;const l=e.get(a.address),c=X(l.signature);return i=i.add(a.weight),l.isDynamic||c.length!==66?Cr({},a,{isDynamic:!0,signature:l.signature,address:a.address}):Cr({},a,{isDynamic:!1,signature:l.signature})});return{encoded:bx({version:1,threshold:t.threshold,signers:s}),weight:i}}const wx={decode:t=>U9(t),encode:t=>bx(t),trim:async t=>t,supportsNoChainId:!0,recover:(t,e,r)=>V9(t,e,r),encodeSigners:(t,e,r,n)=>nf(t,e,r),hasEnoughSigningPower:(t,e)=>{const{weight:r}=wx.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{throw new Error("Signature chaining not supported on v1")},hashSetImageHash:function(t){throw new Error("Image hash not supported on v1")},signaturesOf(t){return t.signers.filter(e=>e.signature!==void 0).map(e=>({address:e.address,signature:e.signature}))},signaturesOfDecoded:function(t){return t.signers.map(e=>e.signature).filter(e=>e!==void 0)}};var EW=Object.freeze({__proto__:null,SignaturePartType:ea,isAddressMember:xx,isUnrecoveredSignatureMember:j9,isUnrecoveredSignature:z9,decodeSignature:U9,encodeSignature:bx,recoverSignature:V9,encodeSigners:nf,SignatureCoder:wx});const Cx={isWalletConfig:t=>t.version===1&&t.threshold!==void 0&&t.signers!==void 0,imageHashOf:t=>t.signers.reduce((e,r)=>pe(qr.encode(["bytes32","uint8","address"],[e,r.weight,r.address])),Se(["uint256"],[t.threshold])),hasSubdigest:(t,e)=>!1,isComplete:t=>!0,checkpointOf:t=>H.from(0),signersOf:t=>t.signers.map(e=>({address:e.address,weight:H.from(e.weight).toNumber()})),fromSimple:t=>{if(!Nt.eq(t.checkpoint))throw new Error("v1 wallet config does not support checkpoint");if(t.subdigests&&t.subdigests.length>0)throw new Error("v1 wallet config does not support subdigests");return{version:1,threshold:t.threshold,signers:t.signers}},update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new tr([...pr.mainModule.abi,...pr.mainModuleUpgradable.abi]),s=[];return(!n||n==="first")&&s.push({to:t,data:i.encodeFunctionData(i.getFunction("updateImplementation"),[r.mainModuleUpgradable]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),s.push({to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[Cx.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),{entrypoint:t,transactions:s}},decodeTransaction:function(t){throw new Error("Function not implemented.")}},toJSON:function(t){const e=t.signers.map(r=>({weight:H.from(r.weight).toString(),address:r.address}));return JSON.stringify({version:t.version,threshold:H.from(t.threshold).toString(),signers:e})},fromJSON:function(t){const e=JSON.parse(t),r=e.signers.map(n=>({weight:H.from(n.weight),address:n.address}));return{version:e.version,threshold:H.from(e.threshold),signers:r}},editConfig:function(t,e){var r;const n=t.signers.slice();if(e.checkpoint&&!Nt.eq(e.checkpoint))throw new Error("v1 wallet config does not support checkpoint");if(e.add)for(const i of e.add)n.find(s=>s.address===i.address)||n.push({weight:i.weight,address:i.address});if(e.remove)for(const i of e.remove){const s=n.findIndex(o=>o.address===i);s>=0&&n.splice(s,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,signers:n}},buildStubSignature:function(t,e){const r=new Map;for(const[i,s]of e.entries()){r.set(i,{signature:s,isDynamic:!0});const{encoded:o,weight:a}=nf(t,r,[]);if(a.gte(t.threshold))return o}const n=t.signers;for(const{address:i}of n.sort(({weight:s},{weight:o})=>H.from(s).sub(o).toNumber())){r.set(i,{signature:"0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02",isDynamic:!1});const{encoded:o,weight:a}=nf(t,r,[]);if(a.gte(t.threshold))return o}return nf(t,r,[]).encoded}};var SW=Object.freeze({__proto__:null,ConfigCoder:Cx});const H9=1,W9={version:H9,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Vi=Object.freeze({__proto__:null,config:SW,signature:EW,version:H9,DeployedWalletContext:W9});const Ex="0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1";function q9(t){return pe(G9(t))}function G9(t){return Se(["bytes32","bytes32"],[Ex,t])}function K9(t){const e=X(t);if(e.length===64&&Q(e.slice(0,32))===Ex)return Q(e.slice(32,64))}function kW(t){return K9(t)!==void 0}var AW=Object.freeze({__proto__:null,SetImageHashPrefix:Ex,hashSetImageHash:q9,messageSetImageHash:G9,decodeMessageSetImageHash:K9,isMessageSetImageHash:kW});let vr=function(t){return t[t.Legacy=0]="Legacy",t[t.Dynamic=1]="Dynamic",t[t.NoChainIdDynamic=2]="NoChainIdDynamic",t[t.Chained=3]="Chained",t}({}),Ht=function(t){return t[t.Signature=0]="Signature",t[t.Address=1]="Address",t[t.DynamicSignature=2]="DynamicSignature",t[t.Node=3]="Node",t[t.Branch=4]="Branch",t[t.Subdigest=5]="Subdigest",t[t.Nested=6]="Nested",t}({});const V0=66;function ga(t){return t.left!==void 0&&t.right!==void 0}function lc(t){return t.tree!==void 0}function yu(t){return t.unrecovered&&t.signature!==void 0&&t.isDynamic!==void 0}function H0(t){let e=X(t),r;const n=(i,s)=>i?i.right?{left:i,right:s}:{left:i.left,right:s}:{left:s};for(;e.length>0;){const i=e[0];switch(e=e.slice(1),i){case Ht.Signature:{const s=e[0],o=Q(e.slice(1,V0+1));r=n(r,{signature:o,weight:s,unrecovered:!0,isDynamic:!1}),e=e.slice(V0+1)}break;case Ht.Address:{const s=e[0],o=we(Q(e.slice(1,21)));r=n(r,{address:o,weight:s}),e=e.slice(21)}break;case Ht.DynamicSignature:{const s=e[0],o=we(Q(e.slice(1,21))),a=e[21]<<16|e[22]<<8|e[23],l=Q(e.slice(24,24+a));r=n(r,{address:o,signature:l,weight:s,unrecovered:!0,isDynamic:!0}),e=e.slice(24+a)}break;case Ht.Node:{const s=Q(e.slice(0,32));r=n(r,{nodeHash:s}),e=e.slice(32)}break;case Ht.Branch:{const s=e[0]<<16|e[1]<<8|e[2],o=H0(e.slice(3,3+s));r=n(r,o),e=e.slice(3+s)}break;case Ht.Subdigest:{const s=Q(e.slice(0,32));r=n(r,{subdigest:s}),e=e.slice(32)}break;case Ht.Nested:{const s=e[0],o=e[1]<<8|e[2],a=e[3]<<16|e[4]<<8|e[5],l=H0(e.slice(6,6+a));r=n(r,{weight:s,threshold:o,tree:l}),e=e.slice(6+a)}break;default:throw new Error(`Unknown signature part type: ${i}: ${Q(e)}`)}}if(!r)throw new Error("Empty signature tree");return r.right?r:r.left}class J9 extends Error{constructor(e){super(`Invalid signature leaf: ${JSON.stringify(e)}`),this.leaf=e}}async function ta(t,e,r){if(ga(t)){const[n,i]=await Promise.all([ta(t.left,e,r),ta(t.right,e,r)]);return{left:n,right:i}}if(lc(t))return{weight:t.weight,threshold:t.threshold,tree:await ta(t.tree,e,r)};if(yu(t))if(t.isDynamic){if(!t.address)throw new Error("Dynamic signature leaf without address");if(!await mx(t.address,e,t.signature,r))throw new J9(t);return{weight:t.weight,address:t.address,signature:t.signature,subdigest:e}}else return{weight:t.weight,address:vu(e,t.signature),signature:t.signature,subdigest:e};return t}const Tr={concat:(t,e)=>Se(["bytes","bytes"],[t,e]),node:t=>Se(["uint8","bytes32"],[Ht.Node,t]),branch:t=>{const e=X(t);return Se(["uint8","uint24","bytes"],[Ht.Branch,e.length,e])},nested:(t,e,r)=>{const n=X(r);return Se(["uint8","uint8","uint16","uint24","bytes"],[Ht.Nested,t,e,n.length,n])},subdigest:t=>Se(["uint8","bytes32"],[Ht.Subdigest,t]),signature:(t,e)=>Se(["uint8","uint8","bytes"],[Ht.Signature,t,e]),dynamicSignature:(t,e,r)=>{const n=X(r);return Se(["uint8","uint8","address","uint24","bytes"],[Ht.DynamicSignature,t,e,n.length,n])},address:(t,e)=>Se(["uint8","uint8","address"],[Ht.Address,t,e])};function sf(t,e,r,n,i={}){const s=of(t.tree,e,r,i);return H.from(n).isZero()?{encoded:Se(["uint8","uint16","uint32","bytes"],[vr.NoChainIdDynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:H.from(t.threshold).gt(255)?{encoded:Se(["uint8","uint16","uint32","bytes"],[vr.Dynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:{encoded:Se(["uint8","uint8","uint32","bytes"],[vr.Legacy,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}}function of(t,e,r,n={}){const i=!n.disableTrim;if(si(t)){const s=of(t.left,e,r),o=of(t.right,e,r),a=Wr(t.left),l=Wr(t.right);return i&&s.weight.eq(0)&&o.weight.eq(0)&&!a&&!l?{encoded:Tr.node(An(t)),weight:Nt}:i&&o.weight.eq(0)&&!l?{encoded:Tr.concat(s.encoded,Tr.node(An(t.right))),weight:s.weight}:i&&s.weight.eq(0)&&!a?{encoded:Tr.concat(Tr.node(An(t.left)),Tr.branch(o.encoded)),weight:o.weight}:{encoded:Tr.concat(s.encoded,Tr.branch(o.encoded)),weight:s.weight.add(o.weight)}}if(ds(t)){const s=of(t.tree,e,r);return i&&s.weight.eq(0)?{encoded:Tr.node(An(t)),weight:Nt}:{encoded:Tr.nested(t.weight,t.threshold,s.encoded),weight:s.weight}}if(hs(t))return{encoded:Tr.node(An(t)),weight:Nt};if(us(t)){const s=r.includes(t.subdigest);return{encoded:Tr.subdigest(t.subdigest),weight:s?ME:Nt}}if(Wr(t))if(e.has(t.address)){const o=e.get(t.address),a=o.signature;return n.forceDynamicEncoding||o.isDynamic?{encoded:Tr.dynamicSignature(t.weight,t.address,a),weight:H.from(t.weight)}:{encoded:Tr.signature(t.weight,a),weight:H.from(t.weight)}}else return{encoded:Tr.address(t.weight,t.address),weight:Nt};throw new Error(`Invalid topology - unknown error: ${JSON.stringify(t)}`)}function Sx(t){return Ax(t)?Sx(t.suffix[t.suffix.length-1]):t.config}function kx(t){return t.type!==void 0&&t.decoded!==void 0&&t.version!==void 0&&t.version===2}function pu(t){return t.suffix!==void 0&&Array.isArray(t.suffix)&&t.suffix.every(kx)}function Y9(t){return t.type!==void 0&&t.config!==void 0&&t.digest!==void 0&&t.version!==void 0&&t.version===2}function Ax(t){return t.chain!==void 0&&Array.isArray(t.chain)&&t.chain.every(Y9)}function Kh(t){const e=X(t),r=e[0];switch(r){case vr.Legacy:return{version:2,type:vr.Legacy,decoded:Rd(e)};case vr.Dynamic:return{version:2,type:vr.Dynamic,decoded:Rd(e.slice(1))};case vr.NoChainIdDynamic:return{version:2,type:vr.NoChainIdDynamic,decoded:Rd(e.slice(1))};case vr.Chained:return Q9(e);default:throw new Error(`Invalid signature type: ${r}`)}}function Rd(t){const e=X(t),r=e[0]<<8|e[1],n=e[2]<<24|e[3]<<16|e[4]<<8|e[5],i=H0(e.slice(6));return{threshold:r,checkpoint:n,tree:i}}function Q9(t){const e=X(t),r=e[0];if(r!==vr.Chained)throw new Error(`Expected chained signature type: ${r}`);const n=[];let i=1;for(;iX(Js(s))),i=Se(n.map(()=>["uint24","bytes"]).flat(),n.map(s=>[s.length,s]).flat());return Se(["uint8","bytes"],[vr.Chained,i])}function Js(t){if(rs(t))return Q(t);if(pu(t)||Ax(t))return Jh(Js(t),(t.suffix||[]).map(Js));const e=kx(t)?t.decoded:t.config;switch(t.type){case vr.Legacy:if(H.from(e.threshold).gt(255))throw new Error(`Legacy signature threshold is too large: ${e.threshold} (max 255)`);return _p(e);case vr.NoChainIdDynamic:case vr.Dynamic:return Se(["uint8","bytes"],[t.type,_p(e)]);case vr.Chained:throw new Error("Unreachable code: Chained signature should be handled above");default:throw new Error(`Invalid signature type: ${t.type}`)}}function _p(t){return Se(["uint16","uint32","bytes"],[t.threshold,t.checkpoint,af(t.tree)])}function af(t){if(si(t)||ga(t)){const e=X(af(t.right)),r=X(af(t.left));return si(t.right)||ga(t.right)?Se(["bytes","uint8","uint24","bytes"],[r,Ht.Branch,e.length,e]):Se(["bytes","bytes"],[r,e])}if(ds(t)||lc(t)){const e=X(af(t.tree));return Se(["uint8","uint8","uint16","uint24","bytes"],[Ht.Nested,t.weight,t.threshold,e.length,e])}if(yu(t)||Wr(t)&&t.signature!==void 0){const e=X(t.signature);if(t.isDynamic||e.length!==V0){if(!t.address)throw new Error("Dynamic signature leaf must have address");return Se(["uint8","uint8","address","uint24","bytes"],[Ht.DynamicSignature,t.weight,t.address,e.length,e])}else return Se(["uint8","uint8","bytes"],[Ht.Signature,t.weight,e])}if(Wr(t))return Se(["uint8","uint8","address"],[Ht.Address,t.weight,t.address]);if(hs(t))return Se(["uint8","bytes32"],[Ht.Node,t.nodeHash]);if(us(t))return Se(["uint8","bytes32"],[Ht.Subdigest,t.subdigest]);throw new Error(`Unknown signature tree type: ${t}`)}function lf(t){return si(t)?[...lf(t.left),...lf(t.right)]:ds(t)?lf(t.tree):Wr(t)&&t.signature?[{address:t.address,signature:t.signature}]:[]}function cf(t){return ga(t)?[...cf(t.left),...cf(t.right)]:lc(t)?cf(t.tree):yu(t)?[t.signature]:[]}function Md(t){return ga(t)?[...Md(t.left),...Md(t.right)]:lc(t)?Md(t.tree):us(t)?[t.subdigest]:[]}async function W0(t){const e=typeof t=="string"?Kh(t):t;if(pu(e)){const n=await Promise.all([W0(Cr({},e,{suffix:void 0})),...e.suffix.map(i=>W0(i))]);return Jh(n[0],n.slice(1))}const{trimmed:r}=await ff(e.decoded.tree);return Js(Cr({},e,{decoded:Cr({},e.decoded,{tree:r})}))}async function ff(t,e=!0){if(ga(t)){const[r,n]=await Promise.all([ff(t.left),ff(t.right)]);if(r.weight===0&&n.weight===0)try{const i=await ta(t,T0,void 0);return{weight:0,trimmed:{nodeHash:An(i)}}}catch{}else return{weight:r.weight+n.weight,trimmed:{left:r.trimmed,right:n.trimmed}}}if(lc(t)){const r=await ff(t.tree);if(r.weight===0)try{const n=await ta(t,T0,void 0);return{weight:0,trimmed:{nodeHash:An(n)}}}catch{}return{weight:r.weight,trimmed:{weight:t.weight,threshold:t.threshold,tree:r.trimmed}}}return hs(t)&&tS(t.nodeHash)?{weight:0,trimmed:Cr({},eS(t.nodeHash))}:yu(t)||Wr(t)&&t.signature!==void 0?{weight:H.from(t.weight).toNumber(),trimmed:t}:!e&&us(t)?{weight:1/0,trimmed:t}:{weight:0,trimmed:t}}const Yh={decode:t=>Kh(t),encode:t=>Js(t),trim:t=>W0(t),supportsNoChainId:!0,recover:(t,e,r)=>_x(t,e,r),encodeSigners:(t,e,r,n)=>sf(t,e,r,n),hasEnoughSigningPower:(t,e)=>{const{weight:r}=Yh.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{const r=e.reverse(),n=rs(t)?t:Js(t),i=r.map(s=>rs(s)?s:Js(s));return Jh(n,i)},hashSetImageHash:function(t){return q9(t)},signaturesOf(t){return lf(t.tree)},signaturesOfDecoded:function(t){return cf(t.decoded.tree)}};var _W=Object.freeze({__proto__:null,SignatureType:vr,SignaturePartType:Ht,SignaturePartTypeLength:V0,isUnrecoveredNode:ga,isUnrecoveredNestedLeaf:lc,isUnrecoveredSignatureLeaf:yu,decodeSignatureTree:H0,InvalidSignatureLeafError:J9,recoverTopology:ta,partEncoder:Tr,encodeSigners:sf,encodeTree:of,deepestConfigOfSignature:Sx,isUnrecoveredSignature:kx,isUnrecoveredChainedSignature:pu,isSignature:Y9,isChainedSignature:Ax,decodeSignature:Kh,decodeSignatureBody:Rd,decodeChainedSignature:Q9,setImageHashStruct:X9,recoverSignature:_x,encodeChain:Jh,encodeSignature:Js,encodeSignatureBody:_p,encodeSignatureTree:af,signaturesOf:lf,signaturesOfDecoded:cf,subdigestsOfDecoded:Md,trimSignature:W0,trimUnrecoveredTree:ff,SignatureCoder:Yh});function Wr(t){return t.address!==void 0&&t.weight!==void 0}function us(t){return t.subdigest!==void 0&&t.address===void 0}function uf(t){return si(t)?JSON.stringify({left:uf(t.left),right:uf(t.right)}):ds(t)?JSON.stringify({weight:H.from(t.weight).toString(),threshold:H.from(t.threshold).toString(),tree:uf(t.tree)}):Wr(t)?JSON.stringify({address:t.address,weight:H.from(t.weight).toString()}):JSON.stringify(t)}function df(t){const e=typeof t=="string"?JSON.parse(t):t;return e.left!==void 0&&e.right!==void 0?{left:df(e.left),right:df(e.right)}:e.weight!==void 0&&e.threshold!==void 0&&e.tree!==void 0?{weight:H.from(e.weight),threshold:H.from(e.threshold),tree:df(e.tree)}:e.address!==void 0&&e.weight!==void 0?{address:e.address,weight:H.from(e.weight)}:e}function ds(t){return t.tree!==void 0&&t.weight!==void 0&&t.threshold!==void 0}function hs(t){return t.nodeHash!==void 0}function Tx(t){return Wr(t)||us(t)||ds(t)||hs(t)}function si(t){return t.left!==void 0&&t.right!==void 0}function TW(t){return si(t)||Tx(t)}function Z9(t){return Se(["uint96","address"],[t.weight,t.address])}function eS(t){const e=X(t);if(e.length!==32)throw new Error("Invalid encoded string length");const r=H.from(e.slice(0,12)),n=we(Q(e.slice(12)));return{weight:r,address:n}}function tS(t){const e=X(t);return e.length!==32?!1:e.slice(0,11).every(n=>n===0)}function An(t){if(Wr(t))return Z9(t);if(us(t))return Gs(["string","bytes32"],[`Sequence static digest: +`,t.subdigest]);if(ds(t)){const e=An(t.tree);return Gs(["string","bytes32","uint256","uint256"],[`Sequence nested config: +`,e,t.threshold,t.weight])}return hs(t)?t.nodeHash:Gs(["bytes32","bytes32"],[An(t.left),An(t.right)])}function PW(t){const e=[];let r=t;for(;!Tx(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function IW(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function Px(t){return Gs(["bytes32","uint256"],[Gs(["bytes32","uint256"],[An(t.tree),t.threshold]),t.checkpoint])}function rS(t){return t.threshold!==void 0&&t.weight!==void 0&&t.members!==void 0}function Cl(t){return Wr(t)||us(t)?[t]:ds(t)?[{threshold:t.threshold,weight:t.weight,members:Cl(t.tree)}]:hs(t)?[]:[...Cl(t.left),...Cl(t.right)]}function Tp(t){return hs(t)?!0:si(t)?Tp(t.left)||Tp(t.right):!1}function RW(t){return{threshold:t.threshold,checkpoint:t.checkpoint,members:Cl(t.tree)}}const nS=(t,e)=>t.map(r=>rS(r)?{tree:e(r.members),threshold:r.threshold,weight:r.weight}:r);function Ix(t){if(t.length===0)throw new Error("Empty members array");return nS(t,Ix).reduce((r,n)=>({left:r,right:n}))}function Rx(t){if(t.length===0)throw new Error("Empty members array");const e=nS(t,Rx);for(let r=e.length;r>1;r=r/2)for(let n=0;n=r?e[n]=e[i]:e[n]={left:e[i],right:e[s]}}return e[0]}function Mx(t){return t.length>8?Rx(t):Ix(t)}function iS(t,e=Mx){return{version:2,threshold:t.threshold,checkpoint:t.checkpoint,tree:e(t.members)}}function q0(t,e){return us(t)?t.subdigest===e:si(t)?q0(t.left,e)||q0(t.right,e):!1}function Pp(t){const e=[t],r=new Set;for(;e.length>0;){const n=e.pop();ds(n)?e.push(n.tree):si(n)?(e.push(n.left),e.push(n.right)):Wr(n)&&r.add({address:n.address,weight:H.from(n.weight).toNumber()})}return Array.from(r)}function G0(t){return si(t)?G0(t.left)&&G0(t.right):!hs(t)}const Qh={isWalletConfig:t=>t.version===2&&t.threshold!==void 0&&t.tree!==void 0,imageHashOf:t=>Px(t),hasSubdigest:(t,e)=>q0(t.tree,e),checkpointOf:t=>H.from(t.checkpoint),signersOf:t=>Pp(t.tree),fromSimple:t=>{var e;return iS(Cr({},t,{members:[...t.signers,...((e=t.subdigests)!=null?e:[]).map(r=>({subdigest:r}))]}))},isComplete:t=>G0(t.tree),update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new tr(pr.mainModuleUpgradable.abi);return{entrypoint:t,transactions:[{to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[Qh.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}},decodeTransaction:function(t){var e,r,n,i;const s=new tr(pr.mainModuleUpgradable.abi);if(t.transactions.length!==1)throw new Error("Invalid transaction bundle, expected 1 transaction");const o=t.transactions[0].data;if(!o)throw new Error("Invalid transaction bundle, expected data");const a=s.decodeFunctionData(s.getFunction("updateImageHash"),o);if(!a)throw new Error("Invalid transaction bundle, expected valid data");if(t.transactions[0].to!==t.entrypoint)throw new Error("Invalid transaction bundle, expected to be sent to entrypoint");if(t.transactions[0].delegateCall)throw new Error("Invalid transaction bundle, expected not to be a delegateCall");if(!t.transactions[0].revertOnError)throw new Error("Invalid transaction bundle, expected revertOnError");if(!Nt.eq((e=(r=t.transactions[0])==null?void 0:r.value)!=null?e:0))throw new Error("Invalid transaction bundle, expected value to be 0");if(!Nt.eq((n=(i=t.transactions[0])==null?void 0:i.gasLimit)!=null?n:0))throw new Error("Invalid transaction bundle, expected value to be 0");return{address:t.entrypoint,newImageHash:a[0],kind:void 0}}},toJSON:function(t){return JSON.stringify({version:t.version,threshold:H.from(t.threshold).toString(),checkpoint:H.from(t.checkpoint).toString(),tree:uf(t.tree)})},fromJSON:function(t){const e=JSON.parse(t);return{version:e.version,threshold:H.from(e.threshold),checkpoint:H.from(e.checkpoint),tree:df(e.tree)}},editConfig:function(t,e){var r,n;const i=Cl(t.tree);if(e.add)for(const s of e.add)i.find(o=>Wr(o)&&o.address===s.address)||i.push({address:s.address,weight:s.weight});if(e.remove)for(const s of e.remove){const o=i.findIndex(a=>Wr(a)&&a.address===s);o>=0&&i.splice(o,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,checkpoint:(n=e.checkpoint)!=null?n:t.checkpoint,tree:Mx(i)}},buildStubSignature:function(t,e){const r=new Map;for(const[i,s]of e.entries()){r.set(i,{signature:s,isDynamic:!0});const{encoded:o,weight:a}=sf(t,r,[],0);if(a.gte(t.threshold))return o}const n=Pp(t.tree);for(const{address:i}of n.sort(({weight:s},{weight:o})=>s-o)){r.set(i,{signature:"0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02",isDynamic:!1});const{encoded:o,weight:a}=sf(t,r,[],0);if(a.gte(t.threshold))return o}return sf(t,r,[],0).encoded}};var MW=Object.freeze({__proto__:null,isSignerLeaf:Wr,isSubdigestLeaf:us,topologyToJSON:uf,topologyFromJSON:df,isNestedLeaf:ds,isNodeLeaf:hs,isLeaf:Tx,isNode:si,isTopology:TW,encodeSignerLeaf:Z9,decodeSignerLeaf:eS,isEncodedSignerLeaf:tS,hashNode:An,leftFace:PW,isWalletConfig:IW,imageHash:Px,isSimpleNestedMember:rS,topologyToMembers:Cl,hasUnknownNodes:Tp,toSimpleWalletConfig:RW,legacyTopologyBuilder:Ix,merkleTopologyBuilder:Rx,optimized2SignersTopologyBuilder:Mx,toWalletConfig:iS,hasSubdigest:q0,signersOf:Pp,isComplete:G0,ConfigCoder:Qh}),NW=Object.freeze({__proto__:null});const OW={config:Qh,signature:Yh},sS=2,oS={version:sS,factory:"0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A",guestModule:"0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE",mainModule:"0xfBf8f1A5E00034762D928f46d438B947f5d4065d",mainModuleUpgradable:"0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Ae=Object.freeze({__proto__:null,config:MW,signature:_W,context:NW,chained:AW,coders:OW,version:sS,DeployedWalletContext:oS});function Ip(t,e){const r=pe(Se(["bytes","bytes32"],[t.walletCreationCode,Ve(t.mainModule,32)])),n=pe(Se(["bytes1","address","bytes32","bytes32"],["0xff",t.factory,e,r]));return we(Vt(n,12))}async function $W(t,e,r,n,i,s){return(await Promise.all(mS.map(async a=>{try{const l=a.signature.SignatureCoder.decode(Q(r)),c=await a.signature.SignatureCoder.recover(l,{address:t,digest:Q(e),chainId:n},i),f=a.config.ConfigCoder.imageHashOf(c.config);if(Ip(s[a.version],f).toLowerCase()===t.toLowerCase())return!0;const h=await a.signature.SignatureCoder.recover(l,{address:t,digest:Q(e),chainId:n},i),y=a.config.ConfigCoder.imageHashOf(h.config);return Ip(s[a.version],y).toLowerCase()===t.toLowerCase()}catch{}return!1}))).some(a=>a)}function DW(t){const e=Object.keys(t).length;for(let r=1;r<=e;r++){const n=t[r];if(!n||n.version!==r)return!1}return!0}function LW(t){const e=Object.keys(t).length;return t[e]}const BW={1:W9,2:oS};var FW=Object.freeze({__proto__:null,addressOf:Ip,isValidCounterfactual:$W,isValidVersionedContext:DW,latestContext:LW,defaultContexts:BW});const Xh=`tuple( bool delegateCall, bool revertOnError, uint256 gasLimit, address target, uint256 value, bytes data -)[]`;function WW(t,e,r,n){return Cr({},t,{chainId:r,intent:{id:n,wallet:e}})}function qW(t){return pe(qr.encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function GW(t){const e=qr.decode(["uint256",Xh],t);if(e.length!==2||!e[0]||!e[1])throw new Error("Invalid meta transaction data");return[e[0],e[1]]}function d9(t,e){return qr.encode(["uint256",Xh],[t,Kf(e)])}function h9(t,e){return pe(d9(t,e))}function KW(t,e,r,n){return hu({address:t,chainId:e,digest:h9(r,n)})}function JW(t,e,r){return hu({address:t,chainId:e,digest:pe(qr.encode(["string",Xh],["guest:",Kf(r)]))})}function v9(t,e){return e.map(r=>Nx(t,r))}function Nx(t,e){if(e.to&&e.to!==jm)return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit||0,to:e.to,value:e.value||0,data:e.data||"0x"}};{const r=new tr(pr.mainModule.abi),n=r.encodeFunctionData(r.getFunction("createContract"),[e.data]);return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit,to:t,value:e.value||0,data:n}}}}function Zh(t){return t.delegateCall!==void 0||t.revertOnError!==void 0}function y9(t){return t.every(Zh)}function Kf(t){return t.map(e=>{var r;return{delegateCall:e.delegateCall===!0,revertOnError:e.revertOnError===!0,gasLimit:e.gasLimit!==void 0?e.gasLimit:Nt,target:(r=e.to)!=null?r:jm,value:e.value!==void 0?e.value:Nt,data:e.data!==void 0?e.data:[]}})}function QW(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function YW(t,e){const r=V.from(t),n=V.from(e),i=BA.pow(V.from(96));if(!n.div(i).eq(Nt))throw new Error("Space already encoded");return n.add(r.mul(i))}function XW(t){const e=V.from(t),r=BA.pow(V.from(96));return[e.div(r),e.mod(r)]}function ZW(t,e){return Array.isArray(e)?y9(e)?e:v9(t,e).map(n=>n.transaction):Zh(e)?[e]:[Nx(t,e).transaction]}function p9(t){return t!==void 0&&t.entrypoint!==void 0&&t.chainId!==void 0&&t.transactions!==void 0&&t.nonce!==void 0&&t.intent!==void 0&&t.intent.id!==void 0&&t.intent.wallet!==void 0&&Array.isArray(t.transactions)&&t.transactions.reduce((e,r)=>e&&Zh(r),!0)}function g9(t){return t!==void 0&&t.signature!==void 0&&t.signature!==""&&p9(t)}function eq(t){const e=new tr(pr.mainModule.abi);return e.encodeFunctionData(e.getFunction("execute"),g9(t)?[Kf(t.transactions),t.nonce,t.signature]:[Kf(t.transactions),0,[]])}const m9="0x61c2926c",x9=`tuple( +)[]`;function jW(t,e,r,n){return Cr({},t,{chainId:r,intent:{id:n,wallet:e}})}function zW(t){return pe(qr.encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function UW(t){const e=qr.decode(["uint256",Xh],t);if(e.length!==2||!e[0]||!e[1])throw new Error("Invalid meta transaction data");return[e[0],e[1]]}function aS(t,e){return qr.encode(["uint256",Xh],[t,Kf(e)])}function lS(t,e){return pe(aS(t,e))}function VW(t,e,r,n){return hu({address:t,chainId:e,digest:lS(r,n)})}function HW(t,e,r){return hu({address:t,chainId:e,digest:pe(qr.encode(["string",Xh],["guest:",Kf(r)]))})}function cS(t,e){return e.map(r=>Nx(t,r))}function Nx(t,e){if(e.to&&e.to!==jm)return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit||0,to:e.to,value:e.value||0,data:e.data||"0x"}};{const r=new tr(pr.mainModule.abi),n=r.encodeFunctionData(r.getFunction("createContract"),[e.data]);return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit,to:t,value:e.value||0,data:n}}}}function Zh(t){return t.delegateCall!==void 0||t.revertOnError!==void 0}function fS(t){return t.every(Zh)}function Kf(t){return t.map(e=>{var r;return{delegateCall:e.delegateCall===!0,revertOnError:e.revertOnError===!0,gasLimit:e.gasLimit!==void 0?e.gasLimit:Nt,target:(r=e.to)!=null?r:jm,value:e.value!==void 0?e.value:Nt,data:e.data!==void 0?e.data:[]}})}function WW(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function qW(t,e){const r=H.from(t),n=H.from(e),i=RE.pow(H.from(96));if(!n.div(i).eq(Nt))throw new Error("Space already encoded");return n.add(r.mul(i))}function GW(t){const e=H.from(t),r=RE.pow(H.from(96));return[e.div(r),e.mod(r)]}function KW(t,e){return Array.isArray(e)?fS(e)?e:cS(t,e).map(n=>n.transaction):Zh(e)?[e]:[Nx(t,e).transaction]}function uS(t){return t!==void 0&&t.entrypoint!==void 0&&t.chainId!==void 0&&t.transactions!==void 0&&t.nonce!==void 0&&t.intent!==void 0&&t.intent.id!==void 0&&t.intent.wallet!==void 0&&Array.isArray(t.transactions)&&t.transactions.reduce((e,r)=>e&&Zh(r),!0)}function dS(t){return t!==void 0&&t.signature!==void 0&&t.signature!==""&&uS(t)}function JW(t){const e=new tr(pr.mainModule.abi);return e.encodeFunctionData(e.getFunction("execute"),dS(t)?[Kf(t.transactions),t.nonce,t.signature]:[Kf(t.transactions),0,[]])}const hS="0x61c2926c",vS=`tuple( bool delegateCall, bool revertOnError, uint256 gasLimit, address target, uint256 value, bytes data -)[]`,Mp=(t,e)=>{const r=[],n=new tr(pr.mainModule.abi);for(const i of e){const s=X(i.data||"0x");if(i.to===t&&Y(s.slice(0,4))===m9){const o=s.slice(4),a=qr.decode([x9],o)[0];r.push(...Mp(i.to,a.map(l=>Cr({},l,{to:l.target}))))}else try{const o=n.decodeFunctionData("execute",s)[0],a=Mp(t,o.map(l=>Cr({},l,{to:l.target})));r.push(...a)}catch{r.push(i)}}return r};var tq=Object.freeze({__proto__:null,MetaTransactionsType:Xh,intendTransactionBundle:WW,intendedTransactionID:qW,unpackMetaTransactionsData:GW,packMetaTransactionsData:d9,digestOfTransactions:h9,subdigestOfTransactions:KW,subdigestOfGuestModuleTransactions:JW,toSequenceTransactions:v9,toSequenceTransaction:Nx,isSequenceTransaction:Zh,hasSequenceTransactions:y9,sequenceTxAbiEncode:Kf,fromTxAbiEncode:QW,encodeNonce:YW,decodeNonce:XW,fromTransactionish:ZW,isTransactionBundle:p9,isSignedTransactionBundle:g9,encodeBundleExecData:eq,selfExecuteSelector:m9,selfExecuteAbi:x9,unwind:Mp});const b9="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",rq="0x6492649264926492649264926492649264926492649264926492649264926492";async function w9(t,e,r,n){return await t.call({data:ze([b9,new Hm().encode(["address","bytes32","bytes"],[e,r,n])])})==="0x01"}var nq=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:b9,EIP_6492_SUFFIX:rq,validateEIP6492Offchain:w9});class iq{constructor(e){this.provider=e,this.isDeployedCache=new Set}module(e){return new _a(e,[...pr.mainModuleUpgradable.abi,...pr.mainModule.abi,...pr.erc1271.abi],this.provider)}async isDeployed(e){if(this.isDeployedCache.has(e))return!0;const n=(await this.provider.getCode(e).then(i=>X(i))).length!==0;return n&&this.isDeployedCache.add(e),n}async implementation(e){const r=qr.encode(["address"],[e]),n=await this.provider.getStorageAt(e,r).then(i=>X(i));if(n.length===20)return we(Y(n));if(n.length===32)return qr.decode(["address"],n)[0]}async imageHash(e){try{return await this.module(e).imageHash()}catch{}}async nonce(e,r=0){try{return await this.module(e).readNonce(r)}catch(n){if(!await this.isDeployed(e))return 0;throw n}}async isValidSignature(e,r,n){return w9(this.provider,e,r,n)}}var sq=Object.freeze({__proto__:null,OnChainReader:iq});function oq(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var le=Object.freeze({__proto__:null,config:bW,signature:wW,context:HW,signer:_W,EIP1271:EW,transaction:tq,reader:sq,EIP6492:nq,isWalletSignRequestMetadata:oq});const Rp=[{config:Cx,signature:wx},{config:Yh,signature:Qh}];function C9(t){const e=t-1;if(e<0||e>=Rp.length)throw new Error(`No coder for version: ${t}`);return Rp[e]}function aq(t){return C9(t)}var wr=Object.freeze({__proto__:null,ALL_CODERS:Rp,coderFor:C9,genericCoderFor:aq});const A9=[Vi,Se],lq=Object.freeze(Object.defineProperty({__proto__:null,allVersions:A9,commons:le,universal:wr,v1:Vi,v2:Se},Symbol.toStringTag,{value:"Module"}));function cq(t,e,r){for(let n=0;ne.version)&&(e=r);if(e===void 0)throw new Error("No migrations");return e}async getAllMigratePresignedTransaction(e){const{address:r,fromImageHash:n,fromVersion:i,chainId:s}=e;let o=n,a=i;const l=Object.values(this.contexts),c=[];for(let f=1;fX(s).length===0))return U6;if(!n.provider)throw new Error("signer.provider is not set, but is required");return n.provider.estimateGas({from:e,to:i.to,data:i.data,value:i.value})}))).map(i=>({executed:!0,succeeded:!0,gasUsed:V.from(i).toNumber(),gasLimit:V.from(i).toNumber()}))}async getNonce(e,r,n){if(!this.provider)throw new Error("provider is not set");if(await this.provider.getCode(e)==="0x")return 0;r===void 0&&(r=0);const s=await new _a(e,pr.mainModule.abi,this.provider).readNonce(r,{blockTag:n});return le.transaction.encodeNonce(r,s)}async wait(e,r,n=this.waitPollRate,i=5){var s=this;typeof e!="string"&&(e=le.transaction.intendedTransactionID(e));let o=!1;const a=async function(f,u){let h=0;for(;!o;){try{return await f()}catch(y){if(h++,i!==void 0&&h>=i)throw ve.error(`giving up after ${h} failed attempts${u?`: ${u}`:""}`,y),y;ve.warn(`attempt #${h} failed${u?`: ${u}`:""}`,y)}n>0&&await new Promise(y=>setTimeout(y,n))}throw new Error(`timed out after ${h} failed attempts${u?`: ${u}`:""}`)},l=async function(){let f=s.fromBlockLog;if(f<0&&(f=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number")+f),typeof e!="string")throw new Error("impossible");const u=e.replace("0x","");for(;!o;){const h=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number"),y=await a(()=>s.provider.getLogs({fromBlock:Math.max(0,f-s.deltaBlocksLog),toBlock:h,topics:["0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881"]}),`unable to get NonceChange logs for blocks ${Math.max(0,f-s.deltaBlocksLog)} to ${h}`);f=h;const p=(await Promise.all(y.map(S=>a(()=>s.provider.getTransactionReceipt(S.transactionHash),`unable to get receipt for transaction ${S.transactionHash}`)))).find(S=>S.logs.find(w=>w.topics.length===0&&w.data.replace("0x","")===u||w.topics.length===1&&w.topics[0]==="0x3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd7"&&w.data.length>=64&&w.data.replace("0x","").startsWith(u)));if(p)return oo({receipt:p},await a(()=>s.provider.getTransaction(p.transactionHash),`unable to get transaction ${p.transactionHash}`));o||await new Promise(S=>setTimeout(S,n))}throw new Error(`Timeout waiting for transaction receipt ${e}`)};return r!==void 0?Promise.race([l(),new Promise((c,f)=>setTimeout(()=>{o=!0,f(`Timeout waiting for transaction receipt ${e}`)},r))]):l()}}function pq(t){return t.signer!==void 0&&io.isSigner(t.signer)}class gq extends T9{constructor(e){if(super(io.isSigner(e)?{provider:e.provider}:oo({},e,{provider:e.signer.provider})),this.signer=void 0,this.txnOptions=void 0,this.signer=io.isSigner(e)?e:e.signer,!this.signer.provider)throw new Error("Signer must have a provider")}async getFeeOptions(e,...r){return{options:[]}}async getFeeOptionsRaw(e,r,n){return{options:[]}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}setTransactionOptions(e){this.txnOptions=e}async relay(e,r,n=!0){r!==void 0&&ve.warn("LocalRelayer doesn't accept fee quotes");const i=le.transaction.encodeBundleExecData(e),s=this.signer.sendTransaction(oo({to:e.entrypoint,data:i},this.txnOptions,{gasLimit:9e6}));if(n){const o=await s;return o.receipt=await o.wait(),o}else return s}}const mq="v1",xq="v0.4.0",bq="950b00c821b56110c64d947312b9dea3e197e207";let Ds=function(t){return t.UNKNOWN="UNKNOWN",t.DROPPED="DROPPED",t.QUEUED="QUEUED",t.SENT="SENT",t.SUCCEEDED="SUCCEEDED",t.PARTIALLY_FAILED="PARTIALLY_FAILED",t.FAILED="FAILED",t}({}),wq=function(t){return t.SEND="SEND",t.RECEIVE="RECEIVE",t.BRIDGE_DEPOSIT="BRIDGE_DEPOSIT",t.BRIDGE_WITHDRAW="BRIDGE_WITHDRAW",t.BURN="BURN",t.UNKNOWN="UNKNOWN",t}({}),Cq=function(t){return t.UNKNOWN="UNKNOWN",t.ERC20_TOKEN="ERC20_TOKEN",t.ERC1155_TOKEN="ERC1155_TOKEN",t}({}),Aq=function(t){return t.DESC="DESC",t.ASC="ASC",t}({});class P9{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Relayer/",this.ping=n=>this.fetch(this.url("Ping"),$e({},n)).then(i=>Fe(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),$e({},n)).then(i=>Fe(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),$e({},n)).then(i=>Fe(i).then(s=>({status:s.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),$e({},n)).then(i=>Fe(i).then(s=>({data:s.data}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),$e({},n)).then(i=>Fe(i).then(s=>({chainID:s.chainID}))),this.sendMetaTxn=(n,i)=>this.fetch(this.url("SendMetaTxn"),$e(n,i)).then(s=>Fe(s).then(o=>({status:o.status,txnHash:o.txnHash}))),this.getMetaTxnNonce=(n,i)=>this.fetch(this.url("GetMetaTxnNonce"),$e(n,i)).then(s=>Fe(s).then(o=>({nonce:o.nonce}))),this.getMetaTxnReceipt=(n,i)=>this.fetch(this.url("GetMetaTxnReceipt"),$e(n,i)).then(s=>Fe(s).then(o=>({receipt:o.receipt}))),this.simulate=(n,i)=>this.fetch(this.url("Simulate"),$e(n,i)).then(s=>Fe(s).then(o=>({results:o.results}))),this.updateMetaTxnGasLimits=(n,i)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),$e(n,i)).then(s=>Fe(s).then(o=>({payload:o.payload}))),this.feeTokens=n=>this.fetch(this.url("FeeTokens"),$e({},n)).then(i=>Fe(i).then(s=>({isFeeRequired:s.isFeeRequired,tokens:s.tokens}))),this.feeOptions=(n,i)=>this.fetch(this.url("FeeOptions"),$e(n,i)).then(s=>Fe(s).then(o=>({options:o.options,quote:o.quote}))),this.getMetaTxnNetworkFeeOptions=(n,i)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),$e(n,i)).then(s=>Fe(s).then(o=>({options:o.options}))),this.sentTransactions=(n,i)=>this.fetch(this.url("SentTransactions"),$e(n,i)).then(s=>Fe(s).then(o=>({page:o.page,transactions:o.transactions}))),this.pendingTransactions=(n,i)=>this.fetch(this.url("PendingTransactions"),$e(n,i)).then(s=>Fe(s).then(o=>({page:o.page,transactions:o.transactions}))),this.getGasTank=(n,i)=>this.fetch(this.url("GetGasTank"),$e(n,i)).then(s=>Fe(s).then(o=>({gasTank:o.gasTank}))),this.addGasTank=(n,i)=>this.fetch(this.url("AddGasTank"),$e(n,i)).then(s=>Fe(s).then(o=>({status:o.status,gasTank:o.gasTank}))),this.updateGasTank=(n,i)=>this.fetch(this.url("UpdateGasTank"),$e(n,i)).then(s=>Fe(s).then(o=>({status:o.status,gasTank:o.gasTank}))),this.getGasSponsor=(n,i)=>this.fetch(this.url("GetGasSponsor"),$e(n,i)).then(s=>Fe(s).then(o=>({gasSponsor:o.gasSponsor}))),this.listGasSponsors=(n,i)=>this.fetch(this.url("ListGasSponsors"),$e(n,i)).then(s=>Fe(s).then(o=>({page:o.page,gasSponsors:o.gasSponsors}))),this.addGasSponsor=(n,i)=>this.fetch(this.url("AddGasSponsor"),$e(n,i)).then(s=>Fe(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.updateGasSponsor=(n,i)=>this.fetch(this.url("UpdateGasSponsor"),$e(n,i)).then(s=>Fe(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.removeGasSponsor=(n,i)=>this.fetch(this.url("RemoveGasSponsor"),$e(n,i)).then(s=>Fe(s).then(o=>({status:o.status}))),this.reportGasSponsorUsage=(n,i)=>this.fetch(this.url("ReportGasSponsorUsage"),$e(n,i)).then(s=>Fe(s).then(o=>({gasSponsorUsage:o.gasSponsorUsage}))),this.nextGasTankBalanceAdjustmentNonce=(n,i)=>this.fetch(this.url("NextGasTankBalanceAdjustmentNonce"),$e(n,i)).then(s=>Fe(s).then(o=>({nonce:o.nonce}))),this.adjustGasTankBalance=(n,i)=>this.fetch(this.url("AdjustGasTankBalance"),$e(n,i)).then(s=>Fe(s).then(o=>({status:o.status,adjustment:o.adjustment}))),this.getGasTankBalanceAdjustment=(n,i)=>this.fetch(this.url("GetGasTankBalanceAdjustment"),$e(n,i)).then(s=>Fe(s).then(o=>({adjustment:o.adjustment}))),this.listGasTankBalanceAdjustments=(n,i)=>this.fetch(this.url("ListGasTankBalanceAdjustments"),$e(n,i)).then(s=>Fe(s).then(o=>({page:o.page,adjustments:o.adjustments}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const $e=(t={},e={})=>({method:"POST",headers:oo({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Fe=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});var Hl=Object.freeze({__proto__:null,WebRPCVersion:mq,WebRPCSchemaVersion:xq,WebRPCSchemaHash:bq,ETHTxnStatus:Ds,TransferType:wq,FeeTokenType:Cq,SortOrder:Aq,Relayer:P9});const Eq=[Ds.DROPPED,Ds.SUCCEEDED,Ds.PARTIALLY_FAILED,Ds.FAILED],Sq=[Ds.DROPPED,Ds.PARTIALLY_FAILED,Ds.FAILED];function kq(t){return t.url!==void 0&&typeof t.url=="string"&&t.provider!==void 0&&po.isProvider(t.provider)}const _q=typeof global=="object"?global.fetch:window.fetch;class I9{constructor(e){if(this.options=e,this.service=void 0,this.provider=void 0,this._fetch=(r,n)=>{const i={},{jwtAuth:s,projectAccessKey:o}=this.options;return s&&s.length>0&&(i.Authorization=`BEARER ${s}`),o&&o.length>0&&(i["X-Access-Key"]=o),n.headers=oo({},n.headers,i),_q(r,n)},this.service=new P9(e.url,this._fetch),po.isProvider(e.provider))this.provider=e.provider;else{const{jwtAuth:r,projectAccessKey:n}=this.options,i=Gf(e.provider.url,n,r);this.provider=new L0(i)}}async waitReceipt(e,r=1e3,n=5,i){typeof e!="string"&&(e=le.transaction.intendedTransactionID(e)),ve.info(`[rpc-relayer/waitReceipt] waiting for ${e}`);let s=0;for(;i===void 0||!i();){try{const{receipt:o}=await this.service.getMetaTxnReceipt({metaTxID:e});if(o&&o.txnReceipt&&o.txnReceipt!=="null"&&Eq.includes(o.status))return{receipt:o}}catch(o){if(s++,s===n)throw o}(i===void 0||!i())&&await new Promise(o=>setTimeout(o,r))}throw new Error(`Cancelled waiting for transaction receipt ${e}`)}async simulate(e,...r){const i=qr.encode([le.transaction.MetaTransactionsType],[le.transaction.sequenceTxAbiEncode(r)]);return(await this.service.simulate({wallet:e,transactions:i})).results}async getFeeOptions(e,...r){const n=await this.service.feeTokens();if(n.isFeeRequired){const i=n.tokens.map(l=>l.symbol).join(", ");ve.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${i}`);const s=await this.getNonce(e);if(!this.provider)throw ve.warn("[rpc-relayer/getFeeOptions] provider not set, needed for stub signature"),new Error("provider is not set");const{options:o,quote:a}=await this.service.feeOptions({wallet:e,to:e,data:le.transaction.encodeBundleExecData({entrypoint:e,transactions:r,nonce:s})});return ve.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(o)}`),{options:o,quote:{_tag:"FeeQuote",_quote:a}}}else return ve.info("[rpc-relayer/getFeeOptions] relayer fees are not required"),{options:[]}}async getFeeOptionsRaw(e,r,n){const{options:i,quote:s}=await this.service.feeOptions({wallet:e,to:e,data:Y(r),simulate:n==null?void 0:n.simulate});return{options:i,quote:{_tag:"FeeQuote",_quote:s}}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}async getNonce(e,r){ve.info(`[rpc-relayer/getNonce] get nonce for wallet ${e} space: ${r}`);const n=r!==void 0?V.from(r).toHexString():void 0,i=await this.service.getMetaTxnNonce({walletContractAddress:e,space:n}),s=V.from(i.nonce),[o,a]=le.transaction.decodeNonce(s);return ve.info(`[rpc-relayer/getNonce] got next nonce for wallet ${e} ${a} space: ${o}`),s}async relay(e,r,n=!0){var i=this;ve.info(`[rpc-relayer/relay] relaying signed meta-transactions ${JSON.stringify(e)} with quote ${JSON.stringify(r)}`);let s;if(r!==void 0&&(typeof r._quote=="string"?s=r._quote:ve.warn("[rpc-relayer/relay] ignoring invalid fee quote")),!this.provider)throw ve.warn("[rpc-relayer/relay] provider not set, failed relay"),new Error("provider is not set");const o=le.transaction.encodeBundleExecData(e),a=await this.service.sendMetaTxn({call:{walletAddress:e.intent.wallet,contract:e.entrypoint,input:o},quote:s});if(ve.info(`[rpc-relayer/relay] got relay result ${JSON.stringify(a)}`),n)return this.wait(e.intent.id);{const l={hash:e.intent.id,confirmations:0,from:e.intent.wallet,wait:f=>Promise.reject(new Error("impossible"))},c=async function(u){var h;if(!i.provider)throw new Error("cannot wait for receipt, relayer has no provider set");const y=await i.wait(e.intent.id),m=(h=y.receipt)==null?void 0:h.transactionHash;if(!m)throw new Error("cannot wait for receipt, unknown native transaction hash");return Object.assign(l,y),i.provider.waitForTransaction(m,u)};return l.wait=c,l}}async wait(e,r,n=1e3,i=5){var s=this;let o=!1;const{receipt:a}=await(r!==void 0?Promise.race([this.waitReceipt(e,n,i,()=>o),new Promise((c,f)=>setTimeout(()=>{o=!0,f(`Timeout waiting for transaction receipt ${e}`)},r))]):this.waitReceipt(e,n,i));if(!a.txnReceipt||Sq.includes(a.status))throw new Tq(a);const l=JSON.parse(a.txnReceipt);return{blockHash:l.blockHash,blockNumber:V.from(l.blockNumber).toNumber(),confirmations:1,from:typeof e=="string"?void 0:e.intent.wallet,hash:l.transactionHash,raw:a.txnReceipt,receipt:l,wait:async function(c){return s.provider.waitForTransaction(l.transactionHash,c)}}}}class Tq{constructor(e){this.receipt=e}}function M9(t){return typeof t=="object"&&typeof t.simulate=="function"&&typeof t.getFeeOptions=="function"&&typeof t.gasRefundOptions=="function"&&typeof t.getNonce=="function"&&typeof t.relay=="function"&&typeof t.wait=="function"}const Pq=Object.freeze(Object.defineProperty({__proto__:null,LocalRelayer:gq,ProviderRelayer:T9,ProviderRelayerDefaults:_9,RpcRelayer:I9,RpcRelayerProto:Hl,isLocalRelayerOptions:pq,isProviderRelayerOptions:yq,isRelayer:M9,isRpcRelayerOptions:kq,proto:Hl},Symbol.toStringTag,{value:"Module"}));function R9(t){return t.getAddress!==void 0&&t.buildDeployTransaction!==void 0&&t.predecorateSignedTransactions!==void 0&&t.decorateTransactions!==void 0&&t.sign!==void 0&&t.notifyStatusChange!==void 0}class N9{constructor(e,r=!0){this.signer=e,this.eoa=r}getAddress(){return this.signer.getAddress()}async buildDeployTransaction(e){}async predecorateSignedTransactions(e){return[]}async decorateTransactions(e,r){return e}sign(e,r){return this.signer.signMessage(e)}notifyStatusChange(e,r,n){}suffix(){return[2]}}var Lp=Object.freeze({__proto__:null,isSapientSigner:R9,SignerWrapper:N9});let Bs=function(t){return t[t.INITIAL=0]="INITIAL",t[t.SIGNING=1]="SIGNING",t[t.SIGNED=2]="SIGNED",t[t.ERROR=3]="ERROR",t}({});function O9(t){return t===void 0||t.state===Bs.INITIAL||t.state===Bs.SIGNING}class e1{constructor(e,r=e1.randomTag()){this.tag=r,this.observers=[],this.signers=[],this.count=0,this.setSigners(e)}static randomTag(){return`default-${Y(pi(8)).slice(2)}`}pullId(){return`${this.tag}-${this.count++}`}setSigners(e){this.signers=e.map(r=>R9(r)?r:new N9(r))}async getSigners(){return Promise.all(this.signers.map(async function(e){return e.getAddress()}))}subscribe(e){return this.observers.push(e),()=>{this.observers=this.observers.filter(r=>r!==e)}}async notifyObservers(e,r,n){await Promise.all([...this.signers.map(async function(i){return i.notifyStatusChange(e,r,n)}),...this.observers.map(async function(i){return i(r,n)})])}async buildDeployTransaction(e){let r;for(const n of this.signers){const i=await n.buildDeployTransaction(e);r===void 0?r=i:i!=null&&i.transactions&&(r.transactions=i.transactions.concat(r.transactions))}return r}async predecorateSignedTransactions(e){const r=[];for(const n of this.signers)r.push(...await n.predecorateSignedTransactions(e??{}));return r}async decorateTransactions(e,r){for(const n of this.signers)e=await n.decorateTransactions(e,r??{});return e}signMessage(e){var r=this;const n=this.pullId();return new Promise(async function(i){const{message:s,metadata:o,callback:a,candidates:l}=e,c={ended:!1,message:s,signers:{}};let f=o??{};const u=p=>{f=p,r.notifyObservers(n,c,f)},h=()=>{try{r.notifyObservers(n,c,f);const p=Object.entries(c.signers).filter(([S,w])=>O9(w));if(a&&a(c,u)||p.length===0){c.ended=!0,i(c),r.notifyObservers(n,c,f);return}}catch(p){console.error("Error while notifying observers",p)}};let y=r.signers;if(l){const p=await Promise.all(r.signers.map(async function(S){return S.getAddress()}));y=r.signers.filter((S,w)=>l.includes(p[w]))}const m=await Promise.allSettled(y.map(async function(p){const S=await p.getAddress();c.signers[S]={state:Bs.SIGNING,request:p.sign(s,o??{}).then(w=>{const A=p.suffix();return c.signers[S]={state:Bs.SIGNED,signature:w,suffix:A},h(),w}).catch(w=>{throw c.signers[S]={state:Bs.ERROR,error:w},h(),w})}}));for(let p=0;pqe(e))):qe(t)}const H6=t=>{const e=new Map;for(const r of Object.keys(t.signers)){const n=t.signers[r];if(n.state===Bs.SIGNED){const i=X(n.suffix),s=Ce(["bytes","bytes"],[n.signature,i]);e.set(r,{signature:s,isDynamic:i.length!==1||i[0]!==2})}}return e};class Jf extends io{constructor(e){if(Nt.eq(e.chainId)&&!e.coders.signature.supportsNoChainId)throw new Error(`Sequence version ${e.config.version} doesn't support chainId 0`);super(),this.context=void 0,this.config=void 0,this.address=void 0,this.chainId=void 0,this.provider=void 0,this.relayer=void 0,this.coders=void 0,this.orchestrator=void 0,this._reader=void 0,this.context=e.context,this.config=e.config,this.orchestrator=e.orchestrator,this.coders=e.coders,this.address=e.address,this.chainId=e.chainId,this.provider=e.provider,this.relayer=e.relayer,this._reader=e.reader}static newWallet(e){const r=le.context.addressOf(e.context,e.coders.config.imageHashOf(e.config));return new Jf(_s({},e,{address:r}))}reader(){if(this._reader)return this._reader;if(!this.provider)throw new Error("Wallet status provider requires a provider");return new le.reader.OnChainReader(this.provider)}setConfig(e){this.config=e}setOrchestrator(e){this.orchestrator=e}setAddress(e){this.address=e}getSigners(){return this.orchestrator.getSigners()}async getAddress(){return this.address}async decorateTransactions(e){const r=await this.orchestrator.decorateTransactions(e);if(await this.reader().isDeployed(this.address))return r;const n=[{to:r.entrypoint,data:le.transaction.encodeBundleExecData(r),revertOnError:!0}],i=await this.buildDeployTransaction();return i&&n.unshift(...i.transactions),{entrypoint:this.context.guestModule,chainId:this.chainId,intent:r.intent,transactions:n}}async buildDeployTransaction(e){if(e!=null&&e.ignoreDeployed&&await this.reader().isDeployed(this.address))return;const r=this.coders.config.imageHashOf(this.config);if(le.context.addressOf(this.context,r)!==this.address)throw new Error(`First address of config ${r} doesn't match wallet address ${this.address}`);const n=Jf.buildDeployTransaction(this.context,r);if(e!=null&&e.includeChildren){const i=await this.orchestrator.buildDeployTransaction(e);i&&(n.transactions=i.transactions.concat(n.transactions))}return n}async deploy(e){const r=await this.buildDeployTransaction(e);if(r!==void 0){if(!this.relayer)throw new Error("Wallet deploy requires a relayer");return this.relayer.relay(_s({},r,{chainId:this.chainId,intent:{id:Y(pi(32)),wallet:this.address}}))}}static buildDeployTransaction(e,r){const n=new tr(pr.factory.abi);return{entrypoint:e.guestModule,transactions:[{to:e.factory,data:n.encodeFunctionData(n.getFunction("deploy"),[e.mainModule,r]),gasLimit:1e5,delegateCall:!1,revertOnError:!0,value:0}]}}async buildUpdateConfigurationTransaction(e){if(this.coders.config.update.isKindUsed){const r=await this.reader().implementation(this.address),n=r&&r===this.context.mainModuleUpgradable;return this.coders.config.update.buildTransaction(this.address,e,this.context,n?"later":"first")}return this.coders.config.update.buildTransaction(this.address,e,this.context)}async getNonce(e=0){const r=await this.reader().nonce(this.address,e);if(r===void 0)throw new Error("Unable to determine nonce");return r}async signDigest(e,r){const n=Sp(this.address,this.chainId,e);if(this.coders.config.hasSubdigest(this.config,n))return this.coders.signature.encodeSigners(this.config,new Map,[n],this.chainId).encoded;const i=_s({},r,{digest:e,chainId:this.chainId,address:this.address,config:this.config}),s=X(n),o=await this.orchestrator.signMessage({candidates:this.coders.config.signersOf(this.config).map(l=>l.address),message:s,metadata:i,callback:(l,c)=>{const f=H6(l),u=_s({},i,{parts:f});return c(u),this.coders.signature.hasEnoughSigningPower(this.config,f)}}),a=H6(o);return this.coders.signature.encodeSigners(this.config,a,[],this.chainId).encoded}signMessage(e){return this.signDigest(pe(e),{message:e})}signTransactionBundle(e){if(e.entrypoint!==this.address)throw new Error(`Invalid entrypoint: ${e.entrypoint} !== ${this.address}`);return this.signTransactions(e.transactions,e.nonce)}async fetchNonceOrSpace(e){let r;if(e&&e.space!==void 0)r=V.from(e.space);else{if(e===void 0)return this.randomNonce();if(e&&e.serial===!0)r=0;else return e}const n=await this.reader().nonce(this.address,r);if(n===void 0)throw new Error("Unable to determine nonce");return le.transaction.encodeNonce(r,n)}randomNonce(){const e=V.from(Y(pi(12)));return le.transaction.encodeNonce(e,0)}async signTransactions(e,r,n){const i=await V6(e),s=le.transaction.fromTransactionish(this.address,i);s.length===0&&s.push({to:this.address,data:"0x",value:0,gasLimit:0,delegateCall:!1,revertOnError:!0});const o=await this.fetchNonceOrSpace(r),a=le.transaction.digestOfTransactions(o,s),l=_s({digest:a,transactions:s},n),c=await this.signDigest(a,l);return{intent:{id:Sp(this.address,this.chainId,a),wallet:this.address},chainId:this.chainId,transactions:s,entrypoint:this.address,nonce:o,signature:c}}async sendSignedTransaction(e,r){if(!this.relayer)throw new Error("Wallet sendTransaction requires a relayer");return this.relayer.relay(e,r)}async sendTransaction(e,r){let n;(r==null?void 0:r.nonce)!==void 0?n=r.nonce:r!=null&&r.serial?n=0:n=this.randomNonce();const i=await this.signTransactions(e,n),s=await this.decorateTransactions(i);return this.sendSignedTransaction(s,r==null?void 0:r.quote)}async fillGasLimits(e){const r=await V6(e),n=le.transaction.fromTransactionish(this.address,r),i=this.relayer;if(!i)throw new Error("Wallet fillGasLimits requires a relayer");const s=await i.simulate(this.address,...n);return n.map((o,a)=>{const l=o.gasLimit?V.from(o.gasLimit).toNumber():s[a].gasLimit;return _s({},o,s[a],{gasLimit:l})})}connect(e,r){return this.provider=e,this.relayer=r,this}signTransaction(e){throw new Error("Method not implemented.")}}function Fi(){return Fi=Object.assign?Object.assign.bind():function(t){for(var e=1;eMq(t[e])):!1}function Nq(t){if(!t)return[];const e=V.from(t.value);switch(t.token.type){case Hl.FeeTokenType.UNKNOWN:return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.to,value:e.toHexString(),data:[]}];case Hl.FeeTokenType.ERC20_TOKEN:if(!t.token.contractAddress)throw new Error("No contract address for ERC-20 fee option");return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.token.contractAddress,value:0,data:new tr([{constant:!1,inputs:[{type:"address"},{type:"uint256"}],name:"transfer",outputs:[],type:"function"}]).encodeFunctionData("transfer",[t.to,e.toHexString()])}];default:throw new Error(`Unhandled fee token type ${t.token.type}`)}}class Oq{constructor(e,r,n){this.account=e,this.chainId=r,this.options=n,this._isSigner=!0}get provider(){return this.account.providerFor(this.chainId)}async getAddress(){return this.account.address}signMessage(e){var r,n;return this.account.signMessage(e,this.chainId,(r=(n=this.options)==null?void 0:n.cantValidateBehavior)!=null?r:"throw")}async defaultSelectFee(e,r){if(r.length===0)return;const n=[{constant:!0,inputs:[{type:"address"}],name:"balanceOf",outputs:[{type:"uint256"}],type:"function"}];for(const i of r)if(i.token.type===Hl.FeeTokenType.UNKNOWN){if((await this.getBalance()).gte(V.from(i.value)))return i}else if(i.token.contractAddress&&i.token.type===Hl.FeeTokenType.ERC20_TOKEN&&(await new _a(i.token.contractAddress,n,this.provider).balanceOf(this.account.address)).gte(V.from(i.value)))return i;throw new Error("No fee option available - not enough balance")}async sendTransaction(e,r){var n,i,s,o,a;const l=Rq(e)?await qe(e):e,c=await this.account.prepareTransactions({txs:l,chainId:this.chainId,stubSignatureOverrides:(n=(i=this.options)==null?void 0:i.stubSignatureOverrides)!=null?n:new Map,simulateForFeeOptions:r==null?void 0:r.simulateForFeeOptions}),u=await((s=(o=this.options)==null?void 0:o.selectFee)!=null?s:this.defaultSelectFee.bind(this))(l,c.feeOptions),h=[...c.transactions,...Nq(u)];return this.account.sendTransaction(h,this.chainId,c.feeQuote,void 0,void 0,(a=this.options)!=null&&a.nonceSpace?{nonceSpace:this.options.nonceSpace}:void 0)}getBalance(e){return this.provider.getBalance(this.account.address,e)}call(e,r){return this.provider.call(e,r)}async resolveName(e){const r=await this.provider.resolveName(e);if(!r)throw new Error(`Could not resolve name ${e}`);return r}connect(e){throw new Error("Method not implemented.")}signTransaction(e){throw new Error("Method not implemented.")}getTransactionCount(e){throw new Error("Method not implemented.")}estimateGas(e){throw new Error("Method not implemented.")}getChainId(){return Promise.resolve(V.from(this.chainId).toNumber())}getGasPrice(){throw new Error("Method not implemented.")}getFeeData(){throw new Error("Method not implemented.")}checkTransaction(e){throw new Error("Method not implemented.")}populateTransaction(e){throw new Error("Method not implemented.")}_checkProvider(e){throw new Error("Method not implemented.")}}class Dq{async isDeployed(e){return!1}async implementation(e){}async imageHash(e){}async nonce(e,r){return Nt}async isValidSignature(e,r,n){throw new Error("Method not supported.")}}class qi{constructor(e){this.address=void 0,this.networks=void 0,this.tracker=void 0,this.contexts=void 0,this.migrator=void 0,this.migrations=void 0,this.orchestrator=void 0,this.jwt=void 0,this.projectAccessKey=void 0,this.address=we(e.address),this.contexts=e.contexts,this.tracker=e.tracker,this.networks=e.networks,this.orchestrator=e.orchestrator,this.jwt=e.jwt,this.projectAccessKey=e.projectAccessKey,this.migrations=e.migrations||Bp.DefaultMigrations,this.migrator=new Dp.Migrator(e.tracker,this.migrations,this.contexts)}getSigner(e,r){return new Oq(this,e,r)}static async new(e){var r;const i=new Dp.Migrator(e.tracker,(r=e.migrations)!=null?r:Bp.DefaultMigrations,e.contexts).lastMigration(),s=i.configCoder,o=s.fromSimple(e.config),a=s.imageHashOf(o),l=e.contexts[i.version],c=le.context.addressOf(l,a);return await e.tracker.saveCounterfactualWallet({config:o,context:Object.values(e.contexts)}),new qi({address:c,tracker:e.tracker,contexts:e.contexts,networks:e.networks,orchestrator:e.orchestrator,migrations:e.migrations,projectAccessKey:e.projectAccessKey})}getAddress(){return Promise.resolve(this.address)}get version(){return this.migrator.lastMigration().version}get coders(){const e=this.migrator.lastMigration();return{signature:e.signatureCoder,config:e.configCoder}}network(e){const r=V.from(e),n=this.networks.find(i=>r.eq(i.chainId));if(!n)throw new Error(`Network not found for chainId ${e}`);return n}providerFor(e){const r=this.network(e);if(!r.provider&&!r.rpcUrl)throw new Error(`Provider not found for chainId ${e}`);return r.provider||new L0(Gf(r.rpcUrl,this.projectAccessKey,this.jwt),{name:"",chainId:V.from(e).toNumber()})}reader(e){return Nt.eq(e)?new Dq:new le.reader.OnChainReader(this.providerFor(e))}relayer(e){const r=this.network(e);if(!r.relayer)throw new Error(`Relayer not found for chainId ${e}`);return M9(r.relayer)?r.relayer:new I9(Fi({},r.relayer,{projectAccessKey:this.projectAccessKey,jwtAuth:this.jwt}))}setOrchestrator(e){this.orchestrator=e}setJwt(e){this.jwt=e}contextFor(e){const r=this.contexts[e];if(!r)throw new Error(`Context not found for version ${e}`);return r}walletForStatus(e,r){const n=wr.coderFor(r.version);return this.walletFor(e,this.contextFor(r.version),r.config,n)}walletFor(e,r,n,i){const s=Nt.eq(e);return new Jf({config:n,context:r,chainId:e,coders:i,relayer:s?void 0:this.relayer(e),address:this.address,orchestrator:this.orchestrator,reader:this.reader(e)})}async status(e,r=!1){var n=this;const i=this.reader(e).isDeployed(this.address),s=this.tracker.imageHashOfCounterfactualWallet({wallet:this.address}).then(R=>{if(!R)throw new Error(`Counterfactual imageHash not found for wallet ${this.address}`);return R}),o=s.then(R=>E9.counterfactualVersion(this.address,R.imageHash,Object.values(this.contexts))),a=async function(){if(!await i)return o;const F=await n.reader(e).implementation(n.address);if(!F)throw new Error(`Implementation not found for wallet ${n.address}`);const z=Object.values(n.contexts);for(let j=0;j0?p[p.length-1].nextImageHash:h,w=await this.tracker.configOfImageHash({imageHash:S});if(!w)throw new Error(`Config not found for imageHash ${S}`);const A=await i,k=await s,I=wr.coderFor(y).config.checkpointOf(w);return{original:Fi({},k,{version:await o}),onChain:{imageHash:u,config:await c,version:f,deployed:A},fullyMigrated:y===this.version,signedMigrations:m,version:y,presignedConfigurations:p,imageHash:S,config:w,checkpoint:I,canOnchainValidate:f===this.version&&A}}mustBeFullyMigrated(e){if(!e.fullyMigrated)throw new Error(`Wallet ${this.address} is not fully migrated`)}async predecorateSignedTransactions(e,r){const n=await this.orchestrator.predecorateSignedTransactions({chainId:r}),i=await this.predecorateTransactions([],e,r);return le.transaction.fromTransactionish(this.address,i).length>0&&n.push(await this.signTransactions(i,r)),n}async predecorateTransactions(e,r,n){if(r.onChain.imageHash!==r.imageHash){const s=await this.walletForStatus(n,r).buildUpdateConfigurationTransaction(r.config);return[Array.isArray(e)?e:[e],s.transactions].flat()}return e}async decorateTransactions(e,r,n){var i,s;if(!Array.isArray(e))return this.decorateTransactions([e],r,n);n=(i=n)!=null?i:e[0].chainId;const o=await this.buildBootstrapTransactions(r,n),a=o.transactions.length>0;if(!a&&e.length===1)return e[0];const{entrypoint:l}=a?o:e[0],c={entrypoint:l,chainId:n,intent:(s=e[0])==null?void 0:s.intent,transactions:[...o.transactions,...e.map(f=>({to:f.entrypoint,data:le.transaction.encodeBundleExecData(f),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}))]};if(!r.onChain.deployed){const f=le.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,n,c.transactions);c.intent===void 0?c.intent={id:f,wallet:this.address}:c.intent.id=f}return c}async decorateSignature(e,r){if(!r.presignedConfigurations||r.presignedConfigurations.length===0)return e;const n=this.coders.signature,i=r.presignedConfigurations.map(o=>o.signature),s=n.chainSignatures(e,i);return n.trim(s)}async publishWitness(){const e=pe(Ve(`This is a Sequence account woo! ${Date.now()}`)),r=await this.signDigest(e,0,!1),n=this.coders.signature.decode(r),i=this.coders.signature.signaturesOfDecoded(n);return this.tracker.saveWitnesses({wallet:this.address,digest:e,chainId:0,signatures:i})}async signDigest(e,r,n=!0,i="ignore",s){const o=Nt.eq(r)?this.networks[0].chainId:r,a=await this.status(o);if(this.mustBeFullyMigrated(a),!a.canOnchainValidate&&i==="throw")throw new Error("Wallet cannot validate onchain");const c=await this.walletForStatus(r,a).signDigest(e,s),f=n?this.decorateSignature(c,a):c;if(!a.canOnchainValidate)switch(i){case"ignore":return f;case"eip6492":return this.buildEIP6492Signature(await f,a,r)}return f}buildOnChainSignature(e){const r=le.signature.subdigestOf({digest:Y(e),chainId:0,address:this.address}),n=Y(r),i=this.coders.config.fromSimple({threshold:32768,checkpoint:0,signers:[],subdigests:[n]}),s=new tr(pr.mainModule.abi),o={entrypoint:this.address,transactions:[{to:this.address,data:s.encodeFunctionData("setExtraImageHash",[this.coders.config.imageHashOf(i),"57896044618658097711785492504343953926634992332820282019728792003956564819968"]),gasLimit:25e4}]};this.tracker.saveWalletConfig({config:i});const a=this.coders.signature.encodeSigners(i,new Map,[n],0).encoded;return{bundle:o,signature:a}}async buildEIP6492Signature(e,r,n){const i=await this.buildBootstrapTransactions(r,n);if(i.transactions.length===0)throw new Error("Cannot build EIP-6492 signature without bootstrap transactions");const s=qr.encode(["address","bytes","bytes"],[i.entrypoint,le.transaction.encodeBundleExecData(i),e]);return Ce(["bytes","bytes32"],[s,le.EIP6492.EIP_6492_SUFFIX])}async editConfig(e){const r=await this.status(0).then(i=>i.config),n=this.coders.config.editConfig(r,Fi({},e,{checkpoint:this.coders.config.checkpointOf(r).add(1)}));return this.updateConfig(n)}async updateConfig(e){if(!this.coders.config.isWalletConfig(e))throw new Error(`Invalid config for wallet ${this.address}`);const r=this.coders.config.imageHashOf(e),n=this.coders.signature.hashSetImageHash(r),i=await this.signDigest(n,0,!1);await this.tracker.savePresignedConfiguration({wallet:this.address,nextConfig:e,signature:i});const s=await this.tracker.configOfImageHash({imageHash:r,noCache:!0});if(!s||this.coders.config.imageHashOf(s)!==r)throw Error(`Reverse lookup failed for imageHash ${r}`)}async buildBootstrapTransactions(e,r){var n;const i=await this.orchestrator.buildDeployTransaction({chainId:r}),s=(n=i==null?void 0:i.transactions)!=null?n:[];if(!e.onChain.deployed){const l=Jf.buildDeployTransaction(e.original.context,e.original.imageHash);s.push(...l.transactions)}s.length,s.push(...e.signedMigrations.map(l=>({to:l.tx.entrypoint,data:le.transaction.encodeBundleExecData(l.tx),value:0,gasLimit:0,revertOnError:!0,delegateCall:!1})));const o=e.signedMigrations.length>0?e.signedMigrations[0].tx.intent.id:le.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,r,s),{guestModule:a}=this.contextFor(e.version);return{entrypoint:a,transactions:s,chainId:r,intent:{id:o,wallet:this.address}}}async bootstrapTransactions(e,r){const n=r||await this.status(e);return this.buildBootstrapTransactions(n,e)}async doBootstrap(e,r,n){const i=await this.bootstrapTransactions(e,n);return this.relayer(e).relay(Fi({},i,{chainId:e}),r)}signMessage(e,r,n="ignore"){return this.signDigest(pe(e),r,!0,n)}async signTransactions(e,r,n,i){const s=n||await this.status(r);this.mustBeFullyMigrated(s);const o=this.walletForStatus(r,s),a={address:this.address,digest:"",chainId:r,config:{version:this.version},decorate:!0,cantValidateBehavior:"ignore"},l=(i==null?void 0:i.nonceSpace)&&{space:i==null?void 0:i.nonceSpace,serial:i==null?void 0:i.serial},c=await o.signTransactions(e,l,a);return Fi({},c,{signature:await this.decorateSignature(c.signature,s)})}async signMigrations(e,r){const n=await this.status(e);if(n.fullyMigrated)return!1;const i=this.walletForStatus(e,n),s=r(i.config),o=await this.migrator.signNextMigration(this.address,n.version,i,s);if(!o)return!1;await this.tracker.saveWalletConfig({config:s});const a=wr.coderFor(s.version).config,l=a.imageHashOf(s),c=await this.tracker.configOfImageHash({imageHash:l,noCache:!0});if(!c||a.imageHashOf(c)!==l)throw Error(`Reverse lookup failed for imageHash ${l}`);return await this.tracker.saveMigration(this.address,o,this.contexts),!0}async signAllMigrations(e){var r=this;const n=[];return{signedMigrations:(await Promise.all(this.networks.map(async function(o){try{return await r.signMigrations(o.chainId,e)}catch(a){return console.warn(`Failed to sign migrations for chain ${o.chainId}`,a),n.push(o.chainId),null}}))).filter(o=>o!==null),failedChains:n}}async isMigratedAllChains(){var e=this;const r=[];return{migratedAllChains:(await Promise.all(this.networks.map(async function(s){try{return await e.status(s.chainId)}catch(o){return r.push(s.chainId),console.warn(`Failed to get status for chain ${s.chainId}`,o),{fullyMigrated:!0}}}))).every(s=>s.fullyMigrated),failedChains:r}}async sendSignedTransactions(e,r,n,i,s){if(!Array.isArray(e))return this.sendSignedTransactions([e],r,n,i,s);const o=i||await this.status(r);this.mustBeFullyMigrated(o);const a=await this.decorateTransactions(e,o,r);return s==null||s(a),this.relayer(r).relay(a,n)}async fillGasLimits(e,r,n){return this.walletForStatus(r,n||await this.status(r)).fillGasLimits(e)}async gasRefundQuotes(e,r,n,i,s){const o=i||await this.status(r),a=this.walletForStatus(r,o),l=await this.predecorateTransactions(e,o,r),c=le.transaction.fromTransactionish(this.address,l),f=a.coders.config.buildStubSignature(a.config,n),u=Y(pi(32)),h={chainId:r,intent:{id:u,wallet:this.address},signature:f,transactions:c,entrypoint:this.address,nonce:0},y=await this.decorateTransactions(h,o),m=le.transaction.encodeBundleExecData(y),p=await this.relayer(r).getFeeOptionsRaw(y.entrypoint,m,s);return Fi({},p,{decorated:y})}async prepareTransactions(e){const r=await this.status(e.chainId),n=await this.fillGasLimits(e.txs,e.chainId,r),i=await this.gasRefundQuotes(n,e.chainId,e.stubSignatureOverrides,r,{simulate:e.simulateForFeeOptions}),s=le.transaction.unwind(this.address,i.decorated.transactions);return{transactions:n,flatDecorated:s,feeOptions:i.options,feeQuote:i.quote}}async sendTransaction(e,r,n,i=!1,s,o){const a=await this.status(r),l=i?e:await this.predecorateTransactions(e,a,r),f=le.transaction.fromTransactionish(this.address,l).length>0?await this.signTransactions(l,r,void 0,o):void 0,u=await this.orchestrator.predecorateSignedTransactions({chainId:r}),h=[];return f!==void 0&&f.transactions.length>0&&h.push(f),h.push(...u.filter(y=>y.transactions.length>0)),this.sendSignedTransactions(h,r,n,void 0,s)}async signTypedData(e,r,n,i,s="ignore"){const o=du({domain:e,types:r,message:n});return this.signDigest(o,i,!0,s)}async getSigners(){var e=this;const r=n=>n.length?n[n.length-1]:void 0;return(await Promise.all(this.networks.map(async function({chainId:n,name:i}){try{var s;const o=await e.status(n);let a=(s=r(o.presignedConfigurations))==null?void 0:s.nextImageHash;if(!a&&o.onChain.version!==o.version){const u=r(o.signedMigrations);if(u){const{toVersion:h,toConfig:y}=u;a=wr.genericCoderFor(h).config.imageHashOf(y)}}a||(a=o.onChain.imageHash);const l=await e.tracker.configOfImageHash({imageHash:a});if(!l)throw new Error(`unable to find config for image hash ${a}`);return wr.genericCoderFor(l.version).config.signersOf(l).map(u=>Fi({},u,{network:n}))}catch(o){return console.warn(`unable to get signers on network ${n} ${i}`,o),[]}}))).flat()}async getAllSigners(){var e=this;const r=[];return await Promise.all(this.networks.map(async function(n){const i=n.chainId,s=await e.status(i,!0),o=[s.onChain.imageHash,...s.onChain.version!==s.version?s.signedMigrations.map(a=>wr.coderFor(a.toVersion).config.imageHashOf(a.toConfig)):[],...s.presignedConfigurations.map(a=>a.nextImageHash)];return Promise.all(o.map(async function(a,l){const c=l===o.length-1,f=await e.tracker.configOfImageHash({imageHash:a});if(!f){console.warn(`AllSigners may be incomplete, config not found for imageHash ${a}`);return}wr.genericCoderFor(f.version).config.signersOf(f).forEach(y=>{const m=r.find(p=>p.address===y.address&&p.network===i);if(m&&c&&m.flaggedForRemoval){m.flaggedForRemoval=!1;return}m||r.push({address:y.address,weight:y.weight,network:i,flaggedForRemoval:!c})})}))})),r}}function Bq(t){return t instanceof qi}const Lq=Object.freeze(Object.defineProperty({__proto__:null,Account:qi,isAccount:Bq},Symbol.toStringTag,{value:"Module"}));function K0(){return K0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),cr({},n)).then(i=>fr(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),cr({},n)).then(i=>fr(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),cr({},n)).then(i=>fr(i).then(s=>({status:s.status}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),cr({},n)).then(i=>fr(i).then(s=>({chainID:s.chainID}))),this.getEtherBalance=(n,i)=>this.fetch(this.url("GetEtherBalance"),cr(n,i)).then(s=>fr(s).then(o=>({balance:o.balance}))),this.getTokenBalances=(n,i)=>this.fetch(this.url("GetTokenBalances"),cr(n,i)).then(s=>fr(s).then(o=>({page:o.page,balances:o.balances}))),this.getTokenSupplies=(n,i)=>this.fetch(this.url("GetTokenSupplies"),cr(n,i)).then(s=>fr(s).then(o=>({page:o.page,contractType:o.contractType,tokenIDs:o.tokenIDs}))),this.getTokenSuppliesMap=(n,i)=>this.fetch(this.url("GetTokenSuppliesMap"),cr(n,i)).then(s=>fr(s).then(o=>({supplies:o.supplies}))),this.getBalanceUpdates=(n,i)=>this.fetch(this.url("GetBalanceUpdates"),cr(n,i)).then(s=>fr(s).then(o=>({page:o.page,balances:o.balances}))),this.getTransactionHistory=(n,i)=>this.fetch(this.url("GetTransactionHistory"),cr(n,i)).then(s=>fr(s).then(o=>({page:o.page,transactions:o.transactions}))),this.syncBalance=(n,i)=>this.fetch(this.url("SyncBalance"),cr(n,i)).then(s=>fr(s).then(o=>({}))),this.fetchTransactionReceipt=(n,i)=>this.fetch(this.url("FetchTransactionReceipt"),cr(n,i)).then(s=>fr(s).then(o=>({receipt:o.receipt}))),this.fetchTransactionReceiptWithFilter=(n,i)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),cr(n,i)).then(s=>fr(s).then(o=>({receipt:o.receipt}))),this.getAllWebhookListeners=(n,i)=>this.fetch(this.url("GetAllWebhookListeners"),cr(n,i)).then(s=>fr(s).then(o=>({listeners:o.listeners}))),this.getWebhookListener=(n,i)=>this.fetch(this.url("GetWebhookListener"),cr(n,i)).then(s=>fr(s).then(o=>({listener:o.listener}))),this.addWebhookListener=(n,i)=>this.fetch(this.url("AddWebhookListener"),cr(n,i)).then(s=>fr(s).then(o=>({status:o.status,listener:o.listener}))),this.updateWebhookListener=(n,i)=>this.fetch(this.url("UpdateWebhookListener"),cr(n,i)).then(s=>fr(s).then(o=>({status:o.status}))),this.removeWebhookListener=(n,i)=>this.fetch(this.url("RemoveWebhookListener"),cr(n,i)).then(s=>fr(s).then(o=>({status:o.status}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const cr=(t={},e={})=>({method:"POST",headers:K0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),fr=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),W6=typeof global=="object"?global.fetch:window.fetch;class B9 extends D9{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,W6),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(i,s)=>{const o={},a=this.jwtAuth,l=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),l&&l.length>0&&(o["X-Access-Key"]=l),s.headers=K0({},s.headers,o),W6(i,s)},this.fetch=this._fetch}}const Kq=Object.freeze(Object.defineProperty({__proto__:null,ContractType:zq,EventLogDataType:Vq,EventLogType:Uq,Indexer:D9,SequenceIndexer:B9,SortOrder:Gq,TransactionStatus:Wq,TransactionType:qq,TxnTransferType:Hq,WebRPCSchemaHash:jq,WebRPCSchemaVersion:Fq,WebRPCVersion:$q},Symbol.toStringTag,{value:"Module"}));function J0(){return J0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),ur({},n)).then(i=>dr(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),ur({},n)).then(i=>dr(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),ur({},n)).then(i=>dr(i).then(s=>({status:s.status}))),this.getTokenMetadata=(n,i)=>this.fetch(this.url("GetTokenMetadata"),ur(n,i)).then(s=>dr(s).then(o=>({tokenMetadata:o.tokenMetadata}))),this.refreshTokenMetadata=(n,i)=>this.fetch(this.url("RefreshTokenMetadata"),ur(n,i)).then(s=>dr(s).then(o=>({status:o.status}))),this.getTokenMetadataBatch=(n,i)=>this.fetch(this.url("GetTokenMetadataBatch"),ur(n,i)).then(s=>dr(s).then(o=>({contractTokenMetadata:o.contractTokenMetadata}))),this.searchTokenMetadata=(n,i)=>this.fetch(this.url("SearchTokenMetadata"),ur(n,i)).then(s=>dr(s).then(o=>({page:o.page,tokenMetadata:o.tokenMetadata}))),this.searchTokenIDs=(n,i)=>this.fetch(this.url("SearchTokenIDs"),ur(n,i)).then(s=>dr(s).then(o=>({page:o.page,tokenIds:o.tokenIds}))),this.tokenCollectionFilters=(n,i)=>this.fetch(this.url("TokenCollectionFilters"),ur(n,i)).then(s=>dr(s).then(o=>({filters:o.filters}))),this.getContractInfo=(n,i)=>this.fetch(this.url("GetContractInfo"),ur(n,i)).then(s=>dr(s).then(o=>({contractInfo:o.contractInfo}))),this.getContractInfoBatch=(n,i)=>this.fetch(this.url("GetContractInfoBatch"),ur(n,i)).then(s=>dr(s).then(o=>({contractInfoMap:o.contractInfoMap}))),this.searchContractInfo=(n,i)=>this.fetch(this.url("SearchContractInfo"),ur(n,i)).then(s=>dr(s).then(o=>({contractInfoList:o.contractInfoList}))),this.searchContractInfoBatch=(n,i)=>this.fetch(this.url("SearchContractInfoBatch"),ur(n,i)).then(s=>dr(s).then(o=>({contractInfoByChain:o.contractInfoByChain}))),this.searchMetadata=(n,i)=>this.fetch(this.url("SearchMetadata"),ur(n,i)).then(s=>dr(s).then(o=>({tokenMetadata:o.tokenMetadata,contractInfo:o.contractInfo}))),this.projectSetTokenMetadata=(n,i)=>this.fetch(this.url("ProjectSetTokenMetadata"),ur(n,i)).then(s=>dr(s).then(o=>({ok:o.ok}))),this.getNiftyswapTokenQuantity=(n,i)=>this.fetch(this.url("GetNiftyswapTokenQuantity"),ur(n,i)).then(s=>dr(s).then(o=>({quantity:o.quantity}))),this.getNiftyswapUnitPrices=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPrices"),ur(n,i)).then(s=>dr(s).then(o=>({prices:o.prices}))),this.getNiftyswapUnitPricesWithQuantities=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPricesWithQuantities"),ur(n,i)).then(s=>dr(s).then(o=>({prices:o.prices}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const ur=(t={},e={})=>({method:"POST",headers:J0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),dr=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),q6=typeof global=="object"?global.fetch:window.fetch;class $9 extends L9{constructor(e="https://metadata.sequence.app",r,n){super(e.endsWith("/")?e.slice(0,-1):e,q6),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(i,s)=>{const o={},a=this.jwtAuth,l=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),l&&l.length>0&&(o["X-Access-Key"]=l),s.headers=J0({},s.headers,o),q6(i,s)},this.fetch=this._fetch}}const rG=Object.freeze(Object.defineProperty({__proto__:null,ContractType:Xq,Metadata:L9,PropertyType:Zq,SequenceMetadata:$9,SortOrder:tG,SwapType:eG,WebRPCSchemaHash:Yq,WebRPCSchemaVersion:Qq,WebRPCVersion:Jq},Symbol.toStringTag,{value:"Module"}));function nG(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function iG(t){return t.startsWith("ipfs://")}class sG{constructor(e,r,n=1e3){this.provider=e,this.solver=r,this.window=n,this.pending=new Map}async runByEIP5719(e,r,n){const i=`${e}-${r}-${n}`,s=Date.now();if(this.pending.has(i)&&s-this.pending.get(i).timestamp10)throw new Error("EIP5719 - Too many tries");if(le.signer.canRecover(n)){const l=le.signer.recoverSigner(r,n);if(l&&l.toLowerCase()===t.toLowerCase())return n}try{if(await le.signer.isValidSignature(t,r,n,e))return n}catch{}const o=await aG(oG(t,e).getAlternativeSignature(r));if(!o||o==="")throw new Error("EIP5719 - Invalid signature and no alternative signature");const a=Y(await(i||new lG).resolve(o));if(!a||a==="")throw new Error("EIP5719 - Empty alternative signature");if(a===Y(n))throw new Error("EIP5719 - Alternative signature is invalid or the same");return F9(t,e,r,a,i,s+1)}class lG{constructor(e="https://cloudflare-ipfs.com/ipfs/"){var r=this;this.gateway=e,this.uri=n=>iG(n)?nG(n,this.gateway):n,this.resolve=async function(n){const i=r.uri(n),s=await fetch(i);if(!s.ok)throw new Error(`URISolverIPFS - Failed to fetch ${i}`);return await s.text()}}}const cG=(t,e)=>e.some(r=>t instanceof r);let G6,K6;function fG(){return G6||(G6=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function uG(){return K6||(K6=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const j9=new WeakMap,$p=new WeakMap,z9=new WeakMap,Mv=new WeakMap,Ox=new WeakMap;function dG(t){const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{r(Qs(t.result)),i()},o=()=>{n(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&j9.set(r,t)}).catch(()=>{}),Ox.set(e,t),e}function hG(t){if($p.has(t))return;const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{r(),i()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});$p.set(t,e)}let Fp={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return $p.get(t);if(e==="objectStoreNames")return t.objectStoreNames||z9.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Qs(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function vG(t){Fp=t(Fp)}function yG(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(Rv(this),e,...r);return z9.set(n,e.sort?e.sort():[e]),Qs(n)}:uG().includes(t)?function(...e){return t.apply(Rv(this),e),Qs(j9.get(this))}:function(...e){return Qs(t.apply(Rv(this),e))}}function pG(t){return typeof t=="function"?yG(t):(t instanceof IDBTransaction&&hG(t),cG(t,fG())?new Proxy(t,Fp):t)}function Qs(t){if(t instanceof IDBRequest)return dG(t);if(Mv.has(t))return Mv.get(t);const e=pG(t);return e!==t&&(Mv.set(t,e),Ox.set(e,t)),e}const Rv=t=>Ox.get(t);function gG(t,e,{blocked:r,upgrade:n,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),a=Qs(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Qs(o.result),l.oldVersion,l.newVersion,Qs(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),a.then(l=>{s&&l.addEventListener("close",()=>s()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}const mG=["get","getKey","getAll","getAllKeys","count"],xG=["put","add","delete","clear"],Nv=new Map;function J6(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Nv.get(e))return Nv.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,i=xG.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||mG.includes(r)))return;const s=async function(o,...a){const l=this.transaction(o,i?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(a.shift())),(await Promise.all([c[r](...a),i&&l.done]))[0]};return Nv.set(e,s),s}vG(t=>({...t,get:(e,r,n)=>J6(e,r)||t.get(e,r,n),has:(e,r)=>!!J6(e,r)||t.has(e,r)}));class bG{constructor(){this.loadPresignedConfiguration=void 0,this.savePresignedConfiguration=void 0,this.saveWitnesses=void 0,this.configOfImageHash=void 0,this.saveWalletConfig=void 0,this.imageHashOfCounterfactualWallet=void 0,this.saveCounterfactualWallet=void 0,this.walletsOfSigner=void 0}}var wG=Object.freeze({__proto__:null,ConfigTracker:bG});class CG{constructor(e){this.tracker=e}async loadPresignedConfiguration(e){return console.debug("? loadPresignedConfiguration"),Lr(e,"? "),Lr(await this.tracker.loadPresignedConfiguration(e),"! ")}savePresignedConfiguration(e){return console.debug("? savePresignedConfiguration"),Lr(e,"? "),this.tracker.savePresignedConfiguration(e)}saveWitnesses(e){return console.debug("? saveWitnesses"),Lr(e,"? "),this.tracker.saveWitnesses(e)}async configOfImageHash(e){return console.debug("? configOfImageHash"),Lr(e,"? "),Lr(await this.tracker.configOfImageHash(e),"! ")}saveWalletConfig(e){return console.debug("? saveWalletConfig"),Lr(e,"? "),this.tracker.saveWalletConfig(e)}async imageHashOfCounterfactualWallet(e){return console.debug("? imageHashOfCounterfactualWallet"),Lr(e,"? "),Lr(await this.tracker.imageHashOfCounterfactualWallet(e),"! ")}saveCounterfactualWallet(e){return console.debug("? saveCounterfactualWallet"),Lr(e,"? "),this.tracker.saveCounterfactualWallet(e)}async walletsOfSigner(e){return console.debug("? walletsOfSigner"),Lr(e,"? "),Lr(await this.tracker.walletsOfSigner(e),"! ")}async getMigration(e,r,n,i){return console.debug("? getMigration"),Lr({address:e,fromImageHash:r,fromVersion:n,chainId:i},"? "),Lr(await this.tracker.getMigration(e,r,n,i),"! ")}saveMigration(e,r,n){return console.debug("? saveMigration"),Lr({address:e,signed:r,contexts:n},"? "),this.tracker.saveMigration(e,r,n)}}function Lr(t,e=""){switch(t){case void 0:console.debug(e+"undefined");break;default:JSON.stringify(t,void 0,2).split(` -`).map(r=>e+r).forEach(r=>console.debug(r));break}return t}var AG=Object.freeze({__proto__:null,DebugConfigTracker:CG});function ao(){return ao=Object.assign?Object.assign.bind():function(t){for(var e=1;ePromise.resolve(this.configs[e]),this.saveConfig=(e,r)=>(this.configs[e]=r,Promise.resolve()),this.loadV2Node=e=>Promise.resolve(this.v2Nodes[e]),this.saveV2Node=(e,r)=>(this.v2Nodes[e]=r,Promise.resolve()),this.loadCounterfactualWallet=e=>Promise.resolve(this.counterfactualWallets[e]),this.saveCounterfactualWallet=(e,r,n)=>(this.counterfactualWallets[e]={imageHash:r,context:n},Promise.resolve()),this.loadPayloadOfSubdigest=e=>Promise.resolve(this.payloads[e]),this.savePayloadOfSubdigest=(e,r)=>(this.payloads[e]=r,Promise.resolve()),this.loadSubdigestsOfSigner=e=>Promise.resolve(Object.keys(this.signatures[e]||{})),this.loadSignatureOfSubdigest=(e,r)=>{var n;return Promise.resolve((n=this.signatures[e])==null?void 0:n[r])},this.saveSignatureOfSubdigest=(e,r,n)=>(this.signatures[e]||(this.signatures[e]={}),this.signatures[e][r]=n,Promise.resolve()),this.loadMigrationsSubdigest=(e,r,n)=>{var i;return Promise.resolve(((i=this.migrations[e])==null||(i=i[r])==null?void 0:i[n])||[])},this.saveMigrationsSubdigest=(e,r,n,i,s)=>(this.migrations[e]||(this.migrations[e]={}),this.migrations[e][r]||(this.migrations[e][r]={}),this.migrations[e][r][n]||(this.migrations[e][r][n]=[]),this.migrations[e][r][n].push({subdigest:i,toImageHash:s}),Promise.resolve())}}function Al(t){if(t===void 0)return;const e={};for(const r of Object.keys(t)){const n=t[r];n._isBigNumber===!0&&n._hex!==void 0&&typeof n._hex=="string"&&n._hex.length!==""?e[r]=V.from(n):Array.isArray(n)?e[r]=n.map(i=>Al(i)):typeof n=="object"&&n!==null?e[r]=Al(n):e[r]=n}return e}class EG{constructor(e){var r=this;this.dbName=e,this._lazyDb=void 0,this.loadConfig=async function(n){return(await r.getDb()).get("configs",n).then(s=>Al(s))},this.saveConfig=async function(n,i){await(await r.getDb()).put("configs",i,n)},this.loadV2Node=async function(n){return(await r.getDb()).get("v2Nodes",n).then(s=>Al(s))},this.saveV2Node=async function(n,i){await(await r.getDb()).put("v2Nodes",i,n)},this.loadCounterfactualWallet=async function(n){return(await r.getDb()).get("counterfactualWallets",n)},this.saveCounterfactualWallet=async function(n,i,s){await(await r.getDb()).put("counterfactualWallets",{imageHash:i,context:s},n)},this.loadPayloadOfSubdigest=async function(n){return(await r.getDb()).get("payloads",n).then(s=>Al(s))},this.savePayloadOfSubdigest=async function(n,i){await(await r.getDb()).put("payloads",i,n)},this.loadSubdigestsOfSigner=async function(n){return(await(await r.getDb()).getAllKeysFromIndex("signatures","signer",IDBKeyRange.only(n))).map(o=>o.split("-")[0])},this.loadSignatureOfSubdigest=async function(n,i){const o=await(await r.getDb()).get("signatures",[i,n].join("-"));return o==null?void 0:o.signature},this.saveSignatureOfSubdigest=async function(n,i,s){await(await r.getDb()).put("signatures",{signature:s,signer:n},[i,n].join("-"))},this.loadMigrationsSubdigest=async function(n,i,s){return(await(await r.getDb()).getAllFromIndex("migrations","jump",IDBKeyRange.only([n,i,s]))).map(l=>({subdigest:l.subdigest,toImageHash:l.toImageHash}))},this.saveMigrationsSubdigest=async function(n,i,s,o,a){await(await r.getDb()).put("migrations",{wallet:n,fromVersion:i,toVersion:s,subdigest:o,toImageHash:a},o)}}async getDb(){if(this._lazyDb)return this._lazyDb;const e=this.dbName;return this._lazyDb=await gG(e,1,{upgrade(r,n,i,s){console.log(`upgrading ${e} from ${n} to ${i} - ${s}`),n===0&&(r.createObjectStore("configs"),r.createObjectStore("v2Nodes"),r.createObjectStore("counterfactualWallets"),r.createObjectStore("payloads"),r.createObjectStore("signatures").createIndex("signer","signer",{unique:!1}),r.createObjectStore("migrations").createIndex("jump",["wallet","fromVersion","toVersion"]))}}),this._lazyDb}}function V9(t){return t.left!==void 0&&t.right!==void 0}function H9(t){return t.weight!==void 0&&t.threshold!==void 0&&t.tree!==void 0}function jp(t){return t.version===2&&t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&typeof t.tree=="string"}var SG=Object.freeze({__proto__:null,isPlainNode:V9,isPlainNested:H9,isPlainV2Config:jp,MemoryTrackerStore:U9,recreateBigNumbers:Al,IndexedDBStore:EG});class Dx{constructor(e,r=new U9,n=!1){var i=this;this.provider=e,this.store=r,this.useEIP5719=n,this.cachedEIP5719=void 0,this.loadTopology=async function(s){const o=await i.store.loadV2Node(s);if(!o)return{nodeHash:s};if(V9(o)){const[a,l]=await Promise.all([i.loadTopology(o.left),i.loadTopology(o.right)]);return{left:a,right:l}}return H9(o)?{weight:V.from(o.weight),threshold:V.from(o.threshold),tree:await i.loadTopology(o.tree)}:o},this.saveTopology=async function(s){if(Se.config.isNodeLeaf(s))return;const o=Se.config.hashNode(s);if(Se.config.isNode(s)){const a=i.saveTopology(s.left),l=i.saveTopology(s.right),c=i.store.saveV2Node(o,{left:Se.config.hashNode(s.left),right:Se.config.hashNode(s.right)});await Promise.all([a,l,c]);return}if(Se.config.isNestedLeaf(s)){const a=i.saveTopology(s.tree),l=i.store.saveV2Node(o,{weight:V.from(s.weight).toString(),threshold:V.from(s.threshold).toString(),tree:Se.config.hashNode(s.tree)});await Promise.all([a,l]);return}if(Se.config.isSignerLeaf(s))return i.store.saveV2Node(o,{address:s.address,weight:s.weight});if(Se.config.isSubdigestLeaf(s))return i.store.saveV2Node(o,{subdigest:s.subdigest});throw new Error(`Unknown topology type: ${s}`)},this.saveWalletConfig=async function(s){const{config:o}=s;if(Vi.config.ConfigCoder.isWalletConfig(o)){const a=Vi.config.ConfigCoder.imageHashOf(o);return i.store.saveConfig(a,o)}if(Se.config.ConfigCoder.isWalletConfig(o)){const a=Se.config.ConfigCoder.imageHashOf(o);if(Se.config.isComplete(o.tree))return i.store.saveConfig(a,o)}},this.configOfImageHashCache={},this.configOfImageHash=async function(s){const{imageHash:o}=s;if(i.configOfImageHashCache[s.imageHash])return i.configOfImageHashCache[s.imageHash];const a=await i.store.loadConfig(o);if(a){if(a.version===1||a.version===2&&!jp(a))return i.configOfImageHashCache[s.imageHash]=a,a;if(jp(a)){const l={version:2,threshold:V.from(a.threshold),checkpoint:V.from(a.checkpoint),tree:await i.loadTopology(a.tree)};return i.configOfImageHashCache[s.imageHash]=l,l}throw new Error(`Unknown config type: ${a}`)}},this.saveCounterfactualWallet=async function(s){const{config:o,context:a}=s,l=wr.genericCoderFor(o.version).config.imageHashOf(o);await Promise.all([i.saveWalletConfig({config:o}),...a.map(c=>{const f=le.context.addressOf(c,l);return i.store.saveCounterfactualWallet(f,l,c)})])},this.imageHashOfCounterfactualWallet=async function(s){const{wallet:o}=s,a=await i.store.loadCounterfactualWallet(o);if(a)return{imageHash:a.imageHash,context:a.context}},this.savePayload=async function(s){const{payload:o}=s,a=le.signature.subdigestOf(o);await i.store.savePayloadOfSubdigest(a,o)},this.payloadOfSubdigestCache={},this.payloadOfSubdigest=async function(s){if(i.payloadOfSubdigestCache[s.subdigest])return i.payloadOfSubdigestCache[s.subdigest];const{subdigest:o}=s,a=await i.store.loadPayloadOfSubdigest(o);return a&&(i.payloadOfSubdigestCache[o]=a),a},this.savePresignedConfiguration=async function(s){const o=Se.signature.SignatureCoder.decode(s.signature),a=wr.genericCoderFor(s.nextConfig.version).config.imageHashOf(s.nextConfig),l=Se.chained.messageSetImageHash(a),c=pe(l),f={message:l,address:s.wallet,chainId:0,digest:c},u=i.savePayload({payload:f}),h=i.saveWalletConfig({config:s.nextConfig}),y=await Se.signature.SignatureCoder.recover(o,f,i.provider),m=Se.signature.signaturesOf(y.config.tree);await Promise.all([u,h,i.saveWalletConfig({config:y.config}),...m.map(p=>i.store.saveSignatureOfSubdigest(p.address,y.subdigest,p.signature))])},this.loadPresignedConfiguration=async function(s){const{wallet:o,fromImageHash:a,longestPath:l}=s,c=await i.configOfImageHash({imageHash:a});if(!c||!Se.config.ConfigCoder.isWalletConfig(c))return[];const f=Se.config.signersOf(c.tree).map(k=>k.address),u=await Promise.all(f.map(k=>i.store.loadSubdigestsOfSigner(k))),h=[...new Set(u.flat())],m=(await Promise.all([...new Set(h)].map(async function(k){return ao({},await i.payloadOfSubdigest({subdigest:k}),{subdigest:k})}))).filter(k=>(k==null?void 0:k.message)&&(k==null?void 0:k.address)&&k.address===o).map(k=>({payload:k,nextImageHash:Se.chained.decodeMessageSetImageHash(k.message)})).filter(k=>k==null?void 0:k.nextImageHash);let p;const w=(await Promise.all(m.map(async function({nextImageHash:k,payload:I}){const R=await i.configOfImageHash({imageHash:k});if(!R||!Se.config.isWalletConfig(R))return;const F=V.from(R.checkpoint);return{nextConfig:R,nextCheckpoint:F,nextImageHash:k,payload:I}}))).filter(k=>k!==void 0).filter(k=>k.nextCheckpoint.gt(c.checkpoint)).sort((k,I)=>k.nextCheckpoint.gt(I.nextCheckpoint)?l?1:-1:l?-1:1);for(const k of w){const{nextConfig:I,nextCheckpoint:R,nextImageHash:F,payload:z}=k;if(p){const J=p.checkpoint;if(l){if(R.gte(J))continue}else if(R.lte(J))continue}const j=new Map((await Promise.all(f.map(async function(J){const Z=await i.store.loadSignatureOfSubdigest(J,z.subdigest);if(!Z)return[J,void 0];const ie=Y(i.useEIP5719?await i.cachedEIP5719.runByEIP5719(J,z.subdigest,Z):Z),L=le.signer.tryRecoverSigner(z.subdigest,ie)!==J;return[J,{isDynamic:L,signature:ie}]}))).filter(J=>!!J[1]));if(j.size===0)continue;const K=Se.signature.SignatureCoder.encodeSigners(c,j,[],0);K.weight.lt(c.threshold)||(p={nextImageHash:F,checkpoint:V.from(I.checkpoint),signature:K.encoded})}if(!p)return[];const A=await i.loadPresignedConfiguration({wallet:o,fromImageHash:p.nextImageHash,longestPath:l});return[{wallet:o,nextImageHash:p.nextImageHash,signature:p.signature},...A]},this.saveWitnesses=async function(s){const o={digest:s.digest,address:s.wallet,chainId:s.chainId},a=le.signature.subdigestOf(o);await Promise.all([i.savePayload({payload:o}),...s.signatures.filter(l=>le.signer.canRecover(l)).map(l=>{const c=le.signer.recoverSigner(a,l);return i.store.saveSignatureOfSubdigest(c,a,l)})])},this.walletsOfSigner=async function(s){const o=await i.store.loadSubdigestsOfSigner(s.signer),a=await Promise.all(o.map(c=>i.payloadOfSubdigest({subdigest:c}))).then(c=>c.filter(f=>f!==void 0)),l=[];for(const c of a){const f=c.address;if(l.find(y=>y.wallet===f))continue;const u=le.signature.subdigestOf(c),h=await i.store.loadSignatureOfSubdigest(s.signer,u);h&&l.push({wallet:f,proof:{digest:c.digest,chainId:V.from(c.chainId),signature:Y(h)}})}return l},this.cachedEIP5719=new sG(e)}async saveMigration(e,r,n){const i=r.fromVersion;if(i!==1)throw new Error("Migration not supported");if(!Se.config.isWalletConfig(r.toConfig))throw new Error("Invalid to config");const{newImageHash:s,address:o}=k9.v1v2.decodeTransaction(r.tx,n);if(o!==e)throw new Error("Invalid migration transaction - address");if(Se.config.ConfigCoder.imageHashOf(r.toConfig)!=s)throw new Error("Invalid migration transaction - config");const a=le.transaction.packMetaTransactionsData(r.tx.nonce,r.tx.transactions),l=pe(a),c={chainId:r.tx.chainId,message:a,address:e,digest:l},f=le.signature.subdigestOf(c),u=this.savePayload({payload:c}),h=this.saveWalletConfig({config:r.toConfig}),y=Vi.signature.SignatureCoder.decode(r.tx.signature),m=await Vi.signature.SignatureCoder.recover(y,c,this.provider),p=Vi.signature.SignatureCoder.signaturesOf(m.config);await Promise.all([u,h,this.saveWalletConfig({config:m.config}),this.store.saveMigrationsSubdigest(e,i,i+1,f,s),...p.map(S=>this.store.saveSignatureOfSubdigest(S.address,m.subdigest,S.signature))])}async getMigration(e,r,n,i){var s=this;const[o,a]=await Promise.all([this.configOfImageHash({imageHash:r}),this.store.loadMigrationsSubdigest(e,n,n+1)]),l=wr.coderFor(n);return!o||!l.config.isWalletConfig(o)?void 0:(await Promise.all(a.map(async function(f){const{subdigest:u,toImageHash:h}=f,y=await s.payloadOfSubdigest({subdigest:u});if(!y||!y.message||!V.from(i).eq(y.chainId))return;const m=l.config.signersOf(o).map(k=>k.address),p=new Map((await Promise.all(m.map(async function(k){const I=await s.store.loadSignatureOfSubdigest(k,u);if(!I)return[k,void 0];const R=Y(s.useEIP5719?await s.cachedEIP5719.runByEIP5719(k,u,I):I),F=le.signer.tryRecoverSigner(u,R)!==k;return[k,{isDynamic:F,signature:R}]}))).filter(k=>!!k[1])),S=l.signature.encodeSigners(o,p,[],i);if(!S||S.weightf.filter(u=>u!==void 0)))[0]}updateProvider(e){this.provider=e}}var kG=Object.freeze({__proto__:null,LocalConfigTracker:Dx});let Ov=function(t){return t.EIP712="EIP712",t.EthSign="EthSign",t.EIP1271="EIP1271",t}({});class _G{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Sessions/",this.ping=n=>this.fetch(this.url("Ping"),zn({},n)).then(i=>Un(i).then(s=>({}))),this.config=(n,i)=>this.fetch(this.url("Config"),zn(n,i)).then(s=>Un(s).then(o=>({version:o.version,config:o.config}))),this.wallets=(n,i)=>this.fetch(this.url("Wallets"),zn(n,i)).then(s=>Un(s).then(o=>({wallets:o.wallets}))),this.deployHash=(n,i)=>this.fetch(this.url("DeployHash"),zn(n,i)).then(s=>Un(s).then(o=>({deployHash:o.deployHash,context:o.context}))),this.configUpdates=(n,i)=>this.fetch(this.url("ConfigUpdates"),zn(n,i)).then(s=>Un(s).then(o=>({updates:o.updates}))),this.migrations=(n,i)=>this.fetch(this.url("Migrations"),zn(n,i)).then(s=>Un(s).then(o=>({migrations:o.migrations}))),this.saveConfig=(n,i)=>this.fetch(this.url("SaveConfig"),zn(n,i)).then(s=>Un(s).then(o=>({}))),this.saveWallet=(n,i)=>this.fetch(this.url("SaveWallet"),zn(n,i)).then(s=>Un(s).then(o=>({}))),this.saveSignature=(n,i)=>this.fetch(this.url("SaveSignature"),zn(n,i)).then(s=>Un(s).then(o=>({}))),this.saveSignerSignatures=(n,i)=>this.fetch(this.url("SaveSignerSignatures"),zn(n,i)).then(s=>Un(s).then(o=>({}))),this.saveMigration=(n,i)=>this.fetch(this.url("SaveMigration"),zn(n,i)).then(s=>Un(s).then(o=>({}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const zn=(t={},e={})=>({method:"POST",headers:ao({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Un=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});class TG{constructor(e,r=!0){this.onlyRecoverable=r,this.sessions=void 0,this.sessions=new _G(e,fetch)}async loadPresignedConfiguration(e){try{const{updates:r}=await this.sessions.configUpdates({wallet:e.wallet,fromImageHash:e.fromImageHash,allUpdates:e.longestPath});return r.map(({toImageHash:n,signature:i})=>({wallet:e.wallet,nextImageHash:n,signature:i}))}catch(r){if(Dv(r))return[];throw r}}async savePresignedConfiguration(e){const r=e.nextConfig,n=wr.genericCoderFor(r.version).config.imageHashOf(r),i=Se.signature.setImageHashStruct(n),s=pe(i);await this.sessions.saveSignature({wallet:e.wallet,digest:s,chainID:"0",signature:e.signature,toConfig:nd(r)})}async saveWitnesses(e){let r=e.signatures;this.onlyRecoverable&&(r=r.filter(n=>le.signer.canRecover(n))),await this.sessions.saveSignerSignatures({wallet:e.wallet,digest:e.digest,chainID:sl(e.chainId),signatures:r})}async configOfImageHash(e){try{const{version:r,config:n}=await this.sessions.config(e);return PG(r,n)}catch(r){if(Dv(r))return;throw r}}async saveWalletConfig(e){const r=nd(e.config);await this.sessions.saveConfig({version:e.config.version,config:r})}async imageHashOfCounterfactualWallet(e){try{const{deployHash:r,context:n}=await this.sessions.deployHash(e);return{imageHash:r,context:n}}catch(r){if(Dv(r))return;throw r}}async saveCounterfactualWallet(e){const r=nd(e.config);await this.sessions.saveWallet({version:e.config.version,deployConfig:r})}async walletsOfSigner(e){const{wallets:r}=await this.sessions.wallets(e);return Object.entries(r).map(([n,{digest:i,chainID:s,type:o,signature:a}])=>{switch(o){case Ov.EIP712:a+=Y(le.signer.SigType.EIP712).slice(2);break;case Ov.EthSign:a+=Y(le.signer.SigType.ETH_SIGN).slice(2);break;case Ov.EIP1271:a+=Y(le.signer.SigType.WALLET_BYTES32).slice(2);break}return{wallet:n,proof:{digest:i,signature:a,chainId:V.from(s)}}})}async getMigration(e,r,n,i){var s=this;const o=sl(i),{migrations:a}=await this.sessions.migrations({wallet:e,fromVersion:n,fromImageHash:r,chainID:o}),l=async function(u){const h=a[u];if(h){const y=Object.keys(h).map(Number).sort((m,p)=>p-m);for(const m of y)for(const[p,S]of Object.entries(h[m]))try{const w=await s.configOfImageHash({imageHash:p});if(w)return{fromVersion:n,toVersion:m,toConfig:w,tx:{entrypoint:S.executor,transactions:S.transactions,nonce:S.nonce,signature:S.signature,chainId:u,intent:{id:le.transaction.subdigestOfTransactions(e,u,S.nonce,S.transactions),wallet:e}}}}catch(w){console.error(w)}}},c=await l(o);if(c)return c;for(const f in a)if(f!==o){const u=await l(f);if(u)return u}}async saveMigration(e,r,n){await this.sessions.saveMigration({wallet:e,fromVersion:r.fromVersion,toVersion:r.toVersion,toConfig:nd(r.toConfig),executor:r.tx.entrypoint,transactions:r.tx.transactions.map(IG),nonce:sl(r.tx.nonce),signature:r.tx.signature,chainID:sl(r.tx.chainId)})}}function nd(t){switch(t.version){case 1:if(Vi.config.ConfigCoder.isWalletConfig(t))return{threshold:Go(t.threshold),signers:t.signers.map(({weight:e,address:r})=>({weight:Go(e),address:r}))};throw new Error(`not a v${t.version} config: ${t}`);case 2:if(Se.config.ConfigCoder.isWalletConfig(t))return{threshold:Go(t.threshold),checkpoint:Go(t.checkpoint),tree:Nd(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function Nd(t){return Se.config.isNode(t)?{left:Nd(t.left),right:Nd(t.right)}:Se.config.isSignerLeaf(t)?{weight:Go(t.weight),address:t.address}:Se.config.isNestedLeaf(t)?{weight:Go(t.weight),threshold:Go(t.threshold),tree:Nd(t.tree)}:Se.config.isNodeLeaf(t)?{node:t.nodeHash}:ao({},t)}function PG(t,e){switch(t){case 1:return ao({},e,{version:t});case 2:return ao({},e,{version:t,tree:Od(e.tree)});default:throw new Error(`unknown version ${t}`)}}function Od(t){switch(typeof t){case"object":const e=ao({},t);return e.left!==void 0&&(e.left=Od(e.left)),e.right!==void 0&&(e.right=Od(e.right)),e.tree!==void 0&&(e.tree=Od(e.tree)),e.node!==void 0&&(e.nodeHash=e.node,delete e.node),e;default:throw new Error(`v2 config tree ${t} is not an object`)}}function IG(t){return{to:t.to,value:t.value!==void 0?sl(t.value):void 0,data:t.data!==void 0?Y(t.data):void 0,gasLimit:t.gasLimit!==void 0?sl(t.gasLimit):void 0,delegateCall:t.delegateCall,revertOnError:t.revertOnError}}function Go(t){return V.from(t).toNumber()}function sl(t){return V.from(t).toString()}function Dv(t){return typeof t=="object"&&t.status===404}var MG=Object.freeze({__proto__:null,RemoteConfigTracker:TG});function zp(t,e,r){return new Promise(n=>{let i=0;t.forEach(s=>s.then(o=>{r(o)?n(o):(i++,i===t.length&&n(e))}).catch(()=>{i++,i===t.length&&n(e)}))})}async function Dc(t,e){return Promise.all(t.map(r=>r.catch(()=>e)))}class RG{constructor(e){this.trackers=e}async configOfImageHash(e){const r=this.trackers.map(async function(a,l){return{res:await a.configOfImageHash(e),i:l}}),n=await zp(r,void 0,a=>(a==null?void 0:a.res)===void 0?!1:wr.genericCoderFor(a.res.version).config.isComplete(a.res));if(n!=null&&n.res)return this.saveWalletConfig({config:n.res,skipTracker:n.i}),n.res;const i=new Dx(void 0),s=await Dc(r,void 0);for(const a of s)a!=null&&a.res&&await i.saveWalletConfig({config:a.res});const o=await i.configOfImageHash(e);return o&&this.saveWalletConfig({config:o}),o}async saveWalletConfig(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveWalletConfig(e)}))}async imageHashOfCounterfactualWallet(e){const r=await zp(this.trackers.map(n=>n.imageHashOfCounterfactualWallet(e)),void 0,n=>!!n);return r&&this.configOfImageHash({imageHash:r.imageHash}).then(n=>{n&&this.saveCounterfactualWallet({config:n,context:[r.context]})}),r}async saveCounterfactualWallet(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveCounterfactualWallet(e)}))}async walletsOfSigner(e){const r=await Dc(this.trackers.map(o=>o.walletsOfSigner(e)),[]).then(o=>o.flat()),n={};for(const o of r)n[o.wallet]=o.proof;const i=Object.keys(n).map(o=>({wallet:o,proof:n[o]})),s=new Map;return i.forEach(({wallet:o,proof:{digest:a,chainId:l,signature:c}})=>{const f=`${o}-${a}-${l}`;let u=s.get(f);u||(u={wallet:o,digest:a,chainId:l,signatures:[]},s.set(f,u)),u.signatures.push(c)}),s.forEach(o=>this.saveWitnesses(o)),i}async saveWitnesses(e){await Promise.all(this.trackers.map(r=>r.saveWitnesses(e)))}async loadPresignedConfiguration(e){var r=this;const n=await Dc(this.trackers.map(l=>l.loadPresignedConfiguration(e)),[]),s=(await Dc(n.map(async function(l){const c=l[l.length-1],f=await r.configOfImageHash({imageHash:c.nextImageHash});if(f)return{checkpoint:wr.genericCoderFor(f.version).config.checkpointOf(f),result:l}}),void 0)).reduce((l,c)=>c&&(!l||c.checkpoint.gt(l.checkpoint))?c:l);if(!s)return[];const o=new Map,a=l=>(o.has(l)||o.set(l,this.configOfImageHash({imageHash:l})),o.get(l));return s.result.forEach(async function(l){const c=await a(l.nextImageHash);c&&r.savePresignedConfiguration({wallet:e.wallet,nextConfig:c,signature:l.signature})}),s.result}async savePresignedConfiguration(e){await Promise.all(this.trackers.map(r=>r.savePresignedConfiguration(e)))}async getMigration(e,r,n,i){return(await Promise.all(this.trackers.map(o=>o.getMigration(e,r,n,i)))).find(o=>!!o)}async saveMigration(e,r,n){await Promise.all(this.trackers.map(i=>i.saveMigration(e,r,n)))}}class NG{constructor(e,r,n){this.tracker=e,this.cache=r,this.contexts=n}async loadPresignedConfiguration(e){var r=this;const n=[this.tracker.loadPresignedConfiguration(e),this.cache.loadPresignedConfiguration(e)];let i;const[s,o]=await Promise.all(n);if(s.length>0&&o.length>0&&s[s.length-1].nextImageHash===o[o.length-1].nextImageHash)i=e.longestPath===!0?s.length>o.length?s:o:s.lengthu&&(!f||u.checkpoint.gt(f.checkpoint))?u:f))==null?void 0:l.result)!=null?a:[]}return i||[]}async savePresignedConfiguration(e){await Promise.all([this.tracker.savePresignedConfiguration(e),this.cache.savePresignedConfiguration(e)])}async configOfImageHash(e){if(e.noCache!==!0){const n=await this.cache.configOfImageHash(e);if(n)return n}const r=await this.tracker.configOfImageHash(e);return r&&await this.cache.saveWalletConfig({config:r}),r}async saveWalletConfig(e){await Promise.all([this.tracker.saveWalletConfig(e),this.cache.saveWalletConfig(e)])}async imageHashOfCounterfactualWallet(e){if(e.noCache!==!0){const n=await this.cache.imageHashOfCounterfactualWallet(e);if(n)return n}const r=await this.tracker.imageHashOfCounterfactualWallet(e);if(r){const n=await this.configOfImageHash({imageHash:r.imageHash});n&&await this.cache.saveCounterfactualWallet({config:n,context:[r.context]})}return r}async saveCounterfactualWallet(e){await Promise.all([this.tracker.saveCounterfactualWallet(e),this.cache.saveCounterfactualWallet(e)])}async walletsOfSigner(e){if(e.noCache)return this.tracker.walletsOfSigner(e);const r=await Promise.all([this.tracker.walletsOfSigner(e),this.cache.walletsOfSigner(e)]),n=new Map;for(const i of r)for(const s of i)n.set(s.wallet,s);return Array.from(n.values())}async saveWitnesses(e){await Promise.all([this.tracker.saveWitnesses(e),this.cache.saveWitnesses(e)])}async getMigration(e,r,n,i){const s=await this.cache.getMigration(e,r,n,i);if(s)return s;const o=await this.tracker.getMigration(e,r,n,i);return o&&await this.cache.saveMigration(e,o,this.contexts),o}async saveMigration(e,r,n){await Promise.all([this.tracker.saveMigration(e,r,n),this.cache.saveMigration(e,r,n)])}}class Q6{constructor(){this.cache=void 0,this.cache=new Map}do(e,r,n,...i){e=`${e}:${pe(Ve(JSON.stringify(i,OG)))}`;let s=this.cache.get(e);if(s&&s.expiration&&new Date>=s.expiration&&(s=void 0,this.cache.delete(e)),!s){const o={promise:n(...i)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),s=o,this.cache.set(e,s)}return s.promise}}function OG(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function DG(t){return t instanceof W9}class W9{constructor(e,r=50,n=!1){this.tracker=e,this.window=r,this.verbose=n,this.cache=new Q6}invalidateCache(){this.cache=new Q6}configOfImageHash(e){return this.cache.do("configOfImageHash",this.window,r=>this.tracker.configOfImageHash(r),e)}getMigration(e,r,n,i){return this.cache.do("getMigration",this.window,(...s)=>this.tracker.getMigration(...s),e,r,n,i)}saveMigration(e,r,n){return this.cache.do("saveMigration",void 0,(...i)=>this.tracker.saveMigration(...i),e,r,n)}loadPresignedConfiguration(e){return this.cache.do("loadPresignedConfiguration",this.window,r=>this.tracker.loadPresignedConfiguration(r),e)}savePresignedConfiguration(e){return this.cache.do("savePresignedConfiguration",void 0,r=>this.tracker.savePresignedConfiguration(r),e)}saveWitnesses(e){return this.cache.do("saveWitnesses",void 0,r=>this.tracker.saveWitnesses(r),e)}saveWalletConfig(e){return this.cache.do("saveWalletConfig",void 0,r=>this.tracker.saveWalletConfig(r),e)}imageHashOfCounterfactualWallet(e){return this.cache.do("imageHashOfCounterfactualWallet",void 0,r=>this.tracker.imageHashOfCounterfactualWallet(r),e)}saveCounterfactualWallet(e){return this.cache.do("saveCounterfactualWallet",void 0,r=>this.tracker.saveCounterfactualWallet(r),e)}walletsOfSigner(e){return this.cache.do("walletsOfSigner",this.window,r=>this.tracker.walletsOfSigner(r),e)}updateProvider(e){this.tracker instanceof Dx&&this.tracker.updateProvider(e)}}var Bx=Object.freeze({__proto__:null,debug:AG,local:kG,remote:MG,stores:SG,raceUntil:zp,allSafe:Dc,MultipleTracker:RG,CachedTracker:NG,isDedupedTracker:DG,DedupedTracker:W9});const BG=Object.freeze(Object.defineProperty({__proto__:null,tracker:wG,trackers:Bx},Symbol.toStringTag,{value:"Module"})),q9=60*60*24*7,LG=60;class Y6{constructor(e,r,n={},i){this.account=e,this.settings=r,this.status=n,this._initialAuthRequest=void 0,this.proofStrings=new Map,this.onAuthCallbacks=[],this.apiClient=void 0,this.metadataClient=void 0,this.indexerClients=new Map,this.projectAccessKey=void 0,this.projectAccessKey=i}now(){return Math.floor(Date.now()/1e3)}get expiration(){var e;return Math.max((e=this.settings.metadata.expiration)!=null?e:q9,120)}onAuth(e){return this.onAuthCallbacks.push(e),()=>this.onAuthCallbacks=this.onAuthCallbacks.filter(r=>r!==e)}async dump(){return this.status.jwt?{jwt:{token:await this.status.jwt.token,expiration:this.status.jwt.expiration},metadata:this.status.metadata}:{metadata:this.settings.metadata}}auth(e=5){var r=this;return this._initialAuthRequest?this._initialAuthRequest:(this._initialAuthRequest=async function(){const n=r.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");let i;for(let s=1;;s++)try{i=(await r.getJWT(!0)).token;break}catch(o){if(s===e)throw console.error(`couldn't authenticate after ${e} attempts`,o),o}return new Pd(n,void 0,i)}(),this._initialAuthRequest)}async getJWT(e){var r=this;const n=this.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");if(this.status.jwt){const c=this.status.jwt,f=await c.token;if(this.now(){throw this.status.jwt=void 0,c}),expiration:o};return this.status.jwt=a,a.token.then(c=>{this.onAuthCallbacks.forEach(f=>{try{f({status:"fulfilled",value:c})}catch{}})}).catch(c=>{this.onAuthCallbacks.forEach(f=>{try{f({status:"rejected",reason:c})}catch{}})}),{token:await a.token,expiration:o}}getProofStringKey(){return`${this.account.address} - ${this.settings.metadata.name}`}async isProofStringValid(e){try{const r=new j0,n=V.from(this.settings.sequenceApiChainId),i=ri(this.account.networks,n);if(!i)throw Error("No network found");return r.chainId=n.toNumber(),r.provider=new L0(Gf(i.rpcUrl,this.projectAccessKey),{name:"",chainId:n.toNumber()}),await r.decodeProof(e),!0}catch{return!1}}async getAPIClient(e=!0){if(!this.apiClient){const r=this.settings.sequenceApiUrl;if(!r)throw Error("No sequence api url");const n=(await this.getJWT(e)).token;this.apiClient=new Pd(r,void 0,n)}return this.apiClient}async getMetadataClient(e=!0){if(!this.metadataClient){const r=(await this.getJWT(e)).token;this.metadataClient=new $9(this.settings.sequenceMetadataUrl,void 0,r)}return this.metadataClient}async getIndexerClient(e,r=!0){const n=ri(this.account.networks,e);if(!n)throw Error(`No network for chain ${e}`);if(!this.indexerClients.has(n.chainId))if(n.indexer)this.indexerClients.set(n.chainId,n.indexer);else if(n.indexerUrl){const i=(await this.getJWT(r)).token;this.indexerClients.set(n.chainId,new B9(n.indexerUrl,void 0,i))}else throw Error(`No indexer url for chain ${e}`);return this.indexerClients.get(n.chainId)}getProofString(e){if(this.proofStrings.has(e)){const l=this.proofStrings.get(e);if(this.now()(r.signature=l,n.encodeProof(r,!0))).catch(l=>{throw this.proofStrings.delete(e),l}),expiration:o};return this.proofStrings.set(e,a),a}}const G9=async(t,e,r)=>{const n=we(await t.getAddress());if(!n||n===""||n==="0x")throw K9;const i=new cx;if(i.address=n,!r||!r.app||r.app==="")throw new Lx("authorization options requires app to be set");i.claims.app=r.app,i.claims.ogn=r.origin,i.claims.n=r.nonce,i.setExpiryIn(r.expiry?Math.max(r.expiry,200):q9);const s=i.messageTypedData(),o=O7(e);i.signature=await(t instanceof qi?t.signTypedData(s.domain,s.types,s.message,o,"eip6492"):t.signTypedData(s.domain,s.types,s.message,o));const l=await new j0().encodeProof(i,!0);return{typedData:s,proofString:l}};class Lx extends Error{constructor(e){super(e),this.name="AuthError"}}const K9=new Lx("auth error: account address is empty");function zo(){return zo=Object.assign?Object.assign.bind():function(t){for(var e=1;eJ.wallet));let j;if(z){if(u==null||u(z),j=new qi({address:z,tracker:k,networks:A,contexts:w,orchestrator:p,projectAccessKey:S}),c&&c.length>0){let J=await j.status(R);if(J.original.version!==J.version||j.version!==J.version){const{migratedAllChains:L,failedChains:v}=await j.isMigratedAllChains();if(v.some(C=>Up.includes(C)))throw Error(`Failed to fetch account status on ${v.join(", ")}`);if(!L){if(m&&!await m(j))throw Error("Migration cancelled, cannot open session");const{failedChains:C}=await j.signAllMigrations(y||(N=>N));if(C.some(N=>Up.includes(N)))throw Error(`Failed to sign migrations on ${C.join(", ")}`);Bx.isDedupedTracker(k)&&k.invalidateCache();let P;if([P,J]=await Promise.all([j.isMigratedAllChains().then(N=>N.migratedAllChains),j.status(R)]),!P)throw Error("Failed to migrate account")}}J.onChain.version!==J.version&&await j.doBootstrap(R,void 0,J);const Z=J.config,ie=j.coders.config.editConfig(Z,{add:c,threshold:l});if(j.coders.config.imageHashOf(Z)!==j.coders.config.imageHashOf(ie)){const L=j.coders.config.editConfig(ie,{checkpoint:j.coders.config.checkpointOf(Z).add(1)});await j.updateConfig(L)}}}else{if(!c||c.length===0)throw Error("Cannot create new account without signers");if(!l)throw Error("Cannot create new account without threshold");if(j=await qi.new({config:{threshold:l,checkpoint:0,signers:c},tracker:k,contexts:w,orchestrator:p,networks:A,projectAccessKey:S}),u==null||u(j.address),await j.publishWitness(),!(await k.walletsOfSigner({signer:a,noCache:!0})).some(Z=>Z.wallet===j.address))throw Error("Account not found on tracker")}let K;return I&&(K=new Y6(j,I),K.auth(),K.onAuth(J=>{J.status==="fulfilled"&&j.setJwt(J.value)})),new hf(A,w,j,K)}static async load(e){const{dump:r,settings:n,editConfigOnMigration:i,onMigration:s,orchestrator:o}=e,{contexts:a,networks:l,tracker:c,services:f}=zo({},Dd,n);let u;if(J9(r)){var h,y,m;const I=r.config.address||le.context.addressOf(a[1],Vi.config.ConfigCoder.imageHashOf(zo({},r.config,{version:1}))),R=((h=(y=r.jwt)==null?void 0:y.expiration)!=null?h:0)F.migratedAllChains)){if(s&&!await s(u))throw Error("Migration cancelled, cannot open session");if(console.log("Migrating account..."),await u.signAllMigrations(i),!await u.isMigratedAllChains().then(F=>F.migratedAllChains))throw Error("Failed to migrate account")}}else if(Q9(r)){var p,S,w;const I=((p=(S=r.jwt)==null?void 0:S.expiration)!=null?p:0)async(n,i,s)=>{const o=s.messageDigest();return{isValid:await t(i).isValidSignature(s.address,o,s.signature)}},FG=Object.freeze(Object.defineProperty({__proto__:null,AuthError:Lx,CRITICAL_CHAINS:Up,ErrAccountIsRequired:K9,Session:hf,SessionSettingsDefault:Dd,ValidateSequenceWalletProof:$G,isSessionDumpV1:J9,isSessionDumpV2:Q9,signAuthorization:G9},Symbol.toStringTag,{value:"Module"}));function Q0(){return Q0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),$r({},n)).then(i=>Fr(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),$r({},n)).then(i=>Fr(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),$r({},n)).then(i=>Fr(i).then(s=>({status:s.status}))),this.getSignerConfig=(n,i)=>this.fetch(this.url("GetSignerConfig"),$r(n,i)).then(s=>Fr(s).then(o=>({signerConfig:o.signerConfig}))),this.sign=(n,i)=>this.fetch(this.url("Sign"),$r(n,i)).then(s=>Fr(s).then(o=>({sig:o.sig}))),this.signWith=(n,i)=>this.fetch(this.url("SignWith"),$r(n,i)).then(s=>Fr(s).then(o=>({sig:o.sig}))),this.authMethods=(n,i)=>this.fetch(this.url("AuthMethods"),$r(n,i)).then(s=>Fr(s).then(o=>({methods:o.methods,active:o.active}))),this.setPIN=(n,i)=>this.fetch(this.url("SetPIN"),$r(n,i)).then(s=>Fr(s).then(o=>({}))),this.resetPIN=(n,i)=>this.fetch(this.url("ResetPIN"),$r(n,i)).then(s=>Fr(s).then(o=>({}))),this.createTOTP=(n,i)=>this.fetch(this.url("CreateTOTP"),$r(n,i)).then(s=>Fr(s).then(o=>({uri:o.uri}))),this.commitTOTP=(n,i)=>this.fetch(this.url("CommitTOTP"),$r(n,i)).then(s=>Fr(s).then(o=>({codes:o.codes}))),this.resetTOTP=(n,i)=>this.fetch(this.url("ResetTOTP"),$r(n,i)).then(s=>Fr(s).then(o=>({}))),this.reset2FA=(n,i)=>this.fetch(this.url("Reset2FA"),$r(n,i)).then(s=>Fr(s).then(o=>({}))),this.recoveryCodes=(n,i)=>this.fetch(this.url("RecoveryCodes"),$r(n,i)).then(s=>Fr(s).then(o=>({codes:o.codes}))),this.resetRecoveryCodes=(n,i)=>this.fetch(this.url("ResetRecoveryCodes"),$r(n,i)).then(s=>Fr(s).then(o=>({codes:o.codes}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const $r=(t={},e={})=>({method:"POST",headers:Q0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Fr=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),zG=typeof global=="object"?global.fetch:window.fetch;class UG{constructor(e,r,n=!1){this.address=e,this.url=r,this.appendSuffix=n,this.guard=void 0,this.guard=new jG(r,zG)}async getAddress(){return this.address}async buildDeployTransaction(e){}async predecorateSignedTransactions(e){return[]}async decorateTransactions(e,r){return e}async sign(e,r){var n;if(!le.isWalletSignRequestMetadata(r))throw new Error("expected sequence signature request metadata");const i=r.guardTotpCode,s=wr.genericCoderFor(r.config.version),{encoded:o}=s.signature.encodeSigners(r.config,(n=r.parts)!=null?n:new Map,[],r.chainId);return(await this.guard.signWith({signer:this.address,request:{msg:Y(e),auxData:this.packMsgAndSig(r.address,r.digest,o,r.chainId),chainId:V.from(r.chainId).toNumber()},token:i?{id:Y0.TOTP,token:i}:void 0})).sig}notifyStatusChange(e,r,n){}async getAuthMethods(e){let r;if("jwt"in e)r=await this.guard.authMethods({},{Authorization:`BEARER ${e.jwt}`});else{const n=await X6(e);r=await this.guard.authMethods({proof:{wallet:n.walletAddress,timestamp:n.timestamp.getTime(),signer:n.signerAddress,signature:n.signature}})}return Q0({},r,{methods:r.methods.map(VG)})}async setPin(e,r){const n=await Tc(r);e===void 0?await this.guard.resetPIN({timestamp:n.timestamp.getTime(),signature:n.signature},{Authorization:`BEARER ${r.jwt}`}):await this.guard.setPIN({pin:e,timestamp:n.timestamp.getTime(),signature:n.signature},{Authorization:`BEARER ${r.jwt}`})}resetPin(e){return this.setPin(void 0,e)}async createTotp(e){const r=await Tc(e),{uri:n}=await this.guard.createTOTP({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return new URL(n)}async commitTotp(e,r){const{codes:n}=await this.guard.commitTOTP({token:e},{Authorization:`BEARER ${r}`});return n}async resetTotp(e){const r=await Tc(e);await this.guard.resetTOTP({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`})}async reset2fa(e,r){if("jwt"in r)await this.guard.reset2FA({code:e},{Authorization:`BEARER ${r.jwt}`});else{const n=await X6(r);await this.guard.reset2FA({code:e,proof:{wallet:n.walletAddress,timestamp:n.timestamp.getTime(),signer:n.signerAddress,signature:n.signature}})}}async getRecoveryCodes(e){const r=await Tc(e),{codes:n}=await this.guard.recoveryCodes({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return n}async resetRecoveryCodes(e){const r=await Tc(e),{codes:n}=await this.guard.resetRecoveryCodes({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return n}packMsgAndSig(e,r,n,i){return qr.encode(["address","uint256","bytes","bytes"],[e,i,r,n])}suffix(){return this.appendSuffix?[3]:[]}}let Y0=function(t){return t.PIN="PIN",t.TOTP="TOTP",t}({});function VG(t){switch(t){case Y0.PIN:case Y0.TOTP:return t;default:throw new Error(`unknown auth method '${t}'`)}}function HG(t){return"signerAddress"in t&&typeof t.signerAddress=="string"}async function X6(t){if(HG(t))return t;{const e=Lp.isSapientSigner(t.signer)?t.signer:new Lp.SignerWrapper(t.signer),r=await e.getAddress(),n=new Date,i=Y9(t.walletAddress,n),s=du(i);return{walletAddress:t.walletAddress,timestamp:n,signerAddress:r,signature:Y(await e.sign(s,{}))}}}async function Tc(t){if("wallet"in t){var e;const r=new Date,n=X9(r),i=await t.wallet.signTypedData(n.domain,n.types,n.message,(e=n.domain.chainId)!=null?e:1,"eip6492");return{jwt:t.jwt,timestamp:r,signature:i}}else return t}function Y9(t,e){return{domain:Z9,types:{AuthMethods:[{name:"wallet",type:"address"},{name:"timestamp",type:"string"}]},message:{wallet:we(t),timestamp:eS(e)}}}function X9(t){return{domain:Z9,types:{AuthUpdate:[{name:"timestamp",type:"string"}]},message:{timestamp:eS(t)}}}const Z9={name:"Sequence Guard",version:"1",chainId:1};function eS(t){return t.toUTCString().replace("GMT","UTC")}const WG=Object.freeze(Object.defineProperty({__proto__:null,AuthMethod:Y0,GuardSigner:UG,getAuthUpdateProofTypedData:X9,getOwnershipProofTypedData:Y9},Symbol.toStringTag,{value:"Module"}));function X0(){return X0=Object.assign?Object.assign.bind():function(t){for(var e=1;e{this.queue.length>0&&(this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(this.run,this.options.timeWindow))},this.handle=(n,i,s)=>{if(this.batchableJsonRpcMethods.find(o=>o===i.method)){this.queue.push({request:i,callback:s,next:n}),this.options.verbose&&console.log("Scheduling call",i.method),this.scheduleExecution();return}return this.options.verbose&&console.log("Forwarded call",i.method),n(i,s)},this.run=async function(){r.options.verbose&&console.log("Processing multicall");const n=Math.min(r.options.batchSize,r.queue.length);if(n===0){r.options.verbose&&console.log("Skip multicall, empty queue");return}if(n===1){r.forward(r.queue[0]),r.queue=[],r.options.verbose&&console.log("Skip multicall, single item");return}r.options.verbose&&console.log("Resolving",n);var a=r.queue.slice(0,n);r.queue=n===r.queue.length?[]:r.queue.slice(n),r.options.verbose&&console.log("Updated queue",r.queue.length),r.queue.length!==0&&(r.options.verbose&&console.log("Scheduling next batch"),r.scheduleExecution());const i=a[0].next;let s;var[a,l]=Z6(a,y=>{try{if(y.next!==i)return!1;switch(y.request.method){case ir.ethCall:if(y.request.params[0].from||y.request.params[0].gasPrice||y.request.params[0].value)return!1;case ir.ethGetBalance:case ir.ethGetCode:const m=GG(y.request.params[1]);if(s===void 0&&(s=m),!KG(m,s))return!1}return!0}catch{return!1}});if(l.length!==0&&(r.options.verbose&&console.log("Forwarding incompatible calls",l.length),r.forward(l),a.length===0)){r.options.verbose&&console.log("Skip multicall, all calls are incompatible");return}let o=a.map(y=>{try{switch(y.request.method){case ir.ethCall:return{delegateCall:!1,revertOnError:!1,target:y.request.params[0].to,data:y.request.params[0].data,gasLimit:y.request.params[0].gas?y.request.params[0].gas:0,value:0};case ir.ethGetCode:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callCode"),[y.request.params[0]])};case ir.ethGetBalance:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callBalanceOf"),[y.request.params[0]])};default:return null}}catch{return null}});var[a,l]=Z6(a,(y,m)=>o[m]!==void 0);if(o=o.filter(y=>y),l.length!==0&&(r.options.verbose&&console.log("Forwarding calls on error",l.length),r.forward(l),a.length===0)){r.options.verbose&&console.log("Skip multicall, all calls had encoding errors");return}let c;try{r.options.verbose&&console.log("Encoding multicall"),c=r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("multiCall"),[o])}catch(y){r.options.verbose&&console.warn("Error encoding multicall, forwarding one by one",y),r.forward(a);return}const f=vx(),u=await qG(hx(i)({id:f,jsonrpc:Vl,method:ir.ethCall,params:[{to:r.options.contract,value:0,data:c},V.isBigNumber(s)?s.toNumber():s]}),y=>({jsonrpc:Vl,id:f,result:void 0,error:y}));if(u.error)return r.options.verbose&&console.warn("Error calling multicall, forwarding one by one",u.error),r.forward(a);let h;try{h=r.multicallInterface.decodeFunctionResult(r.multicallInterface.getFunction("multiCall"),u.result)}catch(y){r.options.verbose&&console.warn("Error decoding multicall result, forwarding one by one",y),r.forward(a);return}r.options.verbose&&console.log("Got response for",a.length),a.forEach((y,m)=>{if(!h[0][m])r.options.verbose&&console.warn(`Multicall error for ${y.request.method} not found`),r.forward(y);else switch(y.request.method){case ir.ethCall:y.callback(void 0,{jsonrpc:y.request.jsonrpc,id:y.request.id,result:h[1][m]});break;case ir.ethGetCode:y.callback(void 0,{jsonrpc:y.request.jsonrpc,id:y.request.id,result:qr.decode(["bytes"],h[1][m])[0]});break;case ir.ethGetBalance:y.callback(void 0,{jsonrpc:y.request.jsonrpc,id:y.request.id,result:qr.decode(["uint256"],h[1][m])[0]});break}})},this.options=e?X0({},Pn.DefaultOptions,e):Pn.DefaultOptions,this.options.batchSize<=0)throw new Error(`Invalid batch size of ${this.options.batchSize}`)}forward(e){Array.isArray(e)?e.forEach(r=>r.next(r.request,r.callback)):e.next(e.request,e.callback)}static isMulticall(e){return e&&e.handle!==void 0&&e.conf!==void 0&&Pn.isMulticallOptions(e.options)}static isMulticallOptions(e){return e!==void 0&&e.batchSize!==void 0&&e.timeWindow!==void 0&&e.contract!==void 0}}Pn.DefaultOptions=X0({},JG);const tS=["getNetwork","getBlockNumber","getGasPrice","getTransactionCount","getStorageAt","sendTransaction","estimateGas","getBlock","getTransaction","getTransactionReceipt","getLogs","emit","litenerCount","addListener","removeListener","waitForTransaction","detectNetwork","getBlockWithTransactions"];class QG extends ox{constructor(e,r){var n;super(e.getNetwork()),n=this,this.provider=e,this.multicall=void 0,this.getResolver=async function(i){const s=n.provider;if(s.getResolver){const o=await s.getResolver(await i);return o?new mp(n,o.address,o.name):null}return s.getResolver(await i)},this.next=async function(i,s){try{switch(i.method){case ir.ethCall:n.callback(i,s,await n.provider.call(i.params[0],i.params[1]));break;case ir.ethGetCode:n.callback(i,s,await n.provider.getCode(i.params[0],i.params[1]));break;case ir.ethGetBalance:n.callback(i,s,await n.provider.getBalance(i.params[0],i.params[1]));break}}catch(o){n.callback(i,s,void 0,o)}},this.listenerCount=e.listenerCount.bind(e),this.multicall=Pn.isMulticall(r)?r:new Pn(r),tS.forEach(i=>{e[i]!==void 0&&(this[i]=(...s)=>e[i](...s))})}callback(e,r,n,i){r(i,{jsonrpc:Vl,id:e.id,result:n,error:i})}async call(e,r){return this.rpcCall(ir.ethCall,e,r)}async getCode(e,r){return this.rpcCall(ir.ethGetCode,e,r)}async getBalance(e,r){return this.rpcCall(ir.ethGetBalance,e,r)}async rpcCall(e,...r){const n=vx();return(await hx(this.multicall.handle)(this.next,{jsonrpc:Vl,id:n,method:e,params:r})).result}}class YG{constructor(e,r){if(this.provider=e,this.multicall=void 0,this.multicall=Pn.isMulticall(r)?r:new Pn(r),e.send){const n=async function(s,o){e.send(s,o)};this.send=(i,s)=>{this.multicall.handle(n,i,s)}}if(e.sendAsync){const n=async function(s,o){e.sendAsync(s,o)};this.sendAsync=(i,s)=>{this.multicall.handle(n,i,s)}}}get isMetaMask(){return this.provider.isMetaMask}get isStatus(){return this.provider.isStatus}}const XG=t=>e=>{const r=Pn.isMulticall(t)?t:new Pn(t);return(n,i)=>r.handle(e,n,i)};var ZG=Object.freeze({__proto__:null,ProxyMethods:tS,MulticallProvider:QG,MulticallExternalProvider:YG,multicallMiddleware:XG});const eK=Object.freeze(Object.defineProperty({__proto__:null,Multicall:Pn,providers:ZG},Symbol.toStringTag,{value:"Module"}));var rS={exports:{}};/*! +)[]`,Rp=(t,e)=>{const r=[],n=new tr(pr.mainModule.abi);for(const i of e){const s=X(i.data||"0x");if(i.to===t&&Q(s.slice(0,4))===hS){const o=s.slice(4),a=qr.decode([vS],o)[0];r.push(...Rp(i.to,a.map(l=>Cr({},l,{to:l.target}))))}else try{const o=n.decodeFunctionData("execute",s)[0],a=Rp(t,o.map(l=>Cr({},l,{to:l.target})));r.push(...a)}catch{r.push(i)}}return r};var YW=Object.freeze({__proto__:null,MetaTransactionsType:Xh,intendTransactionBundle:jW,intendedTransactionID:zW,unpackMetaTransactionsData:UW,packMetaTransactionsData:aS,digestOfTransactions:lS,subdigestOfTransactions:VW,subdigestOfGuestModuleTransactions:HW,toSequenceTransactions:cS,toSequenceTransaction:Nx,isSequenceTransaction:Zh,hasSequenceTransactions:fS,sequenceTxAbiEncode:Kf,fromTxAbiEncode:WW,encodeNonce:qW,decodeNonce:GW,fromTransactionish:KW,isTransactionBundle:uS,isSignedTransactionBundle:dS,encodeBundleExecData:JW,selfExecuteSelector:hS,selfExecuteAbi:vS,unwind:Rp});const yS="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",QW="0x6492649264926492649264926492649264926492649264926492649264926492";async function pS(t,e,r,n){return await t.call({data:Ue([yS,new Hm().encode(["address","bytes32","bytes"],[e,r,n])])})==="0x01"}var XW=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:yS,EIP_6492_SUFFIX:QW,validateEIP6492Offchain:pS});class ZW{constructor(e){this.provider=e,this.isDeployedCache=new Set}module(e){return new _a(e,[...pr.mainModuleUpgradable.abi,...pr.mainModule.abi,...pr.erc1271.abi],this.provider)}async isDeployed(e){if(this.isDeployedCache.has(e))return!0;const n=(await this.provider.getCode(e).then(i=>X(i))).length!==0;return n&&this.isDeployedCache.add(e),n}async implementation(e){const r=qr.encode(["address"],[e]),n=await this.provider.getStorageAt(e,r).then(i=>X(i));if(n.length===20)return we(Q(n));if(n.length===32)return qr.decode(["address"],n)[0]}async imageHash(e){try{return await this.module(e).imageHash()}catch{}}async nonce(e,r=0){try{return await this.module(e).readNonce(r)}catch(n){if(!await this.isDeployed(e))return 0;throw n}}async isValidSignature(e,r,n){return pS(this.provider,e,r,n)}}var eq=Object.freeze({__proto__:null,OnChainReader:ZW});function tq(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var ce=Object.freeze({__proto__:null,config:yW,signature:pW,context:FW,signer:CW,EIP1271:xW,transaction:YW,reader:eq,EIP6492:XW,isWalletSignRequestMetadata:tq});const Mp=[{config:Cx,signature:wx},{config:Qh,signature:Yh}];function gS(t){const e=t-1;if(e<0||e>=Mp.length)throw new Error(`No coder for version: ${t}`);return Mp[e]}function rq(t){return gS(t)}var wr=Object.freeze({__proto__:null,ALL_CODERS:Mp,coderFor:gS,genericCoderFor:rq});const mS=[Vi,Ae],nq=Object.freeze(Object.defineProperty({__proto__:null,allVersions:mS,commons:ce,universal:wr,v1:Vi,v2:Ae},Symbol.toStringTag,{value:"Module"}));function iq(t,e,r){for(let n=0;ne.version)&&(e=r);if(e===void 0)throw new Error("No migrations");return e}async getAllMigratePresignedTransaction(e){const{address:r,fromImageHash:n,fromVersion:i,chainId:s}=e;let o=n,a=i;const l=Object.values(this.contexts),c=[];for(let f=1;fX(s).length===0))return U6;if(!n.provider)throw new Error("signer.provider is not set, but is required");return n.provider.estimateGas({from:e,to:i.to,data:i.data,value:i.value})}))).map(i=>({executed:!0,succeeded:!0,gasUsed:H.from(i).toNumber(),gasLimit:H.from(i).toNumber()}))}async getNonce(e,r,n){if(!this.provider)throw new Error("provider is not set");if(await this.provider.getCode(e)==="0x")return 0;r===void 0&&(r=0);const s=await new _a(e,pr.mainModule.abi,this.provider).readNonce(r,{blockTag:n});return ce.transaction.encodeNonce(r,s)}async wait(e,r,n=this.waitPollRate,i=5){var s=this;typeof e!="string"&&(e=ce.transaction.intendedTransactionID(e));let o=!1;const a=async function(f,u){let h=0;for(;!o;){try{return await f()}catch(y){if(h++,i!==void 0&&h>=i)throw ve.error(`giving up after ${h} failed attempts${u?`: ${u}`:""}`,y),y;ve.warn(`attempt #${h} failed${u?`: ${u}`:""}`,y)}n>0&&await new Promise(y=>setTimeout(y,n))}throw new Error(`timed out after ${h} failed attempts${u?`: ${u}`:""}`)},l=async function(){let f=s.fromBlockLog;if(f<0&&(f=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number")+f),typeof e!="string")throw new Error("impossible");const u=e.replace("0x","");for(;!o;){const h=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number"),y=await a(()=>s.provider.getLogs({fromBlock:Math.max(0,f-s.deltaBlocksLog),toBlock:h,topics:["0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881"]}),`unable to get NonceChange logs for blocks ${Math.max(0,f-s.deltaBlocksLog)} to ${h}`);f=h;const p=(await Promise.all(y.map(k=>a(()=>s.provider.getTransactionReceipt(k.transactionHash),`unable to get receipt for transaction ${k.transactionHash}`)))).find(k=>k.logs.find(w=>w.topics.length===0&&w.data.replace("0x","")===u||w.topics.length===1&&w.topics[0]==="0x3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd7"&&w.data.length>=64&&w.data.replace("0x","").startsWith(u)));if(p)return oo({receipt:p},await a(()=>s.provider.getTransaction(p.transactionHash),`unable to get transaction ${p.transactionHash}`));o||await new Promise(k=>setTimeout(k,n))}throw new Error(`Timeout waiting for transaction receipt ${e}`)};return r!==void 0?Promise.race([l(),new Promise((c,f)=>setTimeout(()=>{o=!0,f(`Timeout waiting for transaction receipt ${e}`)},r))]):l()}}function uq(t){return t.signer!==void 0&&io.isSigner(t.signer)}class dq extends ES{constructor(e){if(super(io.isSigner(e)?{provider:e.provider}:oo({},e,{provider:e.signer.provider})),this.signer=void 0,this.txnOptions=void 0,this.signer=io.isSigner(e)?e:e.signer,!this.signer.provider)throw new Error("Signer must have a provider")}async getFeeOptions(e,...r){return{options:[]}}async getFeeOptionsRaw(e,r,n){return{options:[]}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}setTransactionOptions(e){this.txnOptions=e}async relay(e,r,n=!0){r!==void 0&&ve.warn("LocalRelayer doesn't accept fee quotes");const i=ce.transaction.encodeBundleExecData(e),s=this.signer.sendTransaction(oo({to:e.entrypoint,data:i},this.txnOptions,{gasLimit:9e6}));if(n){const o=await s;return o.receipt=await o.wait(),o}else return s}}const hq="v1",vq="v0.4.0",yq="950b00c821b56110c64d947312b9dea3e197e207";let $s=function(t){return t.UNKNOWN="UNKNOWN",t.DROPPED="DROPPED",t.QUEUED="QUEUED",t.SENT="SENT",t.SUCCEEDED="SUCCEEDED",t.PARTIALLY_FAILED="PARTIALLY_FAILED",t.FAILED="FAILED",t}({}),pq=function(t){return t.SEND="SEND",t.RECEIVE="RECEIVE",t.BRIDGE_DEPOSIT="BRIDGE_DEPOSIT",t.BRIDGE_WITHDRAW="BRIDGE_WITHDRAW",t.BURN="BURN",t.UNKNOWN="UNKNOWN",t}({}),gq=function(t){return t.UNKNOWN="UNKNOWN",t.ERC20_TOKEN="ERC20_TOKEN",t.ERC1155_TOKEN="ERC1155_TOKEN",t}({}),mq=function(t){return t.DESC="DESC",t.ASC="ASC",t}({});class SS{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Relayer/",this.ping=n=>this.fetch(this.url("Ping"),je({},n)).then(i=>ze(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),je({},n)).then(i=>ze(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),je({},n)).then(i=>ze(i).then(s=>({status:s.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),je({},n)).then(i=>ze(i).then(s=>({data:s.data}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),je({},n)).then(i=>ze(i).then(s=>({chainID:s.chainID}))),this.sendMetaTxn=(n,i)=>this.fetch(this.url("SendMetaTxn"),je(n,i)).then(s=>ze(s).then(o=>({status:o.status,txnHash:o.txnHash}))),this.getMetaTxnNonce=(n,i)=>this.fetch(this.url("GetMetaTxnNonce"),je(n,i)).then(s=>ze(s).then(o=>({nonce:o.nonce}))),this.getMetaTxnReceipt=(n,i)=>this.fetch(this.url("GetMetaTxnReceipt"),je(n,i)).then(s=>ze(s).then(o=>({receipt:o.receipt}))),this.simulate=(n,i)=>this.fetch(this.url("Simulate"),je(n,i)).then(s=>ze(s).then(o=>({results:o.results}))),this.updateMetaTxnGasLimits=(n,i)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),je(n,i)).then(s=>ze(s).then(o=>({payload:o.payload}))),this.feeTokens=n=>this.fetch(this.url("FeeTokens"),je({},n)).then(i=>ze(i).then(s=>({isFeeRequired:s.isFeeRequired,tokens:s.tokens}))),this.feeOptions=(n,i)=>this.fetch(this.url("FeeOptions"),je(n,i)).then(s=>ze(s).then(o=>({options:o.options,quote:o.quote}))),this.getMetaTxnNetworkFeeOptions=(n,i)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),je(n,i)).then(s=>ze(s).then(o=>({options:o.options}))),this.sentTransactions=(n,i)=>this.fetch(this.url("SentTransactions"),je(n,i)).then(s=>ze(s).then(o=>({page:o.page,transactions:o.transactions}))),this.pendingTransactions=(n,i)=>this.fetch(this.url("PendingTransactions"),je(n,i)).then(s=>ze(s).then(o=>({page:o.page,transactions:o.transactions}))),this.getGasTank=(n,i)=>this.fetch(this.url("GetGasTank"),je(n,i)).then(s=>ze(s).then(o=>({gasTank:o.gasTank}))),this.addGasTank=(n,i)=>this.fetch(this.url("AddGasTank"),je(n,i)).then(s=>ze(s).then(o=>({status:o.status,gasTank:o.gasTank}))),this.updateGasTank=(n,i)=>this.fetch(this.url("UpdateGasTank"),je(n,i)).then(s=>ze(s).then(o=>({status:o.status,gasTank:o.gasTank}))),this.getGasSponsor=(n,i)=>this.fetch(this.url("GetGasSponsor"),je(n,i)).then(s=>ze(s).then(o=>({gasSponsor:o.gasSponsor}))),this.listGasSponsors=(n,i)=>this.fetch(this.url("ListGasSponsors"),je(n,i)).then(s=>ze(s).then(o=>({page:o.page,gasSponsors:o.gasSponsors}))),this.addGasSponsor=(n,i)=>this.fetch(this.url("AddGasSponsor"),je(n,i)).then(s=>ze(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.updateGasSponsor=(n,i)=>this.fetch(this.url("UpdateGasSponsor"),je(n,i)).then(s=>ze(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.removeGasSponsor=(n,i)=>this.fetch(this.url("RemoveGasSponsor"),je(n,i)).then(s=>ze(s).then(o=>({status:o.status}))),this.reportGasSponsorUsage=(n,i)=>this.fetch(this.url("ReportGasSponsorUsage"),je(n,i)).then(s=>ze(s).then(o=>({gasSponsorUsage:o.gasSponsorUsage}))),this.nextGasTankBalanceAdjustmentNonce=(n,i)=>this.fetch(this.url("NextGasTankBalanceAdjustmentNonce"),je(n,i)).then(s=>ze(s).then(o=>({nonce:o.nonce}))),this.adjustGasTankBalance=(n,i)=>this.fetch(this.url("AdjustGasTankBalance"),je(n,i)).then(s=>ze(s).then(o=>({status:o.status,adjustment:o.adjustment}))),this.getGasTankBalanceAdjustment=(n,i)=>this.fetch(this.url("GetGasTankBalanceAdjustment"),je(n,i)).then(s=>ze(s).then(o=>({adjustment:o.adjustment}))),this.listGasTankBalanceAdjustments=(n,i)=>this.fetch(this.url("ListGasTankBalanceAdjustments"),je(n,i)).then(s=>ze(s).then(o=>({page:o.page,adjustments:o.adjustments}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const je=(t={},e={})=>({method:"POST",headers:oo({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),ze=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});var Hl=Object.freeze({__proto__:null,WebRPCVersion:hq,WebRPCSchemaVersion:vq,WebRPCSchemaHash:yq,ETHTxnStatus:$s,TransferType:pq,FeeTokenType:gq,SortOrder:mq,Relayer:SS});const xq=[$s.DROPPED,$s.SUCCEEDED,$s.PARTIALLY_FAILED,$s.FAILED],bq=[$s.DROPPED,$s.PARTIALLY_FAILED,$s.FAILED];function wq(t){return t.url!==void 0&&typeof t.url=="string"&&t.provider!==void 0&&po.isProvider(t.provider)}const Cq=typeof global=="object"?global.fetch:window.fetch;class kS{constructor(e){if(this.options=e,this.service=void 0,this.provider=void 0,this._fetch=(r,n)=>{const i={},{jwtAuth:s,projectAccessKey:o}=this.options;return s&&s.length>0&&(i.Authorization=`BEARER ${s}`),o&&o.length>0&&(i["X-Access-Key"]=o),n.headers=oo({},n.headers,i),Cq(r,n)},this.service=new SS(e.url,this._fetch),po.isProvider(e.provider))this.provider=e.provider;else{const{jwtAuth:r,projectAccessKey:n}=this.options,i=Gf(e.provider.url,n,r);this.provider=new L0(i)}}async waitReceipt(e,r=1e3,n=5,i){typeof e!="string"&&(e=ce.transaction.intendedTransactionID(e)),ve.info(`[rpc-relayer/waitReceipt] waiting for ${e}`);let s=0;for(;i===void 0||!i();){try{const{receipt:o}=await this.service.getMetaTxnReceipt({metaTxID:e});if(o&&o.txnReceipt&&o.txnReceipt!=="null"&&xq.includes(o.status))return{receipt:o}}catch(o){if(s++,s===n)throw o}(i===void 0||!i())&&await new Promise(o=>setTimeout(o,r))}throw new Error(`Cancelled waiting for transaction receipt ${e}`)}async simulate(e,...r){const i=qr.encode([ce.transaction.MetaTransactionsType],[ce.transaction.sequenceTxAbiEncode(r)]);return(await this.service.simulate({wallet:e,transactions:i})).results}async getFeeOptions(e,...r){const n=await this.service.feeTokens();if(n.isFeeRequired){const i=n.tokens.map(l=>l.symbol).join(", ");ve.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${i}`);const s=await this.getNonce(e);if(!this.provider)throw ve.warn("[rpc-relayer/getFeeOptions] provider not set, needed for stub signature"),new Error("provider is not set");const{options:o,quote:a}=await this.service.feeOptions({wallet:e,to:e,data:ce.transaction.encodeBundleExecData({entrypoint:e,transactions:r,nonce:s})});return ve.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(o)}`),{options:o,quote:{_tag:"FeeQuote",_quote:a}}}else return ve.info("[rpc-relayer/getFeeOptions] relayer fees are not required"),{options:[]}}async getFeeOptionsRaw(e,r,n){const{options:i,quote:s}=await this.service.feeOptions({wallet:e,to:e,data:Q(r),simulate:n==null?void 0:n.simulate});return{options:i,quote:{_tag:"FeeQuote",_quote:s}}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}async getNonce(e,r){ve.info(`[rpc-relayer/getNonce] get nonce for wallet ${e} space: ${r}`);const n=r!==void 0?H.from(r).toHexString():void 0,i=await this.service.getMetaTxnNonce({walletContractAddress:e,space:n}),s=H.from(i.nonce),[o,a]=ce.transaction.decodeNonce(s);return ve.info(`[rpc-relayer/getNonce] got next nonce for wallet ${e} ${a} space: ${o}`),s}async relay(e,r,n=!0){var i=this;ve.info(`[rpc-relayer/relay] relaying signed meta-transactions ${JSON.stringify(e)} with quote ${JSON.stringify(r)}`);let s;if(r!==void 0&&(typeof r._quote=="string"?s=r._quote:ve.warn("[rpc-relayer/relay] ignoring invalid fee quote")),!this.provider)throw ve.warn("[rpc-relayer/relay] provider not set, failed relay"),new Error("provider is not set");const o=ce.transaction.encodeBundleExecData(e),a=await this.service.sendMetaTxn({call:{walletAddress:e.intent.wallet,contract:e.entrypoint,input:o},quote:s});if(ve.info(`[rpc-relayer/relay] got relay result ${JSON.stringify(a)}`),n)return this.wait(e.intent.id);{const l={hash:e.intent.id,confirmations:0,from:e.intent.wallet,wait:f=>Promise.reject(new Error("impossible"))},c=async function(u){var h;if(!i.provider)throw new Error("cannot wait for receipt, relayer has no provider set");const y=await i.wait(e.intent.id),m=(h=y.receipt)==null?void 0:h.transactionHash;if(!m)throw new Error("cannot wait for receipt, unknown native transaction hash");return Object.assign(l,y),i.provider.waitForTransaction(m,u)};return l.wait=c,l}}async wait(e,r,n=1e3,i=5){var s=this;let o=!1;const{receipt:a}=await(r!==void 0?Promise.race([this.waitReceipt(e,n,i,()=>o),new Promise((c,f)=>setTimeout(()=>{o=!0,f(`Timeout waiting for transaction receipt ${e}`)},r))]):this.waitReceipt(e,n,i));if(!a.txnReceipt||bq.includes(a.status))throw new Eq(a);const l=JSON.parse(a.txnReceipt);return{blockHash:l.blockHash,blockNumber:H.from(l.blockNumber).toNumber(),confirmations:1,from:typeof e=="string"?void 0:e.intent.wallet,hash:l.transactionHash,raw:a.txnReceipt,receipt:l,wait:async function(c){return s.provider.waitForTransaction(l.transactionHash,c)}}}}class Eq{constructor(e){this.receipt=e}}function AS(t){return typeof t=="object"&&typeof t.simulate=="function"&&typeof t.getFeeOptions=="function"&&typeof t.gasRefundOptions=="function"&&typeof t.getNonce=="function"&&typeof t.relay=="function"&&typeof t.wait=="function"}const Sq=Object.freeze(Object.defineProperty({__proto__:null,LocalRelayer:dq,ProviderRelayer:ES,ProviderRelayerDefaults:CS,RpcRelayer:kS,RpcRelayerProto:Hl,isLocalRelayerOptions:uq,isProviderRelayerOptions:fq,isRelayer:AS,isRpcRelayerOptions:wq,proto:Hl},Symbol.toStringTag,{value:"Module"}));function _S(t){return t.getAddress!==void 0&&t.buildDeployTransaction!==void 0&&t.predecorateSignedTransactions!==void 0&&t.decorateTransactions!==void 0&&t.sign!==void 0&&t.notifyStatusChange!==void 0}class TS{constructor(e,r=!0){this.signer=e,this.eoa=r}getAddress(){return this.signer.getAddress()}async buildDeployTransaction(e){}async predecorateSignedTransactions(e){return[]}async decorateTransactions(e,r){return e}sign(e,r){return this.signer.signMessage(e)}notifyStatusChange(e,r,n){}suffix(){return[2]}}var Lp=Object.freeze({__proto__:null,isSapientSigner:_S,SignerWrapper:TS});let Ds=function(t){return t[t.INITIAL=0]="INITIAL",t[t.SIGNING=1]="SIGNING",t[t.SIGNED=2]="SIGNED",t[t.ERROR=3]="ERROR",t}({});function PS(t){return t===void 0||t.state===Ds.INITIAL||t.state===Ds.SIGNING}class e1{constructor(e,r=e1.randomTag()){this.tag=r,this.observers=[],this.signers=[],this.count=0,this.setSigners(e)}static randomTag(){return`default-${Q(pi(8)).slice(2)}`}pullId(){return`${this.tag}-${this.count++}`}setSigners(e){this.signers=e.map(r=>_S(r)?r:new TS(r))}async getSigners(){return Promise.all(this.signers.map(async function(e){return e.getAddress()}))}subscribe(e){return this.observers.push(e),()=>{this.observers=this.observers.filter(r=>r!==e)}}async notifyObservers(e,r,n){await Promise.all([...this.signers.map(async function(i){return i.notifyStatusChange(e,r,n)}),...this.observers.map(async function(i){return i(r,n)})])}async buildDeployTransaction(e){let r;for(const n of this.signers){const i=await n.buildDeployTransaction(e);r===void 0?r=i:i!=null&&i.transactions&&(r.transactions=i.transactions.concat(r.transactions))}return r}async predecorateSignedTransactions(e){const r=[];for(const n of this.signers)r.push(...await n.predecorateSignedTransactions(e??{}));return r}async decorateTransactions(e,r){for(const n of this.signers)e=await n.decorateTransactions(e,r??{});return e}signMessage(e){var r=this;const n=this.pullId();return new Promise(async function(i){const{message:s,metadata:o,callback:a,candidates:l}=e,c={ended:!1,message:s,signers:{}};let f=o??{};const u=p=>{f=p,r.notifyObservers(n,c,f)},h=()=>{try{r.notifyObservers(n,c,f);const p=Object.entries(c.signers).filter(([k,w])=>PS(w));if(a&&a(c,u)||p.length===0){c.ended=!0,i(c),r.notifyObservers(n,c,f);return}}catch(p){console.error("Error while notifying observers",p)}};let y=r.signers;if(l){const p=await Promise.all(r.signers.map(async function(k){return k.getAddress()}));y=r.signers.filter((k,w)=>l.includes(p[w]))}const m=await Promise.allSettled(y.map(async function(p){const k=await p.getAddress();c.signers[k]={state:Ds.SIGNING,request:p.sign(s,o??{}).then(w=>{const E=p.suffix();return c.signers[k]={state:Ds.SIGNED,signature:w,suffix:E},h(),w}).catch(w=>{throw c.signers[k]={state:Ds.ERROR,error:w},h(),w})}}));for(let p=0;pGe(e))):Ge(t)}const H6=t=>{const e=new Map;for(const r of Object.keys(t.signers)){const n=t.signers[r];if(n.state===Ds.SIGNED){const i=X(n.suffix),s=Se(["bytes","bytes"],[n.signature,i]);e.set(r,{signature:s,isDynamic:i.length!==1||i[0]!==2})}}return e};class Jf extends io{constructor(e){if(Nt.eq(e.chainId)&&!e.coders.signature.supportsNoChainId)throw new Error(`Sequence version ${e.config.version} doesn't support chainId 0`);super(),this.context=void 0,this.config=void 0,this.address=void 0,this.chainId=void 0,this.provider=void 0,this.relayer=void 0,this.coders=void 0,this.orchestrator=void 0,this._reader=void 0,this.context=e.context,this.config=e.config,this.orchestrator=e.orchestrator,this.coders=e.coders,this.address=e.address,this.chainId=e.chainId,this.provider=e.provider,this.relayer=e.relayer,this._reader=e.reader}static newWallet(e){const r=ce.context.addressOf(e.context,e.coders.config.imageHashOf(e.config));return new Jf(_s({},e,{address:r}))}reader(){if(this._reader)return this._reader;if(!this.provider)throw new Error("Wallet status provider requires a provider");return new ce.reader.OnChainReader(this.provider)}setConfig(e){this.config=e}setOrchestrator(e){this.orchestrator=e}setAddress(e){this.address=e}getSigners(){return this.orchestrator.getSigners()}async getAddress(){return this.address}async decorateTransactions(e){const r=await this.orchestrator.decorateTransactions(e);if(await this.reader().isDeployed(this.address))return r;const n=[{to:r.entrypoint,data:ce.transaction.encodeBundleExecData(r),revertOnError:!0}],i=await this.buildDeployTransaction();return i&&n.unshift(...i.transactions),{entrypoint:this.context.guestModule,chainId:this.chainId,intent:r.intent,transactions:n}}async buildDeployTransaction(e){if(e!=null&&e.ignoreDeployed&&await this.reader().isDeployed(this.address))return;const r=this.coders.config.imageHashOf(this.config);if(ce.context.addressOf(this.context,r)!==this.address)throw new Error(`First address of config ${r} doesn't match wallet address ${this.address}`);const n=Jf.buildDeployTransaction(this.context,r);if(e!=null&&e.includeChildren){const i=await this.orchestrator.buildDeployTransaction(e);i&&(n.transactions=i.transactions.concat(n.transactions))}return n}async deploy(e){const r=await this.buildDeployTransaction(e);if(r!==void 0){if(!this.relayer)throw new Error("Wallet deploy requires a relayer");return this.relayer.relay(_s({},r,{chainId:this.chainId,intent:{id:Q(pi(32)),wallet:this.address}}))}}static buildDeployTransaction(e,r){const n=new tr(pr.factory.abi);return{entrypoint:e.guestModule,transactions:[{to:e.factory,data:n.encodeFunctionData(n.getFunction("deploy"),[e.mainModule,r]),gasLimit:1e5,delegateCall:!1,revertOnError:!0,value:0}]}}async buildUpdateConfigurationTransaction(e){if(this.coders.config.update.isKindUsed){const r=await this.reader().implementation(this.address),n=r&&r===this.context.mainModuleUpgradable;return this.coders.config.update.buildTransaction(this.address,e,this.context,n?"later":"first")}return this.coders.config.update.buildTransaction(this.address,e,this.context)}async getNonce(e=0){const r=await this.reader().nonce(this.address,e);if(r===void 0)throw new Error("Unable to determine nonce");return r}async signDigest(e,r){const n=kp(this.address,this.chainId,e);if(this.coders.config.hasSubdigest(this.config,n))return this.coders.signature.encodeSigners(this.config,new Map,[n],this.chainId).encoded;const i=_s({},r,{digest:e,chainId:this.chainId,address:this.address,config:this.config}),s=X(n),o=await this.orchestrator.signMessage({candidates:this.coders.config.signersOf(this.config).map(l=>l.address),message:s,metadata:i,callback:(l,c)=>{const f=H6(l),u=_s({},i,{parts:f});return c(u),this.coders.signature.hasEnoughSigningPower(this.config,f)}}),a=H6(o);return this.coders.signature.encodeSigners(this.config,a,[],this.chainId).encoded}signMessage(e){return this.signDigest(pe(e),{message:e})}signTransactionBundle(e){if(e.entrypoint!==this.address)throw new Error(`Invalid entrypoint: ${e.entrypoint} !== ${this.address}`);return this.signTransactions(e.transactions,e.nonce)}async fetchNonceOrSpace(e){let r;if(e&&e.space!==void 0)r=H.from(e.space);else{if(e===void 0)return this.randomNonce();if(e&&e.serial===!0)r=0;else return e}const n=await this.reader().nonce(this.address,r);if(n===void 0)throw new Error("Unable to determine nonce");return ce.transaction.encodeNonce(r,n)}randomNonce(){const e=H.from(Q(pi(12)));return ce.transaction.encodeNonce(e,0)}async signTransactions(e,r,n){const i=await V6(e),s=ce.transaction.fromTransactionish(this.address,i);s.length===0&&s.push({to:this.address,data:"0x",value:0,gasLimit:0,delegateCall:!1,revertOnError:!0});const o=await this.fetchNonceOrSpace(r),a=ce.transaction.digestOfTransactions(o,s),l=_s({digest:a,transactions:s},n),c=await this.signDigest(a,l);return{intent:{id:kp(this.address,this.chainId,a),wallet:this.address},chainId:this.chainId,transactions:s,entrypoint:this.address,nonce:o,signature:c}}async sendSignedTransaction(e,r){if(!this.relayer)throw new Error("Wallet sendTransaction requires a relayer");return this.relayer.relay(e,r)}async sendTransaction(e,r){let n;(r==null?void 0:r.nonce)!==void 0?n=r.nonce:r!=null&&r.serial?n=0:n=this.randomNonce();const i=await this.signTransactions(e,n),s=await this.decorateTransactions(i);return this.sendSignedTransaction(s,r==null?void 0:r.quote)}async fillGasLimits(e){const r=await V6(e),n=ce.transaction.fromTransactionish(this.address,r),i=this.relayer;if(!i)throw new Error("Wallet fillGasLimits requires a relayer");const s=await i.simulate(this.address,...n);return n.map((o,a)=>{const l=o.gasLimit?H.from(o.gasLimit).toNumber():s[a].gasLimit;return _s({},o,s[a],{gasLimit:l})})}connect(e,r){return this.provider=e,this.relayer=r,this}signTransaction(e){throw new Error("Method not implemented.")}}function Fi(){return Fi=Object.assign?Object.assign.bind():function(t){for(var e=1;eAq(t[e])):!1}function Tq(t){if(!t)return[];const e=H.from(t.value);switch(t.token.type){case Hl.FeeTokenType.UNKNOWN:return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.to,value:e.toHexString(),data:[]}];case Hl.FeeTokenType.ERC20_TOKEN:if(!t.token.contractAddress)throw new Error("No contract address for ERC-20 fee option");return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.token.contractAddress,value:0,data:new tr([{constant:!1,inputs:[{type:"address"},{type:"uint256"}],name:"transfer",outputs:[],type:"function"}]).encodeFunctionData("transfer",[t.to,e.toHexString()])}];default:throw new Error(`Unhandled fee token type ${t.token.type}`)}}class Pq{constructor(e,r,n){this.account=e,this.chainId=r,this.options=n,this._isSigner=!0}get provider(){return this.account.providerFor(this.chainId)}async getAddress(){return this.account.address}signMessage(e){var r,n;return this.account.signMessage(e,this.chainId,(r=(n=this.options)==null?void 0:n.cantValidateBehavior)!=null?r:"throw")}async defaultSelectFee(e,r){if(r.length===0)return;const n=[{constant:!0,inputs:[{type:"address"}],name:"balanceOf",outputs:[{type:"uint256"}],type:"function"}];for(const i of r)if(i.token.type===Hl.FeeTokenType.UNKNOWN){if((await this.getBalance()).gte(H.from(i.value)))return i}else if(i.token.contractAddress&&i.token.type===Hl.FeeTokenType.ERC20_TOKEN&&(await new _a(i.token.contractAddress,n,this.provider).balanceOf(this.account.address)).gte(H.from(i.value)))return i;throw new Error("No fee option available - not enough balance")}async sendTransaction(e,r){var n,i,s,o,a;const l=_q(e)?await Ge(e):e,c=await this.account.prepareTransactions({txs:l,chainId:this.chainId,stubSignatureOverrides:(n=(i=this.options)==null?void 0:i.stubSignatureOverrides)!=null?n:new Map,simulateForFeeOptions:r==null?void 0:r.simulateForFeeOptions}),u=await((s=(o=this.options)==null?void 0:o.selectFee)!=null?s:this.defaultSelectFee.bind(this))(l,c.feeOptions),h=[...c.transactions,...Tq(u)];return this.account.sendTransaction(h,this.chainId,c.feeQuote,void 0,void 0,(a=this.options)!=null&&a.nonceSpace?{nonceSpace:this.options.nonceSpace}:void 0)}getBalance(e){return this.provider.getBalance(this.account.address,e)}call(e,r){return this.provider.call(e,r)}async resolveName(e){const r=await this.provider.resolveName(e);if(!r)throw new Error(`Could not resolve name ${e}`);return r}connect(e){throw new Error("Method not implemented.")}signTransaction(e){throw new Error("Method not implemented.")}getTransactionCount(e){throw new Error("Method not implemented.")}estimateGas(e){throw new Error("Method not implemented.")}getChainId(){return Promise.resolve(H.from(this.chainId).toNumber())}getGasPrice(){throw new Error("Method not implemented.")}getFeeData(){throw new Error("Method not implemented.")}checkTransaction(e){throw new Error("Method not implemented.")}populateTransaction(e){throw new Error("Method not implemented.")}_checkProvider(e){throw new Error("Method not implemented.")}}class Iq{async isDeployed(e){return!1}async implementation(e){}async imageHash(e){}async nonce(e,r){return Nt}async isValidSignature(e,r,n){throw new Error("Method not supported.")}}class qi{constructor(e){this.address=void 0,this.networks=void 0,this.tracker=void 0,this.contexts=void 0,this.migrator=void 0,this.migrations=void 0,this.orchestrator=void 0,this.jwt=void 0,this.projectAccessKey=void 0,this.address=we(e.address),this.contexts=e.contexts,this.tracker=e.tracker,this.networks=e.networks,this.orchestrator=e.orchestrator,this.jwt=e.jwt,this.projectAccessKey=e.projectAccessKey,this.migrations=e.migrations||Dp.DefaultMigrations,this.migrator=new $p.Migrator(e.tracker,this.migrations,this.contexts)}getSigner(e,r){return new Pq(this,e,r)}static async new(e){var r;const i=new $p.Migrator(e.tracker,(r=e.migrations)!=null?r:Dp.DefaultMigrations,e.contexts).lastMigration(),s=i.configCoder,o=s.fromSimple(e.config),a=s.imageHashOf(o),l=e.contexts[i.version],c=ce.context.addressOf(l,a);return await e.tracker.saveCounterfactualWallet({config:o,context:Object.values(e.contexts)}),new qi({address:c,tracker:e.tracker,contexts:e.contexts,networks:e.networks,orchestrator:e.orchestrator,migrations:e.migrations,projectAccessKey:e.projectAccessKey})}getAddress(){return Promise.resolve(this.address)}get version(){return this.migrator.lastMigration().version}get coders(){const e=this.migrator.lastMigration();return{signature:e.signatureCoder,config:e.configCoder}}network(e){const r=H.from(e),n=this.networks.find(i=>r.eq(i.chainId));if(!n)throw new Error(`Network not found for chainId ${e}`);return n}providerFor(e){const r=this.network(e);if(!r.provider&&!r.rpcUrl)throw new Error(`Provider not found for chainId ${e}`);return r.provider||new L0(Gf(r.rpcUrl,this.projectAccessKey,this.jwt),{name:"",chainId:H.from(e).toNumber()})}reader(e){return Nt.eq(e)?new Iq:new ce.reader.OnChainReader(this.providerFor(e))}relayer(e){const r=this.network(e);if(!r.relayer)throw new Error(`Relayer not found for chainId ${e}`);return AS(r.relayer)?r.relayer:new kS(Fi({},r.relayer,{projectAccessKey:this.projectAccessKey,jwtAuth:this.jwt}))}setOrchestrator(e){this.orchestrator=e}setJwt(e){this.jwt=e}contextFor(e){const r=this.contexts[e];if(!r)throw new Error(`Context not found for version ${e}`);return r}walletForStatus(e,r){const n=wr.coderFor(r.version);return this.walletFor(e,this.contextFor(r.version),r.config,n)}walletFor(e,r,n,i){const s=Nt.eq(e);return new Jf({config:n,context:r,chainId:e,coders:i,relayer:s?void 0:this.relayer(e),address:this.address,orchestrator:this.orchestrator,reader:this.reader(e)})}async status(e,r=!1){var n=this;const i=this.reader(e).isDeployed(this.address),s=this.tracker.imageHashOfCounterfactualWallet({wallet:this.address}).then(M=>{if(!M)throw new Error(`Counterfactual imageHash not found for wallet ${this.address}`);return M}),o=s.then(M=>xS.counterfactualVersion(this.address,M.imageHash,Object.values(this.contexts))),a=async function(){if(!await i)return o;const B=await n.reader(e).implementation(n.address);if(!B)throw new Error(`Implementation not found for wallet ${n.address}`);const U=Object.values(n.contexts);for(let j=0;j0?p[p.length-1].nextImageHash:h,w=await this.tracker.configOfImageHash({imageHash:k});if(!w)throw new Error(`Config not found for imageHash ${k}`);const E=await i,A=await s,I=wr.coderFor(y).config.checkpointOf(w);return{original:Fi({},A,{version:await o}),onChain:{imageHash:u,config:await c,version:f,deployed:E},fullyMigrated:y===this.version,signedMigrations:m,version:y,presignedConfigurations:p,imageHash:k,config:w,checkpoint:I,canOnchainValidate:f===this.version&&E}}mustBeFullyMigrated(e){if(!e.fullyMigrated)throw new Error(`Wallet ${this.address} is not fully migrated`)}async predecorateSignedTransactions(e,r){const n=await this.orchestrator.predecorateSignedTransactions({chainId:r}),i=await this.predecorateTransactions([],e,r);return ce.transaction.fromTransactionish(this.address,i).length>0&&n.push(await this.signTransactions(i,r)),n}async predecorateTransactions(e,r,n){if(r.onChain.imageHash!==r.imageHash){const s=await this.walletForStatus(n,r).buildUpdateConfigurationTransaction(r.config);return[Array.isArray(e)?e:[e],s.transactions].flat()}return e}async decorateTransactions(e,r,n){var i,s;if(!Array.isArray(e))return this.decorateTransactions([e],r,n);n=(i=n)!=null?i:e[0].chainId;const o=await this.buildBootstrapTransactions(r,n),a=o.transactions.length>0;if(!a&&e.length===1)return e[0];const{entrypoint:l}=a?o:e[0],c={entrypoint:l,chainId:n,intent:(s=e[0])==null?void 0:s.intent,transactions:[...o.transactions,...e.map(f=>({to:f.entrypoint,data:ce.transaction.encodeBundleExecData(f),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}))]};if(!r.onChain.deployed){const f=ce.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,n,c.transactions);c.intent===void 0?c.intent={id:f,wallet:this.address}:c.intent.id=f}return c}async decorateSignature(e,r){if(!r.presignedConfigurations||r.presignedConfigurations.length===0)return e;const n=this.coders.signature,i=r.presignedConfigurations.map(o=>o.signature),s=n.chainSignatures(e,i);return n.trim(s)}async publishWitness(){const e=pe(He(`This is a Sequence account woo! ${Date.now()}`)),r=await this.signDigest(e,0,!1),n=this.coders.signature.decode(r),i=this.coders.signature.signaturesOfDecoded(n);return this.tracker.saveWitnesses({wallet:this.address,digest:e,chainId:0,signatures:i})}async signDigest(e,r,n=!0,i="ignore",s){const o=Nt.eq(r)?this.networks[0].chainId:r,a=await this.status(o);if(this.mustBeFullyMigrated(a),!a.canOnchainValidate&&i==="throw")throw new Error("Wallet cannot validate onchain");const c=await this.walletForStatus(r,a).signDigest(e,s),f=n?this.decorateSignature(c,a):c;if(!a.canOnchainValidate)switch(i){case"ignore":return f;case"eip6492":return this.buildEIP6492Signature(await f,a,r)}return f}buildOnChainSignature(e){const r=ce.signature.subdigestOf({digest:Q(e),chainId:0,address:this.address}),n=Q(r),i=this.coders.config.fromSimple({threshold:32768,checkpoint:0,signers:[],subdigests:[n]}),s=new tr(pr.mainModule.abi),o={entrypoint:this.address,transactions:[{to:this.address,data:s.encodeFunctionData("setExtraImageHash",[this.coders.config.imageHashOf(i),"57896044618658097711785492504343953926634992332820282019728792003956564819968"]),gasLimit:25e4}]};this.tracker.saveWalletConfig({config:i});const a=this.coders.signature.encodeSigners(i,new Map,[n],0).encoded;return{bundle:o,signature:a}}async buildEIP6492Signature(e,r,n){const i=await this.buildBootstrapTransactions(r,n);if(i.transactions.length===0)throw new Error("Cannot build EIP-6492 signature without bootstrap transactions");const s=qr.encode(["address","bytes","bytes"],[i.entrypoint,ce.transaction.encodeBundleExecData(i),e]);return Se(["bytes","bytes32"],[s,ce.EIP6492.EIP_6492_SUFFIX])}async editConfig(e){const r=await this.status(0).then(i=>i.config),n=this.coders.config.editConfig(r,Fi({},e,{checkpoint:this.coders.config.checkpointOf(r).add(1)}));return this.updateConfig(n)}async updateConfig(e){if(!this.coders.config.isWalletConfig(e))throw new Error(`Invalid config for wallet ${this.address}`);const r=this.coders.config.imageHashOf(e),n=this.coders.signature.hashSetImageHash(r),i=await this.signDigest(n,0,!1);await this.tracker.savePresignedConfiguration({wallet:this.address,nextConfig:e,signature:i});const s=await this.tracker.configOfImageHash({imageHash:r,noCache:!0});if(!s||this.coders.config.imageHashOf(s)!==r)throw Error(`Reverse lookup failed for imageHash ${r}`)}async buildBootstrapTransactions(e,r){var n;const i=await this.orchestrator.buildDeployTransaction({chainId:r}),s=(n=i==null?void 0:i.transactions)!=null?n:[];if(!e.onChain.deployed){const l=Jf.buildDeployTransaction(e.original.context,e.original.imageHash);s.push(...l.transactions)}s.length,s.push(...e.signedMigrations.map(l=>({to:l.tx.entrypoint,data:ce.transaction.encodeBundleExecData(l.tx),value:0,gasLimit:0,revertOnError:!0,delegateCall:!1})));const o=e.signedMigrations.length>0?e.signedMigrations[0].tx.intent.id:ce.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,r,s),{guestModule:a}=this.contextFor(e.version);return{entrypoint:a,transactions:s,chainId:r,intent:{id:o,wallet:this.address}}}async bootstrapTransactions(e,r){const n=r||await this.status(e);return this.buildBootstrapTransactions(n,e)}async doBootstrap(e,r,n){const i=await this.bootstrapTransactions(e,n);return this.relayer(e).relay(Fi({},i,{chainId:e}),r)}signMessage(e,r,n="ignore"){return this.signDigest(pe(e),r,!0,n)}async signTransactions(e,r,n,i){const s=n||await this.status(r);this.mustBeFullyMigrated(s);const o=this.walletForStatus(r,s),a={address:this.address,digest:"",chainId:r,config:{version:this.version},decorate:!0,cantValidateBehavior:"ignore"},l=(i==null?void 0:i.nonceSpace)&&{space:i==null?void 0:i.nonceSpace,serial:i==null?void 0:i.serial},c=await o.signTransactions(e,l,a);return Fi({},c,{signature:await this.decorateSignature(c.signature,s)})}async signMigrations(e,r){const n=await this.status(e);if(n.fullyMigrated)return!1;const i=this.walletForStatus(e,n),s=r(i.config),o=await this.migrator.signNextMigration(this.address,n.version,i,s);if(!o)return!1;await this.tracker.saveWalletConfig({config:s});const a=wr.coderFor(s.version).config,l=a.imageHashOf(s),c=await this.tracker.configOfImageHash({imageHash:l,noCache:!0});if(!c||a.imageHashOf(c)!==l)throw Error(`Reverse lookup failed for imageHash ${l}`);return await this.tracker.saveMigration(this.address,o,this.contexts),!0}async signAllMigrations(e){var r=this;const n=[];return{signedMigrations:(await Promise.all(this.networks.map(async function(o){try{return await r.signMigrations(o.chainId,e)}catch(a){return console.warn(`Failed to sign migrations for chain ${o.chainId}`,a),n.push(o.chainId),null}}))).filter(o=>o!==null),failedChains:n}}async isMigratedAllChains(){var e=this;const r=[];return{migratedAllChains:(await Promise.all(this.networks.map(async function(s){try{return await e.status(s.chainId)}catch(o){return r.push(s.chainId),console.warn(`Failed to get status for chain ${s.chainId}`,o),{fullyMigrated:!0}}}))).every(s=>s.fullyMigrated),failedChains:r}}async sendSignedTransactions(e,r,n,i,s){if(!Array.isArray(e))return this.sendSignedTransactions([e],r,n,i,s);const o=i||await this.status(r);this.mustBeFullyMigrated(o);const a=await this.decorateTransactions(e,o,r);return s==null||s(a),this.relayer(r).relay(a,n)}async fillGasLimits(e,r,n){return this.walletForStatus(r,n||await this.status(r)).fillGasLimits(e)}async gasRefundQuotes(e,r,n,i,s){const o=i||await this.status(r),a=this.walletForStatus(r,o),l=await this.predecorateTransactions(e,o,r),c=ce.transaction.fromTransactionish(this.address,l),f=a.coders.config.buildStubSignature(a.config,n),u=Q(pi(32)),h={chainId:r,intent:{id:u,wallet:this.address},signature:f,transactions:c,entrypoint:this.address,nonce:0},y=await this.decorateTransactions(h,o),m=ce.transaction.encodeBundleExecData(y),p=await this.relayer(r).getFeeOptionsRaw(y.entrypoint,m,s);return Fi({},p,{decorated:y})}async prepareTransactions(e){const r=await this.status(e.chainId),n=await this.fillGasLimits(e.txs,e.chainId,r),i=await this.gasRefundQuotes(n,e.chainId,e.stubSignatureOverrides,r,{simulate:e.simulateForFeeOptions}),s=ce.transaction.unwind(this.address,i.decorated.transactions);return{transactions:n,flatDecorated:s,feeOptions:i.options,feeQuote:i.quote}}async sendTransaction(e,r,n,i=!1,s,o){const a=await this.status(r),l=i?e:await this.predecorateTransactions(e,a,r),f=ce.transaction.fromTransactionish(this.address,l).length>0?await this.signTransactions(l,r,void 0,o):void 0,u=await this.orchestrator.predecorateSignedTransactions({chainId:r}),h=[];return f!==void 0&&f.transactions.length>0&&h.push(f),h.push(...u.filter(y=>y.transactions.length>0)),this.sendSignedTransactions(h,r,n,void 0,s)}async signTypedData(e,r,n,i,s="ignore"){const o=du({domain:e,types:r,message:n});return this.signDigest(o,i,!0,s)}async getSigners(){var e=this;const r=n=>n.length?n[n.length-1]:void 0;return(await Promise.all(this.networks.map(async function({chainId:n,name:i}){try{var s;const o=await e.status(n);let a=(s=r(o.presignedConfigurations))==null?void 0:s.nextImageHash;if(!a&&o.onChain.version!==o.version){const u=r(o.signedMigrations);if(u){const{toVersion:h,toConfig:y}=u;a=wr.genericCoderFor(h).config.imageHashOf(y)}}a||(a=o.onChain.imageHash);const l=await e.tracker.configOfImageHash({imageHash:a});if(!l)throw new Error(`unable to find config for image hash ${a}`);return wr.genericCoderFor(l.version).config.signersOf(l).map(u=>Fi({},u,{network:n}))}catch(o){return console.warn(`unable to get signers on network ${n} ${i}`,o),[]}}))).flat()}async getAllSigners(){var e=this;const r=[];return await Promise.all(this.networks.map(async function(n){const i=n.chainId,s=await e.status(i,!0),o=[s.onChain.imageHash,...s.onChain.version!==s.version?s.signedMigrations.map(a=>wr.coderFor(a.toVersion).config.imageHashOf(a.toConfig)):[],...s.presignedConfigurations.map(a=>a.nextImageHash)];return Promise.all(o.map(async function(a,l){const c=l===o.length-1,f=await e.tracker.configOfImageHash({imageHash:a});if(!f){console.warn(`AllSigners may be incomplete, config not found for imageHash ${a}`);return}wr.genericCoderFor(f.version).config.signersOf(f).forEach(y=>{const m=r.find(p=>p.address===y.address&&p.network===i);if(m&&c&&m.flaggedForRemoval){m.flaggedForRemoval=!1;return}m||r.push({address:y.address,weight:y.weight,network:i,flaggedForRemoval:!c})})}))})),r}}function Rq(t){return t instanceof qi}const Mq=Object.freeze(Object.defineProperty({__proto__:null,Account:qi,isAccount:Rq},Symbol.toStringTag,{value:"Module"}));function K0(){return K0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),cr({},n)).then(i=>fr(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),cr({},n)).then(i=>fr(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),cr({},n)).then(i=>fr(i).then(s=>({status:s.status}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),cr({},n)).then(i=>fr(i).then(s=>({chainID:s.chainID}))),this.getEtherBalance=(n,i)=>this.fetch(this.url("GetEtherBalance"),cr(n,i)).then(s=>fr(s).then(o=>({balance:o.balance}))),this.getTokenBalances=(n,i)=>this.fetch(this.url("GetTokenBalances"),cr(n,i)).then(s=>fr(s).then(o=>({page:o.page,balances:o.balances}))),this.getTokenSupplies=(n,i)=>this.fetch(this.url("GetTokenSupplies"),cr(n,i)).then(s=>fr(s).then(o=>({page:o.page,contractType:o.contractType,tokenIDs:o.tokenIDs}))),this.getTokenSuppliesMap=(n,i)=>this.fetch(this.url("GetTokenSuppliesMap"),cr(n,i)).then(s=>fr(s).then(o=>({supplies:o.supplies}))),this.getBalanceUpdates=(n,i)=>this.fetch(this.url("GetBalanceUpdates"),cr(n,i)).then(s=>fr(s).then(o=>({page:o.page,balances:o.balances}))),this.getTransactionHistory=(n,i)=>this.fetch(this.url("GetTransactionHistory"),cr(n,i)).then(s=>fr(s).then(o=>({page:o.page,transactions:o.transactions}))),this.syncBalance=(n,i)=>this.fetch(this.url("SyncBalance"),cr(n,i)).then(s=>fr(s).then(o=>({}))),this.fetchTransactionReceipt=(n,i)=>this.fetch(this.url("FetchTransactionReceipt"),cr(n,i)).then(s=>fr(s).then(o=>({receipt:o.receipt}))),this.fetchTransactionReceiptWithFilter=(n,i)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),cr(n,i)).then(s=>fr(s).then(o=>({receipt:o.receipt}))),this.getAllWebhookListeners=(n,i)=>this.fetch(this.url("GetAllWebhookListeners"),cr(n,i)).then(s=>fr(s).then(o=>({listeners:o.listeners}))),this.getWebhookListener=(n,i)=>this.fetch(this.url("GetWebhookListener"),cr(n,i)).then(s=>fr(s).then(o=>({listener:o.listener}))),this.addWebhookListener=(n,i)=>this.fetch(this.url("AddWebhookListener"),cr(n,i)).then(s=>fr(s).then(o=>({status:o.status,listener:o.listener}))),this.updateWebhookListener=(n,i)=>this.fetch(this.url("UpdateWebhookListener"),cr(n,i)).then(s=>fr(s).then(o=>({status:o.status}))),this.removeWebhookListener=(n,i)=>this.fetch(this.url("RemoveWebhookListener"),cr(n,i)).then(s=>fr(s).then(o=>({status:o.status}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const cr=(t={},e={})=>({method:"POST",headers:K0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),fr=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),W6=typeof global=="object"?global.fetch:window.fetch;class RS extends IS{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,W6),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(i,s)=>{const o={},a=this.jwtAuth,l=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),l&&l.length>0&&(o["X-Access-Key"]=l),s.headers=K0({},s.headers,o),W6(i,s)},this.fetch=this._fetch}}const Vq=Object.freeze(Object.defineProperty({__proto__:null,ContractType:Dq,EventLogDataType:Bq,EventLogType:Lq,Indexer:IS,SequenceIndexer:RS,SortOrder:Uq,TransactionStatus:jq,TransactionType:zq,TxnTransferType:Fq,WebRPCSchemaHash:$q,WebRPCSchemaVersion:Oq,WebRPCVersion:Nq},Symbol.toStringTag,{value:"Module"}));function J0(){return J0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),ur({},n)).then(i=>dr(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),ur({},n)).then(i=>dr(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),ur({},n)).then(i=>dr(i).then(s=>({status:s.status}))),this.getTokenMetadata=(n,i)=>this.fetch(this.url("GetTokenMetadata"),ur(n,i)).then(s=>dr(s).then(o=>({tokenMetadata:o.tokenMetadata}))),this.refreshTokenMetadata=(n,i)=>this.fetch(this.url("RefreshTokenMetadata"),ur(n,i)).then(s=>dr(s).then(o=>({status:o.status}))),this.getTokenMetadataBatch=(n,i)=>this.fetch(this.url("GetTokenMetadataBatch"),ur(n,i)).then(s=>dr(s).then(o=>({contractTokenMetadata:o.contractTokenMetadata}))),this.searchTokenMetadata=(n,i)=>this.fetch(this.url("SearchTokenMetadata"),ur(n,i)).then(s=>dr(s).then(o=>({page:o.page,tokenMetadata:o.tokenMetadata}))),this.searchTokenIDs=(n,i)=>this.fetch(this.url("SearchTokenIDs"),ur(n,i)).then(s=>dr(s).then(o=>({page:o.page,tokenIds:o.tokenIds}))),this.tokenCollectionFilters=(n,i)=>this.fetch(this.url("TokenCollectionFilters"),ur(n,i)).then(s=>dr(s).then(o=>({filters:o.filters}))),this.getContractInfo=(n,i)=>this.fetch(this.url("GetContractInfo"),ur(n,i)).then(s=>dr(s).then(o=>({contractInfo:o.contractInfo}))),this.getContractInfoBatch=(n,i)=>this.fetch(this.url("GetContractInfoBatch"),ur(n,i)).then(s=>dr(s).then(o=>({contractInfoMap:o.contractInfoMap}))),this.searchContractInfo=(n,i)=>this.fetch(this.url("SearchContractInfo"),ur(n,i)).then(s=>dr(s).then(o=>({contractInfoList:o.contractInfoList}))),this.searchContractInfoBatch=(n,i)=>this.fetch(this.url("SearchContractInfoBatch"),ur(n,i)).then(s=>dr(s).then(o=>({contractInfoByChain:o.contractInfoByChain}))),this.searchMetadata=(n,i)=>this.fetch(this.url("SearchMetadata"),ur(n,i)).then(s=>dr(s).then(o=>({tokenMetadata:o.tokenMetadata,contractInfo:o.contractInfo}))),this.projectSetTokenMetadata=(n,i)=>this.fetch(this.url("ProjectSetTokenMetadata"),ur(n,i)).then(s=>dr(s).then(o=>({ok:o.ok}))),this.getNiftyswapTokenQuantity=(n,i)=>this.fetch(this.url("GetNiftyswapTokenQuantity"),ur(n,i)).then(s=>dr(s).then(o=>({quantity:o.quantity}))),this.getNiftyswapUnitPrices=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPrices"),ur(n,i)).then(s=>dr(s).then(o=>({prices:o.prices}))),this.getNiftyswapUnitPricesWithQuantities=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPricesWithQuantities"),ur(n,i)).then(s=>dr(s).then(o=>({prices:o.prices}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const ur=(t={},e={})=>({method:"POST",headers:J0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),dr=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),q6=typeof global=="object"?global.fetch:window.fetch;class NS extends MS{constructor(e="https://metadata.sequence.app",r,n){super(e.endsWith("/")?e.slice(0,-1):e,q6),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(i,s)=>{const o={},a=this.jwtAuth,l=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),l&&l.length>0&&(o["X-Access-Key"]=l),s.headers=J0({},s.headers,o),q6(i,s)},this.fetch=this._fetch}}const Qq=Object.freeze(Object.defineProperty({__proto__:null,ContractType:Gq,Metadata:MS,PropertyType:Kq,SequenceMetadata:NS,SortOrder:Yq,SwapType:Jq,WebRPCSchemaHash:qq,WebRPCSchemaVersion:Wq,WebRPCVersion:Hq},Symbol.toStringTag,{value:"Module"}));function Xq(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function Zq(t){return t.startsWith("ipfs://")}class eG{constructor(e,r,n=1e3){this.provider=e,this.solver=r,this.window=n,this.pending=new Map}async runByEIP5719(e,r,n){const i=`${e}-${r}-${n}`,s=Date.now();if(this.pending.has(i)&&s-this.pending.get(i).timestamp10)throw new Error("EIP5719 - Too many tries");if(ce.signer.canRecover(n)){const l=ce.signer.recoverSigner(r,n);if(l&&l.toLowerCase()===t.toLowerCase())return n}try{if(await ce.signer.isValidSignature(t,r,n,e))return n}catch{}const o=await rG(tG(t,e).getAlternativeSignature(r));if(!o||o==="")throw new Error("EIP5719 - Invalid signature and no alternative signature");const a=Q(await(i||new nG).resolve(o));if(!a||a==="")throw new Error("EIP5719 - Empty alternative signature");if(a===Q(n))throw new Error("EIP5719 - Alternative signature is invalid or the same");return OS(t,e,r,a,i,s+1)}class nG{constructor(e="https://cloudflare-ipfs.com/ipfs/"){var r=this;this.gateway=e,this.uri=n=>Zq(n)?Xq(n,this.gateway):n,this.resolve=async function(n){const i=r.uri(n),s=await fetch(i);if(!s.ok)throw new Error(`URISolverIPFS - Failed to fetch ${i}`);return await s.text()}}}const iG=(t,e)=>e.some(r=>t instanceof r);let G6,K6;function sG(){return G6||(G6=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function oG(){return K6||(K6=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const $S=new WeakMap,Bp=new WeakMap,DS=new WeakMap,Rv=new WeakMap,Ox=new WeakMap;function aG(t){const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{r(Ys(t.result)),i()},o=()=>{n(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&$S.set(r,t)}).catch(()=>{}),Ox.set(e,t),e}function lG(t){if(Bp.has(t))return;const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{r(),i()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});Bp.set(t,e)}let Fp={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return Bp.get(t);if(e==="objectStoreNames")return t.objectStoreNames||DS.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Ys(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function cG(t){Fp=t(Fp)}function fG(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(Mv(this),e,...r);return DS.set(n,e.sort?e.sort():[e]),Ys(n)}:oG().includes(t)?function(...e){return t.apply(Mv(this),e),Ys($S.get(this))}:function(...e){return Ys(t.apply(Mv(this),e))}}function uG(t){return typeof t=="function"?fG(t):(t instanceof IDBTransaction&&lG(t),iG(t,sG())?new Proxy(t,Fp):t)}function Ys(t){if(t instanceof IDBRequest)return aG(t);if(Rv.has(t))return Rv.get(t);const e=uG(t);return e!==t&&(Rv.set(t,e),Ox.set(e,t)),e}const Mv=t=>Ox.get(t);function dG(t,e,{blocked:r,upgrade:n,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),a=Ys(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Ys(o.result),l.oldVersion,l.newVersion,Ys(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),a.then(l=>{s&&l.addEventListener("close",()=>s()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}const hG=["get","getKey","getAll","getAllKeys","count"],vG=["put","add","delete","clear"],Nv=new Map;function J6(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Nv.get(e))return Nv.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,i=vG.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||hG.includes(r)))return;const s=async function(o,...a){const l=this.transaction(o,i?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(a.shift())),(await Promise.all([c[r](...a),i&&l.done]))[0]};return Nv.set(e,s),s}cG(t=>({...t,get:(e,r,n)=>J6(e,r)||t.get(e,r,n),has:(e,r)=>!!J6(e,r)||t.has(e,r)}));class yG{constructor(){this.loadPresignedConfiguration=void 0,this.savePresignedConfiguration=void 0,this.saveWitnesses=void 0,this.configOfImageHash=void 0,this.saveWalletConfig=void 0,this.imageHashOfCounterfactualWallet=void 0,this.saveCounterfactualWallet=void 0,this.walletsOfSigner=void 0}}var pG=Object.freeze({__proto__:null,ConfigTracker:yG});class gG{constructor(e){this.tracker=e}async loadPresignedConfiguration(e){return console.debug("? loadPresignedConfiguration"),Lr(e,"? "),Lr(await this.tracker.loadPresignedConfiguration(e),"! ")}savePresignedConfiguration(e){return console.debug("? savePresignedConfiguration"),Lr(e,"? "),this.tracker.savePresignedConfiguration(e)}saveWitnesses(e){return console.debug("? saveWitnesses"),Lr(e,"? "),this.tracker.saveWitnesses(e)}async configOfImageHash(e){return console.debug("? configOfImageHash"),Lr(e,"? "),Lr(await this.tracker.configOfImageHash(e),"! ")}saveWalletConfig(e){return console.debug("? saveWalletConfig"),Lr(e,"? "),this.tracker.saveWalletConfig(e)}async imageHashOfCounterfactualWallet(e){return console.debug("? imageHashOfCounterfactualWallet"),Lr(e,"? "),Lr(await this.tracker.imageHashOfCounterfactualWallet(e),"! ")}saveCounterfactualWallet(e){return console.debug("? saveCounterfactualWallet"),Lr(e,"? "),this.tracker.saveCounterfactualWallet(e)}async walletsOfSigner(e){return console.debug("? walletsOfSigner"),Lr(e,"? "),Lr(await this.tracker.walletsOfSigner(e),"! ")}async getMigration(e,r,n,i){return console.debug("? getMigration"),Lr({address:e,fromImageHash:r,fromVersion:n,chainId:i},"? "),Lr(await this.tracker.getMigration(e,r,n,i),"! ")}saveMigration(e,r,n){return console.debug("? saveMigration"),Lr({address:e,signed:r,contexts:n},"? "),this.tracker.saveMigration(e,r,n)}}function Lr(t,e=""){switch(t){case void 0:console.debug(e+"undefined");break;default:JSON.stringify(t,void 0,2).split(` +`).map(r=>e+r).forEach(r=>console.debug(r));break}return t}var mG=Object.freeze({__proto__:null,DebugConfigTracker:gG});function ao(){return ao=Object.assign?Object.assign.bind():function(t){for(var e=1;ePromise.resolve(this.configs[e]),this.saveConfig=(e,r)=>(this.configs[e]=r,Promise.resolve()),this.loadV2Node=e=>Promise.resolve(this.v2Nodes[e]),this.saveV2Node=(e,r)=>(this.v2Nodes[e]=r,Promise.resolve()),this.loadCounterfactualWallet=e=>Promise.resolve(this.counterfactualWallets[e]),this.saveCounterfactualWallet=(e,r,n)=>(this.counterfactualWallets[e]={imageHash:r,context:n},Promise.resolve()),this.loadPayloadOfSubdigest=e=>Promise.resolve(this.payloads[e]),this.savePayloadOfSubdigest=(e,r)=>(this.payloads[e]=r,Promise.resolve()),this.loadSubdigestsOfSigner=e=>Promise.resolve(Object.keys(this.signatures[e]||{})),this.loadSignatureOfSubdigest=(e,r)=>{var n;return Promise.resolve((n=this.signatures[e])==null?void 0:n[r])},this.saveSignatureOfSubdigest=(e,r,n)=>(this.signatures[e]||(this.signatures[e]={}),this.signatures[e][r]=n,Promise.resolve()),this.loadMigrationsSubdigest=(e,r,n)=>{var i;return Promise.resolve(((i=this.migrations[e])==null||(i=i[r])==null?void 0:i[n])||[])},this.saveMigrationsSubdigest=(e,r,n,i,s)=>(this.migrations[e]||(this.migrations[e]={}),this.migrations[e][r]||(this.migrations[e][r]={}),this.migrations[e][r][n]||(this.migrations[e][r][n]=[]),this.migrations[e][r][n].push({subdigest:i,toImageHash:s}),Promise.resolve())}}function El(t){if(t===void 0)return;const e={};for(const r of Object.keys(t)){const n=t[r];n._isBigNumber===!0&&n._hex!==void 0&&typeof n._hex=="string"&&n._hex.length!==""?e[r]=H.from(n):Array.isArray(n)?e[r]=n.map(i=>El(i)):typeof n=="object"&&n!==null?e[r]=El(n):e[r]=n}return e}class xG{constructor(e){var r=this;this.dbName=e,this._lazyDb=void 0,this.loadConfig=async function(n){return(await r.getDb()).get("configs",n).then(s=>El(s))},this.saveConfig=async function(n,i){await(await r.getDb()).put("configs",i,n)},this.loadV2Node=async function(n){return(await r.getDb()).get("v2Nodes",n).then(s=>El(s))},this.saveV2Node=async function(n,i){await(await r.getDb()).put("v2Nodes",i,n)},this.loadCounterfactualWallet=async function(n){return(await r.getDb()).get("counterfactualWallets",n)},this.saveCounterfactualWallet=async function(n,i,s){await(await r.getDb()).put("counterfactualWallets",{imageHash:i,context:s},n)},this.loadPayloadOfSubdigest=async function(n){return(await r.getDb()).get("payloads",n).then(s=>El(s))},this.savePayloadOfSubdigest=async function(n,i){await(await r.getDb()).put("payloads",i,n)},this.loadSubdigestsOfSigner=async function(n){return(await(await r.getDb()).getAllKeysFromIndex("signatures","signer",IDBKeyRange.only(n))).map(o=>o.split("-")[0])},this.loadSignatureOfSubdigest=async function(n,i){const o=await(await r.getDb()).get("signatures",[i,n].join("-"));return o==null?void 0:o.signature},this.saveSignatureOfSubdigest=async function(n,i,s){await(await r.getDb()).put("signatures",{signature:s,signer:n},[i,n].join("-"))},this.loadMigrationsSubdigest=async function(n,i,s){return(await(await r.getDb()).getAllFromIndex("migrations","jump",IDBKeyRange.only([n,i,s]))).map(l=>({subdigest:l.subdigest,toImageHash:l.toImageHash}))},this.saveMigrationsSubdigest=async function(n,i,s,o,a){await(await r.getDb()).put("migrations",{wallet:n,fromVersion:i,toVersion:s,subdigest:o,toImageHash:a},o)}}async getDb(){if(this._lazyDb)return this._lazyDb;const e=this.dbName;return this._lazyDb=await dG(e,1,{upgrade(r,n,i,s){console.log(`upgrading ${e} from ${n} to ${i} - ${s}`),n===0&&(r.createObjectStore("configs"),r.createObjectStore("v2Nodes"),r.createObjectStore("counterfactualWallets"),r.createObjectStore("payloads"),r.createObjectStore("signatures").createIndex("signer","signer",{unique:!1}),r.createObjectStore("migrations").createIndex("jump",["wallet","fromVersion","toVersion"]))}}),this._lazyDb}}function BS(t){return t.left!==void 0&&t.right!==void 0}function FS(t){return t.weight!==void 0&&t.threshold!==void 0&&t.tree!==void 0}function jp(t){return t.version===2&&t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&typeof t.tree=="string"}var bG=Object.freeze({__proto__:null,isPlainNode:BS,isPlainNested:FS,isPlainV2Config:jp,MemoryTrackerStore:LS,recreateBigNumbers:El,IndexedDBStore:xG});class $x{constructor(e,r=new LS,n=!1){var i=this;this.provider=e,this.store=r,this.useEIP5719=n,this.cachedEIP5719=void 0,this.loadTopology=async function(s){const o=await i.store.loadV2Node(s);if(!o)return{nodeHash:s};if(BS(o)){const[a,l]=await Promise.all([i.loadTopology(o.left),i.loadTopology(o.right)]);return{left:a,right:l}}return FS(o)?{weight:H.from(o.weight),threshold:H.from(o.threshold),tree:await i.loadTopology(o.tree)}:o},this.saveTopology=async function(s){if(Ae.config.isNodeLeaf(s))return;const o=Ae.config.hashNode(s);if(Ae.config.isNode(s)){const a=i.saveTopology(s.left),l=i.saveTopology(s.right),c=i.store.saveV2Node(o,{left:Ae.config.hashNode(s.left),right:Ae.config.hashNode(s.right)});await Promise.all([a,l,c]);return}if(Ae.config.isNestedLeaf(s)){const a=i.saveTopology(s.tree),l=i.store.saveV2Node(o,{weight:H.from(s.weight).toString(),threshold:H.from(s.threshold).toString(),tree:Ae.config.hashNode(s.tree)});await Promise.all([a,l]);return}if(Ae.config.isSignerLeaf(s))return i.store.saveV2Node(o,{address:s.address,weight:s.weight});if(Ae.config.isSubdigestLeaf(s))return i.store.saveV2Node(o,{subdigest:s.subdigest});throw new Error(`Unknown topology type: ${s}`)},this.saveWalletConfig=async function(s){const{config:o}=s;if(Vi.config.ConfigCoder.isWalletConfig(o)){const a=Vi.config.ConfigCoder.imageHashOf(o);return i.store.saveConfig(a,o)}if(Ae.config.ConfigCoder.isWalletConfig(o)){const a=Ae.config.ConfigCoder.imageHashOf(o);if(Ae.config.isComplete(o.tree))return i.store.saveConfig(a,o)}},this.configOfImageHashCache={},this.configOfImageHash=async function(s){const{imageHash:o}=s;if(i.configOfImageHashCache[s.imageHash])return i.configOfImageHashCache[s.imageHash];const a=await i.store.loadConfig(o);if(a){if(a.version===1||a.version===2&&!jp(a))return i.configOfImageHashCache[s.imageHash]=a,a;if(jp(a)){const l={version:2,threshold:H.from(a.threshold),checkpoint:H.from(a.checkpoint),tree:await i.loadTopology(a.tree)};return i.configOfImageHashCache[s.imageHash]=l,l}throw new Error(`Unknown config type: ${a}`)}},this.saveCounterfactualWallet=async function(s){const{config:o,context:a}=s,l=wr.genericCoderFor(o.version).config.imageHashOf(o);await Promise.all([i.saveWalletConfig({config:o}),...a.map(c=>{const f=ce.context.addressOf(c,l);return i.store.saveCounterfactualWallet(f,l,c)})])},this.imageHashOfCounterfactualWallet=async function(s){const{wallet:o}=s,a=await i.store.loadCounterfactualWallet(o);if(a)return{imageHash:a.imageHash,context:a.context}},this.savePayload=async function(s){const{payload:o}=s,a=ce.signature.subdigestOf(o);await i.store.savePayloadOfSubdigest(a,o)},this.payloadOfSubdigestCache={},this.payloadOfSubdigest=async function(s){if(i.payloadOfSubdigestCache[s.subdigest])return i.payloadOfSubdigestCache[s.subdigest];const{subdigest:o}=s,a=await i.store.loadPayloadOfSubdigest(o);return a&&(i.payloadOfSubdigestCache[o]=a),a},this.savePresignedConfiguration=async function(s){const o=Ae.signature.SignatureCoder.decode(s.signature),a=wr.genericCoderFor(s.nextConfig.version).config.imageHashOf(s.nextConfig),l=Ae.chained.messageSetImageHash(a),c=pe(l),f={message:l,address:s.wallet,chainId:0,digest:c},u=i.savePayload({payload:f}),h=i.saveWalletConfig({config:s.nextConfig}),y=await Ae.signature.SignatureCoder.recover(o,f,i.provider),m=Ae.signature.signaturesOf(y.config.tree);await Promise.all([u,h,i.saveWalletConfig({config:y.config}),...m.map(p=>i.store.saveSignatureOfSubdigest(p.address,y.subdigest,p.signature))])},this.loadPresignedConfiguration=async function(s){const{wallet:o,fromImageHash:a,longestPath:l}=s,c=await i.configOfImageHash({imageHash:a});if(!c||!Ae.config.ConfigCoder.isWalletConfig(c))return[];const f=Ae.config.signersOf(c.tree).map(A=>A.address),u=await Promise.all(f.map(A=>i.store.loadSubdigestsOfSigner(A))),h=[...new Set(u.flat())],m=(await Promise.all([...new Set(h)].map(async function(A){return ao({},await i.payloadOfSubdigest({subdigest:A}),{subdigest:A})}))).filter(A=>(A==null?void 0:A.message)&&(A==null?void 0:A.address)&&A.address===o).map(A=>({payload:A,nextImageHash:Ae.chained.decodeMessageSetImageHash(A.message)})).filter(A=>A==null?void 0:A.nextImageHash);let p;const w=(await Promise.all(m.map(async function({nextImageHash:A,payload:I}){const M=await i.configOfImageHash({imageHash:A});if(!M||!Ae.config.isWalletConfig(M))return;const B=H.from(M.checkpoint);return{nextConfig:M,nextCheckpoint:B,nextImageHash:A,payload:I}}))).filter(A=>A!==void 0).filter(A=>A.nextCheckpoint.gt(c.checkpoint)).sort((A,I)=>A.nextCheckpoint.gt(I.nextCheckpoint)?l?1:-1:l?-1:1);for(const A of w){const{nextConfig:I,nextCheckpoint:M,nextImageHash:B,payload:U}=A;if(p){const J=p.checkpoint;if(l){if(M.gte(J))continue}else if(M.lte(J))continue}const j=new Map((await Promise.all(f.map(async function(J){const Z=await i.store.loadSignatureOfSubdigest(J,U.subdigest);if(!Z)return[J,void 0];const ie=Q(i.useEIP5719?await i.cachedEIP5719.runByEIP5719(J,U.subdigest,Z):Z),D=ce.signer.tryRecoverSigner(U.subdigest,ie)!==J;return[J,{isDynamic:D,signature:ie}]}))).filter(J=>!!J[1]));if(j.size===0)continue;const K=Ae.signature.SignatureCoder.encodeSigners(c,j,[],0);K.weight.lt(c.threshold)||(p={nextImageHash:B,checkpoint:H.from(I.checkpoint),signature:K.encoded})}if(!p)return[];const E=await i.loadPresignedConfiguration({wallet:o,fromImageHash:p.nextImageHash,longestPath:l});return[{wallet:o,nextImageHash:p.nextImageHash,signature:p.signature},...E]},this.saveWitnesses=async function(s){const o={digest:s.digest,address:s.wallet,chainId:s.chainId},a=ce.signature.subdigestOf(o);await Promise.all([i.savePayload({payload:o}),...s.signatures.filter(l=>ce.signer.canRecover(l)).map(l=>{const c=ce.signer.recoverSigner(a,l);return i.store.saveSignatureOfSubdigest(c,a,l)})])},this.walletsOfSigner=async function(s){const o=await i.store.loadSubdigestsOfSigner(s.signer),a=await Promise.all(o.map(c=>i.payloadOfSubdigest({subdigest:c}))).then(c=>c.filter(f=>f!==void 0)),l=[];for(const c of a){const f=c.address;if(l.find(y=>y.wallet===f))continue;const u=ce.signature.subdigestOf(c),h=await i.store.loadSignatureOfSubdigest(s.signer,u);h&&l.push({wallet:f,proof:{digest:c.digest,chainId:H.from(c.chainId),signature:Q(h)}})}return l},this.cachedEIP5719=new eG(e)}async saveMigration(e,r,n){const i=r.fromVersion;if(i!==1)throw new Error("Migration not supported");if(!Ae.config.isWalletConfig(r.toConfig))throw new Error("Invalid to config");const{newImageHash:s,address:o}=wS.v1v2.decodeTransaction(r.tx,n);if(o!==e)throw new Error("Invalid migration transaction - address");if(Ae.config.ConfigCoder.imageHashOf(r.toConfig)!=s)throw new Error("Invalid migration transaction - config");const a=ce.transaction.packMetaTransactionsData(r.tx.nonce,r.tx.transactions),l=pe(a),c={chainId:r.tx.chainId,message:a,address:e,digest:l},f=ce.signature.subdigestOf(c),u=this.savePayload({payload:c}),h=this.saveWalletConfig({config:r.toConfig}),y=Vi.signature.SignatureCoder.decode(r.tx.signature),m=await Vi.signature.SignatureCoder.recover(y,c,this.provider),p=Vi.signature.SignatureCoder.signaturesOf(m.config);await Promise.all([u,h,this.saveWalletConfig({config:m.config}),this.store.saveMigrationsSubdigest(e,i,i+1,f,s),...p.map(k=>this.store.saveSignatureOfSubdigest(k.address,m.subdigest,k.signature))])}async getMigration(e,r,n,i){var s=this;const[o,a]=await Promise.all([this.configOfImageHash({imageHash:r}),this.store.loadMigrationsSubdigest(e,n,n+1)]),l=wr.coderFor(n);return!o||!l.config.isWalletConfig(o)?void 0:(await Promise.all(a.map(async function(f){const{subdigest:u,toImageHash:h}=f,y=await s.payloadOfSubdigest({subdigest:u});if(!y||!y.message||!H.from(i).eq(y.chainId))return;const m=l.config.signersOf(o).map(A=>A.address),p=new Map((await Promise.all(m.map(async function(A){const I=await s.store.loadSignatureOfSubdigest(A,u);if(!I)return[A,void 0];const M=Q(s.useEIP5719?await s.cachedEIP5719.runByEIP5719(A,u,I):I),B=ce.signer.tryRecoverSigner(u,M)!==A;return[A,{isDynamic:B,signature:M}]}))).filter(A=>!!A[1])),k=l.signature.encodeSigners(o,p,[],i);if(!k||k.weightf.filter(u=>u!==void 0)))[0]}updateProvider(e){this.provider=e}}var wG=Object.freeze({__proto__:null,LocalConfigTracker:$x});let Ov=function(t){return t.EIP712="EIP712",t.EthSign="EthSign",t.EIP1271="EIP1271",t}({});class CG{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Sessions/",this.ping=n=>this.fetch(this.url("Ping"),zn({},n)).then(i=>Un(i).then(s=>({}))),this.config=(n,i)=>this.fetch(this.url("Config"),zn(n,i)).then(s=>Un(s).then(o=>({version:o.version,config:o.config}))),this.wallets=(n,i)=>this.fetch(this.url("Wallets"),zn(n,i)).then(s=>Un(s).then(o=>({wallets:o.wallets}))),this.deployHash=(n,i)=>this.fetch(this.url("DeployHash"),zn(n,i)).then(s=>Un(s).then(o=>({deployHash:o.deployHash,context:o.context}))),this.configUpdates=(n,i)=>this.fetch(this.url("ConfigUpdates"),zn(n,i)).then(s=>Un(s).then(o=>({updates:o.updates}))),this.migrations=(n,i)=>this.fetch(this.url("Migrations"),zn(n,i)).then(s=>Un(s).then(o=>({migrations:o.migrations}))),this.saveConfig=(n,i)=>this.fetch(this.url("SaveConfig"),zn(n,i)).then(s=>Un(s).then(o=>({}))),this.saveWallet=(n,i)=>this.fetch(this.url("SaveWallet"),zn(n,i)).then(s=>Un(s).then(o=>({}))),this.saveSignature=(n,i)=>this.fetch(this.url("SaveSignature"),zn(n,i)).then(s=>Un(s).then(o=>({}))),this.saveSignerSignatures=(n,i)=>this.fetch(this.url("SaveSignerSignatures"),zn(n,i)).then(s=>Un(s).then(o=>({}))),this.saveMigration=(n,i)=>this.fetch(this.url("SaveMigration"),zn(n,i)).then(s=>Un(s).then(o=>({}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const zn=(t={},e={})=>({method:"POST",headers:ao({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Un=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});class EG{constructor(e,r=!0){this.onlyRecoverable=r,this.sessions=void 0,this.sessions=new CG(e,fetch)}async loadPresignedConfiguration(e){try{const{updates:r}=await this.sessions.configUpdates({wallet:e.wallet,fromImageHash:e.fromImageHash,allUpdates:e.longestPath});return r.map(({toImageHash:n,signature:i})=>({wallet:e.wallet,nextImageHash:n,signature:i}))}catch(r){if($v(r))return[];throw r}}async savePresignedConfiguration(e){const r=e.nextConfig,n=wr.genericCoderFor(r.version).config.imageHashOf(r),i=Ae.signature.setImageHashStruct(n),s=pe(i);await this.sessions.saveSignature({wallet:e.wallet,digest:s,chainID:"0",signature:e.signature,toConfig:nd(r)})}async saveWitnesses(e){let r=e.signatures;this.onlyRecoverable&&(r=r.filter(n=>ce.signer.canRecover(n))),await this.sessions.saveSignerSignatures({wallet:e.wallet,digest:e.digest,chainID:sl(e.chainId),signatures:r})}async configOfImageHash(e){try{const{version:r,config:n}=await this.sessions.config(e);return SG(r,n)}catch(r){if($v(r))return;throw r}}async saveWalletConfig(e){const r=nd(e.config);await this.sessions.saveConfig({version:e.config.version,config:r})}async imageHashOfCounterfactualWallet(e){try{const{deployHash:r,context:n}=await this.sessions.deployHash(e);return{imageHash:r,context:n}}catch(r){if($v(r))return;throw r}}async saveCounterfactualWallet(e){const r=nd(e.config);await this.sessions.saveWallet({version:e.config.version,deployConfig:r})}async walletsOfSigner(e){const{wallets:r}=await this.sessions.wallets(e);return Object.entries(r).map(([n,{digest:i,chainID:s,type:o,signature:a}])=>{switch(o){case Ov.EIP712:a+=Q(ce.signer.SigType.EIP712).slice(2);break;case Ov.EthSign:a+=Q(ce.signer.SigType.ETH_SIGN).slice(2);break;case Ov.EIP1271:a+=Q(ce.signer.SigType.WALLET_BYTES32).slice(2);break}return{wallet:n,proof:{digest:i,signature:a,chainId:H.from(s)}}})}async getMigration(e,r,n,i){var s=this;const o=sl(i),{migrations:a}=await this.sessions.migrations({wallet:e,fromVersion:n,fromImageHash:r,chainID:o}),l=async function(u){const h=a[u];if(h){const y=Object.keys(h).map(Number).sort((m,p)=>p-m);for(const m of y)for(const[p,k]of Object.entries(h[m]))try{const w=await s.configOfImageHash({imageHash:p});if(w)return{fromVersion:n,toVersion:m,toConfig:w,tx:{entrypoint:k.executor,transactions:k.transactions,nonce:k.nonce,signature:k.signature,chainId:u,intent:{id:ce.transaction.subdigestOfTransactions(e,u,k.nonce,k.transactions),wallet:e}}}}catch(w){console.error(w)}}},c=await l(o);if(c)return c;for(const f in a)if(f!==o){const u=await l(f);if(u)return u}}async saveMigration(e,r,n){await this.sessions.saveMigration({wallet:e,fromVersion:r.fromVersion,toVersion:r.toVersion,toConfig:nd(r.toConfig),executor:r.tx.entrypoint,transactions:r.tx.transactions.map(kG),nonce:sl(r.tx.nonce),signature:r.tx.signature,chainID:sl(r.tx.chainId)})}}function nd(t){switch(t.version){case 1:if(Vi.config.ConfigCoder.isWalletConfig(t))return{threshold:Go(t.threshold),signers:t.signers.map(({weight:e,address:r})=>({weight:Go(e),address:r}))};throw new Error(`not a v${t.version} config: ${t}`);case 2:if(Ae.config.ConfigCoder.isWalletConfig(t))return{threshold:Go(t.threshold),checkpoint:Go(t.checkpoint),tree:Nd(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function Nd(t){return Ae.config.isNode(t)?{left:Nd(t.left),right:Nd(t.right)}:Ae.config.isSignerLeaf(t)?{weight:Go(t.weight),address:t.address}:Ae.config.isNestedLeaf(t)?{weight:Go(t.weight),threshold:Go(t.threshold),tree:Nd(t.tree)}:Ae.config.isNodeLeaf(t)?{node:t.nodeHash}:ao({},t)}function SG(t,e){switch(t){case 1:return ao({},e,{version:t});case 2:return ao({},e,{version:t,tree:Od(e.tree)});default:throw new Error(`unknown version ${t}`)}}function Od(t){switch(typeof t){case"object":const e=ao({},t);return e.left!==void 0&&(e.left=Od(e.left)),e.right!==void 0&&(e.right=Od(e.right)),e.tree!==void 0&&(e.tree=Od(e.tree)),e.node!==void 0&&(e.nodeHash=e.node,delete e.node),e;default:throw new Error(`v2 config tree ${t} is not an object`)}}function kG(t){return{to:t.to,value:t.value!==void 0?sl(t.value):void 0,data:t.data!==void 0?Q(t.data):void 0,gasLimit:t.gasLimit!==void 0?sl(t.gasLimit):void 0,delegateCall:t.delegateCall,revertOnError:t.revertOnError}}function Go(t){return H.from(t).toNumber()}function sl(t){return H.from(t).toString()}function $v(t){return typeof t=="object"&&t.status===404}var AG=Object.freeze({__proto__:null,RemoteConfigTracker:EG});function zp(t,e,r){return new Promise(n=>{let i=0;t.forEach(s=>s.then(o=>{r(o)?n(o):(i++,i===t.length&&n(e))}).catch(()=>{i++,i===t.length&&n(e)}))})}async function $c(t,e){return Promise.all(t.map(r=>r.catch(()=>e)))}class _G{constructor(e){this.trackers=e}async configOfImageHash(e){const r=this.trackers.map(async function(a,l){return{res:await a.configOfImageHash(e),i:l}}),n=await zp(r,void 0,a=>(a==null?void 0:a.res)===void 0?!1:wr.genericCoderFor(a.res.version).config.isComplete(a.res));if(n!=null&&n.res)return this.saveWalletConfig({config:n.res,skipTracker:n.i}),n.res;const i=new $x(void 0),s=await $c(r,void 0);for(const a of s)a!=null&&a.res&&await i.saveWalletConfig({config:a.res});const o=await i.configOfImageHash(e);return o&&this.saveWalletConfig({config:o}),o}async saveWalletConfig(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveWalletConfig(e)}))}async imageHashOfCounterfactualWallet(e){const r=await zp(this.trackers.map(n=>n.imageHashOfCounterfactualWallet(e)),void 0,n=>!!n);return r&&this.configOfImageHash({imageHash:r.imageHash}).then(n=>{n&&this.saveCounterfactualWallet({config:n,context:[r.context]})}),r}async saveCounterfactualWallet(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveCounterfactualWallet(e)}))}async walletsOfSigner(e){const r=await $c(this.trackers.map(o=>o.walletsOfSigner(e)),[]).then(o=>o.flat()),n={};for(const o of r)n[o.wallet]=o.proof;const i=Object.keys(n).map(o=>({wallet:o,proof:n[o]})),s=new Map;return i.forEach(({wallet:o,proof:{digest:a,chainId:l,signature:c}})=>{const f=`${o}-${a}-${l}`;let u=s.get(f);u||(u={wallet:o,digest:a,chainId:l,signatures:[]},s.set(f,u)),u.signatures.push(c)}),s.forEach(o=>this.saveWitnesses(o)),i}async saveWitnesses(e){await Promise.all(this.trackers.map(r=>r.saveWitnesses(e)))}async loadPresignedConfiguration(e){var r=this;const n=await $c(this.trackers.map(l=>l.loadPresignedConfiguration(e)),[]),s=(await $c(n.map(async function(l){const c=l[l.length-1],f=await r.configOfImageHash({imageHash:c.nextImageHash});if(f)return{checkpoint:wr.genericCoderFor(f.version).config.checkpointOf(f),result:l}}),void 0)).reduce((l,c)=>c&&(!l||c.checkpoint.gt(l.checkpoint))?c:l);if(!s)return[];const o=new Map,a=l=>(o.has(l)||o.set(l,this.configOfImageHash({imageHash:l})),o.get(l));return s.result.forEach(async function(l){const c=await a(l.nextImageHash);c&&r.savePresignedConfiguration({wallet:e.wallet,nextConfig:c,signature:l.signature})}),s.result}async savePresignedConfiguration(e){await Promise.all(this.trackers.map(r=>r.savePresignedConfiguration(e)))}async getMigration(e,r,n,i){return(await Promise.all(this.trackers.map(o=>o.getMigration(e,r,n,i)))).find(o=>!!o)}async saveMigration(e,r,n){await Promise.all(this.trackers.map(i=>i.saveMigration(e,r,n)))}}class TG{constructor(e,r,n){this.tracker=e,this.cache=r,this.contexts=n}async loadPresignedConfiguration(e){var r=this;const n=[this.tracker.loadPresignedConfiguration(e),this.cache.loadPresignedConfiguration(e)];let i;const[s,o]=await Promise.all(n);if(s.length>0&&o.length>0&&s[s.length-1].nextImageHash===o[o.length-1].nextImageHash)i=e.longestPath===!0?s.length>o.length?s:o:s.lengthu&&(!f||u.checkpoint.gt(f.checkpoint))?u:f))==null?void 0:l.result)!=null?a:[]}return i||[]}async savePresignedConfiguration(e){await Promise.all([this.tracker.savePresignedConfiguration(e),this.cache.savePresignedConfiguration(e)])}async configOfImageHash(e){if(e.noCache!==!0){const n=await this.cache.configOfImageHash(e);if(n)return n}const r=await this.tracker.configOfImageHash(e);return r&&await this.cache.saveWalletConfig({config:r}),r}async saveWalletConfig(e){await Promise.all([this.tracker.saveWalletConfig(e),this.cache.saveWalletConfig(e)])}async imageHashOfCounterfactualWallet(e){if(e.noCache!==!0){const n=await this.cache.imageHashOfCounterfactualWallet(e);if(n)return n}const r=await this.tracker.imageHashOfCounterfactualWallet(e);if(r){const n=await this.configOfImageHash({imageHash:r.imageHash});n&&await this.cache.saveCounterfactualWallet({config:n,context:[r.context]})}return r}async saveCounterfactualWallet(e){await Promise.all([this.tracker.saveCounterfactualWallet(e),this.cache.saveCounterfactualWallet(e)])}async walletsOfSigner(e){if(e.noCache)return this.tracker.walletsOfSigner(e);const r=await Promise.all([this.tracker.walletsOfSigner(e),this.cache.walletsOfSigner(e)]),n=new Map;for(const i of r)for(const s of i)n.set(s.wallet,s);return Array.from(n.values())}async saveWitnesses(e){await Promise.all([this.tracker.saveWitnesses(e),this.cache.saveWitnesses(e)])}async getMigration(e,r,n,i){const s=await this.cache.getMigration(e,r,n,i);if(s)return s;const o=await this.tracker.getMigration(e,r,n,i);return o&&await this.cache.saveMigration(e,o,this.contexts),o}async saveMigration(e,r,n){await Promise.all([this.tracker.saveMigration(e,r,n),this.cache.saveMigration(e,r,n)])}}class Y6{constructor(){this.cache=void 0,this.cache=new Map}do(e,r,n,...i){e=`${e}:${pe(He(JSON.stringify(i,PG)))}`;let s=this.cache.get(e);if(s&&s.expiration&&new Date>=s.expiration&&(s=void 0,this.cache.delete(e)),!s){const o={promise:n(...i)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),s=o,this.cache.set(e,s)}return s.promise}}function PG(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function IG(t){return t instanceof jS}class jS{constructor(e,r=50,n=!1){this.tracker=e,this.window=r,this.verbose=n,this.cache=new Y6}invalidateCache(){this.cache=new Y6}configOfImageHash(e){return this.cache.do("configOfImageHash",this.window,r=>this.tracker.configOfImageHash(r),e)}getMigration(e,r,n,i){return this.cache.do("getMigration",this.window,(...s)=>this.tracker.getMigration(...s),e,r,n,i)}saveMigration(e,r,n){return this.cache.do("saveMigration",void 0,(...i)=>this.tracker.saveMigration(...i),e,r,n)}loadPresignedConfiguration(e){return this.cache.do("loadPresignedConfiguration",this.window,r=>this.tracker.loadPresignedConfiguration(r),e)}savePresignedConfiguration(e){return this.cache.do("savePresignedConfiguration",void 0,r=>this.tracker.savePresignedConfiguration(r),e)}saveWitnesses(e){return this.cache.do("saveWitnesses",void 0,r=>this.tracker.saveWitnesses(r),e)}saveWalletConfig(e){return this.cache.do("saveWalletConfig",void 0,r=>this.tracker.saveWalletConfig(r),e)}imageHashOfCounterfactualWallet(e){return this.cache.do("imageHashOfCounterfactualWallet",void 0,r=>this.tracker.imageHashOfCounterfactualWallet(r),e)}saveCounterfactualWallet(e){return this.cache.do("saveCounterfactualWallet",void 0,r=>this.tracker.saveCounterfactualWallet(r),e)}walletsOfSigner(e){return this.cache.do("walletsOfSigner",this.window,r=>this.tracker.walletsOfSigner(r),e)}updateProvider(e){this.tracker instanceof $x&&this.tracker.updateProvider(e)}}var Dx=Object.freeze({__proto__:null,debug:mG,local:wG,remote:AG,stores:bG,raceUntil:zp,allSafe:$c,MultipleTracker:_G,CachedTracker:TG,isDedupedTracker:IG,DedupedTracker:jS});const RG=Object.freeze(Object.defineProperty({__proto__:null,tracker:pG,trackers:Dx},Symbol.toStringTag,{value:"Module"})),zS=60*60*24*7,MG=60;class Q6{constructor(e,r,n={},i){this.account=e,this.settings=r,this.status=n,this._initialAuthRequest=void 0,this.proofStrings=new Map,this.onAuthCallbacks=[],this.apiClient=void 0,this.metadataClient=void 0,this.indexerClients=new Map,this.projectAccessKey=void 0,this.projectAccessKey=i}now(){return Math.floor(Date.now()/1e3)}get expiration(){var e;return Math.max((e=this.settings.metadata.expiration)!=null?e:zS,120)}onAuth(e){return this.onAuthCallbacks.push(e),()=>this.onAuthCallbacks=this.onAuthCallbacks.filter(r=>r!==e)}async dump(){return this.status.jwt?{jwt:{token:await this.status.jwt.token,expiration:this.status.jwt.expiration},metadata:this.status.metadata}:{metadata:this.settings.metadata}}auth(e=5){var r=this;return this._initialAuthRequest?this._initialAuthRequest:(this._initialAuthRequest=async function(){const n=r.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");let i;for(let s=1;;s++)try{i=(await r.getJWT(!0)).token;break}catch(o){if(s===e)throw console.error(`couldn't authenticate after ${e} attempts`,o),o}return new Pd(n,void 0,i)}(),this._initialAuthRequest)}async getJWT(e){var r=this;const n=this.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");if(this.status.jwt){const c=this.status.jwt,f=await c.token;if(this.now(){throw this.status.jwt=void 0,c}),expiration:o};return this.status.jwt=a,a.token.then(c=>{this.onAuthCallbacks.forEach(f=>{try{f({status:"fulfilled",value:c})}catch{}})}).catch(c=>{this.onAuthCallbacks.forEach(f=>{try{f({status:"rejected",reason:c})}catch{}})}),{token:await a.token,expiration:o}}getProofStringKey(){return`${this.account.address} - ${this.settings.metadata.name}`}async isProofStringValid(e){try{const r=new j0,n=H.from(this.settings.sequenceApiChainId),i=ri(this.account.networks,n);if(!i)throw Error("No network found");return r.chainId=n.toNumber(),r.provider=new L0(Gf(i.rpcUrl,this.projectAccessKey),{name:"",chainId:n.toNumber()}),await r.decodeProof(e),!0}catch{return!1}}async getAPIClient(e=!0){if(!this.apiClient){const r=this.settings.sequenceApiUrl;if(!r)throw Error("No sequence api url");const n=(await this.getJWT(e)).token;this.apiClient=new Pd(r,void 0,n)}return this.apiClient}async getMetadataClient(e=!0){if(!this.metadataClient){const r=(await this.getJWT(e)).token;this.metadataClient=new NS(this.settings.sequenceMetadataUrl,void 0,r)}return this.metadataClient}async getIndexerClient(e,r=!0){const n=ri(this.account.networks,e);if(!n)throw Error(`No network for chain ${e}`);if(!this.indexerClients.has(n.chainId))if(n.indexer)this.indexerClients.set(n.chainId,n.indexer);else if(n.indexerUrl){const i=(await this.getJWT(r)).token;this.indexerClients.set(n.chainId,new RS(n.indexerUrl,void 0,i))}else throw Error(`No indexer url for chain ${e}`);return this.indexerClients.get(n.chainId)}getProofString(e){if(this.proofStrings.has(e)){const l=this.proofStrings.get(e);if(this.now()(r.signature=l,n.encodeProof(r,!0))).catch(l=>{throw this.proofStrings.delete(e),l}),expiration:o};return this.proofStrings.set(e,a),a}}const US=async(t,e,r)=>{const n=we(await t.getAddress());if(!n||n===""||n==="0x")throw VS;const i=new cx;if(i.address=n,!r||!r.app||r.app==="")throw new Lx("authorization options requires app to be set");i.claims.app=r.app,i.claims.ogn=r.origin,i.claims.n=r.nonce,i.setExpiryIn(r.expiry?Math.max(r.expiry,200):zS);const s=i.messageTypedData(),o=P9(e);i.signature=await(t instanceof qi?t.signTypedData(s.domain,s.types,s.message,o,"eip6492"):t.signTypedData(s.domain,s.types,s.message,o));const l=await new j0().encodeProof(i,!0);return{typedData:s,proofString:l}};class Lx extends Error{constructor(e){super(e),this.name="AuthError"}}const VS=new Lx("auth error: account address is empty");function zo(){return zo=Object.assign?Object.assign.bind():function(t){for(var e=1;eJ.wallet));let j;if(U){if(u==null||u(U),j=new qi({address:U,tracker:A,networks:E,contexts:w,orchestrator:p,projectAccessKey:k}),c&&c.length>0){let J=await j.status(M);if(J.original.version!==J.version||j.version!==J.version){const{migratedAllChains:D,failedChains:v}=await j.isMigratedAllChains();if(v.some(C=>Up.includes(C)))throw Error(`Failed to fetch account status on ${v.join(", ")}`);if(!D){if(m&&!await m(j))throw Error("Migration cancelled, cannot open session");const{failedChains:C}=await j.signAllMigrations(y||(N=>N));if(C.some(N=>Up.includes(N)))throw Error(`Failed to sign migrations on ${C.join(", ")}`);Dx.isDedupedTracker(A)&&A.invalidateCache();let P;if([P,J]=await Promise.all([j.isMigratedAllChains().then(N=>N.migratedAllChains),j.status(M)]),!P)throw Error("Failed to migrate account")}}J.onChain.version!==J.version&&await j.doBootstrap(M,void 0,J);const Z=J.config,ie=j.coders.config.editConfig(Z,{add:c,threshold:l});if(j.coders.config.imageHashOf(Z)!==j.coders.config.imageHashOf(ie)){const D=j.coders.config.editConfig(ie,{checkpoint:j.coders.config.checkpointOf(Z).add(1)});await j.updateConfig(D)}}}else{if(!c||c.length===0)throw Error("Cannot create new account without signers");if(!l)throw Error("Cannot create new account without threshold");if(j=await qi.new({config:{threshold:l,checkpoint:0,signers:c},tracker:A,contexts:w,orchestrator:p,networks:E,projectAccessKey:k}),u==null||u(j.address),await j.publishWitness(),!(await A.walletsOfSigner({signer:a,noCache:!0})).some(Z=>Z.wallet===j.address))throw Error("Account not found on tracker")}let K;return I&&(K=new Q6(j,I),K.auth(),K.onAuth(J=>{J.status==="fulfilled"&&j.setJwt(J.value)})),new hf(E,w,j,K)}static async load(e){const{dump:r,settings:n,editConfigOnMigration:i,onMigration:s,orchestrator:o}=e,{contexts:a,networks:l,tracker:c,services:f}=zo({},$d,n);let u;if(HS(r)){var h,y,m;const I=r.config.address||ce.context.addressOf(a[1],Vi.config.ConfigCoder.imageHashOf(zo({},r.config,{version:1}))),M=((h=(y=r.jwt)==null?void 0:y.expiration)!=null?h:0)B.migratedAllChains)){if(s&&!await s(u))throw Error("Migration cancelled, cannot open session");if(console.log("Migrating account..."),await u.signAllMigrations(i),!await u.isMigratedAllChains().then(B=>B.migratedAllChains))throw Error("Failed to migrate account")}}else if(WS(r)){var p,k,w;const I=((p=(k=r.jwt)==null?void 0:k.expiration)!=null?p:0)async(n,i,s)=>{const o=s.messageDigest();return{isValid:await t(i).isValidSignature(s.address,o,s.signature)}},OG=Object.freeze(Object.defineProperty({__proto__:null,AuthError:Lx,CRITICAL_CHAINS:Up,ErrAccountIsRequired:VS,Session:hf,SessionSettingsDefault:$d,ValidateSequenceWalletProof:NG,isSessionDumpV1:HS,isSessionDumpV2:WS,signAuthorization:US},Symbol.toStringTag,{value:"Module"}));function Y0(){return Y0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),Br({},n)).then(i=>Fr(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),Br({},n)).then(i=>Fr(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Br({},n)).then(i=>Fr(i).then(s=>({status:s.status}))),this.getSignerConfig=(n,i)=>this.fetch(this.url("GetSignerConfig"),Br(n,i)).then(s=>Fr(s).then(o=>({signerConfig:o.signerConfig}))),this.sign=(n,i)=>this.fetch(this.url("Sign"),Br(n,i)).then(s=>Fr(s).then(o=>({sig:o.sig}))),this.signWith=(n,i)=>this.fetch(this.url("SignWith"),Br(n,i)).then(s=>Fr(s).then(o=>({sig:o.sig}))),this.authMethods=(n,i)=>this.fetch(this.url("AuthMethods"),Br(n,i)).then(s=>Fr(s).then(o=>({methods:o.methods,active:o.active}))),this.setPIN=(n,i)=>this.fetch(this.url("SetPIN"),Br(n,i)).then(s=>Fr(s).then(o=>({}))),this.resetPIN=(n,i)=>this.fetch(this.url("ResetPIN"),Br(n,i)).then(s=>Fr(s).then(o=>({}))),this.createTOTP=(n,i)=>this.fetch(this.url("CreateTOTP"),Br(n,i)).then(s=>Fr(s).then(o=>({uri:o.uri}))),this.commitTOTP=(n,i)=>this.fetch(this.url("CommitTOTP"),Br(n,i)).then(s=>Fr(s).then(o=>({codes:o.codes}))),this.resetTOTP=(n,i)=>this.fetch(this.url("ResetTOTP"),Br(n,i)).then(s=>Fr(s).then(o=>({}))),this.reset2FA=(n,i)=>this.fetch(this.url("Reset2FA"),Br(n,i)).then(s=>Fr(s).then(o=>({}))),this.recoveryCodes=(n,i)=>this.fetch(this.url("RecoveryCodes"),Br(n,i)).then(s=>Fr(s).then(o=>({codes:o.codes}))),this.resetRecoveryCodes=(n,i)=>this.fetch(this.url("ResetRecoveryCodes"),Br(n,i)).then(s=>Fr(s).then(o=>({codes:o.codes}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Br=(t={},e={})=>({method:"POST",headers:Y0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Fr=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),DG=typeof global=="object"?global.fetch:window.fetch;class LG{constructor(e,r,n=!1){this.address=e,this.url=r,this.appendSuffix=n,this.guard=void 0,this.guard=new $G(r,DG)}async getAddress(){return this.address}async buildDeployTransaction(e){}async predecorateSignedTransactions(e){return[]}async decorateTransactions(e,r){return e}async sign(e,r){var n;if(!ce.isWalletSignRequestMetadata(r))throw new Error("expected sequence signature request metadata");const i=r.guardTotpCode,s=wr.genericCoderFor(r.config.version),{encoded:o}=s.signature.encodeSigners(r.config,(n=r.parts)!=null?n:new Map,[],r.chainId);return(await this.guard.signWith({signer:this.address,request:{msg:Q(e),auxData:this.packMsgAndSig(r.address,r.digest,o,r.chainId),chainId:H.from(r.chainId).toNumber()},token:i?{id:Q0.TOTP,token:i}:void 0})).sig}notifyStatusChange(e,r,n){}async getAuthMethods(e){let r;if("jwt"in e)r=await this.guard.authMethods({},{Authorization:`BEARER ${e.jwt}`});else{const n=await X6(e);r=await this.guard.authMethods({proof:{wallet:n.walletAddress,timestamp:n.timestamp.getTime(),signer:n.signerAddress,signature:n.signature}})}return Y0({},r,{methods:r.methods.map(BG)})}async setPin(e,r){const n=await Tc(r);e===void 0?await this.guard.resetPIN({timestamp:n.timestamp.getTime(),signature:n.signature},{Authorization:`BEARER ${r.jwt}`}):await this.guard.setPIN({pin:e,timestamp:n.timestamp.getTime(),signature:n.signature},{Authorization:`BEARER ${r.jwt}`})}resetPin(e){return this.setPin(void 0,e)}async createTotp(e){const r=await Tc(e),{uri:n}=await this.guard.createTOTP({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return new URL(n)}async commitTotp(e,r){const{codes:n}=await this.guard.commitTOTP({token:e},{Authorization:`BEARER ${r}`});return n}async resetTotp(e){const r=await Tc(e);await this.guard.resetTOTP({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`})}async reset2fa(e,r){if("jwt"in r)await this.guard.reset2FA({code:e},{Authorization:`BEARER ${r.jwt}`});else{const n=await X6(r);await this.guard.reset2FA({code:e,proof:{wallet:n.walletAddress,timestamp:n.timestamp.getTime(),signer:n.signerAddress,signature:n.signature}})}}async getRecoveryCodes(e){const r=await Tc(e),{codes:n}=await this.guard.recoveryCodes({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return n}async resetRecoveryCodes(e){const r=await Tc(e),{codes:n}=await this.guard.resetRecoveryCodes({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return n}packMsgAndSig(e,r,n,i){return qr.encode(["address","uint256","bytes","bytes"],[e,i,r,n])}suffix(){return this.appendSuffix?[3]:[]}}let Q0=function(t){return t.PIN="PIN",t.TOTP="TOTP",t}({});function BG(t){switch(t){case Q0.PIN:case Q0.TOTP:return t;default:throw new Error(`unknown auth method '${t}'`)}}function FG(t){return"signerAddress"in t&&typeof t.signerAddress=="string"}async function X6(t){if(FG(t))return t;{const e=Lp.isSapientSigner(t.signer)?t.signer:new Lp.SignerWrapper(t.signer),r=await e.getAddress(),n=new Date,i=qS(t.walletAddress,n),s=du(i);return{walletAddress:t.walletAddress,timestamp:n,signerAddress:r,signature:Q(await e.sign(s,{}))}}}async function Tc(t){if("wallet"in t){var e;const r=new Date,n=GS(r),i=await t.wallet.signTypedData(n.domain,n.types,n.message,(e=n.domain.chainId)!=null?e:1,"eip6492");return{jwt:t.jwt,timestamp:r,signature:i}}else return t}function qS(t,e){return{domain:KS,types:{AuthMethods:[{name:"wallet",type:"address"},{name:"timestamp",type:"string"}]},message:{wallet:we(t),timestamp:JS(e)}}}function GS(t){return{domain:KS,types:{AuthUpdate:[{name:"timestamp",type:"string"}]},message:{timestamp:JS(t)}}}const KS={name:"Sequence Guard",version:"1",chainId:1};function JS(t){return t.toUTCString().replace("GMT","UTC")}const jG=Object.freeze(Object.defineProperty({__proto__:null,AuthMethod:Q0,GuardSigner:LG,getAuthUpdateProofTypedData:GS,getOwnershipProofTypedData:qS},Symbol.toStringTag,{value:"Module"}));function X0(){return X0=Object.assign?Object.assign.bind():function(t){for(var e=1;e{this.queue.length>0&&(this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(this.run,this.options.timeWindow))},this.handle=(n,i,s)=>{if(this.batchableJsonRpcMethods.find(o=>o===i.method)){this.queue.push({request:i,callback:s,next:n}),this.options.verbose&&console.log("Scheduling call",i.method),this.scheduleExecution();return}return this.options.verbose&&console.log("Forwarded call",i.method),n(i,s)},this.run=async function(){r.options.verbose&&console.log("Processing multicall");const n=Math.min(r.options.batchSize,r.queue.length);if(n===0){r.options.verbose&&console.log("Skip multicall, empty queue");return}if(n===1){r.forward(r.queue[0]),r.queue=[],r.options.verbose&&console.log("Skip multicall, single item");return}r.options.verbose&&console.log("Resolving",n);var a=r.queue.slice(0,n);r.queue=n===r.queue.length?[]:r.queue.slice(n),r.options.verbose&&console.log("Updated queue",r.queue.length),r.queue.length!==0&&(r.options.verbose&&console.log("Scheduling next batch"),r.scheduleExecution());const i=a[0].next;let s;var[a,l]=Z6(a,y=>{try{if(y.next!==i)return!1;switch(y.request.method){case ir.ethCall:if(y.request.params[0].from||y.request.params[0].gasPrice||y.request.params[0].value)return!1;case ir.ethGetBalance:case ir.ethGetCode:const m=UG(y.request.params[1]);if(s===void 0&&(s=m),!VG(m,s))return!1}return!0}catch{return!1}});if(l.length!==0&&(r.options.verbose&&console.log("Forwarding incompatible calls",l.length),r.forward(l),a.length===0)){r.options.verbose&&console.log("Skip multicall, all calls are incompatible");return}let o=a.map(y=>{try{switch(y.request.method){case ir.ethCall:return{delegateCall:!1,revertOnError:!1,target:y.request.params[0].to,data:y.request.params[0].data,gasLimit:y.request.params[0].gas?y.request.params[0].gas:0,value:0};case ir.ethGetCode:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callCode"),[y.request.params[0]])};case ir.ethGetBalance:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callBalanceOf"),[y.request.params[0]])};default:return null}}catch{return null}});var[a,l]=Z6(a,(y,m)=>o[m]!==void 0);if(o=o.filter(y=>y),l.length!==0&&(r.options.verbose&&console.log("Forwarding calls on error",l.length),r.forward(l),a.length===0)){r.options.verbose&&console.log("Skip multicall, all calls had encoding errors");return}let c;try{r.options.verbose&&console.log("Encoding multicall"),c=r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("multiCall"),[o])}catch(y){r.options.verbose&&console.warn("Error encoding multicall, forwarding one by one",y),r.forward(a);return}const f=vx(),u=await zG(hx(i)({id:f,jsonrpc:Vl,method:ir.ethCall,params:[{to:r.options.contract,value:0,data:c},H.isBigNumber(s)?s.toNumber():s]}),y=>({jsonrpc:Vl,id:f,result:void 0,error:y}));if(u.error)return r.options.verbose&&console.warn("Error calling multicall, forwarding one by one",u.error),r.forward(a);let h;try{h=r.multicallInterface.decodeFunctionResult(r.multicallInterface.getFunction("multiCall"),u.result)}catch(y){r.options.verbose&&console.warn("Error decoding multicall result, forwarding one by one",y),r.forward(a);return}r.options.verbose&&console.log("Got response for",a.length),a.forEach((y,m)=>{if(!h[0][m])r.options.verbose&&console.warn(`Multicall error for ${y.request.method} not found`),r.forward(y);else switch(y.request.method){case ir.ethCall:y.callback(void 0,{jsonrpc:y.request.jsonrpc,id:y.request.id,result:h[1][m]});break;case ir.ethGetCode:y.callback(void 0,{jsonrpc:y.request.jsonrpc,id:y.request.id,result:qr.decode(["bytes"],h[1][m])[0]});break;case ir.ethGetBalance:y.callback(void 0,{jsonrpc:y.request.jsonrpc,id:y.request.id,result:qr.decode(["uint256"],h[1][m])[0]});break}})},this.options=e?X0({},Pn.DefaultOptions,e):Pn.DefaultOptions,this.options.batchSize<=0)throw new Error(`Invalid batch size of ${this.options.batchSize}`)}forward(e){Array.isArray(e)?e.forEach(r=>r.next(r.request,r.callback)):e.next(e.request,e.callback)}static isMulticall(e){return e&&e.handle!==void 0&&e.conf!==void 0&&Pn.isMulticallOptions(e.options)}static isMulticallOptions(e){return e!==void 0&&e.batchSize!==void 0&&e.timeWindow!==void 0&&e.contract!==void 0}}Pn.DefaultOptions=X0({},HG);const YS=["getNetwork","getBlockNumber","getGasPrice","getTransactionCount","getStorageAt","sendTransaction","estimateGas","getBlock","getTransaction","getTransactionReceipt","getLogs","emit","litenerCount","addListener","removeListener","waitForTransaction","detectNetwork","getBlockWithTransactions"];class WG extends ox{constructor(e,r){var n;super(e.getNetwork()),n=this,this.provider=e,this.multicall=void 0,this.getResolver=async function(i){const s=n.provider;if(s.getResolver){const o=await s.getResolver(await i);return o?new mp(n,o.address,o.name):null}return s.getResolver(await i)},this.next=async function(i,s){try{switch(i.method){case ir.ethCall:n.callback(i,s,await n.provider.call(i.params[0],i.params[1]));break;case ir.ethGetCode:n.callback(i,s,await n.provider.getCode(i.params[0],i.params[1]));break;case ir.ethGetBalance:n.callback(i,s,await n.provider.getBalance(i.params[0],i.params[1]));break}}catch(o){n.callback(i,s,void 0,o)}},this.listenerCount=e.listenerCount.bind(e),this.multicall=Pn.isMulticall(r)?r:new Pn(r),YS.forEach(i=>{e[i]!==void 0&&(this[i]=(...s)=>e[i](...s))})}callback(e,r,n,i){r(i,{jsonrpc:Vl,id:e.id,result:n,error:i})}async call(e,r){return this.rpcCall(ir.ethCall,e,r)}async getCode(e,r){return this.rpcCall(ir.ethGetCode,e,r)}async getBalance(e,r){return this.rpcCall(ir.ethGetBalance,e,r)}async rpcCall(e,...r){const n=vx();return(await hx(this.multicall.handle)(this.next,{jsonrpc:Vl,id:n,method:e,params:r})).result}}class qG{constructor(e,r){if(this.provider=e,this.multicall=void 0,this.multicall=Pn.isMulticall(r)?r:new Pn(r),e.send){const n=async function(s,o){e.send(s,o)};this.send=(i,s)=>{this.multicall.handle(n,i,s)}}if(e.sendAsync){const n=async function(s,o){e.sendAsync(s,o)};this.sendAsync=(i,s)=>{this.multicall.handle(n,i,s)}}}get isMetaMask(){return this.provider.isMetaMask}get isStatus(){return this.provider.isStatus}}const GG=t=>e=>{const r=Pn.isMulticall(t)?t:new Pn(t);return(n,i)=>r.handle(e,n,i)};var KG=Object.freeze({__proto__:null,ProxyMethods:YS,MulticallProvider:WG,MulticallExternalProvider:qG,multicallMiddleware:GG});const JG=Object.freeze(Object.defineProperty({__proto__:null,Multicall:Pn,providers:KG},Symbol.toStringTag,{value:"Module"}));var QS={exports:{}};/*! * EventEmitter2 * https://github.com/hij1nx/EventEmitter2 * * Copyright (c) 2013 hij1nx * Licensed under the MIT license. - */(function(t,e){(function(r){var n=Object.hasOwnProperty,i=Array.isArray?Array.isArray:function(_){return Object.prototype.toString.call(_)==="[object Array]"},s=10,o=typeof process=="object"&&typeof process.nextTick=="function",a=typeof Symbol=="function",l=typeof Reflect=="object",c=typeof setImmediate=="function",f=c?setImmediate:setTimeout,u=a?l&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(b){var _=Object.getOwnPropertyNames(b);return _.push.apply(_,Object.getOwnPropertySymbols(b)),_}:Object.keys;function h(){this._events={},this._conf&&y.call(this,this._conf)}function y(b){b&&(this._conf=b,b.delimiter&&(this.delimiter=b.delimiter),b.maxListeners!==r&&(this._maxListeners=b.maxListeners),b.wildcard&&(this.wildcard=b.wildcard),b.newListener&&(this._newListener=b.newListener),b.removeListener&&(this._removeListener=b.removeListener),b.verboseMemoryLeak&&(this.verboseMemoryLeak=b.verboseMemoryLeak),b.ignoreErrors&&(this.ignoreErrors=b.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function m(b,_){var M="(node) warning: possible EventEmitter memory leak detected. "+b+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(M+=" Event name: "+_+"."),typeof process<"u"&&process.emitWarning){var g=new Error(M);g.name="MaxListenersExceededWarning",g.emitter=this,g.count=b,process.emitWarning(g)}else console.error(M),console.trace&&console.trace()}var p=function(b,_,M){var g=arguments.length;switch(g){case 0:return[];case 1:return[b];case 2:return[b,_];case 3:return[b,_,M];default:for(var d=new Array(g);g--;)d[g]=arguments[g];return d}};function S(b,_){for(var M={},g,d=b.length,T=_?_.length:0,D=0;D0;)b=T[B],D.call(x,b,M[b]);this._listeners={},this._listenersCount=0,$()}}});function A(b,_,M,g){var d=Object.assign({},_);if(!b)return d;if(typeof b!="object")throw TypeError("options must be an object");var T=Object.keys(b),D=T.length,x,B,$;function O(W){throw Error('Invalid "'+x+'" option value'+(W?". Reason: "+W:""))}for(var U=0;U0;)if(x===b[B])return T;D(_)}}var R=I(["function"]),F=I(["object","function"]);function z(b,_,M){var g,d,T=0,D,x=new b(function(B,$,O){M=A(M,{timeout:0,overload:!1},{timeout:function(G,oe){return G*=1,(typeof G!="number"||G<0||!Number.isFinite(G))&&oe("timeout must be a positive number"),G}}),g=!M.overload&&typeof b.prototype.cancel=="function"&&typeof O=="function";function U(){d&&(d=null),T&&(clearTimeout(T),T=0)}var W=function(G){U(),B(G)},H=function(G){U(),$(G)};g?_(W,H,O):(d=[function(G){H(G||Error("canceled"))}],_(W,H,function(G){if(D)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof G!="function")throw TypeError("onCancel callback must be a function");d.push(G)}),D=!0),M.timeout>0&&(T=setTimeout(function(){var G=Error("timeout");G.code="ETIMEDOUT",T=0,x.cancel(G),$(G)},M.timeout))});return g||(x.cancel=function(B){if(d){for(var $=d.length,O=1;O<$;O++)d[O](B);d[0](B),d=null}}),x}function j(b){var _=this._observers;if(!_)return-1;for(var M=_.length,g=0;g0;)H=Ee[x],H!=="_listeners"&&(Pt=K(b,_,M[H],g+1,d),Pt&&(W?W.push.apply(W,Pt):W=Pt));return W}else if(Tt==="**"){for(fe=g+1===d||g+2===d&&Me==="*",fe&&M._listeners&&(W=K(b,_,M,d,d)),Ee=u(M),x=Ee.length;x-- >0;)H=Ee[x],H!=="_listeners"&&(H==="*"||H==="**"?(M[H]._listeners&&!fe&&(Pt=K(b,_,M[H],d,d),Pt&&(W?W.push.apply(W,Pt):W=Pt)),Pt=K(b,_,M[H],g,d)):H===Me?Pt=K(b,_,M[H],g+2,d):Pt=K(b,_,M[H],g,d),Pt&&(W?W.push.apply(W,Pt):W=Pt));return W}else M[Tt]&&(W=K(b,_,M[Tt],g+1,d));if(G=M["*"],G&&K(b,_,G,g+1,d),oe=M["**"],oe)if(g0;)H=Ee[x],H!=="_listeners"&&(H===Me?K(b,_,oe[H],g+2,d):H===Tt?K(b,_,oe[H],g+1,d):(re={},re[H]=oe[H],K(b,_,{"**":re},g+1,d)));else oe._listeners?K(b,_,oe,d,d):oe["*"]&&oe["*"]._listeners&&K(b,_,oe["*"],d,d);return W}function J(b,_,M){var g=0,d=0,T,D=this.delimiter,x=D.length,B;if(typeof b=="string")if((T=b.indexOf(D))!==-1){B=new Array(5);do B[g++]=b.slice(d,T),d=T+x;while((T=b.indexOf(D,d))!==-1);B[g++]=b.slice(d)}else B=[b],g=1;else B=b,g=b.length;if(g>1){for(T=0;T+10&&$._listeners.length>this._maxListeners&&($._listeners.warned=!0,m.call(this,$._listeners.length,O))):$._listeners=_,!0;return!0}function Z(b,_,M,g){for(var d=u(b),T=d.length,D,x,B,$=b._listeners,O;T-- >0;)x=d[T],D=b[x],x==="_listeners"?B=M:B=M?M.concat(x):[x],O=g||typeof x=="symbol",$&&_.push(O?B:B.join(this.delimiter)),typeof D=="object"&&Z.call(this,D,_,B,O);return _}function ie(b){for(var _=u(b),M=_.length,g,d,T;M-- >0;)d=_[M],g=b[d],g&&(T=!0,d!=="_listeners"&&!ie(g)&&delete b[d]);return T}function L(b,_,M){this.emitter=b,this.event=_,this.listener=M}L.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function v(b,_,M){if(M===!0)d=!0;else if(M===!1)g=!0;else{if(!M||typeof M!="object")throw TypeError("options should be an object or true");var g=M.async,d=M.promisify,T=M.nextTick,D=M.objectify}if(g||T||d){var x=_,B=_._origin||_;if(T&&!o)throw Error("process.nextTick is not supported");d===r&&(d=_.constructor.name==="AsyncFunction"),_=function(){var $=arguments,O=this,U=this.event;return d?T?Promise.resolve():new Promise(function(W){f(W)}).then(function(){return O.event=U,x.apply(O,$)}):(T?process.nextTick:f)(function(){O.event=U,x.apply(O,$)})},_._async=!0,_._origin=B}return[_,D?new L(this,b,_):this]}function C(b){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,y.call(this,b)}C.EventEmitter2=C,C.prototype.listenTo=function(b,_,M){if(typeof b!="object")throw TypeError("target musts be an object");var g=this;M=A(M,{on:r,off:r,reducers:r},{on:R,off:R,reducers:F});function d(T){if(typeof T!="object")throw TypeError("events must be an object");var D=M.reducers,x=j.call(g,b),B;x===-1?B=new w(g,b,M):B=g._observers[x];for(var $=u(T),O=$.length,U,W=typeof D=="function",H=0;H0;)d=M[g],(!b||d._target===b)&&(d.unsubscribe(_),T=!0);return T},C.prototype.delimiter=".",C.prototype.setMaxListeners=function(b){b!==r&&(this._maxListeners=b,this._conf||(this._conf={}),this._conf.maxListeners=b)},C.prototype.getMaxListeners=function(){return this._maxListeners},C.prototype.event="",C.prototype.once=function(b,_,M){return this._once(b,_,!1,M)},C.prototype.prependOnceListener=function(b,_,M){return this._once(b,_,!0,M)},C.prototype._once=function(b,_,M,g){return this._many(b,1,_,M,g)},C.prototype.many=function(b,_,M,g){return this._many(b,_,M,!1,g)},C.prototype.prependMany=function(b,_,M,g){return this._many(b,_,M,!0,g)},C.prototype._many=function(b,_,M,g,d){var T=this;if(typeof M!="function")throw new Error("many only accepts instances of Function");function D(){return--_===0&&T.off(b,D),M.apply(this,arguments)}return D._origin=M,this._on(b,D,g,d)},C.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||h.call(this);var b=arguments[0],_,M=this.wildcard,g,d,T,D,x;if(b==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(M&&(_=b,b!=="newListener"&&b!=="removeListener"&&typeof b=="object")){if(d=b.length,a){for(T=0;T3)for(g=new Array(B-1),D=1;D3)for(d=new Array($-1),x=1;x<$;x++)d[x-1]=arguments[x];for(D=0,T=O.length;D0&&this._events[b].length>this._maxListeners&&(this._events[b].warned=!0,m.call(this,this._events[b].length,b))):this._events[b]=_,d)},C.prototype.off=function(b,_){if(typeof _!="function")throw new Error("removeListener only takes instances of Function");var M,g=[];if(this.wildcard){var d=typeof b=="string"?b.split(this.delimiter):b.slice();if(g=K.call(this,null,d,this.listenerTree,0),!g)return this}else{if(!this._events[b])return this;M=this._events[b],g.push({_listeners:M})}for(var T=0;T0){for(g=this._all,_=0,M=g.length;_0;)g=_[M[T]],typeof g=="function"?d.push(g):d.push.apply(d,g);return d}else{if(this.wildcard){if(D=this.listenerTree,!D)return[];var x=[],B=typeof b=="string"?b.split(this.delimiter):b.slice();return K.call(this,x,B,D,0),x}return _?(g=_[b],g?typeof g=="function"?[g]:g:[]):[]}},C.prototype.eventNames=function(b){var _=this._events;return this.wildcard?Z.call(this,this.listenerTree,[],null,b):_?u(_):[]},C.prototype.listenerCount=function(b){return this.listeners(b).length},C.prototype.hasListeners=function(b){if(this.wildcard){var _=[],M=typeof b=="string"?b.split(this.delimiter):b.slice();return K.call(this,_,M,this.listenerTree,0),_.length>0}var g=this._events,d=this._all;return!!(d&&d.length||g&&(b===r?u(g).length:g[b]))},C.prototype.listenersAny=function(){return this._all?this._all:[]},C.prototype.waitFor=function(b,_){var M=this,g=typeof _;return g==="number"?_={timeout:_}:g==="function"&&(_={filter:_}),_=A(_,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:R,Promise:k}),z(_.Promise,function(d,T,D){function x(){var B=_.filter;if(!(B&&!B.apply(M,arguments)))if(M.off(b,x),_.handleError){var $=arguments[0];$?T($):d(p.apply(null,arguments).slice(1))}else d(p.apply(null,arguments))}D(function(){M.off(b,x)}),M._on(b,x,!1)},{timeout:_.timeout,overload:_.overload})};function P(b,_,M){M=A(M,{Promise,timeout:0,overload:!1},{Promise:k});var g=M.Promise;return z(g,function(d,T,D){var x;if(typeof b.addEventListener=="function"){x=function(){d(p.apply(null,arguments))},D(function(){b.removeEventListener(_,x)}),b.addEventListener(_,x,{once:!0});return}var B=function(){$&&b.removeListener("error",$),d(p.apply(null,arguments))},$;_!=="error"&&($=function(O){b.removeListener(_,B),T(O)},b.once("error",$)),D(function(){$&&b.removeListener("error",$),b.removeListener(_,B)}),b.once(_,B)},{timeout:M.timeout,overload:M.overload})}var N=C.prototype;Object.defineProperties(C,{defaultMaxListeners:{get:function(){return N._maxListeners},set:function(b){if(typeof b!="number"||b<0||Number.isNaN(b))throw TypeError("n must be a non-negative number");N._maxListeners=b},enumerable:!0},once:{value:P,writable:!0,configurable:!0}}),Object.defineProperties(N,{_maxListeners:{value:s,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof r=="function"&&r.amd?r(function(){return C}):t.exports=C})()})(rS);var t1=rS.exports;function en(){return en=Object.assign?Object.assign.bind():function(t){for(var e=1;e++tK;class mu{constructor(){var e=this;this.pendingMessageRequests=[],this.responseCallbacks=new Map,this.state=void 0,this.confirmationOnly=!1,this.events=new t1.EventEmitter2,this.openPayload=void 0,this.connectPayload=void 0,this.accountsChangedPayload=void 0,this.networksPayload=void 0,this.walletContextPayload=void 0,this._sessionId=void 0,this._init=void 0,this._registered=void 0,this.sendAsync=async function(r,n,i){e.state===An.CLOSED&&(e.confirmationOnly=!0),e.openWallet(void 0,{type:"jsonRpcRequest",method:r.method},i);try{e.isOpened()||await e.waitUntilOpened();const s=await e.sendMessageRequest({idx:oS(),type:_e.MESSAGE,data:r,chainId:i});n(void 0,s.data)}catch(s){n(s)}},this.sendMessageRequest=async function(r){return new Promise((n,i)=>{(!r.idx||r.idx<=0)&&r.type!=="init"&&i(new Error("message idx not set"));const s=(a,l)=>{if(a)i(a);else if(l)n(l);else throw new Error("no valid response to return")},o=r.idx;e.responseCallbacks.get(o)?i(new Error("duplicate message idx, should never happen")):e.responseCallbacks.set(o,s),e.isOpened()?e.sendMessage(r):(ve.debug("pushing to pending requests",r),e.pendingMessageRequests.push(r))})},this.waitUntilOpened=async function(r=$x){let n=!1;return Promise.race([new Promise((i,s)=>{const o=setTimeout(()=>{clearTimeout(o),n||(e.state=An.CLOSED,e.events.emit("close",{code:1005,message:"opening wallet timed out"})),s(new Error("opening wallet timed out"))},r)}),new Promise(i=>{if(e.isOpened()){var s;n=!0,i((s=e.openPayload)==null?void 0:s.session);return}e.events.once("open",o=>{e.openPayload=o,n=!0,i(o.session)})})])},this.waitUntilConnected=async function(){await e.waitUntilOpened();const r=new Promise(i=>{if(e.connectPayload){i(e.connectPayload);return}e.events.once("connect",s=>{e.connectPayload=s,i(s)})}),n=new Promise((i,s)=>{e.events.once("close",o=>{s(o?new Error(`wallet closed due to ${JSON.stringify(o)}`):new Error("user closed the wallet"))})});return Promise.race([r,n])},this.state=An.CLOSED,this._registered=!1,this._init=St.NIL}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}openWallet(e,r,n){throw new Error("abstract method")}closeWallet(){throw new Error("abstract method")}isOpened(){return this.registered&&this.state===An.OPENED}isConnected(){var e;const r=(e=this.openPayload)==null?void 0:e.session;return this.registered&&r!==void 0&&!!r.accountAddress&&r.accountAddress.length===42&&!!r.networks&&r.networks.length>0}handleMessage(e){var r=this;if(e.type===_e.INIT){ve.debug("MessageProvider, received INIT message",e);const{nonce:l}=e.data;if(!l||l.length==0){ve.error("invalid init nonce");return}this._init=St.OK,this.sendMessage({idx:-1,type:_e.INIT,data:{sessionId:this._sessionId,nonce:l}})}if(this._init!==St.OK)return;ve.debug("RECEIVED MESSAGE FROM WALLET",e.idx,e);const n=e.idx,i=this.responseCallbacks.get(n);if(n&&this.responseCallbacks.delete(n),e.type===_e.OPEN&&!this.isOpened()){var s,o;if(this._sessionId&&this._sessionId!==((s=e.data)==null?void 0:s.sessionId)){ve.debug("open event received from wallet, but does not match sessionId",this._sessionId);return}if((o=e.data)!=null&&o.error){var a;const l=new Error(`opening wallet failed: received ${(a=e.data)==null?void 0:a.error}`);throw ve.error(l),this.close(),l}this.state=An.OPENED,this.openPayload=e.data,this.events.emit("open",this.openPayload),this.pendingMessageRequests.length!==0&&this.pendingMessageRequests.splice(0,this.pendingMessageRequests.length).forEach(async function(c){r.sendMessage(c)});return}if(e.type===_e.MESSAGE){if(this.confirmationOnly&&setTimeout(()=>{this.responseCallbacks.size===0&&this.closeWallet()},500),!i)throw new Error("impossible state");if(i){this.events.emit("message",e),i(e.data.error,e);return}}if(e.type===_e.ACCOUNTS_CHANGED){this.accountsChangedPayload={accounts:[]},e.data&&e.data.length>0?(this.accountsChangedPayload={accounts:[we(e.data[0])],origin:e.origin},this.events.emit("accountsChanged",this.accountsChangedPayload.accounts,this.accountsChangedPayload.origin)):this.events.emit("accountsChanged",[],e.origin);return}if(e.type===_e.CHAIN_CHANGED){this.events.emit("chainChanged",e.data,e.origin);return}if(e.type===_e.NETWORKS){this.networksPayload=e.data,this.events.emit("networks",this.networksPayload);return}if(e.type===_e.WALLET_CONTEXT){this.walletContextPayload=e.data,this.events.emit("walletContext",this.walletContextPayload);return}e.type===_e.CLOSE&&this.state!==An.CLOSED&&this.close(e.data),e.type===_e.CONNECT&&(this.connectPayload=e.data,this.events.emit("connect",this.connectPayload)),e.type===_e.DISCONNECT&&this.isConnected()&&(this.events.emit("disconnect",e.data,e.origin),this.close())}sendMessage(e){throw new Error("abstract method")}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}emit(e,...r){return this.events.emit(e,...r)}close(e){this.state!==An.CLOSED&&(this.state=An.CLOSED,this.confirmationOnly=!1,this._sessionId=void 0,ve.info("closing wallet and flushing!"),this.pendingMessageRequests.length=0,this.responseCallbacks.forEach(r=>{r(en({},new Error("wallet closed"),{code:4001}))}),this.responseCallbacks.clear(),this.connectPayload=void 0,this.openPayload=void 0,this.accountsChangedPayload=void 0,this.networksPayload=void 0,this.walletContextPayload=void 0,this.events.emit("close",e))}}function rK(t){return nK.some(e=>e.predicate(t))}const nK=[{name:"Decentraland Exception",predicate:sK},{name:"0x v3 Exception",predicate:oK}],iK=/^Decentraland Login\nEphemeral address: 0x[a-fA-F0-9]{40}\nExpiration: (\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)((-(\d{2}):(\d{2})|Z)?)$/;function sK(t){try{const e=fs(t);return iK.test(e)}catch{return!1}}function oK(t){const e=new tr(aK);try{return e.decodeFunctionData("OrderWithHash",t),!0}catch{return!1}}const aK=[{inputs:[{components:[{internalType:"address",name:"makerAddress",type:"address"},{internalType:"address",name:"takerAddress",type:"address"},{internalType:"address",name:"feeRecipientAddress",type:"address"},{internalType:"address",name:"senderAddress",type:"address"},{internalType:"uint256",name:"makerAssetAmount",type:"uint256"},{internalType:"uint256",name:"takerAssetAmount",type:"uint256"},{internalType:"uint256",name:"makerFee",type:"uint256"},{internalType:"uint256",name:"takerFee",type:"uint256"},{internalType:"uint256",name:"expirationTimeSeconds",type:"uint256"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes",name:"makerAssetData",type:"bytes"},{internalType:"bytes",name:"takerAssetData",type:"bytes"},{internalType:"bytes",name:"makerFeeAssetData",type:"bytes"},{internalType:"bytes",name:"takerFeeAssetData",type:"bytes"}],internalType:"struct IEIP1271Data.Order",name:"order",type:"tuple"},{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderWithHash",outputs:[],stateMutability:"pure",type:"function"}],Bd=Ve(`Ethereum Signed Message: -`),aS=t=>ls(t)||Te(t)?X(t):Ve(t),r1=t=>{const e=aS(t);return rK(e)?e:ze([Bd,Ve(String(e.length)),e])},lK=t=>{if(JSON.stringify(t.slice(0,Bd.length))!==JSON.stringify(Bd))return t;const e=t.slice(Bd.length),r=String(e.length).length;let n,i;try{i=Number(fs(e.slice(0,r)))}catch{i=Number(Y(e.slice(0,r)))}return i>e.length||!Number.isInteger(i)?n=r-1:n=r,e.slice(n)},Wl=async(t,e,r,n)=>new le.reader.OnChainReader(n).isValidSignature(t,e,r),lS=async(t,e,r,n)=>{const i=r1(e),s=dx(i);return Wl(t,s,r,n)},cS=(t,e,r,n)=>Wl(t,du(e),r,n),Z0=()=>window.location.protocol==="chrome-extension:"||window.location.protocol==="moz-extension:",fS=()=>!!navigator.userAgent.match(/UnitySequence/i),uS=t=>t.onChain.deployed&&t.fullyMigrated;class dS{constructor(){this.callbacks=[],this.store={}}getItem(e){return this.store[e]||null}setItem(e,r){this.store[e]=r,this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){delete this.store[e]}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}class Qf{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(this.callbacks=[],!Qf.isAvailable())throw new Error("LocalStorage is not available");window.addEventListener("storage",e=>{const{key:r}=e;this.callbacks.filter(i=>i.key===r).forEach(i=>i.cb(this.getItem(r)))})}getItem(e){return window.localStorage.getItem(e)}setItem(e,r){window.localStorage.setItem(e,r),this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){window.localStorage.removeItem(e),this.callbacks.filter(r=>r.key===e).forEach(r=>r.cb(null))}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}function eh(){return Qf.isAvailable()?new Qf:new dS}async function hS(t){return Array.isArray(t)?Promise.all(t.map(e=>qe(e))):qe(t)}const e5="@sequence.transportSession";class xu{constructor(e){var r=this;this.walletRequestHandler=void 0,this._sessionId=void 0,this._registered=void 0,this._init=void 0,this._initNonce=void 0,this._initCallback=void 0,this.appOrigin=void 0,this.sendAsync=async function(n,i,s){throw new Error("abstract method")},this.handleMessage=async function(n){const i=n;if(r._init!==St.OK){if(i.type===_e.INIT)if(r.isValidInitAck(n))r._initCallback&&r._initCallback();else{r._initCallback&&r._initCallback("invalid init");return}return}switch(i.type){case _e.OPEN:{if(r._init!==St.OK)return;const s={sessionId:i.data.sessionId,intent:i.data.intent,networkId:i.data.networkId};await r.open(s);return}case _e.CLOSE:return r._init!==St.OK,void 0;case _e.MESSAGE:{const s=await r.walletRequestHandler.sendMessageRequest(i);r.sendMessage(s),s.data.error;return}default:ve.error(`unexpected payload type ${i.type}`)}},this.sendMessageRequest=async function(n){return r.walletRequestHandler.sendMessageRequest(n)},this.open=async function({sessionId:n,intent:i,networkId:s}){n&&(r._sessionId=C7(n),r.saveTransportSession({sessionId:n,intent:i,networkId:s})),r.walletRequestHandler.setOpenIntent(i),await r.init();let o;try{if(s){const a=yx(s);if(a)o=a.chainId;else throw new Error(`unknown network ${s}`)}else o=r.walletRequestHandler.defaultChainId()}catch(a){console.error(a)}if(i&&i.type==="connect"&&i.options){const a=i.options,l=a;if(r.appOrigin&&l!=null&&l.origin){if(!Z0()&&l.origin!==r.appOrigin)throw new Error("origin is invalid")}else!r.appOrigin&&l!=null&&l.origin?a.origin=E7(l.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=A7(a.app)),a.networkId?s=a.networkId:s&&(a.networkId=s),r.walletRequestHandler.setConnectOptions(a)}else r.walletRequestHandler.setConnectOptions(void 0);if(await r.walletRequestHandler.getAccount(),await r.walletRequestHandler.isSignedIn())if(i&&i.type==="connect"){(!o||o<=0)&&console.log("Failed to set default network on open"),r.notifyOpen({sessionId:r._sessionId});try{const a=await r.walletRequestHandler.promptConnect(i.options);a.connected&&r.walletRequestHandler.notifyConnect(a)}catch(a){ve.warn("promptConnect not connected:",a)}finally{(!i.options||i.options.keepWalletOpened!==!0)&&r.notifyClose()}}else{if(!o||o<=0)return r.notifyOpen({sessionId:r._sessionId,error:`failed to open wallet on network ${s}`}),!1;r.notifyOpen({sessionId:r._sessionId,chainId:`${o}`,session:await r.walletRequestHandler.walletSession(o)})}else return r.notifyOpen({sessionId:r._sessionId}),!0;return!0},this.saveTransportSession=n=>{eh().setItem(e5,JSON.stringify(n))},this.getCachedTransportSession=async function(){const n=eh().getItem(e5);try{return n?JSON.parse(n):null}catch{return console.error(`unable to parse transport session: ${n}`),null}},this.walletRequestHandler=e,this._init=St.NIL,this.walletRequestHandler.on("connect",n=>{this.registered&&this.notifyConnect(n)}),this.walletRequestHandler.on("disconnect",(n,i)=>{this.registered&&this.notifyDisconnect(n,i)}),this.walletRequestHandler.on("accountsChanged",(n,i)=>{this.registered&&this.notifyAccountsChanged(n,i)}),this.walletRequestHandler.on("networks",n=>{this.registered&&(this.notifyNetworks(n),!n||n.length===0?this.notifyChainChanged("0x0"):this.notifyChainChanged(ti(n.find(i=>i.isDefaultChain).chainId)))}),this.walletRequestHandler.on("chainChanged",(n,i)=>{this.notifyChainChanged(n,i)}),this.walletRequestHandler.on("walletContext",n=>{!this.registered||!n||this.notifyWalletContext(n)}),this.walletRequestHandler.on("close",n=>{this.registered&&this.notifyClose(n)})}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}sendMessage(e){throw new Error("abstract method")}notifyOpen(e){const{chainId:r,sessionId:n,session:i,error:s}=e;this.sendMessage({idx:-1,type:_e.OPEN,data:{chainId:r,sessionId:n,session:i,error:s}})}notifyClose(e){this.sendMessage({idx:-1,type:_e.CLOSE,data:e?{error:e}:null})}notifyConnect(e){this.sendMessage({idx:-1,type:_e.CONNECT,data:e})}notifyDisconnect(e,r){this.sendMessage({idx:-1,type:_e.DISCONNECT,data:e?{error:e}:null,origin:r})}notifyAccountsChanged(e,r){this.sendMessage({idx:-1,type:_e.ACCOUNTS_CHANGED,data:e,origin:r})}notifyChainChanged(e,r){this.sendMessage({idx:-1,type:_e.CHAIN_CHANGED,data:e,origin:r})}notifyNetworks(e){this.sendMessage({idx:-1,type:_e.NETWORKS,data:e})}notifyWalletContext(e){this.sendMessage({idx:-1,type:_e.WALLET_CONTEXT,data:e})}isValidInitAck(e){if(this._init===St.OK)return ve.warn("isValidInitAck, already in init'd state, so inquiry is invalid."),!1;if(e.type!==_e.INIT)return ve.warn("isValidInitAck, invalid message type, expecting init"),!1;const{sessionId:r,nonce:n}=e.data;return!r||r.length===0||!n||n.length===0?(ve.error("invalid init ack"),!1):r!==this._sessionId||n!==this._initNonce?(ve.error("invalid init ack match"),!1):!0}init(){return new Promise((e,r)=>{if(this._init===St.OK){e();return}if(this._init!==St.NIL||this._initCallback){r("transport init is in progress");return}const n=setTimeout(()=>{ve.warn("transport init timed out"),this._initCallback&&this._initCallback("transport init timed out")},$x/2);this._initCallback=i=>{this._initCallback=void 0,clearTimeout(n),i?r(i):(this._init=St.OK,e())},this._initNonce=`${performance.now()}`,this.sendMessage({idx:-1,type:_e.INIT,data:{nonce:this._initNonce}}),this._init=St.SENT_NONCE})}}class cK{constructor(){this.app=void 0,this.wallet=void 0;const e=new Vp,r=new Vp;e.conn=r,r.conn=e,this.app=e,this.wallet=r}}class Vp{constructor(){this.conn=void 0,this.events=new t1.EventEmitter2,this.handleMessage=e=>{throw new Error("ProxyMessageChannelPort is not registered")},this.sendMessage=e=>{this.conn.handleMessage(e),e.type==="open"&&this.events.emit("open",e),e.type==="close"&&this.events.emit("close",e),e.type==="connect"&&this.events.emit("connect",e),e.type==="disconnect"&&this.events.emit("disconnect",e)}}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}}class vS extends mu{constructor(e){if(super(),this.port=void 0,this.register=()=>{this.port.handleMessage=r=>{this.handleMessage(r)},this.on("open",(...r)=>{this.port.events.emit("open",...r)}),this.on("close",(...r)=>{this.port.events.emit("close",...r)}),this.on("connect",(...r)=>{this.port.events.emit("connect",...r)}),this.on("disconnect",(...r)=>{this.port.events.emit("disconnect",...r)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),this.events.removeAllListeners(),this.port.handleMessage=void 0},this.openWallet=(r,n,i)=>{if(this.state===An.CLOSED){this.state=An.OPENING;const s=`${performance.now()}`;this._sessionId=s,this.sendMessage({idx:-1,type:_e.OPEN,data:{path:r,intent:n,networkId:i,sessionId:s}})}},this.state=An.CLOSED,this.port=e,!e)throw new Error("port argument cannot be empty");this._init=St.OK}closeWallet(){this.sendMessage({idx:-1,type:_e.CLOSE,data:null}),this.close()}sendMessage(e){if(!e.idx)throw new Error("message idx is empty");this.port.sendMessage(e)}}class fK extends xu{constructor(e,r){super(e),this.port=void 0,this.port=r,this._init=St.OK}register(){this.port.handleMessage=e=>{this.handleMessage(e)},this._registered=!0}async restoreSession(){const e=await this.getCachedTransportSession();e&&this.open(e)}unregister(){this.port.handleMessage=void 0,this._registered=!1}sendMessage(e){this.port.sendMessage(e)}}function yS(t){var e;if((e=window.ue)!=null&&e.sequencewallettransport&&!window.logsOverriddenForUnreal){var r;const n=(r=window.ue)==null?void 0:r.sequencewallettransport;console.log=(...i)=>{n.logfromjs(`${t}: ${Bv(i)}`)},console.warn=(...i)=>{n.warnfromjs(`${t}: ${Bv(i)}`)},console.error=(...i)=>{n.errorfromjs(`${t}: ${Bv(i)}`)},window.logsOverriddenForUnreal=!0}}function Bv(t){return t.map(e=>typeof e=="object"?e instanceof Error?e.message:JSON.stringify(e):String(e)).join(" ")}let Ba;class pS extends mu{constructor(e){super(),this.walletURL=void 0,this.register=()=>{var r;yS("dapp"),Ba&&(Ba.unregister(),Ba=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),Ba=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r;this._registered=!1,this.closeWallet(),Ba===this&&(Ba=void 0),((r=window.ue)==null||(r=r.sequencewallettransport)==null?void 0:r.onmessagefromwallet)===this.onUnrealCallback&&delete window.ue.sequencewallettransport.onmessagefromwallet,this.events.removeAllListeners()},this.openWallet=(r,n,i)=>{if(this.isOpened()){console.log("wallet already open!");return}console.log("opening wallet!");const s=new URL(this.walletURL.href),o=new gu;r&&(s.pathname=r.toLowerCase()),this._init=St.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&o.set("intent",fx(n)),i&&o.set("net",`${i}`),s.search=o.toString(),console.log("opening wallet to",s.href),window.open(s.href)},this.onUnrealCallback=r=>{if(!r)throw new Error("ProviderMessage object is empty");this.handleMessage(r)},this.walletURL=new URL(e)}closeWallet(){this.close()}sendMessage(e){var r;const n=typeof e!="string"?JSON.stringify(e):e;console.log("Sending message to wallet:",n),(r=window.ue)==null||(r=r.sequencewallettransport)==null||r.sendmessagetowallet(n)}}class uK extends xu{constructor(e){super(e),this.onMessageFromUnreal=r=>{ve.debug("RECEIVED MESSAGE",r),this.handleMessage(r)},this.getUnrealTransportSession=r=>{const n=new gu(r);return{sessionId:n.get("sid"),networkId:n.get("net"),intent:ux(n.get("intent"))}},this._init=St.NIL}async register(e){var r;if(((r=window.ue)==null?void 0:r.sequencewallettransport)===void 0)return;yS("wallet");const{search:n}=new URL(e||window.location.href);let i=this.getUnrealTransportSession(n);if(!!i.sessionId||(i=await this.getCachedTransportSession()),!i){ve.error("unreal session is undefined");return}window.ue.sequencewallettransport.onmessagefromsequencejs=this.onMessageFromUnreal,this._registered=!0,this.open(i).then(o=>{if(!o){var a;const l=`failed to open to network ${(a=i)==null?void 0:a.networkId}`;ve.error(l),this.notifyClose({message:l}),window.close()}}).catch(o=>{var a;const l=`failed to open to network ${(a=i)==null?void 0:a.networkId}, due to: ${o}`;ve.error(l),this.notifyClose({message:l}),window.close()})}unregister(){var e;((e=window.ue)==null||(e=e.sequencewallettransport)==null?void 0:e.onmessagefromsequencejs)===this.onMessageFromUnreal&&delete window.ue.sequencewallettransport.onmessagefromsequencejs,this._registered=!1}sendMessage(e){var r;if(e.type!==_e.INIT&&this._init!==St.OK){ve.error("impossible state, should not be calling postMessage until inited");return}const n=JSON.stringify(e);(r=window.ue)==null||(r=r.sequencewallettransport)==null||r.sendmessagetosequencejs(n)}}const Fx="sequence-extension-message-handler";class dK extends xu{constructor(e,r){super(e),this.runtime=r,this.port=void 0,this._init=St.OK}register(){this._registered=!0,this.port=this.runtime.connect({name:Fx})}sendMessage(e){ve.info("[ExtensionMessageHandler send]",e),this.port.postMessage(e)}}class gS extends mu{constructor(e){super(),this.register=()=>{this._registered=!0},e.onConnect.addListener(r=>{r.name===Fx&&(this._init=St.OK,r.onMessage.addListener(n=>{this.handleMessage(n)}))})}sendMessage(e){}unregister(){}openWallet(e,r,n){}closeWallet(){}}class hK extends t1.EventEmitter2{constructor(e){var r;super(),r=this,this.stream=e,this.responseCallbacks=new Map,this._messageIdx=0,this.nextMessageIdx=()=>++this._messageIdx,this.handleMessage=n=>{if(!n.type||!n.data)return;ve.info("[received message]",n);const i=n.idx,s=this.responseCallbacks.get(i);switch(i&&this.responseCallbacks.delete(i),n.type){case _e.MESSAGE:if(s)this.emit(_e.MESSAGE,n),s(n.data.error,n);else throw new Error("impossible state");break;case _e.DISCONNECT:case _e.ACCOUNTS_CHANGED:case _e.CHAIN_CHANGED:this.emit(n.type,n.data);break;default:console.error("unknown message type",n);break}},this.sendMessageRequest=async function(n){return new Promise((i,s)=>{(!n.idx||n.idx<=0)&&s(new Error("message idx not set"));const o=(l,c)=>{if(l)s(l);else if(c)i(c);else throw new Error("no valid response to return")},{idx:a}=n;r.responseCallbacks.get(a)?s(new Error("duplicate message idx, should never happen")):r.responseCallbacks.set(a,o),r.sendMessage(n)})},this.stream.on("data",this.handleMessage)}sendMessage(e){this.stream.writable||console.error("window post message stream is not writable"),this.stream.write(e)}}let La;class mS extends mu{constructor(e){super(),this.walletURL=void 0,this.walletWindow=void 0,this.register=()=>{La&&(La.unregister(),La=this),window.addEventListener("message",this.onWindowEvent),La=this,this.on("open",()=>{const r=this.walletWindow,n=setInterval(()=>{r&&r.closed&&(clearInterval(n),this.close())},500)}),this.on("close",()=>{this.walletWindow&&(this.walletWindow.close(),this.walletWindow=null)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),La===this&&(La=void 0),window.removeEventListener("message",this.onWindowEvent),this.events.removeAllListeners()},this.openWallet=(r,n,i)=>{if(this.walletWindow&&this.isOpened()){this.walletWindow.focus();return}const s=new URL(this.walletURL.href),o=new gu;r&&r!==""&&(s.pathname=r.toLowerCase()),this._init=St.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&(n.type==="connect"&&(n.options||(n.options={app:window.location.origin}),!Z0()&&!fS()&&n.options&&(n.options.origin=window.location.origin)),o.set("intent",fx(n))),i&&o.set("net",`${i}`);let a,l;Z0()?(a=[450,750],l=[Math.abs(window.screen.width/2-a[0]/2),Math.abs(window.screen.height/2-a[1]/2)]):(a=[450,750],l=[Math.abs(window.screenX+window.innerWidth/2-a[0]/2),Math.abs(window.screenY+window.innerHeight/2-a[1]/2)]);const c=`toolbar=0,location=0,menubar=0,scrollbars=yes,status=yes,width=${a[0]},height=${a[1]},left=${l[0]},top=${l[1]}`;s.search=o.toString(),this.walletWindow=window.open(s.href,"sequence.app",c)},this.onWindowEvent=r=>{if(r.origin!==this.walletURL.origin)return;let n;try{n=JSON.parse(r.data)}catch{return}if(!n)throw new Error("ProviderMessage object is empty");this.handleMessage(n)},this.walletURL=new URL(e)}closeWallet(){var e;this.close(),(e=this.walletWindow)==null||e.close()}sendMessage(e){if(!this.walletWindow){ve.warn("WindowMessageProvider: sendMessage failed as walletWindow is unavailable");return}const r=typeof e!="string"?JSON.stringify(e):e;this.walletWindow.postMessage(r,this.walletURL.origin)}}class vK extends xu{constructor(e){var r;super(e),r=this,this.parentWindow=void 0,this._isPopup=!1,this.onWindowEvent=async function(n){if(!n.origin||n.origin===""||r.appOrigin&&n.origin!==r.appOrigin)return;let i;try{i=JSON.parse(n.data)}catch{return}if(ve.debug("RECEIVED MESSAGE",i),r._init!==St.OK&&r.isValidInitAck(i)&&(r.appOrigin=n.origin),r._init===St.OK&&(!r.appOrigin||r.appOrigin.length<8)){ve.error("impossible state, init.OK and appOrigin required");return}r.handleMessage(i)},this.getWindowTransportSession=n=>{const i=new gu(n);return{sessionId:i.get("sid"),networkId:i.get("net"),intent:ux(i.get("intent"))}},this._init=St.NIL}async register(e){const r=parent.window.opener!==null;if(this._isPopup=r,r!==!0)return;const{pathname:n,search:i}=new URL(e||window.location.href);let s=this.getWindowTransportSession(i);if(!!s.sessionId||(s=await this.getCachedTransportSession()),!s){ve.error("window session is undefined");return}this.parentWindow=parent.window.opener,window.addEventListener("message",this.onWindowEvent,!1),this._registered=!0,this.open(s).then(a=>{if(!a){var l;const c=`failed to open to network ${(l=s)==null?void 0:l.networkId}`;ve.error(c),this.notifyClose({message:c}),window.close()}}).catch(a=>{var l;const c=`failed to open to network ${(l=s)==null?void 0:l.networkId}, due to: ${a}`;ve.error(c),this.notifyClose({message:c}),window.close()})}unregister(){window.removeEventListener("message",this.onWindowEvent),this._registered=!1}sendMessage(e){const r=JSON.stringify(e);e.type===_e.INIT?this.postMessage(r,!0):this.postMessage(r)}get isPopup(){return this._isPopup}postMessage(e,r=!1){if(r!==!0&&this._init!==St.OK){ve.error("impossible state, should not be calling postMessage until inited");return}r?this.parentWindow.postMessage(e,"*"):this.appOrigin&&this.appOrigin.length>4?this.parentWindow.postMessage(e,this.appOrigin):ve.error("unable to postMessage as parentOrigin is invalid")}}function xS(t){return t&&typeof t=="object"&&(t.windowTransport&&typeof t.windowTransport=="object"||t.proxyTransport&&typeof t.proxyTransport=="object"||t.extensionTransport&&typeof t.extensionTransport=="object"||t.unrealTransport&&typeof t.unrealTransport=="object")&&(t.windowTransport&&t.windowTransport.enabled||t.proxyTransport&&t.proxyTransport.enabled||t.extensionTransport&&t.extensionTransport.enabled||t.unrealTransport&&t.unrealTransport.enabled)}class n1{constructor(...e){var r=this;this.messageProviders=void 0,this.provider=void 0,this.register=()=>{if(this.messageProviders.length===1){this.provider=this.messageProviders[0],this.provider.register();return}this.messageProviders.forEach(n=>{n.register(),n.once("open",()=>{this.provider||(this.provider=n,this.messageProviders.forEach(i=>{this.provider!==i&&i.unregister()}))})})},this.unregister=()=>{this.messageProviders.forEach(n=>n.unregister()),this.provider=void 0},this.openWallet=(n,i,s)=>{if(this.provider){this.provider.openWallet(n,i,s);return}this.messageProviders.forEach(o=>o.openWallet(n,i,s))},this.sendAsync=async function(n,i,s){if(r.provider){r.provider.sendAsync(n,i,s);return}throw new Error("impossible state, wallet must be opened first")},this.sendMessageRequest=async function(n){if(r.provider)return r.provider.sendMessageRequest(n);throw new Error("impossible state, wallet must be opened first")},this.waitUntilOpened=async function(){return r.provider?r.provider.waitUntilOpened():Promise.race(r.messageProviders.map(n=>n.waitUntilOpened()))},this.waitUntilConnected=async function(){if(r.provider)return r.provider.waitUntilConnected();throw new Error("impossible state, wallet must be opened first")},this.messageProviders=e,this.provider=void 0}static new(e){var r,n,i,s;const o=new n1;if((r=e.windowTransport)!=null&&r.enabled&&typeof window=="object"&&e.walletAppURL){const a=new mS(e.walletAppURL);o.add(a)}if((n=e.proxyTransport)!=null&&n.enabled){const a=new vS(e.proxyTransport.appPort);o.add(a)}if((i=e.extensionTransport)!=null&&i.enabled){const a=new gS(e.extensionTransport.runtime);o.add(a)}if((s=e.unrealTransport)!=null&&s.enabled&&e.windowTransport&&e.walletAppURL){const a=new pS(e.walletAppURL);o.add(a)}return o.register(),o}add(...e){this.messageProviders.push(...e)}closeWallet(){this.provider&&this.provider.closeWallet()}isOpened(){return this.provider?this.provider.isOpened():!1}isConnected(){return this.provider?this.provider.isConnected():!1}on(e,r){if(this.provider){this.provider.on(e,r);return}this.messageProviders.forEach(n=>{n.on(e,r)})}once(e,r){if(this.provider){this.provider.once(e,r);return}this.messageProviders.forEach(n=>{n.once(e,r)})}emit(e,...r){if(this.provider)return this.provider.emit(e,...r);for(let n=0;ngK(t,i))}function gK(t,e){if(e.to.toLowerCase()===t.toLowerCase()&&e.data){const r=X(e.data);if(r.length>=4&&!mK(r))throw new Error("self calls are forbidden")}if(e.delegateCall)throw new Error("delegate calls are forbidden")}function mK(t){const e=new tr(pr.mainModule.abi);try{return e.decodeFunctionData("createContract",t),!0}catch{return!1}}const xK=1e4;class bK{constructor(e,r,n){var i=this;this.account=void 0,this.signerReadyCallbacks=[],this.prompter=void 0,this.networks=void 0,this._openIntent=void 0,this._connectOptions=void 0,this.events=new t1.EventEmitter2,this.onConnectOptionsChange=void 0,this.promptConnect=async function(s){if(!s&&!i._connectOptions)throw new Error("prompter connect options are empty");if(!i.prompter)return i.connect(s);const o=await i.prompter.promptConnect(s||i._connectOptions).catch(l=>({connected:!1})),a=o;return a.connected&&!a.session&&(a.session=await i.walletSession(s==null?void 0:s.networkId)),o},this.sendAsync=async function(s,o,a){const l={jsonrpc:"2.0",id:s.id,result:null};await i.getAccount();try{var c;if((!i.account||i.account===null)&&!wK.includes(s.method))throw sS;const u=i.account;if(!u)throw new Error("WalletRequestHandler: wallet account is not configured");const h=(c=i.account)==null?void 0:c.providerFor(a??i.defaultChainId());if(!h)throw new Error(`WalletRequestHandler: wallet provider is not configured for chainId ${a}`);const y=h instanceof Ta?h:void 0;switch(s.method){case"net_version":{if(!y)throw new Error("Account provider doesn't support send method");const m=await y.send("net_version",[]);l.result=m;break}case"eth_chainId":{if(!y)throw new Error("Account provider doesn't support send method");const m=await y.send("eth_chainId",[]);l.result=m;break}case"eth_accounts":{const m=u.address;l.result=[m];break}case"eth_getBalance":{const[m,p]=s.params,S=await h.getBalance(m,p);l.result=S.toHexString();break}case"sequence_sign":case"personal_sign":case"eth_sign":{let m;switch(s.method){case"sequence_sign":case"personal_sign":{const[A,k]=s.params;m=A;break}case"eth_sign":{const[A,k]=s.params;m=k;break}}let p="";const S=r1(m),w=s.method==="sequence_sign";if(i.prompter===null?p=await u.signMessage(S,a??i.defaultChainId(),w?"eip6492":"ignore"):p=await i.prompter.promptSignMessage({chainId:a,message:S,eip6492:w},i.connectOptions),p&&p.length>0)l.result=p;else throw new Error("declined by user");break}case"sequence_signTypedData_v4":case"eth_signTypedData":case"eth_signTypedData_v4":{const[m,p]=s.params;let S;if(typeof p=="string")try{S=JSON.parse(p)}catch(k){console.warn("walletRequestHandler: error parsing typedData",k)}else S=p;if(!S||!S.domain||!S.types||!S.message)throw new Error("invalid typedData object");let w="";const A=s.method==="sequence_signTypedData_v4";if(i.prompter===null?w=await u.signTypedData(S.domain,S.types,S.message,a??i.defaultChainId(),A?"eip6492":"ignore"):w=await i.prompter.promptSignMessage({chainId:a,typedData:S,eip6492:A},i.connectOptions),w&&w.length>0)l.result=w;else throw new Error("declined by user");break}case"eth_sendTransaction":{const m=pK(s.params[0]).map(S=>("gas"in S&&S.gasLimit===void 0&&(S.gasLimit=S.gas,delete S.gas),S));t5(u.address,m);let p="";if(i.prompter===null){var f;const S=await u.sendTransaction(m,a??i.defaultChainId());p=(f=S==null?void 0:S.hash)!=null?f:""}else p=await i.prompter.promptSendTransaction(m,a,i.connectOptions);if(p)l.result=p;else throw new Error("declined by user");break}case"eth_signTransaction":{const[m]=s.params;if(we(m.from)!==u.address)throw new Error("sender address does not match wallet");t5(u.address,m),i.prompter===null?l.result=await u.signTransactions(m,a??i.defaultChainId()):l.result=await i.prompter.promptSignTransaction(m,a,i.connectOptions);break}case"eth_sendRawTransaction":{if(le.transaction.isSignedTransactionBundle(s.params[0])){const m=V.from(s.params[0].chainId).toNumber(),p=await u.relayer(m).relay(s.params[0]);l.result=p.hash}else{const m=await h.sendTransaction(s.params[0]);l.result=m.hash}break}case"eth_getTransactionCount":{const m=we(s.params[0]),p=s.params[1],S=await h.getTransactionCount(m,p);l.result=V.from(S).toHexString();break}case"eth_blockNumber":{l.result=await h.getBlockNumber();break}case"eth_getBlockByNumber":{l.result=await h.getBlock(s.params[0]);break}case"eth_getBlockByHash":{l.result=await h.getBlock(s.params[0]);break}case"eth_getTransactionByHash":{l.result=await h.getTransaction(s.params[0]);break}case"eth_call":{const[m,p]=s.params;l.result=await h.call(m,p);break}case"eth_getCode":{const[m,p]=s.params;l.result=await h.getCode(m,p);break}case"eth_estimateGas":{const[m]=s.params;l.result=await h.estimateGas(m);break}case"eth_gasPrice":{const m=await h.getGasPrice();l.result=m.toHexString();break}case"wallet_switchEthereumChain":{const[m]=s.params;if(!m.chainId||m.chainId.length===0)throw new Error("invalid chainId");const p=V.from(m.chainId);i.setDefaultChainId(p.toNumber()),l.result=null;break}case"sequence_getWalletContext":{l.result=u.contexts;break}case"sequence_getWalletConfig":{const[m]=s.params;m?l.result=[(await u.status(m)).onChain.config]:l.result=await Promise.all(u.networks.map(async function(p){return(await u.status(p.chainId)).onChain.config}));break}case"sequence_getWalletState":{const[m]=s.params;m?l.result=[r5(m,await u.status(m))]:l.result=await Promise.all(u.networks.map(async function(p){const S=await u.status(p.chainId);return r5(p.chainId,S)}));break}case"sequence_getNetworks":{l.result=await i.getNetworks(!0);break}case"sequence_isSequence":{l.result=!0;break}case"sequence_updateConfig":throw new Error("sequence_updateConfig method is not allowed from a dapp");case"sequence_publishConfig":throw new Error("sequence_publishConfig method is not allowed from a dapp");case"sequence_gasRefundOptions":break;case"sequence_getNonce":break;case"sequence_relay":break;case"sequence_setDefaultNetwork":{const[m]=s.params;if(!m)throw new Error("invalid request, method argument defaultChainId cannot be empty");i.setDefaultChainId(m),l.result=await i.getNetworks(!0);break}default:{if(!y)throw new Error("Account provider doesn't support send method");const m=await y.send(s.method,s.params);l.result=m}}}catch(u){ve.error(u),l.result=null,l.error=en({},new Error(u),{code:4001})}o(void 0,l)},this.isSignedIn=async function(){return await i.signerReady(),!!i.account},this.getAccount=async function(){if(await i.signerReady(),i.account===void 0)throw new Error("signerReady failed resolve");return i.account},this.account=e,this.prompter=r,this.networks=n}defaultChainId(){var e,r;return(e=(r=this.prompter)==null?void 0:r.getDefaultChainId())!=null?e:this.networks[0].chainId}async signIn(e,r={}){this.setAccount(e);const{connect:n,defaultNetworkId:i}=r;if(n){const a=this._connectOptions;let l;if(this.prompter!==null){var s;l=await((s=this.prompter)==null?void 0:s.promptSignInConnect(a))}else l=await this.connect(a);this.notifyConnect(l),(!a||a.keepWalletOpened!==!0)&&this.notifyClose()}if(i&&this.defaultChainId()!==i){var o;await((o=this.prompter)==null?void 0:o.promptChangeNetwork(i))}}signOut(){this.account&&this.notifyDisconnect(),this.setAccount(null)}signerReset(){this.account=void 0}signerReady(e=xK){return new Promise((r,n)=>{this.account!==void 0?r():(setTimeout(()=>{this.account===void 0&&(this.signerReadyCallbacks=[],n("signerReady timed out"))},e),this.signerReadyCallbacks.push(r))})}async connect(e){var r,n;if(!this.account)return{connected:!1,chainId:"0x0",error:"unable to connect without signed in account"};const i=(r=(n=e==null?void 0:e.networkId)!=null?n:this.defaultChainId())!=null?r:te.MAINNET,s=yx(i).chainId,o={connected:!0,chainId:ti(s)};if(e&&e.authorize){const a={app:e.app,origin:e.origin,expiry:e.expiry,nonce:e.authorizeNonce};try{o.proof=await G9(this.account,s,a)}catch(l){return ve.warn(`connect, signAuthorization failed for options: ${JSON.stringify(e)}, due to: ${l.message}`),{connected:!1,chainId:"0x0",error:`signAuthorization failed: ${l.message}`}}}return o.session=this.walletSession(s),o}sendMessageRequest(e){return new Promise(r=>{this.sendAsync(e.data,(n,i)=>{const s=en({},e,{data:i});r(s)},e.chainId)})}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}async getAddress(){var e,r;return(e=(r=this.account)==null?void 0:r.address)!=null?e:""}get openIntent(){return this._openIntent}setOpenIntent(e){this._openIntent=e}get connectOptions(){return this._connectOptions}setConnectOptions(e){var r;this._connectOptions=e,(r=this.onConnectOptionsChange)==null||r.call(this,e)}async setDefaultChainId(e){var r;return await((r=this.prompter)==null?void 0:r.promptChangeNetwork(e)),this.defaultChainId()}async getNetworks(e){return this.account?e?this.account.networks.map(r=>{const n=en({},r);return n.provider=void 0,n.relayer=void 0,n}):this.account.networks:(ve.warn("signer not set: getNetworks is returning an empty list"),[])}walletSession(e){if(!this.account)return;const r={walletContext:this.account.contexts,accountAddress:this.account.address,networks:this.account.networks.map(i=>en({},i,{provider:void 0,relayer:void 0}))};if(e){const i=ri(r.networks,e);if(i){var n;(n=r.networks)==null||n.forEach(s=>delete s.isDefaultChain),i.isDefaultChain=!0}}return r}notifyConnect(e,r){var n;if(console.log("emit connect",e),this.events.emit("connect",e),(n=e.session)!=null&&n.accountAddress){var i;this.events.emit("accountsChanged",[(i=e.session)==null?void 0:i.accountAddress],r)}}notifyDisconnect(e){this.events.emit("accountsChanged",[],e),this.events.emit("disconnect",void 0,e)}notifyChainChanged(e,r){this.events.emit("chainChanged",ti(e),r)}async notifyNetworks(e){const r=e||await this.getNetworks(!0);if(this.events.emit("networks",r),r.length>0){const n=r.find(i=>i.chainId===this.defaultChainId());n&&this.events.emit("chainChanged",ti(n.chainId))}else this.events.emit("chainChanged","0x0")}async notifyWalletContext(){if(!this.account){ve.warn("signer not set: skipping to notify wallet context");return}const e=this.account.contexts;this.events.emit("walletContext",e)}notifyClose(e){this.events.emit("close",e)}setAccount(e){if(this.account=e,e!==void 0){for(let r=0;rl.canOnchainValidate||l.original.version===2&&n,o=await r.status(i);if(s(o))return!0;if(await e.promptConfirmWalletDeploy(i,this.connectOptions)){const l=await r.status(i);return s(l)?!0:(ve.error("WalletRequestHandler: result for promptConfirmWalletDeploy is not correct"),!1)}return!1}}function r5(t,e){return{context:e.original.context,config:e.onChain.config,address:le.context.addressOf(e.original.context,e.original.imageHash),chainId:t,deployed:e.onChain.deployed,imageHash:e.imageHash,lastImageHash:e.onChain.imageHash,published:!0,status:e}}const wK=["net_version","eth_chainId","eth_getBalance","eth_getTransactionCount","eth_blockNumber","eth_getBlockByNumber","eth_getBlockByHash","eth_getTransactionByHash","eth_getCode","eth_estimateGas","eth_gasPrice","sequence_getWalletContext","sequence_getNetworks","sequence_setDefaultNetwork"];class cc{get utils(){return this.provider.utils}constructor(e,r){this.client=e,this.provider=r,this.singleNetworkSigners={},this._isSigner=!0,this._isSequenceSigner=!0}async getAddress(){return this.client.getAddress()}connect(e){if(!fc.is(e))throw new Error("SequenceSigner can only be connected to a SequenceProvider");return new cc(this.client,e)}getSigner(e){if(!e)return this;const r=this.provider.toChainId(e);return this.singleNetworkSigners[r]||(this.singleNetworkSigners[r]=new jx(this.client,this.provider,r)),this.singleNetworkSigners[r]}useChainId(e){return this.provider.toChainId(e)||this.client.getChainId()}async signMessage(e,r){const{eip6492:n=!0}=r||{},i=this.useChainId(r==null?void 0:r.chainId);return this.client.signMessage(e,{eip6492:n,chainId:i})}async signTypedData(e,r,n,i){const{eip6492:s=!0}=i||{},o=this.useChainId(i==null?void 0:i.chainId);return this.client.signTypedData({domain:e,types:r,message:n},{eip6492:s,chainId:o})}getProvider(e){return this.provider.getProvider(e)}async sendTransaction(e,r){const n=this.useChainId(r==null?void 0:r.chainId),i=await hS(e),s=await this.client.sendTransaction(i,{chainId:n}),o=this.getProvider(n);try{return await qo(async function(){const a=await o.getTransaction(s);return a?o._wrapTransaction(a,s):void 0},{onceBlock:o})}catch(a){throw a.transactionHash=s,a}}async getWalletConfig(e){const r=this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}getNetworks(){return this.client.getNetworks()}async getBalance(e,r){return this.getProvider(r==null?void 0:r.chainId).getBalance(this.getAddress(),e)}async estimateGas(e,r){return this.getProvider(r==null?void 0:r.chainId).estimateGas(e)}async call(e,r,n){return this.getProvider(n==null?void 0:n.chainId).call(e,r)}getChainId(){return Promise.resolve(this.client.getChainId())}async getGasPrice(e){return this.getProvider(e==null?void 0:e.chainId).getGasPrice()}async getFeeData(e){return this.getProvider(e==null?void 0:e.chainId).getFeeData()}async resolveName(e){const r=await this.provider.resolveName(e);if(r===null)throw new Error(`ENS name not found: ${e}`);return r}_checkProvider(e){}populateTransaction(e){throw new Error("SequenceSigner does not support populateTransaction")}checkTransaction(e){throw new Error("SequenceSigner does not support checkTransaction")}getTransactionCount(e){throw new Error("SequenceSigner does not support getTransactionCount")}signTransaction(e){throw new Error("SequenceWallet does not support signTransaction, use sendTransaction instead.")}static is(e){return e&&typeof e=="object"&&e._isSequenceSigner===!0}}class jx extends cc{constructor(e,r,n){super(e,r.getProvider(n)),this.chainId=n,this._isSingleNetworkSequenceSigner=!0}_useChainId(e){const r=this.provider.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This signer only supports the network ${this.chainId}, but ${r} was requested.`);return r||this.provider.toChainId(this.chainId)}useChainId(e){return this._useChainId(e)}getChainId(){return Promise.resolve(this.provider.toChainId(this.chainId))}getProvider(e){return super.getProvider(this._useChainId(e))}getSigner(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceSigner===!0}}class CK{constructor(e){if(this.signer=e,jx.is(e))throw new Error("WalletUtils does not support SingleNetworkSequenceSigner")}signMessage(e,r,n){return this.signer.signMessage(e,{chainId:r,eip6492:n})}signTypedData(e,r,n,i,s){return this.signer.signTypedData(e,r,n,{chainId:i,eip6492:s})}async isValidSignature(e,r,n,i){return Wl(e,r,n,this.signer.getProvider(i))}async isValidMessageSignature(e,r,n,i){const s=this.signer.getProvider(i),o=r1(r),a=dx(o);return Wl(e,a,n,s)}isValidTypedDataSignature(e,r,n,i){return this.isValidSignature(e,du(r),n,i)}}class fc extends ox{constructor(e,r,n=Ul){super(e.getChainId()),this.client=e,this.providerFor=r,this.networks=n,this.singleNetworkProviders={},this._isSequenceProvider=!0,this.utils=void 0,this.signer=void 0,e.onConnect(i=>{this.emit("connect",i)}),e.onDisconnect(i=>{this.emit("disconnect",i)}),e.onDefaultChainIdChanged(i=>{this.emit("chainChanged",i)}),e.onAccountsChanged(i=>{this.emit("accountsChanged",i)}),this.signer=new cc(this.client,this),this.utils=new CK(this.signer)}getSigner(e){return this.signer.getSigner(e)}connect(e){return this.client.connect(e)}disconnect(){return this.client.disconnect()}isConnected(){return this.client.isConnected()}getSession(){return this.client.getSession()}listAccounts(){return[this.client.getAddress()]}getAddress(){return this.client.getAddress()}getNetworks(){return this.client.getNetworks()}getChainId(){return this.client.getChainId()}setDefaultChainId(e){return this.client.setDefaultChainId(this.toChainId(e))}isOpened(){return this.client.isOpened()}closeWallet(){return this.client.closeWallet()}getWalletContext(){return this.client.getWalletContext()}async getWalletConfig(e){const r=await this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}authorize(e){return this.client.connect(en({},e,{authorize:!0}))}async openWallet(e,r){return await this.client.openWallet(e,r),!0}toChainId(e){if(e===void 0)return;const r=ri(this.networks,e);if(!r)throw new Error(`Unsupported network ${e}`);return r.chainId}async useChainId(e){return this.toChainId(e)||this.client.getChainId()}getProvider(e){if(!e)return this;const r=this.toChainId(e);return this.singleNetworkProviders[r]||(this.singleNetworkProviders[r]=new wS(this.client,this.providerFor,r)),this.singleNetworkProviders[r]}async _getSubprovider(e){const r=await this.useChainId(e),n=this.providerFor(r);if(!n)throw new Error(`Unsupported network ${r}`);return n}async perform(e,r){var n;if(e==="eth_chainId")return ti(await this.useChainId());if(e==="eth_accounts")return[this.client.getAddress()];if(e==="wallet_switchEthereumChain"){const o=r[0],a=bS(o);return this.setDefaultChainId(a)}if(e==="eth_sendTransaction"||e==="eth_sign"||e==="eth_signTypedData"||e==="eth_signTypedData_v4"||e==="personal_sign"||e==="sequence_sign"||e==="sequence_signTypedData_v4")return this.client.send({method:e,params:r},this.getChainId());const i=await this._getSubprovider(),s=(n=i.prepareRequest(e,r))!=null?n:[e,r];return i.send(s[0],s[1])}send(e,r){return this.perform(e,r)}request(e){return this.perform(e.method,e.params)}async detectNetwork(){const e=this.client.getChainId(),r=ri(this.networks,e);if(!r)throw new Error(`Unknown network ${e}`);return r}async waitForTransaction(e,r,n,i){return(await this._getSubprovider(i==null?void 0:i.chainId)).waitForTransaction(e,r,n)}async getBlockNumber(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getBlockNumber()}async getGasPrice(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getGasPrice()}async getBalance(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getBalance(e,r)}async getTransactionCount(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getTransactionCount(e,r)}async getCode(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getCode(e,r)}async getStorageAt(e,r,n,i){return(await this._getSubprovider(i==null?void 0:i.chainId)).getStorageAt(e,r,n)}async call(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).call(e,r)}async estimateGas(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).estimateGas(e)}async getBlock(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getBlock(e)}async getTransaction(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getTransaction(e)}async getLogs(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getLogs(e)}async supportsENS(){return(await this.getNetworks()).some(r=>r.chainId===1)}async getResolver(e){return await this.supportsENS()?(await this._getSubprovider(1)).getResolver(e):null}async resolveName(e){return RA(await e)?e:await this.supportsENS()?(await this._getSubprovider(1)).resolveName(e):null}async lookupAddress(e){return await this.supportsENS()?(await this._getSubprovider(1)).lookupAddress(e):null}async getAvatar(e){return await this.supportsENS()?(await this._getSubprovider(1)).getAvatar(e):null}}fc.is=t=>t&&typeof t=="object"&&t._isSequenceProvider===!0;function bS(t){return typeof t=="object"?bS(t.chainId):V.from(t).toNumber()}class wS extends fc{constructor(e,r,n){super(e,r),this.chainId=n,this._isSingleNetworkSequenceProvider=!0}_useChainId(e){const r=this.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This provider only supports the network ${this.chainId}, but ${r} was requested.`);return r||super.toChainId(this.chainId)}useChainId(e){return Promise.resolve(this._useChainId(e))}getChainId(){return super.toChainId(this.chainId)}async getNetwork(){const e=await this.client.getNetworks(),r=ri(e,this.chainId);if(!r)throw new Error(`Unsupported network ${this.chainId}`);return r}getProvider(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}getSigner(e){return super.getSigner(this._useChainId(e))}setDefaultChainId(e){throw new Error(`This provider only supports the network ${this.chainId}; use the parent provider to switch networks.`)}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceProvider===!0}}var AK={name:"@0xsequence/provider",version:"1.6.2",description:"provider sub-package for Sequence",repository:"https://github.com/0xsequence/sequence.js/tree/master/packages/provider",source:"src/index.ts",main:"dist/0xsequence-provider.cjs.js",module:"dist/0xsequence-provider.esm.js",author:"Horizon Blockchain Games",license:"Apache-2.0",scripts:{test:"pnpm test:concurrently 'pnpm test:run'","test:run":"pnpm test:file tests/**/*.spec.ts","test:file":"NODE_OPTIONS='--import tsx' mocha --timeout 30000",typecheck:"tsc --noEmit","test:concurrently":"concurrently -k --success first 'pnpm start:hardhat1' 'pnpm start:hardhat2'","start:hardhat1":"pnpm start:hardhat1:verbose > /dev/null 2>&1","start:hardhat2":"pnpm start:hardhat2:verbose > /dev/null 2>&1","start:hardhat1:verbose":"hardhat node --config hardhat1.config.js --hostname 0.0.0.0 --port 9595","start:hardhat2:verbose":"hardhat node --config hardhat2.config.js --hostname 0.0.0.0 --port 8595"},dependencies:{"@0xsequence/abi":"workspace:*","@0xsequence/account":"workspace:*","@0xsequence/auth":"workspace:*","@0xsequence/core":"workspace:*","@0xsequence/migration":"workspace:*","@0xsequence/network":"workspace:*","@0xsequence/relayer":"workspace:*","@0xsequence/utils":"workspace:*","@0xsequence/wallet":"workspace:*",eventemitter2:"^6.4.5","webextension-polyfill":"^0.10.0"},peerDependencies:{ethers:">=5.5 < 6"},devDependencies:{"@types/webextension-polyfill":"^0.10.0",hardhat:"^2.12.2",ethers:"^5.7.2"},files:["src","dist"]};class ra{constructor(e){this.store=e}connectedSession(){const e=this.getSession();if(e&&e.accountAddress&&e.walletContext&&e.networks)return{accountAddress:e.accountAddress,walletContext:e.walletContext,networks:e.networks};throw new Error("Sequence session not connected")}hasSession(){var e;return((e=this.getSession())==null?void 0:e.accountAddress)!==void 0}setSession(e){return this.store.setItem(ra.SESSION_LOCALSTORE_KEY,JSON.stringify(e))}getSession(){const e=this.store.getItem(ra.SESSION_LOCALSTORE_KEY);if(e)return JSON.parse(e)}async clearSession(){return this.store.removeItem(ra.SESSION_LOCALSTORE_KEY)}}ra.SESSION_LOCALSTORE_KEY="@sequence.session";class na{constructor(e,r=1){this.store=e,this.startingChainId=r,this.callbacks=[],e.onItemChange(na.SESSION_CHAIN_ID_KEY,n=>{if(n){const i=parseInt(n);this.callbacks.forEach(s=>s(i))}})}onDefaultChainIdChanged(e){return this.callbacks.push(e),()=>{this.callbacks=this.callbacks.filter(r=>r!==e)}}setDefaultChainId(e){e!==this.getDefaultChainId()&&this.store.setItem(na.SESSION_CHAIN_ID_KEY,e.toString())}getDefaultChainId(){const e=this.store.getItem(na.SESSION_CHAIN_ID_KEY);return!e||e.length===0?this.startingChainId:parseInt(e)}}na.SESSION_CHAIN_ID_KEY="@sequence.session.defaultChainId";class zx{constructor(e,r,n,i){var s;if(this.projectAccessKey=i,this.session=void 0,this.defaultChainId=void 0,this.callbacks={},this.transport=void 0,this.defaultEIP6492=void 0,xS(e))this.transport=n1.new(e);else if(nS(e))this.transport=e;else throw new Error("Invalid transport");const o=typeof n=="number"?n:n==null?void 0:n.defaultChainId;this.defaultEIP6492=typeof n=="number"?!1:(s=n==null?void 0:n.defaultEIP6492)!=null?s:!1,this.session=new ra(r),this.defaultChainId=new na(r,o),this.transport.on("accountsChanged",a=>{var l;a.length>1&&console.warn("SequenceClient: wallet-webapp returned more than one account"),(l=this.callbacks.accountsChanged)==null||l.forEach(c=>c(a))}),this.transport.on("connect",a=>{var l;const c=ti(this.getChainId());(l=this.callbacks.connect)==null||l.forEach(f=>f(en({},a,{chainId:c})))}),this.transport.on("disconnect",(a,l)=>{var c;(c=this.callbacks.disconnect)==null||c.forEach(f=>f(a,l))}),this.transport.on("networks",a=>{var l;(l=this.callbacks.networks)==null||l.forEach(c=>c(a))}),this.transport.on("walletContext",a=>{var l;(l=this.callbacks.walletContext)==null||l.forEach(c=>c(a))}),this.transport.on("open",a=>{var l;(l=this.callbacks.open)==null||l.forEach(c=>c(a))}),this.transport.on("close",()=>{var a;(a=this.callbacks.close)==null||a.forEach(l=>l())}),this.transport.on("chainChanged",(a,l)=>{var c;(c=this.callbacks.chainChanged)==null||c.forEach(f=>f(a,l))}),this.defaultChainId.onDefaultChainIdChanged(a=>{var l;const c=ti(a);(l=this.callbacks.chainChanged)==null||l.forEach(f=>f(c))})}registerCallback(e,r){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(r),()=>{this.callbacks[e]=this.callbacks[e].filter(n=>n!==r)}}onOpen(e){return this.registerCallback("open",e)}onClose(e){return this.registerCallback("close",e)}onConnect(e){return this.registerCallback("connect",e)}onDisconnect(e){return this.registerCallback("disconnect",e)}onNetworks(e){return this.registerCallback("networks",e)}onAccountsChanged(e){return this.registerCallback("accountsChanged",e)}onWalletContext(e){return this.registerCallback("walletContext",e)}onChainChanged(e){return this.registerCallback("chainChanged",e)}onDefaultChainIdChanged(e){return this.registerCallback("chainChanged",e)}getChainId(){return this.defaultChainId.getDefaultChainId()}setDefaultChainId(e){return this.defaultChainId.setDefaultChainId(e)}async openWallet(e,r){return this.transport.openWallet(e,r,this.getChainId()),await this.transport.waitUntilOpened(),this.isOpened()}closeWallet(){return this.transport.closeWallet()}isOpened(){return this.transport.isOpened()}isConnected(){return this.session.hasSession()}getSession(){return this.session.getSession()}getAddress(){return this.session.connectedSession().accountAddress}async connect(e){if((e==null?void 0:e.authorizeVersion)===void 0&&(e.authorizeVersion=2),(e==null?void 0:e.refresh)===!0&&this.disconnect(),e.projectAccessKey=this.projectAccessKey,e&&e.authorize){if(!e.app)throw new Error("connecting with 'authorize' option also requires 'app' to be set");e.authorizeVersion===void 0&&(e.authorizeVersion=2)}await this.openWallet(void 0,{type:"connect",options:en({},e,{networkId:this.getChainId(),clientVersion:AK.version})});const r=await this.transport.waitUntilConnected().catch(n=>n instanceof Error?{connected:!1,error:n.message}:{connected:!1,error:JSON.stringify(n)});if(r.chainId&&(r.chainId=V.from(r.chainId).toString()),r.connected){if(!r.session)throw new Error("impossible state, connect response is missing session");this.session.setSession(r.session)}return r}disconnect(){return this.isOpened()&&this.closeWallet(),this.session.clearSession()}send(e,r){return e.method=this.mapSignMethod(e.method),new Promise((n,i)=>{this.transport.sendAsync(e,(s,o)=>{s?i(s):o===void 0?i(new Error(`Got undefined response for request: ${e}`)):typeof o=="object"&&o.error?i(o.error):typeof o=="object"&&o.result?n(o.result):i(new Error(`Got invalid response for request: ${e}`))},r||this.getChainId())})}async getNetworks(e){const r=this.session.connectedSession();return e&&(r.networks=await this.send({method:"sequence_getNetworks"}),this.session.setSession(r)),r.networks}signMethod(e){return(e==null?void 0:e.eip6492)===void 0?"personal_sign":e.eip6492?"sequence_sign":"legacy_sign"}signTypedDataMethod(e){return(e==null?void 0:e.eip6492)===void 0?"eth_signTypedData_v4":e.eip6492?"sequence_signTypedData_v4":"legacy_signTypedData_v4"}mapSignMethod(e){return e==="personal_sign"?this.defaultEIP6492?"sequence_sign":"personal_sign":e==="eth_signTypedData_v4"?this.defaultEIP6492?"sequence_signTypedData_v4":"eth_signTypedData_v4":e==="legacy_sign"?"personal_sign":e==="legacy_signTypedData_v4"?"eth_signTypedData_v4":e}async signMessage(e,r){const n=this.signMethod(r);return this.send({method:n,params:[e,this.getAddress()]},r==null?void 0:r.chainId)}async signTypedData(e,r){const n=this.signTypedDataMethod(r),i=Yt.getPayload(e.domain,e.types,e.message);return this.send({method:n,params:[this.getAddress(),i]},(r==null?void 0:r.chainId)||e.domain.chainId&&V.from(e.domain.chainId).toNumber()||this.getChainId())}async sendTransaction(e,r){const n=Array.isArray(e)?e:[e],i=yK(n);return this.send({method:"eth_sendTransaction",params:[i]},r==null?void 0:r.chainId)}async getWalletContext(){return this.send({method:"sequence_getWalletContext"})}async getOnchainWalletConfig(e){const r=await this.send({method:"sequence_getWalletConfig",params:[(e==null?void 0:e.chainId)||this.getChainId()]},e==null?void 0:e.chainId);return Array.isArray(r)?r[0]:r}}const Hp={transports:{walletAppURL:"https://sequence.app",windowTransport:{enabled:!0},proxyTransport:{enabled:!1}},defaultNetwork:1};let mi;const CS=t=>{var e,r,n;const i=t==null?void 0:t.projectAccessKey;if(i||console.warn("Please pass a projectAccessKey in initWallet config as it will be required in near future."),mi)return mi;const s=en({},Hp,t,{transports:en({},Hp.transports,t==null?void 0:t.transports)}),o={},a=(e=(r=s.networks)==null?void 0:r.filter(y=>{y.rpcUrl!==void 0&&y.chainId!==void 0&&Ul.find(m=>m.chainId===y.chainId)}))!=null?e:[],l=Ul.map(y=>{var m;const p=(m=s.networks)==null?void 0:m.find(S=>S.chainId===y.chainId);return p?en({},y,p):y}).concat(a).map(y=>{const m=i?`/${i}`:"";return y.rpcUrl=y.rpcUrl+m,y}),c=y=>{if(!o[y]){var m;const p=(m=l.find(A=>A.chainId===y))==null?void 0:m.rpcUrl;if(!p)throw new Error(`no rpcUrl found for chainId: ${y}`);const S=new Ta(p),w=new px([j7,F7,new gx],new U0(S));o[y]=new VV(w,y)}return o[y]},f=s.defaultNetwork?(n=ri(l,s.defaultNetwork))==null?void 0:n.chainId:void 0;if(!f&&s.defaultNetwork)throw new Error(`defaultNetwork not found for chainId: ${s.defaultNetwork}`);const u=s.localStorage||eh(),h=new zx(s.transports,u,{defaultChainId:f,defaultEIP6492:s.defaultEIP6492},i);return mi=new fc(h,c),mi},AS=()=>{mi&&(mi.client.closeWallet(),mi.client.transport.unregister(),mi=void 0)},ES=()=>{if(!mi)throw new Error("Wallet has not been initialized, call sequence.initWallet(config) first.");return mi},EK=Object.freeze(Object.defineProperty({__proto__:null,BaseInjectedTransport:hK,BaseProviderTransport:mu,BaseWalletTransport:xu,CHANNEL_ID:Fx,DefaultChainIdTracker:na,DefaultProviderConfig:Hp,ErrSignedInRequired:sS,EventType:_e,ExtensionMessageHandler:dK,ExtensionMessageProvider:gS,InitState:St,LocalStorage:Qf,MemoryItemStore:dS,MuxMessageProvider:n1,OpenState:An,PROVIDER_OPEN_TIMEOUT:$x,ProviderError:iS,ProxyMessageChannel:cK,ProxyMessageChannelPort:Vp,ProxyMessageHandler:fK,ProxyMessageProvider:vS,SequenceClient:zx,SequenceClientSession:ra,SequenceProvider:fc,SequenceSigner:cc,SingleNetworkSequenceProvider:wS,SingleNetworkSequenceSigner:jx,UnrealMessageHandler:uK,UnrealMessageProvider:pS,WalletRequestHandler:bK,WindowMessageHandler:vK,WindowMessageProvider:mS,WindowSessionParams:gu,getWallet:ES,initWallet:CS,isBrowserExtension:Z0,isMuxTransportTemplate:xS,isProviderTransport:nS,isUnityPlugin:fS,isValidMessageSignature:lS,isValidSignature:Wl,isValidTypedDataSignature:cS,isWalletUpToDate:uS,messageToBytes:aS,nextMessageIdx:oS,prefixEIP191Message:r1,resolveArrayProperties:hS,trimEIP191Prefix:lK,unregisterWallet:AS,useBestStore:eh},Symbol.toStringTag,{value:"Module"}));function Br(t,e){return e.forEach(function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach(function(n){if(n!=="default"&&!(n in t)){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(t)}var SK=Br({__proto__:null},[gH]),kK=Br({__proto__:null},[EH]),_K=Br({__proto__:null},[FG]),TK=Br({__proto__:null},[WG]),PK=Br({__proto__:null},[Kq]),IK=Br({__proto__:null},[rG]),MK=Br({__proto__:null},[eK]),RK=Br({__proto__:null},[xW]),NK=Br({__proto__:null},[EK]),OK=Br({__proto__:null},[Pq]);const DK=le.transaction;var BK=Object.freeze({__proto__:null,transactions:DK}),LK=Br({__proto__:null,isValidSignature:Wl,isValidMessageSignature:lS,isValidTypedDataSignature:cS,isWalletUpToDate:uS},[iW]),$K=Br({__proto__:null},[lq]),FK=Br({__proto__:null},[Iq]),jK=Br({__proto__:null},[BG]),zK=Br({__proto__:null},[vq]),UK=Br({__proto__:null},[Lq]),Et=Object.freeze({__proto__:null,abi:SK,api:kK,auth:_K,guard:TK,indexer:PK,metadata:IK,multicall:MK,network:RK,provider:NK,relayer:OK,transactions:BK,utils:LK,core:$K,signhub:FK,sessions:jK,migration:zK,account:UK,initWallet:CS,getWallet:ES,unregisterWallet:AS,SequenceProvider:fc,SequenceClient:zx,SequenceSigner:cc});const n5=[{constant:!1,inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}];var VK="_1e9z9271";const HK=({message:t,loading:e})=>{const r=()=>t?` -...`:"...";return se.jsx(EN,{label:"Console",defaultOpen:!0,children:se.jsxs(ue,{as:"pre",style:{fontFamily:"monospace",whiteSpace:"break-spaces",overflowWrap:"anywhere"},children:[t,e&&r(),se.jsx(ue,{className:VK,display:"inline-block",fontSize:"large",lineHeight:"4",style:{top:"-4px",position:"relative"},children:"_"})]})})};var WK="_1q07ov40";const Oo=t=>{const{label:e,children:r,style:n,className:i}=t;return se.jsxs(ue,{marginTop:"10",marginBottom:"8",marginX:"0",width:"full",className:i,style:n,children:[e&&se.jsx(ue,{marginBottom:"2",children:se.jsx(qK,{children:e})}),se.jsx(ue,{className:WK,children:sr.Children.map(r,(s,o)=>se.jsx(ue,{children:s},o))})]})},qK=t=>se.jsx(Ut,{variant:"normal",fontWeight:"medium",color:"text50",children:t.children}),GK=()=>{const t=window.localStorage.getItem("defaultChainId");return t==null?null:Number(t)},i5="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAADaRJREFUeJztXWlsFdcVRmpa8SNSVTVSEmWpqiZR1LT8iBQpSUPVqEJV/vUHqhBK1ffGENJsCiGEJM6bwWwGh0DYF2MIW9gxizEYsGMIYglxjAuFQkMwipHfzDyvD9vYBqb3zHvjDs+z3Fneu+c++0ifogAen3vPN+d+524zYkSeWUS69rMCURlVICmvCqI6VxCVLQTVBOcIGglaCDoJtAzAn6kEPxB8R3CIYDPBLPKccRMK479l3bZhszAhJj9FgvQ2wQ6CBoI+i+CGhaQgqed0UknKRCEW/xXr9g8509/w6Yl/pN/sG1kMNi0gq2wvkNS/RqTmkaz7Jy/NFPTDBF0Igm6HdoJ9w2QIyUiKfTY9DmMOuh3iBKujYvwp1v3InZE3aCzpvDoEQQwLxyErsO5X9EY6apKQUuGsA5YtnCcichzrfkZn6Tc+nwM/TAQri4ry86Qz6hEEhBWqBUl+lnUccm4RSfmFkBJ3txEEgTV6CMqGTNVAGhsRUjNurDseG64Lovwy6/hkzQjD7yeN3Imgo7FjQ95lg/RY34Sgc3nBFUGKP806bqEYacxUIbvz8/mKHlIpRFnHz7fB9K2QEnqsO5JvxORFpC/vYx1PT5ZW+d8y77z8QRU3ukCQmn9DHL6KoNPyDfXRIuVB1vF1NJKuRgnDJV42cV2INePcgzAc/CFMAl6DX7KuTZu3to25H1yTAOpVHoMPkFtua7Vnu7V/zlKZ++KHBMw1QXp27xqCzvCM8uouDezkuR5t9c4O5v74xNmI1HQ/o+DrdT6Xpd778xNad8/dAQJAFvhgQYK5Xz5RxWSeQOB4kqf+Uq9mmEGAPTU3tQKJvW++EJOLcxx8dSrzRvsECD+zGQQAFK/hUhCmICljcxL89MIOt3P7auttWwIcPtmlvTWHS0EI6BEk+cmsBj8t+rhd1dtX26VlmpkAgFJ+BSHgUlanjMkv2IOgkb4wbWHLgPBzIoAuCMm/Ze1vAMzLVvDHIWicb5iFnxsB9n7FsSAkIMP0C6EGP536uZzsAWQKPzcCADidITTQGOpQQB64FUGjfCNT+NEQgHNBCKXhrHCCLykvCxyrfivhR0OAPBCE/aFUBeRBpxE0xhfshB8tAXgXhFFRqQwa/EmsGxEE5/5jLfy8EIB7QRiTnw9CAG6Pay3Y0O4afBoC5IEgrBtyb/9rRc7CzysBjp7q5lsQSsqYIfX2uwk/rwQAlO3mWhB6ywIFkvoqAqd9AYRfb5+z8PNDAMCHn3MsCL1oAfIDZ1g77BcXvncXfn4JwLcglCtog/8ce2f9YdnWDk/B90oAAMwqsm6nf8R/TUMALjd6wL4+WuEXhADVZ7q1t4s5FYQx+WPH4Kfn/NuZO+oDB47TC78gBACs39vJvL0+oThuH+NV/IHwu+395fdNAMBHizgVhDHlT07pv4q5gz5w8Yc+f9EPQID9tTe1idPZt9075JVO6Z+7+/hW7uj0HfwgBAB8+gWXgrDdchjgMf37FX5hEQAE4TtzOdxObjUMkL8oZ+6YRxw84U/4hUUAwMb9HArCmCxaEYCrzZ5BhF+YBAB8soQ7QXj53uBL6hMInPKEIMIvbALwKAgLRPVh09uvTmbtkBcEFX5hEwAwnzNBGBWVV8zpfwdrh2gRhvDLBgG4E4QxuchMgH8zd4gSVSe7Qwt+mATgUBAeTtf/bXDKtweBQ64oXBKO8AOD5zTe6NOndWEHcFgk4EgQ9ujzAQVS4ncInKFCGMIP9gpcbuzVjtelAgYHQmeubNVWbu/QKo7dHGqC8HGoAP6OwBFXlO4MJvySXXe081d6tWPf3hswIEDRitYBLN7crh8VD0IC2I/Iur8oMRrG/7kIHHEECL9E+x1fgVeIYKy/dEs7ZhOsTAIYAFW/vSqpffVNXgvC8UCALQgccUTNGW/C7+5dTWuS+7WzF9wFnh0BDMwta9M27OvUffBCgk0VPAhCuRAIcJi9I/YQl7VSCz9D2HlR9m4EMDCntE0/KeRFMOIXhGopEOAce0fscfmau/DLFHZeQEsAA14EI2xSgS3qrPvQAYeAAI0IHLHEuj3Ows9O2GWTAF4F4+ebUAvCBiBACwJHBgGEX3vSWvi5CbtcEYBGMMKfvTsPrSBsAgJYfUiZOWrP9vgWdrkmgJtg3Hwgybw/bZAYgcCJQTALPz/CjhUBnASjRNrEul+tgJIA/73eF0jYsSaAlWCs/LpLe30mvu3k6AgAwiqosMNCgEzBOGMlviyAjgAwjw4ptNrjxAtmAkwneO/TBMpjZWhF4BuzVa2svJN7AsDWtUkz2PenDXQRiPr2rw8WtGi7jwZfpcs1AWJLWrQ3Z+Mb8zPQyMU9AJA6Z61u03cBYycApHuo+zGmewvUAQG+Q+AIFWBYWL6tAy0BIFtxtBcAUAkEOIrAkQHAmLlqh/NtHCCodh4JZ1gIgwCFi1u0N1y+OgJzG/CdAtb9m4ElKI+Dl1ff1OcCIJ06/Tv4+6DDQhACTF/eqq/7Fzj4CDpgU0VSW1uO8YoZeRpsCZ/F3pF7MYGk0as/9ml9/Zp2or7HcXMFpFyosf2WjX4JMPWzhGO6n5D26+jpbm3/sZsoJ4GiojIOtoSNZ+2IFaaYPuvSkbyjbTnoPJ8Ow8KXB5JZJwCke7dgwr+DpWDjd3y8GO2+gBdHEBY8jcARS6wtv3c5uEm+7TosxJa2ahXH6YcFWgKI5LluN4NMLknoRDU/f9FmvMvB0Zj6KGwLv09AvC38m/O3Bi0Hn/7XLe3dEudhATZm0gwLNASYQrLLBJd0D3P+kO7NzwYtMwFvOdhqOhuo1CFwyBJvzlG11o7B+wJu9d7VJ4gmzbB/K+GNhU0lfgkAt4A4PR8wu9R6fuLoqS7M+wAAh8wng1BvDIW1gTs2m4JhWChZ55xmYQyGt5GWAJDu3W4Gff8zKEXtNQf4zLrfXFBoPh08EYFDjjjsciSs7mKvnqrtft5ukclMAJpFm9dIRlizq0OrcdguDlkH/UxgTPnz/wkQUx9j7pALYJxtvNHvSAIoG/fXdjmm7cxFJoMANIs2sPWrymVXMAwHPHyKloj/BzIviLjG2ik3QJBg7HczOEQCoszpWcYi08xVra6LNvB77YaQTCAu+cxosLohZD0Cx1yxfh/9ETG4NvYjh/t9IU07pWogxhd7O6lPBy3dgrfky4A0mADT1b8hcIwKsCOY1mBYgAC6qXkzYLiB7dxHTtHPJyAv+e5BNKY8N4gA6fkALm4JtSsNnQxmE0t3uR/XgkWbfbXeFppgF/B7DgIUGeIRqfmngwiQHgb2InCQCgs3ttuWhk5mt8j0VnFq0cbPYdDiMvQlnxnzLYPP2zAAqPZ4aNQw8yITpPtlW9sHzeLRAg6B8pL6AZbpn8dhAABl249x59LQyWBYOHLa/3IyzPbxUPKZ8L1t+jcNA2UIHKUGrM719dN/ISTTghw4+WQpFyXfAEjtP9kx+CkCJLi7MxCOXuWaACu2cVPyDSAixh92JUA6C5xg7axXeP1UTBACQMnnpaxEgo1UwQeLSuoYBA57AiwPey0N/RKAo5JvAI7izyYLXGDttFcs+ZLuY5FBCMDpFfE1noKvZwExPg6B456Reaw8TAJsPZjkquQzEBXlFz0TgNcsAKVhPEF/myQtAaDk4/Trod7f/oEswKEWAMB2bdrSkJYA0nJ8J3tp4PvtN2WBr1k3wg9gqTcsArgdVEGMNYGCrxNASsCu4X4EjfGMi1fD+Xz86/yVfICkEJPdPxRJY1FRWYqgQZ5hPlvglwBT8B3nogKJ2dRQgg8WkRT4ohja6+Sc4FYaOhGAozt/M9HgOufv1YiY+AuChvmC1dkCNwJsO8RnyQcgsXom1OAbRh6+hnXj/ABW7OxKQysCQMn3zlwux30IfiwrwQcjaWUk+SVXWDfSD+zOFlgRwO34GVaQcf9U6Kk/09JVAdqjZE6ARRw3AuA8xk2FZCQWfySrwTeMpJkoggZ7hnHs3I4AWI9x04C8/WNyEnzDBFFdxLrRfpBZGpoJAPv/WfvnM/juGz3CNtg+RjIBl18bNx87NwiA/FZvh+DL6yLStZ/knAApEujzA/WsO8EPjNIQCLDrCLclX2XWRZ87CZofFDicJDLOFsBdxJyWfA3RIuXnTINvWERUH+eRBFAalqzjcoNHQ0SUH3CPTA6NVxJwCHzBN2yYBEM4+IbBZITAqTBEjko0Y76bwZQxryUiRqRKPWUk67h6stQ8gVrMuvN4B0zyMKvzwzDC3rECp2sHjJGMSjme3s2WCZL6JGnQJQSdygX0Vb1cLezkylK6QFnIunOxA7ZyMZ/dy6aRIeEPwnCpaIUG0je/Zx2fnFi6SpgpDGsDQG9K6OXxW29nQkx5hnTALgRBYIXNeTfW+zGSDcYQoL2vOAuoicaUUaz7HZ0NASLUBD6qNRSMjImjSWftRhCwsLBl+I33YRFRfoKQIUY6MI4giJ5A/G7SxZ3Y/BDrfuTe0nMIowmWC7hvMYuTFF9C3vYXuJ6+xWwGGUhnzxFwzC7WE3+mDQedkUVF9SESgFcESS0iwagV4FRs9oINz64gKIT79snb/kvW7R82C4tKLY8RQvyREGO8HixRXUH+e0iQYLZNH5sTFmN2IgozlKnP51SSn1kF39WDT6uR/3+JEO2RfHzD/wfDh9DPtZjXuwAAAABJRU5ErkJggg==",s5="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAADYlJREFUeJztnQuUlVUVx0cGeSlqJJRWdkcQERQln4SKmUgRGqCt1BIrUMtXaTJpCWZCttQ0ExhTi0fIQ1vioPEYW/kAREdQMwVU1CyFSBLlqbz+7f8939gd5t7vfHfu980+996z1/qtNWvBd75z9t73PPbZ53wVFSUmqEy1QetUD2GoMEqYIDwkLBZWCquFjcI2AQH8e4OwRlgR/N9aYbxQLQyTcnsJbbXb5yVD0C7VSoxTJQwXJgpLhS0Zho0bll0v1KTfWSnvrki10tZDWYkoff/A4LOEdcKuBA1uY1dQh1lBnfbX1k9JCvZM7SPKHSHUCdsVDW6DdVsgjBRH3Udbb0Uvosi+wuSEu/Wk2CxMFfpp67GoRBTWQegNMwnTNmJc1AZtaq+tX2clMPwg4c8w46q20eLmXWGeMESGh7219e2McGklShkYGH6zA4ZKmq3CfGGAtL2dtv7VRBTAJVwf4T6YNbi2YVoaxiKmBToor6WkeH5nafQYmMCLtiG0WZ3WRWWqi7ZdEhdpZGuw6zORtp0OKN8VdghLYIaF1tp2SkRgInZjhfccULirrBfGUVfa9opNUJHaQ7x6sDRqVeDp2kp2nR2BrgZTd9r2K0jQKr20Gy1sckCxxQYnideJDoszdiCV50RvOvxYXwi7Ah0W1wRRKtxVWOiAAkuFRUI3bbtGEhnv2e3Pc0BppcZc6lbbvqEi41UnmP1ybWWVKvXUsbads0pg/GUOKKnUWeacE3jjl7ETBGO+7/ZbnmfU5wRSiW7g5ERfGeUKJ9tddYxfmeoCszzRVkK5w+V255Y1fqtUe5gAhXbjPYbpLTYcpGP7DFHqZuN6GsNo6+gW2TuQF50BE6fWbrSnMdxvGZy08bmlu8qBxnqyQ9sks5UcJHNwr9pv6boLbTM2kaQSmEye9Q400hMOE24GxGt8s+Rb4kDjPNFgyl08S0OY7N3r4bv+YoKrAibdFp5tDJO2vNqBRnnygxnXfQozfmWqHUzevnZjPM2Dtmv+nQYwEz+/5i9eeOBmYHN//XvDHGHSboSnMHjkLv8wMXiI0Zxj026ApzB43nJQvr9+bvb4vL7SIb9eQByAZ9nfdaDinnjgcfve+XT/pXQ5g8dQG9X4/RyorCcZ+kZxgKkOVNSTDJPCjV+Zvo2rHG7pKFd42VbHsF//SAcq6UmWEWEOUOdABT3JUpfL+LyB0+VLGD3xQBs3vdEU5qpT7cp5Wobh2RxglgMVi8Ze3YGTzgIu+Rlw4x3APdOBmbXArIeBKQ8At9wFXHwNcMwgoF23wt7VXp7v9WXg6EH5c8QA4IAv6OurKTMbG78infTh9uWMe1YBZ34PqF0AbNyMyPL2GuD2e4Dep+f/TjrPtAejvyuXbNgEPPkMcMcfgP5nA227autzHW9az1z+MdvX3Tz/7v2BiVOBd/7dPANs2w68/CpQPQ74xOHR3/vZY4GVrxfuAA2ycyfw+lvAbXcDPU4Rp1bTKW1dldn9uzn+85fynauAt96OxwC7dgHzHwcOOj7a+/t+Pb/eJh957U3g3Eull1HrDYZnOkCNurF3h93vDbcDH34Uv/IXLwU6H2mvw3d/HP+7M+X9DcDwH5nhreV1PDHTAZ5VN3gmVMj1vwa270hO+XffZ1d8zdTk3t8g//gXcPhpGnp+tsH4vKzZnfv42x8CnH1xMr/8TOG84Pgzc9djr0OBRfXJ1qFBxt2poest/L4SHaCXutEz+er5ZuYeRThBmyHLvytvAL59BXDRT4AJU4A33or2/L0zctfjkJNk7vFO+PP1L5iZ/e7cOcnUa/lr0eqx5Dlg38M09N2DDjBM3egNdDoCeOwpu8I2yrJqzK0ySz8OaHNw4zI4s2aX+tRSezlcVeQaBk79JvCRpRcacXV4ew48xjiCTeiwVV/U0PlQOkC1uuEbOOsie9f/0TaZnF1lH7+/dgGw9UO78j/VJ/vz7FXChKsDrhJsbeo9wF4H9niH9tfQ+Sg6wHh1w5MOMvbPedSurJo/Rps1c6n36hv28nqe2vRZ9iL3zQ5/7hUZfj53nL0e+/W014Gxgaq+Gnqf4E76F38p/1kXrij+6hiciVJep8OB5/5uV/5hX8r+7DLLswueiBbR697fXgfOJfbtqaH32XSAxerGJxdcaQI1YTKnLnp5+/cGXnjZrvxssXo6hS3q+Jt7o9XjvMvtdZg2W0vvi+gAK9SNT7ihY5PLR0cvj5Oq1y2rgS1bsw8np50LbN8e/iwdNko9Fjxub9cPfqql9xV0AP3PtuzXC1j6ol1R2cbrXBw3GNiwMby851/O/ix3E8OEq5Djz7DXwTaRpKyVYe8IlUAQWU0H0P9gExWw1jL+r16bX5nnXmZXPreOsz1rmzyuXBU+F+GMftL99vdTZs7R3B3cSAfYpvTy/zP0Qvv4/8Aj+ZV5s+VXTLnqF02f42zcJpyMcuL29PNNefOf9rY0CPcCTj5bU/fbKtSNT24ab1fW1TdGL6/twcCjC+1lnvKNps+ec2k048Uht96ltRH0MfoOQGPVPWlX1slnRS/zoBPMdmuYcKMp29Lrlt/FYlurzHsM+GRv9R+f/hAQJemCxurYI3qZJw6zRwGfeyn7s088HZuNc8ojfwE+7USqWHoI0L0A4liZrX9gma2/9Ep+ZV4xxm4Ebhrt/hwnY0klgFDWfwBc+6v8nDlZNtABdO//OecSu+KYlxe1PI6p9z9iL5Nj/e7P9vlK4UbeXTghZALK968FUirh3jDW0AFWqlbi57fZlcjkkKjlMT7/imVIYW7egUc3fZbbyTbhErC2Ljf3P2z2K/hLHzLCla4+F8v1Q8ETI2TdZFuu5YKZw7Yo3t+WZ392/GR7XUaM0jZanCymAzykWonJD9iVPvrWaGVxbH1wnr28sb/N/vxCSwbQ1q3mPIK+4eKilg4wQbUSzM2zCY1qK4eJIRdWm/h+mDCfoPvJTZ9nKhrz98OEiRsHqyRuJMV4OsAo1UpwfLcJjcrYfq4yeFKISSK27WTKrDnZy+BJHptwici8BX3DxUW1fkpYesyOkP3L7FmmUDPOzi1cTuK4OTRouDkStnmLvYxNssQ7MscJIc7SbcJ8P32jxckwngrqoVqJz59gn7U3CGfvTJ/iKR8mXK5Za8/by5Sxd+Sux+9n2p8//4faBoubnvz+TxtopoU3nAGgcZMSrgoYSwjLunlxRXgZDFaFDUPFB23e1o2DIQccHS0buLnGZ/p3p5Azgfw329LRtgVcfDybeTJoonqFODZzizVO4byAJ4OZbh727lPPsZc1969m40pbT/FR497h0K4nAlP/FG02HyY7ZFL5/EvAeZeZFYLtvdfcZC9T5/ROkmQcDnXpePjehwJHDTThVOb05TM3WPeeGUp4OQQPZUR9py0CyPjA6d/S10187KLN3b4ggpNDRt1urjERuv++39Qw3GhhVg1TuDnO83hYl6PyfxeTQGcEN4zsDlO2qn8J7KNydCsp1tHmxXdFDI3wmWNM2hbjAB26q2fUFCmNr4hxah7gaQmyXhLlr4krD7JfExc4waMOVNCTLAuyGj9wgBEOVNCTLCPDHKAjXLotxBM3m3kheE4HCJxgsgMV9STDlFDjBw7Q14GKepKhn9UBAidw484AT5xE+2RM4AD8aJRbkUFPIfADYHl9NKoDzKfGtCvuiYe5QvvIDhA4wSD4z8eUAvz455C8jO97gZJiPj8DnLcDBE4wEC5cIOFpLjz3OaBZxg8cgNfI+s/HFy/T5NffrtkOEDhBH7hwj5AnX3jot09Bxg8cgMkiY4SdDjTKE40dgc1a2S0czQk6Q/sQqScflkjX3yUW42c4wQDhPQca5wlnPQqZ+OV0gMpUayl4LEz3ot1IT3Zom3G0VewOkHaC1uns4VUONNSTHdqmym7JQpygMjVYXrLJgcZ6GsM1/+BEjZ92gIrUHvKi0fCrApegLa6jbRJ3gLQTVKbDxNMdaLjHMB2t8tzsKdgJzNJwoQONL3cWxb7ky8MJugrzHFBCucJt3m4qxv/YCcxw8IwDyig36ql7VeM3iIw/naRCyxxQSrmwjDrXtnsj8U5QxsZvkMAJ6h1QUqlS76zxGySYE8x1QFmlxjxnxnybSGW7gcsTfaWVClxud9W2a14iFe4izIArN48UJ4zwMeDWWduezRJGp8AQpfY3CYoT7reMFh0WR7efS4K9A24gcafKbyXb2ZHWFTfdWiq23xICs5U8DiZhQVvJrsKEG+ZcJLulqyVBUgkzi5bA9waZcKxfnNZNUskcLgk3L2CSFnU/V+MGawJdFOdEr7kCk23MlPNpKM9J4oag7dRBPNm7xSg8uAAzLMyHOcembZik4XlLHrkbKG1vq61/Z4Tn10QpQ2CiiO86YKi4WRcYnodui3tpl6SIchg74P0EpXRJRW3QJm/4fEQU1k+YguI8ps7LtiYJfbX1WPTCm61EkSOFBXD7MkvWrQ7mur2O2norSYG50ZTX2s6EGVc19xp2BXWYma5TZY4bOL0kI+lbzs1V93SIGpgvnyR5zyHLZr7DxOCdVWhXxks4F4VLK6EnzNfQqoXxMJMwRtqWwwReuAbP/Go6/2YsgoGpFTBb2bNhvqnIz+oNFXpIuW202xe3/A+tK4X9ikt4nQAAAABJRU5ErkJggg==",KK="/demo-dapp/assets/100-4mziT57m.png",JK="/demo-dapp/assets/1101-MpTks0Nz.png",o5="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAD4NJREFUeJztXVlzVMcVVqjKA7Gr8mA/2VWuMj8gb67iNU9IIFs2hiyOK04I2RMn5Th74iSjQQJkCWwMkrHZDAFsHLMYA2KNwWGJWY2NWIVYZkbLjKSRNFpH0zlfzwyRhGbm3r7dt1tz76k65SqLud33fOd2nz5bl5QUEW1f2vWlxc+EH1g0J/x41ZPhrwfnhF8MloVXV5aG9hGfriwLNQdKQ1H6byIwK5QiZlmmv/dn/tbM/y39Br/FM/AsPBPPxhi639OnDC1+OvxVAuZrwdnhBQRcPYF2jMBsISATY8GVwulntmAMjIUxMTbmoFsOnqKlz0YeIOGXEgg1BMapAL5c2WBbV4p+zAFzwZwwN93yKUqqrgg/SAKuIEHvqlTxdUtizA1zxFwxZ91ym/JUXRF5nAS6kr60GxP3bMM5hTlj7ngH3XKcUlT3XOuX6QsqJ+HtJEGOGACmUx6md9lBxuQcvJtu+RpLZFB9BcDTl9NkAGhKmLaIi3hHvKtueRtF9HXMJQFdDEytZV6UU6QI5/HOuuWunYKzQzNJGPsNAEWPIpSFGqvKw0/oxsF1Cs4JPUQvX0lCiBkAhG6G8ykAmejGxRWCV42++msGCN4ohkwgG934KKNF5eFHSNMbAt7Y50UZ20IDZKUbL6lEy9tMsu5P+OBbUwLICjLTjZtjWjI3Mo00eh69kL/X22WSGWS3cmHbNN04ClGwLDSdXqAu4H/1ThhbQi2dFKbrxtMWkTHzMBk1e+kFkgYIcapzkmS5BzLVjaslIgPmUVq+DhsguOJikilkqxvfvFRdEZ5Bky1aV64B3AQZ68Z5UqqZH3mMlqqrBgipqBkyhqx14z2OoJU++O4qgTErAd/z/WVfBzdptwlgmfoGn0Ym2Ws7HeBsiuOJdiF4nPkR0W0/AbxTcFAE/HO+CZwEFq56DLl71/fwmcTwGM5zBfxMYMf37ZvGhInyABLClJmonv4X9nkyJTihNJTsx/ONZ55PoAR8ZKvoBp/mwFa80MpW/bCN1X27FRawboGbyCnpmUU8h09jGhdpNTuyvodF74ywkaEUS6UY6+8ZZdc/HWRv/7Jdt8CNY2AlNccQSYs6XiQ4O8Q+WNzJWm8Ms1wEhTi3L8GWf6dVu+BNYmAmBXykLdMDo24Dv/bXHezOpaGcwE+kgb5RduCtOHv1GxHtwjeEo1JSzpG77ubE63/Uzi4fH2CjScvYj6N4e5LtfLWLbxsGgKCVgZ0j8DMVO64Yfsufb2Un/tXLl3QZdPPCENv855h2EDRzSrgCCfVrKGFSPcmlz0bY/tVxacBPJKwmODUYAIYWBoZCtYi8UFPx17/1lRjrDI8oAX4sDQ2k2MebevgxUjcgGjgFLG2BjzJmVLIq0khamqPs9hfWDTxZ1Ns5yg6tibPqCm8pArC0VZqOWnbpkyhLG3ifHernX6QIpUbT5//++KiwkQgfws3zg2zr32KM3lM7OG4xMLWsAGhoIHPwJc+E2akdfcLAg26cGWTrf9PB6r4VYbXEb/2inV083C9sO0CBms8OshUveMM+AKaWwEdLE/rBsBSto/P8h8u72GBCHPjItWG26U/RnGOs/EEb9wimBIeAIpx4v5ctfrroV4NhS+1qeE8eGRpHe/2RDT182bZLALPj9gg/z2P1sKJo7/4jxm6eG2TJEfuagPGunx5ki4p8SwC2Bb7+8IOZhkyOB8MSnYjbRx8evePbeoU8eviKd9OK0xMVMxCgRLpBUsqEbd7uZWhvFpB09Du2pdeW8LlPvzHBauY5d+XiSz60Ns4NRjt0+/Mh/SCpZRwJK/It/7tkDYYAjVWCgbf65+1yw7v0rNe/28o+3dVneRvqDCeL3lcAjCcFH10uZTZhPL+/sALAONyxtEt5XH/Db6OWtoXu1mTR+wiA8aQdTdHqVOZAVhSgsaHbtRd/53fRgiuBFxQADKwnW/5r3FQAWPluR+w+P9LvK8Asvg3UjAMfHa9542UXFeDs3oTrL47kEl8B+DZwalyXc7Q9l911u5ACwDhz+8W3/DXmKwCYsAbmY/f/BbIH8YoC4Mi55sUO9l4gxo1NK44rExiYj93/672uAMnhFPvPe70QjKVnIY8Bvo5E93jLcqg/xU7v7jM+RxGYc/BxBUrmpg1PKgBOBvBD4G9wKRd6RvVTYfra04mq+eIPyGDeV9/Nls41M0cRmPPrb3APTgDXrHhQAXpjo2zfqm7Lyz6cVV8c7bceik6lvYub/hg1sYahBdjDAHxcxR07JisA4g0IVFWVWwMeIegzHyWEI44g5Ciu/VWHbtD/z4Q5sM9W/EgfwEQFgJEGFzXPAbDwRSIgBUXpbhPMPplAwwMpfvx986ftlsZXzbyCCNeieUUB+B5vQfBYrpExlK8gxQkhSHV4XY/2EwOwL8HdeF5RgIJcirS1Nnbl5IAS4CcS4hPbKju1BaCAfQkuSPQVAPt8K7t4pJ8v024S7IrQ5WG28fe5s55UMbCHApz2sgLUzI+wo5t77jvP2yH8tr1lxNEzcLJADUPDj92zD4B9Cb9OVYMC4O86gcf+u6uui58IRAhfLlLbt7wyPoto3UsdPL1MNGt5dISxU9v72DIXHEnAvgT35epQgNjdEW3go2Qscl3cwEOq246arpx7N4zIbcFO7gwSJaS+76xVXONI2JdkLlJ2XQFAqNZx8zi0+S8xXhMgSvGOJK9AhhvYynhQECS2doYEFYFWmaP/7FEmD2BfElBU/mVFAeA330VavsiiQ0aUkTp+dk9CuC4BmUt4nzcWtAl59BAX+OTdXu55tEuwKxQ2wUiVqBI6EjytEPbSa/8d5MKVPQd8gYfXxR3VJWTzFWXMBycNW67kDKlcBZQpACZth5DPDy+djAYPcPhsX9LpyIPXcWuEbfqDmqMZqpXtbEXnFCbPKNsCsGyJHIu6WpPc/SqiCIjNw93bcmFI2ArHfr37tW7lXjqsTgffjpPiF56TwhNTSpkRCOargODqi5IwFGpYCdGC0T0MvgVRRw5+h4IUdB9TCfxEhb16qvBKoEoB0kagomNgZgB+lOkXqBDKErxk+KpzjbFkbtqRg4QOEcJKceGAviZTrz3fWjBbWdkKkDkGKnEEjWU4NeDcGBU8DaFqCJXADT8Zb4x9uKyLtd8SP2sj2IOKY6urjCou1CRD4QrQrMwVPBkj0OKkARQIhh1SynGEFCU4aKA8uoHPMtzI+UiZAnBXsKJgUD7e8HIHu9s05CjBQoQQhkUpuGnlXxoVYJ+ycHAhBghb/x7jbd3cIBiI6ESmG2yTFICHg1UlhFhl5OPBvdrXKW4o5iKsMFdPDvBSdUtfRFlIS39BbQqAhBBVKWG2uDTtHMFXOuTAazcW+NCVYe4MspLwmfUfXDo2wMPDXlEAnhKmKilUlGHpX8PZWFAPEN796PVunr5tZTwcw5o+GeCeSDiuajW0mtWiANmkUFVp4Q4nx+Pq8MNbNRQRaLHjQcz2DhjrP/CUAmTTwlUVhsjgxbR8wy2bLzkTET60nlu10FqkDm1kUJYevXu/0L2kAPcKQ1SVhslkfNU4vo3tOQTvGdq8wV1sNUSL5zSfy+169ZQCZEvDVBWHquI3vt/G6slgFAnWwBGVj7ykAOOKQ1WUh5vIlhTgmx5QgInl4SoaRJjIhRQAEUEYh27Pq1CmkGwFuK9BhIoWMSZyIQUAvR/sdHVO61/uKDgn6QowsUWMiiZRJrIVBUBCitWkT6cMX8Xdy4Wzk2UrwKRNomS3iTORrSgACBlFy55TuxWsIGP2ynFrJWgyFSBnm7jMNiCtUaSJDHezVQ/jQF+Kh4xlp4ahE+qB1XFbmUvIlZSmALkaRWa2AWmtYk1kJKbYrQRqax7mfQWc1i8gyIQkU5FEVV4/IUcG+VvFymwWbSLDYVSoV+BkBHf0rc+G2PqXOoTqAjYS8OgUIkI4IWDrkiKDQs2iM9uAlHbxpjKOeaLp4lg9zuxJsNU/sxZeRq3D6d0J4ewlZE411ndLq54q2C4+vQrIuzDCVLablz+RsH8f29yb0z5Aqtm/3+mx3a18LA30jqb7KMvLT7B2YURmFZB6ZYyJnL68KsZiqNsTDD33xpLs4Jo4W/G9Nu5CRsYRagG7IuJZTlgtTn7QJ934tHxlDEjFpVGmMtLK967sZtHb4tnFyFqGG9lJMovdqKZdtnVplMpr40xlnPudFJY4IfQZwFV6qlrJ2b42jq8CLlwcaSLjRjIUilgp2XJKyElAybrid7J/cSTIratjTWQYXri9PGTBTStC2DIaG+J8+1H+LqJXx/JVwMXLo01kKAJazKNOUQZl6w9Vu5nHsPjl0Vly+/p4ExlZw/vfjLO+LrFjHbYTJJ7i5lSXFdjZ9fGgqvLwE/QwZQWkU4lROfzxxh5bhuKdS0O8nXzQ/XqDKLBzrAAg0qSAbuGbxPAmXjjYn7ciGYms2D501R8CMyngg4JzQg+RMXFNt+BNYxiKSF2H1w7OJBh3KDw9sr5HS4XRPfAJK2AmTQFAmQoizxqEeYTNtwa4l9GkwoDC0xSv+FFBpNUNvhIYzSlgpAR80KLy8COB0tAJA17U58mYsAFGyhQARHvLTBoopv1lfZ4IfgzYKAU/S7TMzAv4W4FJjKV/nivgg1YubJtGA9bSwEkDXt7rnAQWwMQ1BQBVlYenkwW8xwABeJqBAbBwFfx7SvBk+GHaew7rFoJnmWQPDLSAnyWyOh+lyTRpF4b3uAmy1wp+lqorwjNoKbpqgFA8wZB11VPhGbpxH0c18yOP+UrgDviQtW68JyWsBAF/O1DJTZCxbpzzErcJfMNQPpNMjdnzCxEsU1qq9gZ8P4EMTvKjnm5r3y4Fy0LTK8tCdQHfY+iE4eGr1XbOd0pL5kamcbexHzuwzyQzyM51D58KygSQEEX0V4PCnIKsXAvsuEUIU/r5BIXBh4yUh3R1ErJV/PSy+xkyUZbJYxrxHMOyUCW9uG8bzApFkcApPYdvKlBwdmgmaf5+A0DQwVjuG6Wlbk9lylQgoRjVC/ZBCuVajit2io1Qv8YLUkuL15WMKl28o3CtnhcIZcyoZc80qSiGTiXDeBe8k+0Sba8TWprwnkXpxlVTaXvAWf4G5m65LYtPuQmdrdDeDD3uTG5miblhjphrwW5cPokRulyi1Sn63fIG1zq7nNPYmAPmgjnl7MDpkxpCx2u0PUfve1yAkLn5pEXJHUjpZ7ZgDIyFMTH2fV23fdJHuAIF9+DgMiR41XAtGu7GwwWJuCWTX5Nbyh0vicB4myLF/1/6b83839Jv8Fs8A8/CM/Hse9esFAn9DyrE+uBKMBg6AAAAAElFTkSuQmCC",a5="/demo-dapp/assets/42161-RT4vZgCg.png",QK="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAAXNSR0IB2cksfwAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAkxQTFRF////AAAA74Ig8Iwx8ZA4//7974Qj74Mh///+//////78////74Mi//v4//////z5/vfx74Um//37////////////////////////////////////////8ZE774Yn8Y42/fLn////////8Isw////86FW/evc/OXR////+dGt/vPp8Igq++HK+9u/976M8pZE/ezd8Icp+dOx/vbu9KZg/vr2/OjW9a9w9Kll+ti5/e/j/vnz8pxO//r3////8Y838pZD////////////////8Iwy////851Q////+MWX+cyk+tWz+97E8ZI9////8Y0z////////////8ptM/fDk9rZ9972J+93C86Nb8ZM+9riB/OXQ+c+p/OfU/OnY8ZRB////9Kdi9a5u////9axr////////////////////////////////////9Kpn////98KS86Rd/////////vfw/////OPN////859U98GQ////////9rmB+9/G9bJ298CO+Mqg/e3f9bR686JZ8plI9a1t+dKv9bJ18ZA6/vXs8Igs+Mui/e7h/OrZ+Mmf+c6n8phI8Iov86Ve////////+MaZ////8Ikt////+tm7+c2l////++LM98OT8pdG////////+Mid9ruF855S////////////////+Mib////9rN49rd++tq997yG+ta3////98OV////////++DI////////9rV7+tW19bBy/vPq9rqD9Ktp////8ppK////////////////////////Mj9/0QAAAMR0Uk5T/wD/////////Af/+///9/////5/W9TQF4uDZ6MT/////x1L/Av///5b////////////////////////////Q///vCh77/6X/uP//////p/8SDgb/////////////////J///UP8QSyRsVr4rDZr/Wf//bwz/9/9N///8L///////////////////////////////h7H/5P9d///c////j+n////zMuxm/6D//////5v/WFv/MCz///////9U/2M11GLeOHwhNZoAAAr/SURBVHicxVv3Y1RFEJ67JCSXkII50iFwhhCKUmKQFnqJdEKQKiCdkBAIJQooIIIiRQVUekdEEATEiv0fc9+7u52Z93b3vVyJkx9yezs3872dfbvzbYFAAhJ6/vTcgtZJZVP37s/L2793atmk1gXnnj6vScQWdNf3lq2zJvUFpfSdNGvrllA6AUzbtqA8T+08LnnlC15MSw+A5gtNmid3tUTTheaUAygp/tqf96h8XXw3lQBCLwYWdMe9JQVVEV+d0geA0B8V3fUelYq/fUDwBtCRoHtLwtuSBlAyMHH3lgz8ISkAbfdnJOcfYH/x4sQBbPsyWfeWfBlJEMC0Wd3u+mrJm7U7EQD/lqfGvSX/lHQfQKfPYc+f9N3aTQA1xal0b0lxaXcALE7y5VNJ1Sb/AKYnMfboJTzdL4B1ZenwD1C2zh+A55Xp8Q9Qud0PgHVp8y8QuNvABWB6mto/KmWufuAEsDgt/Q8lvMgMoCYN7x+XqmYjgJSPP255bALQmX7/APf0AP5N6fivk71/6gBMS+H8Z5LyxRoAs3rGP8B9NYBtpvyjZUlmTOaPBMhfHi9l/pylUt83JV4/ZQ/A0InxUr81dnWXCkCbMf/6IChlPMAlLAUHq9R3yer+jQAHUbvWrq5cpABw39hq86WJiTnUfjD4qkK7sb+sfl8UR8jStVh71bkBlBjz3zHo8CZAQ38CoF+uW/04Vj8EWJMtS2/EFAruugCYh8AHaFF0gSFBKmPc6m9jBIoAfnVGQMjAGgeADqN/WCtN/J5D7Vty1aXd8JWsXC+Kn8nSCuyxGziAkHkOIhH4QrwDnzAA813qo7FyHMCR3rK0E3UulzIAf5gb4Du0eJrZt2WNU32srBolIvCqOlpPKACPBoBrrBF5BILB7x3auZ/Lqh2i+LsqAmI8LCUAImb/I7Ops/zPg1w+c6g/wqq5AAMwAu8ytc0EgEcWQCKwhtmPyUiuvkNW9BLD4Luot4qpDUQAJR4k8ENpYq1oxN9cAG4y7RxsobGiOFGWJr/E9PJKJACPNGR8L9qIhS+7APAYPMSK0WIewAi86bB7PQ6g2WP96RBaFAP/Ky7/jhisxwj8ArBTFwGAO20xABfM/mGJNJGZRe2jnCTaWQvl18tF8bYsVb/kNByJAWgy+ycREBNP7sKgW2YT9WX49RCAX/rI0kqX5fNRANM8EjHeiMQ+Su/xqP46RmAowDeoNNxlecYmG8A2s3+YLU1k5FL72TfR+BypnfOx/HKQKA6SpZcL3aa7bAALzP6HYgS+ExGYLEvLsyYzX1F5hqg+BThhioCdokMg5JGKfo8WrwAMx9Jq0h97D4irf4QK4rs5WHpPYftGqQCwxWP9+x1pYqboxu+jxRb6Rg6Jq/eTX90WpaOyNCxfZXy7ALDV7L8esx/RiFkY4XdyIIe/cZbsw2lDRKAIf/yt0nqHAOCRjB9mjUgiIOzDMYzB0Kj6UlQ4xSIwT2m9TgCYZAZAurFoxB9lKfsIsFFxtK2ds0J+sUQUz8rSqEal9XAAQuZRgERgKdDkeIlIzei88LatPhgjcAZgAqZOr6vNF7TBc3MDnGQReAtL0dEXZ94+9VaZROAIS15f0dg/AE/NAJABWI3I7QPLDewYTJHFEaL0miwNm6CxH4FzRv8No6QNi2Hw5FhIPsbAmvs5A2gY5hUBgE4wj4Or8QmXAdRiSSTH0AI0P+xTxF4ZwQDmYumizkE7tBoBkG7cwBiGSI4f9a5lHGgcTR5HZNHkuM8enYMmML6F+RgBqxFJhIX9jVZHz8dm3giEBYoIFOI7sEProQKMq3KEAVx0RiB3ZvAaOGMgebBgAD+xxtHIVPFnEM7x3kSLIjm+GLRTMRID8aqNicVgfpYzOdZIAew1+CcczGpfzvHWi/+HxWCDUfpIjISxKInkNTdDVrxmesj9hjrejU+x5DirOhgdbpfLb61+ujL68S1ncqwX02SMDCCbczxhf57130rFPmUxGGx/mJxFJ6peJxIEUMhHGaQn/YT9n+1PlwD24GwhYhCdLQQDyMIfnzX5N4VgHD6bxfFYchxLx6x0GOfLrxpji0kieX0Pf3zcCMDQCTdiI9Y7k+NY6tdbjIZnsEJM+vvEv+rCeAvZMsAIQP8a5vJGRI5nMYx4YiBSsSJsmqXRjEBEILdafjlI6wGs11A/EBEGcJwlx8J+znxineQsjXZWeoVFYLX5+fVDMWEAguN9gRb3AVyJf7ZSMcIPhlvBySh0Jsd6qdBPRoSDHWWPubCQpmZDWOPcsrrnQdFCmBzP1jmwpUk/Hc8LUif1nGHgoLgLKHdaKLrHaTFmrMLEYI7OgS3t+oSEMIABLo5HXhAxyrzBK8G5smuQTm1KxhkAoScZFsNwDBG4CHEr+muMwESjf5GS6ZJSzgAmYAQ+sGoLZ8qyNdM4l2HIuuJJjf2YHIAaTVr+rTSR3cKS4yjDwBhY6TBZiLIXz1dieaTafEzydmuJCUbgdg6d8j6JMgyebZzCGByyajF5/TDHCCCspWacAUxwcbxCXA7+DegqjrV4PgbfgW+M/m1qpiannAHw5NgWknEWGdaxapXWpXRo6TnhYKBkGHxBupavpcpZ5Jo5AjY9Vy5QkAiI1LcRU9/1cY18jMExoJsiK2jz7FTYJlJZqluiId24lnG8h1KFtEqDczVXdlHFZgaVdnuN6IWihjMAJccj/UKkYqd5DGKZ6lrllhpKl26ZjjAAi2Hg4u8x1JnAmZ+Slro3U5jElukUC5W3EMBplhw/IkqctpGtOdxVUm7poZzXLtVil5rCGUYRUSLrL8vi6bAtZ+LE+GPX4iyXiG6xmjCAqywCY6kWmR9+BDb6QWzoVG0pErmzW7dczxmAJgJ0Dc5KxfjO3iUfEZDL9YG7jg0LzgCQYWTXMzW+gLYKS3OibCHTIwK4YRGoYhUkAodsFhyXXdxAEcZgqSsLOypzA51UhXSbVmRgN3M8vohKJvDo/vYVMwC6aVXDtu0IA2AbFNlOjsdTMZLCzLHYwkJzBC7TbbvA36SGMwDCMHY5bdSj5q+imMlicNbjHWAbl4GaMNZcxSfZx5JjN8PA/RjrcZFIWIvnhYpddSLhZr55TXYtMMmuzqXJMS7JS+FshW/WeIhj85rsXZ7Adj3INigGued2B2PGaB318l/l3L4P/BDn6YQBPPPkeNhf+/EYDDX7z5PHjfEIR3w4JO9WPmMYLQpDhLPzVGyuGYDiCEdgcfQQC+FgD8CTYbSwGDjYgl6Uh1gCETs5HF+dEZO1p0RxRLw0+ZnS1IN4fYa1MXt4Zrw0Vqkdl80BFYCeO8hUHFID2P1Pz/jXHuUKlPTIYbYZ7Jg1P87nsYOWGjEc5+uRA411IROA0ipvC8lJq+MSkPNQ66awt41k5C+PQ63//7He9B5svrHF5U5xtHt72hDcUBwu79HD7e7n1x3vT0tP/Mv38f5AYFEa3sZWZ/83AQg0P061/zrNJUDtJZd7pt2sbsuMe7qLkPprPn+m8JhzeQLXfESKZD5n2w0x3fYyXvXqSsmIULnZdA/VfNltUV3St73y6tS93x8AwdyTvPFQldx1PyGhDZcTdx/e4Hnn0seVz9InCb4Pl5/4uHzr69Jr6eYqj+NWCqnarLldlgAAISXX73TH+53rJT6vYPu/+NwWOe/z/ueM8xHDDceEAQjZ1PX4hpf3yvYu9bW6VAAQUrq9oy6sGRzywnUd230FPgkAtrQdiHS2N1VMjQEpmFrR1N4ZOeC/3Yn8B7wav52rP1r9AAAAAElFTkSuQmCC",l5="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAADQNJREFUeJztnXuMVNUdxxEUi0obW9BCNDH+YYymWAKNFRLDYxcUBZaXqOCL2hRkBWEp8miVhZalKKa4dLXyShQfQBugFKWRRzYIAhGQRwEBK7LgnnntY2b2NbMzp7/fvRcc1tmZuefee37nzsw3+fyjYfb3O7/f3Lnnd875nQ4dslBs4KCbgPuAUcAcYBWwHTgInAIuAAzwAwHAC1wEzgCHgZ3AOqAUmADcD3QHrqH2La82MoL9IFAMrDWCGAe4A1QDm4ykGgbcSu1/zgkGvRPQF5hhfKtbHAp2JmCiHQIWAgVAF+rxyUp5Bg7qCIP7AFBmPL6pAp6OILAGGA7cSD1urhcM4m1ACbAPaFQgwJnSCpwElgC/BDpSj6VrBIN1DXA3UAF8p0Aw7XgqbAEGANdSj6+yMgL/K2Az0KBA4Jx4KuwHxgOdqcdbGXn0wPcCtgHNCgTKaWJMn2qOAK6jHn9SMf03vjxLv/GZPBE+BvqwXKsvgMNdgClArQKBoAansctZrtQUwNHeTH8EUg+8aniAMUAn6hg5InDsBmA6UK/AYKsK/izg7KcHdbxsFTjUjekvedQD7BZOA32p42aLwJFC4FsFBtVthJn+xHTnTwLTy7fzWW6+4dsFrjVsALpSx9OUwODOwArm3KpcrrEX6EYd14zE9OXZLQoMWrZxFriLOr4pBQbeDFQqMFjZShXQizrOScX0qt5+BQYp28GdTP2p432VwKCewAEFBidXwCToRx13TUyf43+mwKDkGpeA3tTBx7f9TQoMRq5yDuhJFXyc57+pwCDkOrjTWX6dAP7oXObyeb5n2CPcWzSKs8EF5LZYBJeV5VUMmb4NO6qA42IUFPJgRQWP+Xw8HgrxlkOHuP/pZ+jtssY8WcG/g+lLl9QOCxMsL+c8FuOJipw+zb3DR5DbZgFcSRztdPDxpW+PAs4K45v4FI/5AzyZwuveJ7fPInjC6Xango8vffMUcFKcQYN547+2Jg0+KhYIcP+zz9HbaQ1cdrf/pRA+tB8QUsBBYQJTXuDxhoZ2EwDVtHMnuZ02MNXu4Hdlbi/2wLe/5ejRlMG/rJrpL9Hbaw0fcI+dCVCigFOWqH3l1YyCj4p89VU2TA3XMzvOH8CH3Mn02jO1Q8J4hgzlrVVVGScAqv6118nttgiePxhpMfgD8dDGhwo4Y4nQ6tWmgo+KB4NaoYjadot8A/zYyrcfDy1EFHBEGO/IorQvfu0pvG4duf028IJo8K9leomR2gFLNG5tf9qX9ikQiXD/M8+S+2ARLNqZ304G/2go06tL1A4Ig9O+thU/s2o+cIDcDxtYajb42IVjpwKGW6Ll8GFLwdfU2sprZs8m98UieMz+Z2YSAJsauPqkbu38P8AzPG49AUCRU6e0OgK1TxYpMZMA7n7zLyjk0a//Z0vwL6v+9WX0flkDTxv9JJPg/4K5/NRucMXfbA0+Kub1ct/jT5D7ZgGsC0zKJAEWKGCsML4nntSC5YS01UJ3/xTgrK79XgTwP38EHFXAUDEgOA0bNzoSfBRuHvE/N4neT3GwX1H7G0mZ3vzQtYWfwOQpPN7U5FgCoJo+/dTtT4HSVAng2k2ensIh2pzdaWFV0TvuMXJ/LfA5S9atDP7j9cBxBQwUombWLMtFn0xV+/Iccn8tgMfO+yRLAOxjR9l2VRjPQw/z6LmvpQQfFVy+nNxni7ycLAFKFTBMiNA770gLPgr/HrXPFjmQLAFc2bjJO2KktpdPpurfeIPcb4vEqwcOuiUx+D9XwCghGjdvkRp8VM2MmeR+28CIttM/aoNM45swUXitX1S4UQT3GFD7bgOliQkwXwGDzDG4gDfv+Uxq8FHhDz+i990eKhMTYKsCBpmi9tUFnEejUoOvrQc8Np7cd5vAGd/1HaoHaM2afQoYlDGeh4fxyPHjUoOPCr39NrnvNnMvfvt7KGCIKeqXLZNW9Lms6Pnz3DtqNLnvNjMGE6C/AoZkjLeoiMfq6qQGHzeW1P7xFXLfHWAxJsAkBQzJmPD7H8gNPgiPj7t8Aag9tmIC/EUBQzLCN3GitlNXquBFMzC1mNx3hziCCfBPBQxJD57tO3hQbvA5Lv/uoPfdOaoxAVxx6LNm5kzbNnlmKiwyZdG0LxkRTID/KmBISvBsX/TMWanBR4VWryH33WkwAVS+iFEj+Nfl0oMfq6nR6g3UvstIAD+1EanAIMT8fukJUFdWRu67rAQIUhuRioYNG6QHv+XLLy31B8A+RNhkAjeqUI9fJgmg7JWs3rHjeLyxUXoCBKZNE7MZkqZp+3+ufE6svp7XTJtOPo7uTICCQq1fj2w17RCf9uG5gbbCdwnfU0/Tj2eKBFDyJ6CmZJZ2MFOmsMQsehxcK1I1Nyf93MZPPtESmnpM20sA5V4C8bfTlpO9JhV+T6whhGfoQ7x53+ftf3AsxmvnzCUf1/YSQLkbvbA/j2y1XqjS+wYL2Fu3aFH6z6+6yD2PPEo+tskS4AS1EYlgEFo9HgkhTxB8Q4NvlovZO7KIR89mUKSKx3mwfAX5+CZLAKVKwaGVq5wPeBthWzjRhlBm7I3V1qp2qiii1GIQzp/j4bCDoU6iaJTXzCwRs/fJCaY3pWqzDHWWlrXFoKUKGKINSvOePQ5FuX01790nVvTBOf8O89NUXM4OvChYZ7CfI8psCAkUF0tf68eTxP5Jk8TsnVosvCk1cuyYKtPCrWpsCSscwiMnTtgc3vQSbQ+P0z5L9sILYd3ixdTBRxYrcSqo7k9/lr7WjwtMops8ccZg1d7W6mruo38hHNvh0oCBeA8A2bZw7+gx2o5bqcIpmeAJX+8o+6apDes3UCfAveQHQ0Jr1toymGYUOXlSuCgTXr/eNjtiwSD3/+Z5quDrB0OMBCC5CQTP9sk+2att8Z4/X8hefPGz+yxiyxdfUCVAJfnhUJwTy1ZzZaXWTsa0vTDta9nvTAsaojMHC0iPh2t9fCVLm4MXi23xritd6NjqZOvFi9rMQnIMvj8eLr1BxKDBPJLh9S12qmHTJqEqHJaJnd6WFn73XZnBxws/b2mbANJaxGjfJsnC3Tmiq32hvzvfggb3EnjHjJWVAAfJmkThWj/FJs/QypVC9vrGP87jLS1SbGzavVtWAiRtEiWlTVxolfnrW6wqev5b4U2euJtHpgKTJzsdfLz674dt4owkcLRRpOfR4dqjWKpg2ie62ud//rfSm1BoO5KdTYDkjSITpoOOtYqtL1sidTBRTbt2CS+/Nm7fLt1eTNjA7xx9CixIGnwjARxtFt2w8R9Sx7Ll2DFL27DwQmkKOXhlXT1L1SzaSALH2sVji1Upgm8RFpk8Fm8DD38gvxcB1iocvJfgY7wKMF0COHdhBG6i2LXbsfYuOJXCOn/dwkW2rLfjO4vWi0jSSiXaH1zh2L7BzC6MMJLAuStjIAnw5apucRkPlpfzYMVbPPSWIPBv8TPqly7lNb+frR/ltvnKVzyZjGsA9Utf04IjbGs7BCsqtJXJutJSp28kOV2dyZUxRgK4/tKoPD/A1KVRWXFtXJ4r4LVxP804AYwkKGQuvzgyzxWWmQp+wlPA9VfH5tGuju1uOgGMJHD95dF5BC+P1hMgO66Pz2G+YVaujzeeAncCTAFn8pgD5/1FloKfkAQlCjiUxxwbgM52JUBXptgh0jwpwW3+99gS/IQk6Mf0tWRq5/KkZ6qtwTcSAA+QzFXAuTyp2QZ0tT0BjCToDOxRwMk8yfECtzsS/IQkuMP4Q9TO5rkarNqOdjT4CUnwIBBVwOk83zNPSvATkgDfB+IKOJ5HL9l3kpwA2qli1942nkUcZE699KVPAu2lcJMCg5CrnAN6kgQ/IQm6sXyRiIJLLN0GT1nCLAQOKDAouQKuzfSnjvtVAoNuA/YrMDjZjnrBvyww7GagUoFBylYuAr2o45xSYOBNwBYFBivbOAszr7uo45uRmD47WMHydQK72At0o46rKRl1AryWXs0LKdwBfoFwXZ9mnm+HmL67WLmW9C4gDEyHL5LcCp8TYnqtYJsCg+oWTgN9qeNmq8ChG4CXmH5ClXqAVQVX9CqAHtTxckzgXG/giAKDrRq4f39MtexFHQqBo12AKcypU8juAvsyLQdupY6LdDG9elgONCgQCNng4x6XcftUpzuzn80yDp/0Av7NJHQpUwDcr489GUcA11GPvzIyEuHXwGaWnU8E/Mbjgtm4fOBTCAYHE+Fupr8Nf6dA4KyCF3NiaRz7MCbvzpVXcjH9HWEmsI+5q6KI+yVPAkuY3myjI/VYulpGWfkBoIypXVXEb/tqYDhwI/W4ZaWY3regLzAD2M5oXxyxVn8IWAgUAF2oxyfnxPTlZ9ym/iKwFjjDnFuFrGb6Hsg5TG+qmXtzdzeI6YdZ7wNGGcFaZTwtcAftKeAC03fW+A2wCldlJA9O0bA/0jqmd1CfANwPdPcMyL75+v8BTjnTYDkmUekAAAAASUVORK5CYII=",c5="/demo-dapp/assets/56-nhC7rjaG.png",YK={[te.MAINNET]:i5,[te.SEPOLIA]:i5,[te.OPTIMISM]:s5,[te.OPTIMISM_SEPOLIA]:s5,[te.POLYGON]:o5,[te.POLYGON_MUMBAI]:o5,[te.POLYGON_ZKEVM]:JK,[te.ARBITRUM]:a5,[te.ARBITRUM_NOVA]:QK,[te.ARBITRUM_SEPOLIA]:a5,[te.GNOSIS]:KK,[te.BSC]:c5,[te.BSC_TESTNET]:c5,[te.AVALANCHE]:l5,[te.AVALANCHE_TESTNET]:l5},XK="/demo-dapp/assets/logo-BCgqmGQR.svg",f5="/demo-dapp/assets/skyweaver-banner-AE_YELV0.png",ZK="/demo-dapp/assets/skyweaver-banner-large-7dnVV5Hh.png";w7({logLevel:"DEBUG"});const SS=[{name:"production",walletUrl:"https://sequence.app"},{name:"development",walletUrl:"https://dev.sequence.app"},{name:"local",walletUrl:"http://localhost:3333"}],eJ="https://api.sequence.app",u5=GK()||te.MAINNET,ol=new URLSearchParams(window.location.search),kS=ol.get("env")??"production",tJ=SS.find(t=>t.name===kS),al=ol.get("walletAppURL")??tJ.walletUrl;al&&al.length>0?Et.initWallet({defaultNetwork:u5,transports:{walletAppURL:al}}):Et.initWallet({defaultNetwork:u5,transports:{walletAppURL:al}});const rJ=()=>{const[t,e]=E.useState(null),[r,n]=E.useState(null),[i,s]=E.useState(!1),[o,a]=E.useState(!1),l=Et.getWallet().getProvider(),[c,f]=E.useState(l.getChainId()),[u,h]=E.useState(!1),[y,m]=E.useState(!1);E.useMemo(()=>{l.on("chainChanged",O=>{f(V.from(O).toNumber())})},[]),E.useEffect(()=>{a(l.isConnected())},[l]),E.useEffect(()=>{T()},[o]),E.useEffect(()=>{l.client.onOpen(()=>{console.log("wallet window opened")}),l.client.onClose(()=>{console.log("wallet window closed")})},[l]);const p={app:"Demo Dapp",askForEmail:!0},S=async(O={app:"Demo dapp"})=>{if(o){d(),g("Wallet already connected!"),s(!1);return}O={...p,...O,settings:{...p.settings,...O.settings}};try{d(),g("Connecting");const U=Et.getWallet(),W=await U.connect(O);if(O.authorize&&W.connected){let H=ol.get("apiUrl");(!H||H.length===0)&&(H=eJ);const G=new Et.api.SequenceAPIClient(H),{isValid:oe}=await G.isValidETHAuthProof({chainId:W.chainId,walletAddress:W.session.accountAddress,ethAuthProofString:W.proof.proofString});g(`isValid (API)?: ${oe}`)}if(O.authorize){const H=new j0;if(W.proof){const G=await H.decodeProof(W.proof.proofString,!0),oe=await U.utils.isValidTypedDataSignature(U.getAddress(),W.proof.typedData,G.signature,V.from(W.chainId).toNumber());g(`connected using chainId: ${V.from(W.chainId).toString()}`),g(`isValid (client)?: ${oe}`)}}s(!1),W.connected?(g("Wallet connected!"),g(`shared email: ${W.email}`),a(!0)):g("Failed to connect wallet - "+W.error)}catch(U){console.error(U),D()}},w=()=>{Et.getWallet().disconnect(),T(),a(!1)},A=()=>{Et.getWallet().openWallet()},k=()=>{const O=Et.getWallet(),W={type:"openWithOptions",options:{app:"Demo Dapp",settings:{theme:"light",includedPaymentProviders:["moonpay","ramp"],defaultFundingCurrency:"eth",defaultPurchaseAmount:400,lockFundingCurrencyToDefault:!1}}};O.openWallet("wallet/add-funds",W)},I=()=>{Et.getWallet().closeWallet()},R=async()=>{d();const O=Et.getWallet();g(`isConnected?: ${O.isConnected()}`),s(!1)},F=async()=>{d();const O=Et.getWallet();g(`isOpened?: ${O.isOpened()}`),s(!1)},z=async()=>{try{d();const O=l.getChainId();g(`top chainId: ${O}`);const W=l.getProvider().getChainId();g(`provider.getChainId(): ${W}`);const G=await l.getSigner().getChainId();g(`signer.getChainId(): ${G}`),s(!1)}catch(O){console.error(O),D()}},j=async()=>{try{d();const O=Et.getWallet(),U=O.getAddress();g(`getAddress(): ${U}`);const H=O.getProvider().listAccounts();g(`accounts: ${JSON.stringify(H)}`),s(!1)}catch(O){console.error(O),D()}},K=async()=>{try{d();const O=Et.getWallet(),U=O.getProvider(),W=O.getAddress(),H=await U.getBalance(W);g(`balance check 1: ${H.toString()}`);const oe=await O.getSigner().getBalance();g(`balance check 2: ${oe.toString()}`),s(!1)}catch(O){console.error(O),D()}},J=async()=>{try{d();const U=await Et.getWallet().getNetworks();g(`networks: ${JSON.stringify(U,null,2)}`),s(!1)}catch(O){console.error(O),D()}},Z=async()=>{try{d();const O=Et.getWallet();g("signing message...");const U=O.getSigner(),W=`1915 Robert Frost + */(function(t,e){(function(r){var n=Object.hasOwnProperty,i=Array.isArray?Array.isArray:function(_){return Object.prototype.toString.call(_)==="[object Array]"},s=10,o=typeof process=="object"&&typeof process.nextTick=="function",a=typeof Symbol=="function",l=typeof Reflect=="object",c=typeof setImmediate=="function",f=c?setImmediate:setTimeout,u=a?l&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(b){var _=Object.getOwnPropertyNames(b);return _.push.apply(_,Object.getOwnPropertySymbols(b)),_}:Object.keys;function h(){this._events={},this._conf&&y.call(this,this._conf)}function y(b){b&&(this._conf=b,b.delimiter&&(this.delimiter=b.delimiter),b.maxListeners!==r&&(this._maxListeners=b.maxListeners),b.wildcard&&(this.wildcard=b.wildcard),b.newListener&&(this._newListener=b.newListener),b.removeListener&&(this._removeListener=b.removeListener),b.verboseMemoryLeak&&(this.verboseMemoryLeak=b.verboseMemoryLeak),b.ignoreErrors&&(this.ignoreErrors=b.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function m(b,_){var R="(node) warning: possible EventEmitter memory leak detected. "+b+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(R+=" Event name: "+_+"."),typeof process<"u"&&process.emitWarning){var g=new Error(R);g.name="MaxListenersExceededWarning",g.emitter=this,g.count=b,process.emitWarning(g)}else console.error(R),console.trace&&console.trace()}var p=function(b,_,R){var g=arguments.length;switch(g){case 0:return[];case 1:return[b];case 2:return[b,_];case 3:return[b,_,R];default:for(var d=new Array(g);g--;)d[g]=arguments[g];return d}};function k(b,_){for(var R={},g,d=b.length,T=_?_.length:0,O=0;O0;)b=T[$],O.call(x,b,R[b]);this._listeners={},this._listenersCount=0,L()}}});function E(b,_,R,g){var d=Object.assign({},_);if(!b)return d;if(typeof b!="object")throw TypeError("options must be an object");var T=Object.keys(b),O=T.length,x,$,L;function z(F){throw Error('Invalid "'+x+'" option value'+(F?". Reason: "+F:""))}for(var G=0;G0;)if(x===b[$])return T;O(_)}}var M=I(["function"]),B=I(["object","function"]);function U(b,_,R){var g,d,T=0,O,x=new b(function($,L,z){R=E(R,{timeout:0,overload:!1},{timeout:function(W,oe){return W*=1,(typeof W!="number"||W<0||!Number.isFinite(W))&&oe("timeout must be a positive number"),W}}),g=!R.overload&&typeof b.prototype.cancel=="function"&&typeof z=="function";function G(){d&&(d=null),T&&(clearTimeout(T),T=0)}var F=function(W){G(),$(W)},V=function(W){G(),L(W)};g?_(F,V,z):(d=[function(W){V(W||Error("canceled"))}],_(F,V,function(W){if(O)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof W!="function")throw TypeError("onCancel callback must be a function");d.push(W)}),O=!0),R.timeout>0&&(T=setTimeout(function(){var W=Error("timeout");W.code="ETIMEDOUT",T=0,x.cancel(W),L(W)},R.timeout))});return g||(x.cancel=function($){if(d){for(var L=d.length,z=1;z0;)V=Ce[x],V!=="_listeners"&&(Pt=K(b,_,R[V],g+1,d),Pt&&(F?F.push.apply(F,Pt):F=Pt));return F}else if(De==="**"){for(ae=g+1===d||g+2===d&&Ee==="*",ae&&R._listeners&&(F=K(b,_,R,d,d)),Ce=u(R),x=Ce.length;x-- >0;)V=Ce[x],V!=="_listeners"&&(V==="*"||V==="**"?(R[V]._listeners&&!ae&&(Pt=K(b,_,R[V],d,d),Pt&&(F?F.push.apply(F,Pt):F=Pt)),Pt=K(b,_,R[V],g,d)):V===Ee?Pt=K(b,_,R[V],g+2,d):Pt=K(b,_,R[V],g,d),Pt&&(F?F.push.apply(F,Pt):F=Pt));return F}else R[De]&&(F=K(b,_,R[De],g+1,d));if(W=R["*"],W&&K(b,_,W,g+1,d),oe=R["**"],oe)if(g0;)V=Ce[x],V!=="_listeners"&&(V===Ee?K(b,_,oe[V],g+2,d):V===De?K(b,_,oe[V],g+1,d):(re={},re[V]=oe[V],K(b,_,{"**":re},g+1,d)));else oe._listeners?K(b,_,oe,d,d):oe["*"]&&oe["*"]._listeners&&K(b,_,oe["*"],d,d);return F}function J(b,_,R){var g=0,d=0,T,O=this.delimiter,x=O.length,$;if(typeof b=="string")if((T=b.indexOf(O))!==-1){$=new Array(5);do $[g++]=b.slice(d,T),d=T+x;while((T=b.indexOf(O,d))!==-1);$[g++]=b.slice(d)}else $=[b],g=1;else $=b,g=b.length;if(g>1){for(T=0;T+10&&L._listeners.length>this._maxListeners&&(L._listeners.warned=!0,m.call(this,L._listeners.length,z))):L._listeners=_,!0;return!0}function Z(b,_,R,g){for(var d=u(b),T=d.length,O,x,$,L=b._listeners,z;T-- >0;)x=d[T],O=b[x],x==="_listeners"?$=R:$=R?R.concat(x):[x],z=g||typeof x=="symbol",L&&_.push(z?$:$.join(this.delimiter)),typeof O=="object"&&Z.call(this,O,_,$,z);return _}function ie(b){for(var _=u(b),R=_.length,g,d,T;R-- >0;)d=_[R],g=b[d],g&&(T=!0,d!=="_listeners"&&!ie(g)&&delete b[d]);return T}function D(b,_,R){this.emitter=b,this.event=_,this.listener=R}D.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function v(b,_,R){if(R===!0)d=!0;else if(R===!1)g=!0;else{if(!R||typeof R!="object")throw TypeError("options should be an object or true");var g=R.async,d=R.promisify,T=R.nextTick,O=R.objectify}if(g||T||d){var x=_,$=_._origin||_;if(T&&!o)throw Error("process.nextTick is not supported");d===r&&(d=_.constructor.name==="AsyncFunction"),_=function(){var L=arguments,z=this,G=this.event;return d?T?Promise.resolve():new Promise(function(F){f(F)}).then(function(){return z.event=G,x.apply(z,L)}):(T?process.nextTick:f)(function(){z.event=G,x.apply(z,L)})},_._async=!0,_._origin=$}return[_,O?new D(this,b,_):this]}function C(b){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,y.call(this,b)}C.EventEmitter2=C,C.prototype.listenTo=function(b,_,R){if(typeof b!="object")throw TypeError("target musts be an object");var g=this;R=E(R,{on:r,off:r,reducers:r},{on:M,off:M,reducers:B});function d(T){if(typeof T!="object")throw TypeError("events must be an object");var O=R.reducers,x=j.call(g,b),$;x===-1?$=new w(g,b,R):$=g._observers[x];for(var L=u(T),z=L.length,G,F=typeof O=="function",V=0;V0;)d=R[g],(!b||d._target===b)&&(d.unsubscribe(_),T=!0);return T},C.prototype.delimiter=".",C.prototype.setMaxListeners=function(b){b!==r&&(this._maxListeners=b,this._conf||(this._conf={}),this._conf.maxListeners=b)},C.prototype.getMaxListeners=function(){return this._maxListeners},C.prototype.event="",C.prototype.once=function(b,_,R){return this._once(b,_,!1,R)},C.prototype.prependOnceListener=function(b,_,R){return this._once(b,_,!0,R)},C.prototype._once=function(b,_,R,g){return this._many(b,1,_,R,g)},C.prototype.many=function(b,_,R,g){return this._many(b,_,R,!1,g)},C.prototype.prependMany=function(b,_,R,g){return this._many(b,_,R,!0,g)},C.prototype._many=function(b,_,R,g,d){var T=this;if(typeof R!="function")throw new Error("many only accepts instances of Function");function O(){return--_===0&&T.off(b,O),R.apply(this,arguments)}return O._origin=R,this._on(b,O,g,d)},C.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||h.call(this);var b=arguments[0],_,R=this.wildcard,g,d,T,O,x;if(b==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(R&&(_=b,b!=="newListener"&&b!=="removeListener"&&typeof b=="object")){if(d=b.length,a){for(T=0;T3)for(g=new Array($-1),O=1;O<$;O++)g[O-1]=arguments[O];for(T=0,d=L.length;T3)for(d=new Array(L-1),x=1;x0&&this._events[b].length>this._maxListeners&&(this._events[b].warned=!0,m.call(this,this._events[b].length,b))):this._events[b]=_,d)},C.prototype.off=function(b,_){if(typeof _!="function")throw new Error("removeListener only takes instances of Function");var R,g=[];if(this.wildcard){var d=typeof b=="string"?b.split(this.delimiter):b.slice();if(g=K.call(this,null,d,this.listenerTree,0),!g)return this}else{if(!this._events[b])return this;R=this._events[b],g.push({_listeners:R})}for(var T=0;T0){for(g=this._all,_=0,R=g.length;_0;)g=_[R[T]],typeof g=="function"?d.push(g):d.push.apply(d,g);return d}else{if(this.wildcard){if(O=this.listenerTree,!O)return[];var x=[],$=typeof b=="string"?b.split(this.delimiter):b.slice();return K.call(this,x,$,O,0),x}return _?(g=_[b],g?typeof g=="function"?[g]:g:[]):[]}},C.prototype.eventNames=function(b){var _=this._events;return this.wildcard?Z.call(this,this.listenerTree,[],null,b):_?u(_):[]},C.prototype.listenerCount=function(b){return this.listeners(b).length},C.prototype.hasListeners=function(b){if(this.wildcard){var _=[],R=typeof b=="string"?b.split(this.delimiter):b.slice();return K.call(this,_,R,this.listenerTree,0),_.length>0}var g=this._events,d=this._all;return!!(d&&d.length||g&&(b===r?u(g).length:g[b]))},C.prototype.listenersAny=function(){return this._all?this._all:[]},C.prototype.waitFor=function(b,_){var R=this,g=typeof _;return g==="number"?_={timeout:_}:g==="function"&&(_={filter:_}),_=E(_,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:M,Promise:A}),U(_.Promise,function(d,T,O){function x(){var $=_.filter;if(!($&&!$.apply(R,arguments)))if(R.off(b,x),_.handleError){var L=arguments[0];L?T(L):d(p.apply(null,arguments).slice(1))}else d(p.apply(null,arguments))}O(function(){R.off(b,x)}),R._on(b,x,!1)},{timeout:_.timeout,overload:_.overload})};function P(b,_,R){R=E(R,{Promise,timeout:0,overload:!1},{Promise:A});var g=R.Promise;return U(g,function(d,T,O){var x;if(typeof b.addEventListener=="function"){x=function(){d(p.apply(null,arguments))},O(function(){b.removeEventListener(_,x)}),b.addEventListener(_,x,{once:!0});return}var $=function(){L&&b.removeListener("error",L),d(p.apply(null,arguments))},L;_!=="error"&&(L=function(z){b.removeListener(_,$),T(z)},b.once("error",L)),O(function(){L&&b.removeListener("error",L),b.removeListener(_,$)}),b.once(_,$)},{timeout:R.timeout,overload:R.overload})}var N=C.prototype;Object.defineProperties(C,{defaultMaxListeners:{get:function(){return N._maxListeners},set:function(b){if(typeof b!="number"||b<0||Number.isNaN(b))throw TypeError("n must be a non-negative number");N._maxListeners=b},enumerable:!0},once:{value:P,writable:!0,configurable:!0}}),Object.defineProperties(N,{_maxListeners:{value:s,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof r=="function"&&r.amd?r(function(){return C}):t.exports=C})()})(QS);var t1=QS.exports;function en(){return en=Object.assign?Object.assign.bind():function(t){for(var e=1;e++YG;class mu{constructor(){var e=this;this.pendingMessageRequests=[],this.responseCallbacks=new Map,this.state=void 0,this.confirmationOnly=!1,this.events=new t1.EventEmitter2,this.openPayload=void 0,this.connectPayload=void 0,this.accountsChangedPayload=void 0,this.networksPayload=void 0,this.walletContextPayload=void 0,this._sessionId=void 0,this._init=void 0,this._registered=void 0,this.sendAsync=async function(r,n,i){e.state===En.CLOSED&&(e.confirmationOnly=!0),e.openWallet(void 0,{type:"jsonRpcRequest",method:r.method},i);try{e.isOpened()||await e.waitUntilOpened();const s=await e.sendMessageRequest({idx:tk(),type:Te.MESSAGE,data:r,chainId:i});n(void 0,s.data)}catch(s){n(s)}},this.sendMessageRequest=async function(r){return new Promise((n,i)=>{(!r.idx||r.idx<=0)&&r.type!=="init"&&i(new Error("message idx not set"));const s=(a,l)=>{if(a)i(a);else if(l)n(l);else throw new Error("no valid response to return")},o=r.idx;e.responseCallbacks.get(o)?i(new Error("duplicate message idx, should never happen")):e.responseCallbacks.set(o,s),e.isOpened()?e.sendMessage(r):(ve.debug("pushing to pending requests",r),e.pendingMessageRequests.push(r))})},this.waitUntilOpened=async function(r=Bx){let n=!1;return Promise.race([new Promise((i,s)=>{const o=setTimeout(()=>{clearTimeout(o),n||(e.state=En.CLOSED,e.events.emit("close",{code:1005,message:"opening wallet timed out"})),s(new Error("opening wallet timed out"))},r)}),new Promise(i=>{if(e.isOpened()){var s;n=!0,i((s=e.openPayload)==null?void 0:s.session);return}e.events.once("open",o=>{e.openPayload=o,n=!0,i(o.session)})})])},this.waitUntilConnected=async function(){await e.waitUntilOpened();const r=new Promise(i=>{if(e.connectPayload){i(e.connectPayload);return}e.events.once("connect",s=>{e.connectPayload=s,i(s)})}),n=new Promise((i,s)=>{e.events.once("close",o=>{s(o?new Error(`wallet closed due to ${JSON.stringify(o)}`):new Error("user closed the wallet"))})});return Promise.race([r,n])},this.state=En.CLOSED,this._registered=!1,this._init=At.NIL}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}openWallet(e,r,n){throw new Error("abstract method")}closeWallet(){throw new Error("abstract method")}isOpened(){return this.registered&&this.state===En.OPENED}isConnected(){var e;const r=(e=this.openPayload)==null?void 0:e.session;return this.registered&&r!==void 0&&!!r.accountAddress&&r.accountAddress.length===42&&!!r.networks&&r.networks.length>0}handleMessage(e){var r=this;if(e.type===Te.INIT){ve.debug("MessageProvider, received INIT message",e);const{nonce:l}=e.data;if(!l||l.length==0){ve.error("invalid init nonce");return}this._init=At.OK,this.sendMessage({idx:-1,type:Te.INIT,data:{sessionId:this._sessionId,nonce:l}})}if(this._init!==At.OK)return;ve.debug("RECEIVED MESSAGE FROM WALLET",e.idx,e);const n=e.idx,i=this.responseCallbacks.get(n);if(n&&this.responseCallbacks.delete(n),e.type===Te.OPEN&&!this.isOpened()){var s,o;if(this._sessionId&&this._sessionId!==((s=e.data)==null?void 0:s.sessionId)){ve.debug("open event received from wallet, but does not match sessionId",this._sessionId);return}if((o=e.data)!=null&&o.error){var a;const l=new Error(`opening wallet failed: received ${(a=e.data)==null?void 0:a.error}`);throw ve.error(l),this.close(),l}this.state=En.OPENED,this.openPayload=e.data,this.events.emit("open",this.openPayload),this.pendingMessageRequests.length!==0&&this.pendingMessageRequests.splice(0,this.pendingMessageRequests.length).forEach(async function(c){r.sendMessage(c)});return}if(e.type===Te.MESSAGE){if(this.confirmationOnly&&setTimeout(()=>{this.responseCallbacks.size===0&&this.closeWallet()},500),!i)throw new Error("impossible state");if(i){this.events.emit("message",e),i(e.data.error,e);return}}if(e.type===Te.ACCOUNTS_CHANGED){this.accountsChangedPayload={accounts:[]},e.data&&e.data.length>0?(this.accountsChangedPayload={accounts:[we(e.data[0])],origin:e.origin},this.events.emit("accountsChanged",this.accountsChangedPayload.accounts,this.accountsChangedPayload.origin)):this.events.emit("accountsChanged",[],e.origin);return}if(e.type===Te.CHAIN_CHANGED){this.events.emit("chainChanged",e.data,e.origin);return}if(e.type===Te.NETWORKS){this.networksPayload=e.data,this.events.emit("networks",this.networksPayload);return}if(e.type===Te.WALLET_CONTEXT){this.walletContextPayload=e.data,this.events.emit("walletContext",this.walletContextPayload);return}e.type===Te.CLOSE&&this.state!==En.CLOSED&&this.close(e.data),e.type===Te.CONNECT&&(this.connectPayload=e.data,this.events.emit("connect",this.connectPayload)),e.type===Te.DISCONNECT&&this.isConnected()&&(this.events.emit("disconnect",e.data,e.origin),this.close())}sendMessage(e){throw new Error("abstract method")}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}emit(e,...r){return this.events.emit(e,...r)}close(e){this.state!==En.CLOSED&&(this.state=En.CLOSED,this.confirmationOnly=!1,this._sessionId=void 0,ve.info("closing wallet and flushing!"),this.pendingMessageRequests.length=0,this.responseCallbacks.forEach(r=>{r(en({},new Error("wallet closed"),{code:4001}))}),this.responseCallbacks.clear(),this.connectPayload=void 0,this.openPayload=void 0,this.accountsChangedPayload=void 0,this.networksPayload=void 0,this.walletContextPayload=void 0,this.events.emit("close",e))}}function QG(t){return XG.some(e=>e.predicate(t))}const XG=[{name:"Decentraland Exception",predicate:eK},{name:"0x v3 Exception",predicate:tK}],ZG=/^Decentraland Login\nEphemeral address: 0x[a-fA-F0-9]{40}\nExpiration: (\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)((-(\d{2}):(\d{2})|Z)?)$/;function eK(t){try{const e=fs(t);return ZG.test(e)}catch{return!1}}function tK(t){const e=new tr(rK);try{return e.decodeFunctionData("OrderWithHash",t),!0}catch{return!1}}const rK=[{inputs:[{components:[{internalType:"address",name:"makerAddress",type:"address"},{internalType:"address",name:"takerAddress",type:"address"},{internalType:"address",name:"feeRecipientAddress",type:"address"},{internalType:"address",name:"senderAddress",type:"address"},{internalType:"uint256",name:"makerAssetAmount",type:"uint256"},{internalType:"uint256",name:"takerAssetAmount",type:"uint256"},{internalType:"uint256",name:"makerFee",type:"uint256"},{internalType:"uint256",name:"takerFee",type:"uint256"},{internalType:"uint256",name:"expirationTimeSeconds",type:"uint256"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes",name:"makerAssetData",type:"bytes"},{internalType:"bytes",name:"takerAssetData",type:"bytes"},{internalType:"bytes",name:"makerFeeAssetData",type:"bytes"},{internalType:"bytes",name:"takerFeeAssetData",type:"bytes"}],internalType:"struct IEIP1271Data.Order",name:"order",type:"tuple"},{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderWithHash",outputs:[],stateMutability:"pure",type:"function"}],Dd=He(`Ethereum Signed Message: +`),rk=t=>ls(t)||Pe(t)?X(t):He(t),r1=t=>{const e=rk(t);return QG(e)?e:Ue([Dd,He(String(e.length)),e])},nK=t=>{if(JSON.stringify(t.slice(0,Dd.length))!==JSON.stringify(Dd))return t;const e=t.slice(Dd.length),r=String(e.length).length;let n,i;try{i=Number(fs(e.slice(0,r)))}catch{i=Number(Q(e.slice(0,r)))}return i>e.length||!Number.isInteger(i)?n=r-1:n=r,e.slice(n)},Wl=async(t,e,r,n)=>new ce.reader.OnChainReader(n).isValidSignature(t,e,r),nk=async(t,e,r,n)=>{const i=r1(e),s=dx(i);return Wl(t,s,r,n)},ik=(t,e,r,n)=>Wl(t,du(e),r,n),Z0=()=>window.location.protocol==="chrome-extension:"||window.location.protocol==="moz-extension:",sk=()=>!!navigator.userAgent.match(/UnitySequence/i),ok=t=>t.onChain.deployed&&t.fullyMigrated;class ak{constructor(){this.callbacks=[],this.store={}}getItem(e){return this.store[e]||null}setItem(e,r){this.store[e]=r,this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){delete this.store[e]}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}class Yf{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(this.callbacks=[],!Yf.isAvailable())throw new Error("LocalStorage is not available");window.addEventListener("storage",e=>{const{key:r}=e;this.callbacks.filter(i=>i.key===r).forEach(i=>i.cb(this.getItem(r)))})}getItem(e){return window.localStorage.getItem(e)}setItem(e,r){window.localStorage.setItem(e,r),this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){window.localStorage.removeItem(e),this.callbacks.filter(r=>r.key===e).forEach(r=>r.cb(null))}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}function eh(){return Yf.isAvailable()?new Yf:new ak}async function lk(t){return Array.isArray(t)?Promise.all(t.map(e=>Ge(e))):Ge(t)}const e5="@sequence.transportSession";class xu{constructor(e){var r=this;this.walletRequestHandler=void 0,this._sessionId=void 0,this._registered=void 0,this._init=void 0,this._initNonce=void 0,this._initCallback=void 0,this.appOrigin=void 0,this.sendAsync=async function(n,i,s){throw new Error("abstract method")},this.handleMessage=async function(n){const i=n;if(r._init!==At.OK){if(i.type===Te.INIT)if(r.isValidInitAck(n))r._initCallback&&r._initCallback();else{r._initCallback&&r._initCallback("invalid init");return}return}switch(i.type){case Te.OPEN:{if(r._init!==At.OK)return;const s={sessionId:i.data.sessionId,intent:i.data.intent,networkId:i.data.networkId};await r.open(s);return}case Te.CLOSE:return r._init!==At.OK,void 0;case Te.MESSAGE:{const s=await r.walletRequestHandler.sendMessageRequest(i);r.sendMessage(s),s.data.error;return}default:ve.error(`unexpected payload type ${i.type}`)}},this.sendMessageRequest=async function(n){return r.walletRequestHandler.sendMessageRequest(n)},this.open=async function({sessionId:n,intent:i,networkId:s}){n&&(r._sessionId=g9(n),r.saveTransportSession({sessionId:n,intent:i,networkId:s})),r.walletRequestHandler.setOpenIntent(i),await r.init();let o;try{if(s){const a=yx(s);if(a)o=a.chainId;else throw new Error(`unknown network ${s}`)}else o=r.walletRequestHandler.defaultChainId()}catch(a){console.error(a)}if(i&&i.type==="connect"&&i.options){const a=i.options,l=a;if(r.appOrigin&&l!=null&&l.origin){if(!Z0()&&l.origin!==r.appOrigin)throw new Error("origin is invalid")}else!r.appOrigin&&l!=null&&l.origin?a.origin=x9(l.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=m9(a.app)),a.networkId?s=a.networkId:s&&(a.networkId=s),r.walletRequestHandler.setConnectOptions(a)}else r.walletRequestHandler.setConnectOptions(void 0);if(await r.walletRequestHandler.getAccount(),await r.walletRequestHandler.isSignedIn())if(i&&i.type==="connect"){(!o||o<=0)&&console.log("Failed to set default network on open"),r.notifyOpen({sessionId:r._sessionId});try{const a=await r.walletRequestHandler.promptConnect(i.options);a.connected&&r.walletRequestHandler.notifyConnect(a)}catch(a){ve.warn("promptConnect not connected:",a)}finally{(!i.options||i.options.keepWalletOpened!==!0)&&r.notifyClose()}}else{if(!o||o<=0)return r.notifyOpen({sessionId:r._sessionId,error:`failed to open wallet on network ${s}`}),!1;r.notifyOpen({sessionId:r._sessionId,chainId:`${o}`,session:await r.walletRequestHandler.walletSession(o)})}else return r.notifyOpen({sessionId:r._sessionId}),!0;return!0},this.saveTransportSession=n=>{eh().setItem(e5,JSON.stringify(n))},this.getCachedTransportSession=async function(){const n=eh().getItem(e5);try{return n?JSON.parse(n):null}catch{return console.error(`unable to parse transport session: ${n}`),null}},this.walletRequestHandler=e,this._init=At.NIL,this.walletRequestHandler.on("connect",n=>{this.registered&&this.notifyConnect(n)}),this.walletRequestHandler.on("disconnect",(n,i)=>{this.registered&&this.notifyDisconnect(n,i)}),this.walletRequestHandler.on("accountsChanged",(n,i)=>{this.registered&&this.notifyAccountsChanged(n,i)}),this.walletRequestHandler.on("networks",n=>{this.registered&&(this.notifyNetworks(n),!n||n.length===0?this.notifyChainChanged("0x0"):this.notifyChainChanged(ti(n.find(i=>i.isDefaultChain).chainId)))}),this.walletRequestHandler.on("chainChanged",(n,i)=>{this.notifyChainChanged(n,i)}),this.walletRequestHandler.on("walletContext",n=>{!this.registered||!n||this.notifyWalletContext(n)}),this.walletRequestHandler.on("close",n=>{this.registered&&this.notifyClose(n)})}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}sendMessage(e){throw new Error("abstract method")}notifyOpen(e){const{chainId:r,sessionId:n,session:i,error:s}=e;this.sendMessage({idx:-1,type:Te.OPEN,data:{chainId:r,sessionId:n,session:i,error:s}})}notifyClose(e){this.sendMessage({idx:-1,type:Te.CLOSE,data:e?{error:e}:null})}notifyConnect(e){this.sendMessage({idx:-1,type:Te.CONNECT,data:e})}notifyDisconnect(e,r){this.sendMessage({idx:-1,type:Te.DISCONNECT,data:e?{error:e}:null,origin:r})}notifyAccountsChanged(e,r){this.sendMessage({idx:-1,type:Te.ACCOUNTS_CHANGED,data:e,origin:r})}notifyChainChanged(e,r){this.sendMessage({idx:-1,type:Te.CHAIN_CHANGED,data:e,origin:r})}notifyNetworks(e){this.sendMessage({idx:-1,type:Te.NETWORKS,data:e})}notifyWalletContext(e){this.sendMessage({idx:-1,type:Te.WALLET_CONTEXT,data:e})}isValidInitAck(e){if(this._init===At.OK)return ve.warn("isValidInitAck, already in init'd state, so inquiry is invalid."),!1;if(e.type!==Te.INIT)return ve.warn("isValidInitAck, invalid message type, expecting init"),!1;const{sessionId:r,nonce:n}=e.data;return!r||r.length===0||!n||n.length===0?(ve.error("invalid init ack"),!1):r!==this._sessionId||n!==this._initNonce?(ve.error("invalid init ack match"),!1):!0}init(){return new Promise((e,r)=>{if(this._init===At.OK){e();return}if(this._init!==At.NIL||this._initCallback){r("transport init is in progress");return}const n=setTimeout(()=>{ve.warn("transport init timed out"),this._initCallback&&this._initCallback("transport init timed out")},Bx/2);this._initCallback=i=>{this._initCallback=void 0,clearTimeout(n),i?r(i):(this._init=At.OK,e())},this._initNonce=`${performance.now()}`,this.sendMessage({idx:-1,type:Te.INIT,data:{nonce:this._initNonce}}),this._init=At.SENT_NONCE})}}class iK{constructor(){this.app=void 0,this.wallet=void 0;const e=new Vp,r=new Vp;e.conn=r,r.conn=e,this.app=e,this.wallet=r}}class Vp{constructor(){this.conn=void 0,this.events=new t1.EventEmitter2,this.handleMessage=e=>{throw new Error("ProxyMessageChannelPort is not registered")},this.sendMessage=e=>{this.conn.handleMessage(e),e.type==="open"&&this.events.emit("open",e),e.type==="close"&&this.events.emit("close",e),e.type==="connect"&&this.events.emit("connect",e),e.type==="disconnect"&&this.events.emit("disconnect",e)}}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}}class ck extends mu{constructor(e){if(super(),this.port=void 0,this.register=()=>{this.port.handleMessage=r=>{this.handleMessage(r)},this.on("open",(...r)=>{this.port.events.emit("open",...r)}),this.on("close",(...r)=>{this.port.events.emit("close",...r)}),this.on("connect",(...r)=>{this.port.events.emit("connect",...r)}),this.on("disconnect",(...r)=>{this.port.events.emit("disconnect",...r)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),this.events.removeAllListeners(),this.port.handleMessage=void 0},this.openWallet=(r,n,i)=>{if(this.state===En.CLOSED){this.state=En.OPENING;const s=`${performance.now()}`;this._sessionId=s,this.sendMessage({idx:-1,type:Te.OPEN,data:{path:r,intent:n,networkId:i,sessionId:s}})}},this.state=En.CLOSED,this.port=e,!e)throw new Error("port argument cannot be empty");this._init=At.OK}closeWallet(){this.sendMessage({idx:-1,type:Te.CLOSE,data:null}),this.close()}sendMessage(e){if(!e.idx)throw new Error("message idx is empty");this.port.sendMessage(e)}}class sK extends xu{constructor(e,r){super(e),this.port=void 0,this.port=r,this._init=At.OK}register(){this.port.handleMessage=e=>{this.handleMessage(e)},this._registered=!0}async restoreSession(){const e=await this.getCachedTransportSession();e&&this.open(e)}unregister(){this.port.handleMessage=void 0,this._registered=!1}sendMessage(e){this.port.sendMessage(e)}}function fk(t){var e;if((e=window.ue)!=null&&e.sequencewallettransport&&!window.logsOverriddenForUnreal){var r;const n=(r=window.ue)==null?void 0:r.sequencewallettransport;console.log=(...i)=>{n.logfromjs(`${t}: ${Dv(i)}`)},console.warn=(...i)=>{n.warnfromjs(`${t}: ${Dv(i)}`)},console.error=(...i)=>{n.errorfromjs(`${t}: ${Dv(i)}`)},window.logsOverriddenForUnreal=!0}}function Dv(t){return t.map(e=>typeof e=="object"?e instanceof Error?e.message:JSON.stringify(e):String(e)).join(" ")}let Da;class uk extends mu{constructor(e){super(),this.walletURL=void 0,this.register=()=>{var r;fk("dapp"),Da&&(Da.unregister(),Da=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),Da=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r;this._registered=!1,this.closeWallet(),Da===this&&(Da=void 0),((r=window.ue)==null||(r=r.sequencewallettransport)==null?void 0:r.onmessagefromwallet)===this.onUnrealCallback&&delete window.ue.sequencewallettransport.onmessagefromwallet,this.events.removeAllListeners()},this.openWallet=(r,n,i)=>{if(this.isOpened()){console.log("wallet already open!");return}console.log("opening wallet!");const s=new URL(this.walletURL.href),o=new gu;r&&(s.pathname=r.toLowerCase()),this._init=At.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&o.set("intent",fx(n)),i&&o.set("net",`${i}`),s.search=o.toString(),console.log("opening wallet to",s.href),window.open(s.href)},this.onUnrealCallback=r=>{if(!r)throw new Error("ProviderMessage object is empty");this.handleMessage(r)},this.walletURL=new URL(e)}closeWallet(){this.close()}sendMessage(e){var r;const n=typeof e!="string"?JSON.stringify(e):e;console.log("Sending message to wallet:",n),(r=window.ue)==null||(r=r.sequencewallettransport)==null||r.sendmessagetowallet(n)}}class oK extends xu{constructor(e){super(e),this.onMessageFromUnreal=r=>{ve.debug("RECEIVED MESSAGE",r),this.handleMessage(r)},this.getUnrealTransportSession=r=>{const n=new gu(r);return{sessionId:n.get("sid"),networkId:n.get("net"),intent:ux(n.get("intent"))}},this._init=At.NIL}async register(e){var r;if(((r=window.ue)==null?void 0:r.sequencewallettransport)===void 0)return;fk("wallet");const{search:n}=new URL(e||window.location.href);let i=this.getUnrealTransportSession(n);if(!!i.sessionId||(i=await this.getCachedTransportSession()),!i){ve.error("unreal session is undefined");return}window.ue.sequencewallettransport.onmessagefromsequencejs=this.onMessageFromUnreal,this._registered=!0,this.open(i).then(o=>{if(!o){var a;const l=`failed to open to network ${(a=i)==null?void 0:a.networkId}`;ve.error(l),this.notifyClose({message:l}),window.close()}}).catch(o=>{var a;const l=`failed to open to network ${(a=i)==null?void 0:a.networkId}, due to: ${o}`;ve.error(l),this.notifyClose({message:l}),window.close()})}unregister(){var e;((e=window.ue)==null||(e=e.sequencewallettransport)==null?void 0:e.onmessagefromsequencejs)===this.onMessageFromUnreal&&delete window.ue.sequencewallettransport.onmessagefromsequencejs,this._registered=!1}sendMessage(e){var r;if(e.type!==Te.INIT&&this._init!==At.OK){ve.error("impossible state, should not be calling postMessage until inited");return}const n=JSON.stringify(e);(r=window.ue)==null||(r=r.sequencewallettransport)==null||r.sendmessagetosequencejs(n)}}const Fx="sequence-extension-message-handler";class aK extends xu{constructor(e,r){super(e),this.runtime=r,this.port=void 0,this._init=At.OK}register(){this._registered=!0,this.port=this.runtime.connect({name:Fx})}sendMessage(e){ve.info("[ExtensionMessageHandler send]",e),this.port.postMessage(e)}}class dk extends mu{constructor(e){super(),this.register=()=>{this._registered=!0},e.onConnect.addListener(r=>{r.name===Fx&&(this._init=At.OK,r.onMessage.addListener(n=>{this.handleMessage(n)}))})}sendMessage(e){}unregister(){}openWallet(e,r,n){}closeWallet(){}}class lK extends t1.EventEmitter2{constructor(e){var r;super(),r=this,this.stream=e,this.responseCallbacks=new Map,this._messageIdx=0,this.nextMessageIdx=()=>++this._messageIdx,this.handleMessage=n=>{if(!n.type||!n.data)return;ve.info("[received message]",n);const i=n.idx,s=this.responseCallbacks.get(i);switch(i&&this.responseCallbacks.delete(i),n.type){case Te.MESSAGE:if(s)this.emit(Te.MESSAGE,n),s(n.data.error,n);else throw new Error("impossible state");break;case Te.DISCONNECT:case Te.ACCOUNTS_CHANGED:case Te.CHAIN_CHANGED:this.emit(n.type,n.data);break;default:console.error("unknown message type",n);break}},this.sendMessageRequest=async function(n){return new Promise((i,s)=>{(!n.idx||n.idx<=0)&&s(new Error("message idx not set"));const o=(l,c)=>{if(l)s(l);else if(c)i(c);else throw new Error("no valid response to return")},{idx:a}=n;r.responseCallbacks.get(a)?s(new Error("duplicate message idx, should never happen")):r.responseCallbacks.set(a,o),r.sendMessage(n)})},this.stream.on("data",this.handleMessage)}sendMessage(e){this.stream.writable||console.error("window post message stream is not writable"),this.stream.write(e)}}let La;class hk extends mu{constructor(e){super(),this.walletURL=void 0,this.walletWindow=void 0,this.register=()=>{La&&(La.unregister(),La=this),window.addEventListener("message",this.onWindowEvent),La=this,this.on("open",()=>{const r=this.walletWindow,n=setInterval(()=>{r&&r.closed&&(clearInterval(n),this.close())},500)}),this.on("close",()=>{this.walletWindow&&(this.walletWindow.close(),this.walletWindow=null)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),La===this&&(La=void 0),window.removeEventListener("message",this.onWindowEvent),this.events.removeAllListeners()},this.openWallet=(r,n,i)=>{if(this.walletWindow&&this.isOpened()){this.walletWindow.focus();return}const s=new URL(this.walletURL.href),o=new gu;r&&r!==""&&(s.pathname=r.toLowerCase()),this._init=At.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&(n.type==="connect"&&(n.options||(n.options={app:window.location.origin}),!Z0()&&!sk()&&n.options&&(n.options.origin=window.location.origin)),o.set("intent",fx(n))),i&&o.set("net",`${i}`);let a,l;Z0()?(a=[450,750],l=[Math.abs(window.screen.width/2-a[0]/2),Math.abs(window.screen.height/2-a[1]/2)]):(a=[450,750],l=[Math.abs(window.screenX+window.innerWidth/2-a[0]/2),Math.abs(window.screenY+window.innerHeight/2-a[1]/2)]);const c=`toolbar=0,location=0,menubar=0,scrollbars=yes,status=yes,width=${a[0]},height=${a[1]},left=${l[0]},top=${l[1]}`;s.search=o.toString(),this.walletWindow=window.open(s.href,"sequence.app",c)},this.onWindowEvent=r=>{if(r.origin!==this.walletURL.origin)return;let n;try{n=JSON.parse(r.data)}catch{return}if(!n)throw new Error("ProviderMessage object is empty");this.handleMessage(n)},this.walletURL=new URL(e)}closeWallet(){var e;this.close(),(e=this.walletWindow)==null||e.close()}sendMessage(e){if(!this.walletWindow){ve.warn("WindowMessageProvider: sendMessage failed as walletWindow is unavailable");return}const r=typeof e!="string"?JSON.stringify(e):e;this.walletWindow.postMessage(r,this.walletURL.origin)}}class cK extends xu{constructor(e){var r;super(e),r=this,this.parentWindow=void 0,this._isPopup=!1,this.onWindowEvent=async function(n){if(!n.origin||n.origin===""||r.appOrigin&&n.origin!==r.appOrigin)return;let i;try{i=JSON.parse(n.data)}catch{return}if(ve.debug("RECEIVED MESSAGE",i),r._init!==At.OK&&r.isValidInitAck(i)&&(r.appOrigin=n.origin),r._init===At.OK&&(!r.appOrigin||r.appOrigin.length<8)){ve.error("impossible state, init.OK and appOrigin required");return}r.handleMessage(i)},this.getWindowTransportSession=n=>{const i=new gu(n);return{sessionId:i.get("sid"),networkId:i.get("net"),intent:ux(i.get("intent"))}},this._init=At.NIL}async register(e){const r=parent.window.opener!==null;if(this._isPopup=r,r!==!0)return;const{pathname:n,search:i}=new URL(e||window.location.href);let s=this.getWindowTransportSession(i);if(!!s.sessionId||(s=await this.getCachedTransportSession()),!s){ve.error("window session is undefined");return}this.parentWindow=parent.window.opener,window.addEventListener("message",this.onWindowEvent,!1),this._registered=!0,this.open(s).then(a=>{if(!a){var l;const c=`failed to open to network ${(l=s)==null?void 0:l.networkId}`;ve.error(c),this.notifyClose({message:c}),window.close()}}).catch(a=>{var l;const c=`failed to open to network ${(l=s)==null?void 0:l.networkId}, due to: ${a}`;ve.error(c),this.notifyClose({message:c}),window.close()})}unregister(){window.removeEventListener("message",this.onWindowEvent),this._registered=!1}sendMessage(e){const r=JSON.stringify(e);e.type===Te.INIT?this.postMessage(r,!0):this.postMessage(r)}get isPopup(){return this._isPopup}postMessage(e,r=!1){if(r!==!0&&this._init!==At.OK){ve.error("impossible state, should not be calling postMessage until inited");return}r?this.parentWindow.postMessage(e,"*"):this.appOrigin&&this.appOrigin.length>4?this.parentWindow.postMessage(e,this.appOrigin):ve.error("unable to postMessage as parentOrigin is invalid")}}function vk(t){return t&&typeof t=="object"&&(t.windowTransport&&typeof t.windowTransport=="object"||t.proxyTransport&&typeof t.proxyTransport=="object"||t.extensionTransport&&typeof t.extensionTransport=="object"||t.unrealTransport&&typeof t.unrealTransport=="object")&&(t.windowTransport&&t.windowTransport.enabled||t.proxyTransport&&t.proxyTransport.enabled||t.extensionTransport&&t.extensionTransport.enabled||t.unrealTransport&&t.unrealTransport.enabled)}class n1{constructor(...e){var r=this;this.messageProviders=void 0,this.provider=void 0,this.register=()=>{if(this.messageProviders.length===1){this.provider=this.messageProviders[0],this.provider.register();return}this.messageProviders.forEach(n=>{n.register(),n.once("open",()=>{this.provider||(this.provider=n,this.messageProviders.forEach(i=>{this.provider!==i&&i.unregister()}))})})},this.unregister=()=>{this.messageProviders.forEach(n=>n.unregister()),this.provider=void 0},this.openWallet=(n,i,s)=>{if(this.provider){this.provider.openWallet(n,i,s);return}this.messageProviders.forEach(o=>o.openWallet(n,i,s))},this.sendAsync=async function(n,i,s){if(r.provider){r.provider.sendAsync(n,i,s);return}throw new Error("impossible state, wallet must be opened first")},this.sendMessageRequest=async function(n){if(r.provider)return r.provider.sendMessageRequest(n);throw new Error("impossible state, wallet must be opened first")},this.waitUntilOpened=async function(){return r.provider?r.provider.waitUntilOpened():Promise.race(r.messageProviders.map(n=>n.waitUntilOpened()))},this.waitUntilConnected=async function(){if(r.provider)return r.provider.waitUntilConnected();throw new Error("impossible state, wallet must be opened first")},this.messageProviders=e,this.provider=void 0}static new(e){var r,n,i,s;const o=new n1;if((r=e.windowTransport)!=null&&r.enabled&&typeof window=="object"&&e.walletAppURL){const a=new hk(e.walletAppURL);o.add(a)}if((n=e.proxyTransport)!=null&&n.enabled){const a=new ck(e.proxyTransport.appPort);o.add(a)}if((i=e.extensionTransport)!=null&&i.enabled){const a=new dk(e.extensionTransport.runtime);o.add(a)}if((s=e.unrealTransport)!=null&&s.enabled&&e.windowTransport&&e.walletAppURL){const a=new uk(e.walletAppURL);o.add(a)}return o.register(),o}add(...e){this.messageProviders.push(...e)}closeWallet(){this.provider&&this.provider.closeWallet()}isOpened(){return this.provider?this.provider.isOpened():!1}isConnected(){return this.provider?this.provider.isConnected():!1}on(e,r){if(this.provider){this.provider.on(e,r);return}this.messageProviders.forEach(n=>{n.on(e,r)})}once(e,r){if(this.provider){this.provider.once(e,r);return}this.messageProviders.forEach(n=>{n.once(e,r)})}emit(e,...r){if(this.provider)return this.provider.emit(e,...r);for(let n=0;ndK(t,i))}function dK(t,e){if(e.to.toLowerCase()===t.toLowerCase()&&e.data){const r=X(e.data);if(r.length>=4&&!hK(r))throw new Error("self calls are forbidden")}if(e.delegateCall)throw new Error("delegate calls are forbidden")}function hK(t){const e=new tr(pr.mainModule.abi);try{return e.decodeFunctionData("createContract",t),!0}catch{return!1}}const vK=1e4;class yK{constructor(e,r,n){var i=this;this.account=void 0,this.signerReadyCallbacks=[],this.prompter=void 0,this.networks=void 0,this._openIntent=void 0,this._connectOptions=void 0,this.events=new t1.EventEmitter2,this.onConnectOptionsChange=void 0,this.promptConnect=async function(s){if(!s&&!i._connectOptions)throw new Error("prompter connect options are empty");if(!i.prompter)return i.connect(s);const o=await i.prompter.promptConnect(s||i._connectOptions).catch(l=>({connected:!1})),a=o;return a.connected&&!a.session&&(a.session=await i.walletSession(s==null?void 0:s.networkId)),o},this.sendAsync=async function(s,o,a){const l={jsonrpc:"2.0",id:s.id,result:null};await i.getAccount();try{var c;if((!i.account||i.account===null)&&!pK.includes(s.method))throw ek;const u=i.account;if(!u)throw new Error("WalletRequestHandler: wallet account is not configured");const h=(c=i.account)==null?void 0:c.providerFor(a??i.defaultChainId());if(!h)throw new Error(`WalletRequestHandler: wallet provider is not configured for chainId ${a}`);const y=h instanceof Ta?h:void 0;switch(s.method){case"net_version":{if(!y)throw new Error("Account provider doesn't support send method");const m=await y.send("net_version",[]);l.result=m;break}case"eth_chainId":{if(!y)throw new Error("Account provider doesn't support send method");const m=await y.send("eth_chainId",[]);l.result=m;break}case"eth_accounts":{const m=u.address;l.result=[m];break}case"eth_getBalance":{const[m,p]=s.params,k=await h.getBalance(m,p);l.result=k.toHexString();break}case"sequence_sign":case"personal_sign":case"eth_sign":{let m;switch(s.method){case"sequence_sign":case"personal_sign":{const[E,A]=s.params;m=E;break}case"eth_sign":{const[E,A]=s.params;m=A;break}}let p="";const k=r1(m),w=s.method==="sequence_sign";if(i.prompter===null?p=await u.signMessage(k,a??i.defaultChainId(),w?"eip6492":"ignore"):p=await i.prompter.promptSignMessage({chainId:a,message:k,eip6492:w},i.connectOptions),p&&p.length>0)l.result=p;else throw new Error("declined by user");break}case"sequence_signTypedData_v4":case"eth_signTypedData":case"eth_signTypedData_v4":{const[m,p]=s.params;let k;if(typeof p=="string")try{k=JSON.parse(p)}catch(A){console.warn("walletRequestHandler: error parsing typedData",A)}else k=p;if(!k||!k.domain||!k.types||!k.message)throw new Error("invalid typedData object");let w="";const E=s.method==="sequence_signTypedData_v4";if(i.prompter===null?w=await u.signTypedData(k.domain,k.types,k.message,a??i.defaultChainId(),E?"eip6492":"ignore"):w=await i.prompter.promptSignMessage({chainId:a,typedData:k,eip6492:E},i.connectOptions),w&&w.length>0)l.result=w;else throw new Error("declined by user");break}case"eth_sendTransaction":{const m=uK(s.params[0]).map(k=>("gas"in k&&k.gasLimit===void 0&&(k.gasLimit=k.gas,delete k.gas),k));t5(u.address,m);let p="";if(i.prompter===null){var f;const k=await u.sendTransaction(m,a??i.defaultChainId());p=(f=k==null?void 0:k.hash)!=null?f:""}else p=await i.prompter.promptSendTransaction(m,a,i.connectOptions);if(p)l.result=p;else throw new Error("declined by user");break}case"eth_signTransaction":{const[m]=s.params;if(we(m.from)!==u.address)throw new Error("sender address does not match wallet");t5(u.address,m),i.prompter===null?l.result=await u.signTransactions(m,a??i.defaultChainId()):l.result=await i.prompter.promptSignTransaction(m,a,i.connectOptions);break}case"eth_sendRawTransaction":{if(ce.transaction.isSignedTransactionBundle(s.params[0])){const m=H.from(s.params[0].chainId).toNumber(),p=await u.relayer(m).relay(s.params[0]);l.result=p.hash}else{const m=await h.sendTransaction(s.params[0]);l.result=m.hash}break}case"eth_getTransactionCount":{const m=we(s.params[0]),p=s.params[1],k=await h.getTransactionCount(m,p);l.result=H.from(k).toHexString();break}case"eth_blockNumber":{l.result=await h.getBlockNumber();break}case"eth_getBlockByNumber":{l.result=await h.getBlock(s.params[0]);break}case"eth_getBlockByHash":{l.result=await h.getBlock(s.params[0]);break}case"eth_getTransactionByHash":{l.result=await h.getTransaction(s.params[0]);break}case"eth_call":{const[m,p]=s.params;l.result=await h.call(m,p);break}case"eth_getCode":{const[m,p]=s.params;l.result=await h.getCode(m,p);break}case"eth_estimateGas":{const[m]=s.params;l.result=await h.estimateGas(m);break}case"eth_gasPrice":{const m=await h.getGasPrice();l.result=m.toHexString();break}case"wallet_switchEthereumChain":{const[m]=s.params;if(!m.chainId||m.chainId.length===0)throw new Error("invalid chainId");const p=H.from(m.chainId);i.setDefaultChainId(p.toNumber()),l.result=null;break}case"sequence_getWalletContext":{l.result=u.contexts;break}case"sequence_getWalletConfig":{const[m]=s.params;m?l.result=[(await u.status(m)).onChain.config]:l.result=await Promise.all(u.networks.map(async function(p){return(await u.status(p.chainId)).onChain.config}));break}case"sequence_getWalletState":{const[m]=s.params;m?l.result=[r5(m,await u.status(m))]:l.result=await Promise.all(u.networks.map(async function(p){const k=await u.status(p.chainId);return r5(p.chainId,k)}));break}case"sequence_getNetworks":{l.result=await i.getNetworks(!0);break}case"sequence_isSequence":{l.result=!0;break}case"sequence_updateConfig":throw new Error("sequence_updateConfig method is not allowed from a dapp");case"sequence_publishConfig":throw new Error("sequence_publishConfig method is not allowed from a dapp");case"sequence_gasRefundOptions":break;case"sequence_getNonce":break;case"sequence_relay":break;case"sequence_setDefaultNetwork":{const[m]=s.params;if(!m)throw new Error("invalid request, method argument defaultChainId cannot be empty");i.setDefaultChainId(m),l.result=await i.getNetworks(!0);break}default:{if(!y)throw new Error("Account provider doesn't support send method");const m=await y.send(s.method,s.params);l.result=m}}}catch(u){ve.error(u),l.result=null,l.error=en({},new Error(u),{code:4001})}o(void 0,l)},this.isSignedIn=async function(){return await i.signerReady(),!!i.account},this.getAccount=async function(){if(await i.signerReady(),i.account===void 0)throw new Error("signerReady failed resolve");return i.account},this.account=e,this.prompter=r,this.networks=n}defaultChainId(){var e,r;return(e=(r=this.prompter)==null?void 0:r.getDefaultChainId())!=null?e:this.networks[0].chainId}async signIn(e,r={}){this.setAccount(e);const{connect:n,defaultNetworkId:i}=r;if(n){const a=this._connectOptions;let l;if(this.prompter!==null){var s;l=await((s=this.prompter)==null?void 0:s.promptSignInConnect(a))}else l=await this.connect(a);this.notifyConnect(l),(!a||a.keepWalletOpened!==!0)&&this.notifyClose()}if(i&&this.defaultChainId()!==i){var o;await((o=this.prompter)==null?void 0:o.promptChangeNetwork(i))}}signOut(){this.account&&this.notifyDisconnect(),this.setAccount(null)}signerReset(){this.account=void 0}signerReady(e=vK){return new Promise((r,n)=>{this.account!==void 0?r():(setTimeout(()=>{this.account===void 0&&(this.signerReadyCallbacks=[],n("signerReady timed out"))},e),this.signerReadyCallbacks.push(r))})}async connect(e){var r,n;if(!this.account)return{connected:!1,chainId:"0x0",error:"unable to connect without signed in account"};const i=(r=(n=e==null?void 0:e.networkId)!=null?n:this.defaultChainId())!=null?r:ee.MAINNET,s=yx(i).chainId,o={connected:!0,chainId:ti(s)};if(e&&e.authorize){const a={app:e.app,origin:e.origin,expiry:e.expiry,nonce:e.authorizeNonce};try{o.proof=await US(this.account,s,a)}catch(l){return ve.warn(`connect, signAuthorization failed for options: ${JSON.stringify(e)}, due to: ${l.message}`),{connected:!1,chainId:"0x0",error:`signAuthorization failed: ${l.message}`}}}return o.session=this.walletSession(s),o}sendMessageRequest(e){return new Promise(r=>{this.sendAsync(e.data,(n,i)=>{const s=en({},e,{data:i});r(s)},e.chainId)})}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}async getAddress(){var e,r;return(e=(r=this.account)==null?void 0:r.address)!=null?e:""}get openIntent(){return this._openIntent}setOpenIntent(e){this._openIntent=e}get connectOptions(){return this._connectOptions}setConnectOptions(e){var r;this._connectOptions=e,(r=this.onConnectOptionsChange)==null||r.call(this,e)}async setDefaultChainId(e){var r;return await((r=this.prompter)==null?void 0:r.promptChangeNetwork(e)),this.defaultChainId()}async getNetworks(e){return this.account?e?this.account.networks.map(r=>{const n=en({},r);return n.provider=void 0,n.relayer=void 0,n}):this.account.networks:(ve.warn("signer not set: getNetworks is returning an empty list"),[])}walletSession(e){if(!this.account)return;const r={walletContext:this.account.contexts,accountAddress:this.account.address,networks:this.account.networks.map(i=>en({},i,{provider:void 0,relayer:void 0}))};if(e){const i=ri(r.networks,e);if(i){var n;(n=r.networks)==null||n.forEach(s=>delete s.isDefaultChain),i.isDefaultChain=!0}}return r}notifyConnect(e,r){var n;if(console.log("emit connect",e),this.events.emit("connect",e),(n=e.session)!=null&&n.accountAddress){var i;this.events.emit("accountsChanged",[(i=e.session)==null?void 0:i.accountAddress],r)}}notifyDisconnect(e){this.events.emit("accountsChanged",[],e),this.events.emit("disconnect",void 0,e)}notifyChainChanged(e,r){this.events.emit("chainChanged",ti(e),r)}async notifyNetworks(e){const r=e||await this.getNetworks(!0);if(this.events.emit("networks",r),r.length>0){const n=r.find(i=>i.chainId===this.defaultChainId());n&&this.events.emit("chainChanged",ti(n.chainId))}else this.events.emit("chainChanged","0x0")}async notifyWalletContext(){if(!this.account){ve.warn("signer not set: skipping to notify wallet context");return}const e=this.account.contexts;this.events.emit("walletContext",e)}notifyClose(e){this.events.emit("close",e)}setAccount(e){if(this.account=e,e!==void 0){for(let r=0;rl.canOnchainValidate||l.original.version===2&&n,o=await r.status(i);if(s(o))return!0;if(await e.promptConfirmWalletDeploy(i,this.connectOptions)){const l=await r.status(i);return s(l)?!0:(ve.error("WalletRequestHandler: result for promptConfirmWalletDeploy is not correct"),!1)}return!1}}function r5(t,e){return{context:e.original.context,config:e.onChain.config,address:ce.context.addressOf(e.original.context,e.original.imageHash),chainId:t,deployed:e.onChain.deployed,imageHash:e.imageHash,lastImageHash:e.onChain.imageHash,published:!0,status:e}}const pK=["net_version","eth_chainId","eth_getBalance","eth_getTransactionCount","eth_blockNumber","eth_getBlockByNumber","eth_getBlockByHash","eth_getTransactionByHash","eth_getCode","eth_estimateGas","eth_gasPrice","sequence_getWalletContext","sequence_getNetworks","sequence_setDefaultNetwork"];class cc{get utils(){return this.provider.utils}constructor(e,r){this.client=e,this.provider=r,this.singleNetworkSigners={},this._isSigner=!0,this._isSequenceSigner=!0}async getAddress(){return this.client.getAddress()}connect(e){if(!fc.is(e))throw new Error("SequenceSigner can only be connected to a SequenceProvider");return new cc(this.client,e)}getSigner(e){if(!e)return this;const r=this.provider.toChainId(e);return this.singleNetworkSigners[r]||(this.singleNetworkSigners[r]=new jx(this.client,this.provider,r)),this.singleNetworkSigners[r]}useChainId(e){return this.provider.toChainId(e)||this.client.getChainId()}async signMessage(e,r){const{eip6492:n=!0}=r||{},i=this.useChainId(r==null?void 0:r.chainId);return this.client.signMessage(e,{eip6492:n,chainId:i})}async signTypedData(e,r,n,i){const{eip6492:s=!0}=i||{},o=this.useChainId(i==null?void 0:i.chainId);return this.client.signTypedData({domain:e,types:r,message:n},{eip6492:s,chainId:o})}getProvider(e){return this.provider.getProvider(e)}async sendTransaction(e,r){const n=this.useChainId(r==null?void 0:r.chainId),i=await lk(e),s=await this.client.sendTransaction(i,{chainId:n}),o=this.getProvider(n);try{return await qo(async function(){const a=await o.getTransaction(s);return a?o._wrapTransaction(a,s):void 0},{onceBlock:o})}catch(a){throw a.transactionHash=s,a}}async getWalletConfig(e){const r=this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}getNetworks(){return this.client.getNetworks()}async getBalance(e,r){return this.getProvider(r==null?void 0:r.chainId).getBalance(this.getAddress(),e)}async estimateGas(e,r){return this.getProvider(r==null?void 0:r.chainId).estimateGas(e)}async call(e,r,n){return this.getProvider(n==null?void 0:n.chainId).call(e,r)}getChainId(){return Promise.resolve(this.client.getChainId())}async getGasPrice(e){return this.getProvider(e==null?void 0:e.chainId).getGasPrice()}async getFeeData(e){return this.getProvider(e==null?void 0:e.chainId).getFeeData()}async resolveName(e){const r=await this.provider.resolveName(e);if(r===null)throw new Error(`ENS name not found: ${e}`);return r}_checkProvider(e){}populateTransaction(e){throw new Error("SequenceSigner does not support populateTransaction")}checkTransaction(e){throw new Error("SequenceSigner does not support checkTransaction")}getTransactionCount(e){throw new Error("SequenceSigner does not support getTransactionCount")}signTransaction(e){throw new Error("SequenceWallet does not support signTransaction, use sendTransaction instead.")}static is(e){return e&&typeof e=="object"&&e._isSequenceSigner===!0}}class jx extends cc{constructor(e,r,n){super(e,r.getProvider(n)),this.chainId=n,this._isSingleNetworkSequenceSigner=!0}_useChainId(e){const r=this.provider.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This signer only supports the network ${this.chainId}, but ${r} was requested.`);return r||this.provider.toChainId(this.chainId)}useChainId(e){return this._useChainId(e)}getChainId(){return Promise.resolve(this.provider.toChainId(this.chainId))}getProvider(e){return super.getProvider(this._useChainId(e))}getSigner(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceSigner===!0}}class gK{constructor(e){if(this.signer=e,jx.is(e))throw new Error("WalletUtils does not support SingleNetworkSequenceSigner")}signMessage(e,r,n){return this.signer.signMessage(e,{chainId:r,eip6492:n})}signTypedData(e,r,n,i,s){return this.signer.signTypedData(e,r,n,{chainId:i,eip6492:s})}async isValidSignature(e,r,n,i){return Wl(e,r,n,this.signer.getProvider(i))}async isValidMessageSignature(e,r,n,i){const s=this.signer.getProvider(i),o=r1(r),a=dx(o);return Wl(e,a,n,s)}isValidTypedDataSignature(e,r,n,i){return this.isValidSignature(e,du(r),n,i)}}class fc extends ox{constructor(e,r,n=Ul){super(e.getChainId()),this.client=e,this.providerFor=r,this.networks=n,this.singleNetworkProviders={},this._isSequenceProvider=!0,this.utils=void 0,this.signer=void 0,e.onConnect(i=>{this.emit("connect",i)}),e.onDisconnect(i=>{this.emit("disconnect",i)}),e.onDefaultChainIdChanged(i=>{this.emit("chainChanged",i)}),e.onAccountsChanged(i=>{this.emit("accountsChanged",i)}),this.signer=new cc(this.client,this),this.utils=new gK(this.signer)}getSigner(e){return this.signer.getSigner(e)}connect(e){return this.client.connect(e)}disconnect(){return this.client.disconnect()}isConnected(){return this.client.isConnected()}getSession(){return this.client.getSession()}listAccounts(){return[this.client.getAddress()]}getAddress(){return this.client.getAddress()}getNetworks(){return this.client.getNetworks()}getChainId(){return this.client.getChainId()}setDefaultChainId(e){return this.client.setDefaultChainId(this.toChainId(e))}isOpened(){return this.client.isOpened()}closeWallet(){return this.client.closeWallet()}getWalletContext(){return this.client.getWalletContext()}async getWalletConfig(e){const r=await this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}authorize(e){return this.client.connect(en({},e,{authorize:!0}))}async openWallet(e,r){return await this.client.openWallet(e,r),!0}toChainId(e){if(e===void 0)return;const r=ri(this.networks,e);if(!r)throw new Error(`Unsupported network ${e}`);return r.chainId}async useChainId(e){return this.toChainId(e)||this.client.getChainId()}getProvider(e){if(!e)return this;const r=this.toChainId(e);return this.singleNetworkProviders[r]||(this.singleNetworkProviders[r]=new pk(this.client,this.providerFor,r)),this.singleNetworkProviders[r]}async _getSubprovider(e){const r=await this.useChainId(e),n=this.providerFor(r);if(!n)throw new Error(`Unsupported network ${r}`);return n}async perform(e,r){var n;if(e==="eth_chainId")return ti(await this.useChainId());if(e==="eth_accounts")return[this.client.getAddress()];if(e==="wallet_switchEthereumChain"){const o=r[0],a=yk(o);return this.setDefaultChainId(a)}if(e==="eth_sendTransaction"||e==="eth_sign"||e==="eth_signTypedData"||e==="eth_signTypedData_v4"||e==="personal_sign"||e==="sequence_sign"||e==="sequence_signTypedData_v4")return this.client.send({method:e,params:r},this.getChainId());const i=await this._getSubprovider(),s=(n=i.prepareRequest(e,r))!=null?n:[e,r];return i.send(s[0],s[1])}send(e,r){return this.perform(e,r)}request(e){return this.perform(e.method,e.params)}async detectNetwork(){const e=this.client.getChainId(),r=ri(this.networks,e);if(!r)throw new Error(`Unknown network ${e}`);return r}async waitForTransaction(e,r,n,i){return(await this._getSubprovider(i==null?void 0:i.chainId)).waitForTransaction(e,r,n)}async getBlockNumber(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getBlockNumber()}async getGasPrice(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getGasPrice()}async getBalance(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getBalance(e,r)}async getTransactionCount(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getTransactionCount(e,r)}async getCode(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getCode(e,r)}async getStorageAt(e,r,n,i){return(await this._getSubprovider(i==null?void 0:i.chainId)).getStorageAt(e,r,n)}async call(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).call(e,r)}async estimateGas(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).estimateGas(e)}async getBlock(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getBlock(e)}async getTransaction(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getTransaction(e)}async getLogs(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getLogs(e)}async supportsENS(){return(await this.getNetworks()).some(r=>r.chainId===1)}async getResolver(e){return await this.supportsENS()?(await this._getSubprovider(1)).getResolver(e):null}async resolveName(e){return _E(await e)?e:await this.supportsENS()?(await this._getSubprovider(1)).resolveName(e):null}async lookupAddress(e){return await this.supportsENS()?(await this._getSubprovider(1)).lookupAddress(e):null}async getAvatar(e){return await this.supportsENS()?(await this._getSubprovider(1)).getAvatar(e):null}}fc.is=t=>t&&typeof t=="object"&&t._isSequenceProvider===!0;function yk(t){return typeof t=="object"?yk(t.chainId):H.from(t).toNumber()}class pk extends fc{constructor(e,r,n){super(e,r),this.chainId=n,this._isSingleNetworkSequenceProvider=!0}_useChainId(e){const r=this.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This provider only supports the network ${this.chainId}, but ${r} was requested.`);return r||super.toChainId(this.chainId)}useChainId(e){return Promise.resolve(this._useChainId(e))}getChainId(){return super.toChainId(this.chainId)}async getNetwork(){const e=await this.client.getNetworks(),r=ri(e,this.chainId);if(!r)throw new Error(`Unsupported network ${this.chainId}`);return r}getProvider(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}getSigner(e){return super.getSigner(this._useChainId(e))}setDefaultChainId(e){throw new Error(`This provider only supports the network ${this.chainId}; use the parent provider to switch networks.`)}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceProvider===!0}}var mK={name:"@0xsequence/provider",version:"1.7.1",description:"provider sub-package for Sequence",repository:"https://github.com/0xsequence/sequence.js/tree/master/packages/provider",source:"src/index.ts",main:"dist/0xsequence-provider.cjs.js",module:"dist/0xsequence-provider.esm.js",author:"Horizon Blockchain Games",license:"Apache-2.0",scripts:{test:"pnpm test:concurrently 'pnpm test:run'","test:run":"pnpm test:file tests/**/*.spec.ts","test:file":"NODE_OPTIONS='--import tsx' mocha --timeout 30000",typecheck:"tsc --noEmit","test:concurrently":"concurrently -k --success first 'pnpm start:hardhat1' 'pnpm start:hardhat2'","start:hardhat1":"pnpm start:hardhat1:verbose > /dev/null 2>&1","start:hardhat2":"pnpm start:hardhat2:verbose > /dev/null 2>&1","start:hardhat1:verbose":"hardhat node --config hardhat1.config.js --hostname 0.0.0.0 --port 9595","start:hardhat2:verbose":"hardhat node --config hardhat2.config.js --hostname 0.0.0.0 --port 8595"},dependencies:{"@0xsequence/abi":"workspace:*","@0xsequence/account":"workspace:*","@0xsequence/auth":"workspace:*","@0xsequence/core":"workspace:*","@0xsequence/migration":"workspace:*","@0xsequence/network":"workspace:*","@0xsequence/relayer":"workspace:*","@0xsequence/utils":"workspace:*","@0xsequence/wallet":"workspace:*",eventemitter2:"^6.4.5","webextension-polyfill":"^0.10.0"},peerDependencies:{ethers:">=5.5 < 6"},devDependencies:{"@types/webextension-polyfill":"^0.10.0",hardhat:"^2.12.2",ethers:"^5.7.2"},files:["src","dist"]};class ra{constructor(e){this.store=e}connectedSession(){const e=this.getSession();if(e&&e.accountAddress&&e.walletContext&&e.networks)return{accountAddress:e.accountAddress,walletContext:e.walletContext,networks:e.networks};throw new Error("Sequence session not connected")}hasSession(){var e;return((e=this.getSession())==null?void 0:e.accountAddress)!==void 0}setSession(e){return this.store.setItem(ra.SESSION_LOCALSTORE_KEY,JSON.stringify(e))}getSession(){const e=this.store.getItem(ra.SESSION_LOCALSTORE_KEY);if(e)return JSON.parse(e)}async clearSession(){return this.store.removeItem(ra.SESSION_LOCALSTORE_KEY)}}ra.SESSION_LOCALSTORE_KEY="@sequence.session";class na{constructor(e,r=1){this.store=e,this.startingChainId=r,this.callbacks=[],e.onItemChange(na.SESSION_CHAIN_ID_KEY,n=>{if(n){const i=parseInt(n);this.callbacks.forEach(s=>s(i))}})}onDefaultChainIdChanged(e){return this.callbacks.push(e),()=>{this.callbacks=this.callbacks.filter(r=>r!==e)}}setDefaultChainId(e){e!==this.getDefaultChainId()&&this.store.setItem(na.SESSION_CHAIN_ID_KEY,e.toString())}getDefaultChainId(){const e=this.store.getItem(na.SESSION_CHAIN_ID_KEY);return!e||e.length===0?this.startingChainId:parseInt(e)}}na.SESSION_CHAIN_ID_KEY="@sequence.session.defaultChainId";class zx{constructor(e,r,n,i){var s;if(this.projectAccessKey=i,this.session=void 0,this.defaultChainId=void 0,this.callbacks={},this.transport=void 0,this.defaultEIP6492=void 0,vk(e))this.transport=n1.new(e);else if(XS(e))this.transport=e;else throw new Error("Invalid transport");const o=typeof n=="number"?n:n==null?void 0:n.defaultChainId;this.defaultEIP6492=typeof n=="number"?!1:(s=n==null?void 0:n.defaultEIP6492)!=null?s:!1,this.session=new ra(r),this.defaultChainId=new na(r,o),this.transport.on("accountsChanged",a=>{var l;a.length>1&&console.warn("SequenceClient: wallet-webapp returned more than one account"),(l=this.callbacks.accountsChanged)==null||l.forEach(c=>c(a))}),this.transport.on("connect",a=>{var l;const c=ti(this.getChainId());(l=this.callbacks.connect)==null||l.forEach(f=>f(en({},a,{chainId:c})))}),this.transport.on("disconnect",(a,l)=>{var c;(c=this.callbacks.disconnect)==null||c.forEach(f=>f(a,l))}),this.transport.on("networks",a=>{var l;(l=this.callbacks.networks)==null||l.forEach(c=>c(a))}),this.transport.on("walletContext",a=>{var l;(l=this.callbacks.walletContext)==null||l.forEach(c=>c(a))}),this.transport.on("open",a=>{var l;(l=this.callbacks.open)==null||l.forEach(c=>c(a))}),this.transport.on("close",()=>{var a;(a=this.callbacks.close)==null||a.forEach(l=>l())}),this.transport.on("chainChanged",(a,l)=>{var c;(c=this.callbacks.chainChanged)==null||c.forEach(f=>f(a,l))}),this.defaultChainId.onDefaultChainIdChanged(a=>{var l;const c=ti(a);(l=this.callbacks.chainChanged)==null||l.forEach(f=>f(c))})}registerCallback(e,r){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(r),()=>{this.callbacks[e]=this.callbacks[e].filter(n=>n!==r)}}onOpen(e){return this.registerCallback("open",e)}onClose(e){return this.registerCallback("close",e)}onConnect(e){return this.registerCallback("connect",e)}onDisconnect(e){return this.registerCallback("disconnect",e)}onNetworks(e){return this.registerCallback("networks",e)}onAccountsChanged(e){return this.registerCallback("accountsChanged",e)}onWalletContext(e){return this.registerCallback("walletContext",e)}onChainChanged(e){return this.registerCallback("chainChanged",e)}onDefaultChainIdChanged(e){return this.registerCallback("chainChanged",e)}getChainId(){return this.defaultChainId.getDefaultChainId()}setDefaultChainId(e){return this.defaultChainId.setDefaultChainId(e)}async openWallet(e,r){return this.transport.openWallet(e,r,this.getChainId()),await this.transport.waitUntilOpened(),this.isOpened()}closeWallet(){return this.transport.closeWallet()}isOpened(){return this.transport.isOpened()}isConnected(){return this.session.hasSession()}getSession(){return this.session.getSession()}getAddress(){return this.session.connectedSession().accountAddress}async connect(e){if((e==null?void 0:e.authorizeVersion)===void 0&&(e.authorizeVersion=2),(e==null?void 0:e.refresh)===!0&&this.disconnect(),e.projectAccessKey=this.projectAccessKey,e&&e.authorize){if(!e.app)throw new Error("connecting with 'authorize' option also requires 'app' to be set");e.authorizeVersion===void 0&&(e.authorizeVersion=2)}await this.openWallet(void 0,{type:"connect",options:en({},e,{networkId:this.getChainId(),clientVersion:mK.version})});const r=await this.transport.waitUntilConnected().catch(n=>n instanceof Error?{connected:!1,error:n.message}:{connected:!1,error:JSON.stringify(n)});if(r.chainId&&(r.chainId=H.from(r.chainId).toString()),r.connected){if(!r.session)throw new Error("impossible state, connect response is missing session");this.session.setSession(r.session)}return r}disconnect(){return this.isOpened()&&this.closeWallet(),this.session.clearSession()}send(e,r){return e.method=this.mapSignMethod(e.method),new Promise((n,i)=>{this.transport.sendAsync(e,(s,o)=>{s?i(s):o===void 0?i(new Error(`Got undefined response for request: ${e}`)):typeof o=="object"&&o.error?i(o.error):typeof o=="object"&&o.result?n(o.result):i(new Error(`Got invalid response for request: ${e}`))},r||this.getChainId())})}async getNetworks(e){const r=this.session.connectedSession();return e&&(r.networks=await this.send({method:"sequence_getNetworks"}),this.session.setSession(r)),r.networks}signMethod(e){return(e==null?void 0:e.eip6492)===void 0?"personal_sign":e.eip6492?"sequence_sign":"legacy_sign"}signTypedDataMethod(e){return(e==null?void 0:e.eip6492)===void 0?"eth_signTypedData_v4":e.eip6492?"sequence_signTypedData_v4":"legacy_signTypedData_v4"}mapSignMethod(e){return e==="personal_sign"?this.defaultEIP6492?"sequence_sign":"personal_sign":e==="eth_signTypedData_v4"?this.defaultEIP6492?"sequence_signTypedData_v4":"eth_signTypedData_v4":e==="legacy_sign"?"personal_sign":e==="legacy_signTypedData_v4"?"eth_signTypedData_v4":e}async signMessage(e,r){const n=this.signMethod(r);return this.send({method:n,params:[e,this.getAddress()]},r==null?void 0:r.chainId)}async signTypedData(e,r){const n=this.signTypedDataMethod(r),i=Qt.getPayload(e.domain,e.types,e.message);return this.send({method:n,params:[this.getAddress(),i]},(r==null?void 0:r.chainId)||e.domain.chainId&&H.from(e.domain.chainId).toNumber()||this.getChainId())}async sendTransaction(e,r){const n=Array.isArray(e)?e:[e],i=fK(n);return this.send({method:"eth_sendTransaction",params:[i]},r==null?void 0:r.chainId)}async getWalletContext(){return this.send({method:"sequence_getWalletContext"})}async getOnchainWalletConfig(e){const r=await this.send({method:"sequence_getWalletConfig",params:[(e==null?void 0:e.chainId)||this.getChainId()]},e==null?void 0:e.chainId);return Array.isArray(r)?r[0]:r}}const Hp={transports:{walletAppURL:"https://sequence.app",windowTransport:{enabled:!0},proxyTransport:{enabled:!1}},defaultNetwork:1};let mi;const gk=(t,e)=>{var r,n,i;if(!t||typeof t!="string")throw new Error("Please pass a projectAccessKey in initWallet.");if(mi)return mi;const s=en({},Hp,e,{transports:en({},Hp.transports,e==null?void 0:e.transports)}),o={},a=(r=(n=s.networks)==null?void 0:n.filter(y=>{y.rpcUrl!==void 0&&y.chainId!==void 0&&Ul.find(m=>m.chainId===y.chainId)}))!=null?r:[],l=Ul.map(y=>{var m;const p=(m=s.networks)==null?void 0:m.find(k=>k.chainId===y.chainId);return p?en({},y,p):y}).concat(a).map(y=>(y.rpcUrl=y.rpcUrl+`/${t}`,y)),c=y=>{if(!o[y]){var m;const p=(m=l.find(E=>E.chainId===y))==null?void 0:m.rpcUrl;if(!p)throw new Error(`no rpcUrl found for chainId: ${y}`);const k=new Ta(p),w=new px([$9,O9,new gx],new U0(k));o[y]=new BV(w,y)}return o[y]},f=s.defaultNetwork?(i=ri(l,s.defaultNetwork))==null?void 0:i.chainId:void 0;if(!f&&s.defaultNetwork)throw new Error(`defaultNetwork not found for chainId: ${s.defaultNetwork}`);const u=s.localStorage||eh(),h=new zx(s.transports,u,{defaultChainId:f,defaultEIP6492:s.defaultEIP6492},t);return mi=new fc(h,c),mi},mk=()=>{mi&&(mi.client.closeWallet(),mi.client.transport.unregister(),mi=void 0)},xk=()=>{if(!mi)throw new Error("Wallet has not been initialized, call sequence.initWallet(config) first.");return mi},xK=Object.freeze(Object.defineProperty({__proto__:null,BaseInjectedTransport:lK,BaseProviderTransport:mu,BaseWalletTransport:xu,CHANNEL_ID:Fx,DefaultChainIdTracker:na,DefaultProviderConfig:Hp,ErrSignedInRequired:ek,EventType:Te,ExtensionMessageHandler:aK,ExtensionMessageProvider:dk,InitState:At,LocalStorage:Yf,MemoryItemStore:ak,MuxMessageProvider:n1,OpenState:En,PROVIDER_OPEN_TIMEOUT:Bx,ProviderError:ZS,ProxyMessageChannel:iK,ProxyMessageChannelPort:Vp,ProxyMessageHandler:sK,ProxyMessageProvider:ck,SequenceClient:zx,SequenceClientSession:ra,SequenceProvider:fc,SequenceSigner:cc,SingleNetworkSequenceProvider:pk,SingleNetworkSequenceSigner:jx,UnrealMessageHandler:oK,UnrealMessageProvider:uk,WalletRequestHandler:yK,WindowMessageHandler:cK,WindowMessageProvider:hk,WindowSessionParams:gu,getWallet:xk,initWallet:gk,isBrowserExtension:Z0,isMuxTransportTemplate:vk,isProviderTransport:XS,isUnityPlugin:sk,isValidMessageSignature:nk,isValidSignature:Wl,isValidTypedDataSignature:ik,isWalletUpToDate:ok,messageToBytes:rk,nextMessageIdx:tk,prefixEIP191Message:r1,resolveArrayProperties:lk,trimEIP191Prefix:nK,unregisterWallet:mk,useBestStore:eh},Symbol.toStringTag,{value:"Module"}));function Dr(t,e){return e.forEach(function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach(function(n){if(n!=="default"&&!(n in t)){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(t)}var bK=Dr({__proto__:null},[dH]),wK=Dr({__proto__:null},[xH]),CK=Dr({__proto__:null},[OG]),EK=Dr({__proto__:null},[jG]),SK=Dr({__proto__:null},[Vq]),kK=Dr({__proto__:null},[Qq]),AK=Dr({__proto__:null},[JG]),_K=Dr({__proto__:null},[vW]),TK=Dr({__proto__:null},[xK]),PK=Dr({__proto__:null},[Sq]);const IK=ce.transaction;var RK=Object.freeze({__proto__:null,transactions:IK}),MK=Dr({__proto__:null,isValidSignature:Wl,isValidMessageSignature:nk,isValidTypedDataSignature:ik,isWalletUpToDate:ok},[ZH]),NK=Dr({__proto__:null},[nq]),OK=Dr({__proto__:null},[kq]),$K=Dr({__proto__:null},[RG]),DK=Dr({__proto__:null},[cq]),LK=Dr({__proto__:null},[Mq]),Ke=Object.freeze({__proto__:null,abi:bK,api:wK,auth:CK,guard:EK,indexer:SK,metadata:kK,multicall:AK,network:_K,provider:TK,relayer:PK,transactions:RK,utils:MK,core:NK,signhub:OK,sessions:$K,migration:DK,account:LK,initWallet:gk,getWallet:xk,unregisterWallet:mk,SequenceProvider:fc,SequenceClient:zx,SequenceSigner:cc});const n5=[{constant:!1,inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}];var BK="_1e9z9271";const FK=({message:t,loading:e})=>{const r=()=>t?` +...`:"...";return se.jsx(xN,{label:"Console",defaultOpen:!0,children:se.jsxs(ue,{as:"pre",style:{fontFamily:"monospace",whiteSpace:"break-spaces",overflowWrap:"anywhere"},children:[t,e&&r(),se.jsx(ue,{className:BK,display:"inline-block",fontSize:"large",lineHeight:"4",style:{top:"-4px",position:"relative"},children:"_"})]})})};var jK="_1q07ov40";const Oo=t=>{const{label:e,children:r,style:n,className:i}=t;return se.jsxs(ue,{marginTop:"10",marginBottom:"8",marginX:"0",width:"full",className:i,style:n,children:[e&&se.jsx(ue,{marginBottom:"2",children:se.jsx(zK,{children:e})}),se.jsx(ue,{className:jK,children:sr.Children.map(r,(s,o)=>se.jsx(ue,{children:s},o))})]})},zK=t=>se.jsx(Ut,{variant:"normal",fontWeight:"medium",color:"text50",children:t.children}),UK=()=>{const t=window.localStorage.getItem("defaultChainId");return t==null?null:Number(t)},VK="/demo-dapp/assets/logo-BCgqmGQR.svg",i5="/demo-dapp/assets/skyweaver-banner-AE_YELV0.png",HK="/demo-dapp/assets/skyweaver-banner-large-7dnVV5Hh.png",s5="W4EjSIb6MencXr2yDevQE8xGAAAAAAAAA";p9({logLevel:"DEBUG"});const bk=[{name:"production",walletUrl:"https://sequence.app"},{name:"development",walletUrl:"https://dev.sequence.app"},{name:"local",walletUrl:"http://localhost:3333"}],WK="https://api.sequence.app",o5=UK()||ee.MAINNET,ol=new URLSearchParams(window.location.search),wk=ol.get("env")??"production",qK=bk.find(t=>t.name===wk),al=ol.get("walletAppURL")??qK.walletUrl;al&&al.length>0?Ke.initWallet(s5,{defaultNetwork:o5,transports:{walletAppURL:al}}):Ke.initWallet(s5,{defaultNetwork:o5,transports:{walletAppURL:al}});const GK=()=>{const[t,e]=S.useState(null),[r,n]=S.useState(null),[i,s]=S.useState(!1),[o,a]=S.useState(!1),l=Ke.getWallet().getProvider(),[c,f]=S.useState(l.getChainId()),[u,h]=S.useState(!1),[y,m]=S.useState(!1);S.useMemo(()=>{l.on("chainChanged",F=>{f(H.from(F).toNumber())})},[]),S.useEffect(()=>{a(l.isConnected())},[l]),S.useEffect(()=>{T()},[o]),S.useEffect(()=>{l.client.onOpen(()=>{console.log("wallet window opened")}),l.client.onClose(()=>{console.log("wallet window closed")})},[l]);const p={app:"Demo Dapp",askForEmail:!0},k=async(F={app:"Demo dapp"})=>{if(o){d(),g("Wallet already connected!"),s(!1);return}F={...p,...F,settings:{...p.settings,...F.settings}};try{d(),g("Connecting");const V=Ke.getWallet(),W=await V.connect(F);if(F.authorize&&W.connected){let oe=ol.get("apiUrl");(!oe||oe.length===0)&&(oe=WK);const re=new Ke.api.SequenceAPIClient(oe),{isValid:ae}=await re.isValidETHAuthProof({chainId:W.chainId,walletAddress:W.session.accountAddress,ethAuthProofString:W.proof.proofString});g(`isValid (API)?: ${ae}`)}if(F.authorize){const oe=new j0;if(W.proof){const re=await oe.decodeProof(W.proof.proofString,!0),ae=await V.utils.isValidTypedDataSignature(V.getAddress(),W.proof.typedData,re.signature,H.from(W.chainId).toNumber());g(`connected using chainId: ${H.from(W.chainId).toString()}`),g(`isValid (client)?: ${ae}`)}}s(!1),W.connected?(g("Wallet connected!"),g(`shared email: ${W.email}`),a(!0)):g("Failed to connect wallet - "+W.error)}catch(V){console.error(V),O()}},w=()=>{Ke.getWallet().disconnect(),T(),a(!1)},E=()=>{Ke.getWallet().openWallet()},A=()=>{const F=Ke.getWallet(),W={type:"openWithOptions",options:{app:"Demo Dapp",settings:{theme:"light",includedPaymentProviders:["moonpay","ramp"],defaultFundingCurrency:"eth",defaultPurchaseAmount:400,lockFundingCurrencyToDefault:!1}}};F.openWallet("wallet/add-funds",W)},I=()=>{Ke.getWallet().closeWallet()},M=async()=>{d();const F=Ke.getWallet();g(`isConnected?: ${F.isConnected()}`),s(!1)},B=async()=>{d();const F=Ke.getWallet();g(`isOpened?: ${F.isOpened()}`),s(!1)},U=async()=>{try{d();const F=l.getChainId();g(`top chainId: ${F}`);const W=l.getProvider().getChainId();g(`provider.getChainId(): ${W}`);const re=await l.getSigner().getChainId();g(`signer.getChainId(): ${re}`),s(!1)}catch(F){console.error(F),O()}},j=async()=>{try{d();const F=Ke.getWallet(),V=F.getAddress();g(`getAddress(): ${V}`);const oe=F.getProvider().listAccounts();g(`accounts: ${JSON.stringify(oe)}`),s(!1)}catch(F){console.error(F),O()}},K=async()=>{try{d();const F=Ke.getWallet(),V=F.getProvider(),W=F.getAddress(),oe=await V.getBalance(W);g(`balance check 1: ${oe.toString()}`);const ae=await F.getSigner().getBalance();g(`balance check 2: ${ae.toString()}`),s(!1)}catch(F){console.error(F),O()}},J=async()=>{try{d();const V=await Ke.getWallet().getNetworks();g(`networks: ${JSON.stringify(V,null,2)}`),s(!1)}catch(F){console.error(F),O()}},Z=async()=>{try{d();const F=Ke.getWallet();g("signing message...");const V=F.getSigner(),W=`1915 Robert Frost The Road Not Taken Two roads diverged in a yellow wood, @@ -165,6 +165,6 @@ Two roads diverged in a wood, and I— I took the one less traveled by, And that has made all the difference. -☁ ☀ ☂`,H=await U.signMessage(W);g(`signature: ${H}`);const G=await O.utils.isValidMessageSignature(O.getAddress(),W,H,await U.getChainId());if(g(`isValid?: ${G}`),!G)throw new Error("sig invalid");s(!1)}catch(O){console.error(O),D()}},ie=async()=>{try{d();const O=Et.getWallet();g("signing typedData...");const U={types:{Person:[{name:"name",type:"string"},{name:"wallet",type:"address"}],Mail:[{name:"from",type:"Person"},{name:"to",type:"Person"},{name:"cc",type:"Person[]"},{name:"contents",type:"string"},{name:"attachements",type:"string[]"}]},primaryType:"Mail",domain:{name:"Ether Mail",version:"1",chainId:1,verifyingContract:"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"},message:{from:{name:"Cow",wallet:"0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826"},to:{name:"Bob",wallet:"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"},cc:[{name:"Dev Team",wallet:"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"},{name:"Accounting",wallet:"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"}],contents:"Hello, Bob!",attachements:["cat.png","dog.png"]}},W=O.getSigner(),H=await W.signTypedData(U.domain,U.types,U.message);g(`signature: ${H}`);const G=await O.utils.isValidTypedDataSignature(O.getAddress(),U,H,await W.getChainId());g(`isValid?: ${G}`),s(!1)}catch(O){console.error(O),D()}},L=async()=>{try{d();const O=Et.getWallet(),U="0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",W=new tr(["function withdraw(uint256 amount)"]),H={to:U,data:W.encodeFunctionData("withdraw",["1000000000000000000"])},oe=await O.getProvider().estimateGas(H);g(`estimated gas needed for wmatic withdrawal : ${oe.toString()}`),s(!1)}catch(O){console.error(O),D()}},v=async O=>{try{d();const U=Et.getWallet();O=O||U.getSigner(),g(`Transfer txn on ${O.getChainId()} chainId`);const W=await O.getAddress(),H={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:W,value:bp("1.234"),data:"0x"},G={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:W,value:bp("0.4242"),data:"0x"},oe=O.provider,re=await oe.getBalance(W);g(`balance of ${W}, before: ${re}`);const fe=await O.sendTransaction([H,G]);g(`txnResponse: ${JSON.stringify(fe)}`);const Tt=await oe.getBalance(W);g(`balance of ${W}, after: ${Tt}`),s(!1)}catch(U){console.error(U),D()}},C=async O=>{try{d();const U=Et.getWallet();O=O||U.getSigner();const W=await O.getAddress(),H=$0("1",1),oe={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x07865c6e87b9f70255377e024ace6630c1eaa37f",value:0,data:new tr(n5).encodeFunctionData("transfer",[W,H.toHexString()])},re=await O.sendTransaction([oe],{chainId:te.SEPOLIA});g(`txnResponse: ${JSON.stringify(re)}`),s(!1)}catch(U){console.error(U),D()}},P=async O=>{try{d();const U=Et.getWallet();O=O||U.getSigner();const W=await O.getAddress(),H=$0("0.05",18),oe={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",value:0,data:new tr(n5).encodeFunctionData("transfer",[W,H.toHexString()])},re=await O.sendTransaction([oe]);g(`txnResponse: ${JSON.stringify(re)}`),s(!1)}catch(U){console.error(U),D()}},N=async()=>{try{const O=Et.getWallet(),U=O.getChainId()===te.ARBITRUM?te.OPTIMISM:te.ARBITRUM;v(O.getSigner(U))}catch(O){console.error(O),D()}},b=async()=>{try{d(),g("TODO"),s(!1)}catch(O){console.error(O),D()}},_=async O=>{try{d();const U=Et.getWallet();O=O||U.getSigner();const W=["function balanceOf(address owner) view returns (uint256)","function decimals() view returns (uint8)","function symbol() view returns (string)","function transfer(address to, uint amount) returns (bool)","event Transfer(address indexed from, address indexed to, uint amount)"],H="0x2791bca1f2de4661ed88a30c99a7a9449aa84174",G=new _a(H,W,O),oe=await G.symbol();g(`Token symbol: ${oe}`);const re=await G.balanceOf(await O.getAddress());g(`Token Balance: ${re.toString()}`),s(!1)}catch(U){console.error(U),D()}},M=async()=>{try{d();const O=Et.getWallet(),W=await O.getSigner().getAddress(),G=(await O.getNetworks()).find(Tt=>Tt.chainId===te.POLYGON);if(!G)throw new Error("Could not find Polygon network in networks list");const oe=new Et.indexer.SequenceIndexer(G.indexerUrl),re=await oe.getTokenBalances({accountAddress:W,includeMetadata:!0});g(`tokens in your account: ${JSON.stringify(re)}`);const fe=await oe.getTokenBalances({accountAddress:W,includeMetadata:!0,contractAddress:"0x631998e91476DA5B870D741192fc5Cbc55F5a52E"});g(`skyweaver collectibles in your account: ${JSON.stringify(fe)}`),s(!1)}catch(O){console.error(O),D()}},g=(O,U=!1)=>(console.log(O),e(U?O:W=>`${W} +☁ ☀ ☂`,oe=await V.signMessage(W);g(`signature: ${oe}`);const re=await F.utils.isValidMessageSignature(F.getAddress(),W,oe,await V.getChainId());if(g(`isValid?: ${re}`),!re)throw new Error("sig invalid");s(!1)}catch(F){console.error(F),O()}},ie=async()=>{try{d();const F=Ke.getWallet();g("signing typedData...");const V={types:{Person:[{name:"name",type:"string"},{name:"wallet",type:"address"}],Mail:[{name:"from",type:"Person"},{name:"to",type:"Person"},{name:"cc",type:"Person[]"},{name:"contents",type:"string"},{name:"attachements",type:"string[]"}]},primaryType:"Mail",domain:{name:"Ether Mail",version:"1",chainId:1,verifyingContract:"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"},message:{from:{name:"Cow",wallet:"0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826"},to:{name:"Bob",wallet:"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"},cc:[{name:"Dev Team",wallet:"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"},{name:"Accounting",wallet:"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"}],contents:"Hello, Bob!",attachements:["cat.png","dog.png"]}},W=F.getSigner(),oe=await W.signTypedData(V.domain,V.types,V.message);g(`signature: ${oe}`);const re=await F.utils.isValidTypedDataSignature(F.getAddress(),V,oe,await W.getChainId());g(`isValid?: ${re}`),s(!1)}catch(F){console.error(F),O()}},D=async()=>{try{d();const F=Ke.getWallet(),V="0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",W=new tr(["function withdraw(uint256 amount)"]),oe={to:V,data:W.encodeFunctionData("withdraw",["1000000000000000000"])},ae=await F.getProvider().estimateGas(oe);g(`estimated gas needed for wmatic withdrawal : ${ae.toString()}`),s(!1)}catch(F){console.error(F),O()}},v=async F=>{try{d();const V=Ke.getWallet();F=F||V.getSigner(),g(`Transfer txn on ${F.getChainId()} chainId`);const W=await F.getAddress(),oe={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:W,value:bp("1.234"),data:"0x"},re={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:W,value:bp("0.4242"),data:"0x"},ae=F.provider,De=await ae.getBalance(W);g(`balance of ${W}, before: ${De}`);const Ee=await F.sendTransaction([oe,re]);g(`txnResponse: ${JSON.stringify(Ee)}`);const Ce=await ae.getBalance(W);g(`balance of ${W}, after: ${Ce}`),s(!1)}catch(V){console.error(V),O()}},C=async F=>{try{d();const V=Ke.getWallet();F=F||V.getSigner();const W=await F.getAddress(),oe=B0("1",1),ae={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x07865c6e87b9f70255377e024ace6630c1eaa37f",value:0,data:new tr(n5).encodeFunctionData("transfer",[W,oe.toHexString()])},De=await F.sendTransaction([ae],{chainId:ee.SEPOLIA});g(`txnResponse: ${JSON.stringify(De)}`),s(!1)}catch(V){console.error(V),O()}},P=async F=>{try{d();const V=Ke.getWallet();F=F||V.getSigner();const W=await F.getAddress(),oe=B0("0.05",18),ae={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",value:0,data:new tr(n5).encodeFunctionData("transfer",[W,oe.toHexString()])},De=await F.sendTransaction([ae]);g(`txnResponse: ${JSON.stringify(De)}`),s(!1)}catch(V){console.error(V),O()}},N=async()=>{try{const F=Ke.getWallet(),V=F.getChainId()===ee.ARBITRUM?ee.OPTIMISM:ee.ARBITRUM;v(F.getSigner(V))}catch(F){console.error(F),O()}},b=async()=>{try{d(),g("TODO"),s(!1)}catch(F){console.error(F),O()}},_=async F=>{try{d();const V=Ke.getWallet();F=F||V.getSigner();const W=["function balanceOf(address owner) view returns (uint256)","function decimals() view returns (uint8)","function symbol() view returns (string)","function transfer(address to, uint amount) returns (bool)","event Transfer(address indexed from, address indexed to, uint amount)"],oe="0x2791bca1f2de4661ed88a30c99a7a9449aa84174",re=new _a(oe,W,F),ae=await re.symbol();g(`Token symbol: ${ae}`);const De=await re.balanceOf(await F.getAddress());g(`Token Balance: ${De.toString()}`),s(!1)}catch(V){console.error(V),O()}},R=async()=>{try{d();const F=Ke.getWallet(),W=await F.getSigner().getAddress(),re=(await F.getNetworks()).find(Ce=>Ce.chainId===ee.POLYGON);if(!re)throw new Error("Could not find Polygon network in networks list");const ae=new Ke.indexer.SequenceIndexer(re.indexerUrl),De=await ae.getTokenBalances({accountAddress:W,includeMetadata:!0});g(`tokens in your account: ${JSON.stringify(De)}`);const Ee=await ae.getTokenBalances({accountAddress:W,includeMetadata:!0,contractAddress:"0x631998e91476DA5B870D741192fc5Cbc55F5a52E"});g(`skyweaver collectibles in your account: ${JSON.stringify(Ee)}`),s(!1)}catch(F){console.error(F),O()}},g=(F,V=!1)=>(console.log(F),e(V?F:W=>`${W} -${O}`)),d=()=>{s(!0)},T=()=>{s(!1),e(o?"Status: Wallet is connected :)":"Status: Wallet not connected. Please connect wallet first.")},D=()=>{s(!1),e("An error occurred")},x=[te.RINKEBY,te.HARDHAT,te.HARDHAT_2,te.KOVAN,te.ROPSTEN,te.HOMEVERSE_TESTNET,te.BASE_GOERLI],B=Object.values(Et.network.networks).filter(O=>x.indexOf(O.chainId)<0).sort((O,U)=>O.title>U.title?1:-1);E.useEffect(()=>{r&&!u&&(console.log(r),S({app:"Demo Dapp",authorize:!0,settings:{signInWithEmail:r,theme:"dark",bannerUrl:`${window.location.origin}${f5}`}}),n(null))},[r,u]);const $=O=>(O=O.trim(),!!/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/.test(O));return se.jsxs(ue,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[se.jsx(ue,{marginBottom:"10",children:se.jsx("a",{href:"https://sequence.xyz/",target:"_blank",rel:"noopener",children:se.jsx(FC,{height:"6",alt:"logo",src:XK})})}),se.jsx(ue,{children:se.jsx(Ut,{variant:"normal",color:"text100",fontWeight:"bold",children:"Demo Dapp"})}),se.jsx(ue,{marginTop:"1",marginBottom:"4",children:se.jsx(Ut,{variant:"normal",color:"text80",children:"A dapp example on how to use the Sequence Wallet. This covers how to connect, sign messages and send transctions."})}),se.jsxs(IR,{background:"backgroundMuted",alignItems:"center",gap:"3",children:[se.jsx(iN,{}),se.jsx(Ut,{variant:"normal",color:"text80",children:"Please open your browser dev inspector to view output of functions below."})]}),se.jsx(nw,{background:"buttonGlass"}),se.jsx(ue,{marginBottom:"4",children:se.jsx(Rw,{name:"environment",label:"Environment",labelLocation:"top",onValueChange:O=>{ol.set("env",O),ol.delete("walletAppURL"),window.location.search=ol.toString()},value:kS,options:[...Object.values(SS).map(O=>({label:se.jsx(ue,{alignItems:"center",gap:"2",children:se.jsx(Ut,{capitalize:!0,children:O.name})}),value:String(O.name)}))]})}),se.jsxs(ue,{marginBottom:"4",children:[se.jsx(Ut,{as:"div",variant:"small",color:"text100",children:"Wallet URL"}),se.jsx("a",{href:al,target:"_blank",rel:"noopener",children:se.jsxs(ue,{gap:"1",marginTop:"1",alignItems:"center",children:[se.jsx(Ut,{as:"div",variant:"normal",color:"text80",children:al}),se.jsx(eN,{})]})})]}),se.jsx(nw,{background:"buttonGlass"}),se.jsx(ue,{marginBottom:"4",children:se.jsx(Rw,{name:"chainId",label:"Network",labelLocation:"top",onValueChange:O=>l.setDefaultChainId(Number(O)),value:String(c),options:[...Object.values(B).map(O=>({label:se.jsxs(ue,{alignItems:"center",gap:"2",children:[se.jsx(O$,{src:YK[O.chainId],size:"sm"}),se.jsx(Ut,{children:O.title})]}),value:String(O.chainId)}))]})}),se.jsxs(Oo,{label:"Connection",children:[se.jsx(We,{width:"full",shape:"square",onClick:()=>S(),label:"Connect"}),se.jsx(We,{width:"full",shape:"square",onClick:()=>S({app:"Demo Dapp",authorize:!0}),label:"Connect & Auth"}),se.jsx(We,{width:"full",shape:"square",onClick:()=>S({app:"Demo Dapp",authorize:!0,settings:{theme:"dark",bannerUrl:`${window.location.origin}${ZK}`,bannerSize:"medium",includedPaymentProviders:["moonpay"],defaultFundingCurrency:"matic",defaultPurchaseAmount:111}}),label:"Connect with Settings"}),se.jsx(We,{width:"full",shape:"square",onClick:()=>{h(!0)},label:"Connect with Email"}),se.jsx(We,{width:"full",shape:"square",onClick:()=>{S({app:"Demo Dapp",authorize:!0,settings:{signInWith:"google",theme:"dark",bannerUrl:`${window.location.origin}${f5}`}})},label:"Connect with Google"}),se.jsx(We,{width:"full",shape:"square",onClick:()=>w(),label:"Disconnect"})]}),se.jsxs(Oo,{label:"Basics",children:[se.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>A(),label:"Open Wallet"}),se.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>k(),label:"Open Wallet with Settings"}),se.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>I(),label:"Close Wallet"}),se.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>R(),label:"Is Connected?"}),se.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>F(),label:"Is Opened?"})]}),se.jsxs(Oo,{label:"State",children:[se.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>z(),label:"ChainID"}),se.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>J(),label:"Networks"}),se.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>j(),label:"Get Accounts"}),se.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>K(),label:"Get Balance"})]}),se.jsxs(Oo,{label:"Signing",children:[se.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>Z(),label:"Sign Message"}),se.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>ie(),label:"Sign TypedData"})]}),se.jsx(Oo,{label:"Simulation",children:se.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>L(),label:"Estimate Unwrap Gas"})}),se.jsxs(Oo,{label:"Transactions",children:[se.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>v(),label:"Send funds"}),se.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>N(),label:"Send on L2"}),se.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>P(),label:"Send DAI"}),se.jsx(We,{width:"full",shape:"square",disabled:!o||!0,onClick:()=>b(),label:"Send ERC-1155 Tokens"}),se.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>C(),label:"Send USDC on Sepolia"})]}),se.jsxs(Oo,{label:"Various",children:[se.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>_(),label:"Read Symbol and Balance"}),se.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>M(),label:"Fetch Token Balances"})]}),se.jsx(F8,{children:u&&se.jsx(UB,{onClose:()=>h(!1),size:"sm",children:se.jsx(ue,{flexDirection:"column",justifyContent:"space-between",height:"full",padding:"16",children:se.jsxs(ue,{flexDirection:"column",children:[se.jsx(ue,{marginTop:"6",children:se.jsx(Ut,{marginTop:"5",variant:"normal",color:"text80",children:"Auto-email login, please specify the email address"})}),se.jsx(ue,{marginTop:"4",children:se.jsx(Mm,{onChange:O=>{n(O.target.value)}})}),y?se.jsx(ue,{marginTop:"6",children:se.jsx(Ut,{marginTop:"5",variant:"normal",color:"warning",children:"please input an email with correct format"})}):null,se.jsx(ue,{gap:"2",marginY:"4",children:se.jsx(We,{variant:"primary",label:"Login",onClick:()=>{$(r)?(m(!1),h(!1)):m(!0)},"data-id":"login"})})]})})})}),se.jsx(HK,{message:t,loading:i})]})},nJ=sr.memo(rJ),iJ=pA(document.getElementById("root"));iJ.render(se.jsx(sr.StrictMode,{children:se.jsx(BB,{children:se.jsx(nJ,{})})})); +${F}`)),d=()=>{s(!0)},T=()=>{s(!1),e(o?"Status: Wallet is connected :)":"Status: Wallet not connected. Please connect wallet first.")},O=()=>{s(!1),e("An error occurred")},x=[ee.RINKEBY,ee.HARDHAT,ee.HARDHAT_2,ee.KOVAN,ee.ROPSTEN,ee.HOMEVERSE_TESTNET,ee.BASE_GOERLI],$=Object.values(Ke.network.networks).filter(F=>F.type===Be.MAINNET).sort((F,V)=>F.chainId-V.chainId),L=Object.values(Ke.network.networks).filter(F=>F.type===Be.TESTNET).sort((F,V)=>F.chainId-V.chainId),z=[...$,...L].filter(F=>!F.deprecated&&!x.includes(F.chainId));S.useEffect(()=>{r&&!u&&(console.log(r),k({app:"Demo Dapp",authorize:!0,settings:{signInWithEmail:r,theme:"dark",bannerUrl:`${window.location.origin}${i5}`}}),n(null))},[r,u]);const G=F=>(F=F.trim(),!!/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/.test(F));return se.jsxs(ue,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[se.jsx(ue,{marginBottom:"10",children:se.jsx("a",{href:"https://sequence.xyz/",target:"_blank",rel:"noopener",children:se.jsx(OC,{height:"6",alt:"logo",src:VK})})}),se.jsx(ue,{children:se.jsx(Ut,{variant:"normal",color:"text100",fontWeight:"bold",children:"Demo Dapp"})}),se.jsx(ue,{marginTop:"1",marginBottom:"4",children:se.jsx(Ut,{variant:"normal",color:"text80",children:"A dapp example on how to use the Sequence Wallet. This covers how to connect, sign messages and send transctions."})}),se.jsxs(kM,{background:"backgroundMuted",alignItems:"center",gap:"3",children:[se.jsx(ZM,{}),se.jsx(Ut,{variant:"normal",color:"text80",children:"Please open your browser dev inspector to view output of functions below."})]}),se.jsx(nw,{background:"buttonGlass"}),se.jsx(ue,{marginBottom:"4",children:se.jsx(Mw,{name:"environment",label:"Environment",labelLocation:"top",onValueChange:F=>{ol.set("env",F),ol.delete("walletAppURL"),window.location.search=ol.toString()},value:wk,options:[...Object.values(bk).map(F=>({label:se.jsx(ue,{alignItems:"center",gap:"2",children:se.jsx(Ut,{capitalize:!0,children:F.name})}),value:String(F.name)}))]})}),se.jsxs(ue,{marginBottom:"4",children:[se.jsx(Ut,{as:"div",variant:"small",color:"text100",children:"Wallet URL"}),se.jsx("a",{href:al,target:"_blank",rel:"noopener",children:se.jsxs(ue,{gap:"1",marginTop:"1",alignItems:"center",children:[se.jsx(Ut,{as:"div",variant:"normal",color:"text80",children:al}),se.jsx(JM,{})]})})]}),se.jsx(nw,{background:"buttonGlass"}),se.jsx(ue,{marginBottom:"4",children:se.jsx(Mw,{name:"chainId",label:"Network",labelLocation:"top",onValueChange:F=>l.setDefaultChainId(Number(F)),value:String(c),options:[...Object.values(z).map(F=>({label:se.jsxs(ue,{alignItems:"center",gap:"2",children:[se.jsx(PB,{src:F.logoURI,size:"sm"}),se.jsx(Ut,{children:F.title})]}),value:String(F.chainId)}))]})}),se.jsxs(Oo,{label:"Connection",children:[se.jsx(qe,{width:"full",shape:"square",onClick:()=>k(),label:"Connect"}),se.jsx(qe,{width:"full",shape:"square",onClick:()=>k({app:"Demo Dapp",authorize:!0}),label:"Connect & Auth"}),se.jsx(qe,{width:"full",shape:"square",onClick:()=>k({app:"Demo Dapp",authorize:!0,settings:{theme:"dark",bannerUrl:`${window.location.origin}${HK}`,bannerSize:"medium",includedPaymentProviders:["moonpay"],defaultFundingCurrency:"matic",defaultPurchaseAmount:111}}),label:"Connect with Settings"}),se.jsx(qe,{width:"full",shape:"square",onClick:()=>{h(!0)},label:"Connect with Email"}),se.jsx(qe,{width:"full",shape:"square",onClick:()=>{k({app:"Demo Dapp",authorize:!0,settings:{signInWith:"google",theme:"dark",bannerUrl:`${window.location.origin}${i5}`}})},label:"Connect with Google"}),se.jsx(qe,{width:"full",shape:"square",onClick:()=>w(),label:"Disconnect"})]}),se.jsxs(Oo,{label:"Basics",children:[se.jsx(qe,{width:"full",shape:"square",disabled:!o,onClick:()=>E(),label:"Open Wallet"}),se.jsx(qe,{width:"full",shape:"square",disabled:!o,onClick:()=>A(),label:"Open Wallet with Settings"}),se.jsx(qe,{width:"full",shape:"square",disabled:!o,onClick:()=>I(),label:"Close Wallet"}),se.jsx(qe,{width:"full",shape:"square",disabled:!o,onClick:()=>M(),label:"Is Connected?"}),se.jsx(qe,{width:"full",shape:"square",disabled:!o,onClick:()=>B(),label:"Is Opened?"})]}),se.jsxs(Oo,{label:"State",children:[se.jsx(qe,{width:"full",shape:"square",disabled:!o,onClick:()=>U(),label:"ChainID"}),se.jsx(qe,{width:"full",shape:"square",disabled:!o,onClick:()=>J(),label:"Networks"}),se.jsx(qe,{width:"full",shape:"square",disabled:!o,onClick:()=>j(),label:"Get Accounts"}),se.jsx(qe,{width:"full",shape:"square",disabled:!o,onClick:()=>K(),label:"Get Balance"})]}),se.jsxs(Oo,{label:"Signing",children:[se.jsx(qe,{width:"full",shape:"square",disabled:!o,onClick:()=>Z(),label:"Sign Message"}),se.jsx(qe,{width:"full",shape:"square",disabled:!o,onClick:()=>ie(),label:"Sign TypedData"})]}),se.jsx(Oo,{label:"Simulation",children:se.jsx(qe,{width:"full",shape:"square",disabled:!o,onClick:()=>D(),label:"Estimate Unwrap Gas"})}),se.jsxs(Oo,{label:"Transactions",children:[se.jsx(qe,{width:"full",shape:"square",disabled:!o,onClick:()=>v(),label:"Send funds"}),se.jsx(qe,{width:"full",shape:"square",disabled:!o,onClick:()=>N(),label:"Send on L2"}),se.jsx(qe,{width:"full",shape:"square",disabled:!o,onClick:()=>P(),label:"Send DAI"}),se.jsx(qe,{width:"full",shape:"square",disabled:!o||!0,onClick:()=>b(),label:"Send ERC-1155 Tokens"}),se.jsx(qe,{width:"full",shape:"square",disabled:!o,onClick:()=>C(),label:"Send USDC on Sepolia"})]}),se.jsxs(Oo,{label:"Various",children:[se.jsx(qe,{width:"full",shape:"square",disabled:!o,onClick:()=>_(),label:"Read Symbol and Balance"}),se.jsx(qe,{width:"full",shape:"square",disabled:!o,onClick:()=>R(),label:"Fetch Token Balances"})]}),se.jsx(O8,{children:u&&se.jsx(LD,{onClose:()=>h(!1),size:"sm",children:se.jsx(ue,{flexDirection:"column",justifyContent:"space-between",height:"full",padding:"16",children:se.jsxs(ue,{flexDirection:"column",children:[se.jsx(ue,{marginTop:"6",children:se.jsx(Ut,{marginTop:"5",variant:"normal",color:"text80",children:"Auto-email login, please specify the email address"})}),se.jsx(ue,{marginTop:"4",children:se.jsx(Rm,{onChange:F=>{n(F.target.value)}})}),y?se.jsx(ue,{marginTop:"6",children:se.jsx(Ut,{marginTop:"5",variant:"normal",color:"warning",children:"please input an email with correct format"})}):null,se.jsx(ue,{gap:"2",marginY:"4",children:se.jsx(qe,{variant:"primary",label:"Login",onClick:()=>{G(r)?(m(!1),h(!1)):m(!0)},"data-id":"login"})})]})})})}),se.jsx(FK,{message:t,loading:i})]})},KK=sr.memo(GK),JK=uE(document.getElementById("root"));JK.render(se.jsx(sr.StrictMode,{children:se.jsx(RD,{children:se.jsx(KK,{})})})); diff --git a/index.html b/index.html index 33eb64b..a049e92 100644 --- a/index.html +++ b/index.html @@ -25,7 +25,7 @@ Learn how to configure a non-root public URL by running `npm run build`. --> Sequence | Demo Dapp - +