diff --git a/assets/index-45d10dba.js b/assets/index-472d3db6.js similarity index 78% rename from assets/index-45d10dba.js rename to assets/index-472d3db6.js index f592dd3..bf4780c 100644 --- a/assets/index-45d10dba.js +++ b/assets/index-472d3db6.js @@ -1,4 +1,4 @@ -function rS(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 o3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function a3(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function nS(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){if(this instanceof n){var i=[null];i.push.apply(i,arguments);var s=Function.bind.apply(e,i);return new s}return 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 Id={},iS={get exports(){return Id},set exports(t){Id=t}},J0={},S={},sS={get exports(){return S},set exports(t){S=t}},Ie={};/** +function nS(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 o3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function a3(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function iS(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){if(this instanceof n){var i=[null];i.push.apply(i,arguments);var s=Function.bind.apply(e,i);return new s}return 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 Rd={},sS={get exports(){return Rd},set exports(t){Rd=t}},Q0={},S={},oS={get exports(){return S},set exports(t){S=t}},Ie={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function rS(t,e){for(var r=0;r>>1,d=m[b];if(0>>1;b<_;){var N=2*(b+1)-1,p=m[N],B=N+1,L=m[B];if(0>i(p,R))Bi(L,p)?(m[b]=L,m[B]=R,b=B):(m[b]=p,m[N]=R,b=N);else if(Bi(L,R))m[b]=L,m[B]=R,b=B;else break e}}return T}function i(m,T){var R=m.sortIndex-T.sortIndex;return R!==0?R:m.id-T.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=[],f=[],c=1,u=null,h=3,v=!1,x=!1,g=!1,k=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 E(m){for(var T=r(f);T!==null;){if(T.callback===null)n(f);else if(T.startTime<=m)n(f),T.sortIndex=T.expirationTime,e(l,T);else break;T=r(f)}}function I(m){if(g=!1,E(m),!x)if(r(l)!==null)x=!0,P(M);else{var T=r(f);T!==null&&O(I,T.startTime-m)}}function M(m,T){x=!1,g&&(g=!1,w(U),U=-1),v=!0;var R=h;try{for(E(T),u=r(l);u!==null&&(!(u.expirationTime>T)||m&&!G());){var b=u.callback;if(typeof b=="function"){u.callback=null,h=u.priorityLevel;var d=b(u.expirationTime<=T);T=t.unstable_now(),typeof d=="function"?u.callback=d:u===r(l)&&n(l),E(T)}else n(l);u=r(l)}if(u!==null)var _=!0;else{var N=r(f);N!==null&&O(I,N.startTime-T),_=!1}return _}finally{u=null,h=R,v=!1}}var $=!1,j=null,U=-1,W=5,q=-1;function G(){return!(t.unstable_now()-qm||125b?(m.sortIndex=R,e(f,m),r(l)===null&&m===r(f)&&(g?(w(U),U=-1):g=!0,O(I,R-b))):(m.sortIndex=d,e(l,m),x||v||(x=!0,P(M))),m},t.unstable_shouldYield=G,t.unstable_wrapCallback=function(m){var T=h;return function(){var R=h;h=T;try{return m.apply(this,arguments)}finally{h=R}}}})(p3);(function(t){t.exports=p3})(PS);/** + */(function(t){function e(m,T){var R=m.length;m.push(T);e:for(;0>>1,d=m[b];if(0>>1;b<_;){var N=2*(b+1)-1,p=m[N],D=N+1,L=m[D];if(0>i(p,R))Di(L,p)?(m[b]=L,m[D]=R,b=D):(m[b]=p,m[N]=R,b=N);else if(Di(L,R))m[b]=L,m[D]=R,b=D;else break e}}return T}function i(m,T){var R=m.sortIndex-T.sortIndex;return R!==0?R:m.id-T.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=[],f=[],c=1,u=null,h=3,v=!1,x=!1,g=!1,k=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 E(m){for(var T=r(f);T!==null;){if(T.callback===null)n(f);else if(T.startTime<=m)n(f),T.sortIndex=T.expirationTime,e(l,T);else break;T=r(f)}}function I(m){if(g=!1,E(m),!x)if(r(l)!==null)x=!0,P(M);else{var T=r(f);T!==null&&O(I,T.startTime-m)}}function M(m,T){x=!1,g&&(g=!1,w(U),U=-1),v=!0;var R=h;try{for(E(T),u=r(l);u!==null&&(!(u.expirationTime>T)||m&&!G());){var b=u.callback;if(typeof b=="function"){u.callback=null,h=u.priorityLevel;var d=b(u.expirationTime<=T);T=t.unstable_now(),typeof d=="function"?u.callback=d:u===r(l)&&n(l),E(T)}else n(l);u=r(l)}if(u!==null)var _=!0;else{var N=r(f);N!==null&&O(I,N.startTime-T),_=!1}return _}finally{u=null,h=R,v=!1}}var $=!1,j=null,U=-1,W=5,q=-1;function G(){return!(t.unstable_now()-qm||125b?(m.sortIndex=R,e(f,m),r(l)===null&&m===r(f)&&(g?(w(U),U=-1):g=!0,O(I,R-b))):(m.sortIndex=d,e(l,m),x||v||(x=!0,P(M))),m},t.unstable_shouldYield=G,t.unstable_wrapCallback=function(m){var T=h;return function(){var R=h;h=T;try{return m.apply(this,arguments)}finally{h=R}}}})(p3);(function(t){t.exports=p3})(IS);/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ function rS(t,e){for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mv=Object.prototype.hasOwnProperty,IS=/^[: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]*$/,jx={},Ux={};function RS(t){return Mv.call(Ux,t)?!0:Mv.call(jx,t)?!1:IS.test(t)?Ux[t]=!0:(jx[t]=!0,!1)}function MS(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 NS(t,e,r,n){if(e===null||typeof e>"u"||MS(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 br={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){br[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];br[e]=new Kr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){br[t]=new Kr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){br[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){br[t]=new Kr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){br[t]=new Kr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){br[t]=new Kr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){br[t]=new Kr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){br[t]=new Kr(t,5,!1,t.toLowerCase(),null,!1,!1)});var Zp=/[\-:]([a-z])/g;function eg(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(Zp,eg);br[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(Zp,eg);br[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(Zp,eg);br[e]=new Kr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){br[t]=new Kr(t,1,!1,t.toLowerCase(),null,!1,!1)});br.xlinkHref=new Kr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){br[t]=new Kr(t,1,!1,t.toLowerCase(),null,!0,!0)});function tg(t,e,r,n){var i=br.hasOwnProperty(e)?br[e]:null;(i!==null?i.type!==0:n||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nv=Object.prototype.hasOwnProperty,RS=/^[: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]*$/,jx={},Ux={};function MS(t){return Nv.call(Ux,t)?!0:Nv.call(jx,t)?!1:RS.test(t)?Ux[t]=!0:(jx[t]=!0,!1)}function NS(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 OS(t,e,r,n){if(e===null||typeof e>"u"||NS(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 br={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){br[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];br[e]=new Kr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){br[t]=new Kr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){br[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){br[t]=new Kr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){br[t]=new Kr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){br[t]=new Kr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){br[t]=new Kr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){br[t]=new Kr(t,5,!1,t.toLowerCase(),null,!1,!1)});var Zp=/[\-:]([a-z])/g;function eg(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(Zp,eg);br[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(Zp,eg);br[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(Zp,eg);br[e]=new Kr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){br[t]=new Kr(t,1,!1,t.toLowerCase(),null,!1,!1)});br.xlinkHref=new Kr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){br[t]=new Kr(t,1,!1,t.toLowerCase(),null,!0,!0)});function tg(t,e,r,n){var i=br.hasOwnProperty(e)?br[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{h1=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?xf(t):""}function OS(t){switch(t.tag){case 5:return xf(t.type);case 16:return xf("Lazy");case 13:return xf("Suspense");case 19:return xf("SuspenseList");case 0:case 2:case 15:return t=v1(t.type,!1),t;case 11:return t=v1(t.type.render,!1),t;case 1:return t=v1(t.type,!0),t;default:return""}}function Dv(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 Fa:return"Fragment";case $a:return"Portal";case Nv:return"Profiler";case rg:return"StrictMode";case Ov:return"Suspense";case Bv:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case b3:return(t.displayName||"Context")+".Consumer";case x3:return(t._context.displayName||"Context")+".Provider";case ng:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ig:return e=t.displayName||null,e!==null?e:Dv(t.type)||"Memo";case ks:e=t._payload,t=t._init;try{return Dv(t(e))}catch{}}return null}function BS(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 Dv(e);case 8:return e===rg?"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 C3(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function DS(t){var e=C3(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 du(t){t._valueTracker||(t._valueTracker=DS(t))}function A3(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=C3(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Rd(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 Lv(t,e){var r=e.checked;return Mt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function Vx(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 E3(t,e){e=e.checked,e!=null&&tg(t,"checked",e,!1)}function $v(t,e){E3(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")?Fv(t,e.type,r):e.hasOwnProperty("defaultValue")&&Fv(t,e.type,Qs(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Hx(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 Fv(t,e,r){(e!=="number"||Rd(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var bf=Array.isArray;function tl(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=hu.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function ac(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var kf={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},LS=["Webkit","ms","Moz","O"];Object.keys(kf).forEach(function(t){LS.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),kf[e]=kf[t]})});function T3(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||kf.hasOwnProperty(t)&&kf[t]?(""+e).trim():e+"px"}function P3(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=T3(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var $S=Mt({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 zv(t,e){if(e){if($S[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 Vv(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 Hv=null;function sg(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Wv=null,rl=null,nl=null;function Gx(t){if(t=Vc(t)){if(typeof Wv!="function")throw Error(ne(280));var e=t.stateNode;e&&(e=eh(e),Wv(t.stateNode,t.type,e))}}function I3(t){rl?nl?nl.push(t):nl=[t]:rl=t}function R3(){if(rl){var t=rl,e=nl;if(nl=rl=null,Gx(t),e)for(t=0;t>>=0,t===0?32:31-(JS(t)/QS|0)|0}var vu=64,yu=4194304;function wf(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 Bd(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=wf(a):(s&=o,s!==0&&(n=wf(s)))}else o=r&~i,o!==0?n=wf(o):s!==0&&(n=wf(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 Uc(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ri(e),t[e]=r}function ek(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=Tf),rb=String.fromCharCode(32),nb=!1;function Y3(t,e){switch(t){case"keyup":return Tk.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function X3(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ja=!1;function Ik(t,e){switch(t){case"compositionend":return X3(e);case"keypress":return e.which!==32?null:(nb=!0,rb);case"textInput":return t=e.data,t===rb&&nb?null:t;default:return null}}function Rk(t,e){if(ja)return t==="compositionend"||!hg&&Y3(t,e)?(t=J3(),Yu=cg=Rs=null,ja=!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=ab(r)}}function r5(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?r5(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function n5(){for(var t=window,e=Rd();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Rd(t.document)}return e}function vg(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 jk(t){var e=n5(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&r5(r.ownerDocument.documentElement,r)){if(n!==null&&vg(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=lb(r,s);var o=lb(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,Ua=null,Yv=null,If=null,Xv=!1;function fb(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Xv||Ua==null||Ua!==Rd(n)||(n=Ua,"selectionStart"in n&&vg(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}),If&&hc(If,n)||(If=n,n=$d(Yv,"onSelect"),0Ha||(t.current=iy[Ha],iy[Ha]=null,Ha--)}function qe(t,e){Ha++,iy[Ha]=t.current,t.current=e}var Ys={},Nr=io(Ys),en=io(!1),Jo=Ys;function gl(t,e){var r=t.type.contextTypes;if(!r)return Ys;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 tn(t){return t=t.childContextTypes,t!=null}function jd(){Et(en),Et(Nr)}function pb(t,e,r){if(Nr.current!==Ys)throw Error(ne(168));qe(Nr,e),qe(en,r)}function d5(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,BS(t)||"Unknown",i));return Mt({},r,n)}function Ud(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Ys,Jo=Nr.current,qe(Nr,t),qe(en,en.current),!0}function gb(t,e,r){var n=t.stateNode;if(!n)throw Error(ne(169));r?(t=d5(t,e,Jo),n.__reactInternalMemoizedMergedChildContext=t,Et(en),Et(Nr),qe(Nr,t)):Et(en),qe(en,r)}var Ui=null,th=!1,T1=!1;function h5(t){Ui===null?Ui=[t]:Ui.push(t)}function Xk(t){th=!0,h5(t)}function so(){if(!T1&&Ui!==null){T1=!0;var t=0,e=Fe;try{var r=Ui;for(Fe=1;t>=o,i-=o,qi=1<<32-ri(e)+i|r<U?(W=j,j=null):W=j.sibling;var q=h(w,j,E[U],I);if(q===null){j===null&&(j=W);break}t&&j&&q.alternate===null&&e(w,j),A=s(q,A,U),$===null?M=q:$.sibling=q,$=q,j=W}if(U===E.length)return r(w,j),_t&&ko(w,U),M;if(j===null){for(;UU?(W=j,j=null):W=j.sibling;var G=h(w,j,q.value,I);if(G===null){j===null&&(j=W);break}t&&j&&G.alternate===null&&e(w,j),A=s(G,A,U),$===null?M=G:$.sibling=G,$=G,j=W}if(q.done)return r(w,j),_t&&ko(w,U),M;if(j===null){for(;!q.done;U++,q=E.next())q=u(w,q.value,I),q!==null&&(A=s(q,A,U),$===null?M=q:$.sibling=q,$=q);return _t&&ko(w,U),M}for(j=n(w,j);!q.done;U++,q=E.next())q=v(j,w,U,q.value,I),q!==null&&(t&&q.alternate!==null&&j.delete(q.key===null?U:q.key),A=s(q,A,U),$===null?M=q:$.sibling=q,$=q);return t&&j.forEach(function(re){return e(w,re)}),_t&&ko(w,U),M}function k(w,A,E,I){if(typeof E=="object"&&E!==null&&E.type===Fa&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case uu:e:{for(var M=E.key,$=A;$!==null;){if($.key===M){if(M=E.type,M===Fa){if($.tag===7){r(w,$.sibling),A=i($,E.props.children),A.return=w,w=A;break e}}else if($.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===ks&&Eb(M)===$.type){r(w,$.sibling),A=i($,E.props),A.ref=af(w,$,E),A.return=w,w=A;break e}r(w,$);break}else e(w,$);$=$.sibling}E.type===Fa?(A=zo(E.props.children,w.mode,I,E.key),A.return=w,w=A):(I=sd(E.type,E.key,E.props,null,w.mode,I),I.ref=af(w,A,E),I.return=w,w=I)}return o(w);case $a:e:{for($=E.key;A!==null;){if(A.key===$)if(A.tag===4&&A.stateNode.containerInfo===E.containerInfo&&A.stateNode.implementation===E.implementation){r(w,A.sibling),A=i(A,E.children||[]),A.return=w,w=A;break e}else{r(w,A);break}else e(w,A);A=A.sibling}A=D1(E,w.mode,I),A.return=w,w=A}return o(w);case ks:return $=E._init,k(w,A,$(E._payload),I)}if(bf(E))return x(w,A,E,I);if(tf(E))return g(w,A,E,I);Cu(w,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,A!==null&&A.tag===6?(r(w,A.sibling),A=i(A,E),A.return=w,w=A):(r(w,A),A=B1(E,w.mode,I),A.return=w,w=A),o(w)):r(w,A)}return k}var xl=w5(!0),C5=w5(!1),Hc={},Ci=io(Hc),gc=io(Hc),mc=io(Hc);function Lo(t){if(t===Hc)throw Error(ne(174));return t}function Ag(t,e){switch(qe(mc,e),qe(gc,t),qe(Ci,Hc),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Uv(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Uv(e,t)}Et(Ci),qe(Ci,e)}function bl(){Et(Ci),Et(gc),Et(mc)}function A5(t){Lo(mc.current);var e=Lo(Ci.current),r=Uv(e,t.type);e!==r&&(qe(gc,t),qe(Ci,r))}function Eg(t){gc.current===t&&(Et(Ci),Et(gc))}var It=io(0);function Gd(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 P1=[];function Sg(){for(var t=0;tr?r:4,t(!0);var n=I1.transition;I1.transition={};try{t(!1),e()}finally{Fe=r,I1.transition=n}}function F5(){return On().memoizedState}function r_(t,e,r){var n=Vs(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},j5(t))U5(e,r);else if(r=g5(t,e,r,n),r!==null){var i=Hr();ni(r,t,n,i),z5(r,e,n)}}function n_(t,e,r){var n=Vs(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(j5(t))U5(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,si(a,o)){var l=e.interleaved;l===null?(i.next=i,wg(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=g5(t,e,i,n),r!==null&&(i=Hr(),ni(r,t,n,i),z5(r,e,n))}}function j5(t){var e=t.alternate;return t===Rt||e!==null&&e===Rt}function U5(t,e){Rf=Kd=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function z5(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,ag(t,r)}}var Jd={readContext:Nn,useCallback:Cr,useContext:Cr,useEffect:Cr,useImperativeHandle:Cr,useInsertionEffect:Cr,useLayoutEffect:Cr,useMemo:Cr,useReducer:Cr,useRef:Cr,useState:Cr,useDebugValue:Cr,useDeferredValue:Cr,useTransition:Cr,useMutableSource:Cr,useSyncExternalStore:Cr,useId:Cr,unstable_isNewReconciler:!1},i_={readContext:Nn,useCallback:function(t,e){return ui().memoizedState=[t,e===void 0?null:e],t},useContext:Nn,useEffect:kb,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,td(4194308,4,O5.bind(null,e,t),r)},useLayoutEffect:function(t,e){return td(4194308,4,t,e)},useInsertionEffect:function(t,e){return td(4,2,t,e)},useMemo:function(t,e){var r=ui();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=ui();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=r_.bind(null,Rt,t),[n.memoizedState,t]},useRef:function(t){var e=ui();return t={current:t},e.memoizedState=t},useState:Sb,useDebugValue:Ig,useDeferredValue:function(t){return ui().memoizedState=t},useTransition:function(){var t=Sb(!1),e=t[0];return t=t_.bind(null,t[1]),ui().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Rt,i=ui();if(_t){if(r===void 0)throw Error(ne(407));r=r()}else{if(r=e(),fr===null)throw Error(ne(349));Yo&30||k5(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,kb(T5.bind(null,n,s,t),[t]),n.flags|=2048,wc(9,_5.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=ui(),e=fr.identifierPrefix;if(_t){var r=Gi,n=qi;r=(n&~(1<<32-ri(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=xc++,0")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{v1=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?bf(t):""}function DS(t){switch(t.tag){case 5:return bf(t.type);case 16:return bf("Lazy");case 13:return bf("Suspense");case 19:return bf("SuspenseList");case 0:case 2:case 15:return t=y1(t.type,!1),t;case 11:return t=y1(t.type.render,!1),t;case 1:return t=y1(t.type,!0),t;default:return""}}function Lv(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 Fa:return"Fragment";case $a:return"Portal";case Ov:return"Profiler";case rg:return"StrictMode";case Dv:return"Suspense";case Bv:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case b3:return(t.displayName||"Context")+".Consumer";case x3:return(t._context.displayName||"Context")+".Provider";case ng:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ig:return e=t.displayName||null,e!==null?e:Lv(t.type)||"Memo";case ks:e=t._payload,t=t._init;try{return Lv(t(e))}catch{}}return null}function BS(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 Lv(e);case 8:return e===rg?"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 C3(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function LS(t){var e=C3(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 hu(t){t._valueTracker||(t._valueTracker=LS(t))}function A3(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=C3(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Md(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 $v(t,e){var r=e.checked;return Mt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function Vx(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 E3(t,e){e=e.checked,e!=null&&tg(t,"checked",e,!1)}function Fv(t,e){E3(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")?jv(t,e.type,r):e.hasOwnProperty("defaultValue")&&jv(t,e.type,Qs(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Hx(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 jv(t,e,r){(e!=="number"||Md(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var wf=Array.isArray;function rl(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=vu.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function lc(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var _f={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},$S=["Webkit","ms","Moz","O"];Object.keys(_f).forEach(function(t){$S.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),_f[e]=_f[t]})});function T3(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||_f.hasOwnProperty(t)&&_f[t]?(""+e).trim():e+"px"}function P3(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=T3(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var FS=Mt({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 Vv(t,e){if(e){if(FS[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 Hv(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 Wv=null;function sg(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var qv=null,nl=null,il=null;function Gx(t){if(t=Hc(t)){if(typeof qv!="function")throw Error(ne(280));var e=t.stateNode;e&&(e=th(e),qv(t.stateNode,t.type,e))}}function I3(t){nl?il?il.push(t):il=[t]:nl=t}function R3(){if(nl){var t=nl,e=il;if(il=nl=null,Gx(t),e)for(t=0;t>>=0,t===0?32:31-(QS(t)/YS|0)|0}var yu=64,pu=4194304;function Cf(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 Bd(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=Cf(a):(s&=o,s!==0&&(n=Cf(s)))}else o=r&~i,o!==0?n=Cf(o):s!==0&&(n=Cf(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 zc(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ri(e),t[e]=r}function tk(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=Pf),rb=String.fromCharCode(32),nb=!1;function Y3(t,e){switch(t){case"keyup":return Pk.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function X3(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ja=!1;function Rk(t,e){switch(t){case"compositionend":return X3(e);case"keypress":return e.which!==32?null:(nb=!0,rb);case"textInput":return t=e.data,t===rb&&nb?null:t;default:return null}}function Mk(t,e){if(ja)return t==="compositionend"||!hg&&Y3(t,e)?(t=J3(),Xu=cg=Rs=null,ja=!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=ab(r)}}function r5(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?r5(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function n5(){for(var t=window,e=Md();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Md(t.document)}return e}function vg(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 Uk(t){var e=n5(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&r5(r.ownerDocument.documentElement,r)){if(n!==null&&vg(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=lb(r,s);var o=lb(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,Ua=null,Xv=null,Rf=null,Zv=!1;function fb(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Zv||Ua==null||Ua!==Md(n)||(n=Ua,"selectionStart"in n&&vg(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}),Rf&&vc(Rf,n)||(Rf=n,n=Fd(Xv,"onSelect"),0Ha||(t.current=sy[Ha],sy[Ha]=null,Ha--)}function qe(t,e){Ha++,sy[Ha]=t.current,t.current=e}var Ys={},Nr=io(Ys),en=io(!1),Jo=Ys;function ml(t,e){var r=t.type.contextTypes;if(!r)return Ys;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 tn(t){return t=t.childContextTypes,t!=null}function Ud(){Et(en),Et(Nr)}function pb(t,e,r){if(Nr.current!==Ys)throw Error(ne(168));qe(Nr,e),qe(en,r)}function d5(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,BS(t)||"Unknown",i));return Mt({},r,n)}function zd(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Ys,Jo=Nr.current,qe(Nr,t),qe(en,en.current),!0}function gb(t,e,r){var n=t.stateNode;if(!n)throw Error(ne(169));r?(t=d5(t,e,Jo),n.__reactInternalMemoizedMergedChildContext=t,Et(en),Et(Nr),qe(Nr,t)):Et(en),qe(en,r)}var Ui=null,rh=!1,P1=!1;function h5(t){Ui===null?Ui=[t]:Ui.push(t)}function Zk(t){rh=!0,h5(t)}function so(){if(!P1&&Ui!==null){P1=!0;var t=0,e=Fe;try{var r=Ui;for(Fe=1;t>=o,i-=o,qi=1<<32-ri(e)+i|r<U?(W=j,j=null):W=j.sibling;var q=h(w,j,E[U],I);if(q===null){j===null&&(j=W);break}t&&j&&q.alternate===null&&e(w,j),A=s(q,A,U),$===null?M=q:$.sibling=q,$=q,j=W}if(U===E.length)return r(w,j),_t&&ko(w,U),M;if(j===null){for(;UU?(W=j,j=null):W=j.sibling;var G=h(w,j,q.value,I);if(G===null){j===null&&(j=W);break}t&&j&&G.alternate===null&&e(w,j),A=s(G,A,U),$===null?M=G:$.sibling=G,$=G,j=W}if(q.done)return r(w,j),_t&&ko(w,U),M;if(j===null){for(;!q.done;U++,q=E.next())q=u(w,q.value,I),q!==null&&(A=s(q,A,U),$===null?M=q:$.sibling=q,$=q);return _t&&ko(w,U),M}for(j=n(w,j);!q.done;U++,q=E.next())q=v(j,w,U,q.value,I),q!==null&&(t&&q.alternate!==null&&j.delete(q.key===null?U:q.key),A=s(q,A,U),$===null?M=q:$.sibling=q,$=q);return t&&j.forEach(function(re){return e(w,re)}),_t&&ko(w,U),M}function k(w,A,E,I){if(typeof E=="object"&&E!==null&&E.type===Fa&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case du:e:{for(var M=E.key,$=A;$!==null;){if($.key===M){if(M=E.type,M===Fa){if($.tag===7){r(w,$.sibling),A=i($,E.props.children),A.return=w,w=A;break e}}else if($.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===ks&&Eb(M)===$.type){r(w,$.sibling),A=i($,E.props),A.ref=lf(w,$,E),A.return=w,w=A;break e}r(w,$);break}else e(w,$);$=$.sibling}E.type===Fa?(A=zo(E.props.children,w.mode,I,E.key),A.return=w,w=A):(I=od(E.type,E.key,E.props,null,w.mode,I),I.ref=lf(w,A,E),I.return=w,w=I)}return o(w);case $a:e:{for($=E.key;A!==null;){if(A.key===$)if(A.tag===4&&A.stateNode.containerInfo===E.containerInfo&&A.stateNode.implementation===E.implementation){r(w,A.sibling),A=i(A,E.children||[]),A.return=w,w=A;break e}else{r(w,A);break}else e(w,A);A=A.sibling}A=L1(E,w.mode,I),A.return=w,w=A}return o(w);case ks:return $=E._init,k(w,A,$(E._payload),I)}if(wf(E))return x(w,A,E,I);if(rf(E))return g(w,A,E,I);Au(w,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,A!==null&&A.tag===6?(r(w,A.sibling),A=i(A,E),A.return=w,w=A):(r(w,A),A=B1(E,w.mode,I),A.return=w,w=A),o(w)):r(w,A)}return k}var bl=w5(!0),C5=w5(!1),Wc={},Ci=io(Wc),mc=io(Wc),xc=io(Wc);function Lo(t){if(t===Wc)throw Error(ne(174));return t}function Ag(t,e){switch(qe(xc,e),qe(mc,t),qe(Ci,Wc),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:zv(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=zv(e,t)}Et(Ci),qe(Ci,e)}function wl(){Et(Ci),Et(mc),Et(xc)}function A5(t){Lo(xc.current);var e=Lo(Ci.current),r=zv(e,t.type);e!==r&&(qe(mc,t),qe(Ci,r))}function Eg(t){mc.current===t&&(Et(Ci),Et(mc))}var It=io(0);function Kd(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 I1=[];function Sg(){for(var t=0;tr?r:4,t(!0);var n=R1.transition;R1.transition={};try{t(!1),e()}finally{Fe=r,R1.transition=n}}function F5(){return On().memoizedState}function n_(t,e,r){var n=Vs(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},j5(t))U5(e,r);else if(r=g5(t,e,r,n),r!==null){var i=Hr();ni(r,t,n,i),z5(r,e,n)}}function i_(t,e,r){var n=Vs(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(j5(t))U5(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,si(a,o)){var l=e.interleaved;l===null?(i.next=i,wg(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=g5(t,e,i,n),r!==null&&(i=Hr(),ni(r,t,n,i),z5(r,e,n))}}function j5(t){var e=t.alternate;return t===Rt||e!==null&&e===Rt}function U5(t,e){Mf=Jd=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function z5(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,ag(t,r)}}var Qd={readContext:Nn,useCallback:Cr,useContext:Cr,useEffect:Cr,useImperativeHandle:Cr,useInsertionEffect:Cr,useLayoutEffect:Cr,useMemo:Cr,useReducer:Cr,useRef:Cr,useState:Cr,useDebugValue:Cr,useDeferredValue:Cr,useTransition:Cr,useMutableSource:Cr,useSyncExternalStore:Cr,useId:Cr,unstable_isNewReconciler:!1},s_={readContext:Nn,useCallback:function(t,e){return ui().memoizedState=[t,e===void 0?null:e],t},useContext:Nn,useEffect:kb,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,rd(4194308,4,O5.bind(null,e,t),r)},useLayoutEffect:function(t,e){return rd(4194308,4,t,e)},useInsertionEffect:function(t,e){return rd(4,2,t,e)},useMemo:function(t,e){var r=ui();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=ui();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=n_.bind(null,Rt,t),[n.memoizedState,t]},useRef:function(t){var e=ui();return t={current:t},e.memoizedState=t},useState:Sb,useDebugValue:Ig,useDeferredValue:function(t){return ui().memoizedState=t},useTransition:function(){var t=Sb(!1),e=t[0];return t=r_.bind(null,t[1]),ui().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Rt,i=ui();if(_t){if(r===void 0)throw Error(ne(407));r=r()}else{if(r=e(),fr===null)throw Error(ne(349));Yo&30||k5(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,kb(T5.bind(null,n,s,t),[t]),n.flags|=2048,Cc(9,_5.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=ui(),e=fr.identifierPrefix;if(_t){var r=Gi,n=qi;r=(n&~(1<<32-ri(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=bc++,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[yi]=e,t[pc]=n,Y5(t,e,!1,!1),e.stateNode=t;e:{switch(o=Vv(r,n),r){case"dialog":Ct("cancel",t),Ct("close",t),i=n;break;case"iframe":case"object":case"embed":Ct("load",t),i=n;break;case"video":case"audio":for(i=0;iCl&&(e.flags|=128,n=!0,lf(s,!1),e.lanes=4194304)}else{if(!n)if(t=Gd(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),lf(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!_t)return Ar(e),null}else 2*zt()-s.renderingStartTime>Cl&&r!==1073741824&&(e.flags|=128,n=!0,lf(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=zt(),e.sibling=null,r=It.current,qe(It,n?r&1|2:r&1),e):(Ar(e),null);case 22:case 23:return Dg(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?fn&1073741824&&(Ar(e),e.subtreeFlags&6&&(e.flags|=8192)):Ar(e),null;case 24:return null;case 25:return null}throw Error(ne(156,e.tag))}function d_(t,e){switch(pg(e),e.tag){case 1:return tn(e.type)&&jd(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return bl(),Et(en),Et(Nr),Sg(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Eg(e),null;case 13:if(Et(It),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ne(340));ml()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Et(It),null;case 4:return bl(),null;case 10:return bg(e.type._context),null;case 22:case 23:return Dg(),null;case 24:return null;default:return null}}var Eu=!1,kr=!1,h_=typeof WeakSet=="function"?WeakSet:Set,oe=null;function Ka(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Dt(t,e,n)}else r.current=null}function py(t,e,r){try{r()}catch(n){Dt(t,e,n)}}var Bb=!1;function v_(t,e){if(Zv=Dd,t=n5(),vg(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,f=0,c=0,u=t,h=null;t:for(;;){for(var v;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),(v=u.firstChild)!==null;)h=u,u=v;for(;;){if(u===t)break t;if(h===r&&++f===i&&(a=o),h===s&&++c===n&&(l=o),(v=u.nextSibling)!==null)break;u=h,h=u.parentNode}u=v}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(ey={focusedElem:t,selectionRange:r},Dd=!1,oe=e;oe!==null;)if(e=oe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,oe=t;else for(;oe!==null;){e=oe;try{var x=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var g=x.memoizedProps,k=x.memoizedState,w=e.stateNode,A=w.getSnapshotBeforeUpdate(e.elementType===e.type?g:Kn(e.type,g),k);w.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var E=e.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(I){Dt(e,e.return,I)}if(t=e.sibling,t!==null){t.return=e.return,oe=t;break}oe=e.return}return x=Bb,Bb=!1,x}function Mf(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&&py(e,r,s)}i=i.next}while(i!==n)}}function ih(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 gy(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 e8(t){var e=t.alternate;e!==null&&(t.alternate=null,e8(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[yi],delete e[pc],delete e[ny],delete e[Qk],delete e[Yk])),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 t8(t){return t.tag===5||t.tag===3||t.tag===4}function Db(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||t8(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 my(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=Fd));else if(n!==4&&(t=t.child,t!==null))for(my(t,e,r),t=t.sibling;t!==null;)my(t,e,r),t=t.sibling}function xy(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(xy(t,e,r),t=t.sibling;t!==null;)xy(t,e,r),t=t.sibling}var yr=null,Qn=!1;function ws(t,e,r){for(r=r.child;r!==null;)r8(t,e,r),r=r.sibling}function r8(t,e,r){if(wi&&typeof wi.onCommitFiberUnmount=="function")try{wi.onCommitFiberUnmount(Q0,r)}catch{}switch(r.tag){case 5:kr||Ka(r,e);case 6:var n=yr,i=Qn;yr=null,ws(t,e,r),yr=n,Qn=i,yr!==null&&(Qn?(t=yr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):yr.removeChild(r.stateNode));break;case 18:yr!==null&&(Qn?(t=yr,r=r.stateNode,t.nodeType===8?_1(t.parentNode,r):t.nodeType===1&&_1(t,r),uc(t)):_1(yr,r.stateNode));break;case 4:n=yr,i=Qn,yr=r.stateNode.containerInfo,Qn=!0,ws(t,e,r),yr=n,Qn=i;break;case 0:case 11:case 14:case 15:if(!kr&&(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)&&py(r,e,o),i=i.next}while(i!==n)}ws(t,e,r);break;case 1:if(!kr&&(Ka(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Dt(r,e,a)}ws(t,e,r);break;case 21:ws(t,e,r);break;case 22:r.mode&1?(kr=(n=kr)||r.memoizedState!==null,ws(t,e,r),kr=n):ws(t,e,r);break;default:ws(t,e,r)}}function Lb(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new h_),e.forEach(function(n){var i=A_.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Fn(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~s}if(n=i,n=zt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*p_(n/1960))-n,10t?16:t,Ms===null)var n=!1;else{if(t=Ms,Ms=null,Xd=0,Be&6)throw Error(ne(331));var i=Be;for(Be|=4,oe=t.current;oe!==null;){var s=oe,o=s.child;if(oe.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lzt()-Og?Uo(t,0):Ng|=r),rn(t,e)}function c8(t,e){e===0&&(t.mode&1?(e=yu,yu<<=1,!(yu&130023424)&&(yu=4194304)):e=1);var r=Hr();t=rs(t,e),t!==null&&(Uc(t,e,r),rn(t,r))}function C_(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),c8(t,r)}function A_(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),c8(t,r)}var u8;u8=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||en.current)Zr=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Zr=!1,c_(t,e,r);Zr=!!(t.flags&131072)}else Zr=!1,_t&&e.flags&1048576&&v5(e,Vd,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;rd(t,e),t=e.pendingProps;var i=gl(e,Nr.current);sl(e,r),i=_g(null,e,n,t,i,r);var s=Tg();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,tn(n)?(s=!0,Ud(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Cg(e),i.updater=rh,e.stateNode=i,i._reactInternals=e,fy(e,n,t,r),e=dy(null,e,n,!0,s,r)):(e.tag=0,_t&&s&&yg(e),Fr(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(rd(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=S_(n),t=Kn(n,t),i){case 0:e=uy(null,e,n,t,r);break e;case 1:e=Mb(null,e,n,t,r);break e;case 11:e=Ib(null,e,n,t,r);break e;case 14:e=Rb(null,e,n,Kn(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:Kn(n,i),uy(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Kn(n,i),Mb(t,e,n,i,r);case 3:e:{if(K5(e),t===null)throw Error(ne(387));n=e.pendingProps,s=e.memoizedState,i=s.element,m5(t,e),qd(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=wl(Error(ne(423)),e),e=Nb(t,e,n,r,i);break e}else if(n!==i){i=wl(Error(ne(424)),e),e=Nb(t,e,n,r,i);break e}else for(vn=js(e.stateNode.containerInfo.firstChild),pn=e,_t=!0,Yn=null,r=C5(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ml(),n===i){e=ns(t,e,r);break e}Fr(t,e,n,r)}e=e.child}return e;case 5:return A5(e),t===null&&oy(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,ty(n,i)?o=null:s!==null&&ty(n,s)&&(e.flags|=32),G5(t,e),Fr(t,e,o,r),e.child;case 6:return t===null&&oy(e),null;case 13:return J5(t,e,r);case 4:return Ag(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=xl(e,null,n,r):Fr(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Kn(n,i),Ib(t,e,n,i,r);case 7:return Fr(t,e,e.pendingProps,r),e.child;case 8:return Fr(t,e,e.pendingProps.children,r),e.child;case 12:return Fr(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,qe(Hd,n._currentValue),n._currentValue=o,s!==null)if(si(s.value,o)){if(s.children===i.children&&!en.current){e=ns(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=Qi(-1,r&-r),l.tag=2;var f=s.updateQueue;if(f!==null){f=f.shared;var c=f.pending;c===null?l.next=l:(l.next=c.next,c.next=l),f.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),ay(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),ay(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}Fr(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,sl(e,r),i=Nn(i),n=n(i),e.flags|=1,Fr(t,e,n,r),e.child;case 14:return n=e.type,i=Kn(n,e.pendingProps),i=Kn(n.type,i),Rb(t,e,n,i,r);case 15:return W5(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Kn(n,i),rd(t,e),e.tag=1,tn(n)?(t=!0,Ud(e)):t=!1,sl(e,r),b5(e,n,i),fy(e,n,i,r),dy(null,e,n,!0,t,r);case 19:return Q5(t,e,r);case 22:return q5(t,e,r)}throw Error(ne(156,e.tag))};function d8(t,e){return $3(t,e)}function E_(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 Pn(t,e,r,n){return new E_(t,e,r,n)}function $g(t){return t=t.prototype,!(!t||!t.isReactComponent)}function S_(t){if(typeof t=="function")return $g(t)?1:0;if(t!=null){if(t=t.$$typeof,t===ng)return 11;if(t===ig)return 14}return 2}function Hs(t,e){var r=t.alternate;return r===null?(r=Pn(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 sd(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")$g(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Fa:return zo(r.children,i,s,e);case rg:o=8,i|=8;break;case Nv:return t=Pn(12,r,e,i|2),t.elementType=Nv,t.lanes=s,t;case Ov:return t=Pn(13,r,e,i),t.elementType=Ov,t.lanes=s,t;case Bv:return t=Pn(19,r,e,i),t.elementType=Bv,t.lanes=s,t;case w3:return oh(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case x3:o=10;break e;case b3:o=9;break e;case ng:o=11;break e;case ig:o=14;break e;case ks:o=16,n=null;break e}throw Error(ne(130,t==null?t:typeof t,""))}return e=Pn(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function zo(t,e,r,n){return t=Pn(7,t,n,e),t.lanes=r,t}function oh(t,e,r,n){return t=Pn(22,t,n,e),t.elementType=w3,t.lanes=r,t.stateNode={isHidden:!1},t}function B1(t,e,r){return t=Pn(6,t,null,e),t.lanes=r,t}function D1(t,e,r){return e=Pn(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=p1(0),this.expirationTimes=p1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=p1(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Fg(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=Pn(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cg(s),t}function __(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}e(),t.exports=bn})(TS);const M_=a3(Ti),Vg=S.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),uh=S.createContext({});function N_(){return S.useContext(uh).visualElement}const Wc=S.createContext(null),dh=typeof document<"u",t0=dh?S.useLayoutEffect:S.useEffect,p8=S.createContext({strict:!1});function O_(t,e,r,n){const i=N_(),s=S.useContext(p8),o=S.useContext(Wc),a=S.useContext(Vg).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 f=l.current;return t0(()=>{f&&f.render()}),(window.HandoffAppearAnimations?t0:S.useEffect)(()=>{f&&f.animationState&&f.animationState.animateChanges()}),f}function Qa(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function B_(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):Qa(r)&&(r.current=n))},[e])}function Ac(t){return typeof t=="string"||Array.isArray(t)}function hh(t){return typeof t=="object"&&typeof t.start=="function"}const D_=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function vh(t){return hh(t.animate)||D_.some(e=>Ac(t[e]))}function g8(t){return Boolean(vh(t)||t.variants)}function L_(t,e){if(vh(t)){const{initial:r,animate:n}=t;return{initial:r===!1||Ac(r)?r:void 0,animate:Ac(n)?n:void 0}}return t.inherit!==!1?e:{}}function $_(t){const{initial:e,animate:r}=L_(t,S.useContext(uh));return S.useMemo(()=>({initial:e,animate:r}),[Wb(e),Wb(r)])}function Wb(t){return Array.isArray(t)?t.join(" "):t}const Di=t=>({isEnabled:e=>t.some(r=>!!e[r])}),Ec={measureLayout:Di(["layout","layoutId","drag"]),animation:Di(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Di(["exit"]),drag:Di(["drag","dragControls"]),focus:Di(["whileFocus"]),hover:Di(["whileHover","onHoverStart","onHoverEnd"]),tap:Di(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Di(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Di(["whileInView","onViewportEnter","onViewportLeave"])};function F_(t){for(const e in t)e==="projectionNodeConstructor"?Ec.projectionNodeConstructor=t[e]:Ec[e].Component=t[e]}function yh(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}const Bf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let j_=1;function U_(){return yh(()=>{if(Bf.hasEverUpdated)return j_++})}const Hg=S.createContext({});class z_ extends Wt.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}}const m8=S.createContext({}),V_=Symbol.for("motionComponentSymbol");function H_({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:i,Component:s}){t&&F_(t);function o(l,f){const c={...S.useContext(Vg),...l,layoutId:W_(l)},{isStatic:u}=c;let h=null;const v=$_(l),x=u?void 0:U_(),g=i(l,u);if(!u&&dh){v.visualElement=O_(s,g,c,e);const k=S.useContext(p8).strict,w=S.useContext(m8);v.visualElement&&(h=v.visualElement.loadFeatures(c,k,t,x,r||Ec.projectionNodeConstructor,w))}return S.createElement(z_,{visualElement:v.visualElement,props:c},h,S.createElement(uh.Provider,{value:v},n(s,l,x,B_(g,v.visualElement,f),g,u,v.visualElement)))}const a=S.forwardRef(o);return a[V_]=s,a}function W_({layoutId:t}){const e=S.useContext(Hg).id;return e&&t!==void 0?e+"-"+t:t}function q_(t){function e(n,i={}){return H_(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 G_=["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 Wg(t){return typeof t!="string"||t.includes("-")?!1:!!(G_.indexOf(t)>-1||/[A-Z]/.test(t))}const r0={};function K_(t){Object.assign(r0,t)}const n0=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ul=new Set(n0);function x8(t,{layout:e,layoutId:r}){return Ul.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!r0[t]||t==="opacity")}const nn=t=>!!(t!=null&&t.getVelocity),J_={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Q_=(t,e)=>n0.indexOf(t)-n0.indexOf(e);function Y_({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},i,s){let o="";e.sort(Q_);for(const a of e)o+=`${J_[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 b8(t){return t.startsWith("--")}const X_=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Al=(t,e,r)=>Math.min(Math.max(r,t),e),da={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Df={...da,transform:t=>Al(0,1,t)},_u={...da,default:1},Lf=t=>Math.round(t*1e5)/1e5,Sc=/(-)?([\d]*\.?[\d])+/g,Ey=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Z_=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function qc(t){return typeof t=="string"}const Gc=t=>({test:e=>qc(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Es=Gc("deg"),Ai=Gc("%"),pe=Gc("px"),eT=Gc("vh"),tT=Gc("vw"),qb={...Ai,parse:t=>Ai.parse(t)/100,transform:t=>Ai.transform(t*100)},Gb={...da,transform:Math.round},w8={borderWidth:pe,borderTopWidth:pe,borderRightWidth:pe,borderBottomWidth:pe,borderLeftWidth:pe,borderRadius:pe,radius:pe,borderTopLeftRadius:pe,borderTopRightRadius:pe,borderBottomRightRadius:pe,borderBottomLeftRadius:pe,width:pe,maxWidth:pe,height:pe,maxHeight:pe,size:pe,top:pe,right:pe,bottom:pe,left:pe,padding:pe,paddingTop:pe,paddingRight:pe,paddingBottom:pe,paddingLeft:pe,margin:pe,marginTop:pe,marginRight:pe,marginBottom:pe,marginLeft:pe,rotate:Es,rotateX:Es,rotateY:Es,rotateZ:Es,scale:_u,scaleX:_u,scaleY:_u,scaleZ:_u,skew:Es,skewX:Es,skewY:Es,distance:pe,translateX:pe,translateY:pe,translateZ:pe,x:pe,y:pe,z:pe,perspective:pe,transformPerspective:pe,opacity:Df,originX:qb,originY:qb,originZ:pe,zIndex:Gb,fillOpacity:Df,strokeOpacity:Df,numOctaves:Gb};function qg(t,e,r,n){const{style:i,vars:s,transform:o,transformKeys:a,transformOrigin:l}=t;a.length=0;let f=!1,c=!1,u=!0;for(const h in e){const v=e[h];if(b8(h)){s[h]=v;continue}const x=w8[h],g=X_(v,x);if(Ul.has(h)){if(f=!0,o[h]=g,a.push(h),!u)continue;v!==(x.default||0)&&(u=!1)}else h.startsWith("origin")?(c=!0,l[h]=g):i[h]=g}if(e.transform||(f||n?i.transform=Y_(t,r,u,n):i.transform&&(i.transform="none")),c){const{originX:h="50%",originY:v="50%",originZ:x=0}=l;i.transformOrigin=`${h} ${v} ${x}`}}const Gg=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function C8(t,e,r){for(const n in e)!nn(e[n])&&!x8(n,r)&&(t[n]=e[n])}function rT({transformTemplate:t},e,r){return S.useMemo(()=>{const n=Gg();return qg(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function nT(t,e,r){const n=t.style||{},i={};return C8(i,n,t),Object.assign(i,rT(t,e,r)),t.transformValues?t.transformValues(i):i}function iT(t,e,r){const n={},i=nT(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 sT=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 i0(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||sT.has(t)}let A8=t=>!i0(t);function oT(t){t&&(A8=e=>e.startsWith("on")?!i0(e):t(e))}try{oT(require("@emotion/is-prop-valid").default)}catch{}function aT(t,e,r){const n={};for(const i in t)i==="values"&&typeof t.values=="object"||(A8(i)||r===!0&&i0(i)||!e&&!i0(i)||t.draggable&&i.startsWith("onDrag"))&&(n[i]=t[i]);return n}function Kb(t,e,r){return typeof t=="string"?t:pe.transform(e+r*t)}function lT(t,e,r){const n=Kb(e,t.x,t.width),i=Kb(r,t.y,t.height);return`${n} ${i}`}const fT={offset:"stroke-dashoffset",array:"stroke-dasharray"},cT={offset:"strokeDashoffset",array:"strokeDasharray"};function uT(t,e,r=1,n=0,i=!0){t.pathLength=1;const s=i?fT:cT;t[s.offset]=pe.transform(-n);const o=pe.transform(e),a=pe.transform(r);t[s.array]=`${o} ${a}`}function Kg(t,{attrX:e,attrY:r,originX:n,originY:i,pathLength:s,pathSpacing:o=1,pathOffset:a=0,...l},f,c,u){if(qg(t,l,f,u),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:v,dimensions:x}=t;h.transform&&(x&&(v.transform=h.transform),delete h.transform),x&&(n!==void 0||i!==void 0||v.transform)&&(v.transformOrigin=lT(x,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&&uT(h,s,o,a,!1)}const E8=()=>({...Gg(),attrs:{}}),Jg=t=>typeof t=="string"&&t.toLowerCase()==="svg";function dT(t,e,r,n){const i=S.useMemo(()=>{const s=E8();return Kg(s,e,{enableHardwareAcceleration:!1},Jg(n),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};C8(s,t.style,t),i.style={...s,...i.style}}return i}function hT(t=!1){return(r,n,i,s,{latestValues:o},a)=>{const f=(Wg(r)?dT:iT)(n,o,a,r),u={...aT(n,typeof r=="string",t),...f,ref:s},{children:h}=n,v=S.useMemo(()=>nn(h)?h.get():h,[h]);return i&&(u["data-projection-id"]=i),S.createElement(r,{...u,children:v})}}const Qg=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function S8(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 k8=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 _8(t,e,r,n){S8(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(k8.has(i)?i:Qg(i),e.attrs[i])}function Yg(t,e){const{style:r}=t,n={};for(const i in r)(nn(r[i])||e.style&&nn(e.style[i])||x8(i,t))&&(n[i]=r[i]);return n}function T8(t,e){const r=Yg(t,e);for(const n in t)if(nn(t[n])||nn(e[n])){const i=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[i]=t[n]}return r}function Xg(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 s0=t=>Array.isArray(t),vT=t=>Boolean(t&&typeof t=="object"&&t.mix&&t.toValue),yT=t=>s0(t)?t[t.length-1]||0:t;function od(t){const e=nn(t)?t.get():t;return vT(e)?e.toValue():e}function pT({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,i,s){const o={latestValues:gT(n,i,s,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const P8=t=>(e,r)=>{const n=S.useContext(uh),i=S.useContext(Wc),s=()=>pT(t,e,n,i);return r?s():yh(s)};function gT(t,e,r,n){const i={},s=n(t,{});for(const h in s)i[h]=od(s[h]);let{initial:o,animate:a}=t;const l=vh(t),f=g8(t);e&&f&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=r?r.initial===!1:!1;c=c||o===!1;const u=c?a:o;return u&&typeof u!="boolean"&&!hh(u)&&(Array.isArray(u)?u:[u]).forEach(v=>{const x=Xg(t,v);if(!x)return;const{transitionEnd:g,transition:k,...w}=x;for(const A in w){let E=w[A];if(Array.isArray(E)){const I=c?E.length-1:0;E=E[I]}E!==null&&(i[A]=E)}for(const A in g)i[A]=g[A]}),i}const mT={useVisualState:P8({scrapeMotionValuesFromProps:T8,createRenderState:E8,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}}Kg(r,n,{enableHardwareAcceleration:!1},Jg(e.tagName),t.transformTemplate),_8(e,r)}})},xT={useVisualState:P8({scrapeMotionValuesFromProps:Yg,createRenderState:Gg})};function bT(t,{forwardMotionProps:e=!1},r,n,i){return{...Wg(t)?mT:xT,preloadedFeatures:r,useRender:hT(e),createVisualElement:n,projectionNodeConstructor:i,Component:t}}var We;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(We||(We={}));function Vo(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function o0(t,e,r,n){S.useEffect(()=>{const i=t.current;if(r&&i)return Vo(i,e,r,n)},[t,e,r,n])}function wT({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(We.Focus,!0),r.current=!0)},[n]),s=S.useCallback(()=>{!r.current||!n||(n.setActive(We.Focus,!1),r.current=!1)},[n]);o0(e,"focus",t?i:void 0),o0(e,"blur",t?s:void 0)}const I8=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function ph(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const R8=t=>e=>I8(e)&&t(e,ph(e));function al(t,e,r,n){return Vo(t,e,R8(r),n)}function a0(t,e,r,n){return o0(t,e,r&&R8(r),n)}function M8(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const Jb=M8("dragHorizontal"),Qb=M8("dragVertical");function N8(t){let e=!1;if(t==="y")e=Qb();else if(t==="x")e=Jb();else{const r=Jb(),n=Qb();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function O8(){const t=N8(!0);return t?(t(),!1):!0}function Yb(t,e,r,n){return(i,s)=>{i.type==="touch"||O8()||(r&&t.animationState&&t.animationState.setActive(We.Hover,e),n&&n(i,s))}}function CT({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){a0(n,"pointerenter",S.useMemo(()=>t||r?Yb(n,!0,Boolean(r),t):void 0,[t,Boolean(r),n]),{passive:!t}),a0(n,"pointerleave",S.useMemo(()=>e||r?Yb(n,!1,Boolean(r),e):void 0,[t,Boolean(r),n]),{passive:!e})}const B8=(t,e)=>e?t===e?!0:B8(t,e.parentElement):!1;function Zg(t){return S.useEffect(()=>()=>t(),[])}const AT=(t,e)=>r=>e(t(r)),gh=(...t)=>t.reduce(AT);function L1(t,e){if(!e)return;const r=new PointerEvent("pointer"+t);e(r,ph(r))}function ET({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),f={passive:!(e||t||r||s.onPointerDown)};function c(){l.current&&l.current(),l.current=null}function u(){return c(),a.current=!1,i.getProps().whileTap&&i.animationState&&i.animationState.setActive(We.Tap,!1),!O8()}function h(A,E){var I,M,$,j;u()&&(B8(i.current,A.target)?(j=($=i.getProps()).onTap)===null||j===void 0||j.call($,A,E):(M=(I=i.getProps()).onTapCancel)===null||M===void 0||M.call(I,A,E))}function v(A,E){var I,M;u()&&((M=(I=i.getProps()).onTapCancel)===null||M===void 0||M.call(I,A,E))}function x(A,E){var I;const M=i.getProps();M.whileTap&&i.animationState&&i.animationState.setActive(We.Tap,!0),(I=M.onTapStart)===null||I===void 0||I.call(M,A,E)}const g=[Boolean(e),Boolean(t),Boolean(n),i],k=S.useCallback((A,E)=>{c(),!a.current&&(a.current=!0,l.current=gh(al(window,"pointerup",h,f),al(window,"pointercancel",v,f)),x(A,E))},g);a0(i,"pointerdown",o?k:void 0,f);const w=S.useCallback(()=>{const A=Vo(i.current,"keydown",I=>{I.key!=="Enter"||a.current||(a.current=!0,l.current=Vo(i.current,"keyup",()=>{I.key!=="Enter"||!u()||L1("up",i.getProps().onTap)},f),L1("down",x))}),E=Vo(i.current,"blur",()=>{A(),E(),a.current&&L1("cancel",v)})},g);o0(i,"focus",o?w:void 0),Zg(c)}const Sy=new WeakMap,$1=new WeakMap,ST=t=>{const e=Sy.get(t.target);e&&e(t)},kT=t=>{t.forEach(ST)};function _T({root:t,...e}){const r=t||document;$1.has(r)||$1.set(r,{});const n=$1.get(r),i=JSON.stringify(e);return n[i]||(n[i]=new IntersectionObserver(kT,{root:t,...e})),n[i]}function TT(t,e,r){const n=_T(e);return Sy.set(t,r),n.observe(t),()=>{Sy.delete(t),n.unobserve(t)}}function PT({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:i={}}){const s=S.useRef({hasEnteredView:!1,isInView:!1});let o=Boolean(e||r||n);i.once&&s.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?MT:RT)(o,s.current,t,i)}const IT={some:0,all:1};function RT(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:IT[s]},l=f=>{const{isIntersecting:c}=f;if(e.isInView===c||(e.isInView=c,o&&!c&&e.hasEnteredView))return;c&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(We.InView,c);const u=r.getProps(),h=c?u.onViewportEnter:u.onViewportLeave;h&&h(f)};return TT(r.current,a,l)},[t,n,i,s])}function MT(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(We.InView,!0)})},[t])}const Ns=t=>e=>(t(e),null),NT={inView:Ns(PT),tap:Ns(ET),focus:Ns(wT),hover:Ns(CT)};function D8(){const t=S.useContext(Wc);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 L8(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),BT=t=>/^0[^.\s]+$/.test(t),Yi={delta:0,timestamp:0},$8=1/60*1e3,DT=typeof performance<"u"?()=>performance.now():()=>Date.now(),F8=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(DT()),$8);function LT(t){let e=[],r=[],n=0,i=!1,s=!1;const o=new WeakSet,a={schedule:(l,f=!1,c=!1)=>{const u=c&&i,h=u?e:r;return f&&o.add(l),h.indexOf(l)===-1&&(h.push(l),u&&i&&(n=e.length)),l},cancel:l=>{const f=r.indexOf(l);f!==-1&&r.splice(f,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 f=0;f(t[e]=LT(()=>kc=!0),t),{}),Ir=Kc.reduce((t,e)=>{const r=mh[e];return t[e]=(n,i=!1,s=!1)=>(kc||jT(),r.schedule(n,i,s)),t},{}),Xs=Kc.reduce((t,e)=>(t[e]=mh[e].cancel,t),{}),F1=Kc.reduce((t,e)=>(t[e]=()=>mh[e].process(Yi),t),{}),FT=t=>mh[t].process(Yi),j8=t=>{kc=!1,Yi.delta=ky?$8:Math.max(Math.min(t-Yi.timestamp,$T),1),Yi.timestamp=t,_y=!0,Kc.forEach(FT),_y=!1,kc&&(ky=!1,F8(j8))},jT=()=>{kc=!0,ky=!0,_y||F8(j8)};function em(t,e){t.indexOf(e)===-1&&t.push(e)}function tm(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class rm{constructor(){this.subscriptions=[]}add(e){return em(this.subscriptions,e),()=>tm(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 zT{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}=Yi;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,Ir.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=()=>Ir.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=UT(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new rm);const n=this.events[e].add(r);return e==="change"?()=>{n(),Ir.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?nm(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 El(t,e){return new zT(t,e)}const im=(t,e)=>r=>Boolean(qc(r)&&Z_.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),U8=(t,e,r)=>n=>{if(!qc(n))return n;const[i,s,o,a]=n.match(Sc);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},VT=t=>Al(0,255,t),j1={...da,transform:t=>Math.round(VT(t))},$o={test:im("rgb","red"),parse:U8("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+j1.transform(t)+", "+j1.transform(e)+", "+j1.transform(r)+", "+Lf(Df.transform(n))+")"};function HT(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 Ty={test:im("#"),parse:HT,transform:$o.transform},Ya={test:im("hsl","hue"),parse:U8("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+Ai.transform(Lf(e))+", "+Ai.transform(Lf(r))+", "+Lf(Df.transform(n))+")"},$r={test:t=>$o.test(t)||Ty.test(t)||Ya.test(t),parse:t=>$o.test(t)?$o.parse(t):Ya.test(t)?Ya.parse(t):Ty.parse(t),transform:t=>qc(t)?t:t.hasOwnProperty("red")?$o.transform(t):Ya.transform(t)},z8="${c}",V8="${n}";function WT(t){var e,r;return isNaN(t)&&qc(t)&&(((e=t.match(Sc))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(Ey))===null||r===void 0?void 0:r.length)||0)>0}function l0(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const i=t.match(Ey);i&&(r=i.length,t=t.replace(Ey,z8),e.push(...i.map($r.parse)));const s=t.match(Sc);return s&&(n=s.length,t=t.replace(Sc,V8),e.push(...s.map(da.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function H8(t){return l0(t).values}function W8(t){const{values:e,numColors:r,tokenised:n}=l0(t),i=e.length;return s=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function GT(t){const e=H8(t);return W8(t)(e.map(qT))}const Zs={test:WT,parse:H8,createTransformer:W8,getAnimatableNone:GT},KT=new Set(["brightness","contrast","saturate","opacity"]);function JT(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(Sc)||[];if(!n)return t;const i=r.replace(n,"");let s=KT.has(e)?1:0;return n!==r&&(s*=100),e+"("+s+i+")"}const QT=/([a-z-]*)\(.*?\)/g,Py={...Zs,getAnimatableNone:t=>{const e=t.match(QT);return e?e.map(JT).join(" "):t}},YT={...w8,color:$r,backgroundColor:$r,outlineColor:$r,fill:$r,stroke:$r,borderColor:$r,borderTopColor:$r,borderRightColor:$r,borderBottomColor:$r,borderLeftColor:$r,filter:Py,WebkitFilter:Py},sm=t=>YT[t];function om(t,e){var r;let n=sm(t);return n!==Py&&(n=Zs),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const q8=t=>e=>e.test(t),XT={test:t=>t==="auto",parse:t=>t},G8=[da,pe,Ai,Es,tT,eT,XT],cf=t=>G8.find(q8(t)),ZT=[...G8,$r,Zs],eP=t=>ZT.find(q8(t));function tP(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function rP(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function xh(t,e,r){const n=t.getProps();return Xg(n,e,r!==void 0?r:n.custom,tP(t),rP(t))}function nP(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,El(r))}function iP(t,e){const r=xh(t,e);let{transitionEnd:n={},transition:i={},...s}=r?t.makeTargetAnimatable(r,!1):{};s={...s,...n};for(const o in s){const a=yT(s[o]);nP(t,o,a)}}function sP(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,uP={current:!1},am=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,lm=t=>e=>1-t(1-e),fm=t=>t*t,dP=lm(fm),cm=am(fm),Ft=(t,e,r)=>-r*t+r*e+t;function U1(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 hP({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=U1(l,a,t+1/3),s=U1(l,a,t),o=U1(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}const z1=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},vP=[Ty,$o,Ya],yP=t=>vP.find(e=>e.test(t));function Xb(t){const e=yP(t);let r=e.parse(t);return e===Ya&&(r=hP(r)),r}const K8=(t,e)=>{const r=Xb(t),n=Xb(e),i={...r};return s=>(i.red=z1(r.red,n.red,s),i.green=z1(r.green,n.green,s),i.blue=z1(r.blue,n.blue,s),i.alpha=Ft(r.alpha,n.alpha,s),$o.transform(i))};function J8(t,e){return typeof t=="number"?r=>Ft(t,e,r):$r.test(t)?K8(t,e):Y8(t,e)}const Q8=(t,e)=>{const r=[...t],n=r.length,i=t.map((s,o)=>J8(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]=J8(t[i],e[i]));return i=>{for(const s in n)r[s]=n[s](i);return r}},Y8=(t,e)=>{const r=Zs.createTransformer(e),n=l0(t),i=l0(e);return n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?gh(Q8(n.values,i.values),r):o=>`${o>0?e:t}`},u0=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},Zb=(t,e)=>r=>Ft(t,e,r);function gP(t){return typeof t=="number"?Zb:typeof t=="string"?$r.test(t)?K8:Y8:Array.isArray(t)?Q8:typeof t=="object"?pP:Zb}function mP(t,e,r){const n=[],i=r||gP(t[0]),s=t.length-1;for(let o=0;ot[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=mP(e,n,i),a=o.length,l=f=>{let c=0;if(a>1)for(;cl(Al(t[0],t[s-1],f)):l}const um=t=>t,Z8=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,xP=1e-7,bP=12;function wP(t,e,r,n,i){let s,o,a=0;do o=e+(r-e)/2,s=Z8(o,n,i)-t,s>0?r=o:e=o;while(Math.abs(s)>xP&&++awP(s,0,1,t,r);return s=>s===0||s===1?s:Z8(i(s),e,n)}const t4=t=>1-Math.sin(Math.acos(t)),dm=lm(t4),CP=am(dm),r4=e4(.33,1.53,.69,.99),hm=lm(r4),AP=am(hm),EP=t=>(t*=2)<1?.5*hm(t):.5*(2-Math.pow(2,-10*(t-1))),SP={linear:um,easeIn:fm,easeInOut:cm,easeOut:dP,circIn:t4,circInOut:CP,circOut:dm,backIn:hm,backInOut:AP,backOut:r4,anticipate:EP},e2=t=>{if(Array.isArray(t)){c0(t.length===4);const[e,r,n,i]=t;return e4(e,r,n,i)}else if(typeof t=="string")return SP[t];return t},kP=t=>Array.isArray(t)&&typeof t[0]!="number";function _P(t,e){return t.map(()=>e||cm).splice(0,t.length-1)}function TP(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function PP(t,e){return t.map(r=>r*e)}function Iy({keyframes:t,ease:e=cm,times:r,duration:n=300}){t=[...t];const i=kP(e)?e.map(e2):e2(e),s={done:!1,value:t[0]},o=PP(r&&r.length===t.length?r:TP(t),n);function a(){return X8(o,t,{ease:Array.isArray(i)?i:_P(t,i)})}let l=a();return{next:f=>(s.value=l(f),s.done=f>=n,s),flipTarget:()=>{t.reverse(),l=a()}}}const V1=.001,IP=.01,t2=10,RP=.05,MP=1;function NP({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s;cP(t<=t2*1e3);let o=1-e;o=Al(RP,MP,o),t=Al(IP,t2,t/1e3),o<1?(i=f=>{const c=f*o,u=c*t,h=c-r,v=Ry(f,o),x=Math.exp(-u);return V1-h/v*x},s=f=>{const u=f*o*t,h=u*r+r,v=Math.pow(o,2)*Math.pow(f,2)*t,x=Math.exp(-u),g=Ry(Math.pow(f,2),o);return(-i(f)+V1>0?-1:1)*((h-v)*x)/g}):(i=f=>{const c=Math.exp(-f*t),u=(f-r)*t+1;return-V1+c*u},s=f=>{const c=Math.exp(-f*t),u=(r-f)*(t*t);return c*u});const a=5/t,l=BP(i,s,a);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{const f=Math.pow(l,2)*n;return{stiffness:f,damping:o*2*Math.sqrt(n*f),duration:t}}}const OP=12;function BP(t,e,r){let n=r;for(let i=1;it[r]!==void 0)}function $P(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!r2(t,LP)&&r2(t,DP)){const r=NP(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const FP=5;function n4({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:f,velocity:c,duration:u,isResolvedFromDuration:h}=$P(n);let v=jP,x=c?-(c/1e3):0;const g=l/(2*Math.sqrt(a*f));function k(){const w=s-i,A=Math.sqrt(a/f)/1e3,E=Math.abs(w)<5;if(r||(r=E?.01:2),e||(e=E?.005:.5),g<1){const I=Ry(A,g);v=M=>{const $=Math.exp(-g*A*M);return s-$*((x+g*A*w)/I*Math.sin(I*M)+w*Math.cos(I*M))}}else if(g===1)v=I=>s-Math.exp(-A*I)*(w+(x+A*w)*I);else{const I=A*Math.sqrt(g*g-1);v=M=>{const $=Math.exp(-g*A*M),j=Math.min(I*M,300);return s-$*((x+g*A*w)*Math.sinh(j)+I*w*Math.cosh(j))/I}}}return k(),{next:w=>{const A=v(w);if(h)o.done=w>=u;else{let E=x;if(w!==0)if(g<1){const $=Math.max(0,w-FP);E=nm(A-v($),w-$)}else E=0;const I=Math.abs(E)<=r,M=Math.abs(s-A)<=e;o.done=I&&M}return o.value=o.done?s:A,o},flipTarget:()=>{x=-x,[i,s]=[s,i],k()}}}n4.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const jP=t=>0;function UP({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 f=o+l,c=s===void 0?f:s(f);return c!==f&&(l=c-o),{next:u=>{const h=-l*Math.exp(-u/n);return a.done=!(h>i||h<-i),a.value=a.done?c:c+h,a},flipTarget:()=>{}}}const zP={decay:UP,keyframes:Iy,tween:Iy,spring:n4};function i4(t,e,r=0){return t-e-r}function VP(t,e=0,r=0,n=!0){return n?i4(e+-t,e,r):e-(t-e)+r}function HP(t,e,r,n){return n?t>=e+r:t<=-r}const WP=t=>{const e=({delta:r})=>t(r);return{start:()=>Ir.update(e,!0),stop:()=>Xs.update(e)}};function d0({duration:t,driver:e=WP,elapsed:r=0,repeat:n=0,repeatType:i="loop",repeatDelay:s=0,keyframes:o,autoplay:a=!0,onPlay:l,onStop:f,onComplete:c,onRepeat:u,onUpdate:h,type:v="keyframes",...x}){var g,k;const w=r;let A,E=0,I=t,M=!1,$=!0,j;const U=zP[o.length>2?"keyframes":v]||Iy,W=o[0],q=o[o.length-1];let G={done:!1,value:W};!((k=(g=U).needsInterpolation)===null||k===void 0)&&k.call(g,W,q)&&(j=X8([0,100],[W,q],{clamp:!1}),o=[0,100]);const re=U({...x,duration:t,keyframes:o});function D(){E++,i==="reverse"?($=E%2===0,r=VP(r,I,s,$)):(r=i4(r,I,s),i==="mirror"&&re.flipTarget()),M=!1,u&&u()}function y(){A&&A.stop(),c&&c()}function C(O){$||(O=-O),r+=O,M||(G=re.next(Math.max(0,r)),j&&(G.value=j(G.value)),M=$?G.done:r<=0),h&&h(G.value),M&&(E===0&&(I=I!==void 0?I:r),E{f&&f(),A&&A.stop()},set currentTime(O){r=w,C(O)},sample:O=>{r=w;const m=t&&typeof t=="number"?Math.max(t*.5,50):50;let T=0;for(C(0);T<=O;){const R=O-T;C(Math.min(R,m)),T+=m}return G}}}function qP(t){return!t||Array.isArray(t)||typeof t=="string"&&s4[t]}const Af=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,s4={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Af([0,.65,.55,1]),circOut:Af([.55,0,1,.45]),backIn:Af([.31,.01,.66,-.59]),backOut:Af([.33,1.53,.69,.99])};function GP(t){if(t)return Array.isArray(t)?Af(t):s4[t]}function KP(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:GP(a),fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const n2={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},H1={},o4={};for(const t in n2)o4[t]=()=>(H1[t]===void 0&&(H1[t]=n2[t]()),H1[t]);function JP(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const QP=new Set(["opacity"]),Tu=10;function YP(t,e,{onUpdate:r,onComplete:n,...i}){if(!(o4.waapi()&&QP.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:l=0,ease:f}=i;if(i.type==="spring"||!qP(i.ease)){if(i.repeat===1/0)return;const u=d0({...i,elapsed:0});let h={done:!1,value:o[0]};const v=[];let x=0;for(;!h.done&&x<2e4;)h=u.sample(x),v.push(h.value),x+=Tu;o=v,a=x-Tu,f="linear"}const c=KP(t.owner.current,e,o,{...i,delay:-l,duration:a,ease:f});return c.onfinish=()=>{t.set(JP(o,i)),Ir.update(()=>c.cancel()),n&&n()},{get currentTime(){return c.currentTime||0},set currentTime(u){c.currentTime=u},stop:()=>{const{currentTime:u}=c;if(u){const h=d0({...i,autoplay:!1});t.setWithVelocity(h.sample(u-Tu).value,h.sample(u).value,Tu)}Ir.update(()=>c.cancel())}}}function a4(t,e){const r=performance.now(),n=({timestamp:i})=>{const s=i-r;s>=e&&(Xs.read(n),t(s-e))};return Ir.read(n,!0),()=>Xs.read(n)}function XP({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const i=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:a4(i,-e)}:i()}function ZP({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:f,driver:c,onUpdate:u,onComplete:h,onStop:v}){const x=t[0];let g;function k(I){return r!==void 0&&In}function w(I){return r===void 0?n:n===void 0||Math.abs(r-I){var $;u==null||u(M),($=I.onUpdate)===null||$===void 0||$.call(I,M)},onComplete:h,onStop:v})}function E(I){A({type:"spring",stiffness:o,damping:a,restDelta:l,...I})}if(k(x))E({velocity:e,keyframes:[x,w(x)]});else{let I=i*e+x;typeof f<"u"&&(I=f(I));const M=w(I),$=M===r?-1:1;let j,U;const W=q=>{j=U,U=q,e=nm(q-j,Yi.delta),($===1&&q>M||$===-1&&qg==null?void 0:g.stop()}}const Ao=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Pu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),W1=()=>({type:"keyframes",ease:"linear",duration:.3}),eI={type:"keyframes",duration:.8},i2={x:Ao,y:Ao,z:Ao,rotate:Ao,rotateX:Ao,rotateY:Ao,rotateZ:Ao,scaleX:Pu,scaleY:Pu,scale:Pu,opacity:W1,backgroundColor:W1,color:W1,default:Pu},tI=(t,{keyframes:e})=>e.length>2?eI:(i2[t]||i2.default)(e[1]),My=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Zs.test(e)&&!e.startsWith("url("));function rI({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:f,...c}){return!!Object.keys(c).length}function s2(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function o2(t){return typeof t=="number"?0:om("",t)}function l4(t,e){return t[e]||t.default||t}function nI(t,e,r,n){const i=My(e,r);let s=n.from!==void 0?n.from:t.get();return s==="none"&&i&&typeof r=="string"?s=om(e,r):s2(s)&&typeof r=="string"?s=o2(r):!Array.isArray(r)&&s2(r)&&typeof s=="string"&&(r=o2(s)),Array.isArray(r)?(r[0]===null&&(r[0]=s),r):[s,r]}const vm=(t,e,r,n={})=>i=>{const s=l4(n,t)||{},o=s.delay||n.delay||0;let{elapsed:a=0}=n;a=a-ad(o);const l=nI(e,t,r,s),f=l[0],c=l[l.length-1],u=My(t,f),h=My(t,c);let v={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||uP.current||s.type===!1)return XP(v);if(s.type==="inertia")return ZP(v);rI(s)||(v={...v,...tI(t,v)}),v.duration&&(v.duration=ad(v.duration)),v.repeatDelay&&(v.repeatDelay=ad(v.repeatDelay));const x=e.owner,g=x&&x.current;if(x&&g instanceof HTMLElement&&!(x!=null&&x.getProps().onUpdate)){const k=YP(e,t,v);if(k)return k}return d0(v)};function iI(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const i=e.map(s=>Ny(t,s,r));n=Promise.all(i)}else if(typeof e=="string")n=Ny(t,e,r);else{const i=typeof e=="function"?xh(t,e,r.custom):e;n=f4(t,i,r)}return n.then(()=>t.notify("AnimationComplete",e))}function Ny(t,e,r={}){var n;const i=xh(t,e,r.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(s=r.transitionOverride);const o=i?()=>f4(t,i,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(f=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:h}=s;return sI(t,e,c+f,u,h,r)}:()=>Promise.resolve(),{when:l}=s;if(l){const[f,c]=l==="beforeChildren"?[o,a]:[a,o];return f().then(c)}else return Promise.all([o(),a(r.delay)])}function f4(t,e,{delay:r=0,transitionOverride:n,type:i}={}){var s;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const f=t.getValue("willChange");n&&(o=n);const c=[],u=i&&((s=t.animationState)===null||s===void 0?void 0:s.getState()[i]);for(const h in l){const v=t.getValue(h),x=l[h];if(!v||x===void 0||u&&aI(u,h))continue;const g={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!v.hasAnimated){const w=t.getProps()[fP];w&&(g.elapsed=window.HandoffAppearAnimations(w,h,v,Ir))}let k=v.start(vm(h,v,x,t.shouldReduceMotion&&Ul.has(h)?{type:!1}:g));f0(f)&&(f.add(h),k=k.then(()=>f.remove(h))),c.push(k)}return Promise.all(c).then(()=>{a&&iP(t,a)})}function sI(t,e,r=0,n=0,i=1,s){const o=[],a=(t.variantChildren.size-1)*n,l=i===1?(f=0)=>f*n:(f=0)=>a-f*n;return Array.from(t.variantChildren).sort(oI).forEach((f,c)=>{f.notify("AnimationStart",e),o.push(Ny(f,e,{...s,delay:r+l(c)}).then(()=>f.notify("AnimationComplete",e)))}),Promise.all(o)}function oI(t,e){return t.sortNodePosition(e)}function aI({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const ym=[We.Animate,We.InView,We.Focus,We.Hover,We.Tap,We.Drag,We.Exit],lI=[...ym].reverse(),fI=ym.length;function cI(t){return e=>Promise.all(e.map(({animation:r,options:n})=>iI(t,r,n)))}function uI(t){let e=cI(t);const r=hI();let n=!0;const i=(l,f)=>{const c=xh(t,f);if(c){const{transition:u,transitionEnd:h,...v}=c;l={...l,...v,...h}}return l};function s(l){e=l(t)}function o(l,f){const c=t.getProps(),u=t.getVariantContext(!0)||{},h=[],v=new Set;let x={},g=1/0;for(let w=0;wg&&M;const q=Array.isArray(I)?I:[I];let G=q.reduce(i,{});$===!1&&(G={});const{prevResolvedValues:re={}}=E,D={...re,...G},y=C=>{W=!0,v.delete(C),E.needsAnimating[C]=!0};for(const C in D){const P=G[C],O=re[C];x.hasOwnProperty(C)||(P!==O?s0(P)&&s0(O)?!L8(P,O)||U?y(C):E.protectedKeys[C]=!0:P!==void 0?y(C):v.add(C):P!==void 0&&v.has(C)?y(C):E.protectedKeys[C]=!0)}E.prevProp=I,E.prevResolvedValues=G,E.isActive&&(x={...x,...G}),n&&t.blockInitialAnimation&&(W=!1),W&&!j&&h.push(...q.map(C=>({animation:C,options:{type:A,...l}})))}if(v.size){const w={};v.forEach(A=>{const E=t.getBaseTarget(A);E!==void 0&&(w[A]=E)}),h.push({animation:w})}let k=Boolean(h.length);return n&&c.initial===!1&&!t.manuallyAnimateOnMount&&(k=!1),n=!1,k?e(h):Promise.resolve()}function a(l,f,c){var u;if(r[l].isActive===f)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(v=>{var x;return(x=v.animationState)===null||x===void 0?void 0:x.setActive(l,f)}),r[l].isActive=f;const h=o(c,l);for(const v in r)r[v].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>r}}function dI(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!L8(e,t):!1}function Eo(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function hI(){return{[We.Animate]:Eo(!0),[We.InView]:Eo(),[We.Hover]:Eo(),[We.Tap]:Eo(),[We.Drag]:Eo(),[We.Focus]:Eo(),[We.Exit]:Eo()}}const vI={animation:Ns(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=uI(t)),hh(e)&&S.useEffect(()=>e.subscribe(t),[e])}),exit:Ns(t=>{const{custom:e,visualElement:r}=t,[n,i]=D8(),s=S.useContext(Wc);S.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(We.Exit,!n,{custom:s&&s.custom||e});o&&!n&&o.then(i)},[n])})},a2=(t,e)=>Math.abs(t-e);function yI(t,e){const r=a2(t.x,e.x),n=a2(t.y,e.y);return Math.sqrt(r**2+n**2)}class c4{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 f=G1(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,u=yI(f.offset,{x:0,y:0})>=3;if(!c&&!u)return;const{point:h}=f,{timestamp:v}=Yi;this.history.push({...h,timestamp:v});const{onStart:x,onMove:g}=this.handlers;c||(x&&x(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,f)},this.handlePointerMove=(f,c)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=q1(c,this.transformPagePoint),Ir.update(this.updatePoint,!0)},this.handlePointerUp=(f,c)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:h}=this.handlers,v=G1(f.type==="pointercancel"?this.lastMoveEventInfo:q1(c,this.transformPagePoint),this.history);this.startEvent&&u&&u(f,v),h&&h(f,v)},!I8(e))return;this.handlers=r,this.transformPagePoint=n;const i=ph(e),s=q1(i,this.transformPagePoint),{point:o}=s,{timestamp:a}=Yi;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=r;l&&l(e,G1(s,this.history)),this.removeListeners=gh(al(window,"pointermove",this.handlePointerMove),al(window,"pointerup",this.handlePointerUp),al(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Xs.update(this.updatePoint)}}function q1(t,e){return e?{point:e(t.point)}:t}function l2(t,e){return{x:t.x-e.x,y:t.y-e.y}}function G1({point:t},e){return{point:t,delta:l2(t,u4(e)),offset:l2(t,pI(e)),velocity:gI(e,.1)}}function pI(t){return t[0]}function u4(t){return t[t.length-1]}function gI(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const i=u4(t);for(;r>=0&&(n=t[r],!(i.timestamp-n.timestamp>ad(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 mn(t){return t.max-t.min}function Oy(t,e=0,r=.01){return Math.abs(t-e)<=r}function f2(t,e,r,n=.5){t.origin=n,t.originPoint=Ft(e.min,e.max,t.origin),t.scale=mn(r)/mn(e),(Oy(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Ft(r.min,r.max,t.origin)-t.originPoint,(Oy(t.translate)||isNaN(t.translate))&&(t.translate=0)}function $f(t,e,r,n){f2(t.x,e.x,r.x,n==null?void 0:n.originX),f2(t.y,e.y,r.y,n==null?void 0:n.originY)}function c2(t,e,r){t.min=r.min+e.min,t.max=t.min+mn(e)}function mI(t,e,r){c2(t.x,e.x,r.x),c2(t.y,e.y,r.y)}function u2(t,e,r){t.min=e.min-r.min,t.max=t.min+mn(e)}function Ff(t,e,r){u2(t.x,e.x,r.x),u2(t.y,e.y,r.y)}function xI(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?Ft(r,t,n.max):Math.min(t,r)),t}function d2(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 bI(t,{top:e,left:r,bottom:n,right:i}){return{x:d2(t.x,r,i),y:d2(t.y,e,n)}}function h2(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=u0(e.min,e.max-n,t.min):n>i&&(r=u0(t.min,t.max-i,e.min)),Al(0,1,r)}function AI(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 By=.35;function EI(t=By){return t===!1?t=0:t===!0&&(t=By),{x:v2(t,"left","right"),y:v2(t,"top","bottom")}}function v2(t,e,r){return{min:y2(t,e),max:y2(t,r)}}function y2(t,e){return typeof t=="number"?t:t[e]||0}const p2=()=>({translate:0,scale:1,origin:0,originPoint:0}),jf=()=>({x:p2(),y:p2()}),g2=()=>({min:0,max:0}),tr=()=>({x:g2(),y:g2()});function di(t){return[t("x"),t("y")]}function d4({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function SI({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 K1(t){return t===void 0||t===1}function Dy({scale:t,scaleX:e,scaleY:r}){return!K1(t)||!K1(e)||!K1(r)}function To(t){return Dy(t)||h4(t)||t.z||t.rotate||t.rotateX||t.rotateY}function h4(t){return m2(t.x)||m2(t.y)}function m2(t){return t&&t!=="0%"}function h0(t,e,r){const n=t-r,i=e*n;return r+i}function x2(t,e,r,n,i){return i!==void 0&&(t=h0(t,i,n)),h0(t,r,n)+e}function Ly(t,e=0,r=1,n,i){t.min=x2(t.min,e,r,n,i),t.max=x2(t.max,e,r,n,i)}function v4(t,{x:e,y:r}){Ly(t.x,e.translate,e.scale,e.originPoint),Ly(t.y,r.translate,r.scale,r.originPoint)}function _I(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 f=0;f1.0000000000001||t<.999999999999?t:1}function Ts(t,e){t.min=t.min+e,t.max=t.max+e}function w2(t,e,[r,n,i]){const s=e[i]!==void 0?e[i]:.5,o=Ft(t.min,t.max,s);Ly(t,e[r],e[n],o,e.scale)}const TI=["x","scaleX","originX"],PI=["y","scaleY","originY"];function Xa(t,e){w2(t.x,e,TI),w2(t.y,e,PI)}function y4(t,e){return d4(kI(t.getBoundingClientRect(),e))}function II(t,e,r){const n=y4(t,r),{scroll:i}=e;return i&&(Ts(n.x,i.offset.x),Ts(n.y,i.offset.y)),n}const RI=new WeakMap;class MI{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=tr(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(ph(a,"page").point)},i=(a,l)=>{var f;const{drag:c,dragPropagation:u,onDragStart:h}=this.getProps();c&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=N8(c),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),di(v=>{var x,g;let k=this.getAxisMotionValue(v).get()||0;if(Ai.test(k)){const w=(g=(x=this.visualElement.projection)===null||x===void 0?void 0:x.layout)===null||g===void 0?void 0:g.layoutBox[v];w&&(k=mn(w)*(parseFloat(k)/100))}this.originPoint[v]=k}),h==null||h(a,l),(f=this.visualElement.animationState)===null||f===void 0||f.setActive(We.Drag,!0))},s=(a,l)=>{const{dragPropagation:f,dragDirectionLock:c,onDirectionLock:u,onDrag:h}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:v}=l;if(c&&this.currentDirection===null){this.currentDirection=NI(v),this.currentDirection!==null&&(u==null||u(this.currentDirection));return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),h==null||h(a,l)},o=(a,l)=>this.stop(a,l);this.panSession=new c4(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(We.Drag,!1)}updateAxis(e,r,n){const{drag:i}=this.getProps();if(!n||!Iu(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=xI(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&&Qa(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=bI(n.layoutBox,e):this.constraints=!1,this.elastic=EI(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&di(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=AI(n.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!Qa(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=II(n,i.root,this.visualElement.getTransformPagePoint());let o=wI(i.layout.layoutBox,s);if(r){const a=r(SI(o));this.hasMutatedConstraints=!!a,a&&(o=d4(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},f=di(c=>{if(!Iu(c,r,this.currentDirection))return;let u=(l==null?void 0:l[c])||{};o&&(u={min:0,max:0});const h=i?200:1e6,v=i?40:1e7,x={type:"inertia",velocity:n?e[c]:0,bounceStiffness:h,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(c,x)});return Promise.all(f).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(vm(e,n,0,r))}stopAnimation(){di(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){di(r=>{const{drag:n}=this.getProps();if(!Iu(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]-Ft(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Qa(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};di(a=>{const l=this.getAxisMotionValue(a);if(l){const f=l.get();s[a]=CI({min:f,max:f},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(),di(a=>{if(!Iu(a,r,null))return;const l=this.getAxisMotionValue(a),{min:f,max:c}=this.constraints[a];l.set(Ft(f,c,s[a]))})}addListeners(){var e;if(!this.visualElement.current)return;RI.set(this.visualElement,this);const r=this.visualElement.current,n=al(r,"pointerdown",f=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(f)}),i=()=>{const{dragConstraints:f}=this.getProps();Qa(f)&&(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=Vo(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:f,hasLayoutChanged:c})=>{this.isDragging&&c&&(di(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=f[u].translate,h.set(h.get()+f[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=By,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Iu(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function NI(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function OI(t){const{dragControls:e,visualElement:r}=t,n=yh(()=>new MI(r));S.useEffect(()=>e&&e.subscribe(n),[n,e]),S.useEffect(()=>n.addListeners(),[n])}function BI({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:i}){const s=t||e||r||n,o=S.useRef(null),{transformPagePoint:a}=S.useContext(Vg),l={onSessionStart:n,onStart:e,onMove:t,onEnd:(c,u)=>{o.current=null,r&&r(c,u)}};S.useEffect(()=>{o.current!==null&&o.current.updateHandlers(l)});function f(c){o.current=new c4(c,l,{transformPagePoint:a})}a0(i,"pointerdown",s&&f),Zg(()=>o.current&&o.current.end())}const DI={pan:Ns(BI),drag:Ns(OI)};function $y(t){return typeof t=="string"&&t.startsWith("var(--")}const p4=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function LI(t){const e=p4.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function Fy(t,e,r=1){const[n,i]=LI(t);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);return s?s.trim():$y(i)?Fy(i,e,r+1):i}function $I(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(!$y(s))return;const o=Fy(s,n);o&&i.set(o)});for(const i in e){const s=e[i];if(!$y(s))continue;const o=Fy(s,n);o&&(e[i]=o,r&&r[i]===void 0&&(r[i]=s))}return{target:e,transitionEnd:r}}const FI=new Set(["width","height","top","left","right","bottom","x","y"]),g4=t=>FI.has(t),jI=t=>Object.keys(t).some(g4),C2=t=>t===da||t===pe;var A2;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(A2||(A2={}));const E2=(t,e)=>parseFloat(t.split(", ")[e]),S2=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/);if(i)return E2(i[1],e);{const s=n.match(/^matrix\((.+)\)$/);return s?E2(s[1],t):0}},UI=new Set(["x","y","z"]),zI=n0.filter(t=>!UI.has(t));function VI(t){const e=[];return zI.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 k2={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:S2(4,13),y:S2(5,14)},HI=(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(f=>{a[f]=k2[f](n,s)}),e.render();const l=e.measureViewportBox();return r.forEach(f=>{const c=e.getValue(f);c&&c.jump(a[f]),t[f]=k2[f](l,s)}),t},WI=(t,e,r={},n={})=>{e={...e},n={...n};const i=Object.keys(e).filter(g4);let s=[],o=!1;const a=[];if(i.forEach(l=>{const f=t.getValue(l);if(!t.hasValue(l))return;let c=r[l],u=cf(c);const h=e[l];let v;if(s0(h)){const x=h.length,g=h[0]===null?1:0;c=h[g],u=cf(c);for(let k=g;k=0?window.pageYOffset:null,f=HI(e,t,a);return s.length&&s.forEach(([c,u])=>{t.getValue(c).set(u)}),t.render(),dh&&l!==null&&window.scrollTo({top:l}),{target:f,transitionEnd:n}}else return{target:e,transitionEnd:n}};function qI(t,e,r,n){return jI(e)?WI(t,e,r,n):{target:e,transitionEnd:n}}const GI=(t,e,r,n)=>{const i=$I(t,e,n);return e=i.target,n=i.transitionEnd,qI(t,e,r,n)},jy={current:null},m4={current:!1};function KI(){if(m4.current=!0,!!dh)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>jy.current=t.matches;t.addListener(e),e()}else jy.current=!1}function JI(t,e,r){const{willChange:n}=e;for(const i in e){const s=e[i],o=r[i];if(nn(s))t.addValue(i,s),f0(n)&&n.add(i);else if(nn(o))t.addValue(i,El(s,{owner:t})),f0(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,El(a!==void 0?a:s,{owner:t}))}}for(const i in r)e[i]===void 0&&t.removeValue(i);return e}const x4=Object.keys(Ec),QI=x4.length,_2=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class YI{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=()=>Ir.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=vh(r),this.isVariantNode=g8(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...f}=this.scrapeMotionValuesFromProps(r,{});for(const c in f){const u=f[c];o[c]!==void 0&&nn(u)&&(u.set(o[c],!1),f0(l)&&l.add(c))}}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)),m4.current||KI(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:jy.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(),Xs.update(this.notifyUpdate),Xs.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=Ul.has(e),i=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Ir.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 f=0;fthis.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:a,layoutScroll:v,layoutRoot:x})}return l}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):tr()}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;n<_2.length;n++){const i=_2[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s=e["on"+i];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=JI(this,this.scrapeMotionValuesFromProps(e,r),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){var r;return(r=this.props.variants)===null||r===void 0?void 0:r[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var e;return this.isVariantNode?this:(e=this.parent)===null||e===void 0?void 0:e.getClosestVariantNode()}getVariantContext(e=!1){var r,n;if(e)return(r=this.parent)===null||r===void 0?void 0:r.getVariantContext();if(!this.isControllingVariants){const s=((n=this.parent)===null||n===void 0?void 0:n.getVariantContext())||{};return this.props.initial!==void 0&&(s.initial=this.props.initial),s}const i={};for(let s=0;sn.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=El(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=Xg(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&&!nn(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 rm),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}}const b4=["initial",...ym],XI=b4.length;class w4 extends YI{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=aP(n,e||{},this);if(i&&(r&&(r=i(r)),n&&(n=i(n)),o&&(o=i(o))),s){sP(this,n,o);const a=GI(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function ZI(t){return window.getComputedStyle(t)}class eR extends w4{readValueFromInstance(e,r){if(Ul.has(r)){const n=sm(r);return n&&n.default||0}else{const n=ZI(e),i=(b8(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:r}){return y4(e,r)}build(e,r,n,i){qg(e,r,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,r){return Yg(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;nn(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,i){S8(e,r,n,i)}}class tR extends w4{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return Ul.has(r)?((n=sm(r))===null||n===void 0?void 0:n.default)||0:(r=k8.has(r)?r:Qg(r),e.getAttribute(r))}measureInstanceViewportBox(){return tr()}scrapeMotionValuesFromProps(e,r){return T8(e,r)}build(e,r,n,i){Kg(e,r,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,r,n,i){_8(e,r,n,i)}mount(e){this.isSVGTag=Jg(e.tagName),super.mount(e)}}const rR=(t,e)=>Wg(t)?new tR(e,{enableHardwareAcceleration:!1}):new eR(e,{enableHardwareAcceleration:!0});function T2(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const uf={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(pe.test(t))t=parseFloat(t);else return t;const r=T2(t,e.target.x),n=T2(t,e.target.y);return`${r}% ${n}%`}},P2="_$css",nR={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,i=t.includes("var("),s=[];i&&(t=t.replace(p4,v=>(s.push(v),P2)));const o=Zs.parse(t);if(o.length>5)return n;const a=Zs.createTransformer(t),l=typeof o[0]!="number"?1:0,f=r.x.scale*e.x,c=r.y.scale*e.y;o[0+l]/=f,o[1+l]/=c;const u=Ft(f,c,.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 v=0;h=h.replace(P2,()=>{const x=s[v];return v++,x})}return h}};class iR extends Wt.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=e;K_(oR),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()})),Bf.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()||Ir.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 sR(t){const[e,r]=D8(),n=S.useContext(Hg);return Wt.createElement(iR,{...t,layoutGroup:n,switchLayoutGroup:S.useContext(m8),isPresent:e,safeToRemove:r})}const oR={borderRadius:{...uf,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:uf,borderTopRightRadius:uf,borderBottomLeftRadius:uf,borderBottomRightRadius:uf,boxShadow:nR},aR={measureLayout:sR};function lR(t,e,r={}){const n=nn(t)?t:El(t);return n.start(vm("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const C4=["TopLeft","TopRight","BottomLeft","BottomRight"],fR=C4.length,I2=t=>typeof t=="string"?parseFloat(t):t,R2=t=>typeof t=="number"||pe.test(t);function cR(t,e,r,n,i,s){i?(t.opacity=Ft(0,r.opacity!==void 0?r.opacity:1,uR(n)),t.opacityExit=Ft(e.opacity!==void 0?e.opacity:1,0,dR(n))):s&&(t.opacity=Ft(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(u0(t,e,n))}function N2(t,e){t.min=e.min,t.max=e.max}function jn(t,e){N2(t.x,e.x),N2(t.y,e.y)}function O2(t,e,r,n,i){return t-=e,t=h0(t,1/r,n),i!==void 0&&(t=h0(t,1/i,n)),t}function hR(t,e=0,r=1,n=.5,i,s=t,o=t){if(Ai.test(e)&&(e=parseFloat(e),e=Ft(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=Ft(s.min,s.max,n);t===s&&(a-=e),t.min=O2(t.min,e,r,a,i),t.max=O2(t.max,e,r,a,i)}function B2(t,e,[r,n,i],s,o){hR(t,e[r],e[n],e[i],e.scale,s,o)}const vR=["x","scaleX","originX"],yR=["y","scaleY","originY"];function D2(t,e,r,n){B2(t.x,e,vR,r==null?void 0:r.x,n==null?void 0:n.x),B2(t.y,e,yR,r==null?void 0:r.y,n==null?void 0:n.y)}function L2(t){return t.translate===0&&t.scale===1}function E4(t){return L2(t.x)&&L2(t.y)}function S4(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 $2(t){return mn(t.x)/mn(t.y)}class pR{constructor(){this.members=[]}add(e){em(this.members,e),e.scheduleRender()}remove(e){if(tm(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 F2(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:f,rotateY:c}=r;l&&(n+=`rotate(${l}deg) `),f&&(n+=`rotateX(${f}deg) `),c&&(n+=`rotateY(${c}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 gR=(t,e)=>t.depth-e.depth;class mR{constructor(){this.children=[],this.isDirty=!1}add(e){em(this.children,e),this.isDirty=!0}remove(e){tm(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(gR),this.isDirty=!1,this.children.forEach(e)}}const j2=["","X","Y","Z"],U2=1e3;let xR=0;function k4({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=xR++,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(CR),this.nodes.forEach(SR),this.nodes.forEach(kR)},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 f=0;fthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=a4(v,250),Bf.hasAnimatedSinceResize&&(Bf.hasAnimatedSinceResize=!1,this.nodes.forEach(V2))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&u&&(f||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:v,hasRelativeTargetChanged:x,layout:g})=>{var k,w,A,E,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:RR,{onLayoutAnimationStart:$,onLayoutAnimationComplete:j}=u.getProps(),U=!this.targetLayout||!S4(this.targetLayout,g)||x,W=!v&&x;if(this.options.layoutRoot||!((A=this.resumeFrom)===null||A===void 0)&&A.instance||W||v&&(U||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,W);const q={...l4(M,"layout"),onPlay:$,onComplete:j};(u.shouldReduceMotion||this.options.layoutRoot)&&(q.delay=0,q.type=!1),this.startAnimation(q)}else!v&&this.animationProgress===0&&V2(this),this.isLead()&&((I=(E=this.options).onExitComplete)===null||I===void 0||I.call(E));this.targetLayout=g})}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,Xs.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(_R),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,f;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 E;const I=A/1e3;H2(v.x,o.x,I),H2(v.y,o.y,I),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((E=this.relativeParent)===null||E===void 0)&&E.layout)&&(Ff(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),PR(this.relativeTarget,this.relativeTargetOrigin,x,I)),g&&(this.animationValues=h,cR(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&&(Xs.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ir.update(()=>{Bf.hasAnimatedSinceResize=!0,this.currentAnimation=lR(0,U2,{...o,onUpdate:f=>{var c;this.mixTargetDelta(f),(c=o.onUpdate)===null||c===void 0||c.call(o,f)},onComplete:()=>{var f;(f=o.onComplete)===null||f===void 0||f.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,U2),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:f,latestValues:c}=o;if(!(!a||!l||!f)){if(this!==o&&this.layout&&f&&_4(this.options.animationType,this.layout.layoutBox,f.layoutBox)){l=this.target||tr();const u=mn(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const h=mn(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}jn(a,l),Xa(a,c),$f(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){var l,f,c;this.sharedNodes.has(o)||this.sharedNodes.set(o,new pR),this.sharedNodes.get(o).add(a),a.promote({transition:(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(c=(f=a.options.initialPromotionConfig)===null||f===void 0?void 0:f.shouldPreserveFollowOpacity)===null||c===void 0?void 0:c.call(f,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 f=this.getStack();f&&f.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 f={};for(let c=0;c{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(z2),this.root.sharedNodes.clear()}}}function bR(t){t.updateLayout()}function wR(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"?di(v=>{const x=l?i.measuredBox[v]:i.layoutBox[v],g=mn(x);x.min=s[v].min,x.max=x.min+g}):_4(a,i.layoutBox,s)&&di(v=>{const x=l?i.measuredBox[v]:i.layoutBox[v],g=mn(s[v]);x.max=x.min+g});const f=jf();$f(f,s,i.layoutBox);const c=jf();l?$f(c,t.applyTransform(o,!0),i.measuredBox):$f(c,s,i.layoutBox);const u=!E4(f);let h=!1;if(!t.resumeFrom){const v=t.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:x,layout:g}=v;if(x&&g){const k=tr();Ff(k,i.layoutBox,x.layoutBox);const w=tr();Ff(w,s,g.layoutBox),S4(k,w)||(h=!0),v.options.layoutRoot&&(t.relativeTarget=w,t.relativeTargetOrigin=k,t.relativeParent=v)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:i,delta:c,layoutDelta:f,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 CR(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}function AR(t){t.clearSnapshot()}function z2(t){t.clearMeasurements()}function ER(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function V2(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function SR(t){t.resolveTargetDelta()}function kR(t){t.calcProjection()}function _R(t){t.resetRotation()}function TR(t){t.removeLeadSnapshot()}function H2(t,e,r){t.translate=Ft(e.translate,0,r),t.scale=Ft(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function W2(t,e,r,n){t.min=Ft(e.min,r.min,n),t.max=Ft(e.max,r.max,n)}function PR(t,e,r,n){W2(t.x,e.x,r.x,n),W2(t.y,e.y,r.y,n)}function IR(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const RR={duration:.45,ease:[.4,0,.1,1]};function MR(t,e){let r=t.root;for(let s=t.path.length-1;s>=0;s--)if(Boolean(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 NR(t){q2(t.x),q2(t.y)}function _4(t,e,r){return t==="position"||t==="preserve-aspect"&&!Oy($2(e),$2(r),.2)}const OR=k4({attachResizeListener:(t,e)=>Vo(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),J1={current:void 0},BR=k4({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!J1.current){const t=new OR(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),J1.current=t}return J1.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>Boolean(window.getComputedStyle(t).position==="fixed")}),DR={...vI,...NT,...DI,...aR},ld=q_((t,e)=>bT(t,e,DR,rR,BR));function T4(){const t=S.useRef(!1);return t0(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function LR(){const t=T4(),[e,r]=S.useState(0),n=S.useCallback(()=>{t.current&&r(e+1)},[e]);return[S.useCallback(()=>Ir.postRender(n),[n]),e]}class $R 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 FR({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 f=document.createElement("style");return document.head.appendChild(f),f.sheet&&f.sheet.insertRule(` +`+s.stack}return{value:t,source:e,stack:i,digest:null}}function O1(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function uy(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var l_=typeof WeakMap=="function"?WeakMap:Map;function V5(t,e,r){r=Qi(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){Xd||(Xd=!0,wy=n),uy(t,e)},r}function H5(t,e,r){r=Qi(-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(){uy(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){uy(t,e),typeof n!="function"&&(zs===null?zs=new Set([this]):zs.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function _b(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new l_;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=C_.bind(null,t,e,r),e.then(t,t))}function Tb(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 Pb(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=Qi(-1,1),e.tag=2,Us(r,e,1))),r.lanes|=1),t)}var f_=fs.ReactCurrentOwner,Zr=!1;function Fr(t,e,r,n){e.child=t===null?C5(e,null,r,n):bl(e,t.child,r,n)}function Ib(t,e,r,n,i){r=r.render;var s=e.ref;return ol(e,i),n=_g(t,e,r,n,s,i),r=Tg(),t!==null&&!Zr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,ns(t,e,i)):(_t&&r&&yg(e),e.flags|=1,Fr(t,e,n,i),e.child)}function Rb(t,e,r,n,i){if(t===null){var s=r.type;return typeof s=="function"&&!$g(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=s,W5(t,e,s,n,i)):(t=od(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:vc,r(o,n)&&t.ref===e.ref)return ns(t,e,i)}return e.flags|=1,t=Hs(s,n),t.ref=e.ref,t.return=e,e.child=t}function W5(t,e,r,n,i){if(t!==null){var s=t.memoizedProps;if(vc(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,ns(t,e,i)}return dy(t,e,r,n,i)}function q5(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},qe(Ja,fn),fn|=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,qe(Ja,fn),fn|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,qe(Ja,fn),fn|=n}else s!==null?(n=s.baseLanes|r,e.memoizedState=null):n=r,qe(Ja,fn),fn|=n;return Fr(t,e,i,r),e.child}function G5(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function dy(t,e,r,n,i){var s=tn(r)?Jo:Nr.current;return s=ml(e,s),ol(e,i),r=_g(t,e,r,n,s,i),n=Tg(),t!==null&&!Zr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,ns(t,e,i)):(_t&&n&&yg(e),e.flags|=1,Fr(t,e,r,i),e.child)}function Mb(t,e,r,n,i){if(tn(r)){var s=!0;zd(e)}else s=!1;if(ol(e,i),e.stateNode===null)nd(t,e),b5(e,r,n),cy(e,r,n,i),n=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,f=r.contextType;typeof f=="object"&&f!==null?f=Nn(f):(f=tn(r)?Jo:Nr.current,f=ml(e,f));var c=r.getDerivedStateFromProps,u=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==f)&&Ab(e,o,n,f),_s=!1;var h=e.memoizedState;o.state=h,Gd(e,n,o,i),l=e.memoizedState,a!==n||h!==l||en.current||_s?(typeof c=="function"&&(fy(e,r,c,n),l=e.memoizedState),(a=_s||Cb(e,r,a,n,h,l,f))?(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=f,n=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,m5(t,e),a=e.memoizedProps,f=e.type===e.elementType?a:Kn(e.type,a),o.props=f,u=e.pendingProps,h=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=Nn(l):(l=tn(r)?Jo:Nr.current,l=ml(e,l));var v=r.getDerivedStateFromProps;(c=typeof v=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||h!==l)&&Ab(e,o,n,l),_s=!1,h=e.memoizedState,o.state=h,Gd(e,n,o,i);var x=e.memoizedState;a!==u||h!==x||en.current||_s?(typeof v=="function"&&(fy(e,r,v,n),x=e.memoizedState),(f=_s||Cb(e,r,f,n,h,x,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,x,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,x,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=x),o.props=n,o.state=x,o.context=l,n=f):(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 hy(t,e,r,n,s,i)}function hy(t,e,r,n,i,s){G5(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return i&&gb(e,r,!1),ns(t,e,s);n=e.stateNode,f_.current=e;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=bl(e,t.child,null,s),e.child=bl(e,null,a,s)):Fr(t,e,a,s),e.memoizedState=n.state,i&&gb(e,r,!0),e.child}function K5(t){var e=t.stateNode;e.pendingContext?pb(t,e.pendingContext,e.pendingContext!==e.context):e.context&&pb(t,e.context,!1),Ag(t,e.containerInfo)}function Nb(t,e,r,n,i){return xl(),gg(i),e.flags|=256,Fr(t,e,r,n),e.child}var vy={dehydrated:null,treeContext:null,retryLane:0};function yy(t){return{baseLanes:t,cachePool:null,transitions:null}}function J5(t,e,r){var n=e.pendingProps,i=It.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),qe(It,i&1),t===null)return ay(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=ah(o,n,0,null),t=zo(t,n,r,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=yy(r),e.memoizedState=vy,t):Rg(e,o));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return c_(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=zo(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?yy(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~r,e.memoizedState=vy,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 Rg(t,e){return e=ah({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Eu(t,e,r,n){return n!==null&&gg(n),bl(e,t.child,null,r),t=Rg(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function c_(t,e,r,n,i,s,o){if(r)return e.flags&256?(e.flags&=-257,n=O1(Error(ne(422))),Eu(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=n.fallback,i=e.mode,n=ah({mode:"visible",children:n.children},i,0,null),s=zo(s,i,o,null),s.flags|=2,n.return=e,s.return=e,n.sibling=s,e.child=n,e.mode&1&&bl(e,t.child,null,o),e.child.memoizedState=yy(o),e.memoizedState=vy,s);if(!(e.mode&1))return Eu(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=O1(s,n,void 0),Eu(t,e,o,n)}if(a=(o&t.childLanes)!==0,Zr||a){if(n=fr,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,rs(t,i),ni(n,t,i,-1))}return Lg(),n=O1(Error(ne(421))),Eu(t,e,o,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=A_.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,vn=js(i.nextSibling),pn=e,_t=!0,Yn=null,t!==null&&(_n[Tn++]=qi,_n[Tn++]=Gi,_n[Tn++]=Qo,qi=t.id,Gi=t.overflow,Qo=e),e=Rg(e,n.children),e.flags|=4096,e)}function Ob(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),ly(t.return,e,r)}function D1(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 Q5(t,e,r){var n=e.pendingProps,i=n.revealOrder,s=n.tail;if(Fr(t,e,n.children,r),n=It.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&&Ob(t,r,e);else if(t.tag===19)Ob(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(qe(It,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&&Kd(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),D1(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&&Kd(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}D1(e,!0,r,null,s);break;case"together":D1(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function nd(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function ns(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Xo|=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 u_(t,e,r){switch(e.tag){case 3:K5(e),xl();break;case 5:A5(e);break;case 1:tn(e.type)&&zd(e);break;case 4:Ag(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;qe(Wd,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(qe(It,It.current&1),e.flags|=128,null):r&e.child.childLanes?J5(t,e,r):(qe(It,It.current&1),t=ns(t,e,r),t!==null?t.sibling:null);qe(It,It.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return Q5(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),qe(It,It.current),n)break;return null;case 22:case 23:return e.lanes=0,q5(t,e,r)}return ns(t,e,r)}var Y5,py,X5,Z5;Y5=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}};py=function(){};X5=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,Lo(Ci.current);var s=null;switch(r){case"input":i=$v(t,i),n=$v(t,n),s=[];break;case"select":i=Mt({},i,{value:void 0}),n=Mt({},n,{value:void 0}),s=[];break;case"textarea":i=Uv(t,i),n=Uv(t,n),s=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=jd)}Vv(r,n);var o;r=null;for(f in i)if(!n.hasOwnProperty(f)&&i.hasOwnProperty(f)&&i[f]!=null)if(f==="style"){var a=i[f];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(ac.hasOwnProperty(f)?s||(s=[]):(s=s||[]).push(f,null));for(f in n){var l=n[f];if(a=i!=null?i[f]:void 0,n.hasOwnProperty(f)&&l!==a&&(l!=null||a!=null))if(f==="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(f,r)),r=l;else f==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(f,l)):f==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(f,""+l):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(ac.hasOwnProperty(f)?(l!=null&&f==="onScroll"&&Ct("scroll",t),s||a===l||(s=[])):(s=s||[]).push(f,l))}r&&(s=s||[]).push("style",r);var f=s;(e.updateQueue=f)&&(e.flags|=4)}};Z5=function(t,e,r,n){r!==n&&(e.flags|=4)};function ff(t,e){if(!_t)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 Ar(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 d_(t,e,r){var n=e.pendingProps;switch(pg(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ar(e),null;case 1:return tn(e.type)&&Ud(),Ar(e),null;case 3:return n=e.stateNode,wl(),Et(en),Et(Nr),Sg(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Cu(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Yn!==null&&(Ey(Yn),Yn=null))),py(t,e),Ar(e),null;case 5:Eg(e);var i=Lo(xc.current);if(r=e.type,t!==null&&e.stateNode!=null)X5(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 Ar(e),null}if(t=Lo(Ci.current),Cu(e)){n=e.stateNode,r=e.type;var s=e.memoizedProps;switch(n[yi]=e,n[gc]=s,t=(e.mode&1)!==0,r){case"dialog":Ct("cancel",n),Ct("close",n);break;case"iframe":case"object":case"embed":Ct("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[yi]=e,t[gc]=n,Y5(t,e,!1,!1),e.stateNode=t;e:{switch(o=Hv(r,n),r){case"dialog":Ct("cancel",t),Ct("close",t),i=n;break;case"iframe":case"object":case"embed":Ct("load",t),i=n;break;case"video":case"audio":for(i=0;iAl&&(e.flags|=128,n=!0,ff(s,!1),e.lanes=4194304)}else{if(!n)if(t=Kd(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),ff(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!_t)return Ar(e),null}else 2*zt()-s.renderingStartTime>Al&&r!==1073741824&&(e.flags|=128,n=!0,ff(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=zt(),e.sibling=null,r=It.current,qe(It,n?r&1|2:r&1),e):(Ar(e),null);case 22:case 23:return Bg(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?fn&1073741824&&(Ar(e),e.subtreeFlags&6&&(e.flags|=8192)):Ar(e),null;case 24:return null;case 25:return null}throw Error(ne(156,e.tag))}function h_(t,e){switch(pg(e),e.tag){case 1:return tn(e.type)&&Ud(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return wl(),Et(en),Et(Nr),Sg(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Eg(e),null;case 13:if(Et(It),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ne(340));xl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Et(It),null;case 4:return wl(),null;case 10:return bg(e.type._context),null;case 22:case 23:return Bg(),null;case 24:return null;default:return null}}var Su=!1,kr=!1,v_=typeof WeakSet=="function"?WeakSet:Set,oe=null;function Ka(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Bt(t,e,n)}else r.current=null}function gy(t,e,r){try{r()}catch(n){Bt(t,e,n)}}var Db=!1;function y_(t,e){if(ey=Ld,t=n5(),vg(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,f=0,c=0,u=t,h=null;t:for(;;){for(var v;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),(v=u.firstChild)!==null;)h=u,u=v;for(;;){if(u===t)break t;if(h===r&&++f===i&&(a=o),h===s&&++c===n&&(l=o),(v=u.nextSibling)!==null)break;u=h,h=u.parentNode}u=v}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(ty={focusedElem:t,selectionRange:r},Ld=!1,oe=e;oe!==null;)if(e=oe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,oe=t;else for(;oe!==null;){e=oe;try{var x=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var g=x.memoizedProps,k=x.memoizedState,w=e.stateNode,A=w.getSnapshotBeforeUpdate(e.elementType===e.type?g:Kn(e.type,g),k);w.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var E=e.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(I){Bt(e,e.return,I)}if(t=e.sibling,t!==null){t.return=e.return,oe=t;break}oe=e.return}return x=Db,Db=!1,x}function Nf(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&&gy(e,r,s)}i=i.next}while(i!==n)}}function sh(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 my(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 e8(t){var e=t.alternate;e!==null&&(t.alternate=null,e8(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[yi],delete e[gc],delete e[iy],delete e[Yk],delete e[Xk])),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 t8(t){return t.tag===5||t.tag===3||t.tag===4}function Bb(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||t8(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 xy(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=jd));else if(n!==4&&(t=t.child,t!==null))for(xy(t,e,r),t=t.sibling;t!==null;)xy(t,e,r),t=t.sibling}function by(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(by(t,e,r),t=t.sibling;t!==null;)by(t,e,r),t=t.sibling}var yr=null,Qn=!1;function ws(t,e,r){for(r=r.child;r!==null;)r8(t,e,r),r=r.sibling}function r8(t,e,r){if(wi&&typeof wi.onCommitFiberUnmount=="function")try{wi.onCommitFiberUnmount(Y0,r)}catch{}switch(r.tag){case 5:kr||Ka(r,e);case 6:var n=yr,i=Qn;yr=null,ws(t,e,r),yr=n,Qn=i,yr!==null&&(Qn?(t=yr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):yr.removeChild(r.stateNode));break;case 18:yr!==null&&(Qn?(t=yr,r=r.stateNode,t.nodeType===8?T1(t.parentNode,r):t.nodeType===1&&T1(t,r),dc(t)):T1(yr,r.stateNode));break;case 4:n=yr,i=Qn,yr=r.stateNode.containerInfo,Qn=!0,ws(t,e,r),yr=n,Qn=i;break;case 0:case 11:case 14:case 15:if(!kr&&(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)&&gy(r,e,o),i=i.next}while(i!==n)}ws(t,e,r);break;case 1:if(!kr&&(Ka(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Bt(r,e,a)}ws(t,e,r);break;case 21:ws(t,e,r);break;case 22:r.mode&1?(kr=(n=kr)||r.memoizedState!==null,ws(t,e,r),kr=n):ws(t,e,r);break;default:ws(t,e,r)}}function Lb(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new v_),e.forEach(function(n){var i=E_.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Fn(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~s}if(n=i,n=zt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*g_(n/1960))-n,10t?16:t,Ms===null)var n=!1;else{if(t=Ms,Ms=null,Zd=0,De&6)throw Error(ne(331));var i=De;for(De|=4,oe=t.current;oe!==null;){var s=oe,o=s.child;if(oe.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lzt()-Og?Uo(t,0):Ng|=r),rn(t,e)}function c8(t,e){e===0&&(t.mode&1?(e=pu,pu<<=1,!(pu&130023424)&&(pu=4194304)):e=1);var r=Hr();t=rs(t,e),t!==null&&(zc(t,e,r),rn(t,r))}function A_(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),c8(t,r)}function E_(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),c8(t,r)}var u8;u8=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||en.current)Zr=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Zr=!1,u_(t,e,r);Zr=!!(t.flags&131072)}else Zr=!1,_t&&e.flags&1048576&&v5(e,Hd,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;nd(t,e),t=e.pendingProps;var i=ml(e,Nr.current);ol(e,r),i=_g(null,e,n,t,i,r);var s=Tg();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,tn(n)?(s=!0,zd(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Cg(e),i.updater=nh,e.stateNode=i,i._reactInternals=e,cy(e,n,t,r),e=hy(null,e,n,!0,s,r)):(e.tag=0,_t&&s&&yg(e),Fr(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(nd(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=k_(n),t=Kn(n,t),i){case 0:e=dy(null,e,n,t,r);break e;case 1:e=Mb(null,e,n,t,r);break e;case 11:e=Ib(null,e,n,t,r);break e;case 14:e=Rb(null,e,n,Kn(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:Kn(n,i),dy(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Kn(n,i),Mb(t,e,n,i,r);case 3:e:{if(K5(e),t===null)throw Error(ne(387));n=e.pendingProps,s=e.memoizedState,i=s.element,m5(t,e),Gd(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=Cl(Error(ne(423)),e),e=Nb(t,e,n,r,i);break e}else if(n!==i){i=Cl(Error(ne(424)),e),e=Nb(t,e,n,r,i);break e}else for(vn=js(e.stateNode.containerInfo.firstChild),pn=e,_t=!0,Yn=null,r=C5(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(xl(),n===i){e=ns(t,e,r);break e}Fr(t,e,n,r)}e=e.child}return e;case 5:return A5(e),t===null&&ay(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,ry(n,i)?o=null:s!==null&&ry(n,s)&&(e.flags|=32),G5(t,e),Fr(t,e,o,r),e.child;case 6:return t===null&&ay(e),null;case 13:return J5(t,e,r);case 4:return Ag(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=bl(e,null,n,r):Fr(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Kn(n,i),Ib(t,e,n,i,r);case 7:return Fr(t,e,e.pendingProps,r),e.child;case 8:return Fr(t,e,e.pendingProps.children,r),e.child;case 12:return Fr(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,qe(Wd,n._currentValue),n._currentValue=o,s!==null)if(si(s.value,o)){if(s.children===i.children&&!en.current){e=ns(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=Qi(-1,r&-r),l.tag=2;var f=s.updateQueue;if(f!==null){f=f.shared;var c=f.pending;c===null?l.next=l:(l.next=c.next,c.next=l),f.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),ly(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),ly(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}Fr(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,ol(e,r),i=Nn(i),n=n(i),e.flags|=1,Fr(t,e,n,r),e.child;case 14:return n=e.type,i=Kn(n,e.pendingProps),i=Kn(n.type,i),Rb(t,e,n,i,r);case 15:return W5(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Kn(n,i),nd(t,e),e.tag=1,tn(n)?(t=!0,zd(e)):t=!1,ol(e,r),b5(e,n,i),cy(e,n,i,r),hy(null,e,n,!0,t,r);case 19:return Q5(t,e,r);case 22:return q5(t,e,r)}throw Error(ne(156,e.tag))};function d8(t,e){return $3(t,e)}function S_(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 Pn(t,e,r,n){return new S_(t,e,r,n)}function $g(t){return t=t.prototype,!(!t||!t.isReactComponent)}function k_(t){if(typeof t=="function")return $g(t)?1:0;if(t!=null){if(t=t.$$typeof,t===ng)return 11;if(t===ig)return 14}return 2}function Hs(t,e){var r=t.alternate;return r===null?(r=Pn(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 od(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")$g(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Fa:return zo(r.children,i,s,e);case rg:o=8,i|=8;break;case Ov:return t=Pn(12,r,e,i|2),t.elementType=Ov,t.lanes=s,t;case Dv:return t=Pn(13,r,e,i),t.elementType=Dv,t.lanes=s,t;case Bv:return t=Pn(19,r,e,i),t.elementType=Bv,t.lanes=s,t;case w3:return ah(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case x3:o=10;break e;case b3:o=9;break e;case ng:o=11;break e;case ig:o=14;break e;case ks:o=16,n=null;break e}throw Error(ne(130,t==null?t:typeof t,""))}return e=Pn(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function zo(t,e,r,n){return t=Pn(7,t,n,e),t.lanes=r,t}function ah(t,e,r,n){return t=Pn(22,t,n,e),t.elementType=w3,t.lanes=r,t.stateNode={isHidden:!1},t}function B1(t,e,r){return t=Pn(6,t,null,e),t.lanes=r,t}function L1(t,e,r){return e=Pn(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function __(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=g1(0),this.expirationTimes=g1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=g1(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Fg(t,e,r,n,i,s,o,a,l){return t=new __(t,e,r,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Pn(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cg(s),t}function T_(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}e(),t.exports=bn})(PS);const N_=a3(Ti),Vg=S.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),dh=S.createContext({});function O_(){return S.useContext(dh).visualElement}const qc=S.createContext(null),hh=typeof document<"u",r0=hh?S.useLayoutEffect:S.useEffect,p8=S.createContext({strict:!1});function D_(t,e,r,n){const i=O_(),s=S.useContext(p8),o=S.useContext(qc),a=S.useContext(Vg).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 f=l.current;return r0(()=>{f&&f.render()}),(window.HandoffAppearAnimations?r0:S.useEffect)(()=>{f&&f.animationState&&f.animationState.animateChanges()}),f}function Qa(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function B_(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):Qa(r)&&(r.current=n))},[e])}function Ec(t){return typeof t=="string"||Array.isArray(t)}function vh(t){return typeof t=="object"&&typeof t.start=="function"}const L_=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function yh(t){return vh(t.animate)||L_.some(e=>Ec(t[e]))}function g8(t){return Boolean(yh(t)||t.variants)}function $_(t,e){if(yh(t)){const{initial:r,animate:n}=t;return{initial:r===!1||Ec(r)?r:void 0,animate:Ec(n)?n:void 0}}return t.inherit!==!1?e:{}}function F_(t){const{initial:e,animate:r}=$_(t,S.useContext(dh));return S.useMemo(()=>({initial:e,animate:r}),[Wb(e),Wb(r)])}function Wb(t){return Array.isArray(t)?t.join(" "):t}const Bi=t=>({isEnabled:e=>t.some(r=>!!e[r])}),Sc={measureLayout:Bi(["layout","layoutId","drag"]),animation:Bi(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Bi(["exit"]),drag:Bi(["drag","dragControls"]),focus:Bi(["whileFocus"]),hover:Bi(["whileHover","onHoverStart","onHoverEnd"]),tap:Bi(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Bi(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Bi(["whileInView","onViewportEnter","onViewportLeave"])};function j_(t){for(const e in t)e==="projectionNodeConstructor"?Sc.projectionNodeConstructor=t[e]:Sc[e].Component=t[e]}function ph(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}const Bf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let U_=1;function z_(){return ph(()=>{if(Bf.hasEverUpdated)return U_++})}const Hg=S.createContext({});class V_ extends Wt.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}}const m8=S.createContext({}),H_=Symbol.for("motionComponentSymbol");function W_({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:i,Component:s}){t&&j_(t);function o(l,f){const c={...S.useContext(Vg),...l,layoutId:q_(l)},{isStatic:u}=c;let h=null;const v=F_(l),x=u?void 0:z_(),g=i(l,u);if(!u&&hh){v.visualElement=D_(s,g,c,e);const k=S.useContext(p8).strict,w=S.useContext(m8);v.visualElement&&(h=v.visualElement.loadFeatures(c,k,t,x,r||Sc.projectionNodeConstructor,w))}return S.createElement(V_,{visualElement:v.visualElement,props:c},h,S.createElement(dh.Provider,{value:v},n(s,l,x,B_(g,v.visualElement,f),g,u,v.visualElement)))}const a=S.forwardRef(o);return a[H_]=s,a}function q_({layoutId:t}){const e=S.useContext(Hg).id;return e&&t!==void 0?e+"-"+t:t}function G_(t){function e(n,i={}){return W_(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 K_=["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 Wg(t){return typeof t!="string"||t.includes("-")?!1:!!(K_.indexOf(t)>-1||/[A-Z]/.test(t))}const n0={};function J_(t){Object.assign(n0,t)}const i0=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],zl=new Set(i0);function x8(t,{layout:e,layoutId:r}){return zl.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!n0[t]||t==="opacity")}const nn=t=>!!(t!=null&&t.getVelocity),Q_={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Y_=(t,e)=>i0.indexOf(t)-i0.indexOf(e);function X_({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},i,s){let o="";e.sort(Y_);for(const a of e)o+=`${Q_[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 b8(t){return t.startsWith("--")}const Z_=(t,e)=>e&&typeof t=="number"?e.transform(t):t,El=(t,e,r)=>Math.min(Math.max(r,t),e),da={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Lf={...da,transform:t=>El(0,1,t)},Tu={...da,default:1},$f=t=>Math.round(t*1e5)/1e5,kc=/(-)?([\d]*\.?[\d])+/g,Sy=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,eT=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Gc(t){return typeof t=="string"}const Kc=t=>({test:e=>Gc(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Es=Kc("deg"),Ai=Kc("%"),pe=Kc("px"),tT=Kc("vh"),rT=Kc("vw"),qb={...Ai,parse:t=>Ai.parse(t)/100,transform:t=>Ai.transform(t*100)},Gb={...da,transform:Math.round},w8={borderWidth:pe,borderTopWidth:pe,borderRightWidth:pe,borderBottomWidth:pe,borderLeftWidth:pe,borderRadius:pe,radius:pe,borderTopLeftRadius:pe,borderTopRightRadius:pe,borderBottomRightRadius:pe,borderBottomLeftRadius:pe,width:pe,maxWidth:pe,height:pe,maxHeight:pe,size:pe,top:pe,right:pe,bottom:pe,left:pe,padding:pe,paddingTop:pe,paddingRight:pe,paddingBottom:pe,paddingLeft:pe,margin:pe,marginTop:pe,marginRight:pe,marginBottom:pe,marginLeft:pe,rotate:Es,rotateX:Es,rotateY:Es,rotateZ:Es,scale:Tu,scaleX:Tu,scaleY:Tu,scaleZ:Tu,skew:Es,skewX:Es,skewY:Es,distance:pe,translateX:pe,translateY:pe,translateZ:pe,x:pe,y:pe,z:pe,perspective:pe,transformPerspective:pe,opacity:Lf,originX:qb,originY:qb,originZ:pe,zIndex:Gb,fillOpacity:Lf,strokeOpacity:Lf,numOctaves:Gb};function qg(t,e,r,n){const{style:i,vars:s,transform:o,transformKeys:a,transformOrigin:l}=t;a.length=0;let f=!1,c=!1,u=!0;for(const h in e){const v=e[h];if(b8(h)){s[h]=v;continue}const x=w8[h],g=Z_(v,x);if(zl.has(h)){if(f=!0,o[h]=g,a.push(h),!u)continue;v!==(x.default||0)&&(u=!1)}else h.startsWith("origin")?(c=!0,l[h]=g):i[h]=g}if(e.transform||(f||n?i.transform=X_(t,r,u,n):i.transform&&(i.transform="none")),c){const{originX:h="50%",originY:v="50%",originZ:x=0}=l;i.transformOrigin=`${h} ${v} ${x}`}}const Gg=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function C8(t,e,r){for(const n in e)!nn(e[n])&&!x8(n,r)&&(t[n]=e[n])}function nT({transformTemplate:t},e,r){return S.useMemo(()=>{const n=Gg();return qg(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function iT(t,e,r){const n=t.style||{},i={};return C8(i,n,t),Object.assign(i,nT(t,e,r)),t.transformValues?t.transformValues(i):i}function sT(t,e,r){const n={},i=iT(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 oT=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 s0(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||oT.has(t)}let A8=t=>!s0(t);function aT(t){t&&(A8=e=>e.startsWith("on")?!s0(e):t(e))}try{aT(require("@emotion/is-prop-valid").default)}catch{}function lT(t,e,r){const n={};for(const i in t)i==="values"&&typeof t.values=="object"||(A8(i)||r===!0&&s0(i)||!e&&!s0(i)||t.draggable&&i.startsWith("onDrag"))&&(n[i]=t[i]);return n}function Kb(t,e,r){return typeof t=="string"?t:pe.transform(e+r*t)}function fT(t,e,r){const n=Kb(e,t.x,t.width),i=Kb(r,t.y,t.height);return`${n} ${i}`}const cT={offset:"stroke-dashoffset",array:"stroke-dasharray"},uT={offset:"strokeDashoffset",array:"strokeDasharray"};function dT(t,e,r=1,n=0,i=!0){t.pathLength=1;const s=i?cT:uT;t[s.offset]=pe.transform(-n);const o=pe.transform(e),a=pe.transform(r);t[s.array]=`${o} ${a}`}function Kg(t,{attrX:e,attrY:r,originX:n,originY:i,pathLength:s,pathSpacing:o=1,pathOffset:a=0,...l},f,c,u){if(qg(t,l,f,u),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:v,dimensions:x}=t;h.transform&&(x&&(v.transform=h.transform),delete h.transform),x&&(n!==void 0||i!==void 0||v.transform)&&(v.transformOrigin=fT(x,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&&dT(h,s,o,a,!1)}const E8=()=>({...Gg(),attrs:{}}),Jg=t=>typeof t=="string"&&t.toLowerCase()==="svg";function hT(t,e,r,n){const i=S.useMemo(()=>{const s=E8();return Kg(s,e,{enableHardwareAcceleration:!1},Jg(n),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};C8(s,t.style,t),i.style={...s,...i.style}}return i}function vT(t=!1){return(r,n,i,s,{latestValues:o},a)=>{const f=(Wg(r)?hT:sT)(n,o,a,r),u={...lT(n,typeof r=="string",t),...f,ref:s},{children:h}=n,v=S.useMemo(()=>nn(h)?h.get():h,[h]);return i&&(u["data-projection-id"]=i),S.createElement(r,{...u,children:v})}}const Qg=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function S8(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 k8=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 _8(t,e,r,n){S8(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(k8.has(i)?i:Qg(i),e.attrs[i])}function Yg(t,e){const{style:r}=t,n={};for(const i in r)(nn(r[i])||e.style&&nn(e.style[i])||x8(i,t))&&(n[i]=r[i]);return n}function T8(t,e){const r=Yg(t,e);for(const n in t)if(nn(t[n])||nn(e[n])){const i=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[i]=t[n]}return r}function Xg(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 o0=t=>Array.isArray(t),yT=t=>Boolean(t&&typeof t=="object"&&t.mix&&t.toValue),pT=t=>o0(t)?t[t.length-1]||0:t;function ad(t){const e=nn(t)?t.get():t;return yT(e)?e.toValue():e}function gT({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,i,s){const o={latestValues:mT(n,i,s,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const P8=t=>(e,r)=>{const n=S.useContext(dh),i=S.useContext(qc),s=()=>gT(t,e,n,i);return r?s():ph(s)};function mT(t,e,r,n){const i={},s=n(t,{});for(const h in s)i[h]=ad(s[h]);let{initial:o,animate:a}=t;const l=yh(t),f=g8(t);e&&f&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=r?r.initial===!1:!1;c=c||o===!1;const u=c?a:o;return u&&typeof u!="boolean"&&!vh(u)&&(Array.isArray(u)?u:[u]).forEach(v=>{const x=Xg(t,v);if(!x)return;const{transitionEnd:g,transition:k,...w}=x;for(const A in w){let E=w[A];if(Array.isArray(E)){const I=c?E.length-1:0;E=E[I]}E!==null&&(i[A]=E)}for(const A in g)i[A]=g[A]}),i}const xT={useVisualState:P8({scrapeMotionValuesFromProps:T8,createRenderState:E8,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}}Kg(r,n,{enableHardwareAcceleration:!1},Jg(e.tagName),t.transformTemplate),_8(e,r)}})},bT={useVisualState:P8({scrapeMotionValuesFromProps:Yg,createRenderState:Gg})};function wT(t,{forwardMotionProps:e=!1},r,n,i){return{...Wg(t)?xT:bT,preloadedFeatures:r,useRender:vT(e),createVisualElement:n,projectionNodeConstructor:i,Component:t}}var We;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(We||(We={}));function Vo(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function a0(t,e,r,n){S.useEffect(()=>{const i=t.current;if(r&&i)return Vo(i,e,r,n)},[t,e,r,n])}function CT({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(We.Focus,!0),r.current=!0)},[n]),s=S.useCallback(()=>{!r.current||!n||(n.setActive(We.Focus,!1),r.current=!1)},[n]);a0(e,"focus",t?i:void 0),a0(e,"blur",t?s:void 0)}const I8=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function gh(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const R8=t=>e=>I8(e)&&t(e,gh(e));function ll(t,e,r,n){return Vo(t,e,R8(r),n)}function l0(t,e,r,n){return a0(t,e,r&&R8(r),n)}function M8(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const Jb=M8("dragHorizontal"),Qb=M8("dragVertical");function N8(t){let e=!1;if(t==="y")e=Qb();else if(t==="x")e=Jb();else{const r=Jb(),n=Qb();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function O8(){const t=N8(!0);return t?(t(),!1):!0}function Yb(t,e,r,n){return(i,s)=>{i.type==="touch"||O8()||(r&&t.animationState&&t.animationState.setActive(We.Hover,e),n&&n(i,s))}}function AT({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){l0(n,"pointerenter",S.useMemo(()=>t||r?Yb(n,!0,Boolean(r),t):void 0,[t,Boolean(r),n]),{passive:!t}),l0(n,"pointerleave",S.useMemo(()=>e||r?Yb(n,!1,Boolean(r),e):void 0,[t,Boolean(r),n]),{passive:!e})}const D8=(t,e)=>e?t===e?!0:D8(t,e.parentElement):!1;function Zg(t){return S.useEffect(()=>()=>t(),[])}const ET=(t,e)=>r=>e(t(r)),mh=(...t)=>t.reduce(ET);function $1(t,e){if(!e)return;const r=new PointerEvent("pointer"+t);e(r,gh(r))}function ST({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),f={passive:!(e||t||r||s.onPointerDown)};function c(){l.current&&l.current(),l.current=null}function u(){return c(),a.current=!1,i.getProps().whileTap&&i.animationState&&i.animationState.setActive(We.Tap,!1),!O8()}function h(A,E){var I,M,$,j;u()&&(D8(i.current,A.target)?(j=($=i.getProps()).onTap)===null||j===void 0||j.call($,A,E):(M=(I=i.getProps()).onTapCancel)===null||M===void 0||M.call(I,A,E))}function v(A,E){var I,M;u()&&((M=(I=i.getProps()).onTapCancel)===null||M===void 0||M.call(I,A,E))}function x(A,E){var I;const M=i.getProps();M.whileTap&&i.animationState&&i.animationState.setActive(We.Tap,!0),(I=M.onTapStart)===null||I===void 0||I.call(M,A,E)}const g=[Boolean(e),Boolean(t),Boolean(n),i],k=S.useCallback((A,E)=>{c(),!a.current&&(a.current=!0,l.current=mh(ll(window,"pointerup",h,f),ll(window,"pointercancel",v,f)),x(A,E))},g);l0(i,"pointerdown",o?k:void 0,f);const w=S.useCallback(()=>{const A=Vo(i.current,"keydown",I=>{I.key!=="Enter"||a.current||(a.current=!0,l.current=Vo(i.current,"keyup",()=>{I.key!=="Enter"||!u()||$1("up",i.getProps().onTap)},f),$1("down",x))}),E=Vo(i.current,"blur",()=>{A(),E(),a.current&&$1("cancel",v)})},g);a0(i,"focus",o?w:void 0),Zg(c)}const ky=new WeakMap,F1=new WeakMap,kT=t=>{const e=ky.get(t.target);e&&e(t)},_T=t=>{t.forEach(kT)};function TT({root:t,...e}){const r=t||document;F1.has(r)||F1.set(r,{});const n=F1.get(r),i=JSON.stringify(e);return n[i]||(n[i]=new IntersectionObserver(_T,{root:t,...e})),n[i]}function PT(t,e,r){const n=TT(e);return ky.set(t,r),n.observe(t),()=>{ky.delete(t),n.unobserve(t)}}function IT({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:i={}}){const s=S.useRef({hasEnteredView:!1,isInView:!1});let o=Boolean(e||r||n);i.once&&s.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?NT:MT)(o,s.current,t,i)}const RT={some:0,all:1};function MT(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:RT[s]},l=f=>{const{isIntersecting:c}=f;if(e.isInView===c||(e.isInView=c,o&&!c&&e.hasEnteredView))return;c&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(We.InView,c);const u=r.getProps(),h=c?u.onViewportEnter:u.onViewportLeave;h&&h(f)};return PT(r.current,a,l)},[t,n,i,s])}function NT(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(We.InView,!0)})},[t])}const Ns=t=>e=>(t(e),null),OT={inView:Ns(IT),tap:Ns(ST),focus:Ns(CT),hover:Ns(AT)};function B8(){const t=S.useContext(qc);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 L8(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),BT=t=>/^0[^.\s]+$/.test(t),Yi={delta:0,timestamp:0},$8=1/60*1e3,LT=typeof performance<"u"?()=>performance.now():()=>Date.now(),F8=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(LT()),$8);function $T(t){let e=[],r=[],n=0,i=!1,s=!1;const o=new WeakSet,a={schedule:(l,f=!1,c=!1)=>{const u=c&&i,h=u?e:r;return f&&o.add(l),h.indexOf(l)===-1&&(h.push(l),u&&i&&(n=e.length)),l},cancel:l=>{const f=r.indexOf(l);f!==-1&&r.splice(f,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 f=0;f(t[e]=$T(()=>_c=!0),t),{}),Ir=Jc.reduce((t,e)=>{const r=xh[e];return t[e]=(n,i=!1,s=!1)=>(_c||UT(),r.schedule(n,i,s)),t},{}),Xs=Jc.reduce((t,e)=>(t[e]=xh[e].cancel,t),{}),j1=Jc.reduce((t,e)=>(t[e]=()=>xh[e].process(Yi),t),{}),jT=t=>xh[t].process(Yi),j8=t=>{_c=!1,Yi.delta=_y?$8:Math.max(Math.min(t-Yi.timestamp,FT),1),Yi.timestamp=t,Ty=!0,Jc.forEach(jT),Ty=!1,_c&&(_y=!1,F8(j8))},UT=()=>{_c=!0,_y=!0,Ty||F8(j8)};function em(t,e){t.indexOf(e)===-1&&t.push(e)}function tm(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class rm{constructor(){this.subscriptions=[]}add(e){return em(this.subscriptions,e),()=>tm(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 VT{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}=Yi;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,Ir.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=()=>Ir.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=zT(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new rm);const n=this.events[e].add(r);return e==="change"?()=>{n(),Ir.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?nm(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 Sl(t,e){return new VT(t,e)}const im=(t,e)=>r=>Boolean(Gc(r)&&eT.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),U8=(t,e,r)=>n=>{if(!Gc(n))return n;const[i,s,o,a]=n.match(kc);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},HT=t=>El(0,255,t),U1={...da,transform:t=>Math.round(HT(t))},$o={test:im("rgb","red"),parse:U8("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+U1.transform(t)+", "+U1.transform(e)+", "+U1.transform(r)+", "+$f(Lf.transform(n))+")"};function WT(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 Py={test:im("#"),parse:WT,transform:$o.transform},Ya={test:im("hsl","hue"),parse:U8("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+Ai.transform($f(e))+", "+Ai.transform($f(r))+", "+$f(Lf.transform(n))+")"},$r={test:t=>$o.test(t)||Py.test(t)||Ya.test(t),parse:t=>$o.test(t)?$o.parse(t):Ya.test(t)?Ya.parse(t):Py.parse(t),transform:t=>Gc(t)?t:t.hasOwnProperty("red")?$o.transform(t):Ya.transform(t)},z8="${c}",V8="${n}";function qT(t){var e,r;return isNaN(t)&&Gc(t)&&(((e=t.match(kc))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(Sy))===null||r===void 0?void 0:r.length)||0)>0}function f0(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const i=t.match(Sy);i&&(r=i.length,t=t.replace(Sy,z8),e.push(...i.map($r.parse)));const s=t.match(kc);return s&&(n=s.length,t=t.replace(kc,V8),e.push(...s.map(da.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function H8(t){return f0(t).values}function W8(t){const{values:e,numColors:r,tokenised:n}=f0(t),i=e.length;return s=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function KT(t){const e=H8(t);return W8(t)(e.map(GT))}const Zs={test:qT,parse:H8,createTransformer:W8,getAnimatableNone:KT},JT=new Set(["brightness","contrast","saturate","opacity"]);function QT(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(kc)||[];if(!n)return t;const i=r.replace(n,"");let s=JT.has(e)?1:0;return n!==r&&(s*=100),e+"("+s+i+")"}const YT=/([a-z-]*)\(.*?\)/g,Iy={...Zs,getAnimatableNone:t=>{const e=t.match(YT);return e?e.map(QT).join(" "):t}},XT={...w8,color:$r,backgroundColor:$r,outlineColor:$r,fill:$r,stroke:$r,borderColor:$r,borderTopColor:$r,borderRightColor:$r,borderBottomColor:$r,borderLeftColor:$r,filter:Iy,WebkitFilter:Iy},sm=t=>XT[t];function om(t,e){var r;let n=sm(t);return n!==Iy&&(n=Zs),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const q8=t=>e=>e.test(t),ZT={test:t=>t==="auto",parse:t=>t},G8=[da,pe,Ai,Es,rT,tT,ZT],uf=t=>G8.find(q8(t)),eP=[...G8,$r,Zs],tP=t=>eP.find(q8(t));function rP(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function nP(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function bh(t,e,r){const n=t.getProps();return Xg(n,e,r!==void 0?r:n.custom,rP(t),nP(t))}function iP(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,Sl(r))}function sP(t,e){const r=bh(t,e);let{transitionEnd:n={},transition:i={},...s}=r?t.makeTargetAnimatable(r,!1):{};s={...s,...n};for(const o in s){const a=pT(s[o]);iP(t,o,a)}}function oP(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,dP={current:!1},am=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,lm=t=>e=>1-t(1-e),fm=t=>t*t,hP=lm(fm),cm=am(fm),Ft=(t,e,r)=>-r*t+r*e+t;function z1(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 vP({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=z1(l,a,t+1/3),s=z1(l,a,t),o=z1(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}const V1=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},yP=[Py,$o,Ya],pP=t=>yP.find(e=>e.test(t));function Xb(t){const e=pP(t);let r=e.parse(t);return e===Ya&&(r=vP(r)),r}const K8=(t,e)=>{const r=Xb(t),n=Xb(e),i={...r};return s=>(i.red=V1(r.red,n.red,s),i.green=V1(r.green,n.green,s),i.blue=V1(r.blue,n.blue,s),i.alpha=Ft(r.alpha,n.alpha,s),$o.transform(i))};function J8(t,e){return typeof t=="number"?r=>Ft(t,e,r):$r.test(t)?K8(t,e):Y8(t,e)}const Q8=(t,e)=>{const r=[...t],n=r.length,i=t.map((s,o)=>J8(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]=J8(t[i],e[i]));return i=>{for(const s in n)r[s]=n[s](i);return r}},Y8=(t,e)=>{const r=Zs.createTransformer(e),n=f0(t),i=f0(e);return n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?mh(Q8(n.values,i.values),r):o=>`${o>0?e:t}`},d0=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},Zb=(t,e)=>r=>Ft(t,e,r);function mP(t){return typeof t=="number"?Zb:typeof t=="string"?$r.test(t)?K8:Y8:Array.isArray(t)?Q8:typeof t=="object"?gP:Zb}function xP(t,e,r){const n=[],i=r||mP(t[0]),s=t.length-1;for(let o=0;ot[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=xP(e,n,i),a=o.length,l=f=>{let c=0;if(a>1)for(;cl(El(t[0],t[s-1],f)):l}const um=t=>t,Z8=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,bP=1e-7,wP=12;function CP(t,e,r,n,i){let s,o,a=0;do o=e+(r-e)/2,s=Z8(o,n,i)-t,s>0?r=o:e=o;while(Math.abs(s)>bP&&++aCP(s,0,1,t,r);return s=>s===0||s===1?s:Z8(i(s),e,n)}const t4=t=>1-Math.sin(Math.acos(t)),dm=lm(t4),AP=am(dm),r4=e4(.33,1.53,.69,.99),hm=lm(r4),EP=am(hm),SP=t=>(t*=2)<1?.5*hm(t):.5*(2-Math.pow(2,-10*(t-1))),kP={linear:um,easeIn:fm,easeInOut:cm,easeOut:hP,circIn:t4,circInOut:AP,circOut:dm,backIn:hm,backInOut:EP,backOut:r4,anticipate:SP},e2=t=>{if(Array.isArray(t)){u0(t.length===4);const[e,r,n,i]=t;return e4(e,r,n,i)}else if(typeof t=="string")return kP[t];return t},_P=t=>Array.isArray(t)&&typeof t[0]!="number";function TP(t,e){return t.map(()=>e||cm).splice(0,t.length-1)}function PP(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function IP(t,e){return t.map(r=>r*e)}function Ry({keyframes:t,ease:e=cm,times:r,duration:n=300}){t=[...t];const i=_P(e)?e.map(e2):e2(e),s={done:!1,value:t[0]},o=IP(r&&r.length===t.length?r:PP(t),n);function a(){return X8(o,t,{ease:Array.isArray(i)?i:TP(t,i)})}let l=a();return{next:f=>(s.value=l(f),s.done=f>=n,s),flipTarget:()=>{t.reverse(),l=a()}}}const H1=.001,RP=.01,t2=10,MP=.05,NP=1;function OP({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s;uP(t<=t2*1e3);let o=1-e;o=El(MP,NP,o),t=El(RP,t2,t/1e3),o<1?(i=f=>{const c=f*o,u=c*t,h=c-r,v=My(f,o),x=Math.exp(-u);return H1-h/v*x},s=f=>{const u=f*o*t,h=u*r+r,v=Math.pow(o,2)*Math.pow(f,2)*t,x=Math.exp(-u),g=My(Math.pow(f,2),o);return(-i(f)+H1>0?-1:1)*((h-v)*x)/g}):(i=f=>{const c=Math.exp(-f*t),u=(f-r)*t+1;return-H1+c*u},s=f=>{const c=Math.exp(-f*t),u=(r-f)*(t*t);return c*u});const a=5/t,l=BP(i,s,a);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{const f=Math.pow(l,2)*n;return{stiffness:f,damping:o*2*Math.sqrt(n*f),duration:t}}}const DP=12;function BP(t,e,r){let n=r;for(let i=1;it[r]!==void 0)}function FP(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!r2(t,$P)&&r2(t,LP)){const r=OP(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const jP=5;function n4({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:f,velocity:c,duration:u,isResolvedFromDuration:h}=FP(n);let v=UP,x=c?-(c/1e3):0;const g=l/(2*Math.sqrt(a*f));function k(){const w=s-i,A=Math.sqrt(a/f)/1e3,E=Math.abs(w)<5;if(r||(r=E?.01:2),e||(e=E?.005:.5),g<1){const I=My(A,g);v=M=>{const $=Math.exp(-g*A*M);return s-$*((x+g*A*w)/I*Math.sin(I*M)+w*Math.cos(I*M))}}else if(g===1)v=I=>s-Math.exp(-A*I)*(w+(x+A*w)*I);else{const I=A*Math.sqrt(g*g-1);v=M=>{const $=Math.exp(-g*A*M),j=Math.min(I*M,300);return s-$*((x+g*A*w)*Math.sinh(j)+I*w*Math.cosh(j))/I}}}return k(),{next:w=>{const A=v(w);if(h)o.done=w>=u;else{let E=x;if(w!==0)if(g<1){const $=Math.max(0,w-jP);E=nm(A-v($),w-$)}else E=0;const I=Math.abs(E)<=r,M=Math.abs(s-A)<=e;o.done=I&&M}return o.value=o.done?s:A,o},flipTarget:()=>{x=-x,[i,s]=[s,i],k()}}}n4.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const UP=t=>0;function zP({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 f=o+l,c=s===void 0?f:s(f);return c!==f&&(l=c-o),{next:u=>{const h=-l*Math.exp(-u/n);return a.done=!(h>i||h<-i),a.value=a.done?c:c+h,a},flipTarget:()=>{}}}const VP={decay:zP,keyframes:Ry,tween:Ry,spring:n4};function i4(t,e,r=0){return t-e-r}function HP(t,e=0,r=0,n=!0){return n?i4(e+-t,e,r):e-(t-e)+r}function WP(t,e,r,n){return n?t>=e+r:t<=-r}const qP=t=>{const e=({delta:r})=>t(r);return{start:()=>Ir.update(e,!0),stop:()=>Xs.update(e)}};function h0({duration:t,driver:e=qP,elapsed:r=0,repeat:n=0,repeatType:i="loop",repeatDelay:s=0,keyframes:o,autoplay:a=!0,onPlay:l,onStop:f,onComplete:c,onRepeat:u,onUpdate:h,type:v="keyframes",...x}){var g,k;const w=r;let A,E=0,I=t,M=!1,$=!0,j;const U=VP[o.length>2?"keyframes":v]||Ry,W=o[0],q=o[o.length-1];let G={done:!1,value:W};!((k=(g=U).needsInterpolation)===null||k===void 0)&&k.call(g,W,q)&&(j=X8([0,100],[W,q],{clamp:!1}),o=[0,100]);const re=U({...x,duration:t,keyframes:o});function B(){E++,i==="reverse"?($=E%2===0,r=HP(r,I,s,$)):(r=i4(r,I,s),i==="mirror"&&re.flipTarget()),M=!1,u&&u()}function y(){A&&A.stop(),c&&c()}function C(O){$||(O=-O),r+=O,M||(G=re.next(Math.max(0,r)),j&&(G.value=j(G.value)),M=$?G.done:r<=0),h&&h(G.value),M&&(E===0&&(I=I!==void 0?I:r),E{f&&f(),A&&A.stop()},set currentTime(O){r=w,C(O)},sample:O=>{r=w;const m=t&&typeof t=="number"?Math.max(t*.5,50):50;let T=0;for(C(0);T<=O;){const R=O-T;C(Math.min(R,m)),T+=m}return G}}}function GP(t){return!t||Array.isArray(t)||typeof t=="string"&&s4[t]}const Ef=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,s4={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ef([0,.65,.55,1]),circOut:Ef([.55,0,1,.45]),backIn:Ef([.31,.01,.66,-.59]),backOut:Ef([.33,1.53,.69,.99])};function KP(t){if(t)return Array.isArray(t)?Ef(t):s4[t]}function JP(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:KP(a),fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const n2={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},W1={},o4={};for(const t in n2)o4[t]=()=>(W1[t]===void 0&&(W1[t]=n2[t]()),W1[t]);function QP(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const YP=new Set(["opacity"]),Pu=10;function XP(t,e,{onUpdate:r,onComplete:n,...i}){if(!(o4.waapi()&&YP.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:l=0,ease:f}=i;if(i.type==="spring"||!GP(i.ease)){if(i.repeat===1/0)return;const u=h0({...i,elapsed:0});let h={done:!1,value:o[0]};const v=[];let x=0;for(;!h.done&&x<2e4;)h=u.sample(x),v.push(h.value),x+=Pu;o=v,a=x-Pu,f="linear"}const c=JP(t.owner.current,e,o,{...i,delay:-l,duration:a,ease:f});return c.onfinish=()=>{t.set(QP(o,i)),Ir.update(()=>c.cancel()),n&&n()},{get currentTime(){return c.currentTime||0},set currentTime(u){c.currentTime=u},stop:()=>{const{currentTime:u}=c;if(u){const h=h0({...i,autoplay:!1});t.setWithVelocity(h.sample(u-Pu).value,h.sample(u).value,Pu)}Ir.update(()=>c.cancel())}}}function a4(t,e){const r=performance.now(),n=({timestamp:i})=>{const s=i-r;s>=e&&(Xs.read(n),t(s-e))};return Ir.read(n,!0),()=>Xs.read(n)}function ZP({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const i=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:a4(i,-e)}:i()}function eI({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:f,driver:c,onUpdate:u,onComplete:h,onStop:v}){const x=t[0];let g;function k(I){return r!==void 0&&In}function w(I){return r===void 0?n:n===void 0||Math.abs(r-I){var $;u==null||u(M),($=I.onUpdate)===null||$===void 0||$.call(I,M)},onComplete:h,onStop:v})}function E(I){A({type:"spring",stiffness:o,damping:a,restDelta:l,...I})}if(k(x))E({velocity:e,keyframes:[x,w(x)]});else{let I=i*e+x;typeof f<"u"&&(I=f(I));const M=w(I),$=M===r?-1:1;let j,U;const W=q=>{j=U,U=q,e=nm(q-j,Yi.delta),($===1&&q>M||$===-1&&qg==null?void 0:g.stop()}}const Ao=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Iu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),q1=()=>({type:"keyframes",ease:"linear",duration:.3}),tI={type:"keyframes",duration:.8},i2={x:Ao,y:Ao,z:Ao,rotate:Ao,rotateX:Ao,rotateY:Ao,rotateZ:Ao,scaleX:Iu,scaleY:Iu,scale:Iu,opacity:q1,backgroundColor:q1,color:q1,default:Iu},rI=(t,{keyframes:e})=>e.length>2?tI:(i2[t]||i2.default)(e[1]),Ny=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Zs.test(e)&&!e.startsWith("url("));function nI({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:f,...c}){return!!Object.keys(c).length}function s2(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function o2(t){return typeof t=="number"?0:om("",t)}function l4(t,e){return t[e]||t.default||t}function iI(t,e,r,n){const i=Ny(e,r);let s=n.from!==void 0?n.from:t.get();return s==="none"&&i&&typeof r=="string"?s=om(e,r):s2(s)&&typeof r=="string"?s=o2(r):!Array.isArray(r)&&s2(r)&&typeof s=="string"&&(r=o2(s)),Array.isArray(r)?(r[0]===null&&(r[0]=s),r):[s,r]}const vm=(t,e,r,n={})=>i=>{const s=l4(n,t)||{},o=s.delay||n.delay||0;let{elapsed:a=0}=n;a=a-ld(o);const l=iI(e,t,r,s),f=l[0],c=l[l.length-1],u=Ny(t,f),h=Ny(t,c);let v={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||dP.current||s.type===!1)return ZP(v);if(s.type==="inertia")return eI(v);nI(s)||(v={...v,...rI(t,v)}),v.duration&&(v.duration=ld(v.duration)),v.repeatDelay&&(v.repeatDelay=ld(v.repeatDelay));const x=e.owner,g=x&&x.current;if(x&&g instanceof HTMLElement&&!(x!=null&&x.getProps().onUpdate)){const k=XP(e,t,v);if(k)return k}return h0(v)};function sI(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const i=e.map(s=>Oy(t,s,r));n=Promise.all(i)}else if(typeof e=="string")n=Oy(t,e,r);else{const i=typeof e=="function"?bh(t,e,r.custom):e;n=f4(t,i,r)}return n.then(()=>t.notify("AnimationComplete",e))}function Oy(t,e,r={}){var n;const i=bh(t,e,r.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(s=r.transitionOverride);const o=i?()=>f4(t,i,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(f=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:h}=s;return oI(t,e,c+f,u,h,r)}:()=>Promise.resolve(),{when:l}=s;if(l){const[f,c]=l==="beforeChildren"?[o,a]:[a,o];return f().then(c)}else return Promise.all([o(),a(r.delay)])}function f4(t,e,{delay:r=0,transitionOverride:n,type:i}={}){var s;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const f=t.getValue("willChange");n&&(o=n);const c=[],u=i&&((s=t.animationState)===null||s===void 0?void 0:s.getState()[i]);for(const h in l){const v=t.getValue(h),x=l[h];if(!v||x===void 0||u&&lI(u,h))continue;const g={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!v.hasAnimated){const w=t.getProps()[cP];w&&(g.elapsed=window.HandoffAppearAnimations(w,h,v,Ir))}let k=v.start(vm(h,v,x,t.shouldReduceMotion&&zl.has(h)?{type:!1}:g));c0(f)&&(f.add(h),k=k.then(()=>f.remove(h))),c.push(k)}return Promise.all(c).then(()=>{a&&sP(t,a)})}function oI(t,e,r=0,n=0,i=1,s){const o=[],a=(t.variantChildren.size-1)*n,l=i===1?(f=0)=>f*n:(f=0)=>a-f*n;return Array.from(t.variantChildren).sort(aI).forEach((f,c)=>{f.notify("AnimationStart",e),o.push(Oy(f,e,{...s,delay:r+l(c)}).then(()=>f.notify("AnimationComplete",e)))}),Promise.all(o)}function aI(t,e){return t.sortNodePosition(e)}function lI({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const ym=[We.Animate,We.InView,We.Focus,We.Hover,We.Tap,We.Drag,We.Exit],fI=[...ym].reverse(),cI=ym.length;function uI(t){return e=>Promise.all(e.map(({animation:r,options:n})=>sI(t,r,n)))}function dI(t){let e=uI(t);const r=vI();let n=!0;const i=(l,f)=>{const c=bh(t,f);if(c){const{transition:u,transitionEnd:h,...v}=c;l={...l,...v,...h}}return l};function s(l){e=l(t)}function o(l,f){const c=t.getProps(),u=t.getVariantContext(!0)||{},h=[],v=new Set;let x={},g=1/0;for(let w=0;wg&&M;const q=Array.isArray(I)?I:[I];let G=q.reduce(i,{});$===!1&&(G={});const{prevResolvedValues:re={}}=E,B={...re,...G},y=C=>{W=!0,v.delete(C),E.needsAnimating[C]=!0};for(const C in B){const P=G[C],O=re[C];x.hasOwnProperty(C)||(P!==O?o0(P)&&o0(O)?!L8(P,O)||U?y(C):E.protectedKeys[C]=!0:P!==void 0?y(C):v.add(C):P!==void 0&&v.has(C)?y(C):E.protectedKeys[C]=!0)}E.prevProp=I,E.prevResolvedValues=G,E.isActive&&(x={...x,...G}),n&&t.blockInitialAnimation&&(W=!1),W&&!j&&h.push(...q.map(C=>({animation:C,options:{type:A,...l}})))}if(v.size){const w={};v.forEach(A=>{const E=t.getBaseTarget(A);E!==void 0&&(w[A]=E)}),h.push({animation:w})}let k=Boolean(h.length);return n&&c.initial===!1&&!t.manuallyAnimateOnMount&&(k=!1),n=!1,k?e(h):Promise.resolve()}function a(l,f,c){var u;if(r[l].isActive===f)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(v=>{var x;return(x=v.animationState)===null||x===void 0?void 0:x.setActive(l,f)}),r[l].isActive=f;const h=o(c,l);for(const v in r)r[v].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>r}}function hI(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!L8(e,t):!1}function Eo(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function vI(){return{[We.Animate]:Eo(!0),[We.InView]:Eo(),[We.Hover]:Eo(),[We.Tap]:Eo(),[We.Drag]:Eo(),[We.Focus]:Eo(),[We.Exit]:Eo()}}const yI={animation:Ns(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=dI(t)),vh(e)&&S.useEffect(()=>e.subscribe(t),[e])}),exit:Ns(t=>{const{custom:e,visualElement:r}=t,[n,i]=B8(),s=S.useContext(qc);S.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(We.Exit,!n,{custom:s&&s.custom||e});o&&!n&&o.then(i)},[n])})},a2=(t,e)=>Math.abs(t-e);function pI(t,e){const r=a2(t.x,e.x),n=a2(t.y,e.y);return Math.sqrt(r**2+n**2)}class c4{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 f=K1(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,u=pI(f.offset,{x:0,y:0})>=3;if(!c&&!u)return;const{point:h}=f,{timestamp:v}=Yi;this.history.push({...h,timestamp:v});const{onStart:x,onMove:g}=this.handlers;c||(x&&x(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,f)},this.handlePointerMove=(f,c)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=G1(c,this.transformPagePoint),Ir.update(this.updatePoint,!0)},this.handlePointerUp=(f,c)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:h}=this.handlers,v=K1(f.type==="pointercancel"?this.lastMoveEventInfo:G1(c,this.transformPagePoint),this.history);this.startEvent&&u&&u(f,v),h&&h(f,v)},!I8(e))return;this.handlers=r,this.transformPagePoint=n;const i=gh(e),s=G1(i,this.transformPagePoint),{point:o}=s,{timestamp:a}=Yi;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=r;l&&l(e,K1(s,this.history)),this.removeListeners=mh(ll(window,"pointermove",this.handlePointerMove),ll(window,"pointerup",this.handlePointerUp),ll(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Xs.update(this.updatePoint)}}function G1(t,e){return e?{point:e(t.point)}:t}function l2(t,e){return{x:t.x-e.x,y:t.y-e.y}}function K1({point:t},e){return{point:t,delta:l2(t,u4(e)),offset:l2(t,gI(e)),velocity:mI(e,.1)}}function gI(t){return t[0]}function u4(t){return t[t.length-1]}function mI(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const i=u4(t);for(;r>=0&&(n=t[r],!(i.timestamp-n.timestamp>ld(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 mn(t){return t.max-t.min}function Dy(t,e=0,r=.01){return Math.abs(t-e)<=r}function f2(t,e,r,n=.5){t.origin=n,t.originPoint=Ft(e.min,e.max,t.origin),t.scale=mn(r)/mn(e),(Dy(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Ft(r.min,r.max,t.origin)-t.originPoint,(Dy(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Ff(t,e,r,n){f2(t.x,e.x,r.x,n==null?void 0:n.originX),f2(t.y,e.y,r.y,n==null?void 0:n.originY)}function c2(t,e,r){t.min=r.min+e.min,t.max=t.min+mn(e)}function xI(t,e,r){c2(t.x,e.x,r.x),c2(t.y,e.y,r.y)}function u2(t,e,r){t.min=e.min-r.min,t.max=t.min+mn(e)}function jf(t,e,r){u2(t.x,e.x,r.x),u2(t.y,e.y,r.y)}function bI(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?Ft(r,t,n.max):Math.min(t,r)),t}function d2(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 wI(t,{top:e,left:r,bottom:n,right:i}){return{x:d2(t.x,r,i),y:d2(t.y,e,n)}}function h2(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=d0(e.min,e.max-n,t.min):n>i&&(r=d0(t.min,t.max-i,e.min)),El(0,1,r)}function EI(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 By=.35;function SI(t=By){return t===!1?t=0:t===!0&&(t=By),{x:v2(t,"left","right"),y:v2(t,"top","bottom")}}function v2(t,e,r){return{min:y2(t,e),max:y2(t,r)}}function y2(t,e){return typeof t=="number"?t:t[e]||0}const p2=()=>({translate:0,scale:1,origin:0,originPoint:0}),Uf=()=>({x:p2(),y:p2()}),g2=()=>({min:0,max:0}),tr=()=>({x:g2(),y:g2()});function di(t){return[t("x"),t("y")]}function d4({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function kI({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function _I(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 J1(t){return t===void 0||t===1}function Ly({scale:t,scaleX:e,scaleY:r}){return!J1(t)||!J1(e)||!J1(r)}function To(t){return Ly(t)||h4(t)||t.z||t.rotate||t.rotateX||t.rotateY}function h4(t){return m2(t.x)||m2(t.y)}function m2(t){return t&&t!=="0%"}function v0(t,e,r){const n=t-r,i=e*n;return r+i}function x2(t,e,r,n,i){return i!==void 0&&(t=v0(t,i,n)),v0(t,r,n)+e}function $y(t,e=0,r=1,n,i){t.min=x2(t.min,e,r,n,i),t.max=x2(t.max,e,r,n,i)}function v4(t,{x:e,y:r}){$y(t.x,e.translate,e.scale,e.originPoint),$y(t.y,r.translate,r.scale,r.originPoint)}function TI(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 f=0;f1.0000000000001||t<.999999999999?t:1}function Ts(t,e){t.min=t.min+e,t.max=t.max+e}function w2(t,e,[r,n,i]){const s=e[i]!==void 0?e[i]:.5,o=Ft(t.min,t.max,s);$y(t,e[r],e[n],o,e.scale)}const PI=["x","scaleX","originX"],II=["y","scaleY","originY"];function Xa(t,e){w2(t.x,e,PI),w2(t.y,e,II)}function y4(t,e){return d4(_I(t.getBoundingClientRect(),e))}function RI(t,e,r){const n=y4(t,r),{scroll:i}=e;return i&&(Ts(n.x,i.offset.x),Ts(n.y,i.offset.y)),n}const MI=new WeakMap;class NI{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=tr(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(gh(a,"page").point)},i=(a,l)=>{var f;const{drag:c,dragPropagation:u,onDragStart:h}=this.getProps();c&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=N8(c),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),di(v=>{var x,g;let k=this.getAxisMotionValue(v).get()||0;if(Ai.test(k)){const w=(g=(x=this.visualElement.projection)===null||x===void 0?void 0:x.layout)===null||g===void 0?void 0:g.layoutBox[v];w&&(k=mn(w)*(parseFloat(k)/100))}this.originPoint[v]=k}),h==null||h(a,l),(f=this.visualElement.animationState)===null||f===void 0||f.setActive(We.Drag,!0))},s=(a,l)=>{const{dragPropagation:f,dragDirectionLock:c,onDirectionLock:u,onDrag:h}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:v}=l;if(c&&this.currentDirection===null){this.currentDirection=OI(v),this.currentDirection!==null&&(u==null||u(this.currentDirection));return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),h==null||h(a,l)},o=(a,l)=>this.stop(a,l);this.panSession=new c4(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(We.Drag,!1)}updateAxis(e,r,n){const{drag:i}=this.getProps();if(!n||!Ru(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=bI(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&&Qa(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=wI(n.layoutBox,e):this.constraints=!1,this.elastic=SI(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&di(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=EI(n.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!Qa(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=RI(n,i.root,this.visualElement.getTransformPagePoint());let o=CI(i.layout.layoutBox,s);if(r){const a=r(kI(o));this.hasMutatedConstraints=!!a,a&&(o=d4(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},f=di(c=>{if(!Ru(c,r,this.currentDirection))return;let u=(l==null?void 0:l[c])||{};o&&(u={min:0,max:0});const h=i?200:1e6,v=i?40:1e7,x={type:"inertia",velocity:n?e[c]:0,bounceStiffness:h,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(c,x)});return Promise.all(f).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(vm(e,n,0,r))}stopAnimation(){di(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){di(r=>{const{drag:n}=this.getProps();if(!Ru(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]-Ft(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Qa(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};di(a=>{const l=this.getAxisMotionValue(a);if(l){const f=l.get();s[a]=AI({min:f,max:f},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(),di(a=>{if(!Ru(a,r,null))return;const l=this.getAxisMotionValue(a),{min:f,max:c}=this.constraints[a];l.set(Ft(f,c,s[a]))})}addListeners(){var e;if(!this.visualElement.current)return;MI.set(this.visualElement,this);const r=this.visualElement.current,n=ll(r,"pointerdown",f=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(f)}),i=()=>{const{dragConstraints:f}=this.getProps();Qa(f)&&(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=Vo(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:f,hasLayoutChanged:c})=>{this.isDragging&&c&&(di(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=f[u].translate,h.set(h.get()+f[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=By,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Ru(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function OI(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function DI(t){const{dragControls:e,visualElement:r}=t,n=ph(()=>new NI(r));S.useEffect(()=>e&&e.subscribe(n),[n,e]),S.useEffect(()=>n.addListeners(),[n])}function BI({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:i}){const s=t||e||r||n,o=S.useRef(null),{transformPagePoint:a}=S.useContext(Vg),l={onSessionStart:n,onStart:e,onMove:t,onEnd:(c,u)=>{o.current=null,r&&r(c,u)}};S.useEffect(()=>{o.current!==null&&o.current.updateHandlers(l)});function f(c){o.current=new c4(c,l,{transformPagePoint:a})}l0(i,"pointerdown",s&&f),Zg(()=>o.current&&o.current.end())}const LI={pan:Ns(BI),drag:Ns(DI)};function Fy(t){return typeof t=="string"&&t.startsWith("var(--")}const p4=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function $I(t){const e=p4.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function jy(t,e,r=1){const[n,i]=$I(t);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);return s?s.trim():Fy(i)?jy(i,e,r+1):i}function FI(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(!Fy(s))return;const o=jy(s,n);o&&i.set(o)});for(const i in e){const s=e[i];if(!Fy(s))continue;const o=jy(s,n);o&&(e[i]=o,r&&r[i]===void 0&&(r[i]=s))}return{target:e,transitionEnd:r}}const jI=new Set(["width","height","top","left","right","bottom","x","y"]),g4=t=>jI.has(t),UI=t=>Object.keys(t).some(g4),C2=t=>t===da||t===pe;var A2;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(A2||(A2={}));const E2=(t,e)=>parseFloat(t.split(", ")[e]),S2=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/);if(i)return E2(i[1],e);{const s=n.match(/^matrix\((.+)\)$/);return s?E2(s[1],t):0}},zI=new Set(["x","y","z"]),VI=i0.filter(t=>!zI.has(t));function HI(t){const e=[];return VI.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 k2={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:S2(4,13),y:S2(5,14)},WI=(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(f=>{a[f]=k2[f](n,s)}),e.render();const l=e.measureViewportBox();return r.forEach(f=>{const c=e.getValue(f);c&&c.jump(a[f]),t[f]=k2[f](l,s)}),t},qI=(t,e,r={},n={})=>{e={...e},n={...n};const i=Object.keys(e).filter(g4);let s=[],o=!1;const a=[];if(i.forEach(l=>{const f=t.getValue(l);if(!t.hasValue(l))return;let c=r[l],u=uf(c);const h=e[l];let v;if(o0(h)){const x=h.length,g=h[0]===null?1:0;c=h[g],u=uf(c);for(let k=g;k=0?window.pageYOffset:null,f=WI(e,t,a);return s.length&&s.forEach(([c,u])=>{t.getValue(c).set(u)}),t.render(),hh&&l!==null&&window.scrollTo({top:l}),{target:f,transitionEnd:n}}else return{target:e,transitionEnd:n}};function GI(t,e,r,n){return UI(e)?qI(t,e,r,n):{target:e,transitionEnd:n}}const KI=(t,e,r,n)=>{const i=FI(t,e,n);return e=i.target,n=i.transitionEnd,GI(t,e,r,n)},Uy={current:null},m4={current:!1};function JI(){if(m4.current=!0,!!hh)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Uy.current=t.matches;t.addListener(e),e()}else Uy.current=!1}function QI(t,e,r){const{willChange:n}=e;for(const i in e){const s=e[i],o=r[i];if(nn(s))t.addValue(i,s),c0(n)&&n.add(i);else if(nn(o))t.addValue(i,Sl(s,{owner:t})),c0(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,Sl(a!==void 0?a:s,{owner:t}))}}for(const i in r)e[i]===void 0&&t.removeValue(i);return e}const x4=Object.keys(Sc),YI=x4.length,_2=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class XI{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=()=>Ir.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=yh(r),this.isVariantNode=g8(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...f}=this.scrapeMotionValuesFromProps(r,{});for(const c in f){const u=f[c];o[c]!==void 0&&nn(u)&&(u.set(o[c],!1),c0(l)&&l.add(c))}}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)),m4.current||JI(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Uy.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(),Xs.update(this.notifyUpdate),Xs.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=zl.has(e),i=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Ir.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 f=0;fthis.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:a,layoutScroll:v,layoutRoot:x})}return l}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):tr()}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;n<_2.length;n++){const i=_2[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s=e["on"+i];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=QI(this,this.scrapeMotionValuesFromProps(e,r),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){var r;return(r=this.props.variants)===null||r===void 0?void 0:r[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var e;return this.isVariantNode?this:(e=this.parent)===null||e===void 0?void 0:e.getClosestVariantNode()}getVariantContext(e=!1){var r,n;if(e)return(r=this.parent)===null||r===void 0?void 0:r.getVariantContext();if(!this.isControllingVariants){const s=((n=this.parent)===null||n===void 0?void 0:n.getVariantContext())||{};return this.props.initial!==void 0&&(s.initial=this.props.initial),s}const i={};for(let s=0;sn.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=Sl(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=Xg(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&&!nn(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 rm),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}}const b4=["initial",...ym],ZI=b4.length;class w4 extends XI{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=lP(n,e||{},this);if(i&&(r&&(r=i(r)),n&&(n=i(n)),o&&(o=i(o))),s){oP(this,n,o);const a=KI(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function eR(t){return window.getComputedStyle(t)}class tR extends w4{readValueFromInstance(e,r){if(zl.has(r)){const n=sm(r);return n&&n.default||0}else{const n=eR(e),i=(b8(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:r}){return y4(e,r)}build(e,r,n,i){qg(e,r,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,r){return Yg(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;nn(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,i){S8(e,r,n,i)}}class rR extends w4{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return zl.has(r)?((n=sm(r))===null||n===void 0?void 0:n.default)||0:(r=k8.has(r)?r:Qg(r),e.getAttribute(r))}measureInstanceViewportBox(){return tr()}scrapeMotionValuesFromProps(e,r){return T8(e,r)}build(e,r,n,i){Kg(e,r,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,r,n,i){_8(e,r,n,i)}mount(e){this.isSVGTag=Jg(e.tagName),super.mount(e)}}const nR=(t,e)=>Wg(t)?new rR(e,{enableHardwareAcceleration:!1}):new tR(e,{enableHardwareAcceleration:!0});function T2(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const df={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(pe.test(t))t=parseFloat(t);else return t;const r=T2(t,e.target.x),n=T2(t,e.target.y);return`${r}% ${n}%`}},P2="_$css",iR={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,i=t.includes("var("),s=[];i&&(t=t.replace(p4,v=>(s.push(v),P2)));const o=Zs.parse(t);if(o.length>5)return n;const a=Zs.createTransformer(t),l=typeof o[0]!="number"?1:0,f=r.x.scale*e.x,c=r.y.scale*e.y;o[0+l]/=f,o[1+l]/=c;const u=Ft(f,c,.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 v=0;h=h.replace(P2,()=>{const x=s[v];return v++,x})}return h}};class sR extends Wt.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=e;J_(aR),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()})),Bf.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()||Ir.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 oR(t){const[e,r]=B8(),n=S.useContext(Hg);return Wt.createElement(sR,{...t,layoutGroup:n,switchLayoutGroup:S.useContext(m8),isPresent:e,safeToRemove:r})}const aR={borderRadius:{...df,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:df,borderTopRightRadius:df,borderBottomLeftRadius:df,borderBottomRightRadius:df,boxShadow:iR},lR={measureLayout:oR};function fR(t,e,r={}){const n=nn(t)?t:Sl(t);return n.start(vm("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const C4=["TopLeft","TopRight","BottomLeft","BottomRight"],cR=C4.length,I2=t=>typeof t=="string"?parseFloat(t):t,R2=t=>typeof t=="number"||pe.test(t);function uR(t,e,r,n,i,s){i?(t.opacity=Ft(0,r.opacity!==void 0?r.opacity:1,dR(n)),t.opacityExit=Ft(e.opacity!==void 0?e.opacity:1,0,hR(n))):s&&(t.opacity=Ft(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(d0(t,e,n))}function N2(t,e){t.min=e.min,t.max=e.max}function jn(t,e){N2(t.x,e.x),N2(t.y,e.y)}function O2(t,e,r,n,i){return t-=e,t=v0(t,1/r,n),i!==void 0&&(t=v0(t,1/i,n)),t}function vR(t,e=0,r=1,n=.5,i,s=t,o=t){if(Ai.test(e)&&(e=parseFloat(e),e=Ft(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=Ft(s.min,s.max,n);t===s&&(a-=e),t.min=O2(t.min,e,r,a,i),t.max=O2(t.max,e,r,a,i)}function D2(t,e,[r,n,i],s,o){vR(t,e[r],e[n],e[i],e.scale,s,o)}const yR=["x","scaleX","originX"],pR=["y","scaleY","originY"];function B2(t,e,r,n){D2(t.x,e,yR,r==null?void 0:r.x,n==null?void 0:n.x),D2(t.y,e,pR,r==null?void 0:r.y,n==null?void 0:n.y)}function L2(t){return t.translate===0&&t.scale===1}function E4(t){return L2(t.x)&&L2(t.y)}function S4(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 $2(t){return mn(t.x)/mn(t.y)}class gR{constructor(){this.members=[]}add(e){em(this.members,e),e.scheduleRender()}remove(e){if(tm(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 F2(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:f,rotateY:c}=r;l&&(n+=`rotate(${l}deg) `),f&&(n+=`rotateX(${f}deg) `),c&&(n+=`rotateY(${c}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 mR=(t,e)=>t.depth-e.depth;class xR{constructor(){this.children=[],this.isDirty=!1}add(e){em(this.children,e),this.isDirty=!0}remove(e){tm(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(mR),this.isDirty=!1,this.children.forEach(e)}}const j2=["","X","Y","Z"],U2=1e3;let bR=0;function k4({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=bR++,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(AR),this.nodes.forEach(kR),this.nodes.forEach(_R)},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 f=0;fthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=a4(v,250),Bf.hasAnimatedSinceResize&&(Bf.hasAnimatedSinceResize=!1,this.nodes.forEach(V2))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&u&&(f||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:v,hasRelativeTargetChanged:x,layout:g})=>{var k,w,A,E,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:MR,{onLayoutAnimationStart:$,onLayoutAnimationComplete:j}=u.getProps(),U=!this.targetLayout||!S4(this.targetLayout,g)||x,W=!v&&x;if(this.options.layoutRoot||!((A=this.resumeFrom)===null||A===void 0)&&A.instance||W||v&&(U||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,W);const q={...l4(M,"layout"),onPlay:$,onComplete:j};(u.shouldReduceMotion||this.options.layoutRoot)&&(q.delay=0,q.type=!1),this.startAnimation(q)}else!v&&this.animationProgress===0&&V2(this),this.isLead()&&((I=(E=this.options).onExitComplete)===null||I===void 0||I.call(E));this.targetLayout=g})}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,Xs.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(TR),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,f;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 E;const I=A/1e3;H2(v.x,o.x,I),H2(v.y,o.y,I),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((E=this.relativeParent)===null||E===void 0)&&E.layout)&&(jf(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),IR(this.relativeTarget,this.relativeTargetOrigin,x,I)),g&&(this.animationValues=h,uR(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&&(Xs.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ir.update(()=>{Bf.hasAnimatedSinceResize=!0,this.currentAnimation=fR(0,U2,{...o,onUpdate:f=>{var c;this.mixTargetDelta(f),(c=o.onUpdate)===null||c===void 0||c.call(o,f)},onComplete:()=>{var f;(f=o.onComplete)===null||f===void 0||f.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,U2),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:f,latestValues:c}=o;if(!(!a||!l||!f)){if(this!==o&&this.layout&&f&&_4(this.options.animationType,this.layout.layoutBox,f.layoutBox)){l=this.target||tr();const u=mn(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const h=mn(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}jn(a,l),Xa(a,c),Ff(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){var l,f,c;this.sharedNodes.has(o)||this.sharedNodes.set(o,new gR),this.sharedNodes.get(o).add(a),a.promote({transition:(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(c=(f=a.options.initialPromotionConfig)===null||f===void 0?void 0:f.shouldPreserveFollowOpacity)===null||c===void 0?void 0:c.call(f,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 f=this.getStack();f&&f.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 f={};for(let c=0;c{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(z2),this.root.sharedNodes.clear()}}}function wR(t){t.updateLayout()}function CR(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"?di(v=>{const x=l?i.measuredBox[v]:i.layoutBox[v],g=mn(x);x.min=s[v].min,x.max=x.min+g}):_4(a,i.layoutBox,s)&&di(v=>{const x=l?i.measuredBox[v]:i.layoutBox[v],g=mn(s[v]);x.max=x.min+g});const f=Uf();Ff(f,s,i.layoutBox);const c=Uf();l?Ff(c,t.applyTransform(o,!0),i.measuredBox):Ff(c,s,i.layoutBox);const u=!E4(f);let h=!1;if(!t.resumeFrom){const v=t.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:x,layout:g}=v;if(x&&g){const k=tr();jf(k,i.layoutBox,x.layoutBox);const w=tr();jf(w,s,g.layoutBox),S4(k,w)||(h=!0),v.options.layoutRoot&&(t.relativeTarget=w,t.relativeTargetOrigin=k,t.relativeParent=v)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:i,delta:c,layoutDelta:f,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 AR(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}function ER(t){t.clearSnapshot()}function z2(t){t.clearMeasurements()}function SR(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function V2(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function kR(t){t.resolveTargetDelta()}function _R(t){t.calcProjection()}function TR(t){t.resetRotation()}function PR(t){t.removeLeadSnapshot()}function H2(t,e,r){t.translate=Ft(e.translate,0,r),t.scale=Ft(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function W2(t,e,r,n){t.min=Ft(e.min,r.min,n),t.max=Ft(e.max,r.max,n)}function IR(t,e,r,n){W2(t.x,e.x,r.x,n),W2(t.y,e.y,r.y,n)}function RR(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const MR={duration:.45,ease:[.4,0,.1,1]};function NR(t,e){let r=t.root;for(let s=t.path.length-1;s>=0;s--)if(Boolean(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 OR(t){q2(t.x),q2(t.y)}function _4(t,e,r){return t==="position"||t==="preserve-aspect"&&!Dy($2(e),$2(r),.2)}const DR=k4({attachResizeListener:(t,e)=>Vo(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Q1={current:void 0},BR=k4({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Q1.current){const t=new DR(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),Q1.current=t}return Q1.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>Boolean(window.getComputedStyle(t).position==="fixed")}),LR={...yI,...OT,...LI,...lR},fd=G_((t,e)=>wT(t,e,LR,nR,BR));function T4(){const t=S.useRef(!1);return r0(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function $R(){const t=T4(),[e,r]=S.useState(0),n=S.useCallback(()=>{t.current&&r(e+1)},[e]);return[S.useCallback(()=>Ir.postRender(n),[n]),e]}class FR 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 jR({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 f=document.createElement("style");return document.head.appendChild(f),f.sheet&&f.sheet.insertRule(` [data-motion-pop-id="${r}"] { position: absolute !important; width: ${s}px !important; @@ -45,7 +45,7 @@ Error generating stack: `+s.message+` top: ${a}px !important; left: ${l}px !important; } - `),()=>{document.head.removeChild(f)}},[e]),S.createElement($R,{isPresent:e,childRef:n,sizeRef:i},S.cloneElement(t,{ref:n}))}const Q1=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:s,mode:o})=>{const a=yh(jR),l=S.useId(),f=S.useMemo(()=>({id:l,initial:e,isPresent:r,custom:i,onExitComplete:c=>{a.set(c,!0);for(const u of a.values())if(!u)return;n&&n()},register:c=>(a.set(c,!1),()=>a.delete(c))}),s?void 0:[r]);return S.useMemo(()=>{a.forEach((c,u)=>a.set(u,!1))},[r]),S.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=S.createElement(FR,{isPresent:r},t)),S.createElement(Wc.Provider,{value:f},t)};function jR(){return new Map}const Na=t=>t.key||"";function UR(t,e){t.forEach(r=>{const n=Na(r);e.set(n,r)})}function zR(t){const e=[];return S.Children.forEach(t,r=>{S.isValidElement(r)&&e.push(r)}),e}const VR=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{i&&(o="wait");let[a]=LR();const l=S.useContext(Hg).forceRender;l&&(a=l);const f=T4(),c=zR(t);let u=c;const h=new Set,v=S.useRef(u),x=S.useRef(new Map).current,g=S.useRef(!0);if(t0(()=>{g.current=!1,UR(c,x),v.current=u}),Zg(()=>{g.current=!0,x.clear(),h.clear()}),g.current)return S.createElement(S.Fragment,null,u.map(E=>S.createElement(Q1,{key:Na(E),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:s,mode:o},E)));u=[...u];const k=v.current.map(Na),w=c.map(Na),A=k.length;for(let E=0;E{if(w.indexOf(E)!==-1)return;const I=x.get(E);if(!I)return;const M=k.indexOf(E),$=()=>{x.delete(E),h.delete(E);const j=v.current.findIndex(U=>U.key===E);if(v.current.splice(j,1),!h.size){if(v.current=c,f.current===!1)return;a(),n&&n()}};u.splice(M,0,S.createElement(Q1,{key:Na(I),isPresent:!1,onExitComplete:$,custom:e,presenceAffectsLayout:s,mode:o},I))}),u=u.map(E=>{const I=E.key;return h.has(I)?E:S.createElement(Q1,{key:Na(E),isPresent:!0,presenceAffectsLayout:s,mode:o},E)}),S.createElement(S.Fragment,null,h.size?u:u.map(E=>S.cloneElement(E)))},HR={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"}};function WR(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 qR(t){var e=WR(t,"string");return typeof e=="symbol"?e:String(e)}function GR(t,e,r){return e=qR(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function G2(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 Y1(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 f=[],c={},u=Y1({},l),h=!1;for(var v of o){var x=l[v];if(x!=null){var g=i[v];h=!0;for(var k of g.mappings)c[k]=x,u[k]==null&&delete u[k]}}var w=h?Y1(Y1({},c),u):l,A=function(){var $=w[E],j=i[E];try{if(j.mappings)return"continue";if(typeof $=="string"||typeof $=="number")f.push(j.values[$].defaultClass);else if(Array.isArray($))for(var U=0;U<$.length;U++){var W=$[U];if(W!=null){var q=j.responsiveArray[U];f.push(j.values[W].conditions[q])}}else for(var G in $){var re=$[G];re!=null&&f.push(j.values[re].conditions[G])}}catch(D){throw D}};for(var E in w)var I=A();return t(f.join(" "))};return Object.assign(a,{properties:new Set(s)})},JR=t=>t,QR=function(){return KR(JR)(...arguments)},P4=QR({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"},backgroundPrimary:{conditions:{base:"fyvr11pn",active:"fyvr11po",disabled:"fyvr11pp",focus:"fyvr11pq",hover:"fyvr11pr",checked:"fyvr11ps"},defaultClass:"fyvr11pn"},backgroundSecondary:{conditions:{base:"fyvr11pt",active:"fyvr11pu",disabled:"fyvr11pv",focus:"fyvr11pw",hover:"fyvr11px",checked:"fyvr11py"},defaultClass:"fyvr11pt"},backgroundContrast:{conditions:{base:"fyvr11pz",active:"fyvr11q0",disabled:"fyvr11q1",focus:"fyvr11q2",hover:"fyvr11q3",checked:"fyvr11q4"},defaultClass:"fyvr11pz"},backgroundMuted:{conditions:{base:"fyvr11q5",active:"fyvr11q6",disabled:"fyvr11q7",focus:"fyvr11q8",hover:"fyvr11q9",checked:"fyvr11qa"},defaultClass:"fyvr11q5"},backgroundControl:{conditions:{base:"fyvr11qb",active:"fyvr11qc",disabled:"fyvr11qd",focus:"fyvr11qe",hover:"fyvr11qf",checked:"fyvr11qg"},defaultClass:"fyvr11qb"},backgroundInverse:{conditions:{base:"fyvr11qh",active:"fyvr11qi",disabled:"fyvr11qj",focus:"fyvr11qk",hover:"fyvr11ql",checked:"fyvr11qm"},defaultClass:"fyvr11qh"},backgroundBackdrop:{conditions:{base:"fyvr11qn",active:"fyvr11qo",disabled:"fyvr11qp",focus:"fyvr11qq",hover:"fyvr11qr",checked:"fyvr11qs"},defaultClass:"fyvr11qn"},backgroundOverlay:{conditions:{base:"fyvr11qt",active:"fyvr11qu",disabled:"fyvr11qv",focus:"fyvr11qw",hover:"fyvr11qx",checked:"fyvr11qy"},defaultClass:"fyvr11qt"},borderNormal:{conditions:{base:"fyvr11qz",active:"fyvr11r0",disabled:"fyvr11r1",focus:"fyvr11r2",hover:"fyvr11r3",checked:"fyvr11r4"},defaultClass:"fyvr11qz"},borderFocus:{conditions:{base:"fyvr11r5",active:"fyvr11r6",disabled:"fyvr11r7",focus:"fyvr11r8",hover:"fyvr11r9",checked:"fyvr11ra"},defaultClass:"fyvr11r5"},buttonGlass:{conditions:{base:"fyvr11rb",active:"fyvr11rc",disabled:"fyvr11rd",focus:"fyvr11re",hover:"fyvr11rf",checked:"fyvr11rg"},defaultClass:"fyvr11rb"},buttonEmphasis:{conditions:{base:"fyvr11rh",active:"fyvr11ri",disabled:"fyvr11rj",focus:"fyvr11rk",hover:"fyvr11rl",checked:"fyvr11rm"},defaultClass:"fyvr11rh"},buttonInverse:{conditions:{base:"fyvr11rn",active:"fyvr11ro",disabled:"fyvr11rp",focus:"fyvr11rq",hover:"fyvr11rr",checked:"fyvr11rs"},defaultClass:"fyvr11rn"},text50:{conditions:{base:"fyvr11rt",active:"fyvr11ru",disabled:"fyvr11rv",focus:"fyvr11rw",hover:"fyvr11rx",checked:"fyvr11ry"},defaultClass:"fyvr11rt"},text80:{conditions:{base:"fyvr11rz",active:"fyvr11s0",disabled:"fyvr11s1",focus:"fyvr11s2",hover:"fyvr11s3",checked:"fyvr11s4"},defaultClass:"fyvr11rz"},text100:{conditions:{base:"fyvr11s5",active:"fyvr11s6",disabled:"fyvr11s7",focus:"fyvr11s8",hover:"fyvr11s9",checked:"fyvr11sa"},defaultClass:"fyvr11s5"},textInverse100:{conditions:{base:"fyvr11sb",active:"fyvr11sc",disabled:"fyvr11sd",focus:"fyvr11se",hover:"fyvr11sf",checked:"fyvr11sg"},defaultClass:"fyvr11sb"},arbitrumDark:{conditions:{base:"fyvr11sh",active:"fyvr11si",disabled:"fyvr11sj",focus:"fyvr11sk",hover:"fyvr11sl",checked:"fyvr11sm"},defaultClass:"fyvr11sh"},arbitrumLight:{conditions:{base:"fyvr11sn",active:"fyvr11so",disabled:"fyvr11sp",focus:"fyvr11sq",hover:"fyvr11sr",checked:"fyvr11ss"},defaultClass:"fyvr11sn"},avalanceDark:{conditions:{base:"fyvr11st",active:"fyvr11su",disabled:"fyvr11sv",focus:"fyvr11sw",hover:"fyvr11sx",checked:"fyvr11sy"},defaultClass:"fyvr11st"},avalanceLight:{conditions:{base:"fyvr11sz",active:"fyvr11t0",disabled:"fyvr11t1",focus:"fyvr11t2",hover:"fyvr11t3",checked:"fyvr11t4"},defaultClass:"fyvr11sz"},bscDark:{conditions:{base:"fyvr11t5",active:"fyvr11t6",disabled:"fyvr11t7",focus:"fyvr11t8",hover:"fyvr11t9",checked:"fyvr11ta"},defaultClass:"fyvr11t5"},bscLight:{conditions:{base:"fyvr11tb",active:"fyvr11tc",disabled:"fyvr11td",focus:"fyvr11te",hover:"fyvr11tf",checked:"fyvr11tg"},defaultClass:"fyvr11tb"},ethereumDark:{conditions:{base:"fyvr11th",active:"fyvr11ti",disabled:"fyvr11tj",focus:"fyvr11tk",hover:"fyvr11tl",checked:"fyvr11tm"},defaultClass:"fyvr11th"},ethereumLight:{conditions:{base:"fyvr11tn",active:"fyvr11to",disabled:"fyvr11tp",focus:"fyvr11tq",hover:"fyvr11tr",checked:"fyvr11ts"},defaultClass:"fyvr11tn"},gnosisDark:{conditions:{base:"fyvr11tt",active:"fyvr11tu",disabled:"fyvr11tv",focus:"fyvr11tw",hover:"fyvr11tx",checked:"fyvr11ty"},defaultClass:"fyvr11tt"},gnosisLight:{conditions:{base:"fyvr11tz",active:"fyvr11u0",disabled:"fyvr11u1",focus:"fyvr11u2",hover:"fyvr11u3",checked:"fyvr11u4"},defaultClass:"fyvr11tz"},polygonDark:{conditions:{base:"fyvr11u5",active:"fyvr11u6",disabled:"fyvr11u7",focus:"fyvr11u8",hover:"fyvr11u9",checked:"fyvr11ua"},defaultClass:"fyvr11u5"},polygonLight:{conditions:{base:"fyvr11ub",active:"fyvr11uc",disabled:"fyvr11ud",focus:"fyvr11ue",hover:"fyvr11uf",checked:"fyvr11ug"},defaultClass:"fyvr11ub"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11uh",active:"fyvr11ui",disabled:"fyvr11uj",focus:"fyvr11uk",hover:"fyvr11ul",checked:"fyvr11um"},defaultClass:"fyvr11uh"},white:{conditions:{base:"fyvr11un",active:"fyvr11uo",disabled:"fyvr11up",focus:"fyvr11uq",hover:"fyvr11ur",checked:"fyvr11us"},defaultClass:"fyvr11un"},inherit:{conditions:{base:"fyvr11ut",active:"fyvr11uu",disabled:"fyvr11uv",focus:"fyvr11uw",hover:"fyvr11ux",checked:"fyvr11uy"},defaultClass:"fyvr11ut"},transparent:{conditions:{base:"fyvr11uz",active:"fyvr11v0",disabled:"fyvr11v1",focus:"fyvr11v2",hover:"fyvr11v3",checked:"fyvr11v4"},defaultClass:"fyvr11uz"},positive:{conditions:{base:"fyvr11v5",active:"fyvr11v6",disabled:"fyvr11v7",focus:"fyvr11v8",hover:"fyvr11v9",checked:"fyvr11va"},defaultClass:"fyvr11v5"},negative:{conditions:{base:"fyvr11vb",active:"fyvr11vc",disabled:"fyvr11vd",focus:"fyvr11ve",hover:"fyvr11vf",checked:"fyvr11vg"},defaultClass:"fyvr11vb"},info:{conditions:{base:"fyvr11vh",active:"fyvr11vi",disabled:"fyvr11vj",focus:"fyvr11vk",hover:"fyvr11vl",checked:"fyvr11vm"},defaultClass:"fyvr11vh"},warning:{conditions:{base:"fyvr11vn",active:"fyvr11vo",disabled:"fyvr11vp",focus:"fyvr11vq",hover:"fyvr11vr",checked:"fyvr11vs"},defaultClass:"fyvr11vn"},gradientBackdrop:{conditions:{base:"fyvr11vt",active:"fyvr11vu",disabled:"fyvr11vv",focus:"fyvr11vw",hover:"fyvr11vx",checked:"fyvr11vy"},defaultClass:"fyvr11vt"},gradientPrimary:{conditions:{base:"fyvr11vz",active:"fyvr11w0",disabled:"fyvr11w1",focus:"fyvr11w2",hover:"fyvr11w3",checked:"fyvr11w4"},defaultClass:"fyvr11vz"},gradientSecondary:{conditions:{base:"fyvr11w5",active:"fyvr11w6",disabled:"fyvr11w7",focus:"fyvr11w8",hover:"fyvr11w9",checked:"fyvr11wa"},defaultClass:"fyvr11w5"},backgroundPrimary:{conditions:{base:"fyvr11wb",active:"fyvr11wc",disabled:"fyvr11wd",focus:"fyvr11we",hover:"fyvr11wf",checked:"fyvr11wg"},defaultClass:"fyvr11wb"},backgroundSecondary:{conditions:{base:"fyvr11wh",active:"fyvr11wi",disabled:"fyvr11wj",focus:"fyvr11wk",hover:"fyvr11wl",checked:"fyvr11wm"},defaultClass:"fyvr11wh"},backgroundContrast:{conditions:{base:"fyvr11wn",active:"fyvr11wo",disabled:"fyvr11wp",focus:"fyvr11wq",hover:"fyvr11wr",checked:"fyvr11ws"},defaultClass:"fyvr11wn"},backgroundMuted:{conditions:{base:"fyvr11wt",active:"fyvr11wu",disabled:"fyvr11wv",focus:"fyvr11ww",hover:"fyvr11wx",checked:"fyvr11wy"},defaultClass:"fyvr11wt"},backgroundControl:{conditions:{base:"fyvr11wz",active:"fyvr11x0",disabled:"fyvr11x1",focus:"fyvr11x2",hover:"fyvr11x3",checked:"fyvr11x4"},defaultClass:"fyvr11wz"},backgroundInverse:{conditions:{base:"fyvr11x5",active:"fyvr11x6",disabled:"fyvr11x7",focus:"fyvr11x8",hover:"fyvr11x9",checked:"fyvr11xa"},defaultClass:"fyvr11x5"},backgroundBackdrop:{conditions:{base:"fyvr11xb",active:"fyvr11xc",disabled:"fyvr11xd",focus:"fyvr11xe",hover:"fyvr11xf",checked:"fyvr11xg"},defaultClass:"fyvr11xb"},backgroundOverlay:{conditions:{base:"fyvr11xh",active:"fyvr11xi",disabled:"fyvr11xj",focus:"fyvr11xk",hover:"fyvr11xl",checked:"fyvr11xm"},defaultClass:"fyvr11xh"},borderNormal:{conditions:{base:"fyvr11xn",active:"fyvr11xo",disabled:"fyvr11xp",focus:"fyvr11xq",hover:"fyvr11xr",checked:"fyvr11xs"},defaultClass:"fyvr11xn"},borderFocus:{conditions:{base:"fyvr11xt",active:"fyvr11xu",disabled:"fyvr11xv",focus:"fyvr11xw",hover:"fyvr11xx",checked:"fyvr11xy"},defaultClass:"fyvr11xt"},buttonGlass:{conditions:{base:"fyvr11xz",active:"fyvr11y0",disabled:"fyvr11y1",focus:"fyvr11y2",hover:"fyvr11y3",checked:"fyvr11y4"},defaultClass:"fyvr11xz"},buttonEmphasis:{conditions:{base:"fyvr11y5",active:"fyvr11y6",disabled:"fyvr11y7",focus:"fyvr11y8",hover:"fyvr11y9",checked:"fyvr11ya"},defaultClass:"fyvr11y5"},buttonInverse:{conditions:{base:"fyvr11yb",active:"fyvr11yc",disabled:"fyvr11yd",focus:"fyvr11ye",hover:"fyvr11yf",checked:"fyvr11yg"},defaultClass:"fyvr11yb"},text50:{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"},text100:{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"},arbitrumDark:{conditions:{base:"fyvr11z5",active:"fyvr11z6",disabled:"fyvr11z7",focus:"fyvr11z8",hover:"fyvr11z9",checked:"fyvr11za"},defaultClass:"fyvr11z5"},arbitrumLight:{conditions:{base:"fyvr11zb",active:"fyvr11zc",disabled:"fyvr11zd",focus:"fyvr11ze",hover:"fyvr11zf",checked:"fyvr11zg"},defaultClass:"fyvr11zb"},avalanceDark:{conditions:{base:"fyvr11zh",active:"fyvr11zi",disabled:"fyvr11zj",focus:"fyvr11zk",hover:"fyvr11zl",checked:"fyvr11zm"},defaultClass:"fyvr11zh"},avalanceLight:{conditions:{base:"fyvr11zn",active:"fyvr11zo",disabled:"fyvr11zp",focus:"fyvr11zq",hover:"fyvr11zr",checked:"fyvr11zs"},defaultClass:"fyvr11zn"},bscDark:{conditions:{base:"fyvr11zt",active:"fyvr11zu",disabled:"fyvr11zv",focus:"fyvr11zw",hover:"fyvr11zx",checked:"fyvr11zy"},defaultClass:"fyvr11zt"},bscLight:{conditions:{base:"fyvr11zz",active:"fyvr1200",disabled:"fyvr1201",focus:"fyvr1202",hover:"fyvr1203",checked:"fyvr1204"},defaultClass:"fyvr11zz"},ethereumDark:{conditions:{base:"fyvr1205",active:"fyvr1206",disabled:"fyvr1207",focus:"fyvr1208",hover:"fyvr1209",checked:"fyvr120a"},defaultClass:"fyvr1205"},ethereumLight:{conditions:{base:"fyvr120b",active:"fyvr120c",disabled:"fyvr120d",focus:"fyvr120e",hover:"fyvr120f",checked:"fyvr120g"},defaultClass:"fyvr120b"},gnosisDark:{conditions:{base:"fyvr120h",active:"fyvr120i",disabled:"fyvr120j",focus:"fyvr120k",hover:"fyvr120l",checked:"fyvr120m"},defaultClass:"fyvr120h"},gnosisLight:{conditions:{base:"fyvr120n",active:"fyvr120o",disabled:"fyvr120p",focus:"fyvr120q",hover:"fyvr120r",checked:"fyvr120s"},defaultClass:"fyvr120n"},polygonDark:{conditions:{base:"fyvr120t",active:"fyvr120u",disabled:"fyvr120v",focus:"fyvr120w",hover:"fyvr120x",checked:"fyvr120y"},defaultClass:"fyvr120t"},polygonLight:{conditions:{base:"fyvr120z",active:"fyvr1210",disabled:"fyvr1211",focus:"fyvr1212",hover:"fyvr1213",checked:"fyvr1214"},defaultClass:"fyvr120z"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr1215",active:"fyvr1216",disabled:"fyvr1217",focus:"fyvr1218",hover:"fyvr1219",checked:"fyvr121a"},defaultClass:"fyvr1215"},dashed:{conditions:{base:"fyvr121b",active:"fyvr121c",disabled:"fyvr121d",focus:"fyvr121e",hover:"fyvr121f",checked:"fyvr121g"},defaultClass:"fyvr121b"},dotted:{conditions:{base:"fyvr121h",active:"fyvr121i",disabled:"fyvr121j",focus:"fyvr121k",hover:"fyvr121l",checked:"fyvr121m"},defaultClass:"fyvr121h"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr121n",active:"fyvr121o",disabled:"fyvr121p",focus:"fyvr121q",hover:"fyvr121r",checked:"fyvr121s"},defaultClass:"fyvr121n"},white:{conditions:{base:"fyvr121t",active:"fyvr121u",disabled:"fyvr121v",focus:"fyvr121w",hover:"fyvr121x",checked:"fyvr121y"},defaultClass:"fyvr121t"},inherit:{conditions:{base:"fyvr121z",active:"fyvr1220",disabled:"fyvr1221",focus:"fyvr1222",hover:"fyvr1223",checked:"fyvr1224"},defaultClass:"fyvr121z"},transparent:{conditions:{base:"fyvr1225",active:"fyvr1226",disabled:"fyvr1227",focus:"fyvr1228",hover:"fyvr1229",checked:"fyvr122a"},defaultClass:"fyvr1225"},positive:{conditions:{base:"fyvr122b",active:"fyvr122c",disabled:"fyvr122d",focus:"fyvr122e",hover:"fyvr122f",checked:"fyvr122g"},defaultClass:"fyvr122b"},negative:{conditions:{base:"fyvr122h",active:"fyvr122i",disabled:"fyvr122j",focus:"fyvr122k",hover:"fyvr122l",checked:"fyvr122m"},defaultClass:"fyvr122h"},info:{conditions:{base:"fyvr122n",active:"fyvr122o",disabled:"fyvr122p",focus:"fyvr122q",hover:"fyvr122r",checked:"fyvr122s"},defaultClass:"fyvr122n"},warning:{conditions:{base:"fyvr122t",active:"fyvr122u",disabled:"fyvr122v",focus:"fyvr122w",hover:"fyvr122x",checked:"fyvr122y"},defaultClass:"fyvr122t"},gradientBackdrop:{conditions:{base:"fyvr122z",active:"fyvr1230",disabled:"fyvr1231",focus:"fyvr1232",hover:"fyvr1233",checked:"fyvr1234"},defaultClass:"fyvr122z"},gradientPrimary:{conditions:{base:"fyvr1235",active:"fyvr1236",disabled:"fyvr1237",focus:"fyvr1238",hover:"fyvr1239",checked:"fyvr123a"},defaultClass:"fyvr1235"},gradientSecondary:{conditions:{base:"fyvr123b",active:"fyvr123c",disabled:"fyvr123d",focus:"fyvr123e",hover:"fyvr123f",checked:"fyvr123g"},defaultClass:"fyvr123b"},backgroundPrimary:{conditions:{base:"fyvr123h",active:"fyvr123i",disabled:"fyvr123j",focus:"fyvr123k",hover:"fyvr123l",checked:"fyvr123m"},defaultClass:"fyvr123h"},backgroundSecondary:{conditions:{base:"fyvr123n",active:"fyvr123o",disabled:"fyvr123p",focus:"fyvr123q",hover:"fyvr123r",checked:"fyvr123s"},defaultClass:"fyvr123n"},backgroundContrast:{conditions:{base:"fyvr123t",active:"fyvr123u",disabled:"fyvr123v",focus:"fyvr123w",hover:"fyvr123x",checked:"fyvr123y"},defaultClass:"fyvr123t"},backgroundMuted:{conditions:{base:"fyvr123z",active:"fyvr1240",disabled:"fyvr1241",focus:"fyvr1242",hover:"fyvr1243",checked:"fyvr1244"},defaultClass:"fyvr123z"},backgroundControl:{conditions:{base:"fyvr1245",active:"fyvr1246",disabled:"fyvr1247",focus:"fyvr1248",hover:"fyvr1249",checked:"fyvr124a"},defaultClass:"fyvr1245"},backgroundInverse:{conditions:{base:"fyvr124b",active:"fyvr124c",disabled:"fyvr124d",focus:"fyvr124e",hover:"fyvr124f",checked:"fyvr124g"},defaultClass:"fyvr124b"},backgroundBackdrop:{conditions:{base:"fyvr124h",active:"fyvr124i",disabled:"fyvr124j",focus:"fyvr124k",hover:"fyvr124l",checked:"fyvr124m"},defaultClass:"fyvr124h"},backgroundOverlay:{conditions:{base:"fyvr124n",active:"fyvr124o",disabled:"fyvr124p",focus:"fyvr124q",hover:"fyvr124r",checked:"fyvr124s"},defaultClass:"fyvr124n"},borderNormal:{conditions:{base:"fyvr124t",active:"fyvr124u",disabled:"fyvr124v",focus:"fyvr124w",hover:"fyvr124x",checked:"fyvr124y"},defaultClass:"fyvr124t"},borderFocus:{conditions:{base:"fyvr124z",active:"fyvr1250",disabled:"fyvr1251",focus:"fyvr1252",hover:"fyvr1253",checked:"fyvr1254"},defaultClass:"fyvr124z"},buttonGlass:{conditions:{base:"fyvr1255",active:"fyvr1256",disabled:"fyvr1257",focus:"fyvr1258",hover:"fyvr1259",checked:"fyvr125a"},defaultClass:"fyvr1255"},buttonEmphasis:{conditions:{base:"fyvr125b",active:"fyvr125c",disabled:"fyvr125d",focus:"fyvr125e",hover:"fyvr125f",checked:"fyvr125g"},defaultClass:"fyvr125b"},buttonInverse:{conditions:{base:"fyvr125h",active:"fyvr125i",disabled:"fyvr125j",focus:"fyvr125k",hover:"fyvr125l",checked:"fyvr125m"},defaultClass:"fyvr125h"},text50:{conditions:{base:"fyvr125n",active:"fyvr125o",disabled:"fyvr125p",focus:"fyvr125q",hover:"fyvr125r",checked:"fyvr125s"},defaultClass:"fyvr125n"},text80:{conditions:{base:"fyvr125t",active:"fyvr125u",disabled:"fyvr125v",focus:"fyvr125w",hover:"fyvr125x",checked:"fyvr125y"},defaultClass:"fyvr125t"},text100:{conditions:{base:"fyvr125z",active:"fyvr1260",disabled:"fyvr1261",focus:"fyvr1262",hover:"fyvr1263",checked:"fyvr1264"},defaultClass:"fyvr125z"},textInverse100:{conditions:{base:"fyvr1265",active:"fyvr1266",disabled:"fyvr1267",focus:"fyvr1268",hover:"fyvr1269",checked:"fyvr126a"},defaultClass:"fyvr1265"},arbitrumDark:{conditions:{base:"fyvr126b",active:"fyvr126c",disabled:"fyvr126d",focus:"fyvr126e",hover:"fyvr126f",checked:"fyvr126g"},defaultClass:"fyvr126b"},arbitrumLight:{conditions:{base:"fyvr126h",active:"fyvr126i",disabled:"fyvr126j",focus:"fyvr126k",hover:"fyvr126l",checked:"fyvr126m"},defaultClass:"fyvr126h"},avalanceDark:{conditions:{base:"fyvr126n",active:"fyvr126o",disabled:"fyvr126p",focus:"fyvr126q",hover:"fyvr126r",checked:"fyvr126s"},defaultClass:"fyvr126n"},avalanceLight:{conditions:{base:"fyvr126t",active:"fyvr126u",disabled:"fyvr126v",focus:"fyvr126w",hover:"fyvr126x",checked:"fyvr126y"},defaultClass:"fyvr126t"},bscDark:{conditions:{base:"fyvr126z",active:"fyvr1270",disabled:"fyvr1271",focus:"fyvr1272",hover:"fyvr1273",checked:"fyvr1274"},defaultClass:"fyvr126z"},bscLight:{conditions:{base:"fyvr1275",active:"fyvr1276",disabled:"fyvr1277",focus:"fyvr1278",hover:"fyvr1279",checked:"fyvr127a"},defaultClass:"fyvr1275"},ethereumDark:{conditions:{base:"fyvr127b",active:"fyvr127c",disabled:"fyvr127d",focus:"fyvr127e",hover:"fyvr127f",checked:"fyvr127g"},defaultClass:"fyvr127b"},ethereumLight:{conditions:{base:"fyvr127h",active:"fyvr127i",disabled:"fyvr127j",focus:"fyvr127k",hover:"fyvr127l",checked:"fyvr127m"},defaultClass:"fyvr127h"},gnosisDark:{conditions:{base:"fyvr127n",active:"fyvr127o",disabled:"fyvr127p",focus:"fyvr127q",hover:"fyvr127r",checked:"fyvr127s"},defaultClass:"fyvr127n"},gnosisLight:{conditions:{base:"fyvr127t",active:"fyvr127u",disabled:"fyvr127v",focus:"fyvr127w",hover:"fyvr127x",checked:"fyvr127y"},defaultClass:"fyvr127t"},polygonDark:{conditions:{base:"fyvr127z",active:"fyvr1280",disabled:"fyvr1281",focus:"fyvr1282",hover:"fyvr1283",checked:"fyvr1284"},defaultClass:"fyvr127z"},polygonLight:{conditions:{base:"fyvr1285",active:"fyvr1286",disabled:"fyvr1287",focus:"fyvr1288",hover:"fyvr1289",checked:"fyvr128a"},defaultClass:"fyvr1285"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr128b",active:"fyvr128c",disabled:"fyvr128d",focus:"fyvr128e",hover:"fyvr128f",checked:"fyvr128g"},defaultClass:"fyvr128b"},dashed:{conditions:{base:"fyvr128h",active:"fyvr128i",disabled:"fyvr128j",focus:"fyvr128k",hover:"fyvr128l",checked:"fyvr128m"},defaultClass:"fyvr128h"},dotted:{conditions:{base:"fyvr128n",active:"fyvr128o",disabled:"fyvr128p",focus:"fyvr128q",hover:"fyvr128r",checked:"fyvr128s"},defaultClass:"fyvr128n"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr128t",active:"fyvr128u",disabled:"fyvr128v",focus:"fyvr128w",hover:"fyvr128x",checked:"fyvr128y"},defaultClass:"fyvr128t"},white:{conditions:{base:"fyvr128z",active:"fyvr1290",disabled:"fyvr1291",focus:"fyvr1292",hover:"fyvr1293",checked:"fyvr1294"},defaultClass:"fyvr128z"},inherit:{conditions:{base:"fyvr1295",active:"fyvr1296",disabled:"fyvr1297",focus:"fyvr1298",hover:"fyvr1299",checked:"fyvr129a"},defaultClass:"fyvr1295"},transparent:{conditions:{base:"fyvr129b",active:"fyvr129c",disabled:"fyvr129d",focus:"fyvr129e",hover:"fyvr129f",checked:"fyvr129g"},defaultClass:"fyvr129b"},positive:{conditions:{base:"fyvr129h",active:"fyvr129i",disabled:"fyvr129j",focus:"fyvr129k",hover:"fyvr129l",checked:"fyvr129m"},defaultClass:"fyvr129h"},negative:{conditions:{base:"fyvr129n",active:"fyvr129o",disabled:"fyvr129p",focus:"fyvr129q",hover:"fyvr129r",checked:"fyvr129s"},defaultClass:"fyvr129n"},info:{conditions:{base:"fyvr129t",active:"fyvr129u",disabled:"fyvr129v",focus:"fyvr129w",hover:"fyvr129x",checked:"fyvr129y"},defaultClass:"fyvr129t"},warning:{conditions:{base:"fyvr129z",active:"fyvr12a0",disabled:"fyvr12a1",focus:"fyvr12a2",hover:"fyvr12a3",checked:"fyvr12a4"},defaultClass:"fyvr129z"},gradientBackdrop:{conditions:{base:"fyvr12a5",active:"fyvr12a6",disabled:"fyvr12a7",focus:"fyvr12a8",hover:"fyvr12a9",checked:"fyvr12aa"},defaultClass:"fyvr12a5"},gradientPrimary:{conditions:{base:"fyvr12ab",active:"fyvr12ac",disabled:"fyvr12ad",focus:"fyvr12ae",hover:"fyvr12af",checked:"fyvr12ag"},defaultClass:"fyvr12ab"},gradientSecondary:{conditions:{base:"fyvr12ah",active:"fyvr12ai",disabled:"fyvr12aj",focus:"fyvr12ak",hover:"fyvr12al",checked:"fyvr12am"},defaultClass:"fyvr12ah"},backgroundPrimary:{conditions:{base:"fyvr12an",active:"fyvr12ao",disabled:"fyvr12ap",focus:"fyvr12aq",hover:"fyvr12ar",checked:"fyvr12as"},defaultClass:"fyvr12an"},backgroundSecondary:{conditions:{base:"fyvr12at",active:"fyvr12au",disabled:"fyvr12av",focus:"fyvr12aw",hover:"fyvr12ax",checked:"fyvr12ay"},defaultClass:"fyvr12at"},backgroundContrast:{conditions:{base:"fyvr12az",active:"fyvr12b0",disabled:"fyvr12b1",focus:"fyvr12b2",hover:"fyvr12b3",checked:"fyvr12b4"},defaultClass:"fyvr12az"},backgroundMuted:{conditions:{base:"fyvr12b5",active:"fyvr12b6",disabled:"fyvr12b7",focus:"fyvr12b8",hover:"fyvr12b9",checked:"fyvr12ba"},defaultClass:"fyvr12b5"},backgroundControl:{conditions:{base:"fyvr12bb",active:"fyvr12bc",disabled:"fyvr12bd",focus:"fyvr12be",hover:"fyvr12bf",checked:"fyvr12bg"},defaultClass:"fyvr12bb"},backgroundInverse:{conditions:{base:"fyvr12bh",active:"fyvr12bi",disabled:"fyvr12bj",focus:"fyvr12bk",hover:"fyvr12bl",checked:"fyvr12bm"},defaultClass:"fyvr12bh"},backgroundBackdrop:{conditions:{base:"fyvr12bn",active:"fyvr12bo",disabled:"fyvr12bp",focus:"fyvr12bq",hover:"fyvr12br",checked:"fyvr12bs"},defaultClass:"fyvr12bn"},backgroundOverlay:{conditions:{base:"fyvr12bt",active:"fyvr12bu",disabled:"fyvr12bv",focus:"fyvr12bw",hover:"fyvr12bx",checked:"fyvr12by"},defaultClass:"fyvr12bt"},borderNormal:{conditions:{base:"fyvr12bz",active:"fyvr12c0",disabled:"fyvr12c1",focus:"fyvr12c2",hover:"fyvr12c3",checked:"fyvr12c4"},defaultClass:"fyvr12bz"},borderFocus:{conditions:{base:"fyvr12c5",active:"fyvr12c6",disabled:"fyvr12c7",focus:"fyvr12c8",hover:"fyvr12c9",checked:"fyvr12ca"},defaultClass:"fyvr12c5"},buttonGlass:{conditions:{base:"fyvr12cb",active:"fyvr12cc",disabled:"fyvr12cd",focus:"fyvr12ce",hover:"fyvr12cf",checked:"fyvr12cg"},defaultClass:"fyvr12cb"},buttonEmphasis:{conditions:{base:"fyvr12ch",active:"fyvr12ci",disabled:"fyvr12cj",focus:"fyvr12ck",hover:"fyvr12cl",checked:"fyvr12cm"},defaultClass:"fyvr12ch"},buttonInverse:{conditions:{base:"fyvr12cn",active:"fyvr12co",disabled:"fyvr12cp",focus:"fyvr12cq",hover:"fyvr12cr",checked:"fyvr12cs"},defaultClass:"fyvr12cn"},text50:{conditions:{base:"fyvr12ct",active:"fyvr12cu",disabled:"fyvr12cv",focus:"fyvr12cw",hover:"fyvr12cx",checked:"fyvr12cy"},defaultClass:"fyvr12ct"},text80:{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"},textInverse100:{conditions:{base:"fyvr12db",active:"fyvr12dc",disabled:"fyvr12dd",focus:"fyvr12de",hover:"fyvr12df",checked:"fyvr12dg"},defaultClass:"fyvr12db"},arbitrumDark:{conditions:{base:"fyvr12dh",active:"fyvr12di",disabled:"fyvr12dj",focus:"fyvr12dk",hover:"fyvr12dl",checked:"fyvr12dm"},defaultClass:"fyvr12dh"},arbitrumLight:{conditions:{base:"fyvr12dn",active:"fyvr12do",disabled:"fyvr12dp",focus:"fyvr12dq",hover:"fyvr12dr",checked:"fyvr12ds"},defaultClass:"fyvr12dn"},avalanceDark:{conditions:{base:"fyvr12dt",active:"fyvr12du",disabled:"fyvr12dv",focus:"fyvr12dw",hover:"fyvr12dx",checked:"fyvr12dy"},defaultClass:"fyvr12dt"},avalanceLight:{conditions:{base:"fyvr12dz",active:"fyvr12e0",disabled:"fyvr12e1",focus:"fyvr12e2",hover:"fyvr12e3",checked:"fyvr12e4"},defaultClass:"fyvr12dz"},bscDark:{conditions:{base:"fyvr12e5",active:"fyvr12e6",disabled:"fyvr12e7",focus:"fyvr12e8",hover:"fyvr12e9",checked:"fyvr12ea"},defaultClass:"fyvr12e5"},bscLight:{conditions:{base:"fyvr12eb",active:"fyvr12ec",disabled:"fyvr12ed",focus:"fyvr12ee",hover:"fyvr12ef",checked:"fyvr12eg"},defaultClass:"fyvr12eb"},ethereumDark:{conditions:{base:"fyvr12eh",active:"fyvr12ei",disabled:"fyvr12ej",focus:"fyvr12ek",hover:"fyvr12el",checked:"fyvr12em"},defaultClass:"fyvr12eh"},ethereumLight:{conditions:{base:"fyvr12en",active:"fyvr12eo",disabled:"fyvr12ep",focus:"fyvr12eq",hover:"fyvr12er",checked:"fyvr12es"},defaultClass:"fyvr12en"},gnosisDark:{conditions:{base:"fyvr12et",active:"fyvr12eu",disabled:"fyvr12ev",focus:"fyvr12ew",hover:"fyvr12ex",checked:"fyvr12ey"},defaultClass:"fyvr12et"},gnosisLight:{conditions:{base:"fyvr12ez",active:"fyvr12f0",disabled:"fyvr12f1",focus:"fyvr12f2",hover:"fyvr12f3",checked:"fyvr12f4"},defaultClass:"fyvr12ez"},polygonDark:{conditions:{base:"fyvr12f5",active:"fyvr12f6",disabled:"fyvr12f7",focus:"fyvr12f8",hover:"fyvr12f9",checked:"fyvr12fa"},defaultClass:"fyvr12f5"},polygonLight:{conditions:{base:"fyvr12fb",active:"fyvr12fc",disabled:"fyvr12fd",focus:"fyvr12fe",hover:"fyvr12ff",checked:"fyvr12fg"},defaultClass:"fyvr12fb"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12fh",active:"fyvr12fi",disabled:"fyvr12fj",focus:"fyvr12fk",hover:"fyvr12fl",checked:"fyvr12fm"},defaultClass:"fyvr12fh"},dashed:{conditions:{base:"fyvr12fn",active:"fyvr12fo",disabled:"fyvr12fp",focus:"fyvr12fq",hover:"fyvr12fr",checked:"fyvr12fs"},defaultClass:"fyvr12fn"},dotted:{conditions:{base:"fyvr12ft",active:"fyvr12fu",disabled:"fyvr12fv",focus:"fyvr12fw",hover:"fyvr12fx",checked:"fyvr12fy"},defaultClass:"fyvr12ft"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12fz",active:"fyvr12g0",disabled:"fyvr12g1",focus:"fyvr12g2",hover:"fyvr12g3",checked:"fyvr12g4"},defaultClass:"fyvr12fz"},white:{conditions:{base:"fyvr12g5",active:"fyvr12g6",disabled:"fyvr12g7",focus:"fyvr12g8",hover:"fyvr12g9",checked:"fyvr12ga"},defaultClass:"fyvr12g5"},inherit:{conditions:{base:"fyvr12gb",active:"fyvr12gc",disabled:"fyvr12gd",focus:"fyvr12ge",hover:"fyvr12gf",checked:"fyvr12gg"},defaultClass:"fyvr12gb"},transparent:{conditions:{base:"fyvr12gh",active:"fyvr12gi",disabled:"fyvr12gj",focus:"fyvr12gk",hover:"fyvr12gl",checked:"fyvr12gm"},defaultClass:"fyvr12gh"},positive:{conditions:{base:"fyvr12gn",active:"fyvr12go",disabled:"fyvr12gp",focus:"fyvr12gq",hover:"fyvr12gr",checked:"fyvr12gs"},defaultClass:"fyvr12gn"},negative:{conditions:{base:"fyvr12gt",active:"fyvr12gu",disabled:"fyvr12gv",focus:"fyvr12gw",hover:"fyvr12gx",checked:"fyvr12gy"},defaultClass:"fyvr12gt"},info:{conditions:{base:"fyvr12gz",active:"fyvr12h0",disabled:"fyvr12h1",focus:"fyvr12h2",hover:"fyvr12h3",checked:"fyvr12h4"},defaultClass:"fyvr12gz"},warning:{conditions:{base:"fyvr12h5",active:"fyvr12h6",disabled:"fyvr12h7",focus:"fyvr12h8",hover:"fyvr12h9",checked:"fyvr12ha"},defaultClass:"fyvr12h5"},gradientBackdrop:{conditions:{base:"fyvr12hb",active:"fyvr12hc",disabled:"fyvr12hd",focus:"fyvr12he",hover:"fyvr12hf",checked:"fyvr12hg"},defaultClass:"fyvr12hb"},gradientPrimary:{conditions:{base:"fyvr12hh",active:"fyvr12hi",disabled:"fyvr12hj",focus:"fyvr12hk",hover:"fyvr12hl",checked:"fyvr12hm"},defaultClass:"fyvr12hh"},gradientSecondary:{conditions:{base:"fyvr12hn",active:"fyvr12ho",disabled:"fyvr12hp",focus:"fyvr12hq",hover:"fyvr12hr",checked:"fyvr12hs"},defaultClass:"fyvr12hn"},backgroundPrimary:{conditions:{base:"fyvr12ht",active:"fyvr12hu",disabled:"fyvr12hv",focus:"fyvr12hw",hover:"fyvr12hx",checked:"fyvr12hy"},defaultClass:"fyvr12ht"},backgroundSecondary:{conditions:{base:"fyvr12hz",active:"fyvr12i0",disabled:"fyvr12i1",focus:"fyvr12i2",hover:"fyvr12i3",checked:"fyvr12i4"},defaultClass:"fyvr12hz"},backgroundContrast:{conditions:{base:"fyvr12i5",active:"fyvr12i6",disabled:"fyvr12i7",focus:"fyvr12i8",hover:"fyvr12i9",checked:"fyvr12ia"},defaultClass:"fyvr12i5"},backgroundMuted:{conditions:{base:"fyvr12ib",active:"fyvr12ic",disabled:"fyvr12id",focus:"fyvr12ie",hover:"fyvr12if",checked:"fyvr12ig"},defaultClass:"fyvr12ib"},backgroundControl:{conditions:{base:"fyvr12ih",active:"fyvr12ii",disabled:"fyvr12ij",focus:"fyvr12ik",hover:"fyvr12il",checked:"fyvr12im"},defaultClass:"fyvr12ih"},backgroundInverse:{conditions:{base:"fyvr12in",active:"fyvr12io",disabled:"fyvr12ip",focus:"fyvr12iq",hover:"fyvr12ir",checked:"fyvr12is"},defaultClass:"fyvr12in"},backgroundBackdrop:{conditions:{base:"fyvr12it",active:"fyvr12iu",disabled:"fyvr12iv",focus:"fyvr12iw",hover:"fyvr12ix",checked:"fyvr12iy"},defaultClass:"fyvr12it"},backgroundOverlay:{conditions:{base:"fyvr12iz",active:"fyvr12j0",disabled:"fyvr12j1",focus:"fyvr12j2",hover:"fyvr12j3",checked:"fyvr12j4"},defaultClass:"fyvr12iz"},borderNormal:{conditions:{base:"fyvr12j5",active:"fyvr12j6",disabled:"fyvr12j7",focus:"fyvr12j8",hover:"fyvr12j9",checked:"fyvr12ja"},defaultClass:"fyvr12j5"},borderFocus:{conditions:{base:"fyvr12jb",active:"fyvr12jc",disabled:"fyvr12jd",focus:"fyvr12je",hover:"fyvr12jf",checked:"fyvr12jg"},defaultClass:"fyvr12jb"},buttonGlass:{conditions:{base:"fyvr12jh",active:"fyvr12ji",disabled:"fyvr12jj",focus:"fyvr12jk",hover:"fyvr12jl",checked:"fyvr12jm"},defaultClass:"fyvr12jh"},buttonEmphasis:{conditions:{base:"fyvr12jn",active:"fyvr12jo",disabled:"fyvr12jp",focus:"fyvr12jq",hover:"fyvr12jr",checked:"fyvr12js"},defaultClass:"fyvr12jn"},buttonInverse:{conditions:{base:"fyvr12jt",active:"fyvr12ju",disabled:"fyvr12jv",focus:"fyvr12jw",hover:"fyvr12jx",checked:"fyvr12jy"},defaultClass:"fyvr12jt"},text50:{conditions:{base:"fyvr12jz",active:"fyvr12k0",disabled:"fyvr12k1",focus:"fyvr12k2",hover:"fyvr12k3",checked:"fyvr12k4"},defaultClass:"fyvr12jz"},text80:{conditions:{base:"fyvr12k5",active:"fyvr12k6",disabled:"fyvr12k7",focus:"fyvr12k8",hover:"fyvr12k9",checked:"fyvr12ka"},defaultClass:"fyvr12k5"},text100:{conditions:{base:"fyvr12kb",active:"fyvr12kc",disabled:"fyvr12kd",focus:"fyvr12ke",hover:"fyvr12kf",checked:"fyvr12kg"},defaultClass:"fyvr12kb"},textInverse100:{conditions:{base:"fyvr12kh",active:"fyvr12ki",disabled:"fyvr12kj",focus:"fyvr12kk",hover:"fyvr12kl",checked:"fyvr12km"},defaultClass:"fyvr12kh"},arbitrumDark:{conditions:{base:"fyvr12kn",active:"fyvr12ko",disabled:"fyvr12kp",focus:"fyvr12kq",hover:"fyvr12kr",checked:"fyvr12ks"},defaultClass:"fyvr12kn"},arbitrumLight:{conditions:{base:"fyvr12kt",active:"fyvr12ku",disabled:"fyvr12kv",focus:"fyvr12kw",hover:"fyvr12kx",checked:"fyvr12ky"},defaultClass:"fyvr12kt"},avalanceDark:{conditions:{base:"fyvr12kz",active:"fyvr12l0",disabled:"fyvr12l1",focus:"fyvr12l2",hover:"fyvr12l3",checked:"fyvr12l4"},defaultClass:"fyvr12kz"},avalanceLight:{conditions:{base:"fyvr12l5",active:"fyvr12l6",disabled:"fyvr12l7",focus:"fyvr12l8",hover:"fyvr12l9",checked:"fyvr12la"},defaultClass:"fyvr12l5"},bscDark:{conditions:{base:"fyvr12lb",active:"fyvr12lc",disabled:"fyvr12ld",focus:"fyvr12le",hover:"fyvr12lf",checked:"fyvr12lg"},defaultClass:"fyvr12lb"},bscLight:{conditions:{base:"fyvr12lh",active:"fyvr12li",disabled:"fyvr12lj",focus:"fyvr12lk",hover:"fyvr12ll",checked:"fyvr12lm"},defaultClass:"fyvr12lh"},ethereumDark:{conditions:{base:"fyvr12ln",active:"fyvr12lo",disabled:"fyvr12lp",focus:"fyvr12lq",hover:"fyvr12lr",checked:"fyvr12ls"},defaultClass:"fyvr12ln"},ethereumLight:{conditions:{base:"fyvr12lt",active:"fyvr12lu",disabled:"fyvr12lv",focus:"fyvr12lw",hover:"fyvr12lx",checked:"fyvr12ly"},defaultClass:"fyvr12lt"},gnosisDark:{conditions:{base:"fyvr12lz",active:"fyvr12m0",disabled:"fyvr12m1",focus:"fyvr12m2",hover:"fyvr12m3",checked:"fyvr12m4"},defaultClass:"fyvr12lz"},gnosisLight:{conditions:{base:"fyvr12m5",active:"fyvr12m6",disabled:"fyvr12m7",focus:"fyvr12m8",hover:"fyvr12m9",checked:"fyvr12ma"},defaultClass:"fyvr12m5"},polygonDark:{conditions:{base:"fyvr12mb",active:"fyvr12mc",disabled:"fyvr12md",focus:"fyvr12me",hover:"fyvr12mf",checked:"fyvr12mg"},defaultClass:"fyvr12mb"},polygonLight:{conditions:{base:"fyvr12mh",active:"fyvr12mi",disabled:"fyvr12mj",focus:"fyvr12mk",hover:"fyvr12ml",checked:"fyvr12mm"},defaultClass:"fyvr12mh"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12mn",active:"fyvr12mo",disabled:"fyvr12mp",focus:"fyvr12mq",hover:"fyvr12mr",checked:"fyvr12ms"},defaultClass:"fyvr12mn"},dashed:{conditions:{base:"fyvr12mt",active:"fyvr12mu",disabled:"fyvr12mv",focus:"fyvr12mw",hover:"fyvr12mx",checked:"fyvr12my"},defaultClass:"fyvr12mt"},dotted:{conditions:{base:"fyvr12mz",active:"fyvr12n0",disabled:"fyvr12n1",focus:"fyvr12n2",hover:"fyvr12n3",checked:"fyvr12n4"},defaultClass:"fyvr12mz"}}},color:{values:{black:{conditions:{base:"fyvr12n5",active:"fyvr12n6",disabled:"fyvr12n7",focus:"fyvr12n8",hover:"fyvr12n9",checked:"fyvr12na"},defaultClass:"fyvr12n5"},white:{conditions:{base:"fyvr12nb",active:"fyvr12nc",disabled:"fyvr12nd",focus:"fyvr12ne",hover:"fyvr12nf",checked:"fyvr12ng"},defaultClass:"fyvr12nb"},inherit:{conditions:{base:"fyvr12nh",active:"fyvr12ni",disabled:"fyvr12nj",focus:"fyvr12nk",hover:"fyvr12nl",checked:"fyvr12nm"},defaultClass:"fyvr12nh"},transparent:{conditions:{base:"fyvr12nn",active:"fyvr12no",disabled:"fyvr12np",focus:"fyvr12nq",hover:"fyvr12nr",checked:"fyvr12ns"},defaultClass:"fyvr12nn"},positive:{conditions:{base:"fyvr12nt",active:"fyvr12nu",disabled:"fyvr12nv",focus:"fyvr12nw",hover:"fyvr12nx",checked:"fyvr12ny"},defaultClass:"fyvr12nt"},negative:{conditions:{base:"fyvr12nz",active:"fyvr12o0",disabled:"fyvr12o1",focus:"fyvr12o2",hover:"fyvr12o3",checked:"fyvr12o4"},defaultClass:"fyvr12nz"},info:{conditions:{base:"fyvr12o5",active:"fyvr12o6",disabled:"fyvr12o7",focus:"fyvr12o8",hover:"fyvr12o9",checked:"fyvr12oa"},defaultClass:"fyvr12o5"},warning:{conditions:{base:"fyvr12ob",active:"fyvr12oc",disabled:"fyvr12od",focus:"fyvr12oe",hover:"fyvr12of",checked:"fyvr12og"},defaultClass:"fyvr12ob"},gradientBackdrop:{conditions:{base:"fyvr12oh",active:"fyvr12oi",disabled:"fyvr12oj",focus:"fyvr12ok",hover:"fyvr12ol",checked:"fyvr12om"},defaultClass:"fyvr12oh"},gradientPrimary:{conditions:{base:"fyvr12on",active:"fyvr12oo",disabled:"fyvr12op",focus:"fyvr12oq",hover:"fyvr12or",checked:"fyvr12os"},defaultClass:"fyvr12on"},gradientSecondary:{conditions:{base:"fyvr12ot",active:"fyvr12ou",disabled:"fyvr12ov",focus:"fyvr12ow",hover:"fyvr12ox",checked:"fyvr12oy"},defaultClass:"fyvr12ot"},backgroundPrimary:{conditions:{base:"fyvr12oz",active:"fyvr12p0",disabled:"fyvr12p1",focus:"fyvr12p2",hover:"fyvr12p3",checked:"fyvr12p4"},defaultClass:"fyvr12oz"},backgroundSecondary:{conditions:{base:"fyvr12p5",active:"fyvr12p6",disabled:"fyvr12p7",focus:"fyvr12p8",hover:"fyvr12p9",checked:"fyvr12pa"},defaultClass:"fyvr12p5"},backgroundContrast:{conditions:{base:"fyvr12pb",active:"fyvr12pc",disabled:"fyvr12pd",focus:"fyvr12pe",hover:"fyvr12pf",checked:"fyvr12pg"},defaultClass:"fyvr12pb"},backgroundMuted:{conditions:{base:"fyvr12ph",active:"fyvr12pi",disabled:"fyvr12pj",focus:"fyvr12pk",hover:"fyvr12pl",checked:"fyvr12pm"},defaultClass:"fyvr12ph"},backgroundControl:{conditions:{base:"fyvr12pn",active:"fyvr12po",disabled:"fyvr12pp",focus:"fyvr12pq",hover:"fyvr12pr",checked:"fyvr12ps"},defaultClass:"fyvr12pn"},backgroundInverse:{conditions:{base:"fyvr12pt",active:"fyvr12pu",disabled:"fyvr12pv",focus:"fyvr12pw",hover:"fyvr12px",checked:"fyvr12py"},defaultClass:"fyvr12pt"},backgroundBackdrop:{conditions:{base:"fyvr12pz",active:"fyvr12q0",disabled:"fyvr12q1",focus:"fyvr12q2",hover:"fyvr12q3",checked:"fyvr12q4"},defaultClass:"fyvr12pz"},backgroundOverlay:{conditions:{base:"fyvr12q5",active:"fyvr12q6",disabled:"fyvr12q7",focus:"fyvr12q8",hover:"fyvr12q9",checked:"fyvr12qa"},defaultClass:"fyvr12q5"},borderNormal:{conditions:{base:"fyvr12qb",active:"fyvr12qc",disabled:"fyvr12qd",focus:"fyvr12qe",hover:"fyvr12qf",checked:"fyvr12qg"},defaultClass:"fyvr12qb"},borderFocus:{conditions:{base:"fyvr12qh",active:"fyvr12qi",disabled:"fyvr12qj",focus:"fyvr12qk",hover:"fyvr12ql",checked:"fyvr12qm"},defaultClass:"fyvr12qh"},buttonGlass:{conditions:{base:"fyvr12qn",active:"fyvr12qo",disabled:"fyvr12qp",focus:"fyvr12qq",hover:"fyvr12qr",checked:"fyvr12qs"},defaultClass:"fyvr12qn"},buttonEmphasis:{conditions:{base:"fyvr12qt",active:"fyvr12qu",disabled:"fyvr12qv",focus:"fyvr12qw",hover:"fyvr12qx",checked:"fyvr12qy"},defaultClass:"fyvr12qt"},buttonInverse:{conditions:{base:"fyvr12qz",active:"fyvr12r0",disabled:"fyvr12r1",focus:"fyvr12r2",hover:"fyvr12r3",checked:"fyvr12r4"},defaultClass:"fyvr12qz"},text50:{conditions:{base:"fyvr12r5",active:"fyvr12r6",disabled:"fyvr12r7",focus:"fyvr12r8",hover:"fyvr12r9",checked:"fyvr12ra"},defaultClass:"fyvr12r5"},text80:{conditions:{base:"fyvr12rb",active:"fyvr12rc",disabled:"fyvr12rd",focus:"fyvr12re",hover:"fyvr12rf",checked:"fyvr12rg"},defaultClass:"fyvr12rb"},text100:{conditions:{base:"fyvr12rh",active:"fyvr12ri",disabled:"fyvr12rj",focus:"fyvr12rk",hover:"fyvr12rl",checked:"fyvr12rm"},defaultClass:"fyvr12rh"},textInverse100:{conditions:{base:"fyvr12rn",active:"fyvr12ro",disabled:"fyvr12rp",focus:"fyvr12rq",hover:"fyvr12rr",checked:"fyvr12rs"},defaultClass:"fyvr12rn"},arbitrumDark:{conditions:{base:"fyvr12rt",active:"fyvr12ru",disabled:"fyvr12rv",focus:"fyvr12rw",hover:"fyvr12rx",checked:"fyvr12ry"},defaultClass:"fyvr12rt"},arbitrumLight:{conditions:{base:"fyvr12rz",active:"fyvr12s0",disabled:"fyvr12s1",focus:"fyvr12s2",hover:"fyvr12s3",checked:"fyvr12s4"},defaultClass:"fyvr12rz"},avalanceDark:{conditions:{base:"fyvr12s5",active:"fyvr12s6",disabled:"fyvr12s7",focus:"fyvr12s8",hover:"fyvr12s9",checked:"fyvr12sa"},defaultClass:"fyvr12s5"},avalanceLight:{conditions:{base:"fyvr12sb",active:"fyvr12sc",disabled:"fyvr12sd",focus:"fyvr12se",hover:"fyvr12sf",checked:"fyvr12sg"},defaultClass:"fyvr12sb"},bscDark:{conditions:{base:"fyvr12sh",active:"fyvr12si",disabled:"fyvr12sj",focus:"fyvr12sk",hover:"fyvr12sl",checked:"fyvr12sm"},defaultClass:"fyvr12sh"},bscLight:{conditions:{base:"fyvr12sn",active:"fyvr12so",disabled:"fyvr12sp",focus:"fyvr12sq",hover:"fyvr12sr",checked:"fyvr12ss"},defaultClass:"fyvr12sn"},ethereumDark:{conditions:{base:"fyvr12st",active:"fyvr12su",disabled:"fyvr12sv",focus:"fyvr12sw",hover:"fyvr12sx",checked:"fyvr12sy"},defaultClass:"fyvr12st"},ethereumLight:{conditions:{base:"fyvr12sz",active:"fyvr12t0",disabled:"fyvr12t1",focus:"fyvr12t2",hover:"fyvr12t3",checked:"fyvr12t4"},defaultClass:"fyvr12sz"},gnosisDark:{conditions:{base:"fyvr12t5",active:"fyvr12t6",disabled:"fyvr12t7",focus:"fyvr12t8",hover:"fyvr12t9",checked:"fyvr12ta"},defaultClass:"fyvr12t5"},gnosisLight:{conditions:{base:"fyvr12tb",active:"fyvr12tc",disabled:"fyvr12td",focus:"fyvr12te",hover:"fyvr12tf",checked:"fyvr12tg"},defaultClass:"fyvr12tb"},polygonDark:{conditions:{base:"fyvr12th",active:"fyvr12ti",disabled:"fyvr12tj",focus:"fyvr12tk",hover:"fyvr12tl",checked:"fyvr12tm"},defaultClass:"fyvr12th"},polygonLight:{conditions:{base:"fyvr12tn",active:"fyvr12to",disabled:"fyvr12tp",focus:"fyvr12tq",hover:"fyvr12tr",checked:"fyvr12ts"},defaultClass:"fyvr12tn"}}},cursor:{values:{default:{conditions:{base:"fyvr12tt",active:"fyvr12tu",disabled:"fyvr12tv",focus:"fyvr12tw",hover:"fyvr12tx",checked:"fyvr12ty"},defaultClass:"fyvr12tt"},pointer:{conditions:{base:"fyvr12tz",active:"fyvr12u0",disabled:"fyvr12u1",focus:"fyvr12u2",hover:"fyvr12u3",checked:"fyvr12u4"},defaultClass:"fyvr12tz"},text:{conditions:{base:"fyvr12u5",active:"fyvr12u6",disabled:"fyvr12u7",focus:"fyvr12u8",hover:"fyvr12u9",checked:"fyvr12ua"},defaultClass:"fyvr12u5"}}},opacity:{values:{0:{conditions:{base:"fyvr12ub",active:"fyvr12uc",disabled:"fyvr12ud",focus:"fyvr12ue",hover:"fyvr12uf",checked:"fyvr12ug"},defaultClass:"fyvr12ub"},50:{conditions:{base:"fyvr12uh",active:"fyvr12ui",disabled:"fyvr12uj",focus:"fyvr12uk",hover:"fyvr12ul",checked:"fyvr12um"},defaultClass:"fyvr12uh"},80:{conditions:{base:"fyvr12un",active:"fyvr12uo",disabled:"fyvr12up",focus:"fyvr12uq",hover:"fyvr12ur",checked:"fyvr12us"},defaultClass:"fyvr12un"},100:{conditions:{base:"fyvr12ut",active:"fyvr12uu",disabled:"fyvr12uv",focus:"fyvr12uw",hover:"fyvr12ux",checked:"fyvr12uy"},defaultClass:"fyvr12ut"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr12uz",active:"fyvr12v0",disabled:"fyvr12v1",focus:"fyvr12v2",hover:"fyvr12v3",checked:"fyvr12v4"},defaultClass:"fyvr12uz"},auto:{conditions:{base:"fyvr12v5",active:"fyvr12v6",disabled:"fyvr12v7",focus:"fyvr12v8",hover:"fyvr12v9",checked:"fyvr12va"},defaultClass:"fyvr12v5"}}},outline:{values:{none:{conditions:{base:"fyvr12vb",active:"fyvr12vc",disabled:"fyvr12vd",focus:"fyvr12ve",hover:"fyvr12vf",checked:"fyvr12vg"},defaultClass:"fyvr12vb"}}},boxShadow:{values:{none:{conditions:{base:"fyvr12vh",active:"fyvr12vi",disabled:"fyvr12vj",focus:"fyvr12vk",hover:"fyvr12vl",checked:"fyvr12vm"},defaultClass:"fyvr12vh"}}}}});const YR=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],Uy=t=>(t.display||(t.display=Object.keys(t).some(e=>YR.includes(e))?"flex":void 0),P4(t));Uy.properties=P4.properties;function I4(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 f in s)Uy.properties.has(f)?o[f]=s[f]:a[f]=s[f];const l=Uy({...o,...n});return S.createElement(r,{className:Jr(l,i),...a,ref:e})});var R4={exports:{}},df={};/** + `),()=>{document.head.removeChild(f)}},[e]),S.createElement(FR,{isPresent:e,childRef:n,sizeRef:i},S.cloneElement(t,{ref:n}))}const Y1=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:s,mode:o})=>{const a=ph(UR),l=S.useId(),f=S.useMemo(()=>({id:l,initial:e,isPresent:r,custom:i,onExitComplete:c=>{a.set(c,!0);for(const u of a.values())if(!u)return;n&&n()},register:c=>(a.set(c,!1),()=>a.delete(c))}),s?void 0:[r]);return S.useMemo(()=>{a.forEach((c,u)=>a.set(u,!1))},[r]),S.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=S.createElement(jR,{isPresent:r},t)),S.createElement(qc.Provider,{value:f},t)};function UR(){return new Map}const Na=t=>t.key||"";function zR(t,e){t.forEach(r=>{const n=Na(r);e.set(n,r)})}function VR(t){const e=[];return S.Children.forEach(t,r=>{S.isValidElement(r)&&e.push(r)}),e}const HR=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{i&&(o="wait");let[a]=$R();const l=S.useContext(Hg).forceRender;l&&(a=l);const f=T4(),c=VR(t);let u=c;const h=new Set,v=S.useRef(u),x=S.useRef(new Map).current,g=S.useRef(!0);if(r0(()=>{g.current=!1,zR(c,x),v.current=u}),Zg(()=>{g.current=!0,x.clear(),h.clear()}),g.current)return S.createElement(S.Fragment,null,u.map(E=>S.createElement(Y1,{key:Na(E),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:s,mode:o},E)));u=[...u];const k=v.current.map(Na),w=c.map(Na),A=k.length;for(let E=0;E{if(w.indexOf(E)!==-1)return;const I=x.get(E);if(!I)return;const M=k.indexOf(E),$=()=>{x.delete(E),h.delete(E);const j=v.current.findIndex(U=>U.key===E);if(v.current.splice(j,1),!h.size){if(v.current=c,f.current===!1)return;a(),n&&n()}};u.splice(M,0,S.createElement(Y1,{key:Na(I),isPresent:!1,onExitComplete:$,custom:e,presenceAffectsLayout:s,mode:o},I))}),u=u.map(E=>{const I=E.key;return h.has(I)?E:S.createElement(Y1,{key:Na(E),isPresent:!0,presenceAffectsLayout:s,mode:o},E)}),S.createElement(S.Fragment,null,h.size?u:u.map(E=>S.cloneElement(E)))},WR={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"}};function qR(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 GR(t){var e=qR(t,"string");return typeof e=="symbol"?e:String(e)}function KR(t,e,r){return e=GR(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function G2(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 X1(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 f=[],c={},u=X1({},l),h=!1;for(var v of o){var x=l[v];if(x!=null){var g=i[v];h=!0;for(var k of g.mappings)c[k]=x,u[k]==null&&delete u[k]}}var w=h?X1(X1({},c),u):l,A=function(){var $=w[E],j=i[E];try{if(j.mappings)return"continue";if(typeof $=="string"||typeof $=="number")f.push(j.values[$].defaultClass);else if(Array.isArray($))for(var U=0;U<$.length;U++){var W=$[U];if(W!=null){var q=j.responsiveArray[U];f.push(j.values[W].conditions[q])}}else for(var G in $){var re=$[G];re!=null&&f.push(j.values[re].conditions[G])}}catch(B){throw B}};for(var E in w)var I=A();return t(f.join(" "))};return Object.assign(a,{properties:new Set(s)})},QR=t=>t,YR=function(){return JR(QR)(...arguments)},P4=YR({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"},backgroundPrimary:{conditions:{base:"fyvr11pn",active:"fyvr11po",disabled:"fyvr11pp",focus:"fyvr11pq",hover:"fyvr11pr",checked:"fyvr11ps"},defaultClass:"fyvr11pn"},backgroundSecondary:{conditions:{base:"fyvr11pt",active:"fyvr11pu",disabled:"fyvr11pv",focus:"fyvr11pw",hover:"fyvr11px",checked:"fyvr11py"},defaultClass:"fyvr11pt"},backgroundContrast:{conditions:{base:"fyvr11pz",active:"fyvr11q0",disabled:"fyvr11q1",focus:"fyvr11q2",hover:"fyvr11q3",checked:"fyvr11q4"},defaultClass:"fyvr11pz"},backgroundMuted:{conditions:{base:"fyvr11q5",active:"fyvr11q6",disabled:"fyvr11q7",focus:"fyvr11q8",hover:"fyvr11q9",checked:"fyvr11qa"},defaultClass:"fyvr11q5"},backgroundControl:{conditions:{base:"fyvr11qb",active:"fyvr11qc",disabled:"fyvr11qd",focus:"fyvr11qe",hover:"fyvr11qf",checked:"fyvr11qg"},defaultClass:"fyvr11qb"},backgroundInverse:{conditions:{base:"fyvr11qh",active:"fyvr11qi",disabled:"fyvr11qj",focus:"fyvr11qk",hover:"fyvr11ql",checked:"fyvr11qm"},defaultClass:"fyvr11qh"},backgroundBackdrop:{conditions:{base:"fyvr11qn",active:"fyvr11qo",disabled:"fyvr11qp",focus:"fyvr11qq",hover:"fyvr11qr",checked:"fyvr11qs"},defaultClass:"fyvr11qn"},backgroundOverlay:{conditions:{base:"fyvr11qt",active:"fyvr11qu",disabled:"fyvr11qv",focus:"fyvr11qw",hover:"fyvr11qx",checked:"fyvr11qy"},defaultClass:"fyvr11qt"},borderNormal:{conditions:{base:"fyvr11qz",active:"fyvr11r0",disabled:"fyvr11r1",focus:"fyvr11r2",hover:"fyvr11r3",checked:"fyvr11r4"},defaultClass:"fyvr11qz"},borderFocus:{conditions:{base:"fyvr11r5",active:"fyvr11r6",disabled:"fyvr11r7",focus:"fyvr11r8",hover:"fyvr11r9",checked:"fyvr11ra"},defaultClass:"fyvr11r5"},buttonGlass:{conditions:{base:"fyvr11rb",active:"fyvr11rc",disabled:"fyvr11rd",focus:"fyvr11re",hover:"fyvr11rf",checked:"fyvr11rg"},defaultClass:"fyvr11rb"},buttonEmphasis:{conditions:{base:"fyvr11rh",active:"fyvr11ri",disabled:"fyvr11rj",focus:"fyvr11rk",hover:"fyvr11rl",checked:"fyvr11rm"},defaultClass:"fyvr11rh"},buttonInverse:{conditions:{base:"fyvr11rn",active:"fyvr11ro",disabled:"fyvr11rp",focus:"fyvr11rq",hover:"fyvr11rr",checked:"fyvr11rs"},defaultClass:"fyvr11rn"},text50:{conditions:{base:"fyvr11rt",active:"fyvr11ru",disabled:"fyvr11rv",focus:"fyvr11rw",hover:"fyvr11rx",checked:"fyvr11ry"},defaultClass:"fyvr11rt"},text80:{conditions:{base:"fyvr11rz",active:"fyvr11s0",disabled:"fyvr11s1",focus:"fyvr11s2",hover:"fyvr11s3",checked:"fyvr11s4"},defaultClass:"fyvr11rz"},text100:{conditions:{base:"fyvr11s5",active:"fyvr11s6",disabled:"fyvr11s7",focus:"fyvr11s8",hover:"fyvr11s9",checked:"fyvr11sa"},defaultClass:"fyvr11s5"},textInverse100:{conditions:{base:"fyvr11sb",active:"fyvr11sc",disabled:"fyvr11sd",focus:"fyvr11se",hover:"fyvr11sf",checked:"fyvr11sg"},defaultClass:"fyvr11sb"},arbitrumDark:{conditions:{base:"fyvr11sh",active:"fyvr11si",disabled:"fyvr11sj",focus:"fyvr11sk",hover:"fyvr11sl",checked:"fyvr11sm"},defaultClass:"fyvr11sh"},arbitrumLight:{conditions:{base:"fyvr11sn",active:"fyvr11so",disabled:"fyvr11sp",focus:"fyvr11sq",hover:"fyvr11sr",checked:"fyvr11ss"},defaultClass:"fyvr11sn"},avalanceDark:{conditions:{base:"fyvr11st",active:"fyvr11su",disabled:"fyvr11sv",focus:"fyvr11sw",hover:"fyvr11sx",checked:"fyvr11sy"},defaultClass:"fyvr11st"},avalanceLight:{conditions:{base:"fyvr11sz",active:"fyvr11t0",disabled:"fyvr11t1",focus:"fyvr11t2",hover:"fyvr11t3",checked:"fyvr11t4"},defaultClass:"fyvr11sz"},bscDark:{conditions:{base:"fyvr11t5",active:"fyvr11t6",disabled:"fyvr11t7",focus:"fyvr11t8",hover:"fyvr11t9",checked:"fyvr11ta"},defaultClass:"fyvr11t5"},bscLight:{conditions:{base:"fyvr11tb",active:"fyvr11tc",disabled:"fyvr11td",focus:"fyvr11te",hover:"fyvr11tf",checked:"fyvr11tg"},defaultClass:"fyvr11tb"},ethereumDark:{conditions:{base:"fyvr11th",active:"fyvr11ti",disabled:"fyvr11tj",focus:"fyvr11tk",hover:"fyvr11tl",checked:"fyvr11tm"},defaultClass:"fyvr11th"},ethereumLight:{conditions:{base:"fyvr11tn",active:"fyvr11to",disabled:"fyvr11tp",focus:"fyvr11tq",hover:"fyvr11tr",checked:"fyvr11ts"},defaultClass:"fyvr11tn"},gnosisDark:{conditions:{base:"fyvr11tt",active:"fyvr11tu",disabled:"fyvr11tv",focus:"fyvr11tw",hover:"fyvr11tx",checked:"fyvr11ty"},defaultClass:"fyvr11tt"},gnosisLight:{conditions:{base:"fyvr11tz",active:"fyvr11u0",disabled:"fyvr11u1",focus:"fyvr11u2",hover:"fyvr11u3",checked:"fyvr11u4"},defaultClass:"fyvr11tz"},polygonDark:{conditions:{base:"fyvr11u5",active:"fyvr11u6",disabled:"fyvr11u7",focus:"fyvr11u8",hover:"fyvr11u9",checked:"fyvr11ua"},defaultClass:"fyvr11u5"},polygonLight:{conditions:{base:"fyvr11ub",active:"fyvr11uc",disabled:"fyvr11ud",focus:"fyvr11ue",hover:"fyvr11uf",checked:"fyvr11ug"},defaultClass:"fyvr11ub"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11uh",active:"fyvr11ui",disabled:"fyvr11uj",focus:"fyvr11uk",hover:"fyvr11ul",checked:"fyvr11um"},defaultClass:"fyvr11uh"},white:{conditions:{base:"fyvr11un",active:"fyvr11uo",disabled:"fyvr11up",focus:"fyvr11uq",hover:"fyvr11ur",checked:"fyvr11us"},defaultClass:"fyvr11un"},inherit:{conditions:{base:"fyvr11ut",active:"fyvr11uu",disabled:"fyvr11uv",focus:"fyvr11uw",hover:"fyvr11ux",checked:"fyvr11uy"},defaultClass:"fyvr11ut"},transparent:{conditions:{base:"fyvr11uz",active:"fyvr11v0",disabled:"fyvr11v1",focus:"fyvr11v2",hover:"fyvr11v3",checked:"fyvr11v4"},defaultClass:"fyvr11uz"},positive:{conditions:{base:"fyvr11v5",active:"fyvr11v6",disabled:"fyvr11v7",focus:"fyvr11v8",hover:"fyvr11v9",checked:"fyvr11va"},defaultClass:"fyvr11v5"},negative:{conditions:{base:"fyvr11vb",active:"fyvr11vc",disabled:"fyvr11vd",focus:"fyvr11ve",hover:"fyvr11vf",checked:"fyvr11vg"},defaultClass:"fyvr11vb"},info:{conditions:{base:"fyvr11vh",active:"fyvr11vi",disabled:"fyvr11vj",focus:"fyvr11vk",hover:"fyvr11vl",checked:"fyvr11vm"},defaultClass:"fyvr11vh"},warning:{conditions:{base:"fyvr11vn",active:"fyvr11vo",disabled:"fyvr11vp",focus:"fyvr11vq",hover:"fyvr11vr",checked:"fyvr11vs"},defaultClass:"fyvr11vn"},gradientBackdrop:{conditions:{base:"fyvr11vt",active:"fyvr11vu",disabled:"fyvr11vv",focus:"fyvr11vw",hover:"fyvr11vx",checked:"fyvr11vy"},defaultClass:"fyvr11vt"},gradientPrimary:{conditions:{base:"fyvr11vz",active:"fyvr11w0",disabled:"fyvr11w1",focus:"fyvr11w2",hover:"fyvr11w3",checked:"fyvr11w4"},defaultClass:"fyvr11vz"},gradientSecondary:{conditions:{base:"fyvr11w5",active:"fyvr11w6",disabled:"fyvr11w7",focus:"fyvr11w8",hover:"fyvr11w9",checked:"fyvr11wa"},defaultClass:"fyvr11w5"},backgroundPrimary:{conditions:{base:"fyvr11wb",active:"fyvr11wc",disabled:"fyvr11wd",focus:"fyvr11we",hover:"fyvr11wf",checked:"fyvr11wg"},defaultClass:"fyvr11wb"},backgroundSecondary:{conditions:{base:"fyvr11wh",active:"fyvr11wi",disabled:"fyvr11wj",focus:"fyvr11wk",hover:"fyvr11wl",checked:"fyvr11wm"},defaultClass:"fyvr11wh"},backgroundContrast:{conditions:{base:"fyvr11wn",active:"fyvr11wo",disabled:"fyvr11wp",focus:"fyvr11wq",hover:"fyvr11wr",checked:"fyvr11ws"},defaultClass:"fyvr11wn"},backgroundMuted:{conditions:{base:"fyvr11wt",active:"fyvr11wu",disabled:"fyvr11wv",focus:"fyvr11ww",hover:"fyvr11wx",checked:"fyvr11wy"},defaultClass:"fyvr11wt"},backgroundControl:{conditions:{base:"fyvr11wz",active:"fyvr11x0",disabled:"fyvr11x1",focus:"fyvr11x2",hover:"fyvr11x3",checked:"fyvr11x4"},defaultClass:"fyvr11wz"},backgroundInverse:{conditions:{base:"fyvr11x5",active:"fyvr11x6",disabled:"fyvr11x7",focus:"fyvr11x8",hover:"fyvr11x9",checked:"fyvr11xa"},defaultClass:"fyvr11x5"},backgroundBackdrop:{conditions:{base:"fyvr11xb",active:"fyvr11xc",disabled:"fyvr11xd",focus:"fyvr11xe",hover:"fyvr11xf",checked:"fyvr11xg"},defaultClass:"fyvr11xb"},backgroundOverlay:{conditions:{base:"fyvr11xh",active:"fyvr11xi",disabled:"fyvr11xj",focus:"fyvr11xk",hover:"fyvr11xl",checked:"fyvr11xm"},defaultClass:"fyvr11xh"},borderNormal:{conditions:{base:"fyvr11xn",active:"fyvr11xo",disabled:"fyvr11xp",focus:"fyvr11xq",hover:"fyvr11xr",checked:"fyvr11xs"},defaultClass:"fyvr11xn"},borderFocus:{conditions:{base:"fyvr11xt",active:"fyvr11xu",disabled:"fyvr11xv",focus:"fyvr11xw",hover:"fyvr11xx",checked:"fyvr11xy"},defaultClass:"fyvr11xt"},buttonGlass:{conditions:{base:"fyvr11xz",active:"fyvr11y0",disabled:"fyvr11y1",focus:"fyvr11y2",hover:"fyvr11y3",checked:"fyvr11y4"},defaultClass:"fyvr11xz"},buttonEmphasis:{conditions:{base:"fyvr11y5",active:"fyvr11y6",disabled:"fyvr11y7",focus:"fyvr11y8",hover:"fyvr11y9",checked:"fyvr11ya"},defaultClass:"fyvr11y5"},buttonInverse:{conditions:{base:"fyvr11yb",active:"fyvr11yc",disabled:"fyvr11yd",focus:"fyvr11ye",hover:"fyvr11yf",checked:"fyvr11yg"},defaultClass:"fyvr11yb"},text50:{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"},text100:{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"},arbitrumDark:{conditions:{base:"fyvr11z5",active:"fyvr11z6",disabled:"fyvr11z7",focus:"fyvr11z8",hover:"fyvr11z9",checked:"fyvr11za"},defaultClass:"fyvr11z5"},arbitrumLight:{conditions:{base:"fyvr11zb",active:"fyvr11zc",disabled:"fyvr11zd",focus:"fyvr11ze",hover:"fyvr11zf",checked:"fyvr11zg"},defaultClass:"fyvr11zb"},avalanceDark:{conditions:{base:"fyvr11zh",active:"fyvr11zi",disabled:"fyvr11zj",focus:"fyvr11zk",hover:"fyvr11zl",checked:"fyvr11zm"},defaultClass:"fyvr11zh"},avalanceLight:{conditions:{base:"fyvr11zn",active:"fyvr11zo",disabled:"fyvr11zp",focus:"fyvr11zq",hover:"fyvr11zr",checked:"fyvr11zs"},defaultClass:"fyvr11zn"},bscDark:{conditions:{base:"fyvr11zt",active:"fyvr11zu",disabled:"fyvr11zv",focus:"fyvr11zw",hover:"fyvr11zx",checked:"fyvr11zy"},defaultClass:"fyvr11zt"},bscLight:{conditions:{base:"fyvr11zz",active:"fyvr1200",disabled:"fyvr1201",focus:"fyvr1202",hover:"fyvr1203",checked:"fyvr1204"},defaultClass:"fyvr11zz"},ethereumDark:{conditions:{base:"fyvr1205",active:"fyvr1206",disabled:"fyvr1207",focus:"fyvr1208",hover:"fyvr1209",checked:"fyvr120a"},defaultClass:"fyvr1205"},ethereumLight:{conditions:{base:"fyvr120b",active:"fyvr120c",disabled:"fyvr120d",focus:"fyvr120e",hover:"fyvr120f",checked:"fyvr120g"},defaultClass:"fyvr120b"},gnosisDark:{conditions:{base:"fyvr120h",active:"fyvr120i",disabled:"fyvr120j",focus:"fyvr120k",hover:"fyvr120l",checked:"fyvr120m"},defaultClass:"fyvr120h"},gnosisLight:{conditions:{base:"fyvr120n",active:"fyvr120o",disabled:"fyvr120p",focus:"fyvr120q",hover:"fyvr120r",checked:"fyvr120s"},defaultClass:"fyvr120n"},polygonDark:{conditions:{base:"fyvr120t",active:"fyvr120u",disabled:"fyvr120v",focus:"fyvr120w",hover:"fyvr120x",checked:"fyvr120y"},defaultClass:"fyvr120t"},polygonLight:{conditions:{base:"fyvr120z",active:"fyvr1210",disabled:"fyvr1211",focus:"fyvr1212",hover:"fyvr1213",checked:"fyvr1214"},defaultClass:"fyvr120z"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr1215",active:"fyvr1216",disabled:"fyvr1217",focus:"fyvr1218",hover:"fyvr1219",checked:"fyvr121a"},defaultClass:"fyvr1215"},dashed:{conditions:{base:"fyvr121b",active:"fyvr121c",disabled:"fyvr121d",focus:"fyvr121e",hover:"fyvr121f",checked:"fyvr121g"},defaultClass:"fyvr121b"},dotted:{conditions:{base:"fyvr121h",active:"fyvr121i",disabled:"fyvr121j",focus:"fyvr121k",hover:"fyvr121l",checked:"fyvr121m"},defaultClass:"fyvr121h"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr121n",active:"fyvr121o",disabled:"fyvr121p",focus:"fyvr121q",hover:"fyvr121r",checked:"fyvr121s"},defaultClass:"fyvr121n"},white:{conditions:{base:"fyvr121t",active:"fyvr121u",disabled:"fyvr121v",focus:"fyvr121w",hover:"fyvr121x",checked:"fyvr121y"},defaultClass:"fyvr121t"},inherit:{conditions:{base:"fyvr121z",active:"fyvr1220",disabled:"fyvr1221",focus:"fyvr1222",hover:"fyvr1223",checked:"fyvr1224"},defaultClass:"fyvr121z"},transparent:{conditions:{base:"fyvr1225",active:"fyvr1226",disabled:"fyvr1227",focus:"fyvr1228",hover:"fyvr1229",checked:"fyvr122a"},defaultClass:"fyvr1225"},positive:{conditions:{base:"fyvr122b",active:"fyvr122c",disabled:"fyvr122d",focus:"fyvr122e",hover:"fyvr122f",checked:"fyvr122g"},defaultClass:"fyvr122b"},negative:{conditions:{base:"fyvr122h",active:"fyvr122i",disabled:"fyvr122j",focus:"fyvr122k",hover:"fyvr122l",checked:"fyvr122m"},defaultClass:"fyvr122h"},info:{conditions:{base:"fyvr122n",active:"fyvr122o",disabled:"fyvr122p",focus:"fyvr122q",hover:"fyvr122r",checked:"fyvr122s"},defaultClass:"fyvr122n"},warning:{conditions:{base:"fyvr122t",active:"fyvr122u",disabled:"fyvr122v",focus:"fyvr122w",hover:"fyvr122x",checked:"fyvr122y"},defaultClass:"fyvr122t"},gradientBackdrop:{conditions:{base:"fyvr122z",active:"fyvr1230",disabled:"fyvr1231",focus:"fyvr1232",hover:"fyvr1233",checked:"fyvr1234"},defaultClass:"fyvr122z"},gradientPrimary:{conditions:{base:"fyvr1235",active:"fyvr1236",disabled:"fyvr1237",focus:"fyvr1238",hover:"fyvr1239",checked:"fyvr123a"},defaultClass:"fyvr1235"},gradientSecondary:{conditions:{base:"fyvr123b",active:"fyvr123c",disabled:"fyvr123d",focus:"fyvr123e",hover:"fyvr123f",checked:"fyvr123g"},defaultClass:"fyvr123b"},backgroundPrimary:{conditions:{base:"fyvr123h",active:"fyvr123i",disabled:"fyvr123j",focus:"fyvr123k",hover:"fyvr123l",checked:"fyvr123m"},defaultClass:"fyvr123h"},backgroundSecondary:{conditions:{base:"fyvr123n",active:"fyvr123o",disabled:"fyvr123p",focus:"fyvr123q",hover:"fyvr123r",checked:"fyvr123s"},defaultClass:"fyvr123n"},backgroundContrast:{conditions:{base:"fyvr123t",active:"fyvr123u",disabled:"fyvr123v",focus:"fyvr123w",hover:"fyvr123x",checked:"fyvr123y"},defaultClass:"fyvr123t"},backgroundMuted:{conditions:{base:"fyvr123z",active:"fyvr1240",disabled:"fyvr1241",focus:"fyvr1242",hover:"fyvr1243",checked:"fyvr1244"},defaultClass:"fyvr123z"},backgroundControl:{conditions:{base:"fyvr1245",active:"fyvr1246",disabled:"fyvr1247",focus:"fyvr1248",hover:"fyvr1249",checked:"fyvr124a"},defaultClass:"fyvr1245"},backgroundInverse:{conditions:{base:"fyvr124b",active:"fyvr124c",disabled:"fyvr124d",focus:"fyvr124e",hover:"fyvr124f",checked:"fyvr124g"},defaultClass:"fyvr124b"},backgroundBackdrop:{conditions:{base:"fyvr124h",active:"fyvr124i",disabled:"fyvr124j",focus:"fyvr124k",hover:"fyvr124l",checked:"fyvr124m"},defaultClass:"fyvr124h"},backgroundOverlay:{conditions:{base:"fyvr124n",active:"fyvr124o",disabled:"fyvr124p",focus:"fyvr124q",hover:"fyvr124r",checked:"fyvr124s"},defaultClass:"fyvr124n"},borderNormal:{conditions:{base:"fyvr124t",active:"fyvr124u",disabled:"fyvr124v",focus:"fyvr124w",hover:"fyvr124x",checked:"fyvr124y"},defaultClass:"fyvr124t"},borderFocus:{conditions:{base:"fyvr124z",active:"fyvr1250",disabled:"fyvr1251",focus:"fyvr1252",hover:"fyvr1253",checked:"fyvr1254"},defaultClass:"fyvr124z"},buttonGlass:{conditions:{base:"fyvr1255",active:"fyvr1256",disabled:"fyvr1257",focus:"fyvr1258",hover:"fyvr1259",checked:"fyvr125a"},defaultClass:"fyvr1255"},buttonEmphasis:{conditions:{base:"fyvr125b",active:"fyvr125c",disabled:"fyvr125d",focus:"fyvr125e",hover:"fyvr125f",checked:"fyvr125g"},defaultClass:"fyvr125b"},buttonInverse:{conditions:{base:"fyvr125h",active:"fyvr125i",disabled:"fyvr125j",focus:"fyvr125k",hover:"fyvr125l",checked:"fyvr125m"},defaultClass:"fyvr125h"},text50:{conditions:{base:"fyvr125n",active:"fyvr125o",disabled:"fyvr125p",focus:"fyvr125q",hover:"fyvr125r",checked:"fyvr125s"},defaultClass:"fyvr125n"},text80:{conditions:{base:"fyvr125t",active:"fyvr125u",disabled:"fyvr125v",focus:"fyvr125w",hover:"fyvr125x",checked:"fyvr125y"},defaultClass:"fyvr125t"},text100:{conditions:{base:"fyvr125z",active:"fyvr1260",disabled:"fyvr1261",focus:"fyvr1262",hover:"fyvr1263",checked:"fyvr1264"},defaultClass:"fyvr125z"},textInverse100:{conditions:{base:"fyvr1265",active:"fyvr1266",disabled:"fyvr1267",focus:"fyvr1268",hover:"fyvr1269",checked:"fyvr126a"},defaultClass:"fyvr1265"},arbitrumDark:{conditions:{base:"fyvr126b",active:"fyvr126c",disabled:"fyvr126d",focus:"fyvr126e",hover:"fyvr126f",checked:"fyvr126g"},defaultClass:"fyvr126b"},arbitrumLight:{conditions:{base:"fyvr126h",active:"fyvr126i",disabled:"fyvr126j",focus:"fyvr126k",hover:"fyvr126l",checked:"fyvr126m"},defaultClass:"fyvr126h"},avalanceDark:{conditions:{base:"fyvr126n",active:"fyvr126o",disabled:"fyvr126p",focus:"fyvr126q",hover:"fyvr126r",checked:"fyvr126s"},defaultClass:"fyvr126n"},avalanceLight:{conditions:{base:"fyvr126t",active:"fyvr126u",disabled:"fyvr126v",focus:"fyvr126w",hover:"fyvr126x",checked:"fyvr126y"},defaultClass:"fyvr126t"},bscDark:{conditions:{base:"fyvr126z",active:"fyvr1270",disabled:"fyvr1271",focus:"fyvr1272",hover:"fyvr1273",checked:"fyvr1274"},defaultClass:"fyvr126z"},bscLight:{conditions:{base:"fyvr1275",active:"fyvr1276",disabled:"fyvr1277",focus:"fyvr1278",hover:"fyvr1279",checked:"fyvr127a"},defaultClass:"fyvr1275"},ethereumDark:{conditions:{base:"fyvr127b",active:"fyvr127c",disabled:"fyvr127d",focus:"fyvr127e",hover:"fyvr127f",checked:"fyvr127g"},defaultClass:"fyvr127b"},ethereumLight:{conditions:{base:"fyvr127h",active:"fyvr127i",disabled:"fyvr127j",focus:"fyvr127k",hover:"fyvr127l",checked:"fyvr127m"},defaultClass:"fyvr127h"},gnosisDark:{conditions:{base:"fyvr127n",active:"fyvr127o",disabled:"fyvr127p",focus:"fyvr127q",hover:"fyvr127r",checked:"fyvr127s"},defaultClass:"fyvr127n"},gnosisLight:{conditions:{base:"fyvr127t",active:"fyvr127u",disabled:"fyvr127v",focus:"fyvr127w",hover:"fyvr127x",checked:"fyvr127y"},defaultClass:"fyvr127t"},polygonDark:{conditions:{base:"fyvr127z",active:"fyvr1280",disabled:"fyvr1281",focus:"fyvr1282",hover:"fyvr1283",checked:"fyvr1284"},defaultClass:"fyvr127z"},polygonLight:{conditions:{base:"fyvr1285",active:"fyvr1286",disabled:"fyvr1287",focus:"fyvr1288",hover:"fyvr1289",checked:"fyvr128a"},defaultClass:"fyvr1285"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr128b",active:"fyvr128c",disabled:"fyvr128d",focus:"fyvr128e",hover:"fyvr128f",checked:"fyvr128g"},defaultClass:"fyvr128b"},dashed:{conditions:{base:"fyvr128h",active:"fyvr128i",disabled:"fyvr128j",focus:"fyvr128k",hover:"fyvr128l",checked:"fyvr128m"},defaultClass:"fyvr128h"},dotted:{conditions:{base:"fyvr128n",active:"fyvr128o",disabled:"fyvr128p",focus:"fyvr128q",hover:"fyvr128r",checked:"fyvr128s"},defaultClass:"fyvr128n"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr128t",active:"fyvr128u",disabled:"fyvr128v",focus:"fyvr128w",hover:"fyvr128x",checked:"fyvr128y"},defaultClass:"fyvr128t"},white:{conditions:{base:"fyvr128z",active:"fyvr1290",disabled:"fyvr1291",focus:"fyvr1292",hover:"fyvr1293",checked:"fyvr1294"},defaultClass:"fyvr128z"},inherit:{conditions:{base:"fyvr1295",active:"fyvr1296",disabled:"fyvr1297",focus:"fyvr1298",hover:"fyvr1299",checked:"fyvr129a"},defaultClass:"fyvr1295"},transparent:{conditions:{base:"fyvr129b",active:"fyvr129c",disabled:"fyvr129d",focus:"fyvr129e",hover:"fyvr129f",checked:"fyvr129g"},defaultClass:"fyvr129b"},positive:{conditions:{base:"fyvr129h",active:"fyvr129i",disabled:"fyvr129j",focus:"fyvr129k",hover:"fyvr129l",checked:"fyvr129m"},defaultClass:"fyvr129h"},negative:{conditions:{base:"fyvr129n",active:"fyvr129o",disabled:"fyvr129p",focus:"fyvr129q",hover:"fyvr129r",checked:"fyvr129s"},defaultClass:"fyvr129n"},info:{conditions:{base:"fyvr129t",active:"fyvr129u",disabled:"fyvr129v",focus:"fyvr129w",hover:"fyvr129x",checked:"fyvr129y"},defaultClass:"fyvr129t"},warning:{conditions:{base:"fyvr129z",active:"fyvr12a0",disabled:"fyvr12a1",focus:"fyvr12a2",hover:"fyvr12a3",checked:"fyvr12a4"},defaultClass:"fyvr129z"},gradientBackdrop:{conditions:{base:"fyvr12a5",active:"fyvr12a6",disabled:"fyvr12a7",focus:"fyvr12a8",hover:"fyvr12a9",checked:"fyvr12aa"},defaultClass:"fyvr12a5"},gradientPrimary:{conditions:{base:"fyvr12ab",active:"fyvr12ac",disabled:"fyvr12ad",focus:"fyvr12ae",hover:"fyvr12af",checked:"fyvr12ag"},defaultClass:"fyvr12ab"},gradientSecondary:{conditions:{base:"fyvr12ah",active:"fyvr12ai",disabled:"fyvr12aj",focus:"fyvr12ak",hover:"fyvr12al",checked:"fyvr12am"},defaultClass:"fyvr12ah"},backgroundPrimary:{conditions:{base:"fyvr12an",active:"fyvr12ao",disabled:"fyvr12ap",focus:"fyvr12aq",hover:"fyvr12ar",checked:"fyvr12as"},defaultClass:"fyvr12an"},backgroundSecondary:{conditions:{base:"fyvr12at",active:"fyvr12au",disabled:"fyvr12av",focus:"fyvr12aw",hover:"fyvr12ax",checked:"fyvr12ay"},defaultClass:"fyvr12at"},backgroundContrast:{conditions:{base:"fyvr12az",active:"fyvr12b0",disabled:"fyvr12b1",focus:"fyvr12b2",hover:"fyvr12b3",checked:"fyvr12b4"},defaultClass:"fyvr12az"},backgroundMuted:{conditions:{base:"fyvr12b5",active:"fyvr12b6",disabled:"fyvr12b7",focus:"fyvr12b8",hover:"fyvr12b9",checked:"fyvr12ba"},defaultClass:"fyvr12b5"},backgroundControl:{conditions:{base:"fyvr12bb",active:"fyvr12bc",disabled:"fyvr12bd",focus:"fyvr12be",hover:"fyvr12bf",checked:"fyvr12bg"},defaultClass:"fyvr12bb"},backgroundInverse:{conditions:{base:"fyvr12bh",active:"fyvr12bi",disabled:"fyvr12bj",focus:"fyvr12bk",hover:"fyvr12bl",checked:"fyvr12bm"},defaultClass:"fyvr12bh"},backgroundBackdrop:{conditions:{base:"fyvr12bn",active:"fyvr12bo",disabled:"fyvr12bp",focus:"fyvr12bq",hover:"fyvr12br",checked:"fyvr12bs"},defaultClass:"fyvr12bn"},backgroundOverlay:{conditions:{base:"fyvr12bt",active:"fyvr12bu",disabled:"fyvr12bv",focus:"fyvr12bw",hover:"fyvr12bx",checked:"fyvr12by"},defaultClass:"fyvr12bt"},borderNormal:{conditions:{base:"fyvr12bz",active:"fyvr12c0",disabled:"fyvr12c1",focus:"fyvr12c2",hover:"fyvr12c3",checked:"fyvr12c4"},defaultClass:"fyvr12bz"},borderFocus:{conditions:{base:"fyvr12c5",active:"fyvr12c6",disabled:"fyvr12c7",focus:"fyvr12c8",hover:"fyvr12c9",checked:"fyvr12ca"},defaultClass:"fyvr12c5"},buttonGlass:{conditions:{base:"fyvr12cb",active:"fyvr12cc",disabled:"fyvr12cd",focus:"fyvr12ce",hover:"fyvr12cf",checked:"fyvr12cg"},defaultClass:"fyvr12cb"},buttonEmphasis:{conditions:{base:"fyvr12ch",active:"fyvr12ci",disabled:"fyvr12cj",focus:"fyvr12ck",hover:"fyvr12cl",checked:"fyvr12cm"},defaultClass:"fyvr12ch"},buttonInverse:{conditions:{base:"fyvr12cn",active:"fyvr12co",disabled:"fyvr12cp",focus:"fyvr12cq",hover:"fyvr12cr",checked:"fyvr12cs"},defaultClass:"fyvr12cn"},text50:{conditions:{base:"fyvr12ct",active:"fyvr12cu",disabled:"fyvr12cv",focus:"fyvr12cw",hover:"fyvr12cx",checked:"fyvr12cy"},defaultClass:"fyvr12ct"},text80:{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"},textInverse100:{conditions:{base:"fyvr12db",active:"fyvr12dc",disabled:"fyvr12dd",focus:"fyvr12de",hover:"fyvr12df",checked:"fyvr12dg"},defaultClass:"fyvr12db"},arbitrumDark:{conditions:{base:"fyvr12dh",active:"fyvr12di",disabled:"fyvr12dj",focus:"fyvr12dk",hover:"fyvr12dl",checked:"fyvr12dm"},defaultClass:"fyvr12dh"},arbitrumLight:{conditions:{base:"fyvr12dn",active:"fyvr12do",disabled:"fyvr12dp",focus:"fyvr12dq",hover:"fyvr12dr",checked:"fyvr12ds"},defaultClass:"fyvr12dn"},avalanceDark:{conditions:{base:"fyvr12dt",active:"fyvr12du",disabled:"fyvr12dv",focus:"fyvr12dw",hover:"fyvr12dx",checked:"fyvr12dy"},defaultClass:"fyvr12dt"},avalanceLight:{conditions:{base:"fyvr12dz",active:"fyvr12e0",disabled:"fyvr12e1",focus:"fyvr12e2",hover:"fyvr12e3",checked:"fyvr12e4"},defaultClass:"fyvr12dz"},bscDark:{conditions:{base:"fyvr12e5",active:"fyvr12e6",disabled:"fyvr12e7",focus:"fyvr12e8",hover:"fyvr12e9",checked:"fyvr12ea"},defaultClass:"fyvr12e5"},bscLight:{conditions:{base:"fyvr12eb",active:"fyvr12ec",disabled:"fyvr12ed",focus:"fyvr12ee",hover:"fyvr12ef",checked:"fyvr12eg"},defaultClass:"fyvr12eb"},ethereumDark:{conditions:{base:"fyvr12eh",active:"fyvr12ei",disabled:"fyvr12ej",focus:"fyvr12ek",hover:"fyvr12el",checked:"fyvr12em"},defaultClass:"fyvr12eh"},ethereumLight:{conditions:{base:"fyvr12en",active:"fyvr12eo",disabled:"fyvr12ep",focus:"fyvr12eq",hover:"fyvr12er",checked:"fyvr12es"},defaultClass:"fyvr12en"},gnosisDark:{conditions:{base:"fyvr12et",active:"fyvr12eu",disabled:"fyvr12ev",focus:"fyvr12ew",hover:"fyvr12ex",checked:"fyvr12ey"},defaultClass:"fyvr12et"},gnosisLight:{conditions:{base:"fyvr12ez",active:"fyvr12f0",disabled:"fyvr12f1",focus:"fyvr12f2",hover:"fyvr12f3",checked:"fyvr12f4"},defaultClass:"fyvr12ez"},polygonDark:{conditions:{base:"fyvr12f5",active:"fyvr12f6",disabled:"fyvr12f7",focus:"fyvr12f8",hover:"fyvr12f9",checked:"fyvr12fa"},defaultClass:"fyvr12f5"},polygonLight:{conditions:{base:"fyvr12fb",active:"fyvr12fc",disabled:"fyvr12fd",focus:"fyvr12fe",hover:"fyvr12ff",checked:"fyvr12fg"},defaultClass:"fyvr12fb"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12fh",active:"fyvr12fi",disabled:"fyvr12fj",focus:"fyvr12fk",hover:"fyvr12fl",checked:"fyvr12fm"},defaultClass:"fyvr12fh"},dashed:{conditions:{base:"fyvr12fn",active:"fyvr12fo",disabled:"fyvr12fp",focus:"fyvr12fq",hover:"fyvr12fr",checked:"fyvr12fs"},defaultClass:"fyvr12fn"},dotted:{conditions:{base:"fyvr12ft",active:"fyvr12fu",disabled:"fyvr12fv",focus:"fyvr12fw",hover:"fyvr12fx",checked:"fyvr12fy"},defaultClass:"fyvr12ft"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12fz",active:"fyvr12g0",disabled:"fyvr12g1",focus:"fyvr12g2",hover:"fyvr12g3",checked:"fyvr12g4"},defaultClass:"fyvr12fz"},white:{conditions:{base:"fyvr12g5",active:"fyvr12g6",disabled:"fyvr12g7",focus:"fyvr12g8",hover:"fyvr12g9",checked:"fyvr12ga"},defaultClass:"fyvr12g5"},inherit:{conditions:{base:"fyvr12gb",active:"fyvr12gc",disabled:"fyvr12gd",focus:"fyvr12ge",hover:"fyvr12gf",checked:"fyvr12gg"},defaultClass:"fyvr12gb"},transparent:{conditions:{base:"fyvr12gh",active:"fyvr12gi",disabled:"fyvr12gj",focus:"fyvr12gk",hover:"fyvr12gl",checked:"fyvr12gm"},defaultClass:"fyvr12gh"},positive:{conditions:{base:"fyvr12gn",active:"fyvr12go",disabled:"fyvr12gp",focus:"fyvr12gq",hover:"fyvr12gr",checked:"fyvr12gs"},defaultClass:"fyvr12gn"},negative:{conditions:{base:"fyvr12gt",active:"fyvr12gu",disabled:"fyvr12gv",focus:"fyvr12gw",hover:"fyvr12gx",checked:"fyvr12gy"},defaultClass:"fyvr12gt"},info:{conditions:{base:"fyvr12gz",active:"fyvr12h0",disabled:"fyvr12h1",focus:"fyvr12h2",hover:"fyvr12h3",checked:"fyvr12h4"},defaultClass:"fyvr12gz"},warning:{conditions:{base:"fyvr12h5",active:"fyvr12h6",disabled:"fyvr12h7",focus:"fyvr12h8",hover:"fyvr12h9",checked:"fyvr12ha"},defaultClass:"fyvr12h5"},gradientBackdrop:{conditions:{base:"fyvr12hb",active:"fyvr12hc",disabled:"fyvr12hd",focus:"fyvr12he",hover:"fyvr12hf",checked:"fyvr12hg"},defaultClass:"fyvr12hb"},gradientPrimary:{conditions:{base:"fyvr12hh",active:"fyvr12hi",disabled:"fyvr12hj",focus:"fyvr12hk",hover:"fyvr12hl",checked:"fyvr12hm"},defaultClass:"fyvr12hh"},gradientSecondary:{conditions:{base:"fyvr12hn",active:"fyvr12ho",disabled:"fyvr12hp",focus:"fyvr12hq",hover:"fyvr12hr",checked:"fyvr12hs"},defaultClass:"fyvr12hn"},backgroundPrimary:{conditions:{base:"fyvr12ht",active:"fyvr12hu",disabled:"fyvr12hv",focus:"fyvr12hw",hover:"fyvr12hx",checked:"fyvr12hy"},defaultClass:"fyvr12ht"},backgroundSecondary:{conditions:{base:"fyvr12hz",active:"fyvr12i0",disabled:"fyvr12i1",focus:"fyvr12i2",hover:"fyvr12i3",checked:"fyvr12i4"},defaultClass:"fyvr12hz"},backgroundContrast:{conditions:{base:"fyvr12i5",active:"fyvr12i6",disabled:"fyvr12i7",focus:"fyvr12i8",hover:"fyvr12i9",checked:"fyvr12ia"},defaultClass:"fyvr12i5"},backgroundMuted:{conditions:{base:"fyvr12ib",active:"fyvr12ic",disabled:"fyvr12id",focus:"fyvr12ie",hover:"fyvr12if",checked:"fyvr12ig"},defaultClass:"fyvr12ib"},backgroundControl:{conditions:{base:"fyvr12ih",active:"fyvr12ii",disabled:"fyvr12ij",focus:"fyvr12ik",hover:"fyvr12il",checked:"fyvr12im"},defaultClass:"fyvr12ih"},backgroundInverse:{conditions:{base:"fyvr12in",active:"fyvr12io",disabled:"fyvr12ip",focus:"fyvr12iq",hover:"fyvr12ir",checked:"fyvr12is"},defaultClass:"fyvr12in"},backgroundBackdrop:{conditions:{base:"fyvr12it",active:"fyvr12iu",disabled:"fyvr12iv",focus:"fyvr12iw",hover:"fyvr12ix",checked:"fyvr12iy"},defaultClass:"fyvr12it"},backgroundOverlay:{conditions:{base:"fyvr12iz",active:"fyvr12j0",disabled:"fyvr12j1",focus:"fyvr12j2",hover:"fyvr12j3",checked:"fyvr12j4"},defaultClass:"fyvr12iz"},borderNormal:{conditions:{base:"fyvr12j5",active:"fyvr12j6",disabled:"fyvr12j7",focus:"fyvr12j8",hover:"fyvr12j9",checked:"fyvr12ja"},defaultClass:"fyvr12j5"},borderFocus:{conditions:{base:"fyvr12jb",active:"fyvr12jc",disabled:"fyvr12jd",focus:"fyvr12je",hover:"fyvr12jf",checked:"fyvr12jg"},defaultClass:"fyvr12jb"},buttonGlass:{conditions:{base:"fyvr12jh",active:"fyvr12ji",disabled:"fyvr12jj",focus:"fyvr12jk",hover:"fyvr12jl",checked:"fyvr12jm"},defaultClass:"fyvr12jh"},buttonEmphasis:{conditions:{base:"fyvr12jn",active:"fyvr12jo",disabled:"fyvr12jp",focus:"fyvr12jq",hover:"fyvr12jr",checked:"fyvr12js"},defaultClass:"fyvr12jn"},buttonInverse:{conditions:{base:"fyvr12jt",active:"fyvr12ju",disabled:"fyvr12jv",focus:"fyvr12jw",hover:"fyvr12jx",checked:"fyvr12jy"},defaultClass:"fyvr12jt"},text50:{conditions:{base:"fyvr12jz",active:"fyvr12k0",disabled:"fyvr12k1",focus:"fyvr12k2",hover:"fyvr12k3",checked:"fyvr12k4"},defaultClass:"fyvr12jz"},text80:{conditions:{base:"fyvr12k5",active:"fyvr12k6",disabled:"fyvr12k7",focus:"fyvr12k8",hover:"fyvr12k9",checked:"fyvr12ka"},defaultClass:"fyvr12k5"},text100:{conditions:{base:"fyvr12kb",active:"fyvr12kc",disabled:"fyvr12kd",focus:"fyvr12ke",hover:"fyvr12kf",checked:"fyvr12kg"},defaultClass:"fyvr12kb"},textInverse100:{conditions:{base:"fyvr12kh",active:"fyvr12ki",disabled:"fyvr12kj",focus:"fyvr12kk",hover:"fyvr12kl",checked:"fyvr12km"},defaultClass:"fyvr12kh"},arbitrumDark:{conditions:{base:"fyvr12kn",active:"fyvr12ko",disabled:"fyvr12kp",focus:"fyvr12kq",hover:"fyvr12kr",checked:"fyvr12ks"},defaultClass:"fyvr12kn"},arbitrumLight:{conditions:{base:"fyvr12kt",active:"fyvr12ku",disabled:"fyvr12kv",focus:"fyvr12kw",hover:"fyvr12kx",checked:"fyvr12ky"},defaultClass:"fyvr12kt"},avalanceDark:{conditions:{base:"fyvr12kz",active:"fyvr12l0",disabled:"fyvr12l1",focus:"fyvr12l2",hover:"fyvr12l3",checked:"fyvr12l4"},defaultClass:"fyvr12kz"},avalanceLight:{conditions:{base:"fyvr12l5",active:"fyvr12l6",disabled:"fyvr12l7",focus:"fyvr12l8",hover:"fyvr12l9",checked:"fyvr12la"},defaultClass:"fyvr12l5"},bscDark:{conditions:{base:"fyvr12lb",active:"fyvr12lc",disabled:"fyvr12ld",focus:"fyvr12le",hover:"fyvr12lf",checked:"fyvr12lg"},defaultClass:"fyvr12lb"},bscLight:{conditions:{base:"fyvr12lh",active:"fyvr12li",disabled:"fyvr12lj",focus:"fyvr12lk",hover:"fyvr12ll",checked:"fyvr12lm"},defaultClass:"fyvr12lh"},ethereumDark:{conditions:{base:"fyvr12ln",active:"fyvr12lo",disabled:"fyvr12lp",focus:"fyvr12lq",hover:"fyvr12lr",checked:"fyvr12ls"},defaultClass:"fyvr12ln"},ethereumLight:{conditions:{base:"fyvr12lt",active:"fyvr12lu",disabled:"fyvr12lv",focus:"fyvr12lw",hover:"fyvr12lx",checked:"fyvr12ly"},defaultClass:"fyvr12lt"},gnosisDark:{conditions:{base:"fyvr12lz",active:"fyvr12m0",disabled:"fyvr12m1",focus:"fyvr12m2",hover:"fyvr12m3",checked:"fyvr12m4"},defaultClass:"fyvr12lz"},gnosisLight:{conditions:{base:"fyvr12m5",active:"fyvr12m6",disabled:"fyvr12m7",focus:"fyvr12m8",hover:"fyvr12m9",checked:"fyvr12ma"},defaultClass:"fyvr12m5"},polygonDark:{conditions:{base:"fyvr12mb",active:"fyvr12mc",disabled:"fyvr12md",focus:"fyvr12me",hover:"fyvr12mf",checked:"fyvr12mg"},defaultClass:"fyvr12mb"},polygonLight:{conditions:{base:"fyvr12mh",active:"fyvr12mi",disabled:"fyvr12mj",focus:"fyvr12mk",hover:"fyvr12ml",checked:"fyvr12mm"},defaultClass:"fyvr12mh"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12mn",active:"fyvr12mo",disabled:"fyvr12mp",focus:"fyvr12mq",hover:"fyvr12mr",checked:"fyvr12ms"},defaultClass:"fyvr12mn"},dashed:{conditions:{base:"fyvr12mt",active:"fyvr12mu",disabled:"fyvr12mv",focus:"fyvr12mw",hover:"fyvr12mx",checked:"fyvr12my"},defaultClass:"fyvr12mt"},dotted:{conditions:{base:"fyvr12mz",active:"fyvr12n0",disabled:"fyvr12n1",focus:"fyvr12n2",hover:"fyvr12n3",checked:"fyvr12n4"},defaultClass:"fyvr12mz"}}},color:{values:{black:{conditions:{base:"fyvr12n5",active:"fyvr12n6",disabled:"fyvr12n7",focus:"fyvr12n8",hover:"fyvr12n9",checked:"fyvr12na"},defaultClass:"fyvr12n5"},white:{conditions:{base:"fyvr12nb",active:"fyvr12nc",disabled:"fyvr12nd",focus:"fyvr12ne",hover:"fyvr12nf",checked:"fyvr12ng"},defaultClass:"fyvr12nb"},inherit:{conditions:{base:"fyvr12nh",active:"fyvr12ni",disabled:"fyvr12nj",focus:"fyvr12nk",hover:"fyvr12nl",checked:"fyvr12nm"},defaultClass:"fyvr12nh"},transparent:{conditions:{base:"fyvr12nn",active:"fyvr12no",disabled:"fyvr12np",focus:"fyvr12nq",hover:"fyvr12nr",checked:"fyvr12ns"},defaultClass:"fyvr12nn"},positive:{conditions:{base:"fyvr12nt",active:"fyvr12nu",disabled:"fyvr12nv",focus:"fyvr12nw",hover:"fyvr12nx",checked:"fyvr12ny"},defaultClass:"fyvr12nt"},negative:{conditions:{base:"fyvr12nz",active:"fyvr12o0",disabled:"fyvr12o1",focus:"fyvr12o2",hover:"fyvr12o3",checked:"fyvr12o4"},defaultClass:"fyvr12nz"},info:{conditions:{base:"fyvr12o5",active:"fyvr12o6",disabled:"fyvr12o7",focus:"fyvr12o8",hover:"fyvr12o9",checked:"fyvr12oa"},defaultClass:"fyvr12o5"},warning:{conditions:{base:"fyvr12ob",active:"fyvr12oc",disabled:"fyvr12od",focus:"fyvr12oe",hover:"fyvr12of",checked:"fyvr12og"},defaultClass:"fyvr12ob"},gradientBackdrop:{conditions:{base:"fyvr12oh",active:"fyvr12oi",disabled:"fyvr12oj",focus:"fyvr12ok",hover:"fyvr12ol",checked:"fyvr12om"},defaultClass:"fyvr12oh"},gradientPrimary:{conditions:{base:"fyvr12on",active:"fyvr12oo",disabled:"fyvr12op",focus:"fyvr12oq",hover:"fyvr12or",checked:"fyvr12os"},defaultClass:"fyvr12on"},gradientSecondary:{conditions:{base:"fyvr12ot",active:"fyvr12ou",disabled:"fyvr12ov",focus:"fyvr12ow",hover:"fyvr12ox",checked:"fyvr12oy"},defaultClass:"fyvr12ot"},backgroundPrimary:{conditions:{base:"fyvr12oz",active:"fyvr12p0",disabled:"fyvr12p1",focus:"fyvr12p2",hover:"fyvr12p3",checked:"fyvr12p4"},defaultClass:"fyvr12oz"},backgroundSecondary:{conditions:{base:"fyvr12p5",active:"fyvr12p6",disabled:"fyvr12p7",focus:"fyvr12p8",hover:"fyvr12p9",checked:"fyvr12pa"},defaultClass:"fyvr12p5"},backgroundContrast:{conditions:{base:"fyvr12pb",active:"fyvr12pc",disabled:"fyvr12pd",focus:"fyvr12pe",hover:"fyvr12pf",checked:"fyvr12pg"},defaultClass:"fyvr12pb"},backgroundMuted:{conditions:{base:"fyvr12ph",active:"fyvr12pi",disabled:"fyvr12pj",focus:"fyvr12pk",hover:"fyvr12pl",checked:"fyvr12pm"},defaultClass:"fyvr12ph"},backgroundControl:{conditions:{base:"fyvr12pn",active:"fyvr12po",disabled:"fyvr12pp",focus:"fyvr12pq",hover:"fyvr12pr",checked:"fyvr12ps"},defaultClass:"fyvr12pn"},backgroundInverse:{conditions:{base:"fyvr12pt",active:"fyvr12pu",disabled:"fyvr12pv",focus:"fyvr12pw",hover:"fyvr12px",checked:"fyvr12py"},defaultClass:"fyvr12pt"},backgroundBackdrop:{conditions:{base:"fyvr12pz",active:"fyvr12q0",disabled:"fyvr12q1",focus:"fyvr12q2",hover:"fyvr12q3",checked:"fyvr12q4"},defaultClass:"fyvr12pz"},backgroundOverlay:{conditions:{base:"fyvr12q5",active:"fyvr12q6",disabled:"fyvr12q7",focus:"fyvr12q8",hover:"fyvr12q9",checked:"fyvr12qa"},defaultClass:"fyvr12q5"},borderNormal:{conditions:{base:"fyvr12qb",active:"fyvr12qc",disabled:"fyvr12qd",focus:"fyvr12qe",hover:"fyvr12qf",checked:"fyvr12qg"},defaultClass:"fyvr12qb"},borderFocus:{conditions:{base:"fyvr12qh",active:"fyvr12qi",disabled:"fyvr12qj",focus:"fyvr12qk",hover:"fyvr12ql",checked:"fyvr12qm"},defaultClass:"fyvr12qh"},buttonGlass:{conditions:{base:"fyvr12qn",active:"fyvr12qo",disabled:"fyvr12qp",focus:"fyvr12qq",hover:"fyvr12qr",checked:"fyvr12qs"},defaultClass:"fyvr12qn"},buttonEmphasis:{conditions:{base:"fyvr12qt",active:"fyvr12qu",disabled:"fyvr12qv",focus:"fyvr12qw",hover:"fyvr12qx",checked:"fyvr12qy"},defaultClass:"fyvr12qt"},buttonInverse:{conditions:{base:"fyvr12qz",active:"fyvr12r0",disabled:"fyvr12r1",focus:"fyvr12r2",hover:"fyvr12r3",checked:"fyvr12r4"},defaultClass:"fyvr12qz"},text50:{conditions:{base:"fyvr12r5",active:"fyvr12r6",disabled:"fyvr12r7",focus:"fyvr12r8",hover:"fyvr12r9",checked:"fyvr12ra"},defaultClass:"fyvr12r5"},text80:{conditions:{base:"fyvr12rb",active:"fyvr12rc",disabled:"fyvr12rd",focus:"fyvr12re",hover:"fyvr12rf",checked:"fyvr12rg"},defaultClass:"fyvr12rb"},text100:{conditions:{base:"fyvr12rh",active:"fyvr12ri",disabled:"fyvr12rj",focus:"fyvr12rk",hover:"fyvr12rl",checked:"fyvr12rm"},defaultClass:"fyvr12rh"},textInverse100:{conditions:{base:"fyvr12rn",active:"fyvr12ro",disabled:"fyvr12rp",focus:"fyvr12rq",hover:"fyvr12rr",checked:"fyvr12rs"},defaultClass:"fyvr12rn"},arbitrumDark:{conditions:{base:"fyvr12rt",active:"fyvr12ru",disabled:"fyvr12rv",focus:"fyvr12rw",hover:"fyvr12rx",checked:"fyvr12ry"},defaultClass:"fyvr12rt"},arbitrumLight:{conditions:{base:"fyvr12rz",active:"fyvr12s0",disabled:"fyvr12s1",focus:"fyvr12s2",hover:"fyvr12s3",checked:"fyvr12s4"},defaultClass:"fyvr12rz"},avalanceDark:{conditions:{base:"fyvr12s5",active:"fyvr12s6",disabled:"fyvr12s7",focus:"fyvr12s8",hover:"fyvr12s9",checked:"fyvr12sa"},defaultClass:"fyvr12s5"},avalanceLight:{conditions:{base:"fyvr12sb",active:"fyvr12sc",disabled:"fyvr12sd",focus:"fyvr12se",hover:"fyvr12sf",checked:"fyvr12sg"},defaultClass:"fyvr12sb"},bscDark:{conditions:{base:"fyvr12sh",active:"fyvr12si",disabled:"fyvr12sj",focus:"fyvr12sk",hover:"fyvr12sl",checked:"fyvr12sm"},defaultClass:"fyvr12sh"},bscLight:{conditions:{base:"fyvr12sn",active:"fyvr12so",disabled:"fyvr12sp",focus:"fyvr12sq",hover:"fyvr12sr",checked:"fyvr12ss"},defaultClass:"fyvr12sn"},ethereumDark:{conditions:{base:"fyvr12st",active:"fyvr12su",disabled:"fyvr12sv",focus:"fyvr12sw",hover:"fyvr12sx",checked:"fyvr12sy"},defaultClass:"fyvr12st"},ethereumLight:{conditions:{base:"fyvr12sz",active:"fyvr12t0",disabled:"fyvr12t1",focus:"fyvr12t2",hover:"fyvr12t3",checked:"fyvr12t4"},defaultClass:"fyvr12sz"},gnosisDark:{conditions:{base:"fyvr12t5",active:"fyvr12t6",disabled:"fyvr12t7",focus:"fyvr12t8",hover:"fyvr12t9",checked:"fyvr12ta"},defaultClass:"fyvr12t5"},gnosisLight:{conditions:{base:"fyvr12tb",active:"fyvr12tc",disabled:"fyvr12td",focus:"fyvr12te",hover:"fyvr12tf",checked:"fyvr12tg"},defaultClass:"fyvr12tb"},polygonDark:{conditions:{base:"fyvr12th",active:"fyvr12ti",disabled:"fyvr12tj",focus:"fyvr12tk",hover:"fyvr12tl",checked:"fyvr12tm"},defaultClass:"fyvr12th"},polygonLight:{conditions:{base:"fyvr12tn",active:"fyvr12to",disabled:"fyvr12tp",focus:"fyvr12tq",hover:"fyvr12tr",checked:"fyvr12ts"},defaultClass:"fyvr12tn"}}},cursor:{values:{default:{conditions:{base:"fyvr12tt",active:"fyvr12tu",disabled:"fyvr12tv",focus:"fyvr12tw",hover:"fyvr12tx",checked:"fyvr12ty"},defaultClass:"fyvr12tt"},pointer:{conditions:{base:"fyvr12tz",active:"fyvr12u0",disabled:"fyvr12u1",focus:"fyvr12u2",hover:"fyvr12u3",checked:"fyvr12u4"},defaultClass:"fyvr12tz"},text:{conditions:{base:"fyvr12u5",active:"fyvr12u6",disabled:"fyvr12u7",focus:"fyvr12u8",hover:"fyvr12u9",checked:"fyvr12ua"},defaultClass:"fyvr12u5"}}},opacity:{values:{0:{conditions:{base:"fyvr12ub",active:"fyvr12uc",disabled:"fyvr12ud",focus:"fyvr12ue",hover:"fyvr12uf",checked:"fyvr12ug"},defaultClass:"fyvr12ub"},50:{conditions:{base:"fyvr12uh",active:"fyvr12ui",disabled:"fyvr12uj",focus:"fyvr12uk",hover:"fyvr12ul",checked:"fyvr12um"},defaultClass:"fyvr12uh"},80:{conditions:{base:"fyvr12un",active:"fyvr12uo",disabled:"fyvr12up",focus:"fyvr12uq",hover:"fyvr12ur",checked:"fyvr12us"},defaultClass:"fyvr12un"},100:{conditions:{base:"fyvr12ut",active:"fyvr12uu",disabled:"fyvr12uv",focus:"fyvr12uw",hover:"fyvr12ux",checked:"fyvr12uy"},defaultClass:"fyvr12ut"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr12uz",active:"fyvr12v0",disabled:"fyvr12v1",focus:"fyvr12v2",hover:"fyvr12v3",checked:"fyvr12v4"},defaultClass:"fyvr12uz"},auto:{conditions:{base:"fyvr12v5",active:"fyvr12v6",disabled:"fyvr12v7",focus:"fyvr12v8",hover:"fyvr12v9",checked:"fyvr12va"},defaultClass:"fyvr12v5"}}},outline:{values:{none:{conditions:{base:"fyvr12vb",active:"fyvr12vc",disabled:"fyvr12vd",focus:"fyvr12ve",hover:"fyvr12vf",checked:"fyvr12vg"},defaultClass:"fyvr12vb"}}},boxShadow:{values:{none:{conditions:{base:"fyvr12vh",active:"fyvr12vi",disabled:"fyvr12vj",focus:"fyvr12vk",hover:"fyvr12vl",checked:"fyvr12vm"},defaultClass:"fyvr12vh"}}}}});const XR=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],zy=t=>(t.display||(t.display=Object.keys(t).some(e=>XR.includes(e))?"flex":void 0),P4(t));zy.properties=P4.properties;function I4(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 f in s)zy.properties.has(f)?o[f]=s[f]:a[f]=s[f];const l=zy({...o,...n});return S.createElement(r,{className:Jr(l,i),...a,ref:e})});var R4={exports:{}},hf={};/** * @license React * react-jsx-runtime.production.min.js * @@ -53,8 +53,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 K2;function XR(){if(K2)return df;K2=1;var t=Wt,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,f){var c,u={},h=null,v=null;f!==void 0&&(h=""+f),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(v=l.ref);for(c in l)n.call(l,c)&&!s.hasOwnProperty(c)&&(u[c]=l[c]);if(a&&a.defaultProps)for(c in l=a.defaultProps,l)u[c]===void 0&&(u[c]=l[c]);return{$$typeof:e,type:a,key:h,ref:v,props:u,_owner:i.current}}return df.Fragment=r,df.jsx=o,df.jsxs=o,df}R4.exports=XR();var Q=R4.exports,M4={},N4={exports:{}},X1,J2;function ZR(){if(J2)return X1;J2=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return X1=t,X1}var Z1,Q2;function eM(){if(Q2)return Z1;Q2=1;var t=ZR();function e(){}function r(){}return r.resetWarningCache=e,Z1=function(){function n(o,a,l,f,c,u){if(u!==t){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}n.isRequired=n;function i(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:e};return s.PropTypes=s,s},Z1}N4.exports=eM()();var tM=N4.exports;Object.defineProperty(M4,"__esModule",{value:!0});var Y2=Object.assign||function(t){for(var e=1;e>19^E^E>>8,(i[3]>>>0)/(1<<31>>>0)}function a(){var E=Math.floor(o()*360),I=o()*60+40+"%",M=(o()+o()+o()+o())*25+"%",$="hsl("+E+","+I+","+M+")";return $}function l(E){for(var I=E,M=E,$=Math.ceil(I/2),j=I-$,U=[],W=0;W{const{className:e,address:r,size:n="md",...i}=t;return Q.jsx(ge,{as:lM,className:Jr(cM,fM,e),display:"inline-block",seed:r.toUpperCase(),size:8,scale:uM[n],...i})});function dM(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 hM(t){var e=dM(t,"string");return typeof e=="symbol"?e:String(e)}function vM(t,e,r){return e=hM(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 Z2(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},Ot=t=>{var e=r=>{var n=t.defaultClassName,i=Z2(Z2({},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 f=t.variantClassNames[s][l];f&&(n+=" "+f)}}for(var[c,u]of t.compoundVariants)yM(c,i,t.defaultVariants)&&(n+=" "+u);return n};return e.variants=()=>Object.keys(t.variantClassNames),e};Ot({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"fyvr11ot",warning:"fyvr11oz",success:"fyvr11oh",error:"fyvr11on"},size:{sm:"fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr1wo fyvr1yk fyvr13w fyvr1e8",md:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ws fyvr1yo fyvr140 fyvr1ec",lg:"fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc fyvr1ww fyvr1ys fyvr144 fyvr1eg"}},defaultVariants:{},compoundVariants:[]});const ew=t=>{const{color:e="borderNormal",marginY:r="4",...n}=t;return Q.jsx(ge,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var pM=Ot({defaultClassName:"",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:"_1qxj1ibi"},underline:{true:"_1qxj1ibj"},uppercase:{true:"_1qxj1ibk"},capitalize:{true:"_1qxj1ibl"},hidden:{true:"_1qxj1ibm"}},defaultVariants:{},compoundVariants:[]});const sr=S.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:i,hidden:s,italic:o,underline:a,children:l,ellipsis:f,uppercase:c,capitalize:u,...h}=t,v=HR[n];return Q.jsx(ge,{as:r,className:Jr(i,pM({hidden:s,ellipsis:f,italic:o,underline:a,uppercase:c,capitalize:u})),ref:e,...v,...h,children:l})});var gM=Ot({defaultClassName:"fyvr11ls fyvr11m8 fyvr11n7 fyvr11ko fyvr11h0",variantClassNames:{variant:{base:"_140wn8ne",feature:"_140wn8nf fyvr11ph fyvr12nb",primary:"fyvr11pb fyvr12nb",glass:"fyvr11rb fyvr12rh",emphasis:"fyvr11rh fyvr12rh",text:"_140wn8nj fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11ob fyvr12r5"},shape:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"fyvr12tt fyvr12uh",false:"fyvr12tz fyvr12ut fyvr12ur"},size:{xs:"_140wn8no fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr1ws fyvr1yo",sm:"_140wn8np fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys",md:"_140wn8nq fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw",lg:"_140wn8nr fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw"},iconOnly:{true:"_140wn8ns"},hasLeftIcon:{true:"_140wn8nt"},hasRightIcon:{true:"_140wn8nu"},activeOutline:{light:"_140wn8nv",bold:"_140wn8nw"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8nx"],[{iconOnly:!0,size:"sm"},"_140wn8ny"],[{iconOnly:!0,size:"md"},"_140wn8nz"],[{iconOnly:!0,size:"lg"},"_140wn8n10"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n11"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n12"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n13"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n14"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n15"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n16"]]});const Ve=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:f,leftIcon:c,rightIcon:u,size:h="md",variant:v="glass",width:x="fit",shape:g="circle",type:k="button",...w}=t,A=c!==void 0&&f!==void 0,E=u!==void 0&&f!==void 0,I=c!==void 0&&f===void 0,M=h==="xs"?"xs":"sm";return Q.jsx(ge,{as:r,className:Jr(i,gM({activeOutline:n,disabled:s||l,hasLeftIcon:A,hasRightIcon:E,iconOnly:I,size:v==="text"?void 0:h,shape:v==="text"?void 0:g,variant:v})),disabled:s||l,display:o,fontWeight:a,ref:e,type:k,width:x,...w,children:I?Q.jsx(c,{size:M}):Q.jsxs(ge,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:h==="xs"?"1":"2",children:[Q.jsxs(ge,{justifyContent:"flex-start",alignItems:"center",gap:h==="xs"?"1":"2",children:[c&&Q.jsx(c,{size:M}),Q.jsx(sr,{children:f})]}),u&&Q.jsx(u,{size:M})]})})});var mM=Ot({defaultClassName:"",variantClassNames:{clickable:{true:"fyvr12ur fyvr12tz"},disabled:{true:"rhmai64"},outlined:{true:"fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12j5 fyvr12bz fyvr11xn fyvr124t fyvr12mn fyvr12fh fyvr1215 fyvr128b"},blur:{true:"fyvr11ms"}},defaultVariants:{},compoundVariants:[]});const xM=S.forwardRef((t,e)=>{const{className:r,children:n,clickable:i,outlined:s,disabled:o,blur:a,width:l="full",...f}=t;return Q.jsx(ge,{className:Jr(r,mM({clickable:i,outlined:s,disabled:o,blur:a})),background:s?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:l,ref:e,...f,children:n})});function ue(){return ue=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>bM(r,e))}function Nt(...t){return S.useCallback(D4(...t),t)}function Or(t,e=[]){let r=[];function n(s,o){const a=S.createContext(o),l=r.length;r=[...r,o];function f(u){const{scope:h,children:v,...x}=u,g=(h==null?void 0:h[t][l])||a,k=S.useMemo(()=>x,Object.values(x));return S.createElement(g.Provider,{value:k},v)}function c(u,h){const v=(h==null?void 0:h[t][l])||a,x=S.useContext(v);if(x)return x;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${s}\``)}return f.displayName=s+"Provider",[f,c]}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,wM(i,...e)]}function wM(...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:f})=>{const u=l(s)[`__scope${f}`];return{...a,...u}},{});return S.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function Ce(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 Bn(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 Sl({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,i]=CM({defaultProp:e,onChange:r}),s=t!==void 0,o=s?t:n,a=Bn(r),l=S.useCallback(f=>{if(s){const u=typeof f=="function"?f(t):f;u!==t&&a(u)}else i(f)},[s,t,i,a]);return[o,l]}function CM({defaultProp:t,onChange:e}){const r=S.useState(t),[n]=r,i=S.useRef(n),s=Bn(e);return S.useEffect(()=>{i.current!==n&&(s(n),i.current=n)},[n,i,s]),r}function gm(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 xn=Boolean(globalThis==null?void 0:globalThis.document)?S.useLayoutEffect:()=>{};function mm(t){const[e,r]=S.useState(void 0);return xn(()=>{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,f=Array.isArray(l)?l[0]:l;o=f.inlineSize,a=f.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 AM(t,e){return S.useReducer((r,n)=>{const i=e[r][n];return i??r},t)}const Jc=t=>{const{present:e,children:r}=t,n=EM(e),i=typeof r=="function"?r({present:n.isPresent}):S.Children.only(r),s=Nt(n.ref,i.ref);return typeof r=="function"||n.isPresent?S.cloneElement(i,{ref:s}):null};Jc.displayName="Presence";function EM(t){const[e,r]=S.useState(),n=S.useRef({}),i=S.useRef(t),s=S.useRef("none"),o=t?"mounted":"unmounted",[a,l]=AM(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const f=Ru(n.current);s.current=a==="mounted"?f:"none"},[a]),xn(()=>{const f=n.current,c=i.current;if(c!==t){const h=s.current,v=Ru(f);t?l("MOUNT"):v==="none"||(f==null?void 0:f.display)==="none"?l("UNMOUNT"):l(c&&h!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),xn(()=>{if(e){const f=u=>{const v=Ru(n.current).includes(u.animationName);u.target===e&&v&&Ti.flushSync(()=>l("ANIMATION_END"))},c=u=>{u.target===e&&(s.current=Ru(n.current))};return e.addEventListener("animationstart",c),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{e.removeEventListener("animationstart",c),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:S.useCallback(f=>{f&&(n.current=getComputedStyle(f)),r(f)},[])}}function Ru(t){return(t==null?void 0:t.animationName)||"none"}const _c=S.forwardRef((t,e)=>{const{children:r,...n}=t,i=S.Children.toArray(r),s=i.find(kM);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(zy,ue({},n,{ref:e}),S.isValidElement(o)?S.cloneElement(o,void 0,a):null)}return S.createElement(zy,ue({},n,{ref:e}),r)});_c.displayName="Slot";const zy=S.forwardRef((t,e)=>{const{children:r,...n}=t;return S.isValidElement(r)?S.cloneElement(r,{..._M(n,r.props),ref:e?D4(e,r.ref):r.ref}):S.Children.count(r)>1?S.Children.only(null):null});zy.displayName="SlotClone";const SM=({children:t})=>S.createElement(S.Fragment,null,t);function kM(t){return S.isValidElement(t)&&t.type===SM}function _M(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 TM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],$e=TM.reduce((t,e)=>{const r=S.forwardRef((n,i)=>{const{asChild:s,...o}=n,a=s?_c:e;return S.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),S.createElement(a,ue({},o,{ref:i}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function xm(t,e){t&&Ti.flushSync(()=>t.dispatchEvent(e))}const L4="Checkbox",[PM,dK]=Or(L4),[IM,RM]=PM(L4),MM=S.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:l="on",onCheckedChange:f,...c}=t,[u,h]=S.useState(null),v=Nt(e,E=>h(E)),x=S.useRef(!1),g=u?Boolean(u.closest("form")):!0,[k=!1,w]=Sl({prop:i,defaultProp:s,onChange:f}),A=S.useRef(k);return S.useEffect(()=>{const E=u==null?void 0:u.form;if(E){const I=()=>w(A.current);return E.addEventListener("reset",I),()=>E.removeEventListener("reset",I)}},[u,w]),S.createElement(IM,{scope:r,state:k,disabled:a},S.createElement($e.button,ue({type:"button",role:"checkbox","aria-checked":Ho(k)?"mixed":k,"aria-required":o,"data-state":$4(k),"data-disabled":a?"":void 0,disabled:a,value:l},c,{ref:v,onKeyDown:Ce(t.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Ce(t.onClick,E=>{w(I=>Ho(I)?!0:!I),g&&(x.current=E.isPropagationStopped(),x.current||E.stopPropagation())})})),g&&S.createElement(BM,{control:u,bubbles:!x.current,name:n,value:l,checked:k,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),NM="CheckboxIndicator",OM=S.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...i}=t,s=RM(NM,r);return S.createElement(Jc,{present:n||Ho(s.state)||s.state===!0},S.createElement($e.span,ue({"data-state":$4(s.state),"data-disabled":s.disabled?"":void 0},i,{ref:e,style:{pointerEvents:"none",...t.style}})))}),BM=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=S.useRef(null),o=gm(r),a=mm(e);return S.useEffect(()=>{const l=s.current,f=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(f,"checked").set;if(o!==r&&u){const h=new Event("click",{bubbles:n});l.indeterminate=Ho(r),u.call(l,Ho(r)?!1:r),l.dispatchEvent(h)}},[o,r,n]),S.createElement("input",ue({type:"checkbox","aria-hidden":!0,defaultChecked:Ho(r)?!1:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Ho(t){return t==="indeterminate"}function $4(t){return Ho(t)?"indeterminate":t?"checked":"unchecked"}const DM=MM,LM=OM;var $M=Ot({defaultClassName:"",variantClassNames:{labelLocation:{top:"fyvr11kw fyvr11i4 fyvr118k fyvr11h0",left:"_43lu9r5 fyvr11ko fyvr11ic fyvr118k fyvr11h0",right:"_43lu9r6 fyvr11ko fyvr11ic fyvr118k fyvr11h0",hidden:"fyvr1188 fyvr11h0"}},defaultVariants:{},compoundVariants:[]});const zl=t=>{const{id:e,label:r,description:n,labelLocation:i="top",children:s,...o}=t,a=()=>r||n?Q.jsxs(ge,{flexDirection:"column",gap:"0.5",children:[r&&Q.jsx(sr,{variant:"small",color:"text100",hidden:i==="hidden",children:r}),n&&Q.jsx(sr,{variant:"small",color:"text50",hidden:i==="hidden",children:n})]}):null;return Q.jsxs(ge,{as:"label",className:$M({labelLocation:i}),htmlFor:e,...o,children:[["left","top","hidden"].includes(i)&&a(),s,i==="right"&&a()]})};var Vl=Ot({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const FM=t=>Q.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:Q.jsx("path",{d:"m4.304 10.232 4.263 4.79 7.13-11.238",stroke:"currentColor",strokeWidth:1.5})}),F4=({size:t="sm",...e})=>Q.jsx(ge,{as:FM,className:Vl({size:t}),...e}),jM=t=>Q.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:Q.jsx("path",{fillRule:"evenodd",clipRule:"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",fill:"currentColor"})}),j4=({size:t="sm",...e})=>Q.jsx(ge,{as:jM,className:Vl({size:t}),...e}),UM=t=>Q.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:Q.jsx("path",{fillRule:"evenodd",clipRule:"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",fill:"currentColor"})}),U4=({size:t="sm",...e})=>Q.jsx(ge,{as:UM,className:Vl({size:t}),...e}),zM=t=>Q.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:Q.jsx("path",{fillRule:"evenodd",clipRule:"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",fill:"currentColor"})}),VM=({size:t="sm",...e})=>Q.jsx(ge,{as:zM,className:Vl({size:t}),...e}),HM=t=>Q.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:Q.jsx("path",{fillRule:"evenodd",clipRule:"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",fill:"currentColor"})}),WM=({size:t="sm",...e})=>Q.jsx(ge,{as:HM,className:Vl({size:t}),...e}),qM=t=>Q.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:Q.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.28 2.856-6.71 8.887h4.134l-1.424 6.2 6.887-8.71h-4.322l1.435-6.377Z",fill:"currentColor"})}),GM=({size:t="sm",...e})=>Q.jsx(ge,{as:qM,className:Vl({size:t}),...e});var KM=Ot({defaultClassName:"fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12jb fyvr12c5 fyvr11xt fyvr124z fyvr12mn fyvr12fh fyvr1215 fyvr128b fyvr11h0 fyvr11ko fyvr11jg fyvr12ut fyvr12ur fyvr12uj fyvr12tz fyvr12tv",variantClassNames:{size:{sm:"_1c9x66f1",lg:"_1c9x66f2"}},defaultVariants:{},compoundVariants:[]}),JM=Ot({defaultClassName:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12rh fyvr11rt",variantClassNames:{size:{sm:"_1c9x66f4",lg:"_1c9x66f5"}},defaultVariants:{},compoundVariants:[]});const QM=({size:t="sm"})=>Q.jsx(LM,{className:JM({size:t}),children:Q.jsx(F4,{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 Q.jsx(zl,{disabled:r,display:"flex",id:n??i,label:s,labelLocation:o,whiteSpace:"nowrap",children:Q.jsx(DM,{className:KM({size:a}),disabled:r,id:n??i,name:i,ref:e,...l,children:Q.jsx(QM,{})})})});Wt.createContext(null);const YM=wS["useId".toString()]||(()=>{});let XM=0;function Qc(t){const[e,r]=S.useState(YM());return xn(()=>{t||r(n=>n??String(XM++))},[t]),t||(e?`radix-${e}`:"")}const z4="Collapsible",[ZM,hK]=Or(z4),[eN,bm]=ZM(z4),tN=S.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:s,onOpenChange:o,...a}=t,[l=!1,f]=Sl({prop:n,defaultProp:i,onChange:o});return S.createElement(eN,{scope:r,disabled:s,contentId:Qc(),open:l,onOpenToggle:S.useCallback(()=>f(c=>!c),[f])},S.createElement($e.div,ue({"data-state":wm(l),"data-disabled":s?"":void 0},a,{ref:e})))}),rN="CollapsibleTrigger",nN=S.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,i=bm(rN,r);return S.createElement($e.button,ue({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":wm(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},n,{ref:e,onClick:Ce(t.onClick,i.onOpenToggle)}))}),V4="CollapsibleContent",iN=S.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=bm(V4,t.__scopeCollapsible);return S.createElement(Jc,{present:r||i.open},({present:s})=>S.createElement(sN,ue({},n,{ref:e,present:s})))}),sN=S.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:i,...s}=t,o=bm(V4,r),[a,l]=S.useState(n),f=S.useRef(null),c=Nt(e,f),u=S.useRef(0),h=u.current,v=S.useRef(0),x=v.current,g=o.open||a,k=S.useRef(g),w=S.useRef();return S.useEffect(()=>{const A=requestAnimationFrame(()=>k.current=!1);return()=>cancelAnimationFrame(A)},[]),xn(()=>{const A=f.current;if(A){w.current=w.current||{transitionDuration:A.style.transitionDuration,animationName:A.style.animationName},A.style.transitionDuration="0s",A.style.animationName="none";const E=A.getBoundingClientRect();u.current=E.height,v.current=E.width,k.current||(A.style.transitionDuration=w.current.transitionDuration,A.style.animationName=w.current.animationName),l(n)}},[o.open,n]),S.createElement($e.div,ue({"data-state":wm(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!g},s,{ref:c,style:{["--radix-collapsible-content-height"]:h?`${h}px`:void 0,["--radix-collapsible-content-width"]:x?`${x}px`:void 0,...t.style}}),g&&i)});function wm(t){return t?"open":"closed"}const oN=tN,aN=nN,lN=iN;var tw="64px",fN="_4j62fl4 fyvr1ww fyvr1ys fyvr1so fyvr1v0 fyvr128",cN="_4j62fl5",uN="_4j62fl0",dN="_4j62fl2 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11h0 fyvr11ko fyvr11ob fyvr128 fyvr12tz fyvr11n2";const hN=t=>{const{className:e,children:r,defaultOpen:n,onOpenChange:i,label:s,...o}=t,[a,l]=S.useState(n),f=c=>{l(c),i==null||i(c)};return Q.jsx(oN,{defaultOpen:n,onOpenChange:f,asChild:!0,children:Q.jsxs(ge,{as:ld.div,className:Jr(e,uN),initial:{height:n?"auto":tw},animate:{height:a?"auto":tw},transition:{ease:"easeOut",duration:.3},borderRadius:"md",background:"backgroundSecondary",position:"relative",overflow:"hidden",width:"full",...o,children:[Q.jsxs(aN,{className:dN,children:[Q.jsx(sr,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:s}),Q.jsx(ge,{as:ld.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(j4,{className:cN,color:"text50"})})]}),Q.jsx(VR,{children:a&&Q.jsx(lN,{className:fN,asChild:!0,forceMount:!0,children:Q.jsx(ld.div,{initial:{opacity:n?1:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"easeOut",duration:.3},children:r})})})]})})};function bh(t){const e=t+"CollectionProvider",[r,n]=Or(e),[i,s]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=v=>{const{scope:x,children:g}=v,k=Wt.useRef(null),w=Wt.useRef(new Map).current;return Wt.createElement(i,{scope:x,itemMap:w,collectionRef:k},g)},a=t+"CollectionSlot",l=Wt.forwardRef((v,x)=>{const{scope:g,children:k}=v,w=s(a,g),A=Nt(x,w.collectionRef);return Wt.createElement(_c,{ref:A},k)}),f=t+"CollectionItemSlot",c="data-radix-collection-item",u=Wt.forwardRef((v,x)=>{const{scope:g,children:k,...w}=v,A=Wt.useRef(null),E=Nt(x,A),I=s(f,g);return Wt.useEffect(()=>(I.itemMap.set(A,{ref:A,...w}),()=>void I.itemMap.delete(A))),Wt.createElement(_c,{[c]:"",ref:E},k)});function h(v){const x=s(t+"CollectionConsumer",v);return Wt.useCallback(()=>{const k=x.collectionRef.current;if(!k)return[];const w=Array.from(k.querySelectorAll(`[${c}]`));return Array.from(x.itemMap.values()).sort((I,M)=>w.indexOf(I.ref.current)-w.indexOf(M.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:l,ItemSlot:u},h,n]}const vN=S.createContext(void 0);function Cm(t){const e=S.useContext(vN);return t||e||"ltr"}function yN(t,e=globalThis==null?void 0:globalThis.document){const r=Bn(t);S.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const Vy="dismissableLayer.update",pN="dismissableLayer.pointerDownOutside",gN="dismissableLayer.focusOutside";let rw;const mN=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),H4=S.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...f}=t,c=S.useContext(mN),[u,h]=S.useState(null),v=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,x]=S.useState({}),g=Nt(e,U=>h(U)),k=Array.from(c.layers),[w]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),A=k.indexOf(w),E=u?k.indexOf(u):-1,I=c.layersWithOutsidePointerEventsDisabled.size>0,M=E>=A,$=xN(U=>{const W=U.target,q=[...c.branches].some(G=>G.contains(W));!M||q||(s==null||s(U),a==null||a(U),U.defaultPrevented||l==null||l())},v),j=bN(U=>{const W=U.target;[...c.branches].some(G=>G.contains(W))||(o==null||o(U),a==null||a(U),U.defaultPrevented||l==null||l())},v);return yN(U=>{E===c.layers.size-1&&(i==null||i(U),!U.defaultPrevented&&l&&(U.preventDefault(),l()))},v),S.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(rw=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),nw(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=rw)}},[u,v,n,c]),S.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),nw())},[u,c]),S.useEffect(()=>{const U=()=>x({});return document.addEventListener(Vy,U),()=>document.removeEventListener(Vy,U)},[]),S.createElement($e.div,ue({},f,{ref:g,style:{pointerEvents:I?M?"auto":"none":void 0,...t.style},onFocusCapture:Ce(t.onFocusCapture,j.onFocusCapture),onBlurCapture:Ce(t.onBlurCapture,j.onBlurCapture),onPointerDownCapture:Ce(t.onPointerDownCapture,$.onPointerDownCapture)}))});function xN(t,e=globalThis==null?void 0:globalThis.document){const r=Bn(t),n=S.useRef(!1),i=S.useRef(()=>{});return S.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let l=function(){W4(pN,r,f,{discrete:!0})};const f={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}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 bN(t,e=globalThis==null?void 0:globalThis.document){const r=Bn(t),n=S.useRef(!1);return S.useEffect(()=>{const i=s=>{s.target&&!n.current&&W4(gN,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 nw(){const t=new CustomEvent(Vy);document.dispatchEvent(t)}function W4(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?xm(i,s):i.dispatchEvent(s)}const wN=H4;let ev=0;function CN(){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:iw()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:iw()),ev++,()=>{ev===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),ev--}},[])}function iw(){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 tv="focusScope.autoFocusOnMount",rv="focusScope.autoFocusOnUnmount",sw={bubbles:!1,cancelable:!0},AN=S.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,l]=S.useState(null),f=Bn(i),c=Bn(s),u=S.useRef(null),h=Nt(e,g=>l(g)),v=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(n){let g=function(E){if(v.paused||!a)return;const I=E.target;a.contains(I)?u.current=I:Ss(u.current,{select:!0})},k=function(E){if(v.paused||!a)return;const I=E.relatedTarget;I!==null&&(a.contains(I)||Ss(u.current,{select:!0}))},w=function(E){const I=document.activeElement;for(const M of E)M.removedNodes.length>0&&(a!=null&&a.contains(I)||Ss(a))};document.addEventListener("focusin",g),document.addEventListener("focusout",k);const A=new MutationObserver(w);return a&&A.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",k),A.disconnect()}}},[n,a,v.paused]),S.useEffect(()=>{if(a){aw.add(v);const g=document.activeElement;if(!a.contains(g)){const w=new CustomEvent(tv,sw);a.addEventListener(tv,f),a.dispatchEvent(w),w.defaultPrevented||(EN(PN(q4(a)),{select:!0}),document.activeElement===g&&Ss(a))}return()=>{a.removeEventListener(tv,f),setTimeout(()=>{const w=new CustomEvent(rv,sw);a.addEventListener(rv,c),a.dispatchEvent(w),w.defaultPrevented||Ss(g??document.body,{select:!0}),a.removeEventListener(rv,c),aw.remove(v)},0)}}},[a,f,c,v]);const x=S.useCallback(g=>{if(!r&&!n||v.paused)return;const k=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,w=document.activeElement;if(k&&w){const A=g.currentTarget,[E,I]=SN(A);E&&I?!g.shiftKey&&w===I?(g.preventDefault(),r&&Ss(E,{select:!0})):g.shiftKey&&w===E&&(g.preventDefault(),r&&Ss(I,{select:!0})):w===A&&g.preventDefault()}},[r,n,v.paused]);return S.createElement($e.div,ue({tabIndex:-1},o,{ref:h,onKeyDown:x}))});function EN(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Ss(n,{select:e}),document.activeElement!==r)return}function SN(t){const e=q4(t),r=ow(e,t),n=ow(e.reverse(),t);return[r,n]}function q4(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 ow(t,e){for(const r of t)if(!kN(r,{upTo:e}))return r}function kN(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 _N(t){return t instanceof HTMLInputElement&&"select"in t}function Ss(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&_N(t)&&e&&t.select()}}const aw=TN();function TN(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=lw(t,e),t.unshift(e)},remove(e){var r;t=lw(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function lw(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function PN(t){return t.filter(e=>e.tagName!=="A")}function Hl(t){return t.split("-")[1]}function Am(t){return t==="y"?"height":"width"}function Xi(t){return t.split("-")[0]}function ha(t){return["top","bottom"].includes(Xi(t))?"x":"y"}function fw(t,e,r){let{reference:n,floating:i}=t;const s=n.x+n.width/2-i.width/2,o=n.y+n.height/2-i.height/2,a=ha(e),l=Am(a),f=n[l]/2-i[l]/2,c=a==="x";let u;switch(Xi(e)){case"top":u={x:s,y:n.y-i.height};break;case"bottom":u={x:s,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:o};break;case"left":u={x:n.x-i.width,y:o};break;default:u={x:n.x,y:n.y}}switch(Hl(e)){case"start":u[a]-=f*(r&&c?-1:1);break;case"end":u[a]+=f*(r&&c?-1:1)}return u}const IN=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 f=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:u}=fw(f,n,l),h=n,v={},x=0;for(let g=0;g({name:"arrow",options:t,async fn(e){const{element:r,padding:n=0}=t||{},{x:i,y:s,placement:o,rects:a,platform:l,elements:f}=e;if(r==null)return{};const c=G4(n),u={x:i,y:s},h=ha(o),v=Am(h),x=await l.getDimensions(r),g=h==="y",k=g?"top":"left",w=g?"bottom":"right",A=g?"clientHeight":"clientWidth",E=a.reference[v]+a.reference[h]-u[h]-a.floating[v],I=u[h]-a.reference[h],M=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let $=M?M[A]:0;$&&await(l.isElement==null?void 0:l.isElement(M))||($=f.floating[A]||a.floating[v]);const j=E/2-I/2,U=c[k],W=$-x[v]-c[w],q=$/2-x[v]/2+j,G=Wy(U,q,W),re=Hl(o)!=null&&q!=G&&a.reference[v]/2-(qt.concat(e,e+"-start",e+"-end"),[]);const RN={left:"right",right:"left",bottom:"top",top:"bottom"};function y0(t){return t.replace(/left|right|bottom|top/g,e=>RN[e])}function MN(t,e,r){r===void 0&&(r=!1);const n=Hl(t),i=ha(t),s=Am(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=y0(o)),{main:o,cross:y0(o)}}const NN={start:"end",end:"start"};function nv(t){return t.replace(/start|end/g,e=>NN[e])}const ON=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r;const{placement:n,middlewareData:i,rects:s,initialPlacement:o,platform:a,elements:l}=e,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:u,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:x=!0,...g}=t,k=Xi(n),w=Xi(o)===o,A=await(a.isRTL==null?void 0:a.isRTL(l.floating)),E=u||(w||!x?[y0(o)]:function(G){const re=y0(G);return[nv(G),re,nv(re)]}(o));u||v==="none"||E.push(...function(G,re,D,y){const C=Hl(G);let P=function(O,m,T){const R=["left","right"],b=["right","left"],d=["top","bottom"],_=["bottom","top"];switch(O){case"top":case"bottom":return T?m?b:R:m?R:b;case"left":case"right":return m?d:_;default:return[]}}(Xi(G),D==="start",y);return C&&(P=P.map(O=>O+"-"+C),re&&(P=P.concat(P.map(nv)))),P}(o,x,v,A));const I=[o,...E],M=await Tc(e,g),$=[];let j=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&$.push(M[k]),c){const{main:G,cross:re}=MN(n,s,A);$.push(M[G],M[re])}if(j=[...j,{placement:n,overflows:$}],!$.every(G=>G<=0)){var U,W;const G=(((U=i.flip)==null?void 0:U.index)||0)+1,re=I[G];if(re)return{data:{index:G,overflows:j},reset:{placement:re}};let D=(W=j.filter(y=>y.overflows[0]<=0).sort((y,C)=>y.overflows[1]-C.overflows[1])[0])==null?void 0:W.placement;if(!D)switch(h){case"bestFit":{var q;const y=(q=j.map(C=>[C.placement,C.overflows.filter(P=>P>0).reduce((P,O)=>P+O,0)]).sort((C,P)=>C[1]-P[1])[0])==null?void 0:q[0];y&&(D=y);break}case"initialPlacement":D=o}if(n!==D)return{reset:{placement:D}}}return{}}}};function uw(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function dw(t){return K4.some(e=>t[e]>=0)}const BN=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{strategy:r="referenceHidden",...n}=t,{rects:i}=e;switch(r){case"referenceHidden":{const s=uw(await Tc(e,{...n,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:dw(s)}}}case"escaped":{const s=uw(await Tc(e,{...n,altBoundary:!0}),i.floating);return{data:{escapedOffsets:s,escaped:dw(s)}}}default:return{}}}}},DN=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,i=await async function(s,o){const{placement:a,platform:l,elements:f}=s,c=await(l.isRTL==null?void 0:l.isRTL(f.floating)),u=Xi(a),h=Hl(a),v=ha(a)==="x",x=["left","top"].includes(u)?-1:1,g=c&&v?-1:1,k=typeof o=="function"?o(s):o;let{mainAxis:w,crossAxis:A,alignmentAxis:E}=typeof k=="number"?{mainAxis:k,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...k};return h&&typeof E=="number"&&(A=h==="end"?-1*E:E),v?{x:A*g,y:w*x}:{x:w*x,y:A*g}}(e,t);return{x:r+i.x,y:n+i.y,data:i}}}};function J4(t){return t==="x"?"y":"x"}const LN=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:A}=k;return{x:w,y:A}}},...l}=t,f={x:r,y:n},c=await Tc(e,l),u=ha(Xi(i)),h=J4(u);let v=f[u],x=f[h];if(s){const k=u==="y"?"bottom":"right";v=Wy(v+c[u==="y"?"top":"left"],v,v-c[k])}if(o){const k=h==="y"?"bottom":"right";x=Wy(x+c[h==="y"?"top":"left"],x,x-c[k])}const g=a.fn({...e,[u]:v,[h]:x});return{...g,data:{x:g.x-r,y:g.y-n}}}}},$N=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:f=!0}=t,c={x:r,y:n},u=ha(i),h=J4(u);let v=c[u],x=c[h];const g=typeof a=="function"?a(e):a,k=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const E=u==="y"?"height":"width",I=s.reference[u]-s.floating[E]+k.mainAxis,M=s.reference[u]+s.reference[E]-k.mainAxis;vM&&(v=M)}if(f){var w,A;const E=u==="y"?"width":"height",I=["top","left"].includes(Xi(i)),M=s.reference[h]-s.floating[E]+(I&&((w=o.offset)==null?void 0:w[h])||0)+(I?0:k.crossAxis),$=s.reference[h]+s.reference[E]+(I?0:((A=o.offset)==null?void 0:A[h])||0)-(I?k.crossAxis:0);x$&&(x=$)}return{[u]:v,[h]:x}}}},FN=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}=t,l=await Tc(e,a),f=Xi(r),c=Hl(r),u=ha(r)==="x",{width:h,height:v}=n.floating;let x,g;f==="top"||f==="bottom"?(x=f,g=c===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(g=f,x=c==="end"?"top":"bottom");const k=v-l[x],w=h-l[g],A=!e.middlewareData.shift;let E=k,I=w;if(u){const $=h-l.left-l.right;I=c||A?Hy(w,$):$}else{const $=v-l.top-l.bottom;E=c||A?Hy(k,$):$}if(A&&!c){const $=Po(l.left,0),j=Po(l.right,0),U=Po(l.top,0),W=Po(l.bottom,0);u?I=h-2*($!==0||j!==0?$+j:Po(l.left,l.right)):E=v-2*(U!==0||W!==0?U+W:Po(l.top,l.bottom))}await o({...e,availableWidth:I,availableHeight:E});const M=await i.getDimensions(s.floating);return h!==M.width||v!==M.height?{reset:{rects:!0}}:{}}}};function Rn(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ii(t){return Rn(t).getComputedStyle(t)}function Q4(t){return t instanceof Rn(t).Node}function eo(t){return Q4(t)?(t.nodeName||"").toLowerCase():""}function oi(t){return t instanceof Rn(t).HTMLElement}function yn(t){return t instanceof Rn(t).Element}function hw(t){return typeof ShadowRoot>"u"?!1:t instanceof Rn(t).ShadowRoot||t instanceof ShadowRoot}function Pc(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=ii(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function jN(t){return["table","td","th"].includes(eo(t))}function qy(t){const e=Em(),r=ii(t);return r.transform!=="none"||r.perspective!=="none"||!e&&!!r.backdropFilter&&r.backdropFilter!=="none"||!e&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Em(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function wh(t){return["html","body","#document"].includes(eo(t))}const vw=Math.min,Uf=Math.max,p0=Math.round;function Y4(t){const e=ii(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=oi(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=p0(r)!==s||p0(n)!==o;return a&&(r=s,n=o),{width:r,height:n,fallback:a}}function X4(t){return yn(t)?t:t.contextElement}const Z4={x:1,y:1};function ll(t){const e=X4(t);if(!oi(e))return Z4;const r=e.getBoundingClientRect(),{width:n,height:i,fallback:s}=Y4(e);let o=(s?p0(r.width):r.width)/n,a=(s?p0(r.height):r.height)/i;return o&&Number.isFinite(o)||(o=1),a&&Number.isFinite(a)||(a=1),{x:o,y:a}}const yw={x:0,y:0};function eC(t,e,r){var n,i;if(e===void 0&&(e=!0),!Em())return yw;const s=t?Rn(t):window;return!r||e&&r!==s?yw:{x:((n=s.visualViewport)==null?void 0:n.offsetLeft)||0,y:((i=s.visualViewport)==null?void 0:i.offsetTop)||0}}function ea(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=X4(t);let o=Z4;e&&(n?yn(n)&&(o=ll(n)):o=ll(t));const a=eC(s,r,n);let l=(i.left+a.x)/o.x,f=(i.top+a.y)/o.y,c=i.width/o.x,u=i.height/o.y;if(s){const h=Rn(s),v=n&&yn(n)?Rn(n):n;let x=h.frameElement;for(;x&&n&&v!==h;){const g=ll(x),k=x.getBoundingClientRect(),w=getComputedStyle(x);k.x+=(x.clientLeft+parseFloat(w.paddingLeft))*g.x,k.y+=(x.clientTop+parseFloat(w.paddingTop))*g.y,l*=g.x,f*=g.y,c*=g.x,u*=g.y,l+=k.x,f+=k.y,x=Rn(x).frameElement}}return v0({width:c,height:u,x:l,y:f})}function Ws(t){return((Q4(t)?t.ownerDocument:t.document)||window.document).documentElement}function Ch(t){return yn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function tC(t){return ea(Ws(t)).left+Ch(t).scrollLeft}function kl(t){if(eo(t)==="html")return t;const e=t.assignedSlot||t.parentNode||hw(t)&&t.host||Ws(t);return hw(e)?e.host:e}function rC(t){const e=kl(t);return wh(e)?e.ownerDocument.body:oi(e)&&Pc(e)?e:rC(e)}function zf(t,e){var r;e===void 0&&(e=[]);const n=rC(t),i=n===((r=t.ownerDocument)==null?void 0:r.body),s=Rn(n);return i?e.concat(s,s.visualViewport||[],Pc(n)?n:[]):e.concat(n,zf(n))}function pw(t,e,r){let n;if(e==="viewport")n=function(i,s){const o=Rn(i),a=Ws(i),l=o.visualViewport;let f=a.clientWidth,c=a.clientHeight,u=0,h=0;if(l){f=l.width,c=l.height;const v=Em();(!v||v&&s==="fixed")&&(u=l.offsetLeft,h=l.offsetTop)}return{width:f,height:c,x:u,y:h}}(t,r);else if(e==="document")n=function(i){const s=Ws(i),o=Ch(i),a=i.ownerDocument.body,l=Uf(s.scrollWidth,s.clientWidth,a.scrollWidth,a.clientWidth),f=Uf(s.scrollHeight,s.clientHeight,a.scrollHeight,a.clientHeight);let c=-o.scrollLeft+tC(i);const u=-o.scrollTop;return ii(a).direction==="rtl"&&(c+=Uf(s.clientWidth,a.clientWidth)-l),{width:l,height:f,x:c,y:u}}(Ws(t));else if(yn(e))n=function(i,s){const o=ea(i,!0,s==="fixed"),a=o.top+i.clientTop,l=o.left+i.clientLeft,f=oi(i)?ll(i):{x:1,y:1};return{width:i.clientWidth*f.x,height:i.clientHeight*f.y,x:l*f.x,y:a*f.y}}(e,r);else{const i=eC(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return v0(n)}function nC(t,e){const r=kl(t);return!(r===e||!yn(r)||wh(r))&&(ii(r).position==="fixed"||nC(r,e))}function gw(t,e){return oi(t)&&ii(t).position!=="fixed"?e?e(t):t.offsetParent:null}function mw(t,e){const r=Rn(t);if(!oi(t))return r;let n=gw(t,e);for(;n&&jN(n)&&ii(n).position==="static";)n=gw(n,e);return n&&(eo(n)==="html"||eo(n)==="body"&&ii(n).position==="static"&&!qy(n))?r:n||function(i){let s=kl(i);for(;oi(s)&&!wh(s);){if(qy(s))return s;s=kl(s)}return null}(t)||r}function UN(t,e,r){const n=oi(e),i=Ws(e),s=r==="fixed",o=ea(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&!s)if((eo(e)!=="body"||Pc(i))&&(a=Ch(e)),oi(e)){const f=ea(e,!0,s,e);l.x=f.x+e.clientLeft,l.y=f.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}}const zN={getClippingRect:function(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const s=r==="clippingAncestors"?function(f,c){const u=c.get(f);if(u)return u;let h=zf(f).filter(k=>yn(k)&&eo(k)!=="body"),v=null;const x=ii(f).position==="fixed";let g=x?kl(f):f;for(;yn(g)&&!wh(g);){const k=ii(g),w=qy(g);w||k.position!=="fixed"||(v=null),(x?!w&&!v:!w&&k.position==="static"&&v&&["absolute","fixed"].includes(v.position)||Pc(g)&&!w&&nC(f,g))?h=h.filter(A=>A!==g):v=k,g=kl(g)}return c.set(f,h),h}(e,this._c):[].concat(r),o=[...s,n],a=o[0],l=o.reduce((f,c)=>{const u=pw(e,c,i);return f.top=Uf(u.top,f.top),f.right=vw(u.right,f.right),f.bottom=vw(u.bottom,f.bottom),f.left=Uf(u.left,f.left),f},pw(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:r,strategy:n}=t;const i=oi(r),s=Ws(r);if(r===s)return e;let o={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((i||!i&&n!=="fixed")&&((eo(r)!=="body"||Pc(s))&&(o=Ch(r)),oi(r))){const f=ea(r);a=ll(r),l.x=f.x+r.clientLeft,l.y=f.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}},isElement:yn,getDimensions:function(t){return Y4(t)},getOffsetParent:mw,getDocumentElement:Ws,getScale:ll,async getElementRects(t){let{reference:e,floating:r,strategy:n}=t;const i=this.getOffsetParent||mw,s=this.getDimensions;return{reference:UN(e,await i(r),n),floating:{x:0,y:0,...await s(r)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>ii(t).direction==="rtl"};function VN(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=!0,animationFrame:a=!1}=n,l=i||s?[...yn(t)?zf(t):t.contextElement?zf(t.contextElement):[],...zf(e)]:[];l.forEach(h=>{const v=!yn(h)&&h.toString().includes("V");!i||a&&!v||h.addEventListener("scroll",r,{passive:!0}),s&&h.addEventListener("resize",r)});let f,c=null;o&&(c=new ResizeObserver(()=>{r()}),yn(t)&&!a&&c.observe(t),yn(t)||!t.contextElement||a||c.observe(t.contextElement),c.observe(e));let u=a?ea(t):null;return a&&function h(){const v=ea(t);!u||v.x===u.x&&v.y===u.y&&v.width===u.width&&v.height===u.height||r(),u=v,f=requestAnimationFrame(h)}(),r(),()=>{var h;l.forEach(v=>{i&&v.removeEventListener("scroll",r),s&&v.removeEventListener("resize",r)}),(h=c)==null||h.disconnect(),c=null,a&&cancelAnimationFrame(f)}}const HN=(t,e,r)=>{const n=new Map,i={platform:zN,...r},s={...i.platform,_c:n};return IN(t,e,{...i,platform:s})},WN=t=>{const{element:e,padding:r}=t;function n(i){return{}.hasOwnProperty.call(i,"current")}return{name:"arrow",options:t,fn(i){return e&&n(e)?e.current!=null?cw({element:e.current,padding:r}).fn(i):{}:e?cw({element:e,padding:r}).fn(i):{}}}};var fd=typeof document<"u"?S.useLayoutEffect:S.useEffect;function g0(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(!g0(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)&&!g0(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 fd(()=>{e.current=t}),e}function qN(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:f}=t,[c,u]=S.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[h,v]=S.useState(n);g0(h,n)||v(n);const[x,g]=S.useState(null),[k,w]=S.useState(null),A=S.useCallback(P=>{P!=$.current&&($.current=P,g(P))},[g]),E=S.useCallback(P=>{P!==j.current&&(j.current=P,w(P))},[w]),I=s||x,M=o||k,$=S.useRef(null),j=S.useRef(null),U=S.useRef(c),W=bw(l),q=bw(i),G=S.useCallback(()=>{if(!$.current||!j.current)return;const P={placement:e,strategy:r,middleware:h};q.current&&(P.platform=q.current),HN($.current,j.current,P).then(O=>{const m={...O,isPositioned:!0};re.current&&!g0(U.current,m)&&(U.current=m,Ti.flushSync(()=>{u(m)}))})},[h,e,r,q]);fd(()=>{f===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,u(P=>({...P,isPositioned:!1})))},[f]);const re=S.useRef(!1);fd(()=>(re.current=!0,()=>{re.current=!1}),[]),fd(()=>{if(I&&($.current=I),M&&(j.current=M),I&&M){if(W.current)return W.current(I,M,G);G()}},[I,M,G,W]);const D=S.useMemo(()=>({reference:$,floating:j,setReference:A,setFloating:E}),[A,E]),y=S.useMemo(()=>({reference:I,floating:M}),[I,M]),C=S.useMemo(()=>{const P={position:r,left:0,top:0};if(!y.floating)return P;const O=xw(y.floating,c.x),m=xw(y.floating,c.y);return a?{...P,transform:"translate("+O+"px, "+m+"px)",...iC(y.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:m}},[r,a,y.floating,c.x,c.y]);return S.useMemo(()=>({...c,update:G,refs:D,elements:y,floatingStyles:C}),[c,G,D,y,C])}const sC="Popper",[oC,Wl]=Or(sC),[GN,aC]=oC(sC),KN=t=>{const{__scopePopper:e,children:r}=t,[n,i]=S.useState(null);return S.createElement(GN,{scope:e,anchor:n,onAnchorChange:i},r)},JN="PopperAnchor",QN=S.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...i}=t,s=aC(JN,r),o=S.useRef(null),a=Nt(e,o);return S.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:S.createElement($e.div,ue({},i,{ref:a}))}),lC="PopperContent",[YN,vK]=oC(lC),XN=S.forwardRef((t,e)=>{var r,n,i,s,o,a,l,f;const{__scopePopper:c,side:u="bottom",sideOffset:h=0,align:v="center",alignOffset:x=0,arrowPadding:g=0,collisionBoundary:k=[],collisionPadding:w=0,sticky:A="partial",hideWhenDetached:E=!1,avoidCollisions:I=!0,onPlaced:M,...$}=t,j=aC(lC,c),[U,W]=S.useState(null),q=Nt(e,ie=>W(ie)),[G,re]=S.useState(null),D=mm(G),y=(r=D==null?void 0:D.width)!==null&&r!==void 0?r:0,C=(n=D==null?void 0:D.height)!==null&&n!==void 0?n:0,P=u+(v!=="center"?"-"+v:""),O=typeof w=="number"?w:{top:0,right:0,bottom:0,left:0,...w},m=Array.isArray(k)?k:[k],T=m.length>0,R={padding:O,boundary:m.filter(ZN),altBoundary:T},{refs:b,floatingStyles:d,placement:_,isPositioned:N,middlewareData:p}=qN({strategy:"fixed",placement:P,whileElementsMounted:VN,elements:{reference:j.anchor},middleware:[DN({mainAxis:h+C,alignmentAxis:x}),I&&LN({mainAxis:!0,crossAxis:!1,limiter:A==="partial"?$N():void 0,...R}),I&&ON({...R}),FN({...R,apply:({elements:ie,rects:ye,availableWidth:Qt,availableHeight:Me})=>{const{width:Se,height:St}=ye.reference,De=ie.floating.style;De.setProperty("--radix-popper-available-width",`${Qt}px`),De.setProperty("--radix-popper-available-height",`${Me}px`),De.setProperty("--radix-popper-anchor-width",`${Se}px`),De.setProperty("--radix-popper-anchor-height",`${St}px`)}}),G&&WN({element:G,padding:g}),eO({arrowWidth:y,arrowHeight:C}),E&&BN({strategy:"referenceHidden"})]}),[B,L]=fC(_),F=Bn(M);xn(()=>{N&&(F==null||F())},[N,F]);const H=(i=p.arrow)===null||i===void 0?void 0:i.x,Z=(s=p.arrow)===null||s===void 0?void 0:s.y,K=((o=p.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[X,ve]=S.useState();return xn(()=>{U&&ve(window.getComputedStyle(U).zIndex)},[U]),S.createElement("div",{ref:b.setFloating,"data-radix-popper-content-wrapper":"",style:{...d,transform:N?d.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,["--radix-popper-transform-origin"]:[(a=p.transformOrigin)===null||a===void 0?void 0:a.x,(l=p.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},S.createElement(YN,{scope:c,placedSide:B,onArrowChange:re,arrowX:H,arrowY:Z,shouldHideArrow:K},S.createElement($e.div,ue({"data-side":B,"data-align":L},$,{ref:q,style:{...$.style,animation:N?void 0:"none",opacity:(f=p.hide)!==null&&f!==void 0&&f.referenceHidden?0:void 0}}))))});function ZN(t){return t!==null}const eO=t=>({name:"transformOrigin",options:t,fn(e){var r,n,i,s,o;const{placement:a,rects:l,middlewareData:f}=e,u=((r=f.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,h=u?0:t.arrowWidth,v=u?0:t.arrowHeight,[x,g]=fC(a),k={start:"0%",center:"50%",end:"100%"}[g],w=((n=(i=f.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+h/2,A=((s=(o=f.arrow)===null||o===void 0?void 0:o.y)!==null&&s!==void 0?s:0)+v/2;let E="",I="";return x==="bottom"?(E=u?k:`${w}px`,I=`${-v}px`):x==="top"?(E=u?k:`${w}px`,I=`${l.floating.height+v}px`):x==="right"?(E=`${-v}px`,I=u?k:`${A}px`):x==="left"&&(E=`${l.floating.width+v}px`,I=u?k:`${A}px`),{data:{x:E,y:I}}}});function fC(t){const[e,r="center"]=t.split("-");return[e,r]}const tO=KN,rO=QN,nO=XN,iO=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?M_.createPortal(S.createElement($e.div,ue({},i,{ref:e})),n):null}),iv="rovingFocusGroup.onEntryFocus",sO={bubbles:!1,cancelable:!0},Sm="RovingFocusGroup",[Gy,cC,oO]=bh(Sm),[aO,ql]=Or(Sm,[oO]),[lO,fO]=aO(Sm),cO=S.forwardRef((t,e)=>S.createElement(Gy.Provider,{scope:t.__scopeRovingFocusGroup},S.createElement(Gy.Slot,{scope:t.__scopeRovingFocusGroup},S.createElement(uO,ue({},t,{ref:e}))))),uO=S.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:f,...c}=t,u=S.useRef(null),h=Nt(e,u),v=Cm(s),[x=null,g]=Sl({prop:o,defaultProp:a,onChange:l}),[k,w]=S.useState(!1),A=Bn(f),E=cC(r),I=S.useRef(!1),[M,$]=S.useState(0);return S.useEffect(()=>{const j=u.current;if(j)return j.addEventListener(iv,A),()=>j.removeEventListener(iv,A)},[A]),S.createElement(lO,{scope:r,orientation:n,dir:v,loop:i,currentTabStopId:x,onItemFocus:S.useCallback(j=>g(j),[g]),onItemShiftTab:S.useCallback(()=>w(!0),[]),onFocusableItemAdd:S.useCallback(()=>$(j=>j+1),[]),onFocusableItemRemove:S.useCallback(()=>$(j=>j-1),[])},S.createElement($e.div,ue({tabIndex:k||M===0?-1:0,"data-orientation":n},c,{ref:h,style:{outline:"none",...t.style},onMouseDown:Ce(t.onMouseDown,()=>{I.current=!0}),onFocus:Ce(t.onFocus,j=>{const U=!I.current;if(j.target===j.currentTarget&&U&&!k){const W=new CustomEvent(iv,sO);if(j.currentTarget.dispatchEvent(W),!W.defaultPrevented){const q=E().filter(C=>C.focusable),G=q.find(C=>C.active),re=q.find(C=>C.id===x),y=[G,re,...q].filter(Boolean).map(C=>C.ref.current);uC(y)}}I.current=!1}),onBlur:Ce(t.onBlur,()=>w(!1))})))}),dO="RovingFocusGroupItem",hO=S.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:s,...o}=t,a=Qc(),l=s||a,f=fO(dO,r),c=f.currentTabStopId===l,u=cC(r),{onFocusableItemAdd:h,onFocusableItemRemove:v}=f;return S.useEffect(()=>{if(n)return h(),()=>v()},[n,h,v]),S.createElement(Gy.ItemSlot,{scope:r,id:l,focusable:n,active:i},S.createElement($e.span,ue({tabIndex:c?0:-1,"data-orientation":f.orientation},o,{ref:e,onMouseDown:Ce(t.onMouseDown,x=>{n?f.onItemFocus(l):x.preventDefault()}),onFocus:Ce(t.onFocus,()=>f.onItemFocus(l)),onKeyDown:Ce(t.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const g=pO(x,f.orientation,f.dir);if(g!==void 0){x.preventDefault();let w=u().filter(A=>A.focusable).map(A=>A.ref.current);if(g==="last")w.reverse();else if(g==="prev"||g==="next"){g==="prev"&&w.reverse();const A=w.indexOf(x.currentTarget);w=f.loop?gO(w,A+1):w.slice(A+1)}setTimeout(()=>uC(w))}})})))}),vO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function yO(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function pO(t,e,r){const n=yO(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return vO[n]}function uC(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function gO(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const mO=cO,dC=hO;var xO=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Aa=new WeakMap,Mu=new WeakMap,Nu={},sv=0,hC=function(t){return t&&(t.host||hC(t.parentNode))},bO=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=hC(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return Boolean(r)})},wO=function(t,e,r,n){var i=bO(e,Array.isArray(t)?t:[t]);Nu[r]||(Nu[r]=new WeakMap);var s=Nu[r],o=[],a=new Set,l=new Set(i),f=function(u){!u||a.has(u)||(a.add(u),f(u.parentNode))};i.forEach(f);var c=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(h){if(a.has(h))c(h);else{var v=h.getAttribute(n),x=v!==null&&v!=="false",g=(Aa.get(h)||0)+1,k=(s.get(h)||0)+1;Aa.set(h,g),s.set(h,k),o.push(h),g===1&&x&&Mu.set(h,!0),k===1&&h.setAttribute(r,"true"),x||h.setAttribute(n,"true")}})};return c(e),a.clear(),sv++,function(){o.forEach(function(u){var h=Aa.get(u)-1,v=s.get(u)-1;Aa.set(u,h),s.set(u,v),h||(Mu.has(u)||u.removeAttribute(n),Mu.delete(u)),v||u.removeAttribute(r)}),sv--,sv||(Aa=new WeakMap,Aa=new WeakMap,Mu=new WeakMap,Nu={})}},CO=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),i=e||xO(t);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),wO(n,i,r,"aria-hidden")):function(){return null}},pi=function(){return pi=Object.assign||function(e){for(var r,n=1,i=arguments.length;n"u")return FO;var e=jO(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])}},zO=gC(),VO=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(EO,` { + */var K2;function ZR(){if(K2)return hf;K2=1;var t=Wt,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,f){var c,u={},h=null,v=null;f!==void 0&&(h=""+f),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(v=l.ref);for(c in l)n.call(l,c)&&!s.hasOwnProperty(c)&&(u[c]=l[c]);if(a&&a.defaultProps)for(c in l=a.defaultProps,l)u[c]===void 0&&(u[c]=l[c]);return{$$typeof:e,type:a,key:h,ref:v,props:u,_owner:i.current}}return hf.Fragment=r,hf.jsx=o,hf.jsxs=o,hf}R4.exports=ZR();var Q=R4.exports,M4={},N4={exports:{}},Z1,J2;function eM(){if(J2)return Z1;J2=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Z1=t,Z1}var ev,Q2;function tM(){if(Q2)return ev;Q2=1;var t=eM();function e(){}function r(){}return r.resetWarningCache=e,ev=function(){function n(o,a,l,f,c,u){if(u!==t){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}n.isRequired=n;function i(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:e};return s.PropTypes=s,s},ev}N4.exports=tM()();var rM=N4.exports;Object.defineProperty(M4,"__esModule",{value:!0});var Y2=Object.assign||function(t){for(var e=1;e>19^E^E>>8,(i[3]>>>0)/(1<<31>>>0)}function a(){var E=Math.floor(o()*360),I=o()*60+40+"%",M=(o()+o()+o()+o())*25+"%",$="hsl("+E+","+I+","+M+")";return $}function l(E){for(var I=E,M=E,$=Math.ceil(I/2),j=I-$,U=[],W=0;W{const{className:e,address:r,size:n="md",...i}=t;return Q.jsx(ge,{as:fM,className:Jr(uM,cM,e),display:"inline-block",seed:r.toUpperCase(),size:8,scale:dM[n],...i})});function hM(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 vM(t){var e=hM(t,"string");return typeof e=="symbol"?e:String(e)}function yM(t,e,r){return e=vM(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 Z2(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},Ot=t=>{var e=r=>{var n=t.defaultClassName,i=Z2(Z2({},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 f=t.variantClassNames[s][l];f&&(n+=" "+f)}}for(var[c,u]of t.compoundVariants)pM(c,i,t.defaultVariants)&&(n+=" "+u);return n};return e.variants=()=>Object.keys(t.variantClassNames),e};Ot({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"fyvr11ot",warning:"fyvr11oz",success:"fyvr11oh",error:"fyvr11on"},size:{sm:"fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr1wo fyvr1yk fyvr13w fyvr1e8",md:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ws fyvr1yo fyvr140 fyvr1ec",lg:"fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc fyvr1ww fyvr1ys fyvr144 fyvr1eg"}},defaultVariants:{},compoundVariants:[]});const ew=t=>{const{color:e="borderNormal",marginY:r="4",...n}=t;return Q.jsx(ge,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var gM=Ot({defaultClassName:"",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:"_1qxj1ibi"},underline:{true:"_1qxj1ibj"},uppercase:{true:"_1qxj1ibk"},capitalize:{true:"_1qxj1ibl"},hidden:{true:"_1qxj1ibm"}},defaultVariants:{},compoundVariants:[]});const sr=S.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:i,hidden:s,italic:o,underline:a,children:l,ellipsis:f,uppercase:c,capitalize:u,...h}=t,v=WR[n];return Q.jsx(ge,{as:r,className:Jr(i,gM({hidden:s,ellipsis:f,italic:o,underline:a,uppercase:c,capitalize:u})),ref:e,...v,...h,children:l})});var mM=Ot({defaultClassName:"fyvr11ls fyvr11m8 fyvr11n7 fyvr11ko fyvr11h0",variantClassNames:{variant:{base:"_140wn8ne",feature:"_140wn8nf fyvr11ph fyvr12nb",primary:"fyvr11pb fyvr12nb",glass:"fyvr11rb fyvr12rh",emphasis:"fyvr11rh fyvr12rh",text:"_140wn8nj fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11ob fyvr12r5"},shape:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"fyvr12tt fyvr12uh",false:"fyvr12tz fyvr12ut fyvr12ur"},size:{xs:"_140wn8no fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr1ws fyvr1yo",sm:"_140wn8np fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys",md:"_140wn8nq fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw",lg:"_140wn8nr fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw"},iconOnly:{true:"_140wn8ns"},hasLeftIcon:{true:"_140wn8nt"},hasRightIcon:{true:"_140wn8nu"},activeOutline:{light:"_140wn8nv",bold:"_140wn8nw"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8nx"],[{iconOnly:!0,size:"sm"},"_140wn8ny"],[{iconOnly:!0,size:"md"},"_140wn8nz"],[{iconOnly:!0,size:"lg"},"_140wn8n10"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n11"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n12"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n13"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n14"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n15"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n16"]]});const Ve=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:f,leftIcon:c,rightIcon:u,size:h="md",variant:v="glass",width:x="fit",shape:g="circle",type:k="button",...w}=t,A=c!==void 0&&f!==void 0,E=u!==void 0&&f!==void 0,I=c!==void 0&&f===void 0,M=h==="xs"?"xs":"sm";return Q.jsx(ge,{as:r,className:Jr(i,mM({activeOutline:n,disabled:s||l,hasLeftIcon:A,hasRightIcon:E,iconOnly:I,size:v==="text"?void 0:h,shape:v==="text"?void 0:g,variant:v})),disabled:s||l,display:o,fontWeight:a,ref:e,type:k,width:x,...w,children:I?Q.jsx(c,{size:M}):Q.jsxs(ge,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:h==="xs"?"1":"2",children:[Q.jsxs(ge,{justifyContent:"flex-start",alignItems:"center",gap:h==="xs"?"1":"2",children:[c&&Q.jsx(c,{size:M}),Q.jsx(sr,{children:f})]}),u&&Q.jsx(u,{size:M})]})})});var xM=Ot({defaultClassName:"",variantClassNames:{clickable:{true:"fyvr12ur fyvr12tz"},disabled:{true:"rhmai64"},outlined:{true:"fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12j5 fyvr12bz fyvr11xn fyvr124t fyvr12mn fyvr12fh fyvr1215 fyvr128b"},blur:{true:"fyvr11ms"}},defaultVariants:{},compoundVariants:[]});const bM=S.forwardRef((t,e)=>{const{className:r,children:n,clickable:i,outlined:s,disabled:o,blur:a,width:l="full",...f}=t;return Q.jsx(ge,{className:Jr(r,xM({clickable:i,outlined:s,disabled:o,blur:a})),background:s?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:l,ref:e,...f,children:n})});function ue(){return ue=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>wM(r,e))}function Nt(...t){return S.useCallback(B4(...t),t)}function Or(t,e=[]){let r=[];function n(s,o){const a=S.createContext(o),l=r.length;r=[...r,o];function f(u){const{scope:h,children:v,...x}=u,g=(h==null?void 0:h[t][l])||a,k=S.useMemo(()=>x,Object.values(x));return S.createElement(g.Provider,{value:k},v)}function c(u,h){const v=(h==null?void 0:h[t][l])||a,x=S.useContext(v);if(x)return x;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${s}\``)}return f.displayName=s+"Provider",[f,c]}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,CM(i,...e)]}function CM(...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:f})=>{const u=l(s)[`__scope${f}`];return{...a,...u}},{});return S.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function Ce(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 Dn(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 kl({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,i]=AM({defaultProp:e,onChange:r}),s=t!==void 0,o=s?t:n,a=Dn(r),l=S.useCallback(f=>{if(s){const u=typeof f=="function"?f(t):f;u!==t&&a(u)}else i(f)},[s,t,i,a]);return[o,l]}function AM({defaultProp:t,onChange:e}){const r=S.useState(t),[n]=r,i=S.useRef(n),s=Dn(e);return S.useEffect(()=>{i.current!==n&&(s(n),i.current=n)},[n,i,s]),r}function gm(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 xn=Boolean(globalThis==null?void 0:globalThis.document)?S.useLayoutEffect:()=>{};function mm(t){const[e,r]=S.useState(void 0);return xn(()=>{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,f=Array.isArray(l)?l[0]:l;o=f.inlineSize,a=f.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 EM(t,e){return S.useReducer((r,n)=>{const i=e[r][n];return i??r},t)}const Qc=t=>{const{present:e,children:r}=t,n=SM(e),i=typeof r=="function"?r({present:n.isPresent}):S.Children.only(r),s=Nt(n.ref,i.ref);return typeof r=="function"||n.isPresent?S.cloneElement(i,{ref:s}):null};Qc.displayName="Presence";function SM(t){const[e,r]=S.useState(),n=S.useRef({}),i=S.useRef(t),s=S.useRef("none"),o=t?"mounted":"unmounted",[a,l]=EM(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const f=Mu(n.current);s.current=a==="mounted"?f:"none"},[a]),xn(()=>{const f=n.current,c=i.current;if(c!==t){const h=s.current,v=Mu(f);t?l("MOUNT"):v==="none"||(f==null?void 0:f.display)==="none"?l("UNMOUNT"):l(c&&h!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),xn(()=>{if(e){const f=u=>{const v=Mu(n.current).includes(u.animationName);u.target===e&&v&&Ti.flushSync(()=>l("ANIMATION_END"))},c=u=>{u.target===e&&(s.current=Mu(n.current))};return e.addEventListener("animationstart",c),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{e.removeEventListener("animationstart",c),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:S.useCallback(f=>{f&&(n.current=getComputedStyle(f)),r(f)},[])}}function Mu(t){return(t==null?void 0:t.animationName)||"none"}const Tc=S.forwardRef((t,e)=>{const{children:r,...n}=t,i=S.Children.toArray(r),s=i.find(_M);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(Vy,ue({},n,{ref:e}),S.isValidElement(o)?S.cloneElement(o,void 0,a):null)}return S.createElement(Vy,ue({},n,{ref:e}),r)});Tc.displayName="Slot";const Vy=S.forwardRef((t,e)=>{const{children:r,...n}=t;return S.isValidElement(r)?S.cloneElement(r,{...TM(n,r.props),ref:e?B4(e,r.ref):r.ref}):S.Children.count(r)>1?S.Children.only(null):null});Vy.displayName="SlotClone";const kM=({children:t})=>S.createElement(S.Fragment,null,t);function _M(t){return S.isValidElement(t)&&t.type===kM}function TM(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 PM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],$e=PM.reduce((t,e)=>{const r=S.forwardRef((n,i)=>{const{asChild:s,...o}=n,a=s?Tc:e;return S.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),S.createElement(a,ue({},o,{ref:i}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function xm(t,e){t&&Ti.flushSync(()=>t.dispatchEvent(e))}const L4="Checkbox",[IM,yK]=Or(L4),[RM,MM]=IM(L4),NM=S.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:l="on",onCheckedChange:f,...c}=t,[u,h]=S.useState(null),v=Nt(e,E=>h(E)),x=S.useRef(!1),g=u?Boolean(u.closest("form")):!0,[k=!1,w]=kl({prop:i,defaultProp:s,onChange:f}),A=S.useRef(k);return S.useEffect(()=>{const E=u==null?void 0:u.form;if(E){const I=()=>w(A.current);return E.addEventListener("reset",I),()=>E.removeEventListener("reset",I)}},[u,w]),S.createElement(RM,{scope:r,state:k,disabled:a},S.createElement($e.button,ue({type:"button",role:"checkbox","aria-checked":Ho(k)?"mixed":k,"aria-required":o,"data-state":$4(k),"data-disabled":a?"":void 0,disabled:a,value:l},c,{ref:v,onKeyDown:Ce(t.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Ce(t.onClick,E=>{w(I=>Ho(I)?!0:!I),g&&(x.current=E.isPropagationStopped(),x.current||E.stopPropagation())})})),g&&S.createElement(BM,{control:u,bubbles:!x.current,name:n,value:l,checked:k,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),OM="CheckboxIndicator",DM=S.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...i}=t,s=MM(OM,r);return S.createElement(Qc,{present:n||Ho(s.state)||s.state===!0},S.createElement($e.span,ue({"data-state":$4(s.state),"data-disabled":s.disabled?"":void 0},i,{ref:e,style:{pointerEvents:"none",...t.style}})))}),BM=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=S.useRef(null),o=gm(r),a=mm(e);return S.useEffect(()=>{const l=s.current,f=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(f,"checked").set;if(o!==r&&u){const h=new Event("click",{bubbles:n});l.indeterminate=Ho(r),u.call(l,Ho(r)?!1:r),l.dispatchEvent(h)}},[o,r,n]),S.createElement("input",ue({type:"checkbox","aria-hidden":!0,defaultChecked:Ho(r)?!1:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Ho(t){return t==="indeterminate"}function $4(t){return Ho(t)?"indeterminate":t?"checked":"unchecked"}const LM=NM,$M=DM;var FM=Ot({defaultClassName:"",variantClassNames:{labelLocation:{top:"fyvr11kw fyvr11i4 fyvr118k fyvr11h0",left:"_43lu9r5 fyvr11ko fyvr11ic fyvr118k fyvr11h0",right:"_43lu9r6 fyvr11ko fyvr11ic fyvr118k fyvr11h0",hidden:"fyvr1188 fyvr11h0"}},defaultVariants:{},compoundVariants:[]});const Vl=t=>{const{id:e,label:r,description:n,labelLocation:i="top",children:s,...o}=t,a=()=>r||n?Q.jsxs(ge,{flexDirection:"column",gap:"0.5",children:[r&&Q.jsx(sr,{variant:"small",color:"text100",hidden:i==="hidden",children:r}),n&&Q.jsx(sr,{variant:"small",color:"text50",hidden:i==="hidden",children:n})]}):null;return Q.jsxs(ge,{as:"label",className:FM({labelLocation:i}),htmlFor:e,...o,children:[["left","top","hidden"].includes(i)&&a(),s,i==="right"&&a()]})};var Hl=Ot({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const jM=t=>Q.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:Q.jsx("path",{d:"m4.304 10.232 4.263 4.79 7.13-11.238",stroke:"currentColor",strokeWidth:1.5})}),F4=({size:t="sm",...e})=>Q.jsx(ge,{as:jM,className:Hl({size:t}),...e}),UM=t=>Q.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:Q.jsx("path",{fillRule:"evenodd",clipRule:"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",fill:"currentColor"})}),j4=({size:t="sm",...e})=>Q.jsx(ge,{as:UM,className:Hl({size:t}),...e}),zM=t=>Q.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:Q.jsx("path",{fillRule:"evenodd",clipRule:"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",fill:"currentColor"})}),U4=({size:t="sm",...e})=>Q.jsx(ge,{as:zM,className:Hl({size:t}),...e}),VM=t=>Q.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:Q.jsx("path",{fillRule:"evenodd",clipRule:"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",fill:"currentColor"})}),HM=({size:t="sm",...e})=>Q.jsx(ge,{as:VM,className:Hl({size:t}),...e}),WM=t=>Q.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:Q.jsx("path",{fillRule:"evenodd",clipRule:"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",fill:"currentColor"})}),qM=({size:t="sm",...e})=>Q.jsx(ge,{as:WM,className:Hl({size:t}),...e}),GM=t=>Q.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:Q.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.28 2.856-6.71 8.887h4.134l-1.424 6.2 6.887-8.71h-4.322l1.435-6.377Z",fill:"currentColor"})}),KM=({size:t="sm",...e})=>Q.jsx(ge,{as:GM,className:Hl({size:t}),...e});var JM=Ot({defaultClassName:"fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12jb fyvr12c5 fyvr11xt fyvr124z fyvr12mn fyvr12fh fyvr1215 fyvr128b fyvr11h0 fyvr11ko fyvr11jg fyvr12ut fyvr12ur fyvr12uj fyvr12tz fyvr12tv",variantClassNames:{size:{sm:"_1c9x66f1",lg:"_1c9x66f2"}},defaultVariants:{},compoundVariants:[]}),QM=Ot({defaultClassName:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12rh fyvr11rt",variantClassNames:{size:{sm:"_1c9x66f4",lg:"_1c9x66f5"}},defaultVariants:{},compoundVariants:[]});const YM=({size:t="sm"})=>Q.jsx($M,{className:QM({size:t}),children:Q.jsx(F4,{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 Q.jsx(Vl,{disabled:r,display:"flex",id:n??i,label:s,labelLocation:o,whiteSpace:"nowrap",children:Q.jsx(LM,{className:JM({size:a}),disabled:r,id:n??i,name:i,ref:e,...l,children:Q.jsx(YM,{})})})});Wt.createContext(null);const XM=CS["useId".toString()]||(()=>{});let ZM=0;function Yc(t){const[e,r]=S.useState(XM());return xn(()=>{t||r(n=>n??String(ZM++))},[t]),t||(e?`radix-${e}`:"")}const z4="Collapsible",[eN,pK]=Or(z4),[tN,bm]=eN(z4),rN=S.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:s,onOpenChange:o,...a}=t,[l=!1,f]=kl({prop:n,defaultProp:i,onChange:o});return S.createElement(tN,{scope:r,disabled:s,contentId:Yc(),open:l,onOpenToggle:S.useCallback(()=>f(c=>!c),[f])},S.createElement($e.div,ue({"data-state":wm(l),"data-disabled":s?"":void 0},a,{ref:e})))}),nN="CollapsibleTrigger",iN=S.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,i=bm(nN,r);return S.createElement($e.button,ue({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":wm(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},n,{ref:e,onClick:Ce(t.onClick,i.onOpenToggle)}))}),V4="CollapsibleContent",sN=S.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=bm(V4,t.__scopeCollapsible);return S.createElement(Qc,{present:r||i.open},({present:s})=>S.createElement(oN,ue({},n,{ref:e,present:s})))}),oN=S.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:i,...s}=t,o=bm(V4,r),[a,l]=S.useState(n),f=S.useRef(null),c=Nt(e,f),u=S.useRef(0),h=u.current,v=S.useRef(0),x=v.current,g=o.open||a,k=S.useRef(g),w=S.useRef();return S.useEffect(()=>{const A=requestAnimationFrame(()=>k.current=!1);return()=>cancelAnimationFrame(A)},[]),xn(()=>{const A=f.current;if(A){w.current=w.current||{transitionDuration:A.style.transitionDuration,animationName:A.style.animationName},A.style.transitionDuration="0s",A.style.animationName="none";const E=A.getBoundingClientRect();u.current=E.height,v.current=E.width,k.current||(A.style.transitionDuration=w.current.transitionDuration,A.style.animationName=w.current.animationName),l(n)}},[o.open,n]),S.createElement($e.div,ue({"data-state":wm(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!g},s,{ref:c,style:{["--radix-collapsible-content-height"]:h?`${h}px`:void 0,["--radix-collapsible-content-width"]:x?`${x}px`:void 0,...t.style}}),g&&i)});function wm(t){return t?"open":"closed"}const aN=rN,lN=iN,fN=sN;var tw="64px",cN="_4j62fl4 fyvr1ww fyvr1ys fyvr1so fyvr1v0 fyvr128",uN="_4j62fl5",dN="_4j62fl0",hN="_4j62fl2 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11h0 fyvr11ko fyvr11ob fyvr128 fyvr12tz fyvr11n2";const vN=t=>{const{className:e,children:r,defaultOpen:n,onOpenChange:i,label:s,...o}=t,[a,l]=S.useState(n),f=c=>{l(c),i==null||i(c)};return Q.jsx(aN,{defaultOpen:n,onOpenChange:f,asChild:!0,children:Q.jsxs(ge,{as:fd.div,className:Jr(e,dN),initial:{height:n?"auto":tw},animate:{height:a?"auto":tw},transition:{ease:"easeOut",duration:.3},borderRadius:"md",background:"backgroundSecondary",position:"relative",overflow:"hidden",width:"full",...o,children:[Q.jsxs(lN,{className:hN,children:[Q.jsx(sr,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:s}),Q.jsx(ge,{as:fd.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(j4,{className:uN,color:"text50"})})]}),Q.jsx(HR,{children:a&&Q.jsx(fN,{className:cN,asChild:!0,forceMount:!0,children:Q.jsx(fd.div,{initial:{opacity:n?1:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"easeOut",duration:.3},children:r})})})]})})};function wh(t){const e=t+"CollectionProvider",[r,n]=Or(e),[i,s]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=v=>{const{scope:x,children:g}=v,k=Wt.useRef(null),w=Wt.useRef(new Map).current;return Wt.createElement(i,{scope:x,itemMap:w,collectionRef:k},g)},a=t+"CollectionSlot",l=Wt.forwardRef((v,x)=>{const{scope:g,children:k}=v,w=s(a,g),A=Nt(x,w.collectionRef);return Wt.createElement(Tc,{ref:A},k)}),f=t+"CollectionItemSlot",c="data-radix-collection-item",u=Wt.forwardRef((v,x)=>{const{scope:g,children:k,...w}=v,A=Wt.useRef(null),E=Nt(x,A),I=s(f,g);return Wt.useEffect(()=>(I.itemMap.set(A,{ref:A,...w}),()=>void I.itemMap.delete(A))),Wt.createElement(Tc,{[c]:"",ref:E},k)});function h(v){const x=s(t+"CollectionConsumer",v);return Wt.useCallback(()=>{const k=x.collectionRef.current;if(!k)return[];const w=Array.from(k.querySelectorAll(`[${c}]`));return Array.from(x.itemMap.values()).sort((I,M)=>w.indexOf(I.ref.current)-w.indexOf(M.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:l,ItemSlot:u},h,n]}const yN=S.createContext(void 0);function Cm(t){const e=S.useContext(yN);return t||e||"ltr"}function pN(t,e=globalThis==null?void 0:globalThis.document){const r=Dn(t);S.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const Hy="dismissableLayer.update",gN="dismissableLayer.pointerDownOutside",mN="dismissableLayer.focusOutside";let rw;const xN=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),H4=S.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...f}=t,c=S.useContext(xN),[u,h]=S.useState(null),v=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,x]=S.useState({}),g=Nt(e,U=>h(U)),k=Array.from(c.layers),[w]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),A=k.indexOf(w),E=u?k.indexOf(u):-1,I=c.layersWithOutsidePointerEventsDisabled.size>0,M=E>=A,$=bN(U=>{const W=U.target,q=[...c.branches].some(G=>G.contains(W));!M||q||(s==null||s(U),a==null||a(U),U.defaultPrevented||l==null||l())},v),j=wN(U=>{const W=U.target;[...c.branches].some(G=>G.contains(W))||(o==null||o(U),a==null||a(U),U.defaultPrevented||l==null||l())},v);return pN(U=>{E===c.layers.size-1&&(i==null||i(U),!U.defaultPrevented&&l&&(U.preventDefault(),l()))},v),S.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(rw=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),nw(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=rw)}},[u,v,n,c]),S.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),nw())},[u,c]),S.useEffect(()=>{const U=()=>x({});return document.addEventListener(Hy,U),()=>document.removeEventListener(Hy,U)},[]),S.createElement($e.div,ue({},f,{ref:g,style:{pointerEvents:I?M?"auto":"none":void 0,...t.style},onFocusCapture:Ce(t.onFocusCapture,j.onFocusCapture),onBlurCapture:Ce(t.onBlurCapture,j.onBlurCapture),onPointerDownCapture:Ce(t.onPointerDownCapture,$.onPointerDownCapture)}))});function bN(t,e=globalThis==null?void 0:globalThis.document){const r=Dn(t),n=S.useRef(!1),i=S.useRef(()=>{});return S.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let l=function(){W4(gN,r,f,{discrete:!0})};const f={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}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 wN(t,e=globalThis==null?void 0:globalThis.document){const r=Dn(t),n=S.useRef(!1);return S.useEffect(()=>{const i=s=>{s.target&&!n.current&&W4(mN,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 nw(){const t=new CustomEvent(Hy);document.dispatchEvent(t)}function W4(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?xm(i,s):i.dispatchEvent(s)}const CN=H4;let tv=0;function AN(){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:iw()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:iw()),tv++,()=>{tv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),tv--}},[])}function iw(){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 rv="focusScope.autoFocusOnMount",nv="focusScope.autoFocusOnUnmount",sw={bubbles:!1,cancelable:!0},EN=S.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,l]=S.useState(null),f=Dn(i),c=Dn(s),u=S.useRef(null),h=Nt(e,g=>l(g)),v=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(n){let g=function(E){if(v.paused||!a)return;const I=E.target;a.contains(I)?u.current=I:Ss(u.current,{select:!0})},k=function(E){if(v.paused||!a)return;const I=E.relatedTarget;I!==null&&(a.contains(I)||Ss(u.current,{select:!0}))},w=function(E){const I=document.activeElement;for(const M of E)M.removedNodes.length>0&&(a!=null&&a.contains(I)||Ss(a))};document.addEventListener("focusin",g),document.addEventListener("focusout",k);const A=new MutationObserver(w);return a&&A.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",k),A.disconnect()}}},[n,a,v.paused]),S.useEffect(()=>{if(a){aw.add(v);const g=document.activeElement;if(!a.contains(g)){const w=new CustomEvent(rv,sw);a.addEventListener(rv,f),a.dispatchEvent(w),w.defaultPrevented||(SN(IN(q4(a)),{select:!0}),document.activeElement===g&&Ss(a))}return()=>{a.removeEventListener(rv,f),setTimeout(()=>{const w=new CustomEvent(nv,sw);a.addEventListener(nv,c),a.dispatchEvent(w),w.defaultPrevented||Ss(g??document.body,{select:!0}),a.removeEventListener(nv,c),aw.remove(v)},0)}}},[a,f,c,v]);const x=S.useCallback(g=>{if(!r&&!n||v.paused)return;const k=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,w=document.activeElement;if(k&&w){const A=g.currentTarget,[E,I]=kN(A);E&&I?!g.shiftKey&&w===I?(g.preventDefault(),r&&Ss(E,{select:!0})):g.shiftKey&&w===E&&(g.preventDefault(),r&&Ss(I,{select:!0})):w===A&&g.preventDefault()}},[r,n,v.paused]);return S.createElement($e.div,ue({tabIndex:-1},o,{ref:h,onKeyDown:x}))});function SN(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Ss(n,{select:e}),document.activeElement!==r)return}function kN(t){const e=q4(t),r=ow(e,t),n=ow(e.reverse(),t);return[r,n]}function q4(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 ow(t,e){for(const r of t)if(!_N(r,{upTo:e}))return r}function _N(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 TN(t){return t instanceof HTMLInputElement&&"select"in t}function Ss(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&TN(t)&&e&&t.select()}}const aw=PN();function PN(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=lw(t,e),t.unshift(e)},remove(e){var r;t=lw(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function lw(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function IN(t){return t.filter(e=>e.tagName!=="A")}function Wl(t){return t.split("-")[1]}function Am(t){return t==="y"?"height":"width"}function Xi(t){return t.split("-")[0]}function ha(t){return["top","bottom"].includes(Xi(t))?"x":"y"}function fw(t,e,r){let{reference:n,floating:i}=t;const s=n.x+n.width/2-i.width/2,o=n.y+n.height/2-i.height/2,a=ha(e),l=Am(a),f=n[l]/2-i[l]/2,c=a==="x";let u;switch(Xi(e)){case"top":u={x:s,y:n.y-i.height};break;case"bottom":u={x:s,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:o};break;case"left":u={x:n.x-i.width,y:o};break;default:u={x:n.x,y:n.y}}switch(Wl(e)){case"start":u[a]-=f*(r&&c?-1:1);break;case"end":u[a]+=f*(r&&c?-1:1)}return u}const RN=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 f=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:u}=fw(f,n,l),h=n,v={},x=0;for(let g=0;g({name:"arrow",options:t,async fn(e){const{element:r,padding:n=0}=t||{},{x:i,y:s,placement:o,rects:a,platform:l,elements:f}=e;if(r==null)return{};const c=G4(n),u={x:i,y:s},h=ha(o),v=Am(h),x=await l.getDimensions(r),g=h==="y",k=g?"top":"left",w=g?"bottom":"right",A=g?"clientHeight":"clientWidth",E=a.reference[v]+a.reference[h]-u[h]-a.floating[v],I=u[h]-a.reference[h],M=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let $=M?M[A]:0;$&&await(l.isElement==null?void 0:l.isElement(M))||($=f.floating[A]||a.floating[v]);const j=E/2-I/2,U=c[k],W=$-x[v]-c[w],q=$/2-x[v]/2+j,G=qy(U,q,W),re=Wl(o)!=null&&q!=G&&a.reference[v]/2-(qt.concat(e,e+"-start",e+"-end"),[]);const MN={left:"right",right:"left",bottom:"top",top:"bottom"};function p0(t){return t.replace(/left|right|bottom|top/g,e=>MN[e])}function NN(t,e,r){r===void 0&&(r=!1);const n=Wl(t),i=ha(t),s=Am(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=p0(o)),{main:o,cross:p0(o)}}const ON={start:"end",end:"start"};function iv(t){return t.replace(/start|end/g,e=>ON[e])}const DN=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r;const{placement:n,middlewareData:i,rects:s,initialPlacement:o,platform:a,elements:l}=e,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:u,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:x=!0,...g}=t,k=Xi(n),w=Xi(o)===o,A=await(a.isRTL==null?void 0:a.isRTL(l.floating)),E=u||(w||!x?[p0(o)]:function(G){const re=p0(G);return[iv(G),re,iv(re)]}(o));u||v==="none"||E.push(...function(G,re,B,y){const C=Wl(G);let P=function(O,m,T){const R=["left","right"],b=["right","left"],d=["top","bottom"],_=["bottom","top"];switch(O){case"top":case"bottom":return T?m?b:R:m?R:b;case"left":case"right":return m?d:_;default:return[]}}(Xi(G),B==="start",y);return C&&(P=P.map(O=>O+"-"+C),re&&(P=P.concat(P.map(iv)))),P}(o,x,v,A));const I=[o,...E],M=await Pc(e,g),$=[];let j=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&$.push(M[k]),c){const{main:G,cross:re}=NN(n,s,A);$.push(M[G],M[re])}if(j=[...j,{placement:n,overflows:$}],!$.every(G=>G<=0)){var U,W;const G=(((U=i.flip)==null?void 0:U.index)||0)+1,re=I[G];if(re)return{data:{index:G,overflows:j},reset:{placement:re}};let B=(W=j.filter(y=>y.overflows[0]<=0).sort((y,C)=>y.overflows[1]-C.overflows[1])[0])==null?void 0:W.placement;if(!B)switch(h){case"bestFit":{var q;const y=(q=j.map(C=>[C.placement,C.overflows.filter(P=>P>0).reduce((P,O)=>P+O,0)]).sort((C,P)=>C[1]-P[1])[0])==null?void 0:q[0];y&&(B=y);break}case"initialPlacement":B=o}if(n!==B)return{reset:{placement:B}}}return{}}}};function uw(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function dw(t){return K4.some(e=>t[e]>=0)}const BN=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{strategy:r="referenceHidden",...n}=t,{rects:i}=e;switch(r){case"referenceHidden":{const s=uw(await Pc(e,{...n,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:dw(s)}}}case"escaped":{const s=uw(await Pc(e,{...n,altBoundary:!0}),i.floating);return{data:{escapedOffsets:s,escaped:dw(s)}}}default:return{}}}}},LN=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,i=await async function(s,o){const{placement:a,platform:l,elements:f}=s,c=await(l.isRTL==null?void 0:l.isRTL(f.floating)),u=Xi(a),h=Wl(a),v=ha(a)==="x",x=["left","top"].includes(u)?-1:1,g=c&&v?-1:1,k=typeof o=="function"?o(s):o;let{mainAxis:w,crossAxis:A,alignmentAxis:E}=typeof k=="number"?{mainAxis:k,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...k};return h&&typeof E=="number"&&(A=h==="end"?-1*E:E),v?{x:A*g,y:w*x}:{x:w*x,y:A*g}}(e,t);return{x:r+i.x,y:n+i.y,data:i}}}};function J4(t){return t==="x"?"y":"x"}const $N=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:A}=k;return{x:w,y:A}}},...l}=t,f={x:r,y:n},c=await Pc(e,l),u=ha(Xi(i)),h=J4(u);let v=f[u],x=f[h];if(s){const k=u==="y"?"bottom":"right";v=qy(v+c[u==="y"?"top":"left"],v,v-c[k])}if(o){const k=h==="y"?"bottom":"right";x=qy(x+c[h==="y"?"top":"left"],x,x-c[k])}const g=a.fn({...e,[u]:v,[h]:x});return{...g,data:{x:g.x-r,y:g.y-n}}}}},FN=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:f=!0}=t,c={x:r,y:n},u=ha(i),h=J4(u);let v=c[u],x=c[h];const g=typeof a=="function"?a(e):a,k=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const E=u==="y"?"height":"width",I=s.reference[u]-s.floating[E]+k.mainAxis,M=s.reference[u]+s.reference[E]-k.mainAxis;vM&&(v=M)}if(f){var w,A;const E=u==="y"?"width":"height",I=["top","left"].includes(Xi(i)),M=s.reference[h]-s.floating[E]+(I&&((w=o.offset)==null?void 0:w[h])||0)+(I?0:k.crossAxis),$=s.reference[h]+s.reference[E]+(I?0:((A=o.offset)==null?void 0:A[h])||0)-(I?k.crossAxis:0);x$&&(x=$)}return{[u]:v,[h]:x}}}},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}=t,l=await Pc(e,a),f=Xi(r),c=Wl(r),u=ha(r)==="x",{width:h,height:v}=n.floating;let x,g;f==="top"||f==="bottom"?(x=f,g=c===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(g=f,x=c==="end"?"top":"bottom");const k=v-l[x],w=h-l[g],A=!e.middlewareData.shift;let E=k,I=w;if(u){const $=h-l.left-l.right;I=c||A?Wy(w,$):$}else{const $=v-l.top-l.bottom;E=c||A?Wy(k,$):$}if(A&&!c){const $=Po(l.left,0),j=Po(l.right,0),U=Po(l.top,0),W=Po(l.bottom,0);u?I=h-2*($!==0||j!==0?$+j:Po(l.left,l.right)):E=v-2*(U!==0||W!==0?U+W:Po(l.top,l.bottom))}await o({...e,availableWidth:I,availableHeight:E});const M=await i.getDimensions(s.floating);return h!==M.width||v!==M.height?{reset:{rects:!0}}:{}}}};function Rn(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ii(t){return Rn(t).getComputedStyle(t)}function Q4(t){return t instanceof Rn(t).Node}function eo(t){return Q4(t)?(t.nodeName||"").toLowerCase():""}function oi(t){return t instanceof Rn(t).HTMLElement}function yn(t){return t instanceof Rn(t).Element}function hw(t){return typeof ShadowRoot>"u"?!1:t instanceof Rn(t).ShadowRoot||t instanceof ShadowRoot}function Ic(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=ii(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function UN(t){return["table","td","th"].includes(eo(t))}function Gy(t){const e=Em(),r=ii(t);return r.transform!=="none"||r.perspective!=="none"||!e&&!!r.backdropFilter&&r.backdropFilter!=="none"||!e&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Em(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ch(t){return["html","body","#document"].includes(eo(t))}const vw=Math.min,zf=Math.max,g0=Math.round;function Y4(t){const e=ii(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=oi(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=g0(r)!==s||g0(n)!==o;return a&&(r=s,n=o),{width:r,height:n,fallback:a}}function X4(t){return yn(t)?t:t.contextElement}const Z4={x:1,y:1};function fl(t){const e=X4(t);if(!oi(e))return Z4;const r=e.getBoundingClientRect(),{width:n,height:i,fallback:s}=Y4(e);let o=(s?g0(r.width):r.width)/n,a=(s?g0(r.height):r.height)/i;return o&&Number.isFinite(o)||(o=1),a&&Number.isFinite(a)||(a=1),{x:o,y:a}}const yw={x:0,y:0};function eC(t,e,r){var n,i;if(e===void 0&&(e=!0),!Em())return yw;const s=t?Rn(t):window;return!r||e&&r!==s?yw:{x:((n=s.visualViewport)==null?void 0:n.offsetLeft)||0,y:((i=s.visualViewport)==null?void 0:i.offsetTop)||0}}function ea(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=X4(t);let o=Z4;e&&(n?yn(n)&&(o=fl(n)):o=fl(t));const a=eC(s,r,n);let l=(i.left+a.x)/o.x,f=(i.top+a.y)/o.y,c=i.width/o.x,u=i.height/o.y;if(s){const h=Rn(s),v=n&&yn(n)?Rn(n):n;let x=h.frameElement;for(;x&&n&&v!==h;){const g=fl(x),k=x.getBoundingClientRect(),w=getComputedStyle(x);k.x+=(x.clientLeft+parseFloat(w.paddingLeft))*g.x,k.y+=(x.clientTop+parseFloat(w.paddingTop))*g.y,l*=g.x,f*=g.y,c*=g.x,u*=g.y,l+=k.x,f+=k.y,x=Rn(x).frameElement}}return y0({width:c,height:u,x:l,y:f})}function Ws(t){return((Q4(t)?t.ownerDocument:t.document)||window.document).documentElement}function Ah(t){return yn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function tC(t){return ea(Ws(t)).left+Ah(t).scrollLeft}function _l(t){if(eo(t)==="html")return t;const e=t.assignedSlot||t.parentNode||hw(t)&&t.host||Ws(t);return hw(e)?e.host:e}function rC(t){const e=_l(t);return Ch(e)?e.ownerDocument.body:oi(e)&&Ic(e)?e:rC(e)}function Vf(t,e){var r;e===void 0&&(e=[]);const n=rC(t),i=n===((r=t.ownerDocument)==null?void 0:r.body),s=Rn(n);return i?e.concat(s,s.visualViewport||[],Ic(n)?n:[]):e.concat(n,Vf(n))}function pw(t,e,r){let n;if(e==="viewport")n=function(i,s){const o=Rn(i),a=Ws(i),l=o.visualViewport;let f=a.clientWidth,c=a.clientHeight,u=0,h=0;if(l){f=l.width,c=l.height;const v=Em();(!v||v&&s==="fixed")&&(u=l.offsetLeft,h=l.offsetTop)}return{width:f,height:c,x:u,y:h}}(t,r);else if(e==="document")n=function(i){const s=Ws(i),o=Ah(i),a=i.ownerDocument.body,l=zf(s.scrollWidth,s.clientWidth,a.scrollWidth,a.clientWidth),f=zf(s.scrollHeight,s.clientHeight,a.scrollHeight,a.clientHeight);let c=-o.scrollLeft+tC(i);const u=-o.scrollTop;return ii(a).direction==="rtl"&&(c+=zf(s.clientWidth,a.clientWidth)-l),{width:l,height:f,x:c,y:u}}(Ws(t));else if(yn(e))n=function(i,s){const o=ea(i,!0,s==="fixed"),a=o.top+i.clientTop,l=o.left+i.clientLeft,f=oi(i)?fl(i):{x:1,y:1};return{width:i.clientWidth*f.x,height:i.clientHeight*f.y,x:l*f.x,y:a*f.y}}(e,r);else{const i=eC(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return y0(n)}function nC(t,e){const r=_l(t);return!(r===e||!yn(r)||Ch(r))&&(ii(r).position==="fixed"||nC(r,e))}function gw(t,e){return oi(t)&&ii(t).position!=="fixed"?e?e(t):t.offsetParent:null}function mw(t,e){const r=Rn(t);if(!oi(t))return r;let n=gw(t,e);for(;n&&UN(n)&&ii(n).position==="static";)n=gw(n,e);return n&&(eo(n)==="html"||eo(n)==="body"&&ii(n).position==="static"&&!Gy(n))?r:n||function(i){let s=_l(i);for(;oi(s)&&!Ch(s);){if(Gy(s))return s;s=_l(s)}return null}(t)||r}function zN(t,e,r){const n=oi(e),i=Ws(e),s=r==="fixed",o=ea(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&!s)if((eo(e)!=="body"||Ic(i))&&(a=Ah(e)),oi(e)){const f=ea(e,!0,s,e);l.x=f.x+e.clientLeft,l.y=f.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}}const VN={getClippingRect:function(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const s=r==="clippingAncestors"?function(f,c){const u=c.get(f);if(u)return u;let h=Vf(f).filter(k=>yn(k)&&eo(k)!=="body"),v=null;const x=ii(f).position==="fixed";let g=x?_l(f):f;for(;yn(g)&&!Ch(g);){const k=ii(g),w=Gy(g);w||k.position!=="fixed"||(v=null),(x?!w&&!v:!w&&k.position==="static"&&v&&["absolute","fixed"].includes(v.position)||Ic(g)&&!w&&nC(f,g))?h=h.filter(A=>A!==g):v=k,g=_l(g)}return c.set(f,h),h}(e,this._c):[].concat(r),o=[...s,n],a=o[0],l=o.reduce((f,c)=>{const u=pw(e,c,i);return f.top=zf(u.top,f.top),f.right=vw(u.right,f.right),f.bottom=vw(u.bottom,f.bottom),f.left=zf(u.left,f.left),f},pw(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:r,strategy:n}=t;const i=oi(r),s=Ws(r);if(r===s)return e;let o={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((i||!i&&n!=="fixed")&&((eo(r)!=="body"||Ic(s))&&(o=Ah(r)),oi(r))){const f=ea(r);a=fl(r),l.x=f.x+r.clientLeft,l.y=f.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}},isElement:yn,getDimensions:function(t){return Y4(t)},getOffsetParent:mw,getDocumentElement:Ws,getScale:fl,async getElementRects(t){let{reference:e,floating:r,strategy:n}=t;const i=this.getOffsetParent||mw,s=this.getDimensions;return{reference:zN(e,await i(r),n),floating:{x:0,y:0,...await s(r)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>ii(t).direction==="rtl"};function HN(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=!0,animationFrame:a=!1}=n,l=i||s?[...yn(t)?Vf(t):t.contextElement?Vf(t.contextElement):[],...Vf(e)]:[];l.forEach(h=>{const v=!yn(h)&&h.toString().includes("V");!i||a&&!v||h.addEventListener("scroll",r,{passive:!0}),s&&h.addEventListener("resize",r)});let f,c=null;o&&(c=new ResizeObserver(()=>{r()}),yn(t)&&!a&&c.observe(t),yn(t)||!t.contextElement||a||c.observe(t.contextElement),c.observe(e));let u=a?ea(t):null;return a&&function h(){const v=ea(t);!u||v.x===u.x&&v.y===u.y&&v.width===u.width&&v.height===u.height||r(),u=v,f=requestAnimationFrame(h)}(),r(),()=>{var h;l.forEach(v=>{i&&v.removeEventListener("scroll",r),s&&v.removeEventListener("resize",r)}),(h=c)==null||h.disconnect(),c=null,a&&cancelAnimationFrame(f)}}const WN=(t,e,r)=>{const n=new Map,i={platform:VN,...r},s={...i.platform,_c:n};return RN(t,e,{...i,platform:s})},qN=t=>{const{element:e,padding:r}=t;function n(i){return{}.hasOwnProperty.call(i,"current")}return{name:"arrow",options:t,fn(i){return e&&n(e)?e.current!=null?cw({element:e.current,padding:r}).fn(i):{}:e?cw({element:e,padding:r}).fn(i):{}}}};var cd=typeof document<"u"?S.useLayoutEffect:S.useEffect;function m0(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(!m0(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)&&!m0(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 cd(()=>{e.current=t}),e}function GN(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:f}=t,[c,u]=S.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[h,v]=S.useState(n);m0(h,n)||v(n);const[x,g]=S.useState(null),[k,w]=S.useState(null),A=S.useCallback(P=>{P!=$.current&&($.current=P,g(P))},[g]),E=S.useCallback(P=>{P!==j.current&&(j.current=P,w(P))},[w]),I=s||x,M=o||k,$=S.useRef(null),j=S.useRef(null),U=S.useRef(c),W=bw(l),q=bw(i),G=S.useCallback(()=>{if(!$.current||!j.current)return;const P={placement:e,strategy:r,middleware:h};q.current&&(P.platform=q.current),WN($.current,j.current,P).then(O=>{const m={...O,isPositioned:!0};re.current&&!m0(U.current,m)&&(U.current=m,Ti.flushSync(()=>{u(m)}))})},[h,e,r,q]);cd(()=>{f===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,u(P=>({...P,isPositioned:!1})))},[f]);const re=S.useRef(!1);cd(()=>(re.current=!0,()=>{re.current=!1}),[]),cd(()=>{if(I&&($.current=I),M&&(j.current=M),I&&M){if(W.current)return W.current(I,M,G);G()}},[I,M,G,W]);const B=S.useMemo(()=>({reference:$,floating:j,setReference:A,setFloating:E}),[A,E]),y=S.useMemo(()=>({reference:I,floating:M}),[I,M]),C=S.useMemo(()=>{const P={position:r,left:0,top:0};if(!y.floating)return P;const O=xw(y.floating,c.x),m=xw(y.floating,c.y);return a?{...P,transform:"translate("+O+"px, "+m+"px)",...iC(y.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:m}},[r,a,y.floating,c.x,c.y]);return S.useMemo(()=>({...c,update:G,refs:B,elements:y,floatingStyles:C}),[c,G,B,y,C])}const sC="Popper",[oC,ql]=Or(sC),[KN,aC]=oC(sC),JN=t=>{const{__scopePopper:e,children:r}=t,[n,i]=S.useState(null);return S.createElement(KN,{scope:e,anchor:n,onAnchorChange:i},r)},QN="PopperAnchor",YN=S.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...i}=t,s=aC(QN,r),o=S.useRef(null),a=Nt(e,o);return S.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:S.createElement($e.div,ue({},i,{ref:a}))}),lC="PopperContent",[XN,gK]=oC(lC),ZN=S.forwardRef((t,e)=>{var r,n,i,s,o,a,l,f;const{__scopePopper:c,side:u="bottom",sideOffset:h=0,align:v="center",alignOffset:x=0,arrowPadding:g=0,collisionBoundary:k=[],collisionPadding:w=0,sticky:A="partial",hideWhenDetached:E=!1,avoidCollisions:I=!0,onPlaced:M,...$}=t,j=aC(lC,c),[U,W]=S.useState(null),q=Nt(e,ie=>W(ie)),[G,re]=S.useState(null),B=mm(G),y=(r=B==null?void 0:B.width)!==null&&r!==void 0?r:0,C=(n=B==null?void 0:B.height)!==null&&n!==void 0?n:0,P=u+(v!=="center"?"-"+v:""),O=typeof w=="number"?w:{top:0,right:0,bottom:0,left:0,...w},m=Array.isArray(k)?k:[k],T=m.length>0,R={padding:O,boundary:m.filter(eO),altBoundary:T},{refs:b,floatingStyles:d,placement:_,isPositioned:N,middlewareData:p}=GN({strategy:"fixed",placement:P,whileElementsMounted:HN,elements:{reference:j.anchor},middleware:[LN({mainAxis:h+C,alignmentAxis:x}),I&&$N({mainAxis:!0,crossAxis:!1,limiter:A==="partial"?FN():void 0,...R}),I&&DN({...R}),jN({...R,apply:({elements:ie,rects:ye,availableWidth:Qt,availableHeight:Me})=>{const{width:Se,height:St}=ye.reference,Be=ie.floating.style;Be.setProperty("--radix-popper-available-width",`${Qt}px`),Be.setProperty("--radix-popper-available-height",`${Me}px`),Be.setProperty("--radix-popper-anchor-width",`${Se}px`),Be.setProperty("--radix-popper-anchor-height",`${St}px`)}}),G&&qN({element:G,padding:g}),tO({arrowWidth:y,arrowHeight:C}),E&&BN({strategy:"referenceHidden"})]}),[D,L]=fC(_),F=Dn(M);xn(()=>{N&&(F==null||F())},[N,F]);const H=(i=p.arrow)===null||i===void 0?void 0:i.x,Z=(s=p.arrow)===null||s===void 0?void 0:s.y,K=((o=p.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[X,ve]=S.useState();return xn(()=>{U&&ve(window.getComputedStyle(U).zIndex)},[U]),S.createElement("div",{ref:b.setFloating,"data-radix-popper-content-wrapper":"",style:{...d,transform:N?d.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,["--radix-popper-transform-origin"]:[(a=p.transformOrigin)===null||a===void 0?void 0:a.x,(l=p.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},S.createElement(XN,{scope:c,placedSide:D,onArrowChange:re,arrowX:H,arrowY:Z,shouldHideArrow:K},S.createElement($e.div,ue({"data-side":D,"data-align":L},$,{ref:q,style:{...$.style,animation:N?void 0:"none",opacity:(f=p.hide)!==null&&f!==void 0&&f.referenceHidden?0:void 0}}))))});function eO(t){return t!==null}const tO=t=>({name:"transformOrigin",options:t,fn(e){var r,n,i,s,o;const{placement:a,rects:l,middlewareData:f}=e,u=((r=f.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,h=u?0:t.arrowWidth,v=u?0:t.arrowHeight,[x,g]=fC(a),k={start:"0%",center:"50%",end:"100%"}[g],w=((n=(i=f.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+h/2,A=((s=(o=f.arrow)===null||o===void 0?void 0:o.y)!==null&&s!==void 0?s:0)+v/2;let E="",I="";return x==="bottom"?(E=u?k:`${w}px`,I=`${-v}px`):x==="top"?(E=u?k:`${w}px`,I=`${l.floating.height+v}px`):x==="right"?(E=`${-v}px`,I=u?k:`${A}px`):x==="left"&&(E=`${l.floating.width+v}px`,I=u?k:`${A}px`),{data:{x:E,y:I}}}});function fC(t){const[e,r="center"]=t.split("-");return[e,r]}const rO=JN,nO=YN,iO=ZN,sO=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?N_.createPortal(S.createElement($e.div,ue({},i,{ref:e})),n):null}),sv="rovingFocusGroup.onEntryFocus",oO={bubbles:!1,cancelable:!0},Sm="RovingFocusGroup",[Ky,cC,aO]=wh(Sm),[lO,Gl]=Or(Sm,[aO]),[fO,cO]=lO(Sm),uO=S.forwardRef((t,e)=>S.createElement(Ky.Provider,{scope:t.__scopeRovingFocusGroup},S.createElement(Ky.Slot,{scope:t.__scopeRovingFocusGroup},S.createElement(dO,ue({},t,{ref:e}))))),dO=S.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:f,...c}=t,u=S.useRef(null),h=Nt(e,u),v=Cm(s),[x=null,g]=kl({prop:o,defaultProp:a,onChange:l}),[k,w]=S.useState(!1),A=Dn(f),E=cC(r),I=S.useRef(!1),[M,$]=S.useState(0);return S.useEffect(()=>{const j=u.current;if(j)return j.addEventListener(sv,A),()=>j.removeEventListener(sv,A)},[A]),S.createElement(fO,{scope:r,orientation:n,dir:v,loop:i,currentTabStopId:x,onItemFocus:S.useCallback(j=>g(j),[g]),onItemShiftTab:S.useCallback(()=>w(!0),[]),onFocusableItemAdd:S.useCallback(()=>$(j=>j+1),[]),onFocusableItemRemove:S.useCallback(()=>$(j=>j-1),[])},S.createElement($e.div,ue({tabIndex:k||M===0?-1:0,"data-orientation":n},c,{ref:h,style:{outline:"none",...t.style},onMouseDown:Ce(t.onMouseDown,()=>{I.current=!0}),onFocus:Ce(t.onFocus,j=>{const U=!I.current;if(j.target===j.currentTarget&&U&&!k){const W=new CustomEvent(sv,oO);if(j.currentTarget.dispatchEvent(W),!W.defaultPrevented){const q=E().filter(C=>C.focusable),G=q.find(C=>C.active),re=q.find(C=>C.id===x),y=[G,re,...q].filter(Boolean).map(C=>C.ref.current);uC(y)}}I.current=!1}),onBlur:Ce(t.onBlur,()=>w(!1))})))}),hO="RovingFocusGroupItem",vO=S.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:s,...o}=t,a=Yc(),l=s||a,f=cO(hO,r),c=f.currentTabStopId===l,u=cC(r),{onFocusableItemAdd:h,onFocusableItemRemove:v}=f;return S.useEffect(()=>{if(n)return h(),()=>v()},[n,h,v]),S.createElement(Ky.ItemSlot,{scope:r,id:l,focusable:n,active:i},S.createElement($e.span,ue({tabIndex:c?0:-1,"data-orientation":f.orientation},o,{ref:e,onMouseDown:Ce(t.onMouseDown,x=>{n?f.onItemFocus(l):x.preventDefault()}),onFocus:Ce(t.onFocus,()=>f.onItemFocus(l)),onKeyDown:Ce(t.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const g=gO(x,f.orientation,f.dir);if(g!==void 0){x.preventDefault();let w=u().filter(A=>A.focusable).map(A=>A.ref.current);if(g==="last")w.reverse();else if(g==="prev"||g==="next"){g==="prev"&&w.reverse();const A=w.indexOf(x.currentTarget);w=f.loop?mO(w,A+1):w.slice(A+1)}setTimeout(()=>uC(w))}})})))}),yO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function pO(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function gO(t,e,r){const n=pO(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return yO[n]}function uC(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function mO(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const xO=uO,dC=vO;var bO=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Aa=new WeakMap,Nu=new WeakMap,Ou={},ov=0,hC=function(t){return t&&(t.host||hC(t.parentNode))},wO=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=hC(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return Boolean(r)})},CO=function(t,e,r,n){var i=wO(e,Array.isArray(t)?t:[t]);Ou[r]||(Ou[r]=new WeakMap);var s=Ou[r],o=[],a=new Set,l=new Set(i),f=function(u){!u||a.has(u)||(a.add(u),f(u.parentNode))};i.forEach(f);var c=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(h){if(a.has(h))c(h);else{var v=h.getAttribute(n),x=v!==null&&v!=="false",g=(Aa.get(h)||0)+1,k=(s.get(h)||0)+1;Aa.set(h,g),s.set(h,k),o.push(h),g===1&&x&&Nu.set(h,!0),k===1&&h.setAttribute(r,"true"),x||h.setAttribute(n,"true")}})};return c(e),a.clear(),ov++,function(){o.forEach(function(u){var h=Aa.get(u)-1,v=s.get(u)-1;Aa.set(u,h),s.set(u,v),h||(Nu.has(u)||u.removeAttribute(n),Nu.delete(u)),v||u.removeAttribute(r)}),ov--,ov||(Aa=new WeakMap,Aa=new WeakMap,Nu=new WeakMap,Ou={})}},AO=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),i=e||bO(t);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),CO(n,i,r,"aria-hidden")):function(){return null}},pi=function(){return pi=Object.assign||function(e){for(var r,n=1,i=arguments.length;n"u")return jO;var e=UO(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])}},VO=gC(),HO=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(SO,` { overflow: hidden `).concat(n,`; padding-right: `).concat(a,"px ").concat(n,`; } @@ -71,69 +71,69 @@ Error generating stack: `+s.message+` `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),` } - .`).concat(cd,` { + .`).concat(ud,` { right: `).concat(a,"px ").concat(n,`; } - .`).concat(ud,` { + .`).concat(dd,` { margin-right: `).concat(a,"px ").concat(n,`; } - .`).concat(cd," .").concat(cd,` { + .`).concat(ud," .").concat(ud,` { right: 0 `).concat(n,`; } - .`).concat(ud," .").concat(ud,` { + .`).concat(dd," .").concat(dd,` { margin-right: 0 `).concat(n,`; } body { - `).concat(SO,": ").concat(a,`px; + `).concat(kO,": ").concat(a,`px; } -`)},HO=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,i=n===void 0?"margin":n,s=S.useMemo(function(){return UO(i)},[i]);return S.createElement(zO,{styles:VO(s,!e,i,r?"":"!important")})},Ky=!1;if(typeof window<"u")try{var Ou=Object.defineProperty({},"passive",{get:function(){return Ky=!0,!0}});window.addEventListener("test",Ou,Ou),window.removeEventListener("test",Ou,Ou)}catch{Ky=!1}var Ea=Ky?{passive:!1}:!1,WO=function(t){return t.tagName==="TEXTAREA"},mC=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!WO(t)&&r[e]==="visible")},qO=function(t){return mC(t,"overflowY")},GO=function(t){return mC(t,"overflowX")},ww=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=xC(t,r);if(n){var i=bC(t,r),s=i[1],o=i[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},KO=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},JO=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},xC=function(t,e){return t==="v"?qO(e):GO(e)},bC=function(t,e){return t==="v"?KO(e):JO(e)},QO=function(t,e){return t==="h"&&e==="rtl"?-1:1},YO=function(t,e,r,n,i){var s=QO(t,window.getComputedStyle(e).direction),o=s*n,a=r.target,l=e.contains(a),f=!1,c=o>0,u=0,h=0;do{var v=bC(t,a),x=v[0],g=v[1],k=v[2],w=g-k-s*x;(x||w)&&xC(t,a)&&(u+=w,h+=x),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(c&&(i&&u===0||!i&&o>u)||!c&&(i&&h===0||!i&&-o>h))&&(f=!0),f},Bu=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},XO=function(t,e){return t[0]===e[0]&&t[1]===e[1]},ZO=function(t){return` +`)},WO=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,i=n===void 0?"margin":n,s=S.useMemo(function(){return zO(i)},[i]);return S.createElement(VO,{styles:HO(s,!e,i,r?"":"!important")})},Jy=!1;if(typeof window<"u")try{var Du=Object.defineProperty({},"passive",{get:function(){return Jy=!0,!0}});window.addEventListener("test",Du,Du),window.removeEventListener("test",Du,Du)}catch{Jy=!1}var Ea=Jy?{passive:!1}:!1,qO=function(t){return t.tagName==="TEXTAREA"},mC=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!qO(t)&&r[e]==="visible")},GO=function(t){return mC(t,"overflowY")},KO=function(t){return mC(t,"overflowX")},ww=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=xC(t,r);if(n){var i=bC(t,r),s=i[1],o=i[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},JO=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},QO=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},xC=function(t,e){return t==="v"?GO(e):KO(e)},bC=function(t,e){return t==="v"?JO(e):QO(e)},YO=function(t,e){return t==="h"&&e==="rtl"?-1:1},XO=function(t,e,r,n,i){var s=YO(t,window.getComputedStyle(e).direction),o=s*n,a=r.target,l=e.contains(a),f=!1,c=o>0,u=0,h=0;do{var v=bC(t,a),x=v[0],g=v[1],k=v[2],w=g-k-s*x;(x||w)&&xC(t,a)&&(u+=w,h+=x),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(c&&(i&&u===0||!i&&o>u)||!c&&(i&&h===0||!i&&-o>h))&&(f=!0),f},Bu=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},ZO=function(t,e){return t[0]===e[0]&&t[1]===e[1]},eD=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},eB=0,Sa=[];function tB(t){var e=S.useRef([]),r=S.useRef([0,0]),n=S.useRef(),i=S.useState(eB++)[0],s=S.useState(function(){return gC()})[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 g=AO([t.lockRef.current],(t.shards||[]).map(Aw),!0).filter(Boolean);return g.forEach(function(k){return k.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),g.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=S.useCallback(function(g,k){if("touches"in g&&g.touches.length===2)return!o.current.allowPinchZoom;var w=Bu(g),A=r.current,E="deltaX"in g?g.deltaX:A[0]-w[0],I="deltaY"in g?g.deltaY:A[1]-w[1],M,$=g.target,j=Math.abs(E)>Math.abs(I)?"h":"v";if("touches"in g&&j==="h"&&$.type==="range")return!1;var U=ww(j,$);if(!U)return!0;if(U?M=j:(M=j==="v"?"h":"v",U=ww(j,$)),!U)return!1;if(!n.current&&"changedTouches"in g&&(E||I)&&(n.current=M),!M)return!0;var W=n.current||M;return YO(W,k,g,W==="h"?E:I,!0)},[]),l=S.useCallback(function(g){var k=g;if(!(!Sa.length||Sa[Sa.length-1]!==s)){var w="deltaY"in k?Cw(k):Bu(k),A=e.current.filter(function(M){return M.name===k.type&&M.target===k.target&&XO(M.delta,w)})[0];if(A&&A.should){k.cancelable&&k.preventDefault();return}if(!A){var E=(o.current.shards||[]).map(Aw).filter(Boolean).filter(function(M){return M.contains(k.target)}),I=E.length>0?a(k,E[0]):!o.current.noIsolation;I&&k.cancelable&&k.preventDefault()}}},[]),f=S.useCallback(function(g,k,w,A){var E={name:g,delta:k,target:w,should:A};e.current.push(E),setTimeout(function(){e.current=e.current.filter(function(I){return I!==E})},1)},[]),c=S.useCallback(function(g){r.current=Bu(g),n.current=void 0},[]),u=S.useCallback(function(g){f(g.type,Cw(g),g.target,a(g,t.lockRef.current))},[]),h=S.useCallback(function(g){f(g.type,Bu(g),g.target,a(g,t.lockRef.current))},[]);S.useEffect(function(){return Sa.push(s),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Ea),document.addEventListener("touchmove",l,Ea),document.addEventListener("touchstart",c,Ea),function(){Sa=Sa.filter(function(g){return g!==s}),document.removeEventListener("wheel",l,Ea),document.removeEventListener("touchmove",l,Ea),document.removeEventListener("touchstart",c,Ea)}},[]);var v=t.removeScrollBar,x=t.inert;return S.createElement(S.Fragment,null,x?S.createElement(s,{styles:ZO(i)}):null,v?S.createElement(HO,{gapMode:"margin"}):null)}const rB=MO(pC,tB);var wC=S.forwardRef(function(t,e){return S.createElement(Ah,pi({},t,{ref:e,sideCar:rB}))});wC.classNames=Ah.classNames;const nB=wC,iB=["Enter"," "],Eh="Menu",[sB,yK,oB]=bh(Eh),[va,CC]=Or(Eh,[oB,Wl,ql]);Wl();const aB=ql();va(Eh);const[pK,lB]=va(Eh),fB="MenuPortal";va(fB,{forceMount:void 0});const cB="MenuContent",[gK,AC]=va(cB),Jy="MenuItem",Ew="menu.itemSelect",EC=S.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...i}=t,s=S.useRef(null),o=lB(Jy,t.__scopeMenu),a=AC(Jy,t.__scopeMenu),l=Nt(e,s),f=S.useRef(!1),c=()=>{const u=s.current;if(!r&&u){const h=new CustomEvent(Ew,{bubbles:!0,cancelable:!0});u.addEventListener(Ew,v=>n==null?void 0:n(v),{once:!0}),xm(u,h),h.defaultPrevented?f.current=!1:o.onClose()}};return S.createElement(uB,ue({},i,{ref:l,disabled:r,onClick:Ce(t.onClick,c),onPointerDown:u=>{var h;(h=t.onPointerDown)===null||h===void 0||h.call(t,u),f.current=!0},onPointerUp:Ce(t.onPointerUp,u=>{var h;f.current||(h=u.currentTarget)===null||h===void 0||h.click()}),onKeyDown:Ce(t.onKeyDown,u=>{const h=a.searchRef.current!=="";r||h&&u.key===" "||iB.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),uB=S.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...s}=t,o=AC(Jy,r),a=aB(r),l=S.useRef(null),f=Nt(e,l),[c,u]=S.useState(!1),[h,v]=S.useState("");return S.useEffect(()=>{const x=l.current;if(x){var g;v(((g=x.textContent)!==null&&g!==void 0?g:"").trim())}},[s.children]),S.createElement(sB.ItemSlot,{scope:r,disabled:n,textValue:i??h},S.createElement(dC,ue({asChild:!0},a,{focusable:!n}),S.createElement($e.div,ue({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},s,{ref:f,onPointerMove:Ce(t.onPointerMove,Sw(x=>{n?o.onItemLeave(x):(o.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus())})),onPointerLeave:Ce(t.onPointerLeave,Sw(x=>o.onItemLeave(x))),onFocus:Ce(t.onFocus,()=>u(!0)),onBlur:Ce(t.onBlur,()=>u(!1))}))))}),dB=S.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...i}=t;return S.createElement(kC,{scope:t.__scopeMenu,checked:r},S.createElement(EC,ue({role:"menuitemcheckbox","aria-checked":m0(r)?"mixed":r},i,{ref:e,"data-state":km(r),onSelect:Ce(i.onSelect,()=>n==null?void 0:n(m0(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),hB="MenuRadioGroup",[mK,vB]=va(hB,{value:void 0,onValueChange:()=>{}}),yB="MenuRadioItem",pB=S.forwardRef((t,e)=>{const{value:r,...n}=t,i=vB(yB,t.__scopeMenu),s=r===i.value;return S.createElement(kC,{scope:t.__scopeMenu,checked:s},S.createElement(EC,ue({role:"menuitemradio","aria-checked":s},n,{ref:e,"data-state":km(s),onSelect:Ce(n.onSelect,()=>{var o;return(o=i.onValueChange)===null||o===void 0?void 0:o.call(i,r)},{checkForDefaultPrevented:!1})})))}),SC="MenuItemIndicator",[kC,gB]=va(SC,{checked:!1}),mB=S.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...i}=t,s=gB(SC,r);return S.createElement(Jc,{present:n||m0(s.checked)||s.checked===!0},S.createElement($e.span,ue({},i,{ref:e,"data-state":km(s.checked)})))}),xB="MenuSub";va(xB);function m0(t){return t==="indeterminate"}function km(t){return m0(t)?"indeterminate":t?"checked":"unchecked"}function Sw(t){return e=>e.pointerType==="mouse"?t(e):void 0}const bB=dB,wB=pB,CB=mB,_C="DropdownMenu",[AB,xK]=Or(_C,[CC]),_m=CC();AB(_C);const EB=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=_m(r);return S.createElement(bB,ue({},i,n,{ref:e}))}),SB=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=_m(r);return S.createElement(wB,ue({},i,n,{ref:e}))}),kB=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=_m(r);return S.createElement(CB,ue({},i,n,{ref:e}))}),_B=EB,TB=SB,TC=kB;var PC="_1k2mbvi5",IC="_1k2mbvi4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12vk fyvr12ve fyvr11h0 fyvr11ko fyvr11jw fyvr12tz fyvr11n2 fyvr11hw fyvr12r5";const PB=({children:t})=>Q.jsx(TC,{className:PC,children:t});S.forwardRef(({className:t,children:e,...r},n)=>Q.jsxs(_B,{className:Jr(IC,t),...r,ref:n,children:[Q.jsx(PB,{children:Q.jsx(F4,{size:"xs"})}),Q.jsx(sr,{variant:"small",children:e})]}));S.forwardRef(({className:t,children:e,...r},n)=>Q.jsxs(TB,{className:Jr(IC,t),...r,ref:n,children:[Q.jsx(TC,{className:PC,children:Q.jsx(sr,{children:"•"})}),Q.jsx(sr,{variant:"small",children:e})]}));const RC=S.forwardRef((t,e)=>{const{icon:r,size:n="md",...i}=t;return Q.jsx(Ve,{leftIcon:r,size:n,flexShrink:"0",ref:e,...i})}),IB=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var RB="fyvr12vh fyvr12vb fyvr11ho fyvr12ub fyvr1ko fyvr1oo fyvr1mo fyvr1qo",MB="_1hq71vk1 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12j5 fyvr12bz fyvr11xn fyvr124t fyvr12mt fyvr12fn fyvr121b fyvr128h fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",NB=Ot({defaultClassName:"",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"};S.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:i=!1,id:s,label:o="",labelLocation:a="hidden",name:l,onValueChange:f,placeholder:c="Upload a file",validExtensions:u,...h}=t,v=S.useRef(null),x=IB(v,e),[g,k]=S.useState(null),w=E=>{const I=E.currentTarget.files;if(!I||!I[0])return;const M=I[0],$=M.name,j=M.size/1e3;k({name:$,size:j,extension:$.split(".").pop()??""}),f==null||f(M)},A=u.map(E=>OB[E]).join(",");return Q.jsx(zl,{description:n,disabled:i,display:"grid",id:s??l,label:o,labelLocation:a,children:Q.jsx(ge,{width:"full",children:Q.jsxs(ge,{justifyContent:g?"space-between":"flex-start",color:g?"text100":"text50",className:Jr(MB,NB({borderRadius:r})),children:[g?Q.jsxs(ge,{flexDirection:"row",gap:"2",alignItems:"baseline",children:[Q.jsx(sr,{children:g.name}),Q.jsxs(sr,{color:"text50",variant:"xsmall",children:[g.size.toFixed(2)," kb"]})]}):Q.jsx(sr,{children:c}),Q.jsx(ge,{accept:A,as:"input",className:RB,cursor:g?"text":"pointer",disabled:i||!!g,id:s??l,name:l,onChange:w,ref:x,type:"file",...h}),g&&Q.jsx(RC,{cursor:"pointer",icon:U4,size:"xs",onClick:E=>{var I;E.preventDefault(),E.stopPropagation(),(I=v.current)!=null&&I.value&&(v.current.value=""),f==null||f(null),k(null)},zIndex:"10"})]})})})});var BB=Ot({defaultClassName:"",variantClassNames:{size:{xs:"_1bhyzin0",sm:"_1bhyzin1",md:"_1bhyzin2",lg:"_1bhyzin3",xl:"_1bhyzin4"}},defaultVariants:{},compoundVariants:[]});const Io=(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)},DB=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),i=t%360,s=(t+120)%360,o=r%360;return{id:Io(n),a:`hsl(${i}deg 100% 40%)`,b:`hsl(${s}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}};S.memo(t=>{const{className:e,address:r,size:n="md",complexity:i=1,...s}=t,o=[];for(let l=0;l({...DB(l.a,l.b,l.c),x:l.x%1e3,y:l.y%1e3,r:100+l.r%(1500/(f+1))}));return Q.jsxs(ge,{as:"svg",className:Jr(e,BB({size:n})),viewBox:"0 0 1000 1000",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:"500",cy:"500",r:"500"})}),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:"100",result:"effect1_foregroundBlur"})]}),a.map(l=>Q.jsxs(S.Fragment,{children:[Q.jsxs("radialGradient",{id:`gradient-primary-${l.id}`,children:[Q.jsx("stop",{offset:"0",stopColor:l.a}),Q.jsx("stop",{offset:"1",stopColor:l.b})]}),Q.jsxs("radialGradient",{id:`gradient-secondary-${l.id}`,children:[Q.jsx("stop",{offset:"0",stopColor:l.c}),Q.jsx("stop",{offset:"1",stopColor:l.b})]})]},l.id)),Q.jsxs("linearGradient",{id:`gradient-background-${a[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[Q.jsx("stop",{offset:"0",stopColor:a[0].c}),Q.jsx("stop",{offset:"1",stopColor:a[0].a})]})]}),Q.jsxs("g",{clipPath:"url(#circle-clip)",children:[Q.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${a[0].id})`}),Q.jsx("g",{filter:"url(#blur)",children:a.map(l=>Q.jsxs(S.Fragment,{children:[Q.jsx("circle",{fill:`url(#gradient-primary-${l.id})`,cx:l.x,cy:l.y,r:l.r}),Q.jsx("circle",{fill:`url(#gradient-secondary-${l.id})`,cx:l.y,cy:l.x,r:l.r/2})]},l.id))})]})]})});const MC=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[i,s]=S.useState(!1),o=a=>{s(!0),r==null||r(a)};return Q.jsx(ge,{as:ld.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:i?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},NC="Dialog",[OC,bK]=Or(NC);OC(NC);const LB="DialogPortal";OC(LB,{forceMount:void 0});Ot({defaultClassName:"",variantClassNames:{shadows:{true:"_1vqx0w93",false:"_1vqx0w94"},direction:{vertical:"_1vqx0w95",horizontal:"_1vqx0w96"}},defaultVariants:{},compoundVariants:[]});Ot({defaultClassName:"fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w91",horizontal:"_1vqx0w92"}},defaultVariants:{},compoundVariants:[]});Ot({defaultClassName:"_5b32m95 fyvr11d8 fyvr11dw fyvr11bg fyvr11by fyvr11c4 fyvr11cm fyvr11ls fyvr11m8 fyvr12vk fyvr12ve fyvr11h0 fyvr11i4 fyvr11hs fyvr11pn fyvr1mo fyvr1om",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]});var $B=Ot({defaultClassName:"fyvr1t4 fyvr1v0 fyvr12vh fyvr12vb fyvr11gw fyvr128 fyvr15o",variantClassNames:{numeric:{false:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",true:"fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8"}},defaultVariants:{},compoundVariants:[]}),FB="_1acm19y1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12rh fyvr1g0 fyvr118g",jB=Ot({defaultClassName:"",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const BC=S.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:l="",labelLocation:f="hidden",leftIcon:c,rightIcon:u,name:h,controls:v,type:x="text",numeric:g=!1,...k}=t;return Q.jsx(zl,{description:s,disabled:o,display:"grid",id:a??h,label:l,labelLocation:f,children:Q.jsx(ge,{width:"full",children:Q.jsxs(ge,{className:Jr(FB,jB({borderRadius:i})),children:[c&&Q.jsx(c,{size:"sm"}),Q.jsx(ge,{as:r,autoComplete:n,spellCheck:"false",className:$B({numeric:g}),disabled:o,id:a??h,name:h,ref:e,type:x,...k}),u&&Q.jsx(u,{size:"sm"}),v]})})})}),UB=RegExp("^\\d*(?:\\\\[.])?\\d*$");function zB(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}S.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:i,onBlur:s,...o}=t,a=f=>{let{value:c}=f.target;c=c.replace(/,/g,"."),c.startsWith(".")&&(c="0"+c),c.startsWith("0")&&(c=c.replace(/^0+(?=\d)/,"")),(c===""||UB.test(zB(c)))&&(i==null||i({...f,target:{...f.target,value:c}}))},l=f=>{const{value:c}=f.target;let u=c;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),s==null||s(f),u!==c&&(i==null||i({...f,target:{...f.target,value:u}}))};return Q.jsx(BC,{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})});Ot({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const DC="Progress",Sh=100,[VB,wK]=Or(DC),[HB,CK]=VB(DC),WB=S.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:i,getValueLabel:s=qB,...o}=t,a=Qy(i)?i:Sh,l=LC(n,a)?n:null,f=x0(l)?s(l,a):void 0;return S.createElement(HB,{scope:r,value:l,max:a},S.createElement($e.div,ue({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":x0(l)?l:void 0,"aria-valuetext":f,role:"progressbar","data-state":GB(l,a),"data-value":l??void 0,"data-max":a},o,{ref:e})))});WB.propTypes={max(t,e,r){const n=t[e],i=String(n);return n&&!Qy(n)?new Error(KB(i,r)):null},value(t,e,r){const n=t[e],i=String(n),s=Qy(t.max)?t.max:Sh;return n!=null&&!LC(n,s)?new Error(JB(i,r)):null}};function qB(t,e){return`${Math.round(t/e*100)}%`}function GB(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function x0(t){return typeof t=="number"}function Qy(t){return x0(t)&&!isNaN(t)&&t>0}function LC(t,e){return x0(t)&&!isNaN(t)&&t<=e&&t>=0}function KB(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Sh}\`.`}function JB(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: +`)},tD=0,Sa=[];function rD(t){var e=S.useRef([]),r=S.useRef([0,0]),n=S.useRef(),i=S.useState(tD++)[0],s=S.useState(function(){return gC()})[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 g=EO([t.lockRef.current],(t.shards||[]).map(Aw),!0).filter(Boolean);return g.forEach(function(k){return k.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),g.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=S.useCallback(function(g,k){if("touches"in g&&g.touches.length===2)return!o.current.allowPinchZoom;var w=Bu(g),A=r.current,E="deltaX"in g?g.deltaX:A[0]-w[0],I="deltaY"in g?g.deltaY:A[1]-w[1],M,$=g.target,j=Math.abs(E)>Math.abs(I)?"h":"v";if("touches"in g&&j==="h"&&$.type==="range")return!1;var U=ww(j,$);if(!U)return!0;if(U?M=j:(M=j==="v"?"h":"v",U=ww(j,$)),!U)return!1;if(!n.current&&"changedTouches"in g&&(E||I)&&(n.current=M),!M)return!0;var W=n.current||M;return XO(W,k,g,W==="h"?E:I,!0)},[]),l=S.useCallback(function(g){var k=g;if(!(!Sa.length||Sa[Sa.length-1]!==s)){var w="deltaY"in k?Cw(k):Bu(k),A=e.current.filter(function(M){return M.name===k.type&&M.target===k.target&&ZO(M.delta,w)})[0];if(A&&A.should){k.cancelable&&k.preventDefault();return}if(!A){var E=(o.current.shards||[]).map(Aw).filter(Boolean).filter(function(M){return M.contains(k.target)}),I=E.length>0?a(k,E[0]):!o.current.noIsolation;I&&k.cancelable&&k.preventDefault()}}},[]),f=S.useCallback(function(g,k,w,A){var E={name:g,delta:k,target:w,should:A};e.current.push(E),setTimeout(function(){e.current=e.current.filter(function(I){return I!==E})},1)},[]),c=S.useCallback(function(g){r.current=Bu(g),n.current=void 0},[]),u=S.useCallback(function(g){f(g.type,Cw(g),g.target,a(g,t.lockRef.current))},[]),h=S.useCallback(function(g){f(g.type,Bu(g),g.target,a(g,t.lockRef.current))},[]);S.useEffect(function(){return Sa.push(s),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Ea),document.addEventListener("touchmove",l,Ea),document.addEventListener("touchstart",c,Ea),function(){Sa=Sa.filter(function(g){return g!==s}),document.removeEventListener("wheel",l,Ea),document.removeEventListener("touchmove",l,Ea),document.removeEventListener("touchstart",c,Ea)}},[]);var v=t.removeScrollBar,x=t.inert;return S.createElement(S.Fragment,null,x?S.createElement(s,{styles:eD(i)}):null,v?S.createElement(WO,{gapMode:"margin"}):null)}const nD=NO(pC,rD);var wC=S.forwardRef(function(t,e){return S.createElement(Eh,pi({},t,{ref:e,sideCar:nD}))});wC.classNames=Eh.classNames;const iD=wC,sD=["Enter"," "],Sh="Menu",[oD,mK,aD]=wh(Sh),[va,CC]=Or(Sh,[aD,ql,Gl]);ql();const lD=Gl();va(Sh);const[xK,fD]=va(Sh),cD="MenuPortal";va(cD,{forceMount:void 0});const uD="MenuContent",[bK,AC]=va(uD),Qy="MenuItem",Ew="menu.itemSelect",EC=S.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...i}=t,s=S.useRef(null),o=fD(Qy,t.__scopeMenu),a=AC(Qy,t.__scopeMenu),l=Nt(e,s),f=S.useRef(!1),c=()=>{const u=s.current;if(!r&&u){const h=new CustomEvent(Ew,{bubbles:!0,cancelable:!0});u.addEventListener(Ew,v=>n==null?void 0:n(v),{once:!0}),xm(u,h),h.defaultPrevented?f.current=!1:o.onClose()}};return S.createElement(dD,ue({},i,{ref:l,disabled:r,onClick:Ce(t.onClick,c),onPointerDown:u=>{var h;(h=t.onPointerDown)===null||h===void 0||h.call(t,u),f.current=!0},onPointerUp:Ce(t.onPointerUp,u=>{var h;f.current||(h=u.currentTarget)===null||h===void 0||h.click()}),onKeyDown:Ce(t.onKeyDown,u=>{const h=a.searchRef.current!=="";r||h&&u.key===" "||sD.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),dD=S.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...s}=t,o=AC(Qy,r),a=lD(r),l=S.useRef(null),f=Nt(e,l),[c,u]=S.useState(!1),[h,v]=S.useState("");return S.useEffect(()=>{const x=l.current;if(x){var g;v(((g=x.textContent)!==null&&g!==void 0?g:"").trim())}},[s.children]),S.createElement(oD.ItemSlot,{scope:r,disabled:n,textValue:i??h},S.createElement(dC,ue({asChild:!0},a,{focusable:!n}),S.createElement($e.div,ue({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},s,{ref:f,onPointerMove:Ce(t.onPointerMove,Sw(x=>{n?o.onItemLeave(x):(o.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus())})),onPointerLeave:Ce(t.onPointerLeave,Sw(x=>o.onItemLeave(x))),onFocus:Ce(t.onFocus,()=>u(!0)),onBlur:Ce(t.onBlur,()=>u(!1))}))))}),hD=S.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...i}=t;return S.createElement(kC,{scope:t.__scopeMenu,checked:r},S.createElement(EC,ue({role:"menuitemcheckbox","aria-checked":x0(r)?"mixed":r},i,{ref:e,"data-state":km(r),onSelect:Ce(i.onSelect,()=>n==null?void 0:n(x0(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),vD="MenuRadioGroup",[wK,yD]=va(vD,{value:void 0,onValueChange:()=>{}}),pD="MenuRadioItem",gD=S.forwardRef((t,e)=>{const{value:r,...n}=t,i=yD(pD,t.__scopeMenu),s=r===i.value;return S.createElement(kC,{scope:t.__scopeMenu,checked:s},S.createElement(EC,ue({role:"menuitemradio","aria-checked":s},n,{ref:e,"data-state":km(s),onSelect:Ce(n.onSelect,()=>{var o;return(o=i.onValueChange)===null||o===void 0?void 0:o.call(i,r)},{checkForDefaultPrevented:!1})})))}),SC="MenuItemIndicator",[kC,mD]=va(SC,{checked:!1}),xD=S.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...i}=t,s=mD(SC,r);return S.createElement(Qc,{present:n||x0(s.checked)||s.checked===!0},S.createElement($e.span,ue({},i,{ref:e,"data-state":km(s.checked)})))}),bD="MenuSub";va(bD);function x0(t){return t==="indeterminate"}function km(t){return x0(t)?"indeterminate":t?"checked":"unchecked"}function Sw(t){return e=>e.pointerType==="mouse"?t(e):void 0}const wD=hD,CD=gD,AD=xD,_C="DropdownMenu",[ED,CK]=Or(_C,[CC]),_m=CC();ED(_C);const SD=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=_m(r);return S.createElement(wD,ue({},i,n,{ref:e}))}),kD=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=_m(r);return S.createElement(CD,ue({},i,n,{ref:e}))}),_D=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=_m(r);return S.createElement(AD,ue({},i,n,{ref:e}))}),TD=SD,PD=kD,TC=_D;var PC="_1k2mbvi5",IC="_1k2mbvi4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12vk fyvr12ve fyvr11h0 fyvr11ko fyvr11jw fyvr12tz fyvr11n2 fyvr11hw fyvr12r5";const ID=({children:t})=>Q.jsx(TC,{className:PC,children:t});S.forwardRef(({className:t,children:e,...r},n)=>Q.jsxs(TD,{className:Jr(IC,t),...r,ref:n,children:[Q.jsx(ID,{children:Q.jsx(F4,{size:"xs"})}),Q.jsx(sr,{variant:"small",children:e})]}));S.forwardRef(({className:t,children:e,...r},n)=>Q.jsxs(PD,{className:Jr(IC,t),...r,ref:n,children:[Q.jsx(TC,{className:PC,children:Q.jsx(sr,{children:"•"})}),Q.jsx(sr,{variant:"small",children:e})]}));const RC=S.forwardRef((t,e)=>{const{icon:r,size:n="md",...i}=t;return Q.jsx(Ve,{leftIcon:r,size:n,flexShrink:"0",ref:e,...i})}),RD=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var MD="fyvr12vh fyvr12vb fyvr11ho fyvr12ub fyvr1ko fyvr1oo fyvr1mo fyvr1qo",ND="_1hq71vk1 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12j5 fyvr12bz fyvr11xn fyvr124t fyvr12mt fyvr12fn fyvr121b fyvr128h fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",OD=Ot({defaultClassName:"",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const DD={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:f,placeholder:c="Upload a file",validExtensions:u,...h}=t,v=S.useRef(null),x=RD(v,e),[g,k]=S.useState(null),w=E=>{const I=E.currentTarget.files;if(!I||!I[0])return;const M=I[0],$=M.name,j=M.size/1e3;k({name:$,size:j,extension:$.split(".").pop()??""}),f==null||f(M)},A=u.map(E=>DD[E]).join(",");return Q.jsx(Vl,{description:n,disabled:i,display:"grid",id:s??l,label:o,labelLocation:a,children:Q.jsx(ge,{width:"full",children:Q.jsxs(ge,{justifyContent:g?"space-between":"flex-start",color:g?"text100":"text50",className:Jr(ND,OD({borderRadius:r})),children:[g?Q.jsxs(ge,{flexDirection:"row",gap:"2",alignItems:"baseline",children:[Q.jsx(sr,{children:g.name}),Q.jsxs(sr,{color:"text50",variant:"xsmall",children:[g.size.toFixed(2)," kb"]})]}):Q.jsx(sr,{children:c}),Q.jsx(ge,{accept:A,as:"input",className:MD,cursor:g?"text":"pointer",disabled:i||!!g,id:s??l,name:l,onChange:w,ref:x,type:"file",...h}),g&&Q.jsx(RC,{cursor:"pointer",icon:U4,size:"xs",onClick:E=>{var I;E.preventDefault(),E.stopPropagation(),(I=v.current)!=null&&I.value&&(v.current.value=""),f==null||f(null),k(null)},zIndex:"10"})]})})})});var BD=Ot({defaultClassName:"",variantClassNames:{size:{xs:"_1bhyzin0",sm:"_1bhyzin1",md:"_1bhyzin2",lg:"_1bhyzin3",xl:"_1bhyzin4"}},defaultVariants:{},compoundVariants:[]});const Io=(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)},LD=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),i=t%360,s=(t+120)%360,o=r%360;return{id:Io(n),a:`hsl(${i}deg 100% 40%)`,b:`hsl(${s}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}};S.memo(t=>{const{className:e,address:r,size:n="md",complexity:i=1,...s}=t,o=[];for(let l=0;l({...LD(l.a,l.b,l.c),x:l.x%1e3,y:l.y%1e3,r:100+l.r%(1500/(f+1))}));return Q.jsxs(ge,{as:"svg",className:Jr(e,BD({size:n})),viewBox:"0 0 1000 1000",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:"500",cy:"500",r:"500"})}),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:"100",result:"effect1_foregroundBlur"})]}),a.map(l=>Q.jsxs(S.Fragment,{children:[Q.jsxs("radialGradient",{id:`gradient-primary-${l.id}`,children:[Q.jsx("stop",{offset:"0",stopColor:l.a}),Q.jsx("stop",{offset:"1",stopColor:l.b})]}),Q.jsxs("radialGradient",{id:`gradient-secondary-${l.id}`,children:[Q.jsx("stop",{offset:"0",stopColor:l.c}),Q.jsx("stop",{offset:"1",stopColor:l.b})]})]},l.id)),Q.jsxs("linearGradient",{id:`gradient-background-${a[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[Q.jsx("stop",{offset:"0",stopColor:a[0].c}),Q.jsx("stop",{offset:"1",stopColor:a[0].a})]})]}),Q.jsxs("g",{clipPath:"url(#circle-clip)",children:[Q.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${a[0].id})`}),Q.jsx("g",{filter:"url(#blur)",children:a.map(l=>Q.jsxs(S.Fragment,{children:[Q.jsx("circle",{fill:`url(#gradient-primary-${l.id})`,cx:l.x,cy:l.y,r:l.r}),Q.jsx("circle",{fill:`url(#gradient-secondary-${l.id})`,cx:l.y,cy:l.x,r:l.r/2})]},l.id))})]})]})});const MC=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[i,s]=S.useState(!1),o=a=>{s(!0),r==null||r(a)};return Q.jsx(ge,{as:fd.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:i?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},NC="Dialog",[OC,AK]=Or(NC);OC(NC);const $D="DialogPortal";OC($D,{forceMount:void 0});Ot({defaultClassName:"",variantClassNames:{shadows:{true:"_1vqx0w93",false:"_1vqx0w94"},direction:{vertical:"_1vqx0w95",horizontal:"_1vqx0w96"}},defaultVariants:{},compoundVariants:[]});Ot({defaultClassName:"fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w91",horizontal:"_1vqx0w92"}},defaultVariants:{},compoundVariants:[]});Ot({defaultClassName:"_5b32m95 fyvr11d8 fyvr11dw fyvr11bg fyvr11by fyvr11c4 fyvr11cm fyvr11ls fyvr11m8 fyvr12vk fyvr12ve fyvr11h0 fyvr11i4 fyvr11hs fyvr11pn fyvr1mo fyvr1om",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]});var FD=Ot({defaultClassName:"fyvr1t4 fyvr1v0 fyvr12vh fyvr12vb fyvr11gw fyvr128 fyvr15o",variantClassNames:{numeric:{false:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",true:"fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8"}},defaultVariants:{},compoundVariants:[]}),jD="_1acm19y1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12rh fyvr1g0 fyvr118g",UD=Ot({defaultClassName:"",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const DC=S.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:l="",labelLocation:f="hidden",leftIcon:c,rightIcon:u,name:h,controls:v,type:x="text",numeric:g=!1,...k}=t;return Q.jsx(Vl,{description:s,disabled:o,display:"grid",id:a??h,label:l,labelLocation:f,children:Q.jsx(ge,{width:"full",children:Q.jsxs(ge,{className:Jr(jD,UD({borderRadius:i})),children:[c&&Q.jsx(c,{size:"sm"}),Q.jsx(ge,{as:r,autoComplete:n,spellCheck:"false",className:FD({numeric:g}),disabled:o,id:a??h,name:h,ref:e,type:x,...k}),u&&Q.jsx(u,{size:"sm"}),v]})})})}),zD=RegExp("^\\d*(?:\\\\[.])?\\d*$");function VD(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}S.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:i,onBlur:s,...o}=t,a=f=>{let{value:c}=f.target;c=c.replace(/,/g,"."),c.startsWith(".")&&(c="0"+c),c.startsWith("0")&&(c=c.replace(/^0+(?=\d)/,"")),(c===""||zD.test(VD(c)))&&(i==null||i({...f,target:{...f.target,value:c}}))},l=f=>{const{value:c}=f.target;let u=c;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),s==null||s(f),u!==c&&(i==null||i({...f,target:{...f.target,value:u}}))};return Q.jsx(DC,{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})});Ot({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const BC="Progress",kh=100,[HD,EK]=Or(BC),[WD,SK]=HD(BC),qD=S.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:i,getValueLabel:s=GD,...o}=t,a=Yy(i)?i:kh,l=LC(n,a)?n:null,f=b0(l)?s(l,a):void 0;return S.createElement(WD,{scope:r,value:l,max:a},S.createElement($e.div,ue({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":b0(l)?l:void 0,"aria-valuetext":f,role:"progressbar","data-state":KD(l,a),"data-value":l??void 0,"data-max":a},o,{ref:e})))});qD.propTypes={max(t,e,r){const n=t[e],i=String(n);return n&&!Yy(n)?new Error(JD(i,r)):null},value(t,e,r){const n=t[e],i=String(n),s=Yy(t.max)?t.max:kh;return n!=null&&!LC(n,s)?new Error(QD(i,r)):null}};function GD(t,e){return`${Math.round(t/e*100)}%`}function KD(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function b0(t){return typeof t=="number"}function Yy(t){return b0(t)&&!isNaN(t)&&t>0}function LC(t,e){return b0(t)&&!isNaN(t)&&t<=e&&t>=0}function JD(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${kh}\`.`}function QD(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 ${Sh} if no \`max\` prop is set) + - less than the value passed to \`max\` (or ${kh} if no \`max\` prop is set) - \`null\` if the progress is indeterminate. -Defaulting to \`null\`.`}const $C="Radio",[QB,FC]=Or($C),[YB,XB]=QB($C),ZB=S.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:i=!1,required:s,disabled:o,value:a="on",onCheck:l,...f}=t,[c,u]=S.useState(null),h=Nt(e,g=>u(g)),v=S.useRef(!1),x=c?Boolean(c.closest("form")):!0;return S.createElement(YB,{scope:r,checked:i,disabled:o},S.createElement($e.button,ue({type:"button",role:"radio","aria-checked":i,"data-state":jC(i),"data-disabled":o?"":void 0,disabled:o,value:a},f,{ref:h,onClick:Ce(t.onClick,g=>{i||l==null||l(),x&&(v.current=g.isPropagationStopped(),v.current||g.stopPropagation())})})),x&&S.createElement(rD,{control:c,bubbles:!v.current,name:n,value:a,checked:i,required:s,disabled:o,style:{transform:"translateX(-100%)"}}))}),eD="RadioIndicator",tD=S.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...i}=t,s=XB(eD,r);return S.createElement(Jc,{present:n||s.checked},S.createElement($e.span,ue({"data-state":jC(s.checked),"data-disabled":s.disabled?"":void 0},i,{ref:e})))}),rD=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=S.useRef(null),o=gm(r),a=mm(e);return S.useEffect(()=>{const l=s.current,f=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(f,"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",ue({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 jC(t){return t?"checked":"unchecked"}const nD=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],UC="RadioGroup",[iD,AK]=Or(UC,[ql,FC]),zC=ql(),VC=FC(),[sD,oD]=iD(UC),aD=S.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:l,dir:f,loop:c=!0,onValueChange:u,...h}=t,v=zC(r),x=Cm(f),[g,k]=Sl({prop:s,defaultProp:i,onChange:u});return S.createElement(sD,{scope:r,name:n,required:o,disabled:a,value:g,onValueChange:k},S.createElement(mO,ue({asChild:!0},v,{orientation:l,dir:x,loop:c}),S.createElement($e.div,ue({role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:x},h,{ref:e}))))}),lD="RadioGroupItem",fD=S.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...i}=t,s=oD(lD,r),o=s.disabled||n,a=zC(r),l=VC(r),f=S.useRef(null),c=Nt(e,f),u=s.value===i.value,h=S.useRef(!1);return S.useEffect(()=>{const v=g=>{nD.includes(g.key)&&(h.current=!0)},x=()=>h.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",x)}},[]),S.createElement(dC,ue({asChild:!0},a,{focusable:!o,active:u}),S.createElement(ZB,ue({disabled:o,required:s.required,checked:u},l,i,{name:s.name,ref:c,onCheck:()=>s.onValueChange(i.value),onKeyDown:Ce(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:Ce(i.onFocus,()=>{var v;h.current&&((v=f.current)===null||v===void 0||v.click())})})))}),cD=S.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,i=VC(r);return S.createElement(tD,ue({},i,n,{ref:e}))}),uD=aD,dD=fD,hD=cD;var vD=Ot({defaultClassName:"io59uy6 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12rh",variantClassNames:{size:{sm:"io59uy7",lg:"io59uy8"}},defaultVariants:{},compoundVariants:[]}),yD=Ot({defaultClassName:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr12jb fyvr12c5 fyvr11xt fyvr124z fyvr12mn fyvr12fh fyvr1215 fyvr128b fyvr11ob fyvr12tz fyvr12tv fyvr12uj",variantClassNames:{size:{sm:"io59uy3 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy4 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]});const pD=t=>{const{id:e,label:r,size:n="sm",value:i,disabled:s}=t;return Q.jsx(ge,{alignItems:"center",children:Q.jsx(zl,{disabled:s,display:"flex",id:e,label:r,labelLocation:"right",children:Q.jsx(dD,{className:yD({size:n}),value:i,id:e,disabled:s,children:Q.jsx(hD,{className:vD({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 Q.jsx(uD,{disabled:n,name:s,ref:e,...l,children:Q.jsx(ge,{flexDirection:r,gap:i,children:o.map(({label:f,value:c,disabled:u})=>Q.jsx(pD,{id:`${s}-${c}`,label:f,size:a,value:c,disabled:u},c))})})});function kw(t,[e,r]){return Math.min(r,Math.max(e,t))}const HC=S.forwardRef((t,e)=>S.createElement($e.span,ue({},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}}))),gD=[" ","Enter","ArrowUp","ArrowDown"],mD=[" ","Enter"],kh="Select",[_h,Tm,xD]=bh(kh),[Gl,EK]=Or(kh,[xD,Wl]),Pm=Wl(),[bD,ya]=Gl(kh),[wD,CD]=Gl(kh),AD=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:l,dir:f,name:c,autoComplete:u,disabled:h,required:v}=t,x=Pm(e),[g,k]=S.useState(null),[w,A]=S.useState(null),[E,I]=S.useState(!1),M=Cm(f),[$=!1,j]=Sl({prop:n,defaultProp:i,onChange:s}),[U,W]=Sl({prop:o,defaultProp:a,onChange:l}),q=S.useRef(null),G=g?Boolean(g.closest("form")):!0,[re,D]=S.useState(new Set),y=Array.from(re).map(C=>C.props.value).join(";");return S.createElement(tO,x,S.createElement(bD,{required:v,scope:e,trigger:g,onTriggerChange:k,valueNode:w,onValueNodeChange:A,valueNodeHasChildren:E,onValueNodeHasChildrenChange:I,contentId:Qc(),value:U,onValueChange:W,open:$,onOpenChange:j,dir:M,triggerPointerDownPosRef:q,disabled:h},S.createElement(_h.Provider,{scope:e},S.createElement(wD,{scope:t.__scopeSelect,onNativeOptionAdd:S.useCallback(C=>{D(P=>new Set(P).add(C))},[]),onNativeOptionRemove:S.useCallback(C=>{D(P=>{const O=new Set(P);return O.delete(C),O})},[])},r)),G?S.createElement(qC,{key:y,"aria-hidden":!0,required:v,tabIndex:-1,name:c,autoComplete:u,value:U,onChange:C=>W(C.target.value),disabled:h},U===void 0?S.createElement("option",{value:""}):null,Array.from(re)):null))},ED="SelectTrigger",SD=S.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...i}=t,s=Pm(r),o=ya(ED,r),a=o.disabled||n,l=Nt(e,o.onTriggerChange),f=Tm(r),[c,u,h]=GC(x=>{const g=f().filter(A=>!A.disabled),k=g.find(A=>A.value===o.value),w=KC(g,x,k);w!==void 0&&o.onValueChange(w.value)}),v=()=>{a||(o.onOpenChange(!0),h())};return S.createElement(rO,ue({asChild:!0},s),S.createElement($e.button,ue({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":o.value===void 0?"":void 0},i,{ref:l,onClick:Ce(i.onClick,x=>{x.currentTarget.focus()}),onPointerDown:Ce(i.onPointerDown,x=>{const g=x.target;g.hasPointerCapture(x.pointerId)&&g.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(v(),o.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)},x.preventDefault())}),onKeyDown:Ce(i.onKeyDown,x=>{const g=c.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&u(x.key),!(g&&x.key===" ")&&gD.includes(x.key)&&(v(),x.preventDefault())})})))}),kD="SelectValue",_D=S.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,children:s,placeholder:o,...a}=t,l=ya(kD,r),{onValueNodeHasChildrenChange:f}=l,c=s!==void 0,u=Nt(e,l.onValueNodeChange);return xn(()=>{f(c)},[f,c]),S.createElement($e.span,ue({},a,{ref:u,style:{pointerEvents:"none"}}),l.value===void 0&&o!==void 0?o:s)}),TD=S.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...i}=t;return S.createElement($e.span,ue({"aria-hidden":!0},i,{ref:e}),n||"▼")}),_l="SelectContent",PD=S.forwardRef((t,e)=>{const r=ya(_l,t.__scopeSelect),[n,i]=S.useState();if(xn(()=>{i(new DocumentFragment)},[]),!r.open){const s=n;return s?Ti.createPortal(S.createElement(WC,{scope:t.__scopeSelect},S.createElement(_h.Slot,{scope:t.__scopeSelect},S.createElement("div",null,t.children))),s):null}return S.createElement(ID,ue({},t,{ref:e}))}),$i=10,[WC,Th]=Gl(_l),ID=S.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:l,align:f,alignOffset:c,arrowPadding:u,collisionBoundary:h,collisionPadding:v,sticky:x,hideWhenDetached:g,avoidCollisions:k,...w}=t,A=ya(_l,r),[E,I]=S.useState(null),[M,$]=S.useState(null),j=Nt(e,L=>I(L)),[U,W]=S.useState(null),[q,G]=S.useState(null),re=Tm(r),[D,y]=S.useState(!1),C=S.useRef(!1);S.useEffect(()=>{if(E)return CO(E)},[E]),CN();const P=S.useCallback(L=>{const[F,...H]=re().map(X=>X.ref.current),[Z]=H.slice(-1),K=document.activeElement;for(const X of L)if(X===K||(X==null||X.scrollIntoView({block:"nearest"}),X===F&&M&&(M.scrollTop=0),X===Z&&M&&(M.scrollTop=M.scrollHeight),X==null||X.focus(),document.activeElement!==K))return},[re,M]),O=S.useCallback(()=>P([U,E]),[P,U,E]);S.useEffect(()=>{D&&O()},[D,O]);const{onOpenChange:m,triggerPointerDownPosRef:T}=A;S.useEffect(()=>{if(E){let L={x:0,y:0};const F=Z=>{var K,X,ve,ie;L={x:Math.abs(Math.round(Z.pageX)-((K=(X=T.current)===null||X===void 0?void 0:X.x)!==null&&K!==void 0?K:0)),y:Math.abs(Math.round(Z.pageY)-((ve=(ie=T.current)===null||ie===void 0?void 0:ie.y)!==null&&ve!==void 0?ve:0))}},H=Z=>{L.x<=10&&L.y<=10?Z.preventDefault():E.contains(Z.target)||m(!1),document.removeEventListener("pointermove",F),T.current=null};return T.current!==null&&(document.addEventListener("pointermove",F),document.addEventListener("pointerup",H,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",F),document.removeEventListener("pointerup",H,{capture:!0})}}},[E,m,T]),S.useEffect(()=>{const L=()=>m(!1);return window.addEventListener("blur",L),window.addEventListener("resize",L),()=>{window.removeEventListener("blur",L),window.removeEventListener("resize",L)}},[m]);const[R,b]=GC(L=>{const F=re().filter(K=>!K.disabled),H=F.find(K=>K.ref.current===document.activeElement),Z=KC(F,L,H);Z&&setTimeout(()=>Z.ref.current.focus())}),d=S.useCallback((L,F,H)=>{const Z=!C.current&&!H;(A.value!==void 0&&A.value===F||Z)&&(W(L),Z&&(C.current=!0))},[A.value]),_=S.useCallback(()=>E==null?void 0:E.focus(),[E]),N=S.useCallback((L,F,H)=>{const Z=!C.current&&!H;(A.value!==void 0&&A.value===F||Z)&&G(L)},[A.value]),p=n==="popper"?_w:RD,B=p===_w?{side:a,sideOffset:l,align:f,alignOffset:c,arrowPadding:u,collisionBoundary:h,collisionPadding:v,sticky:x,hideWhenDetached:g,avoidCollisions:k}:{};return S.createElement(WC,{scope:r,content:E,viewport:M,onViewportChange:$,itemRefCallback:d,selectedItem:U,onItemLeave:_,itemTextRefCallback:N,focusSelectedItem:O,selectedItemText:q,position:n,isPositioned:D,searchRef:R},S.createElement(nB,{as:_c,allowPinchZoom:!0},S.createElement(AN,{asChild:!0,trapped:A.open,onMountAutoFocus:L=>{L.preventDefault()},onUnmountAutoFocus:Ce(i,L=>{var F;(F=A.trigger)===null||F===void 0||F.focus({preventScroll:!0}),L.preventDefault()})},S.createElement(H4,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:L=>L.preventDefault(),onDismiss:()=>A.onOpenChange(!1)},S.createElement(p,ue({role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed",dir:A.dir,onContextMenu:L=>L.preventDefault()},w,B,{onPlaced:()=>y(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Ce(w.onKeyDown,L=>{const F=L.ctrlKey||L.altKey||L.metaKey;if(L.key==="Tab"&&L.preventDefault(),!F&&L.key.length===1&&b(L.key),["ArrowUp","ArrowDown","Home","End"].includes(L.key)){let Z=re().filter(K=>!K.disabled).map(K=>K.ref.current);if(["ArrowUp","End"].includes(L.key)&&(Z=Z.slice().reverse()),["ArrowUp","ArrowDown"].includes(L.key)){const K=L.target,X=Z.indexOf(K);Z=Z.slice(X+1)}setTimeout(()=>P(Z)),L.preventDefault()}})}))))))}),RD=S.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...i}=t,s=ya(_l,r),o=Th(_l,r),[a,l]=S.useState(null),[f,c]=S.useState(null),u=Nt(e,j=>c(j)),h=Tm(r),v=S.useRef(!1),x=S.useRef(!0),{viewport:g,selectedItem:k,selectedItemText:w,focusSelectedItem:A}=o,E=S.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&f&&g&&k&&w){const j=s.trigger.getBoundingClientRect(),U=f.getBoundingClientRect(),W=s.valueNode.getBoundingClientRect(),q=w.getBoundingClientRect();if(s.dir!=="rtl"){const K=q.left-U.left,X=W.left-K,ve=j.left-X,ie=j.width+ve,ye=Math.max(ie,U.width),Qt=window.innerWidth-$i,Me=kw(X,[$i,Qt-ye]);a.style.minWidth=ie+"px",a.style.left=Me+"px"}else{const K=U.right-q.right,X=window.innerWidth-W.right-K,ve=window.innerWidth-j.right-X,ie=j.width+ve,ye=Math.max(ie,U.width),Qt=window.innerWidth-$i,Me=kw(X,[$i,Qt-ye]);a.style.minWidth=ie+"px",a.style.right=Me+"px"}const G=h(),re=window.innerHeight-$i*2,D=g.scrollHeight,y=window.getComputedStyle(f),C=parseInt(y.borderTopWidth,10),P=parseInt(y.paddingTop,10),O=parseInt(y.borderBottomWidth,10),m=parseInt(y.paddingBottom,10),T=C+P+D+m+O,R=Math.min(k.offsetHeight*5,T),b=window.getComputedStyle(g),d=parseInt(b.paddingTop,10),_=parseInt(b.paddingBottom,10),N=j.top+j.height/2-$i,p=re-N,B=k.offsetHeight/2,L=k.offsetTop+B,F=C+P+L,H=T-F;if(F<=N){const K=k===G[G.length-1].ref.current;a.style.bottom="0px";const X=f.clientHeight-g.offsetTop-g.offsetHeight,ve=Math.max(p,B+(K?_:0)+X+O),ie=F+ve;a.style.height=ie+"px"}else{const K=k===G[0].ref.current;a.style.top="0px";const ve=Math.max(N,C+g.offsetTop+(K?d:0)+B)+H;a.style.height=ve+"px",g.scrollTop=F-N+g.offsetTop}a.style.margin=`${$i}px 0`,a.style.minHeight=R+"px",a.style.maxHeight=re+"px",n==null||n(),requestAnimationFrame(()=>v.current=!0)}},[h,s.trigger,s.valueNode,a,f,g,k,w,s.dir,n]);xn(()=>E(),[E]);const[I,M]=S.useState();xn(()=>{f&&M(window.getComputedStyle(f).zIndex)},[f]);const $=S.useCallback(j=>{j&&x.current===!0&&(E(),A==null||A(),x.current=!1)},[E,A]);return S.createElement(MD,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:v,onScrollButtonChange:$},S.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:I}},S.createElement($e.div,ue({},i,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),_w=S.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=$i,...s}=t,o=Pm(r);return S.createElement(nO,ue({},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)"}}))}),[MD,ND]=Gl(_l,{}),Tw="SelectViewport",OD=S.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=Th(Tw,r),s=ND(Tw,r),o=Nt(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(_h.Slot,{scope:r},S.createElement($e.div,ue({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:Ce(n.onScroll,l=>{const f=l.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:u}=s;if(u!=null&&u.current&&c){const h=Math.abs(a.current-f.scrollTop);if(h>0){const v=window.innerHeight-$i*2,x=parseFloat(c.style.minHeight),g=parseFloat(c.style.height),k=Math.max(x,g);if(k0?E:0,c.style.justifyContent="flex-end")}}}a.current=f.scrollTop})}))))}),BD="SelectGroup",[DD,SK]=Gl(BD),LD=S.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=Qc();return S.createElement(DD,{scope:r,id:i},S.createElement($e.div,ue({role:"group","aria-labelledby":i},n,{ref:e})))}),Yy="SelectItem",[$D,FD]=Gl(Yy),jD=S.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:s,...o}=t,a=ya(Yy,r),l=Th(Yy,r),f=a.value===n,[c,u]=S.useState(s??""),[h,v]=S.useState(!1),x=Nt(e,w=>{var A;return(A=l.itemRefCallback)===null||A===void 0?void 0:A.call(l,w,n,i)}),g=Qc(),k=()=>{i||(a.onValueChange(n),a.onOpenChange(!1))};return S.createElement($D,{scope:r,value:n,disabled:i,textId:g,isSelected:f,onItemTextChange:S.useCallback(w=>{u(A=>{var E;return A||((E=w==null?void 0:w.textContent)!==null&&E!==void 0?E:"").trim()})},[])},S.createElement(_h.ItemSlot,{scope:r,value:n,disabled:i,textValue:c},S.createElement($e.div,ue({role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":f&&h,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},o,{ref:x,onFocus:Ce(o.onFocus,()=>v(!0)),onBlur:Ce(o.onBlur,()=>v(!1)),onPointerUp:Ce(o.onPointerUp,k),onPointerMove:Ce(o.onPointerMove,w=>{if(i){var A;(A=l.onItemLeave)===null||A===void 0||A.call(l)}else w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ce(o.onPointerLeave,w=>{if(w.currentTarget===document.activeElement){var A;(A=l.onItemLeave)===null||A===void 0||A.call(l)}}),onKeyDown:Ce(o.onKeyDown,w=>{var A;((A=l.searchRef)===null||A===void 0?void 0:A.current)!==""&&w.key===" "||(mD.includes(w.key)&&k(),w.key===" "&&w.preventDefault())})}))))}),Du="SelectItemText",UD=S.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,...s}=t,o=ya(Du,r),a=Th(Du,r),l=FD(Du,r),f=CD(Du,r),[c,u]=S.useState(null),h=Nt(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)}),v=c==null?void 0:c.textContent,x=S.useMemo(()=>S.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},v),[l.disabled,l.value,v]),{onNativeOptionAdd:g,onNativeOptionRemove:k}=f;return xn(()=>(g(x),()=>k(x)),[g,k,x]),S.createElement(S.Fragment,null,S.createElement($e.span,ue({id:l.textId},s,{ref:h})),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Ti.createPortal(s.children,o.valueNode):null)}),qC=S.forwardRef((t,e)=>{const{value:r,...n}=t,i=S.useRef(null),s=Nt(e,i),o=gm(r);return S.useEffect(()=>{const a=i.current,l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&c){const u=new Event("change",{bubbles:!0});c.call(a,r),a.dispatchEvent(u)}},[o,r]),S.createElement(HC,{asChild:!0},S.createElement("select",ue({},n,{ref:s,defaultValue:r})))});qC.displayName="BubbleSelect";function GC(t){const e=Bn(t),r=S.useRef(""),n=S.useRef(0),i=S.useCallback(o=>{const a=r.current+o;e(a),function l(f){r.current=f,window.clearTimeout(n.current),f!==""&&(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 KC(t,e,r){const i=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,s=r?t.indexOf(r):-1;let o=zD(t,Math.max(s,0));i.length===1&&(o=o.filter(f=>f!==r));const l=o.find(f=>f.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==r?l:void 0}function zD(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const VD=AD,HD=SD,WD=_D,qD=TD,GD=PD,KD=OD,JD=LD,QD=jD,YD=UD;var XD="gohwum9 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11rb fyvr12rh fyvr11nj",ZD="gohwumd fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12vk fyvr12vl fyvr12ve fyvr12vf fyvr11h0 fyvr11jw fyvr11ko fyvr12tz fyvr12tv fyvr12rh fyvr12ut fyvr12uj",eL="gohwum1 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12rh fyvr118c fyvr11jw fyvr11n2 fyvr12tz",tL=Ot({defaultClassName:"",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const rL=S.forwardRef(({children:t,className:e,...r},n)=>Q.jsx(QD,{className:Jr(ZD,e),...r,ref:n,children:Q.jsx(YD,{children:t})})),nL=S.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:i,label:s="",description:o,labelLocation:a="hidden",name:l,options:f,placeholder:c,...u}=t;return Q.jsx(zl,{disabled:n,display:"grid",id:i??l,label:s,labelLocation:a,description:o,whiteSpace:"nowrap",children:Q.jsxs(VD,{disabled:n,name:l,...u,children:[Q.jsxs(HD,{id:i??l,className:Jr(eL,tL({borderRadius:r})),ref:e,children:[Q.jsx(WD,{placeholder:c}),Q.jsx(ge,{as:qD,display:"inline-flex",children:Q.jsx(j4,{})})]}),Q.jsx(GD,{className:XD,children:Q.jsx(KD,{children:Q.jsx(JD,{children:f.map(({value:h,label:v,...x})=>Q.jsx(rL,{value:h,...x,children:v},h))})})})]})})});S.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:i="Search",name:s="search",value:o,...a}=t,l=o?Q.jsx(RC,{icon:U4,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return Q.jsx(BC,{ref:e,name:s,leftIcon:WM,controls:r||l,placeholder:i,value:o,onChange:f=>n==null?void 0:n(f),...a})});var iL=Ot({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});S.forwardRef((t,e)=>{const{size:r="md",...n}=t;return Q.jsx(ge,{className:iL({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"})]})})});S.forwardRef(({children:t},e)=>Q.jsx(ge,{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 JC="Switch",[sL,kK]=Or(JC);sL(JC);Ot({defaultClassName:"",variantClassNames:{active:{true:"fyvr11rn fyvr12rn fyvr12ux",false:"fyvr11ob fyvr12rb"},disabled:{true:"fyvr12uh"}},defaultVariants:{},compoundVariants:[]});const QC="Tabs",[oL,_K]=Or(QC,[ql]);ql();oL(QC);var aL="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 Q.jsxs(ge,{className:aL,ref:e,background:"buttonGlass",...i,children:[r&&Q.jsx(r,{size:"xs"}),Q.jsx(sr,{children:n})]})});const lL="ToastProvider",[fL,TK,cL]=bh("Toast"),[YC,PK]=Or("Toast",[cL]),[IK,XC]=YC(lL),Pw="toast.viewportPause",Iw="toast.viewportResume",Ph="Toast",uL="toast.swipeStart",dL="toast.swipeMove",hL="toast.swipeCancel",vL="toast.swipeEnd",[yL,pL]=YC(Ph,{onClose(){}}),gL=S.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:f,onSwipeStart:c,onSwipeMove:u,onSwipeCancel:h,onSwipeEnd:v,...x}=t,g=XC(Ph,r),[k,w]=S.useState(null),A=Nt(e,y=>w(y)),E=S.useRef(null),I=S.useRef(null),M=i||g.duration,$=S.useRef(0),j=S.useRef(M),U=S.useRef(0),{onToastAdd:W,onToastRemove:q}=g,G=Bn(()=>{var y;(k==null?void 0:k.contains(document.activeElement))&&((y=g.viewport)===null||y===void 0||y.focus()),o()}),re=S.useCallback(y=>{!y||y===1/0||(window.clearTimeout(U.current),$.current=new Date().getTime(),U.current=window.setTimeout(G,y))},[G]);S.useEffect(()=>{const y=g.viewport;if(y){const C=()=>{re(j.current),f==null||f()},P=()=>{const O=new Date().getTime()-$.current;j.current=j.current-O,window.clearTimeout(U.current),l==null||l()};return y.addEventListener(Pw,P),y.addEventListener(Iw,C),()=>{y.removeEventListener(Pw,P),y.removeEventListener(Iw,C)}}},[g.viewport,M,l,f,re]),S.useEffect(()=>{s&&!g.isClosePausedRef.current&&re(M)},[s,M,g.isClosePausedRef,re]),S.useEffect(()=>(W(),()=>q()),[W,q]);const D=S.useMemo(()=>k?e7(k):null,[k]);return g.viewport?S.createElement(S.Fragment,null,D&&S.createElement(mL,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},D),S.createElement(yL,{scope:r,onClose:G},Ti.createPortal(S.createElement(fL.ItemSlot,{scope:r},S.createElement(wN,{asChild:!0,onEscapeKeyDown:Ce(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||G(),g.isFocusedToastEscapeKeyDownRef.current=!1})},S.createElement($e.li,ue({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":g.swipeDirection},x,{ref:A,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Ce(t.onKeyDown,y=>{y.key==="Escape"&&(a==null||a(y.nativeEvent),y.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,G()))}),onPointerDown:Ce(t.onPointerDown,y=>{y.button===0&&(E.current={x:y.clientX,y:y.clientY})}),onPointerMove:Ce(t.onPointerMove,y=>{if(!E.current)return;const C=y.clientX-E.current.x,P=y.clientY-E.current.y,O=Boolean(I.current),m=["left","right"].includes(g.swipeDirection),T=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,R=m?T(0,C):0,b=m?0:T(0,P),d=y.pointerType==="touch"?10:2,_={x:R,y:b},N={originalEvent:y,delta:_};O?(I.current=_,Lu(dL,u,N,{discrete:!1})):Rw(_,g.swipeDirection,d)?(I.current=_,Lu(uL,c,N,{discrete:!1}),y.target.setPointerCapture(y.pointerId)):(Math.abs(C)>d||Math.abs(P)>d)&&(E.current=null)}),onPointerUp:Ce(t.onPointerUp,y=>{const C=I.current,P=y.target;if(P.hasPointerCapture(y.pointerId)&&P.releasePointerCapture(y.pointerId),I.current=null,E.current=null,C){const O=y.currentTarget,m={originalEvent:y,delta:C};Rw(C,g.swipeDirection,g.swipeThreshold)?Lu(vL,v,m,{discrete:!0}):Lu(hL,h,m,{discrete:!0}),O.addEventListener("click",T=>T.preventDefault(),{once:!0})}})})))),g.viewport))):null});gL.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${Ph}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const mL=t=>{const{__scopeToast:e,children:r,...n}=t,i=XC(Ph,e),[s,o]=S.useState(!1),[a,l]=S.useState(!1);return AL(()=>o(!0)),S.useEffect(()=>{const f=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(f)},[]),a?null:S.createElement(iO,{asChild:!0},S.createElement(HC,n,s&&S.createElement(S.Fragment,null,i.label," ",r)))},xL="ToastAction",bL=S.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?S.createElement(ZC,{altText:r,asChild:!0},S.createElement(CL,ue({},n,{ref:e}))):null});bL.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${xL}\``)}};const wL="ToastClose",CL=S.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,i=pL(wL,r);return S.createElement(ZC,{asChild:!0},S.createElement($e.button,ue({type:"button"},n,{ref:e,onClick:Ce(t.onClick,i.onClose)})))}),ZC=S.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...i}=t;return S.createElement($e.div,ue({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},i,{ref:e}))});function e7(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),EL(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(...e7(n))}}),e}function Lu(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?xm(i,s):i.dispatchEvent(s)}const Rw=(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 AL(t=()=>{}){const e=Bn(t);xn(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function EL(t){return t.nodeType===t.ELEMENT_NODE}Ot({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});S.createContext(null);var SL="_15pztn2",kL="_15pztn1 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12rh 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:f="hidden",name:c,rows:u,resize:h=!1,...v}=t;return Q.jsx(zl,{description:s,disabled:o,display:"grid",id:a??c,label:l,labelLocation:f,children:Q.jsx(ge,{as:r,autoComplete:n,spellCheck:"false",className:Jr(kL,h&&SL),disabled:o,id:a??c,name:c,ref:e,rows:u,borderRadius:i,...v})})});const Xy=["dark","light"],_L="dark",TL="data-theme",t7="@sequence.theme",PL=()=>{const t=localStorage.getItem(t7);return Xy.includes(t)?t:_L},IL=S.createContext(null),RL=t=>{const[e,r]=S.useState(t.theme||PL());S.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),S.useEffect(()=>{t.theme&&Xy.includes(t.theme)&&r(t.theme)},[t.theme]),S.useEffect(()=>{const i=document.querySelector(":root");i&&i.setAttribute(TL,e)},[e]);const n=S.useMemo(()=>({theme:e,setTheme:i=>{Xy.includes(i)&&(localStorage.setItem(t7,i),r(i))}}),[e]);return Q.jsx(IL.Provider,{value:n,children:t.children})};var ML="bnrrebf fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11pt fyvr128 fyvr15o fyvr11h0",NL="bnrrebd",OL=Ot({defaultClassName:"fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"bnrreb5",sm:"bnrreb6",md:"bnrreb7",lg:"bnrreb8"},borderRadius:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]});const BL=S.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(ge,{className:Jr(r,OL({borderRadius:e,size:a})),style:i,flexShrink:"0",...l,children:s?Q.jsx(MC,{className:NL,disableAnimation:n,src:s}):Q.jsx(sr,{className:ML,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})}),[Ih,RK]=Or("Tooltip",[Wl]);Wl();const DL="TooltipProvider";Ih(DL);const r7="Tooltip";Ih(r7);const LL="TooltipPortal";Ih(LL,{forceMount:void 0});Ih(r7,{isInside:!1});var n7,Mw=Ti;n7=Mw.createRoot,Mw.hydrateRoot;var Zy={},$L={get exports(){return Zy},set exports(t){Zy=t}};const FL={},jL=Object.freeze(Object.defineProperty({__proto__:null,default:FL},Symbol.toStringTag,{value:"Module"})),UL=nS(jL);(function(t){(function(e,r){function n(D,y){if(!D)throw new Error(y||"Assertion failed")}function i(D,y){D.super_=y;var C=function(){};C.prototype=y.prototype,D.prototype=new C,D.prototype.constructor=D}function s(D,y,C){if(s.isBN(D))return D;this.negative=0,this.words=null,this.length=0,this.red=null,D!==null&&((y==="le"||y==="be")&&(C=y,y=10),this._init(D||0,y||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=UL.Buffer}catch{}s.isBN=function(y){return y instanceof s?!0:y!==null&&typeof y=="object"&&y.constructor.wordSize===s.wordSize&&Array.isArray(y.words)},s.max=function(y,C){return y.cmp(C)>0?y:C},s.min=function(y,C){return y.cmp(C)<0?y:C},s.prototype._init=function(y,C,P){if(typeof y=="number")return this._initNumber(y,C,P);if(typeof y=="object")return this._initArray(y,C,P);C==="hex"&&(C=16),n(C===(C|0)&&C>=2&&C<=36),y=y.toString().replace(/\s+/g,"");var O=0;y[0]==="-"&&(O++,this.negative=1),O=0;O-=3)T=y[O]|y[O-1]<<8|y[O-2]<<16,this.words[m]|=T<>>26-R&67108863,R+=24,R>=26&&(R-=26,m++);else if(P==="le")for(O=0,m=0;O>>26-R&67108863,R+=24,R>=26&&(R-=26,m++);return this._strip()};function a(D,y){var C=D.charCodeAt(y);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,y,C){var P=a(D,C);return C-1>=y&&(P|=a(D,C-1)<<4),P}s.prototype._parseHex=function(y,C,P){this.length=Math.ceil((y.length-C)/6),this.words=new Array(this.length);for(var O=0;O=C;O-=2)R=l(y,C,O)<=18?(m-=18,T+=1,this.words[T]|=R>>>26):m+=8;else{var b=y.length-C;for(O=b%2===0?C+1:C;O=18?(m-=18,T+=1,this.words[T]|=R>>>26):m+=8}this._strip()};function f(D,y,C,P){for(var O=0,m=0,T=Math.min(D.length,C),R=y;R=49?m=b-49+10:b>=17?m=b-17+10:m=b,n(b>=0&&m1&&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"],v=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],x=[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(y,C){y=y||10,C=C|0||1;var P;if(y===16||y==="hex"){P="";for(var O=0,m=0,T=0;T>>24-O&16777215,O+=2,O>=26&&(O-=26,T--),m!==0||T!==this.length-1?P=h[6-b.length]+b+P:P=b+P}for(m!==0&&(P=m.toString(16)+P);P.length%C!==0;)P="0"+P;return this.negative!==0&&(P="-"+P),P}if(y===(y|0)&&y>=2&&y<=36){var d=v[y],_=x[y];P="";var N=this.clone();for(N.negative=0;!N.isZero();){var p=N.modrn(_).toString(y);N=N.idivn(_),N.isZero()?P=p+P:P=h[d-p.length]+p+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 y=this.words[0];return this.length===2?y+=this.words[1]*67108864:this.length===3&&this.words[2]===1?y+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-y:y},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(y,C){return this.toArrayLike(o,y,C)}),s.prototype.toArray=function(y,C){return this.toArrayLike(Array,y,C)};var g=function(y,C){return y.allocUnsafe?y.allocUnsafe(C):new y(C)};s.prototype.toArrayLike=function(y,C,P){this._strip();var O=this.byteLength(),m=P||Math.max(1,O);n(O<=m,"byte array longer than desired length"),n(m>0,"Requested array length <= 0");var T=g(y,m),R=C==="le"?"LE":"BE";return this["_toArrayLike"+R](T,O),T},s.prototype._toArrayLikeLE=function(y,C){for(var P=0,O=0,m=0,T=0;m>8&255),P>16&255),T===6?(P>24&255),O=0,T=0):(O=R>>>24,T+=2)}if(P=0&&(y[P--]=R>>8&255),P>=0&&(y[P--]=R>>16&255),T===6?(P>=0&&(y[P--]=R>>24&255),O=0,T=0):(O=R>>>24,T+=2)}if(P>=0)for(y[P--]=O;P>=0;)y[P--]=0},Math.clz32?s.prototype._countBits=function(y){return 32-Math.clz32(y)}:s.prototype._countBits=function(y){var C=y,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(y){if(y===0)return 26;var C=y,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 y=this.words[this.length-1],C=this._countBits(y);return(this.length-1)*26+C};function k(D){for(var y=new Array(D.bitLength()),C=0;C>>O&1}return y}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var y=0,C=0;Cy.length?this.clone().ior(y):y.clone().ior(this)},s.prototype.uor=function(y){return this.length>y.length?this.clone().iuor(y):y.clone().iuor(this)},s.prototype.iuand=function(y){var C;this.length>y.length?C=y:C=this;for(var P=0;Py.length?this.clone().iand(y):y.clone().iand(this)},s.prototype.uand=function(y){return this.length>y.length?this.clone().iuand(y):y.clone().iuand(this)},s.prototype.iuxor=function(y){var C,P;this.length>y.length?(C=this,P=y):(C=y,P=this);for(var O=0;Oy.length?this.clone().ixor(y):y.clone().ixor(this)},s.prototype.uxor=function(y){return this.length>y.length?this.clone().iuxor(y):y.clone().iuxor(this)},s.prototype.inotn=function(y){n(typeof y=="number"&&y>=0);var C=Math.ceil(y/26)|0,P=y%26;this._expand(C),P>0&&C--;for(var O=0;O0&&(this.words[O]=~this.words[O]&67108863>>26-P),this._strip()},s.prototype.notn=function(y){return this.clone().inotn(y)},s.prototype.setn=function(y,C){n(typeof y=="number"&&y>=0);var P=y/26|0,O=y%26;return this._expand(P+1),C?this.words[P]=this.words[P]|1<y.length?(P=this,O=y):(P=y,O=this);for(var m=0,T=0;T>>26;for(;m!==0&&T>>26;if(this.length=P.length,m!==0)this.words[this.length]=m,this.length++;else if(P!==this)for(;Ty.length?this.clone().iadd(y):y.clone().iadd(this)},s.prototype.isub=function(y){if(y.negative!==0){y.negative=0;var C=this.iadd(y);return y.negative=1,C._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(y),this.negative=1,this._normSign();var P=this.cmp(y);if(P===0)return this.negative=0,this.length=1,this.words[0]=0,this;var O,m;P>0?(O=this,m=y):(O=y,m=this);for(var T=0,R=0;R>26,this.words[R]=C&67108863;for(;T!==0&&R>26,this.words[R]=C&67108863;if(T===0&&R>>26,N=b&67108863,p=Math.min(d,y.length-1),B=Math.max(0,d-D.length+1);B<=p;B++){var L=d-B|0;O=D.words[L]|0,m=y.words[B]|0,T=O*m+N,_+=T/67108864|0,N=T&67108863}C.words[d]=N|0,b=_|0}return b!==0?C.words[d]=b|0:C.length--,C._strip()}var A=function(y,C,P){var O=y.words,m=C.words,T=P.words,R=0,b,d,_,N=O[0]|0,p=N&8191,B=N>>>13,L=O[1]|0,F=L&8191,H=L>>>13,Z=O[2]|0,K=Z&8191,X=Z>>>13,ve=O[3]|0,ie=ve&8191,ye=ve>>>13,Qt=O[4]|0,Me=Qt&8191,Se=Qt>>>13,St=O[5]|0,De=St&8191,Ge=St>>>13,lo=O[6]|0,Ke=lo&8191,Je=lo>>>13,fo=O[7]|0,Qe=fo&8191,Ye=fo>>>13,co=O[8]|0,Xe=co&8191,Ze=co>>>13,uo=O[9]|0,et=uo&8191,tt=uo>>>13,ho=m[0]|0,rt=ho&8191,nt=ho>>>13,vo=m[1]|0,it=vo&8191,st=vo>>>13,yo=m[2]|0,ot=yo&8191,at=yo>>>13,po=m[3]|0,lt=po&8191,ft=po>>>13,go=m[4]|0,ct=go&8191,ut=go>>>13,mo=m[5]|0,dt=mo&8191,ht=mo>>>13,xo=m[6]|0,vt=xo&8191,yt=xo>>>13,bo=m[7]|0,pt=bo&8191,gt=bo>>>13,wo=m[8]|0,mt=wo&8191,xt=wo>>>13,Co=m[9]|0,bt=Co&8191,wt=Co>>>13;P.negative=y.negative^C.negative,P.length=19,b=Math.imul(p,rt),d=Math.imul(p,nt),d=d+Math.imul(B,rt)|0,_=Math.imul(B,nt);var ps=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(ps>>>26)|0,ps&=67108863,b=Math.imul(F,rt),d=Math.imul(F,nt),d=d+Math.imul(H,rt)|0,_=Math.imul(H,nt),b=b+Math.imul(p,it)|0,d=d+Math.imul(p,st)|0,d=d+Math.imul(B,it)|0,_=_+Math.imul(B,st)|0;var gs=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(gs>>>26)|0,gs&=67108863,b=Math.imul(K,rt),d=Math.imul(K,nt),d=d+Math.imul(X,rt)|0,_=Math.imul(X,nt),b=b+Math.imul(F,it)|0,d=d+Math.imul(F,st)|0,d=d+Math.imul(H,it)|0,_=_+Math.imul(H,st)|0,b=b+Math.imul(p,ot)|0,d=d+Math.imul(p,at)|0,d=d+Math.imul(B,ot)|0,_=_+Math.imul(B,at)|0;var ms=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(ms>>>26)|0,ms&=67108863,b=Math.imul(ie,rt),d=Math.imul(ie,nt),d=d+Math.imul(ye,rt)|0,_=Math.imul(ye,nt),b=b+Math.imul(K,it)|0,d=d+Math.imul(K,st)|0,d=d+Math.imul(X,it)|0,_=_+Math.imul(X,st)|0,b=b+Math.imul(F,ot)|0,d=d+Math.imul(F,at)|0,d=d+Math.imul(H,ot)|0,_=_+Math.imul(H,at)|0,b=b+Math.imul(p,lt)|0,d=d+Math.imul(p,ft)|0,d=d+Math.imul(B,lt)|0,_=_+Math.imul(B,ft)|0;var xs=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(xs>>>26)|0,xs&=67108863,b=Math.imul(Me,rt),d=Math.imul(Me,nt),d=d+Math.imul(Se,rt)|0,_=Math.imul(Se,nt),b=b+Math.imul(ie,it)|0,d=d+Math.imul(ie,st)|0,d=d+Math.imul(ye,it)|0,_=_+Math.imul(ye,st)|0,b=b+Math.imul(K,ot)|0,d=d+Math.imul(K,at)|0,d=d+Math.imul(X,ot)|0,_=_+Math.imul(X,at)|0,b=b+Math.imul(F,lt)|0,d=d+Math.imul(F,ft)|0,d=d+Math.imul(H,lt)|0,_=_+Math.imul(H,ft)|0,b=b+Math.imul(p,ct)|0,d=d+Math.imul(p,ut)|0,d=d+Math.imul(B,ct)|0,_=_+Math.imul(B,ut)|0;var bs=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(bs>>>26)|0,bs&=67108863,b=Math.imul(De,rt),d=Math.imul(De,nt),d=d+Math.imul(Ge,rt)|0,_=Math.imul(Ge,nt),b=b+Math.imul(Me,it)|0,d=d+Math.imul(Me,st)|0,d=d+Math.imul(Se,it)|0,_=_+Math.imul(Se,st)|0,b=b+Math.imul(ie,ot)|0,d=d+Math.imul(ie,at)|0,d=d+Math.imul(ye,ot)|0,_=_+Math.imul(ye,at)|0,b=b+Math.imul(K,lt)|0,d=d+Math.imul(K,ft)|0,d=d+Math.imul(X,lt)|0,_=_+Math.imul(X,ft)|0,b=b+Math.imul(F,ct)|0,d=d+Math.imul(F,ut)|0,d=d+Math.imul(H,ct)|0,_=_+Math.imul(H,ut)|0,b=b+Math.imul(p,dt)|0,d=d+Math.imul(p,ht)|0,d=d+Math.imul(B,dt)|0,_=_+Math.imul(B,ht)|0;var Yh=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(Yh>>>26)|0,Yh&=67108863,b=Math.imul(Ke,rt),d=Math.imul(Ke,nt),d=d+Math.imul(Je,rt)|0,_=Math.imul(Je,nt),b=b+Math.imul(De,it)|0,d=d+Math.imul(De,st)|0,d=d+Math.imul(Ge,it)|0,_=_+Math.imul(Ge,st)|0,b=b+Math.imul(Me,ot)|0,d=d+Math.imul(Me,at)|0,d=d+Math.imul(Se,ot)|0,_=_+Math.imul(Se,at)|0,b=b+Math.imul(ie,lt)|0,d=d+Math.imul(ie,ft)|0,d=d+Math.imul(ye,lt)|0,_=_+Math.imul(ye,ft)|0,b=b+Math.imul(K,ct)|0,d=d+Math.imul(K,ut)|0,d=d+Math.imul(X,ct)|0,_=_+Math.imul(X,ut)|0,b=b+Math.imul(F,dt)|0,d=d+Math.imul(F,ht)|0,d=d+Math.imul(H,dt)|0,_=_+Math.imul(H,ht)|0,b=b+Math.imul(p,vt)|0,d=d+Math.imul(p,yt)|0,d=d+Math.imul(B,vt)|0,_=_+Math.imul(B,yt)|0;var Xh=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(Xh>>>26)|0,Xh&=67108863,b=Math.imul(Qe,rt),d=Math.imul(Qe,nt),d=d+Math.imul(Ye,rt)|0,_=Math.imul(Ye,nt),b=b+Math.imul(Ke,it)|0,d=d+Math.imul(Ke,st)|0,d=d+Math.imul(Je,it)|0,_=_+Math.imul(Je,st)|0,b=b+Math.imul(De,ot)|0,d=d+Math.imul(De,at)|0,d=d+Math.imul(Ge,ot)|0,_=_+Math.imul(Ge,at)|0,b=b+Math.imul(Me,lt)|0,d=d+Math.imul(Me,ft)|0,d=d+Math.imul(Se,lt)|0,_=_+Math.imul(Se,ft)|0,b=b+Math.imul(ie,ct)|0,d=d+Math.imul(ie,ut)|0,d=d+Math.imul(ye,ct)|0,_=_+Math.imul(ye,ut)|0,b=b+Math.imul(K,dt)|0,d=d+Math.imul(K,ht)|0,d=d+Math.imul(X,dt)|0,_=_+Math.imul(X,ht)|0,b=b+Math.imul(F,vt)|0,d=d+Math.imul(F,yt)|0,d=d+Math.imul(H,vt)|0,_=_+Math.imul(H,yt)|0,b=b+Math.imul(p,pt)|0,d=d+Math.imul(p,gt)|0,d=d+Math.imul(B,pt)|0,_=_+Math.imul(B,gt)|0;var Zh=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(Zh>>>26)|0,Zh&=67108863,b=Math.imul(Xe,rt),d=Math.imul(Xe,nt),d=d+Math.imul(Ze,rt)|0,_=Math.imul(Ze,nt),b=b+Math.imul(Qe,it)|0,d=d+Math.imul(Qe,st)|0,d=d+Math.imul(Ye,it)|0,_=_+Math.imul(Ye,st)|0,b=b+Math.imul(Ke,ot)|0,d=d+Math.imul(Ke,at)|0,d=d+Math.imul(Je,ot)|0,_=_+Math.imul(Je,at)|0,b=b+Math.imul(De,lt)|0,d=d+Math.imul(De,ft)|0,d=d+Math.imul(Ge,lt)|0,_=_+Math.imul(Ge,ft)|0,b=b+Math.imul(Me,ct)|0,d=d+Math.imul(Me,ut)|0,d=d+Math.imul(Se,ct)|0,_=_+Math.imul(Se,ut)|0,b=b+Math.imul(ie,dt)|0,d=d+Math.imul(ie,ht)|0,d=d+Math.imul(ye,dt)|0,_=_+Math.imul(ye,ht)|0,b=b+Math.imul(K,vt)|0,d=d+Math.imul(K,yt)|0,d=d+Math.imul(X,vt)|0,_=_+Math.imul(X,yt)|0,b=b+Math.imul(F,pt)|0,d=d+Math.imul(F,gt)|0,d=d+Math.imul(H,pt)|0,_=_+Math.imul(H,gt)|0,b=b+Math.imul(p,mt)|0,d=d+Math.imul(p,xt)|0,d=d+Math.imul(B,mt)|0,_=_+Math.imul(B,xt)|0;var e1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(e1>>>26)|0,e1&=67108863,b=Math.imul(et,rt),d=Math.imul(et,nt),d=d+Math.imul(tt,rt)|0,_=Math.imul(tt,nt),b=b+Math.imul(Xe,it)|0,d=d+Math.imul(Xe,st)|0,d=d+Math.imul(Ze,it)|0,_=_+Math.imul(Ze,st)|0,b=b+Math.imul(Qe,ot)|0,d=d+Math.imul(Qe,at)|0,d=d+Math.imul(Ye,ot)|0,_=_+Math.imul(Ye,at)|0,b=b+Math.imul(Ke,lt)|0,d=d+Math.imul(Ke,ft)|0,d=d+Math.imul(Je,lt)|0,_=_+Math.imul(Je,ft)|0,b=b+Math.imul(De,ct)|0,d=d+Math.imul(De,ut)|0,d=d+Math.imul(Ge,ct)|0,_=_+Math.imul(Ge,ut)|0,b=b+Math.imul(Me,dt)|0,d=d+Math.imul(Me,ht)|0,d=d+Math.imul(Se,dt)|0,_=_+Math.imul(Se,ht)|0,b=b+Math.imul(ie,vt)|0,d=d+Math.imul(ie,yt)|0,d=d+Math.imul(ye,vt)|0,_=_+Math.imul(ye,yt)|0,b=b+Math.imul(K,pt)|0,d=d+Math.imul(K,gt)|0,d=d+Math.imul(X,pt)|0,_=_+Math.imul(X,gt)|0,b=b+Math.imul(F,mt)|0,d=d+Math.imul(F,xt)|0,d=d+Math.imul(H,mt)|0,_=_+Math.imul(H,xt)|0,b=b+Math.imul(p,bt)|0,d=d+Math.imul(p,wt)|0,d=d+Math.imul(B,bt)|0,_=_+Math.imul(B,wt)|0;var t1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(t1>>>26)|0,t1&=67108863,b=Math.imul(et,it),d=Math.imul(et,st),d=d+Math.imul(tt,it)|0,_=Math.imul(tt,st),b=b+Math.imul(Xe,ot)|0,d=d+Math.imul(Xe,at)|0,d=d+Math.imul(Ze,ot)|0,_=_+Math.imul(Ze,at)|0,b=b+Math.imul(Qe,lt)|0,d=d+Math.imul(Qe,ft)|0,d=d+Math.imul(Ye,lt)|0,_=_+Math.imul(Ye,ft)|0,b=b+Math.imul(Ke,ct)|0,d=d+Math.imul(Ke,ut)|0,d=d+Math.imul(Je,ct)|0,_=_+Math.imul(Je,ut)|0,b=b+Math.imul(De,dt)|0,d=d+Math.imul(De,ht)|0,d=d+Math.imul(Ge,dt)|0,_=_+Math.imul(Ge,ht)|0,b=b+Math.imul(Me,vt)|0,d=d+Math.imul(Me,yt)|0,d=d+Math.imul(Se,vt)|0,_=_+Math.imul(Se,yt)|0,b=b+Math.imul(ie,pt)|0,d=d+Math.imul(ie,gt)|0,d=d+Math.imul(ye,pt)|0,_=_+Math.imul(ye,gt)|0,b=b+Math.imul(K,mt)|0,d=d+Math.imul(K,xt)|0,d=d+Math.imul(X,mt)|0,_=_+Math.imul(X,xt)|0,b=b+Math.imul(F,bt)|0,d=d+Math.imul(F,wt)|0,d=d+Math.imul(H,bt)|0,_=_+Math.imul(H,wt)|0;var r1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(r1>>>26)|0,r1&=67108863,b=Math.imul(et,ot),d=Math.imul(et,at),d=d+Math.imul(tt,ot)|0,_=Math.imul(tt,at),b=b+Math.imul(Xe,lt)|0,d=d+Math.imul(Xe,ft)|0,d=d+Math.imul(Ze,lt)|0,_=_+Math.imul(Ze,ft)|0,b=b+Math.imul(Qe,ct)|0,d=d+Math.imul(Qe,ut)|0,d=d+Math.imul(Ye,ct)|0,_=_+Math.imul(Ye,ut)|0,b=b+Math.imul(Ke,dt)|0,d=d+Math.imul(Ke,ht)|0,d=d+Math.imul(Je,dt)|0,_=_+Math.imul(Je,ht)|0,b=b+Math.imul(De,vt)|0,d=d+Math.imul(De,yt)|0,d=d+Math.imul(Ge,vt)|0,_=_+Math.imul(Ge,yt)|0,b=b+Math.imul(Me,pt)|0,d=d+Math.imul(Me,gt)|0,d=d+Math.imul(Se,pt)|0,_=_+Math.imul(Se,gt)|0,b=b+Math.imul(ie,mt)|0,d=d+Math.imul(ie,xt)|0,d=d+Math.imul(ye,mt)|0,_=_+Math.imul(ye,xt)|0,b=b+Math.imul(K,bt)|0,d=d+Math.imul(K,wt)|0,d=d+Math.imul(X,bt)|0,_=_+Math.imul(X,wt)|0;var n1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(n1>>>26)|0,n1&=67108863,b=Math.imul(et,lt),d=Math.imul(et,ft),d=d+Math.imul(tt,lt)|0,_=Math.imul(tt,ft),b=b+Math.imul(Xe,ct)|0,d=d+Math.imul(Xe,ut)|0,d=d+Math.imul(Ze,ct)|0,_=_+Math.imul(Ze,ut)|0,b=b+Math.imul(Qe,dt)|0,d=d+Math.imul(Qe,ht)|0,d=d+Math.imul(Ye,dt)|0,_=_+Math.imul(Ye,ht)|0,b=b+Math.imul(Ke,vt)|0,d=d+Math.imul(Ke,yt)|0,d=d+Math.imul(Je,vt)|0,_=_+Math.imul(Je,yt)|0,b=b+Math.imul(De,pt)|0,d=d+Math.imul(De,gt)|0,d=d+Math.imul(Ge,pt)|0,_=_+Math.imul(Ge,gt)|0,b=b+Math.imul(Me,mt)|0,d=d+Math.imul(Me,xt)|0,d=d+Math.imul(Se,mt)|0,_=_+Math.imul(Se,xt)|0,b=b+Math.imul(ie,bt)|0,d=d+Math.imul(ie,wt)|0,d=d+Math.imul(ye,bt)|0,_=_+Math.imul(ye,wt)|0;var i1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(i1>>>26)|0,i1&=67108863,b=Math.imul(et,ct),d=Math.imul(et,ut),d=d+Math.imul(tt,ct)|0,_=Math.imul(tt,ut),b=b+Math.imul(Xe,dt)|0,d=d+Math.imul(Xe,ht)|0,d=d+Math.imul(Ze,dt)|0,_=_+Math.imul(Ze,ht)|0,b=b+Math.imul(Qe,vt)|0,d=d+Math.imul(Qe,yt)|0,d=d+Math.imul(Ye,vt)|0,_=_+Math.imul(Ye,yt)|0,b=b+Math.imul(Ke,pt)|0,d=d+Math.imul(Ke,gt)|0,d=d+Math.imul(Je,pt)|0,_=_+Math.imul(Je,gt)|0,b=b+Math.imul(De,mt)|0,d=d+Math.imul(De,xt)|0,d=d+Math.imul(Ge,mt)|0,_=_+Math.imul(Ge,xt)|0,b=b+Math.imul(Me,bt)|0,d=d+Math.imul(Me,wt)|0,d=d+Math.imul(Se,bt)|0,_=_+Math.imul(Se,wt)|0;var s1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(s1>>>26)|0,s1&=67108863,b=Math.imul(et,dt),d=Math.imul(et,ht),d=d+Math.imul(tt,dt)|0,_=Math.imul(tt,ht),b=b+Math.imul(Xe,vt)|0,d=d+Math.imul(Xe,yt)|0,d=d+Math.imul(Ze,vt)|0,_=_+Math.imul(Ze,yt)|0,b=b+Math.imul(Qe,pt)|0,d=d+Math.imul(Qe,gt)|0,d=d+Math.imul(Ye,pt)|0,_=_+Math.imul(Ye,gt)|0,b=b+Math.imul(Ke,mt)|0,d=d+Math.imul(Ke,xt)|0,d=d+Math.imul(Je,mt)|0,_=_+Math.imul(Je,xt)|0,b=b+Math.imul(De,bt)|0,d=d+Math.imul(De,wt)|0,d=d+Math.imul(Ge,bt)|0,_=_+Math.imul(Ge,wt)|0;var o1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(o1>>>26)|0,o1&=67108863,b=Math.imul(et,vt),d=Math.imul(et,yt),d=d+Math.imul(tt,vt)|0,_=Math.imul(tt,yt),b=b+Math.imul(Xe,pt)|0,d=d+Math.imul(Xe,gt)|0,d=d+Math.imul(Ze,pt)|0,_=_+Math.imul(Ze,gt)|0,b=b+Math.imul(Qe,mt)|0,d=d+Math.imul(Qe,xt)|0,d=d+Math.imul(Ye,mt)|0,_=_+Math.imul(Ye,xt)|0,b=b+Math.imul(Ke,bt)|0,d=d+Math.imul(Ke,wt)|0,d=d+Math.imul(Je,bt)|0,_=_+Math.imul(Je,wt)|0;var a1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(a1>>>26)|0,a1&=67108863,b=Math.imul(et,pt),d=Math.imul(et,gt),d=d+Math.imul(tt,pt)|0,_=Math.imul(tt,gt),b=b+Math.imul(Xe,mt)|0,d=d+Math.imul(Xe,xt)|0,d=d+Math.imul(Ze,mt)|0,_=_+Math.imul(Ze,xt)|0,b=b+Math.imul(Qe,bt)|0,d=d+Math.imul(Qe,wt)|0,d=d+Math.imul(Ye,bt)|0,_=_+Math.imul(Ye,wt)|0;var l1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(l1>>>26)|0,l1&=67108863,b=Math.imul(et,mt),d=Math.imul(et,xt),d=d+Math.imul(tt,mt)|0,_=Math.imul(tt,xt),b=b+Math.imul(Xe,bt)|0,d=d+Math.imul(Xe,wt)|0,d=d+Math.imul(Ze,bt)|0,_=_+Math.imul(Ze,wt)|0;var f1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(f1>>>26)|0,f1&=67108863,b=Math.imul(et,bt),d=Math.imul(et,wt),d=d+Math.imul(tt,bt)|0,_=Math.imul(tt,wt);var c1=(R+b|0)+((d&8191)<<13)|0;return R=(_+(d>>>13)|0)+(c1>>>26)|0,c1&=67108863,T[0]=ps,T[1]=gs,T[2]=ms,T[3]=xs,T[4]=bs,T[5]=Yh,T[6]=Xh,T[7]=Zh,T[8]=e1,T[9]=t1,T[10]=r1,T[11]=n1,T[12]=i1,T[13]=s1,T[14]=o1,T[15]=a1,T[16]=l1,T[17]=f1,T[18]=c1,R!==0&&(T[19]=R,P.length++),P};Math.imul||(A=w);function E(D,y,C){C.negative=y.negative^D.negative,C.length=D.length+y.length;for(var P=0,O=0,m=0;m>>26)|0,O+=T>>>26,T&=67108863}C.words[m]=R,P=T,T=O}return P!==0?C.words[m]=P:C.length--,C._strip()}function I(D,y,C){return E(D,y,C)}s.prototype.mulTo=function(y,C){var P,O=this.length+y.length;return this.length===10&&y.length===10?P=A(this,y,C):O<63?P=w(this,y,C):O<1024?P=E(this,y,C):P=I(this,y,C),P},s.prototype.mul=function(y){var C=new s(null);return C.words=new Array(this.length+y.length),this.mulTo(y,C)},s.prototype.mulf=function(y){var C=new s(null);return C.words=new Array(this.length+y.length),I(this,y,C)},s.prototype.imul=function(y){return this.clone().mulTo(y,this)},s.prototype.imuln=function(y){var C=y<0;C&&(y=-y),n(typeof y=="number"),n(y<67108864);for(var P=0,O=0;O>=26,P+=m/67108864|0,P+=T>>>26,this.words[O]=T&67108863}return P!==0&&(this.words[O]=P,this.length++),C?this.ineg():this},s.prototype.muln=function(y){return this.clone().imuln(y)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(y){var C=k(y);if(C.length===0)return new s(1);for(var P=this,O=0;O=0);var C=y%26,P=(y-C)/26,O=67108863>>>26-C<<26-C,m;if(C!==0){var T=0;for(m=0;m>>26-C}T&&(this.words[m]=T,this.length++)}if(P!==0){for(m=this.length-1;m>=0;m--)this.words[m+P]=this.words[m];for(m=0;m=0);var O;C?O=(C-C%26)/26:O=0;var m=y%26,T=Math.min((y-m)/26,this.length),R=67108863^67108863>>>m<T)for(this.length-=T,d=0;d=0&&(_!==0||d>=O);d--){var N=this.words[d]|0;this.words[d]=_<<26-m|N>>>m,_=N&R}return b&&_!==0&&(b.words[b.length++]=_),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(y,C,P){return n(this.negative===0),this.iushrn(y,C,P)},s.prototype.shln=function(y){return this.clone().ishln(y)},s.prototype.ushln=function(y){return this.clone().iushln(y)},s.prototype.shrn=function(y){return this.clone().ishrn(y)},s.prototype.ushrn=function(y){return this.clone().iushrn(y)},s.prototype.testn=function(y){n(typeof y=="number"&&y>=0);var C=y%26,P=(y-C)/26,O=1<=0);var C=y%26,P=(y-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 O=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(y){if(n(typeof y=="number"),n(y<67108864),y<0)return this.iaddn(-y);if(this.negative!==0)return this.negative=0,this.iaddn(y),this.negative=1,this;if(this.words[0]-=y,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var C=0;C>26)-(b/67108864|0),this.words[m+P]=T&67108863}for(;m>26,this.words[m+P]=T&67108863;if(R===0)return this._strip();for(n(R===-1),R=0,m=0;m>26,this.words[m]=T&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(y,C){var P=this.length-y.length,O=this.clone(),m=y,T=m.words[m.length-1]|0,R=this._countBits(T);P=26-R,P!==0&&(m=m.ushln(P),O.iushln(P),T=m.words[m.length-1]|0);var b=O.length-m.length,d;if(C!=="mod"){d=new s(null),d.length=b+1,d.words=new Array(d.length);for(var _=0;_=0;p--){var B=(O.words[m.length+p]|0)*67108864+(O.words[m.length+p-1]|0);for(B=Math.min(B/T|0,67108863),O._ishlnsubmul(m,B,p);O.negative!==0;)B--,O.negative=0,O._ishlnsubmul(m,1,p),O.isZero()||(O.negative^=1);d&&(d.words[p]=B)}return d&&d._strip(),O._strip(),C!=="div"&&P!==0&&O.iushrn(P),{div:d||null,mod:O}},s.prototype.divmod=function(y,C,P){if(n(!y.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var O,m,T;return this.negative!==0&&y.negative===0?(T=this.neg().divmod(y,C),C!=="mod"&&(O=T.div.neg()),C!=="div"&&(m=T.mod.neg(),P&&m.negative!==0&&m.iadd(y)),{div:O,mod:m}):this.negative===0&&y.negative!==0?(T=this.divmod(y.neg(),C),C!=="mod"&&(O=T.div.neg()),{div:O,mod:T.mod}):this.negative&y.negative?(T=this.neg().divmod(y.neg(),C),C!=="div"&&(m=T.mod.neg(),P&&m.negative!==0&&m.isub(y)),{div:T.div,mod:m}):y.length>this.length||this.cmp(y)<0?{div:new s(0),mod:this}:y.length===1?C==="div"?{div:this.divn(y.words[0]),mod:null}:C==="mod"?{div:null,mod:new s(this.modrn(y.words[0]))}:{div:this.divn(y.words[0]),mod:new s(this.modrn(y.words[0]))}:this._wordDiv(y,C)},s.prototype.div=function(y){return this.divmod(y,"div",!1).div},s.prototype.mod=function(y){return this.divmod(y,"mod",!1).mod},s.prototype.umod=function(y){return this.divmod(y,"mod",!0).mod},s.prototype.divRound=function(y){var C=this.divmod(y);if(C.mod.isZero())return C.div;var P=C.div.negative!==0?C.mod.isub(y):C.mod,O=y.ushrn(1),m=y.andln(1),T=P.cmp(O);return T<0||m===1&&T===0?C.div:C.div.negative!==0?C.div.isubn(1):C.div.iaddn(1)},s.prototype.modrn=function(y){var C=y<0;C&&(y=-y),n(y<=67108863);for(var P=(1<<26)%y,O=0,m=this.length-1;m>=0;m--)O=(P*O+(this.words[m]|0))%y;return C?-O:O},s.prototype.modn=function(y){return this.modrn(y)},s.prototype.idivn=function(y){var C=y<0;C&&(y=-y),n(y<=67108863);for(var P=0,O=this.length-1;O>=0;O--){var m=(this.words[O]|0)+P*67108864;this.words[O]=m/y|0,P=m%y}return this._strip(),C?this.ineg():this},s.prototype.divn=function(y){return this.clone().idivn(y)},s.prototype.egcd=function(y){n(y.negative===0),n(!y.isZero());var C=this,P=y.clone();C.negative!==0?C=C.umod(y):C=C.clone();for(var O=new s(1),m=new s(0),T=new s(0),R=new s(1),b=0;C.isEven()&&P.isEven();)C.iushrn(1),P.iushrn(1),++b;for(var d=P.clone(),_=C.clone();!C.isZero();){for(var N=0,p=1;!(C.words[0]&p)&&N<26;++N,p<<=1);if(N>0)for(C.iushrn(N);N-- >0;)(O.isOdd()||m.isOdd())&&(O.iadd(d),m.isub(_)),O.iushrn(1),m.iushrn(1);for(var B=0,L=1;!(P.words[0]&L)&&B<26;++B,L<<=1);if(B>0)for(P.iushrn(B);B-- >0;)(T.isOdd()||R.isOdd())&&(T.iadd(d),R.isub(_)),T.iushrn(1),R.iushrn(1);C.cmp(P)>=0?(C.isub(P),O.isub(T),m.isub(R)):(P.isub(C),T.isub(O),R.isub(m))}return{a:T,b:R,gcd:P.iushln(b)}},s.prototype._invmp=function(y){n(y.negative===0),n(!y.isZero());var C=this,P=y.clone();C.negative!==0?C=C.umod(y):C=C.clone();for(var O=new s(1),m=new s(0),T=P.clone();C.cmpn(1)>0&&P.cmpn(1)>0;){for(var R=0,b=1;!(C.words[0]&b)&&R<26;++R,b<<=1);if(R>0)for(C.iushrn(R);R-- >0;)O.isOdd()&&O.iadd(T),O.iushrn(1);for(var d=0,_=1;!(P.words[0]&_)&&d<26;++d,_<<=1);if(d>0)for(P.iushrn(d);d-- >0;)m.isOdd()&&m.iadd(T),m.iushrn(1);C.cmp(P)>=0?(C.isub(P),O.isub(m)):(P.isub(C),m.isub(O))}var N;return C.cmpn(1)===0?N=O:N=m,N.cmpn(0)<0&&N.iadd(y),N},s.prototype.gcd=function(y){if(this.isZero())return y.abs();if(y.isZero())return this.abs();var C=this.clone(),P=y.clone();C.negative=0,P.negative=0;for(var O=0;C.isEven()&&P.isEven();O++)C.iushrn(1),P.iushrn(1);do{for(;C.isEven();)C.iushrn(1);for(;P.isEven();)P.iushrn(1);var m=C.cmp(P);if(m<0){var T=C;C=P,P=T}else if(m===0||P.cmpn(1)===0)break;C.isub(P)}while(!0);return P.iushln(O)},s.prototype.invm=function(y){return this.egcd(y).a.umod(y)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(y){return this.words[0]&y},s.prototype.bincn=function(y){n(typeof y=="number");var C=y%26,P=(y-C)/26,O=1<>>26,R&=67108863,this.words[T]=R}return m!==0&&(this.words[T]=m,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(y){var C=y<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&&(y=-y),n(y<=67108863,"Number is too big");var O=this.words[0]|0;P=O===y?0:Oy.length)return 1;if(this.length=0;P--){var O=this.words[P]|0,m=y.words[P]|0;if(O!==m){Om&&(C=1);break}}return C},s.prototype.gtn=function(y){return this.cmpn(y)===1},s.prototype.gt=function(y){return this.cmp(y)===1},s.prototype.gten=function(y){return this.cmpn(y)>=0},s.prototype.gte=function(y){return this.cmp(y)>=0},s.prototype.ltn=function(y){return this.cmpn(y)===-1},s.prototype.lt=function(y){return this.cmp(y)===-1},s.prototype.lten=function(y){return this.cmpn(y)<=0},s.prototype.lte=function(y){return this.cmp(y)<=0},s.prototype.eqn=function(y){return this.cmpn(y)===0},s.prototype.eq=function(y){return this.cmp(y)===0},s.red=function(y){return new G(y)},s.prototype.toRed=function(y){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),y.convertTo(this)._forceRed(y)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(y){return this.red=y,this},s.prototype.forceRed=function(y){return n(!this.red,"Already a number in reduction context"),this._forceRed(y)},s.prototype.redAdd=function(y){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,y)},s.prototype.redIAdd=function(y){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,y)},s.prototype.redSub=function(y){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,y)},s.prototype.redISub=function(y){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,y)},s.prototype.redShl=function(y){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,y)},s.prototype.redMul=function(y){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.mul(this,y)},s.prototype.redIMul=function(y){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.imul(this,y)},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(y){return n(this.red&&!y.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,y)};var M={k256:null,p224:null,p192:null,p25519:null};function $(D,y){this.name=D,this.p=new s(y,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var y=new s(null);return y.words=new Array(Math.ceil(this.n/13)),y},$.prototype.ireduce=function(y){var C=y,P;do this.split(C,this.tmp),C=this.imulK(C),C=C.iadd(this.tmp),P=C.bitLength();while(P>this.n);var O=P0?C.isub(this.p):C.strip!==void 0?C.strip():C._strip(),C},$.prototype.split=function(y,C){y.iushrn(this.n,0,C)},$.prototype.imulK=function(y){return y.imul(this.k)};function j(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(j,$),j.prototype.split=function(y,C){for(var P=4194303,O=Math.min(y.length,9),m=0;m>>22,T=R}T>>>=22,y.words[m-10]=T,T===0&&y.length>10?y.length-=10:y.length-=9},j.prototype.imulK=function(y){y.words[y.length]=0,y.words[y.length+1]=0,y.length+=2;for(var C=0,P=0;P>>=26,y.words[P]=m,C=O}return C!==0&&(y.words[y.length++]=C),y},s._prime=function(y){if(M[y])return M[y];var C;if(y==="k256")C=new j;else if(y==="p224")C=new U;else if(y==="p192")C=new W;else if(y==="p25519")C=new q;else throw new Error("Unknown prime "+y);return M[y]=C,C};function G(D){if(typeof D=="string"){var y=s._prime(D);this.m=y.p,this.prime=y}else n(D.gtn(1),"modulus must be greater than 1"),this.m=D,this.prime=null}G.prototype._verify1=function(y){n(y.negative===0,"red works only with positives"),n(y.red,"red works only with red numbers")},G.prototype._verify2=function(y,C){n((y.negative|C.negative)===0,"red works only with positives"),n(y.red&&y.red===C.red,"red works only with red numbers")},G.prototype.imod=function(y){return this.prime?this.prime.ireduce(y)._forceRed(this):(c(y,y.umod(this.m)._forceRed(this)),y)},G.prototype.neg=function(y){return y.isZero()?y.clone():this.m.sub(y)._forceRed(this)},G.prototype.add=function(y,C){this._verify2(y,C);var P=y.add(C);return P.cmp(this.m)>=0&&P.isub(this.m),P._forceRed(this)},G.prototype.iadd=function(y,C){this._verify2(y,C);var P=y.iadd(C);return P.cmp(this.m)>=0&&P.isub(this.m),P},G.prototype.sub=function(y,C){this._verify2(y,C);var P=y.sub(C);return P.cmpn(0)<0&&P.iadd(this.m),P._forceRed(this)},G.prototype.isub=function(y,C){this._verify2(y,C);var P=y.isub(C);return P.cmpn(0)<0&&P.iadd(this.m),P},G.prototype.shl=function(y,C){return this._verify1(y),this.imod(y.ushln(C))},G.prototype.imul=function(y,C){return this._verify2(y,C),this.imod(y.imul(C))},G.prototype.mul=function(y,C){return this._verify2(y,C),this.imod(y.mul(C))},G.prototype.isqr=function(y){return this.imul(y,y.clone())},G.prototype.sqr=function(y){return this.mul(y,y)},G.prototype.sqrt=function(y){if(y.isZero())return y.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(y,P)}for(var O=this.m.subn(1),m=0;!O.isZero()&&O.andln(1)===0;)m++,O.iushrn(1);n(!O.isZero());var T=new s(1).toRed(this),R=T.redNeg(),b=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new s(2*d*d).toRed(this);this.pow(d,b).cmp(R)!==0;)d.redIAdd(R);for(var _=this.pow(d,O),N=this.pow(y,O.addn(1).iushrn(1)),p=this.pow(y,O),B=m;p.cmp(T)!==0;){for(var L=p,F=0;L.cmp(T)!==0;F++)L=L.redSqr();n(F=0;m--){for(var _=C.words[m],N=d-1;N>=0;N--){var p=_>>N&1;if(T!==O[0]&&(T=this.sqr(T)),p===0&&R===0){b=0;continue}R<<=1,R|=p,b++,!(b!==P&&(m!==0||N!==0))&&(T=this.mul(T,O[R]),b=0,R=0)}d=26}return T},G.prototype.convertTo=function(y){var C=y.umod(this.m);return C===y?C.clone():C},G.prototype.convertFrom=function(y){var C=y.clone();return C.red=null,C},s.mont=function(y){return new re(y)};function re(D){G.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(re,G),re.prototype.convertTo=function(y){return this.imod(y.ushln(this.shift))},re.prototype.convertFrom=function(y){var C=this.imod(y.mul(this.rinv));return C.red=null,C},re.prototype.imul=function(y,C){if(y.isZero()||C.isZero())return y.words[0]=0,y.length=1,y;var P=y.imul(C),O=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=P.isub(O).iushrn(this.shift),T=m;return m.cmp(this.m)>=0?T=m.isub(this.m):m.cmpn(0)<0&&(T=m.iadd(this.m)),T._forceRed(this)},re.prototype.mul=function(y,C){if(y.isZero()||C.isZero())return new s(0)._forceRed(this);var P=y.mul(C),O=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=P.isub(O).iushrn(this.shift),T=m;return m.cmp(this.m)>=0?T=m.isub(this.m):m.cmpn(0)<0&&(T=m.iadd(this.m)),T._forceRed(this)},re.prototype.invm=function(y){var C=this.imod(y._invmp(this.m).mul(this.r2));return C._forceRed(this)}})(t,o3)})($L);const we=Zy,zL="logger/5.7.0";let Nw=!1,Ow=!1;const dd={debug:1,default:2,info:2,warning:3,error:4,off:5};let Bw=dd.default,lv=null;function VL(){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(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}const Dw=VL();var ep;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(ep||(ep={}));var Jn;(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"})(Jn||(Jn={}));const Lw="0123456789abcdef";let V=class Zt{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();dd[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Bw>dd[n])&&console.log.apply(console,r)}debug(...e){this._log(Zt.levels.DEBUG,e)}info(...e){this._log(Zt.levels.INFO,e)}warn(...e){this._log(Zt.levels.WARNING,e)}makeError(e,r,n){if(Ow)return this.makeError("censored error",r,{});r||(r=Zt.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(l=>{const f=n[l];try{if(f instanceof Uint8Array){let c="";for(let u=0;u>4],c+=Lw[f[u]&15];i.push(l+"=Uint8Array(0x"+c+")")}else i.push(l+"="+JSON.stringify(f))}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 Jn.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 Jn.CALL_EXCEPTION:case Jn.INSUFFICIENT_FUNDS:case Jn.MISSING_NEW:case Jn.NONCE_EXPIRED:case Jn.REPLACEMENT_UNDERPRICED:case Jn.TRANSACTION_REPLACED:case Jn.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,Zt.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){Dw&&this.throwError("platform missing String.prototype.normalize",Zt.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Dw})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,Zt.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,Zt.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,Zt.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",Zt.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",Zt.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",Zt.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return lv||(lv=new Zt(zL)),lv}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",Zt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Nw){if(!e)return;this.globalLogger().throwError("error censorship permanent",Zt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Ow=!!e,Nw=!!r}static setLogLevel(e){const r=dd[e.toLowerCase()];if(r==null){Zt.globalLogger().warn("invalid log level - "+e);return}Bw=r}static from(e){return new Zt(e)}};V.errors=Jn;V.levels=ep;const HL="bytes/5.7.0",Bt=new V(HL);function i7(t){return!!t.toHexString}function fl(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return fl(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function is(t){return Pe(t)&&!(t.length%2)||cs(t)}function $w(t){return typeof t=="number"&&t==t&&t%1===0}function cs(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!$w(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function Y(t,e){if(e||(e={}),typeof t=="number"){Bt.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),fl(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),i7(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":Bt.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;iY(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),fl(n)}function Ei(t){let e=Y(t);if(e.length===0)return e;let r=0;for(;re&&Bt.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),fl(r)}function Pe(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const fv="0123456789abcdef";function J(t,e){if(e||(e={}),typeof t=="number"){Bt.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=fv[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),i7(t))return t.toHexString();if(Pe(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":Bt.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(cs(t)){let r="0x";for(let n=0;n>4]+fv[i&15]}return r}return Bt.throwArgumentError("invalid hexlify value","value",t)}function Pi(t){if(typeof t!="string")t=J(t);else if(!Pe(t)||t.length%2)return null;return(t.length-2)/2}function Lt(t,e,r){return typeof t!="string"?t=J(t):(!Pe(t)||t.length%2)&&Bt.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+=J(r).substring(2)}),e}function Yc(t){const e=s7(J(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function s7(t){typeof t!="string"&&(t=J(t)),Pe(t)||Bt.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&Bt.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function pa(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(is(t)){let r=Y(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=J(r.slice(0,32)),e.s=J(r.slice(32,64))):r.length===65?(e.r=J(r.slice(0,32)),e.s=J(r.slice(32,64)),e.v=r[64]):Bt.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:Bt.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=J(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=Vf(Y(e._vs),32);e._vs=J(i);const s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&Bt.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const o=J(i);e.s==null?e.s=o:e.s!==o&&Bt.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?Bt.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&&Bt.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!Pe(e.r)?Bt.throwArgumentError("signature missing or invalid r","signature",t):e.r=Ue(e.r,32),e.s==null||!Pe(e.s)?Bt.throwArgumentError("signature missing or invalid s","signature",t):e.s=Ue(e.s,32);const r=Y(e.s);r[0]>=128&&Bt.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=J(r);e._vs&&(Pe(e._vs)||Bt.throwArgumentError("signature invalid _vs","signature",t),e._vs=Ue(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&Bt.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function tp(t){return t=pa(t),J(je([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const o7="bignumber/5.7.0";var Ic=we.BN;const Fi=new V(o7),cv={},Fw=9007199254740991;function WL(t){return t!=null&&(z.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Pe(t)||typeof t=="bigint"||cs(t))}let jw=!1;class z{constructor(e,r){e!==cv&&Fi.throwError("cannot call constructor directly; use BigNumber.from",V.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Qr(_e(this).fromTwos(e))}toTwos(e){return Qr(_e(this).toTwos(e))}abs(){return this._hex[0]==="-"?z.from(this._hex.substring(1)):this}add(e){return Qr(_e(this).add(_e(e)))}sub(e){return Qr(_e(this).sub(_e(e)))}div(e){return z.from(e).isZero()&&An("division-by-zero","div"),Qr(_e(this).div(_e(e)))}mul(e){return Qr(_e(this).mul(_e(e)))}mod(e){const r=_e(e);return r.isNeg()&&An("division-by-zero","mod"),Qr(_e(this).umod(r))}pow(e){const r=_e(e);return r.isNeg()&&An("negative-power","pow"),Qr(_e(this).pow(r))}and(e){const r=_e(e);return(this.isNegative()||r.isNeg())&&An("unbound-bitwise-result","and"),Qr(_e(this).and(r))}or(e){const r=_e(e);return(this.isNegative()||r.isNeg())&&An("unbound-bitwise-result","or"),Qr(_e(this).or(r))}xor(e){const r=_e(e);return(this.isNegative()||r.isNeg())&&An("unbound-bitwise-result","xor"),Qr(_e(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&An("negative-width","mask"),Qr(_e(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&An("negative-width","shl"),Qr(_e(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&An("negative-width","shr"),Qr(_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{An("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Fi.throwError("this platform does not support BigInt",V.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?jw||(jw=!0,Fi.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Fi.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",V.errors.UNEXPECTED_ARGUMENT,{}):Fi.throwError("BigNumber.toString does not accept parameters",V.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 z)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new z(cv,Rc(e)):e.match(/^-?[0-9]+$/)?new z(cv,Rc(new Ic(e))):Fi.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&An("underflow","BigNumber.from",e),(e>=Fw||e<=-Fw)&&An("overflow","BigNumber.from",e),z.from(String(e));const r=e;if(typeof r=="bigint")return z.from(r.toString());if(cs(r))return z.from(J(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return z.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 z.from(n)}return Fi.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function Rc(t){if(typeof t!="string")return Rc(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Fi.throwArgumentError("invalid hex","value",t),t=Rc(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 Qr(t){return z.from(Rc(t))}function _e(t){const e=z.from(t).toHexString();return e[0]==="-"?new Ic("-"+e.substring(3),16):new Ic(e.substring(2),16)}function An(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),Fi.throwError(t,V.errors.NUMERIC_FAULT,n)}function qL(t){return new Ic(t,36).toString(16)}function GL(t){return new Ic(t,16).toString(36)}const zr=new V(o7),Hf={},a7=z.from(0),l7=z.from(-1);function f7(t,e,r,n){const i={fault:e,operation:r};return n!==void 0&&(i.value=n),zr.throwError(t,V.errors.NUMERIC_FAULT,i)}let Wf="0";for(;Wf.length<256;)Wf+=Wf;function Im(t){if(typeof t!="number")try{t=z.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+Wf.substring(0,t):zr.throwArgumentError("invalid decimal size","decimals",t)}function hd(t,e){e==null&&(e=0);const r=Im(e);t=z.from(t);const n=t.lt(a7);n&&(t=t.mul(l7));let i=t.mod(r).toString();for(;i.length2&&zr.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&&f7("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?l:(typeof e[o]!==a&&zr.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&&zr.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&zr.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new cl(Hf,r,n,i)}}class vr{constructor(e,r,n,i){e!==Hf&&zr.throwError("cannot use FixedNumber constructor; use FixedNumber.from",V.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&&zr.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=ci(this._value,this.format.decimals),n=ci(e._value,e.format.decimals);return vr.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=ci(this._value,this.format.decimals),n=ci(e._value,e.format.decimals);return vr.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=ci(this._value,this.format.decimals),n=ci(e._value,e.format.decimals);return vr.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=ci(this._value,this.format.decimals),n=ci(e._value,e.format.decimals);return vr.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=vr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(Uw.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=vr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(Uw.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)&&zr.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=vr.from("1"+Wf.substring(0,e),this.format),i=KL.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&&zr.throwArgumentError("invalid byte width","width",e);const r=z.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return Ue(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return vr.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!WL(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),vr.fromString(hd(e,r),cl.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=cl.from(r),i=ci(e,n.decimals);!n.signed&&i.lt(a7)&&f7("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=hd(i,n.decimals);return new vr(Hf,s,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=cl.from(r);if(Y(e).length>n.width/8)throw new Error("overflow");let i=z.from(e);n.signed&&(i=i.fromTwos(n.width));const s=i.toTwos((n.signed?0:1)+n.width).toHexString(),o=hd(i,n.decimals);return new vr(Hf,s,o,n)}static from(e,r){if(typeof e=="string")return vr.fromString(e,r);if(cs(e))return vr.fromBytes(e,r);try{return vr.fromValue(e,0,r)}catch(n){if(n.code!==V.errors.INVALID_ARGUMENT)throw n}return zr.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const Uw=vr.from(1),KL=vr.from("0.5"),JL="properties/5.7.0";var QL=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const b0=new V(JL);function ee(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function ei(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 kt(t){return QL(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 Rh(t,e){(!t||typeof t!="object")&&b0.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||b0.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function Jt(t){const e={};for(const r in t)e[r]=t[r];return e}const YL={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function c7(t){if(t==null||YL[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;rIi(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&ee(e,r,Ii(n))}return e}return b0.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function Ii(t){return XL(t)}class ga{constructor(e){for(const r in e)this[r]=Ii(e[r])}}const Xc="abi/5.7.0",Ne=new V(Xc),ta={};let zw={calldata:!0,memory:!0,storage:!0},ZL={calldata:!0,memory:!0};function $u(t,e){if(t==="bytes"||t==="string"){if(zw[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&ZL[e])return!0;return(zw[e]||e==="payable")&&Ne.throwArgumentError("invalid modifier","name",e),!1}function e$(t,e){let r=t;function n(a){Ne.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!==Oe.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===Oe.full?", ":",")+")"):r+=this.type,e!==Oe.sighash&&(this.indexed===!0&&(r+=" indexed"),e===Oe.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?ir.fromString(e,r):ir.fromObject(e)}static fromObject(e){return ir.isParamType(e)?e:new ir(ta,{name:e.name||null,type:Oa(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(ir.fromObject):null})}static fromString(e,r){function n(i){return ir.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(e$(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function Mc(t,e){return n$(t).map(r=>ir.fromString(r,e))}class xi{constructor(e,r){e!==ta&&Ne.throwError("use a static from method",V.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),vd(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return xi.isFragment(e)?e:typeof e=="string"?xi.fromString(e):xi.fromObject(e)}static fromObject(e){if(xi.isFragment(e))return e;switch(e.type){case"function":return Zn.fromObject(e);case"event":return gi.fromObject(e);case"constructor":return Xn.fromObject(e);case"error":return Hi.fromObject(e);case"fallback":case"receive":return null}return Ne.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"?gi.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Zn.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Xn.fromString(e.trim()):e.split(" ")[0]==="error"?Hi.fromString(e.substring(5).trim()):Ne.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class gi extends xi{format(e){if(e||(e=Oe.sighash),Oe[e]||Ne.throwArgumentError("invalid format type","format",e),e===Oe.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!==Oe.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Oe.full?", ":",")+") ",e!==Oe.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?gi.fromString(e):gi.fromObject(e)}static fromObject(e){if(gi.isEventFragment(e))return e;e.type!=="event"&&Ne.throwArgumentError("invalid event object","value",e);const r={name:Nc(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(ir.fromObject):[],type:"event"};return new gi(ta,r)}static fromString(e){let r=e.match(Oc);r||Ne.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:Ne.warn("unknown modifier: "+i)}}),gi.fromObject({name:r[1].trim(),anonymous:n,inputs:Mc(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function u7(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&Ne.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||Ne.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=z.from(r[1]),r[0]):t}function d7(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 h7(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&&Ne.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&Ne.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"&&Ne.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&&Ne.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"&&Ne.throwArgumentError("unable to determine stateMutability","value",t),e}class Xn extends xi{format(e){if(e||(e=Oe.sighash),Oe[e]||Ne.throwArgumentError("invalid format type","format",e),e===Oe.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===Oe.sighash&&Ne.throwError("cannot format a constructor for sighash",V.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===Oe.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?Xn.fromString(e):Xn.fromObject(e)}static fromObject(e){if(Xn.isConstructorFragment(e))return e;e.type!=="constructor"&&Ne.throwArgumentError("invalid constructor object","value",e);let r=h7(e);r.constant&&Ne.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(ir.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?z.from(e.gas):null};return new Xn(ta,n)}static fromString(e){let r={type:"constructor"};e=u7(e,r);let n=e.match(Oc);return(!n||n[1].trim()!=="constructor")&&Ne.throwArgumentError("invalid constructor string","value",e),r.inputs=Mc(n[2].trim(),!1),d7(n[3].trim(),r),Xn.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class Zn extends Xn{format(e){if(e||(e=Oe.sighash),Oe[e]||Ne.throwArgumentError("invalid format type","format",e),e===Oe.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!==Oe.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Oe.full?", ":",")+") ",e!==Oe.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"?Zn.fromString(e):Zn.fromObject(e)}static fromObject(e){if(Zn.isFunctionFragment(e))return e;e.type!=="function"&&Ne.throwArgumentError("invalid function object","value",e);let r=h7(e);const n={type:e.type,name:Nc(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(ir.fromObject):[],outputs:e.outputs?e.outputs.map(ir.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?z.from(e.gas):null};return new Zn(ta,n)}static fromString(e){let r={type:"function"};e=u7(e,r);let n=e.split(" returns ");n.length>2&&Ne.throwArgumentError("invalid function string","value",e);let i=n[0].match(Oc);if(i||Ne.throwArgumentError("invalid function signature","value",e),r.name=i[1].trim(),r.name&&Nc(r.name),r.inputs=Mc(i[2],!1),d7(i[3].trim(),r),n.length>1){let s=n[1].match(Oc);(s[1].trim()!=""||s[3].trim()!="")&&Ne.throwArgumentError("unexpected tokens","value",e),r.outputs=Mc(s[2],!1)}else r.outputs=[];return Zn.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function Vw(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Ne.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Hi extends xi{format(e){if(e||(e=Oe.sighash),Oe[e]||Ne.throwArgumentError("invalid format type","format",e),e===Oe.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Oe.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Oe.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?Hi.fromString(e):Hi.fromObject(e)}static fromObject(e){if(Hi.isErrorFragment(e))return e;e.type!=="error"&&Ne.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:Nc(e.name),inputs:e.inputs?e.inputs.map(ir.fromObject):[]};return Vw(new Hi(ta,r))}static fromString(e){let r={type:"error"},n=e.match(Oc);return n||Ne.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&Nc(r.name),r.inputs=Mc(n[2],!1),Vw(Hi.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function Oa(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const r$=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Nc(t){return(!t||!t.match(r$))&&Ne.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const Oc=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function n$(t){t=t.trim();let e=[],r="",n=0;for(let i=0;ithis.wordSize&&Rm.throwError("value out-of-bounds",V.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=je([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 w0{constructor(e,r,n,i){ee(this,"_data",Y(e)),ee(this,"wordSize",r||32),ee(this,"_coerceFunc",n),ee(this,"allowLoose",i),this._offset=0}get data(){return J(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):w0.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:Rm.throwError("data out-of-bounds",V.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new w0(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 z.from(this.readBytes(this.wordSize))}}var np={},i$={get exports(){return np},set exports(t){np=t}};/** +Defaulting to \`null\`.`}const $C="Radio",[YD,FC]=Or($C),[XD,ZD]=YD($C),eB=S.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:i=!1,required:s,disabled:o,value:a="on",onCheck:l,...f}=t,[c,u]=S.useState(null),h=Nt(e,g=>u(g)),v=S.useRef(!1),x=c?Boolean(c.closest("form")):!0;return S.createElement(XD,{scope:r,checked:i,disabled:o},S.createElement($e.button,ue({type:"button",role:"radio","aria-checked":i,"data-state":jC(i),"data-disabled":o?"":void 0,disabled:o,value:a},f,{ref:h,onClick:Ce(t.onClick,g=>{i||l==null||l(),x&&(v.current=g.isPropagationStopped(),v.current||g.stopPropagation())})})),x&&S.createElement(nB,{control:c,bubbles:!v.current,name:n,value:a,checked:i,required:s,disabled:o,style:{transform:"translateX(-100%)"}}))}),tB="RadioIndicator",rB=S.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...i}=t,s=ZD(tB,r);return S.createElement(Qc,{present:n||s.checked},S.createElement($e.span,ue({"data-state":jC(s.checked),"data-disabled":s.disabled?"":void 0},i,{ref:e})))}),nB=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=S.useRef(null),o=gm(r),a=mm(e);return S.useEffect(()=>{const l=s.current,f=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(f,"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",ue({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 jC(t){return t?"checked":"unchecked"}const iB=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],UC="RadioGroup",[sB,kK]=Or(UC,[Gl,FC]),zC=Gl(),VC=FC(),[oB,aB]=sB(UC),lB=S.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:l,dir:f,loop:c=!0,onValueChange:u,...h}=t,v=zC(r),x=Cm(f),[g,k]=kl({prop:s,defaultProp:i,onChange:u});return S.createElement(oB,{scope:r,name:n,required:o,disabled:a,value:g,onValueChange:k},S.createElement(xO,ue({asChild:!0},v,{orientation:l,dir:x,loop:c}),S.createElement($e.div,ue({role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:x},h,{ref:e}))))}),fB="RadioGroupItem",cB=S.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...i}=t,s=aB(fB,r),o=s.disabled||n,a=zC(r),l=VC(r),f=S.useRef(null),c=Nt(e,f),u=s.value===i.value,h=S.useRef(!1);return S.useEffect(()=>{const v=g=>{iB.includes(g.key)&&(h.current=!0)},x=()=>h.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",x)}},[]),S.createElement(dC,ue({asChild:!0},a,{focusable:!o,active:u}),S.createElement(eB,ue({disabled:o,required:s.required,checked:u},l,i,{name:s.name,ref:c,onCheck:()=>s.onValueChange(i.value),onKeyDown:Ce(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:Ce(i.onFocus,()=>{var v;h.current&&((v=f.current)===null||v===void 0||v.click())})})))}),uB=S.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,i=VC(r);return S.createElement(rB,ue({},i,n,{ref:e}))}),dB=lB,hB=cB,vB=uB;var yB=Ot({defaultClassName:"io59uy6 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12rh",variantClassNames:{size:{sm:"io59uy7",lg:"io59uy8"}},defaultVariants:{},compoundVariants:[]}),pB=Ot({defaultClassName:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr12jb fyvr12c5 fyvr11xt fyvr124z fyvr12mn fyvr12fh fyvr1215 fyvr128b fyvr11ob fyvr12tz fyvr12tv fyvr12uj",variantClassNames:{size:{sm:"io59uy3 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy4 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]});const gB=t=>{const{id:e,label:r,size:n="sm",value:i,disabled:s}=t;return Q.jsx(ge,{alignItems:"center",children:Q.jsx(Vl,{disabled:s,display:"flex",id:e,label:r,labelLocation:"right",children:Q.jsx(hB,{className:pB({size:n}),value:i,id:e,disabled:s,children:Q.jsx(vB,{className:yB({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 Q.jsx(dB,{disabled:n,name:s,ref:e,...l,children:Q.jsx(ge,{flexDirection:r,gap:i,children:o.map(({label:f,value:c,disabled:u})=>Q.jsx(gB,{id:`${s}-${c}`,label:f,size:a,value:c,disabled:u},c))})})});function kw(t,[e,r]){return Math.min(r,Math.max(e,t))}const HC=S.forwardRef((t,e)=>S.createElement($e.span,ue({},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}}))),mB=[" ","Enter","ArrowUp","ArrowDown"],xB=[" ","Enter"],_h="Select",[Th,Tm,bB]=wh(_h),[Kl,_K]=Or(_h,[bB,ql]),Pm=ql(),[wB,ya]=Kl(_h),[CB,AB]=Kl(_h),EB=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:l,dir:f,name:c,autoComplete:u,disabled:h,required:v}=t,x=Pm(e),[g,k]=S.useState(null),[w,A]=S.useState(null),[E,I]=S.useState(!1),M=Cm(f),[$=!1,j]=kl({prop:n,defaultProp:i,onChange:s}),[U,W]=kl({prop:o,defaultProp:a,onChange:l}),q=S.useRef(null),G=g?Boolean(g.closest("form")):!0,[re,B]=S.useState(new Set),y=Array.from(re).map(C=>C.props.value).join(";");return S.createElement(rO,x,S.createElement(wB,{required:v,scope:e,trigger:g,onTriggerChange:k,valueNode:w,onValueNodeChange:A,valueNodeHasChildren:E,onValueNodeHasChildrenChange:I,contentId:Yc(),value:U,onValueChange:W,open:$,onOpenChange:j,dir:M,triggerPointerDownPosRef:q,disabled:h},S.createElement(Th.Provider,{scope:e},S.createElement(CB,{scope:t.__scopeSelect,onNativeOptionAdd:S.useCallback(C=>{B(P=>new Set(P).add(C))},[]),onNativeOptionRemove:S.useCallback(C=>{B(P=>{const O=new Set(P);return O.delete(C),O})},[])},r)),G?S.createElement(qC,{key:y,"aria-hidden":!0,required:v,tabIndex:-1,name:c,autoComplete:u,value:U,onChange:C=>W(C.target.value),disabled:h},U===void 0?S.createElement("option",{value:""}):null,Array.from(re)):null))},SB="SelectTrigger",kB=S.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...i}=t,s=Pm(r),o=ya(SB,r),a=o.disabled||n,l=Nt(e,o.onTriggerChange),f=Tm(r),[c,u,h]=GC(x=>{const g=f().filter(A=>!A.disabled),k=g.find(A=>A.value===o.value),w=KC(g,x,k);w!==void 0&&o.onValueChange(w.value)}),v=()=>{a||(o.onOpenChange(!0),h())};return S.createElement(nO,ue({asChild:!0},s),S.createElement($e.button,ue({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":o.value===void 0?"":void 0},i,{ref:l,onClick:Ce(i.onClick,x=>{x.currentTarget.focus()}),onPointerDown:Ce(i.onPointerDown,x=>{const g=x.target;g.hasPointerCapture(x.pointerId)&&g.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(v(),o.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)},x.preventDefault())}),onKeyDown:Ce(i.onKeyDown,x=>{const g=c.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&u(x.key),!(g&&x.key===" ")&&mB.includes(x.key)&&(v(),x.preventDefault())})})))}),_B="SelectValue",TB=S.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,children:s,placeholder:o,...a}=t,l=ya(_B,r),{onValueNodeHasChildrenChange:f}=l,c=s!==void 0,u=Nt(e,l.onValueNodeChange);return xn(()=>{f(c)},[f,c]),S.createElement($e.span,ue({},a,{ref:u,style:{pointerEvents:"none"}}),l.value===void 0&&o!==void 0?o:s)}),PB=S.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...i}=t;return S.createElement($e.span,ue({"aria-hidden":!0},i,{ref:e}),n||"▼")}),Tl="SelectContent",IB=S.forwardRef((t,e)=>{const r=ya(Tl,t.__scopeSelect),[n,i]=S.useState();if(xn(()=>{i(new DocumentFragment)},[]),!r.open){const s=n;return s?Ti.createPortal(S.createElement(WC,{scope:t.__scopeSelect},S.createElement(Th.Slot,{scope:t.__scopeSelect},S.createElement("div",null,t.children))),s):null}return S.createElement(RB,ue({},t,{ref:e}))}),$i=10,[WC,Ph]=Kl(Tl),RB=S.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:l,align:f,alignOffset:c,arrowPadding:u,collisionBoundary:h,collisionPadding:v,sticky:x,hideWhenDetached:g,avoidCollisions:k,...w}=t,A=ya(Tl,r),[E,I]=S.useState(null),[M,$]=S.useState(null),j=Nt(e,L=>I(L)),[U,W]=S.useState(null),[q,G]=S.useState(null),re=Tm(r),[B,y]=S.useState(!1),C=S.useRef(!1);S.useEffect(()=>{if(E)return AO(E)},[E]),AN();const P=S.useCallback(L=>{const[F,...H]=re().map(X=>X.ref.current),[Z]=H.slice(-1),K=document.activeElement;for(const X of L)if(X===K||(X==null||X.scrollIntoView({block:"nearest"}),X===F&&M&&(M.scrollTop=0),X===Z&&M&&(M.scrollTop=M.scrollHeight),X==null||X.focus(),document.activeElement!==K))return},[re,M]),O=S.useCallback(()=>P([U,E]),[P,U,E]);S.useEffect(()=>{B&&O()},[B,O]);const{onOpenChange:m,triggerPointerDownPosRef:T}=A;S.useEffect(()=>{if(E){let L={x:0,y:0};const F=Z=>{var K,X,ve,ie;L={x:Math.abs(Math.round(Z.pageX)-((K=(X=T.current)===null||X===void 0?void 0:X.x)!==null&&K!==void 0?K:0)),y:Math.abs(Math.round(Z.pageY)-((ve=(ie=T.current)===null||ie===void 0?void 0:ie.y)!==null&&ve!==void 0?ve:0))}},H=Z=>{L.x<=10&&L.y<=10?Z.preventDefault():E.contains(Z.target)||m(!1),document.removeEventListener("pointermove",F),T.current=null};return T.current!==null&&(document.addEventListener("pointermove",F),document.addEventListener("pointerup",H,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",F),document.removeEventListener("pointerup",H,{capture:!0})}}},[E,m,T]),S.useEffect(()=>{const L=()=>m(!1);return window.addEventListener("blur",L),window.addEventListener("resize",L),()=>{window.removeEventListener("blur",L),window.removeEventListener("resize",L)}},[m]);const[R,b]=GC(L=>{const F=re().filter(K=>!K.disabled),H=F.find(K=>K.ref.current===document.activeElement),Z=KC(F,L,H);Z&&setTimeout(()=>Z.ref.current.focus())}),d=S.useCallback((L,F,H)=>{const Z=!C.current&&!H;(A.value!==void 0&&A.value===F||Z)&&(W(L),Z&&(C.current=!0))},[A.value]),_=S.useCallback(()=>E==null?void 0:E.focus(),[E]),N=S.useCallback((L,F,H)=>{const Z=!C.current&&!H;(A.value!==void 0&&A.value===F||Z)&&G(L)},[A.value]),p=n==="popper"?_w:MB,D=p===_w?{side:a,sideOffset:l,align:f,alignOffset:c,arrowPadding:u,collisionBoundary:h,collisionPadding:v,sticky:x,hideWhenDetached:g,avoidCollisions:k}:{};return S.createElement(WC,{scope:r,content:E,viewport:M,onViewportChange:$,itemRefCallback:d,selectedItem:U,onItemLeave:_,itemTextRefCallback:N,focusSelectedItem:O,selectedItemText:q,position:n,isPositioned:B,searchRef:R},S.createElement(iD,{as:Tc,allowPinchZoom:!0},S.createElement(EN,{asChild:!0,trapped:A.open,onMountAutoFocus:L=>{L.preventDefault()},onUnmountAutoFocus:Ce(i,L=>{var F;(F=A.trigger)===null||F===void 0||F.focus({preventScroll:!0}),L.preventDefault()})},S.createElement(H4,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:L=>L.preventDefault(),onDismiss:()=>A.onOpenChange(!1)},S.createElement(p,ue({role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed",dir:A.dir,onContextMenu:L=>L.preventDefault()},w,D,{onPlaced:()=>y(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Ce(w.onKeyDown,L=>{const F=L.ctrlKey||L.altKey||L.metaKey;if(L.key==="Tab"&&L.preventDefault(),!F&&L.key.length===1&&b(L.key),["ArrowUp","ArrowDown","Home","End"].includes(L.key)){let Z=re().filter(K=>!K.disabled).map(K=>K.ref.current);if(["ArrowUp","End"].includes(L.key)&&(Z=Z.slice().reverse()),["ArrowUp","ArrowDown"].includes(L.key)){const K=L.target,X=Z.indexOf(K);Z=Z.slice(X+1)}setTimeout(()=>P(Z)),L.preventDefault()}})}))))))}),MB=S.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...i}=t,s=ya(Tl,r),o=Ph(Tl,r),[a,l]=S.useState(null),[f,c]=S.useState(null),u=Nt(e,j=>c(j)),h=Tm(r),v=S.useRef(!1),x=S.useRef(!0),{viewport:g,selectedItem:k,selectedItemText:w,focusSelectedItem:A}=o,E=S.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&f&&g&&k&&w){const j=s.trigger.getBoundingClientRect(),U=f.getBoundingClientRect(),W=s.valueNode.getBoundingClientRect(),q=w.getBoundingClientRect();if(s.dir!=="rtl"){const K=q.left-U.left,X=W.left-K,ve=j.left-X,ie=j.width+ve,ye=Math.max(ie,U.width),Qt=window.innerWidth-$i,Me=kw(X,[$i,Qt-ye]);a.style.minWidth=ie+"px",a.style.left=Me+"px"}else{const K=U.right-q.right,X=window.innerWidth-W.right-K,ve=window.innerWidth-j.right-X,ie=j.width+ve,ye=Math.max(ie,U.width),Qt=window.innerWidth-$i,Me=kw(X,[$i,Qt-ye]);a.style.minWidth=ie+"px",a.style.right=Me+"px"}const G=h(),re=window.innerHeight-$i*2,B=g.scrollHeight,y=window.getComputedStyle(f),C=parseInt(y.borderTopWidth,10),P=parseInt(y.paddingTop,10),O=parseInt(y.borderBottomWidth,10),m=parseInt(y.paddingBottom,10),T=C+P+B+m+O,R=Math.min(k.offsetHeight*5,T),b=window.getComputedStyle(g),d=parseInt(b.paddingTop,10),_=parseInt(b.paddingBottom,10),N=j.top+j.height/2-$i,p=re-N,D=k.offsetHeight/2,L=k.offsetTop+D,F=C+P+L,H=T-F;if(F<=N){const K=k===G[G.length-1].ref.current;a.style.bottom="0px";const X=f.clientHeight-g.offsetTop-g.offsetHeight,ve=Math.max(p,D+(K?_:0)+X+O),ie=F+ve;a.style.height=ie+"px"}else{const K=k===G[0].ref.current;a.style.top="0px";const ve=Math.max(N,C+g.offsetTop+(K?d:0)+D)+H;a.style.height=ve+"px",g.scrollTop=F-N+g.offsetTop}a.style.margin=`${$i}px 0`,a.style.minHeight=R+"px",a.style.maxHeight=re+"px",n==null||n(),requestAnimationFrame(()=>v.current=!0)}},[h,s.trigger,s.valueNode,a,f,g,k,w,s.dir,n]);xn(()=>E(),[E]);const[I,M]=S.useState();xn(()=>{f&&M(window.getComputedStyle(f).zIndex)},[f]);const $=S.useCallback(j=>{j&&x.current===!0&&(E(),A==null||A(),x.current=!1)},[E,A]);return S.createElement(NB,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:v,onScrollButtonChange:$},S.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:I}},S.createElement($e.div,ue({},i,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),_w=S.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=$i,...s}=t,o=Pm(r);return S.createElement(iO,ue({},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)"}}))}),[NB,OB]=Kl(Tl,{}),Tw="SelectViewport",DB=S.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=Ph(Tw,r),s=OB(Tw,r),o=Nt(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(Th.Slot,{scope:r},S.createElement($e.div,ue({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:Ce(n.onScroll,l=>{const f=l.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:u}=s;if(u!=null&&u.current&&c){const h=Math.abs(a.current-f.scrollTop);if(h>0){const v=window.innerHeight-$i*2,x=parseFloat(c.style.minHeight),g=parseFloat(c.style.height),k=Math.max(x,g);if(k0?E:0,c.style.justifyContent="flex-end")}}}a.current=f.scrollTop})}))))}),BB="SelectGroup",[LB,TK]=Kl(BB),$B=S.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=Yc();return S.createElement(LB,{scope:r,id:i},S.createElement($e.div,ue({role:"group","aria-labelledby":i},n,{ref:e})))}),Xy="SelectItem",[FB,jB]=Kl(Xy),UB=S.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:s,...o}=t,a=ya(Xy,r),l=Ph(Xy,r),f=a.value===n,[c,u]=S.useState(s??""),[h,v]=S.useState(!1),x=Nt(e,w=>{var A;return(A=l.itemRefCallback)===null||A===void 0?void 0:A.call(l,w,n,i)}),g=Yc(),k=()=>{i||(a.onValueChange(n),a.onOpenChange(!1))};return S.createElement(FB,{scope:r,value:n,disabled:i,textId:g,isSelected:f,onItemTextChange:S.useCallback(w=>{u(A=>{var E;return A||((E=w==null?void 0:w.textContent)!==null&&E!==void 0?E:"").trim()})},[])},S.createElement(Th.ItemSlot,{scope:r,value:n,disabled:i,textValue:c},S.createElement($e.div,ue({role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":f&&h,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},o,{ref:x,onFocus:Ce(o.onFocus,()=>v(!0)),onBlur:Ce(o.onBlur,()=>v(!1)),onPointerUp:Ce(o.onPointerUp,k),onPointerMove:Ce(o.onPointerMove,w=>{if(i){var A;(A=l.onItemLeave)===null||A===void 0||A.call(l)}else w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ce(o.onPointerLeave,w=>{if(w.currentTarget===document.activeElement){var A;(A=l.onItemLeave)===null||A===void 0||A.call(l)}}),onKeyDown:Ce(o.onKeyDown,w=>{var A;((A=l.searchRef)===null||A===void 0?void 0:A.current)!==""&&w.key===" "||(xB.includes(w.key)&&k(),w.key===" "&&w.preventDefault())})}))))}),Lu="SelectItemText",zB=S.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,...s}=t,o=ya(Lu,r),a=Ph(Lu,r),l=jB(Lu,r),f=AB(Lu,r),[c,u]=S.useState(null),h=Nt(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)}),v=c==null?void 0:c.textContent,x=S.useMemo(()=>S.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},v),[l.disabled,l.value,v]),{onNativeOptionAdd:g,onNativeOptionRemove:k}=f;return xn(()=>(g(x),()=>k(x)),[g,k,x]),S.createElement(S.Fragment,null,S.createElement($e.span,ue({id:l.textId},s,{ref:h})),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Ti.createPortal(s.children,o.valueNode):null)}),qC=S.forwardRef((t,e)=>{const{value:r,...n}=t,i=S.useRef(null),s=Nt(e,i),o=gm(r);return S.useEffect(()=>{const a=i.current,l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&c){const u=new Event("change",{bubbles:!0});c.call(a,r),a.dispatchEvent(u)}},[o,r]),S.createElement(HC,{asChild:!0},S.createElement("select",ue({},n,{ref:s,defaultValue:r})))});qC.displayName="BubbleSelect";function GC(t){const e=Dn(t),r=S.useRef(""),n=S.useRef(0),i=S.useCallback(o=>{const a=r.current+o;e(a),function l(f){r.current=f,window.clearTimeout(n.current),f!==""&&(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 KC(t,e,r){const i=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,s=r?t.indexOf(r):-1;let o=VB(t,Math.max(s,0));i.length===1&&(o=o.filter(f=>f!==r));const l=o.find(f=>f.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==r?l:void 0}function VB(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const HB=EB,WB=kB,qB=TB,GB=PB,KB=IB,JB=DB,QB=$B,YB=UB,XB=zB;var ZB="gohwum9 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11rb fyvr12rh fyvr11nj",eL="gohwumd fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12vk fyvr12vl fyvr12ve fyvr12vf fyvr11h0 fyvr11jw fyvr11ko fyvr12tz fyvr12tv fyvr12rh fyvr12ut fyvr12uj",tL="gohwum1 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12rh fyvr118c fyvr11jw fyvr11n2 fyvr12tz",rL=Ot({defaultClassName:"",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const nL=S.forwardRef(({children:t,className:e,...r},n)=>Q.jsx(YB,{className:Jr(eL,e),...r,ref:n,children:Q.jsx(XB,{children:t})})),iL=S.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:i,label:s="",description:o,labelLocation:a="hidden",name:l,options:f,placeholder:c,...u}=t;return Q.jsx(Vl,{disabled:n,display:"grid",id:i??l,label:s,labelLocation:a,description:o,whiteSpace:"nowrap",children:Q.jsxs(HB,{disabled:n,name:l,...u,children:[Q.jsxs(WB,{id:i??l,className:Jr(tL,rL({borderRadius:r})),ref:e,children:[Q.jsx(qB,{placeholder:c}),Q.jsx(ge,{as:GB,display:"inline-flex",children:Q.jsx(j4,{})})]}),Q.jsx(KB,{className:ZB,children:Q.jsx(JB,{children:Q.jsx(QB,{children:f.map(({value:h,label:v,...x})=>Q.jsx(nL,{value:h,...x,children:v},h))})})})]})})});S.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:i="Search",name:s="search",value:o,...a}=t,l=o?Q.jsx(RC,{icon:U4,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return Q.jsx(DC,{ref:e,name:s,leftIcon:qM,controls:r||l,placeholder:i,value:o,onChange:f=>n==null?void 0:n(f),...a})});var sL=Ot({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});S.forwardRef((t,e)=>{const{size:r="md",...n}=t;return Q.jsx(ge,{className:sL({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"})]})})});S.forwardRef(({children:t},e)=>Q.jsx(ge,{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 JC="Switch",[oL,PK]=Or(JC);oL(JC);Ot({defaultClassName:"",variantClassNames:{active:{true:"fyvr11rn fyvr12rn fyvr12ux",false:"fyvr11ob fyvr12rb"},disabled:{true:"fyvr12uh"}},defaultVariants:{},compoundVariants:[]});const QC="Tabs",[aL,IK]=Or(QC,[Gl]);Gl();aL(QC);var lL="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 Q.jsxs(ge,{className:lL,ref:e,background:"buttonGlass",...i,children:[r&&Q.jsx(r,{size:"xs"}),Q.jsx(sr,{children:n})]})});const fL="ToastProvider",[cL,RK,uL]=wh("Toast"),[YC,MK]=Or("Toast",[uL]),[NK,XC]=YC(fL),Pw="toast.viewportPause",Iw="toast.viewportResume",Ih="Toast",dL="toast.swipeStart",hL="toast.swipeMove",vL="toast.swipeCancel",yL="toast.swipeEnd",[pL,gL]=YC(Ih,{onClose(){}}),mL=S.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:f,onSwipeStart:c,onSwipeMove:u,onSwipeCancel:h,onSwipeEnd:v,...x}=t,g=XC(Ih,r),[k,w]=S.useState(null),A=Nt(e,y=>w(y)),E=S.useRef(null),I=S.useRef(null),M=i||g.duration,$=S.useRef(0),j=S.useRef(M),U=S.useRef(0),{onToastAdd:W,onToastRemove:q}=g,G=Dn(()=>{var y;(k==null?void 0:k.contains(document.activeElement))&&((y=g.viewport)===null||y===void 0||y.focus()),o()}),re=S.useCallback(y=>{!y||y===1/0||(window.clearTimeout(U.current),$.current=new Date().getTime(),U.current=window.setTimeout(G,y))},[G]);S.useEffect(()=>{const y=g.viewport;if(y){const C=()=>{re(j.current),f==null||f()},P=()=>{const O=new Date().getTime()-$.current;j.current=j.current-O,window.clearTimeout(U.current),l==null||l()};return y.addEventListener(Pw,P),y.addEventListener(Iw,C),()=>{y.removeEventListener(Pw,P),y.removeEventListener(Iw,C)}}},[g.viewport,M,l,f,re]),S.useEffect(()=>{s&&!g.isClosePausedRef.current&&re(M)},[s,M,g.isClosePausedRef,re]),S.useEffect(()=>(W(),()=>q()),[W,q]);const B=S.useMemo(()=>k?eA(k):null,[k]);return g.viewport?S.createElement(S.Fragment,null,B&&S.createElement(xL,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},B),S.createElement(pL,{scope:r,onClose:G},Ti.createPortal(S.createElement(cL.ItemSlot,{scope:r},S.createElement(CN,{asChild:!0,onEscapeKeyDown:Ce(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||G(),g.isFocusedToastEscapeKeyDownRef.current=!1})},S.createElement($e.li,ue({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":g.swipeDirection},x,{ref:A,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Ce(t.onKeyDown,y=>{y.key==="Escape"&&(a==null||a(y.nativeEvent),y.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,G()))}),onPointerDown:Ce(t.onPointerDown,y=>{y.button===0&&(E.current={x:y.clientX,y:y.clientY})}),onPointerMove:Ce(t.onPointerMove,y=>{if(!E.current)return;const C=y.clientX-E.current.x,P=y.clientY-E.current.y,O=Boolean(I.current),m=["left","right"].includes(g.swipeDirection),T=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,R=m?T(0,C):0,b=m?0:T(0,P),d=y.pointerType==="touch"?10:2,_={x:R,y:b},N={originalEvent:y,delta:_};O?(I.current=_,$u(hL,u,N,{discrete:!1})):Rw(_,g.swipeDirection,d)?(I.current=_,$u(dL,c,N,{discrete:!1}),y.target.setPointerCapture(y.pointerId)):(Math.abs(C)>d||Math.abs(P)>d)&&(E.current=null)}),onPointerUp:Ce(t.onPointerUp,y=>{const C=I.current,P=y.target;if(P.hasPointerCapture(y.pointerId)&&P.releasePointerCapture(y.pointerId),I.current=null,E.current=null,C){const O=y.currentTarget,m={originalEvent:y,delta:C};Rw(C,g.swipeDirection,g.swipeThreshold)?$u(yL,v,m,{discrete:!0}):$u(vL,h,m,{discrete:!0}),O.addEventListener("click",T=>T.preventDefault(),{once:!0})}})})))),g.viewport))):null});mL.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${Ih}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const xL=t=>{const{__scopeToast:e,children:r,...n}=t,i=XC(Ih,e),[s,o]=S.useState(!1),[a,l]=S.useState(!1);return EL(()=>o(!0)),S.useEffect(()=>{const f=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(f)},[]),a?null:S.createElement(sO,{asChild:!0},S.createElement(HC,n,s&&S.createElement(S.Fragment,null,i.label," ",r)))},bL="ToastAction",wL=S.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?S.createElement(ZC,{altText:r,asChild:!0},S.createElement(AL,ue({},n,{ref:e}))):null});wL.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${bL}\``)}};const CL="ToastClose",AL=S.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,i=gL(CL,r);return S.createElement(ZC,{asChild:!0},S.createElement($e.button,ue({type:"button"},n,{ref:e,onClick:Ce(t.onClick,i.onClose)})))}),ZC=S.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...i}=t;return S.createElement($e.div,ue({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},i,{ref:e}))});function eA(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),SL(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(...eA(n))}}),e}function $u(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?xm(i,s):i.dispatchEvent(s)}const Rw=(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 EL(t=()=>{}){const e=Dn(t);xn(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function SL(t){return t.nodeType===t.ELEMENT_NODE}Ot({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});S.createContext(null);var kL="_15pztn2",_L="_15pztn1 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12rh 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:f="hidden",name:c,rows:u,resize:h=!1,...v}=t;return Q.jsx(Vl,{description:s,disabled:o,display:"grid",id:a??c,label:l,labelLocation:f,children:Q.jsx(ge,{as:r,autoComplete:n,spellCheck:"false",className:Jr(_L,h&&kL),disabled:o,id:a??c,name:c,ref:e,rows:u,borderRadius:i,...v})})});const Zy=["dark","light"],TL="dark",PL="data-theme",tA="@sequence.theme",IL=()=>{const t=localStorage.getItem(tA);return Zy.includes(t)?t:TL},RL=S.createContext(null),ML=t=>{const[e,r]=S.useState(t.theme||IL());S.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),S.useEffect(()=>{t.theme&&Zy.includes(t.theme)&&r(t.theme)},[t.theme]),S.useEffect(()=>{const i=document.querySelector(":root");i&&i.setAttribute(PL,e)},[e]);const n=S.useMemo(()=>({theme:e,setTheme:i=>{Zy.includes(i)&&(localStorage.setItem(tA,i),r(i))}}),[e]);return Q.jsx(RL.Provider,{value:n,children:t.children})};var NL="bnrrebf fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11pt fyvr128 fyvr15o fyvr11h0",OL="bnrrebd",DL=Ot({defaultClassName:"fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"bnrreb5",sm:"bnrreb6",md:"bnrreb7",lg:"bnrreb8"},borderRadius:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]});const BL=S.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(ge,{className:Jr(r,DL({borderRadius:e,size:a})),style:i,flexShrink:"0",...l,children:s?Q.jsx(MC,{className:OL,disableAnimation:n,src:s}):Q.jsx(sr,{className:NL,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})}),[Rh,OK]=Or("Tooltip",[ql]);ql();const LL="TooltipProvider";Rh(LL);const rA="Tooltip";Rh(rA);const $L="TooltipPortal";Rh($L,{forceMount:void 0});Rh(rA,{isInside:!1});var nA,Mw=Ti;nA=Mw.createRoot,Mw.hydrateRoot;var ep={},FL={get exports(){return ep},set exports(t){ep=t}};const jL={},UL=Object.freeze(Object.defineProperty({__proto__:null,default:jL},Symbol.toStringTag,{value:"Module"})),zL=iS(UL);(function(t){(function(e,r){function n(B,y){if(!B)throw new Error(y||"Assertion failed")}function i(B,y){B.super_=y;var C=function(){};C.prototype=y.prototype,B.prototype=new C,B.prototype.constructor=B}function s(B,y,C){if(s.isBN(B))return B;this.negative=0,this.words=null,this.length=0,this.red=null,B!==null&&((y==="le"||y==="be")&&(C=y,y=10),this._init(B||0,y||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=zL.Buffer}catch{}s.isBN=function(y){return y instanceof s?!0:y!==null&&typeof y=="object"&&y.constructor.wordSize===s.wordSize&&Array.isArray(y.words)},s.max=function(y,C){return y.cmp(C)>0?y:C},s.min=function(y,C){return y.cmp(C)<0?y:C},s.prototype._init=function(y,C,P){if(typeof y=="number")return this._initNumber(y,C,P);if(typeof y=="object")return this._initArray(y,C,P);C==="hex"&&(C=16),n(C===(C|0)&&C>=2&&C<=36),y=y.toString().replace(/\s+/g,"");var O=0;y[0]==="-"&&(O++,this.negative=1),O=0;O-=3)T=y[O]|y[O-1]<<8|y[O-2]<<16,this.words[m]|=T<>>26-R&67108863,R+=24,R>=26&&(R-=26,m++);else if(P==="le")for(O=0,m=0;O>>26-R&67108863,R+=24,R>=26&&(R-=26,m++);return this._strip()};function a(B,y){var C=B.charCodeAt(y);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 "+B)}function l(B,y,C){var P=a(B,C);return C-1>=y&&(P|=a(B,C-1)<<4),P}s.prototype._parseHex=function(y,C,P){this.length=Math.ceil((y.length-C)/6),this.words=new Array(this.length);for(var O=0;O=C;O-=2)R=l(y,C,O)<=18?(m-=18,T+=1,this.words[T]|=R>>>26):m+=8;else{var b=y.length-C;for(O=b%2===0?C+1:C;O=18?(m-=18,T+=1,this.words[T]|=R>>>26):m+=8}this._strip()};function f(B,y,C,P){for(var O=0,m=0,T=Math.min(B.length,C),R=y;R=49?m=b-49+10:b>=17?m=b-17+10:m=b,n(b>=0&&m1&&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"],v=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],x=[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(y,C){y=y||10,C=C|0||1;var P;if(y===16||y==="hex"){P="";for(var O=0,m=0,T=0;T>>24-O&16777215,O+=2,O>=26&&(O-=26,T--),m!==0||T!==this.length-1?P=h[6-b.length]+b+P:P=b+P}for(m!==0&&(P=m.toString(16)+P);P.length%C!==0;)P="0"+P;return this.negative!==0&&(P="-"+P),P}if(y===(y|0)&&y>=2&&y<=36){var d=v[y],_=x[y];P="";var N=this.clone();for(N.negative=0;!N.isZero();){var p=N.modrn(_).toString(y);N=N.idivn(_),N.isZero()?P=p+P:P=h[d-p.length]+p+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 y=this.words[0];return this.length===2?y+=this.words[1]*67108864:this.length===3&&this.words[2]===1?y+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-y:y},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(y,C){return this.toArrayLike(o,y,C)}),s.prototype.toArray=function(y,C){return this.toArrayLike(Array,y,C)};var g=function(y,C){return y.allocUnsafe?y.allocUnsafe(C):new y(C)};s.prototype.toArrayLike=function(y,C,P){this._strip();var O=this.byteLength(),m=P||Math.max(1,O);n(O<=m,"byte array longer than desired length"),n(m>0,"Requested array length <= 0");var T=g(y,m),R=C==="le"?"LE":"BE";return this["_toArrayLike"+R](T,O),T},s.prototype._toArrayLikeLE=function(y,C){for(var P=0,O=0,m=0,T=0;m>8&255),P>16&255),T===6?(P>24&255),O=0,T=0):(O=R>>>24,T+=2)}if(P=0&&(y[P--]=R>>8&255),P>=0&&(y[P--]=R>>16&255),T===6?(P>=0&&(y[P--]=R>>24&255),O=0,T=0):(O=R>>>24,T+=2)}if(P>=0)for(y[P--]=O;P>=0;)y[P--]=0},Math.clz32?s.prototype._countBits=function(y){return 32-Math.clz32(y)}:s.prototype._countBits=function(y){var C=y,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(y){if(y===0)return 26;var C=y,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 y=this.words[this.length-1],C=this._countBits(y);return(this.length-1)*26+C};function k(B){for(var y=new Array(B.bitLength()),C=0;C>>O&1}return y}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var y=0,C=0;Cy.length?this.clone().ior(y):y.clone().ior(this)},s.prototype.uor=function(y){return this.length>y.length?this.clone().iuor(y):y.clone().iuor(this)},s.prototype.iuand=function(y){var C;this.length>y.length?C=y:C=this;for(var P=0;Py.length?this.clone().iand(y):y.clone().iand(this)},s.prototype.uand=function(y){return this.length>y.length?this.clone().iuand(y):y.clone().iuand(this)},s.prototype.iuxor=function(y){var C,P;this.length>y.length?(C=this,P=y):(C=y,P=this);for(var O=0;Oy.length?this.clone().ixor(y):y.clone().ixor(this)},s.prototype.uxor=function(y){return this.length>y.length?this.clone().iuxor(y):y.clone().iuxor(this)},s.prototype.inotn=function(y){n(typeof y=="number"&&y>=0);var C=Math.ceil(y/26)|0,P=y%26;this._expand(C),P>0&&C--;for(var O=0;O0&&(this.words[O]=~this.words[O]&67108863>>26-P),this._strip()},s.prototype.notn=function(y){return this.clone().inotn(y)},s.prototype.setn=function(y,C){n(typeof y=="number"&&y>=0);var P=y/26|0,O=y%26;return this._expand(P+1),C?this.words[P]=this.words[P]|1<y.length?(P=this,O=y):(P=y,O=this);for(var m=0,T=0;T>>26;for(;m!==0&&T>>26;if(this.length=P.length,m!==0)this.words[this.length]=m,this.length++;else if(P!==this)for(;Ty.length?this.clone().iadd(y):y.clone().iadd(this)},s.prototype.isub=function(y){if(y.negative!==0){y.negative=0;var C=this.iadd(y);return y.negative=1,C._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(y),this.negative=1,this._normSign();var P=this.cmp(y);if(P===0)return this.negative=0,this.length=1,this.words[0]=0,this;var O,m;P>0?(O=this,m=y):(O=y,m=this);for(var T=0,R=0;R>26,this.words[R]=C&67108863;for(;T!==0&&R>26,this.words[R]=C&67108863;if(T===0&&R>>26,N=b&67108863,p=Math.min(d,y.length-1),D=Math.max(0,d-B.length+1);D<=p;D++){var L=d-D|0;O=B.words[L]|0,m=y.words[D]|0,T=O*m+N,_+=T/67108864|0,N=T&67108863}C.words[d]=N|0,b=_|0}return b!==0?C.words[d]=b|0:C.length--,C._strip()}var A=function(y,C,P){var O=y.words,m=C.words,T=P.words,R=0,b,d,_,N=O[0]|0,p=N&8191,D=N>>>13,L=O[1]|0,F=L&8191,H=L>>>13,Z=O[2]|0,K=Z&8191,X=Z>>>13,ve=O[3]|0,ie=ve&8191,ye=ve>>>13,Qt=O[4]|0,Me=Qt&8191,Se=Qt>>>13,St=O[5]|0,Be=St&8191,Ge=St>>>13,lo=O[6]|0,Ke=lo&8191,Je=lo>>>13,fo=O[7]|0,Qe=fo&8191,Ye=fo>>>13,co=O[8]|0,Xe=co&8191,Ze=co>>>13,uo=O[9]|0,et=uo&8191,tt=uo>>>13,ho=m[0]|0,rt=ho&8191,nt=ho>>>13,vo=m[1]|0,it=vo&8191,st=vo>>>13,yo=m[2]|0,ot=yo&8191,at=yo>>>13,po=m[3]|0,lt=po&8191,ft=po>>>13,go=m[4]|0,ct=go&8191,ut=go>>>13,mo=m[5]|0,dt=mo&8191,ht=mo>>>13,xo=m[6]|0,vt=xo&8191,yt=xo>>>13,bo=m[7]|0,pt=bo&8191,gt=bo>>>13,wo=m[8]|0,mt=wo&8191,xt=wo>>>13,Co=m[9]|0,bt=Co&8191,wt=Co>>>13;P.negative=y.negative^C.negative,P.length=19,b=Math.imul(p,rt),d=Math.imul(p,nt),d=d+Math.imul(D,rt)|0,_=Math.imul(D,nt);var ps=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(ps>>>26)|0,ps&=67108863,b=Math.imul(F,rt),d=Math.imul(F,nt),d=d+Math.imul(H,rt)|0,_=Math.imul(H,nt),b=b+Math.imul(p,it)|0,d=d+Math.imul(p,st)|0,d=d+Math.imul(D,it)|0,_=_+Math.imul(D,st)|0;var gs=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(gs>>>26)|0,gs&=67108863,b=Math.imul(K,rt),d=Math.imul(K,nt),d=d+Math.imul(X,rt)|0,_=Math.imul(X,nt),b=b+Math.imul(F,it)|0,d=d+Math.imul(F,st)|0,d=d+Math.imul(H,it)|0,_=_+Math.imul(H,st)|0,b=b+Math.imul(p,ot)|0,d=d+Math.imul(p,at)|0,d=d+Math.imul(D,ot)|0,_=_+Math.imul(D,at)|0;var ms=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(ms>>>26)|0,ms&=67108863,b=Math.imul(ie,rt),d=Math.imul(ie,nt),d=d+Math.imul(ye,rt)|0,_=Math.imul(ye,nt),b=b+Math.imul(K,it)|0,d=d+Math.imul(K,st)|0,d=d+Math.imul(X,it)|0,_=_+Math.imul(X,st)|0,b=b+Math.imul(F,ot)|0,d=d+Math.imul(F,at)|0,d=d+Math.imul(H,ot)|0,_=_+Math.imul(H,at)|0,b=b+Math.imul(p,lt)|0,d=d+Math.imul(p,ft)|0,d=d+Math.imul(D,lt)|0,_=_+Math.imul(D,ft)|0;var xs=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(xs>>>26)|0,xs&=67108863,b=Math.imul(Me,rt),d=Math.imul(Me,nt),d=d+Math.imul(Se,rt)|0,_=Math.imul(Se,nt),b=b+Math.imul(ie,it)|0,d=d+Math.imul(ie,st)|0,d=d+Math.imul(ye,it)|0,_=_+Math.imul(ye,st)|0,b=b+Math.imul(K,ot)|0,d=d+Math.imul(K,at)|0,d=d+Math.imul(X,ot)|0,_=_+Math.imul(X,at)|0,b=b+Math.imul(F,lt)|0,d=d+Math.imul(F,ft)|0,d=d+Math.imul(H,lt)|0,_=_+Math.imul(H,ft)|0,b=b+Math.imul(p,ct)|0,d=d+Math.imul(p,ut)|0,d=d+Math.imul(D,ct)|0,_=_+Math.imul(D,ut)|0;var bs=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(bs>>>26)|0,bs&=67108863,b=Math.imul(Be,rt),d=Math.imul(Be,nt),d=d+Math.imul(Ge,rt)|0,_=Math.imul(Ge,nt),b=b+Math.imul(Me,it)|0,d=d+Math.imul(Me,st)|0,d=d+Math.imul(Se,it)|0,_=_+Math.imul(Se,st)|0,b=b+Math.imul(ie,ot)|0,d=d+Math.imul(ie,at)|0,d=d+Math.imul(ye,ot)|0,_=_+Math.imul(ye,at)|0,b=b+Math.imul(K,lt)|0,d=d+Math.imul(K,ft)|0,d=d+Math.imul(X,lt)|0,_=_+Math.imul(X,ft)|0,b=b+Math.imul(F,ct)|0,d=d+Math.imul(F,ut)|0,d=d+Math.imul(H,ct)|0,_=_+Math.imul(H,ut)|0,b=b+Math.imul(p,dt)|0,d=d+Math.imul(p,ht)|0,d=d+Math.imul(D,dt)|0,_=_+Math.imul(D,ht)|0;var Xh=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(Xh>>>26)|0,Xh&=67108863,b=Math.imul(Ke,rt),d=Math.imul(Ke,nt),d=d+Math.imul(Je,rt)|0,_=Math.imul(Je,nt),b=b+Math.imul(Be,it)|0,d=d+Math.imul(Be,st)|0,d=d+Math.imul(Ge,it)|0,_=_+Math.imul(Ge,st)|0,b=b+Math.imul(Me,ot)|0,d=d+Math.imul(Me,at)|0,d=d+Math.imul(Se,ot)|0,_=_+Math.imul(Se,at)|0,b=b+Math.imul(ie,lt)|0,d=d+Math.imul(ie,ft)|0,d=d+Math.imul(ye,lt)|0,_=_+Math.imul(ye,ft)|0,b=b+Math.imul(K,ct)|0,d=d+Math.imul(K,ut)|0,d=d+Math.imul(X,ct)|0,_=_+Math.imul(X,ut)|0,b=b+Math.imul(F,dt)|0,d=d+Math.imul(F,ht)|0,d=d+Math.imul(H,dt)|0,_=_+Math.imul(H,ht)|0,b=b+Math.imul(p,vt)|0,d=d+Math.imul(p,yt)|0,d=d+Math.imul(D,vt)|0,_=_+Math.imul(D,yt)|0;var Zh=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(Zh>>>26)|0,Zh&=67108863,b=Math.imul(Qe,rt),d=Math.imul(Qe,nt),d=d+Math.imul(Ye,rt)|0,_=Math.imul(Ye,nt),b=b+Math.imul(Ke,it)|0,d=d+Math.imul(Ke,st)|0,d=d+Math.imul(Je,it)|0,_=_+Math.imul(Je,st)|0,b=b+Math.imul(Be,ot)|0,d=d+Math.imul(Be,at)|0,d=d+Math.imul(Ge,ot)|0,_=_+Math.imul(Ge,at)|0,b=b+Math.imul(Me,lt)|0,d=d+Math.imul(Me,ft)|0,d=d+Math.imul(Se,lt)|0,_=_+Math.imul(Se,ft)|0,b=b+Math.imul(ie,ct)|0,d=d+Math.imul(ie,ut)|0,d=d+Math.imul(ye,ct)|0,_=_+Math.imul(ye,ut)|0,b=b+Math.imul(K,dt)|0,d=d+Math.imul(K,ht)|0,d=d+Math.imul(X,dt)|0,_=_+Math.imul(X,ht)|0,b=b+Math.imul(F,vt)|0,d=d+Math.imul(F,yt)|0,d=d+Math.imul(H,vt)|0,_=_+Math.imul(H,yt)|0,b=b+Math.imul(p,pt)|0,d=d+Math.imul(p,gt)|0,d=d+Math.imul(D,pt)|0,_=_+Math.imul(D,gt)|0;var e1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(e1>>>26)|0,e1&=67108863,b=Math.imul(Xe,rt),d=Math.imul(Xe,nt),d=d+Math.imul(Ze,rt)|0,_=Math.imul(Ze,nt),b=b+Math.imul(Qe,it)|0,d=d+Math.imul(Qe,st)|0,d=d+Math.imul(Ye,it)|0,_=_+Math.imul(Ye,st)|0,b=b+Math.imul(Ke,ot)|0,d=d+Math.imul(Ke,at)|0,d=d+Math.imul(Je,ot)|0,_=_+Math.imul(Je,at)|0,b=b+Math.imul(Be,lt)|0,d=d+Math.imul(Be,ft)|0,d=d+Math.imul(Ge,lt)|0,_=_+Math.imul(Ge,ft)|0,b=b+Math.imul(Me,ct)|0,d=d+Math.imul(Me,ut)|0,d=d+Math.imul(Se,ct)|0,_=_+Math.imul(Se,ut)|0,b=b+Math.imul(ie,dt)|0,d=d+Math.imul(ie,ht)|0,d=d+Math.imul(ye,dt)|0,_=_+Math.imul(ye,ht)|0,b=b+Math.imul(K,vt)|0,d=d+Math.imul(K,yt)|0,d=d+Math.imul(X,vt)|0,_=_+Math.imul(X,yt)|0,b=b+Math.imul(F,pt)|0,d=d+Math.imul(F,gt)|0,d=d+Math.imul(H,pt)|0,_=_+Math.imul(H,gt)|0,b=b+Math.imul(p,mt)|0,d=d+Math.imul(p,xt)|0,d=d+Math.imul(D,mt)|0,_=_+Math.imul(D,xt)|0;var t1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(t1>>>26)|0,t1&=67108863,b=Math.imul(et,rt),d=Math.imul(et,nt),d=d+Math.imul(tt,rt)|0,_=Math.imul(tt,nt),b=b+Math.imul(Xe,it)|0,d=d+Math.imul(Xe,st)|0,d=d+Math.imul(Ze,it)|0,_=_+Math.imul(Ze,st)|0,b=b+Math.imul(Qe,ot)|0,d=d+Math.imul(Qe,at)|0,d=d+Math.imul(Ye,ot)|0,_=_+Math.imul(Ye,at)|0,b=b+Math.imul(Ke,lt)|0,d=d+Math.imul(Ke,ft)|0,d=d+Math.imul(Je,lt)|0,_=_+Math.imul(Je,ft)|0,b=b+Math.imul(Be,ct)|0,d=d+Math.imul(Be,ut)|0,d=d+Math.imul(Ge,ct)|0,_=_+Math.imul(Ge,ut)|0,b=b+Math.imul(Me,dt)|0,d=d+Math.imul(Me,ht)|0,d=d+Math.imul(Se,dt)|0,_=_+Math.imul(Se,ht)|0,b=b+Math.imul(ie,vt)|0,d=d+Math.imul(ie,yt)|0,d=d+Math.imul(ye,vt)|0,_=_+Math.imul(ye,yt)|0,b=b+Math.imul(K,pt)|0,d=d+Math.imul(K,gt)|0,d=d+Math.imul(X,pt)|0,_=_+Math.imul(X,gt)|0,b=b+Math.imul(F,mt)|0,d=d+Math.imul(F,xt)|0,d=d+Math.imul(H,mt)|0,_=_+Math.imul(H,xt)|0,b=b+Math.imul(p,bt)|0,d=d+Math.imul(p,wt)|0,d=d+Math.imul(D,bt)|0,_=_+Math.imul(D,wt)|0;var r1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(r1>>>26)|0,r1&=67108863,b=Math.imul(et,it),d=Math.imul(et,st),d=d+Math.imul(tt,it)|0,_=Math.imul(tt,st),b=b+Math.imul(Xe,ot)|0,d=d+Math.imul(Xe,at)|0,d=d+Math.imul(Ze,ot)|0,_=_+Math.imul(Ze,at)|0,b=b+Math.imul(Qe,lt)|0,d=d+Math.imul(Qe,ft)|0,d=d+Math.imul(Ye,lt)|0,_=_+Math.imul(Ye,ft)|0,b=b+Math.imul(Ke,ct)|0,d=d+Math.imul(Ke,ut)|0,d=d+Math.imul(Je,ct)|0,_=_+Math.imul(Je,ut)|0,b=b+Math.imul(Be,dt)|0,d=d+Math.imul(Be,ht)|0,d=d+Math.imul(Ge,dt)|0,_=_+Math.imul(Ge,ht)|0,b=b+Math.imul(Me,vt)|0,d=d+Math.imul(Me,yt)|0,d=d+Math.imul(Se,vt)|0,_=_+Math.imul(Se,yt)|0,b=b+Math.imul(ie,pt)|0,d=d+Math.imul(ie,gt)|0,d=d+Math.imul(ye,pt)|0,_=_+Math.imul(ye,gt)|0,b=b+Math.imul(K,mt)|0,d=d+Math.imul(K,xt)|0,d=d+Math.imul(X,mt)|0,_=_+Math.imul(X,xt)|0,b=b+Math.imul(F,bt)|0,d=d+Math.imul(F,wt)|0,d=d+Math.imul(H,bt)|0,_=_+Math.imul(H,wt)|0;var n1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(n1>>>26)|0,n1&=67108863,b=Math.imul(et,ot),d=Math.imul(et,at),d=d+Math.imul(tt,ot)|0,_=Math.imul(tt,at),b=b+Math.imul(Xe,lt)|0,d=d+Math.imul(Xe,ft)|0,d=d+Math.imul(Ze,lt)|0,_=_+Math.imul(Ze,ft)|0,b=b+Math.imul(Qe,ct)|0,d=d+Math.imul(Qe,ut)|0,d=d+Math.imul(Ye,ct)|0,_=_+Math.imul(Ye,ut)|0,b=b+Math.imul(Ke,dt)|0,d=d+Math.imul(Ke,ht)|0,d=d+Math.imul(Je,dt)|0,_=_+Math.imul(Je,ht)|0,b=b+Math.imul(Be,vt)|0,d=d+Math.imul(Be,yt)|0,d=d+Math.imul(Ge,vt)|0,_=_+Math.imul(Ge,yt)|0,b=b+Math.imul(Me,pt)|0,d=d+Math.imul(Me,gt)|0,d=d+Math.imul(Se,pt)|0,_=_+Math.imul(Se,gt)|0,b=b+Math.imul(ie,mt)|0,d=d+Math.imul(ie,xt)|0,d=d+Math.imul(ye,mt)|0,_=_+Math.imul(ye,xt)|0,b=b+Math.imul(K,bt)|0,d=d+Math.imul(K,wt)|0,d=d+Math.imul(X,bt)|0,_=_+Math.imul(X,wt)|0;var i1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(i1>>>26)|0,i1&=67108863,b=Math.imul(et,lt),d=Math.imul(et,ft),d=d+Math.imul(tt,lt)|0,_=Math.imul(tt,ft),b=b+Math.imul(Xe,ct)|0,d=d+Math.imul(Xe,ut)|0,d=d+Math.imul(Ze,ct)|0,_=_+Math.imul(Ze,ut)|0,b=b+Math.imul(Qe,dt)|0,d=d+Math.imul(Qe,ht)|0,d=d+Math.imul(Ye,dt)|0,_=_+Math.imul(Ye,ht)|0,b=b+Math.imul(Ke,vt)|0,d=d+Math.imul(Ke,yt)|0,d=d+Math.imul(Je,vt)|0,_=_+Math.imul(Je,yt)|0,b=b+Math.imul(Be,pt)|0,d=d+Math.imul(Be,gt)|0,d=d+Math.imul(Ge,pt)|0,_=_+Math.imul(Ge,gt)|0,b=b+Math.imul(Me,mt)|0,d=d+Math.imul(Me,xt)|0,d=d+Math.imul(Se,mt)|0,_=_+Math.imul(Se,xt)|0,b=b+Math.imul(ie,bt)|0,d=d+Math.imul(ie,wt)|0,d=d+Math.imul(ye,bt)|0,_=_+Math.imul(ye,wt)|0;var s1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(s1>>>26)|0,s1&=67108863,b=Math.imul(et,ct),d=Math.imul(et,ut),d=d+Math.imul(tt,ct)|0,_=Math.imul(tt,ut),b=b+Math.imul(Xe,dt)|0,d=d+Math.imul(Xe,ht)|0,d=d+Math.imul(Ze,dt)|0,_=_+Math.imul(Ze,ht)|0,b=b+Math.imul(Qe,vt)|0,d=d+Math.imul(Qe,yt)|0,d=d+Math.imul(Ye,vt)|0,_=_+Math.imul(Ye,yt)|0,b=b+Math.imul(Ke,pt)|0,d=d+Math.imul(Ke,gt)|0,d=d+Math.imul(Je,pt)|0,_=_+Math.imul(Je,gt)|0,b=b+Math.imul(Be,mt)|0,d=d+Math.imul(Be,xt)|0,d=d+Math.imul(Ge,mt)|0,_=_+Math.imul(Ge,xt)|0,b=b+Math.imul(Me,bt)|0,d=d+Math.imul(Me,wt)|0,d=d+Math.imul(Se,bt)|0,_=_+Math.imul(Se,wt)|0;var o1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(o1>>>26)|0,o1&=67108863,b=Math.imul(et,dt),d=Math.imul(et,ht),d=d+Math.imul(tt,dt)|0,_=Math.imul(tt,ht),b=b+Math.imul(Xe,vt)|0,d=d+Math.imul(Xe,yt)|0,d=d+Math.imul(Ze,vt)|0,_=_+Math.imul(Ze,yt)|0,b=b+Math.imul(Qe,pt)|0,d=d+Math.imul(Qe,gt)|0,d=d+Math.imul(Ye,pt)|0,_=_+Math.imul(Ye,gt)|0,b=b+Math.imul(Ke,mt)|0,d=d+Math.imul(Ke,xt)|0,d=d+Math.imul(Je,mt)|0,_=_+Math.imul(Je,xt)|0,b=b+Math.imul(Be,bt)|0,d=d+Math.imul(Be,wt)|0,d=d+Math.imul(Ge,bt)|0,_=_+Math.imul(Ge,wt)|0;var a1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(a1>>>26)|0,a1&=67108863,b=Math.imul(et,vt),d=Math.imul(et,yt),d=d+Math.imul(tt,vt)|0,_=Math.imul(tt,yt),b=b+Math.imul(Xe,pt)|0,d=d+Math.imul(Xe,gt)|0,d=d+Math.imul(Ze,pt)|0,_=_+Math.imul(Ze,gt)|0,b=b+Math.imul(Qe,mt)|0,d=d+Math.imul(Qe,xt)|0,d=d+Math.imul(Ye,mt)|0,_=_+Math.imul(Ye,xt)|0,b=b+Math.imul(Ke,bt)|0,d=d+Math.imul(Ke,wt)|0,d=d+Math.imul(Je,bt)|0,_=_+Math.imul(Je,wt)|0;var l1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(l1>>>26)|0,l1&=67108863,b=Math.imul(et,pt),d=Math.imul(et,gt),d=d+Math.imul(tt,pt)|0,_=Math.imul(tt,gt),b=b+Math.imul(Xe,mt)|0,d=d+Math.imul(Xe,xt)|0,d=d+Math.imul(Ze,mt)|0,_=_+Math.imul(Ze,xt)|0,b=b+Math.imul(Qe,bt)|0,d=d+Math.imul(Qe,wt)|0,d=d+Math.imul(Ye,bt)|0,_=_+Math.imul(Ye,wt)|0;var f1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(f1>>>26)|0,f1&=67108863,b=Math.imul(et,mt),d=Math.imul(et,xt),d=d+Math.imul(tt,mt)|0,_=Math.imul(tt,xt),b=b+Math.imul(Xe,bt)|0,d=d+Math.imul(Xe,wt)|0,d=d+Math.imul(Ze,bt)|0,_=_+Math.imul(Ze,wt)|0;var c1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(c1>>>26)|0,c1&=67108863,b=Math.imul(et,bt),d=Math.imul(et,wt),d=d+Math.imul(tt,bt)|0,_=Math.imul(tt,wt);var u1=(R+b|0)+((d&8191)<<13)|0;return R=(_+(d>>>13)|0)+(u1>>>26)|0,u1&=67108863,T[0]=ps,T[1]=gs,T[2]=ms,T[3]=xs,T[4]=bs,T[5]=Xh,T[6]=Zh,T[7]=e1,T[8]=t1,T[9]=r1,T[10]=n1,T[11]=i1,T[12]=s1,T[13]=o1,T[14]=a1,T[15]=l1,T[16]=f1,T[17]=c1,T[18]=u1,R!==0&&(T[19]=R,P.length++),P};Math.imul||(A=w);function E(B,y,C){C.negative=y.negative^B.negative,C.length=B.length+y.length;for(var P=0,O=0,m=0;m>>26)|0,O+=T>>>26,T&=67108863}C.words[m]=R,P=T,T=O}return P!==0?C.words[m]=P:C.length--,C._strip()}function I(B,y,C){return E(B,y,C)}s.prototype.mulTo=function(y,C){var P,O=this.length+y.length;return this.length===10&&y.length===10?P=A(this,y,C):O<63?P=w(this,y,C):O<1024?P=E(this,y,C):P=I(this,y,C),P},s.prototype.mul=function(y){var C=new s(null);return C.words=new Array(this.length+y.length),this.mulTo(y,C)},s.prototype.mulf=function(y){var C=new s(null);return C.words=new Array(this.length+y.length),I(this,y,C)},s.prototype.imul=function(y){return this.clone().mulTo(y,this)},s.prototype.imuln=function(y){var C=y<0;C&&(y=-y),n(typeof y=="number"),n(y<67108864);for(var P=0,O=0;O>=26,P+=m/67108864|0,P+=T>>>26,this.words[O]=T&67108863}return P!==0&&(this.words[O]=P,this.length++),C?this.ineg():this},s.prototype.muln=function(y){return this.clone().imuln(y)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(y){var C=k(y);if(C.length===0)return new s(1);for(var P=this,O=0;O=0);var C=y%26,P=(y-C)/26,O=67108863>>>26-C<<26-C,m;if(C!==0){var T=0;for(m=0;m>>26-C}T&&(this.words[m]=T,this.length++)}if(P!==0){for(m=this.length-1;m>=0;m--)this.words[m+P]=this.words[m];for(m=0;m=0);var O;C?O=(C-C%26)/26:O=0;var m=y%26,T=Math.min((y-m)/26,this.length),R=67108863^67108863>>>m<T)for(this.length-=T,d=0;d=0&&(_!==0||d>=O);d--){var N=this.words[d]|0;this.words[d]=_<<26-m|N>>>m,_=N&R}return b&&_!==0&&(b.words[b.length++]=_),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(y,C,P){return n(this.negative===0),this.iushrn(y,C,P)},s.prototype.shln=function(y){return this.clone().ishln(y)},s.prototype.ushln=function(y){return this.clone().iushln(y)},s.prototype.shrn=function(y){return this.clone().ishrn(y)},s.prototype.ushrn=function(y){return this.clone().iushrn(y)},s.prototype.testn=function(y){n(typeof y=="number"&&y>=0);var C=y%26,P=(y-C)/26,O=1<=0);var C=y%26,P=(y-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 O=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(y){if(n(typeof y=="number"),n(y<67108864),y<0)return this.iaddn(-y);if(this.negative!==0)return this.negative=0,this.iaddn(y),this.negative=1,this;if(this.words[0]-=y,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var C=0;C>26)-(b/67108864|0),this.words[m+P]=T&67108863}for(;m>26,this.words[m+P]=T&67108863;if(R===0)return this._strip();for(n(R===-1),R=0,m=0;m>26,this.words[m]=T&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(y,C){var P=this.length-y.length,O=this.clone(),m=y,T=m.words[m.length-1]|0,R=this._countBits(T);P=26-R,P!==0&&(m=m.ushln(P),O.iushln(P),T=m.words[m.length-1]|0);var b=O.length-m.length,d;if(C!=="mod"){d=new s(null),d.length=b+1,d.words=new Array(d.length);for(var _=0;_=0;p--){var D=(O.words[m.length+p]|0)*67108864+(O.words[m.length+p-1]|0);for(D=Math.min(D/T|0,67108863),O._ishlnsubmul(m,D,p);O.negative!==0;)D--,O.negative=0,O._ishlnsubmul(m,1,p),O.isZero()||(O.negative^=1);d&&(d.words[p]=D)}return d&&d._strip(),O._strip(),C!=="div"&&P!==0&&O.iushrn(P),{div:d||null,mod:O}},s.prototype.divmod=function(y,C,P){if(n(!y.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var O,m,T;return this.negative!==0&&y.negative===0?(T=this.neg().divmod(y,C),C!=="mod"&&(O=T.div.neg()),C!=="div"&&(m=T.mod.neg(),P&&m.negative!==0&&m.iadd(y)),{div:O,mod:m}):this.negative===0&&y.negative!==0?(T=this.divmod(y.neg(),C),C!=="mod"&&(O=T.div.neg()),{div:O,mod:T.mod}):this.negative&y.negative?(T=this.neg().divmod(y.neg(),C),C!=="div"&&(m=T.mod.neg(),P&&m.negative!==0&&m.isub(y)),{div:T.div,mod:m}):y.length>this.length||this.cmp(y)<0?{div:new s(0),mod:this}:y.length===1?C==="div"?{div:this.divn(y.words[0]),mod:null}:C==="mod"?{div:null,mod:new s(this.modrn(y.words[0]))}:{div:this.divn(y.words[0]),mod:new s(this.modrn(y.words[0]))}:this._wordDiv(y,C)},s.prototype.div=function(y){return this.divmod(y,"div",!1).div},s.prototype.mod=function(y){return this.divmod(y,"mod",!1).mod},s.prototype.umod=function(y){return this.divmod(y,"mod",!0).mod},s.prototype.divRound=function(y){var C=this.divmod(y);if(C.mod.isZero())return C.div;var P=C.div.negative!==0?C.mod.isub(y):C.mod,O=y.ushrn(1),m=y.andln(1),T=P.cmp(O);return T<0||m===1&&T===0?C.div:C.div.negative!==0?C.div.isubn(1):C.div.iaddn(1)},s.prototype.modrn=function(y){var C=y<0;C&&(y=-y),n(y<=67108863);for(var P=(1<<26)%y,O=0,m=this.length-1;m>=0;m--)O=(P*O+(this.words[m]|0))%y;return C?-O:O},s.prototype.modn=function(y){return this.modrn(y)},s.prototype.idivn=function(y){var C=y<0;C&&(y=-y),n(y<=67108863);for(var P=0,O=this.length-1;O>=0;O--){var m=(this.words[O]|0)+P*67108864;this.words[O]=m/y|0,P=m%y}return this._strip(),C?this.ineg():this},s.prototype.divn=function(y){return this.clone().idivn(y)},s.prototype.egcd=function(y){n(y.negative===0),n(!y.isZero());var C=this,P=y.clone();C.negative!==0?C=C.umod(y):C=C.clone();for(var O=new s(1),m=new s(0),T=new s(0),R=new s(1),b=0;C.isEven()&&P.isEven();)C.iushrn(1),P.iushrn(1),++b;for(var d=P.clone(),_=C.clone();!C.isZero();){for(var N=0,p=1;!(C.words[0]&p)&&N<26;++N,p<<=1);if(N>0)for(C.iushrn(N);N-- >0;)(O.isOdd()||m.isOdd())&&(O.iadd(d),m.isub(_)),O.iushrn(1),m.iushrn(1);for(var D=0,L=1;!(P.words[0]&L)&&D<26;++D,L<<=1);if(D>0)for(P.iushrn(D);D-- >0;)(T.isOdd()||R.isOdd())&&(T.iadd(d),R.isub(_)),T.iushrn(1),R.iushrn(1);C.cmp(P)>=0?(C.isub(P),O.isub(T),m.isub(R)):(P.isub(C),T.isub(O),R.isub(m))}return{a:T,b:R,gcd:P.iushln(b)}},s.prototype._invmp=function(y){n(y.negative===0),n(!y.isZero());var C=this,P=y.clone();C.negative!==0?C=C.umod(y):C=C.clone();for(var O=new s(1),m=new s(0),T=P.clone();C.cmpn(1)>0&&P.cmpn(1)>0;){for(var R=0,b=1;!(C.words[0]&b)&&R<26;++R,b<<=1);if(R>0)for(C.iushrn(R);R-- >0;)O.isOdd()&&O.iadd(T),O.iushrn(1);for(var d=0,_=1;!(P.words[0]&_)&&d<26;++d,_<<=1);if(d>0)for(P.iushrn(d);d-- >0;)m.isOdd()&&m.iadd(T),m.iushrn(1);C.cmp(P)>=0?(C.isub(P),O.isub(m)):(P.isub(C),m.isub(O))}var N;return C.cmpn(1)===0?N=O:N=m,N.cmpn(0)<0&&N.iadd(y),N},s.prototype.gcd=function(y){if(this.isZero())return y.abs();if(y.isZero())return this.abs();var C=this.clone(),P=y.clone();C.negative=0,P.negative=0;for(var O=0;C.isEven()&&P.isEven();O++)C.iushrn(1),P.iushrn(1);do{for(;C.isEven();)C.iushrn(1);for(;P.isEven();)P.iushrn(1);var m=C.cmp(P);if(m<0){var T=C;C=P,P=T}else if(m===0||P.cmpn(1)===0)break;C.isub(P)}while(!0);return P.iushln(O)},s.prototype.invm=function(y){return this.egcd(y).a.umod(y)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(y){return this.words[0]&y},s.prototype.bincn=function(y){n(typeof y=="number");var C=y%26,P=(y-C)/26,O=1<>>26,R&=67108863,this.words[T]=R}return m!==0&&(this.words[T]=m,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(y){var C=y<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&&(y=-y),n(y<=67108863,"Number is too big");var O=this.words[0]|0;P=O===y?0:Oy.length)return 1;if(this.length=0;P--){var O=this.words[P]|0,m=y.words[P]|0;if(O!==m){Om&&(C=1);break}}return C},s.prototype.gtn=function(y){return this.cmpn(y)===1},s.prototype.gt=function(y){return this.cmp(y)===1},s.prototype.gten=function(y){return this.cmpn(y)>=0},s.prototype.gte=function(y){return this.cmp(y)>=0},s.prototype.ltn=function(y){return this.cmpn(y)===-1},s.prototype.lt=function(y){return this.cmp(y)===-1},s.prototype.lten=function(y){return this.cmpn(y)<=0},s.prototype.lte=function(y){return this.cmp(y)<=0},s.prototype.eqn=function(y){return this.cmpn(y)===0},s.prototype.eq=function(y){return this.cmp(y)===0},s.red=function(y){return new G(y)},s.prototype.toRed=function(y){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),y.convertTo(this)._forceRed(y)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(y){return this.red=y,this},s.prototype.forceRed=function(y){return n(!this.red,"Already a number in reduction context"),this._forceRed(y)},s.prototype.redAdd=function(y){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,y)},s.prototype.redIAdd=function(y){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,y)},s.prototype.redSub=function(y){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,y)},s.prototype.redISub=function(y){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,y)},s.prototype.redShl=function(y){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,y)},s.prototype.redMul=function(y){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.mul(this,y)},s.prototype.redIMul=function(y){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.imul(this,y)},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(y){return n(this.red&&!y.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,y)};var M={k256:null,p224:null,p192:null,p25519:null};function $(B,y){this.name=B,this.p=new s(y,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var y=new s(null);return y.words=new Array(Math.ceil(this.n/13)),y},$.prototype.ireduce=function(y){var C=y,P;do this.split(C,this.tmp),C=this.imulK(C),C=C.iadd(this.tmp),P=C.bitLength();while(P>this.n);var O=P0?C.isub(this.p):C.strip!==void 0?C.strip():C._strip(),C},$.prototype.split=function(y,C){y.iushrn(this.n,0,C)},$.prototype.imulK=function(y){return y.imul(this.k)};function j(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(j,$),j.prototype.split=function(y,C){for(var P=4194303,O=Math.min(y.length,9),m=0;m>>22,T=R}T>>>=22,y.words[m-10]=T,T===0&&y.length>10?y.length-=10:y.length-=9},j.prototype.imulK=function(y){y.words[y.length]=0,y.words[y.length+1]=0,y.length+=2;for(var C=0,P=0;P>>=26,y.words[P]=m,C=O}return C!==0&&(y.words[y.length++]=C),y},s._prime=function(y){if(M[y])return M[y];var C;if(y==="k256")C=new j;else if(y==="p224")C=new U;else if(y==="p192")C=new W;else if(y==="p25519")C=new q;else throw new Error("Unknown prime "+y);return M[y]=C,C};function G(B){if(typeof B=="string"){var y=s._prime(B);this.m=y.p,this.prime=y}else n(B.gtn(1),"modulus must be greater than 1"),this.m=B,this.prime=null}G.prototype._verify1=function(y){n(y.negative===0,"red works only with positives"),n(y.red,"red works only with red numbers")},G.prototype._verify2=function(y,C){n((y.negative|C.negative)===0,"red works only with positives"),n(y.red&&y.red===C.red,"red works only with red numbers")},G.prototype.imod=function(y){return this.prime?this.prime.ireduce(y)._forceRed(this):(c(y,y.umod(this.m)._forceRed(this)),y)},G.prototype.neg=function(y){return y.isZero()?y.clone():this.m.sub(y)._forceRed(this)},G.prototype.add=function(y,C){this._verify2(y,C);var P=y.add(C);return P.cmp(this.m)>=0&&P.isub(this.m),P._forceRed(this)},G.prototype.iadd=function(y,C){this._verify2(y,C);var P=y.iadd(C);return P.cmp(this.m)>=0&&P.isub(this.m),P},G.prototype.sub=function(y,C){this._verify2(y,C);var P=y.sub(C);return P.cmpn(0)<0&&P.iadd(this.m),P._forceRed(this)},G.prototype.isub=function(y,C){this._verify2(y,C);var P=y.isub(C);return P.cmpn(0)<0&&P.iadd(this.m),P},G.prototype.shl=function(y,C){return this._verify1(y),this.imod(y.ushln(C))},G.prototype.imul=function(y,C){return this._verify2(y,C),this.imod(y.imul(C))},G.prototype.mul=function(y,C){return this._verify2(y,C),this.imod(y.mul(C))},G.prototype.isqr=function(y){return this.imul(y,y.clone())},G.prototype.sqr=function(y){return this.mul(y,y)},G.prototype.sqrt=function(y){if(y.isZero())return y.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(y,P)}for(var O=this.m.subn(1),m=0;!O.isZero()&&O.andln(1)===0;)m++,O.iushrn(1);n(!O.isZero());var T=new s(1).toRed(this),R=T.redNeg(),b=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new s(2*d*d).toRed(this);this.pow(d,b).cmp(R)!==0;)d.redIAdd(R);for(var _=this.pow(d,O),N=this.pow(y,O.addn(1).iushrn(1)),p=this.pow(y,O),D=m;p.cmp(T)!==0;){for(var L=p,F=0;L.cmp(T)!==0;F++)L=L.redSqr();n(F=0;m--){for(var _=C.words[m],N=d-1;N>=0;N--){var p=_>>N&1;if(T!==O[0]&&(T=this.sqr(T)),p===0&&R===0){b=0;continue}R<<=1,R|=p,b++,!(b!==P&&(m!==0||N!==0))&&(T=this.mul(T,O[R]),b=0,R=0)}d=26}return T},G.prototype.convertTo=function(y){var C=y.umod(this.m);return C===y?C.clone():C},G.prototype.convertFrom=function(y){var C=y.clone();return C.red=null,C},s.mont=function(y){return new re(y)};function re(B){G.call(this,B),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(re,G),re.prototype.convertTo=function(y){return this.imod(y.ushln(this.shift))},re.prototype.convertFrom=function(y){var C=this.imod(y.mul(this.rinv));return C.red=null,C},re.prototype.imul=function(y,C){if(y.isZero()||C.isZero())return y.words[0]=0,y.length=1,y;var P=y.imul(C),O=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=P.isub(O).iushrn(this.shift),T=m;return m.cmp(this.m)>=0?T=m.isub(this.m):m.cmpn(0)<0&&(T=m.iadd(this.m)),T._forceRed(this)},re.prototype.mul=function(y,C){if(y.isZero()||C.isZero())return new s(0)._forceRed(this);var P=y.mul(C),O=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=P.isub(O).iushrn(this.shift),T=m;return m.cmp(this.m)>=0?T=m.isub(this.m):m.cmpn(0)<0&&(T=m.iadd(this.m)),T._forceRed(this)},re.prototype.invm=function(y){var C=this.imod(y._invmp(this.m).mul(this.r2));return C._forceRed(this)}})(t,o3)})(FL);const we=ep,VL="logger/5.7.0";let Nw=!1,Ow=!1;const hd={debug:1,default:2,info:2,warning:3,error:4,off:5};let Dw=hd.default,fv=null;function HL(){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(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}const Bw=HL();var tp;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(tp||(tp={}));var Jn;(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"})(Jn||(Jn={}));const Lw="0123456789abcdef";let V=class Zt{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();hd[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Dw>hd[n])&&console.log.apply(console,r)}debug(...e){this._log(Zt.levels.DEBUG,e)}info(...e){this._log(Zt.levels.INFO,e)}warn(...e){this._log(Zt.levels.WARNING,e)}makeError(e,r,n){if(Ow)return this.makeError("censored error",r,{});r||(r=Zt.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(l=>{const f=n[l];try{if(f instanceof Uint8Array){let c="";for(let u=0;u>4],c+=Lw[f[u]&15];i.push(l+"=Uint8Array(0x"+c+")")}else i.push(l+"="+JSON.stringify(f))}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 Jn.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 Jn.CALL_EXCEPTION:case Jn.INSUFFICIENT_FUNDS:case Jn.MISSING_NEW:case Jn.NONCE_EXPIRED:case Jn.REPLACEMENT_UNDERPRICED:case Jn.TRANSACTION_REPLACED:case Jn.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,Zt.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){Bw&&this.throwError("platform missing String.prototype.normalize",Zt.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Bw})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,Zt.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,Zt.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,Zt.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",Zt.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",Zt.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",Zt.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return fv||(fv=new Zt(VL)),fv}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",Zt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Nw){if(!e)return;this.globalLogger().throwError("error censorship permanent",Zt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Ow=!!e,Nw=!!r}static setLogLevel(e){const r=hd[e.toLowerCase()];if(r==null){Zt.globalLogger().warn("invalid log level - "+e);return}Dw=r}static from(e){return new Zt(e)}};V.errors=Jn;V.levels=tp;const WL="bytes/5.7.0",Dt=new V(WL);function iA(t){return!!t.toHexString}function cl(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return cl(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function is(t){return Pe(t)&&!(t.length%2)||cs(t)}function $w(t){return typeof t=="number"&&t==t&&t%1===0}function cs(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!$w(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function Y(t,e){if(e||(e={}),typeof t=="number"){Dt.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),cl(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),iA(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":Dt.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;iY(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),cl(n)}function Ei(t){let e=Y(t);if(e.length===0)return e;let r=0;for(;re&&Dt.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),cl(r)}function Pe(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const cv="0123456789abcdef";function J(t,e){if(e||(e={}),typeof t=="number"){Dt.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=cv[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),iA(t))return t.toHexString();if(Pe(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":Dt.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(cs(t)){let r="0x";for(let n=0;n>4]+cv[i&15]}return r}return Dt.throwArgumentError("invalid hexlify value","value",t)}function Pi(t){if(typeof t!="string")t=J(t);else if(!Pe(t)||t.length%2)return null;return(t.length-2)/2}function Lt(t,e,r){return typeof t!="string"?t=J(t):(!Pe(t)||t.length%2)&&Dt.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+=J(r).substring(2)}),e}function Xc(t){const e=sA(J(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function sA(t){typeof t!="string"&&(t=J(t)),Pe(t)||Dt.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&Dt.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function pa(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(is(t)){let r=Y(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=J(r.slice(0,32)),e.s=J(r.slice(32,64))):r.length===65?(e.r=J(r.slice(0,32)),e.s=J(r.slice(32,64)),e.v=r[64]):Dt.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:Dt.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=J(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=Hf(Y(e._vs),32);e._vs=J(i);const s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&Dt.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const o=J(i);e.s==null?e.s=o:e.s!==o&&Dt.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?Dt.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&&Dt.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!Pe(e.r)?Dt.throwArgumentError("signature missing or invalid r","signature",t):e.r=Ue(e.r,32),e.s==null||!Pe(e.s)?Dt.throwArgumentError("signature missing or invalid s","signature",t):e.s=Ue(e.s,32);const r=Y(e.s);r[0]>=128&&Dt.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=J(r);e._vs&&(Pe(e._vs)||Dt.throwArgumentError("signature invalid _vs","signature",t),e._vs=Ue(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&Dt.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function rp(t){return t=pa(t),J(je([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const oA="bignumber/5.7.0";var Rc=we.BN;const Fi=new V(oA),uv={},Fw=9007199254740991;function qL(t){return t!=null&&(z.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Pe(t)||typeof t=="bigint"||cs(t))}let jw=!1;class z{constructor(e,r){e!==uv&&Fi.throwError("cannot call constructor directly; use BigNumber.from",V.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Qr(_e(this).fromTwos(e))}toTwos(e){return Qr(_e(this).toTwos(e))}abs(){return this._hex[0]==="-"?z.from(this._hex.substring(1)):this}add(e){return Qr(_e(this).add(_e(e)))}sub(e){return Qr(_e(this).sub(_e(e)))}div(e){return z.from(e).isZero()&&An("division-by-zero","div"),Qr(_e(this).div(_e(e)))}mul(e){return Qr(_e(this).mul(_e(e)))}mod(e){const r=_e(e);return r.isNeg()&&An("division-by-zero","mod"),Qr(_e(this).umod(r))}pow(e){const r=_e(e);return r.isNeg()&&An("negative-power","pow"),Qr(_e(this).pow(r))}and(e){const r=_e(e);return(this.isNegative()||r.isNeg())&&An("unbound-bitwise-result","and"),Qr(_e(this).and(r))}or(e){const r=_e(e);return(this.isNegative()||r.isNeg())&&An("unbound-bitwise-result","or"),Qr(_e(this).or(r))}xor(e){const r=_e(e);return(this.isNegative()||r.isNeg())&&An("unbound-bitwise-result","xor"),Qr(_e(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&An("negative-width","mask"),Qr(_e(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&An("negative-width","shl"),Qr(_e(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&An("negative-width","shr"),Qr(_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{An("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Fi.throwError("this platform does not support BigInt",V.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?jw||(jw=!0,Fi.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Fi.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",V.errors.UNEXPECTED_ARGUMENT,{}):Fi.throwError("BigNumber.toString does not accept parameters",V.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 z)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new z(uv,Mc(e)):e.match(/^-?[0-9]+$/)?new z(uv,Mc(new Rc(e))):Fi.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&An("underflow","BigNumber.from",e),(e>=Fw||e<=-Fw)&&An("overflow","BigNumber.from",e),z.from(String(e));const r=e;if(typeof r=="bigint")return z.from(r.toString());if(cs(r))return z.from(J(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return z.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 z.from(n)}return Fi.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function Mc(t){if(typeof t!="string")return Mc(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Fi.throwArgumentError("invalid hex","value",t),t=Mc(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 Qr(t){return z.from(Mc(t))}function _e(t){const e=z.from(t).toHexString();return e[0]==="-"?new Rc("-"+e.substring(3),16):new Rc(e.substring(2),16)}function An(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),Fi.throwError(t,V.errors.NUMERIC_FAULT,n)}function GL(t){return new Rc(t,36).toString(16)}function KL(t){return new Rc(t,16).toString(36)}const zr=new V(oA),Wf={},aA=z.from(0),lA=z.from(-1);function fA(t,e,r,n){const i={fault:e,operation:r};return n!==void 0&&(i.value=n),zr.throwError(t,V.errors.NUMERIC_FAULT,i)}let qf="0";for(;qf.length<256;)qf+=qf;function Im(t){if(typeof t!="number")try{t=z.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+qf.substring(0,t):zr.throwArgumentError("invalid decimal size","decimals",t)}function vd(t,e){e==null&&(e=0);const r=Im(e);t=z.from(t);const n=t.lt(aA);n&&(t=t.mul(lA));let i=t.mod(r).toString();for(;i.length2&&zr.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&&fA("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?l:(typeof e[o]!==a&&zr.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&&zr.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&zr.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new ul(Wf,r,n,i)}}class vr{constructor(e,r,n,i){e!==Wf&&zr.throwError("cannot use FixedNumber constructor; use FixedNumber.from",V.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&&zr.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=ci(this._value,this.format.decimals),n=ci(e._value,e.format.decimals);return vr.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=ci(this._value,this.format.decimals),n=ci(e._value,e.format.decimals);return vr.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=ci(this._value,this.format.decimals),n=ci(e._value,e.format.decimals);return vr.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=ci(this._value,this.format.decimals),n=ci(e._value,e.format.decimals);return vr.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=vr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(Uw.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=vr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(Uw.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)&&zr.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=vr.from("1"+qf.substring(0,e),this.format),i=JL.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&&zr.throwArgumentError("invalid byte width","width",e);const r=z.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return Ue(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return vr.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!qL(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),vr.fromString(vd(e,r),ul.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=ul.from(r),i=ci(e,n.decimals);!n.signed&&i.lt(aA)&&fA("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=vd(i,n.decimals);return new vr(Wf,s,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=ul.from(r);if(Y(e).length>n.width/8)throw new Error("overflow");let i=z.from(e);n.signed&&(i=i.fromTwos(n.width));const s=i.toTwos((n.signed?0:1)+n.width).toHexString(),o=vd(i,n.decimals);return new vr(Wf,s,o,n)}static from(e,r){if(typeof e=="string")return vr.fromString(e,r);if(cs(e))return vr.fromBytes(e,r);try{return vr.fromValue(e,0,r)}catch(n){if(n.code!==V.errors.INVALID_ARGUMENT)throw n}return zr.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const Uw=vr.from(1),JL=vr.from("0.5"),QL="properties/5.7.0";var YL=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const w0=new V(QL);function ee(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function ei(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 kt(t){return YL(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 Mh(t,e){(!t||typeof t!="object")&&w0.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||w0.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function Jt(t){const e={};for(const r in t)e[r]=t[r];return e}const XL={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function cA(t){if(t==null||XL[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;rIi(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&ee(e,r,Ii(n))}return e}return w0.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function Ii(t){return ZL(t)}class ga{constructor(e){for(const r in e)this[r]=Ii(e[r])}}const Zc="abi/5.7.0",Ne=new V(Zc),ta={};let zw={calldata:!0,memory:!0,storage:!0},e$={calldata:!0,memory:!0};function Fu(t,e){if(t==="bytes"||t==="string"){if(zw[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&e$[e])return!0;return(zw[e]||e==="payable")&&Ne.throwArgumentError("invalid modifier","name",e),!1}function t$(t,e){let r=t;function n(a){Ne.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!==Oe.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===Oe.full?", ":",")+")"):r+=this.type,e!==Oe.sighash&&(this.indexed===!0&&(r+=" indexed"),e===Oe.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?ir.fromString(e,r):ir.fromObject(e)}static fromObject(e){return ir.isParamType(e)?e:new ir(ta,{name:e.name||null,type:Oa(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(ir.fromObject):null})}static fromString(e,r){function n(i){return ir.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(t$(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function Nc(t,e){return i$(t).map(r=>ir.fromString(r,e))}class xi{constructor(e,r){e!==ta&&Ne.throwError("use a static from method",V.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),yd(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return xi.isFragment(e)?e:typeof e=="string"?xi.fromString(e):xi.fromObject(e)}static fromObject(e){if(xi.isFragment(e))return e;switch(e.type){case"function":return Zn.fromObject(e);case"event":return gi.fromObject(e);case"constructor":return Xn.fromObject(e);case"error":return Hi.fromObject(e);case"fallback":case"receive":return null}return Ne.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"?gi.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Zn.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Xn.fromString(e.trim()):e.split(" ")[0]==="error"?Hi.fromString(e.substring(5).trim()):Ne.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class gi extends xi{format(e){if(e||(e=Oe.sighash),Oe[e]||Ne.throwArgumentError("invalid format type","format",e),e===Oe.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!==Oe.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Oe.full?", ":",")+") ",e!==Oe.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?gi.fromString(e):gi.fromObject(e)}static fromObject(e){if(gi.isEventFragment(e))return e;e.type!=="event"&&Ne.throwArgumentError("invalid event object","value",e);const r={name:Oc(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(ir.fromObject):[],type:"event"};return new gi(ta,r)}static fromString(e){let r=e.match(Dc);r||Ne.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:Ne.warn("unknown modifier: "+i)}}),gi.fromObject({name:r[1].trim(),anonymous:n,inputs:Nc(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function uA(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&Ne.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||Ne.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=z.from(r[1]),r[0]):t}function dA(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 hA(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&&Ne.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&Ne.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"&&Ne.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&&Ne.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"&&Ne.throwArgumentError("unable to determine stateMutability","value",t),e}class Xn extends xi{format(e){if(e||(e=Oe.sighash),Oe[e]||Ne.throwArgumentError("invalid format type","format",e),e===Oe.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===Oe.sighash&&Ne.throwError("cannot format a constructor for sighash",V.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===Oe.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?Xn.fromString(e):Xn.fromObject(e)}static fromObject(e){if(Xn.isConstructorFragment(e))return e;e.type!=="constructor"&&Ne.throwArgumentError("invalid constructor object","value",e);let r=hA(e);r.constant&&Ne.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(ir.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?z.from(e.gas):null};return new Xn(ta,n)}static fromString(e){let r={type:"constructor"};e=uA(e,r);let n=e.match(Dc);return(!n||n[1].trim()!=="constructor")&&Ne.throwArgumentError("invalid constructor string","value",e),r.inputs=Nc(n[2].trim(),!1),dA(n[3].trim(),r),Xn.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class Zn extends Xn{format(e){if(e||(e=Oe.sighash),Oe[e]||Ne.throwArgumentError("invalid format type","format",e),e===Oe.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!==Oe.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Oe.full?", ":",")+") ",e!==Oe.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"?Zn.fromString(e):Zn.fromObject(e)}static fromObject(e){if(Zn.isFunctionFragment(e))return e;e.type!=="function"&&Ne.throwArgumentError("invalid function object","value",e);let r=hA(e);const n={type:e.type,name:Oc(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(ir.fromObject):[],outputs:e.outputs?e.outputs.map(ir.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?z.from(e.gas):null};return new Zn(ta,n)}static fromString(e){let r={type:"function"};e=uA(e,r);let n=e.split(" returns ");n.length>2&&Ne.throwArgumentError("invalid function string","value",e);let i=n[0].match(Dc);if(i||Ne.throwArgumentError("invalid function signature","value",e),r.name=i[1].trim(),r.name&&Oc(r.name),r.inputs=Nc(i[2],!1),dA(i[3].trim(),r),n.length>1){let s=n[1].match(Dc);(s[1].trim()!=""||s[3].trim()!="")&&Ne.throwArgumentError("unexpected tokens","value",e),r.outputs=Nc(s[2],!1)}else r.outputs=[];return Zn.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function Vw(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Ne.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Hi extends xi{format(e){if(e||(e=Oe.sighash),Oe[e]||Ne.throwArgumentError("invalid format type","format",e),e===Oe.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Oe.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Oe.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?Hi.fromString(e):Hi.fromObject(e)}static fromObject(e){if(Hi.isErrorFragment(e))return e;e.type!=="error"&&Ne.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:Oc(e.name),inputs:e.inputs?e.inputs.map(ir.fromObject):[]};return Vw(new Hi(ta,r))}static fromString(e){let r={type:"error"},n=e.match(Dc);return n||Ne.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&Oc(r.name),r.inputs=Nc(n[2],!1),Vw(Hi.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function Oa(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const n$=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Oc(t){return(!t||!t.match(n$))&&Ne.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const Dc=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function i$(t){t=t.trim();let e=[],r="",n=0;for(let i=0;ithis.wordSize&&Rm.throwError("value out-of-bounds",V.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=je([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 C0{constructor(e,r,n,i){ee(this,"_data",Y(e)),ee(this,"wordSize",r||32),ee(this,"_coerceFunc",n),ee(this,"allowLoose",i),this._offset=0}get data(){return J(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):C0.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:Rm.throwError("data out-of-bounds",V.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new C0(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 z.from(this.readBytes(this.wordSize))}}var ip={},s$={get exports(){return ip},set exports(t){ip=t}};/** * [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=o3:s&&(i=self);var a=!i.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,l=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",f="0123456789abcdef".split(""),c=[31,7936,2031616,520093696],u=[4,1024,262144,67108864],h=[1,256,65536,16777216],v=[6,1536,393216,100663296],x=[0,8,16,24],g=[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],k=[224,256,384,512],w=[128,256],A=["hex","buffer","arrayBuffer","array","digest"],E={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(p){return Object.prototype.toString.call(p)==="[object Array]"}),l&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(p){return typeof p=="object"&&p.buffer&&p.buffer.constructor===ArrayBuffer});for(var I=function(p,B,L){return function(F){return new d(p,B,p).update(F)[L]()}},M=function(p,B,L){return function(F,H){return new d(p,B,H).update(F)[L]()}},$=function(p,B,L){return function(F,H,Z,K){return y["cshake"+p].update(F,H,Z,K)[L]()}},j=function(p,B,L){return function(F,H,Z,K){return y["kmac"+p].update(F,H,Z,K)[L]()}},U=function(p,B,L,F){for(var H=0;H>5,this.byteCount=this.blockCount<<2,this.outputBlocks=L>>5,this.extraBytes=(L&31)>>3;for(var F=0;F<50;++F)this.s[F]=0}d.prototype.update=function(p){if(this.finalized)throw new Error(r);var B,L=typeof p;if(L!=="string"){if(L==="object"){if(p===null)throw new Error(e);if(l&&p.constructor===ArrayBuffer)p=new Uint8Array(p);else if(!Array.isArray(p)&&(!l||!ArrayBuffer.isView(p)))throw new Error(e)}else throw new Error(e);B=!0}for(var F=this.blocks,H=this.byteCount,Z=p.length,K=this.blockCount,X=0,ve=this.s,ie,ye;X>2]|=p[X]<>2]|=ye<>2]|=(192|ye>>6)<>2]|=(128|ye&63)<=57344?(F[ie>>2]|=(224|ye>>12)<>2]|=(128|ye>>6&63)<>2]|=(128|ye&63)<>2]|=(240|ye>>18)<>2]|=(128|ye>>12&63)<>2]|=(128|ye>>6&63)<>2]|=(128|ye&63)<=H){for(this.start=ie-H,this.block=F[K],ie=0;ie>8,L=p&255;L>0;)H.unshift(L),p=p>>8,L=p&255,++F;return B?H.push(F):H.unshift(F),this.update(H),H.length},d.prototype.encodeString=function(p){var B,L=typeof p;if(L!=="string"){if(L==="object"){if(p===null)throw new Error(e);if(l&&p.constructor===ArrayBuffer)p=new Uint8Array(p);else if(!Array.isArray(p)&&(!l||!ArrayBuffer.isView(p)))throw new Error(e)}else throw new Error(e);B=!0}var F=0,H=p.length;if(B)F=H;else for(var Z=0;Z=57344?F+=3:(K=65536+((K&1023)<<10|p.charCodeAt(++Z)&1023),F+=4)}return F+=this.encode(F*8),this.update(p),F},d.prototype.bytepad=function(p,B){for(var L=this.encode(B),F=0;F>2]|=this.padding[B&3],this.lastByteIndex===this.byteCount)for(p[0]=p[L],B=1;B>4&15]+f[X&15]+f[X>>12&15]+f[X>>8&15]+f[X>>20&15]+f[X>>16&15]+f[X>>28&15]+f[X>>24&15];Z%p===0&&(N(B),H=0)}return F&&(X=B[H],K+=f[X>>4&15]+f[X&15],F>1&&(K+=f[X>>12&15]+f[X>>8&15]),F>2&&(K+=f[X>>20&15]+f[X>>16&15])),K},d.prototype.arrayBuffer=function(){this.finalize();var p=this.blockCount,B=this.s,L=this.outputBlocks,F=this.extraBytes,H=0,Z=0,K=this.outputBits>>3,X;F?X=new ArrayBuffer(L+1<<2):X=new ArrayBuffer(K);for(var ve=new Uint32Array(X);Z>8&255,K[X+2]=ve>>16&255,K[X+3]=ve>>24&255;Z%p===0&&N(B)}return F&&(X=Z<<2,ve=B[H],K[X]=ve&255,F>1&&(K[X+1]=ve>>8&255),F>2&&(K[X+2]=ve>>16&255)),K};function _(p,B,L){d.call(this,p,B,L)}_.prototype=new d,_.prototype.finalize=function(){return this.encode(this.outputBits,!0),d.prototype.finalize.call(this)};var N=function(p){var B,L,F,H,Z,K,X,ve,ie,ye,Qt,Me,Se,St,De,Ge,lo,Ke,Je,fo,Qe,Ye,co,Xe,Ze,uo,et,tt,ho,rt,nt,vo,it,st,yo,ot,at,po,lt,ft,go,ct,ut,mo,dt,ht,xo,vt,yt,bo,pt,gt,wo,mt,xt,Co,bt,wt,ps,gs,ms,xs,bs;for(F=0;F<48;F+=2)H=p[0]^p[10]^p[20]^p[30]^p[40],Z=p[1]^p[11]^p[21]^p[31]^p[41],K=p[2]^p[12]^p[22]^p[32]^p[42],X=p[3]^p[13]^p[23]^p[33]^p[43],ve=p[4]^p[14]^p[24]^p[34]^p[44],ie=p[5]^p[15]^p[25]^p[35]^p[45],ye=p[6]^p[16]^p[26]^p[36]^p[46],Qt=p[7]^p[17]^p[27]^p[37]^p[47],Me=p[8]^p[18]^p[28]^p[38]^p[48],Se=p[9]^p[19]^p[29]^p[39]^p[49],B=Me^(K<<1|X>>>31),L=Se^(X<<1|K>>>31),p[0]^=B,p[1]^=L,p[10]^=B,p[11]^=L,p[20]^=B,p[21]^=L,p[30]^=B,p[31]^=L,p[40]^=B,p[41]^=L,B=H^(ve<<1|ie>>>31),L=Z^(ie<<1|ve>>>31),p[2]^=B,p[3]^=L,p[12]^=B,p[13]^=L,p[22]^=B,p[23]^=L,p[32]^=B,p[33]^=L,p[42]^=B,p[43]^=L,B=K^(ye<<1|Qt>>>31),L=X^(Qt<<1|ye>>>31),p[4]^=B,p[5]^=L,p[14]^=B,p[15]^=L,p[24]^=B,p[25]^=L,p[34]^=B,p[35]^=L,p[44]^=B,p[45]^=L,B=ve^(Me<<1|Se>>>31),L=ie^(Se<<1|Me>>>31),p[6]^=B,p[7]^=L,p[16]^=B,p[17]^=L,p[26]^=B,p[27]^=L,p[36]^=B,p[37]^=L,p[46]^=B,p[47]^=L,B=ye^(H<<1|Z>>>31),L=Qt^(Z<<1|H>>>31),p[8]^=B,p[9]^=L,p[18]^=B,p[19]^=L,p[28]^=B,p[29]^=L,p[38]^=B,p[39]^=L,p[48]^=B,p[49]^=L,St=p[0],De=p[1],ht=p[11]<<4|p[10]>>>28,xo=p[10]<<4|p[11]>>>28,tt=p[20]<<3|p[21]>>>29,ho=p[21]<<3|p[20]>>>29,gs=p[31]<<9|p[30]>>>23,ms=p[30]<<9|p[31]>>>23,ct=p[40]<<18|p[41]>>>14,ut=p[41]<<18|p[40]>>>14,st=p[2]<<1|p[3]>>>31,yo=p[3]<<1|p[2]>>>31,Ge=p[13]<<12|p[12]>>>20,lo=p[12]<<12|p[13]>>>20,vt=p[22]<<10|p[23]>>>22,yt=p[23]<<10|p[22]>>>22,rt=p[33]<<13|p[32]>>>19,nt=p[32]<<13|p[33]>>>19,xs=p[42]<<2|p[43]>>>30,bs=p[43]<<2|p[42]>>>30,mt=p[5]<<30|p[4]>>>2,xt=p[4]<<30|p[5]>>>2,ot=p[14]<<6|p[15]>>>26,at=p[15]<<6|p[14]>>>26,Ke=p[25]<<11|p[24]>>>21,Je=p[24]<<11|p[25]>>>21,bo=p[34]<<15|p[35]>>>17,pt=p[35]<<15|p[34]>>>17,vo=p[45]<<29|p[44]>>>3,it=p[44]<<29|p[45]>>>3,Xe=p[6]<<28|p[7]>>>4,Ze=p[7]<<28|p[6]>>>4,Co=p[17]<<23|p[16]>>>9,bt=p[16]<<23|p[17]>>>9,po=p[26]<<25|p[27]>>>7,lt=p[27]<<25|p[26]>>>7,fo=p[36]<<21|p[37]>>>11,Qe=p[37]<<21|p[36]>>>11,gt=p[47]<<24|p[46]>>>8,wo=p[46]<<24|p[47]>>>8,mo=p[8]<<27|p[9]>>>5,dt=p[9]<<27|p[8]>>>5,uo=p[18]<<20|p[19]>>>12,et=p[19]<<20|p[18]>>>12,wt=p[29]<<7|p[28]>>>25,ps=p[28]<<7|p[29]>>>25,ft=p[38]<<8|p[39]>>>24,go=p[39]<<8|p[38]>>>24,Ye=p[48]<<14|p[49]>>>18,co=p[49]<<14|p[48]>>>18,p[0]=St^~Ge&Ke,p[1]=De^~lo&Je,p[10]=Xe^~uo&tt,p[11]=Ze^~et&ho,p[20]=st^~ot&po,p[21]=yo^~at<,p[30]=mo^~ht&vt,p[31]=dt^~xo&yt,p[40]=mt^~Co&wt,p[41]=xt^~bt&ps,p[2]=Ge^~Ke&fo,p[3]=lo^~Je&Qe,p[12]=uo^~tt&rt,p[13]=et^~ho&nt,p[22]=ot^~po&ft,p[23]=at^~lt&go,p[32]=ht^~vt&bo,p[33]=xo^~yt&pt,p[42]=Co^~wt&gs,p[43]=bt^~ps&ms,p[4]=Ke^~fo&Ye,p[5]=Je^~Qe&co,p[14]=tt^~rt&vo,p[15]=ho^~nt&it,p[24]=po^~ft&ct,p[25]=lt^~go&ut,p[34]=vt^~bo>,p[35]=yt^~pt&wo,p[44]=wt^~gs&xs,p[45]=ps^~ms&bs,p[6]=fo^~Ye&St,p[7]=Qe^~co&De,p[16]=rt^~vo&Xe,p[17]=nt^~it&Ze,p[26]=ft^~ct&st,p[27]=go^~ut&yo,p[36]=bo^~gt&mo,p[37]=pt^~wo&dt,p[46]=gs^~xs&mt,p[47]=ms^~bs&xt,p[8]=Ye^~St&Ge,p[9]=co^~De&lo,p[18]=vo^~Xe&uo,p[19]=it^~Ze&et,p[28]=ct^~st&ot,p[29]=ut^~yo&at,p[38]=gt^~mo&ht,p[39]=wo^~dt&xo,p[48]=xs^~mt&Co,p[49]=bs^~xt&bt,p[0]^=g[F],p[1]^=g[F+1]};if(a)t.exports=y;else for(P=0;P>=8;return e}function Ww(t,e,r){let n=0;for(let i=0;ie+1+n&&hi.throwError("child data too short",V.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function p7(t,e){if(t.length===0&&hi.throwError("data too short",V.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&hi.throwError("data short segment too short",V.errors.BUFFER_OVERRUN,{});const n=Ww(t,e+1,r);return e+1+r+n>t.length&&hi.throwError("data long segment too short",V.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&&hi.throwError("data array too short",V.errors.BUFFER_OVERRUN,{}),qw(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&hi.throwError("data array too short",V.errors.BUFFER_OVERRUN,{});const n=Ww(t,e+1,r);e+1+r+n>t.length&&hi.throwError("data array too short",V.errors.BUFFER_OVERRUN,{});const i=J(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&&hi.throwError("data too short",V.errors.BUFFER_OVERRUN,{});const n=J(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:J(t[e])}}function Mh(t){const e=Y(t),r=p7(e,0);return r.consumed!==e.length&&hi.throwArgumentError("invalid rlp data","data",t),r.result}const a$=Object.freeze(Object.defineProperty({__proto__:null,decode:Mh,encode:ra},Symbol.toStringTag,{value:"Module"})),l$="address/5.7.0",Os=new V(l$);function Gw(t){Pe(t,20)||Os.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=Y(me(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 f$=9007199254740991;function c$(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const Mm={};for(let t=0;t<10;t++)Mm[String(t)]=String(t);for(let t=0;t<26;t++)Mm[String.fromCharCode(65+t)]=String(10+t);const Kw=Math.floor(c$(f$));function g7(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>Mm[n]).join("");for(;e.length>=Kw;){let n=e.substring(0,Kw);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 xe(t){let e=null;if(typeof t!="string"&&Os.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=Gw(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Os.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)!==g7(t)&&Os.throwArgumentError("bad icap checksum","address",t),e=qL(t.substring(4));e.length<40;)e="0"+e;e=Gw("0x"+e)}else Os.throwArgumentError("invalid address","address",t);return e}function u$(t){try{return xe(t),!0}catch{}return!1}function d$(t){let e=GL(xe(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+g7("XE00"+e)+e}function Nm(t){let e=null;try{e=xe(t.from)}catch{Os.throwArgumentError("missing from address","transaction",t)}const r=Ei(Y(z.from(t.nonce).toHexString()));return xe(Lt(me(ra([e,r])),12))}function h$(t,e,r){return Pi(e)!==32&&Os.throwArgumentError("salt must be 32 bytes","salt",e),Pi(r)!==32&&Os.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),xe(Lt(me(je(["0xff",xe(t),e,r])),12))}class v$ extends us{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=xe(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return xe(Ue(e.readValue().toHexString(),20))}}class y$ extends us{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 Za=new V(Xc);function m7(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let l={};n=e.map(f=>{const c=f.localName;return c||Za.throwError("cannot encode object for signature with missing names",V.errors.INVALID_ARGUMENT,{argument:"values",coder:f,value:r}),l[c]&&Za.throwError("cannot encode object for signature with duplicate names",V.errors.INVALID_ARGUMENT,{argument:"values",coder:f,value:r}),l[c]=!0,r[c]})}else Za.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&Za.throwArgumentError("types/value length mismatch","tuple",r);let i=new rp(t.wordSize),s=new rp(t.wordSize),o=[];e.forEach((l,f)=>{let c=n[f];if(l.dynamic){let u=s.length;l.encode(s,c);let h=i.writeUpdatableValue();o.push(v=>{h(v+u)})}else l.encode(i,c)}),o.forEach(l=>{l(i.length)});let a=t.appendWriter(i);return a+=t.appendWriter(s),a}function x7(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(f){if(f.code===V.errors.BUFFER_OVERRUN)throw f;o=f,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(t)}catch(a){if(a.code===V.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 p$ extends us{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&&Za.throwError("insufficient data length",V.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 k$(t,e,r,n,i){return t===Yr.OVERLONG?(n.push(i),0):(n.push(65533),S7(t,e,r))}const k7=Object.freeze({error:S$,ignore:S7,replace:k$});function Om(t,e){e==null&&(e=k7.error),t=Y(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 Le(t,e=Ri.current){e!=Ri.current&&(E7.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 Y(r)}function uv(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function _$(t,e){return'"'+Om(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?uv(r):(r-=65536,uv((r>>10&1023)+55296)+uv((r&1023)+56320))}).join("")+'"'}function ip(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function ds(t,e){return ip(Om(t,e))}function A0(t,e=Ri.current){return Om(Le(t,e))}function T$(t){const e=Le(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return J(je([e,C0]).slice(0,32))}function P$(t){const e=Y(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 ds(e.slice(0,r))}function I$(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 _7(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 Dm(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 R$=_7("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"),M$="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),N$=[{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}],O$=Bm("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"),B$=Bm("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"),D$=Bm("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",I$),L$=_7("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 $$(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function F$(t){return!!Dm(t,R$)}function j$(t){let e=Dm(t,N$);if(e)return[t+e.s];let r=O$[t];if(r)return r;let n=B$[t];if(n)return[t+n[0]];let i=D$[t];return i||null}function U$(t){return!!Dm(t,L$)}function z$(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=A0(t);e=$$(e.map(n=>{if(M$.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=j$(n);return i||[n]})),e=A0(ip(e),Ri.NFKC),e.forEach(n=>{if(U$(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(F$(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=ip(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}class V$ extends b7{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,Le(r))}decode(e){return ds(super.decode(e))}}class Fu extends us{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 m7(e,this.coders,r)}decode(e){return e.coerce(this.name,x7(e,this.coders))}}const ju=new V(Xc),H$=new RegExp(/^bytes([0-9]*)$/),W$=new RegExp(/^(u?int)([0-9]*)$/);class Lm{constructor(e){ee(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new v$(e.name);case"bool":return new g$(e.name);case"string":return new V$(e.name);case"bytes":return new m$(e.name);case"array":return new p$(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new Fu((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new b$(e.name)}let r=e.type.match(W$);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&ju.throwArgumentError("invalid "+r[1]+" bit length","param",e),new A$(n/8,r[1]==="int",e.name)}if(r=e.type.match(H$),r){let n=parseInt(r[1]);return(n===0||n>32)&&ju.throwArgumentError("invalid bytes length","param",e),new x$(n,e.name)}return ju.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new w0(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new rp(this._getWordSize())}getDefaultValue(e){const r=e.map(i=>this._getCoder(ir.from(i)));return new Fu(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&ju.throwError("types/values length mismatch",V.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(o=>this._getCoder(ir.from(o))),i=new Fu(n,"_"),s=this._getWriter();return i.encode(s,r),s.data}decode(e,r,n){const i=e.map(o=>this._getCoder(ir.from(o)));return new Fu(i,"_").decode(this._getReader(Y(r),n))}}const qr=new Lm;function Bs(t){return me(Le(t))}const T7="hash/5.7.0";function $m(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 G$(t){const e={};for(let r=0;r>--l&1}const u=31,h=Math.pow(2,u),v=h>>>1,x=v>>1,g=h-1;let k=0;for(let M=0;M1;){let q=$+j>>>1;M>>1|c(),U=U<<1^v,W=(W^v)<<1|v|1;A=U,E=1+W-U}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 J$(t){let e=0;return()=>t[e++]}function Q$(t){return J$(K$(t))}function Y$(t){return t&1?~t>>1:t>>1}function X$(t,e){let r=Array(t);for(let n=0;ne[o]):r}function eF(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(rF(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(nF(r,t))}return G$(P7(e))}function tF(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function I7(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;in[o].push(s));return n}function rF(t,e){let r=1+e(),n=e(),i=tF(e),s=I7(i.length,1+t,e);return P7(s.map((o,a)=>{const l=o[0],f=o.slice(1);return Array(i[a]).fill(void 0).map((c,u)=>{let h=u*n;return[l+u*r,f.map(v=>v+h)]})}))}function nF(t,e){let r=1+e();return I7(r,1+t,e).map(i=>[i[0],i.slice(1)])}function iF(t){let e=E0(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let f=E0(t,e);if(f.length==0)break;n.push({set:new Set(f),node:r()})}n.sort((f,c)=>c.set.size-f.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 sF(){return Q$($m("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"))}const Nh=sF(),oF=new Set(E0(Nh)),aF=new Set(E0(Nh)),lF=eF(Nh),fF=iF(Nh),Qw=45,Yw=95;function R7(t){return A0(t)}function cF(t){return t.filter(e=>e!=65039)}function M7(t){for(let e of t.split(".")){let r=R7(e);try{for(let n=r.lastIndexOf(Yw)-1;n>=0;n--)if(r[n]!==Yw)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===Qw&&r[3]===Qw)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function uF(t){return M7(dF(t,cF))}function dF(t,e){let r=R7(t).reverse(),n=[];for(;r.length;){let i=vF(r);if(i){n.push(...e(i));continue}let s=r.pop();if(oF.has(s)){n.push(s);continue}if(aF.has(s))continue;let o=lF[s];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${s.toString(16).toUpperCase()}`)}return M7(hF(String.fromCodePoint(...n)))}function hF(t){return t.normalize("NFC")}function vF(t,e){var r;let n=fF,i,s,o=[],a=t.length;for(e&&(e.length=0);a;){let l=t[--a];if(n=(r=n.branches.find(f=>f.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 yF=new V(T7),N7=new Uint8Array(32);N7.fill(0);function Xw(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function jm(t){const e=Le(uF(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(Xw(e.slice(n))),r}function pF(t){try{return jm(t).length!==0}catch{}return!1}function qf(t){typeof t!="string"&&yF.throwArgumentError("invalid ENS name; not a string","name",t);let e=N7;const r=jm(t);for(;r.length;)e=me(je([e,me(r.pop())]));return J(e)}function O7(t){return J(je(jm(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 gF=`Ethereum Signed Message: -`;function Oh(t){return typeof t=="string"&&(t=Le(t)),me(je([Le(gF),Le(String(t.length)),t]))}var mF=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const Pt=new V(T7),B7=new Uint8Array(32);B7.fill(0);const xF=z.from(-1),D7=z.from(0),L7=z.from(1),bF=z.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function wF(t){const e=Y(t),r=e.length%32;return r?Ur([e,B7.slice(r)]):J(e)}const CF=Ue(L7.toHexString(),32),AF=Ue(D7.toHexString(),32),Zw={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},dv=["name","version","chainId","verifyingContract","salt"];function e6(t){return function(e){return typeof e!="string"&&Pt.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const EF={name:e6("name"),version:e6("version"),chainId:function(t){try{return z.from(t).toString()}catch{}return Pt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return xe(t).toLowerCase()}catch{}return Pt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=Y(t);if(e.length!==32)throw new Error("bad length");return J(e)}catch{}return Pt.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function hv(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))&&Pt.throwArgumentError("invalid numeric width","type",t);const i=bF.mask(r?n-1:n),s=r?i.add(L7).mul(xF):D7;return function(o){const a=z.from(o);return(a.lt(s)||a.gt(i))&&Pt.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))&&Pt.throwArgumentError("invalid bytes width","type",t),function(n){return Y(n).length!==r&&Pt.throwArgumentError(`invalid length for ${t}`,"value",n),wF(n)}}}switch(t){case"address":return function(e){return Ue(xe(e),32)};case"bool":return function(e){return e?CF:AF};case"bytes":return function(e){return me(e)};case"string":return function(e){return Bs(e)}}return null}function t6(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class qt{constructor(e){ee(this,"types",Object.freeze(Ii(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(f=>{l[f.name]&&Pt.throwArgumentError(`duplicate variable name ${JSON.stringify(f.name)} in ${JSON.stringify(a)}`,"types",e),l[f.name]=!0;const c=f.type.match(/^([^\x5b]*)(\x5b|$)/)[1];c===a&&Pt.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),!hv(c)&&(n[c]||Pt.throwArgumentError(`unknown type ${JSON.stringify(c)}`,"types",e),n[c].push(a),r[a][c]=!0)})}const s=Object.keys(n).filter(a=>n[a].length===0);s.length===0?Pt.throwArgumentError("missing primary type","types",e):s.length>1&&Pt.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]&&Pt.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),l[a]=!0,Object.keys(r[a]).forEach(f=>{n[f]&&(o(f,l),Object.keys(l).forEach(c=>{i[c][f]=!0}))}),delete l[a]}o(this.primaryType,{});for(const a in i){const l=Object.keys(i[a]);l.sort(),this._types[a]=t6(a,e[a])+l.map(f=>t6(f,e[f])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=hv(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&&Pt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let l=a.map(s);return this._types[i]&&(l=l.map(me)),me(Ur(l))}}const n=this.types[e];if(n){const i=Bs(this._types[e]);return s=>{const o=n.map(({name:a,type:l})=>{const f=this.getEncoder(l)(s[a]);return this._types[l]?me(f):f});return o.unshift(i),Ur(o)}}return Pt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||Pt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return me(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(hv(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&&Pt.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),{}):Pt.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=Zw[n];i||Pt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>dv.indexOf(n.name)-dv.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 me(qt.encode(e,r,n))}static resolveNames(e,r,n,i){return mF(this,void 0,void 0,function*(){e=Jt(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=[];dv.forEach(l=>{const f=e[l];f!=null&&(i[l]=EF[l](f),s.push({name:l,type:Zw[l]}))});const o=qt.from(r),a=Jt(r);return a.EIP712Domain?Pt.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,f)=>{if(l.match(/^bytes(\d*)/))return J(Y(f));if(l.match(/^u?int/))return z.from(f).toString();switch(l){case"address":return f.toLowerCase();case"bool":return!!f;case"string":return typeof f!="string"&&Pt.throwArgumentError("invalid string","value",f),f}return Pt.throwArgumentError("unsupported type","type",l)})}}}const Tt=new V(Xc);class $7 extends ga{}class F7 extends ga{}class SF extends ga{}class S0 extends ga{static isIndexed(e){return!!(e&&e._isIndexed)}}const kF={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function r6(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class xr{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,ee(this,"fragments",r.map(n=>xi.from(n)).filter(n=>n!=null)),ee(this,"_abiCoder",ei(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){Tt.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]){Tt.warn("duplicate definition - "+s);return}i[s]=n}),this.deploy||ee(this,"deploy",Xn.from({payable:!1,type:"constructor"})),ee(this,"_isInterface",!0)}format(e){e||(e=Oe.full),e===Oe.sighash&&Tt.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===Oe.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return qr}static getAddress(e){return xe(e)}static getSighash(e){return Lt(Bs(e.format()),0,4)}static getEventTopic(e){return Bs(e.format())}getFunction(e){if(Pe(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];Tt.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?Tt.throwArgumentError("no matching function","name",n):i.length>1&&Tt.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const r=this.functions[Zn.fromString(e).format()];return r||Tt.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];Tt.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?Tt.throwArgumentError("no matching event","name",n):i.length>1&&Tt.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const r=this.events[gi.fromString(e).format()];return r||Tt.throwArgumentError("no matching event","signature",e),r}getError(e){if(Pe(e)){const n=ei(this.constructor,"getSighash");for(const i in this.errors){const s=this.errors[i];if(e===n(s))return this.errors[i]}Tt.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?Tt.throwArgumentError("no matching error","name",n):i.length>1&&Tt.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const r=this.errors[Zn.fromString(e).format()];return r||Tt.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 ei(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),ei(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=Y(r);return J(n.slice(0,4))!==this.getSighash(e)&&Tt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",J(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),J(je([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=Y(r);return J(n.slice(0,4))!==this.getSighash(e)&&Tt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",J(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),J(je([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=Y(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 f=J(n.slice(0,4)),c=kF[f];if(c)o=this._abiCoder.decode(c.inputs,n.slice(4)),a=c.name,l=c.signature,c.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(f);o=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,l=u.format()}catch{}break}}return Tt.throwError("call revert exception"+s,V.errors.CALL_EXCEPTION,{method:e.format(),data:J(r),errorArgs:o,errorName:a,errorSignature:l,reason:i})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),J(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&Tt.throwError("too many arguments for "+e.format(),V.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(s,o)=>s.type==="string"?Bs(o):s.type==="bytes"?me(J(o)):(s.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),s.type.match(/^u?int/)&&(o=z.from(o).toHexString()),s.type==="address"&&this._abiCoder.encode(["address"],[o]),Ue(J(o),32));for(r.forEach((s,o)=>{let a=e.inputs[o];if(!a.indexed){s!=null&&Tt.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"?Tt.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&&Tt.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(Bs(l));else if(o.type==="bytes")n.push(me(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)&&Tt.throwError("fragment/topic mismatch",V.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:h,value:n[0]}),n=n.slice(1)}let i=[],s=[],o=[];e.inputs.forEach((h,v)=>{h.indexed?h.type==="string"||h.type==="bytes"||h.baseType==="tuple"||h.baseType==="array"?(i.push(ir.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,je(n)):null,l=this._abiCoder.decode(s,r,!0),f=[],c=0,u=0;e.inputs.forEach((h,v)=>{if(h.indexed)if(a==null)f[v]=new S0({_isIndexed:!0,hash:null});else if(o[v])f[v]=new S0({_isIndexed:!0,hash:a[u++]});else try{f[v]=a[u++]}catch(x){f[v]=x}else try{f[v]=l[c++]}catch(x){f[v]=x}if(h.name&&f[h.name]==null){const x=f[v];x instanceof Error?Object.defineProperty(f,h.name,{enumerable:!0,get:()=>{throw r6(`property ${JSON.stringify(h.name)}`,x)}}):f[h.name]=x}});for(let h=0;h{throw r6(`index ${h}`,v)}})}return Object.freeze(f)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new F7({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:z.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new $7({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=J(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new SF({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 _F="abstract-provider/5.7.0";var TF=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const PF=new V(_F);class IF extends ga{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class oo{constructor(){PF.checkAbstract(new.target,oo),ee(this,"_isProvider",!0)}getFeeData(){return TF(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield kt({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=z.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 RF="abstract-signer/5.7.0";var Un=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const En=new V(RF),MF=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],NF=[V.errors.INSUFFICIENT_FUNDS,V.errors.NONCE_EXPIRED,V.errors.REPLACEMENT_UNDERPRICED];let ss=class j7{constructor(){En.checkAbstract(new.target,j7),ee(this,"_isSigner",!0)}getBalance(e){return Un(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Un(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Un(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield kt(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return Un(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield kt(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return Un(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 Un(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Un(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Un(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Un(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)MF.indexOf(n)===-1&&En.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=Jt(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()&&En.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return Un(this,void 0,void 0,function*(){const r=yield kt(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>Un(this,void 0,void 0,function*(){if(i==null)return null;const s=yield this.resolveName(i);return s==null&&En.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)?En.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&En.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&&En.throwError("network does not support EIP-1559",V.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):En.throwError("failed to get consistent fee data",V.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(NF.indexOf(i.code)>=0)throw i;return En.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",V.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]&&En.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield kt(r)})}_checkProvider(e){this.provider||En.throwError("missing provider",V.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}};class Um extends ss{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(()=>{En.throwError(e,V.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 Um(this.address,e)}}var jr={},Re={},Zc=U7;function U7(t,e){if(!t)throw new Error(e||"Assertion failed")}U7.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var sp={},n6={get exports(){return sp},set exports(t){sp=t}};typeof Object.create=="function"?n6.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:n6.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 OF=Zc,BF=sp;Re.inherits=BF;function DF(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function LF(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):DF(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=z7;function FF(t,e){for(var r="",n=0;n>>0}return s}Re.join32=jF;function UF(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=UF;function zF(t,e){return t>>>e|t<<32-e}Re.rotr32=zF;function VF(t,e){return t<>>32-e}Re.rotl32=VF;function HF(t,e){return t+e>>>0}Re.sum32=HF;function WF(t,e,r){return t+e+r>>>0}Re.sum32_3=WF;function qF(t,e,r,n){return t+e+r+n>>>0}Re.sum32_4=qF;function GF(t,e,r,n,i){return t+e+r+n+i>>>0}Re.sum32_5=GF;function KF(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=KF;function JF(t,e,r,n){var i=e+n>>>0,s=(i>>0}Re.sum64_hi=JF;function QF(t,e,r,n){var i=e+n;return i>>>0}Re.sum64_lo=QF;function YF(t,e,r,n,i,s,o,a){var l=0,f=e;f=f+n>>>0,l+=f>>0,l+=f>>0,l+=f>>0}Re.sum64_4_hi=YF;function XF(t,e,r,n,i,s,o,a){var l=e+n+s+a;return l>>>0}Re.sum64_4_lo=XF;function ZF(t,e,r,n,i,s,o,a,l,f){var c=0,u=e;u=u+n>>>0,c+=u>>0,c+=u>>0,c+=u>>0,c+=u>>0}Re.sum64_5_hi=ZF;function ej(t,e,r,n,i,s,o,a,l,f){var c=e+n+s+a+f;return c>>>0}Re.sum64_5_lo=ej;function tj(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Re.rotr64_hi=tj;function rj(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Re.rotr64_lo=rj;function nj(t,e,r){return t>>>r}Re.shr64_hi=nj;function ij(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Re.shr64_lo=ij;var Kl={},i6=Re,sj=Zc;function Bh(){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}Kl.BlockHash=Bh;Bh.prototype.update=function(e,r){if(e=i6.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=i6.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}Bi.g0_256=cj;function uj(t){return Si(t,17)^Si(t,19)^t>>>10}Bi.g1_256=uj;var Tl=Re,dj=Kl,hj=Bi,vv=Tl.rotl32,hf=Tl.sum32,vj=Tl.sum32_5,yj=hj.ft_1,K7=dj.BlockHash,pj=[1518500249,1859775393,2400959708,3395469782];function Mi(){if(!(this instanceof Mi))return new Mi;K7.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Tl.inherits(Mi,K7);var gj=Mi;Mi.blockSize=512;Mi.outSize=160;Mi.hmacStrength=80;Mi.padLength=64;Mi.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()),iU(e.length<=this.blockSize);for(var r=e.length;r>8,h=c&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?g=(h>>1)-k:g=k,v.isubn(g)):g=0,u[x]=g,v.iushrn(1)}return u}r.getNAF=n;function i(l,f){var c=[[],[]];l=l.clone(),f=f.clone();for(var u=0,h=0,v;l.cmpn(-u)>0||f.cmpn(-h)>0;){var x=l.andln(3)+u&3,g=f.andln(3)+h&3;x===3&&(x=-1),g===3&&(g=-1);var k;x&1?(v=l.andln(7)+u&7,(v===3||v===5)&&g===2?k=-x:k=x):k=0,c[0].push(k);var w;g&1?(v=f.andln(7)+h&7,(v===3||v===5)&&x===2?w=-g:w=g):w=0,c[1].push(w),2*u===k+1&&(u=1-u),2*h===w+1&&(h=1-h),l.iushrn(1),f.iushrn(1)}return c}r.getJSF=i;function s(l,f,c){var u="_"+f;l.prototype[f]=function(){return this[u]!==void 0?this[u]:this[u]=c.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 we(l,"hex","le")}r.intFromLE=a}),k0=Cn.getNAF,aU=Cn.getJSF,_0=Cn.assert;function ao(t,e){this.type=t,this.p=new we(e.p,16),this.red=e.prime?we.red(e.prime):we.mont(this.p),this.zero=new we(0).toRed(this.red),this.one=new we(1).toRed(this.red),this.two=new we(2).toRed(this.red),this.n=e.n&&new we(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 ma=ao;ao.prototype.point=function(){throw new Error("Not implemented")};ao.prototype.validate=function(){throw new Error("Not implemented")};ao.prototype._fixedNafMul=function(e,r){_0(e.precomputed);var n=e._getDoubles(),i=k0(r,1,this._bitLength),s=(1<=a;f--)l=(l<<1)+i[f];o.push(l)}for(var c=this.jpoint(null,null,null),u=this.jpoint(null,null,null),h=s;h>0;h--){for(a=0;a=0;l--){for(var f=0;l>=0&&o[l]===0;l--)f++;if(l>=0&&f++,a=a.dblp(f),l<0)break;var c=o[l];_0(c!==0),e.type==="affine"?c>0?a=a.mixedAdd(s[c-1>>1]):a=a.mixedAdd(s[-c-1>>1].neg()):c>0?a=a.add(s[c-1>>1]):a=a.add(s[-c-1>>1].neg())}return e.type==="affine"?a.toP():a};ao.prototype._wnafMulAdd=function(e,r,n,i,s){var o=this._wnafT1,a=this._wnafT2,l=this._wnafT3,f=0,c,u,h;for(c=0;c=1;c-=2){var x=c-1,g=c;if(o[x]!==1||o[g]!==1){l[x]=k0(n[x],o[x],this._bitLength),l[g]=k0(n[g],o[g],this._bitLength),f=Math.max(l[x].length,f),f=Math.max(l[g].length,f);continue}var k=[r[x],null,null,r[g]];r[x].y.cmp(r[g].y)===0?(k[1]=r[x].add(r[g]),k[2]=r[x].toJ().mixedAdd(r[g].neg())):r[x].y.cmp(r[g].y.redNeg())===0?(k[1]=r[x].toJ().mixedAdd(r[g]),k[2]=r[x].add(r[g].neg())):(k[1]=r[x].toJ().mixedAdd(r[g]),k[2]=r[x].toJ().mixedAdd(r[g].neg()));var w=[-3,-1,-5,-7,0,7,5,1,3],A=aU(n[x],n[g]);for(f=Math.max(A[0].length,f),l[x]=new Array(f),l[g]=new Array(f),u=0;u=0;c--){for(var j=0;c>=0;){var U=!0;for(u=0;u=0&&j++,M=M.dblp(j),c<0)break;for(u=0;u0?h=a[u][W-1>>1]:W<0&&(h=a[u][-W-1>>1].neg()),h.type==="affine"?M=M.mixedAdd(h):M=M.add(h))}}for(c=0;c=Math.ceil((e.bitLength()+1)/r.step):!1};Ln.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&&(v=f,x=c),u.negative&&(u=u.neg(),h=h.neg()),v.negative&&(v=v.neg(),x=x.neg()),[{a:u,b:h},{a:v,b:x}]};$n.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),f=s.mul(n.b),c=o.mul(i.b),u=e.sub(a).sub(l),h=f.add(c).neg();return{k1:u,k2:h}};$n.prototype.pointFromX=function(e,r){e=new we(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)};$n.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};$n.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,s=this._endoWnafT2,o=0;o":""};cr.prototype.isInfinity=function(){return this.inf};cr.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)};cr.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)};cr.prototype.getX=function(){return this.x.fromRed()};cr.prototype.getY=function(){return this.y.fromRed()};cr.prototype.mul=function(e){return e=new we(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)};cr.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)};cr.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)};cr.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)};cr.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};cr.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 wr(t,e,r,n){ma.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new we(0)):(this.x=new we(e,16),this.y=new we(r,16),this.z=new we(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}Vm(wr,ma.BasePoint);$n.prototype.jpoint=function(e,r,n){return new wr(this,e,r,n)};wr.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)};wr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};wr.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),f=o.redSub(a);if(l.cmpn(0)===0)return f.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=l.redSqr(),u=c.redMul(l),h=i.redMul(c),v=f.redSqr().redIAdd(u).redISub(h).redISub(h),x=f.redMul(h.redISub(v)).redISub(o.redMul(u)),g=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(v,x,g)};wr.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 f=a.redSqr(),c=f.redMul(a),u=n.redMul(f),h=l.redSqr().redIAdd(c).redISub(u).redISub(u),v=l.redMul(u.redISub(h)).redISub(s.redMul(c)),x=this.z.redMul(a);return this.curve.jpoint(h,v,x)};wr.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}};wr.prototype.inspect=function(){return this.isInfinity()?"":""};wr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var yd=Yl(function(t,e){var r=e;r.base=ma,r.short=fU,r.mont=null,r.edwards=null}),pd=Yl(function(t,e){var r=e,n=Cn.assert;function i(a){a.type==="short"?this.curve=new yd.short(a):a.type==="edwards"?this.curve=new yd.edwards(a):this.curve=new yd.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 f=new i(l);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:f}),f}})}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:jr.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:jr.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:jr.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:jr.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:jr.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:jr.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:jr.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:jr.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function to(t){if(!(this instanceof to))return new to(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=ti.toArray(t.entropy,t.entropyEnc||"hex"),r=ti.toArray(t.nonce,t.nonceEnc||"hex"),n=ti.toArray(t.pers,t.persEnc||"hex");zm(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var oA=to;to.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};to.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=ti.toArray(n,i||"hex"),this._update(n));for(var s=[];s.length"};var cU=Cn.assert;function Dh(t,e){if(t instanceof Dh)return t;this._importDER(t,e)||(cU(t.r&&t.s,"Signature without r or s"),this.r=new we(t.r,16),this.s=new we(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Lh=Dh;function uU(){this.place=0}function gv(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 l6(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)}Dh.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=l6(r),n=l6(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];mv(i,r.length),i=i.concat(r),i.push(2),mv(i,n.length);var s=i.concat(n),o=[48];return mv(o,s.length),o=o.concat(s),Cn.encode(o,e)};var dU=function(){throw new Error("unsupported")},aA=Cn.assert;function Dn(t){if(!(this instanceof Dn))return new Dn(t);typeof t=="string"&&(aA(Object.prototype.hasOwnProperty.call(pd,t),"Unknown curve "+t),t=pd[t]),t instanceof pd.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 hU=Dn;Dn.prototype.keyPair=function(e){return new Hm(this,e)};Dn.prototype.keyFromPrivate=function(e,r){return Hm.fromPrivate(this,e,r)};Dn.prototype.keyFromPublic=function(e,r){return Hm.fromPublic(this,e,r)};Dn.prototype.genKeyPair=function(e){e||(e={});for(var r=new oA({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||dU(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new we(2));;){var s=new we(r.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}};Dn.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};Dn.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 we(e,16));for(var s=this.n.byteLength(),o=r.getPrivate().toArray("be",s),a=e.toArray("be",s),l=new oA({hash:this.hash,entropy:o,nonce:a,pers:i.pers,persEnc:i.persEnc||"utf8"}),f=this.n.sub(new we(1)),c=0;;c++){var u=i.k?i.k(c):new we(l.generate(this.n.byteLength()));if(u=this._truncateToN(u,!0),!(u.cmpn(1)<=0||u.cmp(f)>=0)){var h=this.g.mul(u);if(!h.isInfinity()){var v=h.getX(),x=v.umod(this.n);if(x.cmpn(0)!==0){var g=u.invm(this.n).mul(x.mul(r.getPrivate()).iadd(e));if(g=g.umod(this.n),g.cmpn(0)!==0){var k=(h.getY().isOdd()?1:0)|(v.cmp(x)!==0?2:0);return i.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),k^=1),new Lh({r:x,s:g,recoveryParam:k})}}}}}};Dn.prototype.verify=function(e,r,n,i){e=this._truncateToN(new we(e,16)),n=this.keyFromPublic(n,i),r=new Lh(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),f=a.mul(s).umod(this.n),c;return this.curve._maxwellTrick?(c=this.g.jmulAdd(l,n.getPublic(),f),c.isInfinity()?!1:c.eqXToP(s)):(c=this.g.mulAdd(l,n.getPublic(),f),c.isInfinity()?!1:c.getX().umod(this.n).cmp(s)===0)};Dn.prototype.recoverPubKey=function(t,e,r,n){aA((3&r)===r,"The recovery param is more than two bits"),e=new Lh(e,n);var i=this.n,s=new we(t),o=e.r,a=e.s,l=r&1,f=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");f?o=this.curve.pointFromX(o.add(this.curve.n),l):o=this.curve.pointFromX(o,l);var c=e.r.invm(i),u=i.sub(s).mul(c).umod(i),h=a.mul(c).umod(i);return this.g.mulAdd(u,o,h)};Dn.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Lh(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 vU=Yl(function(t,e){var r=e;r.version="6.5.4",r.utils=Cn,r.rand=function(){throw new Error("unsupported")},r.curve=yd,r.curves=pd,r.ec=hU,r.eddsa=null}),yU=vU.ec;const pU="signing-key/5.7.0",fp=new V(pU);let xv=null;function vi(){return xv||(xv=new yU("secp256k1")),xv}class Wo{constructor(e){ee(this,"curve","secp256k1"),ee(this,"privateKey",J(e)),Pi(this.privateKey)!==32&&fp.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=vi().keyFromPrivate(Y(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=vi().keyFromPublic(Y(this.publicKey)),n=vi().keyFromPublic(Y(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=vi().keyFromPrivate(Y(this.privateKey)),n=Y(e);n.length!==32&&fp.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return pa({recoveryParam:i.recoveryParam,r:Ue("0x"+i.r.toString(16),32),s:Ue("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=vi().keyFromPrivate(Y(this.privateKey)),n=vi().keyFromPublic(Y(Wm(e)));return Ue("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function lA(t,e){const r=pa(e),n={r:Y(r.r),s:Y(r.s)};return"0x"+vi().recoverPubKey(Y(t),n,r.recoveryParam).encode("hex",!1)}function Wm(t,e){const r=Y(t);if(r.length===32){const n=new Wo(r);return e?"0x"+vi().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?J(r):"0x"+vi().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+vi().keyFromPublic(r).getPublic(!0,"hex"):J(r)}return fp.throwArgumentError("invalid public or private key","key","[REDACTED]")}const gU="transactions/5.7.0",Tr=new V(gU);var cp;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(cp||(cp={}));function qm(t){return t==="0x"?null:xe(t)}function _r(t){return t==="0x"?ze:z.from(t)}const mU=[{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"}],xU={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function qs(t){const e=Wm(t);return xe(Lt(me(Lt(e,1)),12))}function ia(t,e){return qs(lA(Y(t),e))}function cn(t,e){const r=Ei(z.from(t).toHexString());return r.length>32&&Tr.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function bv(t,e){return{address:xe(t),storageKeys:(e||[]).map((r,n)=>(Pi(r)!==32&&Tr.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function xa(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Tr.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),bv(r[0],r[1])):bv(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,s)=>(i[s]=!0,i),{});return bv(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function fA(t){return xa(t).map(e=>[e.address,e.storageKeys])}function cA(t,e){if(t.gasPrice!=null){const n=z.from(t.gasPrice),i=z.from(t.maxFeePerGas||0);n.eq(i)||Tr.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?xe(t.to):"0x",cn(t.value||0,"value"),t.data||"0x",fA(t.accessList||[])];if(e){const n=pa(e);r.push(cn(n.recoveryParam,"recoveryParam")),r.push(Ei(n.r)),r.push(Ei(n.s))}return Ur(["0x02",ra(r)])}function uA(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?xe(t.to):"0x",cn(t.value||0,"value"),t.data||"0x",fA(t.accessList||[])];if(e){const n=pa(e);r.push(cn(n.recoveryParam,"recoveryParam")),r.push(Ei(n.r)),r.push(Ei(n.s))}return Ur(["0x01",ra(r)])}function bU(t,e){Rh(t,xU);const r=[];mU.forEach(function(o){let a=t[o.name]||[];const l={};o.numeric&&(l.hexPad="left"),a=Y(J(a,l)),o.length&&a.length!==o.length&&a.length>0&&Tr.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a),o.maxLength&&(a=Ei(a),a.length>o.maxLength&&Tr.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a)),r.push(J(a))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Tr.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!is(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(J(n)),r.push("0x"),r.push("0x")),!e)return ra(r);const i=pa(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&&Tr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==s&&Tr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(J(s)),r.push(Ei(Y(i.r))),r.push(Ei(Y(i.s))),ra(r)}function up(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Tr.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),bU(t,e);switch(t.type){case 1:return uA(t,e);case 2:return cA(t,e)}return Tr.throwError(`unsupported transaction type: ${t.type}`,V.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function dA(t,e,r){try{const n=_r(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Tr.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=me(r(t));t.from=ia(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function wU(t){const e=Mh(t.slice(1));e.length!==9&&e.length!==12&&Tr.throwArgumentError("invalid component count for transaction type: 2","payload",J(t));const r=_r(e[2]),n=_r(e[3]),i={type:2,chainId:_r(e[0]).toNumber(),nonce:_r(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:_r(e[4]),to:qm(e[5]),value:_r(e[6]),data:e[7],accessList:xa(e[8])};return e.length===9||(i.hash=me(t),dA(i,e.slice(9),cA)),i}function CU(t){const e=Mh(t.slice(1));e.length!==8&&e.length!==11&&Tr.throwArgumentError("invalid component count for transaction type: 1","payload",J(t));const r={type:1,chainId:_r(e[0]).toNumber(),nonce:_r(e[1]).toNumber(),gasPrice:_r(e[2]),gasLimit:_r(e[3]),to:qm(e[4]),value:_r(e[5]),data:e[6],accessList:xa(e[7])};return e.length===8||(r.hash=me(t),dA(r,e.slice(8),uA)),r}function AU(t){const e=Mh(t);e.length!==9&&e.length!==6&&Tr.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:_r(e[0]).toNumber(),gasPrice:_r(e[1]),gasLimit:_r(e[2]),to:qm(e[3]),value:_r(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=z.from(e[6]).toNumber()}catch{return r}if(r.r=Ue(e[7],32),r.s=Ue(e[8],32),z.from(r.r).isZero()&&z.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(J(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);const s=me(ra(i));try{r.from=ia(s,{r:J(r.r),s:J(r.s),recoveryParam:n})}catch{}r.hash=me(t)}return r.type=null,r}function hA(t){const e=Y(t);if(e[0]>127)return AU(e);switch(e[0]){case 1:return CU(e);case 2:return wU(e)}return Tr.throwError(`unsupported transaction type: ${e[0]}`,V.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const EU="contracts/5.7.0";var sa=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const jt=new V(EU);function T0(t,e){return sa(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&jt.throwArgumentError("invalid address or ENS name","name",r);try{return xe(r)}catch{}t||jt.throwError("a provider or signer is needed to resolve ENS names",V.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&jt.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function gd(t,e,r){return sa(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,i)=>gd(t,Array.isArray(e)?e[i]:e[n.name],n))):r.type==="address"?yield T0(t,e):r.type==="tuple"?yield gd(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>gd(t,n,r.arrayChildren))):Promise.reject(jt.makeError("invalid value for array",V.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function $h(t,e,r){return sa(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=Jt(r.pop())),jt.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=kt({override:T0(t.signer,n.from),signer:t.signer.getAddress()}).then(f=>sa(this,void 0,void 0,function*(){return xe(f.signer)!==f.override&&jt.throwError("Contract with a Signer cannot override from",V.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),f.override})):n.from=t.signer.getAddress():n.from&&(n.from=T0(t.provider,n.from));const i=yield kt({args:gd(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:kt(n)||{}}),s=t.interface.encodeFunctionData(e,i.args),o={data:s,to:i.address},a=i.overrides;if(a.nonce!=null&&(o.nonce=z.from(a.nonce).toNumber()),a.gasLimit!=null&&(o.gasLimit=z.from(a.gasLimit)),a.gasPrice!=null&&(o.gasPrice=z.from(a.gasPrice)),a.maxFeePerGas!=null&&(o.maxFeePerGas=z.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=z.from(a.maxPriorityFeePerGas)),a.from!=null&&(o.from=a.from),a.type!=null&&(o.type=a.type),a.accessList!=null&&(o.accessList=xa(a.accessList)),o.gasLimit==null&&e.gas!=null){let f=21e3;const c=Y(s);for(let u=0;un[f]!=null);return l.length&&jt.throwError(`cannot override ${l.map(f=>JSON.stringify(f)).join(",")}`,V.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),o})}function SU(t,e){return function(...r){return $h(t,e,r)}}function kU(t,e){const r=t.signer||t.provider;return function(...n){return sa(this,void 0,void 0,function*(){r||jt.throwError("estimate require a provider or signer",V.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield $h(t,e,n);return yield r.estimateGas(i)})}}function _U(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(i=>(i.events=i.logs.map(s=>{let o=Ii(s),a=null;try{a=t.interface.parseLog(s)}catch{}return a&&(o.args=a.args,o.decode=(l,f)=>t.interface.decodeEventLog(a.eventFragment,l,f),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 vA(t,e,r){const n=t.signer||t.provider;return function(...i){return sa(this,void 0,void 0,function*(){let s;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const l=Jt(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 $h(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===V.errors.CALL_EXCEPTION&&(l.address=t.address,l.args=i,l.transaction=o),l}})}}function TU(t,e){return function(...r){return sa(this,void 0,void 0,function*(){t.signer||jt.throwError("sending a transaction requires a signer",V.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield $h(t,e,r),i=yield t.signer.sendTransaction(n);return _U(t,i),i})}}function f6(t,e,r){return e.constant?vA(t,e,r):TU(t,e)}function yA(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 Bc{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 PU extends Bc{constructor(){super("error",null)}}class c6 extends Bc{constructor(e,r,n,i){const s={address:e};let o=r.getEventTopic(n);i?(o!==i[0]&&jt.throwArgumentError("topic mismatch","topics",i),s.topics=i.slice()):s.topics=[o],super(yA(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=v7(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class u6 extends Bc{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 IU{constructor(e,r,n){ee(this,"interface",ei(new.target,"getInterface")(r)),n==null?(ee(this,"provider",null),ee(this,"signer",null)):ss.isSigner(n)?(ee(this,"provider",n.provider||null),ee(this,"signer",n)):oo.isProvider(n)?(ee(this,"provider",n),ee(this,"signer",null)):jt.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,(...f)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,f)})),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]]):jt.warn(`Duplicate definition of ${a} (${l.join(", ")})`)})}if(ee(this,"_runningEvents",{}),ee(this,"_wrappedEmits",{}),e==null&&jt.throwArgumentError("invalid contract address or ENS name","addressOrName",e),ee(this,"address",e),this.provider)ee(this,"resolvedAddress",T0(this.provider,e));else try{ee(this,"resolvedAddress",Promise.resolve(xe(e)))}catch{jt.throwError("provider is required to use ENS name as contract address",V.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]){jt.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,f6(this,a,!0)),this.functions[o]==null&&ee(this.functions,o,f6(this,a,!1)),this.callStatic[o]==null&&ee(this.callStatic,o,vA(this,a,!0)),this.populateTransaction[o]==null&&ee(this.populateTransaction,o,SU(this,a)),this.estimateGas[o]==null&&ee(this.estimateGas,o,kU(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 Nm(e)}static getInterface(e){return xr.isInterface(e)?e:new xr(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"&&jt.throwError("contract not deployed",V.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||jt.throwError("sending a transactions require a signer",V.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=Jt(e||{});return["from","to"].forEach(function(n){r[n]!=null&&jt.throwError("cannot override "+n,V.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new Um(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 S0.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 PU);if(e==="event")return this._normalizeRunningEvent(new Bc("event",null));if(e==="*")return this._normalizeRunningEvent(new u6(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new c6(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 c6(this.address,this.interface,i,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new Bc(yA(r),r))}return this._normalizeRunningEvent(new u6(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=Ii(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||jt.throwError("events require a provider or a signer with a provider",V.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=Jt(i.filter);return typeof r=="string"&&Pe(r,32)?(n!=null&&jt.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 Xl extends IU{}class pA{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=Y(Dc(i,t,l));s||(s=h.length,c=new Uint8Array(s),o=Math.ceil(n/s),f=n-(o-1)*s),c.set(h);for(let g=1;g>5,this.byteCount=this.blockCount<<2,this.outputBlocks=L>>5,this.extraBytes=(L&31)>>3;for(var F=0;F<50;++F)this.s[F]=0}d.prototype.update=function(p){if(this.finalized)throw new Error(r);var D,L=typeof p;if(L!=="string"){if(L==="object"){if(p===null)throw new Error(e);if(l&&p.constructor===ArrayBuffer)p=new Uint8Array(p);else if(!Array.isArray(p)&&(!l||!ArrayBuffer.isView(p)))throw new Error(e)}else throw new Error(e);D=!0}for(var F=this.blocks,H=this.byteCount,Z=p.length,K=this.blockCount,X=0,ve=this.s,ie,ye;X>2]|=p[X]<>2]|=ye<>2]|=(192|ye>>6)<>2]|=(128|ye&63)<=57344?(F[ie>>2]|=(224|ye>>12)<>2]|=(128|ye>>6&63)<>2]|=(128|ye&63)<>2]|=(240|ye>>18)<>2]|=(128|ye>>12&63)<>2]|=(128|ye>>6&63)<>2]|=(128|ye&63)<=H){for(this.start=ie-H,this.block=F[K],ie=0;ie>8,L=p&255;L>0;)H.unshift(L),p=p>>8,L=p&255,++F;return D?H.push(F):H.unshift(F),this.update(H),H.length},d.prototype.encodeString=function(p){var D,L=typeof p;if(L!=="string"){if(L==="object"){if(p===null)throw new Error(e);if(l&&p.constructor===ArrayBuffer)p=new Uint8Array(p);else if(!Array.isArray(p)&&(!l||!ArrayBuffer.isView(p)))throw new Error(e)}else throw new Error(e);D=!0}var F=0,H=p.length;if(D)F=H;else for(var Z=0;Z=57344?F+=3:(K=65536+((K&1023)<<10|p.charCodeAt(++Z)&1023),F+=4)}return F+=this.encode(F*8),this.update(p),F},d.prototype.bytepad=function(p,D){for(var L=this.encode(D),F=0;F>2]|=this.padding[D&3],this.lastByteIndex===this.byteCount)for(p[0]=p[L],D=1;D>4&15]+f[X&15]+f[X>>12&15]+f[X>>8&15]+f[X>>20&15]+f[X>>16&15]+f[X>>28&15]+f[X>>24&15];Z%p===0&&(N(D),H=0)}return F&&(X=D[H],K+=f[X>>4&15]+f[X&15],F>1&&(K+=f[X>>12&15]+f[X>>8&15]),F>2&&(K+=f[X>>20&15]+f[X>>16&15])),K},d.prototype.arrayBuffer=function(){this.finalize();var p=this.blockCount,D=this.s,L=this.outputBlocks,F=this.extraBytes,H=0,Z=0,K=this.outputBits>>3,X;F?X=new ArrayBuffer(L+1<<2):X=new ArrayBuffer(K);for(var ve=new Uint32Array(X);Z>8&255,K[X+2]=ve>>16&255,K[X+3]=ve>>24&255;Z%p===0&&N(D)}return F&&(X=Z<<2,ve=D[H],K[X]=ve&255,F>1&&(K[X+1]=ve>>8&255),F>2&&(K[X+2]=ve>>16&255)),K};function _(p,D,L){d.call(this,p,D,L)}_.prototype=new d,_.prototype.finalize=function(){return this.encode(this.outputBits,!0),d.prototype.finalize.call(this)};var N=function(p){var D,L,F,H,Z,K,X,ve,ie,ye,Qt,Me,Se,St,Be,Ge,lo,Ke,Je,fo,Qe,Ye,co,Xe,Ze,uo,et,tt,ho,rt,nt,vo,it,st,yo,ot,at,po,lt,ft,go,ct,ut,mo,dt,ht,xo,vt,yt,bo,pt,gt,wo,mt,xt,Co,bt,wt,ps,gs,ms,xs,bs;for(F=0;F<48;F+=2)H=p[0]^p[10]^p[20]^p[30]^p[40],Z=p[1]^p[11]^p[21]^p[31]^p[41],K=p[2]^p[12]^p[22]^p[32]^p[42],X=p[3]^p[13]^p[23]^p[33]^p[43],ve=p[4]^p[14]^p[24]^p[34]^p[44],ie=p[5]^p[15]^p[25]^p[35]^p[45],ye=p[6]^p[16]^p[26]^p[36]^p[46],Qt=p[7]^p[17]^p[27]^p[37]^p[47],Me=p[8]^p[18]^p[28]^p[38]^p[48],Se=p[9]^p[19]^p[29]^p[39]^p[49],D=Me^(K<<1|X>>>31),L=Se^(X<<1|K>>>31),p[0]^=D,p[1]^=L,p[10]^=D,p[11]^=L,p[20]^=D,p[21]^=L,p[30]^=D,p[31]^=L,p[40]^=D,p[41]^=L,D=H^(ve<<1|ie>>>31),L=Z^(ie<<1|ve>>>31),p[2]^=D,p[3]^=L,p[12]^=D,p[13]^=L,p[22]^=D,p[23]^=L,p[32]^=D,p[33]^=L,p[42]^=D,p[43]^=L,D=K^(ye<<1|Qt>>>31),L=X^(Qt<<1|ye>>>31),p[4]^=D,p[5]^=L,p[14]^=D,p[15]^=L,p[24]^=D,p[25]^=L,p[34]^=D,p[35]^=L,p[44]^=D,p[45]^=L,D=ve^(Me<<1|Se>>>31),L=ie^(Se<<1|Me>>>31),p[6]^=D,p[7]^=L,p[16]^=D,p[17]^=L,p[26]^=D,p[27]^=L,p[36]^=D,p[37]^=L,p[46]^=D,p[47]^=L,D=ye^(H<<1|Z>>>31),L=Qt^(Z<<1|H>>>31),p[8]^=D,p[9]^=L,p[18]^=D,p[19]^=L,p[28]^=D,p[29]^=L,p[38]^=D,p[39]^=L,p[48]^=D,p[49]^=L,St=p[0],Be=p[1],ht=p[11]<<4|p[10]>>>28,xo=p[10]<<4|p[11]>>>28,tt=p[20]<<3|p[21]>>>29,ho=p[21]<<3|p[20]>>>29,gs=p[31]<<9|p[30]>>>23,ms=p[30]<<9|p[31]>>>23,ct=p[40]<<18|p[41]>>>14,ut=p[41]<<18|p[40]>>>14,st=p[2]<<1|p[3]>>>31,yo=p[3]<<1|p[2]>>>31,Ge=p[13]<<12|p[12]>>>20,lo=p[12]<<12|p[13]>>>20,vt=p[22]<<10|p[23]>>>22,yt=p[23]<<10|p[22]>>>22,rt=p[33]<<13|p[32]>>>19,nt=p[32]<<13|p[33]>>>19,xs=p[42]<<2|p[43]>>>30,bs=p[43]<<2|p[42]>>>30,mt=p[5]<<30|p[4]>>>2,xt=p[4]<<30|p[5]>>>2,ot=p[14]<<6|p[15]>>>26,at=p[15]<<6|p[14]>>>26,Ke=p[25]<<11|p[24]>>>21,Je=p[24]<<11|p[25]>>>21,bo=p[34]<<15|p[35]>>>17,pt=p[35]<<15|p[34]>>>17,vo=p[45]<<29|p[44]>>>3,it=p[44]<<29|p[45]>>>3,Xe=p[6]<<28|p[7]>>>4,Ze=p[7]<<28|p[6]>>>4,Co=p[17]<<23|p[16]>>>9,bt=p[16]<<23|p[17]>>>9,po=p[26]<<25|p[27]>>>7,lt=p[27]<<25|p[26]>>>7,fo=p[36]<<21|p[37]>>>11,Qe=p[37]<<21|p[36]>>>11,gt=p[47]<<24|p[46]>>>8,wo=p[46]<<24|p[47]>>>8,mo=p[8]<<27|p[9]>>>5,dt=p[9]<<27|p[8]>>>5,uo=p[18]<<20|p[19]>>>12,et=p[19]<<20|p[18]>>>12,wt=p[29]<<7|p[28]>>>25,ps=p[28]<<7|p[29]>>>25,ft=p[38]<<8|p[39]>>>24,go=p[39]<<8|p[38]>>>24,Ye=p[48]<<14|p[49]>>>18,co=p[49]<<14|p[48]>>>18,p[0]=St^~Ge&Ke,p[1]=Be^~lo&Je,p[10]=Xe^~uo&tt,p[11]=Ze^~et&ho,p[20]=st^~ot&po,p[21]=yo^~at<,p[30]=mo^~ht&vt,p[31]=dt^~xo&yt,p[40]=mt^~Co&wt,p[41]=xt^~bt&ps,p[2]=Ge^~Ke&fo,p[3]=lo^~Je&Qe,p[12]=uo^~tt&rt,p[13]=et^~ho&nt,p[22]=ot^~po&ft,p[23]=at^~lt&go,p[32]=ht^~vt&bo,p[33]=xo^~yt&pt,p[42]=Co^~wt&gs,p[43]=bt^~ps&ms,p[4]=Ke^~fo&Ye,p[5]=Je^~Qe&co,p[14]=tt^~rt&vo,p[15]=ho^~nt&it,p[24]=po^~ft&ct,p[25]=lt^~go&ut,p[34]=vt^~bo>,p[35]=yt^~pt&wo,p[44]=wt^~gs&xs,p[45]=ps^~ms&bs,p[6]=fo^~Ye&St,p[7]=Qe^~co&Be,p[16]=rt^~vo&Xe,p[17]=nt^~it&Ze,p[26]=ft^~ct&st,p[27]=go^~ut&yo,p[36]=bo^~gt&mo,p[37]=pt^~wo&dt,p[46]=gs^~xs&mt,p[47]=ms^~bs&xt,p[8]=Ye^~St&Ge,p[9]=co^~Be&lo,p[18]=vo^~Xe&uo,p[19]=it^~Ze&et,p[28]=ct^~st&ot,p[29]=ut^~yo&at,p[38]=gt^~mo&ht,p[39]=wo^~dt&xo,p[48]=xs^~mt&Co,p[49]=bs^~xt&bt,p[0]^=g[F],p[1]^=g[F+1]};if(a)t.exports=y;else for(P=0;P>=8;return e}function Ww(t,e,r){let n=0;for(let i=0;ie+1+n&&hi.throwError("child data too short",V.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function pA(t,e){if(t.length===0&&hi.throwError("data too short",V.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&hi.throwError("data short segment too short",V.errors.BUFFER_OVERRUN,{});const n=Ww(t,e+1,r);return e+1+r+n>t.length&&hi.throwError("data long segment too short",V.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&&hi.throwError("data array too short",V.errors.BUFFER_OVERRUN,{}),qw(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&hi.throwError("data array too short",V.errors.BUFFER_OVERRUN,{});const n=Ww(t,e+1,r);e+1+r+n>t.length&&hi.throwError("data array too short",V.errors.BUFFER_OVERRUN,{});const i=J(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&&hi.throwError("data too short",V.errors.BUFFER_OVERRUN,{});const n=J(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:J(t[e])}}function Nh(t){const e=Y(t),r=pA(e,0);return r.consumed!==e.length&&hi.throwArgumentError("invalid rlp data","data",t),r.result}const l$=Object.freeze(Object.defineProperty({__proto__:null,decode:Nh,encode:ra},Symbol.toStringTag,{value:"Module"})),f$="address/5.7.0",Os=new V(f$);function Gw(t){Pe(t,20)||Os.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=Y(me(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 c$=9007199254740991;function u$(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const Mm={};for(let t=0;t<10;t++)Mm[String(t)]=String(t);for(let t=0;t<26;t++)Mm[String.fromCharCode(65+t)]=String(10+t);const Kw=Math.floor(u$(c$));function gA(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>Mm[n]).join("");for(;e.length>=Kw;){let n=e.substring(0,Kw);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 xe(t){let e=null;if(typeof t!="string"&&Os.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=Gw(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Os.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)!==gA(t)&&Os.throwArgumentError("bad icap checksum","address",t),e=GL(t.substring(4));e.length<40;)e="0"+e;e=Gw("0x"+e)}else Os.throwArgumentError("invalid address","address",t);return e}function d$(t){try{return xe(t),!0}catch{}return!1}function h$(t){let e=KL(xe(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+gA("XE00"+e)+e}function Nm(t){let e=null;try{e=xe(t.from)}catch{Os.throwArgumentError("missing from address","transaction",t)}const r=Ei(Y(z.from(t.nonce).toHexString()));return xe(Lt(me(ra([e,r])),12))}function v$(t,e,r){return Pi(e)!==32&&Os.throwArgumentError("salt must be 32 bytes","salt",e),Pi(r)!==32&&Os.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),xe(Lt(me(je(["0xff",xe(t),e,r])),12))}class y$ extends us{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=xe(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return xe(Ue(e.readValue().toHexString(),20))}}class p$ extends us{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 Za=new V(Zc);function mA(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let l={};n=e.map(f=>{const c=f.localName;return c||Za.throwError("cannot encode object for signature with missing names",V.errors.INVALID_ARGUMENT,{argument:"values",coder:f,value:r}),l[c]&&Za.throwError("cannot encode object for signature with duplicate names",V.errors.INVALID_ARGUMENT,{argument:"values",coder:f,value:r}),l[c]=!0,r[c]})}else Za.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&Za.throwArgumentError("types/value length mismatch","tuple",r);let i=new np(t.wordSize),s=new np(t.wordSize),o=[];e.forEach((l,f)=>{let c=n[f];if(l.dynamic){let u=s.length;l.encode(s,c);let h=i.writeUpdatableValue();o.push(v=>{h(v+u)})}else l.encode(i,c)}),o.forEach(l=>{l(i.length)});let a=t.appendWriter(i);return a+=t.appendWriter(s),a}function xA(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(f){if(f.code===V.errors.BUFFER_OVERRUN)throw f;o=f,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(t)}catch(a){if(a.code===V.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 g$ extends us{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&&Za.throwError("insufficient data length",V.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 _$(t,e,r,n,i){return t===Yr.OVERLONG?(n.push(i),0):(n.push(65533),SA(t,e,r))}const kA=Object.freeze({error:k$,ignore:SA,replace:_$});function Om(t,e){e==null&&(e=kA.error),t=Y(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 Le(t,e=Ri.current){e!=Ri.current&&(EA.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 Y(r)}function dv(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function T$(t,e){return'"'+Om(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?dv(r):(r-=65536,dv((r>>10&1023)+55296)+dv((r&1023)+56320))}).join("")+'"'}function sp(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function ds(t,e){return sp(Om(t,e))}function E0(t,e=Ri.current){return Om(Le(t,e))}function P$(t){const e=Le(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return J(je([e,A0]).slice(0,32))}function I$(t){const e=Y(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 ds(e.slice(0,r))}function R$(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 _A(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 Bm(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 M$=_A("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"),N$="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),O$=[{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}],D$=Dm("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"),B$=Dm("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"),L$=Dm("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",R$),$$=_A("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 F$(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function j$(t){return!!Bm(t,M$)}function U$(t){let e=Bm(t,O$);if(e)return[t+e.s];let r=D$[t];if(r)return r;let n=B$[t];if(n)return[t+n[0]];let i=L$[t];return i||null}function z$(t){return!!Bm(t,$$)}function V$(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=E0(t);e=F$(e.map(n=>{if(N$.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=U$(n);return i||[n]})),e=E0(sp(e),Ri.NFKC),e.forEach(n=>{if(z$(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(j$(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=sp(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}class H$ extends bA{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,Le(r))}decode(e){return ds(super.decode(e))}}class ju extends us{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 mA(e,this.coders,r)}decode(e){return e.coerce(this.name,xA(e,this.coders))}}const Uu=new V(Zc),W$=new RegExp(/^bytes([0-9]*)$/),q$=new RegExp(/^(u?int)([0-9]*)$/);class Lm{constructor(e){ee(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new y$(e.name);case"bool":return new m$(e.name);case"string":return new H$(e.name);case"bytes":return new x$(e.name);case"array":return new g$(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new ju((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new w$(e.name)}let r=e.type.match(q$);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&Uu.throwArgumentError("invalid "+r[1]+" bit length","param",e),new E$(n/8,r[1]==="int",e.name)}if(r=e.type.match(W$),r){let n=parseInt(r[1]);return(n===0||n>32)&&Uu.throwArgumentError("invalid bytes length","param",e),new b$(n,e.name)}return Uu.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new C0(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new np(this._getWordSize())}getDefaultValue(e){const r=e.map(i=>this._getCoder(ir.from(i)));return new ju(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&Uu.throwError("types/values length mismatch",V.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(o=>this._getCoder(ir.from(o))),i=new ju(n,"_"),s=this._getWriter();return i.encode(s,r),s.data}decode(e,r,n){const i=e.map(o=>this._getCoder(ir.from(o)));return new ju(i,"_").decode(this._getReader(Y(r),n))}}const qr=new Lm;function Ds(t){return me(Le(t))}const TA="hash/5.7.0";function $m(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 K$(t){const e={};for(let r=0;r>--l&1}const u=31,h=Math.pow(2,u),v=h>>>1,x=v>>1,g=h-1;let k=0;for(let M=0;M1;){let q=$+j>>>1;M>>1|c(),U=U<<1^v,W=(W^v)<<1|v|1;A=U,E=1+W-U}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 Q$(t){let e=0;return()=>t[e++]}function Y$(t){return Q$(J$(t))}function X$(t){return t&1?~t>>1:t>>1}function Z$(t,e){let r=Array(t);for(let n=0;ne[o]):r}function tF(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(nF(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(iF(r,t))}return K$(PA(e))}function rF(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function IA(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;in[o].push(s));return n}function nF(t,e){let r=1+e(),n=e(),i=rF(e),s=IA(i.length,1+t,e);return PA(s.map((o,a)=>{const l=o[0],f=o.slice(1);return Array(i[a]).fill(void 0).map((c,u)=>{let h=u*n;return[l+u*r,f.map(v=>v+h)]})}))}function iF(t,e){let r=1+e();return IA(r,1+t,e).map(i=>[i[0],i.slice(1)])}function sF(t){let e=S0(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let f=S0(t,e);if(f.length==0)break;n.push({set:new Set(f),node:r()})}n.sort((f,c)=>c.set.size-f.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 oF(){return Y$($m("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"))}const Oh=oF(),aF=new Set(S0(Oh)),lF=new Set(S0(Oh)),fF=tF(Oh),cF=sF(Oh),Qw=45,Yw=95;function RA(t){return E0(t)}function uF(t){return t.filter(e=>e!=65039)}function MA(t){for(let e of t.split(".")){let r=RA(e);try{for(let n=r.lastIndexOf(Yw)-1;n>=0;n--)if(r[n]!==Yw)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===Qw&&r[3]===Qw)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function dF(t){return MA(hF(t,uF))}function hF(t,e){let r=RA(t).reverse(),n=[];for(;r.length;){let i=yF(r);if(i){n.push(...e(i));continue}let s=r.pop();if(aF.has(s)){n.push(s);continue}if(lF.has(s))continue;let o=fF[s];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${s.toString(16).toUpperCase()}`)}return MA(vF(String.fromCodePoint(...n)))}function vF(t){return t.normalize("NFC")}function yF(t,e){var r;let n=cF,i,s,o=[],a=t.length;for(e&&(e.length=0);a;){let l=t[--a];if(n=(r=n.branches.find(f=>f.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 pF=new V(TA),NA=new Uint8Array(32);NA.fill(0);function Xw(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function jm(t){const e=Le(dF(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(Xw(e.slice(n))),r}function gF(t){try{return jm(t).length!==0}catch{}return!1}function Gf(t){typeof t!="string"&&pF.throwArgumentError("invalid ENS name; not a string","name",t);let e=NA;const r=jm(t);for(;r.length;)e=me(je([e,me(r.pop())]));return J(e)}function OA(t){return J(je(jm(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 mF=`Ethereum Signed Message: +`;function Dh(t){return typeof t=="string"&&(t=Le(t)),me(je([Le(mF),Le(String(t.length)),t]))}var xF=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const Pt=new V(TA),DA=new Uint8Array(32);DA.fill(0);const bF=z.from(-1),BA=z.from(0),LA=z.from(1),wF=z.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function CF(t){const e=Y(t),r=e.length%32;return r?Ur([e,DA.slice(r)]):J(e)}const AF=Ue(LA.toHexString(),32),EF=Ue(BA.toHexString(),32),Zw={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},hv=["name","version","chainId","verifyingContract","salt"];function e6(t){return function(e){return typeof e!="string"&&Pt.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const SF={name:e6("name"),version:e6("version"),chainId:function(t){try{return z.from(t).toString()}catch{}return Pt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return xe(t).toLowerCase()}catch{}return Pt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=Y(t);if(e.length!==32)throw new Error("bad length");return J(e)}catch{}return Pt.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function vv(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))&&Pt.throwArgumentError("invalid numeric width","type",t);const i=wF.mask(r?n-1:n),s=r?i.add(LA).mul(bF):BA;return function(o){const a=z.from(o);return(a.lt(s)||a.gt(i))&&Pt.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))&&Pt.throwArgumentError("invalid bytes width","type",t),function(n){return Y(n).length!==r&&Pt.throwArgumentError(`invalid length for ${t}`,"value",n),CF(n)}}}switch(t){case"address":return function(e){return Ue(xe(e),32)};case"bool":return function(e){return e?AF:EF};case"bytes":return function(e){return me(e)};case"string":return function(e){return Ds(e)}}return null}function t6(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class qt{constructor(e){ee(this,"types",Object.freeze(Ii(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(f=>{l[f.name]&&Pt.throwArgumentError(`duplicate variable name ${JSON.stringify(f.name)} in ${JSON.stringify(a)}`,"types",e),l[f.name]=!0;const c=f.type.match(/^([^\x5b]*)(\x5b|$)/)[1];c===a&&Pt.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),!vv(c)&&(n[c]||Pt.throwArgumentError(`unknown type ${JSON.stringify(c)}`,"types",e),n[c].push(a),r[a][c]=!0)})}const s=Object.keys(n).filter(a=>n[a].length===0);s.length===0?Pt.throwArgumentError("missing primary type","types",e):s.length>1&&Pt.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]&&Pt.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),l[a]=!0,Object.keys(r[a]).forEach(f=>{n[f]&&(o(f,l),Object.keys(l).forEach(c=>{i[c][f]=!0}))}),delete l[a]}o(this.primaryType,{});for(const a in i){const l=Object.keys(i[a]);l.sort(),this._types[a]=t6(a,e[a])+l.map(f=>t6(f,e[f])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=vv(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&&Pt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let l=a.map(s);return this._types[i]&&(l=l.map(me)),me(Ur(l))}}const n=this.types[e];if(n){const i=Ds(this._types[e]);return s=>{const o=n.map(({name:a,type:l})=>{const f=this.getEncoder(l)(s[a]);return this._types[l]?me(f):f});return o.unshift(i),Ur(o)}}return Pt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||Pt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return me(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(vv(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&&Pt.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),{}):Pt.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=Zw[n];i||Pt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>hv.indexOf(n.name)-hv.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 me(qt.encode(e,r,n))}static resolveNames(e,r,n,i){return xF(this,void 0,void 0,function*(){e=Jt(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=[];hv.forEach(l=>{const f=e[l];f!=null&&(i[l]=SF[l](f),s.push({name:l,type:Zw[l]}))});const o=qt.from(r),a=Jt(r);return a.EIP712Domain?Pt.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,f)=>{if(l.match(/^bytes(\d*)/))return J(Y(f));if(l.match(/^u?int/))return z.from(f).toString();switch(l){case"address":return f.toLowerCase();case"bool":return!!f;case"string":return typeof f!="string"&&Pt.throwArgumentError("invalid string","value",f),f}return Pt.throwArgumentError("unsupported type","type",l)})}}}const Tt=new V(Zc);class $A extends ga{}class FA extends ga{}class kF extends ga{}class k0 extends ga{static isIndexed(e){return!!(e&&e._isIndexed)}}const _F={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function r6(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class xr{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,ee(this,"fragments",r.map(n=>xi.from(n)).filter(n=>n!=null)),ee(this,"_abiCoder",ei(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){Tt.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]){Tt.warn("duplicate definition - "+s);return}i[s]=n}),this.deploy||ee(this,"deploy",Xn.from({payable:!1,type:"constructor"})),ee(this,"_isInterface",!0)}format(e){e||(e=Oe.full),e===Oe.sighash&&Tt.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===Oe.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return qr}static getAddress(e){return xe(e)}static getSighash(e){return Lt(Ds(e.format()),0,4)}static getEventTopic(e){return Ds(e.format())}getFunction(e){if(Pe(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];Tt.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?Tt.throwArgumentError("no matching function","name",n):i.length>1&&Tt.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const r=this.functions[Zn.fromString(e).format()];return r||Tt.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];Tt.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?Tt.throwArgumentError("no matching event","name",n):i.length>1&&Tt.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const r=this.events[gi.fromString(e).format()];return r||Tt.throwArgumentError("no matching event","signature",e),r}getError(e){if(Pe(e)){const n=ei(this.constructor,"getSighash");for(const i in this.errors){const s=this.errors[i];if(e===n(s))return this.errors[i]}Tt.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?Tt.throwArgumentError("no matching error","name",n):i.length>1&&Tt.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const r=this.errors[Zn.fromString(e).format()];return r||Tt.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 ei(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),ei(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=Y(r);return J(n.slice(0,4))!==this.getSighash(e)&&Tt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",J(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),J(je([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=Y(r);return J(n.slice(0,4))!==this.getSighash(e)&&Tt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",J(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),J(je([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=Y(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 f=J(n.slice(0,4)),c=_F[f];if(c)o=this._abiCoder.decode(c.inputs,n.slice(4)),a=c.name,l=c.signature,c.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(f);o=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,l=u.format()}catch{}break}}return Tt.throwError("call revert exception"+s,V.errors.CALL_EXCEPTION,{method:e.format(),data:J(r),errorArgs:o,errorName:a,errorSignature:l,reason:i})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),J(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&Tt.throwError("too many arguments for "+e.format(),V.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(s,o)=>s.type==="string"?Ds(o):s.type==="bytes"?me(J(o)):(s.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),s.type.match(/^u?int/)&&(o=z.from(o).toHexString()),s.type==="address"&&this._abiCoder.encode(["address"],[o]),Ue(J(o),32));for(r.forEach((s,o)=>{let a=e.inputs[o];if(!a.indexed){s!=null&&Tt.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"?Tt.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&&Tt.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(Ds(l));else if(o.type==="bytes")n.push(me(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)&&Tt.throwError("fragment/topic mismatch",V.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:h,value:n[0]}),n=n.slice(1)}let i=[],s=[],o=[];e.inputs.forEach((h,v)=>{h.indexed?h.type==="string"||h.type==="bytes"||h.baseType==="tuple"||h.baseType==="array"?(i.push(ir.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,je(n)):null,l=this._abiCoder.decode(s,r,!0),f=[],c=0,u=0;e.inputs.forEach((h,v)=>{if(h.indexed)if(a==null)f[v]=new k0({_isIndexed:!0,hash:null});else if(o[v])f[v]=new k0({_isIndexed:!0,hash:a[u++]});else try{f[v]=a[u++]}catch(x){f[v]=x}else try{f[v]=l[c++]}catch(x){f[v]=x}if(h.name&&f[h.name]==null){const x=f[v];x instanceof Error?Object.defineProperty(f,h.name,{enumerable:!0,get:()=>{throw r6(`property ${JSON.stringify(h.name)}`,x)}}):f[h.name]=x}});for(let h=0;h{throw r6(`index ${h}`,v)}})}return Object.freeze(f)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new FA({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:z.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new $A({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=J(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new kF({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 TF="abstract-provider/5.7.0";var PF=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const IF=new V(TF);class RF extends ga{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class oo{constructor(){IF.checkAbstract(new.target,oo),ee(this,"_isProvider",!0)}getFeeData(){return PF(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield kt({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=z.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 MF="abstract-signer/5.7.0";var Un=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const En=new V(MF),NF=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],OF=[V.errors.INSUFFICIENT_FUNDS,V.errors.NONCE_EXPIRED,V.errors.REPLACEMENT_UNDERPRICED];let ss=class jA{constructor(){En.checkAbstract(new.target,jA),ee(this,"_isSigner",!0)}getBalance(e){return Un(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Un(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Un(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield kt(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return Un(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield kt(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return Un(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 Un(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Un(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Un(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Un(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)NF.indexOf(n)===-1&&En.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=Jt(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()&&En.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return Un(this,void 0,void 0,function*(){const r=yield kt(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>Un(this,void 0,void 0,function*(){if(i==null)return null;const s=yield this.resolveName(i);return s==null&&En.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)?En.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&En.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&&En.throwError("network does not support EIP-1559",V.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):En.throwError("failed to get consistent fee data",V.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(OF.indexOf(i.code)>=0)throw i;return En.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",V.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]&&En.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield kt(r)})}_checkProvider(e){this.provider||En.throwError("missing provider",V.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}};class Um extends ss{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(()=>{En.throwError(e,V.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 Um(this.address,e)}}var jr={},Re={},eu=UA;function UA(t,e){if(!t)throw new Error(e||"Assertion failed")}UA.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var op={},n6={get exports(){return op},set exports(t){op=t}};typeof Object.create=="function"?n6.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:n6.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 DF=eu,BF=op;Re.inherits=BF;function LF(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function $F(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):LF(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=zA;function jF(t,e){for(var r="",n=0;n>>0}return s}Re.join32=UF;function zF(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=zF;function VF(t,e){return t>>>e|t<<32-e}Re.rotr32=VF;function HF(t,e){return t<>>32-e}Re.rotl32=HF;function WF(t,e){return t+e>>>0}Re.sum32=WF;function qF(t,e,r){return t+e+r>>>0}Re.sum32_3=qF;function GF(t,e,r,n){return t+e+r+n>>>0}Re.sum32_4=GF;function KF(t,e,r,n,i){return t+e+r+n+i>>>0}Re.sum32_5=KF;function JF(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=JF;function QF(t,e,r,n){var i=e+n>>>0,s=(i>>0}Re.sum64_hi=QF;function YF(t,e,r,n){var i=e+n;return i>>>0}Re.sum64_lo=YF;function XF(t,e,r,n,i,s,o,a){var l=0,f=e;f=f+n>>>0,l+=f>>0,l+=f>>0,l+=f>>0}Re.sum64_4_hi=XF;function ZF(t,e,r,n,i,s,o,a){var l=e+n+s+a;return l>>>0}Re.sum64_4_lo=ZF;function ej(t,e,r,n,i,s,o,a,l,f){var c=0,u=e;u=u+n>>>0,c+=u>>0,c+=u>>0,c+=u>>0,c+=u>>0}Re.sum64_5_hi=ej;function tj(t,e,r,n,i,s,o,a,l,f){var c=e+n+s+a+f;return c>>>0}Re.sum64_5_lo=tj;function rj(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Re.rotr64_hi=rj;function nj(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Re.rotr64_lo=nj;function ij(t,e,r){return t>>>r}Re.shr64_hi=ij;function sj(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Re.shr64_lo=sj;var Jl={},i6=Re,oj=eu;function Bh(){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}Jl.BlockHash=Bh;Bh.prototype.update=function(e,r){if(e=i6.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=i6.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}Di.g0_256=uj;function dj(t){return Si(t,17)^Si(t,19)^t>>>10}Di.g1_256=dj;var Pl=Re,hj=Jl,vj=Di,yv=Pl.rotl32,vf=Pl.sum32,yj=Pl.sum32_5,pj=vj.ft_1,KA=hj.BlockHash,gj=[1518500249,1859775393,2400959708,3395469782];function Mi(){if(!(this instanceof Mi))return new Mi;KA.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Pl.inherits(Mi,KA);var mj=Mi;Mi.blockSize=512;Mi.outSize=160;Mi.hmacStrength=80;Mi.padLength=64;Mi.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()),sU(e.length<=this.blockSize);for(var r=e.length;r>8,h=c&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?g=(h>>1)-k:g=k,v.isubn(g)):g=0,u[x]=g,v.iushrn(1)}return u}r.getNAF=n;function i(l,f){var c=[[],[]];l=l.clone(),f=f.clone();for(var u=0,h=0,v;l.cmpn(-u)>0||f.cmpn(-h)>0;){var x=l.andln(3)+u&3,g=f.andln(3)+h&3;x===3&&(x=-1),g===3&&(g=-1);var k;x&1?(v=l.andln(7)+u&7,(v===3||v===5)&&g===2?k=-x:k=x):k=0,c[0].push(k);var w;g&1?(v=f.andln(7)+h&7,(v===3||v===5)&&x===2?w=-g:w=g):w=0,c[1].push(w),2*u===k+1&&(u=1-u),2*h===w+1&&(h=1-h),l.iushrn(1),f.iushrn(1)}return c}r.getJSF=i;function s(l,f,c){var u="_"+f;l.prototype[f]=function(){return this[u]!==void 0?this[u]:this[u]=c.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 we(l,"hex","le")}r.intFromLE=a}),_0=Cn.getNAF,lU=Cn.getJSF,T0=Cn.assert;function ao(t,e){this.type=t,this.p=new we(e.p,16),this.red=e.prime?we.red(e.prime):we.mont(this.p),this.zero=new we(0).toRed(this.red),this.one=new we(1).toRed(this.red),this.two=new we(2).toRed(this.red),this.n=e.n&&new we(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 ma=ao;ao.prototype.point=function(){throw new Error("Not implemented")};ao.prototype.validate=function(){throw new Error("Not implemented")};ao.prototype._fixedNafMul=function(e,r){T0(e.precomputed);var n=e._getDoubles(),i=_0(r,1,this._bitLength),s=(1<=a;f--)l=(l<<1)+i[f];o.push(l)}for(var c=this.jpoint(null,null,null),u=this.jpoint(null,null,null),h=s;h>0;h--){for(a=0;a=0;l--){for(var f=0;l>=0&&o[l]===0;l--)f++;if(l>=0&&f++,a=a.dblp(f),l<0)break;var c=o[l];T0(c!==0),e.type==="affine"?c>0?a=a.mixedAdd(s[c-1>>1]):a=a.mixedAdd(s[-c-1>>1].neg()):c>0?a=a.add(s[c-1>>1]):a=a.add(s[-c-1>>1].neg())}return e.type==="affine"?a.toP():a};ao.prototype._wnafMulAdd=function(e,r,n,i,s){var o=this._wnafT1,a=this._wnafT2,l=this._wnafT3,f=0,c,u,h;for(c=0;c=1;c-=2){var x=c-1,g=c;if(o[x]!==1||o[g]!==1){l[x]=_0(n[x],o[x],this._bitLength),l[g]=_0(n[g],o[g],this._bitLength),f=Math.max(l[x].length,f),f=Math.max(l[g].length,f);continue}var k=[r[x],null,null,r[g]];r[x].y.cmp(r[g].y)===0?(k[1]=r[x].add(r[g]),k[2]=r[x].toJ().mixedAdd(r[g].neg())):r[x].y.cmp(r[g].y.redNeg())===0?(k[1]=r[x].toJ().mixedAdd(r[g]),k[2]=r[x].add(r[g].neg())):(k[1]=r[x].toJ().mixedAdd(r[g]),k[2]=r[x].toJ().mixedAdd(r[g].neg()));var w=[-3,-1,-5,-7,0,7,5,1,3],A=lU(n[x],n[g]);for(f=Math.max(A[0].length,f),l[x]=new Array(f),l[g]=new Array(f),u=0;u=0;c--){for(var j=0;c>=0;){var U=!0;for(u=0;u=0&&j++,M=M.dblp(j),c<0)break;for(u=0;u0?h=a[u][W-1>>1]:W<0&&(h=a[u][-W-1>>1].neg()),h.type==="affine"?M=M.mixedAdd(h):M=M.add(h))}}for(c=0;c=Math.ceil((e.bitLength()+1)/r.step):!1};Ln.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&&(v=f,x=c),u.negative&&(u=u.neg(),h=h.neg()),v.negative&&(v=v.neg(),x=x.neg()),[{a:u,b:h},{a:v,b:x}]};$n.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),f=s.mul(n.b),c=o.mul(i.b),u=e.sub(a).sub(l),h=f.add(c).neg();return{k1:u,k2:h}};$n.prototype.pointFromX=function(e,r){e=new we(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)};$n.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};$n.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,s=this._endoWnafT2,o=0;o":""};cr.prototype.isInfinity=function(){return this.inf};cr.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)};cr.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)};cr.prototype.getX=function(){return this.x.fromRed()};cr.prototype.getY=function(){return this.y.fromRed()};cr.prototype.mul=function(e){return e=new we(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)};cr.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)};cr.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)};cr.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)};cr.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};cr.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 wr(t,e,r,n){ma.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new we(0)):(this.x=new we(e,16),this.y=new we(r,16),this.z=new we(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}Vm(wr,ma.BasePoint);$n.prototype.jpoint=function(e,r,n){return new wr(this,e,r,n)};wr.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)};wr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};wr.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),f=o.redSub(a);if(l.cmpn(0)===0)return f.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=l.redSqr(),u=c.redMul(l),h=i.redMul(c),v=f.redSqr().redIAdd(u).redISub(h).redISub(h),x=f.redMul(h.redISub(v)).redISub(o.redMul(u)),g=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(v,x,g)};wr.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 f=a.redSqr(),c=f.redMul(a),u=n.redMul(f),h=l.redSqr().redIAdd(c).redISub(u).redISub(u),v=l.redMul(u.redISub(h)).redISub(s.redMul(c)),x=this.z.redMul(a);return this.curve.jpoint(h,v,x)};wr.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}};wr.prototype.inspect=function(){return this.isInfinity()?"":""};wr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var pd=Xl(function(t,e){var r=e;r.base=ma,r.short=cU,r.mont=null,r.edwards=null}),gd=Xl(function(t,e){var r=e,n=Cn.assert;function i(a){a.type==="short"?this.curve=new pd.short(a):a.type==="edwards"?this.curve=new pd.edwards(a):this.curve=new pd.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 f=new i(l);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:f}),f}})}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:jr.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:jr.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:jr.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:jr.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:jr.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:jr.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:jr.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:jr.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function to(t){if(!(this instanceof to))return new to(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=ti.toArray(t.entropy,t.entropyEnc||"hex"),r=ti.toArray(t.nonce,t.nonceEnc||"hex"),n=ti.toArray(t.pers,t.persEnc||"hex");zm(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var o7=to;to.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};to.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=ti.toArray(n,i||"hex"),this._update(n));for(var s=[];s.length"};var uU=Cn.assert;function Lh(t,e){if(t instanceof Lh)return t;this._importDER(t,e)||(uU(t.r&&t.s,"Signature without r or s"),this.r=new we(t.r,16),this.s=new we(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var $h=Lh;function dU(){this.place=0}function mv(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 l6(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)}Lh.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=l6(r),n=l6(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];xv(i,r.length),i=i.concat(r),i.push(2),xv(i,n.length);var s=i.concat(n),o=[48];return xv(o,s.length),o=o.concat(s),Cn.encode(o,e)};var hU=function(){throw new Error("unsupported")},a7=Cn.assert;function Bn(t){if(!(this instanceof Bn))return new Bn(t);typeof t=="string"&&(a7(Object.prototype.hasOwnProperty.call(gd,t),"Unknown curve "+t),t=gd[t]),t instanceof gd.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 vU=Bn;Bn.prototype.keyPair=function(e){return new Hm(this,e)};Bn.prototype.keyFromPrivate=function(e,r){return Hm.fromPrivate(this,e,r)};Bn.prototype.keyFromPublic=function(e,r){return Hm.fromPublic(this,e,r)};Bn.prototype.genKeyPair=function(e){e||(e={});for(var r=new o7({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||hU(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new we(2));;){var s=new we(r.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}};Bn.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};Bn.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 we(e,16));for(var s=this.n.byteLength(),o=r.getPrivate().toArray("be",s),a=e.toArray("be",s),l=new o7({hash:this.hash,entropy:o,nonce:a,pers:i.pers,persEnc:i.persEnc||"utf8"}),f=this.n.sub(new we(1)),c=0;;c++){var u=i.k?i.k(c):new we(l.generate(this.n.byteLength()));if(u=this._truncateToN(u,!0),!(u.cmpn(1)<=0||u.cmp(f)>=0)){var h=this.g.mul(u);if(!h.isInfinity()){var v=h.getX(),x=v.umod(this.n);if(x.cmpn(0)!==0){var g=u.invm(this.n).mul(x.mul(r.getPrivate()).iadd(e));if(g=g.umod(this.n),g.cmpn(0)!==0){var k=(h.getY().isOdd()?1:0)|(v.cmp(x)!==0?2:0);return i.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),k^=1),new $h({r:x,s:g,recoveryParam:k})}}}}}};Bn.prototype.verify=function(e,r,n,i){e=this._truncateToN(new we(e,16)),n=this.keyFromPublic(n,i),r=new $h(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),f=a.mul(s).umod(this.n),c;return this.curve._maxwellTrick?(c=this.g.jmulAdd(l,n.getPublic(),f),c.isInfinity()?!1:c.eqXToP(s)):(c=this.g.mulAdd(l,n.getPublic(),f),c.isInfinity()?!1:c.getX().umod(this.n).cmp(s)===0)};Bn.prototype.recoverPubKey=function(t,e,r,n){a7((3&r)===r,"The recovery param is more than two bits"),e=new $h(e,n);var i=this.n,s=new we(t),o=e.r,a=e.s,l=r&1,f=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");f?o=this.curve.pointFromX(o.add(this.curve.n),l):o=this.curve.pointFromX(o,l);var c=e.r.invm(i),u=i.sub(s).mul(c).umod(i),h=a.mul(c).umod(i);return this.g.mulAdd(u,o,h)};Bn.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new $h(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 yU=Xl(function(t,e){var r=e;r.version="6.5.4",r.utils=Cn,r.rand=function(){throw new Error("unsupported")},r.curve=pd,r.curves=gd,r.ec=vU,r.eddsa=null}),pU=yU.ec;const gU="signing-key/5.7.0",cp=new V(gU);let bv=null;function vi(){return bv||(bv=new pU("secp256k1")),bv}class Wo{constructor(e){ee(this,"curve","secp256k1"),ee(this,"privateKey",J(e)),Pi(this.privateKey)!==32&&cp.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=vi().keyFromPrivate(Y(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=vi().keyFromPublic(Y(this.publicKey)),n=vi().keyFromPublic(Y(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=vi().keyFromPrivate(Y(this.privateKey)),n=Y(e);n.length!==32&&cp.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return pa({recoveryParam:i.recoveryParam,r:Ue("0x"+i.r.toString(16),32),s:Ue("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=vi().keyFromPrivate(Y(this.privateKey)),n=vi().keyFromPublic(Y(Wm(e)));return Ue("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function l7(t,e){const r=pa(e),n={r:Y(r.r),s:Y(r.s)};return"0x"+vi().recoverPubKey(Y(t),n,r.recoveryParam).encode("hex",!1)}function Wm(t,e){const r=Y(t);if(r.length===32){const n=new Wo(r);return e?"0x"+vi().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?J(r):"0x"+vi().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+vi().keyFromPublic(r).getPublic(!0,"hex"):J(r)}return cp.throwArgumentError("invalid public or private key","key","[REDACTED]")}const mU="transactions/5.7.0",Tr=new V(mU);var up;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(up||(up={}));function qm(t){return t==="0x"?null:xe(t)}function _r(t){return t==="0x"?ze:z.from(t)}const xU=[{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"}],bU={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function qs(t){const e=Wm(t);return xe(Lt(me(Lt(e,1)),12))}function ia(t,e){return qs(l7(Y(t),e))}function cn(t,e){const r=Ei(z.from(t).toHexString());return r.length>32&&Tr.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function wv(t,e){return{address:xe(t),storageKeys:(e||[]).map((r,n)=>(Pi(r)!==32&&Tr.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function xa(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Tr.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),wv(r[0],r[1])):wv(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,s)=>(i[s]=!0,i),{});return wv(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function f7(t){return xa(t).map(e=>[e.address,e.storageKeys])}function c7(t,e){if(t.gasPrice!=null){const n=z.from(t.gasPrice),i=z.from(t.maxFeePerGas||0);n.eq(i)||Tr.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?xe(t.to):"0x",cn(t.value||0,"value"),t.data||"0x",f7(t.accessList||[])];if(e){const n=pa(e);r.push(cn(n.recoveryParam,"recoveryParam")),r.push(Ei(n.r)),r.push(Ei(n.s))}return Ur(["0x02",ra(r)])}function u7(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?xe(t.to):"0x",cn(t.value||0,"value"),t.data||"0x",f7(t.accessList||[])];if(e){const n=pa(e);r.push(cn(n.recoveryParam,"recoveryParam")),r.push(Ei(n.r)),r.push(Ei(n.s))}return Ur(["0x01",ra(r)])}function wU(t,e){Mh(t,bU);const r=[];xU.forEach(function(o){let a=t[o.name]||[];const l={};o.numeric&&(l.hexPad="left"),a=Y(J(a,l)),o.length&&a.length!==o.length&&a.length>0&&Tr.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a),o.maxLength&&(a=Ei(a),a.length>o.maxLength&&Tr.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a)),r.push(J(a))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Tr.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!is(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(J(n)),r.push("0x"),r.push("0x")),!e)return ra(r);const i=pa(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&&Tr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==s&&Tr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(J(s)),r.push(Ei(Y(i.r))),r.push(Ei(Y(i.s))),ra(r)}function dp(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Tr.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),wU(t,e);switch(t.type){case 1:return u7(t,e);case 2:return c7(t,e)}return Tr.throwError(`unsupported transaction type: ${t.type}`,V.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function d7(t,e,r){try{const n=_r(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Tr.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=me(r(t));t.from=ia(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function CU(t){const e=Nh(t.slice(1));e.length!==9&&e.length!==12&&Tr.throwArgumentError("invalid component count for transaction type: 2","payload",J(t));const r=_r(e[2]),n=_r(e[3]),i={type:2,chainId:_r(e[0]).toNumber(),nonce:_r(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:_r(e[4]),to:qm(e[5]),value:_r(e[6]),data:e[7],accessList:xa(e[8])};return e.length===9||(i.hash=me(t),d7(i,e.slice(9),c7)),i}function AU(t){const e=Nh(t.slice(1));e.length!==8&&e.length!==11&&Tr.throwArgumentError("invalid component count for transaction type: 1","payload",J(t));const r={type:1,chainId:_r(e[0]).toNumber(),nonce:_r(e[1]).toNumber(),gasPrice:_r(e[2]),gasLimit:_r(e[3]),to:qm(e[4]),value:_r(e[5]),data:e[6],accessList:xa(e[7])};return e.length===8||(r.hash=me(t),d7(r,e.slice(8),u7)),r}function EU(t){const e=Nh(t);e.length!==9&&e.length!==6&&Tr.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:_r(e[0]).toNumber(),gasPrice:_r(e[1]),gasLimit:_r(e[2]),to:qm(e[3]),value:_r(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=z.from(e[6]).toNumber()}catch{return r}if(r.r=Ue(e[7],32),r.s=Ue(e[8],32),z.from(r.r).isZero()&&z.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(J(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);const s=me(ra(i));try{r.from=ia(s,{r:J(r.r),s:J(r.s),recoveryParam:n})}catch{}r.hash=me(t)}return r.type=null,r}function h7(t){const e=Y(t);if(e[0]>127)return EU(e);switch(e[0]){case 1:return AU(e);case 2:return CU(e)}return Tr.throwError(`unsupported transaction type: ${e[0]}`,V.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const SU="contracts/5.7.0";var sa=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const jt=new V(SU);function P0(t,e){return sa(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&jt.throwArgumentError("invalid address or ENS name","name",r);try{return xe(r)}catch{}t||jt.throwError("a provider or signer is needed to resolve ENS names",V.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&jt.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function md(t,e,r){return sa(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,i)=>md(t,Array.isArray(e)?e[i]:e[n.name],n))):r.type==="address"?yield P0(t,e):r.type==="tuple"?yield md(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>md(t,n,r.arrayChildren))):Promise.reject(jt.makeError("invalid value for array",V.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Fh(t,e,r){return sa(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=Jt(r.pop())),jt.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=kt({override:P0(t.signer,n.from),signer:t.signer.getAddress()}).then(f=>sa(this,void 0,void 0,function*(){return xe(f.signer)!==f.override&&jt.throwError("Contract with a Signer cannot override from",V.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),f.override})):n.from=t.signer.getAddress():n.from&&(n.from=P0(t.provider,n.from));const i=yield kt({args:md(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:kt(n)||{}}),s=t.interface.encodeFunctionData(e,i.args),o={data:s,to:i.address},a=i.overrides;if(a.nonce!=null&&(o.nonce=z.from(a.nonce).toNumber()),a.gasLimit!=null&&(o.gasLimit=z.from(a.gasLimit)),a.gasPrice!=null&&(o.gasPrice=z.from(a.gasPrice)),a.maxFeePerGas!=null&&(o.maxFeePerGas=z.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=z.from(a.maxPriorityFeePerGas)),a.from!=null&&(o.from=a.from),a.type!=null&&(o.type=a.type),a.accessList!=null&&(o.accessList=xa(a.accessList)),o.gasLimit==null&&e.gas!=null){let f=21e3;const c=Y(s);for(let u=0;un[f]!=null);return l.length&&jt.throwError(`cannot override ${l.map(f=>JSON.stringify(f)).join(",")}`,V.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),o})}function kU(t,e){return function(...r){return Fh(t,e,r)}}function _U(t,e){const r=t.signer||t.provider;return function(...n){return sa(this,void 0,void 0,function*(){r||jt.throwError("estimate require a provider or signer",V.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield Fh(t,e,n);return yield r.estimateGas(i)})}}function TU(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(i=>(i.events=i.logs.map(s=>{let o=Ii(s),a=null;try{a=t.interface.parseLog(s)}catch{}return a&&(o.args=a.args,o.decode=(l,f)=>t.interface.decodeEventLog(a.eventFragment,l,f),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 v7(t,e,r){const n=t.signer||t.provider;return function(...i){return sa(this,void 0,void 0,function*(){let s;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const l=Jt(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 Fh(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===V.errors.CALL_EXCEPTION&&(l.address=t.address,l.args=i,l.transaction=o),l}})}}function PU(t,e){return function(...r){return sa(this,void 0,void 0,function*(){t.signer||jt.throwError("sending a transaction requires a signer",V.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield Fh(t,e,r),i=yield t.signer.sendTransaction(n);return TU(t,i),i})}}function f6(t,e,r){return e.constant?v7(t,e,r):PU(t,e)}function y7(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 Bc{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 IU extends Bc{constructor(){super("error",null)}}class c6 extends Bc{constructor(e,r,n,i){const s={address:e};let o=r.getEventTopic(n);i?(o!==i[0]&&jt.throwArgumentError("topic mismatch","topics",i),s.topics=i.slice()):s.topics=[o],super(y7(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=vA(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class u6 extends Bc{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 RU{constructor(e,r,n){ee(this,"interface",ei(new.target,"getInterface")(r)),n==null?(ee(this,"provider",null),ee(this,"signer",null)):ss.isSigner(n)?(ee(this,"provider",n.provider||null),ee(this,"signer",n)):oo.isProvider(n)?(ee(this,"provider",n),ee(this,"signer",null)):jt.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,(...f)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,f)})),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]]):jt.warn(`Duplicate definition of ${a} (${l.join(", ")})`)})}if(ee(this,"_runningEvents",{}),ee(this,"_wrappedEmits",{}),e==null&&jt.throwArgumentError("invalid contract address or ENS name","addressOrName",e),ee(this,"address",e),this.provider)ee(this,"resolvedAddress",P0(this.provider,e));else try{ee(this,"resolvedAddress",Promise.resolve(xe(e)))}catch{jt.throwError("provider is required to use ENS name as contract address",V.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]){jt.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,f6(this,a,!0)),this.functions[o]==null&&ee(this.functions,o,f6(this,a,!1)),this.callStatic[o]==null&&ee(this.callStatic,o,v7(this,a,!0)),this.populateTransaction[o]==null&&ee(this.populateTransaction,o,kU(this,a)),this.estimateGas[o]==null&&ee(this.estimateGas,o,_U(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 Nm(e)}static getInterface(e){return xr.isInterface(e)?e:new xr(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"&&jt.throwError("contract not deployed",V.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||jt.throwError("sending a transactions require a signer",V.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=Jt(e||{});return["from","to"].forEach(function(n){r[n]!=null&&jt.throwError("cannot override "+n,V.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new Um(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 k0.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 IU);if(e==="event")return this._normalizeRunningEvent(new Bc("event",null));if(e==="*")return this._normalizeRunningEvent(new u6(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new c6(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 c6(this.address,this.interface,i,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new Bc(y7(r),r))}return this._normalizeRunningEvent(new u6(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=Ii(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||jt.throwError("events require a provider or a signer with a provider",V.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=Jt(i.filter);return typeof r=="string"&&Pe(r,32)?(n!=null&&jt.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 Zl extends RU{}class p7{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=Y(Lc(i,t,l));s||(s=h.length,c=new Uint8Array(s),o=Math.ceil(n/s),f=n-(o-1)*s),c.set(h);for(let g=1;g=256)throw new Error("Depth too large!");return v6(je([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",J(this.depth),this.parentFingerprint,Ue(J(this.index),4),this.chainCode,this.privateKey!=null?je(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new un(ka,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&~Ba));const n=new Uint8Array(37);if(e&Ba){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(Y(this.privateKey),1),r&&(r+="'")}else n.set(Y(this.publicKey));for(let u=24;u>=0;u-=8)n[33+(u>>3)]=e>>24-u&255;const i=Y(Dc(Ml.sha512,this.chainCode,n)),s=i.slice(0,32),o=i.slice(32);let a=null,l=null;this.privateKey?a=zu(z.from(s).add(this.privateKey).mod(FU)):l=new Wo(J(s))._addPoint(this.publicKey);let f=r;const c=this.mnemonic;return c&&(f=Object.freeze({phrase:c.phrase,path:r,locale:c.locale||"en"})),new un(ka,a,l,this.fingerprint,zu(o),e,this.depth+1,f)}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=Ba)throw new Error("invalid path index - "+s);n=n._derive(Ba+o)}else if(s.match(/^[0-9]+$/)){const o=parseInt(s);if(o>=Ba)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=Y(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=Y(Dc(Ml.sha512,jU,n));return new un(ka,zu(i.slice(0,32)),null,"0x00000000",zu(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=Km(n),e=jh(Fh(e,n),n),un._fromSeed(bA(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return un._fromSeed(e,null)}static fromExtendedKey(e){const r=Rl.decode(e);(r.length!==82||v6(r.slice(0,78))!==e)&&Lc.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=J(r.slice(5,9)),s=parseInt(J(r.slice(9,13)).substring(2),16),o=J(r.slice(13,45)),a=r.slice(45,78);switch(J(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new un(ka,null,J(a),i,o,s,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new un(ka,J(a.slice(1)),null,i,o,s,n,null)}return Lc.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function bA(t,e){e||(e="");const r=Le("mnemonic"+e,Ri.NFKD);return Gm(Le(t,Ri.NFKD),r,2048,64,"sha512")}function Fh(t,e){e=Km(e),Lc.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=Y(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let f=0;f>3]|=1<<7-i%8),i++}const s=32*r.length/3,o=r.length/3,a=xA(o);if((Y(ls(n.slice(0,s/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return J(n.slice(0,s/8))}function jh(t,e){if(e=Km(e),t=Y(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]&UU(8-n)),n+=3);const i=t.length/4,s=Y(ls(t))[0]&xA(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 Fh(t,e),!0}catch{}return!1}function VU(t){return(typeof t!="number"||t<0||t>=Ba||t%1)&&Lc.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const HU="random/5.7.0",dp=new V(HU);function WU(){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 y6=WU();let md=y6.crypto||y6.msCrypto;(!md||!md.getRandomValues)&&(dp.warn("WARNING: Missing strong random number source"),md={getRandomValues:function(t){return dp.throwError("no secure random source avaialble",V.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Ki(t){(t<=0||t>1024||t%1||t!=t)&&dp.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return md.getRandomValues(e),Y(e)}function qU(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 hp={},GU={get exports(){return hp},set exports(t){hp=t}};(function(t,e){(function(r){function n(b){return parseInt(b)===b}function i(b){if(!n(b.length))return!1;for(var d=0;d255)return!1;return!0}function s(b,d){if(b.buffer&&ArrayBuffer.isView(b)&&b.name==="Uint8Array")return d&&(b.slice?b=b.slice():b=Array.prototype.slice.call(b)),b;if(Array.isArray(b)){if(!i(b))throw new Error("Array contains invalid value: "+b);return new Uint8Array(b)}if(n(b.length)&&i(b))return new Uint8Array(b);throw new Error("unsupported array-like object")}function o(b){return new Uint8Array(b)}function a(b,d,_,N,p){(N!=null||p!=null)&&(b.slice?b=b.slice(N,p):b=Array.prototype.slice.call(b,N,p)),d.set(b,_)}var l=function(){function b(_){var N=[],p=0;for(_=encodeURI(_);p<_.length;){var B=_.charCodeAt(p++);B===37?(N.push(parseInt(_.substr(p,2),16)),p+=2):N.push(B)}return s(N)}function d(_){for(var N=[],p=0;p<_.length;){var B=_[p];B<128?(N.push(String.fromCharCode(B)),p++):B>191&&B<224?(N.push(String.fromCharCode((B&31)<<6|_[p+1]&63)),p+=2):(N.push(String.fromCharCode((B&15)<<12|(_[p+1]&63)<<6|_[p+2]&63)),p+=3)}return N.join("")}return{toBytes:b,fromBytes:d}}(),f=function(){function b(N){for(var p=[],B=0;B>4]+d[L&15])}return p.join("")}return{toBytes:b,fromBytes:_}}(),c={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],v=[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],x=[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],g=[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],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],E=[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],$=[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],j=[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],U=[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],W=[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 q(b){for(var d=[],_=0;_>2,this._Ke[B][d%4]=p[d],this._Kd[b-B][d%4]=p[d];for(var L=0,F=N,H;F<_;){if(H=p[N-1],p[0]^=h[H>>16&255]<<24^h[H>>8&255]<<16^h[H&255]<<8^h[H>>24&255]^u[L]<<24,L+=1,N!=8)for(var d=1;d>8&255]<<8^h[H>>16&255]<<16^h[H>>24&255]<<24;for(var d=N/2+1;d>2,K=F%4,this._Ke[Z][K]=p[d],this._Kd[b-Z][K]=p[d++],F++}for(var Z=1;Z>24&255]^j[H>>16&255]^U[H>>8&255]^W[H&255]},G.prototype.encrypt=function(b){if(b.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var d=this._Ke.length-1,_=[0,0,0,0],N=q(b),p=0;p<4;p++)N[p]^=this._Ke[0][p];for(var B=1;B>24&255]^g[N[(p+1)%4]>>16&255]^k[N[(p+2)%4]>>8&255]^w[N[(p+3)%4]&255]^this._Ke[B][p];N=_.slice()}for(var L=o(16),F,p=0;p<4;p++)F=this._Ke[d][p],L[4*p]=(h[N[p]>>24&255]^F>>24)&255,L[4*p+1]=(h[N[(p+1)%4]>>16&255]^F>>16)&255,L[4*p+2]=(h[N[(p+2)%4]>>8&255]^F>>8)&255,L[4*p+3]=(h[N[(p+3)%4]&255]^F)&255;return L},G.prototype.decrypt=function(b){if(b.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var d=this._Kd.length-1,_=[0,0,0,0],N=q(b),p=0;p<4;p++)N[p]^=this._Kd[0][p];for(var B=1;B>24&255]^E[N[(p+3)%4]>>16&255]^I[N[(p+2)%4]>>8&255]^M[N[(p+1)%4]&255]^this._Kd[B][p];N=_.slice()}for(var L=o(16),F,p=0;p<4;p++)F=this._Kd[d][p],L[4*p]=(v[N[p]>>24&255]^F>>24)&255,L[4*p+1]=(v[N[(p+3)%4]>>16&255]^F>>16)&255,L[4*p+2]=(v[N[(p+2)%4]>>8&255]^F>>8)&255,L[4*p+3]=(v[N[(p+1)%4]&255]^F)&255;return L};var re=function(b){if(!(this instanceof re))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new G(b)};re.prototype.encrypt=function(b){if(b=s(b),b.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var d=o(b.length),_=o(16),N=0;N=0;--d)this._counter[d]=b%256,b=b>>8},P.prototype.setBytes=function(b){if(b=s(b,!0),b.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=b},P.prototype.increment=function(){for(var b=15;b>=0;b--)if(this._counter[b]===255)this._counter[b]=0;else{this._counter[b]++;break}};var O=function(b,d){if(!(this instanceof O))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 G(b)};O.prototype.encrypt=function(b){for(var d=s(b,!0),_=0;_16)throw new Error("PKCS#7 padding byte out of range");for(var _=b.length-d,N=0;N=64;){let R=w,b=A,d=E,_=I,N=M,p=$,B=j,L=U,F,H,Z,K,X;for(H=0;H<16;H++)Z=m+H*4,W[H]=(O[Z]&255)<<24|(O[Z+1]&255)<<16|(O[Z+2]&255)<<8|O[Z+3]&255;for(H=16;H<64;H++)F=W[H-2],K=(F>>>17|F<<32-17)^(F>>>19|F<<32-19)^F>>>10,F=W[H-15],X=(F>>>7|F<<32-7)^(F>>>18|F<<32-18)^F>>>3,W[H]=(K+W[H-7]|0)+(X+W[H-16]|0)|0;for(H=0;H<64;H++)K=(((N>>>6|N<<32-6)^(N>>>11|N<<32-11)^(N>>>25|N<<32-25))+(N&p^~N&B)|0)+(L+(k[H]+W[H]|0)|0)|0,X=((R>>>2|R<<32-2)^(R>>>13|R<<32-13)^(R>>>22|R<<32-22))+(R&b^R&d^b&d)|0,L=B,B=p,p=N,N=_+K|0,_=d,d=b,b=R,R=K+X|0;w=w+R|0,A=A+b|0,E=E+d|0,I=I+_|0,M=M+N|0,$=$+p|0,j=j+B|0,U=U+L|0,m+=64,T-=64}}q(g);let G,re=g.length%64,D=g.length/536870912|0,y=g.length<<3,C=re<56?56:120,P=g.slice(g.length-re,g.length);for(P.push(128),G=re+1;G>>24&255),P.push(D>>>16&255),P.push(D>>>8&255),P.push(D>>>0&255),P.push(y>>>24&255),P.push(y>>>16&255),P.push(y>>>8&255),P.push(y>>>0&255),q(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,E>>>24&255,E>>>16&255,E>>>8&255,E>>>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,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255,j>>>24&255,j>>>16&255,j>>>8&255,j>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255]}function s(g,k,w){g=g.length<=64?g:i(g);const A=64+k.length+4,E=new Array(A),I=new Array(64);let M,$=[];for(M=0;M<64;M++)E[M]=54;for(M=0;M=A-4;U--){if(E[U]++,E[U]<=255)return;E[U]=0}}for(;w>=32;)j(),$=$.concat(i(I.concat(i(E)))),w-=32;return w>0&&(j(),$=$.concat(i(I.concat(i(E))).slice(0,w))),$}function o(g,k,w,A,E){let I;for(c(g,(2*w-1)*16,E,0,16),I=0;I<2*w;I++)f(g,I*16,E,16),l(E,A),c(E,0,g,k+I*16,16);for(I=0;I>>32-k}function l(g,k){c(g,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)g[w]+=k[w]}function f(g,k,w,A){for(let E=0;E=256)return!1}return!0}function h(g,k){if(typeof g!="number"||g%1)throw new Error("invalid "+k);return g}function v(g,k,w,A,E,I,M){if(w=h(w,"N"),A=h(A,"r"),E=h(E,"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/E)throw new Error("r too large");if(!u(g))throw new Error("password must be an array or buffer");if(g=Array.prototype.slice.call(g),!u(k))throw new Error("salt must be an array or buffer");k=Array.prototype.slice.call(k);let $=s(g,k,E*128*A);const j=new Uint32Array(E*32*A);for(let N=0;Nb&&(N=b);for(let B=0;Bb&&(N=b);for(let B=0;B>0&255),$.push(j[B]>>8&255),$.push(j[B]>>16&255),$.push(j[B]>>24&255);const p=s(g,$,I);return M&&M(null,1,p),p}M&&d(_)};if(!M)for(;;){const N=_();if(N!=null)return N}_()}const x={scrypt:function(g,k,w,A,E,I,M){return new Promise(function($,j){let U=0;M&&M(0),v(g,k,w,A,E,I,function(W,q,G){if(W)j(W);else if(G)M&&U!==1&&M(1),$(new Uint8Array(G));else if(M&&q!==U)return U=q,M(q)})})},syncScrypt:function(g,k,w,A,E,I){return new Uint8Array(v(g,k,w,A,E,I))}};t.exports=x})()})(XU);const Xm=vp;var ZU=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const yp=new V(wA);function p6(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class ez extends ga{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function tz(t,e,r){if(Ut(t,"crypto/cipher")==="aes-128-ctr"){const i=qo(Ut(t,"crypto/cipherparams/iv")),s=new bi.Counter(i),o=new bi.ModeOfOperation.ctr(e,s);return Y(o.decrypt(r))}return null}function AA(t,e){const r=qo(Ut(t,"crypto/ciphertext"));if(J(me(je([e.slice(16,32),r]))).substring(2)!==Ut(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const i=tz(t,e.slice(0,16),r);i||yp.throwError("unsupported cipher",V.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),xe(l)!==o)throw new Error("address mismatch")}const a={_isKeystoreAccount:!0,address:o,privateKey:J(i)};if(Ut(t,"x-ethers/version")==="0.1"){const l=qo(Ut(t,"x-ethers/mnemonicCiphertext")),f=qo(Ut(t,"x-ethers/mnemonicCounter")),c=new bi.Counter(f),u=new bi.ModeOfOperation.ctr(s,c),h=Ut(t,"x-ethers/path")||Nl,v=Ut(t,"x-ethers/locale")||"en",x=Y(u.decrypt(l));try{const g=jh(x,v),k=un.fromMnemonic(g,null,v).derivePath(h);if(k.privateKey!=a.privateKey)throw new Error("mnemonic mismatch");a.mnemonic=k.mnemonic}catch(g){if(g.code!==V.errors.INVALID_ARGUMENT||g.argument!=="wordlist")throw g}}return new ez(a)}function EA(t,e,r,n,i){return Y(Gm(t,e,r,n,i))}function rz(t,e,r,n,i){return Promise.resolve(EA(t,e,r,n,i))}function SA(t,e,r,n,i){const s=Jm(e),o=Ut(t,"crypto/kdf");if(o&&typeof o=="string"){const a=function(l,f){return yp.throwArgumentError("invalid key-derivation function parameters",l,f)};if(o.toLowerCase()==="scrypt"){const l=qo(Ut(t,"crypto/kdfparams/salt")),f=parseInt(Ut(t,"crypto/kdfparams/n")),c=parseInt(Ut(t,"crypto/kdfparams/r")),u=parseInt(Ut(t,"crypto/kdfparams/p"));(!f||!c||!u)&&a("kdf",o),f&f-1&&a("N",f);const h=parseInt(Ut(t,"crypto/kdfparams/dklen"));return h!==32&&a("dklen",h),n(s,l,f,c,u,64,i)}else if(o.toLowerCase()==="pbkdf2"){const l=qo(Ut(t,"crypto/kdfparams/salt"));let f=null;const c=Ut(t,"crypto/kdfparams/prf");c==="hmac-sha256"?f="sha256":c==="hmac-sha512"?f="sha512":a("prf",c);const u=parseInt(Ut(t,"crypto/kdfparams/c")),h=parseInt(Ut(t,"crypto/kdfparams/dklen"));return h!==32&&a("dklen",h),r(s,l,u,h,f)}}return yp.throwArgumentError("unsupported key-derivation function","kdf",o)}function nz(t,e){const r=JSON.parse(t),n=SA(r,e,EA,Xm.syncScrypt);return AA(r,n)}function iz(t,e,r){return ZU(this,void 0,void 0,function*(){const n=JSON.parse(t),i=yield SA(n,e,rz,Xm.scrypt,r);return AA(n,i)})}function sz(t,e,r,n){try{if(xe(t.address)!==qs(t.privateKey))throw new Error("address/privateKey mismatch");if(p6(t)){const k=t.mnemonic;if(un.fromMnemonic(k.phrase,null,k.locale).derivePath(k.path||Nl).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=Y(t.privateKey),s=Jm(e);let o=null,a=null,l=null;if(p6(t)){const k=t.mnemonic;o=Y(Fh(k.phrase,k.locale||"en")),a=k.path||Nl,l=k.locale||"en"}let f=r.client;f||(f="ethers.js");let c=null;r.salt?c=Y(r.salt):c=Ki(32);let u=null;if(r.iv){if(u=Y(r.iv),u.length!==16)throw new Error("invalid iv")}else u=Ki(16);let h=null;if(r.uuid){if(h=Y(r.uuid),h.length!==16)throw new Error("invalid uuid")}else h=Ki(16);let v=1<<17,x=8,g=1;return r.scrypt&&(r.scrypt.N&&(v=r.scrypt.N),r.scrypt.r&&(x=r.scrypt.r),r.scrypt.p&&(g=r.scrypt.p)),Xm.scrypt(s,c,v,x,g,64,n).then(k=>{k=Y(k);const w=k.slice(0,16),A=k.slice(16,32),E=k.slice(32,64),I=new bi.Counter(u),M=new bi.ModeOfOperation.ctr(w,I),$=Y(M.encrypt(i)),j=me(je([A,$])),U={address:t.address.substring(2).toLowerCase(),id:KU(h),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:J(u).substring(2)},ciphertext:J($).substring(2),kdf:"scrypt",kdfparams:{salt:J(c).substring(2),n:v,dklen:32,p:g,r:x},mac:j.substring(2)}};if(o){const W=Ki(16),q=new bi.Counter(W),G=new bi.ModeOfOperation.ctr(E,q),re=Y(G.encrypt(o)),D=new Date,y=D.getUTCFullYear()+"-"+yf(D.getUTCMonth()+1,2)+"-"+yf(D.getUTCDate(),2)+"T"+yf(D.getUTCHours(),2)+"-"+yf(D.getUTCMinutes(),2)+"-"+yf(D.getUTCSeconds(),2)+".0Z";U["x-ethers"]={client:f,gethFilename:"UTC--"+y+"--"+U.address,mnemonicCounter:J(W).substring(2),mnemonicCiphertext:J(re).substring(2),path:a,locale:l,version:"0.1"}}return JSON.stringify(U)})}function oz(t,e,r){if(Qm(t)){r&&r(0);const n=CA(t,e);return r&&r(1),Promise.resolve(n)}return Ym(t)?iz(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function az(t,e){if(Qm(t))return CA(t,e);if(Ym(t))return nz(t,e);throw new Error("invalid JSON wallet")}const lz="wallet/5.7.0";var g6=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const _a=new V(lz);function fz(t){return t!=null&&Pe(t.privateKey,32)&&t.address!=null}function cz(t){const e=t.mnemonic;return e&&e.phrase}let m6=class Da extends ss{constructor(e,r){if(super(),fz(e)){const n=new Wo(e.privateKey);if(ee(this,"_signingKey",()=>n),ee(this,"address",qs(this.publicKey)),this.address!==xe(e.address)&&_a.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),cz(e)){const i=e.mnemonic;ee(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||Nl,locale:i.locale||"en"}));const s=this.mnemonic,o=un.fromMnemonic(s.phrase,null,s.locale).derivePath(s.path);qs(o.privateKey)!==this.address&&_a.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else ee(this,"_mnemonic",()=>null)}else{if(Wo.isSigningKey(e))e.curve!=="secp256k1"&&_a.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 Wo(e);ee(this,"_signingKey",()=>n)}ee(this,"_mnemonic",()=>null),ee(this,"address",qs(this.publicKey))}r&&!oo.isProvider(r)&&_a.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 Da(this,e)}signTransaction(e){return kt(e).then(r=>{r.from!=null&&(xe(r.from)!==this.address&&_a.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);const n=this._signingKey().signDigest(me(up(r)));return up(r,n)})}signMessage(e){return g6(this,void 0,void 0,function*(){return tp(this._signingKey().signDigest(Oh(e)))})}_signTypedData(e,r,n){return g6(this,void 0,void 0,function*(){const i=yield qt.resolveNames(e,r,n,s=>(this.provider==null&&_a.throwError("cannot resolve ENS names without a provider",V.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:s}),this.provider.resolveName(s)));return tp(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={}),sz(this,e,r,n)}static createRandom(e){let r=Ki(16);e||(e={}),e.extraEntropy&&(r=Y(Lt(me(je([r,e.extraEntropy])),0,16)));const n=jh(r,e.locale);return Da.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return oz(e,r,n).then(i=>new Da(i))}static fromEncryptedJsonSync(e,r){return new Da(az(e,r))}static fromMnemonic(e,r,n){return r||(r=Nl),new Da(un.fromMnemonic(e,null,n).derivePath(r))}};function kA(t,e){return ia(Oh(t),e)}function uz(t,e,r,n){return ia(qt.hash(t,e,r),n)}const dz="networks/5.7.1",x6=new V(dz);function hz(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 P0(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return P0(t,n)},r}const b6={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:zi("homestead")},w6={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:zi("ropsten")},C6={chainId:63,name:"classicMordor",_defaultProvider:P0("https://www.ethercluster.com/mordor","classicMordor")},Vu={unspecified:{chainId:0,name:"unspecified"},homestead:b6,mainnet:b6,morden:{chainId:2,name:"morden"},ropsten:w6,testnet:w6,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:P0("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:C6,classicTestnet:C6,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:P0("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 vz(t){if(t==null)return null;if(typeof t=="number"){for(const n in Vu){const i=Vu[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=Vu[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=Vu[t.name];if(!e)return typeof t.chainId!="number"&&x6.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&x6.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(hz(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 yz="web/5.7.1";var pz=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};function gz(t,e){return pz(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:Y(new Uint8Array(i))}})}var mz=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const Wn=new V(yz);function A6(t){return new Promise(e=>{setTimeout(e,t)})}function As(t,e){if(t==null)return null;if(typeof t=="string")return t;if(is(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return ds(t)}catch{}return J(t)}return t}function xz(t){return Le(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function _A(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;Wn.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;Wn.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 f={method:"GET"};let c=!1,u=2*60*1e3;if(typeof t=="string")l=t;else if(typeof t=="object"){if((t==null||t.url==null)&&Wn.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&&(c=!0);if(f.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){l.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&Wn.throwError("basic authentication requires a secure https url",V.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:t.user,password:"[REDACTED]"});const w=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+Fm(Le(w))}}t.skipFetchSetup!=null&&(f.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(f.fetchOptions=Jt(t.fetchOptions))}const h=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),v=l?l.match(h):null;if(v)try{const w={statusCode:200,statusMessage:"OK",headers:{"content-type":v[1]||"text/plain"},body:v[2]?$m(v[3]):xz(v[3])};let A=w.body;return r&&(A=r(w.body,w)),Promise.resolve(A)}catch(w){Wn.throwError("processing response error",V.errors.SERVER_ERROR,{body:As(v[1],v[2]),error:w,requestBody:null,requestMethod:"GET",url:l})}e&&(f.method="POST",f.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 x={};Object.keys(a).forEach(w=>{const A=a[w];x[A.key]=A.value}),f.headers=x;const g=function(){let w=null;return{promise:new Promise(function(I,M){u&&(w=setTimeout(()=>{w!=null&&(w=null,M(Wn.makeError("timeout",V.errors.TIMEOUT,{requestBody:As(f.body,x["content-type"]),requestMethod:f.method,timeout:u,url:l})))},u))}),cancel:function(){w!=null&&(clearTimeout(w),w=null)}}}(),k=function(){return mz(this,void 0,void 0,function*(){for(let w=0;w=300)&&(g.cancel(),Wn.throwError("bad response",V.errors.SERVER_ERROR,{status:A.statusCode,headers:A.headers,body:As(E,A.headers?A.headers["content-type"]:null),requestBody:As(f.body,x["content-type"]),requestMethod:f.method,url:l})),r)try{const I=yield r(E,A);return g.cancel(),I}catch(I){if(I.throttleRetry&&w{let a=null;if(s!=null)try{a=JSON.parse(ds(s))}catch(l){Wn.throwError("invalid JSON",V.errors.SERVER_ERROR,{body:s,error:l})}return r&&(a=r(a,o)),a},i=null;if(e!=null){i=Le(e);const s=typeof t=="string"?{url:t}:Jt(t);s.headers?Object.keys(s.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(s.headers=Jt(s.headers),s.headers["content-type"]="application/json"):s.headers={"content-type":"application/json"},t=s}return _A(t,i,n)}function Fo(t,e){return e||(e={}),e=Jt(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 f(){return t().then(function(c){if(c!==void 0)o()&&r(c);else if(e.oncePoll)e.oncePoll.once("poll",f);else if(e.onceBlock)e.onceBlock.once("block",f);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(f,u)}return null},function(c){o()&&n(c)})}f()})}var I0="qpzry9x8gf2tvdw0s3jn54khce6mua7l",pp={};for(var Hu=0;Hu>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 TA(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=ul(e)^n>>5}for(e=ul(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=TA(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=ul(n)^o,i+=I0.charAt(o)}for(s=0;s<6;++s)n=ul(n);for(n^=1,s=0;s<6;++s){var a=n>>(5-s)*5&31;i+=I0.charAt(a)}return i}function PA(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=TA(s);if(typeof a=="string")return a;for(var l=[],f=0;f=o.length)&&l.push(u)}return a!==1?"Invalid checksum for "+t:{prefix:s,words:l}}function wz(){var t=PA.apply(null,arguments);if(typeof t=="object")return t}function Cz(t){var e=PA.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Uh(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:f,accessList:ae.allowNull(this.accessList.bind(this),null),blockHash:ae.allowNull(o,null),blockNumber:ae.allowNull(l,null),transactionIndex:ae.allowNull(l,null),confirmations:ae.allowNull(l,null),from:r,gasPrice:ae.allowNull(n),maxPriorityFeePerGas:ae.allowNull(n),maxFeePerGas:ae.allowNull(n),gasLimit:n,to:ae.allowNull(r,null),value:n,nonce:l,data:s,r:ae.allowNull(this.uint256),s:ae.allowNull(this.uint256),v:ae.allowNull(l),creates:ae.allowNull(r,null),raw:ae.allowNull(s)},e.transactionRequest={from:ae.allowNull(r),nonce:ae.allowNull(l),gasLimit:ae.allowNull(n),gasPrice:ae.allowNull(n),maxPriorityFeePerGas:ae.allowNull(n),maxFeePerGas:ae.allowNull(n),to:ae.allowNull(r),value:ae.allowNull(n),data:ae.allowNull(c),type:ae.allowNull(l),accessList:ae.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:o,address:r,topics:ae.arrayOf(o),data:s,logIndex:l,blockHash:o},e.receipt={to:ae.allowNull(this.address,null),from:ae.allowNull(this.address,null),contractAddress:ae.allowNull(r,null),transactionIndex:l,root:ae.allowNull(a),gasUsed:n,logsBloom:ae.allowNull(s),blockHash:o,transactionHash:o,logs:ae.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:ae.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:ae.allowNull(n),status:ae.allowNull(l),type:f},e.block={hash:ae.allowNull(o),parentHash:o,number:l,timestamp:l,nonce:ae.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:ae.allowNull(r),extraData:s,transactions:ae.allowNull(ae.arrayOf(o)),baseFeePerGas:ae.allowNull(n)},e.blockWithTransactions=Jt(e.block),e.blockWithTransactions.transactions=ae.allowNull(ae.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:ae.allowNull(i,void 0),toBlock:ae.allowNull(i,void 0),blockHash:ae.allowNull(o,void 0),address:ae.allowNull(r,void 0),topics:ae.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:ae.allowNull(l),blockHash:ae.allowNull(o),transactionIndex:l,removed:ae.allowNull(this.boolean.bind(this)),address:r,data:ae.allowFalsish(s,"0x"),topics:ae.arrayOf(o),transactionHash:o,logIndex:l},e}accessList(e){return xa(e||[])}number(e){return e==="0x"?0:z.from(e).toNumber()}type(e){return e==="0x"||e==null?0:z.from(e).toNumber()}bigNumber(e){return z.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():pf.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 xe(e)}callAddress(e){if(!Pe(e,32))return null;const r=xe(Lt(e,12));return r===w7?null:r}contractAddress(e){return Nm(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 Yc(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return Pi(n)!==32?pf.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=z.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!Pe(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=ae.check(r,e);return i._difficulty=n==null?null:z.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return ae.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&z.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=ae.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;Pe(n)&&(n=z.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),Pe(n)&&(n=z.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 hA(e)}receiptLog(e){return ae.check(this.formats.receiptLog,e)}receipt(e){const r=ae.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=z.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&pf.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):pf.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&pf.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 ae.check(this.formats.filter,e)}filterLog(e){return ae.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 be=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const Ee=new V(ru),_z=10;function S6(t){return t==null?"null":(Pi(t)!==32&&Ee.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function k6(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[S6(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return S6(e)}).join("&")}function Tz(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 Ta(t){if(typeof t=="string"){if(t=t.toLowerCase(),Pi(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+k6(t);if(IF.isForkEvent(t))throw Ee.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+k6(t.topics||[])}throw new Error("invalid event - "+t)}function gf(){return new Date().getTime()}function _6(t){return new Promise(e=>{setTimeout(e,t)})}const Pz=["block","network","pending","poll"];let Iz=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=Tz(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||Pz.indexOf(this.tag)>=0}};const Rz={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 Cv(t){return Ue(z.from(t).toHexString(),32)}function T6(t){return Rl.encode(je([t,Lt(ls(ls(t)),0,4)]))}const IA=new RegExp("^(ipfs)://(.*)$","i"),P6=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),IA,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function xd(t,e){try{return ds($c(t,e))}catch{}return null}function $c(t,e){if(t==="0x")return null;const r=z.from(Lt(t,e,e+32)).toNumber(),n=z.from(Lt(t,r,r+32)).toNumber();return Lt(t,r+32,r+32+n)}function Av(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Ee.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function I6(t){const e=Y(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 Mz(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function RA(t){const e=[];let r=0;for(let n=0;nz.from(e).eq(1)).catch(e=>{if(e.code===V.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return be(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Ur([e,qf(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=Ur(["0x9061b923",RA([O7(this.name),n.data])]));try{let s=yield this.provider.call(n);return Y(s).length%32===4&&Ee.throwError("resolver threw error",V.errors.CALL_EXCEPTION,{transaction:n,data:s}),i&&(s=$c(s,0)),s}catch(s){if(s.code===V.errors.CALL_EXCEPTION)return null;throw s}})}_fetchBytes(e,r){return be(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?$c(n,0):null})}_getAddress(e,r){const n=Rz[String(e)];if(n==null&&Ee.throwError(`unsupported coin type: ${e}`,V.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=Y(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 T6(je([[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 T6(je([[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=E6.toWords(i.slice(2));return a.unshift(o),E6.encode(n.prefix,a)}}return null}getAddress(e){return be(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===C0?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===V.errors.CALL_EXCEPTION)return null;throw i}const r=yield this._fetchBytes("0xf1cb7e06",Cv(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&Ee.throwError("invalid or unsupported coin data",V.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return be(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 Ee.throwError("invalid or unsupported content hash data",V.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return be(this,void 0,void 0,function*(){let r=Le(e);r=je([Cv(64),Cv(r.length),r]),r.length%32!==0&&(r=je([r,Ue("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",J(r));return n==null||n==="0x"?null:ds(n)})}}let Ev=null,Nz=1;class MA extends oo{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=ei(new.target,"getNetwork")(e);r?(ee(this,"_network",r),this.emit("network",r,null)):Ee.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return be(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||Ee.throwError("no network detected",V.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 Fo(()=>this._ready().then(e=>e,e=>{if(!(e.code===V.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Ev==null&&(Ev=new ae),Ev}static getNetwork(e){return vz(e??"homestead")}ccipReadFetch(e,r,n){return be(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 tu({url:f,errorPassThrough:!0},c,(v,x)=>(v.status=x.statusCode,v));if(u.data)return u.data;const h=u.message||"unknown error";if(u.status>=400&&u.status<500)return Ee.throwError(`response not found during CCIP fetch: ${h}`,V.errors.SERVER_ERROR,{url:l,errorMessage:h});o.push(h)}return Ee.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,V.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return be(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(gf()-s.respTime<=e)return s.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=gf(),n=kt({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=gf();return i=z.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return be(this,void 0,void 0,function*(){const e=Nz++,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)Ee.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",Ee.makeError("network block skew detected",V.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(f=>{f.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=f.blockNumber),this._emitted["b:"+f.blockHash]=f.blockNumber,this._emitted["t:"+f.transactionHash]=f.blockNumber,this.emit(s,f)})}).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 be(this,void 0,void 0,function*(){return Ee.throwError("provider does not support network detection",V.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return be(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 _6(0),this._network;const n=Ee.makeError("underlying network changed",V.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=gf();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 be(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return be(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 f=!1;const c=function(){return f?!0:(f=!0,l.forEach(h=>{h()}),!1)},u=h=>{h.confirmations{this.removeListener(e,u)}),i){let h=i.startBlock,v=null;const x=g=>be(this,void 0,void 0,function*(){f||(yield _6(1e3),this.getTransactionCount(i.from).then(k=>be(this,void 0,void 0,function*(){if(!f){if(k<=i.nonce)h=g;else{{const w=yield this.getTransaction(e);if(w&&w.blockNumber!=null)return}for(v==null&&(v=h-3,v{f||this.once("block",x)}))});if(f)return;this.once("block",x),l.push(()=>{this.removeListener("block",x)})}if(typeof n=="number"&&n>0){const h=setTimeout(()=>{c()||a(Ee.makeError("timeout exceeded",V.errors.TIMEOUT,{timeout:n}))},n);h.unref&&h.unref(),l.push(()=>{clearTimeout(h)})}})})}getBlockNumber(){return be(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return be(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return z.from(e)}catch(r){return Ee.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return be(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield kt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return z.from(i)}catch(s){return Ee.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:s})}})}getTransactionCount(e,r){return be(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield kt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return z.from(i).toNumber()}catch(s){return Ee.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:s})}})}getCode(e,r){return be(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield kt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return J(i)}catch(s){return Ee.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:s})}})}getStorageAt(e,r,n){return be(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield kt({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>Yc(o))}),s=yield this.perform("getStorageAt",i);try{return J(s)}catch(o){return Ee.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:s,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&Pi(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&Ee.throwError("Transaction hash mismatch from Provider.sendTransaction.",V.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(s,o)=>be(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&&Ee.throwError("transaction failed",V.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return be(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(s=>J(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 be(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?z.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?J(s):null))}),this.formatter.transactionRequest(yield kt(n))})}_getFilter(e){return be(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 kt(r))})}_call(e,r,n){return be(this,void 0,void 0,function*(){n>=_z&&Ee.throwError("CCIP read exceeded maximum redirections",V.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"&&Pi(s)%32===4)try{const o=Lt(s,4),a=Lt(o,0,32);z.from(a).eq(i)||Ee.throwError("CCIP Read sender did not match",V.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:s});const l=[],f=z.from(Lt(o,32,64)).toNumber(),c=z.from(Lt(o,f,f+32)).toNumber(),u=Lt(o,f+32);for(let w=0;wbe(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 be(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return Fo(()=>be(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 be(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return Fo(()=>be(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 be(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield kt({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),ae.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return be(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return be(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&Ee.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 be(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 gp(this,n,e);return r!==e&&!(yield i.supportsWildcard())?null:i}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return be(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||Ee.throwError("network does not support ENS",V.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+qf(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return be(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"&&Ee.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return be(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=xd(yield this.call({to:n,data:"0x691f3431"+qf(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return be(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 gp(this,o,s);try{const a=yield r.getAvatar();if(a)return a.url}catch(a){if(a.code!==V.errors.CALL_EXCEPTION)throw a}try{const a=xd(yield this.call({to:o,data:"0x691f3431"+qf(s).substring(2)}),0);r=yield this.getResolver(a)}catch(a){if(a.code!==V.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 Ee.throwError(e+" not implemented",V.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 Iz(Ta(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=Ta(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=Ta(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=Ta(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=Ta(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=Ta(e);this._events=this._events.filter(i=>i.tag!==n?!0:(r.push(i),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var ji=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const Gt=new V(ru),Oz=["call","estimateGas"];function Kf(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=Kf(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return Kf(JSON.parse(t),e)}catch{}return null}function NA(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const s=Kf(e,!0);if(s)return s.data;Gt.throwError("missing revert data in call exception; Transaction reverted without a reason string",V.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let s=Kf(e.body,!1);s==null&&(s=Kf(e,!1)),s&&Gt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",V.errors.UNPREDICTABLE_GAS_LIMIT,{reason:s.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===V.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)&&Gt.throwError("insufficient funds for intrinsic transaction cost",V.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&Gt.throwError("nonce has already been used",V.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Gt.throwError("replacement fee too low",V.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&Gt.throwError("legacy pre-eip-155 transactions not supported",V.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),Oz.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Gt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",V.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function R6(t){return new Promise(function(e){setTimeout(e,t)})}function Bz(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 mf(t){return t&&t.toLowerCase()}const mp={};class OA extends ss{constructor(e,r,n){if(super(),e!==mp)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)):Gt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Gt.throwError("cannot alter JSON-RPC Signer connection",V.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Dz(mp,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&&Gt.throwError("unknown account #"+this._index,V.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Jt(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=Jt(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>ji(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&Gt.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),kt({tx:kt(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Gt.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)&&Gt.throwError("user rejected transaction",V.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),NA("sendTransaction",o,s)))})}signTransaction(e){return Gt.throwError("signing transactions is unsupported",V.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return ji(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 Fo(()=>ji(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 ji(this,void 0,void 0,function*(){const r=typeof e=="string"?Le(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[J(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Gt.throwError("user rejected signing",V.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return ji(this,void 0,void 0,function*(){const r=typeof e=="string"?Le(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),J(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Gt.throwError("user rejected signing",V.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return ji(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)&&Gt.throwError("user rejected signing",V.errors.ACTION_REJECTED,{action:"_signTypedData",from:s,messageData:{domain:i.domain,types:r,value:i.value}}),o}})}unlock(e){return ji(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}let Dz=class extends OA{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 Lz={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let ba=class extends MA{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=ei(this.constructor,"defaultUrl")()),typeof e=="string"?ee(this,"connection",Object.freeze({url:e})):ee(this,"connection",Object.freeze(Jt(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 ji(this,void 0,void 0,function*(){yield R6(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=ei(this.constructor,"getNetwork");try{return r(z.from(e).toNumber())}catch(n){return Gt.throwError("could not detect network",V.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Gt.throwError("could not detect network",V.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new OA(mp,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:Ii(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const s=tu(this.connection,JSON.stringify(n),Bz).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",[mf(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[mf(r.address),r.blockTag]];case"getCode":return["eth_getCode",[mf(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[mf(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",[ei(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[ei(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=mf(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return ji(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=r.transaction;if(i&&i.type!=null&&z.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const s=yield this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(r=Jt(r),r.transaction=Jt(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&Gt.throwError(e+" not implemented",V.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return NA(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 R6(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=Jt(Lz);if(r)for(const s in r)r[s]&&(n[s]=!0);Rh(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(s){if(e[s]==null)return;const o=Yc(z.from(e[s]));s==="gasLimit"&&(s="gas"),i[s]=o}),["from","to","data"].forEach(function(s){e[s]!=null&&(i[s]=J(e[s]))}),e.accessList&&(i.accessList=xa(e.accessList)),i}};var $z=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const Fz=new V(ru);class R0 extends ba{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return $z(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||Fz.throwError("no network detected",V.errors.UNKNOWN_ERROR,{}),this._network==null&&(ee(this,"_network",r),this.emit("network",r,null))),r})}}const M6=new V(ru);let jz=1;function N6(t,e){const r="Web3LegacyFetcher";return function(n,i){const s={method:n,params:i,id:jz++,jsonrpc:"2.0"};return new Promise((o,a)=>{this.emit("debug",{action:"request",fetcher:r,request:Ii(s),provider:this}),e(s,(l,f)=>{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:f,provider:this}),f.error){const c=new Error(f.error.message);return c.code=f.error.code,c.data=f.error.data,a(c)}o(f.result)})})}}function Uz(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:Ii(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})}}let zz=class extends ba{constructor(e,r){e==null&&M6.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=Uz(e)):e.sendAsync?i=N6(e,e.sendAsync.bind(e)):e.send?i=N6(e,e.send.bind(e)):M6.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 Vz="solidity/5.7.0",Hz=new RegExp("^bytes([0-9]+)$"),Wz=new RegExp("^(u?int)([0-9]*)$"),qz=new RegExp("^(.*)\\[([0-9]*)\\]$"),Gz="0000000000000000000000000000000000000000000000000000000000000000",La=new V(Vz);function BA(t,e,r){switch(t){case"address":return r?Vf(e,32):Y(e);case"string":return Le(e);case"bytes":return Y(e);case"bool":return e=e?"0x01":"0x00",r?Vf(e,32):Y(e)}let n=t.match(Wz);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&La.throwArgumentError("invalid number type","type",t),r&&(i=256),e=z.from(e).toTwos(i),Vf(e,i/8)}if(n=t.match(Hz),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&La.throwArgumentError("invalid bytes type","type",t),Y(e).byteLength!==i&&La.throwArgumentError(`invalid value for ${t}`,"value",e),r?Y((e+Gz).substring(0,66)):e}if(n=t.match(qz),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&La.throwArgumentError(`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(BA(i,a,!0))}),je(o)}return La.throwArgumentError("invalid type","type",t)}function Ae(t,e){t.length!=e.length&&La.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(BA(n,e[i]))}),J(je(r))}function Zi(t,e){return me(Ae(t,e))}function Kz(t,e){return ls(Ae(t,e))}const Jz="units/5.7.0",DA=new V(Jz),LA=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Qz(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&DA.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 $A(t,e){if(typeof e=="string"){const r=LA.indexOf(e);r!==-1&&(e=3*r)}return hd(t,e??18)}function M0(t,e){if(typeof t!="string"&&DA.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=LA.indexOf(e);r!==-1&&(e=3*r)}return ci(t,e??18)}function Yz(t){return $A(t,18)}function xp(t){return M0(t,18)}const Xz=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:Lm,ConstructorFragment:Xn,ErrorFragment:Hi,EventFragment:gi,FormatTypes:Oe,Fragment:xi,FunctionFragment:Zn,HDNode:un,Indexed:S0,Interface:xr,LogDescription:$7,Logger:V,ParamType:ir,RLP:a$,SigningKey:Wo,get SupportedAlgorithm(){return Ml},TransactionDescription:F7,get TransactionTypes(){return cp},get UnicodeNormalizationForm(){return Ri},Utf8ErrorFuncs:k7,get Utf8ErrorReason(){return Yr},_TypedDataEncoder:qt,_fetchData:_A,_toEscapedUtf8String:_$,accessListify:xa,arrayify:Y,base58:Rl,base64:q$,checkProperties:Rh,checkResultErrors:v7,commify:Qz,computeAddress:qs,computeHmac:Dc,computePublicKey:Wm,concat:je,deepCopy:Ii,defaultAbiCoder:qr,defaultPath:Nl,defineReadOnly:ee,dnsEncode:O7,entropyToMnemonic:jh,fetchJson:tu,formatBytes32String:T$,formatEther:Yz,formatUnits:$A,getAccountPath:VU,getAddress:xe,getContractAddress:Nm,getCreate2Address:h$,getIcapAddress:d$,getJsonWalletAddress:YU,getStatic:ei,hashMessage:Oh,hexConcat:Ur,hexDataLength:Pi,hexDataSlice:Lt,hexStripZeros:s7,hexValue:Yc,hexZeroPad:Ue,hexlify:J,id:Bs,isAddress:u$,isBytes:cs,isBytesLike:is,isHexString:Pe,isValidMnemonic:zU,isValidName:pF,joinSignature:tp,keccak256:me,mnemonicToEntropy:Fh,mnemonicToSeed:bA,namehash:qf,nameprep:z$,parseBytes32String:P$,parseEther:xp,parseTransaction:hA,parseUnits:M0,poll:Fo,randomBytes:Ki,recoverAddress:ia,recoverPublicKey:lA,resolveProperties:kt,ripemd160:gA,serializeTransaction:up,sha256:ls,sha512:NU,shallowCopy:Jt,shuffled:qU,solidityKeccak256:Zi,solidityPack:Ae,soliditySha256:Kz,splitSignature:pa,stripZeros:Ei,toUtf8Bytes:Le,toUtf8CodePoints:A0,toUtf8String:ds,verifyMessage:kA,verifyTypedData:uz,zeroPad:Vf},Symbol.toStringTag,{value:"Module"})),Zz=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var eV=Object.freeze({__proto__:null,abi:Zz});const tV=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],rV={isValidSignatureBytes32:"0x1626ba7e"};var nV=Object.freeze({__proto__:null,abi:tV,returns:rV});const iV=[{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 sV=Object.freeze({__proto__:null,abi:iV});const oV=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var aV=Object.freeze({__proto__:null,abi:oV});const lV=[{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"}];var fV=Object.freeze({__proto__:null,abi:lV});const cV=[{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 uV=Object.freeze({__proto__:null,abi:cV});const dV=[{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 hV=Object.freeze({__proto__:null,abi:dV});const vV=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var yV=Object.freeze({__proto__:null,abi:vV});const Mr={erc6492:sV,erc5719:eV,erc1271:nV,factory:aV,mainModule:fV,mainModuleUpgradable:uV,sequenceUtils:hV,requireFreshSigner:yV},pV=Object.freeze(Object.defineProperty({__proto__:null,walletContracts:Mr},Symbol.toStringTag,{value:"Module"}));function N0(){return N0=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:N0({},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}),O6=typeof global=="object"?global.fetch:window.fetch;class bd extends FA{constructor(e,r){super(e.endsWith("/")?e.slice(0,-1):e,O6),this._fetch=(n,i)=>{const s={};return this.jwtAuth&&this.jwtAuth.length>0&&(s.Authorization=`BEARER ${this.jwtAuth}`),i.headers=N0({},i.headers,s),O6(n,i)},this.jwtAuth=r,this.fetch=this._fetch}}const AV=Object.freeze(Object.defineProperty({__proto__:null,API:FA,SequenceAPIClient:bd,SmartRampOrderStatus:bV,SmartRampTxnStatus:wV,SortOrder:CV,WebRPCSchemaHash:xV,WebRPCSchemaVersion:mV,WebRPCVersion:gV},Symbol.toStringTag,{value:"Module"})),jA="3.7.5",EV=jA,SV=typeof atob=="function",kV=typeof btoa=="function",Zl=typeof Buffer=="function",B6=typeof TextDecoder=="function"?new TextDecoder:void 0,D6=typeof TextEncoder=="function"?new TextEncoder:void 0,_V="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Ef=Array.prototype.slice.call(_V),Wu=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(Ef),TV=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,pr=String.fromCharCode.bind(String),L6=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),UA=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),zA=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),VA=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+=Ef[e>>18&63]+Ef[e>>12&63]+Ef[e>>6&63]+Ef[e&63]}return o?s.slice(0,o-3)+"===".substring(o):s},Zm=kV?t=>btoa(t):Zl?t=>Buffer.from(t,"binary").toString("base64"):VA,bp=Zl?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,i=t.length;ne?UA(bp(t)):bp(t),PV=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?pr(192|e>>>6)+pr(128|e&63):pr(224|e>>>12&15)+pr(128|e>>>6&63)+pr(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return pr(240|e>>>18&7)+pr(128|e>>>12&63)+pr(128|e>>>6&63)+pr(128|e&63)}},IV=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,HA=t=>t.replace(IV,PV),$6=Zl?t=>Buffer.from(t,"utf8").toString("base64"):D6?t=>bp(D6.encode(t)):t=>Zm(HA(t)),dl=(t,e=!1)=>e?UA($6(t)):$6(t),F6=t=>dl(t,!0),RV=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,MV=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 pr((r>>>10)+55296)+pr((r&1023)+56320);case 3:return pr((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return pr((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},WA=t=>t.replace(RV,MV),qA=t=>{if(t=t.replace(/\s+/g,""),!TV.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?pr(e>>16&255,e>>8&255):pr(e>>16&255,e>>8&255,e&255);return r},ex=SV?t=>atob(zA(t)):Zl?t=>Buffer.from(t,"base64").toString("binary"):qA,GA=Zl?t=>L6(Buffer.from(t,"base64")):t=>L6(ex(t).split("").map(e=>e.charCodeAt(0))),KA=t=>GA(JA(t)),NV=Zl?t=>Buffer.from(t,"base64").toString("utf8"):B6?t=>B6.decode(GA(t)):t=>WA(ex(t)),JA=t=>zA(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),wp=t=>NV(JA(t)),OV=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)},QA=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),YA=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,QA(r));t("fromBase64",function(){return wp(this)}),t("toBase64",function(e){return dl(this,e)}),t("toBase64URI",function(){return dl(this,!0)}),t("toBase64URL",function(){return dl(this,!0)}),t("toUint8Array",function(){return KA(this)})},XA=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,QA(r));t("toBase64",function(e){return wd(this,e)}),t("toBase64URI",function(){return wd(this,!0)}),t("toBase64URL",function(){return wd(this,!0)})},BV=()=>{YA(),XA()},oa={version:jA,VERSION:EV,atob:ex,atobPolyfill:qA,btoa:Zm,btoaPolyfill:VA,fromBase64:wp,toBase64:dl,encode:dl,encodeURI:F6,encodeURL:F6,utob:HA,btou:WA,decode:wp,isValid:OV,fromUint8Array:wd,toUint8Array:KA,extendString:YA,extendUint8Array:XA,extendBuiltins:BV};var Cp=function(){return Cp=Object.assign||function(e){for(var r,n=1,i=arguments.length;n0&&s[s.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!s||f[1]>s[0]&&f[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}(),LV=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}},$V=function(t,e,r){return Ro(void 0,void 0,void 0,function(){var n,i;return Mo(this,function(s){return n=r.messageDigest(),i=kA(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}]})})},FV=function(t,e,r){return Ro(void 0,void 0,void 0,function(){var n,i,s,o,a;return Mo(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 Xl(r.address,s,t),[4,o.isValidSignature(n,Y(r.signature))];case 2:return a=l.sent(),a===jV?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},jV="0x1626ba7e",ZA="1",Ap="eth",UV={name:"ETHAuth",version:ZA},O0=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),Ro(n,void 0,void 0,function(){var o,a,l,f,c,u,h,v,x,g;return Mo(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],f=o[2],c=o[3],u=o[4],a!==Ap)throw new Error("ethauth: not an ethauth proof");return h=oa.decode(f),v=JSON.parse(h),x=new tx({address:l,claims:v,signature:c,extra:u}),[4,this.validateProof(x,s)];case 1:if(g=k.sent(),!g)throw new Error("ethauth: proof is invalid");return[2,x]}})})},this.validateProof=function(i,s){return s===void 0&&(s=!1),Ro(n,void 0,void 0,function(){var o,a;return Mo(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 Ro(n,void 0,void 0,function(){var s,l,o,a,l;return Mo(this,function(f){switch(f.label){case 0:s=[],l=0,f.label=1;case 1:if(!(loa.encode(t,!0),rx=t=>oa.encode(JSON.stringify(t),!0),VV=t=>{if(t!=null)return oa.decode(t)},nx=t=>{if(t!=null)return JSON.parse(oa.decode(t))};function eE(t){return t!=null&&(z.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Pe(t)||typeof t=="bigint"||cs(t))}const ix=t=>Y(me(typeof t=="string"?Le(t):t)),tE=(t,e,r)=>Ae(["string","uint256","address","bytes32"],["",e,t,r]),Ep=(t,e,r)=>me(tE(t,e,r)),rE=()=>typeof window>"u"&&typeof process=="object",HV=()=>!rE(),nE=t=>{const e=t.split(".");if(e.length!==3)throw new Error("invalid jwt");return JSON.parse(oa.decode(e[1]))};function B0(){return B0=Object.assign?Object.assign.bind():function(t){for(var e=1;efe.configure(t),Ol=t=>({url:t,skipFetchSetup:!0,fetchOptions:{mode:"cors",cache:"force-cache",credentials:"same-origin",redirect:"follow",referrer:"client"}});let qV=class{constructor(){this.cache=new Map}do(e,r,n,...i){e=`${e}:${me(Le(JSON.stringify(i,GV)))}`;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 GV(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function sx(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 KV(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function JV(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 ox=(t=0,e=Number.MAX_SAFE_INTEGER)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),sE=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},oE=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},aE=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},QV=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),lE=t=>{const e=B0({},t.types);return delete e.EIP712Domain,qt.hash(t.domain,e,t.message)},zh=t=>Y(lE(t)),{defineReadOnly:YV,getStatic:XV,resolveProperties:Sp,checkProperties:ZV,shallowCopy:D0,deepCopy:eH}=Xz,tH=t=>t.replace(/([^:]\/)\/+/g,"$1"),rH=Object.freeze(Object.defineProperty({__proto__:null,Logger:iE,PromiseCache:qV,base64Decode:VV,base64DecodeObject:nx,base64Encode:zV,base64EncodeObject:rx,checkProperties:ZV,configureLogger:WV,deepCopy:eH,defineReadOnly:YV,encodeMessageDigest:ix,encodeTypedDataDigest:zh,encodeTypedDataHash:lE,getDefaultConnectionInfo:Ol,getRandomInt:ox,getStatic:XV,isBigNumberish:eE,isBrowser:HV,isNode:rE,jwtDecodeClaims:nE,logger:fe,packMessageData:tE,promisify:sx,queryStringFromObject:KV,queryStringToObject:JV,resolveProperties:Sp,sanitizeAlphanumeric:oE,sanitizeHost:aE,sanitizeNumberString:sE,shallowCopy:D0,sleep:QV,subDigestOf:Ep,urlClean:tH},Symbol.toStringTag,{value:"Module"}));function Vt(){return Vt=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="number"?t:t.chainId?t.chainId:z.from(t).toNumber(),Sn=t=>{if(t)return ax(t)},fE=(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(f=>f.chainId).sort(),s=i.filter((f,c)=>i.indexOf(f)!==c);if(s.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${s}`);return!1}n.forEach(f=>f.name=f.name.toLowerCase());const o=n.map(f=>f.name).sort(),a=o.filter((f,c)=>o.indexOf(f)!==c);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let f=0;f(fE(t,!0,e),t),iH=(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},cE=(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)}},uE=t=>lx(fx(t)),Vi=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=z.from(e).toNumber();return t.find(n=>n.chainId===r)}else return t.find(r=>r.name===e||`${r.chainId}`===e);else return typeof e=="number"?t.find(r=>r.chainId===e):e.chainId?t.find(r=>r.chainId===e.chainId):void 0},sH=(t,e)=>t?t.name===e||t.chainId===e:!1,oH=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},Vh=(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})):"";let se=function(t){return t[t.MAINNET=1]="MAINNET",t[t.ROPSTEN=3]="ROPSTEN",t[t.RINKEBY=4]="RINKEBY",t[t.GOERLI=5]="GOERLI",t[t.KOVAN=42]="KOVAN",t[t.POLYGON=137]="POLYGON",t[t.POLYGON_MUMBAI=80001]="POLYGON_MUMBAI",t[t.POLYGON_ZKEVM=1101]="POLYGON_ZKEVM",t[t.BSC=56]="BSC",t[t.BSC_TESTNET=97]="BSC_TESTNET",t[t.OPTIMISM=10]="OPTIMISM",t[t.OPTIMISM_TESTNET=69]="OPTIMISM_TESTNET",t[t.ARBITRUM=42161]="ARBITRUM",t[t.ARBITRUM_GOERLI=421613]="ARBITRUM_GOERLI",t[t.ARBITRUM_NOVA=42170]="ARBITRUM_NOVA",t[t.AVALANCHE=43114]="AVALANCHE",t[t.AVALANCHE_TESTNET=43113]="AVALANCHE_TESTNET",t[t.FANTOM=250]="FANTOM",t[t.FANTOM_TESTNET=4002]="FANTOM_TESTNET",t[t.GNOSIS=100]="GNOSIS",t[t.AURORA=1313161554]="AURORA",t[t.AURORA_TESTNET=1313161556]="AURORA_TESTNET",t[t.BASE_GOERLI=84531]="BASE_GOERLI",t[t.HARDHAT=31337]="HARDHAT",t[t.HARDHAT_2=31338]="HARDHAT_2",t[t.HOMEVERSE_TESTNET=40875]="HOMEVERSE_TESTNET",t}({});const dE=t=>Vh("https://${network}-indexer.sequence.app",{network:t}),hE=t=>Vh("https://${network}-relayer.sequence.app",{network:t}),vE=t=>Vh("https://nodes.sequence.app/${network}",{network:t}),Ht={[se.MAINNET]:{chainId:se.MAINNET,name:"mainnet",title:"Ethereum",blockExplorer:{name:"Etherscan",rootUrl:"https://etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[se.ROPSTEN]:{chainId:se.ROPSTEN,name:"ropsten",title:"Ropsten",testnet:!0,blockExplorer:{name:"Etherscan (Ropsten)",rootUrl:"https://ropsten.etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[se.RINKEBY]:{chainId:se.RINKEBY,name:"rinkeby",title:"Rinkeby",testnet:!0,blockExplorer:{name:"Etherscan (Rinkeby)",rootUrl:"https://rinkeby.etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",disabled:!0},[se.GOERLI]:{chainId:se.GOERLI,name:"goerli",title:"Goerli",testnet:!0,blockExplorer:{name:"Etherscan (Goerli)",rootUrl:"https://goerli.etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[se.KOVAN]:{chainId:se.KOVAN,name:"kovan",title:"Kovan",testnet:!0,blockExplorer:{name:"Etherscan (Kovan)",rootUrl:"https://kovan.etherscan.io/"}},[se.POLYGON]:{chainId:se.POLYGON,name:"polygon",title:"Polygon",blockExplorer:{name:"Polygonscan",rootUrl:"https://polygonscan.com/"},isDefaultChain:!0,isAuthChain:!0},[se.POLYGON_MUMBAI]:{chainId:se.POLYGON_MUMBAI,name:"mumbai",title:"Polygon Mumbai",testnet:!0,blockExplorer:{name:"Polygonscan (Mumbai)",rootUrl:"https://mumbai.polygonscan.com/"}},[se.POLYGON_ZKEVM]:{chainId:se.POLYGON_ZKEVM,name:"polygon-zkevm",title:"Polygon zkEVM",blockExplorer:{name:"Polygonscan (zkEVM)",rootUrl:"https://zkevm.polygonscan.com/"}},[se.BSC]:{chainId:se.BSC,name:"bsc",title:"BNB Smart Chain",blockExplorer:{name:"BSCScan",rootUrl:"https://bscscan.com/"}},[se.BSC_TESTNET]:{chainId:se.BSC_TESTNET,name:"bsc-testnet",title:"BNB Smart Chain Testnet",testnet:!0,blockExplorer:{name:"BSCScan (Testnet)",rootUrl:"https://testnet.bscscan.com/"}},[se.OPTIMISM]:{chainId:se.OPTIMISM,name:"optimism",title:"Optimism",blockExplorer:{name:"Etherscan (Optimism)",rootUrl:"https://optimistic.etherscan.io/"}},[se.OPTIMISM_TESTNET]:{chainId:se.OPTIMISM_TESTNET,name:"optimism-testnet",title:"Optimistic Kovan",testnet:!0,blockExplorer:{name:"Etherscan (Optimism Testnet)",rootUrl:"https://kovan-optimistic.etherscan.io/"}},[se.ARBITRUM]:{chainId:se.ARBITRUM,name:"arbitrum",title:"Arbitrum One",blockExplorer:{name:"Arbiscan",rootUrl:"https://arbiscan.io/"}},[se.ARBITRUM_GOERLI]:{chainId:se.ARBITRUM_GOERLI,name:"arbitrum-goerli",title:"Arbitrum Goerli",testnet:!0,blockExplorer:{name:"Arbiscan (Testnet)",rootUrl:"https://testnet.arbiscan.io/"}},[se.ARBITRUM_NOVA]:{chainId:se.ARBITRUM_NOVA,name:"arbitrum-nova",title:"Arbitrum Nova",blockExplorer:{name:"Nova Explorer",rootUrl:"https://nova-explorer.arbitrum.io/"}},[se.AVALANCHE]:{chainId:se.AVALANCHE,name:"avalanche",title:"Avalanche",blockExplorer:{name:"Snowtrace",rootUrl:"https://snowtrace.io/"}},[se.AVALANCHE_TESTNET]:{chainId:se.AVALANCHE_TESTNET,name:"avalanche-testnet",title:"Avalanche Testnet",testnet:!0,blockExplorer:{name:"Snowtrace (Testnet)",rootUrl:"https://testnet.snowtrace.io/"}},[se.FANTOM]:{chainId:se.FANTOM,name:"fantom",title:"Fantom",blockExplorer:{name:"FTMScan",rootUrl:"https://ftmscan.com/"}},[se.FANTOM_TESTNET]:{chainId:se.FANTOM_TESTNET,name:"fantom-testnet",title:"Fantom Testnet",testnet:!0,blockExplorer:{name:"FTMScan (Testnet)",rootUrl:"https://testnet.ftmscan.com/"}},[se.GNOSIS]:{chainId:se.GNOSIS,name:"gnosis",title:"Gnosis Chain",blockExplorer:{name:"Gnosis Chain Explorer",rootUrl:"https://blockscout.com/xdai/mainnet/"}},[se.AURORA]:{chainId:se.AURORA,name:"aurora",title:"Aurora",blockExplorer:{name:"Aurora Explorer",rootUrl:"https://aurorascan.dev/"}},[se.AURORA_TESTNET]:{chainId:se.AURORA_TESTNET,name:"aurora-testnet",title:"Aurora Testnet",blockExplorer:{name:"Aurora Explorer (Testnet)",rootUrl:"https://testnet.aurorascan.dev/"}},[se.BASE_GOERLI]:{chainId:se.BASE_GOERLI,name:"base-goerli",title:"Base Goerli",blockExplorer:{name:"Base Goerli Explorer",rootUrl:"https://goerli.basescan.org/"}},[se.HARDHAT]:{chainId:se.HARDHAT,name:"hardhat",title:"Hardhat (local testnet)"},[se.HARDHAT_2]:{chainId:se.HARDHAT_2,name:"hardhat2",title:"Hardhat (local testnet)"},[se.HOMEVERSE_TESTNET]:{chainId:se.HOMEVERSE_TESTNET,name:"homeverse-testnet",title:"Oasys Homeverse Testnet",blockExplorer:{name:"Oasys Homeverse Explorer (Testnet)",rootUrl:"https://explorer.testnet.oasys.homeverse.games/"}}};function cx(t){return Vi(pE,t)}function yE(t){return z.isBigNumber(t)?t:eE(t)?z.from(t):z.from(t.chainId)}const Er=t=>{const e=vE(t);return{rpcUrl:e,relayer:{url:hE(t),provider:{url:e}},indexerUrl:dE(t)}},pE=uE([Vt({},Ht[se.MAINNET],Er("mainnet")),Vt({},Ht[se.POLYGON],Er("polygon")),Vt({},Ht[se.BSC],Er("bsc")),Vt({},Ht[se.AVALANCHE],Er("avalanche")),Vt({},Ht[se.ARBITRUM],Er("arbitrum")),Vt({},Ht[se.ARBITRUM_NOVA],Er("arbitrum-nova")),Vt({},Ht[se.OPTIMISM],Er("optimism")),Vt({},Ht[se.POLYGON_ZKEVM],Er("polygon-zkevm")),Vt({},Ht[se.GNOSIS],Er("gnosis")),Vt({},Ht[se.RINKEBY],Er("rinkeby")),Vt({},Ht[se.GOERLI],Er("goerli")),Vt({},Ht[se.POLYGON_MUMBAI],Er("mumbai")),Vt({},Ht[se.BSC_TESTNET],Er("bsc-testnet")),Vt({},Ht[se.ARBITRUM_GOERLI],Er("arbitrum-goerli")),Vt({},Ht[se.BASE_GOERLI],Er("base-goerli")),Vt({},Ht[se.HOMEVERSE_TESTNET],Er("homeverse-testnet")),Vt({},Ht[se.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),Vt({},Ht[se.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]),Bl="2.0";class Jf{constructor(e,r){this.sender=r,e&&this.setMiddleware(e)}setMiddleware(e){this.handler=gE(e,this.sender.sendAsync)}sendAsync(e,r,n){try{this.handler(e,r,n)}catch(i){r(i,void 0)}}}const gE=(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 mE(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 xE(t){return t!==void 0&&t.sendAsync!==void 0}let aH=0;class aa{constructor(e,r){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,mE(e)?this.send=e.send.bind(e):xE(e)?this.send=(n,i,s)=>new Promise((o,a)=>{e.sendAsync({jsonrpc:Bl,id:++aH,method:n,params:i},(l,f)=>{l?a(l):o(f?f.result:void 0)},s||this.defaultChainId)}):this.send=e,this.request=(n,i)=>this.send(n.method,n.params,i)}}class lH{constructor(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,this.provider=e}}class fH{constructor(e){e?this.isAllowedFunc=e:this.isAllowedFunc=r=>!0,this.sendAsyncMiddleware=L0(this.isAllowedFunc)}setIsAllowedFunc(e){this.isAllowedFunc=e,this.sendAsyncMiddleware=L0(this.isAllowedFunc)}}const L0=t=>e=>(r,n,i)=>{if(!t(r))throw new Error("allowProvider middleware precondition is unmet.");e(r,n,i)};class $0{constructor(e){this.cachableJsonRpcMethods=["net_version","eth_chainId","eth_accounts","sequence_getWalletContext","sequence_getNetworks"],this.cachableJsonRpcMethodsByBlock=["eth_call","eth_getCode"],this.cacheByBlockResetLock=!1,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 f=this.cacheKey(n.method,n.params,l||this.defaultChainId);this.cachableJsonRpcMethods.includes(n.method)?this.setCacheValue(f,a.result):this.setCacheByBlockValue(f,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 F0{constructor(e){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:J(this.options.chainId)});return}break;case"eth_accounts":if(this.options.accountAddress){i(void 0,{jsonrpc:"2.0",id:o,result:[xe(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 Cd=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)},Ad=t=>(e,r,n)=>{const i=n?` chainId:${n}`:"";fe.info(`[provider request]${i} id:${e.id} method:${e.method} params:`,e.params),t(e,(s,o)=>{s?fe.warn(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"error:",s):fe.info(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"response:",o),r(s,o)},n)},bE=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:J(s)});return}e(r,n,i)},wE=["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 kp{constructor(e){this.sendAsyncMiddleware=r=>(n,i,s)=>{if(wE.includes(n.method)){this.provider.sendAsync(n,i,s);return}r(n,i,s)},this.provider=e}}class cH{constructor(e){this.privateJsonRpcMethods=["net_version","eth_chainId","eth_accounts",...wE],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}fe.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 ba(e))}}class CE{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.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 f=0;f{let i="";return n?i=`${n}:${e}:`:i=`:${e}:`,!r||r.length===0?i+"[]":i+JSON.stringify(r)},this.inflight={}}}class uH extends ba{constructor(e,r){super(e,r==null?void 0:r.chainId),this.send=(a,l)=>this._sender.send(a,l),this.fetch=(a,l)=>{const f={method:a,params:l,id:this._nextId++,jsonrpc:"2.0"};return tu(this.connection,JSON.stringify(f),dH).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 Jf(i??[new F0({chainId:n}),new CE,new $0({defaultChainId:n,blockCache:s})],new aa(this.fetch,n));this._sender=new aa(o,n)}async getNetwork(){const e=this._chainId;if(e){const r=Ht[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=z.from(r).toNumber(),this.getNetwork()}}}function dH(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 hH=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:fH,CachedProvider:$0,ChainId:se,EagerProvider:F0,JsonRpcExternalProvider:lH,JsonRpcProvider:uH,JsonRpcRouter:Jf,JsonRpcSender:aa,JsonRpcVersion:Bl,PublicProvider:cH,SigningProvider:kp,SingleflightMiddleware:CE,allNetworks:pE,allowProviderMiddleware:L0,checkNetworkConfig:sH,createJsonRpcMiddlewareStack:gE,ensureUniqueNetworks:iH,ensureValidNetworks:lx,exceptionProviderMiddleware:Cd,findNetworkConfig:Vi,findSupportedNetwork:cx,getChainId:ax,indexerURL:dE,isJsonRpcHandler:xE,isJsonRpcProvider:mE,isNetworkConfig:nH,isValidNetworkConfig:fE,loggingProviderMiddleware:Ad,maybeChainId:Sn,networkProviderMiddleware:bE,networks:Ht,networksIndex:oH,nodesURL:vE,relayerURL:hE,sortNetworks:fx,stringTemplate:Vh,toChainIdNumber:yE,updateNetworkConfig:cE,validateAndSortNetworks:uE},Symbol.toStringTag,{value:"Module"}));function Pr(){return Pr=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(dx(i))return Ae(["uint8","uint8","address"],[Go.Address,i.weight,i.address]);if(i.isDynamic){const s=Y(i.signature);return Ae(["uint8","uint8","address","uint16","bytes"],[Go.DynamicSignature,i.weight,i.address,s.length,s])}return Ae(["uint8","uint8","bytes"],[Go.EOASignature,i.weight,i.signature])});return Ae(["uint16",...new Array(n.length).fill("bytes")],[r,...n])}async function TE(t,e,r){const n=nu(e),i=await Promise.all(t.signers.map(async s=>{if(dx(s))return s;if(s.isDynamic){if(!s.address)throw new Error("Dynamic signature part must have address");if(!ux(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:iu(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 Qf(t,e,r,n){if(r.length!==0)throw new Error("Explicit subdigests not supported on v1");let i=z.from(0);const s=t.signers.map(a=>{if(!e.has(a.address))return a;const l=e.get(a.address),f=Y(l.signature);return i=i.add(a.weight),l.isDynamic||f.length!==66?Pr({},a,{isDynamic:!0,signature:l.signature,address:a.address}):Pr({},a,{isDynamic:!1,signature:l.signature})});return{encoded:hx({version:1,threshold:t.threshold,signers:s}),weight:i}}const vx={decode:t=>_E(t),encode:t=>hx(t),trim:async t=>t,supportsNoChainId:!0,recover:(t,e,r)=>TE(t,e,r),encodeSigners:(t,e,r,n)=>Qf(t,e,r),hasEnoughSigningPower:(t,e)=>{const{weight:r}=vx.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 CH=Object.freeze({__proto__:null,SignaturePartType:Go,isAddressMember:dx,isUnrecoveredSignatureMember:SE,isUnrecoveredSignature:kE,decodeSignature:_E,encodeSignature:hx,recoverSignature:TE,encodeSigners:Qf,SignatureCoder:vx});const yx={isWalletConfig:t=>t.version===1&&t.threshold!==void 0&&t.signers!==void 0,imageHashOf:t=>t.signers.reduce((e,r)=>me(qr.encode(["bytes32","uint8","address"],[e,r.weight,r.address])),Ae(["uint256"],[t.threshold])),hasSubdigest:(t,e)=>!1,isComplete:t=>!0,checkpointOf:t=>z.from(0),signersOf:t=>t.signers.map(e=>({address:e.address,weight:z.from(e.weight).toNumber()})),fromSimple:t=>{if(!ze.eq(t.checkpoint))throw new Error("v1 wallet config does not support checkpoint");return{version:1,threshold:t.threshold,signers:t.signers}},update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new xr([...Mr.mainModule.abi,...Mr.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"),[yx.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:z.from(r.weight).toString(),address:r.address}));return JSON.stringify({version:t.version,threshold:z.from(t.threshold).toString(),signers:e})},fromJSON:function(t){const e=JSON.parse(t),r=e.signers.map(n=>({weight:z.from(n.weight),address:n.address}));return{version:e.version,threshold:z.from(e.threshold),signers:r}},editConfig:function(t,e){var r;const n=t.signers.slice();if(e.checkpoint&&!ze.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}=Qf(t,r,[]);if(a.gte(t.threshold))return o}const n=t.signers;for(const{address:i}of n.sort(({weight:s},{weight:o})=>z.from(s).sub(o).toNumber())){const s="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(i,{signature:s,isDynamic:!1});const{encoded:o,weight:a}=Qf(t,r,[]);if(a.gte(t.threshold))return o}return Qf(t,r,[]).encoded}};var AH=Object.freeze({__proto__:null,ConfigCoder:yx});const PE=1,EH={version:PE,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Wi=Object.freeze({__proto__:null,config:AH,signature:CH,version:PE,DeployedWalletContext:EH});const px="0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1";function IE(t){return me(RE(t))}function RE(t){return Ae(["bytes32","bytes32"],[px,t])}function ME(t){const e=Y(t);if(e.length===64&&J(e.slice(0,32))===px)return J(e.slice(32,64))}function SH(t){return ME(t)!==void 0}var kH=Object.freeze({__proto__:null,SetImageHashPrefix:px,hashSetImageHash:IE,messageSetImageHash:RE,decodeMessageSetImageHash:ME,isMessageSetImageHash:SH});let lr=function(t){return t[t.Legacy=0]="Legacy",t[t.Dynamic=1]="Dynamic",t[t.NoChainIdDynamic=2]="NoChainIdDynamic",t[t.Chained=3]="Chained",t}({}),$t=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 j0=66;function la(t){return t.left!==void 0&&t.right!==void 0}function ef(t){return t.tree!==void 0}function su(t){return t.unrecovered&&t.signature!==void 0&&t.isDynamic!==void 0}function U0(t){let e=Y(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 $t.Signature:{const s=e[0],o=J(e.slice(1,j0+1));r=n(r,{signature:o,weight:s,unrecovered:!0,isDynamic:!1}),e=e.slice(j0+1)}break;case $t.Address:{const s=e[0],o=xe(J(e.slice(1,21)));r=n(r,{address:o,weight:s}),e=e.slice(21)}break;case $t.DynamicSignature:{const s=e[0],o=xe(J(e.slice(1,21))),a=e[21]<<16|e[22]<<8|e[23],l=J(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 $t.Node:{const s=J(e.slice(0,32));r=n(r,{nodeHash:s}),e=e.slice(32)}break;case $t.Branch:{const s=e[0]<<16|e[1]<<8|e[2],o=U0(e.slice(3,3+s));r=n(r,o),e=e.slice(3+s)}break;case $t.Subdigest:{const s=J(e.slice(0,32));r=n(r,{subdigest:s}),e=e.slice(32)}break;case $t.Nested:{const s=e[0],o=e[1]<<8|e[2],a=e[3]<<16|e[4]<<8|e[5],l=U0(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}: ${J(e)}`)}}if(!r)throw new Error("Empty signature tree");return r.right?r:r.left}class NE extends Error{constructor(e){super(`Invalid signature leaf: ${JSON.stringify(e)}`),this.leaf=e}}async function Ko(t,e,r){if(la(t)){const[n,i]=await Promise.all([Ko(t.left,e,r),Ko(t.right,e,r)]);return{left:n,right:i}}if(ef(t))return{weight:t.weight,threshold:t.threshold,tree:await Ko(t.tree,e,r)};if(su(t))if(t.isDynamic){if(!t.address)throw new Error("Dynamic signature leaf without address");if(!await ux(t.address,e,t.signature,r))throw new NE(t);return{weight:t.weight,address:t.address,signature:t.signature,subdigest:e}}else return{weight:t.weight,address:iu(e,t.signature),signature:t.signature,subdigest:e};return t}const Sr={concat:(t,e)=>Ae(["bytes","bytes"],[t,e]),node:t=>Ae(["uint8","bytes32"],[$t.Node,t]),branch:t=>{const e=Y(t);return Ae(["uint8","uint24","bytes"],[$t.Branch,e.length,e])},nested:(t,e,r)=>{const n=Y(r);return Ae(["uint8","uint8","uint16","uint24","bytes"],[$t.Nested,t,e,n.length,n])},subdigest:t=>Ae(["uint8","bytes32"],[$t.Subdigest,t]),signature:(t,e)=>Ae(["uint8","uint8","bytes"],[$t.Signature,t,e]),dynamicSignature:(t,e,r)=>{const n=Y(r);return Ae(["uint8","uint8","address","uint24","bytes"],[$t.DynamicSignature,t,e,n.length,n])},address:(t,e)=>Ae(["uint8","uint8","address"],[$t.Address,t,e])};function Yf(t,e,r,n,i={}){const s=Xf(t.tree,e,r,i);return z.from(n).isZero()?{encoded:Ae(["uint8","uint16","uint32","bytes"],[lr.NoChainIdDynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:z.from(t.threshold).gt(255)?{encoded:Ae(["uint8","uint16","uint32","bytes"],[lr.Dynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:{encoded:Ae(["uint8","uint8","uint32","bytes"],[lr.Legacy,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}}function Xf(t,e,r,n={}){const i=!n.disableTrim;if(li(t)){const s=Xf(t.left,e,r),o=Xf(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:Sr.node(dn(t)),weight:ze}:i&&o.weight.eq(0)&&!l?{encoded:Sr.concat(s.encoded,Sr.node(dn(t.right))),weight:s.weight}:i&&s.weight.eq(0)&&!a?{encoded:Sr.concat(Sr.node(dn(t.left)),Sr.branch(o.encoded)),weight:o.weight}:{encoded:Sr.concat(s.encoded,Sr.branch(o.encoded)),weight:s.weight.add(o.weight)}}if(vs(t)){const s=Xf(t.tree,e,r);return i&&s.weight.eq(0)?{encoded:Sr.node(dn(t)),weight:ze}:{encoded:Sr.nested(t.weight,t.threshold,s.encoded),weight:s.weight}}if(ys(t))return{encoded:Sr.node(dn(t)),weight:ze};if(hs(t)){const s=r.includes(t.subdigest);return{encoded:Sr.node(dn(t)),weight:s?A7:ze}}if(Wr(t))if(e.has(t.address)){const o=e.get(t.address),a=o.signature;return n.forceDynamicEncoding||o.isDynamic?{encoded:Sr.dynamicSignature(t.weight,t.address,a),weight:z.from(t.weight)}:{encoded:Sr.signature(t.weight,a),weight:z.from(t.weight)}}else return{encoded:Sr.address(t.weight,t.address),weight:ze};throw new Error(`Invalid topology - unknown error: ${JSON.stringify(t)}`)}function gx(t){return xx(t)?gx(t.suffix[t.suffix.length-1]):t.config}function mx(t){return t.type!==void 0&&t.decoded!==void 0&&t.version!==void 0&&t.version===2}function ou(t){return t.suffix!==void 0&&Array.isArray(t.suffix)&&t.suffix.every(mx)}function OE(t){return t.type!==void 0&&t.config!==void 0&&t.digest!==void 0&&t.version!==void 0&&t.version===2}function xx(t){return t.chain!==void 0&&Array.isArray(t.chain)&&t.chain.every(OE)}function Hh(t){const e=Y(t),r=e[0];switch(r){case lr.Legacy:return{version:2,type:lr.Legacy,decoded:Ed(e)};case lr.Dynamic:return{version:2,type:lr.Dynamic,decoded:Ed(e.slice(1))};case lr.NoChainIdDynamic:return{version:2,type:lr.NoChainIdDynamic,decoded:Ed(e.slice(1))};case lr.Chained:return BE(e);default:throw new Error(`Invalid signature type: ${r}`)}}function Ed(t){const e=Y(t),r=e[0]<<8|e[1],n=e[2]<<24|e[3]<<16|e[4]<<8|e[5],i=U0(e.slice(6));return{threshold:r,checkpoint:n,tree:i}}function BE(t){const e=Y(t),r=e[0];if(r!==lr.Chained)throw new Error(`Expected chained signature type: ${r}`);const n=[];let i=1;for(;iY(Ks(s))),i=Ae(n.map(()=>["uint24","bytes"]).flat(),n.map(s=>[s.length,s]).flat());return Ae(["uint8","bytes"],[lr.Chained,i])}function Ks(t){if(is(t))return J(t);if(ou(t)||xx(t))return Wh(Ks(t),(t.suffix||[]).map(Ks));const e=mx(t)?t.decoded:t.config;switch(t.type){case lr.Legacy:if(z.from(e.threshold).gt(255))throw new Error(`Legacy signature threshold is too large: ${e.threshold} (max 255)`);return _p(e);case lr.NoChainIdDynamic:case lr.Dynamic:return Ae(["uint8","bytes"],[t.type,_p(e)]);case lr.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 Ae(["uint16","uint32","bytes"],[t.threshold,t.checkpoint,Zf(t.tree)])}function Zf(t){if(li(t)||la(t)){const e=Y(Zf(t.right)),r=Y(Zf(t.left));return li(t.right)||la(t.right)?Ae(["bytes","uint8","uint24","bytes"],[r,$t.Branch,e.length,e]):Ae(["bytes","bytes"],[r,e])}if(vs(t)||ef(t)){const e=Y(Zf(t.tree));return Ae(["uint8","uint8","uint16","uint24","bytes"],[$t.Nested,t.weight,t.threshold,e.length,e])}if(su(t)||Wr(t)&&t.signature!==void 0){const e=Y(t.signature);if(t.isDynamic||e.length!==j0){if(!t.address)throw new Error("Dynamic signature leaf must have address");return Ae(["uint8","uint8","address","uint24","bytes"],[$t.DynamicSignature,t.weight,t.address,e.length,e])}else return Ae(["uint8","uint8","bytes"],[$t.Signature,t.weight,e])}if(Wr(t))return Ae(["uint8","uint8","address"],[$t.Address,t.weight,t.address]);if(ys(t))return Ae(["uint8","bytes32"],[$t.Node,t.nodeHash]);if(hs(t))return Ae(["uint8","bytes32"],[$t.Subdigest,t.subdigest]);throw new Error(`Unknown signature tree type: ${t}`)}function ec(t){return li(t)?[...ec(t.left),...ec(t.right)]:vs(t)?ec(t.tree):Wr(t)&&t.signature?[{address:t.address,signature:t.signature}]:[]}function tc(t){return la(t)?[...tc(t.left),...tc(t.right)]:ef(t)?tc(t.tree):su(t)?[t.signature]:[]}function Sd(t){return la(t)?[...Sd(t.left),...Sd(t.right)]:ef(t)?Sd(t.tree):hs(t)?[t.subdigest]:[]}async function z0(t){const e=typeof t=="string"?Hh(t):t;if(ou(e)){const n=await Promise.all([z0(Pr({},e,{suffix:void 0})),...e.suffix.map(i=>z0(i))]);return Wh(n[0],n.slice(1))}const{trimmed:r}=await rc(e.decoded.tree);return Ks(Pr({},e,{decoded:Pr({},e.decoded,{tree:r})}))}async function rc(t,e=!0){if(la(t)){const[r,n]=await Promise.all([rc(t.left),rc(t.right)]);if(r.weight===0&&n.weight===0)try{const i=await Ko(t,C0,void 0);return{weight:0,trimmed:{nodeHash:dn(i)}}}catch{}else return{weight:r.weight+n.weight,trimmed:{left:r.trimmed,right:n.trimmed}}}if(ef(t)){const r=await rc(t.tree);if(r.weight===0)try{const n=await Ko(t,C0,void 0);return{weight:0,trimmed:{nodeHash:dn(n)}}}catch{}return{weight:r.weight,trimmed:{weight:t.weight,threshold:t.threshold,tree:r.trimmed}}}return ys(t)&&FE(t.nodeHash)?{weight:0,trimmed:Pr({},$E(t.nodeHash))}:su(t)||Wr(t)&&t.signature!==void 0?{weight:z.from(t.weight).toNumber(),trimmed:t}:!e&&hs(t)?{weight:1/0,trimmed:t}:{weight:0,trimmed:t}}const qh={decode:t=>Hh(t),encode:t=>Ks(t),trim:t=>z0(t),supportsNoChainId:!0,recover:(t,e,r)=>bx(t,e,r),encodeSigners:(t,e,r,n)=>Yf(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=is(t)?t:Ks(t),i=r.map(s=>is(s)?s:Ks(s));return Wh(n,i)},hashSetImageHash:function(t){return IE(t)},signaturesOf(t){return ec(t.tree)},signaturesOfDecoded:function(t){return tc(t.decoded.tree)}};var _H=Object.freeze({__proto__:null,SignatureType:lr,SignaturePartType:$t,SignaturePartTypeLength:j0,isUnrecoveredNode:la,isUnrecoveredNestedLeaf:ef,isUnrecoveredSignatureLeaf:su,decodeSignatureTree:U0,InvalidSignatureLeafError:NE,recoverTopology:Ko,partEncoder:Sr,encodeSigners:Yf,encodeTree:Xf,deepestConfigOfSignature:gx,isUnrecoveredSignature:mx,isUnrecoveredChainedSignature:ou,isSignature:OE,isChainedSignature:xx,decodeSignature:Hh,decodeSignatureBody:Ed,decodeChainedSignature:BE,setImageHashStruct:DE,recoverSignature:bx,encodeChain:Wh,encodeSignature:Ks,encodeSignatureBody:_p,encodeSignatureTree:Zf,signaturesOf:ec,signaturesOfDecoded:tc,subdigestsOfDecoded:Sd,trimSignature:z0,trimUnrecoveredTree:rc,SignatureCoder:qh});function Wr(t){return t.address!==void 0&&t.weight!==void 0}function hs(t){return t.subdigest!==void 0&&t.address===void 0}function nc(t){return li(t)?JSON.stringify({left:nc(t.left),right:nc(t.right)}):vs(t)?JSON.stringify({weight:z.from(t.weight).toString(),threshold:z.from(t.threshold).toString(),tree:nc(t.tree)}):Wr(t)?JSON.stringify({address:t.address,weight:z.from(t.weight).toString()}):JSON.stringify(t)}function ic(t){const e=typeof t=="string"?JSON.parse(t):t;return e.left!==void 0&&e.right!==void 0?{left:ic(e.left),right:ic(e.right)}:e.weight!==void 0&&e.threshold!==void 0&&e.tree!==void 0?{weight:z.from(e.weight),threshold:z.from(e.threshold),tree:ic(e.tree)}:e.address!==void 0&&e.weight!==void 0?{address:e.address,weight:z.from(e.weight)}:e}function vs(t){return t.tree!==void 0&&t.weight!==void 0&&t.threshold!==void 0}function ys(t){return t.nodeHash!==void 0}function wx(t){return Wr(t)||hs(t)||vs(t)||ys(t)}function li(t){return t.left!==void 0&&t.right!==void 0}function TH(t){return li(t)||wx(t)}function LE(t){return Ae(["uint96","address"],[t.weight,t.address])}function $E(t){const e=Y(t);if(e.length!==32)throw new Error("Invalid encoded string length");const r=z.from(e.slice(0,12)),n=xe(J(e.slice(12)));return{weight:r,address:n}}function FE(t){const e=Y(t);return e.length!==32?!1:e.slice(0,11).every(n=>n===0)}function dn(t){if(Wr(t))return LE(t);if(hs(t))return Zi(["string","bytes32"],[`Sequence static digest: +`)}static register(e,r){r||(r=e.locale)}}const LU="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let Kf=null;function d6(t){if(Kf==null&&(Kf=LU.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),tu.check(t)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw Kf=null,new Error("BIP39 Wordlist for en (English) FAILED")}class $U extends tu{constructor(){super("en")}getWord(e){return d6(this),Kf[e]}getWordIndex(e){return d6(this),Kf.indexOf(e)}}const m7=new $U;tu.register(m7);const h6={en:m7},FU="hdnode/5.7.0",$c=new V(FU),jU=z.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),UU=Le("Bitcoin seed"),Da=2147483648;function x7(t){return(1<=256)throw new Error("Depth too large!");return v6(je([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",J(this.depth),this.parentFingerprint,Ue(J(this.index),4),this.chainCode,this.privateKey!=null?je(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new un(ka,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&~Da));const n=new Uint8Array(37);if(e&Da){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(Y(this.privateKey),1),r&&(r+="'")}else n.set(Y(this.publicKey));for(let u=24;u>=0;u-=8)n[33+(u>>3)]=e>>24-u&255;const i=Y(Lc(Nl.sha512,this.chainCode,n)),s=i.slice(0,32),o=i.slice(32);let a=null,l=null;this.privateKey?a=Vu(z.from(s).add(this.privateKey).mod(jU)):l=new Wo(J(s))._addPoint(this.publicKey);let f=r;const c=this.mnemonic;return c&&(f=Object.freeze({phrase:c.phrase,path:r,locale:c.locale||"en"})),new un(ka,a,l,this.fingerprint,Vu(o),e,this.depth+1,f)}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=Da)throw new Error("invalid path index - "+s);n=n._derive(Da+o)}else if(s.match(/^[0-9]+$/)){const o=parseInt(s);if(o>=Da)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=Y(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=Y(Lc(Nl.sha512,UU,n));return new un(ka,Vu(i.slice(0,32)),null,"0x00000000",Vu(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=Km(n),e=Uh(jh(e,n),n),un._fromSeed(b7(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return un._fromSeed(e,null)}static fromExtendedKey(e){const r=Ml.decode(e);(r.length!==82||v6(r.slice(0,78))!==e)&&$c.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=J(r.slice(5,9)),s=parseInt(J(r.slice(9,13)).substring(2),16),o=J(r.slice(13,45)),a=r.slice(45,78);switch(J(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new un(ka,null,J(a),i,o,s,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new un(ka,J(a.slice(1)),null,i,o,s,n,null)}return $c.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function b7(t,e){e||(e="");const r=Le("mnemonic"+e,Ri.NFKD);return Gm(Le(t,Ri.NFKD),r,2048,64,"sha512")}function jh(t,e){e=Km(e),$c.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=Y(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let f=0;f>3]|=1<<7-i%8),i++}const s=32*r.length/3,o=r.length/3,a=x7(o);if((Y(ls(n.slice(0,s/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return J(n.slice(0,s/8))}function Uh(t,e){if(e=Km(e),t=Y(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]&zU(8-n)),n+=3);const i=t.length/4,s=Y(ls(t))[0]&x7(i);return r[r.length-1]<<=i,r[r.length-1]|=s>>8-i,e.join(r.map(o=>e.getWord(o)))}function VU(t,e){try{return jh(t,e),!0}catch{}return!1}function HU(t){return(typeof t!="number"||t<0||t>=Da||t%1)&&$c.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const WU="random/5.7.0",hp=new V(WU);function qU(){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 y6=qU();let xd=y6.crypto||y6.msCrypto;(!xd||!xd.getRandomValues)&&(hp.warn("WARNING: Missing strong random number source"),xd={getRandomValues:function(t){return hp.throwError("no secure random source avaialble",V.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Ki(t){(t<=0||t>1024||t%1||t!=t)&&hp.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return xd.getRandomValues(e),Y(e)}function GU(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 vp={},KU={get exports(){return vp},set exports(t){vp=t}};(function(t,e){(function(r){function n(b){return parseInt(b)===b}function i(b){if(!n(b.length))return!1;for(var d=0;d255)return!1;return!0}function s(b,d){if(b.buffer&&ArrayBuffer.isView(b)&&b.name==="Uint8Array")return d&&(b.slice?b=b.slice():b=Array.prototype.slice.call(b)),b;if(Array.isArray(b)){if(!i(b))throw new Error("Array contains invalid value: "+b);return new Uint8Array(b)}if(n(b.length)&&i(b))return new Uint8Array(b);throw new Error("unsupported array-like object")}function o(b){return new Uint8Array(b)}function a(b,d,_,N,p){(N!=null||p!=null)&&(b.slice?b=b.slice(N,p):b=Array.prototype.slice.call(b,N,p)),d.set(b,_)}var l=function(){function b(_){var N=[],p=0;for(_=encodeURI(_);p<_.length;){var D=_.charCodeAt(p++);D===37?(N.push(parseInt(_.substr(p,2),16)),p+=2):N.push(D)}return s(N)}function d(_){for(var N=[],p=0;p<_.length;){var D=_[p];D<128?(N.push(String.fromCharCode(D)),p++):D>191&&D<224?(N.push(String.fromCharCode((D&31)<<6|_[p+1]&63)),p+=2):(N.push(String.fromCharCode((D&15)<<12|(_[p+1]&63)<<6|_[p+2]&63)),p+=3)}return N.join("")}return{toBytes:b,fromBytes:d}}(),f=function(){function b(N){for(var p=[],D=0;D>4]+d[L&15])}return p.join("")}return{toBytes:b,fromBytes:_}}(),c={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],v=[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],x=[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],g=[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],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],E=[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],$=[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],j=[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],U=[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],W=[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 q(b){for(var d=[],_=0;_>2,this._Ke[D][d%4]=p[d],this._Kd[b-D][d%4]=p[d];for(var L=0,F=N,H;F<_;){if(H=p[N-1],p[0]^=h[H>>16&255]<<24^h[H>>8&255]<<16^h[H&255]<<8^h[H>>24&255]^u[L]<<24,L+=1,N!=8)for(var d=1;d>8&255]<<8^h[H>>16&255]<<16^h[H>>24&255]<<24;for(var d=N/2+1;d>2,K=F%4,this._Ke[Z][K]=p[d],this._Kd[b-Z][K]=p[d++],F++}for(var Z=1;Z>24&255]^j[H>>16&255]^U[H>>8&255]^W[H&255]},G.prototype.encrypt=function(b){if(b.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var d=this._Ke.length-1,_=[0,0,0,0],N=q(b),p=0;p<4;p++)N[p]^=this._Ke[0][p];for(var D=1;D>24&255]^g[N[(p+1)%4]>>16&255]^k[N[(p+2)%4]>>8&255]^w[N[(p+3)%4]&255]^this._Ke[D][p];N=_.slice()}for(var L=o(16),F,p=0;p<4;p++)F=this._Ke[d][p],L[4*p]=(h[N[p]>>24&255]^F>>24)&255,L[4*p+1]=(h[N[(p+1)%4]>>16&255]^F>>16)&255,L[4*p+2]=(h[N[(p+2)%4]>>8&255]^F>>8)&255,L[4*p+3]=(h[N[(p+3)%4]&255]^F)&255;return L},G.prototype.decrypt=function(b){if(b.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var d=this._Kd.length-1,_=[0,0,0,0],N=q(b),p=0;p<4;p++)N[p]^=this._Kd[0][p];for(var D=1;D>24&255]^E[N[(p+3)%4]>>16&255]^I[N[(p+2)%4]>>8&255]^M[N[(p+1)%4]&255]^this._Kd[D][p];N=_.slice()}for(var L=o(16),F,p=0;p<4;p++)F=this._Kd[d][p],L[4*p]=(v[N[p]>>24&255]^F>>24)&255,L[4*p+1]=(v[N[(p+3)%4]>>16&255]^F>>16)&255,L[4*p+2]=(v[N[(p+2)%4]>>8&255]^F>>8)&255,L[4*p+3]=(v[N[(p+1)%4]&255]^F)&255;return L};var re=function(b){if(!(this instanceof re))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new G(b)};re.prototype.encrypt=function(b){if(b=s(b),b.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var d=o(b.length),_=o(16),N=0;N=0;--d)this._counter[d]=b%256,b=b>>8},P.prototype.setBytes=function(b){if(b=s(b,!0),b.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=b},P.prototype.increment=function(){for(var b=15;b>=0;b--)if(this._counter[b]===255)this._counter[b]=0;else{this._counter[b]++;break}};var O=function(b,d){if(!(this instanceof O))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 G(b)};O.prototype.encrypt=function(b){for(var d=s(b,!0),_=0;_16)throw new Error("PKCS#7 padding byte out of range");for(var _=b.length-d,N=0;N=64;){let R=w,b=A,d=E,_=I,N=M,p=$,D=j,L=U,F,H,Z,K,X;for(H=0;H<16;H++)Z=m+H*4,W[H]=(O[Z]&255)<<24|(O[Z+1]&255)<<16|(O[Z+2]&255)<<8|O[Z+3]&255;for(H=16;H<64;H++)F=W[H-2],K=(F>>>17|F<<32-17)^(F>>>19|F<<32-19)^F>>>10,F=W[H-15],X=(F>>>7|F<<32-7)^(F>>>18|F<<32-18)^F>>>3,W[H]=(K+W[H-7]|0)+(X+W[H-16]|0)|0;for(H=0;H<64;H++)K=(((N>>>6|N<<32-6)^(N>>>11|N<<32-11)^(N>>>25|N<<32-25))+(N&p^~N&D)|0)+(L+(k[H]+W[H]|0)|0)|0,X=((R>>>2|R<<32-2)^(R>>>13|R<<32-13)^(R>>>22|R<<32-22))+(R&b^R&d^b&d)|0,L=D,D=p,p=N,N=_+K|0,_=d,d=b,b=R,R=K+X|0;w=w+R|0,A=A+b|0,E=E+d|0,I=I+_|0,M=M+N|0,$=$+p|0,j=j+D|0,U=U+L|0,m+=64,T-=64}}q(g);let G,re=g.length%64,B=g.length/536870912|0,y=g.length<<3,C=re<56?56:120,P=g.slice(g.length-re,g.length);for(P.push(128),G=re+1;G>>24&255),P.push(B>>>16&255),P.push(B>>>8&255),P.push(B>>>0&255),P.push(y>>>24&255),P.push(y>>>16&255),P.push(y>>>8&255),P.push(y>>>0&255),q(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,E>>>24&255,E>>>16&255,E>>>8&255,E>>>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,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255,j>>>24&255,j>>>16&255,j>>>8&255,j>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255]}function s(g,k,w){g=g.length<=64?g:i(g);const A=64+k.length+4,E=new Array(A),I=new Array(64);let M,$=[];for(M=0;M<64;M++)E[M]=54;for(M=0;M=A-4;U--){if(E[U]++,E[U]<=255)return;E[U]=0}}for(;w>=32;)j(),$=$.concat(i(I.concat(i(E)))),w-=32;return w>0&&(j(),$=$.concat(i(I.concat(i(E))).slice(0,w))),$}function o(g,k,w,A,E){let I;for(c(g,(2*w-1)*16,E,0,16),I=0;I<2*w;I++)f(g,I*16,E,16),l(E,A),c(E,0,g,k+I*16,16);for(I=0;I>>32-k}function l(g,k){c(g,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)g[w]+=k[w]}function f(g,k,w,A){for(let E=0;E=256)return!1}return!0}function h(g,k){if(typeof g!="number"||g%1)throw new Error("invalid "+k);return g}function v(g,k,w,A,E,I,M){if(w=h(w,"N"),A=h(A,"r"),E=h(E,"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/E)throw new Error("r too large");if(!u(g))throw new Error("password must be an array or buffer");if(g=Array.prototype.slice.call(g),!u(k))throw new Error("salt must be an array or buffer");k=Array.prototype.slice.call(k);let $=s(g,k,E*128*A);const j=new Uint32Array(E*32*A);for(let N=0;Nb&&(N=b);for(let D=0;Db&&(N=b);for(let D=0;D>0&255),$.push(j[D]>>8&255),$.push(j[D]>>16&255),$.push(j[D]>>24&255);const p=s(g,$,I);return M&&M(null,1,p),p}M&&d(_)};if(!M)for(;;){const N=_();if(N!=null)return N}_()}const x={scrypt:function(g,k,w,A,E,I,M){return new Promise(function($,j){let U=0;M&&M(0),v(g,k,w,A,E,I,function(W,q,G){if(W)j(W);else if(G)M&&U!==1&&M(1),$(new Uint8Array(G));else if(M&&q!==U)return U=q,M(q)})})},syncScrypt:function(g,k,w,A,E,I){return new Uint8Array(v(g,k,w,A,E,I))}};t.exports=x})()})(ZU);const Xm=yp;var ez=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const pp=new V(w7);function p6(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class tz extends ga{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function rz(t,e,r){if(Ut(t,"crypto/cipher")==="aes-128-ctr"){const i=qo(Ut(t,"crypto/cipherparams/iv")),s=new bi.Counter(i),o=new bi.ModeOfOperation.ctr(e,s);return Y(o.decrypt(r))}return null}function A7(t,e){const r=qo(Ut(t,"crypto/ciphertext"));if(J(me(je([e.slice(16,32),r]))).substring(2)!==Ut(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const i=rz(t,e.slice(0,16),r);i||pp.throwError("unsupported cipher",V.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),xe(l)!==o)throw new Error("address mismatch")}const a={_isKeystoreAccount:!0,address:o,privateKey:J(i)};if(Ut(t,"x-ethers/version")==="0.1"){const l=qo(Ut(t,"x-ethers/mnemonicCiphertext")),f=qo(Ut(t,"x-ethers/mnemonicCounter")),c=new bi.Counter(f),u=new bi.ModeOfOperation.ctr(s,c),h=Ut(t,"x-ethers/path")||Ol,v=Ut(t,"x-ethers/locale")||"en",x=Y(u.decrypt(l));try{const g=Uh(x,v),k=un.fromMnemonic(g,null,v).derivePath(h);if(k.privateKey!=a.privateKey)throw new Error("mnemonic mismatch");a.mnemonic=k.mnemonic}catch(g){if(g.code!==V.errors.INVALID_ARGUMENT||g.argument!=="wordlist")throw g}}return new tz(a)}function E7(t,e,r,n,i){return Y(Gm(t,e,r,n,i))}function nz(t,e,r,n,i){return Promise.resolve(E7(t,e,r,n,i))}function S7(t,e,r,n,i){const s=Jm(e),o=Ut(t,"crypto/kdf");if(o&&typeof o=="string"){const a=function(l,f){return pp.throwArgumentError("invalid key-derivation function parameters",l,f)};if(o.toLowerCase()==="scrypt"){const l=qo(Ut(t,"crypto/kdfparams/salt")),f=parseInt(Ut(t,"crypto/kdfparams/n")),c=parseInt(Ut(t,"crypto/kdfparams/r")),u=parseInt(Ut(t,"crypto/kdfparams/p"));(!f||!c||!u)&&a("kdf",o),f&f-1&&a("N",f);const h=parseInt(Ut(t,"crypto/kdfparams/dklen"));return h!==32&&a("dklen",h),n(s,l,f,c,u,64,i)}else if(o.toLowerCase()==="pbkdf2"){const l=qo(Ut(t,"crypto/kdfparams/salt"));let f=null;const c=Ut(t,"crypto/kdfparams/prf");c==="hmac-sha256"?f="sha256":c==="hmac-sha512"?f="sha512":a("prf",c);const u=parseInt(Ut(t,"crypto/kdfparams/c")),h=parseInt(Ut(t,"crypto/kdfparams/dklen"));return h!==32&&a("dklen",h),r(s,l,u,h,f)}}return pp.throwArgumentError("unsupported key-derivation function","kdf",o)}function iz(t,e){const r=JSON.parse(t),n=S7(r,e,E7,Xm.syncScrypt);return A7(r,n)}function sz(t,e,r){return ez(this,void 0,void 0,function*(){const n=JSON.parse(t),i=yield S7(n,e,nz,Xm.scrypt,r);return A7(n,i)})}function oz(t,e,r,n){try{if(xe(t.address)!==qs(t.privateKey))throw new Error("address/privateKey mismatch");if(p6(t)){const k=t.mnemonic;if(un.fromMnemonic(k.phrase,null,k.locale).derivePath(k.path||Ol).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=Y(t.privateKey),s=Jm(e);let o=null,a=null,l=null;if(p6(t)){const k=t.mnemonic;o=Y(jh(k.phrase,k.locale||"en")),a=k.path||Ol,l=k.locale||"en"}let f=r.client;f||(f="ethers.js");let c=null;r.salt?c=Y(r.salt):c=Ki(32);let u=null;if(r.iv){if(u=Y(r.iv),u.length!==16)throw new Error("invalid iv")}else u=Ki(16);let h=null;if(r.uuid){if(h=Y(r.uuid),h.length!==16)throw new Error("invalid uuid")}else h=Ki(16);let v=1<<17,x=8,g=1;return r.scrypt&&(r.scrypt.N&&(v=r.scrypt.N),r.scrypt.r&&(x=r.scrypt.r),r.scrypt.p&&(g=r.scrypt.p)),Xm.scrypt(s,c,v,x,g,64,n).then(k=>{k=Y(k);const w=k.slice(0,16),A=k.slice(16,32),E=k.slice(32,64),I=new bi.Counter(u),M=new bi.ModeOfOperation.ctr(w,I),$=Y(M.encrypt(i)),j=me(je([A,$])),U={address:t.address.substring(2).toLowerCase(),id:JU(h),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:J(u).substring(2)},ciphertext:J($).substring(2),kdf:"scrypt",kdfparams:{salt:J(c).substring(2),n:v,dklen:32,p:g,r:x},mac:j.substring(2)}};if(o){const W=Ki(16),q=new bi.Counter(W),G=new bi.ModeOfOperation.ctr(E,q),re=Y(G.encrypt(o)),B=new Date,y=B.getUTCFullYear()+"-"+pf(B.getUTCMonth()+1,2)+"-"+pf(B.getUTCDate(),2)+"T"+pf(B.getUTCHours(),2)+"-"+pf(B.getUTCMinutes(),2)+"-"+pf(B.getUTCSeconds(),2)+".0Z";U["x-ethers"]={client:f,gethFilename:"UTC--"+y+"--"+U.address,mnemonicCounter:J(W).substring(2),mnemonicCiphertext:J(re).substring(2),path:a,locale:l,version:"0.1"}}return JSON.stringify(U)})}function az(t,e,r){if(Qm(t)){r&&r(0);const n=C7(t,e);return r&&r(1),Promise.resolve(n)}return Ym(t)?sz(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function lz(t,e){if(Qm(t))return C7(t,e);if(Ym(t))return iz(t,e);throw new Error("invalid JSON wallet")}const fz="wallet/5.7.0";var g6=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const _a=new V(fz);function cz(t){return t!=null&&Pe(t.privateKey,32)&&t.address!=null}function uz(t){const e=t.mnemonic;return e&&e.phrase}let m6=class Ba extends ss{constructor(e,r){if(super(),cz(e)){const n=new Wo(e.privateKey);if(ee(this,"_signingKey",()=>n),ee(this,"address",qs(this.publicKey)),this.address!==xe(e.address)&&_a.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),uz(e)){const i=e.mnemonic;ee(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||Ol,locale:i.locale||"en"}));const s=this.mnemonic,o=un.fromMnemonic(s.phrase,null,s.locale).derivePath(s.path);qs(o.privateKey)!==this.address&&_a.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else ee(this,"_mnemonic",()=>null)}else{if(Wo.isSigningKey(e))e.curve!=="secp256k1"&&_a.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 Wo(e);ee(this,"_signingKey",()=>n)}ee(this,"_mnemonic",()=>null),ee(this,"address",qs(this.publicKey))}r&&!oo.isProvider(r)&&_a.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 Ba(this,e)}signTransaction(e){return kt(e).then(r=>{r.from!=null&&(xe(r.from)!==this.address&&_a.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);const n=this._signingKey().signDigest(me(dp(r)));return dp(r,n)})}signMessage(e){return g6(this,void 0,void 0,function*(){return rp(this._signingKey().signDigest(Dh(e)))})}_signTypedData(e,r,n){return g6(this,void 0,void 0,function*(){const i=yield qt.resolveNames(e,r,n,s=>(this.provider==null&&_a.throwError("cannot resolve ENS names without a provider",V.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:s}),this.provider.resolveName(s)));return rp(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={}),oz(this,e,r,n)}static createRandom(e){let r=Ki(16);e||(e={}),e.extraEntropy&&(r=Y(Lt(me(je([r,e.extraEntropy])),0,16)));const n=Uh(r,e.locale);return Ba.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return az(e,r,n).then(i=>new Ba(i))}static fromEncryptedJsonSync(e,r){return new Ba(lz(e,r))}static fromMnemonic(e,r,n){return r||(r=Ol),new Ba(un.fromMnemonic(e,null,n).derivePath(r))}};function k7(t,e){return ia(Dh(t),e)}function dz(t,e,r,n){return ia(qt.hash(t,e,r),n)}const hz="networks/5.7.1",x6=new V(hz);function vz(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 I0(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return I0(t,n)},r}const b6={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:zi("homestead")},w6={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:zi("ropsten")},C6={chainId:63,name:"classicMordor",_defaultProvider:I0("https://www.ethercluster.com/mordor","classicMordor")},Hu={unspecified:{chainId:0,name:"unspecified"},homestead:b6,mainnet:b6,morden:{chainId:2,name:"morden"},ropsten:w6,testnet:w6,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:I0("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:C6,classicTestnet:C6,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:I0("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 yz(t){if(t==null)return null;if(typeof t=="number"){for(const n in Hu){const i=Hu[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=Hu[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=Hu[t.name];if(!e)return typeof t.chainId!="number"&&x6.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&x6.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(vz(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 pz="web/5.7.1";var gz=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};function mz(t,e){return gz(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:Y(new Uint8Array(i))}})}var xz=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const Wn=new V(pz);function A6(t){return new Promise(e=>{setTimeout(e,t)})}function As(t,e){if(t==null)return null;if(typeof t=="string")return t;if(is(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return ds(t)}catch{}return J(t)}return t}function bz(t){return Le(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function _7(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;Wn.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;Wn.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 f={method:"GET"};let c=!1,u=2*60*1e3;if(typeof t=="string")l=t;else if(typeof t=="object"){if((t==null||t.url==null)&&Wn.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&&(c=!0);if(f.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){l.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&Wn.throwError("basic authentication requires a secure https url",V.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:t.user,password:"[REDACTED]"});const w=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+Fm(Le(w))}}t.skipFetchSetup!=null&&(f.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(f.fetchOptions=Jt(t.fetchOptions))}const h=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),v=l?l.match(h):null;if(v)try{const w={statusCode:200,statusMessage:"OK",headers:{"content-type":v[1]||"text/plain"},body:v[2]?$m(v[3]):bz(v[3])};let A=w.body;return r&&(A=r(w.body,w)),Promise.resolve(A)}catch(w){Wn.throwError("processing response error",V.errors.SERVER_ERROR,{body:As(v[1],v[2]),error:w,requestBody:null,requestMethod:"GET",url:l})}e&&(f.method="POST",f.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 x={};Object.keys(a).forEach(w=>{const A=a[w];x[A.key]=A.value}),f.headers=x;const g=function(){let w=null;return{promise:new Promise(function(I,M){u&&(w=setTimeout(()=>{w!=null&&(w=null,M(Wn.makeError("timeout",V.errors.TIMEOUT,{requestBody:As(f.body,x["content-type"]),requestMethod:f.method,timeout:u,url:l})))},u))}),cancel:function(){w!=null&&(clearTimeout(w),w=null)}}}(),k=function(){return xz(this,void 0,void 0,function*(){for(let w=0;w=300)&&(g.cancel(),Wn.throwError("bad response",V.errors.SERVER_ERROR,{status:A.statusCode,headers:A.headers,body:As(E,A.headers?A.headers["content-type"]:null),requestBody:As(f.body,x["content-type"]),requestMethod:f.method,url:l})),r)try{const I=yield r(E,A);return g.cancel(),I}catch(I){if(I.throttleRetry&&w{let a=null;if(s!=null)try{a=JSON.parse(ds(s))}catch(l){Wn.throwError("invalid JSON",V.errors.SERVER_ERROR,{body:s,error:l})}return r&&(a=r(a,o)),a},i=null;if(e!=null){i=Le(e);const s=typeof t=="string"?{url:t}:Jt(t);s.headers?Object.keys(s.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(s.headers=Jt(s.headers),s.headers["content-type"]="application/json"):s.headers={"content-type":"application/json"},t=s}return _7(t,i,n)}function Fo(t,e){return e||(e={}),e=Jt(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 f(){return t().then(function(c){if(c!==void 0)o()&&r(c);else if(e.oncePoll)e.oncePoll.once("poll",f);else if(e.onceBlock)e.onceBlock.once("block",f);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(f,u)}return null},function(c){o()&&n(c)})}f()})}var R0="qpzry9x8gf2tvdw0s3jn54khce6mua7l",gp={};for(var Wu=0;Wu>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 T7(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=dl(e)^n>>5}for(e=dl(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=T7(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=dl(n)^o,i+=R0.charAt(o)}for(s=0;s<6;++s)n=dl(n);for(n^=1,s=0;s<6;++s){var a=n>>(5-s)*5&31;i+=R0.charAt(a)}return i}function P7(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=T7(s);if(typeof a=="string")return a;for(var l=[],f=0;f=o.length)&&l.push(u)}return a!==1?"Invalid checksum for "+t:{prefix:s,words:l}}function Cz(){var t=P7.apply(null,arguments);if(typeof t=="object")return t}function Az(t){var e=P7.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function zh(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:f,accessList:ae.allowNull(this.accessList.bind(this),null),blockHash:ae.allowNull(o,null),blockNumber:ae.allowNull(l,null),transactionIndex:ae.allowNull(l,null),confirmations:ae.allowNull(l,null),from:r,gasPrice:ae.allowNull(n),maxPriorityFeePerGas:ae.allowNull(n),maxFeePerGas:ae.allowNull(n),gasLimit:n,to:ae.allowNull(r,null),value:n,nonce:l,data:s,r:ae.allowNull(this.uint256),s:ae.allowNull(this.uint256),v:ae.allowNull(l),creates:ae.allowNull(r,null),raw:ae.allowNull(s)},e.transactionRequest={from:ae.allowNull(r),nonce:ae.allowNull(l),gasLimit:ae.allowNull(n),gasPrice:ae.allowNull(n),maxPriorityFeePerGas:ae.allowNull(n),maxFeePerGas:ae.allowNull(n),to:ae.allowNull(r),value:ae.allowNull(n),data:ae.allowNull(c),type:ae.allowNull(l),accessList:ae.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:o,address:r,topics:ae.arrayOf(o),data:s,logIndex:l,blockHash:o},e.receipt={to:ae.allowNull(this.address,null),from:ae.allowNull(this.address,null),contractAddress:ae.allowNull(r,null),transactionIndex:l,root:ae.allowNull(a),gasUsed:n,logsBloom:ae.allowNull(s),blockHash:o,transactionHash:o,logs:ae.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:ae.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:ae.allowNull(n),status:ae.allowNull(l),type:f},e.block={hash:ae.allowNull(o),parentHash:o,number:l,timestamp:l,nonce:ae.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:ae.allowNull(r),extraData:s,transactions:ae.allowNull(ae.arrayOf(o)),baseFeePerGas:ae.allowNull(n)},e.blockWithTransactions=Jt(e.block),e.blockWithTransactions.transactions=ae.allowNull(ae.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:ae.allowNull(i,void 0),toBlock:ae.allowNull(i,void 0),blockHash:ae.allowNull(o,void 0),address:ae.allowNull(r,void 0),topics:ae.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:ae.allowNull(l),blockHash:ae.allowNull(o),transactionIndex:l,removed:ae.allowNull(this.boolean.bind(this)),address:r,data:ae.allowFalsish(s,"0x"),topics:ae.arrayOf(o),transactionHash:o,logIndex:l},e}accessList(e){return xa(e||[])}number(e){return e==="0x"?0:z.from(e).toNumber()}type(e){return e==="0x"||e==null?0:z.from(e).toNumber()}bigNumber(e){return z.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():gf.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 xe(e)}callAddress(e){if(!Pe(e,32))return null;const r=xe(Lt(e,12));return r===wA?null:r}contractAddress(e){return Nm(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 Xc(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return Pi(n)!==32?gf.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=z.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!Pe(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=ae.check(r,e);return i._difficulty=n==null?null:z.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return ae.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&z.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=ae.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;Pe(n)&&(n=z.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),Pe(n)&&(n=z.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 h7(e)}receiptLog(e){return ae.check(this.formats.receiptLog,e)}receipt(e){const r=ae.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=z.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&gf.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):gf.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&gf.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 ae.check(this.formats.filter,e)}filterLog(e){return ae.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 be=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const Ee=new V(nu),Tz=10;function S6(t){return t==null?"null":(Pi(t)!==32&&Ee.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function k6(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[S6(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return S6(e)}).join("&")}function Pz(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 Ta(t){if(typeof t=="string"){if(t=t.toLowerCase(),Pi(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+k6(t);if(RF.isForkEvent(t))throw Ee.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+k6(t.topics||[])}throw new Error("invalid event - "+t)}function mf(){return new Date().getTime()}function _6(t){return new Promise(e=>{setTimeout(e,t)})}const Iz=["block","network","pending","poll"];let Rz=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=Pz(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||Iz.indexOf(this.tag)>=0}};const Mz={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 Av(t){return Ue(z.from(t).toHexString(),32)}function T6(t){return Ml.encode(je([t,Lt(ls(ls(t)),0,4)]))}const I7=new RegExp("^(ipfs)://(.*)$","i"),P6=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),I7,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function bd(t,e){try{return ds(Fc(t,e))}catch{}return null}function Fc(t,e){if(t==="0x")return null;const r=z.from(Lt(t,e,e+32)).toNumber(),n=z.from(Lt(t,r,r+32)).toNumber();return Lt(t,r+32,r+32+n)}function Ev(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Ee.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function I6(t){const e=Y(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 Nz(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function R7(t){const e=[];let r=0;for(let n=0;nz.from(e).eq(1)).catch(e=>{if(e.code===V.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return be(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Ur([e,Gf(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=Ur(["0x9061b923",R7([OA(this.name),n.data])]));try{let s=yield this.provider.call(n);return Y(s).length%32===4&&Ee.throwError("resolver threw error",V.errors.CALL_EXCEPTION,{transaction:n,data:s}),i&&(s=Fc(s,0)),s}catch(s){if(s.code===V.errors.CALL_EXCEPTION)return null;throw s}})}_fetchBytes(e,r){return be(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?Fc(n,0):null})}_getAddress(e,r){const n=Mz[String(e)];if(n==null&&Ee.throwError(`unsupported coin type: ${e}`,V.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=Y(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 T6(je([[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 T6(je([[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=E6.toWords(i.slice(2));return a.unshift(o),E6.encode(n.prefix,a)}}return null}getAddress(e){return be(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===A0?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===V.errors.CALL_EXCEPTION)return null;throw i}const r=yield this._fetchBytes("0xf1cb7e06",Av(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&Ee.throwError("invalid or unsupported coin data",V.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return be(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 Ee.throwError("invalid or unsupported content hash data",V.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return be(this,void 0,void 0,function*(){let r=Le(e);r=je([Av(64),Av(r.length),r]),r.length%32!==0&&(r=je([r,Ue("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",J(r));return n==null||n==="0x"?null:ds(n)})}}let Sv=null,Oz=1;class M7 extends oo{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=ei(new.target,"getNetwork")(e);r?(ee(this,"_network",r),this.emit("network",r,null)):Ee.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return be(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||Ee.throwError("no network detected",V.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 Fo(()=>this._ready().then(e=>e,e=>{if(!(e.code===V.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Sv==null&&(Sv=new ae),Sv}static getNetwork(e){return yz(e??"homestead")}ccipReadFetch(e,r,n){return be(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 ru({url:f,errorPassThrough:!0},c,(v,x)=>(v.status=x.statusCode,v));if(u.data)return u.data;const h=u.message||"unknown error";if(u.status>=400&&u.status<500)return Ee.throwError(`response not found during CCIP fetch: ${h}`,V.errors.SERVER_ERROR,{url:l,errorMessage:h});o.push(h)}return Ee.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,V.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return be(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(mf()-s.respTime<=e)return s.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=mf(),n=kt({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=mf();return i=z.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return be(this,void 0,void 0,function*(){const e=Oz++,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)Ee.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",Ee.makeError("network block skew detected",V.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(f=>{f.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=f.blockNumber),this._emitted["b:"+f.blockHash]=f.blockNumber,this._emitted["t:"+f.transactionHash]=f.blockNumber,this.emit(s,f)})}).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 be(this,void 0,void 0,function*(){return Ee.throwError("provider does not support network detection",V.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return be(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 _6(0),this._network;const n=Ee.makeError("underlying network changed",V.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=mf();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 be(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return be(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 f=!1;const c=function(){return f?!0:(f=!0,l.forEach(h=>{h()}),!1)},u=h=>{h.confirmations{this.removeListener(e,u)}),i){let h=i.startBlock,v=null;const x=g=>be(this,void 0,void 0,function*(){f||(yield _6(1e3),this.getTransactionCount(i.from).then(k=>be(this,void 0,void 0,function*(){if(!f){if(k<=i.nonce)h=g;else{{const w=yield this.getTransaction(e);if(w&&w.blockNumber!=null)return}for(v==null&&(v=h-3,v{f||this.once("block",x)}))});if(f)return;this.once("block",x),l.push(()=>{this.removeListener("block",x)})}if(typeof n=="number"&&n>0){const h=setTimeout(()=>{c()||a(Ee.makeError("timeout exceeded",V.errors.TIMEOUT,{timeout:n}))},n);h.unref&&h.unref(),l.push(()=>{clearTimeout(h)})}})})}getBlockNumber(){return be(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return be(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return z.from(e)}catch(r){return Ee.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return be(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield kt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return z.from(i)}catch(s){return Ee.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:s})}})}getTransactionCount(e,r){return be(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield kt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return z.from(i).toNumber()}catch(s){return Ee.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:s})}})}getCode(e,r){return be(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield kt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return J(i)}catch(s){return Ee.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:s})}})}getStorageAt(e,r,n){return be(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield kt({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>Xc(o))}),s=yield this.perform("getStorageAt",i);try{return J(s)}catch(o){return Ee.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:s,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&Pi(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&Ee.throwError("Transaction hash mismatch from Provider.sendTransaction.",V.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(s,o)=>be(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&&Ee.throwError("transaction failed",V.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return be(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(s=>J(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 be(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?z.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?J(s):null))}),this.formatter.transactionRequest(yield kt(n))})}_getFilter(e){return be(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 kt(r))})}_call(e,r,n){return be(this,void 0,void 0,function*(){n>=Tz&&Ee.throwError("CCIP read exceeded maximum redirections",V.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"&&Pi(s)%32===4)try{const o=Lt(s,4),a=Lt(o,0,32);z.from(a).eq(i)||Ee.throwError("CCIP Read sender did not match",V.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:s});const l=[],f=z.from(Lt(o,32,64)).toNumber(),c=z.from(Lt(o,f,f+32)).toNumber(),u=Lt(o,f+32);for(let w=0;wbe(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 be(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return Fo(()=>be(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 be(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return Fo(()=>be(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 be(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield kt({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),ae.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return be(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return be(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&Ee.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 be(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 be(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||Ee.throwError("network does not support ENS",V.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Gf(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return be(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"&&Ee.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return be(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=bd(yield this.call({to:n,data:"0x691f3431"+Gf(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return be(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!==V.errors.CALL_EXCEPTION)throw a}try{const a=bd(yield this.call({to:o,data:"0x691f3431"+Gf(s).substring(2)}),0);r=yield this.getResolver(a)}catch(a){if(a.code!==V.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 Ee.throwError(e+" not implemented",V.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 Rz(Ta(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=Ta(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=Ta(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=Ta(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=Ta(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=Ta(e);this._events=this._events.filter(i=>i.tag!==n?!0:(r.push(i),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var ji=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const Gt=new V(nu),Dz=["call","estimateGas"];function Jf(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=Jf(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return Jf(JSON.parse(t),e)}catch{}return null}function N7(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const s=Jf(e,!0);if(s)return s.data;Gt.throwError("missing revert data in call exception; Transaction reverted without a reason string",V.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let s=Jf(e.body,!1);s==null&&(s=Jf(e,!1)),s&&Gt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",V.errors.UNPREDICTABLE_GAS_LIMIT,{reason:s.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===V.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)&&Gt.throwError("insufficient funds for intrinsic transaction cost",V.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&Gt.throwError("nonce has already been used",V.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Gt.throwError("replacement fee too low",V.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&Gt.throwError("legacy pre-eip-155 transactions not supported",V.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),Dz.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Gt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",V.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function R6(t){return new Promise(function(e){setTimeout(e,t)})}function Bz(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 xf(t){return t&&t.toLowerCase()}const xp={};class O7 extends ss{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)):Gt.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Gt.throwError("cannot alter JSON-RPC Signer connection",V.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Lz(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&&Gt.throwError("unknown account #"+this._index,V.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Jt(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=Jt(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>ji(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&Gt.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),kt({tx:kt(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Gt.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)&&Gt.throwError("user rejected transaction",V.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),N7("sendTransaction",o,s)))})}signTransaction(e){return Gt.throwError("signing transactions is unsupported",V.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return ji(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 Fo(()=>ji(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 ji(this,void 0,void 0,function*(){const r=typeof e=="string"?Le(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[J(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Gt.throwError("user rejected signing",V.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return ji(this,void 0,void 0,function*(){const r=typeof e=="string"?Le(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),J(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Gt.throwError("user rejected signing",V.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return ji(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)&&Gt.throwError("user rejected signing",V.errors.ACTION_REJECTED,{action:"_signTypedData",from:s,messageData:{domain:i.domain,types:r,value:i.value}}),o}})}unlock(e){return ji(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}let Lz=class extends O7{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 $z={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let ba=class extends M7{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=ei(this.constructor,"defaultUrl")()),typeof e=="string"?ee(this,"connection",Object.freeze({url:e})):ee(this,"connection",Object.freeze(Jt(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 ji(this,void 0,void 0,function*(){yield R6(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=ei(this.constructor,"getNetwork");try{return r(z.from(e).toNumber())}catch(n){return Gt.throwError("could not detect network",V.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Gt.throwError("could not detect network",V.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new O7(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:Ii(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const s=ru(this.connection,JSON.stringify(n),Bz).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",[xf(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[xf(r.address),r.blockTag]];case"getCode":return["eth_getCode",[xf(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[xf(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",[ei(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[ei(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=xf(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return ji(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=r.transaction;if(i&&i.type!=null&&z.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const s=yield this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(r=Jt(r),r.transaction=Jt(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&Gt.throwError(e+" not implemented",V.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return N7(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 R6(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=Jt($z);if(r)for(const s in r)r[s]&&(n[s]=!0);Mh(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(s){if(e[s]==null)return;const o=Xc(z.from(e[s]));s==="gasLimit"&&(s="gas"),i[s]=o}),["from","to","data"].forEach(function(s){e[s]!=null&&(i[s]=J(e[s]))}),e.accessList&&(i.accessList=xa(e.accessList)),i}};var Fz=globalThis&&globalThis.__awaiter||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(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const jz=new V(nu);class M0 extends ba{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return Fz(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||jz.throwError("no network detected",V.errors.UNKNOWN_ERROR,{}),this._network==null&&(ee(this,"_network",r),this.emit("network",r,null))),r})}}const M6=new V(nu);let Uz=1;function N6(t,e){const r="Web3LegacyFetcher";return function(n,i){const s={method:n,params:i,id:Uz++,jsonrpc:"2.0"};return new Promise((o,a)=>{this.emit("debug",{action:"request",fetcher:r,request:Ii(s),provider:this}),e(s,(l,f)=>{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:f,provider:this}),f.error){const c=new Error(f.error.message);return c.code=f.error.code,c.data=f.error.data,a(c)}o(f.result)})})}}function zz(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:Ii(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})}}let Vz=class extends ba{constructor(e,r){e==null&&M6.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=zz(e)):e.sendAsync?i=N6(e,e.sendAsync.bind(e)):e.send?i=N6(e,e.send.bind(e)):M6.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 Hz="solidity/5.7.0",Wz=new RegExp("^bytes([0-9]+)$"),qz=new RegExp("^(u?int)([0-9]*)$"),Gz=new RegExp("^(.*)\\[([0-9]*)\\]$"),Kz="0000000000000000000000000000000000000000000000000000000000000000",La=new V(Hz);function D7(t,e,r){switch(t){case"address":return r?Hf(e,32):Y(e);case"string":return Le(e);case"bytes":return Y(e);case"bool":return e=e?"0x01":"0x00",r?Hf(e,32):Y(e)}let n=t.match(qz);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&La.throwArgumentError("invalid number type","type",t),r&&(i=256),e=z.from(e).toTwos(i),Hf(e,i/8)}if(n=t.match(Wz),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&La.throwArgumentError("invalid bytes type","type",t),Y(e).byteLength!==i&&La.throwArgumentError(`invalid value for ${t}`,"value",e),r?Y((e+Kz).substring(0,66)):e}if(n=t.match(Gz),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&La.throwArgumentError(`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(D7(i,a,!0))}),je(o)}return La.throwArgumentError("invalid type","type",t)}function Ae(t,e){t.length!=e.length&&La.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(D7(n,e[i]))}),J(je(r))}function Zi(t,e){return me(Ae(t,e))}function Jz(t,e){return ls(Ae(t,e))}const Qz="units/5.7.0",B7=new V(Qz),L7=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Yz(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&B7.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 $7(t,e){if(typeof e=="string"){const r=L7.indexOf(e);r!==-1&&(e=3*r)}return vd(t,e??18)}function N0(t,e){if(typeof t!="string"&&B7.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=L7.indexOf(e);r!==-1&&(e=3*r)}return ci(t,e??18)}function Xz(t){return $7(t,18)}function bp(t){return N0(t,18)}const Zz=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:Lm,ConstructorFragment:Xn,ErrorFragment:Hi,EventFragment:gi,FormatTypes:Oe,Fragment:xi,FunctionFragment:Zn,HDNode:un,Indexed:k0,Interface:xr,LogDescription:$A,Logger:V,ParamType:ir,RLP:l$,SigningKey:Wo,get SupportedAlgorithm(){return Nl},TransactionDescription:FA,get TransactionTypes(){return up},get UnicodeNormalizationForm(){return Ri},Utf8ErrorFuncs:kA,get Utf8ErrorReason(){return Yr},_TypedDataEncoder:qt,_fetchData:_7,_toEscapedUtf8String:T$,accessListify:xa,arrayify:Y,base58:Ml,base64:G$,checkProperties:Mh,checkResultErrors:vA,commify:Yz,computeAddress:qs,computeHmac:Lc,computePublicKey:Wm,concat:je,deepCopy:Ii,defaultAbiCoder:qr,defaultPath:Ol,defineReadOnly:ee,dnsEncode:OA,entropyToMnemonic:Uh,fetchJson:ru,formatBytes32String:P$,formatEther:Xz,formatUnits:$7,getAccountPath:HU,getAddress:xe,getContractAddress:Nm,getCreate2Address:v$,getIcapAddress:h$,getJsonWalletAddress:XU,getStatic:ei,hashMessage:Dh,hexConcat:Ur,hexDataLength:Pi,hexDataSlice:Lt,hexStripZeros:sA,hexValue:Xc,hexZeroPad:Ue,hexlify:J,id:Ds,isAddress:d$,isBytes:cs,isBytesLike:is,isHexString:Pe,isValidMnemonic:VU,isValidName:gF,joinSignature:rp,keccak256:me,mnemonicToEntropy:jh,mnemonicToSeed:b7,namehash:Gf,nameprep:V$,parseBytes32String:I$,parseEther:bp,parseTransaction:h7,parseUnits:N0,poll:Fo,randomBytes:Ki,recoverAddress:ia,recoverPublicKey:l7,resolveProperties:kt,ripemd160:g7,serializeTransaction:dp,sha256:ls,sha512:OU,shallowCopy:Jt,shuffled:GU,solidityKeccak256:Zi,solidityPack:Ae,soliditySha256:Jz,splitSignature:pa,stripZeros:Ei,toUtf8Bytes:Le,toUtf8CodePoints:E0,toUtf8String:ds,verifyMessage:k7,verifyTypedData:dz,zeroPad:Hf},Symbol.toStringTag,{value:"Module"})),eV=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var tV=Object.freeze({__proto__:null,abi:eV});const rV=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],nV={isValidSignatureBytes32:"0x1626ba7e"};var iV=Object.freeze({__proto__:null,abi:rV,returns:nV});const sV=[{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 oV=Object.freeze({__proto__:null,abi:sV});const aV=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var lV=Object.freeze({__proto__:null,abi:aV});const fV=[{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"}];var cV=Object.freeze({__proto__:null,abi:fV});const uV=[{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 dV=Object.freeze({__proto__:null,abi:uV});const hV=[{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 vV=Object.freeze({__proto__:null,abi:hV});const yV=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var pV=Object.freeze({__proto__:null,abi:yV});const Mr={erc6492:oV,erc5719:tV,erc1271:iV,factory:lV,mainModule:cV,mainModuleUpgradable:dV,sequenceUtils:vV,requireFreshSigner:pV},gV=Object.freeze(Object.defineProperty({__proto__:null,walletContracts:Mr},Symbol.toStringTag,{value:"Module"}));function O0(){return O0=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:O0({},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}),O6=typeof global=="object"?global.fetch:window.fetch;class wd extends F7{constructor(e,r){super(e.endsWith("/")?e.slice(0,-1):e,O6),this._fetch=(n,i)=>{const s={};return this.jwtAuth&&this.jwtAuth.length>0&&(s.Authorization=`BEARER ${this.jwtAuth}`),i.headers=O0({},i.headers,s),O6(n,i)},this.jwtAuth=r,this.fetch=this._fetch}}const EV=Object.freeze(Object.defineProperty({__proto__:null,API:F7,SequenceAPIClient:wd,SmartRampOrderStatus:wV,SmartRampTxnStatus:CV,SortOrder:AV,WebRPCSchemaHash:bV,WebRPCSchemaVersion:xV,WebRPCVersion:mV},Symbol.toStringTag,{value:"Module"})),j7="3.7.5",SV=j7,kV=typeof atob=="function",_V=typeof btoa=="function",ef=typeof Buffer=="function",D6=typeof TextDecoder=="function"?new TextDecoder:void 0,B6=typeof TextEncoder=="function"?new TextEncoder:void 0,TV="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Sf=Array.prototype.slice.call(TV),qu=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(Sf),PV=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,pr=String.fromCharCode.bind(String),L6=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),U7=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),z7=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),V7=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+=Sf[e>>18&63]+Sf[e>>12&63]+Sf[e>>6&63]+Sf[e&63]}return o?s.slice(0,o-3)+"===".substring(o):s},Zm=_V?t=>btoa(t):ef?t=>Buffer.from(t,"binary").toString("base64"):V7,wp=ef?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,i=t.length;ne?U7(wp(t)):wp(t),IV=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?pr(192|e>>>6)+pr(128|e&63):pr(224|e>>>12&15)+pr(128|e>>>6&63)+pr(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return pr(240|e>>>18&7)+pr(128|e>>>12&63)+pr(128|e>>>6&63)+pr(128|e&63)}},RV=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,H7=t=>t.replace(RV,IV),$6=ef?t=>Buffer.from(t,"utf8").toString("base64"):B6?t=>wp(B6.encode(t)):t=>Zm(H7(t)),hl=(t,e=!1)=>e?U7($6(t)):$6(t),F6=t=>hl(t,!0),MV=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,NV=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 pr((r>>>10)+55296)+pr((r&1023)+56320);case 3:return pr((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return pr((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},W7=t=>t.replace(MV,NV),q7=t=>{if(t=t.replace(/\s+/g,""),!PV.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?pr(e>>16&255,e>>8&255):pr(e>>16&255,e>>8&255,e&255);return r},ex=kV?t=>atob(z7(t)):ef?t=>Buffer.from(t,"base64").toString("binary"):q7,G7=ef?t=>L6(Buffer.from(t,"base64")):t=>L6(ex(t).split("").map(e=>e.charCodeAt(0))),K7=t=>G7(J7(t)),OV=ef?t=>Buffer.from(t,"base64").toString("utf8"):D6?t=>D6.decode(G7(t)):t=>W7(ex(t)),J7=t=>z7(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),Cp=t=>OV(J7(t)),DV=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)},Q7=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),Y7=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,Q7(r));t("fromBase64",function(){return Cp(this)}),t("toBase64",function(e){return hl(this,e)}),t("toBase64URI",function(){return hl(this,!0)}),t("toBase64URL",function(){return hl(this,!0)}),t("toUint8Array",function(){return K7(this)})},X7=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,Q7(r));t("toBase64",function(e){return Cd(this,e)}),t("toBase64URI",function(){return Cd(this,!0)}),t("toBase64URL",function(){return Cd(this,!0)})},BV=()=>{Y7(),X7()},oa={version:j7,VERSION:SV,atob:ex,atobPolyfill:q7,btoa:Zm,btoaPolyfill:V7,fromBase64:Cp,toBase64:hl,encode:hl,encodeURI:F6,encodeURL:F6,utob:H7,btou:W7,decode:Cp,isValid:DV,fromUint8Array:Cd,toUint8Array:K7,extendString:Y7,extendUint8Array:X7,extendBuiltins:BV};var Ap=function(){return Ap=Object.assign||function(e){for(var r,n=1,i=arguments.length;n0&&s[s.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!s||f[1]>s[0]&&f[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}(),$V=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}},FV=function(t,e,r){return Ro(void 0,void 0,void 0,function(){var n,i;return Mo(this,function(s){return n=r.messageDigest(),i=k7(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}]})})},jV=function(t,e,r){return Ro(void 0,void 0,void 0,function(){var n,i,s,o,a;return Mo(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 Zl(r.address,s,t),[4,o.isValidSignature(n,Y(r.signature))];case 2:return a=l.sent(),a===UV?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},UV="0x1626ba7e",Z7="1",Ep="eth",zV={name:"ETHAuth",version:Z7},D0=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),Ro(n,void 0,void 0,function(){var o,a,l,f,c,u,h,v,x,g;return Mo(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],f=o[2],c=o[3],u=o[4],a!==Ep)throw new Error("ethauth: not an ethauth proof");return h=oa.decode(f),v=JSON.parse(h),x=new tx({address:l,claims:v,signature:c,extra:u}),[4,this.validateProof(x,s)];case 1:if(g=k.sent(),!g)throw new Error("ethauth: proof is invalid");return[2,x]}})})},this.validateProof=function(i,s){return s===void 0&&(s=!1),Ro(n,void 0,void 0,function(){var o,a;return Mo(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 Ro(n,void 0,void 0,function(){var s,l,o,a,l;return Mo(this,function(f){switch(f.label){case 0:s=[],l=0,f.label=1;case 1:if(!(loa.encode(t,!0),rx=t=>oa.encode(JSON.stringify(t),!0),HV=t=>{if(t!=null)return oa.decode(t)},nx=t=>{if(t!=null)return JSON.parse(oa.decode(t))};function eE(t){return t!=null&&(z.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Pe(t)||typeof t=="bigint"||cs(t))}const ix=t=>Y(me(typeof t=="string"?Le(t):t)),tE=(t,e,r)=>Ae(["string","uint256","address","bytes32"],["",e,t,r]),Sp=(t,e,r)=>me(tE(t,e,r)),rE=()=>typeof window>"u"&&typeof process=="object",WV=()=>!rE(),nE=t=>{const e=t.split(".");if(e.length!==3)throw new Error("invalid jwt");return JSON.parse(oa.decode(e[1]))};function B0(){return B0=Object.assign?Object.assign.bind():function(t){for(var e=1;efe.configure(t),Dl=t=>({url:t,skipFetchSetup:!0,fetchOptions:{mode:"cors",cache:"force-cache",credentials:"same-origin",redirect:"follow",referrer:"client"}});let GV=class{constructor(){this.cache=new Map}do(e,r,n,...i){e=`${e}:${me(Le(JSON.stringify(i,KV)))}`;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 KV(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function sx(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 JV(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function QV(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 ox=(t=0,e=Number.MAX_SAFE_INTEGER)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),sE=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},oE=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},aE=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},YV=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),lE=t=>{const e=B0({},t.types);return delete e.EIP712Domain,qt.hash(t.domain,e,t.message)},Vh=t=>Y(lE(t)),{defineReadOnly:XV,getStatic:ZV,resolveProperties:kp,checkProperties:eH,shallowCopy:L0,deepCopy:tH}=Zz,rH=t=>t.replace(/([^:]\/)\/+/g,"$1"),nH=Object.freeze(Object.defineProperty({__proto__:null,Logger:iE,PromiseCache:GV,base64Decode:HV,base64DecodeObject:nx,base64Encode:VV,base64EncodeObject:rx,checkProperties:eH,configureLogger:qV,deepCopy:tH,defineReadOnly:XV,encodeMessageDigest:ix,encodeTypedDataDigest:Vh,encodeTypedDataHash:lE,getDefaultConnectionInfo:Dl,getRandomInt:ox,getStatic:ZV,isBigNumberish:eE,isBrowser:WV,isNode:rE,jwtDecodeClaims:nE,logger:fe,packMessageData:tE,promisify:sx,queryStringFromObject:JV,queryStringToObject:QV,resolveProperties:kp,sanitizeAlphanumeric:oE,sanitizeHost:aE,sanitizeNumberString:sE,shallowCopy:L0,sleep:YV,subDigestOf:Sp,urlClean:rH},Symbol.toStringTag,{value:"Module"}));function Vt(){return Vt=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="number"?t:t.chainId?t.chainId:z.from(t).toNumber(),Sn=t=>{if(t)return ax(t)},fE=(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(f=>f.chainId).sort(),s=i.filter((f,c)=>i.indexOf(f)!==c);if(s.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${s}`);return!1}n.forEach(f=>f.name=f.name.toLowerCase());const o=n.map(f=>f.name).sort(),a=o.filter((f,c)=>o.indexOf(f)!==c);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let f=0;f(fE(t,!0,e),t),sH=(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},cE=(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)}},uE=t=>lx(fx(t)),Vi=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=z.from(e).toNumber();return t.find(n=>n.chainId===r)}else return t.find(r=>r.name===e||`${r.chainId}`===e);else return typeof e=="number"?t.find(r=>r.chainId===e):e.chainId?t.find(r=>r.chainId===e.chainId):void 0},oH=(t,e)=>t?t.name===e||t.chainId===e:!1,aH=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},Hh=(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})):"";let se=function(t){return t[t.MAINNET=1]="MAINNET",t[t.ROPSTEN=3]="ROPSTEN",t[t.RINKEBY=4]="RINKEBY",t[t.GOERLI=5]="GOERLI",t[t.KOVAN=42]="KOVAN",t[t.POLYGON=137]="POLYGON",t[t.POLYGON_MUMBAI=80001]="POLYGON_MUMBAI",t[t.POLYGON_ZKEVM=1101]="POLYGON_ZKEVM",t[t.BSC=56]="BSC",t[t.BSC_TESTNET=97]="BSC_TESTNET",t[t.OPTIMISM=10]="OPTIMISM",t[t.OPTIMISM_TESTNET=69]="OPTIMISM_TESTNET",t[t.ARBITRUM=42161]="ARBITRUM",t[t.ARBITRUM_GOERLI=421613]="ARBITRUM_GOERLI",t[t.ARBITRUM_NOVA=42170]="ARBITRUM_NOVA",t[t.AVALANCHE=43114]="AVALANCHE",t[t.AVALANCHE_TESTNET=43113]="AVALANCHE_TESTNET",t[t.FANTOM=250]="FANTOM",t[t.FANTOM_TESTNET=4002]="FANTOM_TESTNET",t[t.GNOSIS=100]="GNOSIS",t[t.AURORA=1313161554]="AURORA",t[t.AURORA_TESTNET=1313161556]="AURORA_TESTNET",t[t.BASE_GOERLI=84531]="BASE_GOERLI",t[t.HARDHAT=31337]="HARDHAT",t[t.HARDHAT_2=31338]="HARDHAT_2",t[t.HOMEVERSE_TESTNET=40875]="HOMEVERSE_TESTNET",t}({});const dE=t=>Hh("https://${network}-indexer.sequence.app",{network:t}),hE=t=>Hh("https://${network}-relayer.sequence.app",{network:t}),vE=t=>Hh("https://nodes.sequence.app/${network}",{network:t}),Ht={[se.MAINNET]:{chainId:se.MAINNET,name:"mainnet",title:"Ethereum",blockExplorer:{name:"Etherscan",rootUrl:"https://etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[se.ROPSTEN]:{chainId:se.ROPSTEN,name:"ropsten",title:"Ropsten",testnet:!0,blockExplorer:{name:"Etherscan (Ropsten)",rootUrl:"https://ropsten.etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[se.RINKEBY]:{chainId:se.RINKEBY,name:"rinkeby",title:"Rinkeby",testnet:!0,blockExplorer:{name:"Etherscan (Rinkeby)",rootUrl:"https://rinkeby.etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",disabled:!0},[se.GOERLI]:{chainId:se.GOERLI,name:"goerli",title:"Goerli",testnet:!0,blockExplorer:{name:"Etherscan (Goerli)",rootUrl:"https://goerli.etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[se.KOVAN]:{chainId:se.KOVAN,name:"kovan",title:"Kovan",testnet:!0,blockExplorer:{name:"Etherscan (Kovan)",rootUrl:"https://kovan.etherscan.io/"}},[se.POLYGON]:{chainId:se.POLYGON,name:"polygon",title:"Polygon",blockExplorer:{name:"Polygonscan",rootUrl:"https://polygonscan.com/"},isDefaultChain:!0,isAuthChain:!0},[se.POLYGON_MUMBAI]:{chainId:se.POLYGON_MUMBAI,name:"mumbai",title:"Polygon Mumbai",testnet:!0,blockExplorer:{name:"Polygonscan (Mumbai)",rootUrl:"https://mumbai.polygonscan.com/"}},[se.POLYGON_ZKEVM]:{chainId:se.POLYGON_ZKEVM,name:"polygon-zkevm",title:"Polygon zkEVM",blockExplorer:{name:"Polygonscan (zkEVM)",rootUrl:"https://zkevm.polygonscan.com/"}},[se.BSC]:{chainId:se.BSC,name:"bsc",title:"BNB Smart Chain",blockExplorer:{name:"BSCScan",rootUrl:"https://bscscan.com/"}},[se.BSC_TESTNET]:{chainId:se.BSC_TESTNET,name:"bsc-testnet",title:"BNB Smart Chain Testnet",testnet:!0,blockExplorer:{name:"BSCScan (Testnet)",rootUrl:"https://testnet.bscscan.com/"}},[se.OPTIMISM]:{chainId:se.OPTIMISM,name:"optimism",title:"Optimism",blockExplorer:{name:"Etherscan (Optimism)",rootUrl:"https://optimistic.etherscan.io/"}},[se.OPTIMISM_TESTNET]:{chainId:se.OPTIMISM_TESTNET,name:"optimism-testnet",title:"Optimistic Kovan",testnet:!0,blockExplorer:{name:"Etherscan (Optimism Testnet)",rootUrl:"https://kovan-optimistic.etherscan.io/"}},[se.ARBITRUM]:{chainId:se.ARBITRUM,name:"arbitrum",title:"Arbitrum One",blockExplorer:{name:"Arbiscan",rootUrl:"https://arbiscan.io/"}},[se.ARBITRUM_GOERLI]:{chainId:se.ARBITRUM_GOERLI,name:"arbitrum-goerli",title:"Arbitrum Goerli",testnet:!0,blockExplorer:{name:"Arbiscan (Testnet)",rootUrl:"https://testnet.arbiscan.io/"}},[se.ARBITRUM_NOVA]:{chainId:se.ARBITRUM_NOVA,name:"arbitrum-nova",title:"Arbitrum Nova",blockExplorer:{name:"Nova Explorer",rootUrl:"https://nova-explorer.arbitrum.io/"}},[se.AVALANCHE]:{chainId:se.AVALANCHE,name:"avalanche",title:"Avalanche",blockExplorer:{name:"Snowtrace",rootUrl:"https://snowtrace.io/"}},[se.AVALANCHE_TESTNET]:{chainId:se.AVALANCHE_TESTNET,name:"avalanche-testnet",title:"Avalanche Testnet",testnet:!0,blockExplorer:{name:"Snowtrace (Testnet)",rootUrl:"https://testnet.snowtrace.io/"}},[se.FANTOM]:{chainId:se.FANTOM,name:"fantom",title:"Fantom",blockExplorer:{name:"FTMScan",rootUrl:"https://ftmscan.com/"}},[se.FANTOM_TESTNET]:{chainId:se.FANTOM_TESTNET,name:"fantom-testnet",title:"Fantom Testnet",testnet:!0,blockExplorer:{name:"FTMScan (Testnet)",rootUrl:"https://testnet.ftmscan.com/"}},[se.GNOSIS]:{chainId:se.GNOSIS,name:"gnosis",title:"Gnosis Chain",blockExplorer:{name:"Gnosis Chain Explorer",rootUrl:"https://blockscout.com/xdai/mainnet/"}},[se.AURORA]:{chainId:se.AURORA,name:"aurora",title:"Aurora",blockExplorer:{name:"Aurora Explorer",rootUrl:"https://aurorascan.dev/"}},[se.AURORA_TESTNET]:{chainId:se.AURORA_TESTNET,name:"aurora-testnet",title:"Aurora Testnet",blockExplorer:{name:"Aurora Explorer (Testnet)",rootUrl:"https://testnet.aurorascan.dev/"}},[se.BASE_GOERLI]:{chainId:se.BASE_GOERLI,name:"base-goerli",title:"Base Goerli",blockExplorer:{name:"Base Goerli Explorer",rootUrl:"https://goerli.basescan.org/"}},[se.HARDHAT]:{chainId:se.HARDHAT,name:"hardhat",title:"Hardhat (local testnet)"},[se.HARDHAT_2]:{chainId:se.HARDHAT_2,name:"hardhat2",title:"Hardhat (local testnet)"},[se.HOMEVERSE_TESTNET]:{chainId:se.HOMEVERSE_TESTNET,name:"homeverse-testnet",title:"Oasys Homeverse Testnet",blockExplorer:{name:"Oasys Homeverse Explorer (Testnet)",rootUrl:"https://explorer.testnet.oasys.homeverse.games/"}}};function cx(t){return Vi(pE,t)}function yE(t){return z.isBigNumber(t)?t:eE(t)?z.from(t):z.from(t.chainId)}const Er=t=>{const e=vE(t);return{rpcUrl:e,relayer:{url:hE(t),provider:{url:e}},indexerUrl:dE(t)}},pE=uE([Vt({},Ht[se.MAINNET],Er("mainnet")),Vt({},Ht[se.POLYGON],Er("polygon")),Vt({},Ht[se.BSC],Er("bsc")),Vt({},Ht[se.AVALANCHE],Er("avalanche")),Vt({},Ht[se.ARBITRUM],Er("arbitrum")),Vt({},Ht[se.ARBITRUM_NOVA],Er("arbitrum-nova")),Vt({},Ht[se.OPTIMISM],Er("optimism")),Vt({},Ht[se.POLYGON_ZKEVM],Er("polygon-zkevm")),Vt({},Ht[se.GNOSIS],Er("gnosis")),Vt({},Ht[se.RINKEBY],Er("rinkeby")),Vt({},Ht[se.GOERLI],Er("goerli")),Vt({},Ht[se.POLYGON_MUMBAI],Er("mumbai")),Vt({},Ht[se.BSC_TESTNET],Er("bsc-testnet")),Vt({},Ht[se.ARBITRUM_GOERLI],Er("arbitrum-goerli")),Vt({},Ht[se.BASE_GOERLI],Er("base-goerli")),Vt({},Ht[se.HOMEVERSE_TESTNET],Er("homeverse-testnet")),Vt({},Ht[se.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),Vt({},Ht[se.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]),Bl="2.0";class Qf{constructor(e,r){this.sender=r,e&&this.setMiddleware(e)}setMiddleware(e){this.handler=gE(e,this.sender.sendAsync)}sendAsync(e,r,n){try{this.handler(e,r,n)}catch(i){r(i,void 0)}}}const gE=(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 mE(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 xE(t){return t!==void 0&&t.sendAsync!==void 0}let lH=0;class aa{constructor(e,r){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,mE(e)?this.send=e.send.bind(e):xE(e)?this.send=(n,i,s)=>new Promise((o,a)=>{e.sendAsync({jsonrpc:Bl,id:++lH,method:n,params:i},(l,f)=>{l?a(l):o(f?f.result:void 0)},s||this.defaultChainId)}):this.send=e,this.request=(n,i)=>this.send(n.method,n.params,i)}}class fH{constructor(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,this.provider=e}}class cH{constructor(e){e?this.isAllowedFunc=e:this.isAllowedFunc=r=>!0,this.sendAsyncMiddleware=$0(this.isAllowedFunc)}setIsAllowedFunc(e){this.isAllowedFunc=e,this.sendAsyncMiddleware=$0(this.isAllowedFunc)}}const $0=t=>e=>(r,n,i)=>{if(!t(r))throw new Error("allowProvider middleware precondition is unmet.");e(r,n,i)};class F0{constructor(e){this.cachableJsonRpcMethods=["net_version","eth_chainId","eth_accounts","sequence_getWalletContext","sequence_getNetworks"],this.cachableJsonRpcMethodsByBlock=["eth_call","eth_getCode"],this.cacheByBlockResetLock=!1,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 f=this.cacheKey(n.method,n.params,l||this.defaultChainId);this.cachableJsonRpcMethods.includes(n.method)?this.setCacheValue(f,a.result):this.setCacheByBlockValue(f,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 j0{constructor(e){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:J(this.options.chainId)});return}break;case"eth_accounts":if(this.options.accountAddress){i(void 0,{jsonrpc:"2.0",id:o,result:[xe(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 Ad=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)},Ed=t=>(e,r,n)=>{const i=n?` chainId:${n}`:"";fe.info(`[provider request]${i} id:${e.id} method:${e.method} params:`,e.params),t(e,(s,o)=>{s?fe.warn(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"error:",s):fe.info(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"response:",o),r(s,o)},n)},bE=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:J(s)});return}e(r,n,i)},wE=["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 _p{constructor(e){this.sendAsyncMiddleware=r=>(n,i,s)=>{if(wE.includes(n.method)){this.provider.sendAsync(n,i,s);return}r(n,i,s)},this.provider=e}}class uH{constructor(e){this.privateJsonRpcMethods=["net_version","eth_chainId","eth_accounts",...wE],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}fe.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 ba(e))}}class CE{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.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 f=0;f{let i="";return n?i=`${n}:${e}:`:i=`:${e}:`,!r||r.length===0?i+"[]":i+JSON.stringify(r)},this.inflight={}}}class dH extends ba{constructor(e,r){super(e,r==null?void 0:r.chainId),this.send=(a,l)=>this._sender.send(a,l),this.fetch=(a,l)=>{const f={method:a,params:l,id:this._nextId++,jsonrpc:"2.0"};return ru(this.connection,JSON.stringify(f),hH).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 Qf(i??[new j0({chainId:n}),new CE,new F0({defaultChainId:n,blockCache:s})],new aa(this.fetch,n));this._sender=new aa(o,n)}async getNetwork(){const e=this._chainId;if(e){const r=Ht[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=z.from(r).toNumber(),this.getNetwork()}}}function hH(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 vH=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:cH,CachedProvider:F0,ChainId:se,EagerProvider:j0,JsonRpcExternalProvider:fH,JsonRpcProvider:dH,JsonRpcRouter:Qf,JsonRpcSender:aa,JsonRpcVersion:Bl,PublicProvider:uH,SigningProvider:_p,SingleflightMiddleware:CE,allNetworks:pE,allowProviderMiddleware:$0,checkNetworkConfig:oH,createJsonRpcMiddlewareStack:gE,ensureUniqueNetworks:sH,ensureValidNetworks:lx,exceptionProviderMiddleware:Ad,findNetworkConfig:Vi,findSupportedNetwork:cx,getChainId:ax,indexerURL:dE,isJsonRpcHandler:xE,isJsonRpcProvider:mE,isNetworkConfig:iH,isValidNetworkConfig:fE,loggingProviderMiddleware:Ed,maybeChainId:Sn,networkProviderMiddleware:bE,networks:Ht,networksIndex:aH,nodesURL:vE,relayerURL:hE,sortNetworks:fx,stringTemplate:Hh,toChainIdNumber:yE,updateNetworkConfig:cE,validateAndSortNetworks:uE},Symbol.toStringTag,{value:"Module"}));function Pr(){return Pr=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(dx(i))return Ae(["uint8","uint8","address"],[Go.Address,i.weight,i.address]);if(i.isDynamic){const s=Y(i.signature);return Ae(["uint8","uint8","address","uint16","bytes"],[Go.DynamicSignature,i.weight,i.address,s.length,s])}return Ae(["uint8","uint8","bytes"],[Go.EOASignature,i.weight,i.signature])});return Ae(["uint16",...new Array(n.length).fill("bytes")],[r,...n])}async function TE(t,e,r){const n=iu(e),i=await Promise.all(t.signers.map(async s=>{if(dx(s))return s;if(s.isDynamic){if(!s.address)throw new Error("Dynamic signature part must have address");if(!ux(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:su(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 Yf(t,e,r,n){if(r.length!==0)throw new Error("Explicit subdigests not supported on v1");let i=z.from(0);const s=t.signers.map(a=>{if(!e.has(a.address))return a;const l=e.get(a.address),f=Y(l.signature);return i=i.add(a.weight),l.isDynamic||f.length!==66?Pr({},a,{isDynamic:!0,signature:l.signature,address:a.address}):Pr({},a,{isDynamic:!1,signature:l.signature})});return{encoded:hx({version:1,threshold:t.threshold,signers:s}),weight:i}}const vx={decode:t=>_E(t),encode:t=>hx(t),trim:async t=>t,supportsNoChainId:!0,recover:(t,e,r)=>TE(t,e,r),encodeSigners:(t,e,r,n)=>Yf(t,e,r),hasEnoughSigningPower:(t,e)=>{const{weight:r}=vx.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 AH=Object.freeze({__proto__:null,SignaturePartType:Go,isAddressMember:dx,isUnrecoveredSignatureMember:SE,isUnrecoveredSignature:kE,decodeSignature:_E,encodeSignature:hx,recoverSignature:TE,encodeSigners:Yf,SignatureCoder:vx});const yx={isWalletConfig:t=>t.version===1&&t.threshold!==void 0&&t.signers!==void 0,imageHashOf:t=>t.signers.reduce((e,r)=>me(qr.encode(["bytes32","uint8","address"],[e,r.weight,r.address])),Ae(["uint256"],[t.threshold])),hasSubdigest:(t,e)=>!1,isComplete:t=>!0,checkpointOf:t=>z.from(0),signersOf:t=>t.signers.map(e=>({address:e.address,weight:z.from(e.weight).toNumber()})),fromSimple:t=>{if(!ze.eq(t.checkpoint))throw new Error("v1 wallet config does not support checkpoint");return{version:1,threshold:t.threshold,signers:t.signers}},update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new xr([...Mr.mainModule.abi,...Mr.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"),[yx.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:z.from(r.weight).toString(),address:r.address}));return JSON.stringify({version:t.version,threshold:z.from(t.threshold).toString(),signers:e})},fromJSON:function(t){const e=JSON.parse(t),r=e.signers.map(n=>({weight:z.from(n.weight),address:n.address}));return{version:e.version,threshold:z.from(e.threshold),signers:r}},editConfig:function(t,e){var r;const n=t.signers.slice();if(e.checkpoint&&!ze.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}=Yf(t,r,[]);if(a.gte(t.threshold))return o}const n=t.signers;for(const{address:i}of n.sort(({weight:s},{weight:o})=>z.from(s).sub(o).toNumber())){const s="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(i,{signature:s,isDynamic:!1});const{encoded:o,weight:a}=Yf(t,r,[]);if(a.gte(t.threshold))return o}return Yf(t,r,[]).encoded}};var EH=Object.freeze({__proto__:null,ConfigCoder:yx});const PE=1,SH={version:PE,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Wi=Object.freeze({__proto__:null,config:EH,signature:AH,version:PE,DeployedWalletContext:SH});const px="0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1";function IE(t){return me(RE(t))}function RE(t){return Ae(["bytes32","bytes32"],[px,t])}function ME(t){const e=Y(t);if(e.length===64&&J(e.slice(0,32))===px)return J(e.slice(32,64))}function kH(t){return ME(t)!==void 0}var _H=Object.freeze({__proto__:null,SetImageHashPrefix:px,hashSetImageHash:IE,messageSetImageHash:RE,decodeMessageSetImageHash:ME,isMessageSetImageHash:kH});let lr=function(t){return t[t.Legacy=0]="Legacy",t[t.Dynamic=1]="Dynamic",t[t.NoChainIdDynamic=2]="NoChainIdDynamic",t[t.Chained=3]="Chained",t}({}),$t=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 U0=66;function la(t){return t.left!==void 0&&t.right!==void 0}function tf(t){return t.tree!==void 0}function ou(t){return t.unrecovered&&t.signature!==void 0&&t.isDynamic!==void 0}function z0(t){let e=Y(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 $t.Signature:{const s=e[0],o=J(e.slice(1,U0+1));r=n(r,{signature:o,weight:s,unrecovered:!0,isDynamic:!1}),e=e.slice(U0+1)}break;case $t.Address:{const s=e[0],o=xe(J(e.slice(1,21)));r=n(r,{address:o,weight:s}),e=e.slice(21)}break;case $t.DynamicSignature:{const s=e[0],o=xe(J(e.slice(1,21))),a=e[21]<<16|e[22]<<8|e[23],l=J(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 $t.Node:{const s=J(e.slice(0,32));r=n(r,{nodeHash:s}),e=e.slice(32)}break;case $t.Branch:{const s=e[0]<<16|e[1]<<8|e[2],o=z0(e.slice(3,3+s));r=n(r,o),e=e.slice(3+s)}break;case $t.Subdigest:{const s=J(e.slice(0,32));r=n(r,{subdigest:s}),e=e.slice(32)}break;case $t.Nested:{const s=e[0],o=e[1]<<8|e[2],a=e[3]<<16|e[4]<<8|e[5],l=z0(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}: ${J(e)}`)}}if(!r)throw new Error("Empty signature tree");return r.right?r:r.left}class NE extends Error{constructor(e){super(`Invalid signature leaf: ${JSON.stringify(e)}`),this.leaf=e}}async function Ko(t,e,r){if(la(t)){const[n,i]=await Promise.all([Ko(t.left,e,r),Ko(t.right,e,r)]);return{left:n,right:i}}if(tf(t))return{weight:t.weight,threshold:t.threshold,tree:await Ko(t.tree,e,r)};if(ou(t))if(t.isDynamic){if(!t.address)throw new Error("Dynamic signature leaf without address");if(!await ux(t.address,e,t.signature,r))throw new NE(t);return{weight:t.weight,address:t.address,signature:t.signature,subdigest:e}}else return{weight:t.weight,address:su(e,t.signature),signature:t.signature,subdigest:e};return t}const Sr={concat:(t,e)=>Ae(["bytes","bytes"],[t,e]),node:t=>Ae(["uint8","bytes32"],[$t.Node,t]),branch:t=>{const e=Y(t);return Ae(["uint8","uint24","bytes"],[$t.Branch,e.length,e])},nested:(t,e,r)=>{const n=Y(r);return Ae(["uint8","uint8","uint16","uint24","bytes"],[$t.Nested,t,e,n.length,n])},subdigest:t=>Ae(["uint8","bytes32"],[$t.Subdigest,t]),signature:(t,e)=>Ae(["uint8","uint8","bytes"],[$t.Signature,t,e]),dynamicSignature:(t,e,r)=>{const n=Y(r);return Ae(["uint8","uint8","address","uint24","bytes"],[$t.DynamicSignature,t,e,n.length,n])},address:(t,e)=>Ae(["uint8","uint8","address"],[$t.Address,t,e])};function Xf(t,e,r,n,i={}){const s=Zf(t.tree,e,r,i);return z.from(n).isZero()?{encoded:Ae(["uint8","uint16","uint32","bytes"],[lr.NoChainIdDynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:z.from(t.threshold).gt(255)?{encoded:Ae(["uint8","uint16","uint32","bytes"],[lr.Dynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:{encoded:Ae(["uint8","uint8","uint32","bytes"],[lr.Legacy,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}}function Zf(t,e,r,n={}){const i=!n.disableTrim;if(li(t)){const s=Zf(t.left,e,r),o=Zf(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:Sr.node(dn(t)),weight:ze}:i&&o.weight.eq(0)&&!l?{encoded:Sr.concat(s.encoded,Sr.node(dn(t.right))),weight:s.weight}:i&&s.weight.eq(0)&&!a?{encoded:Sr.concat(Sr.node(dn(t.left)),Sr.branch(o.encoded)),weight:o.weight}:{encoded:Sr.concat(s.encoded,Sr.branch(o.encoded)),weight:s.weight.add(o.weight)}}if(vs(t)){const s=Zf(t.tree,e,r);return i&&s.weight.eq(0)?{encoded:Sr.node(dn(t)),weight:ze}:{encoded:Sr.nested(t.weight,t.threshold,s.encoded),weight:s.weight}}if(ys(t))return{encoded:Sr.node(dn(t)),weight:ze};if(hs(t)){const s=r.includes(t.subdigest);return{encoded:Sr.node(dn(t)),weight:s?AA:ze}}if(Wr(t))if(e.has(t.address)){const o=e.get(t.address),a=o.signature;return n.forceDynamicEncoding||o.isDynamic?{encoded:Sr.dynamicSignature(t.weight,t.address,a),weight:z.from(t.weight)}:{encoded:Sr.signature(t.weight,a),weight:z.from(t.weight)}}else return{encoded:Sr.address(t.weight,t.address),weight:ze};throw new Error(`Invalid topology - unknown error: ${JSON.stringify(t)}`)}function gx(t){return xx(t)?gx(t.suffix[t.suffix.length-1]):t.config}function mx(t){return t.type!==void 0&&t.decoded!==void 0&&t.version!==void 0&&t.version===2}function au(t){return t.suffix!==void 0&&Array.isArray(t.suffix)&&t.suffix.every(mx)}function OE(t){return t.type!==void 0&&t.config!==void 0&&t.digest!==void 0&&t.version!==void 0&&t.version===2}function xx(t){return t.chain!==void 0&&Array.isArray(t.chain)&&t.chain.every(OE)}function Wh(t){const e=Y(t),r=e[0];switch(r){case lr.Legacy:return{version:2,type:lr.Legacy,decoded:Sd(e)};case lr.Dynamic:return{version:2,type:lr.Dynamic,decoded:Sd(e.slice(1))};case lr.NoChainIdDynamic:return{version:2,type:lr.NoChainIdDynamic,decoded:Sd(e.slice(1))};case lr.Chained:return DE(e);default:throw new Error(`Invalid signature type: ${r}`)}}function Sd(t){const e=Y(t),r=e[0]<<8|e[1],n=e[2]<<24|e[3]<<16|e[4]<<8|e[5],i=z0(e.slice(6));return{threshold:r,checkpoint:n,tree:i}}function DE(t){const e=Y(t),r=e[0];if(r!==lr.Chained)throw new Error(`Expected chained signature type: ${r}`);const n=[];let i=1;for(;iY(Ks(s))),i=Ae(n.map(()=>["uint24","bytes"]).flat(),n.map(s=>[s.length,s]).flat());return Ae(["uint8","bytes"],[lr.Chained,i])}function Ks(t){if(is(t))return J(t);if(au(t)||xx(t))return qh(Ks(t),(t.suffix||[]).map(Ks));const e=mx(t)?t.decoded:t.config;switch(t.type){case lr.Legacy:if(z.from(e.threshold).gt(255))throw new Error(`Legacy signature threshold is too large: ${e.threshold} (max 255)`);return Tp(e);case lr.NoChainIdDynamic:case lr.Dynamic:return Ae(["uint8","bytes"],[t.type,Tp(e)]);case lr.Chained:throw new Error("Unreachable code: Chained signature should be handled above");default:throw new Error(`Invalid signature type: ${t.type}`)}}function Tp(t){return Ae(["uint16","uint32","bytes"],[t.threshold,t.checkpoint,ec(t.tree)])}function ec(t){if(li(t)||la(t)){const e=Y(ec(t.right)),r=Y(ec(t.left));return li(t.right)||la(t.right)?Ae(["bytes","uint8","uint24","bytes"],[r,$t.Branch,e.length,e]):Ae(["bytes","bytes"],[r,e])}if(vs(t)||tf(t)){const e=Y(ec(t.tree));return Ae(["uint8","uint8","uint16","uint24","bytes"],[$t.Nested,t.weight,t.threshold,e.length,e])}if(ou(t)||Wr(t)&&t.signature!==void 0){const e=Y(t.signature);if(t.isDynamic||e.length!==U0){if(!t.address)throw new Error("Dynamic signature leaf must have address");return Ae(["uint8","uint8","address","uint24","bytes"],[$t.DynamicSignature,t.weight,t.address,e.length,e])}else return Ae(["uint8","uint8","bytes"],[$t.Signature,t.weight,e])}if(Wr(t))return Ae(["uint8","uint8","address"],[$t.Address,t.weight,t.address]);if(ys(t))return Ae(["uint8","bytes32"],[$t.Node,t.nodeHash]);if(hs(t))return Ae(["uint8","bytes32"],[$t.Subdigest,t.subdigest]);throw new Error(`Unknown signature tree type: ${t}`)}function tc(t){return li(t)?[...tc(t.left),...tc(t.right)]:vs(t)?tc(t.tree):Wr(t)&&t.signature?[{address:t.address,signature:t.signature}]:[]}function rc(t){return la(t)?[...rc(t.left),...rc(t.right)]:tf(t)?rc(t.tree):ou(t)?[t.signature]:[]}function kd(t){return la(t)?[...kd(t.left),...kd(t.right)]:tf(t)?kd(t.tree):hs(t)?[t.subdigest]:[]}async function V0(t){const e=typeof t=="string"?Wh(t):t;if(au(e)){const n=await Promise.all([V0(Pr({},e,{suffix:void 0})),...e.suffix.map(i=>V0(i))]);return qh(n[0],n.slice(1))}const{trimmed:r}=await nc(e.decoded.tree);return Ks(Pr({},e,{decoded:Pr({},e.decoded,{tree:r})}))}async function nc(t,e=!0){if(la(t)){const[r,n]=await Promise.all([nc(t.left),nc(t.right)]);if(r.weight===0&&n.weight===0)try{const i=await Ko(t,A0,void 0);return{weight:0,trimmed:{nodeHash:dn(i)}}}catch{}else return{weight:r.weight+n.weight,trimmed:{left:r.trimmed,right:n.trimmed}}}if(tf(t)){const r=await nc(t.tree);if(r.weight===0)try{const n=await Ko(t,A0,void 0);return{weight:0,trimmed:{nodeHash:dn(n)}}}catch{}return{weight:r.weight,trimmed:{weight:t.weight,threshold:t.threshold,tree:r.trimmed}}}return ys(t)&&FE(t.nodeHash)?{weight:0,trimmed:Pr({},$E(t.nodeHash))}:ou(t)||Wr(t)&&t.signature!==void 0?{weight:z.from(t.weight).toNumber(),trimmed:t}:!e&&hs(t)?{weight:1/0,trimmed:t}:{weight:0,trimmed:t}}const Gh={decode:t=>Wh(t),encode:t=>Ks(t),trim:t=>V0(t),supportsNoChainId:!0,recover:(t,e,r)=>bx(t,e,r),encodeSigners:(t,e,r,n)=>Xf(t,e,r,n),hasEnoughSigningPower:(t,e)=>{const{weight:r}=Gh.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{const r=e.reverse(),n=is(t)?t:Ks(t),i=r.map(s=>is(s)?s:Ks(s));return qh(n,i)},hashSetImageHash:function(t){return IE(t)},signaturesOf(t){return tc(t.tree)},signaturesOfDecoded:function(t){return rc(t.decoded.tree)}};var TH=Object.freeze({__proto__:null,SignatureType:lr,SignaturePartType:$t,SignaturePartTypeLength:U0,isUnrecoveredNode:la,isUnrecoveredNestedLeaf:tf,isUnrecoveredSignatureLeaf:ou,decodeSignatureTree:z0,InvalidSignatureLeafError:NE,recoverTopology:Ko,partEncoder:Sr,encodeSigners:Xf,encodeTree:Zf,deepestConfigOfSignature:gx,isUnrecoveredSignature:mx,isUnrecoveredChainedSignature:au,isSignature:OE,isChainedSignature:xx,decodeSignature:Wh,decodeSignatureBody:Sd,decodeChainedSignature:DE,setImageHashStruct:BE,recoverSignature:bx,encodeChain:qh,encodeSignature:Ks,encodeSignatureBody:Tp,encodeSignatureTree:ec,signaturesOf:tc,signaturesOfDecoded:rc,subdigestsOfDecoded:kd,trimSignature:V0,trimUnrecoveredTree:nc,SignatureCoder:Gh});function Wr(t){return t.address!==void 0&&t.weight!==void 0}function hs(t){return t.subdigest!==void 0&&t.address===void 0}function ic(t){return li(t)?JSON.stringify({left:ic(t.left),right:ic(t.right)}):vs(t)?JSON.stringify({weight:z.from(t.weight).toString(),threshold:z.from(t.threshold).toString(),tree:ic(t.tree)}):Wr(t)?JSON.stringify({address:t.address,weight:z.from(t.weight).toString()}):JSON.stringify(t)}function sc(t){const e=typeof t=="string"?JSON.parse(t):t;return e.left!==void 0&&e.right!==void 0?{left:sc(e.left),right:sc(e.right)}:e.weight!==void 0&&e.threshold!==void 0&&e.tree!==void 0?{weight:z.from(e.weight),threshold:z.from(e.threshold),tree:sc(e.tree)}:e.address!==void 0&&e.weight!==void 0?{address:e.address,weight:z.from(e.weight)}:e}function vs(t){return t.tree!==void 0&&t.weight!==void 0&&t.threshold!==void 0}function ys(t){return t.nodeHash!==void 0}function wx(t){return Wr(t)||hs(t)||vs(t)||ys(t)}function li(t){return t.left!==void 0&&t.right!==void 0}function PH(t){return li(t)||wx(t)}function LE(t){return Ae(["uint96","address"],[t.weight,t.address])}function $E(t){const e=Y(t);if(e.length!==32)throw new Error("Invalid encoded string length");const r=z.from(e.slice(0,12)),n=xe(J(e.slice(12)));return{weight:r,address:n}}function FE(t){const e=Y(t);return e.length!==32?!1:e.slice(0,11).every(n=>n===0)}function dn(t){if(Wr(t))return LE(t);if(hs(t))return Zi(["string","bytes32"],[`Sequence static digest: `,t.subdigest]);if(vs(t)){const e=dn(t.tree);return Zi(["string","bytes32","uint256","uint256"],[`Sequence nested config: -`,e,t.threshold,t.weight])}return ys(t)?t.nodeHash:Zi(["bytes32","bytes32"],[dn(t.left),dn(t.right)])}function PH(t){const e=[];let r=t;for(;!wx(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function IH(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function Cx(t){return Zi(["bytes32","uint256"],[Zi(["bytes32","uint256"],[dn(t.tree),t.threshold]),t.checkpoint])}function jE(t){return t.threshold!==void 0&&t.weight!==void 0&&t.members!==void 0}function hl(t){return Wr(t)||hs(t)?[t]:vs(t)?[{threshold:t.threshold,weight:t.weight,members:hl(t.tree)}]:ys(t)?[]:[...hl(t.left),...hl(t.right)]}function Tp(t){return ys(t)?!0:li(t)?Tp(t.left)||Tp(t.right):!1}function RH(t){return{threshold:t.threshold,checkpoint:t.checkpoint,members:hl(t.tree)}}const UE=(t,e)=>t.map(r=>jE(r)?{tree:e(r.members),threshold:r.threshold,weight:r.weight}:r);function Ax(t){if(t.length===0)throw new Error("Empty members array");return UE(t,Ax).reduce((r,n)=>({left:r,right:n}))}function Ex(t){if(t.length===0)throw new Error("Empty members array");const e=UE(t,Ex);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 Sx(t){return t.length>8?Ex(t):Ax(t)}function zE(t,e=Sx){return{version:2,threshold:t.threshold,checkpoint:t.checkpoint,tree:e(t.members)}}function V0(t,e){return hs(t)?t.subdigest===e:li(t)?V0(t.left,e)||V0(t.right,e):!1}function Pp(t){const e=[t],r=new Set;for(;e.length>0;){const n=e.pop();vs(n)?e.push(n.tree):li(n)?(e.push(n.left),e.push(n.right)):Wr(n)&&r.add({address:n.address,weight:z.from(n.weight).toNumber()})}return Array.from(r)}function H0(t){return li(t)?H0(t.left)&&H0(t.right):!ys(t)}const Gh={isWalletConfig:t=>t.version===2&&t.threshold!==void 0&&t.tree!==void 0,imageHashOf:t=>Cx(t),hasSubdigest:(t,e)=>V0(t.tree,e),checkpointOf:t=>z.from(t.checkpoint),signersOf:t=>Pp(t.tree),fromSimple:t=>zE({threshold:t.threshold,checkpoint:t.checkpoint,members:t.signers.map(e=>({address:e.address,weight:e.weight}))}),isComplete:t=>H0(t.tree),update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new xr(Mr.mainModuleUpgradable.abi);return{entrypoint:t,transactions:[{to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[Gh.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}},decodeTransaction:function(t){var e,r,n,i;const s=new xr(Mr.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(!ze.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(!ze.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:z.from(t.threshold).toString(),checkpoint:z.from(t.checkpoint).toString(),tree:nc(t.tree)})},fromJSON:function(t){const e=JSON.parse(t);return{version:e.version,threshold:z.from(e.threshold),checkpoint:z.from(e.checkpoint),tree:ic(e.tree)}},editConfig:function(t,e){var r,n;const i=hl(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:Sx(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}=Yf(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)){const s="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(i,{signature:s,isDynamic:!1});const{encoded:o,weight:a}=Yf(t,r,[],0);if(a.gte(t.threshold))return o}return Yf(t,r,[],0).encoded}};var MH=Object.freeze({__proto__:null,isSignerLeaf:Wr,isSubdigestLeaf:hs,topologyToJSON:nc,topologyFromJSON:ic,isNestedLeaf:vs,isNodeLeaf:ys,isLeaf:wx,isNode:li,isTopology:TH,encodeSignerLeaf:LE,decodeSignerLeaf:$E,isEncodedSignerLeaf:FE,hashNode:dn,leftFace:PH,isWalletConfig:IH,imageHash:Cx,isSimpleNestedMember:jE,topologyToMembers:hl,hasUnknownNodes:Tp,toSimpleWalletConfig:RH,legacyTopologyBuilder:Ax,merkleTopologyBuilder:Ex,optimized2SignersTopologyBuilder:Sx,toWalletConfig:zE,hasSubdigest:V0,signersOf:Pp,isComplete:H0,ConfigCoder:Gh}),NH=Object.freeze({__proto__:null});const OH={config:Gh,signature:qh},VE=2,BH={version:VE,factory:"0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A",guestModule:"0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE",mainModule:"0xfBf8f1A5E00034762D928f46d438B947f5d4065d",mainModuleUpgradable:"0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var ke=Object.freeze({__proto__:null,config:MH,signature:_H,context:NH,chained:kH,coders:OH,version:VE,DeployedWalletContext:BH});function Ip(t,e){const r=me(Ae(["bytes","bytes32"],[t.walletCreationCode,Ue(t.mainModule,32)])),n=me(Ae(["bytes1","address","bytes32","bytes32"],["0xff",t.factory,e,r]));return xe(Lt(n,12))}async function DH(t,e,r,n,i,s){return(await Promise.all(r9.map(async a=>{try{const l=a.signature.SignatureCoder.decode(J(r)),f=await a.signature.SignatureCoder.recover(l,{address:t,digest:J(e),chainId:n},i),c=a.config.ConfigCoder.imageHashOf(f.config);if(Ip(s[a.version],c).toLowerCase()===t.toLowerCase())return!0;const h=await a.signature.SignatureCoder.recover(l,{address:t,digest:J(e),chainId:n},i),v=a.config.ConfigCoder.imageHashOf(h.config);return Ip(s[a.version],v).toLowerCase()===t.toLowerCase()}catch{}return!1}))).some(a=>a)}function LH(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 $H(t){const e=Object.keys(t).length;return t[e]}var FH=Object.freeze({__proto__:null,addressOf:Ip,isValidCounterfactual:DH,isValidVersionedContext:LH,latestContext:$H});const Kh=`tuple( +`,e,t.threshold,t.weight])}return ys(t)?t.nodeHash:Zi(["bytes32","bytes32"],[dn(t.left),dn(t.right)])}function IH(t){const e=[];let r=t;for(;!wx(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function RH(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function Cx(t){return Zi(["bytes32","uint256"],[Zi(["bytes32","uint256"],[dn(t.tree),t.threshold]),t.checkpoint])}function jE(t){return t.threshold!==void 0&&t.weight!==void 0&&t.members!==void 0}function vl(t){return Wr(t)||hs(t)?[t]:vs(t)?[{threshold:t.threshold,weight:t.weight,members:vl(t.tree)}]:ys(t)?[]:[...vl(t.left),...vl(t.right)]}function Pp(t){return ys(t)?!0:li(t)?Pp(t.left)||Pp(t.right):!1}function MH(t){return{threshold:t.threshold,checkpoint:t.checkpoint,members:vl(t.tree)}}const UE=(t,e)=>t.map(r=>jE(r)?{tree:e(r.members),threshold:r.threshold,weight:r.weight}:r);function Ax(t){if(t.length===0)throw new Error("Empty members array");return UE(t,Ax).reduce((r,n)=>({left:r,right:n}))}function Ex(t){if(t.length===0)throw new Error("Empty members array");const e=UE(t,Ex);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 Sx(t){return t.length>8?Ex(t):Ax(t)}function zE(t,e=Sx){return{version:2,threshold:t.threshold,checkpoint:t.checkpoint,tree:e(t.members)}}function H0(t,e){return hs(t)?t.subdigest===e:li(t)?H0(t.left,e)||H0(t.right,e):!1}function Ip(t){const e=[t],r=new Set;for(;e.length>0;){const n=e.pop();vs(n)?e.push(n.tree):li(n)?(e.push(n.left),e.push(n.right)):Wr(n)&&r.add({address:n.address,weight:z.from(n.weight).toNumber()})}return Array.from(r)}function W0(t){return li(t)?W0(t.left)&&W0(t.right):!ys(t)}const Kh={isWalletConfig:t=>t.version===2&&t.threshold!==void 0&&t.tree!==void 0,imageHashOf:t=>Cx(t),hasSubdigest:(t,e)=>H0(t.tree,e),checkpointOf:t=>z.from(t.checkpoint),signersOf:t=>Ip(t.tree),fromSimple:t=>zE({threshold:t.threshold,checkpoint:t.checkpoint,members:t.signers.map(e=>({address:e.address,weight:e.weight}))}),isComplete:t=>W0(t.tree),update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new xr(Mr.mainModuleUpgradable.abi);return{entrypoint:t,transactions:[{to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[Kh.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}},decodeTransaction:function(t){var e,r,n,i;const s=new xr(Mr.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(!ze.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(!ze.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:z.from(t.threshold).toString(),checkpoint:z.from(t.checkpoint).toString(),tree:ic(t.tree)})},fromJSON:function(t){const e=JSON.parse(t);return{version:e.version,threshold:z.from(e.threshold),checkpoint:z.from(e.checkpoint),tree:sc(e.tree)}},editConfig:function(t,e){var r,n;const i=vl(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:Sx(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}=Xf(t,r,[],0);if(a.gte(t.threshold))return o}const n=Ip(t.tree);for(const{address:i}of n.sort(({weight:s},{weight:o})=>s-o)){const s="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(i,{signature:s,isDynamic:!1});const{encoded:o,weight:a}=Xf(t,r,[],0);if(a.gte(t.threshold))return o}return Xf(t,r,[],0).encoded}};var NH=Object.freeze({__proto__:null,isSignerLeaf:Wr,isSubdigestLeaf:hs,topologyToJSON:ic,topologyFromJSON:sc,isNestedLeaf:vs,isNodeLeaf:ys,isLeaf:wx,isNode:li,isTopology:PH,encodeSignerLeaf:LE,decodeSignerLeaf:$E,isEncodedSignerLeaf:FE,hashNode:dn,leftFace:IH,isWalletConfig:RH,imageHash:Cx,isSimpleNestedMember:jE,topologyToMembers:vl,hasUnknownNodes:Pp,toSimpleWalletConfig:MH,legacyTopologyBuilder:Ax,merkleTopologyBuilder:Ex,optimized2SignersTopologyBuilder:Sx,toWalletConfig:zE,hasSubdigest:H0,signersOf:Ip,isComplete:W0,ConfigCoder:Kh}),OH=Object.freeze({__proto__:null});const DH={config:Kh,signature:Gh},VE=2,BH={version:VE,factory:"0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A",guestModule:"0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE",mainModule:"0xfBf8f1A5E00034762D928f46d438B947f5d4065d",mainModuleUpgradable:"0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var ke=Object.freeze({__proto__:null,config:NH,signature:TH,context:OH,chained:_H,coders:DH,version:VE,DeployedWalletContext:BH});function Rp(t,e){const r=me(Ae(["bytes","bytes32"],[t.walletCreationCode,Ue(t.mainModule,32)])),n=me(Ae(["bytes1","address","bytes32","bytes32"],["0xff",t.factory,e,r]));return xe(Lt(n,12))}async function LH(t,e,r,n,i,s){return(await Promise.all(r9.map(async a=>{try{const l=a.signature.SignatureCoder.decode(J(r)),f=await a.signature.SignatureCoder.recover(l,{address:t,digest:J(e),chainId:n},i),c=a.config.ConfigCoder.imageHashOf(f.config);if(Rp(s[a.version],c).toLowerCase()===t.toLowerCase())return!0;const h=await a.signature.SignatureCoder.recover(l,{address:t,digest:J(e),chainId:n},i),v=a.config.ConfigCoder.imageHashOf(h.config);return Rp(s[a.version],v).toLowerCase()===t.toLowerCase()}catch{}return!1}))).some(a=>a)}function $H(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 FH(t){const e=Object.keys(t).length;return t[e]}var jH=Object.freeze({__proto__:null,addressOf:Rp,isValidCounterfactual:LH,isValidVersionedContext:$H,latestContext:FH});const Jh=`tuple( bool delegateCall, bool revertOnError, uint256 gasLimit, address target, uint256 value, bytes data -)[]`;function jH(t,e,r,n){return Pr({},t,{chainId:r,intent:{id:n,wallet:e}})}function UH(t){return me(qr.encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function zH(t){const e=qr.decode(["uint256",Kh],t);if(e.length!==2||!e[0]||!e[1])throw new Error("Invalid meta transaction data");return[e[0],e[1]]}function HE(t,e){return qr.encode(["uint256",Kh],[t,Fc(e)])}function WE(t,e){return me(HE(t,e))}function VH(t,e,r,n){return nu({address:t,chainId:e,digest:WE(r,n)})}function HH(t,e,r){return nu({address:t,chainId:e,digest:me(qr.encode(["string",Kh],["guest:",Fc(r)]))})}function qE(t,e){return e.map(r=>kx(t,r))}function kx(t,e){if(e.to)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 xr(Mr.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 Jh(t){return t.delegateCall!==void 0||t.revertOnError!==void 0}function GE(t){return t.every(Jh)}function Fc(t){return t.map(e=>{var r;return{delegateCall:e.delegateCall===!0,revertOnError:e.revertOnError===!0,gasLimit:e.gasLimit!==void 0?e.gasLimit:ze,target:(r=e.to)!=null?r:w7,value:e.value!==void 0?e.value:ze,data:e.data!==void 0?e.data:[]}})}function WH(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function qH(t,e){const r=z.from(t),n=z.from(e),i=C7.pow(z.from(96));if(!n.div(i).eq(ze))throw new Error("Space already encoded");return n.add(r.mul(i))}function GH(t){const e=z.from(t),r=C7.pow(z.from(96));return[e.div(r),e.mod(r)]}function KH(t,e){return Array.isArray(e)?GE(e)?e:qE(t,e).map(n=>n.transaction):Jh(e)?[e]:[kx(t,e).transaction]}function KE(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&&Jh(r),!0)}function JE(t){return t!==void 0&&t.signature!==void 0&&t.signature!==""&&KE(t)}function JH(t){const e=new xr(Mr.mainModule.abi);return e.encodeFunctionData(e.getFunction("execute"),JE(t)?[Fc(t.transactions),t.nonce,t.signature]:[Fc(t.transactions),0,[]])}const QE="0x61c2926c",YE=`tuple( +)[]`;function UH(t,e,r,n){return Pr({},t,{chainId:r,intent:{id:n,wallet:e}})}function zH(t){return me(qr.encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function VH(t){const e=qr.decode(["uint256",Jh],t);if(e.length!==2||!e[0]||!e[1])throw new Error("Invalid meta transaction data");return[e[0],e[1]]}function HE(t,e){return qr.encode(["uint256",Jh],[t,jc(e)])}function WE(t,e){return me(HE(t,e))}function HH(t,e,r,n){return iu({address:t,chainId:e,digest:WE(r,n)})}function WH(t,e,r){return iu({address:t,chainId:e,digest:me(qr.encode(["string",Jh],["guest:",jc(r)]))})}function qE(t,e){return e.map(r=>kx(t,r))}function kx(t,e){if(e.to)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 xr(Mr.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 Qh(t){return t.delegateCall!==void 0||t.revertOnError!==void 0}function GE(t){return t.every(Qh)}function jc(t){return t.map(e=>{var r;return{delegateCall:e.delegateCall===!0,revertOnError:e.revertOnError===!0,gasLimit:e.gasLimit!==void 0?e.gasLimit:ze,target:(r=e.to)!=null?r:wA,value:e.value!==void 0?e.value:ze,data:e.data!==void 0?e.data:[]}})}function qH(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function GH(t,e){const r=z.from(t),n=z.from(e),i=CA.pow(z.from(96));if(!n.div(i).eq(ze))throw new Error("Space already encoded");return n.add(r.mul(i))}function KH(t){const e=z.from(t),r=CA.pow(z.from(96));return[e.div(r),e.mod(r)]}function JH(t,e){return Array.isArray(e)?GE(e)?e:qE(t,e).map(n=>n.transaction):Qh(e)?[e]:[kx(t,e).transaction]}function KE(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&&Qh(r),!0)}function JE(t){return t!==void 0&&t.signature!==void 0&&t.signature!==""&&KE(t)}function QH(t){const e=new xr(Mr.mainModule.abi);return e.encodeFunctionData(e.getFunction("execute"),JE(t)?[jc(t.transactions),t.nonce,t.signature]:[jc(t.transactions),0,[]])}const QE="0x61c2926c",YE=`tuple( bool delegateCall, bool revertOnError, uint256 gasLimit, address target, uint256 value, bytes data -)[]`,XE=(t,e)=>{const r=[],n=new xr(Mr.mainModule.abi);for(const i of e){const s=Y(i.data||"0x");if(i.to===t&&J(s.slice(0,4))===QE){const o=s.slice(4),a=qr.decode([YE],o)[0];r.push(...a.map(l=>Pr({},l,{to:l.target})))}else try{const o=n.decodeFunctionData("execute",s)[0],a=XE(t,o.map(l=>Pr({},l,{to:l.target})));r.push(...a)}catch{r.push(i)}}return r};var QH=Object.freeze({__proto__:null,MetaTransactionsType:Kh,intendTransactionBundle:jH,intendedTransactionID:UH,unpackMetaTransactionsData:zH,packMetaTransactionsData:HE,digestOfTransactions:WE,subdigestOfTransactions:VH,subdigestOfGuestModuleTransactions:HH,toSequenceTransactions:qE,toSequenceTransaction:kx,isSequenceTransaction:Jh,hasSequenceTransactions:GE,sequenceTxAbiEncode:Fc,fromTxAbiEncode:WH,encodeNonce:qH,decodeNonce:GH,fromTransactionish:KH,isTransactionBundle:KE,isSignedTransactionBundle:JE,encodeBundleExecData:JH,selfExecuteSelector:QE,selfExecuteAbi:YE,unwind:XE});const ZE="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",YH="0x6492649264926492649264926492649264926492649264926492649264926492";async function e9(t,e,r,n){return await t.call({data:je([ZE,new Lm().encode(["address","bytes32","bytes"],[e,r,n])])})==="0x01"}var XH=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:ZE,EIP_6492_SUFFIX:YH,validateEIP6492Offchain:e9});class ZH{constructor(e){this.isDeployedCache=new Set,this.provider=e}module(e){return new Xl(e,[...Mr.mainModuleUpgradable.abi,...Mr.mainModule.abi,...Mr.erc1271.abi],this.provider)}async isDeployed(e){if(this.isDeployedCache.has(e))return!0;const n=(await this.provider.getCode(e).then(i=>Y(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=>Y(i));if(n.length===20)return xe(J(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 e9(this.provider,e,r,n)}}var eW=Object.freeze({__proto__:null,OnChainReader:ZH});function tW(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var le=Object.freeze({__proto__:null,config:vH,signature:yH,context:FH,signer:wH,EIP1271:mH,transaction:QH,reader:eW,EIP6492:XH,isWalletSignRequestMetadata:tW});const Rp=[{config:yx,signature:vx},{config:Gh,signature:qh}];function t9(t){const e=t-1;if(e<0||e>=Rp.length)throw new Error(`No coder for version: ${t}`);return Rp[e]}function rW(t){return t9(t)}var Vr=Object.freeze({__proto__:null,ALL_CODERS:Rp,coderFor:t9,genericCoderFor:rW});const r9=[Wi,ke],nW=Object.freeze(Object.defineProperty({__proto__:null,allVersions:r9,commons:le,universal:Vr,v1:Wi,v2:ke},Symbol.toStringTag,{value:"Module"}));function iW(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),f=[];for(let c=1;cY(s).length===0))return j6;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:z.from(i).toNumber(),gasLimit:z.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 Xl(e,Mr.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(c,u){let h=0;for(;!o;){try{return await c()}catch(v){if(h++,i!==void 0&&h>=i)throw fe.error(`giving up after ${h} failed attempts${u?`: ${u}`:""}`,v),v;fe.warn(`attempt #${h} failed${u?`: ${u}`:""}`,v)}n>0&&await new Promise(v=>setTimeout(v,n))}throw new Error(`timed out after ${h} failed attempts${u?`: ${u}`:""}`)},l=async function(){let c=s.fromBlockLog;if(c<0&&(c=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number")+c),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"),v=await a(()=>s.provider.getLogs({fromBlock:Math.max(0,c-s.deltaBlocksLog),toBlock:h,topics:["0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881"]}),`unable to get NonceChange logs for blocks ${Math.max(0,c-s.deltaBlocksLog)} to ${h}`);c=h;const g=(await Promise.all(v.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(g)return fa({receipt:g},await a(()=>s.provider.getTransaction(g.transactionHash),`unable to get transaction ${g.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((f,c)=>setTimeout(()=>{o=!0,c(`Timeout waiting for transaction receipt ${e}`)},r))]):l()}}function uW(t){return t.signer!==void 0&&ss.isSigner(t.signer)}class dW extends a9{constructor(e){if(super(ss.isSigner(e)?{provider:e.provider}:fa({},e,{provider:e.signer.provider})),this.signer=ss.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){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&&fe.warn("LocalRelayer doesn't accept fee quotes");const i=le.transaction.encodeBundleExecData(e),s=this.signer.sendTransaction(fa({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 hW="v1",vW="v0.4.0",yW="752f4f4274ca80d2fd974b5b44ed8245dfe40554";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}({}),pW=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}({}),gW=function(t){return t.UNKNOWN="UNKNOWN",t.ERC20_TOKEN="ERC20_TOKEN",t.ERC1155_TOKEN="ERC1155_TOKEN",t}({}),mW=function(t){return t.DESC="DESC",t.ASC="ASC",t}({});class l9{constructor(e,r){this.path="/rpc/Relayer/",this.ping=n=>this.fetch(this.url("Ping"),Yt({},n)).then(i=>Xt(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),Yt({},n)).then(i=>Xt(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Yt({},n)).then(i=>Xt(i).then(s=>({status:s.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),Yt({},n)).then(i=>Xt(i).then(s=>({data:s.data}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),Yt({},n)).then(i=>Xt(i).then(s=>({chainID:s.chainID}))),this.sendMetaTxn=(n,i)=>this.fetch(this.url("SendMetaTxn"),Yt(n,i)).then(s=>Xt(s).then(o=>({status:o.status,txnHash:o.txnHash}))),this.getMetaTxnNonce=(n,i)=>this.fetch(this.url("GetMetaTxnNonce"),Yt(n,i)).then(s=>Xt(s).then(o=>({nonce:o.nonce}))),this.getMetaTxnReceipt=(n,i)=>this.fetch(this.url("GetMetaTxnReceipt"),Yt(n,i)).then(s=>Xt(s).then(o=>({receipt:o.receipt}))),this.simulate=(n,i)=>this.fetch(this.url("Simulate"),Yt(n,i)).then(s=>Xt(s).then(o=>({results:o.results}))),this.updateMetaTxnGasLimits=(n,i)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),Yt(n,i)).then(s=>Xt(s).then(o=>({payload:o.payload}))),this.feeTokens=n=>this.fetch(this.url("FeeTokens"),Yt({},n)).then(i=>Xt(i).then(s=>({isFeeRequired:s.isFeeRequired,tokens:s.tokens}))),this.feeOptions=(n,i)=>this.fetch(this.url("FeeOptions"),Yt(n,i)).then(s=>Xt(s).then(o=>({options:o.options,quote:o.quote}))),this.getMetaTxnNetworkFeeOptions=(n,i)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),Yt(n,i)).then(s=>Xt(s).then(o=>({options:o.options}))),this.sentTransactions=(n,i)=>this.fetch(this.url("SentTransactions"),Yt(n,i)).then(s=>Xt(s).then(o=>({page:o.page,transactions:o.transactions}))),this.pendingTransactions=(n,i)=>this.fetch(this.url("PendingTransactions"),Yt(n,i)).then(s=>Xt(s).then(o=>({page:o.page,transactions:o.transactions}))),this.listGasSponsors=(n,i)=>this.fetch(this.url("ListGasSponsors"),Yt(n,i)).then(s=>Xt(s).then(o=>({page:o.page,gasSponsors:o.gasSponsors}))),this.addGasSponsor=(n,i)=>this.fetch(this.url("AddGasSponsor"),Yt(n,i)).then(s=>Xt(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.updateGasSponsor=(n,i)=>this.fetch(this.url("UpdateGasSponsor"),Yt(n,i)).then(s=>Xt(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.reportGasSponsorUsage=(n,i)=>this.fetch(this.url("ReportGasSponsorUsage"),Yt(n,i)).then(s=>Xt(s).then(o=>({gasSponsorUsage:o.gasSponsorUsage}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Yt=(t={},e={})=>({method:"POST",headers:fa({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Xt=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 U6=Object.freeze({__proto__:null,WebRPCVersion:hW,WebRPCSchemaVersion:vW,WebRPCSchemaHash:yW,ETHTxnStatus:Ds,TransferType:pW,FeeTokenType:gW,SortOrder:mW,Relayer:l9});const xW=[Ds.DROPPED,Ds.SUCCEEDED,Ds.PARTIALLY_FAILED,Ds.FAILED],bW=[Ds.DROPPED,Ds.PARTIALLY_FAILED,Ds.FAILED];function wW(t){return t.url!==void 0&&typeof t.url=="string"&&t.provider!==void 0&&oo.isProvider(t.provider)}const CW=typeof global=="object"?global.fetch:window.fetch;class f9{constructor(e){this.service=new l9(e.url,CW),this.provider=oo.isProvider(e.provider)?e.provider:new R0(Ol(e.provider.url))}async waitReceipt(e,r=1e3,n=5,i){typeof e!="string"&&(e=le.transaction.intendedTransactionID(e)),fe.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"&&xW.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(", ");fe.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${i}`);const s=await this.getNonce(e);if(!this.provider)throw fe.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 fe.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(o)}`),{options:o,quote:{_tag:"FeeQuote",_quote:a}}}else return fe.info("[rpc-relayer/getFeeOptions] relayer fees are not required"),{options:[]}}async getFeeOptionsRaw(e,r){const{options:n,quote:i}=await this.service.feeOptions({wallet:e,to:e,data:J(r)});return{options:n,quote:{_tag:"FeeQuote",_quote:i}}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}async getNonce(e,r){fe.info(`[rpc-relayer/getNonce] get nonce for wallet ${e} space: ${r}`);const n=r!==void 0?z.from(r).toHexString():void 0,i=await this.service.getMetaTxnNonce({walletContractAddress:e,space:n}),s=z.from(i.nonce),[o,a]=le.transaction.decodeNonce(s);return fe.info(`[rpc-relayer/getNonce] got next nonce for wallet ${e} ${a} space: ${o}`),s}async relay(e,r,n=!0){var i=this;fe.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:fe.warn("[rpc-relayer/relay] ignoring invalid fee quote")),!this.provider)throw fe.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(fe.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:c=>Promise.reject(new Error("impossible"))},f=async function(u){var h;if(!i.provider)throw new Error("cannot wait for receipt, relayer has no provider set");const v=await i.wait(e.intent.id),x=(h=v.receipt)==null?void 0:h.transactionHash;if(!x)throw new Error("cannot wait for receipt, unknown native transaction hash");return Object.assign(l,v),i.provider.waitForTransaction(x,u)};return l.wait=f,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((f,c)=>setTimeout(()=>{o=!0,c(`Timeout waiting for transaction receipt ${e}`)},r))]):this.waitReceipt(e,n,i));if(!a.txnReceipt||bW.includes(a.status))throw new AW(a);const l=JSON.parse(a.txnReceipt);return{blockHash:l.blockHash,blockNumber:z.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(f){return s.provider.waitForTransaction(l.transactionHash,f)}}}}class AW{constructor(e){this.receipt=e}}function c9(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 EW=Object.freeze(Object.defineProperty({__proto__:null,LocalRelayer:dW,ProviderRelayer:a9,ProviderRelayerDefaults:o9,RpcRelayer:f9,RpcRelayerProto:U6,isLocalRelayerOptions:uW,isProviderRelayerOptions:cW,isRelayer:c9,isRpcRelayerOptions:wW,proto:U6},Symbol.toStringTag,{value:"Module"}));function u9(t){return t.requestSignature!==void 0&&t.notifyStatusChange!==void 0}class d9{constructor(e,r=!0){this.signer=e,this.eoa=r}getAddress(){return this.signer.getAddress()}async requestSignature(e,r,n,i){return i.onSignature(await this.signer.signMessage(r)),!0}notifyStatusChange(e,r,n){}suffix(){return[2]}}var SW=Object.freeze({__proto__:null,isSapientSigner:u9,SignerWrapper:d9});function h9(t){return t.rejected}function _x(t){return t.signature!==void 0}function v9(t){return!h9(t)&&!_x(t)}const y9="Initial";class Tx{constructor(e,r=Tx.randomTag()){this.observers=[],this.signers=[],this.count=0,this.tag=r,this.setSigners(e)}static randomTag(){return`default-${J(Ki(8)).slice(2)}`}pullId(){return`${this.tag}-${this.count++}`}setSigners(e){this.signers=e.map(r=>u9(r)?r:new d9(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)})])}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,f={ended:!1,message:s,signers:{}};let c=o??{};const u=g=>{c=g,r.notifyObservers(n,f,c)},h=()=>{try{r.notifyObservers(n,f,c);const g=Object.entries(f.signers).filter(([k,w])=>v9(w));if(a&&a(f,u)||g.length===0){f.ended=!0,i(f),r.notifyObservers(n,f,c);return}}catch(g){console.error("Error while notifying observers",g)}};let v=r.signers;if(l){const g=await Promise.all(r.signers.map(async function(k){return k.getAddress()}));v=r.signers.filter((k,w)=>l.includes(g[w]))}const x=await Promise.allSettled(v.map(async function(g){const k=await g.getAddress();return f.signers[k]={situation:y9},g.requestSignature(n,s,o??{},{onSignature:w=>{const A=g.suffix();f.signers[k]={signature:w,suffix:A},h()},onRejection:w=>{f.signers[k]={rejected:!0,error:w},h()},onStatus:w=>{f.signers[k]={situation:w},h()}})}));for(let g=0;gkt(e))):kt(t)}const z6=t=>{const e=new Map;for(const r of Object.keys(t.signers)){const n=t.signers[r];if(_x(n)){const i=Y(n.suffix),s=Ae(["bytes","bytes"],[n.signature,i]);e.set(r,{signature:s,isDynamic:i.length!==1||i[0]!==2})}}return e};let V6=class Lp extends ss{constructor(e){if(ze.eq(e.chainId)&&!e.coders.signature.supportsNoChainId)throw new Error(`Sequence version ${e.config.version} doesn't support chainId 0`);super(),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 Lp(No({},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){if(await this.reader().isDeployed(this.address))return e;const r=this.buildDeployTransaction();return{entrypoint:this.context.guestModule,chainId:this.chainId,intent:e.intent,transactions:[...r.transactions,{to:e.entrypoint,data:le.transaction.encodeBundleExecData(e),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}}buildDeployTransaction(){const e=this.coders.config.imageHashOf(this.config);if(le.context.addressOf(this.context,e)!==this.address)throw new Error(`First address of config ${e} doesn't match wallet address ${this.address}`);return Lp.buildDeployTransaction(this.context,e)}deploy(){const e=this.buildDeployTransaction();if(!this.relayer)throw new Error("Wallet deploy requires a relayer");return this.relayer.relay(No({},e,{chainId:this.chainId,intent:{id:J(Ki(32)),wallet:this.address}}))}static buildDeployTransaction(e,r){const n=new xr(Mr.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 signDigest(e,r){const n=Ep(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=No({digest:e,chainId:this.chainId,address:this.address,config:this.config},r),s=Y(n),o=await this.orchestrator.signMessage({candidates:this.coders.config.signersOf(this.config).map(l=>l.address),message:s,metadata:i,callback:(l,f)=>{const c=z6(l),u=No({},i,{parts:c});return f(u),this.coders.signature.hasEnoughSigningPower(this.config,c)}}),a=z6(o);return this.coders.signature.encodeSigners(this.config,a,[],this.chainId).encoded}signMessage(e){return this.signDigest(me(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 signTransactions(e,r){const n=await Dp(e),i=le.transaction.fromTransactionish(this.address,n);i.length===0&&i.push({to:this.address,data:"0x",value:0,gasLimit:0,delegateCall:!1,revertOnError:!0});let s=r;if(s===void 0&&(s=await this.reader().nonce(this.address,0),s===void 0))throw new Error("Unable to determine nonce");const o=le.transaction.digestOfTransactions(s,i),a=await this.signDigest(o,{transactions:i});return{intent:{id:Ep(this.address,this.chainId,o),wallet:this.address},chainId:this.chainId,transactions:i,entrypoint:this.address,nonce:s,signature:a}}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,n){const i=await this.signTransactions(e,r),s=await this.decorateTransactions(i);return this.sendSignedTransaction(s,n)}async fillGasLimits(e){const r=await Dp(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?z.from(o.gasLimit).toNumber():s[a].gasLimit;return No({},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 Oo(){return Oo=Object.assign?Object.assign.bind():function(t){for(var e=1;er.eq(i.chainId));if(!n)throw new Error(`Network not found for chainId ${e}`);return n}provider(e){const r=this.network(e);if(!r.provider&&!r.rpcUrl)throw new Error(`Provider not found for chainId ${e}`);return r.provider||new R0(Ol(r.rpcUrl),{name:"",chainId:z.from(e).toNumber()})}reader(e){return ze.eq(e)?new PW:new le.reader.OnChainReader(this.provider(e))}relayer(e){const r=this.network(e);if(!r.relayer)throw new Error(`Relayer not found for chainId ${e}`);return c9(r.relayer)?r.relayer:new f9(r.relayer)}setOrchestrator(e){this.orchestrator=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=Vr.coderFor(r.version);return this.walletFor(e,this.contextFor(r.version),r.config,n)}walletFor(e,r,n,i){const s=ze.eq(e);return new V6({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=>n9.counterfactualVersion(this.address,M.imageHash,Object.values(this.contexts))),a=async function(){if(!await i)return o;const $=await n.reader(e).implementation(n.address);if(!$)throw new Error(`Implementation not found for wallet ${n.address}`);const j=Object.values(n.contexts);for(let U=0;U0?g[g.length-1].nextImageHash:h,w=await this.tracker.configOfImageHash({imageHash:k});if(!w)throw new Error(`Config not found for imageHash ${k}`);const A=await i,E=await s,I=Vr.coderFor(v).config.checkpointOf(w);return{original:Oo({},E,{version:await o}),onChain:{imageHash:u,config:await f,version:c,deployed:A},fullyMigrated:v===this.version,signedMigrations:x,version:v,presignedConfigurations:g,imageHash:k,config:w,checkpoint:I,canOnchainValidate:c===this.version&&A}}mustBeFullyMigrated(e){if(!e.fullyMigrated)throw new Error(`Wallet ${this.address} is not fully migrated`)}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}decorateTransactions(e,r){const n=this.buildBootstrapTransactions(r,e.chainId);return n.transactions.length===0?e:{entrypoint:n.entrypoint,chainId:e.chainId,intent:e.intent,transactions:[...n.transactions,{to:e.entrypoint,data:le.transaction.encodeBundleExecData(e),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}}decorateSignature(e,r){if(!r.presignedConfigurations||r.presignedConfigurations.length===0)return new Promise(o=>o(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=me(Le(`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"){const s=ze.eq(r)?this.networks[0].chainId:r,o=await this.status(s);if(this.mustBeFullyMigrated(o),!o.canOnchainValidate&&i==="throw")throw new Error("Wallet cannot validate onchain");const l=await this.walletForStatus(r,o).signDigest(e),f=n?this.decorateSignature(l,o):l;if(!o.canOnchainValidate)switch(i){case"ignore":return f;case"eip6492":return this.buildEIP6492Signature(await f,o,r)}return f}buildEIP6492Signature(e,r,n){const i=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 Ae(["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,Oo({},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}`)}buildBootstrapTransactions(e,r){const n=[];if(!e.onChain.deployed){const o=V6.buildDeployTransaction(e.original.context,e.original.imageHash);n.push(...o.transactions)}n.push(...e.signedMigrations.map(o=>({to:o.tx.entrypoint,data:le.transaction.encodeBundleExecData(o.tx),value:0,gasLimit:0,revertOnError:!0,delegateCall:!1})));const i=e.signedMigrations.length>0?e.signedMigrations[0].tx.intent.id:le.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,r,n),{guestModule:s}=this.contextFor(e.version);return{entrypoint:s,transactions:n,chainId:r,intent:{id:i,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(Oo({},i,{chainId:e}),r)}signMessage(e,r,n="ignore"){return this.signDigest(me(e),r,!0,n)}async signTransactions(e,r,n){const i=n||await this.status(r);this.mustBeFullyMigrated(i);const o=await this.walletForStatus(r,i).signTransactions(e);return Oo({},o,{signature:await this.decorateSignature(o.signature,i)})}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=Vr.coderFor(s.version).config,l=a.imageHashOf(s),f=await this.tracker.configOfImageHash({imageHash:l,noCache:!0});if(!f||a.imageHashOf(f)!==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){const s=i||await this.status(e.chainId);this.mustBeFullyMigrated(s);const o=this.decorateTransactions(e,s);return this.relayer(r).relay(o,n)}async fillGasLimits(e,r,n){return this.walletForStatus(r,n||await this.status(r)).fillGasLimits(e)}async gasRefundQuotes(e,r,n,i){const s=i||await this.status(r),o=this.walletForStatus(r,s),a=await this.predecorateTransactions(e,s,r),l=le.transaction.fromTransactionish(this.address,a),f=o.coders.config.buildStubSignature(o.config,n),c=J(Ki(32)),u={chainId:r,intent:{id:c,wallet:this.address},signature:f,transactions:l,entrypoint:this.address,nonce:0},h=this.decorateTransactions(u,s),v=le.transaction.encodeBundleExecData(h),x=await this.relayer(r).getFeeOptionsRaw(h.entrypoint,v);return Oo({},x,{decorated:h})}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),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){const o=await this.status(r),a=i?e:await this.predecorateTransactions(e,o,r),l=await this.signTransactions(a,r);return s&&s(l),this.sendSignedTransactions(l,r,n)}async signTypedData(e,r,n,i,s="ignore"){const o=zh({domain:e,types:r,message:n});return this.signDigest(o,i,!0,s)}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=>Vr.coderFor(a.toVersion).config.imageHashOf(a.toConfig)):[],...s.presignedConfigurations.map(a=>a.nextImageHash)];return Promise.all(o.map(async function(a,l){const f=l===o.length-1,c=await e.tracker.configOfImageHash({imageHash:a});if(!c){console.warn(`AllSigners may be incomplete, config not found for imageHash ${a}`);return}Vr.genericCoderFor(c.version).config.signersOf(c).forEach(v=>{const x=r.find(g=>g.address===v.address&&g.network===i);if(x&&f&&x.flaggedForRemoval){x.flaggedForRemoval=!1;return}x||r.push({address:v.address,weight:v.weight,network:i,flaggedForRemoval:!f})})}))})),r}}function IW(t){return t instanceof Ji}const RW=Object.freeze(Object.defineProperty({__proto__:null,Account:Ji,isAccount:IW},Symbol.toStringTag,{value:"Module"}));function MW(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function NW(t){return t.startsWith("ipfs://")}class OW{constructor(e,r,n=1e3){this.pending=new Map,this.provider=e,this.solver=r,this.window=n}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 DW(BW(t,e).getAlternativeSignature(r));if(!o||o==="")throw new Error("EIP5719 - Invalid signature and no alternative signature");const a=J(await(i||new LW).resolve(o));if(!a||a==="")throw new Error("EIP5719 - Empty alternative signature");if(a===J(n))throw new Error("EIP5719 - Alternative signature is invalid or the same");return p9(t,e,r,a,i,s+1)}class LW{constructor(e="https://cloudflare-ipfs.com/ipfs/"){var r=this;this.uri=n=>NW(n)?MW(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()},this.gateway=e}}const $W=(t,e)=>e.some(r=>t instanceof r);let H6,W6;function FW(){return H6||(H6=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function jW(){return W6||(W6=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const g9=new WeakMap,$p=new WeakMap,m9=new WeakMap,Sv=new WeakMap,Px=new WeakMap;function UW(t){const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{r(Js(t.result)),i()},o=()=>{n(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&g9.set(r,t)}).catch(()=>{}),Px.set(e,t),e}function zW(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||m9.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Js(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 VW(t){Fp=t(Fp)}function HW(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(kv(this),e,...r);return m9.set(n,e.sort?e.sort():[e]),Js(n)}:jW().includes(t)?function(...e){return t.apply(kv(this),e),Js(g9.get(this))}:function(...e){return Js(t.apply(kv(this),e))}}function WW(t){return typeof t=="function"?HW(t):(t instanceof IDBTransaction&&zW(t),$W(t,FW())?new Proxy(t,Fp):t)}function Js(t){if(t instanceof IDBRequest)return UW(t);if(Sv.has(t))return Sv.get(t);const e=WW(t);return e!==t&&(Sv.set(t,e),Px.set(e,t)),e}const kv=t=>Px.get(t);function qW(t,e,{blocked:r,upgrade:n,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),a=Js(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Js(o.result),l.oldVersion,l.newVersion,Js(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",f=>i(f.oldVersion,f.newVersion,f))}).catch(()=>{}),a}const GW=["get","getKey","getAll","getAllKeys","count"],KW=["put","add","delete","clear"],_v=new Map;function q6(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(_v.get(e))return _v.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,i=KW.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||GW.includes(r)))return;const s=async function(o,...a){const l=this.transaction(o,i?"readwrite":"readonly");let f=l.store;return n&&(f=f.index(a.shift())),(await Promise.all([f[r](...a),i&&l.done]))[0]};return _v.set(e,s),s}VW(t=>({...t,get:(e,r,n)=>q6(e,r)||t.get(e,r,n),has:(e,r)=>!!q6(e,r)||t.has(e,r)}));class JW{}var QW=Object.freeze({__proto__:null,ConfigTracker:JW});class YW{constructor(e){this.tracker=e}async loadPresignedConfiguration(e){return console.debug("? loadPresignedConfiguration"),Dr(e,"? "),Dr(await this.tracker.loadPresignedConfiguration(e),"! ")}savePresignedConfiguration(e){return console.debug("? savePresignedConfiguration"),Dr(e,"? "),this.tracker.savePresignedConfiguration(e)}saveWitnesses(e){return console.debug("? saveWitnesses"),Dr(e,"? "),this.tracker.saveWitnesses(e)}async configOfImageHash(e){return console.debug("? configOfImageHash"),Dr(e,"? "),Dr(await this.tracker.configOfImageHash(e),"! ")}saveWalletConfig(e){return console.debug("? saveWalletConfig"),Dr(e,"? "),this.tracker.saveWalletConfig(e)}async imageHashOfCounterfactualWallet(e){return console.debug("? imageHashOfCounterfactualWallet"),Dr(e,"? "),Dr(await this.tracker.imageHashOfCounterfactualWallet(e),"! ")}saveCounterfactualWallet(e){return console.debug("? saveCounterfactualWallet"),Dr(e,"? "),this.tracker.saveCounterfactualWallet(e)}async walletsOfSigner(e){return console.debug("? walletsOfSigner"),Dr(e,"? "),Dr(await this.tracker.walletsOfSigner(e),"! ")}async getMigration(e,r,n,i){return console.debug("? getMigration"),Dr({address:e,fromImageHash:r,fromVersion:n,chainId:i},"? "),Dr(await this.tracker.getMigration(e,r,n,i),"! ")}saveMigration(e,r,n){return console.debug("? saveMigration"),Dr({address:e,signed:r,contexts:n},"? "),this.tracker.saveMigration(e,r,n)}}function Dr(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 XW=Object.freeze({__proto__:null,DebugConfigTracker:YW});function ro(){return ro=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,s;return Promise.resolve(((i=this.migrations[e])==null||(s=i[r])==null?void 0:s[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 vl(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]=z.from(n):Array.isArray(n)?e[r]=n.map(i=>vl(i)):typeof n=="object"&&n!==null?e[r]=vl(n):e[r]=n}return e}class ZW{constructor(e){var r=this;this.loadConfig=async function(n){return(await r.getDb()).get("configs",n).then(s=>vl(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=>vl(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=>vl(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)},this.dbName=e}async getDb(){if(this._lazyDb)return this._lazyDb;const e=this.dbName;return this._lazyDb=await qW(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 b9(t){return t.left!==void 0&&t.right!==void 0}function w9(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 eq=Object.freeze({__proto__:null,isPlainNode:b9,isPlainNested:w9,isPlainV2Config:jp,MemoryTrackerStore:x9,recreateBigNumbers:vl,IndexedDBStore:ZW});class C9{constructor(e,r=new x9,n=!1){var i=this;this.loadTopology=async function(s){const o=await i.store.loadV2Node(s);if(!o)return{nodeHash:s};if(b9(o)){const[a,l]=await Promise.all([i.loadTopology(o.left),i.loadTopology(o.right)]);return{left:a,right:l}}return w9(o)?{weight:z.from(o.weight),threshold:z.from(o.threshold),tree:await i.loadTopology(o.tree)}:o},this.saveTopology=async function(s){if(ke.config.isNodeLeaf(s))return;const o=ke.config.hashNode(s);if(ke.config.isNode(s)){const a=i.saveTopology(s.left),l=i.saveTopology(s.right),f=i.store.saveV2Node(o,{left:ke.config.hashNode(s.left),right:ke.config.hashNode(s.right)});await Promise.all([a,l,f]);return}if(ke.config.isNestedLeaf(s)){const a=i.saveTopology(s.tree),l=i.store.saveV2Node(o,{weight:z.from(s.weight).toString(),threshold:z.from(s.threshold).toString(),tree:ke.config.hashNode(s.tree)});await Promise.all([a,l]);return}if(ke.config.isSignerLeaf(s))return i.store.saveV2Node(o,{address:s.address,weight:s.weight});if(ke.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(Wi.config.ConfigCoder.isWalletConfig(o)){const a=Wi.config.ConfigCoder.imageHashOf(o);return i.store.saveConfig(a,o)}if(ke.config.ConfigCoder.isWalletConfig(o)){const a=ke.config.ConfigCoder.imageHashOf(o);if(ke.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:z.from(a.threshold),checkpoint:z.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=Vr.genericCoderFor(o.version).config.imageHashOf(o);await Promise.all([i.saveWalletConfig({config:o}),...a.map(f=>{const c=le.context.addressOf(f,l);return i.store.saveCounterfactualWallet(c,l,f)})])},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=ke.signature.SignatureCoder.decode(s.signature),a=Vr.genericCoderFor(s.nextConfig.version).config.imageHashOf(s.nextConfig),l=ke.chained.messageSetImageHash(a),f=me(l),c={message:l,address:s.wallet,chainId:0,digest:f},u=i.savePayload({payload:c}),h=i.saveWalletConfig({config:s.nextConfig}),v=await ke.signature.SignatureCoder.recover(o,c,i.provider),x=ke.signature.signaturesOf(v.config.tree);await Promise.all([u,h,i.saveWalletConfig({config:v.config}),...x.map(g=>i.store.saveSignatureOfSubdigest(g.address,v.subdigest,g.signature))])},this.loadPresignedConfiguration=async function(s){const{wallet:o,fromImageHash:a,longestPath:l}=s,f=await i.configOfImageHash({imageHash:a});if(!f||!ke.config.ConfigCoder.isWalletConfig(f))return[];const c=ke.config.signersOf(f.tree).map(E=>E.address),u=await Promise.all(c.map(E=>i.store.loadSubdigestsOfSigner(E))),h=[...new Set(u.flat())],x=(await Promise.all([...new Set(h)].map(async function(E){return ro({},await i.payloadOfSubdigest({subdigest:E}),{subdigest:E})}))).filter(E=>(E==null?void 0:E.message)&&(E==null?void 0:E.address)&&E.address===o).map(E=>({payload:E,nextImageHash:ke.chained.decodeMessageSetImageHash(E.message)})).filter(E=>E==null?void 0:E.nextImageHash);let g;const w=(await Promise.all(x.map(async function({nextImageHash:E,payload:I}){const M=await i.configOfImageHash({imageHash:E});if(!M||!ke.config.isWalletConfig(M))return;const $=z.from(M.checkpoint);return{nextConfig:M,nextCheckpoint:$,nextImageHash:E,payload:I}}))).filter(E=>E!==void 0).filter(E=>E.nextCheckpoint.gt(f.checkpoint)).sort((E,I)=>E.nextCheckpoint.gt(I.nextCheckpoint)?l?1:-1:l?-1:1);for(const E of w){const{nextConfig:I,nextCheckpoint:M,nextImageHash:$,payload:j}=E;if(g){const q=g.checkpoint;if(l){if(M.gte(q))continue}else if(M.lte(q))continue}const U=new Map((await Promise.all(c.map(async function(q){const G=await i.store.loadSignatureOfSubdigest(q,j.subdigest);if(!G)return[q,void 0];const re=J(i.useEIP5719?await i.cachedEIP5719.runByEIP5719(q,j.subdigest,G):G),D=le.signer.tryRecoverSigner(j.subdigest,re)!==q;return[q,{isDynamic:D,signature:re}]}))).filter(q=>Boolean(q[1])));if(U.size===0)continue;const W=ke.signature.SignatureCoder.encodeSigners(f,U,[],0);W.weight.lt(f.threshold)||(g={nextImageHash:$,checkpoint:z.from(I.checkpoint),signature:W.encoded})}if(!g)return[];const A=await i.loadPresignedConfiguration({wallet:o,fromImageHash:g.nextImageHash,longestPath:l});return[{wallet:o,nextImageHash:g.nextImageHash,signature:g.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 f=le.signer.recoverSigner(a,l);return i.store.saveSignatureOfSubdigest(f,a,l)})])},this.walletsOfSigner=async function(s){const o=await i.store.loadSubdigestsOfSigner(s.signer),a=await Promise.all(o.map(f=>i.payloadOfSubdigest({subdigest:f}))).then(f=>f.filter(c=>c!==void 0)),l=[];for(const f of a){const c=f.address;if(l.find(v=>v.wallet===c))continue;const u=le.signature.subdigestOf(f),h=await i.store.loadSignatureOfSubdigest(s.signer,u);h&&l.push({wallet:c,proof:{digest:f.digest,chainId:z.from(f.chainId),signature:J(h)}})}return l},this.provider=e,this.store=r,this.useEIP5719=n,this.cachedEIP5719=new OW(e)}async saveMigration(e,r,n){const i=r.fromVersion;if(i!==1)throw new Error("Migration not supported");if(!ke.config.isWalletConfig(r.toConfig))throw new Error("Invalid to config");const{newImageHash:s,address:o}=s9.v1v2.decodeTransaction(r.tx,n);if(o!==e)throw new Error("Invalid migration transaction - address");if(ke.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=me(a),f={chainId:r.tx.chainId,message:a,address:e,digest:l},c=le.signature.subdigestOf(f),u=this.savePayload({payload:f}),h=this.saveWalletConfig({config:r.toConfig}),v=Wi.signature.SignatureCoder.decode(r.tx.signature),x=await Wi.signature.SignatureCoder.recover(v,f,this.provider),g=Wi.signature.SignatureCoder.signaturesOf(x.config);await Promise.all([u,h,this.saveWalletConfig({config:x.config}),this.store.saveMigrationsSubdigest(e,i,i+1,c,s),...g.map(k=>this.store.saveSignatureOfSubdigest(k.address,x.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=Vr.coderFor(n);return!o||!l.config.isWalletConfig(o)?void 0:(await Promise.all(a.map(async function(c){const{subdigest:u,toImageHash:h}=c,v=await s.payloadOfSubdigest({subdigest:u});if(!v||!v.message||!z.from(i).eq(v.chainId))return;const x=l.config.signersOf(o).map(E=>E.address),g=new Map((await Promise.all(x.map(async function(E){const I=await s.store.loadSignatureOfSubdigest(E,u);if(!I)return[E,void 0];const M=J(s.useEIP5719?await s.cachedEIP5719.runByEIP5719(E,u,I):I),$=le.signer.tryRecoverSigner(u,M)!==E;return[E,{isDynamic:$,signature:M}]}))).filter(E=>Boolean(E[1]))),k=l.signature.encodeSigners(o,g,[],i);if(!k||k.weightc.filter(u=>u!==void 0)))[0]}}var tq=Object.freeze({__proto__:null,LocalConfigTracker:C9});let Tv=function(t){return t.EIP712="EIP712",t.EthSign="EthSign",t.EIP1271="EIP1271",t}({});class rq{constructor(e,r){this.path="/rpc/Sessions/",this.ping=n=>this.fetch(this.url("Ping"),Vn({},n)).then(i=>Hn(i).then(s=>({}))),this.config=(n,i)=>this.fetch(this.url("Config"),Vn(n,i)).then(s=>Hn(s).then(o=>({version:o.version,config:o.config}))),this.wallets=(n,i)=>this.fetch(this.url("Wallets"),Vn(n,i)).then(s=>Hn(s).then(o=>({wallets:o.wallets}))),this.deployHash=(n,i)=>this.fetch(this.url("DeployHash"),Vn(n,i)).then(s=>Hn(s).then(o=>({deployHash:o.deployHash,context:o.context}))),this.configUpdates=(n,i)=>this.fetch(this.url("ConfigUpdates"),Vn(n,i)).then(s=>Hn(s).then(o=>({updates:o.updates}))),this.migrations=(n,i)=>this.fetch(this.url("Migrations"),Vn(n,i)).then(s=>Hn(s).then(o=>({migrations:o.migrations}))),this.saveConfig=(n,i)=>this.fetch(this.url("SaveConfig"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveWallet=(n,i)=>this.fetch(this.url("SaveWallet"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveSignature=(n,i)=>this.fetch(this.url("SaveSignature"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveSignerSignatures=(n,i)=>this.fetch(this.url("SaveSignerSignatures"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveMigration=(n,i)=>this.fetch(this.url("SaveMigration"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Vn=(t={},e={})=>({method:"POST",headers:ro({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Hn=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 nq{constructor(e,r=!0){this.onlyRecoverable=r,this.sessions=new rq(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(Pv(r))return[];throw r}}async savePresignedConfiguration(e){const r=e.nextConfig,n=Vr.genericCoderFor(r.version).config.imageHashOf(r),i=ke.signature.setImageHashStruct(n),s=me(i);await this.sessions.saveSignature({wallet:e.wallet,digest:s,chainID:"0",signature:e.signature,toConfig:qu(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:el(e.chainId),signatures:r})}async configOfImageHash(e){try{const{version:r,config:n}=await this.sessions.config(e);return iq(r,n)}catch(r){if(Pv(r))return;throw r}}async saveWalletConfig(e){const r=qu(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(Pv(r))return;throw r}}async saveCounterfactualWallet(e){const r=qu(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 Tv.EIP712:a+=J(le.signer.SigType.EIP712).slice(2);break;case Tv.EthSign:a+=J(le.signer.SigType.ETH_SIGN).slice(2);break;case Tv.EIP1271:a+=J(le.signer.SigType.WALLET_BYTES32).slice(2);break}return{wallet:n,proof:{digest:i,signature:a,chainId:z.from(s)}}})}async getMigration(e,r,n,i){var s=this;const o=el(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 v=Object.keys(h).map(Number).sort((x,g)=>g-x);for(const x of v)for(const[g,k]of Object.entries(h[x]))try{const w=await s.configOfImageHash({imageHash:g});if(w)return{fromVersion:n,toVersion:x,toConfig:w,tx:{entrypoint:k.executor,transactions:k.transactions,nonce:k.nonce,signature:k.signature,chainId:u,intent:{id:le.transaction.subdigestOfTransactions(e,u,k.nonce,k.transactions),wallet:e}}}}catch(w){console.error(w)}}},f=await l(o);if(f)return f;for(const c in a)if(c!==o){const u=await l(c);if(u)return u}}async saveMigration(e,r,n){await this.sessions.saveMigration({wallet:e,fromVersion:r.fromVersion,toVersion:r.toVersion,toConfig:qu(r.toConfig),executor:r.tx.entrypoint,transactions:r.tx.transactions.map(sq),nonce:el(r.tx.nonce),signature:r.tx.signature,chainID:el(r.tx.chainId)})}}function qu(t){switch(t.version){case 1:if(Wi.config.ConfigCoder.isWalletConfig(t))return{threshold:jo(t.threshold),signers:t.signers.map(({weight:e,address:r})=>({weight:jo(e),address:r}))};throw new Error(`not a v${t.version} config: ${t}`);case 2:if(ke.config.ConfigCoder.isWalletConfig(t))return{threshold:jo(t.threshold),checkpoint:jo(t.checkpoint),tree:kd(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function kd(t){return ke.config.isNode(t)?{left:kd(t.left),right:kd(t.right)}:ke.config.isSignerLeaf(t)?{weight:jo(t.weight),address:t.address}:ke.config.isNestedLeaf(t)?{weight:jo(t.weight),threshold:jo(t.threshold),tree:kd(t.tree)}:ke.config.isNodeLeaf(t)?{node:t.nodeHash}:ro({},t)}function iq(t,e){switch(t){case 1:return ro({},e,{version:t});case 2:return ro({},e,{version:t,tree:_d(e.tree)});default:throw new Error(`unknown version ${t}`)}}function _d(t){switch(typeof t){case"object":const e=ro({},t);return e.left!==void 0&&(e.left=_d(e.left)),e.right!==void 0&&(e.right=_d(e.right)),e.tree!==void 0&&(e.tree=_d(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 sq(t){return{to:t.to,value:t.value!==void 0?el(t.value):void 0,data:t.data!==void 0?J(t.data):void 0,gasLimit:t.gasLimit!==void 0?el(t.gasLimit):void 0,delegateCall:t.delegateCall,revertOnError:t.revertOnError}}function jo(t){return z.from(t).toNumber()}function el(t){return z.from(t).toString()}function Pv(t){return typeof t=="object"&&t.status===404}var oq=Object.freeze({__proto__:null,RemoteConfigTracker:nq});function Up(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 Sf(t,e){return Promise.all(t.map(r=>r.catch(()=>e)))}class aq{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 Up(r,void 0,a=>(a==null?void 0:a.res)===void 0?!1:Vr.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 C9(void 0),s=await Sf(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 Up(this.trackers.map(n=>n.imageHashOfCounterfactualWallet(e)),void 0,n=>Boolean(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 Sf(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:f}})=>{const c=`${o}-${a}-${l}`;let u=s.get(c);u||(u={wallet:o,digest:a,chainId:l,signatures:[]},s.set(c,u)),u.signatures.push(f)}),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 Sf(this.trackers.map(l=>l.loadPresignedConfiguration(e)),[]),s=(await Sf(n.map(async function(l){const f=l[l.length-1],c=await r.configOfImageHash({imageHash:f.nextImageHash});if(c)return{checkpoint:Vr.genericCoderFor(c.version).config.checkpointOf(c),result:l}}),void 0)).reduce((l,f)=>f&&(!l||f.checkpoint.gt(l.checkpoint))?f: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 f=await a(l.nextImageHash);f&&r.savePresignedConfiguration({wallet:e.wallet,nextConfig:f,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 lq{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&&(!c||u.checkpoint.gt(c.checkpoint))?u:c))==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 G6{constructor(){this.cache=new Map}do(e,r,n,...i){e=`${e}:${me(Le(JSON.stringify(i,fq)))}`;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 fq(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function cq(t){return t instanceof A9}class A9{constructor(e,r=50,n=!1){this.cache=new G6,this.tracker=e,this.window=r,this.verbose=n}invalidateCache(){this.cache=new G6}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)}}var E9=Object.freeze({__proto__:null,debug:XW,local:tq,remote:oq,stores:eq,raceUntil:Up,allSafe:Sf,MultipleTracker:aq,CachedTracker:lq,isDedupedTracker:cq,DedupedTracker:A9});const uq=Object.freeze(Object.defineProperty({__proto__:null,tracker:QW,trackers:E9},Symbol.toStringTag,{value:"Module"}));function zp(){return zp=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.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:zp({},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}),xq=typeof global=="object"?global.fetch:window.fetch;class k9 extends S9{constructor(e="https://metadata.sequence.app"){super(e.endsWith("/")?e.slice(0,-1):e,xq)}}const bq=Object.freeze(Object.defineProperty({__proto__:null,ContractType:yq,Metadata:S9,PropertyType:pq,SequenceMetadataClient:k9,SortOrder:mq,SwapType:gq,WebRPCSchemaHash:vq,WebRPCSchemaVersion:hq,WebRPCVersion:dq},Symbol.toStringTag,{value:"Module"}));function W0(){return W0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),on({},n)).then(i=>an(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),on({},n)).then(i=>an(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),on({},n)).then(i=>an(i).then(s=>({status:s.status}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),on({},n)).then(i=>an(i).then(s=>({chainID:s.chainID}))),this.getEtherBalance=(n,i)=>this.fetch(this.url("GetEtherBalance"),on(n,i)).then(s=>an(s).then(o=>({balance:o.balance}))),this.getTokenBalances=(n,i)=>this.fetch(this.url("GetTokenBalances"),on(n,i)).then(s=>an(s).then(o=>({page:o.page,balances:o.balances}))),this.getTokenSupplies=(n,i)=>this.fetch(this.url("GetTokenSupplies"),on(n,i)).then(s=>an(s).then(o=>({page:o.page,contractType:o.contractType,tokenIDs:o.tokenIDs}))),this.getTokenSuppliesMap=(n,i)=>this.fetch(this.url("GetTokenSuppliesMap"),on(n,i)).then(s=>an(s).then(o=>({supplies:o.supplies}))),this.getBalanceUpdates=(n,i)=>this.fetch(this.url("GetBalanceUpdates"),on(n,i)).then(s=>an(s).then(o=>({page:o.page,balances:o.balances}))),this.getTransactionHistory=(n,i)=>this.fetch(this.url("GetTransactionHistory"),on(n,i)).then(s=>an(s).then(o=>({page:o.page,transactions:o.transactions}))),this.syncBalance=(n,i)=>this.fetch(this.url("SyncBalance"),on(n,i)).then(s=>an(s).then(o=>({}))),this.fetchTransactionReceipt=(n,i)=>this.fetch(this.url("FetchTransactionReceipt"),on(n,i)).then(s=>an(s).then(o=>({receipt:o.receipt}))),this.fetchTransactionReceiptWithFilter=(n,i)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),on(n,i)).then(s=>an(s).then(o=>({receipt:o.receipt}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const on=(t={},e={})=>({method:"POST",headers:W0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),an=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});let Rq=function(t){return t.MAINNET="https://mainnet-indexer.sequence.app",t.POLYGON="https://polygon-indexer.sequence.app",t.POLYGON_MUMBAI="https://mumbai-indexer.sequence.app",t.POLYGON_ZKEVM="https://polygon-zkevm-indexer.sequence.app",t.ARBITRUM="https://arbitrum-indexer.sequence.app",t.ARBITRUM_NOVA="https://arbitrum-nova-indexer.sequence.app",t.OPTIMISM="https://optimism-indexer.sequence.app",t.AVALANCHE="https://avalanche-indexer.sequence.app",t.GNOSIS="https://gnosis-indexer.sequence.app",t.BSC="https://bsc-indexer.sequence.app",t.BSC_TESTNET="https://bsc-testnet-indexer.sequence.app",t.GOERLI="https://goerli-indexer.sequence.app",t}({});const K6=typeof global=="object"?global.fetch:window.fetch;class T9 extends _9{constructor(e,r){super(e.endsWith("/")?e.slice(0,-1):e,K6),this._fetch=(n,i)=>{const s={};return this.jwtAuth&&this.jwtAuth.length>0&&(s.Authorization=`BEARER ${this.jwtAuth}`),i.headers=W0({},i.headers,s),K6(n,i)},this.jwtAuth=r,this.fetch=this._fetch}}const Mq=Object.freeze(Object.defineProperty({__proto__:null,ContractType:Eq,EventLogDataType:kq,EventLogType:Sq,Indexer:_9,SequenceIndexerClient:T9,SequenceIndexerServices:Rq,SortOrder:Iq,TransactionStatus:Tq,TransactionType:Pq,TxnTransferType:_q,WebRPCSchemaHash:Aq,WebRPCSchemaVersion:Cq,WebRPCVersion:wq},Symbol.toStringTag,{value:"Module"}));function Vp(){return Vp=Object.assign?Object.assign.bind():function(t){for(var e=1;e{throw this._jwt=void 0,f}),expiration:o};return this._jwt=a,a.token.then(()=>{this.onAuthCallbacks.forEach(f=>{try{f({status:"fulfilled",value:void 0})}catch{}})}).catch(f=>{this.onAuthCallbacks.forEach(c=>{try{c({status:"rejected",reason:f})}catch{}})}),{token:await a.token,expiration:o}}getProofString(e){if(this.proofStrings.has(e)){const l=this.proofStrings.get(e);if(this.now()i.eq(l.chainId));if(!s)throw Error("No network found");n.chainId=i.toNumber(),n.provider=new R0(Ol(s.rpcUrl),{name:"",chainId:i.toNumber()});const o=this.now()+this.expiration-Oq,a={proofString:Promise.resolve(this.account.signDigest(r.messageDigest(),this.sequenceApiChainId,!0,"eip6492")).then(l=>(r.signature=l,n.encodeProof(r,!0))).catch(l=>{throw this.proofStrings.delete(e),l}),expiration:o};return this.proofStrings.set(e,a),a}getProofStringKey(){return`${this.account.address} - ${this.name}`}async isProofStringValid(e){try{const r=new O0,n=z.from(this.sequenceApiChainId),i=this.networks.find(s=>n.eq(s.chainId));if(!i)throw Error("No network found");return r.chainId=n.toNumber(),r.provider=new R0(Ol(i.rpcUrl),{name:"",chainId:n.toNumber()}),await r.decodeProof(e),!0}catch{return!1}}async dump(){let e;if(this._jwt)try{const r=this._jwt.expiration;e={token:await this._jwt.token,expiration:r}}catch{}return{version:2,address:this.account.address,metadata:this.metadata,jwt:e}}static async open(e){const{referenceSigner:r,threshold:n,metadata:i,addSigners:s,selectWallet:o,settings:a,editConfigOnMigration:l,onMigration:f}=e,{sequenceApiUrl:c,sequenceApiChainId:u,sequenceMetadataUrl:h,contexts:v,networks:x,tracker:g,orchestrator:k}=a,w=u;if(!w)throw Error("No reference chain found");const A=await g.walletsOfSigner({signer:r}),E=await o(A.map($=>$.wallet));let I;if(E){if(I=new Ji({address:E,tracker:g,networks:x,contexts:v,orchestrator:k}),s.length>0){let $=await I.status(w);if($.original.version!==$.version||I.version!==$.version){const{migratedAllChains:W,failedChains:q}=await I.isMigratedAllChains();if(q.some(G=>Hp.includes(G)))throw Error(`Failed to fetch account status on ${q.join(", ")}`);if(!W){if(f&&!await f(I))throw Error("Migration cancelled, cannot open session");const{failedChains:G}=await I.signAllMigrations(l);if(G.some(D=>Hp.includes(D)))throw Error(`Failed to sign migrations on ${G.join(", ")}`);E9.isDedupedTracker(g)&&g.invalidateCache();let re;if([re,$]=await Promise.all([I.isMigratedAllChains().then(D=>D.migratedAllChains),I.status(w)]),!re)throw Error("Failed to migrate account")}}$.onChain.version!==$.version&&await I.doBootstrap(w,void 0,$);const j=$.config,U=I.coders.config.editConfig(j,{add:s,checkpoint:I.coders.config.checkpointOf(j).add(1),threshold:n});await I.updateConfig(U)}}else if(I=await Ji.new({config:{threshold:n,checkpoint:0,signers:s},tracker:g,contexts:v,orchestrator:k,networks:x}),await I.publishWitness(),!(await g.walletsOfSigner({signer:r,noCache:!0})).some(j=>j.wallet===I.address))throw Error("Account not found on tracker");const M=new q0(c,u,h,x,v,I,i);return c?M._initialAuthRequest=M.auth():M._initialAuthRequest=Promise.reject("no sequence api url"),M}static async load(e){const{dump:r,settings:n,editConfigOnMigration:i,onMigration:s}=e,{sequenceApiUrl:o,sequenceApiChainId:a,sequenceMetadataUrl:l,contexts:f,networks:c,tracker:u,orchestrator:h}=n;let v;if(P9(r)){const x=r.config.address||le.context.addressOf(f[1],Wi.config.ConfigCoder.imageHashOf(Vp({},r.config,{version:1})));if(v=new Ji({address:x,tracker:u,networks:c,contexts:f,orchestrator:h}),!await v.isMigratedAllChains().then(g=>g.migratedAllChains)){if(s&&!await s(v))throw Error("Migration cancelled, cannot open session");if(console.log("Migrating account..."),await v.signAllMigrations(i),!await v.isMigratedAllChains().then(g=>g.migratedAllChains))throw Error("Failed to migrate account")}}else if(I9(r))v=new Ji({address:r.address,tracker:u,networks:c,contexts:f,orchestrator:h});else throw Error("Invalid dump format");return new q0(o,a,l,c,f,v,r.metadata,r.jwt)}}function Bq(t){return nE(t).exp}const R9=async(t,e,r)=>{const n=xe(await t.getAddress());if(!n||n===""||n==="0x")throw M9;const i=new tx;if(i.address=n,!r||!r.app||r.app==="")throw new Rx("authorization options requires app to be set");i.claims.app=r.app,i.claims.ogn=r.origin,i.setExpiryIn(r.expiry?Math.max(r.expiry,200):Ix);const s=i.messageTypedData(),o=yE(e);i.signature=await(t instanceof Ji?t.signTypedData(s.domain,s.types,s.message,o,"eip6492"):t.signTypedData(s.domain,s.types,s.message,o));const l=await new O0().encodeProof(i,!0);return{typedData:s,proofString:l}};class Rx extends Error{constructor(e){super(e),this.name="AuthError"}}const M9=new Rx("auth error: account address is empty"),Dq=(t,e,r)=>async(n,i,s)=>{const o=s.messageDigest();return{isValid:await t(i).isValidSignature(s.address,o,s.signature)}},Lq=Object.freeze(Object.defineProperty({__proto__:null,AuthError:Rx,CRITICAL_CHAINS:Hp,DEFAULT_SESSION_EXPIRATION:Ix,ErrAccountIsRequired:M9,LONG_SESSION_EXPIRATION:Nq,Session:q0,ValidateSequenceWalletProof:Dq,isSessionDumpV1:P9,isSessionDumpV2:I9,signAuthorization:R9},Symbol.toStringTag,{value:"Module"}));function Wp(){return Wp=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),Pa({},n)).then(i=>Ia(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),Pa({},n)).then(i=>Ia(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Pa({},n)).then(i=>Ia(i).then(s=>({status:s.status}))),this.getSignerConfig=(n,i)=>this.fetch(this.url("GetSignerConfig"),Pa(n,i)).then(s=>Ia(s).then(o=>({signerConfig:o.signerConfig}))),this.sign=(n,i)=>this.fetch(this.url("Sign"),Pa(n,i)).then(s=>Ia(s).then(o=>({sig:o.sig}))),this.signWith=(n,i)=>this.fetch(this.url("SignWith"),Pa(n,i)).then(s=>Ia(s).then(o=>({sig:o.sig}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Pa=(t={},e={})=>({method:"POST",headers:Wp({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Ia=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 Uq{constructor(e,r,n=!1){this.requests=new Map,this.address=e,this.url=r,this.appendSuffix=n,this.guard=new N9(r,global.fetch)}async getAddress(){return this.address}async requestSignature(e,r,n,i){return le.isWalletSignRequestMetadata(n)?this.requests.set(e,i):i.onRejection("Expected Sequence-like metadata"),!0}notifyStatusChange(e,r,n){if(this.requests.has(e)){if(!le.isWalletSignRequestMetadata(n)){this.requests.get(e).onRejection("Expected Sequence-like metadata (status update)");return}this.evaluateRequest(e,r.message,r,n)}}packMsgAndSig(e,r,n,i){return qr.encode(["address","uint256","bytes","bytes"],[e,i,r,n])}keyOfRequest(e,r,n,i){return Zi(["address","uint256","bytes","bytes"],[e,i,r,n])}async evaluateRequest(e,r,n,i){var s;const o=Vr.genericCoderFor(i.config.version),{encoded:a}=o.signature.encodeSigners(i.config,(s=i.parts)!=null?s:new Map,[],i.chainId);try{var l;const f=this.keyOfRequest(this.address,r,a,i.chainId);if(((l=this.requests.get(e))==null?void 0:l.lastAttempt)===f)return;this.requests.get(e).lastAttempt=f;const u=await this.guard.signWith({signer:this.address,request:{msg:J(r),auxData:this.packMsgAndSig(i.address,i.digest,a,i.chainId),chainId:z.from(i.chainId).toNumber()}});Y(u.sig).length!==0&&(this.requests.get(e).onSignature(u.sig),this.requests.delete(e))}catch{}}suffix(){return this.appendSuffix?[3]:[]}}const zq=Object.freeze(Object.defineProperty({__proto__:null,Guard:N9,GuardSigner:Uq,WebRPCSchemaHash:jq,WebRPCSchemaVersion:Fq,WebRPCVersion:$q},Symbol.toStringTag,{value:"Module"}));function G0(){return G0=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)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.scheduleExecution();const i=a[0].next;let s;var[a,l]=J6(a,v=>{try{if(v.next!==i)return!1;switch(v.request.method){case rr.ethCall:if(v.request.params[0].from||v.request.params[0].gasPrice||v.request.params[0].value)return!1;case rr.ethGetBalance:case rr.ethGetCode:const x=Hq(v.request.params[1]);if(s===void 0&&(s=x),!Wq(x,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))return;let o=a.map(v=>{try{switch(v.request.method){case rr.ethCall:return{delegateCall:!1,revertOnError:!1,target:v.request.params[0].to,data:v.request.params[0].data,gasLimit:v.request.params[0].gas?v.request.params[0].gas:0,value:0};case rr.ethGetCode:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callCode"),[v.request.params[0]])};case rr.ethGetBalance:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callBalanceOf"),[v.request.params[0]])};default:return null}}catch{return null}});var[a,l]=J6(a,(v,x)=>o[x]!==void 0);if(o=o.filter(v=>v),l.length!==0&&(r.options.verbose&&console.log("Forwarding calls on error",l.length),r.forward(l),a.length===0))return;let f;try{f=r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("multiCall"),[o])}catch{r.forward(a);return}const c=ox(),u=await Vq(sx(i)({id:c,jsonrpc:Bl,method:rr.ethCall,params:[{to:r.options.contract,value:0,data:f},z.isBigNumber(s)?s.toNumber():s]}),v=>({jsonrpc:Bl,id:c,result:void 0,error:v}));if(u.error)return r.forward(a);let h;try{h=r.multicallInterface.decodeFunctionResult(r.multicallInterface.getFunction("multiCall"),u.result)}catch{r.forward(a);return}r.options.verbose&&console.log("Got response for",a.length),a.forEach((v,x)=>{if(!h[0][x])r.forward(v);else switch(v.request.method){case rr.ethCall:v.callback(void 0,{jsonrpc:v.request.jsonrpc,id:v.request.id,result:h[1][x]});break;case rr.ethGetCode:v.callback(void 0,{jsonrpc:v.request.jsonrpc,id:v.request.id,result:qr.decode(["bytes"],h[1][x])[0]});break;case rr.ethGetBalance:v.callback(void 0,{jsonrpc:v.request.jsonrpc,id:v.request.id,result:qr.decode(["uint256"],h[1][x])[0]});break}})},this.options=e?G0({},Mn.DefaultOptions,e):Mn.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&&Mn.isMulticallOptions(e.options)}static isMulticallOptions(e){return e!==void 0&&e.batchSize!==void 0&&e.timeWindow!==void 0&&e.contract!==void 0}}Mn.DefaultOptions=G0({},qq);const O9=["getNetwork","getBlockNumber","getGasPrice","getTransactionCount","getStorageAt","sendTransaction","estimateGas","getBlock","getTransaction","getTransactionReceipt","getLogs","emit","litenerCount","addListener","removeListener","waitForTransaction","detectNetwork","getBlockWithTransactions"];class Gq extends MA{constructor(e,r){var n;super(e.getNetwork()),n=this,this.listenerCount=this.provider.listenerCount,this.getResolver=async function(i){const s=n.provider;if(s.getResolver){const o=await s.getResolver(await i);return o?new gp(n,o.address,o.name):null}return s.getResolver(await i)},this.next=async function(i,s){try{switch(i.method){case rr.ethCall:n.callback(i,s,await n.provider.call(i.params[0],i.params[1]));break;case rr.ethGetCode:n.callback(i,s,await n.provider.getCode(i.params[0],i.params[1]));break;case rr.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.provider=e,this.multicall=Mn.isMulticall(r)?r:new Mn(r),O9.forEach(i=>{e[i]!==void 0&&(this[i]=(...s)=>e[i](...s))})}callback(e,r,n,i){r(i,{jsonrpc:Bl,id:e.id,result:n,error:i})}async call(e,r){return this.rpcCall(rr.ethCall,e,r)}async getCode(e,r){return this.rpcCall(rr.ethGetCode,e,r)}async getBalance(e,r){return this.rpcCall(rr.ethGetBalance,e,r)}async rpcCall(e,...r){const n=ox();return(await sx(this.multicall.handle)(this.next,{jsonrpc:Bl,id:n,method:e,params:r})).result}}class Kq{constructor(e,r){if(this.provider=e,this.multicall=Mn.isMulticall(r)?r:new Mn(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 Jq=t=>e=>{const r=Mn.isMulticall(t)?t:new Mn(t);return(n,i)=>r.handle(e,n,i)};var Qq=Object.freeze({__proto__:null,ProxyMethods:O9,MulticallProvider:Gq,MulticallExternalProvider:Kq,multicallMiddleware:Jq});const Yq=Object.freeze(Object.defineProperty({__proto__:null,Multicall:Mn,providers:Qq},Symbol.toStringTag,{value:"Module"}));var Dl={},Xq={get exports(){return Dl},set exports(t){Dl=t}};/*! +)[]`,XE=(t,e)=>{const r=[],n=new xr(Mr.mainModule.abi);for(const i of e){const s=Y(i.data||"0x");if(i.to===t&&J(s.slice(0,4))===QE){const o=s.slice(4),a=qr.decode([YE],o)[0];r.push(...a.map(l=>Pr({},l,{to:l.target})))}else try{const o=n.decodeFunctionData("execute",s)[0],a=XE(t,o.map(l=>Pr({},l,{to:l.target})));r.push(...a)}catch{r.push(i)}}return r};var YH=Object.freeze({__proto__:null,MetaTransactionsType:Jh,intendTransactionBundle:UH,intendedTransactionID:zH,unpackMetaTransactionsData:VH,packMetaTransactionsData:HE,digestOfTransactions:WE,subdigestOfTransactions:HH,subdigestOfGuestModuleTransactions:WH,toSequenceTransactions:qE,toSequenceTransaction:kx,isSequenceTransaction:Qh,hasSequenceTransactions:GE,sequenceTxAbiEncode:jc,fromTxAbiEncode:qH,encodeNonce:GH,decodeNonce:KH,fromTransactionish:JH,isTransactionBundle:KE,isSignedTransactionBundle:JE,encodeBundleExecData:QH,selfExecuteSelector:QE,selfExecuteAbi:YE,unwind:XE});const ZE="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",XH="0x6492649264926492649264926492649264926492649264926492649264926492";async function e9(t,e,r,n){return await t.call({data:je([ZE,new Lm().encode(["address","bytes32","bytes"],[e,r,n])])})==="0x01"}var ZH=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:ZE,EIP_6492_SUFFIX:XH,validateEIP6492Offchain:e9});class eW{constructor(e){this.isDeployedCache=new Set,this.provider=e}module(e){return new Zl(e,[...Mr.mainModuleUpgradable.abi,...Mr.mainModule.abi,...Mr.erc1271.abi],this.provider)}async isDeployed(e){if(this.isDeployedCache.has(e))return!0;const n=(await this.provider.getCode(e).then(i=>Y(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=>Y(i));if(n.length===20)return xe(J(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 e9(this.provider,e,r,n)}}var tW=Object.freeze({__proto__:null,OnChainReader:eW});function rW(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var le=Object.freeze({__proto__:null,config:yH,signature:pH,context:jH,signer:CH,EIP1271:xH,transaction:YH,reader:tW,EIP6492:ZH,isWalletSignRequestMetadata:rW});const Mp=[{config:yx,signature:vx},{config:Kh,signature:Gh}];function t9(t){const e=t-1;if(e<0||e>=Mp.length)throw new Error(`No coder for version: ${t}`);return Mp[e]}function nW(t){return t9(t)}var Vr=Object.freeze({__proto__:null,ALL_CODERS:Mp,coderFor:t9,genericCoderFor:nW});const r9=[Wi,ke],iW=Object.freeze(Object.defineProperty({__proto__:null,allVersions:r9,commons:le,universal:Vr,v1:Wi,v2:ke},Symbol.toStringTag,{value:"Module"}));function sW(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),f=[];for(let c=1;cY(s).length===0))return j6;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:z.from(i).toNumber(),gasLimit:z.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 Zl(e,Mr.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(c,u){let h=0;for(;!o;){try{return await c()}catch(v){if(h++,i!==void 0&&h>=i)throw fe.error(`giving up after ${h} failed attempts${u?`: ${u}`:""}`,v),v;fe.warn(`attempt #${h} failed${u?`: ${u}`:""}`,v)}n>0&&await new Promise(v=>setTimeout(v,n))}throw new Error(`timed out after ${h} failed attempts${u?`: ${u}`:""}`)},l=async function(){let c=s.fromBlockLog;if(c<0&&(c=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number")+c),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"),v=await a(()=>s.provider.getLogs({fromBlock:Math.max(0,c-s.deltaBlocksLog),toBlock:h,topics:["0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881"]}),`unable to get NonceChange logs for blocks ${Math.max(0,c-s.deltaBlocksLog)} to ${h}`);c=h;const g=(await Promise.all(v.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(g)return fa({receipt:g},await a(()=>s.provider.getTransaction(g.transactionHash),`unable to get transaction ${g.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((f,c)=>setTimeout(()=>{o=!0,c(`Timeout waiting for transaction receipt ${e}`)},r))]):l()}}function dW(t){return t.signer!==void 0&&ss.isSigner(t.signer)}class hW extends a9{constructor(e){if(super(ss.isSigner(e)?{provider:e.provider}:fa({},e,{provider:e.signer.provider})),this.signer=ss.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){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&&fe.warn("LocalRelayer doesn't accept fee quotes");const i=le.transaction.encodeBundleExecData(e),s=this.signer.sendTransaction(fa({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 vW="v1",yW="v0.4.0",pW="752f4f4274ca80d2fd974b5b44ed8245dfe40554";let Bs=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}({}),gW=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}({}),mW=function(t){return t.UNKNOWN="UNKNOWN",t.ERC20_TOKEN="ERC20_TOKEN",t.ERC1155_TOKEN="ERC1155_TOKEN",t}({}),xW=function(t){return t.DESC="DESC",t.ASC="ASC",t}({});class l9{constructor(e,r){this.path="/rpc/Relayer/",this.ping=n=>this.fetch(this.url("Ping"),Yt({},n)).then(i=>Xt(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),Yt({},n)).then(i=>Xt(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Yt({},n)).then(i=>Xt(i).then(s=>({status:s.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),Yt({},n)).then(i=>Xt(i).then(s=>({data:s.data}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),Yt({},n)).then(i=>Xt(i).then(s=>({chainID:s.chainID}))),this.sendMetaTxn=(n,i)=>this.fetch(this.url("SendMetaTxn"),Yt(n,i)).then(s=>Xt(s).then(o=>({status:o.status,txnHash:o.txnHash}))),this.getMetaTxnNonce=(n,i)=>this.fetch(this.url("GetMetaTxnNonce"),Yt(n,i)).then(s=>Xt(s).then(o=>({nonce:o.nonce}))),this.getMetaTxnReceipt=(n,i)=>this.fetch(this.url("GetMetaTxnReceipt"),Yt(n,i)).then(s=>Xt(s).then(o=>({receipt:o.receipt}))),this.simulate=(n,i)=>this.fetch(this.url("Simulate"),Yt(n,i)).then(s=>Xt(s).then(o=>({results:o.results}))),this.updateMetaTxnGasLimits=(n,i)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),Yt(n,i)).then(s=>Xt(s).then(o=>({payload:o.payload}))),this.feeTokens=n=>this.fetch(this.url("FeeTokens"),Yt({},n)).then(i=>Xt(i).then(s=>({isFeeRequired:s.isFeeRequired,tokens:s.tokens}))),this.feeOptions=(n,i)=>this.fetch(this.url("FeeOptions"),Yt(n,i)).then(s=>Xt(s).then(o=>({options:o.options,quote:o.quote}))),this.getMetaTxnNetworkFeeOptions=(n,i)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),Yt(n,i)).then(s=>Xt(s).then(o=>({options:o.options}))),this.sentTransactions=(n,i)=>this.fetch(this.url("SentTransactions"),Yt(n,i)).then(s=>Xt(s).then(o=>({page:o.page,transactions:o.transactions}))),this.pendingTransactions=(n,i)=>this.fetch(this.url("PendingTransactions"),Yt(n,i)).then(s=>Xt(s).then(o=>({page:o.page,transactions:o.transactions}))),this.listGasSponsors=(n,i)=>this.fetch(this.url("ListGasSponsors"),Yt(n,i)).then(s=>Xt(s).then(o=>({page:o.page,gasSponsors:o.gasSponsors}))),this.addGasSponsor=(n,i)=>this.fetch(this.url("AddGasSponsor"),Yt(n,i)).then(s=>Xt(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.updateGasSponsor=(n,i)=>this.fetch(this.url("UpdateGasSponsor"),Yt(n,i)).then(s=>Xt(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.reportGasSponsorUsage=(n,i)=>this.fetch(this.url("ReportGasSponsorUsage"),Yt(n,i)).then(s=>Xt(s).then(o=>({gasSponsorUsage:o.gasSponsorUsage}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Yt=(t={},e={})=>({method:"POST",headers:fa({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Xt=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 U6=Object.freeze({__proto__:null,WebRPCVersion:vW,WebRPCSchemaVersion:yW,WebRPCSchemaHash:pW,ETHTxnStatus:Bs,TransferType:gW,FeeTokenType:mW,SortOrder:xW,Relayer:l9});const bW=[Bs.DROPPED,Bs.SUCCEEDED,Bs.PARTIALLY_FAILED,Bs.FAILED],wW=[Bs.DROPPED,Bs.PARTIALLY_FAILED,Bs.FAILED];function CW(t){return t.url!==void 0&&typeof t.url=="string"&&t.provider!==void 0&&oo.isProvider(t.provider)}const AW=typeof global=="object"?global.fetch:window.fetch;class f9{constructor(e){this.service=new l9(e.url,AW),this.provider=oo.isProvider(e.provider)?e.provider:new M0(Dl(e.provider.url))}async waitReceipt(e,r=1e3,n=5,i){typeof e!="string"&&(e=le.transaction.intendedTransactionID(e)),fe.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"&&bW.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(", ");fe.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${i}`);const s=await this.getNonce(e);if(!this.provider)throw fe.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 fe.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(o)}`),{options:o,quote:{_tag:"FeeQuote",_quote:a}}}else return fe.info("[rpc-relayer/getFeeOptions] relayer fees are not required"),{options:[]}}async getFeeOptionsRaw(e,r){const{options:n,quote:i}=await this.service.feeOptions({wallet:e,to:e,data:J(r)});return{options:n,quote:{_tag:"FeeQuote",_quote:i}}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}async getNonce(e,r){fe.info(`[rpc-relayer/getNonce] get nonce for wallet ${e} space: ${r}`);const n=r!==void 0?z.from(r).toHexString():void 0,i=await this.service.getMetaTxnNonce({walletContractAddress:e,space:n}),s=z.from(i.nonce),[o,a]=le.transaction.decodeNonce(s);return fe.info(`[rpc-relayer/getNonce] got next nonce for wallet ${e} ${a} space: ${o}`),s}async relay(e,r,n=!0){var i=this;fe.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:fe.warn("[rpc-relayer/relay] ignoring invalid fee quote")),!this.provider)throw fe.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(fe.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:c=>Promise.reject(new Error("impossible"))},f=async function(u){var h;if(!i.provider)throw new Error("cannot wait for receipt, relayer has no provider set");const v=await i.wait(e.intent.id),x=(h=v.receipt)==null?void 0:h.transactionHash;if(!x)throw new Error("cannot wait for receipt, unknown native transaction hash");return Object.assign(l,v),i.provider.waitForTransaction(x,u)};return l.wait=f,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((f,c)=>setTimeout(()=>{o=!0,c(`Timeout waiting for transaction receipt ${e}`)},r))]):this.waitReceipt(e,n,i));if(!a.txnReceipt||wW.includes(a.status))throw new EW(a);const l=JSON.parse(a.txnReceipt);return{blockHash:l.blockHash,blockNumber:z.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(f){return s.provider.waitForTransaction(l.transactionHash,f)}}}}class EW{constructor(e){this.receipt=e}}function c9(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 SW=Object.freeze(Object.defineProperty({__proto__:null,LocalRelayer:hW,ProviderRelayer:a9,ProviderRelayerDefaults:o9,RpcRelayer:f9,RpcRelayerProto:U6,isLocalRelayerOptions:dW,isProviderRelayerOptions:uW,isRelayer:c9,isRpcRelayerOptions:CW,proto:U6},Symbol.toStringTag,{value:"Module"}));function u9(t){return t.requestSignature!==void 0&&t.notifyStatusChange!==void 0}class d9{constructor(e,r=!0){this.signer=e,this.eoa=r}getAddress(){return this.signer.getAddress()}async requestSignature(e,r,n,i){return i.onSignature(await this.signer.signMessage(r)),!0}notifyStatusChange(e,r,n){}suffix(){return[2]}}var kW=Object.freeze({__proto__:null,isSapientSigner:u9,SignerWrapper:d9});function h9(t){return t.rejected}function _x(t){return t.signature!==void 0}function v9(t){return!h9(t)&&!_x(t)}const y9="Initial";class Tx{constructor(e,r=Tx.randomTag()){this.observers=[],this.signers=[],this.count=0,this.tag=r,this.setSigners(e)}static randomTag(){return`default-${J(Ki(8)).slice(2)}`}pullId(){return`${this.tag}-${this.count++}`}setSigners(e){this.signers=e.map(r=>u9(r)?r:new d9(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)})])}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,f={ended:!1,message:s,signers:{}};let c=o??{};const u=g=>{c=g,r.notifyObservers(n,f,c)},h=()=>{try{r.notifyObservers(n,f,c);const g=Object.entries(f.signers).filter(([k,w])=>v9(w));if(a&&a(f,u)||g.length===0){f.ended=!0,i(f),r.notifyObservers(n,f,c);return}}catch(g){console.error("Error while notifying observers",g)}};let v=r.signers;if(l){const g=await Promise.all(r.signers.map(async function(k){return k.getAddress()}));v=r.signers.filter((k,w)=>l.includes(g[w]))}const x=await Promise.allSettled(v.map(async function(g){const k=await g.getAddress();return f.signers[k]={situation:y9},g.requestSignature(n,s,o??{},{onSignature:w=>{const A=g.suffix();f.signers[k]={signature:w,suffix:A},h()},onRejection:w=>{f.signers[k]={rejected:!0,error:w},h()},onStatus:w=>{f.signers[k]={situation:w},h()}})}));for(let g=0;gkt(e))):kt(t)}const z6=t=>{const e=new Map;for(const r of Object.keys(t.signers)){const n=t.signers[r];if(_x(n)){const i=Y(n.suffix),s=Ae(["bytes","bytes"],[n.signature,i]);e.set(r,{signature:s,isDynamic:i.length!==1||i[0]!==2})}}return e};let V6=class $p extends ss{constructor(e){if(ze.eq(e.chainId)&&!e.coders.signature.supportsNoChainId)throw new Error(`Sequence version ${e.config.version} doesn't support chainId 0`);super(),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 $p(No({},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){if(await this.reader().isDeployed(this.address))return e;const r=this.buildDeployTransaction();return{entrypoint:this.context.guestModule,chainId:this.chainId,intent:e.intent,transactions:[...r.transactions,{to:e.entrypoint,data:le.transaction.encodeBundleExecData(e),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}}buildDeployTransaction(){const e=this.coders.config.imageHashOf(this.config);if(le.context.addressOf(this.context,e)!==this.address)throw new Error(`First address of config ${e} doesn't match wallet address ${this.address}`);return $p.buildDeployTransaction(this.context,e)}deploy(){const e=this.buildDeployTransaction();if(!this.relayer)throw new Error("Wallet deploy requires a relayer");return this.relayer.relay(No({},e,{chainId:this.chainId,intent:{id:J(Ki(32)),wallet:this.address}}))}static buildDeployTransaction(e,r){const n=new xr(Mr.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 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=No({digest:e,chainId:this.chainId,address:this.address,config:this.config},r),s=Y(n),o=await this.orchestrator.signMessage({candidates:this.coders.config.signersOf(this.config).map(l=>l.address),message:s,metadata:i,callback:(l,f)=>{const c=z6(l),u=No({},i,{parts:c});return f(u),this.coders.signature.hasEnoughSigningPower(this.config,c)}}),a=z6(o);return this.coders.signature.encodeSigners(this.config,a,[],this.chainId).encoded}signMessage(e){return this.signDigest(me(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 signTransactions(e,r){const n=await Lp(e),i=le.transaction.fromTransactionish(this.address,n);i.length===0&&i.push({to:this.address,data:"0x",value:0,gasLimit:0,delegateCall:!1,revertOnError:!0});let s=r;if(s===void 0&&(s=await this.reader().nonce(this.address,0),s===void 0))throw new Error("Unable to determine nonce");const o=le.transaction.digestOfTransactions(s,i),a=await this.signDigest(o,{transactions:i});return{intent:{id:Sp(this.address,this.chainId,o),wallet:this.address},chainId:this.chainId,transactions:i,entrypoint:this.address,nonce:s,signature:a}}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,n){const i=await this.signTransactions(e,r),s=await this.decorateTransactions(i);return this.sendSignedTransaction(s,n)}async fillGasLimits(e){const r=await Lp(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?z.from(o.gasLimit).toNumber():s[a].gasLimit;return No({},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 Oo(){return Oo=Object.assign?Object.assign.bind():function(t){for(var e=1;er.eq(i.chainId));if(!n)throw new Error(`Network not found for chainId ${e}`);return n}provider(e){const r=this.network(e);if(!r.provider&&!r.rpcUrl)throw new Error(`Provider not found for chainId ${e}`);return r.provider||new M0(Dl(r.rpcUrl),{name:"",chainId:z.from(e).toNumber()})}reader(e){return ze.eq(e)?new IW:new le.reader.OnChainReader(this.provider(e))}relayer(e){const r=this.network(e);if(!r.relayer)throw new Error(`Relayer not found for chainId ${e}`);return c9(r.relayer)?r.relayer:new f9(r.relayer)}setOrchestrator(e){this.orchestrator=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=Vr.coderFor(r.version);return this.walletFor(e,this.contextFor(r.version),r.config,n)}walletFor(e,r,n,i){const s=ze.eq(e);return new V6({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=>n9.counterfactualVersion(this.address,M.imageHash,Object.values(this.contexts))),a=async function(){if(!await i)return o;const $=await n.reader(e).implementation(n.address);if(!$)throw new Error(`Implementation not found for wallet ${n.address}`);const j=Object.values(n.contexts);for(let U=0;U0?g[g.length-1].nextImageHash:h,w=await this.tracker.configOfImageHash({imageHash:k});if(!w)throw new Error(`Config not found for imageHash ${k}`);const A=await i,E=await s,I=Vr.coderFor(v).config.checkpointOf(w);return{original:Oo({},E,{version:await o}),onChain:{imageHash:u,config:await f,version:c,deployed:A},fullyMigrated:v===this.version,signedMigrations:x,version:v,presignedConfigurations:g,imageHash:k,config:w,checkpoint:I,canOnchainValidate:c===this.version&&A}}mustBeFullyMigrated(e){if(!e.fullyMigrated)throw new Error(`Wallet ${this.address} is not fully migrated`)}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}decorateTransactions(e,r){const n=this.buildBootstrapTransactions(r,e.chainId);return n.transactions.length===0?e:{entrypoint:n.entrypoint,chainId:e.chainId,intent:e.intent,transactions:[...n.transactions,{to:e.entrypoint,data:le.transaction.encodeBundleExecData(e),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}}decorateSignature(e,r){if(!r.presignedConfigurations||r.presignedConfigurations.length===0)return new Promise(o=>o(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=me(Le(`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"){const s=ze.eq(r)?this.networks[0].chainId:r,o=await this.status(s);if(this.mustBeFullyMigrated(o),!o.canOnchainValidate&&i==="throw")throw new Error("Wallet cannot validate onchain");const l=await this.walletForStatus(r,o).signDigest(e),f=n?this.decorateSignature(l,o):l;if(!o.canOnchainValidate)switch(i){case"ignore":return f;case"eip6492":return this.buildEIP6492Signature(await f,o,r)}return f}buildEIP6492Signature(e,r,n){const i=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 Ae(["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,Oo({},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}`)}buildBootstrapTransactions(e,r){const n=[];if(!e.onChain.deployed){const o=V6.buildDeployTransaction(e.original.context,e.original.imageHash);n.push(...o.transactions)}n.push(...e.signedMigrations.map(o=>({to:o.tx.entrypoint,data:le.transaction.encodeBundleExecData(o.tx),value:0,gasLimit:0,revertOnError:!0,delegateCall:!1})));const i=e.signedMigrations.length>0?e.signedMigrations[0].tx.intent.id:le.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,r,n),{guestModule:s}=this.contextFor(e.version);return{entrypoint:s,transactions:n,chainId:r,intent:{id:i,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(Oo({},i,{chainId:e}),r)}signMessage(e,r,n="ignore"){return this.signDigest(me(e),r,!0,n)}async signTransactions(e,r,n){const i=n||await this.status(r);this.mustBeFullyMigrated(i);const o=await this.walletForStatus(r,i).signTransactions(e);return Oo({},o,{signature:await this.decorateSignature(o.signature,i)})}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=Vr.coderFor(s.version).config,l=a.imageHashOf(s),f=await this.tracker.configOfImageHash({imageHash:l,noCache:!0});if(!f||a.imageHashOf(f)!==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){const s=i||await this.status(e.chainId);this.mustBeFullyMigrated(s);const o=this.decorateTransactions(e,s);return this.relayer(r).relay(o,n)}async fillGasLimits(e,r,n){return this.walletForStatus(r,n||await this.status(r)).fillGasLimits(e)}async gasRefundQuotes(e,r,n,i){const s=i||await this.status(r),o=this.walletForStatus(r,s),a=await this.predecorateTransactions(e,s,r),l=le.transaction.fromTransactionish(this.address,a),f=o.coders.config.buildStubSignature(o.config,n),c=J(Ki(32)),u={chainId:r,intent:{id:c,wallet:this.address},signature:f,transactions:l,entrypoint:this.address,nonce:0},h=this.decorateTransactions(u,s),v=le.transaction.encodeBundleExecData(h),x=await this.relayer(r).getFeeOptionsRaw(h.entrypoint,v);return Oo({},x,{decorated:h})}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),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){const o=await this.status(r),a=i?e:await this.predecorateTransactions(e,o,r),l=await this.signTransactions(a,r);return s&&s(l),this.sendSignedTransactions(l,r,n)}async signTypedData(e,r,n,i,s="ignore"){const o=Vh({domain:e,types:r,message:n});return this.signDigest(o,i,!0,s)}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=>Vr.coderFor(a.toVersion).config.imageHashOf(a.toConfig)):[],...s.presignedConfigurations.map(a=>a.nextImageHash)];return Promise.all(o.map(async function(a,l){const f=l===o.length-1,c=await e.tracker.configOfImageHash({imageHash:a});if(!c){console.warn(`AllSigners may be incomplete, config not found for imageHash ${a}`);return}Vr.genericCoderFor(c.version).config.signersOf(c).forEach(v=>{const x=r.find(g=>g.address===v.address&&g.network===i);if(x&&f&&x.flaggedForRemoval){x.flaggedForRemoval=!1;return}x||r.push({address:v.address,weight:v.weight,network:i,flaggedForRemoval:!f})})}))})),r}}function RW(t){return t instanceof Ji}const MW=Object.freeze(Object.defineProperty({__proto__:null,Account:Ji,isAccount:RW},Symbol.toStringTag,{value:"Module"}));function NW(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function OW(t){return t.startsWith("ipfs://")}class DW{constructor(e,r,n=1e3){this.pending=new Map,this.provider=e,this.solver=r,this.window=n}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 LW(BW(t,e).getAlternativeSignature(r));if(!o||o==="")throw new Error("EIP5719 - Invalid signature and no alternative signature");const a=J(await(i||new $W).resolve(o));if(!a||a==="")throw new Error("EIP5719 - Empty alternative signature");if(a===J(n))throw new Error("EIP5719 - Alternative signature is invalid or the same");return p9(t,e,r,a,i,s+1)}class $W{constructor(e="https://cloudflare-ipfs.com/ipfs/"){var r=this;this.uri=n=>OW(n)?NW(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()},this.gateway=e}}const FW=(t,e)=>e.some(r=>t instanceof r);let H6,W6;function jW(){return H6||(H6=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function UW(){return W6||(W6=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const g9=new WeakMap,Fp=new WeakMap,m9=new WeakMap,kv=new WeakMap,Px=new WeakMap;function zW(t){const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{r(Js(t.result)),i()},o=()=>{n(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&g9.set(r,t)}).catch(()=>{}),Px.set(e,t),e}function VW(t){if(Fp.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)});Fp.set(t,e)}let jp={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return Fp.get(t);if(e==="objectStoreNames")return t.objectStoreNames||m9.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Js(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 HW(t){jp=t(jp)}function WW(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(_v(this),e,...r);return m9.set(n,e.sort?e.sort():[e]),Js(n)}:UW().includes(t)?function(...e){return t.apply(_v(this),e),Js(g9.get(this))}:function(...e){return Js(t.apply(_v(this),e))}}function qW(t){return typeof t=="function"?WW(t):(t instanceof IDBTransaction&&VW(t),FW(t,jW())?new Proxy(t,jp):t)}function Js(t){if(t instanceof IDBRequest)return zW(t);if(kv.has(t))return kv.get(t);const e=qW(t);return e!==t&&(kv.set(t,e),Px.set(e,t)),e}const _v=t=>Px.get(t);function GW(t,e,{blocked:r,upgrade:n,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),a=Js(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Js(o.result),l.oldVersion,l.newVersion,Js(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",f=>i(f.oldVersion,f.newVersion,f))}).catch(()=>{}),a}const KW=["get","getKey","getAll","getAllKeys","count"],JW=["put","add","delete","clear"],Tv=new Map;function q6(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Tv.get(e))return Tv.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,i=JW.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||KW.includes(r)))return;const s=async function(o,...a){const l=this.transaction(o,i?"readwrite":"readonly");let f=l.store;return n&&(f=f.index(a.shift())),(await Promise.all([f[r](...a),i&&l.done]))[0]};return Tv.set(e,s),s}HW(t=>({...t,get:(e,r,n)=>q6(e,r)||t.get(e,r,n),has:(e,r)=>!!q6(e,r)||t.has(e,r)}));class QW{}var YW=Object.freeze({__proto__:null,ConfigTracker:QW});class XW{constructor(e){this.tracker=e}async loadPresignedConfiguration(e){return console.debug("? loadPresignedConfiguration"),Br(e,"? "),Br(await this.tracker.loadPresignedConfiguration(e),"! ")}savePresignedConfiguration(e){return console.debug("? savePresignedConfiguration"),Br(e,"? "),this.tracker.savePresignedConfiguration(e)}saveWitnesses(e){return console.debug("? saveWitnesses"),Br(e,"? "),this.tracker.saveWitnesses(e)}async configOfImageHash(e){return console.debug("? configOfImageHash"),Br(e,"? "),Br(await this.tracker.configOfImageHash(e),"! ")}saveWalletConfig(e){return console.debug("? saveWalletConfig"),Br(e,"? "),this.tracker.saveWalletConfig(e)}async imageHashOfCounterfactualWallet(e){return console.debug("? imageHashOfCounterfactualWallet"),Br(e,"? "),Br(await this.tracker.imageHashOfCounterfactualWallet(e),"! ")}saveCounterfactualWallet(e){return console.debug("? saveCounterfactualWallet"),Br(e,"? "),this.tracker.saveCounterfactualWallet(e)}async walletsOfSigner(e){return console.debug("? walletsOfSigner"),Br(e,"? "),Br(await this.tracker.walletsOfSigner(e),"! ")}async getMigration(e,r,n,i){return console.debug("? getMigration"),Br({address:e,fromImageHash:r,fromVersion:n,chainId:i},"? "),Br(await this.tracker.getMigration(e,r,n,i),"! ")}saveMigration(e,r,n){return console.debug("? saveMigration"),Br({address:e,signed:r,contexts:n},"? "),this.tracker.saveMigration(e,r,n)}}function Br(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 ZW=Object.freeze({__proto__:null,DebugConfigTracker:XW});function ro(){return ro=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,s;return Promise.resolve(((i=this.migrations[e])==null||(s=i[r])==null?void 0:s[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 yl(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]=z.from(n):Array.isArray(n)?e[r]=n.map(i=>yl(i)):typeof n=="object"&&n!==null?e[r]=yl(n):e[r]=n}return e}class eq{constructor(e){var r=this;this.loadConfig=async function(n){return(await r.getDb()).get("configs",n).then(s=>yl(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=>yl(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=>yl(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)},this.dbName=e}async getDb(){if(this._lazyDb)return this._lazyDb;const e=this.dbName;return this._lazyDb=await GW(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 b9(t){return t.left!==void 0&&t.right!==void 0}function w9(t){return t.weight!==void 0&&t.threshold!==void 0&&t.tree!==void 0}function Up(t){return t.version===2&&t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&typeof t.tree=="string"}var tq=Object.freeze({__proto__:null,isPlainNode:b9,isPlainNested:w9,isPlainV2Config:Up,MemoryTrackerStore:x9,recreateBigNumbers:yl,IndexedDBStore:eq});class C9{constructor(e,r=new x9,n=!1){var i=this;this.loadTopology=async function(s){const o=await i.store.loadV2Node(s);if(!o)return{nodeHash:s};if(b9(o)){const[a,l]=await Promise.all([i.loadTopology(o.left),i.loadTopology(o.right)]);return{left:a,right:l}}return w9(o)?{weight:z.from(o.weight),threshold:z.from(o.threshold),tree:await i.loadTopology(o.tree)}:o},this.saveTopology=async function(s){if(ke.config.isNodeLeaf(s))return;const o=ke.config.hashNode(s);if(ke.config.isNode(s)){const a=i.saveTopology(s.left),l=i.saveTopology(s.right),f=i.store.saveV2Node(o,{left:ke.config.hashNode(s.left),right:ke.config.hashNode(s.right)});await Promise.all([a,l,f]);return}if(ke.config.isNestedLeaf(s)){const a=i.saveTopology(s.tree),l=i.store.saveV2Node(o,{weight:z.from(s.weight).toString(),threshold:z.from(s.threshold).toString(),tree:ke.config.hashNode(s.tree)});await Promise.all([a,l]);return}if(ke.config.isSignerLeaf(s))return i.store.saveV2Node(o,{address:s.address,weight:s.weight});if(ke.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(Wi.config.ConfigCoder.isWalletConfig(o)){const a=Wi.config.ConfigCoder.imageHashOf(o);return i.store.saveConfig(a,o)}if(ke.config.ConfigCoder.isWalletConfig(o)){const a=ke.config.ConfigCoder.imageHashOf(o);if(ke.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&&!Up(a))return i.configOfImageHashCache[s.imageHash]=a,a;if(Up(a)){const l={version:2,threshold:z.from(a.threshold),checkpoint:z.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=Vr.genericCoderFor(o.version).config.imageHashOf(o);await Promise.all([i.saveWalletConfig({config:o}),...a.map(f=>{const c=le.context.addressOf(f,l);return i.store.saveCounterfactualWallet(c,l,f)})])},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=ke.signature.SignatureCoder.decode(s.signature),a=Vr.genericCoderFor(s.nextConfig.version).config.imageHashOf(s.nextConfig),l=ke.chained.messageSetImageHash(a),f=me(l),c={message:l,address:s.wallet,chainId:0,digest:f},u=i.savePayload({payload:c}),h=i.saveWalletConfig({config:s.nextConfig}),v=await ke.signature.SignatureCoder.recover(o,c,i.provider),x=ke.signature.signaturesOf(v.config.tree);await Promise.all([u,h,i.saveWalletConfig({config:v.config}),...x.map(g=>i.store.saveSignatureOfSubdigest(g.address,v.subdigest,g.signature))])},this.loadPresignedConfiguration=async function(s){const{wallet:o,fromImageHash:a,longestPath:l}=s,f=await i.configOfImageHash({imageHash:a});if(!f||!ke.config.ConfigCoder.isWalletConfig(f))return[];const c=ke.config.signersOf(f.tree).map(E=>E.address),u=await Promise.all(c.map(E=>i.store.loadSubdigestsOfSigner(E))),h=[...new Set(u.flat())],x=(await Promise.all([...new Set(h)].map(async function(E){return ro({},await i.payloadOfSubdigest({subdigest:E}),{subdigest:E})}))).filter(E=>(E==null?void 0:E.message)&&(E==null?void 0:E.address)&&E.address===o).map(E=>({payload:E,nextImageHash:ke.chained.decodeMessageSetImageHash(E.message)})).filter(E=>E==null?void 0:E.nextImageHash);let g;const w=(await Promise.all(x.map(async function({nextImageHash:E,payload:I}){const M=await i.configOfImageHash({imageHash:E});if(!M||!ke.config.isWalletConfig(M))return;const $=z.from(M.checkpoint);return{nextConfig:M,nextCheckpoint:$,nextImageHash:E,payload:I}}))).filter(E=>E!==void 0).filter(E=>E.nextCheckpoint.gt(f.checkpoint)).sort((E,I)=>E.nextCheckpoint.gt(I.nextCheckpoint)?l?1:-1:l?-1:1);for(const E of w){const{nextConfig:I,nextCheckpoint:M,nextImageHash:$,payload:j}=E;if(g){const q=g.checkpoint;if(l){if(M.gte(q))continue}else if(M.lte(q))continue}const U=new Map((await Promise.all(c.map(async function(q){const G=await i.store.loadSignatureOfSubdigest(q,j.subdigest);if(!G)return[q,void 0];const re=J(i.useEIP5719?await i.cachedEIP5719.runByEIP5719(q,j.subdigest,G):G),B=le.signer.tryRecoverSigner(j.subdigest,re)!==q;return[q,{isDynamic:B,signature:re}]}))).filter(q=>Boolean(q[1])));if(U.size===0)continue;const W=ke.signature.SignatureCoder.encodeSigners(f,U,[],0);W.weight.lt(f.threshold)||(g={nextImageHash:$,checkpoint:z.from(I.checkpoint),signature:W.encoded})}if(!g)return[];const A=await i.loadPresignedConfiguration({wallet:o,fromImageHash:g.nextImageHash,longestPath:l});return[{wallet:o,nextImageHash:g.nextImageHash,signature:g.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 f=le.signer.recoverSigner(a,l);return i.store.saveSignatureOfSubdigest(f,a,l)})])},this.walletsOfSigner=async function(s){const o=await i.store.loadSubdigestsOfSigner(s.signer),a=await Promise.all(o.map(f=>i.payloadOfSubdigest({subdigest:f}))).then(f=>f.filter(c=>c!==void 0)),l=[];for(const f of a){const c=f.address;if(l.find(v=>v.wallet===c))continue;const u=le.signature.subdigestOf(f),h=await i.store.loadSignatureOfSubdigest(s.signer,u);h&&l.push({wallet:c,proof:{digest:f.digest,chainId:z.from(f.chainId),signature:J(h)}})}return l},this.provider=e,this.store=r,this.useEIP5719=n,this.cachedEIP5719=new DW(e)}async saveMigration(e,r,n){const i=r.fromVersion;if(i!==1)throw new Error("Migration not supported");if(!ke.config.isWalletConfig(r.toConfig))throw new Error("Invalid to config");const{newImageHash:s,address:o}=s9.v1v2.decodeTransaction(r.tx,n);if(o!==e)throw new Error("Invalid migration transaction - address");if(ke.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=me(a),f={chainId:r.tx.chainId,message:a,address:e,digest:l},c=le.signature.subdigestOf(f),u=this.savePayload({payload:f}),h=this.saveWalletConfig({config:r.toConfig}),v=Wi.signature.SignatureCoder.decode(r.tx.signature),x=await Wi.signature.SignatureCoder.recover(v,f,this.provider),g=Wi.signature.SignatureCoder.signaturesOf(x.config);await Promise.all([u,h,this.saveWalletConfig({config:x.config}),this.store.saveMigrationsSubdigest(e,i,i+1,c,s),...g.map(k=>this.store.saveSignatureOfSubdigest(k.address,x.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=Vr.coderFor(n);return!o||!l.config.isWalletConfig(o)?void 0:(await Promise.all(a.map(async function(c){const{subdigest:u,toImageHash:h}=c,v=await s.payloadOfSubdigest({subdigest:u});if(!v||!v.message||!z.from(i).eq(v.chainId))return;const x=l.config.signersOf(o).map(E=>E.address),g=new Map((await Promise.all(x.map(async function(E){const I=await s.store.loadSignatureOfSubdigest(E,u);if(!I)return[E,void 0];const M=J(s.useEIP5719?await s.cachedEIP5719.runByEIP5719(E,u,I):I),$=le.signer.tryRecoverSigner(u,M)!==E;return[E,{isDynamic:$,signature:M}]}))).filter(E=>Boolean(E[1]))),k=l.signature.encodeSigners(o,g,[],i);if(!k||k.weightc.filter(u=>u!==void 0)))[0]}}var rq=Object.freeze({__proto__:null,LocalConfigTracker:C9});let Pv=function(t){return t.EIP712="EIP712",t.EthSign="EthSign",t.EIP1271="EIP1271",t}({});class nq{constructor(e,r){this.path="/rpc/Sessions/",this.ping=n=>this.fetch(this.url("Ping"),Vn({},n)).then(i=>Hn(i).then(s=>({}))),this.config=(n,i)=>this.fetch(this.url("Config"),Vn(n,i)).then(s=>Hn(s).then(o=>({version:o.version,config:o.config}))),this.wallets=(n,i)=>this.fetch(this.url("Wallets"),Vn(n,i)).then(s=>Hn(s).then(o=>({wallets:o.wallets}))),this.deployHash=(n,i)=>this.fetch(this.url("DeployHash"),Vn(n,i)).then(s=>Hn(s).then(o=>({deployHash:o.deployHash,context:o.context}))),this.configUpdates=(n,i)=>this.fetch(this.url("ConfigUpdates"),Vn(n,i)).then(s=>Hn(s).then(o=>({updates:o.updates}))),this.migrations=(n,i)=>this.fetch(this.url("Migrations"),Vn(n,i)).then(s=>Hn(s).then(o=>({migrations:o.migrations}))),this.saveConfig=(n,i)=>this.fetch(this.url("SaveConfig"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveWallet=(n,i)=>this.fetch(this.url("SaveWallet"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveSignature=(n,i)=>this.fetch(this.url("SaveSignature"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveSignerSignatures=(n,i)=>this.fetch(this.url("SaveSignerSignatures"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveMigration=(n,i)=>this.fetch(this.url("SaveMigration"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Vn=(t={},e={})=>({method:"POST",headers:ro({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Hn=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 iq{constructor(e,r=!0){this.onlyRecoverable=r,this.sessions=new nq(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(Iv(r))return[];throw r}}async savePresignedConfiguration(e){const r=e.nextConfig,n=Vr.genericCoderFor(r.version).config.imageHashOf(r),i=ke.signature.setImageHashStruct(n),s=me(i);await this.sessions.saveSignature({wallet:e.wallet,digest:s,chainID:"0",signature:e.signature,toConfig:Gu(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:el(e.chainId),signatures:r})}async configOfImageHash(e){try{const{version:r,config:n}=await this.sessions.config(e);return sq(r,n)}catch(r){if(Iv(r))return;throw r}}async saveWalletConfig(e){const r=Gu(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(Iv(r))return;throw r}}async saveCounterfactualWallet(e){const r=Gu(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 Pv.EIP712:a+=J(le.signer.SigType.EIP712).slice(2);break;case Pv.EthSign:a+=J(le.signer.SigType.ETH_SIGN).slice(2);break;case Pv.EIP1271:a+=J(le.signer.SigType.WALLET_BYTES32).slice(2);break}return{wallet:n,proof:{digest:i,signature:a,chainId:z.from(s)}}})}async getMigration(e,r,n,i){var s=this;const o=el(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 v=Object.keys(h).map(Number).sort((x,g)=>g-x);for(const x of v)for(const[g,k]of Object.entries(h[x]))try{const w=await s.configOfImageHash({imageHash:g});if(w)return{fromVersion:n,toVersion:x,toConfig:w,tx:{entrypoint:k.executor,transactions:k.transactions,nonce:k.nonce,signature:k.signature,chainId:u,intent:{id:le.transaction.subdigestOfTransactions(e,u,k.nonce,k.transactions),wallet:e}}}}catch(w){console.error(w)}}},f=await l(o);if(f)return f;for(const c in a)if(c!==o){const u=await l(c);if(u)return u}}async saveMigration(e,r,n){await this.sessions.saveMigration({wallet:e,fromVersion:r.fromVersion,toVersion:r.toVersion,toConfig:Gu(r.toConfig),executor:r.tx.entrypoint,transactions:r.tx.transactions.map(oq),nonce:el(r.tx.nonce),signature:r.tx.signature,chainID:el(r.tx.chainId)})}}function Gu(t){switch(t.version){case 1:if(Wi.config.ConfigCoder.isWalletConfig(t))return{threshold:jo(t.threshold),signers:t.signers.map(({weight:e,address:r})=>({weight:jo(e),address:r}))};throw new Error(`not a v${t.version} config: ${t}`);case 2:if(ke.config.ConfigCoder.isWalletConfig(t))return{threshold:jo(t.threshold),checkpoint:jo(t.checkpoint),tree:_d(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function _d(t){return ke.config.isNode(t)?{left:_d(t.left),right:_d(t.right)}:ke.config.isSignerLeaf(t)?{weight:jo(t.weight),address:t.address}:ke.config.isNestedLeaf(t)?{weight:jo(t.weight),threshold:jo(t.threshold),tree:_d(t.tree)}:ke.config.isNodeLeaf(t)?{node:t.nodeHash}:ro({},t)}function sq(t,e){switch(t){case 1:return ro({},e,{version:t});case 2:return ro({},e,{version:t,tree:Td(e.tree)});default:throw new Error(`unknown version ${t}`)}}function Td(t){switch(typeof t){case"object":const e=ro({},t);return e.left!==void 0&&(e.left=Td(e.left)),e.right!==void 0&&(e.right=Td(e.right)),e.tree!==void 0&&(e.tree=Td(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 oq(t){return{to:t.to,value:t.value!==void 0?el(t.value):void 0,data:t.data!==void 0?J(t.data):void 0,gasLimit:t.gasLimit!==void 0?el(t.gasLimit):void 0,delegateCall:t.delegateCall,revertOnError:t.revertOnError}}function jo(t){return z.from(t).toNumber()}function el(t){return z.from(t).toString()}function Iv(t){return typeof t=="object"&&t.status===404}var aq=Object.freeze({__proto__:null,RemoteConfigTracker:iq});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 kf(t,e){return Promise.all(t.map(r=>r.catch(()=>e)))}class lq{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:Vr.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 C9(void 0),s=await kf(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=>Boolean(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 kf(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:f}})=>{const c=`${o}-${a}-${l}`;let u=s.get(c);u||(u={wallet:o,digest:a,chainId:l,signatures:[]},s.set(c,u)),u.signatures.push(f)}),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 kf(this.trackers.map(l=>l.loadPresignedConfiguration(e)),[]),s=(await kf(n.map(async function(l){const f=l[l.length-1],c=await r.configOfImageHash({imageHash:f.nextImageHash});if(c)return{checkpoint:Vr.genericCoderFor(c.version).config.checkpointOf(c),result:l}}),void 0)).reduce((l,f)=>f&&(!l||f.checkpoint.gt(l.checkpoint))?f: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 f=await a(l.nextImageHash);f&&r.savePresignedConfiguration({wallet:e.wallet,nextConfig:f,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 fq{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&&(!c||u.checkpoint.gt(c.checkpoint))?u:c))==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 G6{constructor(){this.cache=new Map}do(e,r,n,...i){e=`${e}:${me(Le(JSON.stringify(i,cq)))}`;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 cq(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function uq(t){return t instanceof A9}class A9{constructor(e,r=50,n=!1){this.cache=new G6,this.tracker=e,this.window=r,this.verbose=n}invalidateCache(){this.cache=new G6}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)}}var E9=Object.freeze({__proto__:null,debug:ZW,local:rq,remote:aq,stores:tq,raceUntil:zp,allSafe:kf,MultipleTracker:lq,CachedTracker:fq,isDedupedTracker:uq,DedupedTracker:A9});const dq=Object.freeze(Object.defineProperty({__proto__:null,tracker:YW,trackers:E9},Symbol.toStringTag,{value:"Module"}));function Vp(){return Vp=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.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:Vp({},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}),bq=typeof global=="object"?global.fetch:window.fetch;class k9 extends S9{constructor(e="https://metadata.sequence.app"){super(e.endsWith("/")?e.slice(0,-1):e,bq)}}const wq=Object.freeze(Object.defineProperty({__proto__:null,ContractType:pq,Metadata:S9,PropertyType:gq,SequenceMetadataClient:k9,SortOrder:xq,SwapType:mq,WebRPCSchemaHash:yq,WebRPCSchemaVersion:vq,WebRPCVersion:hq},Symbol.toStringTag,{value:"Module"}));function q0(){return q0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),on({},n)).then(i=>an(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),on({},n)).then(i=>an(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),on({},n)).then(i=>an(i).then(s=>({status:s.status}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),on({},n)).then(i=>an(i).then(s=>({chainID:s.chainID}))),this.getEtherBalance=(n,i)=>this.fetch(this.url("GetEtherBalance"),on(n,i)).then(s=>an(s).then(o=>({balance:o.balance}))),this.getTokenBalances=(n,i)=>this.fetch(this.url("GetTokenBalances"),on(n,i)).then(s=>an(s).then(o=>({page:o.page,balances:o.balances}))),this.getTokenSupplies=(n,i)=>this.fetch(this.url("GetTokenSupplies"),on(n,i)).then(s=>an(s).then(o=>({page:o.page,contractType:o.contractType,tokenIDs:o.tokenIDs}))),this.getTokenSuppliesMap=(n,i)=>this.fetch(this.url("GetTokenSuppliesMap"),on(n,i)).then(s=>an(s).then(o=>({supplies:o.supplies}))),this.getBalanceUpdates=(n,i)=>this.fetch(this.url("GetBalanceUpdates"),on(n,i)).then(s=>an(s).then(o=>({page:o.page,balances:o.balances}))),this.getTransactionHistory=(n,i)=>this.fetch(this.url("GetTransactionHistory"),on(n,i)).then(s=>an(s).then(o=>({page:o.page,transactions:o.transactions}))),this.syncBalance=(n,i)=>this.fetch(this.url("SyncBalance"),on(n,i)).then(s=>an(s).then(o=>({}))),this.fetchTransactionReceipt=(n,i)=>this.fetch(this.url("FetchTransactionReceipt"),on(n,i)).then(s=>an(s).then(o=>({receipt:o.receipt}))),this.fetchTransactionReceiptWithFilter=(n,i)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),on(n,i)).then(s=>an(s).then(o=>({receipt:o.receipt}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const on=(t={},e={})=>({method:"POST",headers:q0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),an=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});let Mq=function(t){return t.MAINNET="https://mainnet-indexer.sequence.app",t.POLYGON="https://polygon-indexer.sequence.app",t.POLYGON_MUMBAI="https://mumbai-indexer.sequence.app",t.POLYGON_ZKEVM="https://polygon-zkevm-indexer.sequence.app",t.ARBITRUM="https://arbitrum-indexer.sequence.app",t.ARBITRUM_NOVA="https://arbitrum-nova-indexer.sequence.app",t.OPTIMISM="https://optimism-indexer.sequence.app",t.AVALANCHE="https://avalanche-indexer.sequence.app",t.GNOSIS="https://gnosis-indexer.sequence.app",t.BSC="https://bsc-indexer.sequence.app",t.BSC_TESTNET="https://bsc-testnet-indexer.sequence.app",t.GOERLI="https://goerli-indexer.sequence.app",t}({});const K6=typeof global=="object"?global.fetch:window.fetch;class T9 extends _9{constructor(e,r){super(e.endsWith("/")?e.slice(0,-1):e,K6),this._fetch=(n,i)=>{const s={};return this.jwtAuth&&this.jwtAuth.length>0&&(s.Authorization=`BEARER ${this.jwtAuth}`),i.headers=q0({},i.headers,s),K6(n,i)},this.jwtAuth=r,this.fetch=this._fetch}}const Nq=Object.freeze(Object.defineProperty({__proto__:null,ContractType:Sq,EventLogDataType:_q,EventLogType:kq,Indexer:_9,SequenceIndexerClient:T9,SequenceIndexerServices:Mq,SortOrder:Rq,TransactionStatus:Pq,TransactionType:Iq,TxnTransferType:Tq,WebRPCSchemaHash:Eq,WebRPCSchemaVersion:Aq,WebRPCVersion:Cq},Symbol.toStringTag,{value:"Module"}));function Hp(){return Hp=Object.assign?Object.assign.bind():function(t){for(var e=1;e{throw this._jwt=void 0,f}),expiration:o};return this._jwt=a,a.token.then(()=>{this.onAuthCallbacks.forEach(f=>{try{f({status:"fulfilled",value:void 0})}catch{}})}).catch(f=>{this.onAuthCallbacks.forEach(c=>{try{c({status:"rejected",reason:f})}catch{}})}),{token:await a.token,expiration:o}}getProofString(e){if(this.proofStrings.has(e)){const l=this.proofStrings.get(e);if(this.now()i.eq(l.chainId));if(!s)throw Error("No network found");n.chainId=i.toNumber(),n.provider=new M0(Dl(s.rpcUrl),{name:"",chainId:i.toNumber()});const o=this.now()+this.expiration-Dq,a={proofString:Promise.resolve(this.account.signDigest(r.messageDigest(),this.sequenceApiChainId,!0,"eip6492")).then(l=>(r.signature=l,n.encodeProof(r,!0))).catch(l=>{throw this.proofStrings.delete(e),l}),expiration:o};return this.proofStrings.set(e,a),a}getProofStringKey(){return`${this.account.address} - ${this.name}`}async isProofStringValid(e){try{const r=new D0,n=z.from(this.sequenceApiChainId),i=this.networks.find(s=>n.eq(s.chainId));if(!i)throw Error("No network found");return r.chainId=n.toNumber(),r.provider=new M0(Dl(i.rpcUrl),{name:"",chainId:n.toNumber()}),await r.decodeProof(e),!0}catch{return!1}}async dump(){let e;if(this._jwt)try{const r=this._jwt.expiration;e={token:await this._jwt.token,expiration:r}}catch{}return{version:2,address:this.account.address,metadata:this.metadata,jwt:e}}static async open(e){const{referenceSigner:r,threshold:n,metadata:i,addSigners:s,selectWallet:o,settings:a,editConfigOnMigration:l,onMigration:f}=e,{sequenceApiUrl:c,sequenceApiChainId:u,sequenceMetadataUrl:h,contexts:v,networks:x,tracker:g,orchestrator:k}=a,w=u;if(!w)throw Error("No reference chain found");const A=await g.walletsOfSigner({signer:r}),E=await o(A.map($=>$.wallet));let I;if(E){if(I=new Ji({address:E,tracker:g,networks:x,contexts:v,orchestrator:k}),s.length>0){let $=await I.status(w);if($.original.version!==$.version||I.version!==$.version){const{migratedAllChains:W,failedChains:q}=await I.isMigratedAllChains();if(q.some(G=>Wp.includes(G)))throw Error(`Failed to fetch account status on ${q.join(", ")}`);if(!W){if(f&&!await f(I))throw Error("Migration cancelled, cannot open session");const{failedChains:G}=await I.signAllMigrations(l);if(G.some(B=>Wp.includes(B)))throw Error(`Failed to sign migrations on ${G.join(", ")}`);E9.isDedupedTracker(g)&&g.invalidateCache();let re;if([re,$]=await Promise.all([I.isMigratedAllChains().then(B=>B.migratedAllChains),I.status(w)]),!re)throw Error("Failed to migrate account")}}$.onChain.version!==$.version&&await I.doBootstrap(w,void 0,$);const j=$.config,U=I.coders.config.editConfig(j,{add:s,checkpoint:I.coders.config.checkpointOf(j).add(1),threshold:n});await I.updateConfig(U)}}else if(I=await Ji.new({config:{threshold:n,checkpoint:0,signers:s},tracker:g,contexts:v,orchestrator:k,networks:x}),await I.publishWitness(),!(await g.walletsOfSigner({signer:r,noCache:!0})).some(j=>j.wallet===I.address))throw Error("Account not found on tracker");const M=new G0(c,u,h,x,v,I,i);return c?M._initialAuthRequest=M.auth():M._initialAuthRequest=Promise.reject("no sequence api url"),M}static async load(e){const{dump:r,settings:n,editConfigOnMigration:i,onMigration:s}=e,{sequenceApiUrl:o,sequenceApiChainId:a,sequenceMetadataUrl:l,contexts:f,networks:c,tracker:u,orchestrator:h}=n;let v;if(P9(r)){const x=r.config.address||le.context.addressOf(f[1],Wi.config.ConfigCoder.imageHashOf(Hp({},r.config,{version:1})));if(v=new Ji({address:x,tracker:u,networks:c,contexts:f,orchestrator:h}),!await v.isMigratedAllChains().then(g=>g.migratedAllChains)){if(s&&!await s(v))throw Error("Migration cancelled, cannot open session");if(console.log("Migrating account..."),await v.signAllMigrations(i),!await v.isMigratedAllChains().then(g=>g.migratedAllChains))throw Error("Failed to migrate account")}}else if(I9(r))v=new Ji({address:r.address,tracker:u,networks:c,contexts:f,orchestrator:h});else throw Error("Invalid dump format");return new G0(o,a,l,c,f,v,r.metadata,r.jwt)}}function Bq(t){return nE(t).exp}const R9=async(t,e,r)=>{const n=xe(await t.getAddress());if(!n||n===""||n==="0x")throw M9;const i=new tx;if(i.address=n,!r||!r.app||r.app==="")throw new Rx("authorization options requires app to be set");i.claims.app=r.app,i.claims.ogn=r.origin,i.setExpiryIn(r.expiry?Math.max(r.expiry,200):Ix);const s=i.messageTypedData(),o=yE(e);i.signature=await(t instanceof Ji?t.signTypedData(s.domain,s.types,s.message,o,"eip6492"):t.signTypedData(s.domain,s.types,s.message,o));const l=await new D0().encodeProof(i,!0);return{typedData:s,proofString:l}};class Rx extends Error{constructor(e){super(e),this.name="AuthError"}}const M9=new Rx("auth error: account address is empty"),Lq=(t,e,r)=>async(n,i,s)=>{const o=s.messageDigest();return{isValid:await t(i).isValidSignature(s.address,o,s.signature)}},$q=Object.freeze(Object.defineProperty({__proto__:null,AuthError:Rx,CRITICAL_CHAINS:Wp,DEFAULT_SESSION_EXPIRATION:Ix,ErrAccountIsRequired:M9,LONG_SESSION_EXPIRATION:Oq,Session:G0,ValidateSequenceWalletProof:Lq,isSessionDumpV1:P9,isSessionDumpV2:I9,signAuthorization:R9},Symbol.toStringTag,{value:"Module"}));function qp(){return qp=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),Pa({},n)).then(i=>Ia(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),Pa({},n)).then(i=>Ia(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Pa({},n)).then(i=>Ia(i).then(s=>({status:s.status}))),this.getSignerConfig=(n,i)=>this.fetch(this.url("GetSignerConfig"),Pa(n,i)).then(s=>Ia(s).then(o=>({signerConfig:o.signerConfig}))),this.sign=(n,i)=>this.fetch(this.url("Sign"),Pa(n,i)).then(s=>Ia(s).then(o=>({sig:o.sig}))),this.signWith=(n,i)=>this.fetch(this.url("SignWith"),Pa(n,i)).then(s=>Ia(s).then(o=>({sig:o.sig}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Pa=(t={},e={})=>({method:"POST",headers:qp({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Ia=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 zq{constructor(e,r,n=!1){this.requests=new Map,this.address=e,this.url=r,this.appendSuffix=n,this.guard=new N9(r,global.fetch)}async getAddress(){return this.address}async requestSignature(e,r,n,i){return le.isWalletSignRequestMetadata(n)?this.requests.set(e,i):i.onRejection("Expected Sequence-like metadata"),!0}notifyStatusChange(e,r,n){if(this.requests.has(e)){if(!le.isWalletSignRequestMetadata(n)){this.requests.get(e).onRejection("Expected Sequence-like metadata (status update)");return}this.evaluateRequest(e,r.message,r,n)}}packMsgAndSig(e,r,n,i){return qr.encode(["address","uint256","bytes","bytes"],[e,i,r,n])}keyOfRequest(e,r,n,i){return Zi(["address","uint256","bytes","bytes"],[e,i,r,n])}async evaluateRequest(e,r,n,i){var s;const o=Vr.genericCoderFor(i.config.version),{encoded:a}=o.signature.encodeSigners(i.config,(s=i.parts)!=null?s:new Map,[],i.chainId);try{var l;const f=this.keyOfRequest(this.address,r,a,i.chainId);if(((l=this.requests.get(e))==null?void 0:l.lastAttempt)===f)return;this.requests.get(e).lastAttempt=f;const u=await this.guard.signWith({signer:this.address,request:{msg:J(r),auxData:this.packMsgAndSig(i.address,i.digest,a,i.chainId),chainId:z.from(i.chainId).toNumber()}});Y(u.sig).length!==0&&(this.requests.get(e).onSignature(u.sig),this.requests.delete(e))}catch{}}suffix(){return this.appendSuffix?[3]:[]}}const Vq=Object.freeze(Object.defineProperty({__proto__:null,Guard:N9,GuardSigner:zq,WebRPCSchemaHash:Uq,WebRPCSchemaVersion:jq,WebRPCVersion:Fq},Symbol.toStringTag,{value:"Module"}));function K0(){return K0=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)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.scheduleExecution();const i=a[0].next;let s;var[a,l]=J6(a,v=>{try{if(v.next!==i)return!1;switch(v.request.method){case rr.ethCall:if(v.request.params[0].from||v.request.params[0].gasPrice||v.request.params[0].value)return!1;case rr.ethGetBalance:case rr.ethGetCode:const x=Wq(v.request.params[1]);if(s===void 0&&(s=x),!qq(x,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))return;let o=a.map(v=>{try{switch(v.request.method){case rr.ethCall:return{delegateCall:!1,revertOnError:!1,target:v.request.params[0].to,data:v.request.params[0].data,gasLimit:v.request.params[0].gas?v.request.params[0].gas:0,value:0};case rr.ethGetCode:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callCode"),[v.request.params[0]])};case rr.ethGetBalance:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callBalanceOf"),[v.request.params[0]])};default:return null}}catch{return null}});var[a,l]=J6(a,(v,x)=>o[x]!==void 0);if(o=o.filter(v=>v),l.length!==0&&(r.options.verbose&&console.log("Forwarding calls on error",l.length),r.forward(l),a.length===0))return;let f;try{f=r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("multiCall"),[o])}catch{r.forward(a);return}const c=ox(),u=await Hq(sx(i)({id:c,jsonrpc:Bl,method:rr.ethCall,params:[{to:r.options.contract,value:0,data:f},z.isBigNumber(s)?s.toNumber():s]}),v=>({jsonrpc:Bl,id:c,result:void 0,error:v}));if(u.error)return r.forward(a);let h;try{h=r.multicallInterface.decodeFunctionResult(r.multicallInterface.getFunction("multiCall"),u.result)}catch{r.forward(a);return}r.options.verbose&&console.log("Got response for",a.length),a.forEach((v,x)=>{if(!h[0][x])r.forward(v);else switch(v.request.method){case rr.ethCall:v.callback(void 0,{jsonrpc:v.request.jsonrpc,id:v.request.id,result:h[1][x]});break;case rr.ethGetCode:v.callback(void 0,{jsonrpc:v.request.jsonrpc,id:v.request.id,result:qr.decode(["bytes"],h[1][x])[0]});break;case rr.ethGetBalance:v.callback(void 0,{jsonrpc:v.request.jsonrpc,id:v.request.id,result:qr.decode(["uint256"],h[1][x])[0]});break}})},this.options=e?K0({},Mn.DefaultOptions,e):Mn.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&&Mn.isMulticallOptions(e.options)}static isMulticallOptions(e){return e!==void 0&&e.batchSize!==void 0&&e.timeWindow!==void 0&&e.contract!==void 0}}Mn.DefaultOptions=K0({},Gq);const O9=["getNetwork","getBlockNumber","getGasPrice","getTransactionCount","getStorageAt","sendTransaction","estimateGas","getBlock","getTransaction","getTransactionReceipt","getLogs","emit","litenerCount","addListener","removeListener","waitForTransaction","detectNetwork","getBlockWithTransactions"];class Kq extends M7{constructor(e,r){var n;super(e.getNetwork()),n=this,this.listenerCount=this.provider.listenerCount,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 rr.ethCall:n.callback(i,s,await n.provider.call(i.params[0],i.params[1]));break;case rr.ethGetCode:n.callback(i,s,await n.provider.getCode(i.params[0],i.params[1]));break;case rr.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.provider=e,this.multicall=Mn.isMulticall(r)?r:new Mn(r),O9.forEach(i=>{e[i]!==void 0&&(this[i]=(...s)=>e[i](...s))})}callback(e,r,n,i){r(i,{jsonrpc:Bl,id:e.id,result:n,error:i})}async call(e,r){return this.rpcCall(rr.ethCall,e,r)}async getCode(e,r){return this.rpcCall(rr.ethGetCode,e,r)}async getBalance(e,r){return this.rpcCall(rr.ethGetBalance,e,r)}async rpcCall(e,...r){const n=ox();return(await sx(this.multicall.handle)(this.next,{jsonrpc:Bl,id:n,method:e,params:r})).result}}class Jq{constructor(e,r){if(this.provider=e,this.multicall=Mn.isMulticall(r)?r:new Mn(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 Qq=t=>e=>{const r=Mn.isMulticall(t)?t:new Mn(t);return(n,i)=>r.handle(e,n,i)};var Yq=Object.freeze({__proto__:null,ProxyMethods:O9,MulticallProvider:Kq,MulticallExternalProvider:Jq,multicallMiddleware:Qq});const Xq=Object.freeze(Object.defineProperty({__proto__:null,Multicall:Mn,providers:Yq},Symbol.toStringTag,{value:"Module"}));var Ll={},Zq={get exports(){return Ll},set exports(t){Ll=t}};/*! * 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(T){return Object.prototype.toString.call(T)==="[object Array]"},s=10,o=typeof process=="object"&&typeof process.nextTick=="function",a=typeof Symbol=="function",l=typeof Reflect=="object",f=typeof setImmediate=="function",c=f?setImmediate:setTimeout,u=a?l&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(m){var T=Object.getOwnPropertyNames(m);return T.push.apply(T,Object.getOwnPropertySymbols(m)),T}:Object.keys;function h(){this._events={},this._conf&&v.call(this,this._conf)}function v(m){m&&(this._conf=m,m.delimiter&&(this.delimiter=m.delimiter),m.maxListeners!==r&&(this._maxListeners=m.maxListeners),m.wildcard&&(this.wildcard=m.wildcard),m.newListener&&(this._newListener=m.newListener),m.removeListener&&(this._removeListener=m.removeListener),m.verboseMemoryLeak&&(this.verboseMemoryLeak=m.verboseMemoryLeak),m.ignoreErrors&&(this.ignoreErrors=m.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function x(m,T){var R="(node) warning: possible EventEmitter memory leak detected. "+m+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(R+=" Event name: "+T+"."),typeof process<"u"&&process.emitWarning){var b=new Error(R);b.name="MaxListenersExceededWarning",b.emitter=this,b.count=m,process.emitWarning(b)}else console.error(R),console.trace&&console.trace()}var g=function(m,T,R){var b=arguments.length;switch(b){case 0:return[];case 1:return[m];case 2:return[m,T];case 3:return[m,T,R];default:for(var d=new Array(b);b--;)d[b]=arguments[b];return d}};function k(m,T){for(var R={},b,d=m.length,_=T?T.length:0,N=0;N0;)m=_[B],N.call(p,m,R[m]);this._listeners={},this._listenersCount=0,L()}}});function A(m,T,R,b){var d=Object.assign({},T);if(!m)return d;if(typeof m!="object")throw TypeError("options must be an object");var _=Object.keys(m),N=_.length,p,B,L;function F(Z){throw Error('Invalid "'+p+'" option value'+(Z?". Reason: "+Z:""))}for(var H=0;H0;)if(p===m[B])return _;N(T)}}var M=I(["function"]),$=I(["object","function"]);function j(m,T,R){var b,d,_=0,N,p=new m(function(B,L,F){R=A(R,{timeout:0,overload:!1},{timeout:function(X,ve){return X*=1,(typeof X!="number"||X<0||!Number.isFinite(X))&&ve("timeout must be a positive number"),X}}),b=!R.overload&&typeof m.prototype.cancel=="function"&&typeof F=="function";function H(){d&&(d=null),_&&(clearTimeout(_),_=0)}var Z=function(X){H(),B(X)},K=function(X){H(),L(X)};b?T(Z,K,F):(d=[function(X){K(X||Error("canceled"))}],T(Z,K,function(X){if(N)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof X!="function")throw TypeError("onCancel callback must be a function");d.push(X)}),N=!0),R.timeout>0&&(_=setTimeout(function(){var X=Error("timeout");X.code="ETIMEDOUT",_=0,p.cancel(X),L(X)},R.timeout))});return b||(p.cancel=function(B){if(d){for(var L=d.length,F=1;F0;)K=Se[p],K!=="_listeners"&&(St=W(m,T,R[K],b+1,d),St&&(Z?Z.push.apply(Z,St):Z=St));return Z}else if(Qt==="**"){for(ye=b+1===d||b+2===d&&Me==="*",ye&&R._listeners&&(Z=W(m,T,R,d,d)),Se=u(R),p=Se.length;p-- >0;)K=Se[p],K!=="_listeners"&&(K==="*"||K==="**"?(R[K]._listeners&&!ye&&(St=W(m,T,R[K],d,d),St&&(Z?Z.push.apply(Z,St):Z=St)),St=W(m,T,R[K],b,d)):K===Me?St=W(m,T,R[K],b+2,d):St=W(m,T,R[K],b,d),St&&(Z?Z.push.apply(Z,St):Z=St));return Z}else R[Qt]&&(Z=W(m,T,R[Qt],b+1,d));if(X=R["*"],X&&W(m,T,X,b+1,d),ve=R["**"],ve)if(b0;)K=Se[p],K!=="_listeners"&&(K===Me?W(m,T,ve[K],b+2,d):K===Qt?W(m,T,ve[K],b+1,d):(ie={},ie[K]=ve[K],W(m,T,{"**":ie},b+1,d)));else ve._listeners?W(m,T,ve,d,d):ve["*"]&&ve["*"]._listeners&&W(m,T,ve["*"],d,d);return Z}function q(m,T,R){var b=0,d=0,_,N=this.delimiter,p=N.length,B;if(typeof m=="string")if((_=m.indexOf(N))!==-1){B=new Array(5);do B[b++]=m.slice(d,_),d=_+p;while((_=m.indexOf(N,d))!==-1);B[b++]=m.slice(d)}else B=[m],b=1;else B=m,b=m.length;if(b>1){for(_=0;_+10&&L._listeners.length>this._maxListeners&&(L._listeners.warned=!0,x.call(this,L._listeners.length,F))):L._listeners=T,!0;return!0}function G(m,T,R,b){for(var d=u(m),_=d.length,N,p,B,L=m._listeners,F;_-- >0;)p=d[_],N=m[p],p==="_listeners"?B=R:B=R?R.concat(p):[p],F=b||typeof p=="symbol",L&&T.push(F?B:B.join(this.delimiter)),typeof N=="object"&&G.call(this,N,T,B,F);return T}function re(m){for(var T=u(m),R=T.length,b,d,_;R-- >0;)d=T[R],b=m[d],b&&(_=!0,d!=="_listeners"&&!re(b)&&delete m[d]);return _}function D(m,T,R){this.emitter=m,this.event=T,this.listener=R}D.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function y(m,T,R){if(R===!0)d=!0;else if(R===!1)b=!0;else{if(!R||typeof R!="object")throw TypeError("options should be an object or true");var b=R.async,d=R.promisify,_=R.nextTick,N=R.objectify}if(b||_||d){var p=T,B=T._origin||T;if(_&&!o)throw Error("process.nextTick is not supported");d===r&&(d=T.constructor.name==="AsyncFunction"),T=function(){var L=arguments,F=this,H=this.event;return d?_?Promise.resolve():new Promise(function(Z){c(Z)}).then(function(){return F.event=H,p.apply(F,L)}):(_?process.nextTick:c)(function(){F.event=H,p.apply(F,L)})},T._async=!0,T._origin=B}return[T,N?new D(this,m,T):this]}function C(m){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,v.call(this,m)}C.EventEmitter2=C,C.prototype.listenTo=function(m,T,R){if(typeof m!="object")throw TypeError("target musts be an object");var b=this;R=A(R,{on:r,off:r,reducers:r},{on:M,off:M,reducers:$});function d(_){if(typeof _!="object")throw TypeError("events must be an object");var N=R.reducers,p=U.call(b,m),B;p===-1?B=new w(b,m,R):B=b._observers[p];for(var L=u(_),F=L.length,H,Z=typeof N=="function",K=0;K0;)d=R[b],(!m||d._target===m)&&(d.unsubscribe(T),_=!0);return _},C.prototype.delimiter=".",C.prototype.setMaxListeners=function(m){m!==r&&(this._maxListeners=m,this._conf||(this._conf={}),this._conf.maxListeners=m)},C.prototype.getMaxListeners=function(){return this._maxListeners},C.prototype.event="",C.prototype.once=function(m,T,R){return this._once(m,T,!1,R)},C.prototype.prependOnceListener=function(m,T,R){return this._once(m,T,!0,R)},C.prototype._once=function(m,T,R,b){return this._many(m,1,T,R,b)},C.prototype.many=function(m,T,R,b){return this._many(m,T,R,!1,b)},C.prototype.prependMany=function(m,T,R,b){return this._many(m,T,R,!0,b)},C.prototype._many=function(m,T,R,b,d){var _=this;if(typeof R!="function")throw new Error("many only accepts instances of Function");function N(){return--T===0&&_.off(m,N),R.apply(this,arguments)}return N._origin=R,this._on(m,N,b,d)},C.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||h.call(this);var m=arguments[0],T,R=this.wildcard,b,d,_,N,p;if(m==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(R&&(T=m,m!=="newListener"&&m!=="removeListener"&&typeof m=="object")){if(d=m.length,a){for(_=0;_3)for(b=new Array(B-1),N=1;N3)for(d=new Array(L-1),p=1;p0&&this._events[m].length>this._maxListeners&&(this._events[m].warned=!0,x.call(this,this._events[m].length,m))):this._events[m]=T,d)},C.prototype.off=function(m,T){if(typeof T!="function")throw new Error("removeListener only takes instances of Function");var R,b=[];if(this.wildcard){var d=typeof m=="string"?m.split(this.delimiter):m.slice();if(b=W.call(this,null,d,this.listenerTree,0),!b)return this}else{if(!this._events[m])return this;R=this._events[m],b.push({_listeners:R})}for(var _=0;_0){for(b=this._all,T=0,R=b.length;T0;)b=T[R[_]],typeof b=="function"?d.push(b):d.push.apply(d,b);return d}else{if(this.wildcard){if(N=this.listenerTree,!N)return[];var p=[],B=typeof m=="string"?m.split(this.delimiter):m.slice();return W.call(this,p,B,N,0),p}return T?(b=T[m],b?typeof b=="function"?[b]:b:[]):[]}},C.prototype.eventNames=function(m){var T=this._events;return this.wildcard?G.call(this,this.listenerTree,[],null,m):T?u(T):[]},C.prototype.listenerCount=function(m){return this.listeners(m).length},C.prototype.hasListeners=function(m){if(this.wildcard){var T=[],R=typeof m=="string"?m.split(this.delimiter):m.slice();return W.call(this,T,R,this.listenerTree,0),T.length>0}var b=this._events,d=this._all;return!!(d&&d.length||b&&(m===r?u(b).length:b[m]))},C.prototype.listenersAny=function(){return this._all?this._all:[]},C.prototype.waitFor=function(m,T){var R=this,b=typeof T;return b==="number"?T={timeout:T}:b==="function"&&(T={filter:T}),T=A(T,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:M,Promise:E}),j(T.Promise,function(d,_,N){function p(){var B=T.filter;if(!(B&&!B.apply(R,arguments)))if(R.off(m,p),T.handleError){var L=arguments[0];L?_(L):d(g.apply(null,arguments).slice(1))}else d(g.apply(null,arguments))}N(function(){R.off(m,p)}),R._on(m,p,!1)},{timeout:T.timeout,overload:T.overload})};function P(m,T,R){R=A(R,{Promise,timeout:0,overload:!1},{Promise:E});var b=R.Promise;return j(b,function(d,_,N){var p;if(typeof m.addEventListener=="function"){p=function(){d(g.apply(null,arguments))},N(function(){m.removeEventListener(T,p)}),m.addEventListener(T,p,{once:!0});return}var B=function(){L&&m.removeListener("error",L),d(g.apply(null,arguments))},L;T!=="error"&&(L=function(F){m.removeListener(T,B),_(F)},m.once("error",L)),N(function(){L&&m.removeListener("error",L),m.removeListener(T,B)}),m.once(T,B)},{timeout:R.timeout,overload:R.overload})}var O=C.prototype;Object.defineProperties(C,{defaultMaxListeners:{get:function(){return O._maxListeners},set:function(m){if(typeof m!="number"||m<0||Number.isNaN(m))throw TypeError("n must be a non-negative number");O._maxListeners=m},enumerable:!0},once:{value:P,writable:!0,configurable:!0}}),Object.defineProperties(O,{_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})()})(Xq);function hn(){return hn=Object.assign?Object.assign.bind():function(t){for(var e=1;e++Zq;class lu{constructor(){var e=this;this.pendingMessageRequests=[],this.responseCallbacks=new Map,this.confirmationOnly=!1,this.events=new Dl.EventEmitter2,this.sendAsync=async function(r,n,i){e.state===kn.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:L9(),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):(fe.debug("pushing to pending requests",r),e.pendingMessageRequests.push(r))})},this.waitUntilOpened=async function(r=Mx){let n=!1;return Promise.race([new Promise((i,s)=>{const o=setTimeout(()=>{clearTimeout(o),n||(e.state=kn.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=kn.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===kn.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){fe.debug("MessageProvider, received INIT message",e);const{nonce:l}=e.data;if(!l||l.length==0){fe.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;fe.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)){fe.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 fe.error(l),this.close(),l}this.state=kn.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(f){r.sendMessage(f)});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:[xe(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);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!==kn.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),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!==kn.CLOSED&&(this.state=kn.CLOSED,this.confirmationOnly=!1,this._sessionId=void 0,fe.info("closing wallet and flushing!"),this.pendingMessageRequests.length=0,this.responseCallbacks.forEach(r=>{r(hn({},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 eG(t){return tG.some(e=>e.predicate(t))}const tG=[{name:"Decentraland Exception",predicate:nG},{name:"0x v3 Exception",predicate:iG}],rG=/^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 nG(t){try{const e=ds(t);return rG.test(e)}catch{return!1}}function iG(t){const e=new xr(sG);try{return e.decodeFunctionData("OrderWithHash",t),!0}catch{return!1}}const sG=[{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"}],Td=Le(`Ethereum Signed Message: -`),$9=t=>cs(t)||Pe(t)?Y(t):Le(t),Qh=t=>{const e=$9(t);return eG(e)?e:je([Td,Le(String(e.length)),e])},oG=t=>{if(JSON.stringify(t.slice(0,Td.length))!==JSON.stringify(Td))return t;const e=t.slice(Td.length),r=String(e.length).length;let n,i;try{i=Number(ds(e.slice(0,r)))}catch{i=Number(J(e.slice(0,r)))}return i>e.length||!Number.isInteger(i)?n=r-1:n=r,e.slice(n)},Ll=async(t,e,r,n)=>new le.reader.OnChainReader(n).isValidSignature(t,e,r),F9=async(t,e,r,n)=>{const i=Qh(e),s=ix(i);return Ll(t,s,r,n)},j9=(t,e,r,n)=>Ll(t,zh(e),r,n),K0=()=>window.location.protocol==="chrome-extension:"||window.location.protocol==="moz-extension:",U9=()=>!!navigator.userAgent.match(/UnitySequence/i),z9=t=>t.onChain.deployed&&t.fullyMigrated;class gr{constructor(){}static getInstance(){return typeof window=="object"?gr._instance||(gr._instance={getItem:e=>Promise.resolve(window.localStorage.getItem(e)),setItem:(e,r)=>Promise.resolve(window.localStorage.setItem(e,r)),removeItem:e=>Promise.resolve(window.localStorage.removeItem(e))}):gr._instance||(gr._instance={getItem:e=>Promise.resolve(null),setItem:(e,r)=>Promise.resolve(),removeItem:e=>Promise.resolve()}),this._instance}static use(e){gr._instance=e}}class V9{constructor(e,r){this.def=r,this.key=e}async get(){const e=await gr.getInstance().getItem(this.key);if(e===null)return this.def;try{return JSON.parse(e)}catch(r){console.error(r)}}set(e){e?gr.getInstance().setItem(this.key,JSON.stringify(e)):gr.getInstance().removeItem(this.key)}del(){gr.getInstance().removeItem(this.key)}}const Q6="@sequence.transportSession";class fu{constructor(e){var r=this;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:fe.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=sE(n),r.saveTransportSession({sessionId:n,intent:i,networkId:s})),r.walletRequestHandler.setOpenIntent(i),await r.init();let o;try{if(s){const a=cx(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(!K0()&&l.origin!==r.appOrigin)throw new Error("origin is invalid")}else!r.appOrigin&&l!=null&&l.origin?a.origin=aE(l.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=oE(a.app)),r.walletRequestHandler.setConnectOptions(a),a.networkId?s=a.networkId:s&&(a.networkId=s)}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){fe.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()})}else return r.notifyOpen({sessionId:r._sessionId}),!0;return!0},this.saveTransportSession=n=>{gr.getInstance().setItem(Q6,JSON.stringify(n))},this.getCachedTransportSession=async function(){const n=await gr.getInstance().getItem(Q6);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=>{this.registered&&this.notifyDisconnect(n)}),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(J(n.find(i=>i.isDefaultChain).chainId)))}),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){this.sendMessage({idx:-1,type:Te.DISCONNECT,data:e?{error:e}:null})}notifyAccountsChanged(e,r){this.sendMessage({idx:-1,type:Te.ACCOUNTS_CHANGED,data:e,origin:r})}notifyChainChanged(e){this.sendMessage({idx:-1,type:Te.CHAIN_CHANGED,data:e})}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 fe.warn("isValidInitAck, already in init'd state, so inquiry is invalid."),!1;if(e.type!==Te.INIT)return fe.warn("isValidInitAck, invalid message type, expecting init"),!1;const{sessionId:r,nonce:n}=e.data;return!r||r.length===0||!n||n.length===0?(fe.error("invalid init ack"),!1):r!==this._sessionId||n!==this._initNonce?(fe.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(()=>{fe.warn("transport init timed out"),this._initCallback&&this._initCallback("transport init timed out")},Mx/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 aG{constructor(){const e=new qp,r=new qp;e.conn=r,r.conn=e,this.app=e,this.wallet=r}}class qp{constructor(){this.events=new Dl.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 H9 extends lu{constructor(e){if(super(),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===kn.CLOSED){this.state=kn.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=kn.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 lG extends fu{constructor(e,r){super(e),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)}}class W9{constructor(...e){var r=this;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}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;n{Ra&&(Ra.unregister(),Ra=this),window.addEventListener("message",this.onWindowEvent),Ra=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(),Ra===this&&(Ra=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 au;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={}),!K0()&&!U9()&&(n.options.origin=window.location.origin)),o.set("intent",rx(n))),i&&o.set("net",`${i}`);let a,l;K0()?(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 f=`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",f)},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){fe.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 fG extends fu{constructor(e){var r;super(e),r=this,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(fe.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)){fe.error("impossible state, init.OK and appOrigin required");return}r.handleMessage(i)},this.getWindowTransportSession=n=>{const i=new au(n);return{sessionId:i.get("sid"),networkId:i.get("net"),intent:nx(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){fe.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 f=`failed to open to network ${(l=s)==null?void 0:l.networkId}`;fe.error(f),this.notifyClose({message:f}),window.close()}}).catch(a=>{var l;const f=`failed to open to network ${(l=s)==null?void 0:l.networkId}, due to: ${a}`;fe.error(f),this.notifyClose({message:f}),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){fe.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):fe.error("unable to postMessage as parentOrigin is invalid")}}function cG(t){if(t.length===0)throw new Error("No transaction provided");const[e,...r]=t;return hn({},e,{auxiliary:r})}function uG(t){return[t,...t.auxiliary||[]]}const dG=1e4;class G9{constructor(e,r,n){var i=this;this.signerReadyCallbacks=[],this.events=new Dl.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()),o},this.sendAsync=async function(s,o,a){const l={jsonrpc:"2.0",id:s.id,result:null};await i.getAccount();try{var f;if((!i.account||i.account===null)&&!hG.includes(s.method))throw D9;const c=i.account;if(!c)throw new Error("WalletRequestHandler: wallet account is not configured");const u=(f=i.account)==null?void 0:f.provider(a??i.defaultChainId());if(!u)throw new Error(`WalletRequestHandler: wallet provider is not configured for chainId ${a}`);const h=u instanceof ba?u:void 0;switch(s.method){case"net_version":{if(!h)throw new Error("Account provider doesn't support send method");const v=await h.send("net_version",[]);l.result=v;break}case"eth_chainId":{if(!h)throw new Error("Account provider doesn't support send method");const v=await h.send("eth_chainId",[]);l.result=v;break}case"eth_accounts":{const v=c.address;l.result=[v];break}case"eth_getBalance":{const[v,x]=s.params,g=await u.getBalance(v,x);l.result=g.toHexString();break}case"sequence_sign":case"personal_sign":case"eth_sign":{let v;switch(s.method){case"sequence_sign":case"personal_sign":{const[w,A]=s.params;v=w;break}case"eth_sign":{const[w,A]=s.params;v=A;break}}let x="";const g=Qh(v),k=s.method==="sequence_sign";if(i.prompter===null?x=await c.signMessage(g,a??i.defaultChainId(),k?"eip6492":"ignore"):x=await i.prompter.promptSignMessage({chainId:a,message:g,eip6492:k},i.connectOptions),x&&x.length>0)l.result=x;else throw new Error("declined by user");break}case"sequence_signTypedData_v4":case"eth_signTypedData":case"eth_signTypedData_v4":{const[v,x]=s.params;let g;if(typeof x=="string")try{g=JSON.parse(x)}catch(A){console.warn("walletRequestHandler: error parsing typedData",A)}else g=x;if(!g||!g.domain||!g.types||!g.message)throw new Error("invalid typedData object");let k="";const w=s.method==="sequence_signTypedData_v4";if(i.prompter===null?k=await c.signTypedData(g.domain,g.types,g.message,a??i.defaultChainId(),w?"eip6492":"ignore"):k=await i.prompter.promptSignMessage({chainId:a,typedData:g,eip6492:w},i.connectOptions),k&&k.length>0)l.result=k;else throw new Error("declined by user");break}case"eth_sendTransaction":{const v=uG(s.params[0]).map(g=>("gas"in g&&g.gasLimit===void 0&&(g.gasLimit=g.gas,delete g.gas),g));let x="";if(i.prompter===null?x=(await c.sendTransaction(v,a??i.defaultChainId())).hash:x=await i.prompter.promptSendTransaction(v,a,i.connectOptions),x)l.result=x;else throw new Error("declined by user");break}case"eth_signTransaction":{const[v]=s.params;if(xe(v.from)!==c.address)throw new Error("sender address does not match wallet");i.prompter===null?l.result=await c.signTransactions(v,a??i.defaultChainId()):l.result=await i.prompter.promptSignTransaction(v,a,i.connectOptions);break}case"eth_sendRawTransaction":{if(le.transaction.isSignedTransactionBundle(s.params[0])){const v=z.from(s.params[0].chainId).toNumber(),x=await c.relayer(v).relay(s.params[0]);l.result=x.hash}else{const v=await u.sendTransaction(s.params[0]);l.result=v.hash}break}case"eth_getTransactionCount":{const v=xe(s.params[0]),x=s.params[1],g=await u.getTransactionCount(v,x);l.result=z.from(g).toHexString();break}case"eth_blockNumber":{l.result=await u.getBlockNumber();break}case"eth_getBlockByNumber":{l.result=await u.getBlock(s.params[0]);break}case"eth_getBlockByHash":{l.result=await u.getBlock(s.params[0]);break}case"eth_getTransactionByHash":{l.result=await u.getTransaction(s.params[0]);break}case"eth_call":{const[v,x]=s.params;l.result=await u.call(v,x);break}case"eth_getCode":{const[v,x]=s.params;l.result=await u.getCode(v,x);break}case"eth_estimateGas":{const[v]=s.params;l.result=await u.estimateGas(v);break}case"eth_gasPrice":{const v=await u.getGasPrice();l.result=v.toHexString();break}case"wallet_switchEthereumChain":{const[v]=s.params;if(!v.chainId||v.chainId.length===0)throw new Error("invalid chainId");const x=z.from(v.chainId);i.setDefaultChainId(x.toNumber()),l.result=null;break}case"sequence_getWalletContext":{l.result=c.contexts;break}case"sequence_getWalletConfig":{const[v]=s.params;v?l.result=[(await c.status(v)).onChain.config]:l.result=await Promise.all(c.networks.map(async function(x){return(await c.status(x.chainId)).onChain.config}));break}case"sequence_getWalletState":{const[v]=s.params;v?l.result=[Y6(v,await c.status(v))]:l.result=await Promise.all(c.networks.map(async function(x){const g=await c.status(x.chainId);return Y6(x.chainId,g)}));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[v]=s.params;if(!v)throw new Error("invalid request, method argument defaultChainId cannot be empty");i.setDefaultChainId(v),l.result=await i.getNetworks(!0);break}default:{if(!h)throw new Error("Account provider doesn't support send method");const v=await h.send(s.method,s.params);l.result=v}}}catch(c){fe.error(c),l.result=null,l.error=hn({},new Error(c),{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}findNetworkID(e){const r=typeof e=="string"?e.toLowerCase():e,n=this.networks.find(i=>i.name.toLowerCase()===r||i.chainId.toString()===r||i.chainId===r);if(!n)throw new Error(`Network ${e} not found`);return n.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.setAccount(null)}signerReset(){this.account=void 0}signerReady(e=dG){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"};let i;switch(typeof(e==null?void 0:e.networkId)){case"string":try{i=this.findNetworkID(e.networkId)}catch{i=ax(e.networkId)}break;case"number":i=e.networkId;break;default:i=(r=(n=this.prompter)==null?void 0:n.getDefaultChainId())!=null?r:1;break}const s={connected:!0,chainId:z.from(i).toHexString()};if(e&&e.authorize){const o={app:e.app,origin:e.origin,expiry:e.expiry};try{s.proof=await R9(this.account,i,o)}catch(a){return fe.warn(`connect, signAuthorization failed for options: ${JSON.stringify(e)}, due to: ${a.message}`),{connected:!1,chainId:"0x0",error:`signAuthorization failed: ${a.message}`}}}return s.session=await this.walletSession(),s}sendMessageRequest(e){return new Promise(r=>{this.sendAsync(e.data,(n,i)=>{const s=hn({},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=hn({},r);return n.provider=void 0,n.relayer=void 0,n}):this.account.networks:(fe.warn("signer not set: getNetworks is returning an empty list"),[])}walletSession(){if(this.account)return{walletContext:this.account.contexts,accountAddress:this.account.address,networks:this.account.networks.map(e=>hn({},e,{provider:void 0,relayer:void 0}))}}notifyConnect(e,r){var n;if(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")}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",J(n.chainId))}else this.events.emit("chainChanged","0x0")}async notifyWalletContext(){if(!this.account){fe.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:(fe.error("WalletRequestHandler: result for promptConfirmWalletDeploy is not correct"),!1)}return!1}}function Y6(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 hG=["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"],Nx="sequence-extension-message-handler";class vG extends fu{constructor(e,r){super(e),this.runtime=r,this._init=At.OK}register(){this._registered=!0,this.port=this.runtime.connect({name:Nx})}sendMessage(e){fe.info("[ExtensionMessageHandler send]",e),this.port.postMessage(e)}}class K9 extends lu{constructor(e){super(),this.register=()=>{this._registered=!0},e.onConnect.addListener(r=>{r.name===Nx&&(this._init=At.OK,r.onMessage.addListener(n=>{this.handleMessage(n)}))})}sendMessage(e){}unregister(){}openWallet(e,r,n){}closeWallet(){}}class yG extends Dl.EventEmitter2{constructor(e){var r;super(),r=this,this.responseCallbacks=new Map,this._messageIdx=0,this.nextMessageIdx=()=>++this._messageIdx,this.handleMessage=n=>{if(!n.type||!n.data)return;fe.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,f)=>{if(l)s(l);else if(f)i(f);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=e,this.stream.on("data",this.handleMessage)}sendMessage(e){this.stream.writable||console.error("window post message stream is not writable"),this.stream.write(e)}}function J9(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}: ${Iv(i)}`)},console.warn=(...i)=>{n.warnfromjs(`${t}: ${Iv(i)}`)},console.error=(...i)=>{n.errorfromjs(`${t}: ${Iv(i)}`)},window.logsOverriddenForUnreal=!0}}function Iv(t){return t.map(e=>typeof e=="object"?e instanceof Error?e.message:JSON.stringify(e):String(e)).join(" ")}let Ma;class Q9 extends lu{constructor(e){super(),this.register=()=>{var r;J9("dapp"),Ma&&(Ma.unregister(),Ma=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),Ma=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r,n;this._registered=!1,this.closeWallet(),Ma===this&&(Ma=void 0),((r=window.ue)==null||(n=r.sequencewallettransport)==null?void 0:n.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 au;r&&(s.pathname=r.toLowerCase()),this._init=At.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&o.set("intent",rx(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,n;const i=typeof e!="string"?JSON.stringify(e):e;console.log("Sending message to wallet:",i),(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetowallet(i)}}class pG extends fu{constructor(e){super(e),this.onMessageFromUnreal=r=>{fe.debug("RECEIVED MESSAGE",r),this.handleMessage(r)},this.getUnrealTransportSession=r=>{const n=new au(r);return{sessionId:n.get("sid"),networkId:n.get("net"),intent:nx(n.get("intent"))}},this._init=At.NIL}async register(e){var r;if(((r=window.ue)==null?void 0:r.sequencewallettransport)===void 0)return;J9("wallet");const{search:n}=new URL(e||window.location.href);let i=this.getUnrealTransportSession(n);if(!!i.sessionId||(i=await this.getCachedTransportSession()),!i){fe.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}`;fe.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}`;fe.error(l),this.notifyClose({message:l}),window.close()})}unregister(){var e,r;((e=window.ue)==null||(r=e.sequencewallettransport)==null?void 0:r.onmessagefromsequencejs)===this.onMessageFromUnreal&&delete window.ue.sequencewallettransport.onmessagefromsequencejs,this._registered=!1}sendMessage(e){var r,n;if(e.type!==Te.INIT&&this._init!==At.OK){fe.error("impossible state, should not be calling postMessage until inited");return}const i=JSON.stringify(e);(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetosequencejs(i)}}class yl extends zz{static isSequenceProvider(e){return Y9(e)}constructor(e,r){const n=new aa(e,Sn(r));e=n,super(e,"any"),this._sender=n,this._isSequenceProvider=!0,this._defaultChainId=Sn(r)}sendAsync(e,r,n){this._sender.sendAsync(e,r,n)}send(e,r,n){return this._sender.send(e,r,n)}request(e){return this.send(e.method,e.params||[],e.chainId)}getSigner(){return new Ox(this,this._defaultChainId)}async getChainId(){const e=this._defaultChainId;return e||this.send("eth_chainId",[])}getNetworks(){return this.send("sequence_getNetworks",[])}}function Y9(t){const e=t;return e&&e.send!==void 0&&e._isSequenceProvider===!0}class gG extends yl{constructor(e,r){const n=new G9(e,null,r||[]);super(n)}}class Ox extends _W{constructor(e,r){super(),this._providers={},this.provider=e,this.defaultChainId=r}async getAddress(){if(this._address)return this._address;const e=await this.provider.send("eth_accounts",[]);return this._address=e[0],this._index=0,xe(this._address)}signTransaction(e){throw new Error("signTransaction is unsupported, use signTransactions instead")}connect(e){throw new Error("unsupported: cannot alter JSON-RPC Signer connection")}async getProvider(e){if(e){const r=await this.getChainId();if(r!==e)throw new Error(`signer is attempting to access chain ${e}, but is already bound to chain ${r}`)}return this.provider}async getSender(e){return!e||e&&e===this.defaultChainId?this.provider:(this._providers[e]||(this._providers[e]=new yl(new aa(this.provider,e),e)),this._providers[e])}getRelayer(e){throw new Error("TODO")}async getWalletContext(){return this._context||(this._context=await this.provider.send("sequence_getWalletContext",[])),this._context}async getWalletConfig(e){const r=Sn(e)||this.defaultChainId;if(!r)throw new Error("chainId is required");return(await this.provider.send("sequence_getWalletConfig",[r],r))[0]}async getWalletState(e){const r=Sn(e)||this.defaultChainId;if(!r)throw new Error("chainId is required");return(await this.provider.send("sequence_getWalletState",[r],r))[0].status}async getNetworks(){return this._networks||(this._networks=await this.provider.getNetworks()),this._networks}async getSigners(){const e=await this.getNetworks(),r=await this.getWalletConfig(e[0].chainId);if(!r)throw new Error("walletConfig returned zero results for authChainId {authChainId}");return Vr.genericCoderFor(r.version).config.signersOf(r).map(n=>n.address)}async signMessage(e,r,n=!0){const i=await this.getSender(Sn(r)||this.defaultChainId),s=typeof e=="string"?Le(e):e,o=await this.getAddress();return i.send(n?"sequence_sign":"personal_sign",[J(s),o])}async signTypedData(e,r,n,i,s=!0){return this.provider.send(s?"sequence_signTypedData_v4":"eth_signTypedData_v4",[await this.getAddress(),qt.getPayload(e,r,n)],Sn(i)||this.defaultChainId)}async sendTransaction(e,r){const n=await this.getSender(Sn(r)||this.defaultChainId);return this.sendUncheckedTransaction(e,r).then(s=>Fo(()=>n.getTransaction(s).then(o=>{if(o!==null)return n._wrapTransaction(o,s)}),{onceBlock:this.provider}).catch(o=>{throw o.transactionHash=s,o}))}async sendTransactionBatch(e,r){const n=await Dp(e);if(!n||n.length===0)throw new Error("cannot send empty batch");if(n.find(s=>s.wait!==void 0&&s.wait!==null))throw new Error("transaction request expected for sendTransactionBatch, transaction response found");const i=cG(n);return this.sendTransaction(i,r)}signTransactions(e,r){return e=D0(e),this.provider.send("eth_signTransaction",[e],Sn(r)||this.defaultChainId)}sendSignedTransactions(e,r){throw new Error("TODO")}async updateConfig(e){const[r,n]=await this.provider.send("sequence_updateConfig",[e],this.defaultChainId);if(n===null)return[r,void 0];const i=await this.getSender(this.defaultChainId);return[r,i._wrapTransaction(n,n.hash)]}async publishConfig(){const e=await this.getSender(this.defaultChainId),r=await e.send("sequence_publishConfig",[]);if(r!==null)return e._wrapTransaction(r,r.hash)}async isDeployed(e){const n=await(await this.getSender(Sn(e))).getCode(await this.getAddress());return!!n&&n!=="0x"}async _legacySignMessage(e,r){const n=await this.getSender(Sn(r)||this.defaultChainId),i=typeof e=="string"?Le(e):e,s=await this.getAddress();return await n.send("eth_sign",[s,J(i)])}async _signTypedData(e,r,n,i){return this.signTypedData(e,r,n,i)}async sendUncheckedTransaction(e,r){e=D0(e);const n=this.getAddress(),i=await this.getSender(Sn(r)||this.defaultChainId);return Sp({tx:Sp(e),sender:await n}).then(({tx:s,sender:o})=>{if(s.from!=null){if(xe(s.from)!==o)throw new Error(`from address mismatch for transaction ${e}`)}else s.from=o;const a=X9(s);return i.send("eth_sendTransaction",[a]).then(l=>l,l=>{throw l})})}connectUnchecked(){return new xG(this.provider,this.defaultChainId)}async unlock(e){const r=await this.getAddress();return this.provider.send("personal_unlockAccount",[r,e,null])}}const mG={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,from:!0,auxiliary:!0,expiration:!0,afterNonce:!0,delegateCall:!0,revertOnError:!0},X9=(t,e)=>{const r=D0(mG);if(e)for(const s in e)e[s]&&(r[s]=!0);Rh(t,r);const n={};["gasLimit","gasPrice","nonce","value"].forEach(s=>{const o=t[s];if(o==null)return;const a=Yc(o);s==="gasLimit"&&(s="gas"),n[s]=a}),["from","to","data"].forEach(s=>{t[s]&&(n[s]=J(t[s]))}),["delegateCall","revertOnError"].forEach(s=>{const o=t[s];o!=null&&(n[s]=o)});const i=t.auxiliary;return i&&i.length>0&&(n.auxiliary=[],i.forEach(s=>{n.auxiliary.push(X9(s))})),n};class xG extends Ox{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({chainId:0,confirmations:0,data:"",from:"",gasLimit:ze,gasPrice:ze,hash:r,nonce:0,value:ze,wait:n=>this.provider.waitForTransaction(r,n)}))}}class bG{constructor(e){this.wallet=e}signMessage(e,r,n){const i=this.wallet.getSigner();if(!i)throw new Error("unable to get signer");return i.signMessage(e,r,n)}async signAuthMessage(e,r){const n=this.wallet.getSigner();if(!n)throw new Error("unable to get AuthChain signer");return n.signMessage(e,await n.getChainId(),r)}signTypedData(e,r,n,i,s){const o=this.wallet.getSigner();if(!o)throw new Error("unable to get signer");return o.signTypedData(e,r,n,i,s)}async signAuthTypedData(e,r,n,i){const s=this.wallet.getSigner();if(!s)throw new Error("unable to get AuthChain signer");return s.signTypedData(e,r,n,await s.getChainId(),i)}async isValidSignature(e,r,n,i){const s=this.wallet.getProvider(i);if(!s)throw new Error(`unable to get provider for chainId ${i}`);return Ll(e,r,n,s)}async isValidMessageSignature(e,r,n,i){const s=this.wallet.getProvider(i);if(!s)throw new Error(`unable to get provider for chainId ${i}`);const o=Qh(r),a=ix(o);return Ll(e,a,n,s)}isValidTypedDataSignature(e,r,n,i){return this.isValidSignature(e,zh(r),n,i)}}const Pd="@sequence.session";class Bx{constructor(e,r){var n=this;this.init=()=>{var i,s,o,a,l,f,c,u,h;this.transport.provider||(this.transport.messageProvider=new W9,(i=this.config.transports)!=null&&(s=i.windowTransport)!=null&&s.enabled&&typeof window=="object"&&(this.transport.windowMessageProvider=new q9(this.config.walletAppURL),this.transport.messageProvider.add(this.transport.windowMessageProvider)),(o=this.config.transports)!=null&&(a=o.proxyTransport)!=null&&a.enabled&&(this.transport.proxyMessageProvider=new H9(this.config.transports.proxyTransport.appPort),this.transport.messageProvider.add(this.transport.proxyMessageProvider)),(l=this.config.transports)!=null&&(f=l.extensionTransport)!=null&&f.enabled&&(this.transport.extensionMessageProvider=new K9(this.config.transports.extensionTransport.runtime),this.transport.messageProvider.add(this.transport.extensionMessageProvider)),(c=this.config.transports)!=null&&(u=c.unrealTransport)!=null&&u.enabled&&(this.transport.unrealMessageProvider=new Q9(this.config.walletAppURL),this.transport.messageProvider.add(this.transport.unrealMessageProvider)),this.transport.messageProvider.register(),this.transport.allowProvider=L0(v=>{if(v.method==="sequence_setDefaultNetwork")return!0;const x=this.isConnected();if(!x)throw new Error("Sequence: wallet not connected");return x}),this.transport.networkProvider=bE(v=>!this.networks||this.networks.length===0?0:Vi(this.networks,this.config.defaultNetworkId).chainId),this.transport.cachedProvider=new $0,this.transport.cachedProvider.onUpdate(()=>{this.session||(this.session={providerCache:{}}),this.session.providerCache=this.transport.cachedProvider.getCache(),this.saveSession(this.session)}),this.transport.router=new Jf([Ad,this.transport.networkProvider,this.transport.allowProvider,Cd,this.transport.cachedProvider],this.transport.messageProvider),this.transport.provider=new yl(this.transport.router,(h=cx(this.config.defaultNetworkId))==null?void 0:h.chainId),this.transport.messageProvider.on("open",v=>{const{session:x}=v;x?this.useSession(x,!0):(this.session&&this.session.accountAddress&&this.transport.messageProvider.emit("disconnect"),this.clearSession())}),this.transport.messageProvider.on("accountsChanged",(v,x)=>{if(x){v.length>0&&this.useSession({accountAddress:v[0]},!0);return}!v||v.length===0||v[0]===""?this.clearSession():this.useSession({accountAddress:v[0]},!0)}),this.transport.messageProvider.on("networks",v=>{this.useSession({networks:v},!0)}),this.transport.messageProvider.on("walletContext",v=>{this.useSession({walletContext:v},!0)}))},this.loadSession=async function(i){const s=await gr.getInstance().getItem(Pd);if(!(!s||s===""))try{const a=JSON.parse(s);if(a){if(i!==void 0){var o;const l=typeof i=="string"?parseInt(i):i,f=h=>h.name===i||h.chainId===l,c=(o=a.networks)==null?void 0:o.find(f),u=c==null?void 0:c.isDefaultChain;if(a.networks&&c&&!u){const h=a.networks.map(v=>hn({},v,{isDefaultChain:f(v)}));a.networks=fx(h),a.providerCache=void 0}}n.useSession(a,!0)}return a}catch{fe.warn("loadSession failed, unable to parse session payload from storage.");return}},this.connect=async function(i){if(i&&(i==null?void 0:i.authorizeVersion)===void 0&&(i.authorizeVersion=2),(i==null?void 0:i.refresh)===!0&&n.disconnect(),n.isConnected()&&await n.isSiteConnected(i==null?void 0:i.origin)&&n.session&&!(i!=null&&i.authorize)&&!(i!=null&&i.askForEmail))return{connected:!0,session:n.session,chainId:J(await n.getChainId())};if(i&&i.authorize){if(!i.app)throw new Error("connecting with 'authorize' option also requires 'app' to be set");i.authorizeVersion===void 0&&(i.authorizeVersion=2)}await n.openWallet(void 0,{type:"connect",options:i});const s=await n.transport.messageProvider.waitUntilConnected().catch(o=>o instanceof Error?{connected:!1,error:o.message}:{connected:!1,error:JSON.stringify(o)});if(s.connected)if(s.session)n.useSession(s.session,!0),n.addConnectedSite(i==null?void 0:i.origin);else throw new Error("impossible state, connect response is missing session");return s},this.authorize=async function(i){return n.connect(hn({},i,{authorize:!0}))},this.getSession=()=>{if(this.isConnected())return this.session},this.getAddress=async function(){if(!n.isConnected())throw new Error("connect first");return n.getSession().accountAddress},this.getNetworks=async function(i){if(!n.isConnected()||!n.networks)throw new Error("connect first");if(i){const s=Vi(n.networks,i);return s?[s]:[]}return n.networks},this.getChainId=async function(){if(!n.networks||n.networks.length<1)throw new Error("networks have not been set by session. connect first.");const i=Vi(n.networks,n.config.defaultNetworkId);if(!i)throw new Error("networks must have a default chain specified");return i.chainId},this.openWallet=async function(i,s,o){if((s==null?void 0:s.type)!=="connect"&&!n.isConnected())throw new Error("connect first");let a;return!n.networks||n.networks.length<1?a=n.config.defaultNetworkId:a=await n.getChainId(),n.transport.messageProvider.openWallet(i,s,o||a),await n.transport.messageProvider.waitUntilOpened(),!0},this.closeWallet=()=>{this.transport.messageProvider.closeWallet()},this.unregister=()=>{var i;this.disconnect(),(i=this.transport.messageProvider)==null||i.unregister()},this.saveSession=async function(i){fe.debug("wallet provider: saving session");const s=JSON.stringify(i);await gr.getInstance().setItem(Pd,s)},this.useSession=async function(i,s=!0){n.session||(n.session={}),n.config.walletContext?n.session.walletContext=n.config.walletContext:i.walletContext&&(n.session.walletContext=i.walletContext),i.accountAddress&&n.useAccountAddress(i.accountAddress),i.networks&&n.useNetworks(i.networks),i.providerCache?n.transport.cachedProvider.setCache(i.providerCache):n.transport.cachedProvider.clearCache(),s&&n.saveSession(n.session)},this.config=hn({},Z9),r&&(this.config=hn({},this.config,r)),e?this.config.defaultNetworkId=e:this.config.defaultNetworkId||(this.config.defaultNetworkId="mainnet"),r!=null&&r.localStorage&&gr.use(r.localStorage),this.transport={},this.networks=[],this.providers={},this.connectedSites=new V9("@sequence.connectedSites",[]),this.utils=new bG(this),this.init()}async addConnectedSite(e){e=e||window.location.origin;const r=await this.connectedSites.get();if(r){if(r.includes(e))return;this.connectedSites.set([...r,e])}else this.connectedSites.set([e])}async removeConnectedSite(e){const r=await this.connectedSites.get();r&&this.connectedSites.set(r.filter(n=>n!==e))}getConnectedSites(){return this.connectedSites.get()}async isSiteConnected(e){const r=await this.connectedSites.get();return!!r&&r.includes(e||window.location.origin)}disconnect(){return this.isOpened()&&this.closeWallet(),this.clearSession()}getProviderConfig(){return this.config}isOpened(){return this.transport.messageProvider.isOpened()}isConnected(){return this.session!==void 0&&this.session.networks!==void 0&&this.session.networks.length>0&&this.networks!==void 0&&this.networks.length>0&&!!this.session.accountAddress&&this.session.accountAddress.startsWith("0x")}getProvider(e){if(!this.isConnected()){if(e)throw new Error("session is empty. connect and try again.");return this.transport.provider}let r=Vi(this.networks,this.config.defaultNetworkId);if(e&&(r=Vi(this.networks,e),!r))throw new Error(`network ${e} is not in the network list`);if(this.providers[r.chainId])return this.providers[r.chainId];let n;const i=new ba(Ol(r.rpcUrl),r.chainId);if(r.isDefaultChain){const s=new Jf([Ad,Cd,new F0({accountAddress:this.session.accountAddress,walletContext:this.session.walletContext}),new kp(this.transport.provider),this.transport.cachedProvider],new aa(i));n=new yl(s,r.chainId)}else{const s=new Jf([Ad,Cd,new F0({accountAddress:this.session.accountAddress,walletContext:this.session.walletContext,chainId:r.chainId}),new kp(this.transport.provider),new $0({defaultChainId:r.chainId})],new aa(i));n=new yl(s,r.chainId)}return this.providers[r.chainId]=n,n}getAllProviders(){return this.providers}getSigner(e){return this.getProvider(e).getSigner()}getWalletConfig(e){return this.getSigner().getWalletConfig(e)}getWalletState(e){return this.getSigner().getWalletState(e)}getWalletContext(){return this.getSigner().getWalletContext()}isDeployed(e){return this.getSigner(e).isDeployed()}on(e,r){this.transport.messageProvider.on(e,r)}once(e,r){this.transport.messageProvider.once(e,r)}useAccountAddress(e){this.session||(this.session={}),this.session.accountAddress=xe(e)}useNetworks(e){if(this.session||(this.session={}),this.session.networks=e,!(!this.session.networks||this.session.networks.length===0)){if(!this.config.networks&&!this.config.networkRpcUrl){this.networks=e;return}if(this.networks=e,this.config.networks&&(this.networks=e.map(r=>hn({},r)),this.config.networks.forEach(r=>{const n=Vi(this.networks,r.chainId||r.name);n&&cE(r,n)}),lx(this.networks,!0)),this.config.networkRpcUrl){const r=this.networks.find(n=>n.isDefaultChain);r&&(r.rpcUrl=this.config.networkRpcUrl)}}}async clearSession(){var e;fe.debug("wallet provider: clearing session"),await gr.getInstance().removeItem(Pd),this.session=void 0,this.networks=[],this.providers={},(e=this.transport.cachedProvider)==null||e.clearCache()}}const Z9={walletAppURL:"https://sequence.app",transports:{windowTransport:{enabled:!0},proxyTransport:{enabled:!1}}};let mi;const eS=async(t,e)=>mi||(mi=new Bx(t,e),await mi.loadSession(t),mi),wG=()=>{mi&&(mi.closeWallet(),mi.unregister())},tS=()=>{if(!mi)throw new Error("Wallet has not been initialized, call sequence.initWallet(network, config) first.");return mi},CG=Object.freeze(Object.defineProperty({__proto__:null,BaseInjectedTransport:yG,BaseProviderTransport:lu,BaseWalletTransport:fu,CHANNEL_ID:Nx,DefaultProviderConfig:Z9,ErrSignedInRequired:D9,EventType:Te,ExtensionMessageHandler:vG,ExtensionMessageProvider:K9,InitState:At,LocalStorage:gr,LocalStore:V9,LocalWeb3Provider:gG,MuxMessageProvider:W9,OpenState:kn,PROVIDER_OPEN_TIMEOUT:Mx,ProviderError:B9,ProxyMessageChannel:aG,ProxyMessageChannelPort:qp,ProxyMessageHandler:lG,ProxyMessageProvider:H9,SESSION_LOCALSTORE_KEY:Pd,UnrealMessageHandler:pG,UnrealMessageProvider:Q9,Wallet:Bx,WalletRequestHandler:G9,Web3Provider:yl,Web3Signer:Ox,WindowMessageHandler:fG,WindowMessageProvider:q9,WindowSessionParams:au,getWallet:tS,initWallet:eS,isBrowserExtension:K0,isSequenceProvider:Y9,isUnityPlugin:U9,isValidMessageSignature:F9,isValidSignature:Ll,isValidTypedDataSignature:j9,isWalletUpToDate:z9,messageToBytes:$9,nextMessageIdx:L9,prefixEIP191Message:Qh,trimEIP191Prefix:oG,unregisterWallet:wG},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 AG=Br({__proto__:null},[pV]),EG=Br({__proto__:null},[AV]),SG=Br({__proto__:null},[Lq]),kG=Br({__proto__:null},[zq]),_G=Br({__proto__:null},[Mq]),TG=Br({__proto__:null},[bq]),PG=Br({__proto__:null},[Yq]),IG=Br({__proto__:null},[hH]),RG=Br({__proto__:null},[CG]),MG=Br({__proto__:null},[EW]);const NG=le.transaction;var OG=Object.freeze({__proto__:null,transactions:NG}),BG=Br({__proto__:null,isValidSignature:Ll,isValidMessageSignature:F9,isValidTypedDataSignature:j9,isWalletUpToDate:z9},[rH]),DG=Br({__proto__:null},[nW]),LG=Br({__proto__:null},[kW]),$G=Br({__proto__:null},[uq]),FG=Br({__proto__:null},[fW]),jG=Br({__proto__:null},[RW]),He=Object.freeze({__proto__:null,abi:AG,api:EG,auth:SG,guard:kG,indexer:_G,metadata:TG,multicall:PG,network:IG,provider:RG,relayer:MG,transactions:OG,utils:BG,core:DG,signhub:LG,sessions:$G,migration:FG,account:jG,initWallet:eS,getWallet:tS,Wallet:Bx});const X6=[{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"}];function Gp(){return Gp=Object.assign?Object.assign.bind():function(t){for(var e=1;ezG.configure(t),HG="/demo-dapp/assets/logo-b757309e.svg",Z6="/demo-dapp/assets/skyweaver-banner-6d47c1d1.png";var WG="_1e9z9271";const qG=({message:t,loading:e})=>ce(hN,{label:"Console",defaultOpen:!0,children:ln(ge,{as:"pre",style:{fontFamily:"monospace",whiteSpace:"break-spaces",overflowWrap:"anywhere"},children:[t,e&&(()=>t?` -...`:"...")(),ce(ge,{className:WG,display:"inline-block",fontSize:"large",lineHeight:"4",style:{top:"-4px",position:"relative"},children:"_"})]})});var GG="_1q07ov40";const So=t=>{const{label:e,children:r,style:n,className:i}=t;return ln(ge,{marginTop:"10",marginBottom:"8",marginX:"0",width:"full",className:i,style:n,children:[e&&ce(ge,{marginBottom:"2",children:ce(KG,{children:e})}),ce(ge,{className:GG,children:Wt.Children.map(r,(s,o)=>ce(ge,{children:s},o))})]})},KG=t=>ce(sr,{variant:"normal",fontWeight:"medium",color:"text50",children:t.children});function er(){return er=Object.assign?Object.assign.bind():function(t){for(var e=1;e{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(f=>f.chainId).sort(),s=i.filter((f,c)=>i.indexOf(f)!==c);if(s.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${s}`);return!1}n.forEach(f=>f.name=f.name.toLowerCase());const o=n.map(f=>f.name).sort(),a=o.filter((f,c)=>o.indexOf(f)!==c);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let f=0;f(JG(t,!0,e),t),YG=t=>QG(XG(t)),XG=t=>{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},Dx=(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})):"";let te=function(t){return t[t.MAINNET=1]="MAINNET",t[t.ROPSTEN=3]="ROPSTEN",t[t.RINKEBY=4]="RINKEBY",t[t.GOERLI=5]="GOERLI",t[t.KOVAN=42]="KOVAN",t[t.POLYGON=137]="POLYGON",t[t.POLYGON_MUMBAI=80001]="POLYGON_MUMBAI",t[t.POLYGON_ZKEVM=1101]="POLYGON_ZKEVM",t[t.BSC=56]="BSC",t[t.BSC_TESTNET=97]="BSC_TESTNET",t[t.OPTIMISM=10]="OPTIMISM",t[t.OPTIMISM_TESTNET=69]="OPTIMISM_TESTNET",t[t.ARBITRUM=42161]="ARBITRUM",t[t.ARBITRUM_GOERLI=421613]="ARBITRUM_GOERLI",t[t.ARBITRUM_NOVA=42170]="ARBITRUM_NOVA",t[t.AVALANCHE=43114]="AVALANCHE",t[t.AVALANCHE_TESTNET=43113]="AVALANCHE_TESTNET",t[t.FANTOM=250]="FANTOM",t[t.FANTOM_TESTNET=4002]="FANTOM_TESTNET",t[t.GNOSIS=100]="GNOSIS",t[t.AURORA=1313161554]="AURORA",t[t.AURORA_TESTNET=1313161556]="AURORA_TESTNET",t[t.BASE_GOERLI=84531]="BASE_GOERLI",t[t.HARDHAT=31337]="HARDHAT",t[t.HARDHAT_2=31338]="HARDHAT_2",t}({});const ZG=t=>Dx("https://${network}-indexer.sequence.app",{network:t}),eK=t=>Dx("https://${network}-relayer.sequence.app",{network:t}),tK=t=>Dx("https://nodes.sequence.app/${network}",{network:t}),hr={[te.MAINNET]:{chainId:te.MAINNET,name:"mainnet",title:"Ethereum",blockExplorer:{name:"Etherscan",rootUrl:"https://etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[te.ROPSTEN]:{chainId:te.ROPSTEN,name:"ropsten",title:"Ropsten",testnet:!0,blockExplorer:{name:"Etherscan (Ropsten)",rootUrl:"https://ropsten.etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[te.RINKEBY]:{chainId:te.RINKEBY,name:"rinkeby",title:"Rinkeby",testnet:!0,blockExplorer:{name:"Etherscan (Rinkeby)",rootUrl:"https://rinkeby.etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",disabled:!0},[te.GOERLI]:{chainId:te.GOERLI,name:"goerli",title:"Goerli",testnet:!0,blockExplorer:{name:"Etherscan (Goerli)",rootUrl:"https://goerli.etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[te.KOVAN]:{chainId:te.KOVAN,name:"kovan",title:"Kovan",testnet:!0,blockExplorer:{name:"Etherscan (Kovan)",rootUrl:"https://kovan.etherscan.io/"}},[te.POLYGON]:{chainId:te.POLYGON,name:"polygon",title:"Polygon",blockExplorer:{name:"Polygonscan",rootUrl:"https://polygonscan.com/"},isDefaultChain:!0,isAuthChain:!0},[te.POLYGON_MUMBAI]:{chainId:te.POLYGON_MUMBAI,name:"mumbai",title:"Polygon Mumbai",testnet:!0,blockExplorer:{name:"Polygonscan (Mumbai)",rootUrl:"https://mumbai.polygonscan.com/"}},[te.POLYGON_ZKEVM]:{chainId:te.POLYGON_ZKEVM,name:"polygon-zkevm",title:"Polygon zkEVM",blockExplorer:{name:"Polygonscan (zkEVM)",rootUrl:"https://zkevm.polygonscan.com/"}},[te.BSC]:{chainId:te.BSC,name:"bsc",title:"BNB Smart Chain",blockExplorer:{name:"BSCScan",rootUrl:"https://bscscan.com/"}},[te.BSC_TESTNET]:{chainId:te.BSC_TESTNET,name:"bsc-testnet",title:"BNB Smart Chain Testnet",testnet:!0,blockExplorer:{name:"BSCScan (Testnet)",rootUrl:"https://testnet.bscscan.com/"}},[te.OPTIMISM]:{chainId:te.OPTIMISM,name:"optimism",title:"Optimism",blockExplorer:{name:"Etherscan (Optimism)",rootUrl:"https://optimistic.etherscan.io/"}},[te.OPTIMISM_TESTNET]:{chainId:te.OPTIMISM_TESTNET,name:"optimism-testnet",title:"Optimistic Kovan",testnet:!0,blockExplorer:{name:"Etherscan (Optimism Testnet)",rootUrl:"https://kovan-optimistic.etherscan.io/"}},[te.ARBITRUM]:{chainId:te.ARBITRUM,name:"arbitrum",title:"Arbitrum One",blockExplorer:{name:"Arbiscan",rootUrl:"https://arbiscan.io/"}},[te.ARBITRUM_GOERLI]:{chainId:te.ARBITRUM_GOERLI,name:"arbitrum-goerli",title:"Arbitrum Goerli",testnet:!0,blockExplorer:{name:"Arbiscan (Testnet)",rootUrl:"https://testnet.arbiscan.io/"}},[te.ARBITRUM_NOVA]:{chainId:te.ARBITRUM_NOVA,name:"arbitrum-nova",title:"Arbitrum Nova",blockExplorer:{name:"Nova Explorer",rootUrl:"https://nova-explorer.arbitrum.io/"}},[te.AVALANCHE]:{chainId:te.AVALANCHE,name:"avalanche",title:"Avalanche",blockExplorer:{name:"Snowtrace",rootUrl:"https://snowtrace.io/"}},[te.AVALANCHE_TESTNET]:{chainId:te.AVALANCHE_TESTNET,name:"avalanche-testnet",title:"Avalanche Testnet",testnet:!0,blockExplorer:{name:"Snowtrace (Testnet)",rootUrl:"https://testnet.snowtrace.io/"}},[te.FANTOM]:{chainId:te.FANTOM,name:"fantom",title:"Fantom",blockExplorer:{name:"FTMScan",rootUrl:"https://ftmscan.com/"}},[te.FANTOM_TESTNET]:{chainId:te.FANTOM_TESTNET,name:"fantom-testnet",title:"Fantom Testnet",testnet:!0,blockExplorer:{name:"FTMScan (Testnet)",rootUrl:"https://testnet.ftmscan.com/"}},[te.GNOSIS]:{chainId:te.GNOSIS,name:"gnosis",title:"Gnosis Chain",blockExplorer:{name:"Gnosis Chain Explorer",rootUrl:"https://blockscout.com/xdai/mainnet/"}},[te.AURORA]:{chainId:te.AURORA,name:"aurora",title:"Aurora",blockExplorer:{name:"Aurora Explorer",rootUrl:"https://aurorascan.dev/"}},[te.AURORA_TESTNET]:{chainId:te.AURORA_TESTNET,name:"aurora-testnet",title:"Aurora Testnet",blockExplorer:{name:"Aurora Explorer (Testnet)",rootUrl:"https://testnet.aurorascan.dev/"}},[te.BASE_GOERLI]:{chainId:te.BASE_GOERLI,name:"base-goerli",title:"Base Goerli",blockExplorer:{name:"Base Goerli Explorer",rootUrl:"https://goerli.basescan.org/"}},[te.HARDHAT]:{chainId:te.HARDHAT,name:"hardhat",title:"Hardhat (local testnet)"},[te.HARDHAT_2]:{chainId:te.HARDHAT_2,name:"hardhat2",title:"Hardhat (local testnet)"}},Lr=t=>{const e=tK(t);return{rpcUrl:e,relayer:{url:eK(t),provider:{url:e}},indexerUrl:ZG(t)}};YG([er({},hr[te.MAINNET],Lr("mainnet")),er({},hr[te.POLYGON],Lr("polygon")),er({},hr[te.BSC],Lr("bsc")),er({},hr[te.AVALANCHE],Lr("avalanche")),er({},hr[te.ARBITRUM],Lr("arbitrum")),er({},hr[te.ARBITRUM_NOVA],Lr("arbitrum-nova")),er({},hr[te.OPTIMISM],Lr("optimism")),er({},hr[te.POLYGON_ZKEVM],Lr("polygon-zkevm")),er({},hr[te.GNOSIS],Lr("gnosis")),er({},hr[te.RINKEBY],Lr("rinkeby")),er({},hr[te.GOERLI],Lr("goerli")),er({},hr[te.POLYGON_MUMBAI],Lr("mumbai")),er({},hr[te.BSC_TESTNET],Lr("bsc-testnet")),er({},hr[te.ARBITRUM_GOERLI],Lr("arbitrum-goerli")),er({},hr[te.BASE_GOERLI],Lr("base-goerli")),er({},hr[te.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),er({},hr[te.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]);const Gu="data:image/png;base64,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",e3="data:image/png;base64,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",rK="/demo-dapp/assets/100-cf3a0cbf.png",nK="/demo-dapp/assets/1101-1d0b8ff9.png",t3="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",r3="/demo-dapp/assets/250-2aa72264.png",n3="/demo-dapp/assets/42161-90b816d4.png",iK="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/SURBVHicxVv3Y1RFEJ67JCSXkII5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",i3="data:image/png;base64,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",s3="/demo-dapp/assets/56-06b98271.png",sK={[te.MAINNET]:Gu,[te.ROPSTEN]:Gu,[te.GOERLI]:Gu,[te.KOVAN]:Gu,[te.OPTIMISM]:e3,[te.OPTIMISM_TESTNET]:e3,[te.POLYGON]:t3,[te.POLYGON_MUMBAI]:t3,[te.POLYGON_ZKEVM]:nK,[te.ARBITRUM]:n3,[te.ARBITRUM_NOVA]:iK,[te.ARBITRUM_GOERLI]:n3,[te.GNOSIS]:rK,[te.BSC]:s3,[te.BSC_TESTNET]:s3,[te.FANTOM]:r3,[te.FANTOM_TESTNET]:r3,[te.AVALANCHE]:i3,[te.AVALANCHE_TESTNET]:i3},oK=()=>{const t=window.localStorage.getItem("defaultChainId");return t==null?null:Number(t)},aK=t=>{console.log("huh?",t),window.localStorage.setItem("defaultChainId",`${t}`)};VG({logLevel:"DEBUG"});const sc=oK()||te.MAINNET;He.initWallet(sc);const lK=()=>{const[t,e]=S.useState(null),[r,n]=S.useState(!1),[i,s]=S.useState(!1),[o,a]=S.useState(),l=He.getWallet();S.useEffect(()=>{(async()=>{const d=await l.getChainId();a(d)})()},[l]),S.useEffect(()=>{s(l.isConnected())},[l]),S.useEffect(()=>{m()},[i]),S.useEffect(()=>{l.on("disconnect",()=>{console.log("wallet disconnected"),u()})},[l]);const f={app:"Demo Dapp",askForEmail:!0},c=async(d={})=>{if(i){O(),P("Wallet already connected!"),n(!1);return}d={...f,...d,settings:{...f.settings,...d.settings}};try{O(),P("Connecting");const _=He.getWallet(),N=await _.connect(d);if(d.authorize){const p=new He.api.SequenceAPIClient("https://api.sequence.app"),{isValid:B}=await p.isValidETHAuthProof({chainId:sc.toString(),walletAddress:N.session.accountAddress,ethAuthProofString:N.proof.proofString});P(`isValid (API)?: ${B}`)}if(d.authorize){const p=new O0;if(N.proof){const B=await p.decodeProof(N.proof.proofString,!0),L=await _.utils.isValidTypedDataSignature(await _.getAddress(),N.proof.typedData,B.signature,z.from(N.chainId).toNumber());P(`isValid (client)?: ${L}`)}}n(!1),N.connected?(a(await _.getChainId()),P("Wallet connected!"),s(!0)):P("Failed to connect wallet - "+N.error)}catch(_){console.error(_),T()}},u=()=>{He.getWallet().disconnect(),m(),s(!1)},h=()=>{He.getWallet().openWallet()},v=()=>{const d=He.getWallet(),N={type:"openWithOptions",options:{settings:{theme:"light",includedPaymentProviders:["moonpay","ramp","wyre"],defaultFundingCurrency:"eth",defaultPurchaseAmount:400,lockFundingCurrencyToDefault:!1}}},p="wallet/add-funds";d.openWallet(p,N)},x=()=>{He.getWallet().closeWallet()},g=async()=>{O();const d=He.getWallet();P(`isConnected?: ${d.isConnected()}`),n(!1)},k=async()=>{O();const d=He.getWallet();P(`isOpened?: ${d.isOpened()}`),n(!1)},w=async()=>{try{O(),P(`selected chainId: ${o}`);const d=await l.getChainId();P(`top chainId: ${d}`);const N=await l.getProvider(o).getChainId();P(`provider.getChainId(): ${N}`);const B=await l.getSigner(o).getChainId();P(`signer.getChainId(): ${B}`),n(!1)}catch(d){console.error(d),T()}},A=async()=>{try{O();const d=He.getWallet(),_=await d.getAddress();P(`getAddress(): ${_}`);const p=await d.getProvider(o).listAccounts();P(`accounts: ${JSON.stringify(p)}`),n(!1)}catch(d){console.error(d),T()}},E=async()=>{try{O();const d=He.getWallet(),_=d.getProvider(o),N=await d.getAddress(),p=await _.getBalance(N);P(`balance check 1: ${p.toString()}`);const L=await d.getSigner(o).getBalance();P(`balance check 2: ${L.toString()}`),n(!1)}catch(d){console.error(d),T()}},I=async()=>{try{O();const d=await l.getSigner(o).getWalletState();P(`wallet state: ${JSON.stringify(d)}`),n(!1)}catch(d){console.error(d),T()}},M=async()=>{try{O();const _=await He.getWallet().getNetworks();P(`networks: ${JSON.stringify(_,null,2)}`),n(!1)}catch(d){console.error(d),T()}},$=async()=>{try{O();const d=He.getWallet();P("signing message...");const _=d.getSigner(o),N=`1915 Robert Frost + */(function(t,e){(function(r){var n=Object.hasOwnProperty,i=Array.isArray?Array.isArray:function(T){return Object.prototype.toString.call(T)==="[object Array]"},s=10,o=typeof process=="object"&&typeof process.nextTick=="function",a=typeof Symbol=="function",l=typeof Reflect=="object",f=typeof setImmediate=="function",c=f?setImmediate:setTimeout,u=a?l&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(m){var T=Object.getOwnPropertyNames(m);return T.push.apply(T,Object.getOwnPropertySymbols(m)),T}:Object.keys;function h(){this._events={},this._conf&&v.call(this,this._conf)}function v(m){m&&(this._conf=m,m.delimiter&&(this.delimiter=m.delimiter),m.maxListeners!==r&&(this._maxListeners=m.maxListeners),m.wildcard&&(this.wildcard=m.wildcard),m.newListener&&(this._newListener=m.newListener),m.removeListener&&(this._removeListener=m.removeListener),m.verboseMemoryLeak&&(this.verboseMemoryLeak=m.verboseMemoryLeak),m.ignoreErrors&&(this.ignoreErrors=m.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function x(m,T){var R="(node) warning: possible EventEmitter memory leak detected. "+m+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(R+=" Event name: "+T+"."),typeof process<"u"&&process.emitWarning){var b=new Error(R);b.name="MaxListenersExceededWarning",b.emitter=this,b.count=m,process.emitWarning(b)}else console.error(R),console.trace&&console.trace()}var g=function(m,T,R){var b=arguments.length;switch(b){case 0:return[];case 1:return[m];case 2:return[m,T];case 3:return[m,T,R];default:for(var d=new Array(b);b--;)d[b]=arguments[b];return d}};function k(m,T){for(var R={},b,d=m.length,_=T?T.length:0,N=0;N0;)m=_[D],N.call(p,m,R[m]);this._listeners={},this._listenersCount=0,L()}}});function A(m,T,R,b){var d=Object.assign({},T);if(!m)return d;if(typeof m!="object")throw TypeError("options must be an object");var _=Object.keys(m),N=_.length,p,D,L;function F(Z){throw Error('Invalid "'+p+'" option value'+(Z?". Reason: "+Z:""))}for(var H=0;H0;)if(p===m[D])return _;N(T)}}var M=I(["function"]),$=I(["object","function"]);function j(m,T,R){var b,d,_=0,N,p=new m(function(D,L,F){R=A(R,{timeout:0,overload:!1},{timeout:function(X,ve){return X*=1,(typeof X!="number"||X<0||!Number.isFinite(X))&&ve("timeout must be a positive number"),X}}),b=!R.overload&&typeof m.prototype.cancel=="function"&&typeof F=="function";function H(){d&&(d=null),_&&(clearTimeout(_),_=0)}var Z=function(X){H(),D(X)},K=function(X){H(),L(X)};b?T(Z,K,F):(d=[function(X){K(X||Error("canceled"))}],T(Z,K,function(X){if(N)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof X!="function")throw TypeError("onCancel callback must be a function");d.push(X)}),N=!0),R.timeout>0&&(_=setTimeout(function(){var X=Error("timeout");X.code="ETIMEDOUT",_=0,p.cancel(X),L(X)},R.timeout))});return b||(p.cancel=function(D){if(d){for(var L=d.length,F=1;F0;)K=Se[p],K!=="_listeners"&&(St=W(m,T,R[K],b+1,d),St&&(Z?Z.push.apply(Z,St):Z=St));return Z}else if(Qt==="**"){for(ye=b+1===d||b+2===d&&Me==="*",ye&&R._listeners&&(Z=W(m,T,R,d,d)),Se=u(R),p=Se.length;p-- >0;)K=Se[p],K!=="_listeners"&&(K==="*"||K==="**"?(R[K]._listeners&&!ye&&(St=W(m,T,R[K],d,d),St&&(Z?Z.push.apply(Z,St):Z=St)),St=W(m,T,R[K],b,d)):K===Me?St=W(m,T,R[K],b+2,d):St=W(m,T,R[K],b,d),St&&(Z?Z.push.apply(Z,St):Z=St));return Z}else R[Qt]&&(Z=W(m,T,R[Qt],b+1,d));if(X=R["*"],X&&W(m,T,X,b+1,d),ve=R["**"],ve)if(b0;)K=Se[p],K!=="_listeners"&&(K===Me?W(m,T,ve[K],b+2,d):K===Qt?W(m,T,ve[K],b+1,d):(ie={},ie[K]=ve[K],W(m,T,{"**":ie},b+1,d)));else ve._listeners?W(m,T,ve,d,d):ve["*"]&&ve["*"]._listeners&&W(m,T,ve["*"],d,d);return Z}function q(m,T,R){var b=0,d=0,_,N=this.delimiter,p=N.length,D;if(typeof m=="string")if((_=m.indexOf(N))!==-1){D=new Array(5);do D[b++]=m.slice(d,_),d=_+p;while((_=m.indexOf(N,d))!==-1);D[b++]=m.slice(d)}else D=[m],b=1;else D=m,b=m.length;if(b>1){for(_=0;_+10&&L._listeners.length>this._maxListeners&&(L._listeners.warned=!0,x.call(this,L._listeners.length,F))):L._listeners=T,!0;return!0}function G(m,T,R,b){for(var d=u(m),_=d.length,N,p,D,L=m._listeners,F;_-- >0;)p=d[_],N=m[p],p==="_listeners"?D=R:D=R?R.concat(p):[p],F=b||typeof p=="symbol",L&&T.push(F?D:D.join(this.delimiter)),typeof N=="object"&&G.call(this,N,T,D,F);return T}function re(m){for(var T=u(m),R=T.length,b,d,_;R-- >0;)d=T[R],b=m[d],b&&(_=!0,d!=="_listeners"&&!re(b)&&delete m[d]);return _}function B(m,T,R){this.emitter=m,this.event=T,this.listener=R}B.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function y(m,T,R){if(R===!0)d=!0;else if(R===!1)b=!0;else{if(!R||typeof R!="object")throw TypeError("options should be an object or true");var b=R.async,d=R.promisify,_=R.nextTick,N=R.objectify}if(b||_||d){var p=T,D=T._origin||T;if(_&&!o)throw Error("process.nextTick is not supported");d===r&&(d=T.constructor.name==="AsyncFunction"),T=function(){var L=arguments,F=this,H=this.event;return d?_?Promise.resolve():new Promise(function(Z){c(Z)}).then(function(){return F.event=H,p.apply(F,L)}):(_?process.nextTick:c)(function(){F.event=H,p.apply(F,L)})},T._async=!0,T._origin=D}return[T,N?new B(this,m,T):this]}function C(m){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,v.call(this,m)}C.EventEmitter2=C,C.prototype.listenTo=function(m,T,R){if(typeof m!="object")throw TypeError("target musts be an object");var b=this;R=A(R,{on:r,off:r,reducers:r},{on:M,off:M,reducers:$});function d(_){if(typeof _!="object")throw TypeError("events must be an object");var N=R.reducers,p=U.call(b,m),D;p===-1?D=new w(b,m,R):D=b._observers[p];for(var L=u(_),F=L.length,H,Z=typeof N=="function",K=0;K0;)d=R[b],(!m||d._target===m)&&(d.unsubscribe(T),_=!0);return _},C.prototype.delimiter=".",C.prototype.setMaxListeners=function(m){m!==r&&(this._maxListeners=m,this._conf||(this._conf={}),this._conf.maxListeners=m)},C.prototype.getMaxListeners=function(){return this._maxListeners},C.prototype.event="",C.prototype.once=function(m,T,R){return this._once(m,T,!1,R)},C.prototype.prependOnceListener=function(m,T,R){return this._once(m,T,!0,R)},C.prototype._once=function(m,T,R,b){return this._many(m,1,T,R,b)},C.prototype.many=function(m,T,R,b){return this._many(m,T,R,!1,b)},C.prototype.prependMany=function(m,T,R,b){return this._many(m,T,R,!0,b)},C.prototype._many=function(m,T,R,b,d){var _=this;if(typeof R!="function")throw new Error("many only accepts instances of Function");function N(){return--T===0&&_.off(m,N),R.apply(this,arguments)}return N._origin=R,this._on(m,N,b,d)},C.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||h.call(this);var m=arguments[0],T,R=this.wildcard,b,d,_,N,p;if(m==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(R&&(T=m,m!=="newListener"&&m!=="removeListener"&&typeof m=="object")){if(d=m.length,a){for(_=0;_3)for(b=new Array(D-1),N=1;N3)for(d=new Array(L-1),p=1;p0&&this._events[m].length>this._maxListeners&&(this._events[m].warned=!0,x.call(this,this._events[m].length,m))):this._events[m]=T,d)},C.prototype.off=function(m,T){if(typeof T!="function")throw new Error("removeListener only takes instances of Function");var R,b=[];if(this.wildcard){var d=typeof m=="string"?m.split(this.delimiter):m.slice();if(b=W.call(this,null,d,this.listenerTree,0),!b)return this}else{if(!this._events[m])return this;R=this._events[m],b.push({_listeners:R})}for(var _=0;_0){for(b=this._all,T=0,R=b.length;T0;)b=T[R[_]],typeof b=="function"?d.push(b):d.push.apply(d,b);return d}else{if(this.wildcard){if(N=this.listenerTree,!N)return[];var p=[],D=typeof m=="string"?m.split(this.delimiter):m.slice();return W.call(this,p,D,N,0),p}return T?(b=T[m],b?typeof b=="function"?[b]:b:[]):[]}},C.prototype.eventNames=function(m){var T=this._events;return this.wildcard?G.call(this,this.listenerTree,[],null,m):T?u(T):[]},C.prototype.listenerCount=function(m){return this.listeners(m).length},C.prototype.hasListeners=function(m){if(this.wildcard){var T=[],R=typeof m=="string"?m.split(this.delimiter):m.slice();return W.call(this,T,R,this.listenerTree,0),T.length>0}var b=this._events,d=this._all;return!!(d&&d.length||b&&(m===r?u(b).length:b[m]))},C.prototype.listenersAny=function(){return this._all?this._all:[]},C.prototype.waitFor=function(m,T){var R=this,b=typeof T;return b==="number"?T={timeout:T}:b==="function"&&(T={filter:T}),T=A(T,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:M,Promise:E}),j(T.Promise,function(d,_,N){function p(){var D=T.filter;if(!(D&&!D.apply(R,arguments)))if(R.off(m,p),T.handleError){var L=arguments[0];L?_(L):d(g.apply(null,arguments).slice(1))}else d(g.apply(null,arguments))}N(function(){R.off(m,p)}),R._on(m,p,!1)},{timeout:T.timeout,overload:T.overload})};function P(m,T,R){R=A(R,{Promise,timeout:0,overload:!1},{Promise:E});var b=R.Promise;return j(b,function(d,_,N){var p;if(typeof m.addEventListener=="function"){p=function(){d(g.apply(null,arguments))},N(function(){m.removeEventListener(T,p)}),m.addEventListener(T,p,{once:!0});return}var D=function(){L&&m.removeListener("error",L),d(g.apply(null,arguments))},L;T!=="error"&&(L=function(F){m.removeListener(T,D),_(F)},m.once("error",L)),N(function(){L&&m.removeListener("error",L),m.removeListener(T,D)}),m.once(T,D)},{timeout:R.timeout,overload:R.overload})}var O=C.prototype;Object.defineProperties(C,{defaultMaxListeners:{get:function(){return O._maxListeners},set:function(m){if(typeof m!="number"||m<0||Number.isNaN(m))throw TypeError("n must be a non-negative number");O._maxListeners=m},enumerable:!0},once:{value:P,writable:!0,configurable:!0}}),Object.defineProperties(O,{_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})()})(Zq);function hn(){return hn=Object.assign?Object.assign.bind():function(t){for(var e=1;e++eG;class fu{constructor(){var e=this;this.pendingMessageRequests=[],this.responseCallbacks=new Map,this.confirmationOnly=!1,this.events=new Ll.EventEmitter2,this.sendAsync=async function(r,n,i){e.state===kn.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:L9(),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):(fe.debug("pushing to pending requests",r),e.pendingMessageRequests.push(r))})},this.waitUntilOpened=async function(r=Mx){let n=!1;return Promise.race([new Promise((i,s)=>{const o=setTimeout(()=>{clearTimeout(o),n||(e.state=kn.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=kn.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===kn.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){fe.debug("MessageProvider, received INIT message",e);const{nonce:l}=e.data;if(!l||l.length==0){fe.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;fe.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)){fe.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 fe.error(l),this.close(),l}this.state=kn.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(f){r.sendMessage(f)});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:[xe(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);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!==kn.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),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!==kn.CLOSED&&(this.state=kn.CLOSED,this.confirmationOnly=!1,this._sessionId=void 0,fe.info("closing wallet and flushing!"),this.pendingMessageRequests.length=0,this.responseCallbacks.forEach(r=>{r(hn({},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 tG(t){return rG.some(e=>e.predicate(t))}const rG=[{name:"Decentraland Exception",predicate:iG},{name:"0x v3 Exception",predicate:sG}],nG=/^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 iG(t){try{const e=ds(t);return nG.test(e)}catch{return!1}}function sG(t){const e=new xr(oG);try{return e.decodeFunctionData("OrderWithHash",t),!0}catch{return!1}}const oG=[{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"}],Pd=Le(`Ethereum Signed Message: +`),$9=t=>cs(t)||Pe(t)?Y(t):Le(t),Yh=t=>{const e=$9(t);return tG(e)?e:je([Pd,Le(String(e.length)),e])},aG=t=>{if(JSON.stringify(t.slice(0,Pd.length))!==JSON.stringify(Pd))return t;const e=t.slice(Pd.length),r=String(e.length).length;let n,i;try{i=Number(ds(e.slice(0,r)))}catch{i=Number(J(e.slice(0,r)))}return i>e.length||!Number.isInteger(i)?n=r-1:n=r,e.slice(n)},$l=async(t,e,r,n)=>new le.reader.OnChainReader(n).isValidSignature(t,e,r),F9=async(t,e,r,n)=>{const i=Yh(e),s=ix(i);return $l(t,s,r,n)},j9=(t,e,r,n)=>$l(t,Vh(e),r,n),J0=()=>window.location.protocol==="chrome-extension:"||window.location.protocol==="moz-extension:",U9=()=>!!navigator.userAgent.match(/UnitySequence/i),z9=t=>t.onChain.deployed&&t.fullyMigrated;class gr{constructor(){}static getInstance(){return typeof window=="object"?gr._instance||(gr._instance={getItem:e=>Promise.resolve(window.localStorage.getItem(e)),setItem:(e,r)=>Promise.resolve(window.localStorage.setItem(e,r)),removeItem:e=>Promise.resolve(window.localStorage.removeItem(e))}):gr._instance||(gr._instance={getItem:e=>Promise.resolve(null),setItem:(e,r)=>Promise.resolve(),removeItem:e=>Promise.resolve()}),this._instance}static use(e){gr._instance=e}}class V9{constructor(e,r){this.def=r,this.key=e}async get(){const e=await gr.getInstance().getItem(this.key);if(e===null)return this.def;try{return JSON.parse(e)}catch(r){console.error(r)}}set(e){e?gr.getInstance().setItem(this.key,JSON.stringify(e)):gr.getInstance().removeItem(this.key)}del(){gr.getInstance().removeItem(this.key)}}const Q6="@sequence.transportSession";class cu{constructor(e){var r=this;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:fe.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=sE(n),r.saveTransportSession({sessionId:n,intent:i,networkId:s})),r.walletRequestHandler.setOpenIntent(i),await r.init();let o;try{if(s){const a=cx(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(!J0()&&l.origin!==r.appOrigin)throw new Error("origin is invalid")}else!r.appOrigin&&l!=null&&l.origin?a.origin=aE(l.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=oE(a.app)),r.walletRequestHandler.setConnectOptions(a),a.networkId?s=a.networkId:s&&(a.networkId=s)}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){fe.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()})}else return r.notifyOpen({sessionId:r._sessionId}),!0;return!0},this.saveTransportSession=n=>{gr.getInstance().setItem(Q6,JSON.stringify(n))},this.getCachedTransportSession=async function(){const n=await gr.getInstance().getItem(Q6);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=>{this.registered&&this.notifyDisconnect(n)}),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(J(n.find(i=>i.isDefaultChain).chainId)))}),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){this.sendMessage({idx:-1,type:Te.DISCONNECT,data:e?{error:e}:null})}notifyAccountsChanged(e,r){this.sendMessage({idx:-1,type:Te.ACCOUNTS_CHANGED,data:e,origin:r})}notifyChainChanged(e){this.sendMessage({idx:-1,type:Te.CHAIN_CHANGED,data:e})}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 fe.warn("isValidInitAck, already in init'd state, so inquiry is invalid."),!1;if(e.type!==Te.INIT)return fe.warn("isValidInitAck, invalid message type, expecting init"),!1;const{sessionId:r,nonce:n}=e.data;return!r||r.length===0||!n||n.length===0?(fe.error("invalid init ack"),!1):r!==this._sessionId||n!==this._initNonce?(fe.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(()=>{fe.warn("transport init timed out"),this._initCallback&&this._initCallback("transport init timed out")},Mx/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 lG{constructor(){const e=new Gp,r=new Gp;e.conn=r,r.conn=e,this.app=e,this.wallet=r}}class Gp{constructor(){this.events=new Ll.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 H9 extends fu{constructor(e){if(super(),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===kn.CLOSED){this.state=kn.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=kn.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 fG extends cu{constructor(e,r){super(e),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)}}class W9{constructor(...e){var r=this;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}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;n{Ra&&(Ra.unregister(),Ra=this),window.addEventListener("message",this.onWindowEvent),Ra=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(),Ra===this&&(Ra=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 lu;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={}),!J0()&&!U9()&&(n.options.origin=window.location.origin)),o.set("intent",rx(n))),i&&o.set("net",`${i}`);let a,l;J0()?(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 f=`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",f)},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){fe.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 cG extends cu{constructor(e){var r;super(e),r=this,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(fe.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)){fe.error("impossible state, init.OK and appOrigin required");return}r.handleMessage(i)},this.getWindowTransportSession=n=>{const i=new lu(n);return{sessionId:i.get("sid"),networkId:i.get("net"),intent:nx(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){fe.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 f=`failed to open to network ${(l=s)==null?void 0:l.networkId}`;fe.error(f),this.notifyClose({message:f}),window.close()}}).catch(a=>{var l;const f=`failed to open to network ${(l=s)==null?void 0:l.networkId}, due to: ${a}`;fe.error(f),this.notifyClose({message:f}),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){fe.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):fe.error("unable to postMessage as parentOrigin is invalid")}}function uG(t){if(t.length===0)throw new Error("No transaction provided");const[e,...r]=t;return hn({},e,{auxiliary:r})}function dG(t){return[t,...t.auxiliary||[]]}const hG=1e4;class G9{constructor(e,r,n){var i=this;this.signerReadyCallbacks=[],this.events=new Ll.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()),o},this.sendAsync=async function(s,o,a){const l={jsonrpc:"2.0",id:s.id,result:null};await i.getAccount();try{var f;if((!i.account||i.account===null)&&!vG.includes(s.method))throw B9;const c=i.account;if(!c)throw new Error("WalletRequestHandler: wallet account is not configured");const u=(f=i.account)==null?void 0:f.provider(a??i.defaultChainId());if(!u)throw new Error(`WalletRequestHandler: wallet provider is not configured for chainId ${a}`);const h=u instanceof ba?u:void 0;switch(s.method){case"net_version":{if(!h)throw new Error("Account provider doesn't support send method");const v=await h.send("net_version",[]);l.result=v;break}case"eth_chainId":{if(!h)throw new Error("Account provider doesn't support send method");const v=await h.send("eth_chainId",[]);l.result=v;break}case"eth_accounts":{const v=c.address;l.result=[v];break}case"eth_getBalance":{const[v,x]=s.params,g=await u.getBalance(v,x);l.result=g.toHexString();break}case"sequence_sign":case"personal_sign":case"eth_sign":{let v;switch(s.method){case"sequence_sign":case"personal_sign":{const[w,A]=s.params;v=w;break}case"eth_sign":{const[w,A]=s.params;v=A;break}}let x="";const g=Yh(v),k=s.method==="sequence_sign";if(i.prompter===null?x=await c.signMessage(g,a??i.defaultChainId(),k?"eip6492":"ignore"):x=await i.prompter.promptSignMessage({chainId:a,message:g,eip6492:k},i.connectOptions),x&&x.length>0)l.result=x;else throw new Error("declined by user");break}case"sequence_signTypedData_v4":case"eth_signTypedData":case"eth_signTypedData_v4":{const[v,x]=s.params;let g;if(typeof x=="string")try{g=JSON.parse(x)}catch(A){console.warn("walletRequestHandler: error parsing typedData",A)}else g=x;if(!g||!g.domain||!g.types||!g.message)throw new Error("invalid typedData object");let k="";const w=s.method==="sequence_signTypedData_v4";if(i.prompter===null?k=await c.signTypedData(g.domain,g.types,g.message,a??i.defaultChainId(),w?"eip6492":"ignore"):k=await i.prompter.promptSignMessage({chainId:a,typedData:g,eip6492:w},i.connectOptions),k&&k.length>0)l.result=k;else throw new Error("declined by user");break}case"eth_sendTransaction":{const v=dG(s.params[0]).map(g=>("gas"in g&&g.gasLimit===void 0&&(g.gasLimit=g.gas,delete g.gas),g));let x="";if(i.prompter===null?x=(await c.sendTransaction(v,a??i.defaultChainId())).hash:x=await i.prompter.promptSendTransaction(v,a,i.connectOptions),x)l.result=x;else throw new Error("declined by user");break}case"eth_signTransaction":{const[v]=s.params;if(xe(v.from)!==c.address)throw new Error("sender address does not match wallet");i.prompter===null?l.result=await c.signTransactions(v,a??i.defaultChainId()):l.result=await i.prompter.promptSignTransaction(v,a,i.connectOptions);break}case"eth_sendRawTransaction":{if(le.transaction.isSignedTransactionBundle(s.params[0])){const v=z.from(s.params[0].chainId).toNumber(),x=await c.relayer(v).relay(s.params[0]);l.result=x.hash}else{const v=await u.sendTransaction(s.params[0]);l.result=v.hash}break}case"eth_getTransactionCount":{const v=xe(s.params[0]),x=s.params[1],g=await u.getTransactionCount(v,x);l.result=z.from(g).toHexString();break}case"eth_blockNumber":{l.result=await u.getBlockNumber();break}case"eth_getBlockByNumber":{l.result=await u.getBlock(s.params[0]);break}case"eth_getBlockByHash":{l.result=await u.getBlock(s.params[0]);break}case"eth_getTransactionByHash":{l.result=await u.getTransaction(s.params[0]);break}case"eth_call":{const[v,x]=s.params;l.result=await u.call(v,x);break}case"eth_getCode":{const[v,x]=s.params;l.result=await u.getCode(v,x);break}case"eth_estimateGas":{const[v]=s.params;l.result=await u.estimateGas(v);break}case"eth_gasPrice":{const v=await u.getGasPrice();l.result=v.toHexString();break}case"wallet_switchEthereumChain":{const[v]=s.params;if(!v.chainId||v.chainId.length===0)throw new Error("invalid chainId");const x=z.from(v.chainId);i.setDefaultChainId(x.toNumber()),l.result=null;break}case"sequence_getWalletContext":{l.result=c.contexts;break}case"sequence_getWalletConfig":{const[v]=s.params;v?l.result=[(await c.status(v)).onChain.config]:l.result=await Promise.all(c.networks.map(async function(x){return(await c.status(x.chainId)).onChain.config}));break}case"sequence_getWalletState":{const[v]=s.params;v?l.result=[Y6(v,await c.status(v))]:l.result=await Promise.all(c.networks.map(async function(x){const g=await c.status(x.chainId);return Y6(x.chainId,g)}));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[v]=s.params;if(!v)throw new Error("invalid request, method argument defaultChainId cannot be empty");i.setDefaultChainId(v),l.result=await i.getNetworks(!0);break}default:{if(!h)throw new Error("Account provider doesn't support send method");const v=await h.send(s.method,s.params);l.result=v}}}catch(c){fe.error(c),l.result=null,l.error=hn({},new Error(c),{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}findNetworkID(e){const r=typeof e=="string"?e.toLowerCase():e,n=this.networks.find(i=>i.name.toLowerCase()===r||i.chainId.toString()===r||i.chainId===r);if(!n)throw new Error(`Network ${e} not found`);return n.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.setAccount(null)}signerReset(){this.account=void 0}signerReady(e=hG){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"};let i;switch(typeof(e==null?void 0:e.networkId)){case"string":try{i=this.findNetworkID(e.networkId)}catch{i=ax(e.networkId)}break;case"number":i=e.networkId;break;default:i=(r=(n=this.prompter)==null?void 0:n.getDefaultChainId())!=null?r:1;break}const s={connected:!0,chainId:z.from(i).toHexString()};if(e&&e.authorize){const o={app:e.app,origin:e.origin,expiry:e.expiry};try{s.proof=await R9(this.account,i,o)}catch(a){return fe.warn(`connect, signAuthorization failed for options: ${JSON.stringify(e)}, due to: ${a.message}`),{connected:!1,chainId:"0x0",error:`signAuthorization failed: ${a.message}`}}}return s.session=await this.walletSession(),s}sendMessageRequest(e){return new Promise(r=>{this.sendAsync(e.data,(n,i)=>{const s=hn({},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=hn({},r);return n.provider=void 0,n.relayer=void 0,n}):this.account.networks:(fe.warn("signer not set: getNetworks is returning an empty list"),[])}walletSession(){if(this.account)return{walletContext:this.account.contexts,accountAddress:this.account.address,networks:this.account.networks.map(e=>hn({},e,{provider:void 0,relayer:void 0}))}}notifyConnect(e,r){var n;if(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")}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",J(n.chainId))}else this.events.emit("chainChanged","0x0")}async notifyWalletContext(){if(!this.account){fe.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:(fe.error("WalletRequestHandler: result for promptConfirmWalletDeploy is not correct"),!1)}return!1}}function Y6(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 vG=["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"],Nx="sequence-extension-message-handler";class yG extends cu{constructor(e,r){super(e),this.runtime=r,this._init=At.OK}register(){this._registered=!0,this.port=this.runtime.connect({name:Nx})}sendMessage(e){fe.info("[ExtensionMessageHandler send]",e),this.port.postMessage(e)}}class K9 extends fu{constructor(e){super(),this.register=()=>{this._registered=!0},e.onConnect.addListener(r=>{r.name===Nx&&(this._init=At.OK,r.onMessage.addListener(n=>{this.handleMessage(n)}))})}sendMessage(e){}unregister(){}openWallet(e,r,n){}closeWallet(){}}class pG extends Ll.EventEmitter2{constructor(e){var r;super(),r=this,this.responseCallbacks=new Map,this._messageIdx=0,this.nextMessageIdx=()=>++this._messageIdx,this.handleMessage=n=>{if(!n.type||!n.data)return;fe.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,f)=>{if(l)s(l);else if(f)i(f);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=e,this.stream.on("data",this.handleMessage)}sendMessage(e){this.stream.writable||console.error("window post message stream is not writable"),this.stream.write(e)}}function J9(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}: ${Rv(i)}`)},console.warn=(...i)=>{n.warnfromjs(`${t}: ${Rv(i)}`)},console.error=(...i)=>{n.errorfromjs(`${t}: ${Rv(i)}`)},window.logsOverriddenForUnreal=!0}}function Rv(t){return t.map(e=>typeof e=="object"?e instanceof Error?e.message:JSON.stringify(e):String(e)).join(" ")}let Ma;class Q9 extends fu{constructor(e){super(),this.register=()=>{var r;J9("dapp"),Ma&&(Ma.unregister(),Ma=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),Ma=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r,n;this._registered=!1,this.closeWallet(),Ma===this&&(Ma=void 0),((r=window.ue)==null||(n=r.sequencewallettransport)==null?void 0:n.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 lu;r&&(s.pathname=r.toLowerCase()),this._init=At.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&o.set("intent",rx(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,n;const i=typeof e!="string"?JSON.stringify(e):e;console.log("Sending message to wallet:",i),(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetowallet(i)}}class gG extends cu{constructor(e){super(e),this.onMessageFromUnreal=r=>{fe.debug("RECEIVED MESSAGE",r),this.handleMessage(r)},this.getUnrealTransportSession=r=>{const n=new lu(r);return{sessionId:n.get("sid"),networkId:n.get("net"),intent:nx(n.get("intent"))}},this._init=At.NIL}async register(e){var r;if(((r=window.ue)==null?void 0:r.sequencewallettransport)===void 0)return;J9("wallet");const{search:n}=new URL(e||window.location.href);let i=this.getUnrealTransportSession(n);if(!!i.sessionId||(i=await this.getCachedTransportSession()),!i){fe.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}`;fe.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}`;fe.error(l),this.notifyClose({message:l}),window.close()})}unregister(){var e,r;((e=window.ue)==null||(r=e.sequencewallettransport)==null?void 0:r.onmessagefromsequencejs)===this.onMessageFromUnreal&&delete window.ue.sequencewallettransport.onmessagefromsequencejs,this._registered=!1}sendMessage(e){var r,n;if(e.type!==Te.INIT&&this._init!==At.OK){fe.error("impossible state, should not be calling postMessage until inited");return}const i=JSON.stringify(e);(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetosequencejs(i)}}class pl extends Vz{static isSequenceProvider(e){return Y9(e)}constructor(e,r){const n=new aa(e,Sn(r));e=n,super(e,"any"),this._sender=n,this._isSequenceProvider=!0,this._defaultChainId=Sn(r)}sendAsync(e,r,n){this._sender.sendAsync(e,r,n)}send(e,r,n){return this._sender.send(e,r,n)}request(e){return this.send(e.method,e.params||[],e.chainId)}getSigner(){return new Ox(this,this._defaultChainId)}async getChainId(){const e=this._defaultChainId;return e||this.send("eth_chainId",[])}getNetworks(){return this.send("sequence_getNetworks",[])}}function Y9(t){const e=t;return e&&e.send!==void 0&&e._isSequenceProvider===!0}class mG extends pl{constructor(e,r){const n=new G9(e,null,r||[]);super(n)}}class Ox extends TW{constructor(e,r){super(),this._providers={},this.provider=e,this.defaultChainId=r}async getAddress(){if(this._address)return this._address;const e=await this.provider.send("eth_accounts",[]);return this._address=e[0],this._index=0,xe(this._address)}signTransaction(e){throw new Error("signTransaction is unsupported, use signTransactions instead")}connect(e){throw new Error("unsupported: cannot alter JSON-RPC Signer connection")}async getProvider(e){if(e){const r=await this.getChainId();if(r!==e)throw new Error(`signer is attempting to access chain ${e}, but is already bound to chain ${r}`)}return this.provider}async getSender(e){return!e||e&&e===this.defaultChainId?this.provider:(this._providers[e]||(this._providers[e]=new pl(new aa(this.provider,e),e)),this._providers[e])}getRelayer(e){throw new Error("TODO")}async getWalletContext(){return this._context||(this._context=await this.provider.send("sequence_getWalletContext",[])),this._context}async getWalletConfig(e){const r=Sn(e)||this.defaultChainId;if(!r)throw new Error("chainId is required");return(await this.provider.send("sequence_getWalletConfig",[r],r))[0]}async getWalletState(e){const r=Sn(e)||this.defaultChainId;if(!r)throw new Error("chainId is required");return(await this.provider.send("sequence_getWalletState",[r],r))[0].status}async getNetworks(){return this._networks||(this._networks=await this.provider.getNetworks()),this._networks}async getSigners(){const e=await this.getNetworks(),r=await this.getWalletConfig(e[0].chainId);if(!r)throw new Error("walletConfig returned zero results for authChainId {authChainId}");return Vr.genericCoderFor(r.version).config.signersOf(r).map(n=>n.address)}async signMessage(e,r,n=!0){const i=await this.getSender(Sn(r)||this.defaultChainId),s=typeof e=="string"?Le(e):e,o=await this.getAddress();return i.send(n?"sequence_sign":"personal_sign",[J(s),o])}async signTypedData(e,r,n,i,s=!0){return this.provider.send(s?"sequence_signTypedData_v4":"eth_signTypedData_v4",[await this.getAddress(),qt.getPayload(e,r,n)],Sn(i)||this.defaultChainId)}async sendTransaction(e,r){const n=await this.getSender(Sn(r)||this.defaultChainId);return this.sendUncheckedTransaction(e,r).then(s=>Fo(()=>n.getTransaction(s).then(o=>{if(o!==null)return n._wrapTransaction(o,s)}),{onceBlock:this.provider}).catch(o=>{throw o.transactionHash=s,o}))}async sendTransactionBatch(e,r){const n=await Lp(e);if(!n||n.length===0)throw new Error("cannot send empty batch");if(n.find(s=>s.wait!==void 0&&s.wait!==null))throw new Error("transaction request expected for sendTransactionBatch, transaction response found");const i=uG(n);return this.sendTransaction(i,r)}signTransactions(e,r){return e=L0(e),this.provider.send("eth_signTransaction",[e],Sn(r)||this.defaultChainId)}sendSignedTransactions(e,r){throw new Error("TODO")}async updateConfig(e){const[r,n]=await this.provider.send("sequence_updateConfig",[e],this.defaultChainId);if(n===null)return[r,void 0];const i=await this.getSender(this.defaultChainId);return[r,i._wrapTransaction(n,n.hash)]}async publishConfig(){const e=await this.getSender(this.defaultChainId),r=await e.send("sequence_publishConfig",[]);if(r!==null)return e._wrapTransaction(r,r.hash)}async isDeployed(e){const n=await(await this.getSender(Sn(e))).getCode(await this.getAddress());return!!n&&n!=="0x"}async _legacySignMessage(e,r){const n=await this.getSender(Sn(r)||this.defaultChainId),i=typeof e=="string"?Le(e):e,s=await this.getAddress();return await n.send("eth_sign",[s,J(i)])}async _signTypedData(e,r,n,i){return this.signTypedData(e,r,n,i)}async sendUncheckedTransaction(e,r){e=L0(e);const n=this.getAddress(),i=await this.getSender(Sn(r)||this.defaultChainId);return kp({tx:kp(e),sender:await n}).then(({tx:s,sender:o})=>{if(s.from!=null){if(xe(s.from)!==o)throw new Error(`from address mismatch for transaction ${e}`)}else s.from=o;const a=X9(s);return i.send("eth_sendTransaction",[a]).then(l=>l,l=>{throw l})})}connectUnchecked(){return new bG(this.provider,this.defaultChainId)}async unlock(e){const r=await this.getAddress();return this.provider.send("personal_unlockAccount",[r,e,null])}}const xG={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,from:!0,auxiliary:!0,expiration:!0,afterNonce:!0,delegateCall:!0,revertOnError:!0},X9=(t,e)=>{const r=L0(xG);if(e)for(const s in e)e[s]&&(r[s]=!0);Mh(t,r);const n={};["gasLimit","gasPrice","nonce","value"].forEach(s=>{const o=t[s];if(o==null)return;const a=Xc(o);s==="gasLimit"&&(s="gas"),n[s]=a}),["from","to","data"].forEach(s=>{t[s]&&(n[s]=J(t[s]))}),["delegateCall","revertOnError"].forEach(s=>{const o=t[s];o!=null&&(n[s]=o)});const i=t.auxiliary;return i&&i.length>0&&(n.auxiliary=[],i.forEach(s=>{n.auxiliary.push(X9(s))})),n};class bG extends Ox{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({chainId:0,confirmations:0,data:"",from:"",gasLimit:ze,gasPrice:ze,hash:r,nonce:0,value:ze,wait:n=>this.provider.waitForTransaction(r,n)}))}}class wG{constructor(e){this.wallet=e}signMessage(e,r,n){const i=this.wallet.getSigner();if(!i)throw new Error("unable to get signer");return i.signMessage(e,r,n)}async signAuthMessage(e,r){const n=this.wallet.getSigner();if(!n)throw new Error("unable to get AuthChain signer");return n.signMessage(e,await n.getChainId(),r)}signTypedData(e,r,n,i,s){const o=this.wallet.getSigner();if(!o)throw new Error("unable to get signer");return o.signTypedData(e,r,n,i,s)}async signAuthTypedData(e,r,n,i){const s=this.wallet.getSigner();if(!s)throw new Error("unable to get AuthChain signer");return s.signTypedData(e,r,n,await s.getChainId(),i)}async isValidSignature(e,r,n,i){const s=this.wallet.getProvider(i);if(!s)throw new Error(`unable to get provider for chainId ${i}`);return $l(e,r,n,s)}async isValidMessageSignature(e,r,n,i){const s=this.wallet.getProvider(i);if(!s)throw new Error(`unable to get provider for chainId ${i}`);const o=Yh(r),a=ix(o);return $l(e,a,n,s)}isValidTypedDataSignature(e,r,n,i){return this.isValidSignature(e,Vh(r),n,i)}}const Id="@sequence.session";class Dx{constructor(e,r){var n=this;this.init=()=>{var i,s,o,a,l,f,c,u,h;this.transport.provider||(this.transport.messageProvider=new W9,(i=this.config.transports)!=null&&(s=i.windowTransport)!=null&&s.enabled&&typeof window=="object"&&(this.transport.windowMessageProvider=new q9(this.config.walletAppURL),this.transport.messageProvider.add(this.transport.windowMessageProvider)),(o=this.config.transports)!=null&&(a=o.proxyTransport)!=null&&a.enabled&&(this.transport.proxyMessageProvider=new H9(this.config.transports.proxyTransport.appPort),this.transport.messageProvider.add(this.transport.proxyMessageProvider)),(l=this.config.transports)!=null&&(f=l.extensionTransport)!=null&&f.enabled&&(this.transport.extensionMessageProvider=new K9(this.config.transports.extensionTransport.runtime),this.transport.messageProvider.add(this.transport.extensionMessageProvider)),(c=this.config.transports)!=null&&(u=c.unrealTransport)!=null&&u.enabled&&(this.transport.unrealMessageProvider=new Q9(this.config.walletAppURL),this.transport.messageProvider.add(this.transport.unrealMessageProvider)),this.transport.messageProvider.register(),this.transport.allowProvider=$0(v=>{if(v.method==="sequence_setDefaultNetwork")return!0;const x=this.isConnected();if(!x)throw new Error("Sequence: wallet not connected");return x}),this.transport.networkProvider=bE(v=>!this.networks||this.networks.length===0?0:Vi(this.networks,this.config.defaultNetworkId).chainId),this.transport.cachedProvider=new F0,this.transport.cachedProvider.onUpdate(()=>{this.session||(this.session={providerCache:{}}),this.session.providerCache=this.transport.cachedProvider.getCache(),this.saveSession(this.session)}),this.transport.router=new Qf([Ed,this.transport.networkProvider,this.transport.allowProvider,Ad,this.transport.cachedProvider],this.transport.messageProvider),this.transport.provider=new pl(this.transport.router,(h=cx(this.config.defaultNetworkId))==null?void 0:h.chainId),this.transport.messageProvider.on("open",v=>{const{session:x}=v;x?this.useSession(x,!0):(this.session&&this.session.accountAddress&&this.transport.messageProvider.emit("disconnect"),this.clearSession())}),this.transport.messageProvider.on("accountsChanged",(v,x)=>{if(x){v.length>0&&this.useSession({accountAddress:v[0]},!0);return}!v||v.length===0||v[0]===""?this.clearSession():this.useSession({accountAddress:v[0]},!0)}),this.transport.messageProvider.on("networks",v=>{this.useSession({networks:v},!0)}),this.transport.messageProvider.on("walletContext",v=>{this.useSession({walletContext:v},!0)}))},this.loadSession=async function(i){const s=await gr.getInstance().getItem(Id);if(!(!s||s===""))try{const a=JSON.parse(s);if(a){if(i!==void 0){var o;const l=typeof i=="string"?parseInt(i):i,f=h=>h.name===i||h.chainId===l,c=(o=a.networks)==null?void 0:o.find(f),u=c==null?void 0:c.isDefaultChain;if(a.networks&&c&&!u){const h=a.networks.map(v=>hn({},v,{isDefaultChain:f(v)}));a.networks=fx(h),a.providerCache=void 0}}n.useSession(a,!0)}return a}catch{fe.warn("loadSession failed, unable to parse session payload from storage.");return}},this.connect=async function(i){if(i&&(i==null?void 0:i.authorizeVersion)===void 0&&(i.authorizeVersion=2),(i==null?void 0:i.refresh)===!0&&n.disconnect(),n.isConnected()&&await n.isSiteConnected(i==null?void 0:i.origin)&&n.session&&!(i!=null&&i.authorize)&&!(i!=null&&i.askForEmail))return{connected:!0,session:n.session,chainId:J(await n.getChainId())};if(i&&i.authorize){if(!i.app)throw new Error("connecting with 'authorize' option also requires 'app' to be set");i.authorizeVersion===void 0&&(i.authorizeVersion=2)}await n.openWallet(void 0,{type:"connect",options:i});const s=await n.transport.messageProvider.waitUntilConnected().catch(o=>o instanceof Error?{connected:!1,error:o.message}:{connected:!1,error:JSON.stringify(o)});if(s.connected)if(s.session)n.useSession(s.session,!0),n.addConnectedSite(i==null?void 0:i.origin);else throw new Error("impossible state, connect response is missing session");return s},this.authorize=async function(i){return n.connect(hn({},i,{authorize:!0}))},this.getSession=()=>{if(this.isConnected())return this.session},this.getAddress=async function(){if(!n.isConnected())throw new Error("connect first");return n.getSession().accountAddress},this.getNetworks=async function(i){if(!n.isConnected()||!n.networks)throw new Error("connect first");if(i){const s=Vi(n.networks,i);return s?[s]:[]}return n.networks},this.getChainId=async function(){if(!n.networks||n.networks.length<1)throw new Error("networks have not been set by session. connect first.");const i=Vi(n.networks,n.config.defaultNetworkId);if(!i)throw new Error("networks must have a default chain specified");return i.chainId},this.openWallet=async function(i,s,o){if((s==null?void 0:s.type)!=="connect"&&!n.isConnected())throw new Error("connect first");let a;return!n.networks||n.networks.length<1?a=n.config.defaultNetworkId:a=await n.getChainId(),n.transport.messageProvider.openWallet(i,s,o||a),await n.transport.messageProvider.waitUntilOpened(),!0},this.closeWallet=()=>{this.transport.messageProvider.closeWallet()},this.unregister=()=>{var i;this.disconnect(),(i=this.transport.messageProvider)==null||i.unregister()},this.saveSession=async function(i){fe.debug("wallet provider: saving session");const s=JSON.stringify(i);await gr.getInstance().setItem(Id,s)},this.useSession=async function(i,s=!0){n.session||(n.session={}),n.config.walletContext?n.session.walletContext=n.config.walletContext:i.walletContext&&(n.session.walletContext=i.walletContext),i.accountAddress&&n.useAccountAddress(i.accountAddress),i.networks&&n.useNetworks(i.networks),i.providerCache?n.transport.cachedProvider.setCache(i.providerCache):n.transport.cachedProvider.clearCache(),s&&n.saveSession(n.session)},this.config=hn({},Z9),r&&(this.config=hn({},this.config,r)),e?this.config.defaultNetworkId=e:this.config.defaultNetworkId||(this.config.defaultNetworkId="mainnet"),r!=null&&r.localStorage&&gr.use(r.localStorage),this.transport={},this.networks=[],this.providers={},this.connectedSites=new V9("@sequence.connectedSites",[]),this.utils=new wG(this),this.init()}async addConnectedSite(e){e=e||window.location.origin;const r=await this.connectedSites.get();if(r){if(r.includes(e))return;this.connectedSites.set([...r,e])}else this.connectedSites.set([e])}async removeConnectedSite(e){const r=await this.connectedSites.get();r&&this.connectedSites.set(r.filter(n=>n!==e))}getConnectedSites(){return this.connectedSites.get()}async isSiteConnected(e){const r=await this.connectedSites.get();return!!r&&r.includes(e||window.location.origin)}disconnect(){return this.isOpened()&&this.closeWallet(),this.clearSession()}getProviderConfig(){return this.config}isOpened(){return this.transport.messageProvider.isOpened()}isConnected(){return this.session!==void 0&&this.session.networks!==void 0&&this.session.networks.length>0&&this.networks!==void 0&&this.networks.length>0&&!!this.session.accountAddress&&this.session.accountAddress.startsWith("0x")}getProvider(e){if(!this.isConnected()){if(e)throw new Error("session is empty. connect and try again.");return this.transport.provider}let r=Vi(this.networks,this.config.defaultNetworkId);if(e&&(r=Vi(this.networks,e),!r))throw new Error(`network ${e} is not in the network list`);if(this.providers[r.chainId])return this.providers[r.chainId];let n;const i=new ba(Dl(r.rpcUrl),r.chainId);if(r.isDefaultChain){const s=new Qf([Ed,Ad,new j0({accountAddress:this.session.accountAddress,walletContext:this.session.walletContext}),new _p(this.transport.provider),this.transport.cachedProvider],new aa(i));n=new pl(s,r.chainId)}else{const s=new Qf([Ed,Ad,new j0({accountAddress:this.session.accountAddress,walletContext:this.session.walletContext,chainId:r.chainId}),new _p(this.transport.provider),new F0({defaultChainId:r.chainId})],new aa(i));n=new pl(s,r.chainId)}return this.providers[r.chainId]=n,n}getAllProviders(){return this.providers}getSigner(e){return this.getProvider(e).getSigner()}getWalletConfig(e){return this.getSigner().getWalletConfig(e)}getWalletState(e){return this.getSigner().getWalletState(e)}getWalletContext(){return this.getSigner().getWalletContext()}isDeployed(e){return this.getSigner(e).isDeployed()}on(e,r){this.transport.messageProvider.on(e,r)}once(e,r){this.transport.messageProvider.once(e,r)}useAccountAddress(e){this.session||(this.session={}),this.session.accountAddress=xe(e)}useNetworks(e){if(this.session||(this.session={}),this.session.networks=e,!(!this.session.networks||this.session.networks.length===0)){if(!this.config.networks&&!this.config.networkRpcUrl){this.networks=e;return}if(this.networks=e,this.config.networks&&(this.networks=e.map(r=>hn({},r)),this.config.networks.forEach(r=>{const n=Vi(this.networks,r.chainId||r.name);n&&cE(r,n)}),lx(this.networks,!0)),this.config.networkRpcUrl){const r=this.networks.find(n=>n.isDefaultChain);r&&(r.rpcUrl=this.config.networkRpcUrl)}}}async clearSession(){var e;fe.debug("wallet provider: clearing session"),await gr.getInstance().removeItem(Id),this.session=void 0,this.networks=[],this.providers={},(e=this.transport.cachedProvider)==null||e.clearCache()}}const Z9={walletAppURL:"https://sequence.app",transports:{windowTransport:{enabled:!0},proxyTransport:{enabled:!1}}};let mi;const eS=async(t,e)=>mi||(mi=new Dx(t,e),await mi.loadSession(t),mi),CG=()=>{mi&&(mi.closeWallet(),mi.unregister())},tS=()=>{if(!mi)throw new Error("Wallet has not been initialized, call sequence.initWallet(network, config) first.");return mi},AG=Object.freeze(Object.defineProperty({__proto__:null,BaseInjectedTransport:pG,BaseProviderTransport:fu,BaseWalletTransport:cu,CHANNEL_ID:Nx,DefaultProviderConfig:Z9,ErrSignedInRequired:B9,EventType:Te,ExtensionMessageHandler:yG,ExtensionMessageProvider:K9,InitState:At,LocalStorage:gr,LocalStore:V9,LocalWeb3Provider:mG,MuxMessageProvider:W9,OpenState:kn,PROVIDER_OPEN_TIMEOUT:Mx,ProviderError:D9,ProxyMessageChannel:lG,ProxyMessageChannelPort:Gp,ProxyMessageHandler:fG,ProxyMessageProvider:H9,SESSION_LOCALSTORE_KEY:Id,UnrealMessageHandler:gG,UnrealMessageProvider:Q9,Wallet:Dx,WalletRequestHandler:G9,Web3Provider:pl,Web3Signer:Ox,WindowMessageHandler:cG,WindowMessageProvider:q9,WindowSessionParams:lu,getWallet:tS,initWallet:eS,isBrowserExtension:J0,isSequenceProvider:Y9,isUnityPlugin:U9,isValidMessageSignature:F9,isValidSignature:$l,isValidTypedDataSignature:j9,isWalletUpToDate:z9,messageToBytes:$9,nextMessageIdx:L9,prefixEIP191Message:Yh,trimEIP191Prefix:aG,unregisterWallet:CG},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 EG=Dr({__proto__:null},[gV]),SG=Dr({__proto__:null},[EV]),kG=Dr({__proto__:null},[$q]),_G=Dr({__proto__:null},[Vq]),TG=Dr({__proto__:null},[Nq]),PG=Dr({__proto__:null},[wq]),IG=Dr({__proto__:null},[Xq]),RG=Dr({__proto__:null},[vH]),MG=Dr({__proto__:null},[AG]),NG=Dr({__proto__:null},[SW]);const OG=le.transaction;var DG=Object.freeze({__proto__:null,transactions:OG}),BG=Dr({__proto__:null,isValidSignature:$l,isValidMessageSignature:F9,isValidTypedDataSignature:j9,isWalletUpToDate:z9},[nH]),LG=Dr({__proto__:null},[iW]),$G=Dr({__proto__:null},[_W]),FG=Dr({__proto__:null},[dq]),jG=Dr({__proto__:null},[cW]),UG=Dr({__proto__:null},[MW]),He=Object.freeze({__proto__:null,abi:EG,api:SG,auth:kG,guard:_G,indexer:TG,metadata:PG,multicall:IG,network:RG,provider:MG,relayer:NG,transactions:DG,utils:BG,core:LG,signhub:$G,sessions:FG,migration:jG,account:UG,initWallet:eS,getWallet:tS,Wallet:Dx});const X6=[{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"}];function Kp(){return Kp=Object.assign?Object.assign.bind():function(t){for(var e=1;eVG.configure(t),WG="/demo-dapp/assets/logo-b757309e.svg",Z6="/demo-dapp/assets/skyweaver-banner-6d47c1d1.png";var qG="_1e9z9271";const GG=({message:t,loading:e})=>ce(vN,{label:"Console",defaultOpen:!0,children:ln(ge,{as:"pre",style:{fontFamily:"monospace",whiteSpace:"break-spaces",overflowWrap:"anywhere"},children:[t,e&&(()=>t?` +...`:"...")(),ce(ge,{className:qG,display:"inline-block",fontSize:"large",lineHeight:"4",style:{top:"-4px",position:"relative"},children:"_"})]})});var KG="_1q07ov40";const So=t=>{const{label:e,children:r,style:n,className:i}=t;return ln(ge,{marginTop:"10",marginBottom:"8",marginX:"0",width:"full",className:i,style:n,children:[e&&ce(ge,{marginBottom:"2",children:ce(JG,{children:e})}),ce(ge,{className:KG,children:Wt.Children.map(r,(s,o)=>ce(ge,{children:s},o))})]})},JG=t=>ce(sr,{variant:"normal",fontWeight:"medium",color:"text50",children:t.children});function er(){return er=Object.assign?Object.assign.bind():function(t){for(var e=1;e{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(f=>f.chainId).sort(),s=i.filter((f,c)=>i.indexOf(f)!==c);if(s.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${s}`);return!1}n.forEach(f=>f.name=f.name.toLowerCase());const o=n.map(f=>f.name).sort(),a=o.filter((f,c)=>o.indexOf(f)!==c);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let f=0;f(QG(t,!0,e),t),XG=t=>YG(ZG(t)),ZG=t=>{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},Bx=(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})):"";let te=function(t){return t[t.MAINNET=1]="MAINNET",t[t.ROPSTEN=3]="ROPSTEN",t[t.RINKEBY=4]="RINKEBY",t[t.GOERLI=5]="GOERLI",t[t.KOVAN=42]="KOVAN",t[t.POLYGON=137]="POLYGON",t[t.POLYGON_MUMBAI=80001]="POLYGON_MUMBAI",t[t.POLYGON_ZKEVM=1101]="POLYGON_ZKEVM",t[t.BSC=56]="BSC",t[t.BSC_TESTNET=97]="BSC_TESTNET",t[t.OPTIMISM=10]="OPTIMISM",t[t.OPTIMISM_TESTNET=69]="OPTIMISM_TESTNET",t[t.ARBITRUM=42161]="ARBITRUM",t[t.ARBITRUM_GOERLI=421613]="ARBITRUM_GOERLI",t[t.ARBITRUM_NOVA=42170]="ARBITRUM_NOVA",t[t.AVALANCHE=43114]="AVALANCHE",t[t.AVALANCHE_TESTNET=43113]="AVALANCHE_TESTNET",t[t.FANTOM=250]="FANTOM",t[t.FANTOM_TESTNET=4002]="FANTOM_TESTNET",t[t.GNOSIS=100]="GNOSIS",t[t.AURORA=1313161554]="AURORA",t[t.AURORA_TESTNET=1313161556]="AURORA_TESTNET",t[t.BASE_GOERLI=84531]="BASE_GOERLI",t[t.HARDHAT=31337]="HARDHAT",t[t.HARDHAT_2=31338]="HARDHAT_2",t}({});const eK=t=>Bx("https://${network}-indexer.sequence.app",{network:t}),tK=t=>Bx("https://${network}-relayer.sequence.app",{network:t}),rK=t=>Bx("https://nodes.sequence.app/${network}",{network:t}),hr={[te.MAINNET]:{chainId:te.MAINNET,name:"mainnet",title:"Ethereum",blockExplorer:{name:"Etherscan",rootUrl:"https://etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[te.ROPSTEN]:{chainId:te.ROPSTEN,name:"ropsten",title:"Ropsten",testnet:!0,blockExplorer:{name:"Etherscan (Ropsten)",rootUrl:"https://ropsten.etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[te.RINKEBY]:{chainId:te.RINKEBY,name:"rinkeby",title:"Rinkeby",testnet:!0,blockExplorer:{name:"Etherscan (Rinkeby)",rootUrl:"https://rinkeby.etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",disabled:!0},[te.GOERLI]:{chainId:te.GOERLI,name:"goerli",title:"Goerli",testnet:!0,blockExplorer:{name:"Etherscan (Goerli)",rootUrl:"https://goerli.etherscan.io/"},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[te.KOVAN]:{chainId:te.KOVAN,name:"kovan",title:"Kovan",testnet:!0,blockExplorer:{name:"Etherscan (Kovan)",rootUrl:"https://kovan.etherscan.io/"}},[te.POLYGON]:{chainId:te.POLYGON,name:"polygon",title:"Polygon",blockExplorer:{name:"Polygonscan",rootUrl:"https://polygonscan.com/"},isDefaultChain:!0,isAuthChain:!0},[te.POLYGON_MUMBAI]:{chainId:te.POLYGON_MUMBAI,name:"mumbai",title:"Polygon Mumbai",testnet:!0,blockExplorer:{name:"Polygonscan (Mumbai)",rootUrl:"https://mumbai.polygonscan.com/"}},[te.POLYGON_ZKEVM]:{chainId:te.POLYGON_ZKEVM,name:"polygon-zkevm",title:"Polygon zkEVM",blockExplorer:{name:"Polygonscan (zkEVM)",rootUrl:"https://zkevm.polygonscan.com/"}},[te.BSC]:{chainId:te.BSC,name:"bsc",title:"BNB Smart Chain",blockExplorer:{name:"BSCScan",rootUrl:"https://bscscan.com/"}},[te.BSC_TESTNET]:{chainId:te.BSC_TESTNET,name:"bsc-testnet",title:"BNB Smart Chain Testnet",testnet:!0,blockExplorer:{name:"BSCScan (Testnet)",rootUrl:"https://testnet.bscscan.com/"}},[te.OPTIMISM]:{chainId:te.OPTIMISM,name:"optimism",title:"Optimism",blockExplorer:{name:"Etherscan (Optimism)",rootUrl:"https://optimistic.etherscan.io/"}},[te.OPTIMISM_TESTNET]:{chainId:te.OPTIMISM_TESTNET,name:"optimism-testnet",title:"Optimistic Kovan",testnet:!0,blockExplorer:{name:"Etherscan (Optimism Testnet)",rootUrl:"https://kovan-optimistic.etherscan.io/"}},[te.ARBITRUM]:{chainId:te.ARBITRUM,name:"arbitrum",title:"Arbitrum One",blockExplorer:{name:"Arbiscan",rootUrl:"https://arbiscan.io/"}},[te.ARBITRUM_GOERLI]:{chainId:te.ARBITRUM_GOERLI,name:"arbitrum-goerli",title:"Arbitrum Goerli",testnet:!0,blockExplorer:{name:"Arbiscan (Testnet)",rootUrl:"https://testnet.arbiscan.io/"}},[te.ARBITRUM_NOVA]:{chainId:te.ARBITRUM_NOVA,name:"arbitrum-nova",title:"Arbitrum Nova",blockExplorer:{name:"Nova Explorer",rootUrl:"https://nova-explorer.arbitrum.io/"}},[te.AVALANCHE]:{chainId:te.AVALANCHE,name:"avalanche",title:"Avalanche",blockExplorer:{name:"Snowtrace",rootUrl:"https://snowtrace.io/"}},[te.AVALANCHE_TESTNET]:{chainId:te.AVALANCHE_TESTNET,name:"avalanche-testnet",title:"Avalanche Testnet",testnet:!0,blockExplorer:{name:"Snowtrace (Testnet)",rootUrl:"https://testnet.snowtrace.io/"}},[te.FANTOM]:{chainId:te.FANTOM,name:"fantom",title:"Fantom",blockExplorer:{name:"FTMScan",rootUrl:"https://ftmscan.com/"}},[te.FANTOM_TESTNET]:{chainId:te.FANTOM_TESTNET,name:"fantom-testnet",title:"Fantom Testnet",testnet:!0,blockExplorer:{name:"FTMScan (Testnet)",rootUrl:"https://testnet.ftmscan.com/"}},[te.GNOSIS]:{chainId:te.GNOSIS,name:"gnosis",title:"Gnosis Chain",blockExplorer:{name:"Gnosis Chain Explorer",rootUrl:"https://blockscout.com/xdai/mainnet/"}},[te.AURORA]:{chainId:te.AURORA,name:"aurora",title:"Aurora",blockExplorer:{name:"Aurora Explorer",rootUrl:"https://aurorascan.dev/"}},[te.AURORA_TESTNET]:{chainId:te.AURORA_TESTNET,name:"aurora-testnet",title:"Aurora Testnet",blockExplorer:{name:"Aurora Explorer (Testnet)",rootUrl:"https://testnet.aurorascan.dev/"}},[te.BASE_GOERLI]:{chainId:te.BASE_GOERLI,name:"base-goerli",title:"Base Goerli",blockExplorer:{name:"Base Goerli Explorer",rootUrl:"https://goerli.basescan.org/"}},[te.HARDHAT]:{chainId:te.HARDHAT,name:"hardhat",title:"Hardhat (local testnet)"},[te.HARDHAT_2]:{chainId:te.HARDHAT_2,name:"hardhat2",title:"Hardhat (local testnet)"}},Lr=t=>{const e=rK(t);return{rpcUrl:e,relayer:{url:tK(t),provider:{url:e}},indexerUrl:eK(t)}};XG([er({},hr[te.MAINNET],Lr("mainnet")),er({},hr[te.POLYGON],Lr("polygon")),er({},hr[te.BSC],Lr("bsc")),er({},hr[te.AVALANCHE],Lr("avalanche")),er({},hr[te.ARBITRUM],Lr("arbitrum")),er({},hr[te.ARBITRUM_NOVA],Lr("arbitrum-nova")),er({},hr[te.OPTIMISM],Lr("optimism")),er({},hr[te.POLYGON_ZKEVM],Lr("polygon-zkevm")),er({},hr[te.GNOSIS],Lr("gnosis")),er({},hr[te.RINKEBY],Lr("rinkeby")),er({},hr[te.GOERLI],Lr("goerli")),er({},hr[te.POLYGON_MUMBAI],Lr("mumbai")),er({},hr[te.BSC_TESTNET],Lr("bsc-testnet")),er({},hr[te.ARBITRUM_GOERLI],Lr("arbitrum-goerli")),er({},hr[te.BASE_GOERLI],Lr("base-goerli")),er({},hr[te.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),er({},hr[te.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]);const Ku="data:image/png;base64,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",e3="data:image/png;base64,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",nK="/demo-dapp/assets/100-cf3a0cbf.png",iK="/demo-dapp/assets/1101-1d0b8ff9.png",t3="data:image/png;base64,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",r3="/demo-dapp/assets/250-2aa72264.png",n3="/demo-dapp/assets/42161-90b816d4.png",sK="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/SURBVHicxVv3Y1RFEJ67JCSXkII5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",i3="data:image/png;base64,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",s3="/demo-dapp/assets/56-06b98271.png",oK={[te.MAINNET]:Ku,[te.ROPSTEN]:Ku,[te.GOERLI]:Ku,[te.KOVAN]:Ku,[te.OPTIMISM]:e3,[te.OPTIMISM_TESTNET]:e3,[te.POLYGON]:t3,[te.POLYGON_MUMBAI]:t3,[te.POLYGON_ZKEVM]:iK,[te.ARBITRUM]:n3,[te.ARBITRUM_NOVA]:sK,[te.ARBITRUM_GOERLI]:n3,[te.GNOSIS]:nK,[te.BSC]:s3,[te.BSC_TESTNET]:s3,[te.FANTOM]:r3,[te.FANTOM_TESTNET]:r3,[te.AVALANCHE]:i3,[te.AVALANCHE_TESTNET]:i3},aK=()=>{const t=window.localStorage.getItem("defaultChainId");return t==null?null:Number(t)},lK=t=>{console.log("huh?",t),window.localStorage.setItem("defaultChainId",`${t}`)};HG({logLevel:"DEBUG"});const fK="https://sequence.app",cK="https://api.sequence.app",oc=aK()||te.MAINNET,rS=new URLSearchParams(window.location.search);let tl=rS.get("walletAppURL");tl&&tl.length>0?He.initWallet(oc,{walletAppURL:tl}):(tl=fK,He.initWallet(oc));const uK=()=>{const[t,e]=S.useState(null),[r,n]=S.useState(!1),[i,s]=S.useState(!1),[o,a]=S.useState(),l=He.getWallet();S.useEffect(()=>{(async()=>{const d=await l.getChainId();a(d)})()},[l]),S.useEffect(()=>{s(l.isConnected())},[l]),S.useEffect(()=>{m()},[i]),S.useEffect(()=>{l.on("disconnect",()=>{console.log("wallet disconnected"),u()})},[l]);const f={app:"Demo Dapp",askForEmail:!0},c=async(d={})=>{if(i){O(),P("Wallet already connected!"),n(!1);return}d={...f,...d,settings:{...f.settings,...d.settings}};try{O(),P("Connecting");const _=He.getWallet(),N=await _.connect(d);if(d.authorize){let p=rS.get("apiUrl");(!p||p.length===0)&&(p=cK);const D=new He.api.SequenceAPIClient(p),{isValid:L}=await D.isValidETHAuthProof({chainId:oc.toString(),walletAddress:N.session.accountAddress,ethAuthProofString:N.proof.proofString});P(`isValid (API)?: ${L}`)}if(d.authorize){const p=new D0;if(N.proof){const D=await p.decodeProof(N.proof.proofString,!0),L=await _.utils.isValidTypedDataSignature(await _.getAddress(),N.proof.typedData,D.signature,z.from(N.chainId).toNumber());P(`isValid (client)?: ${L}`)}}n(!1),N.connected?(a(await _.getChainId()),P("Wallet connected!"),s(!0)):P("Failed to connect wallet - "+N.error)}catch(_){console.error(_),T()}},u=()=>{He.getWallet().disconnect(),m(),s(!1)},h=()=>{He.getWallet().openWallet()},v=()=>{const d=He.getWallet(),N={type:"openWithOptions",options:{settings:{theme:"light",includedPaymentProviders:["moonpay","ramp","wyre"],defaultFundingCurrency:"eth",defaultPurchaseAmount:400,lockFundingCurrencyToDefault:!1}}},p="wallet/add-funds";d.openWallet(p,N)},x=()=>{He.getWallet().closeWallet()},g=async()=>{O();const d=He.getWallet();P(`isConnected?: ${d.isConnected()}`),n(!1)},k=async()=>{O();const d=He.getWallet();P(`isOpened?: ${d.isOpened()}`),n(!1)},w=async()=>{try{O(),P(`selected chainId: ${o}`);const d=await l.getChainId();P(`top chainId: ${d}`);const N=await l.getProvider(o).getChainId();P(`provider.getChainId(): ${N}`);const D=await l.getSigner(o).getChainId();P(`signer.getChainId(): ${D}`),n(!1)}catch(d){console.error(d),T()}},A=async()=>{try{O();const d=He.getWallet(),_=await d.getAddress();P(`getAddress(): ${_}`);const p=await d.getProvider(o).listAccounts();P(`accounts: ${JSON.stringify(p)}`),n(!1)}catch(d){console.error(d),T()}},E=async()=>{try{O();const d=He.getWallet(),_=d.getProvider(o),N=await d.getAddress(),p=await _.getBalance(N);P(`balance check 1: ${p.toString()}`);const L=await d.getSigner(o).getBalance();P(`balance check 2: ${L.toString()}`),n(!1)}catch(d){console.error(d),T()}},I=async()=>{try{O();const d=await l.getSigner(o).getWalletState();P(`wallet state: ${JSON.stringify(d)}`),n(!1)}catch(d){console.error(d),T()}},M=async()=>{try{O();const _=await He.getWallet().getNetworks();P(`networks: ${JSON.stringify(_,null,2)}`),n(!1)}catch(d){console.error(d),T()}},$=async()=>{try{O();const d=He.getWallet();P("signing message...");const _=d.getSigner(o),N=`1915 Robert Frost The Road Not Taken Two roads diverged in a yellow wood, @@ -160,6 +160,6 @@ Two roads diverged in a wood, and I— I took the one less traveled by, And that has made all the difference. -☁ ☀ ☂`,p=await _.signMessage(N);P(`signature: ${p}`);const B=await d.utils.isValidMessageSignature(await d.getAddress(),N,p,await _.getChainId());if(P(`isValid?: ${B}`),!B)throw new Error("sig invalid");n(!1)}catch(d){console.error(d),T()}},j=async()=>{try{O();const d=He.getWallet();P("signing typedData...");const _={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"]}},N=d.getSigner(o),p=await N.signTypedData(_.domain,_.types,_.message);P(`signature: ${p}`);const B=await d.utils.isValidTypedDataSignature(await d.getAddress(),_,p,await N.getChainId());P(`isValid?: ${B}`),n(!1)}catch(d){console.error(d),T()}},U=async()=>{try{O();const d=He.getWallet(),_="0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",N=new xr(["function withdraw(uint256 amount)"]),p={to:_,data:N.encodeFunctionData("withdraw",["1000000000000000000"])},L=await d.getProvider(o).estimateGas(p);P(`estimated gas needed for wmatic withdrawal : ${L.toString()}`),n(!1)}catch(d){console.error(d),T()}},W=async d=>{try{O();const _=He.getWallet();d=d||_.getSigner(o),P(`Transfer txn on ${d.getChainId()} chainId`);const N=await d.getAddress(),p={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:N,value:xp("1.234"),data:"0x"},B={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:N,value:xp("0.4242"),data:"0x"},L=d.provider,F=await L.getBalance(N);P(`balance of ${N}, before: ${F}`);const H=await d.sendTransactionBatch([p,B]);P(`txnResponse: ${JSON.stringify(H)}`);const Z=await L.getBalance(N);P(`balance of ${N}, after: ${Z}`),n(!1)}catch(_){console.error(_),T()}},q=async d=>{try{O();const _=He.getWallet();d=d||_.getSigner(o);const N=m6.createRandom().address,p=M0("1",1),L={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x07865c6e87b9f70255377e024ace6630c1eaa37f",value:0,data:new xr(X6).encodeFunctionData("transfer",[N,p.toHexString()])},F=await d.sendTransactionBatch([L],te.GOERLI);P(`txnResponse: ${JSON.stringify(F)}`),n(!1)}catch(_){console.error(_),T()}},G=async d=>{try{O();const _=He.getWallet();d=d||_.getSigner(o);const N=m6.createRandom().address,p=M0("0.05",18),L={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",value:0,data:new xr(X6).encodeFunctionData("transfer",[N,p.toHexString()])},F=await d.sendTransactionBatch([L]);P(`txnResponse: ${JSON.stringify(F)}`),n(!1)}catch(_){console.error(_),T()}},re=async()=>{try{const d=He.getWallet(),_=o===te.ARBITRUM?te.OPTIMISM:te.ARBITRUM;W(d.getSigner(_))}catch(d){console.error(d),T()}},D=async()=>{try{O(),P("TODO"),n(!1)}catch(d){console.error(d),T()}},y=async d=>{try{O();const _=He.getWallet();d=d||_.getSigner(o);const N=["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)"],p="0x2791bca1f2de4661ed88a30c99a7a9449aa84174",B=new Xl(p,N,d),L=await B.symbol();P(`Token symbol: ${L}`);const F=await B.balanceOf(await d.getAddress());P(`Token Balance: ${F.toString()}`),n(!1)}catch(_){console.error(_),T()}},C=async()=>{try{O();const N=await He.getWallet().getSigner(o).getAddress(),p=new He.indexer.SequenceIndexerClient(He.indexer.SequenceIndexerServices.POLYGON),B=await p.getTokenBalances({accountAddress:N,includeMetadata:!0});P(`tokens in your account: ${JSON.stringify(B)}`);const L=await p.getTokenBalances({accountAddress:N,includeMetadata:!0,contractAddress:"0x631998e91476DA5B870D741192fc5Cbc55F5a52E"});P(`skyweaver collectibles in your account: ${JSON.stringify(L)}`),n(!1)}catch(d){console.error(d),T()}},P=(d,_=!1)=>(console.log(d),e(_?d:N=>`${N} +☁ ☀ ☂`,p=await _.signMessage(N);P(`signature: ${p}`);const D=await d.utils.isValidMessageSignature(await d.getAddress(),N,p,await _.getChainId());if(P(`isValid?: ${D}`),!D)throw new Error("sig invalid");n(!1)}catch(d){console.error(d),T()}},j=async()=>{try{O();const d=He.getWallet();P("signing typedData...");const _={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"]}},N=d.getSigner(o),p=await N.signTypedData(_.domain,_.types,_.message);P(`signature: ${p}`);const D=await d.utils.isValidTypedDataSignature(await d.getAddress(),_,p,await N.getChainId());P(`isValid?: ${D}`),n(!1)}catch(d){console.error(d),T()}},U=async()=>{try{O();const d=He.getWallet(),_="0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",N=new xr(["function withdraw(uint256 amount)"]),p={to:_,data:N.encodeFunctionData("withdraw",["1000000000000000000"])},L=await d.getProvider(o).estimateGas(p);P(`estimated gas needed for wmatic withdrawal : ${L.toString()}`),n(!1)}catch(d){console.error(d),T()}},W=async d=>{try{O();const _=He.getWallet();d=d||_.getSigner(o),P(`Transfer txn on ${d.getChainId()} chainId`);const N=await d.getAddress(),p={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:N,value:bp("1.234"),data:"0x"},D={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:N,value:bp("0.4242"),data:"0x"},L=d.provider,F=await L.getBalance(N);P(`balance of ${N}, before: ${F}`);const H=await d.sendTransactionBatch([p,D]);P(`txnResponse: ${JSON.stringify(H)}`);const Z=await L.getBalance(N);P(`balance of ${N}, after: ${Z}`),n(!1)}catch(_){console.error(_),T()}},q=async d=>{try{O();const _=He.getWallet();d=d||_.getSigner(o);const N=m6.createRandom().address,p=N0("1",1),L={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x07865c6e87b9f70255377e024ace6630c1eaa37f",value:0,data:new xr(X6).encodeFunctionData("transfer",[N,p.toHexString()])},F=await d.sendTransactionBatch([L],te.GOERLI);P(`txnResponse: ${JSON.stringify(F)}`),n(!1)}catch(_){console.error(_),T()}},G=async d=>{try{O();const _=He.getWallet();d=d||_.getSigner(o);const N=m6.createRandom().address,p=N0("0.05",18),L={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",value:0,data:new xr(X6).encodeFunctionData("transfer",[N,p.toHexString()])},F=await d.sendTransactionBatch([L]);P(`txnResponse: ${JSON.stringify(F)}`),n(!1)}catch(_){console.error(_),T()}},re=async()=>{try{const d=He.getWallet(),_=o===te.ARBITRUM?te.OPTIMISM:te.ARBITRUM;W(d.getSigner(_))}catch(d){console.error(d),T()}},B=async()=>{try{O(),P("TODO"),n(!1)}catch(d){console.error(d),T()}},y=async d=>{try{O();const _=He.getWallet();d=d||_.getSigner(o);const N=["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)"],p="0x2791bca1f2de4661ed88a30c99a7a9449aa84174",D=new Zl(p,N,d),L=await D.symbol();P(`Token symbol: ${L}`);const F=await D.balanceOf(await d.getAddress());P(`Token Balance: ${F.toString()}`),n(!1)}catch(_){console.error(_),T()}},C=async()=>{try{O();const N=await He.getWallet().getSigner(o).getAddress(),p=new He.indexer.SequenceIndexerClient(He.indexer.SequenceIndexerServices.POLYGON),D=await p.getTokenBalances({accountAddress:N,includeMetadata:!0});P(`tokens in your account: ${JSON.stringify(D)}`);const L=await p.getTokenBalances({accountAddress:N,includeMetadata:!0,contractAddress:"0x631998e91476DA5B870D741192fc5Cbc55F5a52E"});P(`skyweaver collectibles in your account: ${JSON.stringify(L)}`),n(!1)}catch(d){console.error(d),T()}},P=(d,_=!1)=>(console.log(d),e(_?d:N=>`${N} -${d}`)),O=()=>{n(!0)},m=()=>{n(!1),e(i?"Status: Wallet is connected :)":"Status: Wallet not connected. Please connect wallet first.")},T=()=>{n(!1),e("An error occurred")};S.useEffect(()=>{o!==void 0&&(sc!==o&&!l.isConnected()?(aK(o),window.location.reload()):console.log("switching network to:",o))},[o]);const R=[te.RINKEBY,te.HARDHAT,te.HARDHAT_2,te.KOVAN,te.FANTOM,te.FANTOM_TESTNET,te.ROPSTEN,te.AURORA,te.AURORA_TESTNET],b=Object.values(He.network.networks).filter(d=>R.indexOf(d.chainId)<0).sort((d,_)=>d.title>_.title?1:-1);return ln(ge,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[ce(ge,{marginBottom:"10",children:ce("a",{href:"https://sequence.xyz/",target:"_blank",rel:"noopener",children:ce(MC,{height:"6",alt:"logo",src:HG})})}),ce(ge,{children:ce(sr,{variant:"normal",color:"text100",fontWeight:"bold",children:"Demo Dapp"})}),ce(ge,{marginTop:"1",marginBottom:"4",children:ce(sr,{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."})}),ln(xM,{background:"backgroundMuted",alignItems:"center",gap:"3",children:[ce(GM,{}),ce(sr,{variant:"normal",color:"text80",children:"Please open your browser dev inspector to view output of functions below."})]}),ce(ew,{background:"buttonGlass"}),ln(ge,{marginBottom:"4",children:[ce(sr,{as:"div",variant:"small",color:"text100",children:"Wallet URL"}),ce("a",{href:Kp,target:"_blank",rel:"noopener",children:ln(ge,{gap:"1",marginTop:"1",alignItems:"center",children:[ce(sr,{as:"div",variant:"normal",color:"text80",children:Kp}),ce(VM,{})]})})]}),ce(ew,{background:"buttonGlass"}),ce(ge,{marginBottom:"4",children:ce(nL,{name:"chainId",label:"Network",labelLocation:"top",onValueChange:d=>a(Number(d)),defaultValue:String(sc),options:[...Object.values(b).map(d=>({label:ln(ge,{alignItems:"center",gap:"2",children:[ce(BL,{src:sK[d.chainId],size:"sm"}),ce(sr,{children:d.title})]}),value:String(d.chainId)}))]})}),ln(So,{label:"Connection",children:[ce(Ve,{width:"full",shape:"square",onClick:()=>c(),label:"Connect"}),ce(Ve,{width:"full",shape:"square",onClick:()=>c({authorize:!0}),label:"Connect & Auth"}),ce(Ve,{width:"full",shape:"square",onClick:()=>c({authorize:!0,settings:{theme:"dark",bannerUrl:`${window.location.origin}${Z6}`,includedPaymentProviders:["moonpay"],defaultFundingCurrency:"matic",defaultPurchaseAmount:111}}),label:"Connect with Settings"}),ce(Ve,{width:"full",shape:"square",onClick:()=>{const d=prompt("Auto-email login, please specify the email address:");c({authorize:!0,settings:{signInWithEmail:d,theme:"dark",bannerUrl:`${window.location.origin}${Z6}`}})},label:"Connect with Email"}),ce(Ve,{width:"full",shape:"square",onClick:()=>u(),label:"Disconnect"})]}),ln(So,{label:"Basics",children:[ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>h(),label:"Open Wallet"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>v(),label:"Open Wallet with Settings"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>x(),label:"Close Wallet"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>g(),label:"Is Connected?"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>k(),label:"Is Opened?"})]}),ln(So,{label:"State",children:[ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>w(),label:"ChainID"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>M(),label:"Networks"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>A(),label:"Get Accounts"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>E(),label:"Get Balance"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>I(),label:"Get Wallet State"})]}),ln(So,{label:"Signing",children:[ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>$(),label:"Sign Message"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>j(),label:"Sign TypedData"})]}),ce(So,{label:"Simulation",children:ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>U(),label:"Estimate Unwrap Gas"})}),ln(So,{label:"Transactions",children:[ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>W(),label:"Send funds"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>re(),label:"Send on L2"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>G(),label:"Send DAI"}),ce(Ve,{width:"full",shape:"square",disabled:!i||!0,onClick:()=>D(),label:"Send ERC-1155 Tokens"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>q(),label:"Send USDC on Goerli"})]}),ln(So,{label:"Various",children:[ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>y(),label:"Read Symbol and Balance"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>C(),label:"Fetch Token Balances"})]}),ce(qG,{message:t,loading:r})]})},fK=Wt.memo(lK),Kp={}.VITE_WALLET_APP_URL||"https://sequence.app";He.initWallet(sc,{walletAppURL:Kp});const cK=n7(document.getElementById("root"));cK.render(ce(Wt.StrictMode,{children:ce(RL,{children:ce(fK,{})})})); +${d}`)),O=()=>{n(!0)},m=()=>{n(!1),e(i?"Status: Wallet is connected :)":"Status: Wallet not connected. Please connect wallet first.")},T=()=>{n(!1),e("An error occurred")};S.useEffect(()=>{o!==void 0&&(oc!==o&&!l.isConnected()?(lK(o),window.location.reload()):console.log("switching network to:",o))},[o]);const R=[te.RINKEBY,te.HARDHAT,te.HARDHAT_2,te.KOVAN,te.FANTOM,te.FANTOM_TESTNET,te.ROPSTEN,te.AURORA,te.AURORA_TESTNET],b=Object.values(He.network.networks).filter(d=>R.indexOf(d.chainId)<0).sort((d,_)=>d.title>_.title?1:-1);return ln(ge,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[ce(ge,{marginBottom:"10",children:ce("a",{href:"https://sequence.xyz/",target:"_blank",rel:"noopener",children:ce(MC,{height:"6",alt:"logo",src:WG})})}),ce(ge,{children:ce(sr,{variant:"normal",color:"text100",fontWeight:"bold",children:"Demo Dapp"})}),ce(ge,{marginTop:"1",marginBottom:"4",children:ce(sr,{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."})}),ln(bM,{background:"backgroundMuted",alignItems:"center",gap:"3",children:[ce(KM,{}),ce(sr,{variant:"normal",color:"text80",children:"Please open your browser dev inspector to view output of functions below."})]}),ce(ew,{background:"buttonGlass"}),ln(ge,{marginBottom:"4",children:[ce(sr,{as:"div",variant:"small",color:"text100",children:"Wallet URL"}),ce("a",{href:tl,target:"_blank",rel:"noopener",children:ln(ge,{gap:"1",marginTop:"1",alignItems:"center",children:[ce(sr,{as:"div",variant:"normal",color:"text80",children:tl}),ce(HM,{})]})})]}),ce(ew,{background:"buttonGlass"}),ce(ge,{marginBottom:"4",children:ce(iL,{name:"chainId",label:"Network",labelLocation:"top",onValueChange:d=>a(Number(d)),defaultValue:String(oc),options:[...Object.values(b).map(d=>({label:ln(ge,{alignItems:"center",gap:"2",children:[ce(BL,{src:oK[d.chainId],size:"sm"}),ce(sr,{children:d.title})]}),value:String(d.chainId)}))]})}),ln(So,{label:"Connection",children:[ce(Ve,{width:"full",shape:"square",onClick:()=>c(),label:"Connect"}),ce(Ve,{width:"full",shape:"square",onClick:()=>c({authorize:!0}),label:"Connect & Auth"}),ce(Ve,{width:"full",shape:"square",onClick:()=>c({authorize:!0,settings:{theme:"dark",bannerUrl:`${window.location.origin}${Z6}`,includedPaymentProviders:["moonpay"],defaultFundingCurrency:"matic",defaultPurchaseAmount:111}}),label:"Connect with Settings"}),ce(Ve,{width:"full",shape:"square",onClick:()=>{const d=prompt("Auto-email login, please specify the email address:");c({authorize:!0,settings:{signInWithEmail:d,theme:"dark",bannerUrl:`${window.location.origin}${Z6}`}})},label:"Connect with Email"}),ce(Ve,{width:"full",shape:"square",onClick:()=>u(),label:"Disconnect"})]}),ln(So,{label:"Basics",children:[ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>h(),label:"Open Wallet"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>v(),label:"Open Wallet with Settings"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>x(),label:"Close Wallet"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>g(),label:"Is Connected?"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>k(),label:"Is Opened?"})]}),ln(So,{label:"State",children:[ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>w(),label:"ChainID"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>M(),label:"Networks"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>A(),label:"Get Accounts"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>E(),label:"Get Balance"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>I(),label:"Get Wallet State"})]}),ln(So,{label:"Signing",children:[ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>$(),label:"Sign Message"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>j(),label:"Sign TypedData"})]}),ce(So,{label:"Simulation",children:ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>U(),label:"Estimate Unwrap Gas"})}),ln(So,{label:"Transactions",children:[ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>W(),label:"Send funds"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>re(),label:"Send on L2"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>G(),label:"Send DAI"}),ce(Ve,{width:"full",shape:"square",disabled:!i||!0,onClick:()=>B(),label:"Send ERC-1155 Tokens"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>q(),label:"Send USDC on Goerli"})]}),ln(So,{label:"Various",children:[ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>y(),label:"Read Symbol and Balance"}),ce(Ve,{width:"full",shape:"square",disabled:!i,onClick:()=>C(),label:"Fetch Token Balances"})]}),ce(GG,{message:t,loading:r})]})},dK=Wt.memo(uK),hK=nA(document.getElementById("root"));hK.render(ce(Wt.StrictMode,{children:ce(ML,{children:ce(dK,{})})})); diff --git a/index.html b/index.html index a001781..58bf07a 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 - +