diff --git a/assets/index-7d9b1bb6.js b/assets/index-3997330c.js similarity index 65% rename from assets/index-7d9b1bb6.js rename to assets/index-3997330c.js index b392d35..ab477ec 100644 --- a/assets/index-7d9b1bb6.js +++ b/assets/index-3997330c.js @@ -1,4 +1,4 @@ -function yk(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 mk=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ro(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function EP(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var gk={exports:{}},T0={},xk={exports:{}},ze={};/** +function mk(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 gk=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ro(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function AP(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var xk={exports:{}},P0={},bk={exports:{}},ze={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function yk(t,e){for(var r=0;r>>1,g=P[E];if(0>>1;E<_;){var B=2*(E+1)-1,k=P[B],$=B+1,V=P[$];if(0>i(k,L))$i(V,k)?(P[E]=V,P[$]=L,E=$):(P[E]=k,P[B]=L,E=B);else if($i(V,L))P[E]=V,P[$]=L,E=$;else break e}}return O}function i(P,O){var L=P.sortIndex-O.sortIndex;return L!==0?L:P.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],f=1,u=null,d=3,h=!1,p=!1,m=!1,x=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(P){for(var O=r(c);O!==null;){if(O.callback===null)n(c);else if(O.startTime<=P)n(c),O.sortIndex=O.expirationTime,e(l,O);else break;O=r(c)}}function R(P){if(m=!1,A(P),!p)if(r(l)!==null)p=!0,S(N);else{var O=r(c);O!==null&&C(R,O.startTime-P)}}function N(P,O){p=!1,m&&(m=!1,b(j),j=-1),h=!0;var L=d;try{for(A(O),u=r(l);u!==null&&(!(u.expirationTime>O)||P&&!J());){var E=u.callback;if(typeof E=="function"){u.callback=null,d=u.priorityLevel;var g=E(u.expirationTime<=O);O=t.unstable_now(),typeof g=="function"?u.callback=g:u===r(l)&&n(l),A(O)}else n(l);u=r(l)}if(u!==null)var _=!0;else{var B=r(c);B!==null&&C(R,B.startTime-O),_=!1}return _}finally{u=null,d=L,h=!1}}var I=!1,F=null,j=-1,U=5,Y=-1;function J(){return!(t.unstable_now()-YP||125E?(P.sortIndex=L,e(c,P),r(l)===null&&P===r(c)&&(m?(b(j),j=-1):m=!0,C(R,L-E))):(P.sortIndex=g,e(l,P),p||h||(p=!0,S(N))),P},t.unstable_shouldYield=J,t.unstable_wrapCallback=function(P){var O=d;return function(){var L=d;d=O;try{return P.apply(this,arguments)}finally{d=L}}}})(Ok);Ik.exports=Ok;var qP=Ik.exports;/** + */(function(t){function e(P,O){var L=P.length;P.push(O);e:for(;0>>1,g=P[A];if(0>>1;A<_;){var B=2*(A+1)-1,k=P[B],$=B+1,V=P[$];if(0>i(k,L))$i(V,k)?(P[A]=V,P[$]=L,A=$):(P[A]=k,P[B]=L,A=B);else if($i(V,L))P[A]=V,P[$]=L,A=$;else break e}}return O}function i(P,O){var L=P.sortIndex-O.sortIndex;return L!==0?L:P.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],f=1,u=null,d=3,h=!1,p=!1,m=!1,x=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,w=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(P){for(var O=r(c);O!==null;){if(O.callback===null)n(c);else if(O.startTime<=P)n(c),O.sortIndex=O.expirationTime,e(l,O);else break;O=r(c)}}function R(P){if(m=!1,E(P),!p)if(r(l)!==null)p=!0,S(N);else{var O=r(c);O!==null&&C(R,O.startTime-P)}}function N(P,O){p=!1,m&&(m=!1,b(j),j=-1),h=!0;var L=d;try{for(E(O),u=r(l);u!==null&&(!(u.expirationTime>O)||P&&!J());){var A=u.callback;if(typeof A=="function"){u.callback=null,d=u.priorityLevel;var g=A(u.expirationTime<=O);O=t.unstable_now(),typeof g=="function"?u.callback=g:u===r(l)&&n(l),E(O)}else n(l);u=r(l)}if(u!==null)var _=!0;else{var B=r(c);B!==null&&C(R,B.startTime-O),_=!1}return _}finally{u=null,d=L,h=!1}}var I=!1,F=null,j=-1,U=5,K=-1;function J(){return!(t.unstable_now()-KP||125A?(P.sortIndex=L,e(c,P),r(l)===null&&P===r(c)&&(m?(b(j),j=-1):m=!0,C(R,L-A))):(P.sortIndex=g,e(l,P),p||h||(p=!0,S(N))),P},t.unstable_shouldYield=J,t.unstable_wrapCallback=function(P){var O=d;return function(){var L=d;d=O;try{return P.apply(this,arguments)}finally{d=L}}}})(Mk);Ok.exports=Mk;var HP=Ok.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ function yk(t,e){for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ap=Object.prototype.hasOwnProperty,GP=/^[: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]*$/,Tw={},Pw={};function KP(t){return Ap.call(Pw,t)?!0:Ap.call(Tw,t)?!1:GP.test(t)?Pw[t]=!0:(Tw[t]=!0,!1)}function YP(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 QP(t,e,r,n){if(e===null||typeof e>"u"||YP(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 bn(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 Kr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Kr[t]=new bn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Kr[e]=new bn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Kr[t]=new bn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Kr[t]=new bn(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){Kr[t]=new bn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Kr[t]=new bn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Kr[t]=new bn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Kr[t]=new bn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Kr[t]=new bn(t,5,!1,t.toLowerCase(),null,!1,!1)});var Im=/[\-:]([a-z])/g;function Om(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(Im,Om);Kr[e]=new bn(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(Im,Om);Kr[e]=new bn(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(Im,Om);Kr[e]=new bn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Kr[t]=new bn(t,1,!1,t.toLowerCase(),null,!1,!1)});Kr.xlinkHref=new bn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Kr[t]=new bn(t,1,!1,t.toLowerCase(),null,!0,!0)});function Mm(t,e,r,n){var i=Kr.hasOwnProperty(e)?Kr[e]:null;(i!==null?i.type!==0:n||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ap=Object.prototype.hasOwnProperty,GP=/^[: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]*$/,Tw={},Pw={};function KP(t){return Ap.call(Pw,t)?!0:Ap.call(Tw,t)?!1:GP.test(t)?Pw[t]=!0:(Tw[t]=!0,!1)}function YP(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 QP(t,e,r,n){if(e===null||typeof e>"u"||YP(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 bn(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 Kr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Kr[t]=new bn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Kr[e]=new bn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Kr[t]=new bn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Kr[t]=new bn(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){Kr[t]=new bn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Kr[t]=new bn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Kr[t]=new bn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Kr[t]=new bn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Kr[t]=new bn(t,5,!1,t.toLowerCase(),null,!1,!1)});var Om=/[\-:]([a-z])/g;function Mm(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(Om,Mm);Kr[e]=new bn(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(Om,Mm);Kr[e]=new bn(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(Om,Mm);Kr[e]=new bn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Kr[t]=new bn(t,1,!1,t.toLowerCase(),null,!1,!1)});Kr.xlinkHref=new bn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Kr[t]=new bn(t,1,!1,t.toLowerCase(),null,!0,!0)});function Nm(t,e,r,n){var i=Kr.hasOwnProperty(e)?Kr[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{Fv=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?sf(t):""}function JP(t){switch(t.tag){case 5:return sf(t.type);case 16:return sf("Lazy");case 13:return sf("Suspense");case 19:return sf("SuspenseList");case 0:case 2:case 15:return t=Bv(t.type,!1),t;case 11:return t=Bv(t.type.render,!1),t;case 1:return t=Bv(t.type,!0),t;default:return""}}function kp(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 xl:return"Fragment";case gl:return"Portal";case Ep:return"Profiler";case Nm:return"StrictMode";case Sp:return"Suspense";case Cp:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Dk:return(t.displayName||"Context")+".Consumer";case Nk:return(t._context.displayName||"Context")+".Provider";case Dm:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Lm:return e=t.displayName||null,e!==null?e:kp(t.type)||"Memo";case bo:e=t._payload,t=t._init;try{return kp(t(e))}catch{}}return null}function XP(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 kp(e);case 8:return e===Nm?"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 Vo(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function jk(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function ZP(t){var e=jk(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 Yu(t){t._valueTracker||(t._valueTracker=ZP(t))}function Fk(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=jk(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function gh(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 Tp(t,e){var r=e.checked;return nr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function _w(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Vo(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 Bk(t,e){e=e.checked,e!=null&&Mm(t,"checked",e,!1)}function Pp(t,e){Bk(t,e);var r=Vo(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")?Rp(t,e.type,r):e.hasOwnProperty("defaultValue")&&Rp(t,e.type,Vo(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Iw(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 Rp(t,e,r){(e!=="number"||gh(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var of=Array.isArray;function jl(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=Qu.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Df(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var vf={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},eR=["Webkit","ms","Moz","O"];Object.keys(vf).forEach(function(t){eR.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),vf[e]=vf[t]})});function Vk(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||vf.hasOwnProperty(t)&&vf[t]?(""+e).trim():e+"px"}function Hk(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=Vk(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var tR=nr({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 Op(t,e){if(e){if(tR[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ue(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ue(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ue(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ue(62))}}function Mp(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 Np=null;function jm(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Dp=null,Fl=null,Bl=null;function Nw(t){if(t=Pu(t)){if(typeof Dp!="function")throw Error(ue(280));var e=t.stateNode;e&&(e=O0(e),Dp(t.stateNode,t.type,e))}}function qk(t){Fl?Bl?Bl.push(t):Bl=[t]:Fl=t}function Wk(){if(Fl){var t=Fl,e=Bl;if(Bl=Fl=null,Nw(t),e)for(t=0;t>>=0,t===0?32:31-(dR(t)/hR|0)|0}var Ju=64,Xu=4194304;function af(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 Ah(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=af(a):(s&=o,s!==0&&(n=af(s)))}else o=r&~i,o!==0?n=af(o):s!==0&&(n=af(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 ku(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Ni(e),t[e]=r}function mR(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=yf),Vw=String.fromCharCode(32),Hw=!1;function d3(t,e){switch(t){case"keyup":return qR.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function h3(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var bl=!1;function GR(t,e){switch(t){case"compositionend":return h3(e);case"keypress":return e.which!==32?null:(Hw=!0,Vw);case"textInput":return t=e.data,t===Vw&&Hw?null:t;default:return null}}function KR(t,e){if(bl)return t==="compositionend"||!qm&&d3(t,e)?(t=f3(),Vd=zm=To=null,bl=!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=Kw(r)}}function m3(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?m3(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function g3(){for(var t=window,e=gh();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=gh(t.document)}return e}function Wm(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function n_(t){var e=g3(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&m3(r.ownerDocument.documentElement,r)){if(n!==null&&Wm(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=Yw(r,s);var o=Yw(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,wl=null,Up=null,gf=null,zp=!1;function Qw(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;zp||wl==null||wl!==gh(n)||(n=wl,"selectionStart"in n&&Wm(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}),gf&&Uf(gf,n)||(gf=n,n=Ch(Up,"onSelect"),0Sl||(t.current=Kp[Sl],Kp[Sl]=null,Sl--)}function zt(t,e){Sl++,Kp[Sl]=t.current,t.current=e}var Ho={},an=ta(Ho),kn=ta(!1),La=Ho;function Xl(t,e){var r=t.type.contextTypes;if(!r)return Ho;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 Th(){Wt(kn),Wt(an)}function n2(t,e,r){if(an.current!==Ho)throw Error(ue(168));zt(an,e),zt(kn,r)}function T3(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(ue(108,XP(t)||"Unknown",i));return nr({},r,n)}function Ph(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Ho,La=an.current,zt(an,t),zt(kn,kn.current),!0}function i2(t,e,r){var n=t.stateNode;if(!n)throw Error(ue(169));r?(t=T3(t,e,La),n.__reactInternalMemoizedMergedChildContext=t,Wt(kn),Wt(an),zt(an,t)):Wt(kn),zt(kn,r)}var Os=null,M0=!1,Zv=!1;function P3(t){Os===null?Os=[t]:Os.push(t)}function p_(t){M0=!0,P3(t)}function ra(){if(!Zv&&Os!==null){Zv=!0;var t=0,e=pt;try{var r=Os;for(pt=1;t>=o,i-=o,js=1<<32-Ni(e)+i|r<j?(U=F,F=null):U=F.sibling;var Y=d(b,F,A[j],R);if(Y===null){F===null&&(F=U);break}t&&F&&Y.alternate===null&&e(b,F),w=s(Y,w,j),I===null?N=Y:I.sibling=Y,I=Y,F=U}if(j===A.length)return r(b,F),Yt&&da(b,j),N;if(F===null){for(;jj?(U=F,F=null):U=F.sibling;var J=d(b,F,Y.value,R);if(J===null){F===null&&(F=U);break}t&&F&&J.alternate===null&&e(b,F),w=s(J,w,j),I===null?N=J:I.sibling=J,I=J,F=U}if(Y.done)return r(b,F),Yt&&da(b,j),N;if(F===null){for(;!Y.done;j++,Y=A.next())Y=u(b,Y.value,R),Y!==null&&(w=s(Y,w,j),I===null?N=Y:I.sibling=Y,I=Y);return Yt&&da(b,j),N}for(F=n(b,F);!Y.done;j++,Y=A.next())Y=h(F,b,j,Y.value,R),Y!==null&&(t&&Y.alternate!==null&&F.delete(Y.key===null?j:Y.key),w=s(Y,w,j),I===null?N=Y:I.sibling=Y,I=Y);return t&&F.forEach(function(Z){return e(b,Z)}),Yt&&da(b,j),N}function x(b,w,A,R){if(typeof A=="object"&&A!==null&&A.type===xl&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case Ku:e:{for(var N=A.key,I=w;I!==null;){if(I.key===N){if(N=A.type,N===xl){if(I.tag===7){r(b,I.sibling),w=i(I,A.props.children),w.return=b,b=w;break e}}else if(I.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===bo&&a2(N)===I.type){r(b,I.sibling),w=i(I,A.props),w.ref=$c(b,I,A),w.return=b,b=w;break e}r(b,I);break}else e(b,I);I=I.sibling}A.type===xl?(w=Ra(A.props.children,b.mode,R,A.key),w.return=b,b=w):(R=Jd(A.type,A.key,A.props,null,b.mode,R),R.ref=$c(b,w,A),R.return=b,b=R)}return o(b);case gl:e:{for(I=A.key;w!==null;){if(w.key===I)if(w.tag===4&&w.stateNode.containerInfo===A.containerInfo&&w.stateNode.implementation===A.implementation){r(b,w.sibling),w=i(w,A.children||[]),w.return=b,b=w;break e}else{r(b,w);break}else e(b,w);w=w.sibling}w=a1(A,b.mode,R),w.return=b,b=w}return o(b);case bo:return I=A._init,x(b,w,I(A._payload),R)}if(of(A))return p(b,w,A,R);if(Dc(A))return m(b,w,A,R);sd(b,A)}return typeof A=="string"&&A!==""||typeof A=="number"?(A=""+A,w!==null&&w.tag===6?(r(b,w.sibling),w=i(w,A),w.return=b,b=w):(r(b,w),w=o1(A,b.mode,R),w.return=b,b=w),o(b)):r(b,w)}return x}var ec=O3(!0),M3=O3(!1),Ih=ta(null),Oh=null,Tl=null,Qm=null;function Jm(){Qm=Tl=Oh=null}function Xm(t){var e=Ih.current;Wt(Ih),t._currentValue=e}function Jp(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function Ul(t,e){Oh=t,Qm=Tl=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Cn=!0),t.firstContext=null)}function pi(t){var e=t._currentValue;if(Qm!==t)if(t={context:t,memoizedValue:e,next:null},Tl===null){if(Oh===null)throw Error(ue(308));Tl=t,Oh.dependencies={lanes:0,firstContext:t}}else Tl=Tl.next=t;return e}var ba=null;function Zm(t){ba===null?ba=[t]:ba.push(t)}function N3(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,Zm(e)):(r.next=i.next,i.next=r),e.interleaved=r,Gs(t,n)}function Gs(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var wo=!1;function eg(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function D3(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Us(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function No(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,et&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,Gs(t,r)}return i=n.interleaved,i===null?(e.next=e,Zm(n)):(e.next=i.next,i.next=e),n.interleaved=e,Gs(t,r)}function qd(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Bm(t,r)}}function l2(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=o:s=s.next=o,r=r.next}while(r!==null);s===null?i=s=e:s=s.next=e}else i=s=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Mh(t,e,r,n){var i=t.updateQueue;wo=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var f=t.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==o&&(a===null?f.firstBaseUpdate=c:a.next=c,f.lastBaseUpdate=l))}if(s!==null){var u=i.baseState;o=0,f=c=l=null,a=s;do{var d=a.lane,h=a.eventTime;if((n&d)===d){f!==null&&(f=f.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=t,m=a;switch(d=e,h=r,m.tag){case 1:if(p=m.payload,typeof p=="function"){u=p.call(h,u,d);break e}u=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=m.payload,d=typeof p=="function"?p.call(h,u,d):p,d==null)break e;u=nr({},u,d);break e;case 2:wo=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(c=f=h,l=u):f=f.next=h,o|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(1);if(f===null&&(l=u),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=f,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);Ba|=o,t.lanes=o,t.memoizedState=u}}function c2(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;er?r:4,t(!0);var n=t1.transition;t1.transition={};try{t(!1),e()}finally{pt=r,t1.transition=n}}function X3(){return yi().memoizedState}function x_(t,e,r){var n=Lo(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Z3(t))e4(e,r);else if(r=N3(t,e,r,n),r!==null){var i=gn();Di(r,t,n,i),t4(r,e,n)}}function b_(t,e,r){var n=Lo(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Z3(t))e4(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,Fi(a,o)){var l=e.interleaved;l===null?(i.next=i,Zm(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=N3(t,e,i,n),r!==null&&(i=gn(),Di(r,t,n,i),t4(r,e,n))}}function Z3(t){var e=t.alternate;return t===rr||e!==null&&e===rr}function e4(t,e){xf=Dh=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function t4(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Bm(t,r)}}var Lh={readContext:pi,useCallback:Zr,useContext:Zr,useEffect:Zr,useImperativeHandle:Zr,useInsertionEffect:Zr,useLayoutEffect:Zr,useMemo:Zr,useReducer:Zr,useRef:Zr,useState:Zr,useDebugValue:Zr,useDeferredValue:Zr,useTransition:Zr,useMutableSource:Zr,useSyncExternalStore:Zr,useId:Zr,unstable_isNewReconciler:!1},w_={readContext:pi,useCallback:function(t,e){return Qi().memoizedState=[t,e===void 0?null:e],t},useContext:pi,useEffect:u2,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Gd(4194308,4,G3.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Gd(4194308,4,t,e)},useInsertionEffect:function(t,e){return Gd(4,2,t,e)},useMemo:function(t,e){var r=Qi();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Qi();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=x_.bind(null,rr,t),[n.memoizedState,t]},useRef:function(t){var e=Qi();return t={current:t},e.memoizedState=t},useState:f2,useDebugValue:lg,useDeferredValue:function(t){return Qi().memoizedState=t},useTransition:function(){var t=f2(!1),e=t[0];return t=g_.bind(null,t[1]),Qi().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=rr,i=Qi();if(Yt){if(r===void 0)throw Error(ue(407));r=r()}else{if(r=e(),$r===null)throw Error(ue(349));Fa&30||B3(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,u2(U3.bind(null,n,s,t),[t]),n.flags|=2048,Yf(9,$3.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=Qi(),e=$r.identifierPrefix;if(Yt){var r=Fs,n=js;r=(n&~(1<<32-Ni(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Gf++,0")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{Bv=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?sf(t):""}function JP(t){switch(t.tag){case 5:return sf(t.type);case 16:return sf("Lazy");case 13:return sf("Suspense");case 19:return sf("SuspenseList");case 0:case 2:case 15:return t=$v(t.type,!1),t;case 11:return t=$v(t.type.render,!1),t;case 1:return t=$v(t.type,!0),t;default:return""}}function Tp(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 xl:return"Fragment";case gl:return"Portal";case Sp:return"Profiler";case Dm:return"StrictMode";case Cp:return"Suspense";case kp:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Lk:return(t.displayName||"Context")+".Consumer";case Dk:return(t._context.displayName||"Context")+".Provider";case Lm:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case jm:return e=t.displayName||null,e!==null?e:Tp(t.type)||"Memo";case bo:e=t._payload,t=t._init;try{return Tp(t(e))}catch{}}return null}function XP(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 Tp(e);case 8:return e===Dm?"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 Vo(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Fk(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function ZP(t){var e=Fk(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 Yu(t){t._valueTracker||(t._valueTracker=ZP(t))}function Bk(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=Fk(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function gh(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 Pp(t,e){var r=e.checked;return nr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function _w(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Vo(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 $k(t,e){e=e.checked,e!=null&&Nm(t,"checked",e,!1)}function Rp(t,e){$k(t,e);var r=Vo(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")?_p(t,e.type,r):e.hasOwnProperty("defaultValue")&&_p(t,e.type,Vo(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Iw(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 _p(t,e,r){(e!=="number"||gh(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var of=Array.isArray;function jl(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=Qu.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Df(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var vf={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},eR=["Webkit","ms","Moz","O"];Object.keys(vf).forEach(function(t){eR.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),vf[e]=vf[t]})});function qk(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||vf.hasOwnProperty(t)&&vf[t]?(""+e).trim():e+"px"}function Hk(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=qk(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var tR=nr({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 Mp(t,e){if(e){if(tR[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ue(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ue(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ue(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ue(62))}}function Np(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 Dp=null;function Fm(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Lp=null,Fl=null,Bl=null;function Nw(t){if(t=Pu(t)){if(typeof Lp!="function")throw Error(ue(280));var e=t.stateNode;e&&(e=M0(e),Lp(t.stateNode,t.type,e))}}function Wk(t){Fl?Bl?Bl.push(t):Bl=[t]:Fl=t}function Gk(){if(Fl){var t=Fl,e=Bl;if(Bl=Fl=null,Nw(t),e)for(t=0;t>>=0,t===0?32:31-(dR(t)/hR|0)|0}var Ju=64,Xu=4194304;function af(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 Eh(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=af(a):(s&=o,s!==0&&(n=af(s)))}else o=r&~i,o!==0?n=af(o):s!==0&&(n=af(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 ku(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Di(e),t[e]=r}function mR(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=yf),Vw=String.fromCharCode(32),qw=!1;function h3(t,e){switch(t){case"keyup":return HR.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function v3(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var bl=!1;function GR(t,e){switch(t){case"compositionend":return v3(e);case"keypress":return e.which!==32?null:(qw=!0,Vw);case"textInput":return t=e.data,t===Vw&&qw?null:t;default:return null}}function KR(t,e){if(bl)return t==="compositionend"||!Wm&&h3(t,e)?(t=u3(),Vd=Vm=To=null,bl=!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=Kw(r)}}function g3(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?g3(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function x3(){for(var t=window,e=gh();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=gh(t.document)}return e}function Gm(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function n_(t){var e=x3(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&g3(r.ownerDocument.documentElement,r)){if(n!==null&&Gm(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=Yw(r,s);var o=Yw(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,wl=null,zp=null,gf=null,Vp=!1;function Qw(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Vp||wl==null||wl!==gh(n)||(n=wl,"selectionStart"in n&&Gm(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}),gf&&Uf(gf,n)||(gf=n,n=Ch(zp,"onSelect"),0Sl||(t.current=Yp[Sl],Yp[Sl]=null,Sl--)}function zt(t,e){Sl++,Yp[Sl]=t.current,t.current=e}var qo={},an=ta(qo),kn=ta(!1),La=qo;function Xl(t,e){var r=t.type.contextTypes;if(!r)return qo;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 Th(){Wt(kn),Wt(an)}function n2(t,e,r){if(an.current!==qo)throw Error(ue(168));zt(an,e),zt(kn,r)}function P3(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(ue(108,XP(t)||"Unknown",i));return nr({},r,n)}function Ph(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||qo,La=an.current,zt(an,t),zt(kn,kn.current),!0}function i2(t,e,r){var n=t.stateNode;if(!n)throw Error(ue(169));r?(t=P3(t,e,La),n.__reactInternalMemoizedMergedChildContext=t,Wt(kn),Wt(an),zt(an,t)):Wt(kn),zt(kn,r)}var Os=null,N0=!1,e1=!1;function R3(t){Os===null?Os=[t]:Os.push(t)}function p_(t){N0=!0,R3(t)}function ra(){if(!e1&&Os!==null){e1=!0;var t=0,e=pt;try{var r=Os;for(pt=1;t>=o,i-=o,js=1<<32-Di(e)+i|r<j?(U=F,F=null):U=F.sibling;var K=d(b,F,E[j],R);if(K===null){F===null&&(F=U);break}t&&F&&K.alternate===null&&e(b,F),w=s(K,w,j),I===null?N=K:I.sibling=K,I=K,F=U}if(j===E.length)return r(b,F),Yt&&da(b,j),N;if(F===null){for(;jj?(U=F,F=null):U=F.sibling;var J=d(b,F,K.value,R);if(J===null){F===null&&(F=U);break}t&&F&&J.alternate===null&&e(b,F),w=s(J,w,j),I===null?N=J:I.sibling=J,I=J,F=U}if(K.done)return r(b,F),Yt&&da(b,j),N;if(F===null){for(;!K.done;j++,K=E.next())K=u(b,K.value,R),K!==null&&(w=s(K,w,j),I===null?N=K:I.sibling=K,I=K);return Yt&&da(b,j),N}for(F=n(b,F);!K.done;j++,K=E.next())K=h(F,b,j,K.value,R),K!==null&&(t&&K.alternate!==null&&F.delete(K.key===null?j:K.key),w=s(K,w,j),I===null?N=K:I.sibling=K,I=K);return t&&F.forEach(function(Z){return e(b,Z)}),Yt&&da(b,j),N}function x(b,w,E,R){if(typeof E=="object"&&E!==null&&E.type===xl&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case Ku:e:{for(var N=E.key,I=w;I!==null;){if(I.key===N){if(N=E.type,N===xl){if(I.tag===7){r(b,I.sibling),w=i(I,E.props.children),w.return=b,b=w;break e}}else if(I.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===bo&&a2(N)===I.type){r(b,I.sibling),w=i(I,E.props),w.ref=$c(b,I,E),w.return=b,b=w;break e}r(b,I);break}else e(b,I);I=I.sibling}E.type===xl?(w=Ra(E.props.children,b.mode,R,E.key),w.return=b,b=w):(R=Jd(E.type,E.key,E.props,null,b.mode,R),R.ref=$c(b,w,E),R.return=b,b=R)}return o(b);case gl:e:{for(I=E.key;w!==null;){if(w.key===I)if(w.tag===4&&w.stateNode.containerInfo===E.containerInfo&&w.stateNode.implementation===E.implementation){r(b,w.sibling),w=i(w,E.children||[]),w.return=b,b=w;break e}else{r(b,w);break}else e(b,w);w=w.sibling}w=l1(E,b.mode,R),w.return=b,b=w}return o(b);case bo:return I=E._init,x(b,w,I(E._payload),R)}if(of(E))return p(b,w,E,R);if(Dc(E))return m(b,w,E,R);sd(b,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,w!==null&&w.tag===6?(r(b,w.sibling),w=i(w,E),w.return=b,b=w):(r(b,w),w=a1(E,b.mode,R),w.return=b,b=w),o(b)):r(b,w)}return x}var ec=M3(!0),N3=M3(!1),Ih=ta(null),Oh=null,Tl=null,Jm=null;function Xm(){Jm=Tl=Oh=null}function Zm(t){var e=Ih.current;Wt(Ih),t._currentValue=e}function Xp(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function Ul(t,e){Oh=t,Jm=Tl=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Cn=!0),t.firstContext=null)}function yi(t){var e=t._currentValue;if(Jm!==t)if(t={context:t,memoizedValue:e,next:null},Tl===null){if(Oh===null)throw Error(ue(308));Tl=t,Oh.dependencies={lanes:0,firstContext:t}}else Tl=Tl.next=t;return e}var ba=null;function eg(t){ba===null?ba=[t]:ba.push(t)}function D3(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,eg(e)):(r.next=i.next,i.next=r),e.interleaved=r,Gs(t,n)}function Gs(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var wo=!1;function tg(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function L3(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Us(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function No(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,et&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,Gs(t,r)}return i=n.interleaved,i===null?(e.next=e,eg(n)):(e.next=i.next,i.next=e),n.interleaved=e,Gs(t,r)}function Hd(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,$m(t,r)}}function l2(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=o:s=s.next=o,r=r.next}while(r!==null);s===null?i=s=e:s=s.next=e}else i=s=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Mh(t,e,r,n){var i=t.updateQueue;wo=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var f=t.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==o&&(a===null?f.firstBaseUpdate=c:a.next=c,f.lastBaseUpdate=l))}if(s!==null){var u=i.baseState;o=0,f=c=l=null,a=s;do{var d=a.lane,h=a.eventTime;if((n&d)===d){f!==null&&(f=f.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=t,m=a;switch(d=e,h=r,m.tag){case 1:if(p=m.payload,typeof p=="function"){u=p.call(h,u,d);break e}u=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=m.payload,d=typeof p=="function"?p.call(h,u,d):p,d==null)break e;u=nr({},u,d);break e;case 2:wo=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(c=f=h,l=u):f=f.next=h,o|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(1);if(f===null&&(l=u),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=f,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);Ba|=o,t.lanes=o,t.memoizedState=u}}function c2(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;er?r:4,t(!0);var n=r1.transition;r1.transition={};try{t(!1),e()}finally{pt=r,r1.transition=n}}function Z3(){return mi().memoizedState}function x_(t,e,r){var n=Lo(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},e4(t))t4(e,r);else if(r=D3(t,e,r,n),r!==null){var i=gn();Li(r,t,n,i),r4(r,e,n)}}function b_(t,e,r){var n=Lo(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(e4(t))t4(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,Bi(a,o)){var l=e.interleaved;l===null?(i.next=i,eg(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=D3(t,e,i,n),r!==null&&(i=gn(),Li(r,t,n,i),r4(r,e,n))}}function e4(t){var e=t.alternate;return t===rr||e!==null&&e===rr}function t4(t,e){xf=Dh=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function r4(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,$m(t,r)}}var Lh={readContext:yi,useCallback:Zr,useContext:Zr,useEffect:Zr,useImperativeHandle:Zr,useInsertionEffect:Zr,useLayoutEffect:Zr,useMemo:Zr,useReducer:Zr,useRef:Zr,useState:Zr,useDebugValue:Zr,useDeferredValue:Zr,useTransition:Zr,useMutableSource:Zr,useSyncExternalStore:Zr,useId:Zr,unstable_isNewReconciler:!1},w_={readContext:yi,useCallback:function(t,e){return Qi().memoizedState=[t,e===void 0?null:e],t},useContext:yi,useEffect:u2,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Gd(4194308,4,K3.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Gd(4194308,4,t,e)},useInsertionEffect:function(t,e){return Gd(4,2,t,e)},useMemo:function(t,e){var r=Qi();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Qi();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=x_.bind(null,rr,t),[n.memoizedState,t]},useRef:function(t){var e=Qi();return t={current:t},e.memoizedState=t},useState:f2,useDebugValue:cg,useDeferredValue:function(t){return Qi().memoizedState=t},useTransition:function(){var t=f2(!1),e=t[0];return t=g_.bind(null,t[1]),Qi().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=rr,i=Qi();if(Yt){if(r===void 0)throw Error(ue(407));r=r()}else{if(r=e(),$r===null)throw Error(ue(349));Fa&30||$3(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,u2(z3.bind(null,n,s,t),[t]),n.flags|=2048,Yf(9,U3.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=Qi(),e=$r.identifierPrefix;if(Yt){var r=Fs,n=js;r=(n&~(1<<32-Di(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Gf++,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[es]=e,t[Hf]=n,u4(t,e,!1,!1),e.stateNode=t;e:{switch(o=Mp(r,n),r){case"dialog":qt("cancel",t),qt("close",t),i=n;break;case"iframe":case"object":case"embed":qt("load",t),i=n;break;case"video":case"audio":for(i=0;inc&&(e.flags|=128,n=!0,Uc(s,!1),e.lanes=4194304)}else{if(!n)if(t=Nh(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Uc(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Yt)return en(e),null}else 2*br()-s.renderingStartTime>nc&&r!==1073741824&&(e.flags|=128,n=!0,Uc(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=br(),e.sibling=null,r=Zt.current,zt(Zt,n?r&1|2:r&1),e):(en(e),null);case 22:case 23:return vg(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?Ln&1073741824&&(en(e),e.subtreeFlags&6&&(e.flags|=8192)):en(e),null;case 24:return null;case 25:return null}throw Error(ue(156,e.tag))}function R_(t,e){switch(Km(e),e.tag){case 1:return Tn(e.type)&&Th(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return tc(),Wt(kn),Wt(an),ng(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return rg(e),null;case 13:if(Wt(Zt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ue(340));Zl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Wt(Zt),null;case 4:return tc(),null;case 10:return Xm(e.type._context),null;case 22:case 23:return vg(),null;case 24:return null;default:return null}}var ad=!1,rn=!1,__=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Pl(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ar(t,e,n)}else r.current=null}function oy(t,e,r){try{r()}catch(n){ar(t,e,n)}}var A2=!1;function I_(t,e){if(Vp=Eh,t=g3(),Wm(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,c=0,f=0,u=t,d=null;t:for(;;){for(var h;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),(h=u.firstChild)!==null;)d=u,u=h;for(;;){if(u===t)break t;if(d===r&&++c===i&&(a=o),d===s&&++f===n&&(l=o),(h=u.nextSibling)!==null)break;u=d,d=u.parentNode}u=h}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Hp={focusedElem:t,selectionRange:r},Eh=!1,xe=e;xe!==null;)if(e=xe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,xe=t;else for(;xe!==null;){e=xe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,x=p.memoizedState,b=e.stateNode,w=b.getSnapshotBeforeUpdate(e.elementType===e.type?m:Ti(e.type,m),x);b.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var A=e.stateNode.containerInfo;A.nodeType===1?A.textContent="":A.nodeType===9&&A.documentElement&&A.removeChild(A.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ue(163))}}catch(R){ar(e,e.return,R)}if(t=e.sibling,t!==null){t.return=e.return,xe=t;break}xe=e.return}return p=A2,A2=!1,p}function bf(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&&oy(e,r,s)}i=i.next}while(i!==n)}}function L0(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 ay(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 v4(t){var e=t.alternate;e!==null&&(t.alternate=null,v4(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[es],delete e[Hf],delete e[Gp],delete e[h_],delete e[v_])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function p4(t){return t.tag===5||t.tag===3||t.tag===4}function E2(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||p4(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 ly(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=kh));else if(n!==4&&(t=t.child,t!==null))for(ly(t,e,r),t=t.sibling;t!==null;)ly(t,e,r),t=t.sibling}function cy(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(cy(t,e,r),t=t.sibling;t!==null;)cy(t,e,r),t=t.sibling}var Wr=null,Ri=!1;function uo(t,e,r){for(r=r.child;r!==null;)y4(t,e,r),r=r.sibling}function y4(t,e,r){if(ls&&typeof ls.onCommitFiberUnmount=="function")try{ls.onCommitFiberUnmount(P0,r)}catch{}switch(r.tag){case 5:rn||Pl(r,e);case 6:var n=Wr,i=Ri;Wr=null,uo(t,e,r),Wr=n,Ri=i,Wr!==null&&(Ri?(t=Wr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Wr.removeChild(r.stateNode));break;case 18:Wr!==null&&(Ri?(t=Wr,r=r.stateNode,t.nodeType===8?Xv(t.parentNode,r):t.nodeType===1&&Xv(t,r),Bf(t)):Xv(Wr,r.stateNode));break;case 4:n=Wr,i=Ri,Wr=r.stateNode.containerInfo,Ri=!0,uo(t,e,r),Wr=n,Ri=i;break;case 0:case 11:case 14:case 15:if(!rn&&(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)&&oy(r,e,o),i=i.next}while(i!==n)}uo(t,e,r);break;case 1:if(!rn&&(Pl(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){ar(r,e,a)}uo(t,e,r);break;case 21:uo(t,e,r);break;case 22:r.mode&1?(rn=(n=rn)||r.memoizedState!==null,uo(t,e,r),rn=n):uo(t,e,r);break;default:uo(t,e,r)}}function S2(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new __),e.forEach(function(n){var i=$_.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Ai(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~s}if(n=i,n=br()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*M_(n/1960))-n,10t?16:t,Po===null)var n=!1;else{if(t=Po,Po=null,Bh=0,et&6)throw Error(ue(331));var i=et;for(et|=4,xe=t.current;xe!==null;){var s=xe,o=s.child;if(xe.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lbr()-dg?Pa(t,0):ug|=r),Pn(t,e)}function S4(t,e){e===0&&(t.mode&1?(e=Xu,Xu<<=1,!(Xu&130023424)&&(Xu=4194304)):e=1);var r=gn();t=Gs(t,e),t!==null&&(ku(t,e,r),Pn(t,r))}function B_(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),S4(t,r)}function $_(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(ue(314))}n!==null&&n.delete(e),S4(t,r)}var C4;C4=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||kn.current)Cn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Cn=!1,T_(t,e,r);Cn=!!(t.flags&131072)}else Cn=!1,Yt&&e.flags&1048576&&R3(e,_h,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Kd(t,e),t=e.pendingProps;var i=Xl(e,an.current);Ul(e,r),i=sg(null,e,n,t,i,r);var s=og();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,Ph(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,eg(e),i.updater=D0,e.stateNode=i,i._reactInternals=e,Zp(e,n,t,r),e=ry(null,e,n,!0,s,r)):(e.tag=0,Yt&&s&&Gm(e),yn(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Kd(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=z_(n),t=Ti(n,t),i){case 0:e=ty(null,e,n,t,r);break e;case 1:e=x2(null,e,n,t,r);break e;case 11:e=m2(null,e,n,t,r);break e;case 14:e=g2(null,e,n,Ti(n.type,t),r);break e}throw Error(ue(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ti(n,i),ty(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ti(n,i),x2(t,e,n,i,r);case 3:e:{if(l4(e),t===null)throw Error(ue(387));n=e.pendingProps,s=e.memoizedState,i=s.element,D3(t,e),Mh(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=rc(Error(ue(423)),e),e=b2(t,e,n,r,i);break e}else if(n!==i){i=rc(Error(ue(424)),e),e=b2(t,e,n,r,i);break e}else for(Vn=Mo(e.stateNode.containerInfo.firstChild),Hn=e,Yt=!0,Oi=null,r=M3(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Zl(),n===i){e=Ks(t,e,r);break e}yn(t,e,n,r)}e=e.child}return e;case 5:return L3(e),t===null&&Qp(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,qp(n,i)?o=null:s!==null&&qp(n,s)&&(e.flags|=32),a4(t,e),yn(t,e,o,r),e.child;case 6:return t===null&&Qp(e),null;case 13:return c4(t,e,r);case 4:return tg(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=ec(e,null,n,r):yn(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ti(n,i),m2(t,e,n,i,r);case 7:return yn(t,e,e.pendingProps,r),e.child;case 8:return yn(t,e,e.pendingProps.children,r),e.child;case 12:return yn(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,zt(Ih,n._currentValue),n._currentValue=o,s!==null)if(Fi(s.value,o)){if(s.children===i.children&&!kn.current){e=Ks(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=Us(-1,r&-r),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),Jp(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(ue(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),Jp(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}yn(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,Ul(e,r),i=pi(i),n=n(i),e.flags|=1,yn(t,e,n,r),e.child;case 14:return n=e.type,i=Ti(n,e.pendingProps),i=Ti(n.type,i),g2(t,e,n,i,r);case 15:return s4(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ti(n,i),Kd(t,e),e.tag=1,Tn(n)?(t=!0,Ph(e)):t=!1,Ul(e,r),r4(e,n,i),Zp(e,n,i,r),ry(null,e,n,!0,t,r);case 19:return f4(t,e,r);case 22:return o4(t,e,r)}throw Error(ue(156,e.tag))};function k4(t,e){return Zk(t,e)}function U_(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 hi(t,e,r,n){return new U_(t,e,r,n)}function yg(t){return t=t.prototype,!(!t||!t.isReactComponent)}function z_(t){if(typeof t=="function")return yg(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Dm)return 11;if(t===Lm)return 14}return 2}function jo(t,e){var r=t.alternate;return r===null?(r=hi(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 Jd(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")yg(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case xl:return Ra(r.children,i,s,e);case Nm:o=8,i|=8;break;case Ep:return t=hi(12,r,e,i|2),t.elementType=Ep,t.lanes=s,t;case Sp:return t=hi(13,r,e,i),t.elementType=Sp,t.lanes=s,t;case Cp:return t=hi(19,r,e,i),t.elementType=Cp,t.lanes=s,t;case Lk:return F0(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Nk:o=10;break e;case Dk:o=9;break e;case Dm:o=11;break e;case Lm:o=14;break e;case bo:o=16,n=null;break e}throw Error(ue(130,t==null?t:typeof t,""))}return e=hi(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function Ra(t,e,r,n){return t=hi(7,t,n,e),t.lanes=r,t}function F0(t,e,r,n){return t=hi(22,t,n,e),t.elementType=Lk,t.lanes=r,t.stateNode={isHidden:!1},t}function o1(t,e,r){return t=hi(6,t,null,e),t.lanes=r,t}function a1(t,e,r){return e=hi(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function V_(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Uv(0),this.expirationTimes=Uv(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Uv(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function mg(t,e,r,n,i,s,o,a,l){return t=new V_(t,e,r,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=hi(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},eg(s),t}function H_(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_4)}catch(t){console.error(t)}}_4(),_k.exports=Qn;var io=_k.exports;const I4=ro(io),Y_=yk({__proto__:null,default:I4},[io]);var O2=io;wp.createRoot=O2.createRoot,wp.hydrateRoot=O2.hydrateRoot;const O4=y.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),V0=y.createContext({}),H0=y.createContext(null),q0=typeof document<"u",wg=q0?y.useLayoutEffect:y.useEffect,M4=y.createContext({strict:!1}),Ag=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),Q_="framerAppearId",N4="data-"+Ag(Q_);function J_(t,e,r,n){const{visualElement:i}=y.useContext(V0),s=y.useContext(M4),o=y.useContext(H0),a=y.useContext(O4).reducedMotion,l=y.useRef();n=n||s.renderer,!l.current&&n&&(l.current=n(t,{visualState:e,parent:i,props:r,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;y.useInsertionEffect(()=>{c&&c.update(r,o)});const f=y.useRef(!!(r[N4]&&!window.HandoffComplete));return wg(()=>{c&&(c.render(),f.current&&c.animationState&&c.animationState.animateChanges())}),y.useEffect(()=>{c&&(c.updateFeatures(),!f.current&&c.animationState&&c.animationState.animateChanges(),f.current&&(f.current=!1,window.HandoffComplete=!0))}),c}function _l(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function X_(t,e,r){return y.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):_l(r)&&(r.current=n))},[e])}function Jf(t){return typeof t=="string"||Array.isArray(t)}function W0(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Eg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Sg=["initial",...Eg];function G0(t){return W0(t.animate)||Sg.some(e=>Jf(t[e]))}function D4(t){return!!(G0(t)||t.variants)}function Z_(t,e){if(G0(t)){const{initial:r,animate:n}=t;return{initial:r===!1||Jf(r)?r:void 0,animate:Jf(n)?n:void 0}}return t.inherit!==!1?e:{}}function eI(t){const{initial:e,animate:r}=Z_(t,y.useContext(V0));return y.useMemo(()=>({initial:e,animate:r}),[M2(e),M2(r)])}function M2(t){return Array.isArray(t)?t.join(" "):t}const N2={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Xf={};for(const t in N2)Xf[t]={isEnabled:e=>N2[t].some(r=>!!e[r])};function tI(t){for(const e in t)Xf[e]={...Xf[e],...t[e]}}const Cg=y.createContext({}),L4=y.createContext({}),rI=Symbol.for("motionComponentSymbol");function nI({preloadedFeatures:t,createVisualElement:e,useRender:r,useVisualState:n,Component:i}){t&&tI(t);function s(a,l){let c;const f={...y.useContext(O4),...a,layoutId:iI(a)},{isStatic:u}=f,d=eI(a),h=n(a,u);if(!u&&q0){d.visualElement=J_(i,h,f,e);const p=y.useContext(L4),m=y.useContext(M4).strict;d.visualElement&&(c=d.visualElement.loadFeatures(f,m,t,p))}return y.createElement(V0.Provider,{value:d},c&&d.visualElement?y.createElement(c,{visualElement:d.visualElement,...f}):null,r(i,a,X_(h,d.visualElement,l),h,u,d.visualElement))}const o=y.forwardRef(s);return o[rI]=i,o}function iI({layoutId:t}){const e=y.useContext(Cg).id;return e&&t!==void 0?e+"-"+t:t}function sI(t){function e(n,i={}){return nI(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 oI=["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 kg(t){return typeof t!="string"||t.includes("-")?!1:!!(oI.indexOf(t)>-1||/[A-Z]/.test(t))}const zh={};function aI(t){Object.assign(zh,t)}const _u=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xa=new Set(_u);function j4(t,{layout:e,layoutId:r}){return Xa.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!zh[t]||t==="opacity")}const _n=t=>!!(t&&t.getVelocity),lI={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},cI=_u.length;function fI(t,{enableHardwareAcceleration:e=!0,allowTransformNone:r=!0},n,i){let s="";for(let o=0;oe=>typeof e=="string"&&e.startsWith(t),B4=F4("--"),vy=F4("var(--"),uI=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,dI=(t,e)=>e&&typeof t=="number"?e.transform(t):t,qo=(t,e,r)=>Math.min(Math.max(r,t),e),Za={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ef={...Za,transform:t=>qo(0,1,t)},fd={...Za,default:1},Sf=t=>Math.round(t*1e5)/1e5,K0=/(-)?([\d]*\.?[\d])+/g,$4=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,hI=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Iu(t){return typeof t=="string"}const Ou=t=>({test:e=>Iu(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),yo=Ou("deg"),fs=Ou("%"),Pe=Ou("px"),vI=Ou("vh"),pI=Ou("vw"),D2={...fs,parse:t=>fs.parse(t)/100,transform:t=>fs.transform(t*100)},L2={...Za,transform:Math.round},U4={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:yo,rotateX:yo,rotateY:yo,rotateZ:yo,scale:fd,scaleX:fd,scaleY:fd,scaleZ:fd,skew:yo,skewX:yo,skewY:yo,distance:Pe,translateX:Pe,translateY:Pe,translateZ:Pe,x:Pe,y:Pe,z:Pe,perspective:Pe,transformPerspective:Pe,opacity:Ef,originX:D2,originY:D2,originZ:Pe,zIndex:L2,fillOpacity:Ef,strokeOpacity:Ef,numOctaves:L2};function Tg(t,e,r,n){const{style:i,vars:s,transform:o,transformOrigin:a}=t;let l=!1,c=!1,f=!0;for(const u in e){const d=e[u];if(B4(u)){s[u]=d;continue}const h=U4[u],p=dI(d,h);if(Xa.has(u)){if(l=!0,o[u]=p,!f)continue;d!==(h.default||0)&&(f=!1)}else u.startsWith("origin")?(c=!0,a[u]=p):i[u]=p}if(e.transform||(l||n?i.transform=fI(t.transform,r,f,n):i.transform&&(i.transform="none")),c){const{originX:u="50%",originY:d="50%",originZ:h=0}=a;i.transformOrigin=`${u} ${d} ${h}`}}const Pg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function z4(t,e,r){for(const n in e)!_n(e[n])&&!j4(n,r)&&(t[n]=e[n])}function yI({transformTemplate:t},e,r){return y.useMemo(()=>{const n=Pg();return Tg(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function mI(t,e,r){const n=t.style||{},i={};return z4(i,n,t),Object.assign(i,yI(t,e,r)),t.transformValues?t.transformValues(i):i}function gI(t,e,r){const n={},i=mI(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 xI=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Vh(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||xI.has(t)}let V4=t=>!Vh(t);function bI(t){t&&(V4=e=>e.startsWith("on")?!Vh(e):t(e))}try{bI(require("@emotion/is-prop-valid").default)}catch{}function wI(t,e,r){const n={};for(const i in t)i==="values"&&typeof t.values=="object"||(V4(i)||r===!0&&Vh(i)||!e&&!Vh(i)||t.draggable&&i.startsWith("onDrag"))&&(n[i]=t[i]);return n}function j2(t,e,r){return typeof t=="string"?t:Pe.transform(e+r*t)}function AI(t,e,r){const n=j2(e,t.x,t.width),i=j2(r,t.y,t.height);return`${n} ${i}`}const EI={offset:"stroke-dashoffset",array:"stroke-dasharray"},SI={offset:"strokeDashoffset",array:"strokeDasharray"};function CI(t,e,r=1,n=0,i=!0){t.pathLength=1;const s=i?EI:SI;t[s.offset]=Pe.transform(-n);const o=Pe.transform(e),a=Pe.transform(r);t[s.array]=`${o} ${a}`}function Rg(t,{attrX:e,attrY:r,attrScale:n,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},f,u,d){if(Tg(t,c,f,d),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:p,dimensions:m}=t;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(i!==void 0||s!==void 0||p.transform)&&(p.transformOrigin=AI(m,i!==void 0?i:.5,s!==void 0?s:.5)),e!==void 0&&(h.x=e),r!==void 0&&(h.y=r),n!==void 0&&(h.scale=n),o!==void 0&&CI(h,o,a,l,!1)}const H4=()=>({...Pg(),attrs:{}}),_g=t=>typeof t=="string"&&t.toLowerCase()==="svg";function kI(t,e,r,n){const i=y.useMemo(()=>{const s=H4();return Rg(s,e,{enableHardwareAcceleration:!1},_g(n),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};z4(s,t.style,t),i.style={...s,...i.style}}return i}function TI(t=!1){return(r,n,i,{latestValues:s},o)=>{const l=(kg(r)?kI:gI)(n,s,o,r),f={...wI(n,typeof r=="string",t),...l,ref:i},{children:u}=n,d=y.useMemo(()=>_n(u)?u.get():u,[u]);return y.createElement(r,{...f,children:d})}}function q4(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 W4=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 G4(t,e,r,n){q4(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(W4.has(i)?i:Ag(i),e.attrs[i])}function Ig(t,e){const{style:r}=t,n={};for(const i in r)(_n(r[i])||e.style&&_n(e.style[i])||j4(i,t))&&(n[i]=r[i]);return n}function K4(t,e){const r=Ig(t,e);for(const n in t)if(_n(t[n])||_n(e[n])){const i=_u.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;r[i]=t[n]}return r}function Og(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}function Y4(t){const e=y.useRef(null);return e.current===null&&(e.current=t()),e.current}const Hh=t=>Array.isArray(t),PI=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),RI=t=>Hh(t)?t[t.length-1]||0:t;function Xd(t){const e=_n(t)?t.get():t;return PI(e)?e.toValue():e}function _I({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,i,s){const o={latestValues:II(n,i,s,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const Q4=t=>(e,r)=>{const n=y.useContext(V0),i=y.useContext(H0),s=()=>_I(t,e,n,i);return r?s():Y4(s)};function II(t,e,r,n){const i={},s=n(t,{});for(const d in s)i[d]=Xd(s[d]);let{initial:o,animate:a}=t;const l=G0(t),c=D4(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let f=r?r.initial===!1:!1;f=f||o===!1;const u=f?a:o;return u&&typeof u!="boolean"&&!W0(u)&&(Array.isArray(u)?u:[u]).forEach(h=>{const p=Og(t,h);if(!p)return;const{transitionEnd:m,transition:x,...b}=p;for(const w in b){let A=b[w];if(Array.isArray(A)){const R=f?A.length-1:0;A=A[R]}A!==null&&(i[w]=A)}for(const w in m)i[w]=m[w]}),i}const fr=t=>t;class F2{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const r=this.order.indexOf(e);r!==-1&&(this.order.splice(r,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function OI(t){let e=new F2,r=new F2,n=0,i=!1,s=!1;const o=new WeakSet,a={schedule:(l,c=!1,f=!1)=>{const u=f&&i,d=u?e:r;return c&&o.add(l),d.add(l)&&u&&i&&(n=e.order.length),l},cancel:l=>{r.remove(l),o.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[e,r]=[r,e],r.clear(),n=e.order.length,n)for(let c=0;c(u[d]=OI(()=>r=!0),u),{}),o=u=>s[u].process(i),a=()=>{const u=performance.now();r=!1,i.delta=n?1e3/60:Math.max(Math.min(u-i.timestamp,MI),1),i.timestamp=u,i.isProcessing=!0,ud.forEach(o),i.isProcessing=!1,r&&e&&(n=!1,t(a))},l=()=>{r=!0,n=!0,i.isProcessing||t(a)};return{schedule:ud.reduce((u,d)=>{const h=s[d];return u[d]=(p,m=!1,x=!1)=>(r||l(),h.schedule(p,m,x)),u},{}),cancel:u=>ud.forEach(d=>s[d].cancel(u)),state:i,steps:s}}const{schedule:Vt,cancel:Ys,state:tn,steps:l1}=NI(typeof requestAnimationFrame<"u"?requestAnimationFrame:fr,!0),DI={useVisualState:Q4({scrapeMotionValuesFromProps:K4,createRenderState:H4,onMount:(t,e,{renderState:r,latestValues:n})=>{Vt.read(()=>{try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}}),Vt.render(()=>{Rg(r,n,{enableHardwareAcceleration:!1},_g(e.tagName),t.transformTemplate),G4(e,r)})}})},LI={useVisualState:Q4({scrapeMotionValuesFromProps:Ig,createRenderState:Pg})};function jI(t,{forwardMotionProps:e=!1},r,n){return{...kg(t)?DI:LI,preloadedFeatures:r,useRender:TI(e),createVisualElement:n,Component:t}}function Bs(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}const J4=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Y0(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const FI=t=>e=>J4(e)&&t(e,Y0(e));function zs(t,e,r,n){return Bs(t,e,FI(r),n)}const BI=(t,e)=>r=>e(t(r)),Fo=(...t)=>t.reduce(BI);function X4(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const B2=X4("dragHorizontal"),$2=X4("dragVertical");function Z4(t){let e=!1;if(t==="y")e=$2();else if(t==="x")e=B2();else{const r=B2(),n=$2();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function e6(){const t=Z4(!0);return t?(t(),!1):!0}class na{constructor(e){this.isMounted=!1,this.node=e}update(){}}function U2(t,e){const r="pointer"+(e?"enter":"leave"),n="onHover"+(e?"Start":"End"),i=(s,o)=>{if(s.pointerType==="touch"||e6())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[n]&&Vt.update(()=>a[n](s,o))};return zs(t.current,r,i,{passive:!t.getProps()[n]})}class $I extends na{mount(){this.unmount=Fo(U2(this.node,!0),U2(this.node,!1))}unmount(){}}class UI extends na{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Fo(Bs(this.node.current,"focus",()=>this.onFocus()),Bs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const t6=(t,e)=>e?t===e?!0:t6(t,e.parentElement):!1;function c1(t,e){if(!e)return;const r=new PointerEvent("pointer"+t);e(r,Y0(r))}class zI extends na{constructor(){super(...arguments),this.removeStartListeners=fr,this.removeEndListeners=fr,this.removeAccessibleListeners=fr,this.startPointerPress=(e,r)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),s=zs(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:f,globalTapTarget:u}=this.node.getProps();Vt.update(()=>{!u&&!t6(this.node.current,a.target)?f&&f(a,l):c&&c(a,l)})},{passive:!(n.onTap||n.onPointerUp)}),o=zs(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Fo(s,o),this.startPress(e,r)},this.startAccessiblePress=()=>{const e=s=>{if(s.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||c1("up",(l,c)=>{const{onTap:f}=this.node.getProps();f&&Vt.update(()=>f(l,c))})};this.removeEndListeners(),this.removeEndListeners=Bs(this.node.current,"keyup",o),c1("down",(a,l)=>{this.startPress(a,l)})},r=Bs(this.node.current,"keydown",e),n=()=>{this.isPressing&&c1("cancel",(s,o)=>this.cancelPress(s,o))},i=Bs(this.node.current,"blur",n);this.removeAccessibleListeners=Fo(r,i)}}startPress(e,r){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Vt.update(()=>n(e,r))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!e6()}cancelPress(e,r){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Vt.update(()=>n(e,r))}mount(){const e=this.node.getProps(),r=zs(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=Bs(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Fo(r,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const py=new WeakMap,f1=new WeakMap,VI=t=>{const e=py.get(t.target);e&&e(t)},HI=t=>{t.forEach(VI)};function qI({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(HI,{root:t,...e})),n[i]}function WI(t,e,r){const n=qI(e);return py.set(t,r),n.observe(t),()=>{py.delete(t),n.unobserve(t)}}const GI={some:0,all:1};class KI extends na{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:r,margin:n,amount:i="some",once:s}=e,o={root:r?r.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:GI[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:f,onViewportLeave:u}=this.node.getProps(),d=c?f:u;d&&d(l)};return WI(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:r}=this.node;["amount","margin","root"].some(YI(e,r))&&this.startObserver()}unmount(){}}function YI({viewport:t={}},{viewport:e={}}={}){return r=>t[r]!==e[r]}const QI={inView:{Feature:KI},tap:{Feature:zI},focus:{Feature:UI},hover:{Feature:$I}};function r6(t,e){if(!Array.isArray(e))return!1;const r=e.length;if(r!==t.length)return!1;for(let n=0;ne[n]=r.get()),e}function XI(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function Q0(t,e,r){const n=t.getProps();return Og(n,e,r!==void 0?r:n.custom,JI(t),XI(t))}let ZI=fr,Mg=fr;const Bo=t=>t*1e3,Vs=t=>t/1e3,eO={current:!1},n6=t=>Array.isArray(t)&&typeof t[0]=="number";function i6(t){return!!(!t||typeof t=="string"&&s6[t]||n6(t)||Array.isArray(t)&&t.every(i6))}const cf=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,s6={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cf([0,.65,.55,1]),circOut:cf([.55,0,1,.45]),backIn:cf([.31,.01,.66,-.59]),backOut:cf([.33,1.53,.69,.99])};function o6(t){if(t)return n6(t)?cf(t):Array.isArray(t)?t.map(o6):s6[t]}function tO(t,e,r,{delay:n=0,duration:i,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){const c={[e]:r};l&&(c.offset=l);const f=o6(a);return Array.isArray(f)&&(c.easing=f),t.animate(c,{delay:n,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}function rO(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const a6=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,nO=1e-7,iO=12;function sO(t,e,r,n,i){let s,o,a=0;do o=e+(r-e)/2,s=a6(o,n,i)-t,s>0?r=o:e=o;while(Math.abs(s)>nO&&++asO(s,0,1,t,r);return s=>s===0||s===1?s:a6(i(s),e,n)}const oO=Mu(.42,0,1,1),aO=Mu(0,0,.58,1),l6=Mu(.42,0,.58,1),lO=t=>Array.isArray(t)&&typeof t[0]!="number",c6=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,f6=t=>e=>1-t(1-e),Ng=t=>1-Math.sin(Math.acos(t)),u6=f6(Ng),cO=c6(Ng),d6=Mu(.33,1.53,.69,.99),Dg=f6(d6),fO=c6(Dg),uO=t=>(t*=2)<1?.5*Dg(t):.5*(2-Math.pow(2,-10*(t-1))),dO={linear:fr,easeIn:oO,easeInOut:l6,easeOut:aO,circIn:Ng,circInOut:cO,circOut:u6,backIn:Dg,backInOut:fO,backOut:d6,anticipate:uO},z2=t=>{if(Array.isArray(t)){Mg(t.length===4);const[e,r,n,i]=t;return Mu(e,r,n,i)}else if(typeof t=="string")return dO[t];return t},Lg=(t,e)=>r=>!!(Iu(r)&&hI.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),h6=(t,e,r)=>n=>{if(!Iu(n))return n;const[i,s,o,a]=n.match(K0);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},hO=t=>qo(0,255,t),u1={...Za,transform:t=>Math.round(hO(t))},Aa={test:Lg("rgb","red"),parse:h6("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+u1.transform(t)+", "+u1.transform(e)+", "+u1.transform(r)+", "+Sf(Ef.transform(n))+")"};function vO(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 yy={test:Lg("#"),parse:vO,transform:Aa.transform},Il={test:Lg("hsl","hue"),parse:h6("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+fs.transform(Sf(e))+", "+fs.transform(Sf(r))+", "+Sf(Ef.transform(n))+")"},vn={test:t=>Aa.test(t)||yy.test(t)||Il.test(t),parse:t=>Aa.test(t)?Aa.parse(t):Il.test(t)?Il.parse(t):yy.parse(t),transform:t=>Iu(t)?t:t.hasOwnProperty("red")?Aa.transform(t):Il.transform(t)},tr=(t,e,r)=>-r*t+r*e+t;function d1(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 pO({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=d1(l,a,t+1/3),s=d1(l,a,t),o=d1(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}const h1=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},yO=[yy,Aa,Il],mO=t=>yO.find(e=>e.test(t));function V2(t){const e=mO(t);let r=e.parse(t);return e===Il&&(r=pO(r)),r}const v6=(t,e)=>{const r=V2(t),n=V2(e),i={...r};return s=>(i.red=h1(r.red,n.red,s),i.green=h1(r.green,n.green,s),i.blue=h1(r.blue,n.blue,s),i.alpha=tr(r.alpha,n.alpha,s),Aa.transform(i))};function gO(t){var e,r;return isNaN(t)&&Iu(t)&&(((e=t.match(K0))===null||e===void 0?void 0:e.length)||0)+(((r=t.match($4))===null||r===void 0?void 0:r.length)||0)>0}const p6={regex:uI,countKey:"Vars",token:"${v}",parse:fr},y6={regex:$4,countKey:"Colors",token:"${c}",parse:vn.parse},m6={regex:K0,countKey:"Numbers",token:"${n}",parse:Za.parse};function v1(t,{regex:e,countKey:r,token:n,parse:i}){const s=t.tokenised.match(e);s&&(t["num"+r]=s.length,t.tokenised=t.tokenised.replace(e,n),t.values.push(...s.map(i)))}function qh(t){const e=t.toString(),r={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return r.value.includes("var(--")&&v1(r,p6),v1(r,y6),v1(r,m6),r}function g6(t){return qh(t).values}function x6(t){const{values:e,numColors:r,numVars:n,tokenised:i}=qh(t),s=e.length;return o=>{let a=i;for(let l=0;ltypeof t=="number"?0:t;function bO(t){const e=g6(t);return x6(t)(e.map(xO))}const Wo={test:gO,parse:g6,createTransformer:x6,getAnimatableNone:bO},b6=(t,e)=>r=>`${r>0?e:t}`;function w6(t,e){return typeof t=="number"?r=>tr(t,e,r):vn.test(t)?v6(t,e):t.startsWith("var(")?b6(t,e):E6(t,e)}const A6=(t,e)=>{const r=[...t],n=r.length,i=t.map((s,o)=>w6(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]=w6(t[i],e[i]));return i=>{for(const s in n)r[s]=n[s](i);return r}},E6=(t,e)=>{const r=Wo.createTransformer(e),n=qh(t),i=qh(e);return n.numVars===i.numVars&&n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?Fo(A6(n.values,i.values),r):b6(t,e)},Zf=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},H2=(t,e)=>r=>tr(t,e,r);function AO(t){return typeof t=="number"?H2:typeof t=="string"?vn.test(t)?v6:E6:Array.isArray(t)?A6:typeof t=="object"?wO:H2}function EO(t,e,r){const n=[],i=r||AO(t[0]),s=t.length-1;for(let o=0;oe[0];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=EO(e,n,i),a=o.length,l=c=>{let f=0;if(a>1)for(;fl(qo(t[0],t[s-1],c)):l}function SO(t,e){const r=t[t.length-1];for(let n=1;n<=e;n++){const i=Zf(0,e,n);t.push(tr(r,1,i))}}function CO(t){const e=[0];return SO(e,t.length-1),e}function kO(t,e){return t.map(r=>r*e)}function TO(t,e){return t.map(()=>e||l6).splice(0,t.length-1)}function Wh({duration:t=300,keyframes:e,times:r,ease:n="easeInOut"}){const i=lO(n)?n.map(z2):z2(n),s={done:!1,value:e[0]},o=kO(r&&r.length===e.length?r:CO(e),t),a=S6(o,e,{ease:Array.isArray(i)?i:TO(e,i)});return{calculatedDuration:t,next:l=>(s.value=a(l),s.done=l>=t,s)}}function C6(t,e){return e?t*(1e3/e):0}const PO=5;function k6(t,e,r){const n=Math.max(e-PO,0);return C6(r-t(n),e-n)}const p1=.001,RO=.01,q2=10,_O=.05,IO=1;function OO({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s;ZI(t<=Bo(q2));let o=1-e;o=qo(_O,IO,o),t=qo(RO,q2,Vs(t)),o<1?(i=c=>{const f=c*o,u=f*t,d=f-r,h=my(c,o),p=Math.exp(-u);return p1-d/h*p},s=c=>{const u=c*o*t,d=u*r+r,h=Math.pow(o,2)*Math.pow(c,2)*t,p=Math.exp(-u),m=my(Math.pow(c,2),o);return(-i(c)+p1>0?-1:1)*((d-h)*p)/m}):(i=c=>{const f=Math.exp(-c*t),u=(c-r)*t+1;return-p1+f*u},s=c=>{const f=Math.exp(-c*t),u=(r-c)*(t*t);return f*u});const a=5/t,l=NO(i,s,a);if(t=Bo(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:t}}}const MO=12;function NO(t,e,r){let n=r;for(let i=1;it[r]!==void 0)}function jO(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!W2(t,LO)&&W2(t,DO)){const r=OO(t);e={...e,...r,mass:1},e.isResolvedFromDuration=!0}return e}function T6({keyframes:t,restDelta:e,restSpeed:r,...n}){const i=t[0],s=t[t.length-1],o={done:!1,value:i},{stiffness:a,damping:l,mass:c,duration:f,velocity:u,isResolvedFromDuration:d}=jO({...n,velocity:-Vs(n.velocity||0)}),h=u||0,p=l/(2*Math.sqrt(a*c)),m=s-i,x=Vs(Math.sqrt(a/c)),b=Math.abs(m)<5;r||(r=b?.01:2),e||(e=b?.005:.5);let w;if(p<1){const A=my(x,p);w=R=>{const N=Math.exp(-p*x*R);return s-N*((h+p*x*m)/A*Math.sin(A*R)+m*Math.cos(A*R))}}else if(p===1)w=A=>s-Math.exp(-x*A)*(m+(h+x*m)*A);else{const A=x*Math.sqrt(p*p-1);w=R=>{const N=Math.exp(-p*x*R),I=Math.min(A*R,300);return s-N*((h+p*x*m)*Math.sinh(I)+A*m*Math.cosh(I))/A}}return{calculatedDuration:d&&f||null,next:A=>{const R=w(A);if(d)o.done=A>=f;else{let N=h;A!==0&&(p<1?N=k6(w,A,R):N=0);const I=Math.abs(N)<=r,F=Math.abs(s-R)<=e;o.done=I&&F}return o.value=o.done?s:R,o}}}function G2({keyframes:t,velocity:e=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:f}){const u=t[0],d={done:!1,value:u},h=j=>a!==void 0&&jl,p=j=>a===void 0?l:l===void 0||Math.abs(a-j)-m*Math.exp(-j/n),A=j=>b+w(j),R=j=>{const U=w(j),Y=A(j);d.done=Math.abs(U)<=c,d.value=d.done?b:Y};let N,I;const F=j=>{h(d.value)&&(N=j,I=T6({keyframes:[d.value,p(d.value)],velocity:k6(A,j,d.value),damping:i,stiffness:s,restDelta:c,restSpeed:f}))};return F(0),{calculatedDuration:null,next:j=>{let U=!1;return!I&&N===void 0&&(U=!0,R(j),F(j)),N!==void 0&&j>N?I.next(j-N):(!U&&R(j),d)}}}const FO=t=>{const e=({timestamp:r})=>t(r);return{start:()=>Vt.update(e,!0),stop:()=>Ys(e),now:()=>tn.isProcessing?tn.timestamp:performance.now()}},K2=2e4;function Y2(t){let e=0;const r=50;let n=t.next(e);for(;!n.done&&e=K2?1/0:e}const BO={decay:G2,inertia:G2,tween:Wh,keyframes:Wh,spring:T6};function Gh({autoplay:t=!0,delay:e=0,driver:r=FO,keyframes:n,type:i="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:f,onUpdate:u,...d}){let h=1,p=!1,m,x;const b=()=>{x=new Promise(E=>{m=E})};b();let w;const A=BO[i]||Wh;let R;A!==Wh&&typeof n[0]!="number"&&(R=S6([0,100],n,{clamp:!1}),n=[0,100]);const N=A({...d,keyframes:n});let I;a==="mirror"&&(I=A({...d,keyframes:[...n].reverse(),velocity:-(d.velocity||0)}));let F="idle",j=null,U=null,Y=null;N.calculatedDuration===null&&s&&(N.calculatedDuration=Y2(N));const{calculatedDuration:J}=N;let Z=1/0,M=1/0;J!==null&&(Z=J+o,M=Z*(s+1)-o);let v=0;const T=E=>{if(U===null)return;h>0&&(U=Math.min(U,E)),h<0&&(U=Math.min(E-M/h,U)),j!==null?v=j:v=Math.round(E-U)*h;const g=v-e*(h>=0?1:-1),_=h>=0?g<0:g>M;v=Math.max(g,0),F==="finished"&&j===null&&(v=M);let B=v,k=N;if(s){const X=Math.min(v,M)/Z;let le=Math.floor(X),ne=X%1;!ne&&X>=1&&(ne=1),ne===1&&le--,le=Math.min(le,s+1),!!(le%2)&&(a==="reverse"?(ne=1-ne,o&&(ne-=o/Z)):a==="mirror"&&(k=I)),B=qo(0,1,ne)*Z}const $=_?{done:!1,value:n[0]}:k.next(B);R&&($.value=R($.value));let{done:V}=$;!_&&J!==null&&(V=h>=0?v>=M:v<=0);const q=j===null&&(F==="finished"||F==="running"&&V);return u&&u($.value),q&&P(),$},S=()=>{w&&w.stop(),w=void 0},C=()=>{F="idle",S(),m(),b(),U=Y=null},P=()=>{F="finished",f&&f(),S(),m()},O=()=>{if(p)return;w||(w=r(T));const E=w.now();l&&l(),j!==null?U=E-j:(!U||F==="finished")&&(U=E),F==="finished"&&b(),Y=U,j=null,F="running",w.start()};t&&O();const L={then(E,g){return x.then(E,g)},get time(){return Vs(v)},set time(E){E=Bo(E),v=E,j!==null||!w||h===0?j=E:U=w.now()-E/h},get duration(){const E=N.calculatedDuration===null?Y2(N):N.calculatedDuration;return Vs(E)},get speed(){return h},set speed(E){E===h||!w||(h=E,L.time=Vs(v))},get state(){return F},play:O,pause:()=>{F="paused",j=v},stop:()=>{p=!0,F!=="idle"&&(F="idle",c&&c(),C())},cancel:()=>{Y!==null&&T(Y),C()},complete:()=>{F="finished"},sample:E=>(U=0,T(E))};return L}function $O(t){let e;return()=>(e===void 0&&(e=t()),e)}const UO=$O(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),zO=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),dd=10,VO=2e4,HO=(t,e)=>e.type==="spring"||t==="backgroundColor"||!i6(e.ease);function qO(t,e,{onUpdate:r,onComplete:n,...i}){if(!(UO()&&zO.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let o=!1,a,l,c=!1;const f=()=>{l=new Promise(A=>{a=A})};f();let{keyframes:u,duration:d=300,ease:h,times:p}=i;if(HO(e,i)){const A=Gh({...i,repeat:0,delay:0});let R={done:!1,value:u[0]};const N=[];let I=0;for(;!R.done&&I{c=!1,m.cancel()},b=()=>{c=!0,Vt.update(x),a(),f()};return m.onfinish=()=>{c||(t.set(rO(u,i)),n&&n(),b())},{then(A,R){return l.then(A,R)},attachTimeline(A){return m.timeline=A,m.onfinish=null,fr},get time(){return Vs(m.currentTime||0)},set time(A){m.currentTime=Bo(A)},get speed(){return m.playbackRate},set speed(A){m.playbackRate=A},get duration(){return Vs(d)},play:()=>{o||(m.play(),Ys(x))},pause:()=>m.pause(),stop:()=>{if(o=!0,m.playState==="idle")return;const{currentTime:A}=m;if(A){const R=Gh({...i,autoplay:!1});t.setWithVelocity(R.sample(A-dd).value,R.sample(A).value,dd)}b()},complete:()=>{c||m.finish()},cancel:b}}function WO({keyframes:t,delay:e,onUpdate:r,onComplete:n}){const i=()=>(r&&r(t[t.length-1]),n&&n(),{time:0,speed:1,duration:0,play:fr,pause:fr,stop:fr,then:s=>(s(),Promise.resolve()),cancel:fr,complete:fr});return e?Gh({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}const GO={type:"spring",stiffness:500,damping:25,restSpeed:10},KO=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),YO={type:"keyframes",duration:.8},QO={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},JO=(t,{keyframes:e})=>e.length>2?YO:Xa.has(t)?t.startsWith("scale")?KO(e[1]):GO:QO,gy=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Wo.test(e)||e==="0")&&!e.startsWith("url(")),XO=new Set(["brightness","contrast","saturate","opacity"]);function ZO(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(K0)||[];if(!n)return t;const i=r.replace(n,"");let s=XO.has(e)?1:0;return n!==r&&(s*=100),e+"("+s+i+")"}const eM=/([a-z-]*)\(.*?\)/g,xy={...Wo,getAnimatableNone:t=>{const e=t.match(eM);return e?e.map(ZO).join(" "):t}},tM={...U4,color:vn,backgroundColor:vn,outlineColor:vn,fill:vn,stroke:vn,borderColor:vn,borderTopColor:vn,borderRightColor:vn,borderBottomColor:vn,borderLeftColor:vn,filter:xy,WebkitFilter:xy},jg=t=>tM[t];function P6(t,e){let r=jg(t);return r!==xy&&(r=Wo),r.getAnimatableNone?r.getAnimatableNone(e):void 0}const R6=t=>/^0[^.\s]+$/.test(t);function rM(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||R6(t)}function nM(t,e,r,n){const i=gy(e,r);let s;Array.isArray(r)?s=[...r]:s=[null,r];const o=n.from!==void 0?n.from:t.get();let a;const l=[];for(let c=0;ci=>{const s=Fg(n,t)||{},o=s.delay||n.delay||0;let{elapsed:a=0}=n;a=a-Bo(o);const l=nM(e,t,r,s),c=l[0],f=l[l.length-1],u=gy(t,c),d=gy(t,f);let h={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...s,delay:-a,onUpdate:p=>{e.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{i(),s.onComplete&&s.onComplete()}};if(iM(s)||(h={...h,...JO(t,h)}),h.duration&&(h.duration=Bo(h.duration)),h.repeatDelay&&(h.repeatDelay=Bo(h.repeatDelay)),!u||!d||eO.current||s.type===!1||sM.skipAnimations)return WO(h);if(!n.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const p=qO(e,t,h);if(p)return p}return Gh(h)};function Kh(t){return!!(_n(t)&&t.add)}const _6=t=>/^\-?\d*\.?\d+$/.test(t);function $g(t,e){t.indexOf(e)===-1&&t.push(e)}function Ug(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class zg{constructor(){this.subscriptions=[]}add(e){return $g(this.subscriptions,e),()=>Ug(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 aM{constructor(e,r={}){this.version="10.18.0",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}=tn;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,Vt.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=()=>Vt.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=oM(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new zg);const n=this.events[e].add(r);return e==="change"?()=>{n(),Vt.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?C6(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r),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(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ic(t,e){return new aM(t,e)}const I6=t=>e=>e.test(t),lM={test:t=>t==="auto",parse:t=>t},O6=[Za,Pe,fs,yo,pI,vI,lM],Vc=t=>O6.find(I6(t)),cM=[...O6,vn,Wo],fM=t=>cM.find(I6(t));function uM(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,ic(r))}function dM(t,e){const r=Q0(t,e);let{transitionEnd:n={},transition:i={},...s}=r?t.makeTargetAnimatable(r,!1):{};s={...s,...n};for(const o in s){const a=RI(s[o]);uM(t,o,a)}}function hM(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;al.remove(u))),c.push(x)}return o&&Promise.all(c).then(()=>{o&&dM(t,o)}),c}function by(t,e,r={}){const n=Q0(t,e,r.custom);let{transition:i=t.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(i=r.transitionOverride);const s=n?()=>Promise.all(M6(t,n,r)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:u}=i;return gM(t,e,c+l,f,u,r)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,c]=a==="beforeChildren"?[s,o]:[o,s];return l().then(()=>c())}else return Promise.all([s(),o(r.delay)])}function gM(t,e,r=0,n=0,i=1,s){const o=[],a=(t.variantChildren.size-1)*n,l=i===1?(c=0)=>c*n:(c=0)=>a-c*n;return Array.from(t.variantChildren).sort(xM).forEach((c,f)=>{c.notify("AnimationStart",e),o.push(by(c,e,{...s,delay:r+l(f)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function xM(t,e){return t.sortNodePosition(e)}function bM(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const i=e.map(s=>by(t,s,r));n=Promise.all(i)}else if(typeof e=="string")n=by(t,e,r);else{const i=typeof e=="function"?Q0(t,e,r.custom):e;n=Promise.all(M6(t,i,r))}return n.then(()=>t.notify("AnimationComplete",e))}const wM=[...Eg].reverse(),AM=Eg.length;function EM(t){return e=>Promise.all(e.map(({animation:r,options:n})=>bM(t,r,n)))}function SM(t){let e=EM(t);const r=kM();let n=!0;const i=(l,c)=>{const f=Q0(t,c);if(f){const{transition:u,transitionEnd:d,...h}=f;l={...l,...h,...d}}return l};function s(l){e=l(t)}function o(l,c){const f=t.getProps(),u=t.getVariantContext(!0)||{},d=[],h=new Set;let p={},m=1/0;for(let b=0;bm&&N,Y=!1;const J=Array.isArray(R)?R:[R];let Z=J.reduce(i,{});I===!1&&(Z={});const{prevResolvedValues:M={}}=A,v={...M,...Z},T=S=>{U=!0,h.has(S)&&(Y=!0,h.delete(S)),A.needsAnimating[S]=!0};for(const S in v){const C=Z[S],P=M[S];if(p.hasOwnProperty(S))continue;let O=!1;Hh(C)&&Hh(P)?O=!r6(C,P):O=C!==P,O?C!==void 0?T(S):h.add(S):C!==void 0&&h.has(S)?T(S):A.protectedKeys[S]=!0}A.prevProp=R,A.prevResolvedValues=Z,A.isActive&&(p={...p,...Z}),n&&t.blockInitialAnimation&&(U=!1),U&&(!F||Y)&&d.push(...J.map(S=>({animation:S,options:{type:w,...l}})))}if(h.size){const b={};h.forEach(w=>{const A=t.getBaseTarget(w);A!==void 0&&(b[w]=A)}),d.push({animation:b})}let x=!!d.length;return n&&(f.initial===!1||f.initial===f.animate)&&!t.manuallyAnimateOnMount&&(x=!1),n=!1,x?e(d):Promise.resolve()}function a(l,c,f){var u;if(r[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),r[l].isActive=c;const d=o(f,l);for(const h in r)r[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>r}}function CM(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!r6(e,t):!1}function fa(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function kM(){return{animate:fa(!0),whileInView:fa(),whileHover:fa(),whileTap:fa(),whileDrag:fa(),whileFocus:fa(),exit:fa()}}class TM extends na{constructor(e){super(e),e.animationState||(e.animationState=SM(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),W0(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:r}=this.node.prevProps||{};e!==r&&this.updateAnimationControlsSubscription()}unmount(){}}let PM=0;class RM extends na{constructor(){super(...arguments),this.id=PM++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:r,custom:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const s=this.node.animationState.setActive("exit",!e,{custom:n??this.node.getProps().custom});r&&!e&&s.then(()=>r(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const _M={animation:{Feature:TM},exit:{Feature:RM}},Q2=(t,e)=>Math.abs(t-e);function IM(t,e){const r=Q2(t.x,e.x),n=Q2(t.y,e.y);return Math.sqrt(r**2+n**2)}class N6{constructor(e,r,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=m1(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=IM(u.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=u,{timestamp:m}=tn;this.history.push({...p,timestamp:m});const{onStart:x,onMove:b}=this.handlers;d||(x&&x(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=y1(d,this.transformPagePoint),Vt.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=m1(u.type==="pointercancel"?this.lastMoveEventInfo:y1(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,x),p&&p(u,x)},!J4(e))return;this.dragSnapToOrigin=s,this.handlers=r,this.transformPagePoint=n,this.contextWindow=i||window;const o=Y0(e),a=y1(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=tn;this.history=[{...l,timestamp:c}];const{onSessionStart:f}=r;f&&f(e,m1(a,this.history)),this.removeListeners=Fo(zs(this.contextWindow,"pointermove",this.handlePointerMove),zs(this.contextWindow,"pointerup",this.handlePointerUp),zs(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ys(this.updatePoint)}}function y1(t,e){return e?{point:e(t.point)}:t}function J2(t,e){return{x:t.x-e.x,y:t.y-e.y}}function m1({point:t},e){return{point:t,delta:J2(t,D6(e)),offset:J2(t,OM(e)),velocity:MM(e,.1)}}function OM(t){return t[0]}function D6(t){return t[t.length-1]}function MM(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const i=D6(t);for(;r>=0&&(n=t[r],!(i.timestamp-n.timestamp>Bo(e)));)r--;if(!n)return{x:0,y:0};const s=Vs(i.timestamp-n.timestamp);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 Gn(t){return t.max-t.min}function wy(t,e=0,r=.01){return Math.abs(t-e)<=r}function X2(t,e,r,n=.5){t.origin=n,t.originPoint=tr(e.min,e.max,t.origin),t.scale=Gn(r)/Gn(e),(wy(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=tr(r.min,r.max,t.origin)-t.originPoint,(wy(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Cf(t,e,r,n){X2(t.x,e.x,r.x,n?n.originX:void 0),X2(t.y,e.y,r.y,n?n.originY:void 0)}function Z2(t,e,r){t.min=r.min+e.min,t.max=t.min+Gn(e)}function NM(t,e,r){Z2(t.x,e.x,r.x),Z2(t.y,e.y,r.y)}function eA(t,e,r){t.min=e.min-r.min,t.max=t.min+Gn(e)}function kf(t,e,r){eA(t.x,e.x,r.x),eA(t.y,e.y,r.y)}function DM(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?tr(r,t,n.max):Math.min(t,r)),t}function tA(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 LM(t,{top:e,left:r,bottom:n,right:i}){return{x:tA(t.x,r,i),y:tA(t.y,e,n)}}function rA(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=Zf(e.min,e.max-n,t.min):n>i&&(r=Zf(t.min,t.max-i,e.min)),qo(0,1,r)}function BM(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 Ay=.35;function $M(t=Ay){return t===!1?t=0:t===!0&&(t=Ay),{x:nA(t,"left","right"),y:nA(t,"top","bottom")}}function nA(t,e,r){return{min:iA(t,e),max:iA(t,r)}}function iA(t,e){return typeof t=="number"?t:t[e]||0}const sA=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ol=()=>({x:sA(),y:sA()}),oA=()=>({min:0,max:0}),Ar=()=>({x:oA(),y:oA()});function li(t){return[t("x"),t("y")]}function L6({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function UM({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function zM(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 g1(t){return t===void 0||t===1}function Ey({scale:t,scaleX:e,scaleY:r}){return!g1(t)||!g1(e)||!g1(r)}function va(t){return Ey(t)||j6(t)||t.z||t.rotate||t.rotateX||t.rotateY}function j6(t){return aA(t.x)||aA(t.y)}function aA(t){return t&&t!=="0%"}function Yh(t,e,r){const n=t-r,i=e*n;return r+i}function lA(t,e,r,n,i){return i!==void 0&&(t=Yh(t,i,n)),Yh(t,r,n)+e}function Sy(t,e=0,r=1,n,i){t.min=lA(t.min,e,r,n,i),t.max=lA(t.max,e,r,n,i)}function F6(t,{x:e,y:r}){Sy(t.x,e.translate,e.scale,e.originPoint),Sy(t.y,r.translate,r.scale,r.originPoint)}function VM(t,e,r,n=!1){const i=r.length;if(!i)return;e.x=e.y=1;let s,o;for(let a=0;a1.0000000000001||t<.999999999999?t:1}function Ao(t,e){t.min=t.min+e,t.max=t.max+e}function fA(t,e,[r,n,i]){const s=e[i]!==void 0?e[i]:.5,o=tr(t.min,t.max,s);Sy(t,e[r],e[n],o,e.scale)}const HM=["x","scaleX","originX"],qM=["y","scaleY","originY"];function Ml(t,e){fA(t.x,e,HM),fA(t.y,e,qM)}function B6(t,e){return L6(zM(t.getBoundingClientRect(),e))}function WM(t,e,r){const n=B6(t,r),{scroll:i}=e;return i&&(Ao(n.x,i.offset.x),Ao(n.y,i.offset.y)),n}const $6=({current:t})=>t?t.ownerDocument.defaultView:null,GM=new WeakMap;class KM{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=Ar(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:u}=this.getProps();u?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Y0(f,"page").point)},s=(f,u)=>{const{drag:d,dragPropagation:h,onDragStart:p}=this.getProps();if(d&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Z4(d),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),li(x=>{let b=this.getAxisMotionValue(x).get()||0;if(fs.test(b)){const{projection:w}=this.visualElement;if(w&&w.layout){const A=w.layout.layoutBox[x];A&&(b=Gn(A)*(parseFloat(b)/100))}}this.originPoint[x]=b}),p&&Vt.update(()=>p(f,u),!1,!0);const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(f,u)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:x}=u;if(h&&this.currentDirection===null){this.currentDirection=YM(x),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",u.point,x),this.updateAxis("y",u.point,x),this.visualElement.render(),m&&m(f,u)},a=(f,u)=>this.stop(f,u),l=()=>li(f=>{var u;return this.getAnimationState(f)==="paused"&&((u=this.getAxisMotionValue(f).animation)===null||u===void 0?void 0:u.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new N6(e,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:$6(this.visualElement)})}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&&Vt.update(()=>s(e,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:r}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(e,r,n){const{drag:i}=this.getProps();if(!n||!hd(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=DM(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){var e;const{dragConstraints:r,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,s=this.constraints;r&&_l(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&i?this.constraints=LM(i.layoutBox,r):this.constraints=!1,this.elastic=$M(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&li(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=BM(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!_l(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=WM(n,i.root,this.visualElement.getTransformPagePoint());let o=jM(i.layout.layoutBox,s);if(r){const a=r(UM(o));this.hasMutatedConstraints=!!a,a&&(o=L6(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=li(f=>{if(!hd(f,r,this.currentDirection))return;let u=l&&l[f]||{};o&&(u={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:n?e[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(f,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(Bg(e,n,0,r))}stopAnimation(){li(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){li(e=>{var r;return(r=this.getAxisMotionValue(e).animation)===null||r===void 0?void 0:r.pause()})}getAnimationState(e){var r;return(r=this.getAxisMotionValue(e).animation)===null||r===void 0?void 0:r.state}getAxisMotionValue(e){const r="_drag"+e.toUpperCase(),n=this.visualElement.getProps(),i=n[r];return i||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){li(r=>{const{drag:n}=this.getProps();if(!hd(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]-tr(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!_l(r)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};li(o=>{const a=this.getAxisMotionValue(o);if(a){const l=a.get();i[o]=FM({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),li(o=>{if(!hd(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(tr(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;GM.set(this.visualElement,this);const e=this.visualElement.current,r=zs(e,"pointerdown",l=>{const{drag:c,dragListener:f=!0}=this.getProps();c&&f&&this.start(l)}),n=()=>{const{dragConstraints:l}=this.getProps();_l(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),n();const o=Bs(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(li(f=>{const u=this.getAxisMotionValue(f);u&&(this.originPoint[f]+=l[f].translate,u.set(u.get()+l[f].translate))}),this.visualElement.render())});return()=>{o(),r(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Ay,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function hd(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function YM(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}class QM extends na{constructor(e){super(e),this.removeGroupControls=fr,this.removeListeners=fr,this.controls=new KM(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fr}unmount(){this.removeGroupControls(),this.removeListeners()}}const uA=t=>(e,r)=>{t&&Vt.update(()=>t(e,r))};class JM extends na{constructor(){super(...arguments),this.removePointerDownListener=fr}onPointerDown(e){this.session=new N6(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$6(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:r,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:uA(e),onStart:uA(r),onMove:n,onEnd:(s,o)=>{delete this.session,i&&Vt.update(()=>i(s,o))}}}mount(){this.removePointerDownListener=zs(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function XM(){const t=y.useContext(H0);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,i=y.useId();return y.useEffect(()=>n(i),[]),!e&&r?[!1,()=>r&&r(i)]:[!0]}const Zd={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function dA(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Hc={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Pe.test(t))t=parseFloat(t);else return t;const r=dA(t,e.target.x),n=dA(t,e.target.y);return`${r}% ${n}%`}},ZM={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,i=Wo.parse(t);if(i.length>5)return n;const s=Wo.createTransformer(t),o=typeof i[0]!="number"?1:0,a=r.x.scale*e.x,l=r.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const c=tr(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}};class eN extends pr.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=e;aI(tN),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()})),Zd.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()||Vt.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function U6(t){const[e,r]=XM(),n=y.useContext(Cg);return pr.createElement(eN,{...t,layoutGroup:n,switchLayoutGroup:y.useContext(L4),isPresent:e,safeToRemove:r})}const tN={borderRadius:{...Hc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Hc,borderTopRightRadius:Hc,borderBottomLeftRadius:Hc,borderBottomRightRadius:Hc,boxShadow:ZM},z6=["TopLeft","TopRight","BottomLeft","BottomRight"],rN=z6.length,hA=t=>typeof t=="string"?parseFloat(t):t,vA=t=>typeof t=="number"||Pe.test(t);function nN(t,e,r,n,i,s){i?(t.opacity=tr(0,r.opacity!==void 0?r.opacity:1,iN(n)),t.opacityExit=tr(e.opacity!==void 0?e.opacity:1,0,sN(n))):s&&(t.opacity=tr(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(Zf(t,e,n))}function yA(t,e){t.min=e.min,t.max=e.max}function si(t,e){yA(t.x,e.x),yA(t.y,e.y)}function mA(t,e,r,n,i){return t-=e,t=Yh(t,1/r,n),i!==void 0&&(t=Yh(t,1/i,n)),t}function oN(t,e=0,r=1,n=.5,i,s=t,o=t){if(fs.test(e)&&(e=parseFloat(e),e=tr(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=tr(s.min,s.max,n);t===s&&(a-=e),t.min=mA(t.min,e,r,a,i),t.max=mA(t.max,e,r,a,i)}function gA(t,e,[r,n,i],s,o){oN(t,e[r],e[n],e[i],e.scale,s,o)}const aN=["x","scaleX","originX"],lN=["y","scaleY","originY"];function xA(t,e,r,n){gA(t.x,e,aN,r?r.x:void 0,n?n.x:void 0),gA(t.y,e,lN,r?r.y:void 0,n?n.y:void 0)}function bA(t){return t.translate===0&&t.scale===1}function H6(t){return bA(t.x)&&bA(t.y)}function cN(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 q6(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function wA(t){return Gn(t.x)/Gn(t.y)}class fN{constructor(){this.members=[]}add(e){$g(this.members,e),e.scheduleRender()}remove(e){if(Ug(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){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,r&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:r,resumingFrom:n}=e;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function AA(t,e,r){let n="";const i=t.x.translate/e.x,s=t.y.translate/e.y;if((i||s)&&(n=`translate3d(${i}px, ${s}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:l,rotateX:c,rotateY:f}=r;l&&(n+=`rotate(${l}deg) `),c&&(n+=`rotateX(${c}deg) `),f&&(n+=`rotateY(${f}deg) `)}const o=t.x.scale*e.x,a=t.y.scale*e.y;return(o!==1||a!==1)&&(n+=`scale(${o}, ${a})`),n||"none"}const uN=(t,e)=>t.depth-e.depth;class dN{constructor(){this.children=[],this.isDirty=!1}add(e){$g(this.children,e),this.isDirty=!0}remove(e){Ug(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(uN),this.isDirty=!1,this.children.forEach(e)}}function hN(t,e){const r=performance.now(),n=({timestamp:i})=>{const s=i-r;s>=e&&(Ys(n),t(s-e))};return Vt.read(n,!0),()=>Ys(n)}function vN(t){window.MotionDebug&&window.MotionDebug.record(t)}function pN(t){return t instanceof SVGElement&&t.tagName!=="svg"}function yN(t,e,r){const n=_n(t)?t:ic(t);return n.start(Bg("",n,e,r)),n.animation}const EA=["","X","Y","Z"],mN={visibility:"hidden"},SA=1e3;let gN=0;const pa={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function W6({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=gN++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!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.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,pa.totalNodes=pa.resolvedTargetDeltas=pa.recalculatedProjection=0,this.nodes.forEach(wN),this.nodes.forEach(kN),this.nodes.forEach(TN),this.nodes.forEach(AN),vN(pa)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=hN(d,250),Zd.hasAnimatedSinceResize&&(Zd.hasAnimatedSinceResize=!1,this.nodes.forEach(kA))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||f.getDefaultTransition()||ON,{onLayoutAnimationStart:x,onLayoutAnimationComplete:b}=f.getProps(),w=!this.targetLayout||!q6(this.targetLayout,p)||h,A=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||A||d&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,A);const R={...Fg(m,"layout"),onPlay:x,onComplete:b};(f.shouldReduceMotion||this.options.layoutRoot)&&(R.delay=0,R.type=!1),this.startAnimation(R)}else d||kA(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ys(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(PN),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;fthis.update()))}clearAllSnapshots(){this.nodes.forEach(EN),this.sharedNodes.forEach(RN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Vt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Vt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const N=R/1e3;TA(u.x,o.x,N),TA(u.y,o.y,N),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(kf(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),_N(this.relativeTarget,this.relativeTargetOrigin,d,N),A&&cN(this.relativeTarget,A)&&(this.isProjectionDirty=!1),A||(A=Ar()),si(A,this.relativeTarget)),m&&(this.animationValues=f,nN(f,c,this.latestValues,N,w,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ys(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Vt.update(()=>{Zd.hasAnimatedSinceResize=!0,this.currentAnimation=yN(0,SA,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(SA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:f}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&G6(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ar();const u=Gn(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const d=Gn(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}si(a,l),Ml(a,f),Cf(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new fN),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let f=0;f{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(CA),this.root.sharedNodes.clear()}}}function xN(t){t.updateLayout()}function bN(t){var e;const r=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&r&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=r.source!==t.layout.source;s==="size"?li(u=>{const d=o?r.measuredBox[u]:r.layoutBox[u],h=Gn(d);d.min=n[u].min,d.max=d.min+h}):G6(s,r.layoutBox,n)&&li(u=>{const d=o?r.measuredBox[u]:r.layoutBox[u],h=Gn(n[u]);d.max=d.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+h)});const a=Ol();Cf(a,n,r.layoutBox);const l=Ol();o?Cf(l,t.applyTransform(i,!0),r.measuredBox):Cf(l,n,r.layoutBox);const c=!H6(a);let f=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:h}=u;if(d&&h){const p=Ar();kf(p,r.layoutBox,d.layoutBox);const m=Ar();kf(m,n,h.layoutBox),q6(p,m)||(f=!0),u.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:f})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function wN(t){pa.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function AN(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function EN(t){t.clearSnapshot()}function CA(t){t.clearMeasurements()}function SN(t){t.isLayoutDirty=!1}function CN(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function kA(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function kN(t){t.resolveTargetDelta()}function TN(t){t.calcProjection()}function PN(t){t.resetRotation()}function RN(t){t.removeLeadSnapshot()}function TA(t,e,r){t.translate=tr(e.translate,0,r),t.scale=tr(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function PA(t,e,r,n){t.min=tr(e.min,r.min,n),t.max=tr(e.max,r.max,n)}function _N(t,e,r,n){PA(t.x,e.x,r.x,n),PA(t.y,e.y,r.y,n)}function IN(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const ON={duration:.45,ease:[.4,0,.1,1]},RA=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),_A=RA("applewebkit/")&&!RA("chrome/")?Math.round:fr;function IA(t){t.min=_A(t.min),t.max=_A(t.max)}function MN(t){IA(t.x),IA(t.y)}function G6(t,e,r){return t==="position"||t==="preserve-aspect"&&!wy(wA(e),wA(r),.2)}const NN=W6({attachResizeListener:(t,e)=>Bs(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),x1={current:void 0},K6=W6({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!x1.current){const t=new NN({});t.mount(window),t.setOptions({layoutScroll:!0}),x1.current=t}return x1.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),DN={pan:{Feature:JM},drag:{Feature:QM,ProjectionNode:K6,MeasureLayout:U6}},LN=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function jN(t){const e=LN.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function Cy(t,e,r=1){const[n,i]=jN(t);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);if(s){const o=s.trim();return _6(o)?parseFloat(o):o}else return vy(i)?Cy(i,e,r+1):i}function FN(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(i=>{const s=i.get();if(!vy(s))return;const o=Cy(s,n);o&&i.set(o)});for(const i in e){const s=e[i];if(!vy(s))continue;const o=Cy(s,n);o&&(e[i]=o,r||(r={}),r[i]===void 0&&(r[i]=s))}return{target:e,transitionEnd:r}}const BN=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Y6=t=>BN.has(t),$N=t=>Object.keys(t).some(Y6),OA=t=>t===Za||t===Pe,MA=(t,e)=>parseFloat(t.split(", ")[e]),NA=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/);if(i)return MA(i[1],e);{const s=n.match(/^matrix\((.+)\)$/);return s?MA(s[1],t):0}},UN=new Set(["x","y","z"]),zN=_u.filter(t=>!UN.has(t));function VN(t){const e=[];return zN.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 sc={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:NA(4,13),y:NA(5,14)};sc.translateX=sc.x;sc.translateY=sc.y;const HN=(t,e,r)=>{const n=e.measureViewportBox(),i=e.current,s=getComputedStyle(i),{display:o}=s,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(c=>{a[c]=sc[c](n,s)}),e.render();const l=e.measureViewportBox();return r.forEach(c=>{const f=e.getValue(c);f&&f.jump(a[c]),t[c]=sc[c](l,s)}),t},qN=(t,e,r={},n={})=>{e={...e},n={...n};const i=Object.keys(e).filter(Y6);let s=[],o=!1;const a=[];if(i.forEach(l=>{const c=t.getValue(l);if(!t.hasValue(l))return;let f=r[l],u=Vc(f);const d=e[l];let h;if(Hh(d)){const p=d.length,m=d[0]===null?1:0;f=d[m],u=Vc(f);for(let x=m;x=0?window.pageYOffset:null,c=HN(e,t,a);return s.length&&s.forEach(([f,u])=>{t.getValue(f).set(u)}),t.render(),q0&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:n}}else return{target:e,transitionEnd:n}};function WN(t,e,r,n){return $N(e)?qN(t,e,r,n):{target:e,transitionEnd:n}}const GN=(t,e,r,n)=>{const i=FN(t,e,n);return e=i.target,n=i.transitionEnd,WN(t,e,r,n)},ky={current:null},Q6={current:!1};function KN(){if(Q6.current=!0,!!q0)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ky.current=t.matches;t.addListener(e),e()}else ky.current=!1}function YN(t,e,r){const{willChange:n}=e;for(const i in e){const s=e[i],o=r[i];if(_n(s))t.addValue(i,s),Kh(n)&&n.add(i);else if(_n(o))t.addValue(i,ic(s,{owner:t})),Kh(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,ic(a!==void 0?a:s,{owner:t}))}}for(const i in r)e[i]===void 0&&t.removeValue(i);return e}const DA=new WeakMap,J6=Object.keys(Xf),QN=J6.length,LA=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],JN=Sg.length;class XN{constructor({parent:e,props:r,presenceContext:n,reducedMotionConfig:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},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=()=>Vt.render(this.render,!1,!0);const{latestValues:a,renderState:l}=s;this.latestValues=a,this.baseTarget={...a},this.initialValues=r.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=r,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.isControllingVariants=G0(r),this.isVariantNode=D4(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(r,{});for(const u in f){const d=f[u];a[u]!==void 0&&_n(d)&&(d.set(a[u],!1),Kh(c)&&c.add(u))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){this.current=e,DA.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,n)=>this.bindToMotionValue(n,r)),Q6.current||KN(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ky.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){DA.delete(this.current),this.projection&&this.projection.unmount(),Ys(this.notifyUpdate),Ys(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,r){const n=Xa.has(e),i=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Vt.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){let o,a;for(let l=0;lthis.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:s,layoutScroll:d,layoutRoot:h})}return a}updateFeatures(){for(const e in this.features){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ar()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}makeTargetAnimatable(e,r=!0){return this.makeTargetAnimatableFromInstance(e,this.props,r)}update(e,r){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;nr.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){this.values.delete(e);const r=this.valueSubscriptions.get(e);r&&(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=ic(r,{owner:this}),this.addValue(e,n)),n}readValue(e){var r;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(r=this.getBaseTargetFromProps(this.props,e))!==null&&r!==void 0?r: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=Og(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&&!_n(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 zg),this.events[e].add(r)}notify(e,...r){this.events[e]&&this.events[e].notify(...r)}}class X6 extends XN{sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){return e.style?e.style[r]:void 0}removeValueFromRenderState(e,{vars:r,style:n}){delete r[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:r,...n},{transformValues:i},s){let o=pM(n,e||{},this);if(i&&(r&&(r=i(r)),n&&(n=i(n)),o&&(o=i(o))),s){hM(this,n,o);const a=GN(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function ZN(t){return window.getComputedStyle(t)}class eD extends X6{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,r){if(Xa.has(r)){const n=jg(r);return n&&n.default||0}else{const n=ZN(e),i=(B4(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:r}){return B6(e,r)}build(e,r,n,i){Tg(e,r,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,r){return Ig(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;_n(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,i){q4(e,r,n,i)}}class tD extends X6{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){if(Xa.has(r)){const n=jg(r);return n&&n.default||0}return r=W4.has(r)?r:Ag(r),e.getAttribute(r)}measureInstanceViewportBox(){return Ar()}scrapeMotionValuesFromProps(e,r){return K4(e,r)}build(e,r,n,i){Rg(e,r,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,r,n,i){G4(e,r,n,i)}mount(e){this.isSVGTag=_g(e.tagName),super.mount(e)}}const rD=(t,e)=>kg(t)?new tD(e,{enableHardwareAcceleration:!1}):new eD(e,{enableHardwareAcceleration:!0}),nD={layout:{ProjectionNode:K6,MeasureLayout:U6}},iD={..._M,...QI,...DN,...nD},_a=sI((t,e)=>jI(t,e,iD,rD));function Z6(){const t=y.useRef(!1);return wg(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function sD(){const t=Z6(),[e,r]=y.useState(0),n=y.useCallback(()=>{t.current&&r(e+1)},[e]);return[y.useCallback(()=>Vt.postRender(n),[n]),e]}class oD extends y.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 aD({children:t,isPresent:e}){const r=y.useId(),n=y.useRef(null),i=y.useRef({width:0,height:0,top:0,left:0});return y.useInsertionEffect(()=>{const{width:s,height:o,top:a,left:l}=i.current;if(e||!n.current||!s||!o)return;n.current.dataset.motionPopId=r;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` +`+s.stack}return{value:t,source:e,stack:i,digest:null}}function s1(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function ty(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var S_=typeof WeakMap=="function"?WeakMap:Map;function i4(t,e,r){r=Us(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){Fh||(Fh=!0,uy=n),ty(t,e)},r}function s4(t,e,r){r=Us(-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(){ty(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){ty(t,e),typeof n!="function"&&(Do===null?Do=new Set([this]):Do.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function v2(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new S_;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=F_.bind(null,t,e,r),e.then(t,t))}function p2(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 y2(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=Us(-1,1),e.tag=2,No(r,e,1))),r.lanes|=1),t)}var C_=no.ReactCurrentOwner,Cn=!1;function yn(t,e,r,n){e.child=t===null?N3(e,null,r,n):ec(e,t.child,r,n)}function m2(t,e,r,n,i){r=r.render;var s=e.ref;return Ul(e,i),n=og(t,e,r,n,s,i),r=ag(),t!==null&&!Cn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Ks(t,e,i)):(Yt&&r&&Km(e),e.flags|=1,yn(t,e,n,i),e.child)}function g2(t,e,r,n,i){if(t===null){var s=r.type;return typeof s=="function"&&!mg(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=s,o4(t,e,s,n,i)):(t=Jd(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:Uf,r(o,n)&&t.ref===e.ref)return Ks(t,e,i)}return e.flags|=1,t=jo(s,n),t.ref=e.ref,t.return=e,e.child=t}function o4(t,e,r,n,i){if(t!==null){var s=t.memoizedProps;if(Uf(s,n)&&t.ref===e.ref)if(Cn=!1,e.pendingProps=n=s,(t.lanes&i)!==0)t.flags&131072&&(Cn=!0);else return e.lanes=t.lanes,Ks(t,e,i)}return ry(t,e,r,n,i)}function a4(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},zt(Rl,Ln),Ln|=r;else{if(!(r&1073741824))return t=s!==null?s.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,zt(Rl,Ln),Ln|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,zt(Rl,Ln),Ln|=n}else s!==null?(n=s.baseLanes|r,e.memoizedState=null):n=r,zt(Rl,Ln),Ln|=n;return yn(t,e,i,r),e.child}function l4(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function ry(t,e,r,n,i){var s=Tn(r)?La:an.current;return s=Xl(e,s),Ul(e,i),r=og(t,e,r,n,s,i),n=ag(),t!==null&&!Cn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Ks(t,e,i)):(Yt&&n&&Km(e),e.flags|=1,yn(t,e,r,i),e.child)}function x2(t,e,r,n,i){if(Tn(r)){var s=!0;Ph(e)}else s=!1;if(Ul(e,i),e.stateNode===null)Kd(t,e),n4(e,r,n),ey(e,r,n,i),n=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=r.contextType;typeof c=="object"&&c!==null?c=yi(c):(c=Tn(r)?La:an.current,c=Xl(e,c));var f=r.getDerivedStateFromProps,u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==c)&&h2(e,o,n,c),wo=!1;var d=e.memoizedState;o.state=d,Mh(e,n,o,i),l=e.memoizedState,a!==n||d!==l||kn.current||wo?(typeof f=="function"&&(Zp(e,r,f,n),l=e.memoizedState),(a=wo||d2(e,r,a,n,d,l,c))?(u||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),o.props=n,o.state=l,o.context=c,n=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,L3(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:Pi(e.type,a),o.props=c,u=e.pendingProps,d=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=yi(l):(l=Tn(r)?La:an.current,l=Xl(e,l));var h=r.getDerivedStateFromProps;(f=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||d!==l)&&h2(e,o,n,l),wo=!1,d=e.memoizedState,o.state=d,Mh(e,n,o,i);var p=e.memoizedState;a!==u||d!==p||kn.current||wo?(typeof h=="function"&&(Zp(e,r,h,n),p=e.memoizedState),(c=wo||d2(e,r,c,n,d,p,l)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,p,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,p,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=p),o.props=n,o.state=p,o.context=l,n=c):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),n=!1)}return ny(t,e,r,n,s,i)}function ny(t,e,r,n,i,s){l4(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return i&&i2(e,r,!1),Ks(t,e,s);n=e.stateNode,C_.current=e;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=ec(e,t.child,null,s),e.child=ec(e,null,a,s)):yn(t,e,a,s),e.memoizedState=n.state,i&&i2(e,r,!0),e.child}function c4(t){var e=t.stateNode;e.pendingContext?n2(t,e.pendingContext,e.pendingContext!==e.context):e.context&&n2(t,e.context,!1),rg(t,e.containerInfo)}function b2(t,e,r,n,i){return Zl(),Qm(i),e.flags|=256,yn(t,e,r,n),e.child}var iy={dehydrated:null,treeContext:null,retryLane:0};function sy(t){return{baseLanes:t,cachePool:null,transitions:null}}function f4(t,e,r){var n=e.pendingProps,i=Zt.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),zt(Zt,i&1),t===null)return Jp(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=B0(o,n,0,null),t=Ra(t,n,r,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=sy(r),e.memoizedState=iy,t):fg(e,o));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return k_(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=jo(i,l),n.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=jo(a,s):(s=Ra(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?sy(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~r,e.memoizedState=iy,n}return s=t.child,t=s.sibling,n=jo(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 fg(t,e){return e=B0({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function od(t,e,r,n){return n!==null&&Qm(n),ec(e,t.child,null,r),t=fg(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function k_(t,e,r,n,i,s,o){if(r)return e.flags&256?(e.flags&=-257,n=s1(Error(ue(422))),od(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=n.fallback,i=e.mode,n=B0({mode:"visible",children:n.children},i,0,null),s=Ra(s,i,o,null),s.flags|=2,n.return=e,s.return=e,n.sibling=s,e.child=n,e.mode&1&&ec(e,t.child,null,o),e.child.memoizedState=sy(o),e.memoizedState=iy,s);if(!(e.mode&1))return od(t,e,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var a=n.dgst;return n=a,s=Error(ue(419)),n=s1(s,n,void 0),od(t,e,o,n)}if(a=(o&t.childLanes)!==0,Cn||a){if(n=$r,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,Gs(t,i),Li(n,t,i,-1))}return yg(),n=s1(Error(ue(421))),od(t,e,o,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=B_.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,Vn=Mo(i.nextSibling),qn=e,Yt=!0,Mi=null,t!==null&&(di[hi++]=js,di[hi++]=Fs,di[hi++]=ja,js=t.id,Fs=t.overflow,ja=e),e=fg(e,n.children),e.flags|=4096,e)}function w2(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Xp(t.return,e,r)}function o1(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 u4(t,e,r){var n=e.pendingProps,i=n.revealOrder,s=n.tail;if(yn(t,e,n.children,r),n=Zt.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&&w2(t,r,e);else if(t.tag===19)w2(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(zt(Zt,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&&Nh(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),o1(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&&Nh(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}o1(e,!0,r,null,s);break;case"together":o1(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Kd(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Ks(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Ba|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(ue(153));if(e.child!==null){for(t=e.child,r=jo(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=jo(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function T_(t,e,r){switch(e.tag){case 3:c4(e),Zl();break;case 5:j3(e);break;case 1:Tn(e.type)&&Ph(e);break;case 4:rg(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;zt(Ih,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(zt(Zt,Zt.current&1),e.flags|=128,null):r&e.child.childLanes?f4(t,e,r):(zt(Zt,Zt.current&1),t=Ks(t,e,r),t!==null?t.sibling:null);zt(Zt,Zt.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return u4(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),zt(Zt,Zt.current),n)break;return null;case 22:case 23:return e.lanes=0,a4(t,e,r)}return Ks(t,e,r)}var d4,oy,h4,v4;d4=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}};oy=function(){};h4=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,wa(cs.current);var s=null;switch(r){case"input":i=Pp(t,i),n=Pp(t,n),s=[];break;case"select":i=nr({},i,{value:void 0}),n=nr({},n,{value:void 0}),s=[];break;case"textarea":i=Ip(t,i),n=Ip(t,n),s=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=kh)}Mp(r,n);var o;r=null;for(c in i)if(!n.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Nf.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in n){var l=n[c];if(a=i!=null?i[c]:void 0,n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(s||(s=[]),s.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Nf.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Ht("scroll",t),s||a===l||(s=[])):(s=s||[]).push(c,l))}r&&(s=s||[]).push("style",r);var c=s;(e.updateQueue=c)&&(e.flags|=4)}};v4=function(t,e,r,n){r!==n&&(e.flags|=4)};function Uc(t,e){if(!Yt)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 en(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 P_(t,e,r){var n=e.pendingProps;switch(Ym(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return en(e),null;case 1:return Tn(e.type)&&Th(),en(e),null;case 3:return n=e.stateNode,tc(),Wt(kn),Wt(an),ig(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(id(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Mi!==null&&(vy(Mi),Mi=null))),oy(t,e),en(e),null;case 5:ng(e);var i=wa(Wf.current);if(r=e.type,t!==null&&e.stateNode!=null)h4(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(ue(166));return en(e),null}if(t=wa(cs.current),id(e)){n=e.stateNode,r=e.type;var s=e.memoizedProps;switch(n[es]=e,n[qf]=s,t=(e.mode&1)!==0,r){case"dialog":Ht("cancel",n),Ht("close",n);break;case"iframe":case"object":case"embed":Ht("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[es]=e,t[qf]=n,d4(t,e,!1,!1),e.stateNode=t;e:{switch(o=Np(r,n),r){case"dialog":Ht("cancel",t),Ht("close",t),i=n;break;case"iframe":case"object":case"embed":Ht("load",t),i=n;break;case"video":case"audio":for(i=0;inc&&(e.flags|=128,n=!0,Uc(s,!1),e.lanes=4194304)}else{if(!n)if(t=Nh(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Uc(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Yt)return en(e),null}else 2*br()-s.renderingStartTime>nc&&r!==1073741824&&(e.flags|=128,n=!0,Uc(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=br(),e.sibling=null,r=Zt.current,zt(Zt,n?r&1|2:r&1),e):(en(e),null);case 22:case 23:return pg(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?Ln&1073741824&&(en(e),e.subtreeFlags&6&&(e.flags|=8192)):en(e),null;case 24:return null;case 25:return null}throw Error(ue(156,e.tag))}function R_(t,e){switch(Ym(e),e.tag){case 1:return Tn(e.type)&&Th(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return tc(),Wt(kn),Wt(an),ig(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return ng(e),null;case 13:if(Wt(Zt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ue(340));Zl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Wt(Zt),null;case 4:return tc(),null;case 10:return Zm(e.type._context),null;case 22:case 23:return pg(),null;case 24:return null;default:return null}}var ad=!1,rn=!1,__=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Pl(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ar(t,e,n)}else r.current=null}function ay(t,e,r){try{r()}catch(n){ar(t,e,n)}}var E2=!1;function I_(t,e){if(qp=Ah,t=x3(),Gm(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,c=0,f=0,u=t,d=null;t:for(;;){for(var h;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),(h=u.firstChild)!==null;)d=u,u=h;for(;;){if(u===t)break t;if(d===r&&++c===i&&(a=o),d===s&&++f===n&&(l=o),(h=u.nextSibling)!==null)break;u=d,d=u.parentNode}u=h}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Hp={focusedElem:t,selectionRange:r},Ah=!1,xe=e;xe!==null;)if(e=xe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,xe=t;else for(;xe!==null;){e=xe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,x=p.memoizedState,b=e.stateNode,w=b.getSnapshotBeforeUpdate(e.elementType===e.type?m:Pi(e.type,m),x);b.__reactInternalSnapshotBeforeUpdate=w}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(ue(163))}}catch(R){ar(e,e.return,R)}if(t=e.sibling,t!==null){t.return=e.return,xe=t;break}xe=e.return}return p=E2,E2=!1,p}function bf(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&&ay(e,r,s)}i=i.next}while(i!==n)}}function j0(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 ly(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 p4(t){var e=t.alternate;e!==null&&(t.alternate=null,p4(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[es],delete e[qf],delete e[Kp],delete e[h_],delete e[v_])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function y4(t){return t.tag===5||t.tag===3||t.tag===4}function A2(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||y4(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 cy(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=kh));else if(n!==4&&(t=t.child,t!==null))for(cy(t,e,r),t=t.sibling;t!==null;)cy(t,e,r),t=t.sibling}function fy(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(fy(t,e,r),t=t.sibling;t!==null;)fy(t,e,r),t=t.sibling}var Wr=null,_i=!1;function uo(t,e,r){for(r=r.child;r!==null;)m4(t,e,r),r=r.sibling}function m4(t,e,r){if(ls&&typeof ls.onCommitFiberUnmount=="function")try{ls.onCommitFiberUnmount(R0,r)}catch{}switch(r.tag){case 5:rn||Pl(r,e);case 6:var n=Wr,i=_i;Wr=null,uo(t,e,r),Wr=n,_i=i,Wr!==null&&(_i?(t=Wr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Wr.removeChild(r.stateNode));break;case 18:Wr!==null&&(_i?(t=Wr,r=r.stateNode,t.nodeType===8?Zv(t.parentNode,r):t.nodeType===1&&Zv(t,r),Bf(t)):Zv(Wr,r.stateNode));break;case 4:n=Wr,i=_i,Wr=r.stateNode.containerInfo,_i=!0,uo(t,e,r),Wr=n,_i=i;break;case 0:case 11:case 14:case 15:if(!rn&&(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)&&ay(r,e,o),i=i.next}while(i!==n)}uo(t,e,r);break;case 1:if(!rn&&(Pl(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){ar(r,e,a)}uo(t,e,r);break;case 21:uo(t,e,r);break;case 22:r.mode&1?(rn=(n=rn)||r.memoizedState!==null,uo(t,e,r),rn=n):uo(t,e,r);break;default:uo(t,e,r)}}function S2(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new __),e.forEach(function(n){var i=$_.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Ai(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~s}if(n=i,n=br()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*M_(n/1960))-n,10t?16:t,Po===null)var n=!1;else{if(t=Po,Po=null,Bh=0,et&6)throw Error(ue(331));var i=et;for(et|=4,xe=t.current;xe!==null;){var s=xe,o=s.child;if(xe.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lbr()-hg?Pa(t,0):dg|=r),Pn(t,e)}function C4(t,e){e===0&&(t.mode&1?(e=Xu,Xu<<=1,!(Xu&130023424)&&(Xu=4194304)):e=1);var r=gn();t=Gs(t,e),t!==null&&(ku(t,e,r),Pn(t,r))}function B_(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),C4(t,r)}function $_(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(ue(314))}n!==null&&n.delete(e),C4(t,r)}var k4;k4=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||kn.current)Cn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Cn=!1,T_(t,e,r);Cn=!!(t.flags&131072)}else Cn=!1,Yt&&e.flags&1048576&&_3(e,_h,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Kd(t,e),t=e.pendingProps;var i=Xl(e,an.current);Ul(e,r),i=og(null,e,n,t,i,r);var s=ag();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,Ph(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,tg(e),i.updater=L0,e.stateNode=i,i._reactInternals=e,ey(e,n,t,r),e=ny(null,e,n,!0,s,r)):(e.tag=0,Yt&&s&&Km(e),yn(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Kd(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=z_(n),t=Pi(n,t),i){case 0:e=ry(null,e,n,t,r);break e;case 1:e=x2(null,e,n,t,r);break e;case 11:e=m2(null,e,n,t,r);break e;case 14:e=g2(null,e,n,Pi(n.type,t),r);break e}throw Error(ue(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Pi(n,i),ry(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Pi(n,i),x2(t,e,n,i,r);case 3:e:{if(c4(e),t===null)throw Error(ue(387));n=e.pendingProps,s=e.memoizedState,i=s.element,L3(t,e),Mh(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=rc(Error(ue(423)),e),e=b2(t,e,n,r,i);break e}else if(n!==i){i=rc(Error(ue(424)),e),e=b2(t,e,n,r,i);break e}else for(Vn=Mo(e.stateNode.containerInfo.firstChild),qn=e,Yt=!0,Mi=null,r=N3(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Zl(),n===i){e=Ks(t,e,r);break e}yn(t,e,n,r)}e=e.child}return e;case 5:return j3(e),t===null&&Jp(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,Wp(n,i)?o=null:s!==null&&Wp(n,s)&&(e.flags|=32),l4(t,e),yn(t,e,o,r),e.child;case 6:return t===null&&Jp(e),null;case 13:return f4(t,e,r);case 4:return rg(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=ec(e,null,n,r):yn(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Pi(n,i),m2(t,e,n,i,r);case 7:return yn(t,e,e.pendingProps,r),e.child;case 8:return yn(t,e,e.pendingProps.children,r),e.child;case 12:return yn(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,zt(Ih,n._currentValue),n._currentValue=o,s!==null)if(Bi(s.value,o)){if(s.children===i.children&&!kn.current){e=Ks(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=Us(-1,r&-r),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),Xp(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(ue(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),Xp(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}yn(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,Ul(e,r),i=yi(i),n=n(i),e.flags|=1,yn(t,e,n,r),e.child;case 14:return n=e.type,i=Pi(n,e.pendingProps),i=Pi(n.type,i),g2(t,e,n,i,r);case 15:return o4(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Pi(n,i),Kd(t,e),e.tag=1,Tn(n)?(t=!0,Ph(e)):t=!1,Ul(e,r),n4(e,n,i),ey(e,n,i,r),ny(null,e,n,!0,t,r);case 19:return u4(t,e,r);case 22:return a4(t,e,r)}throw Error(ue(156,e.tag))};function T4(t,e){return e3(t,e)}function U_(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 vi(t,e,r,n){return new U_(t,e,r,n)}function mg(t){return t=t.prototype,!(!t||!t.isReactComponent)}function z_(t){if(typeof t=="function")return mg(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Lm)return 11;if(t===jm)return 14}return 2}function jo(t,e){var r=t.alternate;return r===null?(r=vi(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 Jd(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")mg(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case xl:return Ra(r.children,i,s,e);case Dm:o=8,i|=8;break;case Sp:return t=vi(12,r,e,i|2),t.elementType=Sp,t.lanes=s,t;case Cp:return t=vi(13,r,e,i),t.elementType=Cp,t.lanes=s,t;case kp:return t=vi(19,r,e,i),t.elementType=kp,t.lanes=s,t;case jk:return B0(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Dk:o=10;break e;case Lk:o=9;break e;case Lm:o=11;break e;case jm:o=14;break e;case bo:o=16,n=null;break e}throw Error(ue(130,t==null?t:typeof t,""))}return e=vi(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function Ra(t,e,r,n){return t=vi(7,t,n,e),t.lanes=r,t}function B0(t,e,r,n){return t=vi(22,t,n,e),t.elementType=jk,t.lanes=r,t.stateNode={isHidden:!1},t}function a1(t,e,r){return t=vi(6,t,null,e),t.lanes=r,t}function l1(t,e,r){return e=vi(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function V_(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zv(0),this.expirationTimes=zv(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zv(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gg(t,e,r,n,i,s,o,a,l){return t=new V_(t,e,r,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=vi(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},tg(s),t}function q_(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(I4)}catch(t){console.error(t)}}I4(),Ik.exports=Jn;var io=Ik.exports;const O4=ro(io),Y_=mk({__proto__:null,default:O4},[io]);var O2=io;Ep.createRoot=O2.createRoot,Ep.hydrateRoot=O2.hydrateRoot;const M4=y.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),q0=y.createContext({}),H0=y.createContext(null),W0=typeof document<"u",Eg=W0?y.useLayoutEffect:y.useEffect,N4=y.createContext({strict:!1}),Ag=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),Q_="framerAppearId",D4="data-"+Ag(Q_);function J_(t,e,r,n){const{visualElement:i}=y.useContext(q0),s=y.useContext(N4),o=y.useContext(H0),a=y.useContext(M4).reducedMotion,l=y.useRef();n=n||s.renderer,!l.current&&n&&(l.current=n(t,{visualState:e,parent:i,props:r,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;y.useInsertionEffect(()=>{c&&c.update(r,o)});const f=y.useRef(!!(r[D4]&&!window.HandoffComplete));return Eg(()=>{c&&(c.render(),f.current&&c.animationState&&c.animationState.animateChanges())}),y.useEffect(()=>{c&&(c.updateFeatures(),!f.current&&c.animationState&&c.animationState.animateChanges(),f.current&&(f.current=!1,window.HandoffComplete=!0))}),c}function _l(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function X_(t,e,r){return y.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):_l(r)&&(r.current=n))},[e])}function Jf(t){return typeof t=="string"||Array.isArray(t)}function G0(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Sg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Cg=["initial",...Sg];function K0(t){return G0(t.animate)||Cg.some(e=>Jf(t[e]))}function L4(t){return!!(K0(t)||t.variants)}function Z_(t,e){if(K0(t)){const{initial:r,animate:n}=t;return{initial:r===!1||Jf(r)?r:void 0,animate:Jf(n)?n:void 0}}return t.inherit!==!1?e:{}}function eI(t){const{initial:e,animate:r}=Z_(t,y.useContext(q0));return y.useMemo(()=>({initial:e,animate:r}),[M2(e),M2(r)])}function M2(t){return Array.isArray(t)?t.join(" "):t}const N2={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Xf={};for(const t in N2)Xf[t]={isEnabled:e=>N2[t].some(r=>!!e[r])};function tI(t){for(const e in t)Xf[e]={...Xf[e],...t[e]}}const kg=y.createContext({}),j4=y.createContext({}),rI=Symbol.for("motionComponentSymbol");function nI({preloadedFeatures:t,createVisualElement:e,useRender:r,useVisualState:n,Component:i}){t&&tI(t);function s(a,l){let c;const f={...y.useContext(M4),...a,layoutId:iI(a)},{isStatic:u}=f,d=eI(a),h=n(a,u);if(!u&&W0){d.visualElement=J_(i,h,f,e);const p=y.useContext(j4),m=y.useContext(N4).strict;d.visualElement&&(c=d.visualElement.loadFeatures(f,m,t,p))}return y.createElement(q0.Provider,{value:d},c&&d.visualElement?y.createElement(c,{visualElement:d.visualElement,...f}):null,r(i,a,X_(h,d.visualElement,l),h,u,d.visualElement))}const o=y.forwardRef(s);return o[rI]=i,o}function iI({layoutId:t}){const e=y.useContext(kg).id;return e&&t!==void 0?e+"-"+t:t}function sI(t){function e(n,i={}){return nI(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 oI=["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 Tg(t){return typeof t!="string"||t.includes("-")?!1:!!(oI.indexOf(t)>-1||/[A-Z]/.test(t))}const zh={};function aI(t){Object.assign(zh,t)}const _u=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xa=new Set(_u);function F4(t,{layout:e,layoutId:r}){return Xa.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!zh[t]||t==="opacity")}const _n=t=>!!(t&&t.getVelocity),lI={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},cI=_u.length;function fI(t,{enableHardwareAcceleration:e=!0,allowTransformNone:r=!0},n,i){let s="";for(let o=0;oe=>typeof e=="string"&&e.startsWith(t),$4=B4("--"),py=B4("var(--"),uI=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,dI=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Ho=(t,e,r)=>Math.min(Math.max(r,t),e),Za={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Af={...Za,transform:t=>Ho(0,1,t)},fd={...Za,default:1},Sf=t=>Math.round(t*1e5)/1e5,Y0=/(-)?([\d]*\.?[\d])+/g,U4=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,hI=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Iu(t){return typeof t=="string"}const Ou=t=>({test:e=>Iu(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),yo=Ou("deg"),fs=Ou("%"),Pe=Ou("px"),vI=Ou("vh"),pI=Ou("vw"),D2={...fs,parse:t=>fs.parse(t)/100,transform:t=>fs.transform(t*100)},L2={...Za,transform:Math.round},z4={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:yo,rotateX:yo,rotateY:yo,rotateZ:yo,scale:fd,scaleX:fd,scaleY:fd,scaleZ:fd,skew:yo,skewX:yo,skewY:yo,distance:Pe,translateX:Pe,translateY:Pe,translateZ:Pe,x:Pe,y:Pe,z:Pe,perspective:Pe,transformPerspective:Pe,opacity:Af,originX:D2,originY:D2,originZ:Pe,zIndex:L2,fillOpacity:Af,strokeOpacity:Af,numOctaves:L2};function Pg(t,e,r,n){const{style:i,vars:s,transform:o,transformOrigin:a}=t;let l=!1,c=!1,f=!0;for(const u in e){const d=e[u];if($4(u)){s[u]=d;continue}const h=z4[u],p=dI(d,h);if(Xa.has(u)){if(l=!0,o[u]=p,!f)continue;d!==(h.default||0)&&(f=!1)}else u.startsWith("origin")?(c=!0,a[u]=p):i[u]=p}if(e.transform||(l||n?i.transform=fI(t.transform,r,f,n):i.transform&&(i.transform="none")),c){const{originX:u="50%",originY:d="50%",originZ:h=0}=a;i.transformOrigin=`${u} ${d} ${h}`}}const Rg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function V4(t,e,r){for(const n in e)!_n(e[n])&&!F4(n,r)&&(t[n]=e[n])}function yI({transformTemplate:t},e,r){return y.useMemo(()=>{const n=Rg();return Pg(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function mI(t,e,r){const n=t.style||{},i={};return V4(i,n,t),Object.assign(i,yI(t,e,r)),t.transformValues?t.transformValues(i):i}function gI(t,e,r){const n={},i=mI(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 xI=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Vh(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||xI.has(t)}let q4=t=>!Vh(t);function bI(t){t&&(q4=e=>e.startsWith("on")?!Vh(e):t(e))}try{bI(require("@emotion/is-prop-valid").default)}catch{}function wI(t,e,r){const n={};for(const i in t)i==="values"&&typeof t.values=="object"||(q4(i)||r===!0&&Vh(i)||!e&&!Vh(i)||t.draggable&&i.startsWith("onDrag"))&&(n[i]=t[i]);return n}function j2(t,e,r){return typeof t=="string"?t:Pe.transform(e+r*t)}function EI(t,e,r){const n=j2(e,t.x,t.width),i=j2(r,t.y,t.height);return`${n} ${i}`}const AI={offset:"stroke-dashoffset",array:"stroke-dasharray"},SI={offset:"strokeDashoffset",array:"strokeDasharray"};function CI(t,e,r=1,n=0,i=!0){t.pathLength=1;const s=i?AI:SI;t[s.offset]=Pe.transform(-n);const o=Pe.transform(e),a=Pe.transform(r);t[s.array]=`${o} ${a}`}function _g(t,{attrX:e,attrY:r,attrScale:n,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},f,u,d){if(Pg(t,c,f,d),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:p,dimensions:m}=t;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(i!==void 0||s!==void 0||p.transform)&&(p.transformOrigin=EI(m,i!==void 0?i:.5,s!==void 0?s:.5)),e!==void 0&&(h.x=e),r!==void 0&&(h.y=r),n!==void 0&&(h.scale=n),o!==void 0&&CI(h,o,a,l,!1)}const H4=()=>({...Rg(),attrs:{}}),Ig=t=>typeof t=="string"&&t.toLowerCase()==="svg";function kI(t,e,r,n){const i=y.useMemo(()=>{const s=H4();return _g(s,e,{enableHardwareAcceleration:!1},Ig(n),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};V4(s,t.style,t),i.style={...s,...i.style}}return i}function TI(t=!1){return(r,n,i,{latestValues:s},o)=>{const l=(Tg(r)?kI:gI)(n,s,o,r),f={...wI(n,typeof r=="string",t),...l,ref:i},{children:u}=n,d=y.useMemo(()=>_n(u)?u.get():u,[u]);return y.createElement(r,{...f,children:d})}}function W4(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 G4=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 K4(t,e,r,n){W4(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(G4.has(i)?i:Ag(i),e.attrs[i])}function Og(t,e){const{style:r}=t,n={};for(const i in r)(_n(r[i])||e.style&&_n(e.style[i])||F4(i,t))&&(n[i]=r[i]);return n}function Y4(t,e){const r=Og(t,e);for(const n in t)if(_n(t[n])||_n(e[n])){const i=_u.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;r[i]=t[n]}return r}function Mg(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}function Q4(t){const e=y.useRef(null);return e.current===null&&(e.current=t()),e.current}const qh=t=>Array.isArray(t),PI=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),RI=t=>qh(t)?t[t.length-1]||0:t;function Xd(t){const e=_n(t)?t.get():t;return PI(e)?e.toValue():e}function _I({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,i,s){const o={latestValues:II(n,i,s,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const J4=t=>(e,r)=>{const n=y.useContext(q0),i=y.useContext(H0),s=()=>_I(t,e,n,i);return r?s():Q4(s)};function II(t,e,r,n){const i={},s=n(t,{});for(const d in s)i[d]=Xd(s[d]);let{initial:o,animate:a}=t;const l=K0(t),c=L4(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let f=r?r.initial===!1:!1;f=f||o===!1;const u=f?a:o;return u&&typeof u!="boolean"&&!G0(u)&&(Array.isArray(u)?u:[u]).forEach(h=>{const p=Mg(t,h);if(!p)return;const{transitionEnd:m,transition:x,...b}=p;for(const w in b){let E=b[w];if(Array.isArray(E)){const R=f?E.length-1:0;E=E[R]}E!==null&&(i[w]=E)}for(const w in m)i[w]=m[w]}),i}const fr=t=>t;class F2{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const r=this.order.indexOf(e);r!==-1&&(this.order.splice(r,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function OI(t){let e=new F2,r=new F2,n=0,i=!1,s=!1;const o=new WeakSet,a={schedule:(l,c=!1,f=!1)=>{const u=f&&i,d=u?e:r;return c&&o.add(l),d.add(l)&&u&&i&&(n=e.order.length),l},cancel:l=>{r.remove(l),o.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[e,r]=[r,e],r.clear(),n=e.order.length,n)for(let c=0;c(u[d]=OI(()=>r=!0),u),{}),o=u=>s[u].process(i),a=()=>{const u=performance.now();r=!1,i.delta=n?1e3/60:Math.max(Math.min(u-i.timestamp,MI),1),i.timestamp=u,i.isProcessing=!0,ud.forEach(o),i.isProcessing=!1,r&&e&&(n=!1,t(a))},l=()=>{r=!0,n=!0,i.isProcessing||t(a)};return{schedule:ud.reduce((u,d)=>{const h=s[d];return u[d]=(p,m=!1,x=!1)=>(r||l(),h.schedule(p,m,x)),u},{}),cancel:u=>ud.forEach(d=>s[d].cancel(u)),state:i,steps:s}}const{schedule:Vt,cancel:Ys,state:tn,steps:c1}=NI(typeof requestAnimationFrame<"u"?requestAnimationFrame:fr,!0),DI={useVisualState:J4({scrapeMotionValuesFromProps:Y4,createRenderState:H4,onMount:(t,e,{renderState:r,latestValues:n})=>{Vt.read(()=>{try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}}),Vt.render(()=>{_g(r,n,{enableHardwareAcceleration:!1},Ig(e.tagName),t.transformTemplate),K4(e,r)})}})},LI={useVisualState:J4({scrapeMotionValuesFromProps:Og,createRenderState:Rg})};function jI(t,{forwardMotionProps:e=!1},r,n){return{...Tg(t)?DI:LI,preloadedFeatures:r,useRender:TI(e),createVisualElement:n,Component:t}}function Bs(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}const X4=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Q0(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const FI=t=>e=>X4(e)&&t(e,Q0(e));function zs(t,e,r,n){return Bs(t,e,FI(r),n)}const BI=(t,e)=>r=>e(t(r)),Fo=(...t)=>t.reduce(BI);function Z4(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const B2=Z4("dragHorizontal"),$2=Z4("dragVertical");function e6(t){let e=!1;if(t==="y")e=$2();else if(t==="x")e=B2();else{const r=B2(),n=$2();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function t6(){const t=e6(!0);return t?(t(),!1):!0}class na{constructor(e){this.isMounted=!1,this.node=e}update(){}}function U2(t,e){const r="pointer"+(e?"enter":"leave"),n="onHover"+(e?"Start":"End"),i=(s,o)=>{if(s.pointerType==="touch"||t6())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[n]&&Vt.update(()=>a[n](s,o))};return zs(t.current,r,i,{passive:!t.getProps()[n]})}class $I extends na{mount(){this.unmount=Fo(U2(this.node,!0),U2(this.node,!1))}unmount(){}}class UI extends na{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Fo(Bs(this.node.current,"focus",()=>this.onFocus()),Bs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const r6=(t,e)=>e?t===e?!0:r6(t,e.parentElement):!1;function f1(t,e){if(!e)return;const r=new PointerEvent("pointer"+t);e(r,Q0(r))}class zI extends na{constructor(){super(...arguments),this.removeStartListeners=fr,this.removeEndListeners=fr,this.removeAccessibleListeners=fr,this.startPointerPress=(e,r)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),s=zs(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:f,globalTapTarget:u}=this.node.getProps();Vt.update(()=>{!u&&!r6(this.node.current,a.target)?f&&f(a,l):c&&c(a,l)})},{passive:!(n.onTap||n.onPointerUp)}),o=zs(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Fo(s,o),this.startPress(e,r)},this.startAccessiblePress=()=>{const e=s=>{if(s.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||f1("up",(l,c)=>{const{onTap:f}=this.node.getProps();f&&Vt.update(()=>f(l,c))})};this.removeEndListeners(),this.removeEndListeners=Bs(this.node.current,"keyup",o),f1("down",(a,l)=>{this.startPress(a,l)})},r=Bs(this.node.current,"keydown",e),n=()=>{this.isPressing&&f1("cancel",(s,o)=>this.cancelPress(s,o))},i=Bs(this.node.current,"blur",n);this.removeAccessibleListeners=Fo(r,i)}}startPress(e,r){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Vt.update(()=>n(e,r))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!t6()}cancelPress(e,r){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Vt.update(()=>n(e,r))}mount(){const e=this.node.getProps(),r=zs(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=Bs(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Fo(r,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const yy=new WeakMap,u1=new WeakMap,VI=t=>{const e=yy.get(t.target);e&&e(t)},qI=t=>{t.forEach(VI)};function HI({root:t,...e}){const r=t||document;u1.has(r)||u1.set(r,{});const n=u1.get(r),i=JSON.stringify(e);return n[i]||(n[i]=new IntersectionObserver(qI,{root:t,...e})),n[i]}function WI(t,e,r){const n=HI(e);return yy.set(t,r),n.observe(t),()=>{yy.delete(t),n.unobserve(t)}}const GI={some:0,all:1};class KI extends na{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:r,margin:n,amount:i="some",once:s}=e,o={root:r?r.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:GI[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:f,onViewportLeave:u}=this.node.getProps(),d=c?f:u;d&&d(l)};return WI(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:r}=this.node;["amount","margin","root"].some(YI(e,r))&&this.startObserver()}unmount(){}}function YI({viewport:t={}},{viewport:e={}}={}){return r=>t[r]!==e[r]}const QI={inView:{Feature:KI},tap:{Feature:zI},focus:{Feature:UI},hover:{Feature:$I}};function n6(t,e){if(!Array.isArray(e))return!1;const r=e.length;if(r!==t.length)return!1;for(let n=0;ne[n]=r.get()),e}function XI(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function J0(t,e,r){const n=t.getProps();return Mg(n,e,r!==void 0?r:n.custom,JI(t),XI(t))}let ZI=fr,Ng=fr;const Bo=t=>t*1e3,Vs=t=>t/1e3,eO={current:!1},i6=t=>Array.isArray(t)&&typeof t[0]=="number";function s6(t){return!!(!t||typeof t=="string"&&o6[t]||i6(t)||Array.isArray(t)&&t.every(s6))}const cf=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,o6={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cf([0,.65,.55,1]),circOut:cf([.55,0,1,.45]),backIn:cf([.31,.01,.66,-.59]),backOut:cf([.33,1.53,.69,.99])};function a6(t){if(t)return i6(t)?cf(t):Array.isArray(t)?t.map(a6):o6[t]}function tO(t,e,r,{delay:n=0,duration:i,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){const c={[e]:r};l&&(c.offset=l);const f=a6(a);return Array.isArray(f)&&(c.easing=f),t.animate(c,{delay:n,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}function rO(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const l6=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,nO=1e-7,iO=12;function sO(t,e,r,n,i){let s,o,a=0;do o=e+(r-e)/2,s=l6(o,n,i)-t,s>0?r=o:e=o;while(Math.abs(s)>nO&&++asO(s,0,1,t,r);return s=>s===0||s===1?s:l6(i(s),e,n)}const oO=Mu(.42,0,1,1),aO=Mu(0,0,.58,1),c6=Mu(.42,0,.58,1),lO=t=>Array.isArray(t)&&typeof t[0]!="number",f6=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,u6=t=>e=>1-t(1-e),Dg=t=>1-Math.sin(Math.acos(t)),d6=u6(Dg),cO=f6(Dg),h6=Mu(.33,1.53,.69,.99),Lg=u6(h6),fO=f6(Lg),uO=t=>(t*=2)<1?.5*Lg(t):.5*(2-Math.pow(2,-10*(t-1))),dO={linear:fr,easeIn:oO,easeInOut:c6,easeOut:aO,circIn:Dg,circInOut:cO,circOut:d6,backIn:Lg,backInOut:fO,backOut:h6,anticipate:uO},z2=t=>{if(Array.isArray(t)){Ng(t.length===4);const[e,r,n,i]=t;return Mu(e,r,n,i)}else if(typeof t=="string")return dO[t];return t},jg=(t,e)=>r=>!!(Iu(r)&&hI.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),v6=(t,e,r)=>n=>{if(!Iu(n))return n;const[i,s,o,a]=n.match(Y0);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},hO=t=>Ho(0,255,t),d1={...Za,transform:t=>Math.round(hO(t))},Ea={test:jg("rgb","red"),parse:v6("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+d1.transform(t)+", "+d1.transform(e)+", "+d1.transform(r)+", "+Sf(Af.transform(n))+")"};function vO(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 my={test:jg("#"),parse:vO,transform:Ea.transform},Il={test:jg("hsl","hue"),parse:v6("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+fs.transform(Sf(e))+", "+fs.transform(Sf(r))+", "+Sf(Af.transform(n))+")"},vn={test:t=>Ea.test(t)||my.test(t)||Il.test(t),parse:t=>Ea.test(t)?Ea.parse(t):Il.test(t)?Il.parse(t):my.parse(t),transform:t=>Iu(t)?t:t.hasOwnProperty("red")?Ea.transform(t):Il.transform(t)},tr=(t,e,r)=>-r*t+r*e+t;function h1(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 pO({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=h1(l,a,t+1/3),s=h1(l,a,t),o=h1(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))},yO=[my,Ea,Il],mO=t=>yO.find(e=>e.test(t));function V2(t){const e=mO(t);let r=e.parse(t);return e===Il&&(r=pO(r)),r}const p6=(t,e)=>{const r=V2(t),n=V2(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=tr(r.alpha,n.alpha,s),Ea.transform(i))};function gO(t){var e,r;return isNaN(t)&&Iu(t)&&(((e=t.match(Y0))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(U4))===null||r===void 0?void 0:r.length)||0)>0}const y6={regex:uI,countKey:"Vars",token:"${v}",parse:fr},m6={regex:U4,countKey:"Colors",token:"${c}",parse:vn.parse},g6={regex:Y0,countKey:"Numbers",token:"${n}",parse:Za.parse};function p1(t,{regex:e,countKey:r,token:n,parse:i}){const s=t.tokenised.match(e);s&&(t["num"+r]=s.length,t.tokenised=t.tokenised.replace(e,n),t.values.push(...s.map(i)))}function Hh(t){const e=t.toString(),r={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return r.value.includes("var(--")&&p1(r,y6),p1(r,m6),p1(r,g6),r}function x6(t){return Hh(t).values}function b6(t){const{values:e,numColors:r,numVars:n,tokenised:i}=Hh(t),s=e.length;return o=>{let a=i;for(let l=0;ltypeof t=="number"?0:t;function bO(t){const e=x6(t);return b6(t)(e.map(xO))}const Wo={test:gO,parse:x6,createTransformer:b6,getAnimatableNone:bO},w6=(t,e)=>r=>`${r>0?e:t}`;function E6(t,e){return typeof t=="number"?r=>tr(t,e,r):vn.test(t)?p6(t,e):t.startsWith("var(")?w6(t,e):S6(t,e)}const A6=(t,e)=>{const r=[...t],n=r.length,i=t.map((s,o)=>E6(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]=E6(t[i],e[i]));return i=>{for(const s in n)r[s]=n[s](i);return r}},S6=(t,e)=>{const r=Wo.createTransformer(e),n=Hh(t),i=Hh(e);return n.numVars===i.numVars&&n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?Fo(A6(n.values,i.values),r):w6(t,e)},Zf=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},q2=(t,e)=>r=>tr(t,e,r);function EO(t){return typeof t=="number"?q2:typeof t=="string"?vn.test(t)?p6:S6:Array.isArray(t)?A6:typeof t=="object"?wO:q2}function AO(t,e,r){const n=[],i=r||EO(t[0]),s=t.length-1;for(let o=0;oe[0];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=AO(e,n,i),a=o.length,l=c=>{let f=0;if(a>1)for(;fl(Ho(t[0],t[s-1],c)):l}function SO(t,e){const r=t[t.length-1];for(let n=1;n<=e;n++){const i=Zf(0,e,n);t.push(tr(r,1,i))}}function CO(t){const e=[0];return SO(e,t.length-1),e}function kO(t,e){return t.map(r=>r*e)}function TO(t,e){return t.map(()=>e||c6).splice(0,t.length-1)}function Wh({duration:t=300,keyframes:e,times:r,ease:n="easeInOut"}){const i=lO(n)?n.map(z2):z2(n),s={done:!1,value:e[0]},o=kO(r&&r.length===e.length?r:CO(e),t),a=C6(o,e,{ease:Array.isArray(i)?i:TO(e,i)});return{calculatedDuration:t,next:l=>(s.value=a(l),s.done=l>=t,s)}}function k6(t,e){return e?t*(1e3/e):0}const PO=5;function T6(t,e,r){const n=Math.max(e-PO,0);return k6(r-t(n),e-n)}const y1=.001,RO=.01,H2=10,_O=.05,IO=1;function OO({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s;ZI(t<=Bo(H2));let o=1-e;o=Ho(_O,IO,o),t=Ho(RO,H2,Vs(t)),o<1?(i=c=>{const f=c*o,u=f*t,d=f-r,h=gy(c,o),p=Math.exp(-u);return y1-d/h*p},s=c=>{const u=c*o*t,d=u*r+r,h=Math.pow(o,2)*Math.pow(c,2)*t,p=Math.exp(-u),m=gy(Math.pow(c,2),o);return(-i(c)+y1>0?-1:1)*((d-h)*p)/m}):(i=c=>{const f=Math.exp(-c*t),u=(c-r)*t+1;return-y1+f*u},s=c=>{const f=Math.exp(-c*t),u=(r-c)*(t*t);return f*u});const a=5/t,l=NO(i,s,a);if(t=Bo(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:t}}}const MO=12;function NO(t,e,r){let n=r;for(let i=1;it[r]!==void 0)}function jO(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!W2(t,LO)&&W2(t,DO)){const r=OO(t);e={...e,...r,mass:1},e.isResolvedFromDuration=!0}return e}function P6({keyframes:t,restDelta:e,restSpeed:r,...n}){const i=t[0],s=t[t.length-1],o={done:!1,value:i},{stiffness:a,damping:l,mass:c,duration:f,velocity:u,isResolvedFromDuration:d}=jO({...n,velocity:-Vs(n.velocity||0)}),h=u||0,p=l/(2*Math.sqrt(a*c)),m=s-i,x=Vs(Math.sqrt(a/c)),b=Math.abs(m)<5;r||(r=b?.01:2),e||(e=b?.005:.5);let w;if(p<1){const E=gy(x,p);w=R=>{const N=Math.exp(-p*x*R);return s-N*((h+p*x*m)/E*Math.sin(E*R)+m*Math.cos(E*R))}}else if(p===1)w=E=>s-Math.exp(-x*E)*(m+(h+x*m)*E);else{const E=x*Math.sqrt(p*p-1);w=R=>{const N=Math.exp(-p*x*R),I=Math.min(E*R,300);return s-N*((h+p*x*m)*Math.sinh(I)+E*m*Math.cosh(I))/E}}return{calculatedDuration:d&&f||null,next:E=>{const R=w(E);if(d)o.done=E>=f;else{let N=h;E!==0&&(p<1?N=T6(w,E,R):N=0);const I=Math.abs(N)<=r,F=Math.abs(s-R)<=e;o.done=I&&F}return o.value=o.done?s:R,o}}}function G2({keyframes:t,velocity:e=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:f}){const u=t[0],d={done:!1,value:u},h=j=>a!==void 0&&jl,p=j=>a===void 0?l:l===void 0||Math.abs(a-j)-m*Math.exp(-j/n),E=j=>b+w(j),R=j=>{const U=w(j),K=E(j);d.done=Math.abs(U)<=c,d.value=d.done?b:K};let N,I;const F=j=>{h(d.value)&&(N=j,I=P6({keyframes:[d.value,p(d.value)],velocity:T6(E,j,d.value),damping:i,stiffness:s,restDelta:c,restSpeed:f}))};return F(0),{calculatedDuration:null,next:j=>{let U=!1;return!I&&N===void 0&&(U=!0,R(j),F(j)),N!==void 0&&j>N?I.next(j-N):(!U&&R(j),d)}}}const FO=t=>{const e=({timestamp:r})=>t(r);return{start:()=>Vt.update(e,!0),stop:()=>Ys(e),now:()=>tn.isProcessing?tn.timestamp:performance.now()}},K2=2e4;function Y2(t){let e=0;const r=50;let n=t.next(e);for(;!n.done&&e=K2?1/0:e}const BO={decay:G2,inertia:G2,tween:Wh,keyframes:Wh,spring:P6};function Gh({autoplay:t=!0,delay:e=0,driver:r=FO,keyframes:n,type:i="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:f,onUpdate:u,...d}){let h=1,p=!1,m,x;const b=()=>{x=new Promise(A=>{m=A})};b();let w;const E=BO[i]||Wh;let R;E!==Wh&&typeof n[0]!="number"&&(R=C6([0,100],n,{clamp:!1}),n=[0,100]);const N=E({...d,keyframes:n});let I;a==="mirror"&&(I=E({...d,keyframes:[...n].reverse(),velocity:-(d.velocity||0)}));let F="idle",j=null,U=null,K=null;N.calculatedDuration===null&&s&&(N.calculatedDuration=Y2(N));const{calculatedDuration:J}=N;let Z=1/0,M=1/0;J!==null&&(Z=J+o,M=Z*(s+1)-o);let v=0;const T=A=>{if(U===null)return;h>0&&(U=Math.min(U,A)),h<0&&(U=Math.min(A-M/h,U)),j!==null?v=j:v=Math.round(A-U)*h;const g=v-e*(h>=0?1:-1),_=h>=0?g<0:g>M;v=Math.max(g,0),F==="finished"&&j===null&&(v=M);let B=v,k=N;if(s){const X=Math.min(v,M)/Z;let le=Math.floor(X),ne=X%1;!ne&&X>=1&&(ne=1),ne===1&&le--,le=Math.min(le,s+1),!!(le%2)&&(a==="reverse"?(ne=1-ne,o&&(ne-=o/Z)):a==="mirror"&&(k=I)),B=Ho(0,1,ne)*Z}const $=_?{done:!1,value:n[0]}:k.next(B);R&&($.value=R($.value));let{done:V}=$;!_&&J!==null&&(V=h>=0?v>=M:v<=0);const H=j===null&&(F==="finished"||F==="running"&&V);return u&&u($.value),H&&P(),$},S=()=>{w&&w.stop(),w=void 0},C=()=>{F="idle",S(),m(),b(),U=K=null},P=()=>{F="finished",f&&f(),S(),m()},O=()=>{if(p)return;w||(w=r(T));const A=w.now();l&&l(),j!==null?U=A-j:(!U||F==="finished")&&(U=A),F==="finished"&&b(),K=U,j=null,F="running",w.start()};t&&O();const L={then(A,g){return x.then(A,g)},get time(){return Vs(v)},set time(A){A=Bo(A),v=A,j!==null||!w||h===0?j=A:U=w.now()-A/h},get duration(){const A=N.calculatedDuration===null?Y2(N):N.calculatedDuration;return Vs(A)},get speed(){return h},set speed(A){A===h||!w||(h=A,L.time=Vs(v))},get state(){return F},play:O,pause:()=>{F="paused",j=v},stop:()=>{p=!0,F!=="idle"&&(F="idle",c&&c(),C())},cancel:()=>{K!==null&&T(K),C()},complete:()=>{F="finished"},sample:A=>(U=0,T(A))};return L}function $O(t){let e;return()=>(e===void 0&&(e=t()),e)}const UO=$O(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),zO=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),dd=10,VO=2e4,qO=(t,e)=>e.type==="spring"||t==="backgroundColor"||!s6(e.ease);function HO(t,e,{onUpdate:r,onComplete:n,...i}){if(!(UO()&&zO.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let o=!1,a,l,c=!1;const f=()=>{l=new Promise(E=>{a=E})};f();let{keyframes:u,duration:d=300,ease:h,times:p}=i;if(qO(e,i)){const E=Gh({...i,repeat:0,delay:0});let R={done:!1,value:u[0]};const N=[];let I=0;for(;!R.done&&I{c=!1,m.cancel()},b=()=>{c=!0,Vt.update(x),a(),f()};return m.onfinish=()=>{c||(t.set(rO(u,i)),n&&n(),b())},{then(E,R){return l.then(E,R)},attachTimeline(E){return m.timeline=E,m.onfinish=null,fr},get time(){return Vs(m.currentTime||0)},set time(E){m.currentTime=Bo(E)},get speed(){return m.playbackRate},set speed(E){m.playbackRate=E},get duration(){return Vs(d)},play:()=>{o||(m.play(),Ys(x))},pause:()=>m.pause(),stop:()=>{if(o=!0,m.playState==="idle")return;const{currentTime:E}=m;if(E){const R=Gh({...i,autoplay:!1});t.setWithVelocity(R.sample(E-dd).value,R.sample(E).value,dd)}b()},complete:()=>{c||m.finish()},cancel:b}}function WO({keyframes:t,delay:e,onUpdate:r,onComplete:n}){const i=()=>(r&&r(t[t.length-1]),n&&n(),{time:0,speed:1,duration:0,play:fr,pause:fr,stop:fr,then:s=>(s(),Promise.resolve()),cancel:fr,complete:fr});return e?Gh({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}const GO={type:"spring",stiffness:500,damping:25,restSpeed:10},KO=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),YO={type:"keyframes",duration:.8},QO={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},JO=(t,{keyframes:e})=>e.length>2?YO:Xa.has(t)?t.startsWith("scale")?KO(e[1]):GO:QO,xy=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Wo.test(e)||e==="0")&&!e.startsWith("url(")),XO=new Set(["brightness","contrast","saturate","opacity"]);function ZO(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(Y0)||[];if(!n)return t;const i=r.replace(n,"");let s=XO.has(e)?1:0;return n!==r&&(s*=100),e+"("+s+i+")"}const eM=/([a-z-]*)\(.*?\)/g,by={...Wo,getAnimatableNone:t=>{const e=t.match(eM);return e?e.map(ZO).join(" "):t}},tM={...z4,color:vn,backgroundColor:vn,outlineColor:vn,fill:vn,stroke:vn,borderColor:vn,borderTopColor:vn,borderRightColor:vn,borderBottomColor:vn,borderLeftColor:vn,filter:by,WebkitFilter:by},Fg=t=>tM[t];function R6(t,e){let r=Fg(t);return r!==by&&(r=Wo),r.getAnimatableNone?r.getAnimatableNone(e):void 0}const _6=t=>/^0[^.\s]+$/.test(t);function rM(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||_6(t)}function nM(t,e,r,n){const i=xy(e,r);let s;Array.isArray(r)?s=[...r]:s=[null,r];const o=n.from!==void 0?n.from:t.get();let a;const l=[];for(let c=0;ci=>{const s=Bg(n,t)||{},o=s.delay||n.delay||0;let{elapsed:a=0}=n;a=a-Bo(o);const l=nM(e,t,r,s),c=l[0],f=l[l.length-1],u=xy(t,c),d=xy(t,f);let h={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...s,delay:-a,onUpdate:p=>{e.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{i(),s.onComplete&&s.onComplete()}};if(iM(s)||(h={...h,...JO(t,h)}),h.duration&&(h.duration=Bo(h.duration)),h.repeatDelay&&(h.repeatDelay=Bo(h.repeatDelay)),!u||!d||eO.current||s.type===!1||sM.skipAnimations)return WO(h);if(!n.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const p=HO(e,t,h);if(p)return p}return Gh(h)};function Kh(t){return!!(_n(t)&&t.add)}const I6=t=>/^\-?\d*\.?\d+$/.test(t);function Ug(t,e){t.indexOf(e)===-1&&t.push(e)}function zg(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class Vg{constructor(){this.subscriptions=[]}add(e){return Ug(this.subscriptions,e),()=>zg(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 aM{constructor(e,r={}){this.version="10.18.0",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}=tn;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,Vt.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=()=>Vt.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=oM(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new Vg);const n=this.events[e].add(r);return e==="change"?()=>{n(),Vt.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?k6(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r),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(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ic(t,e){return new aM(t,e)}const O6=t=>e=>e.test(t),lM={test:t=>t==="auto",parse:t=>t},M6=[Za,Pe,fs,yo,pI,vI,lM],Vc=t=>M6.find(O6(t)),cM=[...M6,vn,Wo],fM=t=>cM.find(O6(t));function uM(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,ic(r))}function dM(t,e){const r=J0(t,e);let{transitionEnd:n={},transition:i={},...s}=r?t.makeTargetAnimatable(r,!1):{};s={...s,...n};for(const o in s){const a=RI(s[o]);uM(t,o,a)}}function hM(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;al.remove(u))),c.push(x)}return o&&Promise.all(c).then(()=>{o&&dM(t,o)}),c}function wy(t,e,r={}){const n=J0(t,e,r.custom);let{transition:i=t.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(i=r.transitionOverride);const s=n?()=>Promise.all(N6(t,n,r)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:u}=i;return gM(t,e,c+l,f,u,r)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,c]=a==="beforeChildren"?[s,o]:[o,s];return l().then(()=>c())}else return Promise.all([s(),o(r.delay)])}function gM(t,e,r=0,n=0,i=1,s){const o=[],a=(t.variantChildren.size-1)*n,l=i===1?(c=0)=>c*n:(c=0)=>a-c*n;return Array.from(t.variantChildren).sort(xM).forEach((c,f)=>{c.notify("AnimationStart",e),o.push(wy(c,e,{...s,delay:r+l(f)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function xM(t,e){return t.sortNodePosition(e)}function bM(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const i=e.map(s=>wy(t,s,r));n=Promise.all(i)}else if(typeof e=="string")n=wy(t,e,r);else{const i=typeof e=="function"?J0(t,e,r.custom):e;n=Promise.all(N6(t,i,r))}return n.then(()=>t.notify("AnimationComplete",e))}const wM=[...Sg].reverse(),EM=Sg.length;function AM(t){return e=>Promise.all(e.map(({animation:r,options:n})=>bM(t,r,n)))}function SM(t){let e=AM(t);const r=kM();let n=!0;const i=(l,c)=>{const f=J0(t,c);if(f){const{transition:u,transitionEnd:d,...h}=f;l={...l,...h,...d}}return l};function s(l){e=l(t)}function o(l,c){const f=t.getProps(),u=t.getVariantContext(!0)||{},d=[],h=new Set;let p={},m=1/0;for(let b=0;bm&&N,K=!1;const J=Array.isArray(R)?R:[R];let Z=J.reduce(i,{});I===!1&&(Z={});const{prevResolvedValues:M={}}=E,v={...M,...Z},T=S=>{U=!0,h.has(S)&&(K=!0,h.delete(S)),E.needsAnimating[S]=!0};for(const S in v){const C=Z[S],P=M[S];if(p.hasOwnProperty(S))continue;let O=!1;qh(C)&&qh(P)?O=!n6(C,P):O=C!==P,O?C!==void 0?T(S):h.add(S):C!==void 0&&h.has(S)?T(S):E.protectedKeys[S]=!0}E.prevProp=R,E.prevResolvedValues=Z,E.isActive&&(p={...p,...Z}),n&&t.blockInitialAnimation&&(U=!1),U&&(!F||K)&&d.push(...J.map(S=>({animation:S,options:{type:w,...l}})))}if(h.size){const b={};h.forEach(w=>{const E=t.getBaseTarget(w);E!==void 0&&(b[w]=E)}),d.push({animation:b})}let x=!!d.length;return n&&(f.initial===!1||f.initial===f.animate)&&!t.manuallyAnimateOnMount&&(x=!1),n=!1,x?e(d):Promise.resolve()}function a(l,c,f){var u;if(r[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),r[l].isActive=c;const d=o(f,l);for(const h in r)r[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>r}}function CM(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!n6(e,t):!1}function fa(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function kM(){return{animate:fa(!0),whileInView:fa(),whileHover:fa(),whileTap:fa(),whileDrag:fa(),whileFocus:fa(),exit:fa()}}class TM extends na{constructor(e){super(e),e.animationState||(e.animationState=SM(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),G0(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:r}=this.node.prevProps||{};e!==r&&this.updateAnimationControlsSubscription()}unmount(){}}let PM=0;class RM extends na{constructor(){super(...arguments),this.id=PM++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:r,custom:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const s=this.node.animationState.setActive("exit",!e,{custom:n??this.node.getProps().custom});r&&!e&&s.then(()=>r(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const _M={animation:{Feature:TM},exit:{Feature:RM}},Q2=(t,e)=>Math.abs(t-e);function IM(t,e){const r=Q2(t.x,e.x),n=Q2(t.y,e.y);return Math.sqrt(r**2+n**2)}class D6{constructor(e,r,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=g1(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=IM(u.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=u,{timestamp:m}=tn;this.history.push({...p,timestamp:m});const{onStart:x,onMove:b}=this.handlers;d||(x&&x(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=m1(d,this.transformPagePoint),Vt.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=g1(u.type==="pointercancel"?this.lastMoveEventInfo:m1(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,x),p&&p(u,x)},!X4(e))return;this.dragSnapToOrigin=s,this.handlers=r,this.transformPagePoint=n,this.contextWindow=i||window;const o=Q0(e),a=m1(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=tn;this.history=[{...l,timestamp:c}];const{onSessionStart:f}=r;f&&f(e,g1(a,this.history)),this.removeListeners=Fo(zs(this.contextWindow,"pointermove",this.handlePointerMove),zs(this.contextWindow,"pointerup",this.handlePointerUp),zs(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ys(this.updatePoint)}}function m1(t,e){return e?{point:e(t.point)}:t}function J2(t,e){return{x:t.x-e.x,y:t.y-e.y}}function g1({point:t},e){return{point:t,delta:J2(t,L6(e)),offset:J2(t,OM(e)),velocity:MM(e,.1)}}function OM(t){return t[0]}function L6(t){return t[t.length-1]}function MM(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const i=L6(t);for(;r>=0&&(n=t[r],!(i.timestamp-n.timestamp>Bo(e)));)r--;if(!n)return{x:0,y:0};const s=Vs(i.timestamp-n.timestamp);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 Gn(t){return t.max-t.min}function Ey(t,e=0,r=.01){return Math.abs(t-e)<=r}function X2(t,e,r,n=.5){t.origin=n,t.originPoint=tr(e.min,e.max,t.origin),t.scale=Gn(r)/Gn(e),(Ey(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=tr(r.min,r.max,t.origin)-t.originPoint,(Ey(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Cf(t,e,r,n){X2(t.x,e.x,r.x,n?n.originX:void 0),X2(t.y,e.y,r.y,n?n.originY:void 0)}function Z2(t,e,r){t.min=r.min+e.min,t.max=t.min+Gn(e)}function NM(t,e,r){Z2(t.x,e.x,r.x),Z2(t.y,e.y,r.y)}function eE(t,e,r){t.min=e.min-r.min,t.max=t.min+Gn(e)}function kf(t,e,r){eE(t.x,e.x,r.x),eE(t.y,e.y,r.y)}function DM(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?tr(r,t,n.max):Math.min(t,r)),t}function tE(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 LM(t,{top:e,left:r,bottom:n,right:i}){return{x:tE(t.x,r,i),y:tE(t.y,e,n)}}function rE(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=Zf(e.min,e.max-n,t.min):n>i&&(r=Zf(t.min,t.max-i,e.min)),Ho(0,1,r)}function BM(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 Ay=.35;function $M(t=Ay){return t===!1?t=0:t===!0&&(t=Ay),{x:nE(t,"left","right"),y:nE(t,"top","bottom")}}function nE(t,e,r){return{min:iE(t,e),max:iE(t,r)}}function iE(t,e){return typeof t=="number"?t:t[e]||0}const sE=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ol=()=>({x:sE(),y:sE()}),oE=()=>({min:0,max:0}),Ar=()=>({x:oE(),y:oE()});function ci(t){return[t("x"),t("y")]}function j6({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function UM({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function zM(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 x1(t){return t===void 0||t===1}function Sy({scale:t,scaleX:e,scaleY:r}){return!x1(t)||!x1(e)||!x1(r)}function va(t){return Sy(t)||F6(t)||t.z||t.rotate||t.rotateX||t.rotateY}function F6(t){return aE(t.x)||aE(t.y)}function aE(t){return t&&t!=="0%"}function Yh(t,e,r){const n=t-r,i=e*n;return r+i}function lE(t,e,r,n,i){return i!==void 0&&(t=Yh(t,i,n)),Yh(t,r,n)+e}function Cy(t,e=0,r=1,n,i){t.min=lE(t.min,e,r,n,i),t.max=lE(t.max,e,r,n,i)}function B6(t,{x:e,y:r}){Cy(t.x,e.translate,e.scale,e.originPoint),Cy(t.y,r.translate,r.scale,r.originPoint)}function VM(t,e,r,n=!1){const i=r.length;if(!i)return;e.x=e.y=1;let s,o;for(let a=0;a1.0000000000001||t<.999999999999?t:1}function Eo(t,e){t.min=t.min+e,t.max=t.max+e}function fE(t,e,[r,n,i]){const s=e[i]!==void 0?e[i]:.5,o=tr(t.min,t.max,s);Cy(t,e[r],e[n],o,e.scale)}const qM=["x","scaleX","originX"],HM=["y","scaleY","originY"];function Ml(t,e){fE(t.x,e,qM),fE(t.y,e,HM)}function $6(t,e){return j6(zM(t.getBoundingClientRect(),e))}function WM(t,e,r){const n=$6(t,r),{scroll:i}=e;return i&&(Eo(n.x,i.offset.x),Eo(n.y,i.offset.y)),n}const U6=({current:t})=>t?t.ownerDocument.defaultView:null,GM=new WeakMap;class KM{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=Ar(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:u}=this.getProps();u?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Q0(f,"page").point)},s=(f,u)=>{const{drag:d,dragPropagation:h,onDragStart:p}=this.getProps();if(d&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=e6(d),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ci(x=>{let b=this.getAxisMotionValue(x).get()||0;if(fs.test(b)){const{projection:w}=this.visualElement;if(w&&w.layout){const E=w.layout.layoutBox[x];E&&(b=Gn(E)*(parseFloat(b)/100))}}this.originPoint[x]=b}),p&&Vt.update(()=>p(f,u),!1,!0);const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(f,u)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:x}=u;if(h&&this.currentDirection===null){this.currentDirection=YM(x),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",u.point,x),this.updateAxis("y",u.point,x),this.visualElement.render(),m&&m(f,u)},a=(f,u)=>this.stop(f,u),l=()=>ci(f=>{var u;return this.getAnimationState(f)==="paused"&&((u=this.getAxisMotionValue(f).animation)===null||u===void 0?void 0:u.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new D6(e,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:U6(this.visualElement)})}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&&Vt.update(()=>s(e,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:r}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(e,r,n){const{drag:i}=this.getProps();if(!n||!hd(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=DM(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){var e;const{dragConstraints:r,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,s=this.constraints;r&&_l(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&i?this.constraints=LM(i.layoutBox,r):this.constraints=!1,this.elastic=$M(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&ci(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=BM(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!_l(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=WM(n,i.root,this.visualElement.getTransformPagePoint());let o=jM(i.layout.layoutBox,s);if(r){const a=r(UM(o));this.hasMutatedConstraints=!!a,a&&(o=j6(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ci(f=>{if(!hd(f,r,this.currentDirection))return;let u=l&&l[f]||{};o&&(u={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:n?e[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(f,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start($g(e,n,0,r))}stopAnimation(){ci(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){ci(e=>{var r;return(r=this.getAxisMotionValue(e).animation)===null||r===void 0?void 0:r.pause()})}getAnimationState(e){var r;return(r=this.getAxisMotionValue(e).animation)===null||r===void 0?void 0:r.state}getAxisMotionValue(e){const r="_drag"+e.toUpperCase(),n=this.visualElement.getProps(),i=n[r];return i||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){ci(r=>{const{drag:n}=this.getProps();if(!hd(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]-tr(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!_l(r)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ci(o=>{const a=this.getAxisMotionValue(o);if(a){const l=a.get();i[o]=FM({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),ci(o=>{if(!hd(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(tr(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;GM.set(this.visualElement,this);const e=this.visualElement.current,r=zs(e,"pointerdown",l=>{const{drag:c,dragListener:f=!0}=this.getProps();c&&f&&this.start(l)}),n=()=>{const{dragConstraints:l}=this.getProps();_l(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),n();const o=Bs(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ci(f=>{const u=this.getAxisMotionValue(f);u&&(this.originPoint[f]+=l[f].translate,u.set(u.get()+l[f].translate))}),this.visualElement.render())});return()=>{o(),r(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Ay,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function hd(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function YM(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}class QM extends na{constructor(e){super(e),this.removeGroupControls=fr,this.removeListeners=fr,this.controls=new KM(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fr}unmount(){this.removeGroupControls(),this.removeListeners()}}const uE=t=>(e,r)=>{t&&Vt.update(()=>t(e,r))};class JM extends na{constructor(){super(...arguments),this.removePointerDownListener=fr}onPointerDown(e){this.session=new D6(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:U6(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:r,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:uE(e),onStart:uE(r),onMove:n,onEnd:(s,o)=>{delete this.session,i&&Vt.update(()=>i(s,o))}}}mount(){this.removePointerDownListener=zs(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function XM(){const t=y.useContext(H0);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,i=y.useId();return y.useEffect(()=>n(i),[]),!e&&r?[!1,()=>r&&r(i)]:[!0]}const Zd={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function dE(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const qc={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Pe.test(t))t=parseFloat(t);else return t;const r=dE(t,e.target.x),n=dE(t,e.target.y);return`${r}% ${n}%`}},ZM={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,i=Wo.parse(t);if(i.length>5)return n;const s=Wo.createTransformer(t),o=typeof i[0]!="number"?1:0,a=r.x.scale*e.x,l=r.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const c=tr(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}};class eN extends pr.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=e;aI(tN),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()})),Zd.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()||Vt.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function z6(t){const[e,r]=XM(),n=y.useContext(kg);return pr.createElement(eN,{...t,layoutGroup:n,switchLayoutGroup:y.useContext(j4),isPresent:e,safeToRemove:r})}const tN={borderRadius:{...qc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qc,borderTopRightRadius:qc,borderBottomLeftRadius:qc,borderBottomRightRadius:qc,boxShadow:ZM},V6=["TopLeft","TopRight","BottomLeft","BottomRight"],rN=V6.length,hE=t=>typeof t=="string"?parseFloat(t):t,vE=t=>typeof t=="number"||Pe.test(t);function nN(t,e,r,n,i,s){i?(t.opacity=tr(0,r.opacity!==void 0?r.opacity:1,iN(n)),t.opacityExit=tr(e.opacity!==void 0?e.opacity:1,0,sN(n))):s&&(t.opacity=tr(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(Zf(t,e,n))}function yE(t,e){t.min=e.min,t.max=e.max}function oi(t,e){yE(t.x,e.x),yE(t.y,e.y)}function mE(t,e,r,n,i){return t-=e,t=Yh(t,1/r,n),i!==void 0&&(t=Yh(t,1/i,n)),t}function oN(t,e=0,r=1,n=.5,i,s=t,o=t){if(fs.test(e)&&(e=parseFloat(e),e=tr(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=tr(s.min,s.max,n);t===s&&(a-=e),t.min=mE(t.min,e,r,a,i),t.max=mE(t.max,e,r,a,i)}function gE(t,e,[r,n,i],s,o){oN(t,e[r],e[n],e[i],e.scale,s,o)}const aN=["x","scaleX","originX"],lN=["y","scaleY","originY"];function xE(t,e,r,n){gE(t.x,e,aN,r?r.x:void 0,n?n.x:void 0),gE(t.y,e,lN,r?r.y:void 0,n?n.y:void 0)}function bE(t){return t.translate===0&&t.scale===1}function H6(t){return bE(t.x)&&bE(t.y)}function cN(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 W6(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function wE(t){return Gn(t.x)/Gn(t.y)}class fN{constructor(){this.members=[]}add(e){Ug(this.members,e),e.scheduleRender()}remove(e){if(zg(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){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,r&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:r,resumingFrom:n}=e;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function EE(t,e,r){let n="";const i=t.x.translate/e.x,s=t.y.translate/e.y;if((i||s)&&(n=`translate3d(${i}px, ${s}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:l,rotateX:c,rotateY:f}=r;l&&(n+=`rotate(${l}deg) `),c&&(n+=`rotateX(${c}deg) `),f&&(n+=`rotateY(${f}deg) `)}const o=t.x.scale*e.x,a=t.y.scale*e.y;return(o!==1||a!==1)&&(n+=`scale(${o}, ${a})`),n||"none"}const uN=(t,e)=>t.depth-e.depth;class dN{constructor(){this.children=[],this.isDirty=!1}add(e){Ug(this.children,e),this.isDirty=!0}remove(e){zg(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(uN),this.isDirty=!1,this.children.forEach(e)}}function hN(t,e){const r=performance.now(),n=({timestamp:i})=>{const s=i-r;s>=e&&(Ys(n),t(s-e))};return Vt.read(n,!0),()=>Ys(n)}function vN(t){window.MotionDebug&&window.MotionDebug.record(t)}function pN(t){return t instanceof SVGElement&&t.tagName!=="svg"}function yN(t,e,r){const n=_n(t)?t:ic(t);return n.start($g("",n,e,r)),n.animation}const AE=["","X","Y","Z"],mN={visibility:"hidden"},SE=1e3;let gN=0;const pa={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function G6({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=gN++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!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.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,pa.totalNodes=pa.resolvedTargetDeltas=pa.recalculatedProjection=0,this.nodes.forEach(wN),this.nodes.forEach(kN),this.nodes.forEach(TN),this.nodes.forEach(EN),vN(pa)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=hN(d,250),Zd.hasAnimatedSinceResize&&(Zd.hasAnimatedSinceResize=!1,this.nodes.forEach(kE))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||f.getDefaultTransition()||ON,{onLayoutAnimationStart:x,onLayoutAnimationComplete:b}=f.getProps(),w=!this.targetLayout||!W6(this.targetLayout,p)||h,E=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||E||d&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,E);const R={...Bg(m,"layout"),onPlay:x,onComplete:b};(f.shouldReduceMotion||this.options.layoutRoot)&&(R.delay=0,R.type=!1),this.startAnimation(R)}else d||kE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ys(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(PN),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;fthis.update()))}clearAllSnapshots(){this.nodes.forEach(AN),this.sharedNodes.forEach(RN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Vt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Vt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const N=R/1e3;TE(u.x,o.x,N),TE(u.y,o.y,N),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(kf(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),_N(this.relativeTarget,this.relativeTargetOrigin,d,N),E&&cN(this.relativeTarget,E)&&(this.isProjectionDirty=!1),E||(E=Ar()),oi(E,this.relativeTarget)),m&&(this.animationValues=f,nN(f,c,this.latestValues,N,w,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ys(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Vt.update(()=>{Zd.hasAnimatedSinceResize=!0,this.currentAnimation=yN(0,SE,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(SE),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:f}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&K6(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ar();const u=Gn(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const d=Gn(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}oi(a,l),Ml(a,f),Cf(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new fN),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let f=0;f{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(CE),this.root.sharedNodes.clear()}}}function xN(t){t.updateLayout()}function bN(t){var e;const r=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&r&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=r.source!==t.layout.source;s==="size"?ci(u=>{const d=o?r.measuredBox[u]:r.layoutBox[u],h=Gn(d);d.min=n[u].min,d.max=d.min+h}):K6(s,r.layoutBox,n)&&ci(u=>{const d=o?r.measuredBox[u]:r.layoutBox[u],h=Gn(n[u]);d.max=d.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+h)});const a=Ol();Cf(a,n,r.layoutBox);const l=Ol();o?Cf(l,t.applyTransform(i,!0),r.measuredBox):Cf(l,n,r.layoutBox);const c=!H6(a);let f=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:h}=u;if(d&&h){const p=Ar();kf(p,r.layoutBox,d.layoutBox);const m=Ar();kf(m,n,h.layoutBox),W6(p,m)||(f=!0),u.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:f})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function wN(t){pa.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function EN(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function AN(t){t.clearSnapshot()}function CE(t){t.clearMeasurements()}function SN(t){t.isLayoutDirty=!1}function CN(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function kE(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function kN(t){t.resolveTargetDelta()}function TN(t){t.calcProjection()}function PN(t){t.resetRotation()}function RN(t){t.removeLeadSnapshot()}function TE(t,e,r){t.translate=tr(e.translate,0,r),t.scale=tr(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function PE(t,e,r,n){t.min=tr(e.min,r.min,n),t.max=tr(e.max,r.max,n)}function _N(t,e,r,n){PE(t.x,e.x,r.x,n),PE(t.y,e.y,r.y,n)}function IN(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const ON={duration:.45,ease:[.4,0,.1,1]},RE=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),_E=RE("applewebkit/")&&!RE("chrome/")?Math.round:fr;function IE(t){t.min=_E(t.min),t.max=_E(t.max)}function MN(t){IE(t.x),IE(t.y)}function K6(t,e,r){return t==="position"||t==="preserve-aspect"&&!Ey(wE(e),wE(r),.2)}const NN=G6({attachResizeListener:(t,e)=>Bs(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),b1={current:void 0},Y6=G6({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!b1.current){const t=new NN({});t.mount(window),t.setOptions({layoutScroll:!0}),b1.current=t}return b1.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),DN={pan:{Feature:JM},drag:{Feature:QM,ProjectionNode:Y6,MeasureLayout:z6}},LN=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function jN(t){const e=LN.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function ky(t,e,r=1){const[n,i]=jN(t);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);if(s){const o=s.trim();return I6(o)?parseFloat(o):o}else return py(i)?ky(i,e,r+1):i}function FN(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(!py(s))return;const o=ky(s,n);o&&i.set(o)});for(const i in e){const s=e[i];if(!py(s))continue;const o=ky(s,n);o&&(e[i]=o,r||(r={}),r[i]===void 0&&(r[i]=s))}return{target:e,transitionEnd:r}}const BN=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Q6=t=>BN.has(t),$N=t=>Object.keys(t).some(Q6),OE=t=>t===Za||t===Pe,ME=(t,e)=>parseFloat(t.split(", ")[e]),NE=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/);if(i)return ME(i[1],e);{const s=n.match(/^matrix\((.+)\)$/);return s?ME(s[1],t):0}},UN=new Set(["x","y","z"]),zN=_u.filter(t=>!UN.has(t));function VN(t){const e=[];return zN.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 sc={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:NE(4,13),y:NE(5,14)};sc.translateX=sc.x;sc.translateY=sc.y;const qN=(t,e,r)=>{const n=e.measureViewportBox(),i=e.current,s=getComputedStyle(i),{display:o}=s,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(c=>{a[c]=sc[c](n,s)}),e.render();const l=e.measureViewportBox();return r.forEach(c=>{const f=e.getValue(c);f&&f.jump(a[c]),t[c]=sc[c](l,s)}),t},HN=(t,e,r={},n={})=>{e={...e},n={...n};const i=Object.keys(e).filter(Q6);let s=[],o=!1;const a=[];if(i.forEach(l=>{const c=t.getValue(l);if(!t.hasValue(l))return;let f=r[l],u=Vc(f);const d=e[l];let h;if(qh(d)){const p=d.length,m=d[0]===null?1:0;f=d[m],u=Vc(f);for(let x=m;x=0?window.pageYOffset:null,c=qN(e,t,a);return s.length&&s.forEach(([f,u])=>{t.getValue(f).set(u)}),t.render(),W0&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:n}}else return{target:e,transitionEnd:n}};function WN(t,e,r,n){return $N(e)?HN(t,e,r,n):{target:e,transitionEnd:n}}const GN=(t,e,r,n)=>{const i=FN(t,e,n);return e=i.target,n=i.transitionEnd,WN(t,e,r,n)},Ty={current:null},J6={current:!1};function KN(){if(J6.current=!0,!!W0)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ty.current=t.matches;t.addListener(e),e()}else Ty.current=!1}function YN(t,e,r){const{willChange:n}=e;for(const i in e){const s=e[i],o=r[i];if(_n(s))t.addValue(i,s),Kh(n)&&n.add(i);else if(_n(o))t.addValue(i,ic(s,{owner:t})),Kh(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,ic(a!==void 0?a:s,{owner:t}))}}for(const i in r)e[i]===void 0&&t.removeValue(i);return e}const DE=new WeakMap,X6=Object.keys(Xf),QN=X6.length,LE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],JN=Cg.length;class XN{constructor({parent:e,props:r,presenceContext:n,reducedMotionConfig:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},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=()=>Vt.render(this.render,!1,!0);const{latestValues:a,renderState:l}=s;this.latestValues=a,this.baseTarget={...a},this.initialValues=r.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=r,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.isControllingVariants=K0(r),this.isVariantNode=L4(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(r,{});for(const u in f){const d=f[u];a[u]!==void 0&&_n(d)&&(d.set(a[u],!1),Kh(c)&&c.add(u))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){this.current=e,DE.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,n)=>this.bindToMotionValue(n,r)),J6.current||KN(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ty.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){DE.delete(this.current),this.projection&&this.projection.unmount(),Ys(this.notifyUpdate),Ys(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,r){const n=Xa.has(e),i=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Vt.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){let o,a;for(let l=0;lthis.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:s,layoutScroll:d,layoutRoot:h})}return a}updateFeatures(){for(const e in this.features){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ar()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}makeTargetAnimatable(e,r=!0){return this.makeTargetAnimatableFromInstance(e,this.props,r)}update(e,r){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;nr.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){this.values.delete(e);const r=this.valueSubscriptions.get(e);r&&(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=ic(r,{owner:this}),this.addValue(e,n)),n}readValue(e){var r;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(r=this.getBaseTargetFromProps(this.props,e))!==null&&r!==void 0?r: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=Mg(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&&!_n(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 Vg),this.events[e].add(r)}notify(e,...r){this.events[e]&&this.events[e].notify(...r)}}class Z6 extends XN{sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){return e.style?e.style[r]:void 0}removeValueFromRenderState(e,{vars:r,style:n}){delete r[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:r,...n},{transformValues:i},s){let o=pM(n,e||{},this);if(i&&(r&&(r=i(r)),n&&(n=i(n)),o&&(o=i(o))),s){hM(this,n,o);const a=GN(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function ZN(t){return window.getComputedStyle(t)}class eD extends Z6{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,r){if(Xa.has(r)){const n=Fg(r);return n&&n.default||0}else{const n=ZN(e),i=($4(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:r}){return $6(e,r)}build(e,r,n,i){Pg(e,r,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,r){return Og(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;_n(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,i){W4(e,r,n,i)}}class tD extends Z6{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){if(Xa.has(r)){const n=Fg(r);return n&&n.default||0}return r=G4.has(r)?r:Ag(r),e.getAttribute(r)}measureInstanceViewportBox(){return Ar()}scrapeMotionValuesFromProps(e,r){return Y4(e,r)}build(e,r,n,i){_g(e,r,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,r,n,i){K4(e,r,n,i)}mount(e){this.isSVGTag=Ig(e.tagName),super.mount(e)}}const rD=(t,e)=>Tg(t)?new tD(e,{enableHardwareAcceleration:!1}):new eD(e,{enableHardwareAcceleration:!0}),nD={layout:{ProjectionNode:Y6,MeasureLayout:z6}},iD={..._M,...QI,...DN,...nD},_a=sI((t,e)=>jI(t,e,iD,rD));function e8(){const t=y.useRef(!1);return Eg(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function sD(){const t=e8(),[e,r]=y.useState(0),n=y.useCallback(()=>{t.current&&r(e+1)},[e]);return[y.useCallback(()=>Vt.postRender(n),[n]),e]}class oD extends y.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 aD({children:t,isPresent:e}){const r=y.useId(),n=y.useRef(null),i=y.useRef({width:0,height:0,top:0,left:0});return y.useInsertionEffect(()=>{const{width:s,height:o,top:a,left:l}=i.current;if(e||!n.current||!s||!o)return;n.current.dataset.motionPopId=r;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` [data-motion-pop-id="${r}"] { position: absolute !important; width: ${s}px !important; @@ -45,12 +45,12 @@ Error generating stack: `+s.message+` top: ${a}px !important; left: ${l}px !important; } - `),()=>{document.head.removeChild(c)}},[e]),y.createElement(oD,{isPresent:e,childRef:n,sizeRef:i},y.cloneElement(t,{ref:n}))}const b1=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:s,mode:o})=>{const a=Y4(lD),l=y.useId(),c=y.useMemo(()=>({id:l,initial:e,isPresent:r,custom:i,onExitComplete:f=>{a.set(f,!0);for(const u of a.values())if(!u)return;n&&n()},register:f=>(a.set(f,!1),()=>a.delete(f))}),s?void 0:[r]);return y.useMemo(()=>{a.forEach((f,u)=>a.set(u,!1))},[r]),y.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=y.createElement(aD,{isPresent:r},t)),y.createElement(H0.Provider,{value:c},t)};function lD(){return new Map}function cD(t){return y.useEffect(()=>()=>t(),[])}const ya=t=>t.key||"";function fD(t,e){t.forEach(r=>{const n=ya(r);e.set(n,r)})}function uD(t){const e=[];return y.Children.forEach(t,r=>{y.isValidElement(r)&&e.push(r)}),e}const Vg=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{const a=y.useContext(Cg).forceRender||sD()[0],l=Z6(),c=uD(t);let f=c;const u=y.useRef(new Map).current,d=y.useRef(f),h=y.useRef(new Map).current,p=y.useRef(!0);if(wg(()=>{p.current=!1,fD(c,h),d.current=f}),cD(()=>{p.current=!0,h.clear(),u.clear()}),p.current)return y.createElement(y.Fragment,null,f.map(w=>y.createElement(b1,{key:ya(w),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:s,mode:o},w)));f=[...f];const m=d.current.map(ya),x=c.map(ya),b=m.length;for(let w=0;w{if(x.indexOf(A)!==-1)return;const R=h.get(A);if(!R)return;const N=m.indexOf(A);let I=w;if(!I){const F=()=>{u.delete(A);const j=Array.from(h.keys()).filter(U=>!x.includes(U));if(j.forEach(U=>h.delete(U)),d.current=c.filter(U=>{const Y=ya(U);return Y===A||j.includes(Y)}),!u.size){if(l.current===!1)return;a(),n&&n()}};I=y.createElement(b1,{key:ya(R),isPresent:!1,onExitComplete:F,custom:e,presenceAffectsLayout:s,mode:o},R),u.set(A,I)}f.splice(N,0,I)}),f=f.map(w=>{const A=w.key;return u.has(A)?w:y.createElement(b1,{key:ya(w),isPresent:!0,presenceAffectsLayout:s,mode:o},w)}),y.createElement(y.Fragment,null,u.size?f:f.map(w=>y.cloneElement(w)))},e8={black:"#000000",white:"#ffffff",inherit:"inherit",transparent:"transparent",positive:"#1FC266",negative:"#C2501F",info:"#0076CC",warning:"#F4B03E",gradientBackdrop:`linear-gradient( + `),()=>{document.head.removeChild(c)}},[e]),y.createElement(oD,{isPresent:e,childRef:n,sizeRef:i},y.cloneElement(t,{ref:n}))}const w1=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:s,mode:o})=>{const a=Q4(lD),l=y.useId(),c=y.useMemo(()=>({id:l,initial:e,isPresent:r,custom:i,onExitComplete:f=>{a.set(f,!0);for(const u of a.values())if(!u)return;n&&n()},register:f=>(a.set(f,!1),()=>a.delete(f))}),s?void 0:[r]);return y.useMemo(()=>{a.forEach((f,u)=>a.set(u,!1))},[r]),y.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=y.createElement(aD,{isPresent:r},t)),y.createElement(H0.Provider,{value:c},t)};function lD(){return new Map}function cD(t){return y.useEffect(()=>()=>t(),[])}const ya=t=>t.key||"";function fD(t,e){t.forEach(r=>{const n=ya(r);e.set(n,r)})}function uD(t){const e=[];return y.Children.forEach(t,r=>{y.isValidElement(r)&&e.push(r)}),e}const qg=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{const a=y.useContext(kg).forceRender||sD()[0],l=e8(),c=uD(t);let f=c;const u=y.useRef(new Map).current,d=y.useRef(f),h=y.useRef(new Map).current,p=y.useRef(!0);if(Eg(()=>{p.current=!1,fD(c,h),d.current=f}),cD(()=>{p.current=!0,h.clear(),u.clear()}),p.current)return y.createElement(y.Fragment,null,f.map(w=>y.createElement(w1,{key:ya(w),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:s,mode:o},w)));f=[...f];const m=d.current.map(ya),x=c.map(ya),b=m.length;for(let w=0;w{if(x.indexOf(E)!==-1)return;const R=h.get(E);if(!R)return;const N=m.indexOf(E);let I=w;if(!I){const F=()=>{u.delete(E);const j=Array.from(h.keys()).filter(U=>!x.includes(U));if(j.forEach(U=>h.delete(U)),d.current=c.filter(U=>{const K=ya(U);return K===E||j.includes(K)}),!u.size){if(l.current===!1)return;a(),n&&n()}};I=y.createElement(w1,{key:ya(R),isPresent:!1,onExitComplete:F,custom:e,presenceAffectsLayout:s,mode:o},R),u.set(E,I)}f.splice(N,0,I)}),f=f.map(w=>{const E=w.key;return u.has(E)?w:y.createElement(w1,{key:ya(w),isPresent:!0,presenceAffectsLayout:s,mode:o},w)}),y.createElement(y.Fragment,null,u.size?f:f.map(w=>y.cloneElement(w)))},t8={black:"#000000",white:"#ffffff",inherit:"inherit",transparent:"transparent",positive:"#1FC266",negative:"#C2501F",info:"#0076CC",warning:"#F4B03E",gradientBackdrop:`linear-gradient( 243.18deg, rgba(86, 52, 189, 0.85) 0%, rgba(49, 41, 223, 0.85) 63.54%, rgba(7, 98, 149, 0.85) 100% - )`,gradientPrimary:"linear-gradient(89.69deg, #4411E1 0.27%, #7537F9 99.73%)",gradientSecondary:"linear-gradient(32.51deg, #951990 -15.23%, #3A35B1 48.55%, #20A8B0 100%)",arbitrumDark:"#212D44",arbitrumLight:"#93D4FF",avalanceDark:"#810C0C",avalanceLight:"#FF8080",bscDark:"#584508",bscLight:"#FCCF43",ethereumDark:"#132362",ethereumLight:"#AABBFF",gnosisDark:"#084246",gnosisLight:"#8CF6FD",polygonDark:"#350881",polygonLight:"#C7A6FF"},dD={...e8,text100:"rgba(255, 255, 255, 1)",text80:"rgba(255, 255, 255, 0.8)",text50:"rgba(255, 255, 255, 0.5)",textInverse100:"rgba(0, 0, 0, 1)",backgroundPrimary:"rgba(0, 0, 0, 1)",backgroundSecondary:"rgba(255, 255, 255, 0.1)",backgroundContrast:"rgba(0, 0, 0, 0.5)",backgroundMuted:"rgba(255, 255, 255, 0.05)",backgroundControl:"rgba(255, 255, 255, 0.25)",backgroundInverse:"rgba(255, 255, 255, 1)",backgroundBackdrop:"rgba(34, 34, 34, 0.9)",backgroundOverlay:"rgba(0, 0, 0, 0.7)",backgroundRaised:"rgba(54, 54, 54, 0.7)",buttonGlass:"rgba(255, 255, 255, 0.15)",buttonEmphasis:"rgba(0, 0, 0, 0.5)",buttonInverse:"rgba(255, 255, 255, 0.8)",borderNormal:"rgba(255, 255, 255, 0.25)",borderFocus:"rgba(255, 255, 255, 0.5)"},hD={...e8,text100:"rgba(0, 0, 0, 1)",text80:"rgba(0, 0, 0, 0.8)",text50:"rgba(0, 0, 0, 0.5)",textInverse100:"rgba(255, 255, 255, 1)",backgroundPrimary:"rgba(244, 244, 244, 1)",backgroundSecondary:"rgba(0, 0, 0, 0.1)",backgroundContrast:"rgba(244, 244, 244, 0.5)",backgroundMuted:"rgba(0, 0, 0, 0.05)",backgroundControl:"rgba(0, 0, 0, 0.25)",backgroundInverse:"rgba(0, 0, 0, 1)",backgroundBackdrop:"rgba(221, 221, 221, 0.9)",backgroundOverlay:"rgba(244, 244, 244, 0.7)",backgroundRaised:"rgba(192, 192, 192, 0.7)",buttonGlass:"rgba(0, 0, 0, 0.15)",buttonEmphasis:"rgba(255, 255, 255, 0.5)",buttonInverse:"rgba(0, 0, 0, 0.8)",borderNormal:"rgba(0, 0, 0, 0.25)",borderFocus:"rgba(0, 0, 0, 0.5)"},vD={dark:dD,light:hD},pD={inherit:{fontFamily:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit",fontWeight:"inherit"},xlarge:{fontFamily:"body",fontSize:"xlarge",lineHeight:"9",letterSpacing:"none",fontWeight:"bold"},large:{fontFamily:"body",fontSize:"large",lineHeight:"7",letterSpacing:"normal",fontWeight:"semibold"},medium:{fontFamily:"body",fontSize:"medium",lineHeight:"6",letterSpacing:"normal",fontWeight:"bold"},normal:{fontFamily:"body",fontSize:"normal",lineHeight:"5",letterSpacing:"wide",fontWeight:"normal"},small:{fontFamily:"body",fontSize:"small",lineHeight:"4",letterSpacing:"wide",fontWeight:"medium"},xsmall:{fontFamily:"body",fontSize:"xsmall",lineHeight:"4",letterSpacing:"wide",fontWeight:"bold"},code:{fontFamily:"mono",fontSize:"normal",lineHeight:"5",letterSpacing:"none",fontWeight:"normal"}};var jA={colors:{black:"var(--seq-colors-black)",white:"var(--seq-colors-white)",inherit:"var(--seq-colors-inherit)",transparent:"var(--seq-colors-transparent)",positive:"var(--seq-colors-positive)",negative:"var(--seq-colors-negative)",info:"var(--seq-colors-info)",warning:"var(--seq-colors-warning)",gradientBackdrop:"var(--seq-colors-gradient-backdrop)",gradientPrimary:"var(--seq-colors-gradient-primary)",gradientSecondary:"var(--seq-colors-gradient-secondary)",arbitrumDark:"var(--seq-colors-arbitrum-dark)",arbitrumLight:"var(--seq-colors-arbitrum-light)",avalanceDark:"var(--seq-colors-avalance-dark)",avalanceLight:"var(--seq-colors-avalance-light)",bscDark:"var(--seq-colors-bsc-dark)",bscLight:"var(--seq-colors-bsc-light)",ethereumDark:"var(--seq-colors-ethereum-dark)",ethereumLight:"var(--seq-colors-ethereum-light)",gnosisDark:"var(--seq-colors-gnosis-dark)",gnosisLight:"var(--seq-colors-gnosis-light)",polygonDark:"var(--seq-colors-polygon-dark)",polygonLight:"var(--seq-colors-polygon-light)",text100:"var(--seq-colors-text100)",text80:"var(--seq-colors-text80)",text50:"var(--seq-colors-text50)",textInverse100:"var(--seq-colors-text-inverse100)",backgroundPrimary:"var(--seq-colors-background-primary)",backgroundSecondary:"var(--seq-colors-background-secondary)",backgroundContrast:"var(--seq-colors-background-contrast)",backgroundMuted:"var(--seq-colors-background-muted)",backgroundControl:"var(--seq-colors-background-control)",backgroundInverse:"var(--seq-colors-background-inverse)",backgroundBackdrop:"var(--seq-colors-background-backdrop)",backgroundOverlay:"var(--seq-colors-background-overlay)",backgroundRaised:"var(--seq-colors-background-raised)",buttonGlass:"var(--seq-colors-button-glass)",buttonEmphasis:"var(--seq-colors-button-emphasis)",buttonInverse:"var(--seq-colors-button-inverse)",borderNormal:"var(--seq-colors-border-normal)",borderFocus:"var(--seq-colors-border-focus)"}};function yD(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 mD(t){var e=yD(t,"string");return typeof e=="symbol"?e:String(e)}function gD(t,e,r){return e=mD(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function FA(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 w1(t){for(var e=1;efunction(){for(var e=arguments.length,r=new Array(e),n=0;nl.styles)),s=Object.keys(i),o=s.filter(l=>"mappings"in i[l]),a=l=>{var c=[],f={},u=w1({},l),d=!1;for(var h of o){var p=l[h];if(p!=null){var m=i[h];d=!0;for(var x of m.mappings)f[x]=p,u[x]==null&&delete u[x]}}var b=d?w1(w1({},f),u):l,w=function(){var I=b[A],F=i[A];try{if(F.mappings)return"continue";if(typeof I=="string"||typeof I=="number")c.push(F.values[I].defaultClass);else if(Array.isArray(I))for(var j=0;jt,wD=function(){return xD(bD)(...arguments)},t8=wD({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"}}},textDecoration:{values:{none:{defaultClass:"fyvr11n2"},underline:{defaultClass:"fyvr11n3"}}},userSelect:{values:{none:{defaultClass:"fyvr11n4"},text:{defaultClass:"fyvr11n5"},all:{defaultClass:"fyvr11n6"},auto:{defaultClass:"fyvr11n7"}}},whiteSpace:{values:{normal:{defaultClass:"fyvr11n8"},nowrap:{defaultClass:"fyvr11n9"},initial:{defaultClass:"fyvr11na"},inherit:{defaultClass:"fyvr11nb"}}},wordBreak:{values:{"break-word":{defaultClass:"fyvr11nc"}}},wordWrap:{values:{normal:{defaultClass:"fyvr11nd"},"break-word":{defaultClass:"fyvr11ne"},initial:{defaultClass:"fyvr11nf"},inherit:{defaultClass:"fyvr11ng"}}},zIndex:{values:{0:{defaultClass:"fyvr11nh"},1:{defaultClass:"fyvr11ni"},10:{defaultClass:"fyvr11nj"},20:{defaultClass:"fyvr11nk"},30:{defaultClass:"fyvr11nl"},40:{defaultClass:"fyvr11nm"},50:{defaultClass:"fyvr11nn"},"-1":{defaultClass:"fyvr11no"},auto:{defaultClass:"fyvr11np"}}},aspectRatio:{values:{"1/1":{defaultClass:"fyvr11nq"},"16/9":{defaultClass:"fyvr11nr"},"4/3":{defaultClass:"fyvr11ns"},"3/1":{defaultClass:"fyvr11nt"},auto:{defaultClass:"fyvr11nu"}}}}},{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:"fyvr11nv",active:"fyvr11nw",disabled:"fyvr11nx",focus:"fyvr11ny",hover:"fyvr11nz",checked:"fyvr11o0"},defaultClass:"fyvr11nv"},white:{conditions:{base:"fyvr11o1",active:"fyvr11o2",disabled:"fyvr11o3",focus:"fyvr11o4",hover:"fyvr11o5",checked:"fyvr11o6"},defaultClass:"fyvr11o1"},inherit:{conditions:{base:"fyvr11o7",active:"fyvr11o8",disabled:"fyvr11o9",focus:"fyvr11oa",hover:"fyvr11ob",checked:"fyvr11oc"},defaultClass:"fyvr11o7"},transparent:{conditions:{base:"fyvr11od",active:"fyvr11oe",disabled:"fyvr11of",focus:"fyvr11og",hover:"fyvr11oh",checked:"fyvr11oi"},defaultClass:"fyvr11od"},positive:{conditions:{base:"fyvr11oj",active:"fyvr11ok",disabled:"fyvr11ol",focus:"fyvr11om",hover:"fyvr11on",checked:"fyvr11oo"},defaultClass:"fyvr11oj"},negative:{conditions:{base:"fyvr11op",active:"fyvr11oq",disabled:"fyvr11or",focus:"fyvr11os",hover:"fyvr11ot",checked:"fyvr11ou"},defaultClass:"fyvr11op"},info:{conditions:{base:"fyvr11ov",active:"fyvr11ow",disabled:"fyvr11ox",focus:"fyvr11oy",hover:"fyvr11oz",checked:"fyvr11p0"},defaultClass:"fyvr11ov"},warning:{conditions:{base:"fyvr11p1",active:"fyvr11p2",disabled:"fyvr11p3",focus:"fyvr11p4",hover:"fyvr11p5",checked:"fyvr11p6"},defaultClass:"fyvr11p1"},gradientBackdrop:{conditions:{base:"fyvr11p7",active:"fyvr11p8",disabled:"fyvr11p9",focus:"fyvr11pa",hover:"fyvr11pb",checked:"fyvr11pc"},defaultClass:"fyvr11p7"},gradientPrimary:{conditions:{base:"fyvr11pd",active:"fyvr11pe",disabled:"fyvr11pf",focus:"fyvr11pg",hover:"fyvr11ph",checked:"fyvr11pi"},defaultClass:"fyvr11pd"},gradientSecondary:{conditions:{base:"fyvr11pj",active:"fyvr11pk",disabled:"fyvr11pl",focus:"fyvr11pm",hover:"fyvr11pn",checked:"fyvr11po"},defaultClass:"fyvr11pj"},arbitrumDark:{conditions:{base:"fyvr11pp",active:"fyvr11pq",disabled:"fyvr11pr",focus:"fyvr11ps",hover:"fyvr11pt",checked:"fyvr11pu"},defaultClass:"fyvr11pp"},arbitrumLight:{conditions:{base:"fyvr11pv",active:"fyvr11pw",disabled:"fyvr11px",focus:"fyvr11py",hover:"fyvr11pz",checked:"fyvr11q0"},defaultClass:"fyvr11pv"},avalanceDark:{conditions:{base:"fyvr11q1",active:"fyvr11q2",disabled:"fyvr11q3",focus:"fyvr11q4",hover:"fyvr11q5",checked:"fyvr11q6"},defaultClass:"fyvr11q1"},avalanceLight:{conditions:{base:"fyvr11q7",active:"fyvr11q8",disabled:"fyvr11q9",focus:"fyvr11qa",hover:"fyvr11qb",checked:"fyvr11qc"},defaultClass:"fyvr11q7"},bscDark:{conditions:{base:"fyvr11qd",active:"fyvr11qe",disabled:"fyvr11qf",focus:"fyvr11qg",hover:"fyvr11qh",checked:"fyvr11qi"},defaultClass:"fyvr11qd"},bscLight:{conditions:{base:"fyvr11qj",active:"fyvr11qk",disabled:"fyvr11ql",focus:"fyvr11qm",hover:"fyvr11qn",checked:"fyvr11qo"},defaultClass:"fyvr11qj"},ethereumDark:{conditions:{base:"fyvr11qp",active:"fyvr11qq",disabled:"fyvr11qr",focus:"fyvr11qs",hover:"fyvr11qt",checked:"fyvr11qu"},defaultClass:"fyvr11qp"},ethereumLight:{conditions:{base:"fyvr11qv",active:"fyvr11qw",disabled:"fyvr11qx",focus:"fyvr11qy",hover:"fyvr11qz",checked:"fyvr11r0"},defaultClass:"fyvr11qv"},gnosisDark:{conditions:{base:"fyvr11r1",active:"fyvr11r2",disabled:"fyvr11r3",focus:"fyvr11r4",hover:"fyvr11r5",checked:"fyvr11r6"},defaultClass:"fyvr11r1"},gnosisLight:{conditions:{base:"fyvr11r7",active:"fyvr11r8",disabled:"fyvr11r9",focus:"fyvr11ra",hover:"fyvr11rb",checked:"fyvr11rc"},defaultClass:"fyvr11r7"},polygonDark:{conditions:{base:"fyvr11rd",active:"fyvr11re",disabled:"fyvr11rf",focus:"fyvr11rg",hover:"fyvr11rh",checked:"fyvr11ri"},defaultClass:"fyvr11rd"},polygonLight:{conditions:{base:"fyvr11rj",active:"fyvr11rk",disabled:"fyvr11rl",focus:"fyvr11rm",hover:"fyvr11rn",checked:"fyvr11ro"},defaultClass:"fyvr11rj"},text100:{conditions:{base:"fyvr11rp",active:"fyvr11rq",disabled:"fyvr11rr",focus:"fyvr11rs",hover:"fyvr11rt",checked:"fyvr11ru"},defaultClass:"fyvr11rp"},text80:{conditions:{base:"fyvr11rv",active:"fyvr11rw",disabled:"fyvr11rx",focus:"fyvr11ry",hover:"fyvr11rz",checked:"fyvr11s0"},defaultClass:"fyvr11rv"},text50:{conditions:{base:"fyvr11s1",active:"fyvr11s2",disabled:"fyvr11s3",focus:"fyvr11s4",hover:"fyvr11s5",checked:"fyvr11s6"},defaultClass:"fyvr11s1"},textInverse100:{conditions:{base:"fyvr11s7",active:"fyvr11s8",disabled:"fyvr11s9",focus:"fyvr11sa",hover:"fyvr11sb",checked:"fyvr11sc"},defaultClass:"fyvr11s7"},backgroundPrimary:{conditions:{base:"fyvr11sd",active:"fyvr11se",disabled:"fyvr11sf",focus:"fyvr11sg",hover:"fyvr11sh",checked:"fyvr11si"},defaultClass:"fyvr11sd"},backgroundSecondary:{conditions:{base:"fyvr11sj",active:"fyvr11sk",disabled:"fyvr11sl",focus:"fyvr11sm",hover:"fyvr11sn",checked:"fyvr11so"},defaultClass:"fyvr11sj"},backgroundContrast:{conditions:{base:"fyvr11sp",active:"fyvr11sq",disabled:"fyvr11sr",focus:"fyvr11ss",hover:"fyvr11st",checked:"fyvr11su"},defaultClass:"fyvr11sp"},backgroundMuted:{conditions:{base:"fyvr11sv",active:"fyvr11sw",disabled:"fyvr11sx",focus:"fyvr11sy",hover:"fyvr11sz",checked:"fyvr11t0"},defaultClass:"fyvr11sv"},backgroundControl:{conditions:{base:"fyvr11t1",active:"fyvr11t2",disabled:"fyvr11t3",focus:"fyvr11t4",hover:"fyvr11t5",checked:"fyvr11t6"},defaultClass:"fyvr11t1"},backgroundInverse:{conditions:{base:"fyvr11t7",active:"fyvr11t8",disabled:"fyvr11t9",focus:"fyvr11ta",hover:"fyvr11tb",checked:"fyvr11tc"},defaultClass:"fyvr11t7"},backgroundBackdrop:{conditions:{base:"fyvr11td",active:"fyvr11te",disabled:"fyvr11tf",focus:"fyvr11tg",hover:"fyvr11th",checked:"fyvr11ti"},defaultClass:"fyvr11td"},backgroundOverlay:{conditions:{base:"fyvr11tj",active:"fyvr11tk",disabled:"fyvr11tl",focus:"fyvr11tm",hover:"fyvr11tn",checked:"fyvr11to"},defaultClass:"fyvr11tj"},backgroundRaised:{conditions:{base:"fyvr11tp",active:"fyvr11tq",disabled:"fyvr11tr",focus:"fyvr11ts",hover:"fyvr11tt",checked:"fyvr11tu"},defaultClass:"fyvr11tp"},buttonGlass:{conditions:{base:"fyvr11tv",active:"fyvr11tw",disabled:"fyvr11tx",focus:"fyvr11ty",hover:"fyvr11tz",checked:"fyvr11u0"},defaultClass:"fyvr11tv"},buttonEmphasis:{conditions:{base:"fyvr11u1",active:"fyvr11u2",disabled:"fyvr11u3",focus:"fyvr11u4",hover:"fyvr11u5",checked:"fyvr11u6"},defaultClass:"fyvr11u1"},buttonInverse:{conditions:{base:"fyvr11u7",active:"fyvr11u8",disabled:"fyvr11u9",focus:"fyvr11ua",hover:"fyvr11ub",checked:"fyvr11uc"},defaultClass:"fyvr11u7"},borderNormal:{conditions:{base:"fyvr11ud",active:"fyvr11ue",disabled:"fyvr11uf",focus:"fyvr11ug",hover:"fyvr11uh",checked:"fyvr11ui"},defaultClass:"fyvr11ud"},borderFocus:{conditions:{base:"fyvr11uj",active:"fyvr11uk",disabled:"fyvr11ul",focus:"fyvr11um",hover:"fyvr11un",checked:"fyvr11uo"},defaultClass:"fyvr11uj"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11up",active:"fyvr11uq",disabled:"fyvr11ur",focus:"fyvr11us",hover:"fyvr11ut",checked:"fyvr11uu"},defaultClass:"fyvr11up"},white:{conditions:{base:"fyvr11uv",active:"fyvr11uw",disabled:"fyvr11ux",focus:"fyvr11uy",hover:"fyvr11uz",checked:"fyvr11v0"},defaultClass:"fyvr11uv"},inherit:{conditions:{base:"fyvr11v1",active:"fyvr11v2",disabled:"fyvr11v3",focus:"fyvr11v4",hover:"fyvr11v5",checked:"fyvr11v6"},defaultClass:"fyvr11v1"},transparent:{conditions:{base:"fyvr11v7",active:"fyvr11v8",disabled:"fyvr11v9",focus:"fyvr11va",hover:"fyvr11vb",checked:"fyvr11vc"},defaultClass:"fyvr11v7"},positive:{conditions:{base:"fyvr11vd",active:"fyvr11ve",disabled:"fyvr11vf",focus:"fyvr11vg",hover:"fyvr11vh",checked:"fyvr11vi"},defaultClass:"fyvr11vd"},negative:{conditions:{base:"fyvr11vj",active:"fyvr11vk",disabled:"fyvr11vl",focus:"fyvr11vm",hover:"fyvr11vn",checked:"fyvr11vo"},defaultClass:"fyvr11vj"},info:{conditions:{base:"fyvr11vp",active:"fyvr11vq",disabled:"fyvr11vr",focus:"fyvr11vs",hover:"fyvr11vt",checked:"fyvr11vu"},defaultClass:"fyvr11vp"},warning:{conditions:{base:"fyvr11vv",active:"fyvr11vw",disabled:"fyvr11vx",focus:"fyvr11vy",hover:"fyvr11vz",checked:"fyvr11w0"},defaultClass:"fyvr11vv"},gradientBackdrop:{conditions:{base:"fyvr11w1",active:"fyvr11w2",disabled:"fyvr11w3",focus:"fyvr11w4",hover:"fyvr11w5",checked:"fyvr11w6"},defaultClass:"fyvr11w1"},gradientPrimary:{conditions:{base:"fyvr11w7",active:"fyvr11w8",disabled:"fyvr11w9",focus:"fyvr11wa",hover:"fyvr11wb",checked:"fyvr11wc"},defaultClass:"fyvr11w7"},gradientSecondary:{conditions:{base:"fyvr11wd",active:"fyvr11we",disabled:"fyvr11wf",focus:"fyvr11wg",hover:"fyvr11wh",checked:"fyvr11wi"},defaultClass:"fyvr11wd"},arbitrumDark:{conditions:{base:"fyvr11wj",active:"fyvr11wk",disabled:"fyvr11wl",focus:"fyvr11wm",hover:"fyvr11wn",checked:"fyvr11wo"},defaultClass:"fyvr11wj"},arbitrumLight:{conditions:{base:"fyvr11wp",active:"fyvr11wq",disabled:"fyvr11wr",focus:"fyvr11ws",hover:"fyvr11wt",checked:"fyvr11wu"},defaultClass:"fyvr11wp"},avalanceDark:{conditions:{base:"fyvr11wv",active:"fyvr11ww",disabled:"fyvr11wx",focus:"fyvr11wy",hover:"fyvr11wz",checked:"fyvr11x0"},defaultClass:"fyvr11wv"},avalanceLight:{conditions:{base:"fyvr11x1",active:"fyvr11x2",disabled:"fyvr11x3",focus:"fyvr11x4",hover:"fyvr11x5",checked:"fyvr11x6"},defaultClass:"fyvr11x1"},bscDark:{conditions:{base:"fyvr11x7",active:"fyvr11x8",disabled:"fyvr11x9",focus:"fyvr11xa",hover:"fyvr11xb",checked:"fyvr11xc"},defaultClass:"fyvr11x7"},bscLight:{conditions:{base:"fyvr11xd",active:"fyvr11xe",disabled:"fyvr11xf",focus:"fyvr11xg",hover:"fyvr11xh",checked:"fyvr11xi"},defaultClass:"fyvr11xd"},ethereumDark:{conditions:{base:"fyvr11xj",active:"fyvr11xk",disabled:"fyvr11xl",focus:"fyvr11xm",hover:"fyvr11xn",checked:"fyvr11xo"},defaultClass:"fyvr11xj"},ethereumLight:{conditions:{base:"fyvr11xp",active:"fyvr11xq",disabled:"fyvr11xr",focus:"fyvr11xs",hover:"fyvr11xt",checked:"fyvr11xu"},defaultClass:"fyvr11xp"},gnosisDark:{conditions:{base:"fyvr11xv",active:"fyvr11xw",disabled:"fyvr11xx",focus:"fyvr11xy",hover:"fyvr11xz",checked:"fyvr11y0"},defaultClass:"fyvr11xv"},gnosisLight:{conditions:{base:"fyvr11y1",active:"fyvr11y2",disabled:"fyvr11y3",focus:"fyvr11y4",hover:"fyvr11y5",checked:"fyvr11y6"},defaultClass:"fyvr11y1"},polygonDark:{conditions:{base:"fyvr11y7",active:"fyvr11y8",disabled:"fyvr11y9",focus:"fyvr11ya",hover:"fyvr11yb",checked:"fyvr11yc"},defaultClass:"fyvr11y7"},polygonLight:{conditions:{base:"fyvr11yd",active:"fyvr11ye",disabled:"fyvr11yf",focus:"fyvr11yg",hover:"fyvr11yh",checked:"fyvr11yi"},defaultClass:"fyvr11yd"},text100:{conditions:{base:"fyvr11yj",active:"fyvr11yk",disabled:"fyvr11yl",focus:"fyvr11ym",hover:"fyvr11yn",checked:"fyvr11yo"},defaultClass:"fyvr11yj"},text80:{conditions:{base:"fyvr11yp",active:"fyvr11yq",disabled:"fyvr11yr",focus:"fyvr11ys",hover:"fyvr11yt",checked:"fyvr11yu"},defaultClass:"fyvr11yp"},text50:{conditions:{base:"fyvr11yv",active:"fyvr11yw",disabled:"fyvr11yx",focus:"fyvr11yy",hover:"fyvr11yz",checked:"fyvr11z0"},defaultClass:"fyvr11yv"},textInverse100:{conditions:{base:"fyvr11z1",active:"fyvr11z2",disabled:"fyvr11z3",focus:"fyvr11z4",hover:"fyvr11z5",checked:"fyvr11z6"},defaultClass:"fyvr11z1"},backgroundPrimary:{conditions:{base:"fyvr11z7",active:"fyvr11z8",disabled:"fyvr11z9",focus:"fyvr11za",hover:"fyvr11zb",checked:"fyvr11zc"},defaultClass:"fyvr11z7"},backgroundSecondary:{conditions:{base:"fyvr11zd",active:"fyvr11ze",disabled:"fyvr11zf",focus:"fyvr11zg",hover:"fyvr11zh",checked:"fyvr11zi"},defaultClass:"fyvr11zd"},backgroundContrast:{conditions:{base:"fyvr11zj",active:"fyvr11zk",disabled:"fyvr11zl",focus:"fyvr11zm",hover:"fyvr11zn",checked:"fyvr11zo"},defaultClass:"fyvr11zj"},backgroundMuted:{conditions:{base:"fyvr11zp",active:"fyvr11zq",disabled:"fyvr11zr",focus:"fyvr11zs",hover:"fyvr11zt",checked:"fyvr11zu"},defaultClass:"fyvr11zp"},backgroundControl:{conditions:{base:"fyvr11zv",active:"fyvr11zw",disabled:"fyvr11zx",focus:"fyvr11zy",hover:"fyvr11zz",checked:"fyvr1200"},defaultClass:"fyvr11zv"},backgroundInverse:{conditions:{base:"fyvr1201",active:"fyvr1202",disabled:"fyvr1203",focus:"fyvr1204",hover:"fyvr1205",checked:"fyvr1206"},defaultClass:"fyvr1201"},backgroundBackdrop:{conditions:{base:"fyvr1207",active:"fyvr1208",disabled:"fyvr1209",focus:"fyvr120a",hover:"fyvr120b",checked:"fyvr120c"},defaultClass:"fyvr1207"},backgroundOverlay:{conditions:{base:"fyvr120d",active:"fyvr120e",disabled:"fyvr120f",focus:"fyvr120g",hover:"fyvr120h",checked:"fyvr120i"},defaultClass:"fyvr120d"},backgroundRaised:{conditions:{base:"fyvr120j",active:"fyvr120k",disabled:"fyvr120l",focus:"fyvr120m",hover:"fyvr120n",checked:"fyvr120o"},defaultClass:"fyvr120j"},buttonGlass:{conditions:{base:"fyvr120p",active:"fyvr120q",disabled:"fyvr120r",focus:"fyvr120s",hover:"fyvr120t",checked:"fyvr120u"},defaultClass:"fyvr120p"},buttonEmphasis:{conditions:{base:"fyvr120v",active:"fyvr120w",disabled:"fyvr120x",focus:"fyvr120y",hover:"fyvr120z",checked:"fyvr1210"},defaultClass:"fyvr120v"},buttonInverse:{conditions:{base:"fyvr1211",active:"fyvr1212",disabled:"fyvr1213",focus:"fyvr1214",hover:"fyvr1215",checked:"fyvr1216"},defaultClass:"fyvr1211"},borderNormal:{conditions:{base:"fyvr1217",active:"fyvr1218",disabled:"fyvr1219",focus:"fyvr121a",hover:"fyvr121b",checked:"fyvr121c"},defaultClass:"fyvr1217"},borderFocus:{conditions:{base:"fyvr121d",active:"fyvr121e",disabled:"fyvr121f",focus:"fyvr121g",hover:"fyvr121h",checked:"fyvr121i"},defaultClass:"fyvr121d"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr121j",active:"fyvr121k",disabled:"fyvr121l",focus:"fyvr121m",hover:"fyvr121n",checked:"fyvr121o"},defaultClass:"fyvr121j"},dashed:{conditions:{base:"fyvr121p",active:"fyvr121q",disabled:"fyvr121r",focus:"fyvr121s",hover:"fyvr121t",checked:"fyvr121u"},defaultClass:"fyvr121p"},dotted:{conditions:{base:"fyvr121v",active:"fyvr121w",disabled:"fyvr121x",focus:"fyvr121y",hover:"fyvr121z",checked:"fyvr1220"},defaultClass:"fyvr121v"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr1221",active:"fyvr1222",disabled:"fyvr1223",focus:"fyvr1224",hover:"fyvr1225",checked:"fyvr1226"},defaultClass:"fyvr1221"},white:{conditions:{base:"fyvr1227",active:"fyvr1228",disabled:"fyvr1229",focus:"fyvr122a",hover:"fyvr122b",checked:"fyvr122c"},defaultClass:"fyvr1227"},inherit:{conditions:{base:"fyvr122d",active:"fyvr122e",disabled:"fyvr122f",focus:"fyvr122g",hover:"fyvr122h",checked:"fyvr122i"},defaultClass:"fyvr122d"},transparent:{conditions:{base:"fyvr122j",active:"fyvr122k",disabled:"fyvr122l",focus:"fyvr122m",hover:"fyvr122n",checked:"fyvr122o"},defaultClass:"fyvr122j"},positive:{conditions:{base:"fyvr122p",active:"fyvr122q",disabled:"fyvr122r",focus:"fyvr122s",hover:"fyvr122t",checked:"fyvr122u"},defaultClass:"fyvr122p"},negative:{conditions:{base:"fyvr122v",active:"fyvr122w",disabled:"fyvr122x",focus:"fyvr122y",hover:"fyvr122z",checked:"fyvr1230"},defaultClass:"fyvr122v"},info:{conditions:{base:"fyvr1231",active:"fyvr1232",disabled:"fyvr1233",focus:"fyvr1234",hover:"fyvr1235",checked:"fyvr1236"},defaultClass:"fyvr1231"},warning:{conditions:{base:"fyvr1237",active:"fyvr1238",disabled:"fyvr1239",focus:"fyvr123a",hover:"fyvr123b",checked:"fyvr123c"},defaultClass:"fyvr1237"},gradientBackdrop:{conditions:{base:"fyvr123d",active:"fyvr123e",disabled:"fyvr123f",focus:"fyvr123g",hover:"fyvr123h",checked:"fyvr123i"},defaultClass:"fyvr123d"},gradientPrimary:{conditions:{base:"fyvr123j",active:"fyvr123k",disabled:"fyvr123l",focus:"fyvr123m",hover:"fyvr123n",checked:"fyvr123o"},defaultClass:"fyvr123j"},gradientSecondary:{conditions:{base:"fyvr123p",active:"fyvr123q",disabled:"fyvr123r",focus:"fyvr123s",hover:"fyvr123t",checked:"fyvr123u"},defaultClass:"fyvr123p"},arbitrumDark:{conditions:{base:"fyvr123v",active:"fyvr123w",disabled:"fyvr123x",focus:"fyvr123y",hover:"fyvr123z",checked:"fyvr1240"},defaultClass:"fyvr123v"},arbitrumLight:{conditions:{base:"fyvr1241",active:"fyvr1242",disabled:"fyvr1243",focus:"fyvr1244",hover:"fyvr1245",checked:"fyvr1246"},defaultClass:"fyvr1241"},avalanceDark:{conditions:{base:"fyvr1247",active:"fyvr1248",disabled:"fyvr1249",focus:"fyvr124a",hover:"fyvr124b",checked:"fyvr124c"},defaultClass:"fyvr1247"},avalanceLight:{conditions:{base:"fyvr124d",active:"fyvr124e",disabled:"fyvr124f",focus:"fyvr124g",hover:"fyvr124h",checked:"fyvr124i"},defaultClass:"fyvr124d"},bscDark:{conditions:{base:"fyvr124j",active:"fyvr124k",disabled:"fyvr124l",focus:"fyvr124m",hover:"fyvr124n",checked:"fyvr124o"},defaultClass:"fyvr124j"},bscLight:{conditions:{base:"fyvr124p",active:"fyvr124q",disabled:"fyvr124r",focus:"fyvr124s",hover:"fyvr124t",checked:"fyvr124u"},defaultClass:"fyvr124p"},ethereumDark:{conditions:{base:"fyvr124v",active:"fyvr124w",disabled:"fyvr124x",focus:"fyvr124y",hover:"fyvr124z",checked:"fyvr1250"},defaultClass:"fyvr124v"},ethereumLight:{conditions:{base:"fyvr1251",active:"fyvr1252",disabled:"fyvr1253",focus:"fyvr1254",hover:"fyvr1255",checked:"fyvr1256"},defaultClass:"fyvr1251"},gnosisDark:{conditions:{base:"fyvr1257",active:"fyvr1258",disabled:"fyvr1259",focus:"fyvr125a",hover:"fyvr125b",checked:"fyvr125c"},defaultClass:"fyvr1257"},gnosisLight:{conditions:{base:"fyvr125d",active:"fyvr125e",disabled:"fyvr125f",focus:"fyvr125g",hover:"fyvr125h",checked:"fyvr125i"},defaultClass:"fyvr125d"},polygonDark:{conditions:{base:"fyvr125j",active:"fyvr125k",disabled:"fyvr125l",focus:"fyvr125m",hover:"fyvr125n",checked:"fyvr125o"},defaultClass:"fyvr125j"},polygonLight:{conditions:{base:"fyvr125p",active:"fyvr125q",disabled:"fyvr125r",focus:"fyvr125s",hover:"fyvr125t",checked:"fyvr125u"},defaultClass:"fyvr125p"},text100:{conditions:{base:"fyvr125v",active:"fyvr125w",disabled:"fyvr125x",focus:"fyvr125y",hover:"fyvr125z",checked:"fyvr1260"},defaultClass:"fyvr125v"},text80:{conditions:{base:"fyvr1261",active:"fyvr1262",disabled:"fyvr1263",focus:"fyvr1264",hover:"fyvr1265",checked:"fyvr1266"},defaultClass:"fyvr1261"},text50:{conditions:{base:"fyvr1267",active:"fyvr1268",disabled:"fyvr1269",focus:"fyvr126a",hover:"fyvr126b",checked:"fyvr126c"},defaultClass:"fyvr1267"},textInverse100:{conditions:{base:"fyvr126d",active:"fyvr126e",disabled:"fyvr126f",focus:"fyvr126g",hover:"fyvr126h",checked:"fyvr126i"},defaultClass:"fyvr126d"},backgroundPrimary:{conditions:{base:"fyvr126j",active:"fyvr126k",disabled:"fyvr126l",focus:"fyvr126m",hover:"fyvr126n",checked:"fyvr126o"},defaultClass:"fyvr126j"},backgroundSecondary:{conditions:{base:"fyvr126p",active:"fyvr126q",disabled:"fyvr126r",focus:"fyvr126s",hover:"fyvr126t",checked:"fyvr126u"},defaultClass:"fyvr126p"},backgroundContrast:{conditions:{base:"fyvr126v",active:"fyvr126w",disabled:"fyvr126x",focus:"fyvr126y",hover:"fyvr126z",checked:"fyvr1270"},defaultClass:"fyvr126v"},backgroundMuted:{conditions:{base:"fyvr1271",active:"fyvr1272",disabled:"fyvr1273",focus:"fyvr1274",hover:"fyvr1275",checked:"fyvr1276"},defaultClass:"fyvr1271"},backgroundControl:{conditions:{base:"fyvr1277",active:"fyvr1278",disabled:"fyvr1279",focus:"fyvr127a",hover:"fyvr127b",checked:"fyvr127c"},defaultClass:"fyvr1277"},backgroundInverse:{conditions:{base:"fyvr127d",active:"fyvr127e",disabled:"fyvr127f",focus:"fyvr127g",hover:"fyvr127h",checked:"fyvr127i"},defaultClass:"fyvr127d"},backgroundBackdrop:{conditions:{base:"fyvr127j",active:"fyvr127k",disabled:"fyvr127l",focus:"fyvr127m",hover:"fyvr127n",checked:"fyvr127o"},defaultClass:"fyvr127j"},backgroundOverlay:{conditions:{base:"fyvr127p",active:"fyvr127q",disabled:"fyvr127r",focus:"fyvr127s",hover:"fyvr127t",checked:"fyvr127u"},defaultClass:"fyvr127p"},backgroundRaised:{conditions:{base:"fyvr127v",active:"fyvr127w",disabled:"fyvr127x",focus:"fyvr127y",hover:"fyvr127z",checked:"fyvr1280"},defaultClass:"fyvr127v"},buttonGlass:{conditions:{base:"fyvr1281",active:"fyvr1282",disabled:"fyvr1283",focus:"fyvr1284",hover:"fyvr1285",checked:"fyvr1286"},defaultClass:"fyvr1281"},buttonEmphasis:{conditions:{base:"fyvr1287",active:"fyvr1288",disabled:"fyvr1289",focus:"fyvr128a",hover:"fyvr128b",checked:"fyvr128c"},defaultClass:"fyvr1287"},buttonInverse:{conditions:{base:"fyvr128d",active:"fyvr128e",disabled:"fyvr128f",focus:"fyvr128g",hover:"fyvr128h",checked:"fyvr128i"},defaultClass:"fyvr128d"},borderNormal:{conditions:{base:"fyvr128j",active:"fyvr128k",disabled:"fyvr128l",focus:"fyvr128m",hover:"fyvr128n",checked:"fyvr128o"},defaultClass:"fyvr128j"},borderFocus:{conditions:{base:"fyvr128p",active:"fyvr128q",disabled:"fyvr128r",focus:"fyvr128s",hover:"fyvr128t",checked:"fyvr128u"},defaultClass:"fyvr128p"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr128v",active:"fyvr128w",disabled:"fyvr128x",focus:"fyvr128y",hover:"fyvr128z",checked:"fyvr1290"},defaultClass:"fyvr128v"},dashed:{conditions:{base:"fyvr1291",active:"fyvr1292",disabled:"fyvr1293",focus:"fyvr1294",hover:"fyvr1295",checked:"fyvr1296"},defaultClass:"fyvr1291"},dotted:{conditions:{base:"fyvr1297",active:"fyvr1298",disabled:"fyvr1299",focus:"fyvr129a",hover:"fyvr129b",checked:"fyvr129c"},defaultClass:"fyvr1297"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr129d",active:"fyvr129e",disabled:"fyvr129f",focus:"fyvr129g",hover:"fyvr129h",checked:"fyvr129i"},defaultClass:"fyvr129d"},white:{conditions:{base:"fyvr129j",active:"fyvr129k",disabled:"fyvr129l",focus:"fyvr129m",hover:"fyvr129n",checked:"fyvr129o"},defaultClass:"fyvr129j"},inherit:{conditions:{base:"fyvr129p",active:"fyvr129q",disabled:"fyvr129r",focus:"fyvr129s",hover:"fyvr129t",checked:"fyvr129u"},defaultClass:"fyvr129p"},transparent:{conditions:{base:"fyvr129v",active:"fyvr129w",disabled:"fyvr129x",focus:"fyvr129y",hover:"fyvr129z",checked:"fyvr12a0"},defaultClass:"fyvr129v"},positive:{conditions:{base:"fyvr12a1",active:"fyvr12a2",disabled:"fyvr12a3",focus:"fyvr12a4",hover:"fyvr12a5",checked:"fyvr12a6"},defaultClass:"fyvr12a1"},negative:{conditions:{base:"fyvr12a7",active:"fyvr12a8",disabled:"fyvr12a9",focus:"fyvr12aa",hover:"fyvr12ab",checked:"fyvr12ac"},defaultClass:"fyvr12a7"},info:{conditions:{base:"fyvr12ad",active:"fyvr12ae",disabled:"fyvr12af",focus:"fyvr12ag",hover:"fyvr12ah",checked:"fyvr12ai"},defaultClass:"fyvr12ad"},warning:{conditions:{base:"fyvr12aj",active:"fyvr12ak",disabled:"fyvr12al",focus:"fyvr12am",hover:"fyvr12an",checked:"fyvr12ao"},defaultClass:"fyvr12aj"},gradientBackdrop:{conditions:{base:"fyvr12ap",active:"fyvr12aq",disabled:"fyvr12ar",focus:"fyvr12as",hover:"fyvr12at",checked:"fyvr12au"},defaultClass:"fyvr12ap"},gradientPrimary:{conditions:{base:"fyvr12av",active:"fyvr12aw",disabled:"fyvr12ax",focus:"fyvr12ay",hover:"fyvr12az",checked:"fyvr12b0"},defaultClass:"fyvr12av"},gradientSecondary:{conditions:{base:"fyvr12b1",active:"fyvr12b2",disabled:"fyvr12b3",focus:"fyvr12b4",hover:"fyvr12b5",checked:"fyvr12b6"},defaultClass:"fyvr12b1"},arbitrumDark:{conditions:{base:"fyvr12b7",active:"fyvr12b8",disabled:"fyvr12b9",focus:"fyvr12ba",hover:"fyvr12bb",checked:"fyvr12bc"},defaultClass:"fyvr12b7"},arbitrumLight:{conditions:{base:"fyvr12bd",active:"fyvr12be",disabled:"fyvr12bf",focus:"fyvr12bg",hover:"fyvr12bh",checked:"fyvr12bi"},defaultClass:"fyvr12bd"},avalanceDark:{conditions:{base:"fyvr12bj",active:"fyvr12bk",disabled:"fyvr12bl",focus:"fyvr12bm",hover:"fyvr12bn",checked:"fyvr12bo"},defaultClass:"fyvr12bj"},avalanceLight:{conditions:{base:"fyvr12bp",active:"fyvr12bq",disabled:"fyvr12br",focus:"fyvr12bs",hover:"fyvr12bt",checked:"fyvr12bu"},defaultClass:"fyvr12bp"},bscDark:{conditions:{base:"fyvr12bv",active:"fyvr12bw",disabled:"fyvr12bx",focus:"fyvr12by",hover:"fyvr12bz",checked:"fyvr12c0"},defaultClass:"fyvr12bv"},bscLight:{conditions:{base:"fyvr12c1",active:"fyvr12c2",disabled:"fyvr12c3",focus:"fyvr12c4",hover:"fyvr12c5",checked:"fyvr12c6"},defaultClass:"fyvr12c1"},ethereumDark:{conditions:{base:"fyvr12c7",active:"fyvr12c8",disabled:"fyvr12c9",focus:"fyvr12ca",hover:"fyvr12cb",checked:"fyvr12cc"},defaultClass:"fyvr12c7"},ethereumLight:{conditions:{base:"fyvr12cd",active:"fyvr12ce",disabled:"fyvr12cf",focus:"fyvr12cg",hover:"fyvr12ch",checked:"fyvr12ci"},defaultClass:"fyvr12cd"},gnosisDark:{conditions:{base:"fyvr12cj",active:"fyvr12ck",disabled:"fyvr12cl",focus:"fyvr12cm",hover:"fyvr12cn",checked:"fyvr12co"},defaultClass:"fyvr12cj"},gnosisLight:{conditions:{base:"fyvr12cp",active:"fyvr12cq",disabled:"fyvr12cr",focus:"fyvr12cs",hover:"fyvr12ct",checked:"fyvr12cu"},defaultClass:"fyvr12cp"},polygonDark:{conditions:{base:"fyvr12cv",active:"fyvr12cw",disabled:"fyvr12cx",focus:"fyvr12cy",hover:"fyvr12cz",checked:"fyvr12d0"},defaultClass:"fyvr12cv"},polygonLight:{conditions:{base:"fyvr12d1",active:"fyvr12d2",disabled:"fyvr12d3",focus:"fyvr12d4",hover:"fyvr12d5",checked:"fyvr12d6"},defaultClass:"fyvr12d1"},text100:{conditions:{base:"fyvr12d7",active:"fyvr12d8",disabled:"fyvr12d9",focus:"fyvr12da",hover:"fyvr12db",checked:"fyvr12dc"},defaultClass:"fyvr12d7"},text80:{conditions:{base:"fyvr12dd",active:"fyvr12de",disabled:"fyvr12df",focus:"fyvr12dg",hover:"fyvr12dh",checked:"fyvr12di"},defaultClass:"fyvr12dd"},text50:{conditions:{base:"fyvr12dj",active:"fyvr12dk",disabled:"fyvr12dl",focus:"fyvr12dm",hover:"fyvr12dn",checked:"fyvr12do"},defaultClass:"fyvr12dj"},textInverse100:{conditions:{base:"fyvr12dp",active:"fyvr12dq",disabled:"fyvr12dr",focus:"fyvr12ds",hover:"fyvr12dt",checked:"fyvr12du"},defaultClass:"fyvr12dp"},backgroundPrimary:{conditions:{base:"fyvr12dv",active:"fyvr12dw",disabled:"fyvr12dx",focus:"fyvr12dy",hover:"fyvr12dz",checked:"fyvr12e0"},defaultClass:"fyvr12dv"},backgroundSecondary:{conditions:{base:"fyvr12e1",active:"fyvr12e2",disabled:"fyvr12e3",focus:"fyvr12e4",hover:"fyvr12e5",checked:"fyvr12e6"},defaultClass:"fyvr12e1"},backgroundContrast:{conditions:{base:"fyvr12e7",active:"fyvr12e8",disabled:"fyvr12e9",focus:"fyvr12ea",hover:"fyvr12eb",checked:"fyvr12ec"},defaultClass:"fyvr12e7"},backgroundMuted:{conditions:{base:"fyvr12ed",active:"fyvr12ee",disabled:"fyvr12ef",focus:"fyvr12eg",hover:"fyvr12eh",checked:"fyvr12ei"},defaultClass:"fyvr12ed"},backgroundControl:{conditions:{base:"fyvr12ej",active:"fyvr12ek",disabled:"fyvr12el",focus:"fyvr12em",hover:"fyvr12en",checked:"fyvr12eo"},defaultClass:"fyvr12ej"},backgroundInverse:{conditions:{base:"fyvr12ep",active:"fyvr12eq",disabled:"fyvr12er",focus:"fyvr12es",hover:"fyvr12et",checked:"fyvr12eu"},defaultClass:"fyvr12ep"},backgroundBackdrop:{conditions:{base:"fyvr12ev",active:"fyvr12ew",disabled:"fyvr12ex",focus:"fyvr12ey",hover:"fyvr12ez",checked:"fyvr12f0"},defaultClass:"fyvr12ev"},backgroundOverlay:{conditions:{base:"fyvr12f1",active:"fyvr12f2",disabled:"fyvr12f3",focus:"fyvr12f4",hover:"fyvr12f5",checked:"fyvr12f6"},defaultClass:"fyvr12f1"},backgroundRaised:{conditions:{base:"fyvr12f7",active:"fyvr12f8",disabled:"fyvr12f9",focus:"fyvr12fa",hover:"fyvr12fb",checked:"fyvr12fc"},defaultClass:"fyvr12f7"},buttonGlass:{conditions:{base:"fyvr12fd",active:"fyvr12fe",disabled:"fyvr12ff",focus:"fyvr12fg",hover:"fyvr12fh",checked:"fyvr12fi"},defaultClass:"fyvr12fd"},buttonEmphasis:{conditions:{base:"fyvr12fj",active:"fyvr12fk",disabled:"fyvr12fl",focus:"fyvr12fm",hover:"fyvr12fn",checked:"fyvr12fo"},defaultClass:"fyvr12fj"},buttonInverse:{conditions:{base:"fyvr12fp",active:"fyvr12fq",disabled:"fyvr12fr",focus:"fyvr12fs",hover:"fyvr12ft",checked:"fyvr12fu"},defaultClass:"fyvr12fp"},borderNormal:{conditions:{base:"fyvr12fv",active:"fyvr12fw",disabled:"fyvr12fx",focus:"fyvr12fy",hover:"fyvr12fz",checked:"fyvr12g0"},defaultClass:"fyvr12fv"},borderFocus:{conditions:{base:"fyvr12g1",active:"fyvr12g2",disabled:"fyvr12g3",focus:"fyvr12g4",hover:"fyvr12g5",checked:"fyvr12g6"},defaultClass:"fyvr12g1"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12g7",active:"fyvr12g8",disabled:"fyvr12g9",focus:"fyvr12ga",hover:"fyvr12gb",checked:"fyvr12gc"},defaultClass:"fyvr12g7"},dashed:{conditions:{base:"fyvr12gd",active:"fyvr12ge",disabled:"fyvr12gf",focus:"fyvr12gg",hover:"fyvr12gh",checked:"fyvr12gi"},defaultClass:"fyvr12gd"},dotted:{conditions:{base:"fyvr12gj",active:"fyvr12gk",disabled:"fyvr12gl",focus:"fyvr12gm",hover:"fyvr12gn",checked:"fyvr12go"},defaultClass:"fyvr12gj"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12gp",active:"fyvr12gq",disabled:"fyvr12gr",focus:"fyvr12gs",hover:"fyvr12gt",checked:"fyvr12gu"},defaultClass:"fyvr12gp"},white:{conditions:{base:"fyvr12gv",active:"fyvr12gw",disabled:"fyvr12gx",focus:"fyvr12gy",hover:"fyvr12gz",checked:"fyvr12h0"},defaultClass:"fyvr12gv"},inherit:{conditions:{base:"fyvr12h1",active:"fyvr12h2",disabled:"fyvr12h3",focus:"fyvr12h4",hover:"fyvr12h5",checked:"fyvr12h6"},defaultClass:"fyvr12h1"},transparent:{conditions:{base:"fyvr12h7",active:"fyvr12h8",disabled:"fyvr12h9",focus:"fyvr12ha",hover:"fyvr12hb",checked:"fyvr12hc"},defaultClass:"fyvr12h7"},positive:{conditions:{base:"fyvr12hd",active:"fyvr12he",disabled:"fyvr12hf",focus:"fyvr12hg",hover:"fyvr12hh",checked:"fyvr12hi"},defaultClass:"fyvr12hd"},negative:{conditions:{base:"fyvr12hj",active:"fyvr12hk",disabled:"fyvr12hl",focus:"fyvr12hm",hover:"fyvr12hn",checked:"fyvr12ho"},defaultClass:"fyvr12hj"},info:{conditions:{base:"fyvr12hp",active:"fyvr12hq",disabled:"fyvr12hr",focus:"fyvr12hs",hover:"fyvr12ht",checked:"fyvr12hu"},defaultClass:"fyvr12hp"},warning:{conditions:{base:"fyvr12hv",active:"fyvr12hw",disabled:"fyvr12hx",focus:"fyvr12hy",hover:"fyvr12hz",checked:"fyvr12i0"},defaultClass:"fyvr12hv"},gradientBackdrop:{conditions:{base:"fyvr12i1",active:"fyvr12i2",disabled:"fyvr12i3",focus:"fyvr12i4",hover:"fyvr12i5",checked:"fyvr12i6"},defaultClass:"fyvr12i1"},gradientPrimary:{conditions:{base:"fyvr12i7",active:"fyvr12i8",disabled:"fyvr12i9",focus:"fyvr12ia",hover:"fyvr12ib",checked:"fyvr12ic"},defaultClass:"fyvr12i7"},gradientSecondary:{conditions:{base:"fyvr12id",active:"fyvr12ie",disabled:"fyvr12if",focus:"fyvr12ig",hover:"fyvr12ih",checked:"fyvr12ii"},defaultClass:"fyvr12id"},arbitrumDark:{conditions:{base:"fyvr12ij",active:"fyvr12ik",disabled:"fyvr12il",focus:"fyvr12im",hover:"fyvr12in",checked:"fyvr12io"},defaultClass:"fyvr12ij"},arbitrumLight:{conditions:{base:"fyvr12ip",active:"fyvr12iq",disabled:"fyvr12ir",focus:"fyvr12is",hover:"fyvr12it",checked:"fyvr12iu"},defaultClass:"fyvr12ip"},avalanceDark:{conditions:{base:"fyvr12iv",active:"fyvr12iw",disabled:"fyvr12ix",focus:"fyvr12iy",hover:"fyvr12iz",checked:"fyvr12j0"},defaultClass:"fyvr12iv"},avalanceLight:{conditions:{base:"fyvr12j1",active:"fyvr12j2",disabled:"fyvr12j3",focus:"fyvr12j4",hover:"fyvr12j5",checked:"fyvr12j6"},defaultClass:"fyvr12j1"},bscDark:{conditions:{base:"fyvr12j7",active:"fyvr12j8",disabled:"fyvr12j9",focus:"fyvr12ja",hover:"fyvr12jb",checked:"fyvr12jc"},defaultClass:"fyvr12j7"},bscLight:{conditions:{base:"fyvr12jd",active:"fyvr12je",disabled:"fyvr12jf",focus:"fyvr12jg",hover:"fyvr12jh",checked:"fyvr12ji"},defaultClass:"fyvr12jd"},ethereumDark:{conditions:{base:"fyvr12jj",active:"fyvr12jk",disabled:"fyvr12jl",focus:"fyvr12jm",hover:"fyvr12jn",checked:"fyvr12jo"},defaultClass:"fyvr12jj"},ethereumLight:{conditions:{base:"fyvr12jp",active:"fyvr12jq",disabled:"fyvr12jr",focus:"fyvr12js",hover:"fyvr12jt",checked:"fyvr12ju"},defaultClass:"fyvr12jp"},gnosisDark:{conditions:{base:"fyvr12jv",active:"fyvr12jw",disabled:"fyvr12jx",focus:"fyvr12jy",hover:"fyvr12jz",checked:"fyvr12k0"},defaultClass:"fyvr12jv"},gnosisLight:{conditions:{base:"fyvr12k1",active:"fyvr12k2",disabled:"fyvr12k3",focus:"fyvr12k4",hover:"fyvr12k5",checked:"fyvr12k6"},defaultClass:"fyvr12k1"},polygonDark:{conditions:{base:"fyvr12k7",active:"fyvr12k8",disabled:"fyvr12k9",focus:"fyvr12ka",hover:"fyvr12kb",checked:"fyvr12kc"},defaultClass:"fyvr12k7"},polygonLight:{conditions:{base:"fyvr12kd",active:"fyvr12ke",disabled:"fyvr12kf",focus:"fyvr12kg",hover:"fyvr12kh",checked:"fyvr12ki"},defaultClass:"fyvr12kd"},text100:{conditions:{base:"fyvr12kj",active:"fyvr12kk",disabled:"fyvr12kl",focus:"fyvr12km",hover:"fyvr12kn",checked:"fyvr12ko"},defaultClass:"fyvr12kj"},text80:{conditions:{base:"fyvr12kp",active:"fyvr12kq",disabled:"fyvr12kr",focus:"fyvr12ks",hover:"fyvr12kt",checked:"fyvr12ku"},defaultClass:"fyvr12kp"},text50:{conditions:{base:"fyvr12kv",active:"fyvr12kw",disabled:"fyvr12kx",focus:"fyvr12ky",hover:"fyvr12kz",checked:"fyvr12l0"},defaultClass:"fyvr12kv"},textInverse100:{conditions:{base:"fyvr12l1",active:"fyvr12l2",disabled:"fyvr12l3",focus:"fyvr12l4",hover:"fyvr12l5",checked:"fyvr12l6"},defaultClass:"fyvr12l1"},backgroundPrimary:{conditions:{base:"fyvr12l7",active:"fyvr12l8",disabled:"fyvr12l9",focus:"fyvr12la",hover:"fyvr12lb",checked:"fyvr12lc"},defaultClass:"fyvr12l7"},backgroundSecondary:{conditions:{base:"fyvr12ld",active:"fyvr12le",disabled:"fyvr12lf",focus:"fyvr12lg",hover:"fyvr12lh",checked:"fyvr12li"},defaultClass:"fyvr12ld"},backgroundContrast:{conditions:{base:"fyvr12lj",active:"fyvr12lk",disabled:"fyvr12ll",focus:"fyvr12lm",hover:"fyvr12ln",checked:"fyvr12lo"},defaultClass:"fyvr12lj"},backgroundMuted:{conditions:{base:"fyvr12lp",active:"fyvr12lq",disabled:"fyvr12lr",focus:"fyvr12ls",hover:"fyvr12lt",checked:"fyvr12lu"},defaultClass:"fyvr12lp"},backgroundControl:{conditions:{base:"fyvr12lv",active:"fyvr12lw",disabled:"fyvr12lx",focus:"fyvr12ly",hover:"fyvr12lz",checked:"fyvr12m0"},defaultClass:"fyvr12lv"},backgroundInverse:{conditions:{base:"fyvr12m1",active:"fyvr12m2",disabled:"fyvr12m3",focus:"fyvr12m4",hover:"fyvr12m5",checked:"fyvr12m6"},defaultClass:"fyvr12m1"},backgroundBackdrop:{conditions:{base:"fyvr12m7",active:"fyvr12m8",disabled:"fyvr12m9",focus:"fyvr12ma",hover:"fyvr12mb",checked:"fyvr12mc"},defaultClass:"fyvr12m7"},backgroundOverlay:{conditions:{base:"fyvr12md",active:"fyvr12me",disabled:"fyvr12mf",focus:"fyvr12mg",hover:"fyvr12mh",checked:"fyvr12mi"},defaultClass:"fyvr12md"},backgroundRaised:{conditions:{base:"fyvr12mj",active:"fyvr12mk",disabled:"fyvr12ml",focus:"fyvr12mm",hover:"fyvr12mn",checked:"fyvr12mo"},defaultClass:"fyvr12mj"},buttonGlass:{conditions:{base:"fyvr12mp",active:"fyvr12mq",disabled:"fyvr12mr",focus:"fyvr12ms",hover:"fyvr12mt",checked:"fyvr12mu"},defaultClass:"fyvr12mp"},buttonEmphasis:{conditions:{base:"fyvr12mv",active:"fyvr12mw",disabled:"fyvr12mx",focus:"fyvr12my",hover:"fyvr12mz",checked:"fyvr12n0"},defaultClass:"fyvr12mv"},buttonInverse:{conditions:{base:"fyvr12n1",active:"fyvr12n2",disabled:"fyvr12n3",focus:"fyvr12n4",hover:"fyvr12n5",checked:"fyvr12n6"},defaultClass:"fyvr12n1"},borderNormal:{conditions:{base:"fyvr12n7",active:"fyvr12n8",disabled:"fyvr12n9",focus:"fyvr12na",hover:"fyvr12nb",checked:"fyvr12nc"},defaultClass:"fyvr12n7"},borderFocus:{conditions:{base:"fyvr12nd",active:"fyvr12ne",disabled:"fyvr12nf",focus:"fyvr12ng",hover:"fyvr12nh",checked:"fyvr12ni"},defaultClass:"fyvr12nd"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12nj",active:"fyvr12nk",disabled:"fyvr12nl",focus:"fyvr12nm",hover:"fyvr12nn",checked:"fyvr12no"},defaultClass:"fyvr12nj"},dashed:{conditions:{base:"fyvr12np",active:"fyvr12nq",disabled:"fyvr12nr",focus:"fyvr12ns",hover:"fyvr12nt",checked:"fyvr12nu"},defaultClass:"fyvr12np"},dotted:{conditions:{base:"fyvr12nv",active:"fyvr12nw",disabled:"fyvr12nx",focus:"fyvr12ny",hover:"fyvr12nz",checked:"fyvr12o0"},defaultClass:"fyvr12nv"}}},border:{values:{none:{conditions:{base:"fyvr12o1",active:"fyvr12o2",disabled:"fyvr12o3",focus:"fyvr12o4",hover:"fyvr12o5",checked:"fyvr12o6"},defaultClass:"fyvr12o1"}}},color:{values:{black:{conditions:{base:"fyvr12o7",active:"fyvr12o8",disabled:"fyvr12o9",focus:"fyvr12oa",hover:"fyvr12ob",checked:"fyvr12oc"},defaultClass:"fyvr12o7"},white:{conditions:{base:"fyvr12od",active:"fyvr12oe",disabled:"fyvr12of",focus:"fyvr12og",hover:"fyvr12oh",checked:"fyvr12oi"},defaultClass:"fyvr12od"},inherit:{conditions:{base:"fyvr12oj",active:"fyvr12ok",disabled:"fyvr12ol",focus:"fyvr12om",hover:"fyvr12on",checked:"fyvr12oo"},defaultClass:"fyvr12oj"},transparent:{conditions:{base:"fyvr12op",active:"fyvr12oq",disabled:"fyvr12or",focus:"fyvr12os",hover:"fyvr12ot",checked:"fyvr12ou"},defaultClass:"fyvr12op"},positive:{conditions:{base:"fyvr12ov",active:"fyvr12ow",disabled:"fyvr12ox",focus:"fyvr12oy",hover:"fyvr12oz",checked:"fyvr12p0"},defaultClass:"fyvr12ov"},negative:{conditions:{base:"fyvr12p1",active:"fyvr12p2",disabled:"fyvr12p3",focus:"fyvr12p4",hover:"fyvr12p5",checked:"fyvr12p6"},defaultClass:"fyvr12p1"},info:{conditions:{base:"fyvr12p7",active:"fyvr12p8",disabled:"fyvr12p9",focus:"fyvr12pa",hover:"fyvr12pb",checked:"fyvr12pc"},defaultClass:"fyvr12p7"},warning:{conditions:{base:"fyvr12pd",active:"fyvr12pe",disabled:"fyvr12pf",focus:"fyvr12pg",hover:"fyvr12ph",checked:"fyvr12pi"},defaultClass:"fyvr12pd"},gradientBackdrop:{conditions:{base:"fyvr12pj",active:"fyvr12pk",disabled:"fyvr12pl",focus:"fyvr12pm",hover:"fyvr12pn",checked:"fyvr12po"},defaultClass:"fyvr12pj"},gradientPrimary:{conditions:{base:"fyvr12pp",active:"fyvr12pq",disabled:"fyvr12pr",focus:"fyvr12ps",hover:"fyvr12pt",checked:"fyvr12pu"},defaultClass:"fyvr12pp"},gradientSecondary:{conditions:{base:"fyvr12pv",active:"fyvr12pw",disabled:"fyvr12px",focus:"fyvr12py",hover:"fyvr12pz",checked:"fyvr12q0"},defaultClass:"fyvr12pv"},arbitrumDark:{conditions:{base:"fyvr12q1",active:"fyvr12q2",disabled:"fyvr12q3",focus:"fyvr12q4",hover:"fyvr12q5",checked:"fyvr12q6"},defaultClass:"fyvr12q1"},arbitrumLight:{conditions:{base:"fyvr12q7",active:"fyvr12q8",disabled:"fyvr12q9",focus:"fyvr12qa",hover:"fyvr12qb",checked:"fyvr12qc"},defaultClass:"fyvr12q7"},avalanceDark:{conditions:{base:"fyvr12qd",active:"fyvr12qe",disabled:"fyvr12qf",focus:"fyvr12qg",hover:"fyvr12qh",checked:"fyvr12qi"},defaultClass:"fyvr12qd"},avalanceLight:{conditions:{base:"fyvr12qj",active:"fyvr12qk",disabled:"fyvr12ql",focus:"fyvr12qm",hover:"fyvr12qn",checked:"fyvr12qo"},defaultClass:"fyvr12qj"},bscDark:{conditions:{base:"fyvr12qp",active:"fyvr12qq",disabled:"fyvr12qr",focus:"fyvr12qs",hover:"fyvr12qt",checked:"fyvr12qu"},defaultClass:"fyvr12qp"},bscLight:{conditions:{base:"fyvr12qv",active:"fyvr12qw",disabled:"fyvr12qx",focus:"fyvr12qy",hover:"fyvr12qz",checked:"fyvr12r0"},defaultClass:"fyvr12qv"},ethereumDark:{conditions:{base:"fyvr12r1",active:"fyvr12r2",disabled:"fyvr12r3",focus:"fyvr12r4",hover:"fyvr12r5",checked:"fyvr12r6"},defaultClass:"fyvr12r1"},ethereumLight:{conditions:{base:"fyvr12r7",active:"fyvr12r8",disabled:"fyvr12r9",focus:"fyvr12ra",hover:"fyvr12rb",checked:"fyvr12rc"},defaultClass:"fyvr12r7"},gnosisDark:{conditions:{base:"fyvr12rd",active:"fyvr12re",disabled:"fyvr12rf",focus:"fyvr12rg",hover:"fyvr12rh",checked:"fyvr12ri"},defaultClass:"fyvr12rd"},gnosisLight:{conditions:{base:"fyvr12rj",active:"fyvr12rk",disabled:"fyvr12rl",focus:"fyvr12rm",hover:"fyvr12rn",checked:"fyvr12ro"},defaultClass:"fyvr12rj"},polygonDark:{conditions:{base:"fyvr12rp",active:"fyvr12rq",disabled:"fyvr12rr",focus:"fyvr12rs",hover:"fyvr12rt",checked:"fyvr12ru"},defaultClass:"fyvr12rp"},polygonLight:{conditions:{base:"fyvr12rv",active:"fyvr12rw",disabled:"fyvr12rx",focus:"fyvr12ry",hover:"fyvr12rz",checked:"fyvr12s0"},defaultClass:"fyvr12rv"},text100:{conditions:{base:"fyvr12s1",active:"fyvr12s2",disabled:"fyvr12s3",focus:"fyvr12s4",hover:"fyvr12s5",checked:"fyvr12s6"},defaultClass:"fyvr12s1"},text80:{conditions:{base:"fyvr12s7",active:"fyvr12s8",disabled:"fyvr12s9",focus:"fyvr12sa",hover:"fyvr12sb",checked:"fyvr12sc"},defaultClass:"fyvr12s7"},text50:{conditions:{base:"fyvr12sd",active:"fyvr12se",disabled:"fyvr12sf",focus:"fyvr12sg",hover:"fyvr12sh",checked:"fyvr12si"},defaultClass:"fyvr12sd"},textInverse100:{conditions:{base:"fyvr12sj",active:"fyvr12sk",disabled:"fyvr12sl",focus:"fyvr12sm",hover:"fyvr12sn",checked:"fyvr12so"},defaultClass:"fyvr12sj"},backgroundPrimary:{conditions:{base:"fyvr12sp",active:"fyvr12sq",disabled:"fyvr12sr",focus:"fyvr12ss",hover:"fyvr12st",checked:"fyvr12su"},defaultClass:"fyvr12sp"},backgroundSecondary:{conditions:{base:"fyvr12sv",active:"fyvr12sw",disabled:"fyvr12sx",focus:"fyvr12sy",hover:"fyvr12sz",checked:"fyvr12t0"},defaultClass:"fyvr12sv"},backgroundContrast:{conditions:{base:"fyvr12t1",active:"fyvr12t2",disabled:"fyvr12t3",focus:"fyvr12t4",hover:"fyvr12t5",checked:"fyvr12t6"},defaultClass:"fyvr12t1"},backgroundMuted:{conditions:{base:"fyvr12t7",active:"fyvr12t8",disabled:"fyvr12t9",focus:"fyvr12ta",hover:"fyvr12tb",checked:"fyvr12tc"},defaultClass:"fyvr12t7"},backgroundControl:{conditions:{base:"fyvr12td",active:"fyvr12te",disabled:"fyvr12tf",focus:"fyvr12tg",hover:"fyvr12th",checked:"fyvr12ti"},defaultClass:"fyvr12td"},backgroundInverse:{conditions:{base:"fyvr12tj",active:"fyvr12tk",disabled:"fyvr12tl",focus:"fyvr12tm",hover:"fyvr12tn",checked:"fyvr12to"},defaultClass:"fyvr12tj"},backgroundBackdrop:{conditions:{base:"fyvr12tp",active:"fyvr12tq",disabled:"fyvr12tr",focus:"fyvr12ts",hover:"fyvr12tt",checked:"fyvr12tu"},defaultClass:"fyvr12tp"},backgroundOverlay:{conditions:{base:"fyvr12tv",active:"fyvr12tw",disabled:"fyvr12tx",focus:"fyvr12ty",hover:"fyvr12tz",checked:"fyvr12u0"},defaultClass:"fyvr12tv"},backgroundRaised:{conditions:{base:"fyvr12u1",active:"fyvr12u2",disabled:"fyvr12u3",focus:"fyvr12u4",hover:"fyvr12u5",checked:"fyvr12u6"},defaultClass:"fyvr12u1"},buttonGlass:{conditions:{base:"fyvr12u7",active:"fyvr12u8",disabled:"fyvr12u9",focus:"fyvr12ua",hover:"fyvr12ub",checked:"fyvr12uc"},defaultClass:"fyvr12u7"},buttonEmphasis:{conditions:{base:"fyvr12ud",active:"fyvr12ue",disabled:"fyvr12uf",focus:"fyvr12ug",hover:"fyvr12uh",checked:"fyvr12ui"},defaultClass:"fyvr12ud"},buttonInverse:{conditions:{base:"fyvr12uj",active:"fyvr12uk",disabled:"fyvr12ul",focus:"fyvr12um",hover:"fyvr12un",checked:"fyvr12uo"},defaultClass:"fyvr12uj"},borderNormal:{conditions:{base:"fyvr12up",active:"fyvr12uq",disabled:"fyvr12ur",focus:"fyvr12us",hover:"fyvr12ut",checked:"fyvr12uu"},defaultClass:"fyvr12up"},borderFocus:{conditions:{base:"fyvr12uv",active:"fyvr12uw",disabled:"fyvr12ux",focus:"fyvr12uy",hover:"fyvr12uz",checked:"fyvr12v0"},defaultClass:"fyvr12uv"}}},cursor:{values:{default:{conditions:{base:"fyvr12v1",active:"fyvr12v2",disabled:"fyvr12v3",focus:"fyvr12v4",hover:"fyvr12v5",checked:"fyvr12v6"},defaultClass:"fyvr12v1"},pointer:{conditions:{base:"fyvr12v7",active:"fyvr12v8",disabled:"fyvr12v9",focus:"fyvr12va",hover:"fyvr12vb",checked:"fyvr12vc"},defaultClass:"fyvr12v7"},text:{conditions:{base:"fyvr12vd",active:"fyvr12ve",disabled:"fyvr12vf",focus:"fyvr12vg",hover:"fyvr12vh",checked:"fyvr12vi"},defaultClass:"fyvr12vd"}}},opacity:{values:{0:{conditions:{base:"fyvr12vj",active:"fyvr12vk",disabled:"fyvr12vl",focus:"fyvr12vm",hover:"fyvr12vn",checked:"fyvr12vo"},defaultClass:"fyvr12vj"},50:{conditions:{base:"fyvr12vp",active:"fyvr12vq",disabled:"fyvr12vr",focus:"fyvr12vs",hover:"fyvr12vt",checked:"fyvr12vu"},defaultClass:"fyvr12vp"},80:{conditions:{base:"fyvr12vv",active:"fyvr12vw",disabled:"fyvr12vx",focus:"fyvr12vy",hover:"fyvr12vz",checked:"fyvr12w0"},defaultClass:"fyvr12vv"},100:{conditions:{base:"fyvr12w1",active:"fyvr12w2",disabled:"fyvr12w3",focus:"fyvr12w4",hover:"fyvr12w5",checked:"fyvr12w6"},defaultClass:"fyvr12w1"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr12w7",active:"fyvr12w8",disabled:"fyvr12w9",focus:"fyvr12wa",hover:"fyvr12wb",checked:"fyvr12wc"},defaultClass:"fyvr12w7"},auto:{conditions:{base:"fyvr12wd",active:"fyvr12we",disabled:"fyvr12wf",focus:"fyvr12wg",hover:"fyvr12wh",checked:"fyvr12wi"},defaultClass:"fyvr12wd"}}},outline:{values:{none:{conditions:{base:"fyvr12wj",active:"fyvr12wk",disabled:"fyvr12wl",focus:"fyvr12wm",hover:"fyvr12wn",checked:"fyvr12wo"},defaultClass:"fyvr12wj"}}},boxShadow:{values:{none:{conditions:{base:"fyvr12wp",active:"fyvr12wq",disabled:"fyvr12wr",focus:"fyvr12ws",hover:"fyvr12wt",checked:"fyvr12wu"},defaultClass:"fyvr12wp"}}}}});const AD=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],Ty=t=>(t.display||(t.display=Object.keys(t).some(e=>AD.includes(e))?"flex":void 0),t8(t));Ty.properties=t8.properties;function r8(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e{const{as:r="div",sx:n={},className:i,...s}=t,o={},a={};for(const c in s)Ty.properties.has(c)?o[c]=s[c]:a[c]=s[c];const l=Ty({...o,...n});return y.createElement(r,{className:Mn(l,i),...a,ref:e})});var n8={exports:{}},qc={};/** + )`,gradientPrimary:"linear-gradient(89.69deg, #4411E1 0.27%, #7537F9 99.73%)",gradientSecondary:"linear-gradient(32.51deg, #951990 -15.23%, #3A35B1 48.55%, #20A8B0 100%)",arbitrumDark:"#212D44",arbitrumLight:"#93D4FF",avalanceDark:"#810C0C",avalanceLight:"#FF8080",bscDark:"#584508",bscLight:"#FCCF43",ethereumDark:"#132362",ethereumLight:"#AABBFF",gnosisDark:"#084246",gnosisLight:"#8CF6FD",polygonDark:"#350881",polygonLight:"#C7A6FF"},dD={...t8,text100:"rgba(255, 255, 255, 1)",text80:"rgba(255, 255, 255, 0.8)",text50:"rgba(255, 255, 255, 0.5)",textInverse100:"rgba(0, 0, 0, 1)",backgroundPrimary:"rgba(0, 0, 0, 1)",backgroundSecondary:"rgba(255, 255, 255, 0.1)",backgroundContrast:"rgba(0, 0, 0, 0.5)",backgroundMuted:"rgba(255, 255, 255, 0.05)",backgroundControl:"rgba(255, 255, 255, 0.25)",backgroundInverse:"rgba(255, 255, 255, 1)",backgroundBackdrop:"rgba(34, 34, 34, 0.9)",backgroundOverlay:"rgba(0, 0, 0, 0.7)",backgroundRaised:"rgba(54, 54, 54, 0.7)",buttonGlass:"rgba(255, 255, 255, 0.15)",buttonEmphasis:"rgba(0, 0, 0, 0.5)",buttonInverse:"rgba(255, 255, 255, 0.8)",borderNormal:"rgba(255, 255, 255, 0.25)",borderFocus:"rgba(255, 255, 255, 0.5)"},hD={...t8,text100:"rgba(0, 0, 0, 1)",text80:"rgba(0, 0, 0, 0.8)",text50:"rgba(0, 0, 0, 0.5)",textInverse100:"rgba(255, 255, 255, 1)",backgroundPrimary:"rgba(244, 244, 244, 1)",backgroundSecondary:"rgba(0, 0, 0, 0.1)",backgroundContrast:"rgba(244, 244, 244, 0.5)",backgroundMuted:"rgba(0, 0, 0, 0.05)",backgroundControl:"rgba(0, 0, 0, 0.25)",backgroundInverse:"rgba(0, 0, 0, 1)",backgroundBackdrop:"rgba(221, 221, 221, 0.9)",backgroundOverlay:"rgba(244, 244, 244, 0.7)",backgroundRaised:"rgba(192, 192, 192, 0.7)",buttonGlass:"rgba(0, 0, 0, 0.15)",buttonEmphasis:"rgba(255, 255, 255, 0.5)",buttonInverse:"rgba(0, 0, 0, 0.8)",borderNormal:"rgba(0, 0, 0, 0.25)",borderFocus:"rgba(0, 0, 0, 0.5)"},vD={dark:dD,light:hD},pD={inherit:{fontFamily:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit",fontWeight:"inherit"},xlarge:{fontFamily:"body",fontSize:"xlarge",lineHeight:"9",letterSpacing:"none",fontWeight:"bold"},large:{fontFamily:"body",fontSize:"large",lineHeight:"7",letterSpacing:"normal",fontWeight:"semibold"},medium:{fontFamily:"body",fontSize:"medium",lineHeight:"6",letterSpacing:"normal",fontWeight:"bold"},normal:{fontFamily:"body",fontSize:"normal",lineHeight:"5",letterSpacing:"wide",fontWeight:"normal"},small:{fontFamily:"body",fontSize:"small",lineHeight:"4",letterSpacing:"wide",fontWeight:"medium"},xsmall:{fontFamily:"body",fontSize:"xsmall",lineHeight:"4",letterSpacing:"wide",fontWeight:"bold"},code:{fontFamily:"mono",fontSize:"normal",lineHeight:"5",letterSpacing:"none",fontWeight:"normal"}};var jE={colors:{black:"var(--seq-colors-black)",white:"var(--seq-colors-white)",inherit:"var(--seq-colors-inherit)",transparent:"var(--seq-colors-transparent)",positive:"var(--seq-colors-positive)",negative:"var(--seq-colors-negative)",info:"var(--seq-colors-info)",warning:"var(--seq-colors-warning)",gradientBackdrop:"var(--seq-colors-gradient-backdrop)",gradientPrimary:"var(--seq-colors-gradient-primary)",gradientSecondary:"var(--seq-colors-gradient-secondary)",arbitrumDark:"var(--seq-colors-arbitrum-dark)",arbitrumLight:"var(--seq-colors-arbitrum-light)",avalanceDark:"var(--seq-colors-avalance-dark)",avalanceLight:"var(--seq-colors-avalance-light)",bscDark:"var(--seq-colors-bsc-dark)",bscLight:"var(--seq-colors-bsc-light)",ethereumDark:"var(--seq-colors-ethereum-dark)",ethereumLight:"var(--seq-colors-ethereum-light)",gnosisDark:"var(--seq-colors-gnosis-dark)",gnosisLight:"var(--seq-colors-gnosis-light)",polygonDark:"var(--seq-colors-polygon-dark)",polygonLight:"var(--seq-colors-polygon-light)",text100:"var(--seq-colors-text100)",text80:"var(--seq-colors-text80)",text50:"var(--seq-colors-text50)",textInverse100:"var(--seq-colors-text-inverse100)",backgroundPrimary:"var(--seq-colors-background-primary)",backgroundSecondary:"var(--seq-colors-background-secondary)",backgroundContrast:"var(--seq-colors-background-contrast)",backgroundMuted:"var(--seq-colors-background-muted)",backgroundControl:"var(--seq-colors-background-control)",backgroundInverse:"var(--seq-colors-background-inverse)",backgroundBackdrop:"var(--seq-colors-background-backdrop)",backgroundOverlay:"var(--seq-colors-background-overlay)",backgroundRaised:"var(--seq-colors-background-raised)",buttonGlass:"var(--seq-colors-button-glass)",buttonEmphasis:"var(--seq-colors-button-emphasis)",buttonInverse:"var(--seq-colors-button-inverse)",borderNormal:"var(--seq-colors-border-normal)",borderFocus:"var(--seq-colors-border-focus)"}};function yD(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 mD(t){var e=yD(t,"string");return typeof e=="symbol"?e:String(e)}function gD(t,e,r){return e=mD(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function FE(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 E1(t){for(var e=1;efunction(){for(var e=arguments.length,r=new Array(e),n=0;nl.styles)),s=Object.keys(i),o=s.filter(l=>"mappings"in i[l]),a=l=>{var c=[],f={},u=E1({},l),d=!1;for(var h of o){var p=l[h];if(p!=null){var m=i[h];d=!0;for(var x of m.mappings)f[x]=p,u[x]==null&&delete u[x]}}var b=d?E1(E1({},f),u):l,w=function(){var I=b[E],F=i[E];try{if(F.mappings)return"continue";if(typeof I=="string"||typeof I=="number")c.push(F.values[I].defaultClass);else if(Array.isArray(I))for(var j=0;jt,wD=function(){return xD(bD)(...arguments)},r8=wD({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"}}},textDecoration:{values:{none:{defaultClass:"fyvr11n2"},underline:{defaultClass:"fyvr11n3"}}},userSelect:{values:{none:{defaultClass:"fyvr11n4"},text:{defaultClass:"fyvr11n5"},all:{defaultClass:"fyvr11n6"},auto:{defaultClass:"fyvr11n7"}}},whiteSpace:{values:{normal:{defaultClass:"fyvr11n8"},nowrap:{defaultClass:"fyvr11n9"},initial:{defaultClass:"fyvr11na"},inherit:{defaultClass:"fyvr11nb"}}},wordBreak:{values:{"break-word":{defaultClass:"fyvr11nc"}}},wordWrap:{values:{normal:{defaultClass:"fyvr11nd"},"break-word":{defaultClass:"fyvr11ne"},initial:{defaultClass:"fyvr11nf"},inherit:{defaultClass:"fyvr11ng"}}},zIndex:{values:{0:{defaultClass:"fyvr11nh"},1:{defaultClass:"fyvr11ni"},10:{defaultClass:"fyvr11nj"},20:{defaultClass:"fyvr11nk"},30:{defaultClass:"fyvr11nl"},40:{defaultClass:"fyvr11nm"},50:{defaultClass:"fyvr11nn"},"-1":{defaultClass:"fyvr11no"},auto:{defaultClass:"fyvr11np"}}},aspectRatio:{values:{"1/1":{defaultClass:"fyvr11nq"},"16/9":{defaultClass:"fyvr11nr"},"4/3":{defaultClass:"fyvr11ns"},"3/1":{defaultClass:"fyvr11nt"},auto:{defaultClass:"fyvr11nu"}}}}},{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:"fyvr11nv",active:"fyvr11nw",disabled:"fyvr11nx",focus:"fyvr11ny",hover:"fyvr11nz",checked:"fyvr11o0"},defaultClass:"fyvr11nv"},white:{conditions:{base:"fyvr11o1",active:"fyvr11o2",disabled:"fyvr11o3",focus:"fyvr11o4",hover:"fyvr11o5",checked:"fyvr11o6"},defaultClass:"fyvr11o1"},inherit:{conditions:{base:"fyvr11o7",active:"fyvr11o8",disabled:"fyvr11o9",focus:"fyvr11oa",hover:"fyvr11ob",checked:"fyvr11oc"},defaultClass:"fyvr11o7"},transparent:{conditions:{base:"fyvr11od",active:"fyvr11oe",disabled:"fyvr11of",focus:"fyvr11og",hover:"fyvr11oh",checked:"fyvr11oi"},defaultClass:"fyvr11od"},positive:{conditions:{base:"fyvr11oj",active:"fyvr11ok",disabled:"fyvr11ol",focus:"fyvr11om",hover:"fyvr11on",checked:"fyvr11oo"},defaultClass:"fyvr11oj"},negative:{conditions:{base:"fyvr11op",active:"fyvr11oq",disabled:"fyvr11or",focus:"fyvr11os",hover:"fyvr11ot",checked:"fyvr11ou"},defaultClass:"fyvr11op"},info:{conditions:{base:"fyvr11ov",active:"fyvr11ow",disabled:"fyvr11ox",focus:"fyvr11oy",hover:"fyvr11oz",checked:"fyvr11p0"},defaultClass:"fyvr11ov"},warning:{conditions:{base:"fyvr11p1",active:"fyvr11p2",disabled:"fyvr11p3",focus:"fyvr11p4",hover:"fyvr11p5",checked:"fyvr11p6"},defaultClass:"fyvr11p1"},gradientBackdrop:{conditions:{base:"fyvr11p7",active:"fyvr11p8",disabled:"fyvr11p9",focus:"fyvr11pa",hover:"fyvr11pb",checked:"fyvr11pc"},defaultClass:"fyvr11p7"},gradientPrimary:{conditions:{base:"fyvr11pd",active:"fyvr11pe",disabled:"fyvr11pf",focus:"fyvr11pg",hover:"fyvr11ph",checked:"fyvr11pi"},defaultClass:"fyvr11pd"},gradientSecondary:{conditions:{base:"fyvr11pj",active:"fyvr11pk",disabled:"fyvr11pl",focus:"fyvr11pm",hover:"fyvr11pn",checked:"fyvr11po"},defaultClass:"fyvr11pj"},arbitrumDark:{conditions:{base:"fyvr11pp",active:"fyvr11pq",disabled:"fyvr11pr",focus:"fyvr11ps",hover:"fyvr11pt",checked:"fyvr11pu"},defaultClass:"fyvr11pp"},arbitrumLight:{conditions:{base:"fyvr11pv",active:"fyvr11pw",disabled:"fyvr11px",focus:"fyvr11py",hover:"fyvr11pz",checked:"fyvr11q0"},defaultClass:"fyvr11pv"},avalanceDark:{conditions:{base:"fyvr11q1",active:"fyvr11q2",disabled:"fyvr11q3",focus:"fyvr11q4",hover:"fyvr11q5",checked:"fyvr11q6"},defaultClass:"fyvr11q1"},avalanceLight:{conditions:{base:"fyvr11q7",active:"fyvr11q8",disabled:"fyvr11q9",focus:"fyvr11qa",hover:"fyvr11qb",checked:"fyvr11qc"},defaultClass:"fyvr11q7"},bscDark:{conditions:{base:"fyvr11qd",active:"fyvr11qe",disabled:"fyvr11qf",focus:"fyvr11qg",hover:"fyvr11qh",checked:"fyvr11qi"},defaultClass:"fyvr11qd"},bscLight:{conditions:{base:"fyvr11qj",active:"fyvr11qk",disabled:"fyvr11ql",focus:"fyvr11qm",hover:"fyvr11qn",checked:"fyvr11qo"},defaultClass:"fyvr11qj"},ethereumDark:{conditions:{base:"fyvr11qp",active:"fyvr11qq",disabled:"fyvr11qr",focus:"fyvr11qs",hover:"fyvr11qt",checked:"fyvr11qu"},defaultClass:"fyvr11qp"},ethereumLight:{conditions:{base:"fyvr11qv",active:"fyvr11qw",disabled:"fyvr11qx",focus:"fyvr11qy",hover:"fyvr11qz",checked:"fyvr11r0"},defaultClass:"fyvr11qv"},gnosisDark:{conditions:{base:"fyvr11r1",active:"fyvr11r2",disabled:"fyvr11r3",focus:"fyvr11r4",hover:"fyvr11r5",checked:"fyvr11r6"},defaultClass:"fyvr11r1"},gnosisLight:{conditions:{base:"fyvr11r7",active:"fyvr11r8",disabled:"fyvr11r9",focus:"fyvr11ra",hover:"fyvr11rb",checked:"fyvr11rc"},defaultClass:"fyvr11r7"},polygonDark:{conditions:{base:"fyvr11rd",active:"fyvr11re",disabled:"fyvr11rf",focus:"fyvr11rg",hover:"fyvr11rh",checked:"fyvr11ri"},defaultClass:"fyvr11rd"},polygonLight:{conditions:{base:"fyvr11rj",active:"fyvr11rk",disabled:"fyvr11rl",focus:"fyvr11rm",hover:"fyvr11rn",checked:"fyvr11ro"},defaultClass:"fyvr11rj"},text100:{conditions:{base:"fyvr11rp",active:"fyvr11rq",disabled:"fyvr11rr",focus:"fyvr11rs",hover:"fyvr11rt",checked:"fyvr11ru"},defaultClass:"fyvr11rp"},text80:{conditions:{base:"fyvr11rv",active:"fyvr11rw",disabled:"fyvr11rx",focus:"fyvr11ry",hover:"fyvr11rz",checked:"fyvr11s0"},defaultClass:"fyvr11rv"},text50:{conditions:{base:"fyvr11s1",active:"fyvr11s2",disabled:"fyvr11s3",focus:"fyvr11s4",hover:"fyvr11s5",checked:"fyvr11s6"},defaultClass:"fyvr11s1"},textInverse100:{conditions:{base:"fyvr11s7",active:"fyvr11s8",disabled:"fyvr11s9",focus:"fyvr11sa",hover:"fyvr11sb",checked:"fyvr11sc"},defaultClass:"fyvr11s7"},backgroundPrimary:{conditions:{base:"fyvr11sd",active:"fyvr11se",disabled:"fyvr11sf",focus:"fyvr11sg",hover:"fyvr11sh",checked:"fyvr11si"},defaultClass:"fyvr11sd"},backgroundSecondary:{conditions:{base:"fyvr11sj",active:"fyvr11sk",disabled:"fyvr11sl",focus:"fyvr11sm",hover:"fyvr11sn",checked:"fyvr11so"},defaultClass:"fyvr11sj"},backgroundContrast:{conditions:{base:"fyvr11sp",active:"fyvr11sq",disabled:"fyvr11sr",focus:"fyvr11ss",hover:"fyvr11st",checked:"fyvr11su"},defaultClass:"fyvr11sp"},backgroundMuted:{conditions:{base:"fyvr11sv",active:"fyvr11sw",disabled:"fyvr11sx",focus:"fyvr11sy",hover:"fyvr11sz",checked:"fyvr11t0"},defaultClass:"fyvr11sv"},backgroundControl:{conditions:{base:"fyvr11t1",active:"fyvr11t2",disabled:"fyvr11t3",focus:"fyvr11t4",hover:"fyvr11t5",checked:"fyvr11t6"},defaultClass:"fyvr11t1"},backgroundInverse:{conditions:{base:"fyvr11t7",active:"fyvr11t8",disabled:"fyvr11t9",focus:"fyvr11ta",hover:"fyvr11tb",checked:"fyvr11tc"},defaultClass:"fyvr11t7"},backgroundBackdrop:{conditions:{base:"fyvr11td",active:"fyvr11te",disabled:"fyvr11tf",focus:"fyvr11tg",hover:"fyvr11th",checked:"fyvr11ti"},defaultClass:"fyvr11td"},backgroundOverlay:{conditions:{base:"fyvr11tj",active:"fyvr11tk",disabled:"fyvr11tl",focus:"fyvr11tm",hover:"fyvr11tn",checked:"fyvr11to"},defaultClass:"fyvr11tj"},backgroundRaised:{conditions:{base:"fyvr11tp",active:"fyvr11tq",disabled:"fyvr11tr",focus:"fyvr11ts",hover:"fyvr11tt",checked:"fyvr11tu"},defaultClass:"fyvr11tp"},buttonGlass:{conditions:{base:"fyvr11tv",active:"fyvr11tw",disabled:"fyvr11tx",focus:"fyvr11ty",hover:"fyvr11tz",checked:"fyvr11u0"},defaultClass:"fyvr11tv"},buttonEmphasis:{conditions:{base:"fyvr11u1",active:"fyvr11u2",disabled:"fyvr11u3",focus:"fyvr11u4",hover:"fyvr11u5",checked:"fyvr11u6"},defaultClass:"fyvr11u1"},buttonInverse:{conditions:{base:"fyvr11u7",active:"fyvr11u8",disabled:"fyvr11u9",focus:"fyvr11ua",hover:"fyvr11ub",checked:"fyvr11uc"},defaultClass:"fyvr11u7"},borderNormal:{conditions:{base:"fyvr11ud",active:"fyvr11ue",disabled:"fyvr11uf",focus:"fyvr11ug",hover:"fyvr11uh",checked:"fyvr11ui"},defaultClass:"fyvr11ud"},borderFocus:{conditions:{base:"fyvr11uj",active:"fyvr11uk",disabled:"fyvr11ul",focus:"fyvr11um",hover:"fyvr11un",checked:"fyvr11uo"},defaultClass:"fyvr11uj"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11up",active:"fyvr11uq",disabled:"fyvr11ur",focus:"fyvr11us",hover:"fyvr11ut",checked:"fyvr11uu"},defaultClass:"fyvr11up"},white:{conditions:{base:"fyvr11uv",active:"fyvr11uw",disabled:"fyvr11ux",focus:"fyvr11uy",hover:"fyvr11uz",checked:"fyvr11v0"},defaultClass:"fyvr11uv"},inherit:{conditions:{base:"fyvr11v1",active:"fyvr11v2",disabled:"fyvr11v3",focus:"fyvr11v4",hover:"fyvr11v5",checked:"fyvr11v6"},defaultClass:"fyvr11v1"},transparent:{conditions:{base:"fyvr11v7",active:"fyvr11v8",disabled:"fyvr11v9",focus:"fyvr11va",hover:"fyvr11vb",checked:"fyvr11vc"},defaultClass:"fyvr11v7"},positive:{conditions:{base:"fyvr11vd",active:"fyvr11ve",disabled:"fyvr11vf",focus:"fyvr11vg",hover:"fyvr11vh",checked:"fyvr11vi"},defaultClass:"fyvr11vd"},negative:{conditions:{base:"fyvr11vj",active:"fyvr11vk",disabled:"fyvr11vl",focus:"fyvr11vm",hover:"fyvr11vn",checked:"fyvr11vo"},defaultClass:"fyvr11vj"},info:{conditions:{base:"fyvr11vp",active:"fyvr11vq",disabled:"fyvr11vr",focus:"fyvr11vs",hover:"fyvr11vt",checked:"fyvr11vu"},defaultClass:"fyvr11vp"},warning:{conditions:{base:"fyvr11vv",active:"fyvr11vw",disabled:"fyvr11vx",focus:"fyvr11vy",hover:"fyvr11vz",checked:"fyvr11w0"},defaultClass:"fyvr11vv"},gradientBackdrop:{conditions:{base:"fyvr11w1",active:"fyvr11w2",disabled:"fyvr11w3",focus:"fyvr11w4",hover:"fyvr11w5",checked:"fyvr11w6"},defaultClass:"fyvr11w1"},gradientPrimary:{conditions:{base:"fyvr11w7",active:"fyvr11w8",disabled:"fyvr11w9",focus:"fyvr11wa",hover:"fyvr11wb",checked:"fyvr11wc"},defaultClass:"fyvr11w7"},gradientSecondary:{conditions:{base:"fyvr11wd",active:"fyvr11we",disabled:"fyvr11wf",focus:"fyvr11wg",hover:"fyvr11wh",checked:"fyvr11wi"},defaultClass:"fyvr11wd"},arbitrumDark:{conditions:{base:"fyvr11wj",active:"fyvr11wk",disabled:"fyvr11wl",focus:"fyvr11wm",hover:"fyvr11wn",checked:"fyvr11wo"},defaultClass:"fyvr11wj"},arbitrumLight:{conditions:{base:"fyvr11wp",active:"fyvr11wq",disabled:"fyvr11wr",focus:"fyvr11ws",hover:"fyvr11wt",checked:"fyvr11wu"},defaultClass:"fyvr11wp"},avalanceDark:{conditions:{base:"fyvr11wv",active:"fyvr11ww",disabled:"fyvr11wx",focus:"fyvr11wy",hover:"fyvr11wz",checked:"fyvr11x0"},defaultClass:"fyvr11wv"},avalanceLight:{conditions:{base:"fyvr11x1",active:"fyvr11x2",disabled:"fyvr11x3",focus:"fyvr11x4",hover:"fyvr11x5",checked:"fyvr11x6"},defaultClass:"fyvr11x1"},bscDark:{conditions:{base:"fyvr11x7",active:"fyvr11x8",disabled:"fyvr11x9",focus:"fyvr11xa",hover:"fyvr11xb",checked:"fyvr11xc"},defaultClass:"fyvr11x7"},bscLight:{conditions:{base:"fyvr11xd",active:"fyvr11xe",disabled:"fyvr11xf",focus:"fyvr11xg",hover:"fyvr11xh",checked:"fyvr11xi"},defaultClass:"fyvr11xd"},ethereumDark:{conditions:{base:"fyvr11xj",active:"fyvr11xk",disabled:"fyvr11xl",focus:"fyvr11xm",hover:"fyvr11xn",checked:"fyvr11xo"},defaultClass:"fyvr11xj"},ethereumLight:{conditions:{base:"fyvr11xp",active:"fyvr11xq",disabled:"fyvr11xr",focus:"fyvr11xs",hover:"fyvr11xt",checked:"fyvr11xu"},defaultClass:"fyvr11xp"},gnosisDark:{conditions:{base:"fyvr11xv",active:"fyvr11xw",disabled:"fyvr11xx",focus:"fyvr11xy",hover:"fyvr11xz",checked:"fyvr11y0"},defaultClass:"fyvr11xv"},gnosisLight:{conditions:{base:"fyvr11y1",active:"fyvr11y2",disabled:"fyvr11y3",focus:"fyvr11y4",hover:"fyvr11y5",checked:"fyvr11y6"},defaultClass:"fyvr11y1"},polygonDark:{conditions:{base:"fyvr11y7",active:"fyvr11y8",disabled:"fyvr11y9",focus:"fyvr11ya",hover:"fyvr11yb",checked:"fyvr11yc"},defaultClass:"fyvr11y7"},polygonLight:{conditions:{base:"fyvr11yd",active:"fyvr11ye",disabled:"fyvr11yf",focus:"fyvr11yg",hover:"fyvr11yh",checked:"fyvr11yi"},defaultClass:"fyvr11yd"},text100:{conditions:{base:"fyvr11yj",active:"fyvr11yk",disabled:"fyvr11yl",focus:"fyvr11ym",hover:"fyvr11yn",checked:"fyvr11yo"},defaultClass:"fyvr11yj"},text80:{conditions:{base:"fyvr11yp",active:"fyvr11yq",disabled:"fyvr11yr",focus:"fyvr11ys",hover:"fyvr11yt",checked:"fyvr11yu"},defaultClass:"fyvr11yp"},text50:{conditions:{base:"fyvr11yv",active:"fyvr11yw",disabled:"fyvr11yx",focus:"fyvr11yy",hover:"fyvr11yz",checked:"fyvr11z0"},defaultClass:"fyvr11yv"},textInverse100:{conditions:{base:"fyvr11z1",active:"fyvr11z2",disabled:"fyvr11z3",focus:"fyvr11z4",hover:"fyvr11z5",checked:"fyvr11z6"},defaultClass:"fyvr11z1"},backgroundPrimary:{conditions:{base:"fyvr11z7",active:"fyvr11z8",disabled:"fyvr11z9",focus:"fyvr11za",hover:"fyvr11zb",checked:"fyvr11zc"},defaultClass:"fyvr11z7"},backgroundSecondary:{conditions:{base:"fyvr11zd",active:"fyvr11ze",disabled:"fyvr11zf",focus:"fyvr11zg",hover:"fyvr11zh",checked:"fyvr11zi"},defaultClass:"fyvr11zd"},backgroundContrast:{conditions:{base:"fyvr11zj",active:"fyvr11zk",disabled:"fyvr11zl",focus:"fyvr11zm",hover:"fyvr11zn",checked:"fyvr11zo"},defaultClass:"fyvr11zj"},backgroundMuted:{conditions:{base:"fyvr11zp",active:"fyvr11zq",disabled:"fyvr11zr",focus:"fyvr11zs",hover:"fyvr11zt",checked:"fyvr11zu"},defaultClass:"fyvr11zp"},backgroundControl:{conditions:{base:"fyvr11zv",active:"fyvr11zw",disabled:"fyvr11zx",focus:"fyvr11zy",hover:"fyvr11zz",checked:"fyvr1200"},defaultClass:"fyvr11zv"},backgroundInverse:{conditions:{base:"fyvr1201",active:"fyvr1202",disabled:"fyvr1203",focus:"fyvr1204",hover:"fyvr1205",checked:"fyvr1206"},defaultClass:"fyvr1201"},backgroundBackdrop:{conditions:{base:"fyvr1207",active:"fyvr1208",disabled:"fyvr1209",focus:"fyvr120a",hover:"fyvr120b",checked:"fyvr120c"},defaultClass:"fyvr1207"},backgroundOverlay:{conditions:{base:"fyvr120d",active:"fyvr120e",disabled:"fyvr120f",focus:"fyvr120g",hover:"fyvr120h",checked:"fyvr120i"},defaultClass:"fyvr120d"},backgroundRaised:{conditions:{base:"fyvr120j",active:"fyvr120k",disabled:"fyvr120l",focus:"fyvr120m",hover:"fyvr120n",checked:"fyvr120o"},defaultClass:"fyvr120j"},buttonGlass:{conditions:{base:"fyvr120p",active:"fyvr120q",disabled:"fyvr120r",focus:"fyvr120s",hover:"fyvr120t",checked:"fyvr120u"},defaultClass:"fyvr120p"},buttonEmphasis:{conditions:{base:"fyvr120v",active:"fyvr120w",disabled:"fyvr120x",focus:"fyvr120y",hover:"fyvr120z",checked:"fyvr1210"},defaultClass:"fyvr120v"},buttonInverse:{conditions:{base:"fyvr1211",active:"fyvr1212",disabled:"fyvr1213",focus:"fyvr1214",hover:"fyvr1215",checked:"fyvr1216"},defaultClass:"fyvr1211"},borderNormal:{conditions:{base:"fyvr1217",active:"fyvr1218",disabled:"fyvr1219",focus:"fyvr121a",hover:"fyvr121b",checked:"fyvr121c"},defaultClass:"fyvr1217"},borderFocus:{conditions:{base:"fyvr121d",active:"fyvr121e",disabled:"fyvr121f",focus:"fyvr121g",hover:"fyvr121h",checked:"fyvr121i"},defaultClass:"fyvr121d"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr121j",active:"fyvr121k",disabled:"fyvr121l",focus:"fyvr121m",hover:"fyvr121n",checked:"fyvr121o"},defaultClass:"fyvr121j"},dashed:{conditions:{base:"fyvr121p",active:"fyvr121q",disabled:"fyvr121r",focus:"fyvr121s",hover:"fyvr121t",checked:"fyvr121u"},defaultClass:"fyvr121p"},dotted:{conditions:{base:"fyvr121v",active:"fyvr121w",disabled:"fyvr121x",focus:"fyvr121y",hover:"fyvr121z",checked:"fyvr1220"},defaultClass:"fyvr121v"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr1221",active:"fyvr1222",disabled:"fyvr1223",focus:"fyvr1224",hover:"fyvr1225",checked:"fyvr1226"},defaultClass:"fyvr1221"},white:{conditions:{base:"fyvr1227",active:"fyvr1228",disabled:"fyvr1229",focus:"fyvr122a",hover:"fyvr122b",checked:"fyvr122c"},defaultClass:"fyvr1227"},inherit:{conditions:{base:"fyvr122d",active:"fyvr122e",disabled:"fyvr122f",focus:"fyvr122g",hover:"fyvr122h",checked:"fyvr122i"},defaultClass:"fyvr122d"},transparent:{conditions:{base:"fyvr122j",active:"fyvr122k",disabled:"fyvr122l",focus:"fyvr122m",hover:"fyvr122n",checked:"fyvr122o"},defaultClass:"fyvr122j"},positive:{conditions:{base:"fyvr122p",active:"fyvr122q",disabled:"fyvr122r",focus:"fyvr122s",hover:"fyvr122t",checked:"fyvr122u"},defaultClass:"fyvr122p"},negative:{conditions:{base:"fyvr122v",active:"fyvr122w",disabled:"fyvr122x",focus:"fyvr122y",hover:"fyvr122z",checked:"fyvr1230"},defaultClass:"fyvr122v"},info:{conditions:{base:"fyvr1231",active:"fyvr1232",disabled:"fyvr1233",focus:"fyvr1234",hover:"fyvr1235",checked:"fyvr1236"},defaultClass:"fyvr1231"},warning:{conditions:{base:"fyvr1237",active:"fyvr1238",disabled:"fyvr1239",focus:"fyvr123a",hover:"fyvr123b",checked:"fyvr123c"},defaultClass:"fyvr1237"},gradientBackdrop:{conditions:{base:"fyvr123d",active:"fyvr123e",disabled:"fyvr123f",focus:"fyvr123g",hover:"fyvr123h",checked:"fyvr123i"},defaultClass:"fyvr123d"},gradientPrimary:{conditions:{base:"fyvr123j",active:"fyvr123k",disabled:"fyvr123l",focus:"fyvr123m",hover:"fyvr123n",checked:"fyvr123o"},defaultClass:"fyvr123j"},gradientSecondary:{conditions:{base:"fyvr123p",active:"fyvr123q",disabled:"fyvr123r",focus:"fyvr123s",hover:"fyvr123t",checked:"fyvr123u"},defaultClass:"fyvr123p"},arbitrumDark:{conditions:{base:"fyvr123v",active:"fyvr123w",disabled:"fyvr123x",focus:"fyvr123y",hover:"fyvr123z",checked:"fyvr1240"},defaultClass:"fyvr123v"},arbitrumLight:{conditions:{base:"fyvr1241",active:"fyvr1242",disabled:"fyvr1243",focus:"fyvr1244",hover:"fyvr1245",checked:"fyvr1246"},defaultClass:"fyvr1241"},avalanceDark:{conditions:{base:"fyvr1247",active:"fyvr1248",disabled:"fyvr1249",focus:"fyvr124a",hover:"fyvr124b",checked:"fyvr124c"},defaultClass:"fyvr1247"},avalanceLight:{conditions:{base:"fyvr124d",active:"fyvr124e",disabled:"fyvr124f",focus:"fyvr124g",hover:"fyvr124h",checked:"fyvr124i"},defaultClass:"fyvr124d"},bscDark:{conditions:{base:"fyvr124j",active:"fyvr124k",disabled:"fyvr124l",focus:"fyvr124m",hover:"fyvr124n",checked:"fyvr124o"},defaultClass:"fyvr124j"},bscLight:{conditions:{base:"fyvr124p",active:"fyvr124q",disabled:"fyvr124r",focus:"fyvr124s",hover:"fyvr124t",checked:"fyvr124u"},defaultClass:"fyvr124p"},ethereumDark:{conditions:{base:"fyvr124v",active:"fyvr124w",disabled:"fyvr124x",focus:"fyvr124y",hover:"fyvr124z",checked:"fyvr1250"},defaultClass:"fyvr124v"},ethereumLight:{conditions:{base:"fyvr1251",active:"fyvr1252",disabled:"fyvr1253",focus:"fyvr1254",hover:"fyvr1255",checked:"fyvr1256"},defaultClass:"fyvr1251"},gnosisDark:{conditions:{base:"fyvr1257",active:"fyvr1258",disabled:"fyvr1259",focus:"fyvr125a",hover:"fyvr125b",checked:"fyvr125c"},defaultClass:"fyvr1257"},gnosisLight:{conditions:{base:"fyvr125d",active:"fyvr125e",disabled:"fyvr125f",focus:"fyvr125g",hover:"fyvr125h",checked:"fyvr125i"},defaultClass:"fyvr125d"},polygonDark:{conditions:{base:"fyvr125j",active:"fyvr125k",disabled:"fyvr125l",focus:"fyvr125m",hover:"fyvr125n",checked:"fyvr125o"},defaultClass:"fyvr125j"},polygonLight:{conditions:{base:"fyvr125p",active:"fyvr125q",disabled:"fyvr125r",focus:"fyvr125s",hover:"fyvr125t",checked:"fyvr125u"},defaultClass:"fyvr125p"},text100:{conditions:{base:"fyvr125v",active:"fyvr125w",disabled:"fyvr125x",focus:"fyvr125y",hover:"fyvr125z",checked:"fyvr1260"},defaultClass:"fyvr125v"},text80:{conditions:{base:"fyvr1261",active:"fyvr1262",disabled:"fyvr1263",focus:"fyvr1264",hover:"fyvr1265",checked:"fyvr1266"},defaultClass:"fyvr1261"},text50:{conditions:{base:"fyvr1267",active:"fyvr1268",disabled:"fyvr1269",focus:"fyvr126a",hover:"fyvr126b",checked:"fyvr126c"},defaultClass:"fyvr1267"},textInverse100:{conditions:{base:"fyvr126d",active:"fyvr126e",disabled:"fyvr126f",focus:"fyvr126g",hover:"fyvr126h",checked:"fyvr126i"},defaultClass:"fyvr126d"},backgroundPrimary:{conditions:{base:"fyvr126j",active:"fyvr126k",disabled:"fyvr126l",focus:"fyvr126m",hover:"fyvr126n",checked:"fyvr126o"},defaultClass:"fyvr126j"},backgroundSecondary:{conditions:{base:"fyvr126p",active:"fyvr126q",disabled:"fyvr126r",focus:"fyvr126s",hover:"fyvr126t",checked:"fyvr126u"},defaultClass:"fyvr126p"},backgroundContrast:{conditions:{base:"fyvr126v",active:"fyvr126w",disabled:"fyvr126x",focus:"fyvr126y",hover:"fyvr126z",checked:"fyvr1270"},defaultClass:"fyvr126v"},backgroundMuted:{conditions:{base:"fyvr1271",active:"fyvr1272",disabled:"fyvr1273",focus:"fyvr1274",hover:"fyvr1275",checked:"fyvr1276"},defaultClass:"fyvr1271"},backgroundControl:{conditions:{base:"fyvr1277",active:"fyvr1278",disabled:"fyvr1279",focus:"fyvr127a",hover:"fyvr127b",checked:"fyvr127c"},defaultClass:"fyvr1277"},backgroundInverse:{conditions:{base:"fyvr127d",active:"fyvr127e",disabled:"fyvr127f",focus:"fyvr127g",hover:"fyvr127h",checked:"fyvr127i"},defaultClass:"fyvr127d"},backgroundBackdrop:{conditions:{base:"fyvr127j",active:"fyvr127k",disabled:"fyvr127l",focus:"fyvr127m",hover:"fyvr127n",checked:"fyvr127o"},defaultClass:"fyvr127j"},backgroundOverlay:{conditions:{base:"fyvr127p",active:"fyvr127q",disabled:"fyvr127r",focus:"fyvr127s",hover:"fyvr127t",checked:"fyvr127u"},defaultClass:"fyvr127p"},backgroundRaised:{conditions:{base:"fyvr127v",active:"fyvr127w",disabled:"fyvr127x",focus:"fyvr127y",hover:"fyvr127z",checked:"fyvr1280"},defaultClass:"fyvr127v"},buttonGlass:{conditions:{base:"fyvr1281",active:"fyvr1282",disabled:"fyvr1283",focus:"fyvr1284",hover:"fyvr1285",checked:"fyvr1286"},defaultClass:"fyvr1281"},buttonEmphasis:{conditions:{base:"fyvr1287",active:"fyvr1288",disabled:"fyvr1289",focus:"fyvr128a",hover:"fyvr128b",checked:"fyvr128c"},defaultClass:"fyvr1287"},buttonInverse:{conditions:{base:"fyvr128d",active:"fyvr128e",disabled:"fyvr128f",focus:"fyvr128g",hover:"fyvr128h",checked:"fyvr128i"},defaultClass:"fyvr128d"},borderNormal:{conditions:{base:"fyvr128j",active:"fyvr128k",disabled:"fyvr128l",focus:"fyvr128m",hover:"fyvr128n",checked:"fyvr128o"},defaultClass:"fyvr128j"},borderFocus:{conditions:{base:"fyvr128p",active:"fyvr128q",disabled:"fyvr128r",focus:"fyvr128s",hover:"fyvr128t",checked:"fyvr128u"},defaultClass:"fyvr128p"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr128v",active:"fyvr128w",disabled:"fyvr128x",focus:"fyvr128y",hover:"fyvr128z",checked:"fyvr1290"},defaultClass:"fyvr128v"},dashed:{conditions:{base:"fyvr1291",active:"fyvr1292",disabled:"fyvr1293",focus:"fyvr1294",hover:"fyvr1295",checked:"fyvr1296"},defaultClass:"fyvr1291"},dotted:{conditions:{base:"fyvr1297",active:"fyvr1298",disabled:"fyvr1299",focus:"fyvr129a",hover:"fyvr129b",checked:"fyvr129c"},defaultClass:"fyvr1297"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr129d",active:"fyvr129e",disabled:"fyvr129f",focus:"fyvr129g",hover:"fyvr129h",checked:"fyvr129i"},defaultClass:"fyvr129d"},white:{conditions:{base:"fyvr129j",active:"fyvr129k",disabled:"fyvr129l",focus:"fyvr129m",hover:"fyvr129n",checked:"fyvr129o"},defaultClass:"fyvr129j"},inherit:{conditions:{base:"fyvr129p",active:"fyvr129q",disabled:"fyvr129r",focus:"fyvr129s",hover:"fyvr129t",checked:"fyvr129u"},defaultClass:"fyvr129p"},transparent:{conditions:{base:"fyvr129v",active:"fyvr129w",disabled:"fyvr129x",focus:"fyvr129y",hover:"fyvr129z",checked:"fyvr12a0"},defaultClass:"fyvr129v"},positive:{conditions:{base:"fyvr12a1",active:"fyvr12a2",disabled:"fyvr12a3",focus:"fyvr12a4",hover:"fyvr12a5",checked:"fyvr12a6"},defaultClass:"fyvr12a1"},negative:{conditions:{base:"fyvr12a7",active:"fyvr12a8",disabled:"fyvr12a9",focus:"fyvr12aa",hover:"fyvr12ab",checked:"fyvr12ac"},defaultClass:"fyvr12a7"},info:{conditions:{base:"fyvr12ad",active:"fyvr12ae",disabled:"fyvr12af",focus:"fyvr12ag",hover:"fyvr12ah",checked:"fyvr12ai"},defaultClass:"fyvr12ad"},warning:{conditions:{base:"fyvr12aj",active:"fyvr12ak",disabled:"fyvr12al",focus:"fyvr12am",hover:"fyvr12an",checked:"fyvr12ao"},defaultClass:"fyvr12aj"},gradientBackdrop:{conditions:{base:"fyvr12ap",active:"fyvr12aq",disabled:"fyvr12ar",focus:"fyvr12as",hover:"fyvr12at",checked:"fyvr12au"},defaultClass:"fyvr12ap"},gradientPrimary:{conditions:{base:"fyvr12av",active:"fyvr12aw",disabled:"fyvr12ax",focus:"fyvr12ay",hover:"fyvr12az",checked:"fyvr12b0"},defaultClass:"fyvr12av"},gradientSecondary:{conditions:{base:"fyvr12b1",active:"fyvr12b2",disabled:"fyvr12b3",focus:"fyvr12b4",hover:"fyvr12b5",checked:"fyvr12b6"},defaultClass:"fyvr12b1"},arbitrumDark:{conditions:{base:"fyvr12b7",active:"fyvr12b8",disabled:"fyvr12b9",focus:"fyvr12ba",hover:"fyvr12bb",checked:"fyvr12bc"},defaultClass:"fyvr12b7"},arbitrumLight:{conditions:{base:"fyvr12bd",active:"fyvr12be",disabled:"fyvr12bf",focus:"fyvr12bg",hover:"fyvr12bh",checked:"fyvr12bi"},defaultClass:"fyvr12bd"},avalanceDark:{conditions:{base:"fyvr12bj",active:"fyvr12bk",disabled:"fyvr12bl",focus:"fyvr12bm",hover:"fyvr12bn",checked:"fyvr12bo"},defaultClass:"fyvr12bj"},avalanceLight:{conditions:{base:"fyvr12bp",active:"fyvr12bq",disabled:"fyvr12br",focus:"fyvr12bs",hover:"fyvr12bt",checked:"fyvr12bu"},defaultClass:"fyvr12bp"},bscDark:{conditions:{base:"fyvr12bv",active:"fyvr12bw",disabled:"fyvr12bx",focus:"fyvr12by",hover:"fyvr12bz",checked:"fyvr12c0"},defaultClass:"fyvr12bv"},bscLight:{conditions:{base:"fyvr12c1",active:"fyvr12c2",disabled:"fyvr12c3",focus:"fyvr12c4",hover:"fyvr12c5",checked:"fyvr12c6"},defaultClass:"fyvr12c1"},ethereumDark:{conditions:{base:"fyvr12c7",active:"fyvr12c8",disabled:"fyvr12c9",focus:"fyvr12ca",hover:"fyvr12cb",checked:"fyvr12cc"},defaultClass:"fyvr12c7"},ethereumLight:{conditions:{base:"fyvr12cd",active:"fyvr12ce",disabled:"fyvr12cf",focus:"fyvr12cg",hover:"fyvr12ch",checked:"fyvr12ci"},defaultClass:"fyvr12cd"},gnosisDark:{conditions:{base:"fyvr12cj",active:"fyvr12ck",disabled:"fyvr12cl",focus:"fyvr12cm",hover:"fyvr12cn",checked:"fyvr12co"},defaultClass:"fyvr12cj"},gnosisLight:{conditions:{base:"fyvr12cp",active:"fyvr12cq",disabled:"fyvr12cr",focus:"fyvr12cs",hover:"fyvr12ct",checked:"fyvr12cu"},defaultClass:"fyvr12cp"},polygonDark:{conditions:{base:"fyvr12cv",active:"fyvr12cw",disabled:"fyvr12cx",focus:"fyvr12cy",hover:"fyvr12cz",checked:"fyvr12d0"},defaultClass:"fyvr12cv"},polygonLight:{conditions:{base:"fyvr12d1",active:"fyvr12d2",disabled:"fyvr12d3",focus:"fyvr12d4",hover:"fyvr12d5",checked:"fyvr12d6"},defaultClass:"fyvr12d1"},text100:{conditions:{base:"fyvr12d7",active:"fyvr12d8",disabled:"fyvr12d9",focus:"fyvr12da",hover:"fyvr12db",checked:"fyvr12dc"},defaultClass:"fyvr12d7"},text80:{conditions:{base:"fyvr12dd",active:"fyvr12de",disabled:"fyvr12df",focus:"fyvr12dg",hover:"fyvr12dh",checked:"fyvr12di"},defaultClass:"fyvr12dd"},text50:{conditions:{base:"fyvr12dj",active:"fyvr12dk",disabled:"fyvr12dl",focus:"fyvr12dm",hover:"fyvr12dn",checked:"fyvr12do"},defaultClass:"fyvr12dj"},textInverse100:{conditions:{base:"fyvr12dp",active:"fyvr12dq",disabled:"fyvr12dr",focus:"fyvr12ds",hover:"fyvr12dt",checked:"fyvr12du"},defaultClass:"fyvr12dp"},backgroundPrimary:{conditions:{base:"fyvr12dv",active:"fyvr12dw",disabled:"fyvr12dx",focus:"fyvr12dy",hover:"fyvr12dz",checked:"fyvr12e0"},defaultClass:"fyvr12dv"},backgroundSecondary:{conditions:{base:"fyvr12e1",active:"fyvr12e2",disabled:"fyvr12e3",focus:"fyvr12e4",hover:"fyvr12e5",checked:"fyvr12e6"},defaultClass:"fyvr12e1"},backgroundContrast:{conditions:{base:"fyvr12e7",active:"fyvr12e8",disabled:"fyvr12e9",focus:"fyvr12ea",hover:"fyvr12eb",checked:"fyvr12ec"},defaultClass:"fyvr12e7"},backgroundMuted:{conditions:{base:"fyvr12ed",active:"fyvr12ee",disabled:"fyvr12ef",focus:"fyvr12eg",hover:"fyvr12eh",checked:"fyvr12ei"},defaultClass:"fyvr12ed"},backgroundControl:{conditions:{base:"fyvr12ej",active:"fyvr12ek",disabled:"fyvr12el",focus:"fyvr12em",hover:"fyvr12en",checked:"fyvr12eo"},defaultClass:"fyvr12ej"},backgroundInverse:{conditions:{base:"fyvr12ep",active:"fyvr12eq",disabled:"fyvr12er",focus:"fyvr12es",hover:"fyvr12et",checked:"fyvr12eu"},defaultClass:"fyvr12ep"},backgroundBackdrop:{conditions:{base:"fyvr12ev",active:"fyvr12ew",disabled:"fyvr12ex",focus:"fyvr12ey",hover:"fyvr12ez",checked:"fyvr12f0"},defaultClass:"fyvr12ev"},backgroundOverlay:{conditions:{base:"fyvr12f1",active:"fyvr12f2",disabled:"fyvr12f3",focus:"fyvr12f4",hover:"fyvr12f5",checked:"fyvr12f6"},defaultClass:"fyvr12f1"},backgroundRaised:{conditions:{base:"fyvr12f7",active:"fyvr12f8",disabled:"fyvr12f9",focus:"fyvr12fa",hover:"fyvr12fb",checked:"fyvr12fc"},defaultClass:"fyvr12f7"},buttonGlass:{conditions:{base:"fyvr12fd",active:"fyvr12fe",disabled:"fyvr12ff",focus:"fyvr12fg",hover:"fyvr12fh",checked:"fyvr12fi"},defaultClass:"fyvr12fd"},buttonEmphasis:{conditions:{base:"fyvr12fj",active:"fyvr12fk",disabled:"fyvr12fl",focus:"fyvr12fm",hover:"fyvr12fn",checked:"fyvr12fo"},defaultClass:"fyvr12fj"},buttonInverse:{conditions:{base:"fyvr12fp",active:"fyvr12fq",disabled:"fyvr12fr",focus:"fyvr12fs",hover:"fyvr12ft",checked:"fyvr12fu"},defaultClass:"fyvr12fp"},borderNormal:{conditions:{base:"fyvr12fv",active:"fyvr12fw",disabled:"fyvr12fx",focus:"fyvr12fy",hover:"fyvr12fz",checked:"fyvr12g0"},defaultClass:"fyvr12fv"},borderFocus:{conditions:{base:"fyvr12g1",active:"fyvr12g2",disabled:"fyvr12g3",focus:"fyvr12g4",hover:"fyvr12g5",checked:"fyvr12g6"},defaultClass:"fyvr12g1"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12g7",active:"fyvr12g8",disabled:"fyvr12g9",focus:"fyvr12ga",hover:"fyvr12gb",checked:"fyvr12gc"},defaultClass:"fyvr12g7"},dashed:{conditions:{base:"fyvr12gd",active:"fyvr12ge",disabled:"fyvr12gf",focus:"fyvr12gg",hover:"fyvr12gh",checked:"fyvr12gi"},defaultClass:"fyvr12gd"},dotted:{conditions:{base:"fyvr12gj",active:"fyvr12gk",disabled:"fyvr12gl",focus:"fyvr12gm",hover:"fyvr12gn",checked:"fyvr12go"},defaultClass:"fyvr12gj"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12gp",active:"fyvr12gq",disabled:"fyvr12gr",focus:"fyvr12gs",hover:"fyvr12gt",checked:"fyvr12gu"},defaultClass:"fyvr12gp"},white:{conditions:{base:"fyvr12gv",active:"fyvr12gw",disabled:"fyvr12gx",focus:"fyvr12gy",hover:"fyvr12gz",checked:"fyvr12h0"},defaultClass:"fyvr12gv"},inherit:{conditions:{base:"fyvr12h1",active:"fyvr12h2",disabled:"fyvr12h3",focus:"fyvr12h4",hover:"fyvr12h5",checked:"fyvr12h6"},defaultClass:"fyvr12h1"},transparent:{conditions:{base:"fyvr12h7",active:"fyvr12h8",disabled:"fyvr12h9",focus:"fyvr12ha",hover:"fyvr12hb",checked:"fyvr12hc"},defaultClass:"fyvr12h7"},positive:{conditions:{base:"fyvr12hd",active:"fyvr12he",disabled:"fyvr12hf",focus:"fyvr12hg",hover:"fyvr12hh",checked:"fyvr12hi"},defaultClass:"fyvr12hd"},negative:{conditions:{base:"fyvr12hj",active:"fyvr12hk",disabled:"fyvr12hl",focus:"fyvr12hm",hover:"fyvr12hn",checked:"fyvr12ho"},defaultClass:"fyvr12hj"},info:{conditions:{base:"fyvr12hp",active:"fyvr12hq",disabled:"fyvr12hr",focus:"fyvr12hs",hover:"fyvr12ht",checked:"fyvr12hu"},defaultClass:"fyvr12hp"},warning:{conditions:{base:"fyvr12hv",active:"fyvr12hw",disabled:"fyvr12hx",focus:"fyvr12hy",hover:"fyvr12hz",checked:"fyvr12i0"},defaultClass:"fyvr12hv"},gradientBackdrop:{conditions:{base:"fyvr12i1",active:"fyvr12i2",disabled:"fyvr12i3",focus:"fyvr12i4",hover:"fyvr12i5",checked:"fyvr12i6"},defaultClass:"fyvr12i1"},gradientPrimary:{conditions:{base:"fyvr12i7",active:"fyvr12i8",disabled:"fyvr12i9",focus:"fyvr12ia",hover:"fyvr12ib",checked:"fyvr12ic"},defaultClass:"fyvr12i7"},gradientSecondary:{conditions:{base:"fyvr12id",active:"fyvr12ie",disabled:"fyvr12if",focus:"fyvr12ig",hover:"fyvr12ih",checked:"fyvr12ii"},defaultClass:"fyvr12id"},arbitrumDark:{conditions:{base:"fyvr12ij",active:"fyvr12ik",disabled:"fyvr12il",focus:"fyvr12im",hover:"fyvr12in",checked:"fyvr12io"},defaultClass:"fyvr12ij"},arbitrumLight:{conditions:{base:"fyvr12ip",active:"fyvr12iq",disabled:"fyvr12ir",focus:"fyvr12is",hover:"fyvr12it",checked:"fyvr12iu"},defaultClass:"fyvr12ip"},avalanceDark:{conditions:{base:"fyvr12iv",active:"fyvr12iw",disabled:"fyvr12ix",focus:"fyvr12iy",hover:"fyvr12iz",checked:"fyvr12j0"},defaultClass:"fyvr12iv"},avalanceLight:{conditions:{base:"fyvr12j1",active:"fyvr12j2",disabled:"fyvr12j3",focus:"fyvr12j4",hover:"fyvr12j5",checked:"fyvr12j6"},defaultClass:"fyvr12j1"},bscDark:{conditions:{base:"fyvr12j7",active:"fyvr12j8",disabled:"fyvr12j9",focus:"fyvr12ja",hover:"fyvr12jb",checked:"fyvr12jc"},defaultClass:"fyvr12j7"},bscLight:{conditions:{base:"fyvr12jd",active:"fyvr12je",disabled:"fyvr12jf",focus:"fyvr12jg",hover:"fyvr12jh",checked:"fyvr12ji"},defaultClass:"fyvr12jd"},ethereumDark:{conditions:{base:"fyvr12jj",active:"fyvr12jk",disabled:"fyvr12jl",focus:"fyvr12jm",hover:"fyvr12jn",checked:"fyvr12jo"},defaultClass:"fyvr12jj"},ethereumLight:{conditions:{base:"fyvr12jp",active:"fyvr12jq",disabled:"fyvr12jr",focus:"fyvr12js",hover:"fyvr12jt",checked:"fyvr12ju"},defaultClass:"fyvr12jp"},gnosisDark:{conditions:{base:"fyvr12jv",active:"fyvr12jw",disabled:"fyvr12jx",focus:"fyvr12jy",hover:"fyvr12jz",checked:"fyvr12k0"},defaultClass:"fyvr12jv"},gnosisLight:{conditions:{base:"fyvr12k1",active:"fyvr12k2",disabled:"fyvr12k3",focus:"fyvr12k4",hover:"fyvr12k5",checked:"fyvr12k6"},defaultClass:"fyvr12k1"},polygonDark:{conditions:{base:"fyvr12k7",active:"fyvr12k8",disabled:"fyvr12k9",focus:"fyvr12ka",hover:"fyvr12kb",checked:"fyvr12kc"},defaultClass:"fyvr12k7"},polygonLight:{conditions:{base:"fyvr12kd",active:"fyvr12ke",disabled:"fyvr12kf",focus:"fyvr12kg",hover:"fyvr12kh",checked:"fyvr12ki"},defaultClass:"fyvr12kd"},text100:{conditions:{base:"fyvr12kj",active:"fyvr12kk",disabled:"fyvr12kl",focus:"fyvr12km",hover:"fyvr12kn",checked:"fyvr12ko"},defaultClass:"fyvr12kj"},text80:{conditions:{base:"fyvr12kp",active:"fyvr12kq",disabled:"fyvr12kr",focus:"fyvr12ks",hover:"fyvr12kt",checked:"fyvr12ku"},defaultClass:"fyvr12kp"},text50:{conditions:{base:"fyvr12kv",active:"fyvr12kw",disabled:"fyvr12kx",focus:"fyvr12ky",hover:"fyvr12kz",checked:"fyvr12l0"},defaultClass:"fyvr12kv"},textInverse100:{conditions:{base:"fyvr12l1",active:"fyvr12l2",disabled:"fyvr12l3",focus:"fyvr12l4",hover:"fyvr12l5",checked:"fyvr12l6"},defaultClass:"fyvr12l1"},backgroundPrimary:{conditions:{base:"fyvr12l7",active:"fyvr12l8",disabled:"fyvr12l9",focus:"fyvr12la",hover:"fyvr12lb",checked:"fyvr12lc"},defaultClass:"fyvr12l7"},backgroundSecondary:{conditions:{base:"fyvr12ld",active:"fyvr12le",disabled:"fyvr12lf",focus:"fyvr12lg",hover:"fyvr12lh",checked:"fyvr12li"},defaultClass:"fyvr12ld"},backgroundContrast:{conditions:{base:"fyvr12lj",active:"fyvr12lk",disabled:"fyvr12ll",focus:"fyvr12lm",hover:"fyvr12ln",checked:"fyvr12lo"},defaultClass:"fyvr12lj"},backgroundMuted:{conditions:{base:"fyvr12lp",active:"fyvr12lq",disabled:"fyvr12lr",focus:"fyvr12ls",hover:"fyvr12lt",checked:"fyvr12lu"},defaultClass:"fyvr12lp"},backgroundControl:{conditions:{base:"fyvr12lv",active:"fyvr12lw",disabled:"fyvr12lx",focus:"fyvr12ly",hover:"fyvr12lz",checked:"fyvr12m0"},defaultClass:"fyvr12lv"},backgroundInverse:{conditions:{base:"fyvr12m1",active:"fyvr12m2",disabled:"fyvr12m3",focus:"fyvr12m4",hover:"fyvr12m5",checked:"fyvr12m6"},defaultClass:"fyvr12m1"},backgroundBackdrop:{conditions:{base:"fyvr12m7",active:"fyvr12m8",disabled:"fyvr12m9",focus:"fyvr12ma",hover:"fyvr12mb",checked:"fyvr12mc"},defaultClass:"fyvr12m7"},backgroundOverlay:{conditions:{base:"fyvr12md",active:"fyvr12me",disabled:"fyvr12mf",focus:"fyvr12mg",hover:"fyvr12mh",checked:"fyvr12mi"},defaultClass:"fyvr12md"},backgroundRaised:{conditions:{base:"fyvr12mj",active:"fyvr12mk",disabled:"fyvr12ml",focus:"fyvr12mm",hover:"fyvr12mn",checked:"fyvr12mo"},defaultClass:"fyvr12mj"},buttonGlass:{conditions:{base:"fyvr12mp",active:"fyvr12mq",disabled:"fyvr12mr",focus:"fyvr12ms",hover:"fyvr12mt",checked:"fyvr12mu"},defaultClass:"fyvr12mp"},buttonEmphasis:{conditions:{base:"fyvr12mv",active:"fyvr12mw",disabled:"fyvr12mx",focus:"fyvr12my",hover:"fyvr12mz",checked:"fyvr12n0"},defaultClass:"fyvr12mv"},buttonInverse:{conditions:{base:"fyvr12n1",active:"fyvr12n2",disabled:"fyvr12n3",focus:"fyvr12n4",hover:"fyvr12n5",checked:"fyvr12n6"},defaultClass:"fyvr12n1"},borderNormal:{conditions:{base:"fyvr12n7",active:"fyvr12n8",disabled:"fyvr12n9",focus:"fyvr12na",hover:"fyvr12nb",checked:"fyvr12nc"},defaultClass:"fyvr12n7"},borderFocus:{conditions:{base:"fyvr12nd",active:"fyvr12ne",disabled:"fyvr12nf",focus:"fyvr12ng",hover:"fyvr12nh",checked:"fyvr12ni"},defaultClass:"fyvr12nd"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12nj",active:"fyvr12nk",disabled:"fyvr12nl",focus:"fyvr12nm",hover:"fyvr12nn",checked:"fyvr12no"},defaultClass:"fyvr12nj"},dashed:{conditions:{base:"fyvr12np",active:"fyvr12nq",disabled:"fyvr12nr",focus:"fyvr12ns",hover:"fyvr12nt",checked:"fyvr12nu"},defaultClass:"fyvr12np"},dotted:{conditions:{base:"fyvr12nv",active:"fyvr12nw",disabled:"fyvr12nx",focus:"fyvr12ny",hover:"fyvr12nz",checked:"fyvr12o0"},defaultClass:"fyvr12nv"}}},border:{values:{none:{conditions:{base:"fyvr12o1",active:"fyvr12o2",disabled:"fyvr12o3",focus:"fyvr12o4",hover:"fyvr12o5",checked:"fyvr12o6"},defaultClass:"fyvr12o1"}}},color:{values:{black:{conditions:{base:"fyvr12o7",active:"fyvr12o8",disabled:"fyvr12o9",focus:"fyvr12oa",hover:"fyvr12ob",checked:"fyvr12oc"},defaultClass:"fyvr12o7"},white:{conditions:{base:"fyvr12od",active:"fyvr12oe",disabled:"fyvr12of",focus:"fyvr12og",hover:"fyvr12oh",checked:"fyvr12oi"},defaultClass:"fyvr12od"},inherit:{conditions:{base:"fyvr12oj",active:"fyvr12ok",disabled:"fyvr12ol",focus:"fyvr12om",hover:"fyvr12on",checked:"fyvr12oo"},defaultClass:"fyvr12oj"},transparent:{conditions:{base:"fyvr12op",active:"fyvr12oq",disabled:"fyvr12or",focus:"fyvr12os",hover:"fyvr12ot",checked:"fyvr12ou"},defaultClass:"fyvr12op"},positive:{conditions:{base:"fyvr12ov",active:"fyvr12ow",disabled:"fyvr12ox",focus:"fyvr12oy",hover:"fyvr12oz",checked:"fyvr12p0"},defaultClass:"fyvr12ov"},negative:{conditions:{base:"fyvr12p1",active:"fyvr12p2",disabled:"fyvr12p3",focus:"fyvr12p4",hover:"fyvr12p5",checked:"fyvr12p6"},defaultClass:"fyvr12p1"},info:{conditions:{base:"fyvr12p7",active:"fyvr12p8",disabled:"fyvr12p9",focus:"fyvr12pa",hover:"fyvr12pb",checked:"fyvr12pc"},defaultClass:"fyvr12p7"},warning:{conditions:{base:"fyvr12pd",active:"fyvr12pe",disabled:"fyvr12pf",focus:"fyvr12pg",hover:"fyvr12ph",checked:"fyvr12pi"},defaultClass:"fyvr12pd"},gradientBackdrop:{conditions:{base:"fyvr12pj",active:"fyvr12pk",disabled:"fyvr12pl",focus:"fyvr12pm",hover:"fyvr12pn",checked:"fyvr12po"},defaultClass:"fyvr12pj"},gradientPrimary:{conditions:{base:"fyvr12pp",active:"fyvr12pq",disabled:"fyvr12pr",focus:"fyvr12ps",hover:"fyvr12pt",checked:"fyvr12pu"},defaultClass:"fyvr12pp"},gradientSecondary:{conditions:{base:"fyvr12pv",active:"fyvr12pw",disabled:"fyvr12px",focus:"fyvr12py",hover:"fyvr12pz",checked:"fyvr12q0"},defaultClass:"fyvr12pv"},arbitrumDark:{conditions:{base:"fyvr12q1",active:"fyvr12q2",disabled:"fyvr12q3",focus:"fyvr12q4",hover:"fyvr12q5",checked:"fyvr12q6"},defaultClass:"fyvr12q1"},arbitrumLight:{conditions:{base:"fyvr12q7",active:"fyvr12q8",disabled:"fyvr12q9",focus:"fyvr12qa",hover:"fyvr12qb",checked:"fyvr12qc"},defaultClass:"fyvr12q7"},avalanceDark:{conditions:{base:"fyvr12qd",active:"fyvr12qe",disabled:"fyvr12qf",focus:"fyvr12qg",hover:"fyvr12qh",checked:"fyvr12qi"},defaultClass:"fyvr12qd"},avalanceLight:{conditions:{base:"fyvr12qj",active:"fyvr12qk",disabled:"fyvr12ql",focus:"fyvr12qm",hover:"fyvr12qn",checked:"fyvr12qo"},defaultClass:"fyvr12qj"},bscDark:{conditions:{base:"fyvr12qp",active:"fyvr12qq",disabled:"fyvr12qr",focus:"fyvr12qs",hover:"fyvr12qt",checked:"fyvr12qu"},defaultClass:"fyvr12qp"},bscLight:{conditions:{base:"fyvr12qv",active:"fyvr12qw",disabled:"fyvr12qx",focus:"fyvr12qy",hover:"fyvr12qz",checked:"fyvr12r0"},defaultClass:"fyvr12qv"},ethereumDark:{conditions:{base:"fyvr12r1",active:"fyvr12r2",disabled:"fyvr12r3",focus:"fyvr12r4",hover:"fyvr12r5",checked:"fyvr12r6"},defaultClass:"fyvr12r1"},ethereumLight:{conditions:{base:"fyvr12r7",active:"fyvr12r8",disabled:"fyvr12r9",focus:"fyvr12ra",hover:"fyvr12rb",checked:"fyvr12rc"},defaultClass:"fyvr12r7"},gnosisDark:{conditions:{base:"fyvr12rd",active:"fyvr12re",disabled:"fyvr12rf",focus:"fyvr12rg",hover:"fyvr12rh",checked:"fyvr12ri"},defaultClass:"fyvr12rd"},gnosisLight:{conditions:{base:"fyvr12rj",active:"fyvr12rk",disabled:"fyvr12rl",focus:"fyvr12rm",hover:"fyvr12rn",checked:"fyvr12ro"},defaultClass:"fyvr12rj"},polygonDark:{conditions:{base:"fyvr12rp",active:"fyvr12rq",disabled:"fyvr12rr",focus:"fyvr12rs",hover:"fyvr12rt",checked:"fyvr12ru"},defaultClass:"fyvr12rp"},polygonLight:{conditions:{base:"fyvr12rv",active:"fyvr12rw",disabled:"fyvr12rx",focus:"fyvr12ry",hover:"fyvr12rz",checked:"fyvr12s0"},defaultClass:"fyvr12rv"},text100:{conditions:{base:"fyvr12s1",active:"fyvr12s2",disabled:"fyvr12s3",focus:"fyvr12s4",hover:"fyvr12s5",checked:"fyvr12s6"},defaultClass:"fyvr12s1"},text80:{conditions:{base:"fyvr12s7",active:"fyvr12s8",disabled:"fyvr12s9",focus:"fyvr12sa",hover:"fyvr12sb",checked:"fyvr12sc"},defaultClass:"fyvr12s7"},text50:{conditions:{base:"fyvr12sd",active:"fyvr12se",disabled:"fyvr12sf",focus:"fyvr12sg",hover:"fyvr12sh",checked:"fyvr12si"},defaultClass:"fyvr12sd"},textInverse100:{conditions:{base:"fyvr12sj",active:"fyvr12sk",disabled:"fyvr12sl",focus:"fyvr12sm",hover:"fyvr12sn",checked:"fyvr12so"},defaultClass:"fyvr12sj"},backgroundPrimary:{conditions:{base:"fyvr12sp",active:"fyvr12sq",disabled:"fyvr12sr",focus:"fyvr12ss",hover:"fyvr12st",checked:"fyvr12su"},defaultClass:"fyvr12sp"},backgroundSecondary:{conditions:{base:"fyvr12sv",active:"fyvr12sw",disabled:"fyvr12sx",focus:"fyvr12sy",hover:"fyvr12sz",checked:"fyvr12t0"},defaultClass:"fyvr12sv"},backgroundContrast:{conditions:{base:"fyvr12t1",active:"fyvr12t2",disabled:"fyvr12t3",focus:"fyvr12t4",hover:"fyvr12t5",checked:"fyvr12t6"},defaultClass:"fyvr12t1"},backgroundMuted:{conditions:{base:"fyvr12t7",active:"fyvr12t8",disabled:"fyvr12t9",focus:"fyvr12ta",hover:"fyvr12tb",checked:"fyvr12tc"},defaultClass:"fyvr12t7"},backgroundControl:{conditions:{base:"fyvr12td",active:"fyvr12te",disabled:"fyvr12tf",focus:"fyvr12tg",hover:"fyvr12th",checked:"fyvr12ti"},defaultClass:"fyvr12td"},backgroundInverse:{conditions:{base:"fyvr12tj",active:"fyvr12tk",disabled:"fyvr12tl",focus:"fyvr12tm",hover:"fyvr12tn",checked:"fyvr12to"},defaultClass:"fyvr12tj"},backgroundBackdrop:{conditions:{base:"fyvr12tp",active:"fyvr12tq",disabled:"fyvr12tr",focus:"fyvr12ts",hover:"fyvr12tt",checked:"fyvr12tu"},defaultClass:"fyvr12tp"},backgroundOverlay:{conditions:{base:"fyvr12tv",active:"fyvr12tw",disabled:"fyvr12tx",focus:"fyvr12ty",hover:"fyvr12tz",checked:"fyvr12u0"},defaultClass:"fyvr12tv"},backgroundRaised:{conditions:{base:"fyvr12u1",active:"fyvr12u2",disabled:"fyvr12u3",focus:"fyvr12u4",hover:"fyvr12u5",checked:"fyvr12u6"},defaultClass:"fyvr12u1"},buttonGlass:{conditions:{base:"fyvr12u7",active:"fyvr12u8",disabled:"fyvr12u9",focus:"fyvr12ua",hover:"fyvr12ub",checked:"fyvr12uc"},defaultClass:"fyvr12u7"},buttonEmphasis:{conditions:{base:"fyvr12ud",active:"fyvr12ue",disabled:"fyvr12uf",focus:"fyvr12ug",hover:"fyvr12uh",checked:"fyvr12ui"},defaultClass:"fyvr12ud"},buttonInverse:{conditions:{base:"fyvr12uj",active:"fyvr12uk",disabled:"fyvr12ul",focus:"fyvr12um",hover:"fyvr12un",checked:"fyvr12uo"},defaultClass:"fyvr12uj"},borderNormal:{conditions:{base:"fyvr12up",active:"fyvr12uq",disabled:"fyvr12ur",focus:"fyvr12us",hover:"fyvr12ut",checked:"fyvr12uu"},defaultClass:"fyvr12up"},borderFocus:{conditions:{base:"fyvr12uv",active:"fyvr12uw",disabled:"fyvr12ux",focus:"fyvr12uy",hover:"fyvr12uz",checked:"fyvr12v0"},defaultClass:"fyvr12uv"}}},cursor:{values:{default:{conditions:{base:"fyvr12v1",active:"fyvr12v2",disabled:"fyvr12v3",focus:"fyvr12v4",hover:"fyvr12v5",checked:"fyvr12v6"},defaultClass:"fyvr12v1"},pointer:{conditions:{base:"fyvr12v7",active:"fyvr12v8",disabled:"fyvr12v9",focus:"fyvr12va",hover:"fyvr12vb",checked:"fyvr12vc"},defaultClass:"fyvr12v7"},text:{conditions:{base:"fyvr12vd",active:"fyvr12ve",disabled:"fyvr12vf",focus:"fyvr12vg",hover:"fyvr12vh",checked:"fyvr12vi"},defaultClass:"fyvr12vd"}}},opacity:{values:{0:{conditions:{base:"fyvr12vj",active:"fyvr12vk",disabled:"fyvr12vl",focus:"fyvr12vm",hover:"fyvr12vn",checked:"fyvr12vo"},defaultClass:"fyvr12vj"},50:{conditions:{base:"fyvr12vp",active:"fyvr12vq",disabled:"fyvr12vr",focus:"fyvr12vs",hover:"fyvr12vt",checked:"fyvr12vu"},defaultClass:"fyvr12vp"},80:{conditions:{base:"fyvr12vv",active:"fyvr12vw",disabled:"fyvr12vx",focus:"fyvr12vy",hover:"fyvr12vz",checked:"fyvr12w0"},defaultClass:"fyvr12vv"},100:{conditions:{base:"fyvr12w1",active:"fyvr12w2",disabled:"fyvr12w3",focus:"fyvr12w4",hover:"fyvr12w5",checked:"fyvr12w6"},defaultClass:"fyvr12w1"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr12w7",active:"fyvr12w8",disabled:"fyvr12w9",focus:"fyvr12wa",hover:"fyvr12wb",checked:"fyvr12wc"},defaultClass:"fyvr12w7"},auto:{conditions:{base:"fyvr12wd",active:"fyvr12we",disabled:"fyvr12wf",focus:"fyvr12wg",hover:"fyvr12wh",checked:"fyvr12wi"},defaultClass:"fyvr12wd"}}},outline:{values:{none:{conditions:{base:"fyvr12wj",active:"fyvr12wk",disabled:"fyvr12wl",focus:"fyvr12wm",hover:"fyvr12wn",checked:"fyvr12wo"},defaultClass:"fyvr12wj"}}},boxShadow:{values:{none:{conditions:{base:"fyvr12wp",active:"fyvr12wq",disabled:"fyvr12wr",focus:"fyvr12ws",hover:"fyvr12wt",checked:"fyvr12wu"},defaultClass:"fyvr12wp"}}}}});const ED=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],Py=t=>(t.display||(t.display=Object.keys(t).some(e=>ED.includes(e))?"flex":void 0),r8(t));Py.properties=r8.properties;function n8(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e{const{as:r="div",sx:n={},className:i,...s}=t,o={},a={};for(const c in s)Py.properties.has(c)?o[c]=s[c]:a[c]=s[c];const l=Py({...o,...n});return y.createElement(r,{className:Mn(l,i),...a,ref:e})});var i8={exports:{}},Hc={};/** * @license React * react-jsx-runtime.production.min.js * @@ -58,7 +58,7 @@ 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 BA;function ED(){if(BA)return qc;BA=1;var t=pr,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,c){var f,u={},d=null,h=null;c!==void 0&&(d=""+c),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(h=l.ref);for(f in l)n.call(l,f)&&!s.hasOwnProperty(f)&&(u[f]=l[f]);if(a&&a.defaultProps)for(f in l=a.defaultProps,l)u[f]===void 0&&(u[f]=l[f]);return{$$typeof:e,type:a,key:d,ref:h,props:u,_owner:i.current}}return qc.Fragment=r,qc.jsx=o,qc.jsxs=o,qc}n8.exports=ED();var K=n8.exports;function SD(t,e){if(typeof t!="object"||!t)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 CD(t){var e=SD(t,"string");return typeof e=="symbol"?e:String(e)}function kD(t,e,r){return e=CD(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $A(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 UA(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},ur=t=>{var e=r=>{var n=t.defaultClassName,i=UA(UA({},t.defaultVariants),r);for(var s in i){var o,a=(o=i[s])!==null&&o!==void 0?o:t.defaultVariants[s];if(a!=null){var l=a;typeof l=="boolean"&&(l=l===!0?"true":"false");var c=t.variantClassNames[s][l];c&&(n+=" "+c)}}for(var[f,u]of t.compoundVariants)TD(f,i,t.defaultVariants)&&(n+=" "+u);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return zA(t.variantClassNames,r=>zA(r,n=>n.split(" ")[0]))}},e};ur({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"_2q9vfj8 _2q9vfj0 fyvr11ov",warning:"_2q9vfj9 _2q9vfj1 fyvr11p1",success:"_2q9vfja _2q9vfj2 fyvr11oj",error:"_2q9vfjb _2q9vfj3 fyvr11op"},size:{sm:"_2q9vfjc _1qxj1ib9 _1qxj1ibf _1qxj1ib5 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 _2q9vfj4 fyvr1wo fyvr1yk fyvr13w fyvr1e8",md:"_2q9vfjd _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _2q9vfj5 fyvr1ws fyvr1yo fyvr140 fyvr1ec",lg:"_2q9vfje _1qxj1ib9 _1qxj1ibd _1qxj1ib3 fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc _2q9vfj6 fyvr1ww fyvr1ys fyvr144 fyvr1eg"}},defaultVariants:{},compoundVariants:[]});const Lr=t=>{const{color:e="borderNormal",marginY:r="4",...n}=t;return K.jsx(G,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var PD=ur({defaultClassName:"_1qxj1ib9",variantClassNames:{variant:{inherit:"_1qxj1iba _1qxj1ib0 fyvr11mu fyvr11e4 fyvr11gg fyvr11fg fyvr11ew",xlarge:"_1qxj1ibb _1qxj1ib1 fyvr11mv fyvr11es fyvr11gc fyvr11fk fyvr11fc",large:"_1qxj1ibc _1qxj1ib2 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8",medium:"_1qxj1ibd _1qxj1ib3 fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc",normal:"_1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",small:"_1qxj1ibf _1qxj1ib5 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4",xsmall:"_1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc",code:"_1qxj1ibh _1qxj1ib7 fyvr11mw fyvr11eg fyvr11g0 fyvr11fk fyvr11f0"},ellipsis:{true:"_1qxj1ibi _1qxj1ib8 fyvr11ls fyvr11m8 fyvr11n9 fyvr11mx"},italic:{true:"_1qxj1ibj"},underline:{true:"_1qxj1ibk"},uppercase:{true:"_1qxj1ibl"},capitalize:{true:"_1qxj1ibm"},hidden:{true:"_1qxj1ibn"}},defaultVariants:{},compoundVariants:[]});const me=y.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:i,hidden:s,italic:o,underline:a,children:l,ellipsis:c,uppercase:f,capitalize:u,...d}=t,h=pD[n];return K.jsx(G,{as:r,className:Mn(i,PD({hidden:s,ellipsis:c,italic:o,underline:a,uppercase:f,capitalize:u})),ref:e,...h,...d,children:l})});var RD=ur({defaultClassName:"_140wn8ni _140wn8n0 fyvr11ls fyvr11m8 fyvr11n9 fyvr11ko fyvr12o1 fyvr11n2 fyvr11h0 _4efw240",variantClassNames:{variant:{base:"_140wn8nj _140wn8n1 fyvr11od fyvr12s1",ghost:"_140wn8nk _140wn8n2 fyvr11od fyvr12s1",feature:"_140wn8nl _140wn8n3 fyvr11pj fyvr12od",primary:"_140wn8nm _140wn8n4 fyvr11pd fyvr12od",glass:"_140wn8nn _140wn8n5 fyvr11tv fyvr12s1",emphasis:"_140wn8no _140wn8n6 fyvr11u1 fyvr12s1",raised:"_140wn8np _140wn8n7 fyvr11tp fyvr12s1",danger:"_140wn8nq _140wn8n8 fyvr11op fyvr12od",text:"_140wn8nr _1qxj1ib9 _1qxj1ibf _1qxj1ib5 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 _140wn8n9 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11od fyvr12sd"},shape:{circle:"_140wn8ns _140wn8na fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"_140wn8nt _140wn8nb fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"_140wn8nu _140wn8nc fyvr12v1 fyvr12vp",false:"_140wn8nv _140wn8nd fyvr12v7 fyvr12w1 fyvr12vz"},size:{xs:"_140wn8nw _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc _140wn8ne fyvr1ws fyvr1yo",sm:"_140wn8nx _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8nf fyvr1ww fyvr1ys",md:"_140wn8ny _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8ng fyvr1x0 fyvr1yw",lg:"_140wn8nz _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8nh fyvr1x0 fyvr1yw"},iconOnly:{true:"_140wn8n10"},hasLeftIcon:{true:"_140wn8n11"},hasRightIcon:{true:"_140wn8n12"},activeOutline:{light:"_140wn8n13",bold:"_140wn8n14"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8n15"],[{iconOnly:!0,size:"sm"},"_140wn8n16"],[{iconOnly:!0,size:"md"},"_140wn8n17"],[{iconOnly:!0,size:"lg"},"_140wn8n18"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n19"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n1a"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n1b"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n1c"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n1d"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n1e"]]});const kt=y.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:i,disabled:s=!1,display:o="inline-flex",fontWeight:a="bold",pending:l=!1,label:c,leftIcon:f,rightIcon:u,size:d="md",variant:h="glass",width:p="fit",shape:m="circle",type:x="button",...b}=t,w=f!==void 0&&c!==void 0,A=u!==void 0&&c!==void 0,R=f!==void 0&&c===void 0,N=d==="xs"?"xs":"sm";return K.jsx(G,{as:r,className:Mn(i,RD({activeOutline:n,disabled:s||l,hasLeftIcon:w,hasRightIcon:A,iconOnly:R,size:h==="text"?void 0:d,shape:h==="text"?void 0:m,variant:h})),disabled:s||l,display:o,fontWeight:a,ref:e,type:x,width:p,...b,children:R?K.jsx(f,{size:N}):K.jsxs(G,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[K.jsxs(G,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[f&&K.jsx(f,{size:N}),K.jsx(me,{children:c})]}),u&&K.jsx(u,{size:N})]})})});var _D=ur({defaultClassName:"rhmai63",variantClassNames:{clickable:{true:"rhmai64 rhmai60 fyvr11a4 fyvr11ag fyvr11as fyvr11b4 fyvr12vz fyvr12v7 _4efw240"},disabled:{true:"rhmai65"},outlined:{true:"rhmai66 rhmai61 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12n7 fyvr12fv fyvr1217 fyvr128j fyvr12nj fyvr12g7 fyvr121j fyvr128v"},blur:{true:"rhmai67 rhmai62 fyvr11ms"}},defaultVariants:{},compoundVariants:[]});const ID=y.forwardRef((t,e)=>{const{className:r,children:n,clickable:i,outlined:s,disabled:o,blur:a,width:l="full",...c}=t;return K.jsx(G,{className:Mn(r,_D({clickable:i,outlined:s,disabled:o,blur:a})),background:s?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:l,ref:e,...c,children:n})});function Gt(){return Gt=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>OD(r,e))}function Pt(...t){return y.useCallback(i8(...t),t)}function ln(t,e=[]){let r=[];function n(s,o){const a=y.createContext(o),l=r.length;r=[...r,o];function c(u){const{scope:d,children:h,...p}=u,m=(d==null?void 0:d[t][l])||a,x=y.useMemo(()=>p,Object.values(p));return y.createElement(m.Provider,{value:x},h)}function f(u,d){const h=(d==null?void 0:d[t][l])||a,p=y.useContext(h);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,f]}const i=()=>{const s=r.map(o=>y.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return y.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[n,MD(i,...e)]}function MD(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(s)[`__scope${c}`];return{...a,...u}},{});return y.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function ke(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 In(t){const e=y.useRef(t);return y.useEffect(()=>{e.current=t}),y.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function Qs({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,i]=ND({defaultProp:e,onChange:r}),s=t!==void 0,o=s?t:n,a=In(r),l=y.useCallback(c=>{if(s){const u=typeof c=="function"?c(t):c;u!==t&&a(u)}else i(c)},[s,t,i,a]);return[o,l]}function ND({defaultProp:t,onChange:e}){const r=y.useState(t),[n]=r,i=y.useRef(n),s=In(e);return y.useEffect(()=>{i.current!==n&&(s(n),i.current=n)},[n,i,s]),r}function J0(t){const e=y.useRef({value:t,previous:t});return y.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const Kn=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{};function X0(t){const[e,r]=y.useState(void 0);return Kn(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function DD(t,e){return y.useReducer((r,n)=>{const i=e[r][n];return i??r},t)}const so=t=>{const{present:e,children:r}=t,n=LD(e),i=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),s=Pt(n.ref,i.ref);return typeof r=="function"||n.isPresent?y.cloneElement(i,{ref:s}):null};so.displayName="Presence";function LD(t){const[e,r]=y.useState(),n=y.useRef({}),i=y.useRef(t),s=y.useRef("none"),o=t?"mounted":"unmounted",[a,l]=DD(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const c=vd(n.current);s.current=a==="mounted"?c:"none"},[a]),Kn(()=>{const c=n.current,f=i.current;if(f!==t){const d=s.current,h=vd(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),Kn(()=>{if(e){const c=u=>{const h=vd(n.current).includes(u.animationName);u.target===e&&h&&io.flushSync(()=>l("ANIMATION_END"))},f=u=>{u.target===e&&(s.current=vd(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function vd(t){return(t==null?void 0:t.animationName)||"none"}function Te(){return Te=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{children:r,...n}=t,i=y.Children.toArray(r),s=i.find(FD);if(s){const o=s.props.children,a=i.map(l=>l===s?y.Children.count(o)>1?y.Children.only(null):y.isValidElement(o)?o.props.children:null:l);return y.createElement(Py,Te({},n,{ref:e}),y.isValidElement(o)?y.cloneElement(o,void 0,a):null)}return y.createElement(Py,Te({},n,{ref:e}),r)});oc.displayName="Slot";const Py=y.forwardRef((t,e)=>{const{children:r,...n}=t;return y.isValidElement(r)?y.cloneElement(r,{...BD(n,r.props),ref:e?i8(e,r.ref):r.ref}):y.Children.count(r)>1?y.Children.only(null):null});Py.displayName="SlotClone";const jD=({children:t})=>y.createElement(y.Fragment,null,t);function FD(t){return y.isValidElement(t)&&t.type===jD}function BD(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 $D=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ue=$D.reduce((t,e)=>{const r=y.forwardRef((n,i)=>{const{asChild:s,...o}=n,a=s?oc:e;return y.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),y.createElement(a,Gt({},o,{ref:i}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function Hg(t,e){t&&io.flushSync(()=>t.dispatchEvent(e))}const s8="Checkbox",[UD,gse]=ln(s8),[zD,VD]=UD(s8),HD=y.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,d]=y.useState(null),h=Pt(e,A=>d(A)),p=y.useRef(!1),m=u?!!u.closest("form"):!0,[x=!1,b]=Qs({prop:i,defaultProp:s,onChange:c}),w=y.useRef(x);return y.useEffect(()=>{const A=u==null?void 0:u.form;if(A){const R=()=>b(w.current);return A.addEventListener("reset",R),()=>A.removeEventListener("reset",R)}},[u,b]),y.createElement(zD,{scope:r,state:x,disabled:a},y.createElement(Ue.button,Gt({type:"button",role:"checkbox","aria-checked":Ia(x)?"mixed":x,"aria-required":o,"data-state":o8(x),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:h,onKeyDown:ke(t.onKeyDown,A=>{A.key==="Enter"&&A.preventDefault()}),onClick:ke(t.onClick,A=>{b(R=>Ia(R)?!0:!R),m&&(p.current=A.isPropagationStopped(),p.current||A.stopPropagation())})})),m&&y.createElement(GD,{control:u,bubbles:!p.current,name:n,value:l,checked:x,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),qD="CheckboxIndicator",WD=y.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...i}=t,s=VD(qD,r);return y.createElement(so,{present:n||Ia(s.state)||s.state===!0},y.createElement(Ue.span,Gt({"data-state":o8(s.state),"data-disabled":s.disabled?"":void 0},i,{ref:e,style:{pointerEvents:"none",...t.style}})))}),GD=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=y.useRef(null),o=J0(r),a=X0(e);return y.useEffect(()=>{const l=s.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});l.indeterminate=Ia(r),u.call(l,Ia(r)?!1:r),l.dispatchEvent(d)}},[o,r,n]),y.createElement("input",Gt({type:"checkbox","aria-hidden":!0,defaultChecked:Ia(r)?!1:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Ia(t){return t==="indeterminate"}function o8(t){return Ia(t)?"indeterminate":t?"checked":"unchecked"}const KD=HD,YD=WD;var QD=ur({defaultClassName:"_43lu9r4",variantClassNames:{labelLocation:{top:"_43lu9r5 _43lu9r0 fyvr11kw fyvr11i4 fyvr118k fyvr11h0",left:"_43lu9r6 _43lu9r1 fyvr11ko fyvr11ic fyvr118k fyvr11h0",right:"_43lu9r7 _43lu9r2 fyvr11ko fyvr11ic fyvr118k fyvr11h0",hidden:"_43lu9r8 _43lu9r3 fyvr1188 fyvr11h0"}},defaultVariants:{},compoundVariants:[]});const el=t=>{const{id:e,label:r,description:n,labelLocation:i="top",children:s,...o}=t,a=()=>r||n?K.jsxs(G,{flexDirection:"column",gap:"0.5",children:[r&&K.jsx(me,{variant:"small",color:"text100",hidden:i==="hidden",children:r}),n&&K.jsx(me,{variant:"small",color:"text50",hidden:i==="hidden",children:n})]}):null;return K.jsxs(G,{as:"label",className:QD({labelLocation:i}),htmlFor:e,...o,children:[["left","top","hidden"].includes(i)&&a(),s,i==="right"&&a()]})};var Z0=ur({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const JD=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),qg=({size:t="sm",...e})=>K.jsx(G,{as:JD,className:Z0({size:t}),...e}),XD=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m3.888 7.53 1.06-1.06 5.47 5.47 5.47-5.47 1.06 1.06-6.53 6.53-6.53-6.53Z",clipRule:"evenodd"})}),a8=({size:t="sm",...e})=>K.jsx(G,{as:XD,className:Z0({size:t}),...e}),ZD=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.418 11.06 4.47 4.47 1.06-1.06L11.48 10l4.47-4.47-1.06-1.06-4.47 4.47-4.47-4.47-1.06 1.06L9.357 10l-4.47 4.47 1.06 1.06 4.47-4.47Z",clipRule:"evenodd"})}),eu=({size:t="sm",...e})=>K.jsx(G,{as:ZD,className:Z0({size:t}),...e}),eL=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.918 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-.677 4.383a5.5 5.5 0 1 1 1.06-1.06l2.648 2.647-1.061 1.06-2.647-2.647Z",clipRule:"evenodd"})}),tL=({size:t="sm",...e})=>K.jsx(G,{as:eL,className:Z0({size:t}),...e});var rL=ur({defaultClassName:"_1c9x66f1 _1c9x66f0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12nd fyvr12g1 fyvr121d fyvr128p fyvr12nj fyvr12g7 fyvr121j fyvr128v fyvr11h0 fyvr11ko fyvr11jg fyvr11od fyvr12w1 fyvr12vz fyvr12vr fyvr12v7 fyvr12v3 _4efw240",variantClassNames:{size:{sm:"_1c9x66f2",lg:"_1c9x66f3"}},defaultVariants:{},compoundVariants:[]}),nL="_1c9x66f4 fyvr12s1 fyvr11h0 fyvr11ko fyvr11jg fyvr128 fyvr15o";const iL=({size:t="sm"})=>K.jsx(YD,{className:nL,children:K.jsx(qg,{size:t==="lg"?"sm":"xs"})}),l8=y.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:i,label:s="",labelLocation:o="left",size:a="sm",...l}=t;return K.jsx(el,{disabled:r,display:"flex",id:n??i,label:s,labelLocation:o,whiteSpace:"nowrap",children:K.jsx(KD,{className:rL({size:a}),disabled:r,id:n??i,name:i,ref:e,...l,children:K.jsx(iL,{size:a})})})});pr.createContext(null);const sL=Pk["useId".toString()]||(()=>{});let oL=0;function $o(t){const[e,r]=y.useState(sL());return Kn(()=>{t||r(n=>n??String(oL++))},[t]),t||(e?`radix-${e}`:"")}const c8="Collapsible",[aL,xse]=ln(c8),[lL,Wg]=aL(c8),cL=y.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:s,onOpenChange:o,...a}=t,[l=!1,c]=Qs({prop:n,defaultProp:i,onChange:o});return y.createElement(lL,{scope:r,disabled:s,contentId:$o(),open:l,onOpenToggle:y.useCallback(()=>c(f=>!f),[c])},y.createElement(Ue.div,Gt({"data-state":Gg(l),"data-disabled":s?"":void 0},a,{ref:e})))}),fL="CollapsibleTrigger",uL=y.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,i=Wg(fL,r);return y.createElement(Ue.button,Gt({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Gg(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},n,{ref:e,onClick:ke(t.onClick,i.onOpenToggle)}))}),f8="CollapsibleContent",dL=y.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=Wg(f8,t.__scopeCollapsible);return y.createElement(so,{present:r||i.open},({present:s})=>y.createElement(hL,Gt({},n,{ref:e,present:s})))}),hL=y.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:i,...s}=t,o=Wg(f8,r),[a,l]=y.useState(n),c=y.useRef(null),f=Pt(e,c),u=y.useRef(0),d=u.current,h=y.useRef(0),p=h.current,m=o.open||a,x=y.useRef(m),b=y.useRef();return y.useEffect(()=>{const w=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(w)},[]),Kn(()=>{const w=c.current;if(w){b.current=b.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const A=w.getBoundingClientRect();u.current=A.height,h.current=A.width,x.current||(w.style.transitionDuration=b.current.transitionDuration,w.style.animationName=b.current.animationName),l(n)}},[o.open,n]),y.createElement(Ue.div,Gt({"data-state":Gg(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m},s,{ref:f,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...t.style}}),m&&i)});function Gg(t){return t?"open":"closed"}const vL=cL,pL=uL,yL=dL;var VA="64px",mL="_4j62fl0",gL="_4j62fl2 _4j62fl1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11h0 fyvr11ko fyvr11od fyvr128 fyvr12v7 fyvr11n4 _4efw240",xL="_4j62fl4 _4j62fl3 fyvr1ww fyvr1ys fyvr1so fyvr1v0 fyvr128",bL="_4j62fl5";const ol=t=>{const{className:e,children:r,defaultOpen:n,open:i,onOpenChange:s,label:o,...a}=t,[l,c]=y.useState(n),f=i??l,u=h=>{i===void 0&&c(h)},d=h=>{u(h),s==null||s(h)};return K.jsx(vL,{open:f,defaultOpen:n,onOpenChange:d,asChild:!0,children:K.jsxs(G,{as:_a.div,className:Mn(e,mL),initial:{height:f?"auto":VA},animate:{height:f?"auto":VA},transition:{ease:"easeOut",duration:.3},borderRadius:"md",background:"backgroundSecondary",position:"relative",overflow:"hidden",width:"full",...a,children:[K.jsxs(pL,{className:gL,children:[K.jsx(me,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:o}),K.jsx(G,{as:_a.div,position:"absolute",right:"0",marginRight:"4",initial:{rotate:f?180:0},animate:{rotate:f?180:0},transition:{ease:"linear",duration:.1},children:K.jsx(a8,{className:bL,color:"text50"})})]}),K.jsx(Vg,{children:f&&K.jsx(yL,{className:xL,asChild:!0,forceMount:!0,children:K.jsx(_a.div,{initial:{opacity:f?1:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"easeOut",duration:.3},children:r})})})]})})};function ev(t){const e=t+"CollectionProvider",[r,n]=ln(e),[i,s]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:p,children:m}=h,x=pr.useRef(null),b=pr.useRef(new Map).current;return pr.createElement(i,{scope:p,itemMap:b,collectionRef:x},m)},a=t+"CollectionSlot",l=pr.forwardRef((h,p)=>{const{scope:m,children:x}=h,b=s(a,m),w=Pt(p,b.collectionRef);return pr.createElement(oc,{ref:w},x)}),c=t+"CollectionItemSlot",f="data-radix-collection-item",u=pr.forwardRef((h,p)=>{const{scope:m,children:x,...b}=h,w=pr.useRef(null),A=Pt(p,w),R=s(c,m);return pr.useEffect(()=>(R.itemMap.set(w,{ref:w,...b}),()=>void R.itemMap.delete(w))),pr.createElement(oc,{[f]:"",ref:A},x)});function d(h){const p=s(t+"CollectionConsumer",h);return pr.useCallback(()=>{const x=p.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(p.itemMap.values()).sort((R,N)=>b.indexOf(R.ref.current)-b.indexOf(N.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:o,Slot:l,ItemSlot:u},d,n]}const wL=y.createContext(void 0);function Kg(t){const e=y.useContext(wL);return t||e||"ltr"}function AL(t,e=globalThis==null?void 0:globalThis.document){const r=In(t);y.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const Ry="dismissableLayer.update",EL="dismissableLayer.pointerDownOutside",SL="dismissableLayer.focusOutside";let HA;const u8=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Yg=y.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=t,f=y.useContext(u8),[u,d]=y.useState(null),h=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,p]=y.useState({}),m=Pt(e,j=>d(j)),x=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=x.indexOf(b),A=u?x.indexOf(u):-1,R=f.layersWithOutsidePointerEventsDisabled.size>0,N=A>=w,I=kL(j=>{const U=j.target,Y=[...f.branches].some(J=>J.contains(U));!N||Y||(s==null||s(j),a==null||a(j),j.defaultPrevented||l==null||l())},h),F=TL(j=>{const U=j.target;[...f.branches].some(J=>J.contains(U))||(o==null||o(j),a==null||a(j),j.defaultPrevented||l==null||l())},h);return AL(j=>{A===f.layers.size-1&&(i==null||i(j),!j.defaultPrevented&&l&&(j.preventDefault(),l()))},h),y.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(HA=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),qA(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=HA)}},[u,h,n,f]),y.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),qA())},[u,f]),y.useEffect(()=>{const j=()=>p({});return document.addEventListener(Ry,j),()=>document.removeEventListener(Ry,j)},[]),y.createElement(Ue.div,Te({},c,{ref:m,style:{pointerEvents:R?N?"auto":"none":void 0,...t.style},onFocusCapture:ke(t.onFocusCapture,F.onFocusCapture),onBlurCapture:ke(t.onBlurCapture,F.onBlurCapture),onPointerDownCapture:ke(t.onPointerDownCapture,I.onPointerDownCapture)}))}),CL=y.forwardRef((t,e)=>{const r=y.useContext(u8),n=y.useRef(null),i=Pt(e,n);return y.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),y.createElement(Ue.div,Te({},t,{ref:i}))});function kL(t,e=globalThis==null?void 0:globalThis.document){const r=In(t),n=y.useRef(!1),i=y.useRef(()=>{});return y.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let l=function(){d8(EL,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function TL(t,e=globalThis==null?void 0:globalThis.document){const r=In(t),n=y.useRef(!1);return y.useEffect(()=>{const i=s=>{s.target&&!n.current&&d8(SL,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 qA(){const t=new CustomEvent(Ry);document.dispatchEvent(t)}function d8(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?Hg(i,s):i.dispatchEvent(s)}const PL=Yg,RL=CL;let A1=0;function h8(){y.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:WA()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:WA()),A1++,()=>{A1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),A1--}},[])}function WA(){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 E1="focusScope.autoFocusOnMount",S1="focusScope.autoFocusOnUnmount",GA={bubbles:!1,cancelable:!0},v8=y.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,l]=y.useState(null),c=In(i),f=In(s),u=y.useRef(null),d=Pt(e,m=>l(m)),h=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let m=function(A){if(h.paused||!a)return;const R=A.target;a.contains(R)?u.current=R:mo(u.current,{select:!0})},x=function(A){if(h.paused||!a)return;const R=A.relatedTarget;R!==null&&(a.contains(R)||mo(u.current,{select:!0}))},b=function(A){if(document.activeElement===document.body)for(const N of A)N.removedNodes.length>0&&mo(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",x);const w=new MutationObserver(b);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",x),w.disconnect()}}},[n,a,h.paused]),y.useEffect(()=>{if(a){YA.add(h);const m=document.activeElement;if(!a.contains(m)){const b=new CustomEvent(E1,GA);a.addEventListener(E1,c),a.dispatchEvent(b),b.defaultPrevented||(_L(DL(p8(a)),{select:!0}),document.activeElement===m&&mo(a))}return()=>{a.removeEventListener(E1,c),setTimeout(()=>{const b=new CustomEvent(S1,GA);a.addEventListener(S1,f),a.dispatchEvent(b),b.defaultPrevented||mo(m??document.body,{select:!0}),a.removeEventListener(S1,f),YA.remove(h)},0)}}},[a,c,f,h]);const p=y.useCallback(m=>{if(!r&&!n||h.paused)return;const x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,b=document.activeElement;if(x&&b){const w=m.currentTarget,[A,R]=IL(w);A&&R?!m.shiftKey&&b===R?(m.preventDefault(),r&&mo(A,{select:!0})):m.shiftKey&&b===A&&(m.preventDefault(),r&&mo(R,{select:!0})):b===w&&m.preventDefault()}},[r,n,h.paused]);return y.createElement(Ue.div,Te({tabIndex:-1},o,{ref:d,onKeyDown:p}))});function _L(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(mo(n,{select:e}),document.activeElement!==r)return}function IL(t){const e=p8(t),r=KA(e,t),n=KA(e.reverse(),t);return[r,n]}function p8(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 KA(t,e){for(const r of t)if(!OL(r,{upTo:e}))return r}function OL(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 ML(t){return t instanceof HTMLInputElement&&"select"in t}function mo(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&ML(t)&&e&&t.select()}}const YA=NL();function NL(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=QA(t,e),t.unshift(e)},remove(e){var r;t=QA(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function QA(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function DL(t){return t.filter(e=>e.tagName!=="A")}const LL=["top","right","bottom","left"],Go=Math.min,Un=Math.max,Qh=Math.round,pd=Math.floor,Ko=t=>({x:t,y:t}),jL={left:"right",right:"left",bottom:"top",top:"bottom"},FL={start:"end",end:"start"};function _y(t,e,r){return Un(t,Go(e,r))}function Js(t,e){return typeof t=="function"?t(e):t}function Xs(t){return t.split("-")[0]}function bc(t){return t.split("-")[1]}function Qg(t){return t==="x"?"y":"x"}function Jg(t){return t==="y"?"height":"width"}function wc(t){return["top","bottom"].includes(Xs(t))?"y":"x"}function Xg(t){return Qg(wc(t))}function BL(t,e,r){r===void 0&&(r=!1);const n=bc(t),i=Xg(t),s=Jg(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Jh(o)),[o,Jh(o)]}function $L(t){const e=Jh(t);return[Iy(t),e,Iy(e)]}function Iy(t){return t.replace(/start|end/g,e=>FL[e])}function UL(t,e,r){const n=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?i:n:e?n:i;case"left":case"right":return e?s:o;default:return[]}}function zL(t,e,r,n){const i=bc(t);let s=UL(Xs(t),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Iy)))),s}function Jh(t){return t.replace(/left|right|bottom|top/g,e=>jL[e])}function VL(t){return{top:0,right:0,bottom:0,left:0,...t}}function y8(t){return typeof t!="number"?VL(t):{top:t,right:t,bottom:t,left:t}}function Xh(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function JA(t,e,r){let{reference:n,floating:i}=t;const s=wc(e),o=Xg(e),a=Jg(o),l=Xs(e),c=s==="y",f=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,d=n[a]/2-i[a]/2;let h;switch(l){case"top":h={x:f,y:n.y-i.height};break;case"bottom":h={x:f,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-i.width,y:u};break;default:h={x:n.x,y:n.y}}switch(bc(e)){case"start":h[o]-=d*(r&&c?-1:1);break;case"end":h[o]+=d*(r&&c?-1:1);break}return h}const HL=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=JA(c,n,l),d=n,h={},p=0;for(let m=0;m({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:f=0}=Js(t,e)||{};if(c==null)return{};const u=y8(f),d={x:r,y:n},h=Xg(i),p=Jg(h),m=await o.getDimensions(c),x=h==="y",b=x?"top":"left",w=x?"bottom":"right",A=x?"clientHeight":"clientWidth",R=s.reference[p]+s.reference[h]-d[h]-s.floating[p],N=d[h]-s.reference[h],I=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let F=I?I[A]:0;(!F||!await(o.isElement==null?void 0:o.isElement(I)))&&(F=a.floating[A]||s.floating[p]);const j=R/2-N/2,U=F/2-m[p]/2-1,Y=Go(u[b],U),J=Go(u[w],U),Z=Y,M=F-m[p]-J,v=F/2-m[p]/2+j,T=_y(Z,v,M),S=!l.arrow&&bc(i)!=null&&v!=T&&s.reference[p]/2-(vZ<=0)){var U,Y;const Z=(((U=s.flip)==null?void 0:U.index)||0)+1,M=N[Z];if(M)return{data:{index:Z,overflows:j},reset:{placement:M}};let v=(Y=j.filter(T=>T.overflows[0]<=0).sort((T,S)=>T.overflows[1]-S.overflows[1])[0])==null?void 0:Y.placement;if(!v)switch(h){case"bestFit":{var J;const T=(J=j.map(S=>[S.placement,S.overflows.filter(C=>C>0).reduce((C,P)=>C+P,0)]).sort((S,C)=>S[1]-C[1])[0])==null?void 0:J[0];T&&(v=T);break}case"initialPlacement":v=a;break}if(i!==v)return{reset:{placement:v}}}return{}}}};function ZA(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function eE(t){return LL.some(e=>t[e]>=0)}const WL=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...i}=Js(t,e);switch(n){case"referenceHidden":{const s=await tu(e,{...i,elementContext:"reference"}),o=ZA(s,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:eE(o)}}}case"escaped":{const s=await tu(e,{...i,altBoundary:!0}),o=ZA(s,r.floating);return{data:{escapedOffsets:o,escaped:eE(o)}}}default:return{}}}}};async function GL(t,e){const{placement:r,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=Xs(r),a=bc(r),l=wc(r)==="y",c=["left","top"].includes(o)?-1:1,f=s&&l?-1:1,u=Js(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*f,y:d*c}:{x:d*c,y:h*f}}const KL=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,i=await GL(e,t);return{x:r+i.x,y:n+i.y,data:i}}}},YL=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:x=>{let{x:b,y:w}=x;return{x:b,y:w}}},...l}=Js(t,e),c={x:r,y:n},f=await tu(e,l),u=wc(Xs(i)),d=Qg(u);let h=c[d],p=c[u];if(s){const x=d==="y"?"top":"left",b=d==="y"?"bottom":"right",w=h+f[x],A=h-f[b];h=_y(w,h,A)}if(o){const x=u==="y"?"top":"left",b=u==="y"?"bottom":"right",w=p+f[x],A=p-f[b];p=_y(w,p,A)}const m=a.fn({...e,[d]:h,[u]:p});return{...m,data:{x:m.x-r,y:m.y-n}}}}},QL=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Js(t,e),f={x:r,y:n},u=wc(i),d=Qg(u);let h=f[d],p=f[u];const m=Js(a,e),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const A=d==="y"?"height":"width",R=s.reference[d]-s.floating[A]+x.mainAxis,N=s.reference[d]+s.reference[A]-x.mainAxis;hN&&(h=N)}if(c){var b,w;const A=d==="y"?"width":"height",R=["top","left"].includes(Xs(i)),N=s.reference[u]-s.floating[A]+(R&&((b=o.offset)==null?void 0:b[u])||0)+(R?0:x.crossAxis),I=s.reference[u]+s.reference[A]+(R?0:((w=o.offset)==null?void 0:w[u])||0)-(R?x.crossAxis:0);pI&&(p=I)}return{[d]:h,[u]:p}}}},JL=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}=Js(t,e),l=await tu(e,a),c=Xs(r),f=bc(r),u=wc(r)==="y",{width:d,height:h}=n.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,p=f==="end"?"top":"bottom");const x=h-l[p],b=d-l[m],w=!e.middlewareData.shift;let A=x,R=b;if(u){const I=d-l.left-l.right;R=f||w?Go(b,I):I}else{const I=h-l.top-l.bottom;A=f||w?Go(x,I):I}if(w&&!f){const I=Un(l.left,0),F=Un(l.right,0),j=Un(l.top,0),U=Un(l.bottom,0);u?R=d-2*(I!==0||F!==0?I+F:Un(l.left,l.right)):A=h-2*(j!==0||U!==0?j+U:Un(l.top,l.bottom))}await o({...e,availableWidth:R,availableHeight:A});const N=await i.getDimensions(s.floating);return d!==N.width||h!==N.height?{reset:{rects:!0}}:{}}}};function Yo(t){return m8(t)?(t.nodeName||"").toLowerCase():"#document"}function qn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function oo(t){var e;return(e=(m8(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function m8(t){return t instanceof Node||t instanceof qn(t).Node}function Zs(t){return t instanceof Element||t instanceof qn(t).Element}function ps(t){return t instanceof HTMLElement||t instanceof qn(t).HTMLElement}function tE(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof qn(t).ShadowRoot}function Nu(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=mi(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function XL(t){return["table","td","th"].includes(Yo(t))}function Zg(t){const e=ex(),r=mi(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function ZL(t){let e=ac(t);for(;ps(e)&&!tv(e);){if(Zg(e))return e;e=ac(e)}return null}function ex(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function tv(t){return["html","body","#document"].includes(Yo(t))}function mi(t){return qn(t).getComputedStyle(t)}function rv(t){return Zs(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ac(t){if(Yo(t)==="html")return t;const e=t.assignedSlot||t.parentNode||tE(t)&&t.host||oo(t);return tE(e)?e.host:e}function g8(t){const e=ac(t);return tv(e)?t.ownerDocument?t.ownerDocument.body:t.body:ps(e)&&Nu(e)?e:g8(e)}function ru(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=g8(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=qn(i);return s?e.concat(o,o.visualViewport||[],Nu(i)?i:[],o.frameElement&&r?ru(o.frameElement):[]):e.concat(i,ru(i,[],r))}function x8(t){const e=mi(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=ps(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=Qh(r)!==s||Qh(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function tx(t){return Zs(t)?t:t.contextElement}function Vl(t){const e=tx(t);if(!ps(e))return Ko(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:s}=x8(e);let o=(s?Qh(r.width):r.width)/n,a=(s?Qh(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const ej=Ko(0);function b8(t){const e=qn(t);return!ex()||!e.visualViewport?ej:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function tj(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==qn(t)?!1:e}function Ua(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=tx(t);let o=Ko(1);e&&(n?Zs(n)&&(o=Vl(n)):o=Vl(t));const a=tj(s,r,n)?b8(s):Ko(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,f=i.width/o.x,u=i.height/o.y;if(s){const d=qn(s),h=n&&Zs(n)?qn(n):n;let p=d.frameElement;for(;p&&n&&h!==d;){const m=Vl(p),x=p.getBoundingClientRect(),b=mi(p),w=x.left+(p.clientLeft+parseFloat(b.paddingLeft))*m.x,A=x.top+(p.clientTop+parseFloat(b.paddingTop))*m.y;l*=m.x,c*=m.y,f*=m.x,u*=m.y,l+=w,c+=A,p=qn(p).frameElement}}return Xh({width:f,height:u,x:l,y:c})}function rj(t){let{rect:e,offsetParent:r,strategy:n}=t;const i=ps(r),s=oo(r);if(r===s)return e;let o={scrollLeft:0,scrollTop:0},a=Ko(1);const l=Ko(0);if((i||!i&&n!=="fixed")&&((Yo(r)!=="body"||Nu(s))&&(o=rv(r)),ps(r))){const c=Ua(r);a=Vl(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}}function nj(t){return Array.from(t.getClientRects())}function w8(t){return Ua(oo(t)).left+rv(t).scrollLeft}function ij(t){const e=oo(t),r=rv(t),n=t.ownerDocument.body,i=Un(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Un(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+w8(t);const a=-r.scrollTop;return mi(n).direction==="rtl"&&(o+=Un(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}function sj(t,e){const r=qn(t),n=oo(t),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=ex();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function oj(t,e){const r=Ua(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,s=ps(t)?Vl(t):Ko(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,c=n*s.y;return{width:o,height:a,x:l,y:c}}function rE(t,e,r){let n;if(e==="viewport")n=sj(t,r);else if(e==="document")n=ij(oo(t));else if(Zs(e))n=oj(e,r);else{const i=b8(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return Xh(n)}function A8(t,e){const r=ac(t);return r===e||!Zs(r)||tv(r)?!1:mi(r).position==="fixed"||A8(r,e)}function aj(t,e){const r=e.get(t);if(r)return r;let n=ru(t,[],!1).filter(a=>Zs(a)&&Yo(a)!=="body"),i=null;const s=mi(t).position==="fixed";let o=s?ac(t):t;for(;Zs(o)&&!tv(o);){const a=mi(o),l=Zg(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Nu(o)&&!l&&A8(t,o))?n=n.filter(f=>f!==o):i=a,o=ac(o)}return e.set(t,n),n}function lj(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const o=[...r==="clippingAncestors"?aj(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,f)=>{const u=rE(e,f,i);return c.top=Un(u.top,c.top),c.right=Go(u.right,c.right),c.bottom=Go(u.bottom,c.bottom),c.left=Un(u.left,c.left),c},rE(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function cj(t){return x8(t)}function fj(t,e,r){const n=ps(e),i=oo(e),s=r==="fixed",o=Ua(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=Ko(0);if(n||!n&&!s)if((Yo(e)!=="body"||Nu(i))&&(a=rv(e)),n){const c=Ua(e,!0,s,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else i&&(l.x=w8(i));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function nE(t,e){return!ps(t)||mi(t).position==="fixed"?null:e?e(t):t.offsetParent}function E8(t,e){const r=qn(t);if(!ps(t))return r;let n=nE(t,e);for(;n&&XL(n)&&mi(n).position==="static";)n=nE(n,e);return n&&(Yo(n)==="html"||Yo(n)==="body"&&mi(n).position==="static"&&!Zg(n))?r:n||ZL(t)||r}const uj=async function(t){let{reference:e,floating:r,strategy:n}=t;const i=this.getOffsetParent||E8,s=this.getDimensions;return{reference:fj(e,await i(r),n),floating:{x:0,y:0,...await s(r)}}};function dj(t){return mi(t).direction==="rtl"}const hj={convertOffsetParentRelativeRectToViewportRelativeRect:rj,getDocumentElement:oo,getClippingRect:lj,getOffsetParent:E8,getElementRects:uj,getClientRects:nj,getDimensions:cj,getScale:Vl,isElement:Zs,isRTL:dj};function vj(t,e){let r=null,n;const i=oo(t);function s(){clearTimeout(n),r&&r.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:f,width:u,height:d}=t.getBoundingClientRect();if(a||e(),!u||!d)return;const h=pd(f),p=pd(i.clientWidth-(c+u)),m=pd(i.clientHeight-(f+d)),x=pd(c),w={rootMargin:-h+"px "+-p+"px "+-m+"px "+-x+"px",threshold:Un(0,Go(1,l))||1};let A=!0;function R(N){const I=N[0].intersectionRatio;if(I!==l){if(!A)return o();I?o(!1,I):n=setTimeout(()=>{o(!1,1e-7)},100)}A=!1}try{r=new IntersectionObserver(R,{...w,root:i.ownerDocument})}catch{r=new IntersectionObserver(R,w)}r.observe(t)}return o(!0),s}function pj(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=tx(t),f=i||s?[...c?ru(c):[],...ru(e)]:[];f.forEach(b=>{i&&b.addEventListener("scroll",r,{passive:!0}),s&&b.addEventListener("resize",r)});const u=c&&a?vj(c,r):null;let d=-1,h=null;o&&(h=new ResizeObserver(b=>{let[w]=b;w&&w.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{h&&h.observe(e)})),r()}),c&&!l&&h.observe(c),h.observe(e));let p,m=l?Ua(t):null;l&&x();function x(){const b=Ua(t);m&&(b.x!==m.x||b.y!==m.y||b.width!==m.width||b.height!==m.height)&&r(),m=b,p=requestAnimationFrame(x)}return r(),()=>{f.forEach(b=>{i&&b.removeEventListener("scroll",r),s&&b.removeEventListener("resize",r)}),u&&u(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const yj=(t,e,r)=>{const n=new Map,i={platform:hj,...r},s={...i.platform,_c:n};return HL(t,e,{...i,platform:s})},mj=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:i}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?XA({element:n.current,padding:i}).fn(r):{}:n?XA({element:n,padding:i}).fn(r):{}}}};var eh=typeof document<"u"?y.useLayoutEffect:y.useEffect;function Zh(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(!Zh(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)&&!Zh(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function S8(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function iE(t,e){const r=S8(t);return Math.round(e*r)/r}function sE(t){const e=y.useRef(t);return eh(()=>{e.current=t}),e}function gj(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[f,u]=y.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=y.useState(n);Zh(d,n)||h(n);const[p,m]=y.useState(null),[x,b]=y.useState(null),w=y.useCallback(S=>{S!=I.current&&(I.current=S,m(S))},[m]),A=y.useCallback(S=>{S!==F.current&&(F.current=S,b(S))},[b]),R=s||p,N=o||x,I=y.useRef(null),F=y.useRef(null),j=y.useRef(f),U=sE(l),Y=sE(i),J=y.useCallback(()=>{if(!I.current||!F.current)return;const S={placement:e,strategy:r,middleware:d};Y.current&&(S.platform=Y.current),yj(I.current,F.current,S).then(C=>{const P={...C,isPositioned:!0};Z.current&&!Zh(j.current,P)&&(j.current=P,io.flushSync(()=>{u(P)}))})},[d,e,r,Y]);eh(()=>{c===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,u(S=>({...S,isPositioned:!1})))},[c]);const Z=y.useRef(!1);eh(()=>(Z.current=!0,()=>{Z.current=!1}),[]),eh(()=>{if(R&&(I.current=R),N&&(F.current=N),R&&N){if(U.current)return U.current(R,N,J);J()}},[R,N,J,U]);const M=y.useMemo(()=>({reference:I,floating:F,setReference:w,setFloating:A}),[w,A]),v=y.useMemo(()=>({reference:R,floating:N}),[R,N]),T=y.useMemo(()=>{const S={position:r,left:0,top:0};if(!v.floating)return S;const C=iE(v.floating,f.x),P=iE(v.floating,f.y);return a?{...S,transform:"translate("+C+"px, "+P+"px)",...S8(v.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:C,top:P}},[r,a,v.floating,f.x,f.y]);return y.useMemo(()=>({...f,update:J,refs:M,elements:v,floatingStyles:T}),[f,J,M,v,T])}const C8="Popper",[k8,Ac]=ln(C8),[xj,T8]=k8(C8),bj=t=>{const{__scopePopper:e,children:r}=t,[n,i]=y.useState(null);return y.createElement(xj,{scope:e,anchor:n,onAnchorChange:i},r)},wj="PopperAnchor",Aj=y.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...i}=t,s=T8(wj,r),o=y.useRef(null),a=Pt(e,o);return y.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:y.createElement(Ue.div,Te({},i,{ref:a}))}),P8="PopperContent",[Ej,bse]=k8(P8),Sj=y.forwardRef((t,e)=>{var r,n,i,s,o,a,l,c;const{__scopePopper:f,side:u="bottom",sideOffset:d=0,align:h="center",alignOffset:p=0,arrowPadding:m=0,avoidCollisions:x=!0,collisionBoundary:b=[],collisionPadding:w=0,sticky:A="partial",hideWhenDetached:R=!1,updatePositionStrategy:N="optimized",onPlaced:I,...F}=t,j=T8(P8,f),[U,Y]=y.useState(null),J=Pt(e,Se=>Y(Se)),[Z,M]=y.useState(null),v=X0(Z),T=(r=v==null?void 0:v.width)!==null&&r!==void 0?r:0,S=(n=v==null?void 0:v.height)!==null&&n!==void 0?n:0,C=u+(h!=="center"?"-"+h:""),P=typeof w=="number"?w:{top:0,right:0,bottom:0,left:0,...w},O=Array.isArray(b)?b:[b],L=O.length>0,E={padding:P,boundary:O.filter(Cj),altBoundary:L},{refs:g,floatingStyles:_,placement:B,isPositioned:k,middlewareData:$}=gj({strategy:"fixed",placement:C,whileElementsMounted:(...Se)=>pj(...Se,{animationFrame:N==="always"}),elements:{reference:j.anchor},middleware:[KL({mainAxis:d+S,alignmentAxis:p}),x&&YL({mainAxis:!0,crossAxis:!1,limiter:A==="partial"?QL():void 0,...E}),x&&qL({...E}),JL({...E,apply:({elements:Se,rects:sr,availableWidth:Xe,availableHeight:lt})=>{const{width:ti,height:ct}=sr.reference,tt=Se.floating.style;tt.setProperty("--radix-popper-available-width",`${Xe}px`),tt.setProperty("--radix-popper-available-height",`${lt}px`),tt.setProperty("--radix-popper-anchor-width",`${ti}px`),tt.setProperty("--radix-popper-anchor-height",`${ct}px`)}}),Z&&mj({element:Z,padding:m}),kj({arrowWidth:T,arrowHeight:S}),R&&WL({strategy:"referenceHidden",...E})]}),[V,q]=R8(B),X=In(I);Kn(()=>{k&&(X==null||X())},[k,X]);const le=(i=$.arrow)===null||i===void 0?void 0:i.x,ne=(s=$.arrow)===null||s===void 0?void 0:s.y,te=((o=$.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[Ie,pe]=y.useState();return Kn(()=>{U&&pe(window.getComputedStyle(U).zIndex)},[U]),y.createElement("div",{ref:g.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:k?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ie,"--radix-popper-transform-origin":[(a=$.transformOrigin)===null||a===void 0?void 0:a.x,(l=$.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},y.createElement(Ej,{scope:f,placedSide:V,onArrowChange:M,arrowX:le,arrowY:ne,shouldHideArrow:te},y.createElement(Ue.div,Te({"data-side":V,"data-align":q},F,{ref:J,style:{...F.style,animation:k?void 0:"none",opacity:(c=$.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function Cj(t){return t!==null}const kj=t=>({name:"transformOrigin",options:t,fn(e){var r,n,i,s,o;const{placement:a,rects:l,middlewareData:c}=e,u=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=u?0:t.arrowWidth,h=u?0:t.arrowHeight,[p,m]=R8(a),x={start:"0%",center:"50%",end:"100%"}[m],b=((n=(i=c.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+d/2,w=((s=(o=c.arrow)===null||o===void 0?void 0:o.y)!==null&&s!==void 0?s:0)+h/2;let A="",R="";return p==="bottom"?(A=u?x:`${b}px`,R=`${-h}px`):p==="top"?(A=u?x:`${b}px`,R=`${l.floating.height+h}px`):p==="right"?(A=`${-h}px`,R=u?x:`${w}px`):p==="left"&&(A=`${l.floating.width+h}px`,R=u?x:`${w}px`),{data:{x:A,y:R}}}});function R8(t){const[e,r="center"]=t.split("-");return[e,r]}const Tj=bj,Pj=Aj,Rj=Sj,_8=y.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?I4.createPortal(y.createElement(Ue.div,Te({},i,{ref:e})),n):null}),C1="rovingFocusGroup.onEntryFocus",_j={bubbles:!1,cancelable:!0},rx="RovingFocusGroup",[Oy,I8,Ij]=ev(rx),[Oj,Ec]=ln(rx,[Ij]),[Mj,Nj]=Oj(rx),Dj=y.forwardRef((t,e)=>y.createElement(Oy.Provider,{scope:t.__scopeRovingFocusGroup},y.createElement(Oy.Slot,{scope:t.__scopeRovingFocusGroup},y.createElement(Lj,Gt({},t,{ref:e}))))),Lj=y.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,...f}=t,u=y.useRef(null),d=Pt(e,u),h=Kg(s),[p=null,m]=Qs({prop:o,defaultProp:a,onChange:l}),[x,b]=y.useState(!1),w=In(c),A=I8(r),R=y.useRef(!1),[N,I]=y.useState(0);return y.useEffect(()=>{const F=u.current;if(F)return F.addEventListener(C1,w),()=>F.removeEventListener(C1,w)},[w]),y.createElement(Mj,{scope:r,orientation:n,dir:h,loop:i,currentTabStopId:p,onItemFocus:y.useCallback(F=>m(F),[m]),onItemShiftTab:y.useCallback(()=>b(!0),[]),onFocusableItemAdd:y.useCallback(()=>I(F=>F+1),[]),onFocusableItemRemove:y.useCallback(()=>I(F=>F-1),[])},y.createElement(Ue.div,Gt({tabIndex:x||N===0?-1:0,"data-orientation":n},f,{ref:d,style:{outline:"none",...t.style},onMouseDown:ke(t.onMouseDown,()=>{R.current=!0}),onFocus:ke(t.onFocus,F=>{const j=!R.current;if(F.target===F.currentTarget&&j&&!x){const U=new CustomEvent(C1,_j);if(F.currentTarget.dispatchEvent(U),!U.defaultPrevented){const Y=A().filter(T=>T.focusable),J=Y.find(T=>T.active),Z=Y.find(T=>T.id===p),v=[J,Z,...Y].filter(Boolean).map(T=>T.ref.current);O8(v)}}R.current=!1}),onBlur:ke(t.onBlur,()=>b(!1))})))}),jj="RovingFocusGroupItem",Fj=y.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:s,...o}=t,a=$o(),l=s||a,c=Nj(jj,r),f=c.currentTabStopId===l,u=I8(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=c;return y.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),y.createElement(Oy.ItemSlot,{scope:r,id:l,focusable:n,active:i},y.createElement(Ue.span,Gt({tabIndex:f?0:-1,"data-orientation":c.orientation},o,{ref:e,onMouseDown:ke(t.onMouseDown,p=>{n?c.onItemFocus(l):p.preventDefault()}),onFocus:ke(t.onFocus,()=>c.onItemFocus(l)),onKeyDown:ke(t.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){c.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const m=Uj(p,c.orientation,c.dir);if(m!==void 0){p.preventDefault();let b=u().filter(w=>w.focusable).map(w=>w.ref.current);if(m==="last")b.reverse();else if(m==="prev"||m==="next"){m==="prev"&&b.reverse();const w=b.indexOf(p.currentTarget);b=c.loop?zj(b,w+1):b.slice(w+1)}setTimeout(()=>O8(b))}})})))}),Bj={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function $j(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function Uj(t,e,r){const n=$j(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Bj[n]}function O8(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function zj(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const Vj=Dj,M8=Fj;var Hj=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},al=new WeakMap,yd=new WeakMap,md={},k1=0,N8=function(t){return t&&(t.host||N8(t.parentNode))},qj=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=N8(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},Wj=function(t,e,r,n){var i=qj(e,Array.isArray(t)?t:[t]);md[r]||(md[r]=new WeakMap);var s=md[r],o=[],a=new Set,l=new Set(i),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};i.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))f(d);else{var h=d.getAttribute(n),p=h!==null&&h!=="false",m=(al.get(d)||0)+1,x=(s.get(d)||0)+1;al.set(d,m),s.set(d,x),o.push(d),m===1&&p&&yd.set(d,!0),x===1&&d.setAttribute(r,"true"),p||d.setAttribute(n,"true")}})};return f(e),a.clear(),k1++,function(){o.forEach(function(u){var d=al.get(u)-1,h=s.get(u)-1;al.set(u,d),s.set(u,h),d||(yd.has(u)||u.removeAttribute(n),yd.delete(u)),h||u.removeAttribute(r)}),k1--,k1||(al=new WeakMap,al=new WeakMap,yd=new WeakMap,md={})}},D8=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),i=Hj(t);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),Wj(n,i,r,"aria-hidden")):function(){return null}},ts=function(){return ts=Object.assign||function(e){for(var r,n=1,i=arguments.length;n"u")return cF;var e=fF(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])}},dF=B8(),hF=function(t,e,r,n){var i=t.left,s=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` + */var BE;function AD(){if(BE)return Hc;BE=1;var t=pr,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,c){var f,u={},d=null,h=null;c!==void 0&&(d=""+c),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(h=l.ref);for(f in l)n.call(l,f)&&!s.hasOwnProperty(f)&&(u[f]=l[f]);if(a&&a.defaultProps)for(f in l=a.defaultProps,l)u[f]===void 0&&(u[f]=l[f]);return{$$typeof:e,type:a,key:d,ref:h,props:u,_owner:i.current}}return Hc.Fragment=r,Hc.jsx=o,Hc.jsxs=o,Hc}i8.exports=AD();var Y=i8.exports;function SD(t,e){if(typeof t!="object"||!t)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 CD(t){var e=SD(t,"string");return typeof e=="symbol"?e:String(e)}function kD(t,e,r){return e=CD(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $E(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 UE(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},ur=t=>{var e=r=>{var n=t.defaultClassName,i=UE(UE({},t.defaultVariants),r);for(var s in i){var o,a=(o=i[s])!==null&&o!==void 0?o:t.defaultVariants[s];if(a!=null){var l=a;typeof l=="boolean"&&(l=l===!0?"true":"false");var c=t.variantClassNames[s][l];c&&(n+=" "+c)}}for(var[f,u]of t.compoundVariants)TD(f,i,t.defaultVariants)&&(n+=" "+u);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return zE(t.variantClassNames,r=>zE(r,n=>n.split(" ")[0]))}},e};ur({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"_2q9vfj8 _2q9vfj0 fyvr11ov",warning:"_2q9vfj9 _2q9vfj1 fyvr11p1",success:"_2q9vfja _2q9vfj2 fyvr11oj",error:"_2q9vfjb _2q9vfj3 fyvr11op"},size:{sm:"_2q9vfjc _1qxj1ib9 _1qxj1ibf _1qxj1ib5 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 _2q9vfj4 fyvr1wo fyvr1yk fyvr13w fyvr1e8",md:"_2q9vfjd _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _2q9vfj5 fyvr1ws fyvr1yo fyvr140 fyvr1ec",lg:"_2q9vfje _1qxj1ib9 _1qxj1ibd _1qxj1ib3 fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc _2q9vfj6 fyvr1ww fyvr1ys fyvr144 fyvr1eg"}},defaultVariants:{},compoundVariants:[]});const Lr=t=>{const{color:e="borderNormal",marginY:r="4",...n}=t;return Y.jsx(G,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var PD=ur({defaultClassName:"_1qxj1ib9",variantClassNames:{variant:{inherit:"_1qxj1iba _1qxj1ib0 fyvr11mu fyvr11e4 fyvr11gg fyvr11fg fyvr11ew",xlarge:"_1qxj1ibb _1qxj1ib1 fyvr11mv fyvr11es fyvr11gc fyvr11fk fyvr11fc",large:"_1qxj1ibc _1qxj1ib2 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8",medium:"_1qxj1ibd _1qxj1ib3 fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc",normal:"_1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",small:"_1qxj1ibf _1qxj1ib5 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4",xsmall:"_1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc",code:"_1qxj1ibh _1qxj1ib7 fyvr11mw fyvr11eg fyvr11g0 fyvr11fk fyvr11f0"},ellipsis:{true:"_1qxj1ibi _1qxj1ib8 fyvr11ls fyvr11m8 fyvr11n9 fyvr11mx"},italic:{true:"_1qxj1ibj"},underline:{true:"_1qxj1ibk"},uppercase:{true:"_1qxj1ibl"},capitalize:{true:"_1qxj1ibm"},hidden:{true:"_1qxj1ibn"}},defaultVariants:{},compoundVariants:[]});const me=y.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:i,hidden:s,italic:o,underline:a,children:l,ellipsis:c,uppercase:f,capitalize:u,...d}=t,h=pD[n];return Y.jsx(G,{as:r,className:Mn(i,PD({hidden:s,ellipsis:c,italic:o,underline:a,uppercase:f,capitalize:u})),ref:e,...h,...d,children:l})});var RD=ur({defaultClassName:"_140wn8ni _140wn8n0 fyvr11ls fyvr11m8 fyvr11n9 fyvr11ko fyvr12o1 fyvr11n2 fyvr11h0 _4efw240",variantClassNames:{variant:{base:"_140wn8nj _140wn8n1 fyvr11od fyvr12s1",ghost:"_140wn8nk _140wn8n2 fyvr11od fyvr12s1",feature:"_140wn8nl _140wn8n3 fyvr11pj fyvr12od",primary:"_140wn8nm _140wn8n4 fyvr11pd fyvr12od",glass:"_140wn8nn _140wn8n5 fyvr11tv fyvr12s1",emphasis:"_140wn8no _140wn8n6 fyvr11u1 fyvr12s1",raised:"_140wn8np _140wn8n7 fyvr11tp fyvr12s1",danger:"_140wn8nq _140wn8n8 fyvr11op fyvr12od",text:"_140wn8nr _1qxj1ib9 _1qxj1ibf _1qxj1ib5 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 _140wn8n9 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11od fyvr12sd"},shape:{circle:"_140wn8ns _140wn8na fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"_140wn8nt _140wn8nb fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"_140wn8nu _140wn8nc fyvr12v1 fyvr12vp",false:"_140wn8nv _140wn8nd fyvr12v7 fyvr12w1 fyvr12vz"},size:{xs:"_140wn8nw _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc _140wn8ne fyvr1ws fyvr1yo",sm:"_140wn8nx _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8nf fyvr1ww fyvr1ys",md:"_140wn8ny _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8ng fyvr1x0 fyvr1yw",lg:"_140wn8nz _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8nh fyvr1x0 fyvr1yw"},iconOnly:{true:"_140wn8n10"},hasLeftIcon:{true:"_140wn8n11"},hasRightIcon:{true:"_140wn8n12"},activeOutline:{light:"_140wn8n13",bold:"_140wn8n14"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8n15"],[{iconOnly:!0,size:"sm"},"_140wn8n16"],[{iconOnly:!0,size:"md"},"_140wn8n17"],[{iconOnly:!0,size:"lg"},"_140wn8n18"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n19"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n1a"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n1b"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n1c"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n1d"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n1e"]]});const Tt=y.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:i,disabled:s=!1,display:o="inline-flex",fontWeight:a="bold",pending:l=!1,label:c,leftIcon:f,rightIcon:u,size:d="md",variant:h="glass",width:p="fit",shape:m="circle",type:x="button",...b}=t,w=f!==void 0&&c!==void 0,E=u!==void 0&&c!==void 0,R=f!==void 0&&c===void 0,N=d==="xs"?"xs":"sm";return Y.jsx(G,{as:r,className:Mn(i,RD({activeOutline:n,disabled:s||l,hasLeftIcon:w,hasRightIcon:E,iconOnly:R,size:h==="text"?void 0:d,shape:h==="text"?void 0:m,variant:h})),disabled:s||l,display:o,fontWeight:a,ref:e,type:x,width:p,...b,children:R?Y.jsx(f,{size:N}):Y.jsxs(G,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[Y.jsxs(G,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[f&&Y.jsx(f,{size:N}),Y.jsx(me,{children:c})]}),u&&Y.jsx(u,{size:N})]})})});var _D=ur({defaultClassName:"rhmai63",variantClassNames:{clickable:{true:"rhmai64 rhmai60 fyvr11a4 fyvr11ag fyvr11as fyvr11b4 fyvr12vz fyvr12v7 _4efw240"},disabled:{true:"rhmai65"},outlined:{true:"rhmai66 rhmai61 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12n7 fyvr12fv fyvr1217 fyvr128j fyvr12nj fyvr12g7 fyvr121j fyvr128v"},blur:{true:"rhmai67 rhmai62 fyvr11ms"}},defaultVariants:{},compoundVariants:[]});const ID=y.forwardRef((t,e)=>{const{className:r,children:n,clickable:i,outlined:s,disabled:o,blur:a,width:l="full",...c}=t;return Y.jsx(G,{className:Mn(r,_D({clickable:i,outlined:s,disabled:o,blur:a})),background:s?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:l,ref:e,...c,children:n})});function Gt(){return Gt=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>OD(r,e))}function Rt(...t){return y.useCallback(s8(...t),t)}function ln(t,e=[]){let r=[];function n(s,o){const a=y.createContext(o),l=r.length;r=[...r,o];function c(u){const{scope:d,children:h,...p}=u,m=(d==null?void 0:d[t][l])||a,x=y.useMemo(()=>p,Object.values(p));return y.createElement(m.Provider,{value:x},h)}function f(u,d){const h=(d==null?void 0:d[t][l])||a,p=y.useContext(h);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,f]}const i=()=>{const s=r.map(o=>y.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return y.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[n,MD(i,...e)]}function MD(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(s)[`__scope${c}`];return{...a,...u}},{});return y.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function ke(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 In(t){const e=y.useRef(t);return y.useEffect(()=>{e.current=t}),y.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function Qs({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,i]=ND({defaultProp:e,onChange:r}),s=t!==void 0,o=s?t:n,a=In(r),l=y.useCallback(c=>{if(s){const u=typeof c=="function"?c(t):c;u!==t&&a(u)}else i(c)},[s,t,i,a]);return[o,l]}function ND({defaultProp:t,onChange:e}){const r=y.useState(t),[n]=r,i=y.useRef(n),s=In(e);return y.useEffect(()=>{i.current!==n&&(s(n),i.current=n)},[n,i,s]),r}function X0(t){const e=y.useRef({value:t,previous:t});return y.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const Kn=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{};function Z0(t){const[e,r]=y.useState(void 0);return Kn(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function DD(t,e){return y.useReducer((r,n)=>{const i=e[r][n];return i??r},t)}const so=t=>{const{present:e,children:r}=t,n=LD(e),i=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),s=Rt(n.ref,i.ref);return typeof r=="function"||n.isPresent?y.cloneElement(i,{ref:s}):null};so.displayName="Presence";function LD(t){const[e,r]=y.useState(),n=y.useRef({}),i=y.useRef(t),s=y.useRef("none"),o=t?"mounted":"unmounted",[a,l]=DD(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const c=vd(n.current);s.current=a==="mounted"?c:"none"},[a]),Kn(()=>{const c=n.current,f=i.current;if(f!==t){const d=s.current,h=vd(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),Kn(()=>{if(e){const c=u=>{const h=vd(n.current).includes(u.animationName);u.target===e&&h&&io.flushSync(()=>l("ANIMATION_END"))},f=u=>{u.target===e&&(s.current=vd(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function vd(t){return(t==null?void 0:t.animationName)||"none"}function Te(){return Te=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{children:r,...n}=t,i=y.Children.toArray(r),s=i.find(FD);if(s){const o=s.props.children,a=i.map(l=>l===s?y.Children.count(o)>1?y.Children.only(null):y.isValidElement(o)?o.props.children:null:l);return y.createElement(Ry,Te({},n,{ref:e}),y.isValidElement(o)?y.cloneElement(o,void 0,a):null)}return y.createElement(Ry,Te({},n,{ref:e}),r)});oc.displayName="Slot";const Ry=y.forwardRef((t,e)=>{const{children:r,...n}=t;return y.isValidElement(r)?y.cloneElement(r,{...BD(n,r.props),ref:e?s8(e,r.ref):r.ref}):y.Children.count(r)>1?y.Children.only(null):null});Ry.displayName="SlotClone";const jD=({children:t})=>y.createElement(y.Fragment,null,t);function FD(t){return y.isValidElement(t)&&t.type===jD}function BD(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 $D=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ue=$D.reduce((t,e)=>{const r=y.forwardRef((n,i)=>{const{asChild:s,...o}=n,a=s?oc:e;return y.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),y.createElement(a,Gt({},o,{ref:i}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function Hg(t,e){t&&io.flushSync(()=>t.dispatchEvent(e))}const o8="Checkbox",[UD,gse]=ln(o8),[zD,VD]=UD(o8),qD=y.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,d]=y.useState(null),h=Rt(e,E=>d(E)),p=y.useRef(!1),m=u?!!u.closest("form"):!0,[x=!1,b]=Qs({prop:i,defaultProp:s,onChange:c}),w=y.useRef(x);return y.useEffect(()=>{const E=u==null?void 0:u.form;if(E){const R=()=>b(w.current);return E.addEventListener("reset",R),()=>E.removeEventListener("reset",R)}},[u,b]),y.createElement(zD,{scope:r,state:x,disabled:a},y.createElement(Ue.button,Gt({type:"button",role:"checkbox","aria-checked":Ia(x)?"mixed":x,"aria-required":o,"data-state":a8(x),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:h,onKeyDown:ke(t.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:ke(t.onClick,E=>{b(R=>Ia(R)?!0:!R),m&&(p.current=E.isPropagationStopped(),p.current||E.stopPropagation())})})),m&&y.createElement(GD,{control:u,bubbles:!p.current,name:n,value:l,checked:x,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),HD="CheckboxIndicator",WD=y.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...i}=t,s=VD(HD,r);return y.createElement(so,{present:n||Ia(s.state)||s.state===!0},y.createElement(Ue.span,Gt({"data-state":a8(s.state),"data-disabled":s.disabled?"":void 0},i,{ref:e,style:{pointerEvents:"none",...t.style}})))}),GD=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=y.useRef(null),o=X0(r),a=Z0(e);return y.useEffect(()=>{const l=s.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});l.indeterminate=Ia(r),u.call(l,Ia(r)?!1:r),l.dispatchEvent(d)}},[o,r,n]),y.createElement("input",Gt({type:"checkbox","aria-hidden":!0,defaultChecked:Ia(r)?!1:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Ia(t){return t==="indeterminate"}function a8(t){return Ia(t)?"indeterminate":t?"checked":"unchecked"}const KD=qD,YD=WD;var QD=ur({defaultClassName:"_43lu9r4",variantClassNames:{labelLocation:{top:"_43lu9r5 _43lu9r0 fyvr11kw fyvr11i4 fyvr118k fyvr11h0",left:"_43lu9r6 _43lu9r1 fyvr11ko fyvr11ic fyvr118k fyvr11h0",right:"_43lu9r7 _43lu9r2 fyvr11ko fyvr11ic fyvr118k fyvr11h0",hidden:"_43lu9r8 _43lu9r3 fyvr1188 fyvr11h0"}},defaultVariants:{},compoundVariants:[]});const el=t=>{const{id:e,label:r,description:n,labelLocation:i="top",children:s,...o}=t,a=()=>r||n?Y.jsxs(G,{flexDirection:"column",gap:"0.5",children:[r&&Y.jsx(me,{variant:"small",color:"text100",hidden:i==="hidden",children:r}),n&&Y.jsx(me,{variant:"small",color:"text50",hidden:i==="hidden",children:n})]}):null;return Y.jsxs(G,{as:"label",className:QD({labelLocation:i}),htmlFor:e,...o,children:[["left","top","hidden"].includes(i)&&a(),s,i==="right"&&a()]})};var ev=ur({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const JD=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),Wg=({size:t="sm",...e})=>Y.jsx(G,{as:JD,className:ev({size:t}),...e}),XD=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m3.888 7.53 1.06-1.06 5.47 5.47 5.47-5.47 1.06 1.06-6.53 6.53-6.53-6.53Z",clipRule:"evenodd"})}),l8=({size:t="sm",...e})=>Y.jsx(G,{as:XD,className:ev({size:t}),...e}),ZD=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.418 11.06 4.47 4.47 1.06-1.06L11.48 10l4.47-4.47-1.06-1.06-4.47 4.47-4.47-4.47-1.06 1.06L9.357 10l-4.47 4.47 1.06 1.06 4.47-4.47Z",clipRule:"evenodd"})}),eu=({size:t="sm",...e})=>Y.jsx(G,{as:ZD,className:ev({size:t}),...e}),eL=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.918 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-.677 4.383a5.5 5.5 0 1 1 1.06-1.06l2.648 2.647-1.061 1.06-2.647-2.647Z",clipRule:"evenodd"})}),tL=({size:t="sm",...e})=>Y.jsx(G,{as:eL,className:ev({size:t}),...e});var rL=ur({defaultClassName:"_1c9x66f1 _1c9x66f0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12nd fyvr12g1 fyvr121d fyvr128p fyvr12nj fyvr12g7 fyvr121j fyvr128v fyvr11h0 fyvr11ko fyvr11jg fyvr11od fyvr12w1 fyvr12vz fyvr12vr fyvr12v7 fyvr12v3 _4efw240",variantClassNames:{size:{sm:"_1c9x66f2",lg:"_1c9x66f3"}},defaultVariants:{},compoundVariants:[]}),nL="_1c9x66f4 fyvr12s1 fyvr11h0 fyvr11ko fyvr11jg fyvr128 fyvr15o";const iL=({size:t="sm"})=>Y.jsx(YD,{className:nL,children:Y.jsx(Wg,{size:t==="lg"?"sm":"xs"})}),c8=y.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:i,label:s="",labelLocation:o="left",size:a="sm",...l}=t;return Y.jsx(el,{disabled:r,display:"flex",id:n??i,label:s,labelLocation:o,whiteSpace:"nowrap",children:Y.jsx(KD,{className:rL({size:a}),disabled:r,id:n??i,name:i,ref:e,...l,children:Y.jsx(iL,{size:a})})})});pr.createContext(null);const sL=Rk["useId".toString()]||(()=>{});let oL=0;function $o(t){const[e,r]=y.useState(sL());return Kn(()=>{t||r(n=>n??String(oL++))},[t]),t||(e?`radix-${e}`:"")}const f8="Collapsible",[aL,xse]=ln(f8),[lL,Gg]=aL(f8),cL=y.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:s,onOpenChange:o,...a}=t,[l=!1,c]=Qs({prop:n,defaultProp:i,onChange:o});return y.createElement(lL,{scope:r,disabled:s,contentId:$o(),open:l,onOpenToggle:y.useCallback(()=>c(f=>!f),[c])},y.createElement(Ue.div,Gt({"data-state":Kg(l),"data-disabled":s?"":void 0},a,{ref:e})))}),fL="CollapsibleTrigger",uL=y.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,i=Gg(fL,r);return y.createElement(Ue.button,Gt({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Kg(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},n,{ref:e,onClick:ke(t.onClick,i.onOpenToggle)}))}),u8="CollapsibleContent",dL=y.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=Gg(u8,t.__scopeCollapsible);return y.createElement(so,{present:r||i.open},({present:s})=>y.createElement(hL,Gt({},n,{ref:e,present:s})))}),hL=y.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:i,...s}=t,o=Gg(u8,r),[a,l]=y.useState(n),c=y.useRef(null),f=Rt(e,c),u=y.useRef(0),d=u.current,h=y.useRef(0),p=h.current,m=o.open||a,x=y.useRef(m),b=y.useRef();return y.useEffect(()=>{const w=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(w)},[]),Kn(()=>{const w=c.current;if(w){b.current=b.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const E=w.getBoundingClientRect();u.current=E.height,h.current=E.width,x.current||(w.style.transitionDuration=b.current.transitionDuration,w.style.animationName=b.current.animationName),l(n)}},[o.open,n]),y.createElement(Ue.div,Gt({"data-state":Kg(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m},s,{ref:f,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...t.style}}),m&&i)});function Kg(t){return t?"open":"closed"}const vL=cL,pL=uL,yL=dL;var VE="64px",mL="_4j62fl0",gL="_4j62fl2 _4j62fl1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11h0 fyvr11ko fyvr11od fyvr128 fyvr12v7 fyvr11n4 _4efw240",xL="_4j62fl4 _4j62fl3 fyvr1ww fyvr1ys fyvr1so fyvr1v0 fyvr128",bL="_4j62fl5";const ol=t=>{const{className:e,children:r,defaultOpen:n,open:i,onOpenChange:s,label:o,...a}=t,[l,c]=y.useState(n),f=i??l,u=h=>{i===void 0&&c(h)},d=h=>{u(h),s==null||s(h)};return Y.jsx(vL,{open:f,defaultOpen:n,onOpenChange:d,asChild:!0,children:Y.jsxs(G,{as:_a.div,className:Mn(e,mL),initial:{height:f?"auto":VE},animate:{height:f?"auto":VE},transition:{ease:"easeOut",duration:.3},borderRadius:"md",background:"backgroundSecondary",position:"relative",overflow:"hidden",width:"full",...a,children:[Y.jsxs(pL,{className:gL,children:[Y.jsx(me,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:o}),Y.jsx(G,{as:_a.div,position:"absolute",right:"0",marginRight:"4",initial:{rotate:f?180:0},animate:{rotate:f?180:0},transition:{ease:"linear",duration:.1},children:Y.jsx(l8,{className:bL,color:"text50"})})]}),Y.jsx(qg,{children:f&&Y.jsx(yL,{className:xL,asChild:!0,forceMount:!0,children:Y.jsx(_a.div,{initial:{opacity:f?1:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"easeOut",duration:.3},children:r})})})]})})};function tv(t){const e=t+"CollectionProvider",[r,n]=ln(e),[i,s]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:p,children:m}=h,x=pr.useRef(null),b=pr.useRef(new Map).current;return pr.createElement(i,{scope:p,itemMap:b,collectionRef:x},m)},a=t+"CollectionSlot",l=pr.forwardRef((h,p)=>{const{scope:m,children:x}=h,b=s(a,m),w=Rt(p,b.collectionRef);return pr.createElement(oc,{ref:w},x)}),c=t+"CollectionItemSlot",f="data-radix-collection-item",u=pr.forwardRef((h,p)=>{const{scope:m,children:x,...b}=h,w=pr.useRef(null),E=Rt(p,w),R=s(c,m);return pr.useEffect(()=>(R.itemMap.set(w,{ref:w,...b}),()=>void R.itemMap.delete(w))),pr.createElement(oc,{[f]:"",ref:E},x)});function d(h){const p=s(t+"CollectionConsumer",h);return pr.useCallback(()=>{const x=p.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(p.itemMap.values()).sort((R,N)=>b.indexOf(R.ref.current)-b.indexOf(N.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:o,Slot:l,ItemSlot:u},d,n]}const wL=y.createContext(void 0);function Yg(t){const e=y.useContext(wL);return t||e||"ltr"}function EL(t,e=globalThis==null?void 0:globalThis.document){const r=In(t);y.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const _y="dismissableLayer.update",AL="dismissableLayer.pointerDownOutside",SL="dismissableLayer.focusOutside";let qE;const d8=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qg=y.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=t,f=y.useContext(d8),[u,d]=y.useState(null),h=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,p]=y.useState({}),m=Rt(e,j=>d(j)),x=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=x.indexOf(b),E=u?x.indexOf(u):-1,R=f.layersWithOutsidePointerEventsDisabled.size>0,N=E>=w,I=kL(j=>{const U=j.target,K=[...f.branches].some(J=>J.contains(U));!N||K||(s==null||s(j),a==null||a(j),j.defaultPrevented||l==null||l())},h),F=TL(j=>{const U=j.target;[...f.branches].some(J=>J.contains(U))||(o==null||o(j),a==null||a(j),j.defaultPrevented||l==null||l())},h);return EL(j=>{E===f.layers.size-1&&(i==null||i(j),!j.defaultPrevented&&l&&(j.preventDefault(),l()))},h),y.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(qE=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),HE(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=qE)}},[u,h,n,f]),y.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),HE())},[u,f]),y.useEffect(()=>{const j=()=>p({});return document.addEventListener(_y,j),()=>document.removeEventListener(_y,j)},[]),y.createElement(Ue.div,Te({},c,{ref:m,style:{pointerEvents:R?N?"auto":"none":void 0,...t.style},onFocusCapture:ke(t.onFocusCapture,F.onFocusCapture),onBlurCapture:ke(t.onBlurCapture,F.onBlurCapture),onPointerDownCapture:ke(t.onPointerDownCapture,I.onPointerDownCapture)}))}),CL=y.forwardRef((t,e)=>{const r=y.useContext(d8),n=y.useRef(null),i=Rt(e,n);return y.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),y.createElement(Ue.div,Te({},t,{ref:i}))});function kL(t,e=globalThis==null?void 0:globalThis.document){const r=In(t),n=y.useRef(!1),i=y.useRef(()=>{});return y.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let l=function(){h8(AL,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function TL(t,e=globalThis==null?void 0:globalThis.document){const r=In(t),n=y.useRef(!1);return y.useEffect(()=>{const i=s=>{s.target&&!n.current&&h8(SL,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 HE(){const t=new CustomEvent(_y);document.dispatchEvent(t)}function h8(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?Hg(i,s):i.dispatchEvent(s)}const PL=Qg,RL=CL;let A1=0;function v8(){y.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:WE()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:WE()),A1++,()=>{A1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),A1--}},[])}function WE(){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 S1="focusScope.autoFocusOnMount",C1="focusScope.autoFocusOnUnmount",GE={bubbles:!1,cancelable:!0},p8=y.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,l]=y.useState(null),c=In(i),f=In(s),u=y.useRef(null),d=Rt(e,m=>l(m)),h=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let m=function(E){if(h.paused||!a)return;const R=E.target;a.contains(R)?u.current=R:mo(u.current,{select:!0})},x=function(E){if(h.paused||!a)return;const R=E.relatedTarget;R!==null&&(a.contains(R)||mo(u.current,{select:!0}))},b=function(E){if(document.activeElement===document.body)for(const N of E)N.removedNodes.length>0&&mo(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",x);const w=new MutationObserver(b);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",x),w.disconnect()}}},[n,a,h.paused]),y.useEffect(()=>{if(a){YE.add(h);const m=document.activeElement;if(!a.contains(m)){const b=new CustomEvent(S1,GE);a.addEventListener(S1,c),a.dispatchEvent(b),b.defaultPrevented||(_L(DL(y8(a)),{select:!0}),document.activeElement===m&&mo(a))}return()=>{a.removeEventListener(S1,c),setTimeout(()=>{const b=new CustomEvent(C1,GE);a.addEventListener(C1,f),a.dispatchEvent(b),b.defaultPrevented||mo(m??document.body,{select:!0}),a.removeEventListener(C1,f),YE.remove(h)},0)}}},[a,c,f,h]);const p=y.useCallback(m=>{if(!r&&!n||h.paused)return;const x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,b=document.activeElement;if(x&&b){const w=m.currentTarget,[E,R]=IL(w);E&&R?!m.shiftKey&&b===R?(m.preventDefault(),r&&mo(E,{select:!0})):m.shiftKey&&b===E&&(m.preventDefault(),r&&mo(R,{select:!0})):b===w&&m.preventDefault()}},[r,n,h.paused]);return y.createElement(Ue.div,Te({tabIndex:-1},o,{ref:d,onKeyDown:p}))});function _L(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(mo(n,{select:e}),document.activeElement!==r)return}function IL(t){const e=y8(t),r=KE(e,t),n=KE(e.reverse(),t);return[r,n]}function y8(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 KE(t,e){for(const r of t)if(!OL(r,{upTo:e}))return r}function OL(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 ML(t){return t instanceof HTMLInputElement&&"select"in t}function mo(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&ML(t)&&e&&t.select()}}const YE=NL();function NL(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=QE(t,e),t.unshift(e)},remove(e){var r;t=QE(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function QE(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function DL(t){return t.filter(e=>e.tagName!=="A")}const LL=["top","right","bottom","left"],Go=Math.min,Un=Math.max,Qh=Math.round,pd=Math.floor,Ko=t=>({x:t,y:t}),jL={left:"right",right:"left",bottom:"top",top:"bottom"},FL={start:"end",end:"start"};function Iy(t,e,r){return Un(t,Go(e,r))}function Js(t,e){return typeof t=="function"?t(e):t}function Xs(t){return t.split("-")[0]}function bc(t){return t.split("-")[1]}function Jg(t){return t==="x"?"y":"x"}function Xg(t){return t==="y"?"height":"width"}function wc(t){return["top","bottom"].includes(Xs(t))?"y":"x"}function Zg(t){return Jg(wc(t))}function BL(t,e,r){r===void 0&&(r=!1);const n=bc(t),i=Zg(t),s=Xg(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Jh(o)),[o,Jh(o)]}function $L(t){const e=Jh(t);return[Oy(t),e,Oy(e)]}function Oy(t){return t.replace(/start|end/g,e=>FL[e])}function UL(t,e,r){const n=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?i:n:e?n:i;case"left":case"right":return e?s:o;default:return[]}}function zL(t,e,r,n){const i=bc(t);let s=UL(Xs(t),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Oy)))),s}function Jh(t){return t.replace(/left|right|bottom|top/g,e=>jL[e])}function VL(t){return{top:0,right:0,bottom:0,left:0,...t}}function m8(t){return typeof t!="number"?VL(t):{top:t,right:t,bottom:t,left:t}}function Xh(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function JE(t,e,r){let{reference:n,floating:i}=t;const s=wc(e),o=Zg(e),a=Xg(o),l=Xs(e),c=s==="y",f=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,d=n[a]/2-i[a]/2;let h;switch(l){case"top":h={x:f,y:n.y-i.height};break;case"bottom":h={x:f,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-i.width,y:u};break;default:h={x:n.x,y:n.y}}switch(bc(e)){case"start":h[o]-=d*(r&&c?-1:1);break;case"end":h[o]+=d*(r&&c?-1:1);break}return h}const qL=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=JE(c,n,l),d=n,h={},p=0;for(let m=0;m({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:f=0}=Js(t,e)||{};if(c==null)return{};const u=m8(f),d={x:r,y:n},h=Zg(i),p=Xg(h),m=await o.getDimensions(c),x=h==="y",b=x?"top":"left",w=x?"bottom":"right",E=x?"clientHeight":"clientWidth",R=s.reference[p]+s.reference[h]-d[h]-s.floating[p],N=d[h]-s.reference[h],I=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let F=I?I[E]:0;(!F||!await(o.isElement==null?void 0:o.isElement(I)))&&(F=a.floating[E]||s.floating[p]);const j=R/2-N/2,U=F/2-m[p]/2-1,K=Go(u[b],U),J=Go(u[w],U),Z=K,M=F-m[p]-J,v=F/2-m[p]/2+j,T=Iy(Z,v,M),S=!l.arrow&&bc(i)!=null&&v!=T&&s.reference[p]/2-(vZ<=0)){var U,K;const Z=(((U=s.flip)==null?void 0:U.index)||0)+1,M=N[Z];if(M)return{data:{index:Z,overflows:j},reset:{placement:M}};let v=(K=j.filter(T=>T.overflows[0]<=0).sort((T,S)=>T.overflows[1]-S.overflows[1])[0])==null?void 0:K.placement;if(!v)switch(h){case"bestFit":{var J;const T=(J=j.map(S=>[S.placement,S.overflows.filter(C=>C>0).reduce((C,P)=>C+P,0)]).sort((S,C)=>S[1]-C[1])[0])==null?void 0:J[0];T&&(v=T);break}case"initialPlacement":v=a;break}if(i!==v)return{reset:{placement:v}}}return{}}}};function ZE(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function eA(t){return LL.some(e=>t[e]>=0)}const WL=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...i}=Js(t,e);switch(n){case"referenceHidden":{const s=await tu(e,{...i,elementContext:"reference"}),o=ZE(s,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:eA(o)}}}case"escaped":{const s=await tu(e,{...i,altBoundary:!0}),o=ZE(s,r.floating);return{data:{escapedOffsets:o,escaped:eA(o)}}}default:return{}}}}};async function GL(t,e){const{placement:r,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=Xs(r),a=bc(r),l=wc(r)==="y",c=["left","top"].includes(o)?-1:1,f=s&&l?-1:1,u=Js(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*f,y:d*c}:{x:d*c,y:h*f}}const KL=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,i=await GL(e,t);return{x:r+i.x,y:n+i.y,data:i}}}},YL=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:x=>{let{x:b,y:w}=x;return{x:b,y:w}}},...l}=Js(t,e),c={x:r,y:n},f=await tu(e,l),u=wc(Xs(i)),d=Jg(u);let h=c[d],p=c[u];if(s){const x=d==="y"?"top":"left",b=d==="y"?"bottom":"right",w=h+f[x],E=h-f[b];h=Iy(w,h,E)}if(o){const x=u==="y"?"top":"left",b=u==="y"?"bottom":"right",w=p+f[x],E=p-f[b];p=Iy(w,p,E)}const m=a.fn({...e,[d]:h,[u]:p});return{...m,data:{x:m.x-r,y:m.y-n}}}}},QL=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Js(t,e),f={x:r,y:n},u=wc(i),d=Jg(u);let h=f[d],p=f[u];const m=Js(a,e),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const E=d==="y"?"height":"width",R=s.reference[d]-s.floating[E]+x.mainAxis,N=s.reference[d]+s.reference[E]-x.mainAxis;hN&&(h=N)}if(c){var b,w;const E=d==="y"?"width":"height",R=["top","left"].includes(Xs(i)),N=s.reference[u]-s.floating[E]+(R&&((b=o.offset)==null?void 0:b[u])||0)+(R?0:x.crossAxis),I=s.reference[u]+s.reference[E]+(R?0:((w=o.offset)==null?void 0:w[u])||0)-(R?x.crossAxis:0);pI&&(p=I)}return{[d]:h,[u]:p}}}},JL=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}=Js(t,e),l=await tu(e,a),c=Xs(r),f=bc(r),u=wc(r)==="y",{width:d,height:h}=n.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,p=f==="end"?"top":"bottom");const x=h-l[p],b=d-l[m],w=!e.middlewareData.shift;let E=x,R=b;if(u){const I=d-l.left-l.right;R=f||w?Go(b,I):I}else{const I=h-l.top-l.bottom;E=f||w?Go(x,I):I}if(w&&!f){const I=Un(l.left,0),F=Un(l.right,0),j=Un(l.top,0),U=Un(l.bottom,0);u?R=d-2*(I!==0||F!==0?I+F:Un(l.left,l.right)):E=h-2*(j!==0||U!==0?j+U:Un(l.top,l.bottom))}await o({...e,availableWidth:R,availableHeight:E});const N=await i.getDimensions(s.floating);return d!==N.width||h!==N.height?{reset:{rects:!0}}:{}}}};function Yo(t){return g8(t)?(t.nodeName||"").toLowerCase():"#document"}function Hn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function oo(t){var e;return(e=(g8(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function g8(t){return t instanceof Node||t instanceof Hn(t).Node}function Zs(t){return t instanceof Element||t instanceof Hn(t).Element}function ps(t){return t instanceof HTMLElement||t instanceof Hn(t).HTMLElement}function tA(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Hn(t).ShadowRoot}function Nu(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=gi(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function XL(t){return["table","td","th"].includes(Yo(t))}function ex(t){const e=tx(),r=gi(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function ZL(t){let e=ac(t);for(;ps(e)&&!rv(e);){if(ex(e))return e;e=ac(e)}return null}function tx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function rv(t){return["html","body","#document"].includes(Yo(t))}function gi(t){return Hn(t).getComputedStyle(t)}function nv(t){return Zs(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ac(t){if(Yo(t)==="html")return t;const e=t.assignedSlot||t.parentNode||tA(t)&&t.host||oo(t);return tA(e)?e.host:e}function x8(t){const e=ac(t);return rv(e)?t.ownerDocument?t.ownerDocument.body:t.body:ps(e)&&Nu(e)?e:x8(e)}function ru(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=x8(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=Hn(i);return s?e.concat(o,o.visualViewport||[],Nu(i)?i:[],o.frameElement&&r?ru(o.frameElement):[]):e.concat(i,ru(i,[],r))}function b8(t){const e=gi(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=ps(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=Qh(r)!==s||Qh(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function rx(t){return Zs(t)?t:t.contextElement}function Vl(t){const e=rx(t);if(!ps(e))return Ko(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:s}=b8(e);let o=(s?Qh(r.width):r.width)/n,a=(s?Qh(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const ej=Ko(0);function w8(t){const e=Hn(t);return!tx()||!e.visualViewport?ej:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function tj(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Hn(t)?!1:e}function Ua(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=rx(t);let o=Ko(1);e&&(n?Zs(n)&&(o=Vl(n)):o=Vl(t));const a=tj(s,r,n)?w8(s):Ko(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,f=i.width/o.x,u=i.height/o.y;if(s){const d=Hn(s),h=n&&Zs(n)?Hn(n):n;let p=d.frameElement;for(;p&&n&&h!==d;){const m=Vl(p),x=p.getBoundingClientRect(),b=gi(p),w=x.left+(p.clientLeft+parseFloat(b.paddingLeft))*m.x,E=x.top+(p.clientTop+parseFloat(b.paddingTop))*m.y;l*=m.x,c*=m.y,f*=m.x,u*=m.y,l+=w,c+=E,p=Hn(p).frameElement}}return Xh({width:f,height:u,x:l,y:c})}function rj(t){let{rect:e,offsetParent:r,strategy:n}=t;const i=ps(r),s=oo(r);if(r===s)return e;let o={scrollLeft:0,scrollTop:0},a=Ko(1);const l=Ko(0);if((i||!i&&n!=="fixed")&&((Yo(r)!=="body"||Nu(s))&&(o=nv(r)),ps(r))){const c=Ua(r);a=Vl(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}}function nj(t){return Array.from(t.getClientRects())}function E8(t){return Ua(oo(t)).left+nv(t).scrollLeft}function ij(t){const e=oo(t),r=nv(t),n=t.ownerDocument.body,i=Un(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Un(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+E8(t);const a=-r.scrollTop;return gi(n).direction==="rtl"&&(o+=Un(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}function sj(t,e){const r=Hn(t),n=oo(t),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=tx();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function oj(t,e){const r=Ua(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,s=ps(t)?Vl(t):Ko(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,c=n*s.y;return{width:o,height:a,x:l,y:c}}function rA(t,e,r){let n;if(e==="viewport")n=sj(t,r);else if(e==="document")n=ij(oo(t));else if(Zs(e))n=oj(e,r);else{const i=w8(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return Xh(n)}function A8(t,e){const r=ac(t);return r===e||!Zs(r)||rv(r)?!1:gi(r).position==="fixed"||A8(r,e)}function aj(t,e){const r=e.get(t);if(r)return r;let n=ru(t,[],!1).filter(a=>Zs(a)&&Yo(a)!=="body"),i=null;const s=gi(t).position==="fixed";let o=s?ac(t):t;for(;Zs(o)&&!rv(o);){const a=gi(o),l=ex(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Nu(o)&&!l&&A8(t,o))?n=n.filter(f=>f!==o):i=a,o=ac(o)}return e.set(t,n),n}function lj(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const o=[...r==="clippingAncestors"?aj(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,f)=>{const u=rA(e,f,i);return c.top=Un(u.top,c.top),c.right=Go(u.right,c.right),c.bottom=Go(u.bottom,c.bottom),c.left=Un(u.left,c.left),c},rA(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function cj(t){return b8(t)}function fj(t,e,r){const n=ps(e),i=oo(e),s=r==="fixed",o=Ua(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=Ko(0);if(n||!n&&!s)if((Yo(e)!=="body"||Nu(i))&&(a=nv(e)),n){const c=Ua(e,!0,s,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else i&&(l.x=E8(i));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function nA(t,e){return!ps(t)||gi(t).position==="fixed"?null:e?e(t):t.offsetParent}function S8(t,e){const r=Hn(t);if(!ps(t))return r;let n=nA(t,e);for(;n&&XL(n)&&gi(n).position==="static";)n=nA(n,e);return n&&(Yo(n)==="html"||Yo(n)==="body"&&gi(n).position==="static"&&!ex(n))?r:n||ZL(t)||r}const uj=async function(t){let{reference:e,floating:r,strategy:n}=t;const i=this.getOffsetParent||S8,s=this.getDimensions;return{reference:fj(e,await i(r),n),floating:{x:0,y:0,...await s(r)}}};function dj(t){return gi(t).direction==="rtl"}const hj={convertOffsetParentRelativeRectToViewportRelativeRect:rj,getDocumentElement:oo,getClippingRect:lj,getOffsetParent:S8,getElementRects:uj,getClientRects:nj,getDimensions:cj,getScale:Vl,isElement:Zs,isRTL:dj};function vj(t,e){let r=null,n;const i=oo(t);function s(){clearTimeout(n),r&&r.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:f,width:u,height:d}=t.getBoundingClientRect();if(a||e(),!u||!d)return;const h=pd(f),p=pd(i.clientWidth-(c+u)),m=pd(i.clientHeight-(f+d)),x=pd(c),w={rootMargin:-h+"px "+-p+"px "+-m+"px "+-x+"px",threshold:Un(0,Go(1,l))||1};let E=!0;function R(N){const I=N[0].intersectionRatio;if(I!==l){if(!E)return o();I?o(!1,I):n=setTimeout(()=>{o(!1,1e-7)},100)}E=!1}try{r=new IntersectionObserver(R,{...w,root:i.ownerDocument})}catch{r=new IntersectionObserver(R,w)}r.observe(t)}return o(!0),s}function pj(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=rx(t),f=i||s?[...c?ru(c):[],...ru(e)]:[];f.forEach(b=>{i&&b.addEventListener("scroll",r,{passive:!0}),s&&b.addEventListener("resize",r)});const u=c&&a?vj(c,r):null;let d=-1,h=null;o&&(h=new ResizeObserver(b=>{let[w]=b;w&&w.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{h&&h.observe(e)})),r()}),c&&!l&&h.observe(c),h.observe(e));let p,m=l?Ua(t):null;l&&x();function x(){const b=Ua(t);m&&(b.x!==m.x||b.y!==m.y||b.width!==m.width||b.height!==m.height)&&r(),m=b,p=requestAnimationFrame(x)}return r(),()=>{f.forEach(b=>{i&&b.removeEventListener("scroll",r),s&&b.removeEventListener("resize",r)}),u&&u(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const yj=(t,e,r)=>{const n=new Map,i={platform:hj,...r},s={...i.platform,_c:n};return qL(t,e,{...i,platform:s})},mj=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:i}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?XE({element:n.current,padding:i}).fn(r):{}:n?XE({element:n,padding:i}).fn(r):{}}}};var eh=typeof document<"u"?y.useLayoutEffect:y.useEffect;function Zh(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(!Zh(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)&&!Zh(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function C8(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function iA(t,e){const r=C8(t);return Math.round(e*r)/r}function sA(t){const e=y.useRef(t);return eh(()=>{e.current=t}),e}function gj(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[f,u]=y.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=y.useState(n);Zh(d,n)||h(n);const[p,m]=y.useState(null),[x,b]=y.useState(null),w=y.useCallback(S=>{S!=I.current&&(I.current=S,m(S))},[m]),E=y.useCallback(S=>{S!==F.current&&(F.current=S,b(S))},[b]),R=s||p,N=o||x,I=y.useRef(null),F=y.useRef(null),j=y.useRef(f),U=sA(l),K=sA(i),J=y.useCallback(()=>{if(!I.current||!F.current)return;const S={placement:e,strategy:r,middleware:d};K.current&&(S.platform=K.current),yj(I.current,F.current,S).then(C=>{const P={...C,isPositioned:!0};Z.current&&!Zh(j.current,P)&&(j.current=P,io.flushSync(()=>{u(P)}))})},[d,e,r,K]);eh(()=>{c===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,u(S=>({...S,isPositioned:!1})))},[c]);const Z=y.useRef(!1);eh(()=>(Z.current=!0,()=>{Z.current=!1}),[]),eh(()=>{if(R&&(I.current=R),N&&(F.current=N),R&&N){if(U.current)return U.current(R,N,J);J()}},[R,N,J,U]);const M=y.useMemo(()=>({reference:I,floating:F,setReference:w,setFloating:E}),[w,E]),v=y.useMemo(()=>({reference:R,floating:N}),[R,N]),T=y.useMemo(()=>{const S={position:r,left:0,top:0};if(!v.floating)return S;const C=iA(v.floating,f.x),P=iA(v.floating,f.y);return a?{...S,transform:"translate("+C+"px, "+P+"px)",...C8(v.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:C,top:P}},[r,a,v.floating,f.x,f.y]);return y.useMemo(()=>({...f,update:J,refs:M,elements:v,floatingStyles:T}),[f,J,M,v,T])}const k8="Popper",[T8,Ec]=ln(k8),[xj,P8]=T8(k8),bj=t=>{const{__scopePopper:e,children:r}=t,[n,i]=y.useState(null);return y.createElement(xj,{scope:e,anchor:n,onAnchorChange:i},r)},wj="PopperAnchor",Ej=y.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...i}=t,s=P8(wj,r),o=y.useRef(null),a=Rt(e,o);return y.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:y.createElement(Ue.div,Te({},i,{ref:a}))}),R8="PopperContent",[Aj,bse]=T8(R8),Sj=y.forwardRef((t,e)=>{var r,n,i,s,o,a,l,c;const{__scopePopper:f,side:u="bottom",sideOffset:d=0,align:h="center",alignOffset:p=0,arrowPadding:m=0,avoidCollisions:x=!0,collisionBoundary:b=[],collisionPadding:w=0,sticky:E="partial",hideWhenDetached:R=!1,updatePositionStrategy:N="optimized",onPlaced:I,...F}=t,j=P8(R8,f),[U,K]=y.useState(null),J=Rt(e,Se=>K(Se)),[Z,M]=y.useState(null),v=Z0(Z),T=(r=v==null?void 0:v.width)!==null&&r!==void 0?r:0,S=(n=v==null?void 0:v.height)!==null&&n!==void 0?n:0,C=u+(h!=="center"?"-"+h:""),P=typeof w=="number"?w:{top:0,right:0,bottom:0,left:0,...w},O=Array.isArray(b)?b:[b],L=O.length>0,A={padding:P,boundary:O.filter(Cj),altBoundary:L},{refs:g,floatingStyles:_,placement:B,isPositioned:k,middlewareData:$}=gj({strategy:"fixed",placement:C,whileElementsMounted:(...Se)=>pj(...Se,{animationFrame:N==="always"}),elements:{reference:j.anchor},middleware:[KL({mainAxis:d+S,alignmentAxis:p}),x&&YL({mainAxis:!0,crossAxis:!1,limiter:E==="partial"?QL():void 0,...A}),x&&HL({...A}),JL({...A,apply:({elements:Se,rects:sr,availableWidth:Xe,availableHeight:ct})=>{const{width:ri,height:ft}=sr.reference,tt=Se.floating.style;tt.setProperty("--radix-popper-available-width",`${Xe}px`),tt.setProperty("--radix-popper-available-height",`${ct}px`),tt.setProperty("--radix-popper-anchor-width",`${ri}px`),tt.setProperty("--radix-popper-anchor-height",`${ft}px`)}}),Z&&mj({element:Z,padding:m}),kj({arrowWidth:T,arrowHeight:S}),R&&WL({strategy:"referenceHidden",...A})]}),[V,H]=_8(B),X=In(I);Kn(()=>{k&&(X==null||X())},[k,X]);const le=(i=$.arrow)===null||i===void 0?void 0:i.x,ne=(s=$.arrow)===null||s===void 0?void 0:s.y,te=((o=$.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[Ie,pe]=y.useState();return Kn(()=>{U&&pe(window.getComputedStyle(U).zIndex)},[U]),y.createElement("div",{ref:g.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:k?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ie,"--radix-popper-transform-origin":[(a=$.transformOrigin)===null||a===void 0?void 0:a.x,(l=$.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},y.createElement(Aj,{scope:f,placedSide:V,onArrowChange:M,arrowX:le,arrowY:ne,shouldHideArrow:te},y.createElement(Ue.div,Te({"data-side":V,"data-align":H},F,{ref:J,style:{...F.style,animation:k?void 0:"none",opacity:(c=$.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function Cj(t){return t!==null}const kj=t=>({name:"transformOrigin",options:t,fn(e){var r,n,i,s,o;const{placement:a,rects:l,middlewareData:c}=e,u=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=u?0:t.arrowWidth,h=u?0:t.arrowHeight,[p,m]=_8(a),x={start:"0%",center:"50%",end:"100%"}[m],b=((n=(i=c.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+d/2,w=((s=(o=c.arrow)===null||o===void 0?void 0:o.y)!==null&&s!==void 0?s:0)+h/2;let E="",R="";return p==="bottom"?(E=u?x:`${b}px`,R=`${-h}px`):p==="top"?(E=u?x:`${b}px`,R=`${l.floating.height+h}px`):p==="right"?(E=`${-h}px`,R=u?x:`${w}px`):p==="left"&&(E=`${l.floating.width+h}px`,R=u?x:`${w}px`),{data:{x:E,y:R}}}});function _8(t){const[e,r="center"]=t.split("-");return[e,r]}const Tj=bj,Pj=Ej,Rj=Sj,I8=y.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?O4.createPortal(y.createElement(Ue.div,Te({},i,{ref:e})),n):null}),k1="rovingFocusGroup.onEntryFocus",_j={bubbles:!1,cancelable:!0},nx="RovingFocusGroup",[My,O8,Ij]=tv(nx),[Oj,Ac]=ln(nx,[Ij]),[Mj,Nj]=Oj(nx),Dj=y.forwardRef((t,e)=>y.createElement(My.Provider,{scope:t.__scopeRovingFocusGroup},y.createElement(My.Slot,{scope:t.__scopeRovingFocusGroup},y.createElement(Lj,Gt({},t,{ref:e}))))),Lj=y.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,...f}=t,u=y.useRef(null),d=Rt(e,u),h=Yg(s),[p=null,m]=Qs({prop:o,defaultProp:a,onChange:l}),[x,b]=y.useState(!1),w=In(c),E=O8(r),R=y.useRef(!1),[N,I]=y.useState(0);return y.useEffect(()=>{const F=u.current;if(F)return F.addEventListener(k1,w),()=>F.removeEventListener(k1,w)},[w]),y.createElement(Mj,{scope:r,orientation:n,dir:h,loop:i,currentTabStopId:p,onItemFocus:y.useCallback(F=>m(F),[m]),onItemShiftTab:y.useCallback(()=>b(!0),[]),onFocusableItemAdd:y.useCallback(()=>I(F=>F+1),[]),onFocusableItemRemove:y.useCallback(()=>I(F=>F-1),[])},y.createElement(Ue.div,Gt({tabIndex:x||N===0?-1:0,"data-orientation":n},f,{ref:d,style:{outline:"none",...t.style},onMouseDown:ke(t.onMouseDown,()=>{R.current=!0}),onFocus:ke(t.onFocus,F=>{const j=!R.current;if(F.target===F.currentTarget&&j&&!x){const U=new CustomEvent(k1,_j);if(F.currentTarget.dispatchEvent(U),!U.defaultPrevented){const K=E().filter(T=>T.focusable),J=K.find(T=>T.active),Z=K.find(T=>T.id===p),v=[J,Z,...K].filter(Boolean).map(T=>T.ref.current);M8(v)}}R.current=!1}),onBlur:ke(t.onBlur,()=>b(!1))})))}),jj="RovingFocusGroupItem",Fj=y.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:s,...o}=t,a=$o(),l=s||a,c=Nj(jj,r),f=c.currentTabStopId===l,u=O8(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=c;return y.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),y.createElement(My.ItemSlot,{scope:r,id:l,focusable:n,active:i},y.createElement(Ue.span,Gt({tabIndex:f?0:-1,"data-orientation":c.orientation},o,{ref:e,onMouseDown:ke(t.onMouseDown,p=>{n?c.onItemFocus(l):p.preventDefault()}),onFocus:ke(t.onFocus,()=>c.onItemFocus(l)),onKeyDown:ke(t.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){c.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const m=Uj(p,c.orientation,c.dir);if(m!==void 0){p.preventDefault();let b=u().filter(w=>w.focusable).map(w=>w.ref.current);if(m==="last")b.reverse();else if(m==="prev"||m==="next"){m==="prev"&&b.reverse();const w=b.indexOf(p.currentTarget);b=c.loop?zj(b,w+1):b.slice(w+1)}setTimeout(()=>M8(b))}})})))}),Bj={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function $j(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function Uj(t,e,r){const n=$j(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Bj[n]}function M8(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function zj(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const Vj=Dj,N8=Fj;var qj=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},al=new WeakMap,yd=new WeakMap,md={},T1=0,D8=function(t){return t&&(t.host||D8(t.parentNode))},Hj=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=D8(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},Wj=function(t,e,r,n){var i=Hj(e,Array.isArray(t)?t:[t]);md[r]||(md[r]=new WeakMap);var s=md[r],o=[],a=new Set,l=new Set(i),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};i.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))f(d);else{var h=d.getAttribute(n),p=h!==null&&h!=="false",m=(al.get(d)||0)+1,x=(s.get(d)||0)+1;al.set(d,m),s.set(d,x),o.push(d),m===1&&p&&yd.set(d,!0),x===1&&d.setAttribute(r,"true"),p||d.setAttribute(n,"true")}})};return f(e),a.clear(),T1++,function(){o.forEach(function(u){var d=al.get(u)-1,h=s.get(u)-1;al.set(u,d),s.set(u,h),d||(yd.has(u)||u.removeAttribute(n),yd.delete(u)),h||u.removeAttribute(r)}),T1--,T1||(al=new WeakMap,al=new WeakMap,yd=new WeakMap,md={})}},L8=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),i=qj(t);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),Wj(n,i,r,"aria-hidden")):function(){return null}},ts=function(){return ts=Object.assign||function(e){for(var r,n=1,i=arguments.length;n"u")return cF;var e=fF(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])}},dF=$8(),hF=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(Kj,` { overflow: hidden `).concat(n,`; padding-right: `).concat(a,"px ").concat(n,`; @@ -95,16 +95,16 @@ Error generating stack: `+s.message+` body { `).concat(Yj,": ").concat(a,`px; } -`)},vF=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,i=n===void 0?"margin":n,s=y.useMemo(function(){return uF(i)},[i]);return y.createElement(dF,{styles:hF(s,!e,i,r?"":"!important")})},My=!1;if(typeof window<"u")try{var gd=Object.defineProperty({},"passive",{get:function(){return My=!0,!0}});window.addEventListener("test",gd,gd),window.removeEventListener("test",gd,gd)}catch{My=!1}var ll=My?{passive:!1}:!1,pF=function(t){return t.tagName==="TEXTAREA"},$8=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!pF(t)&&r[e]==="visible")},yF=function(t){return $8(t,"overflowY")},mF=function(t){return $8(t,"overflowX")},oE=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=U8(t,r);if(n){var i=z8(t,r),s=i[1],o=i[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},gF=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},xF=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},U8=function(t,e){return t==="v"?yF(e):mF(e)},z8=function(t,e){return t==="v"?gF(e):xF(e)},bF=function(t,e){return t==="h"&&e==="rtl"?-1:1},wF=function(t,e,r,n,i){var s=bF(t,window.getComputedStyle(e).direction),o=s*n,a=r.target,l=e.contains(a),c=!1,f=o>0,u=0,d=0;do{var h=z8(t,a),p=h[0],m=h[1],x=h[2],b=m-x-s*p;(p||b)&&U8(t,a)&&(u+=b,d+=p),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(f&&(u===0||!i)||!f&&(d===0||!i))&&(c=!0),c},xd=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},aE=function(t){return[t.deltaX,t.deltaY]},lE=function(t){return t&&"current"in t?t.current:t},AF=function(t,e){return t[0]===e[0]&&t[1]===e[1]},EF=function(t){return` +`)},vF=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,i=n===void 0?"margin":n,s=y.useMemo(function(){return uF(i)},[i]);return y.createElement(dF,{styles:hF(s,!e,i,r?"":"!important")})},Ny=!1;if(typeof window<"u")try{var gd=Object.defineProperty({},"passive",{get:function(){return Ny=!0,!0}});window.addEventListener("test",gd,gd),window.removeEventListener("test",gd,gd)}catch{Ny=!1}var ll=Ny?{passive:!1}:!1,pF=function(t){return t.tagName==="TEXTAREA"},U8=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!pF(t)&&r[e]==="visible")},yF=function(t){return U8(t,"overflowY")},mF=function(t){return U8(t,"overflowX")},oA=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=z8(t,r);if(n){var i=V8(t,r),s=i[1],o=i[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},gF=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},xF=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},z8=function(t,e){return t==="v"?yF(e):mF(e)},V8=function(t,e){return t==="v"?gF(e):xF(e)},bF=function(t,e){return t==="h"&&e==="rtl"?-1:1},wF=function(t,e,r,n,i){var s=bF(t,window.getComputedStyle(e).direction),o=s*n,a=r.target,l=e.contains(a),c=!1,f=o>0,u=0,d=0;do{var h=V8(t,a),p=h[0],m=h[1],x=h[2],b=m-x-s*p;(p||b)&&z8(t,a)&&(u+=b,d+=p),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(f&&(u===0||!i)||!f&&(d===0||!i))&&(c=!0),c},xd=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},aA=function(t){return[t.deltaX,t.deltaY]},lA=function(t){return t&&"current"in t?t.current:t},EF=function(t,e){return t[0]===e[0]&&t[1]===e[1]},AF=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},SF=0,cl=[];function CF(t){var e=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),i=y.useState(SF++)[0],s=y.useState(function(){return B8()})[0],o=y.useRef(t);y.useEffect(function(){o.current=t},[t]),y.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var m=Gj([t.lockRef.current],(t.shards||[]).map(lE),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=y.useCallback(function(m,x){if("touches"in m&&m.touches.length===2)return!o.current.allowPinchZoom;var b=xd(m),w=r.current,A="deltaX"in m?m.deltaX:w[0]-b[0],R="deltaY"in m?m.deltaY:w[1]-b[1],N,I=m.target,F=Math.abs(A)>Math.abs(R)?"h":"v";if("touches"in m&&F==="h"&&I.type==="range")return!1;var j=oE(F,I);if(!j)return!0;if(j?N=F:(N=F==="v"?"h":"v",j=oE(F,I)),!j)return!1;if(!n.current&&"changedTouches"in m&&(A||R)&&(n.current=N),!N)return!0;var U=n.current||N;return wF(U,x,m,U==="h"?A:R,!0)},[]),l=y.useCallback(function(m){var x=m;if(!(!cl.length||cl[cl.length-1]!==s)){var b="deltaY"in x?aE(x):xd(x),w=e.current.filter(function(N){return N.name===x.type&&N.target===x.target&&AF(N.delta,b)})[0];if(w&&w.should){x.cancelable&&x.preventDefault();return}if(!w){var A=(o.current.shards||[]).map(lE).filter(Boolean).filter(function(N){return N.contains(x.target)}),R=A.length>0?a(x,A[0]):!o.current.noIsolation;R&&x.cancelable&&x.preventDefault()}}},[]),c=y.useCallback(function(m,x,b,w){var A={name:m,delta:x,target:b,should:w};e.current.push(A),setTimeout(function(){e.current=e.current.filter(function(R){return R!==A})},1)},[]),f=y.useCallback(function(m){r.current=xd(m),n.current=void 0},[]),u=y.useCallback(function(m){c(m.type,aE(m),m.target,a(m,t.lockRef.current))},[]),d=y.useCallback(function(m){c(m.type,xd(m),m.target,a(m,t.lockRef.current))},[]);y.useEffect(function(){return cl.push(s),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",l,ll),document.addEventListener("touchmove",l,ll),document.addEventListener("touchstart",f,ll),function(){cl=cl.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,ll),document.removeEventListener("touchmove",l,ll),document.removeEventListener("touchstart",f,ll)}},[]);var h=t.removeScrollBar,p=t.inert;return y.createElement(y.Fragment,null,p?y.createElement(s,{styles:EF(i)}):null,h?y.createElement(vF,{gapMode:"margin"}):null)}const kF=rF(F8,CF);var nx=y.forwardRef(function(t,e){return y.createElement(nv,ts({},t,{ref:e,sideCar:kF}))});nx.classNames=nv.classNames;const TF=["Enter"," "],iv="Menu",[PF,wse,RF]=ev(iv),[tl,V8]=ln(iv,[RF,Ac,Ec]);Ac();const _F=Ec();tl(iv);const[Ase,IF]=tl(iv),OF="MenuPortal";tl(OF,{forceMount:void 0});const MF="MenuContent",[Ese,H8]=tl(MF),Ny="MenuItem",cE="menu.itemSelect",q8=y.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...i}=t,s=y.useRef(null),o=IF(Ny,t.__scopeMenu),a=H8(Ny,t.__scopeMenu),l=Pt(e,s),c=y.useRef(!1),f=()=>{const u=s.current;if(!r&&u){const d=new CustomEvent(cE,{bubbles:!0,cancelable:!0});u.addEventListener(cE,h=>n==null?void 0:n(h),{once:!0}),Hg(u,d),d.defaultPrevented?c.current=!1:o.onClose()}};return y.createElement(NF,Te({},i,{ref:l,disabled:r,onClick:ke(t.onClick,f),onPointerDown:u=>{var d;(d=t.onPointerDown)===null||d===void 0||d.call(t,u),c.current=!0},onPointerUp:ke(t.onPointerUp,u=>{var d;c.current||(d=u.currentTarget)===null||d===void 0||d.click()}),onKeyDown:ke(t.onKeyDown,u=>{const d=a.searchRef.current!=="";r||d&&u.key===" "||TF.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),NF=y.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...s}=t,o=H8(Ny,r),a=_F(r),l=y.useRef(null),c=Pt(e,l),[f,u]=y.useState(!1),[d,h]=y.useState("");return y.useEffect(()=>{const p=l.current;if(p){var m;h(((m=p.textContent)!==null&&m!==void 0?m:"").trim())}},[s.children]),y.createElement(PF.ItemSlot,{scope:r,disabled:n,textValue:i??d},y.createElement(M8,Te({asChild:!0},a,{focusable:!n}),y.createElement(Ue.div,Te({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},s,{ref:c,onPointerMove:ke(t.onPointerMove,fE(p=>{n?o.onItemLeave(p):(o.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus())})),onPointerLeave:ke(t.onPointerLeave,fE(p=>o.onItemLeave(p))),onFocus:ke(t.onFocus,()=>u(!0)),onBlur:ke(t.onBlur,()=>u(!1))}))))}),DF=y.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...i}=t;return y.createElement(G8,{scope:t.__scopeMenu,checked:r},y.createElement(q8,Te({role:"menuitemcheckbox","aria-checked":e0(r)?"mixed":r},i,{ref:e,"data-state":ix(r),onSelect:ke(i.onSelect,()=>n==null?void 0:n(e0(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),LF="MenuRadioGroup",[Sse,jF]=tl(LF,{value:void 0,onValueChange:()=>{}}),FF="MenuRadioItem",BF=y.forwardRef((t,e)=>{const{value:r,...n}=t,i=jF(FF,t.__scopeMenu),s=r===i.value;return y.createElement(G8,{scope:t.__scopeMenu,checked:s},y.createElement(q8,Te({role:"menuitemradio","aria-checked":s},n,{ref:e,"data-state":ix(s),onSelect:ke(n.onSelect,()=>{var o;return(o=i.onValueChange)===null||o===void 0?void 0:o.call(i,r)},{checkForDefaultPrevented:!1})})))}),W8="MenuItemIndicator",[G8,$F]=tl(W8,{checked:!1}),UF=y.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...i}=t,s=$F(W8,r);return y.createElement(so,{present:n||e0(s.checked)||s.checked===!0},y.createElement(Ue.span,Te({},i,{ref:e,"data-state":ix(s.checked)})))}),zF="MenuSub";tl(zF);function e0(t){return t==="indeterminate"}function ix(t){return e0(t)?"indeterminate":t?"checked":"unchecked"}function fE(t){return e=>e.pointerType==="mouse"?t(e):void 0}const VF=DF,HF=BF,qF=UF,K8="DropdownMenu",[WF,Cse]=ln(K8,[V8]),sx=V8();WF(K8);const GF=y.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=sx(r);return y.createElement(VF,Te({},i,n,{ref:e}))}),KF=y.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=sx(r);return y.createElement(HF,Te({},i,n,{ref:e}))}),YF=y.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=sx(r);return y.createElement(qF,Te({},i,n,{ref:e}))}),QF=GF,JF=KF,Y8=YF;var Q8="_1k2mbvi4 _1k2mbvi3 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12ws fyvr12wm fyvr11h0 fyvr11ko fyvr11jw fyvr12v7 fyvr11n4 fyvr11hw fyvr12s7",J8="_1k2mbvi5";const XF=({children:t})=>K.jsx(Y8,{className:J8,children:t});y.forwardRef(({className:t,children:e,...r},n)=>K.jsxs(QF,{className:Mn(Q8,t),...r,ref:n,children:[K.jsx(XF,{children:K.jsx(qg,{size:"xs"})}),K.jsx(me,{variant:"small",children:e})]}));y.forwardRef(({className:t,children:e,...r},n)=>K.jsxs(JF,{className:Mn(Q8,t),...r,ref:n,children:[K.jsx(Y8,{className:J8,children:K.jsx(me,{children:"•"})}),K.jsx(me,{variant:"small",children:e})]}));const sv=y.forwardRef((t,e)=>{const{icon:r,size:n="md",...i}=t;return K.jsx(kt,{leftIcon:r,size:n,flexShrink:"0",ref:e,...i})}),ZF=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var eB="_1hq71vk1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _1hq71vk0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12n7 fyvr12fv fyvr1217 fyvr128j fyvr12np fyvr12gd fyvr121p fyvr1291 fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",tB=ur({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"_1hq71vk6 _1hq71vk2 fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"_1hq71vk7 _1hq71vk3 fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"_1hq71vk8 _1hq71vk4 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]}),rB="_1hq71vka _1hq71vk9 fyvr12wp fyvr12wj fyvr11ho fyvr12vj fyvr1ko fyvr1oo fyvr1mo fyvr1qo";const nB={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*, video/*",pdf:".pdf,application/pdf",mp4:".mp4,video/mp4"};y.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:i=!1,id:s,label:o="",labelLocation:a="hidden",name:l,onValueChange:c,placeholder:f="Upload a file",validExtensions:u,...d}=t,h=y.useRef(null),p=ZF(h,e),[m,x]=y.useState(null),b=A=>{const R=A.currentTarget.files;if(!R||!R[0])return;const N=R[0],I=N.name,F=N.size/1e3;x({name:I,size:F,extension:I.split(".").pop()??""}),c==null||c(N)},w=u.map(A=>nB[A]).join(",");return K.jsx(el,{description:n,disabled:i,display:"grid",id:s??l,label:o,labelLocation:a,children:K.jsxs(G,{width:"full",minWidth:"0",justifyContent:m?"space-between":"flex-start",gap:"2",color:m?"text100":"text50",className:Mn(eB,tB({borderRadius:r})),children:[m?K.jsxs(G,{flexDirection:"row",gap:"2",alignItems:"center",minWidth:"0",children:[K.jsx(me,{ellipsis:!0,children:m.name}),K.jsxs(me,{color:"text50",variant:"xsmall",whiteSpace:"nowrap",children:[m.size.toFixed(2)," kb"]})]}):K.jsx(me,{ellipsis:!0,children:f}),K.jsx(G,{accept:w,as:"input",className:rB,cursor:"pointer",disabled:i,id:s??l,name:l,onChange:b,ref:p,type:"file",...d}),m&&K.jsx(sv,{cursor:"pointer",icon:eu,size:"xs",onClick:A=>{var R;A.preventDefault(),A.stopPropagation(),(R=h.current)!=null&&R.value&&(h.current.value=""),c==null||c(null),x(null)},zIndex:"10"})]})})});var iB=ur({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const Dy=1e3,Hl=64,R1=Hl/2,_1=(t,e=Dy)=>t%e/(Dy/Hl),ma=(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)},sB=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),i=t%360,s=(t+120)%360,o=r%360;return{id:ma(n),a:`hsl(${i}deg 100% 40%)`,b:`hsl(${s}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}},oB=(t,e)=>{const r=[];for(let n=0;n{const s=Hl/10+_1(n.r,Dy*1.5/(i+1));return{...sB(n.a,n.b,n.c),x:_1(n.x),y:_1(n.y),r:s}})};y.memo(t=>{const{className:e,address:r,size:n="md",complexity:i=1,...s}=t,o=oB(r,i);return K.jsxs(G,{as:"svg",className:Mn(e,iB({size:n})),viewBox:`0 0 ${Hl} ${Hl}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...s,children:[K.jsxs("defs",{children:[K.jsx("clipPath",{id:"circle-clip",children:K.jsx("circle",{cx:R1,cy:R1,r:R1})}),K.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[K.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),K.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),K.jsx("feGaussianBlur",{stdDeviation:Hl/10,result:"effect1_foregroundBlur"})]}),K.jsxs("linearGradient",{id:`gradient-background-${o[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[K.jsx("stop",{offset:"0",stopColor:o[0].c}),K.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map(a=>K.jsxs(y.Fragment,{children:[K.jsxs("radialGradient",{id:`gradient-primary-${a.id}`,children:[K.jsx("stop",{offset:"0",stopColor:a.a}),K.jsx("stop",{offset:"1",stopColor:a.b})]}),K.jsxs("radialGradient",{id:`gradient-secondary-${a.id}`,children:[K.jsx("stop",{offset:"0",stopColor:a.c}),K.jsx("stop",{offset:"1",stopColor:a.b})]})]},a.id))]}),K.jsxs("g",{clipPath:"url(#circle-clip)",children:[K.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${o[0].id})`}),K.jsx("g",{filter:"url(#blur)",children:o.map(a=>K.jsxs(y.Fragment,{children:[K.jsx("circle",{fill:`url(#gradient-primary-${a.id})`,cx:a.x,cy:a.y,r:a.r}),K.jsx("circle",{fill:`url(#gradient-secondary-${a.id})`,cx:a.y,cy:a.x,r:a.r/2})]},a.id))})]})]})});const aB=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[i,s]=y.useState(!1),o=a=>{s(!0),r==null||r(a)};return K.jsx(G,{as:_a.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:i?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},X8="Dialog",[Z8,kse]=ln(X8),[lB,ia]=Z8(X8),cB=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:i,onOpenChange:s,modal:o=!0}=t,a=y.useRef(null),l=y.useRef(null),[c=!1,f]=Qs({prop:n,defaultProp:i,onChange:s});return y.createElement(lB,{scope:e,triggerRef:a,contentRef:l,contentId:$o(),titleId:$o(),descriptionId:$o(),open:c,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(u=>!u),[f]),modal:o},r)},e5="DialogPortal",[fB,t5]=Z8(e5,{forceMount:void 0}),uB=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:i}=t,s=ia(e5,e);return y.createElement(fB,{scope:e,forceMount:r},y.Children.map(n,o=>y.createElement(so,{present:r||s.open},y.createElement(_8,{asChild:!0,container:i},o))))},Ly="DialogOverlay",dB=y.forwardRef((t,e)=>{const r=t5(Ly,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=ia(Ly,t.__scopeDialog);return s.modal?y.createElement(so,{present:n||s.open},y.createElement(hB,Te({},i,{ref:e}))):null}),hB=y.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=ia(Ly,r);return y.createElement(nx,{as:oc,allowPinchZoom:!0,shards:[i.contentRef]},y.createElement(Ue.div,Te({"data-state":n5(i.open)},n,{ref:e,style:{pointerEvents:"auto",...n.style}})))}),nu="DialogContent",vB=y.forwardRef((t,e)=>{const r=t5(nu,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=ia(nu,t.__scopeDialog);return y.createElement(so,{present:n||s.open},s.modal?y.createElement(pB,Te({},i,{ref:e})):y.createElement(yB,Te({},i,{ref:e})))}),pB=y.forwardRef((t,e)=>{const r=ia(nu,t.__scopeDialog),n=y.useRef(null),i=Pt(e,r.contentRef,n);return y.useEffect(()=>{const s=n.current;if(s)return D8(s)},[]),y.createElement(r5,Te({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ke(t.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=r.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:ke(t.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:ke(t.onFocusOutside,s=>s.preventDefault())}))}),yB=y.forwardRef((t,e)=>{const r=ia(nu,t.__scopeDialog),n=y.useRef(!1),i=y.useRef(!1);return y.createElement(r5,Te({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,s),!s.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),s.preventDefault()}n.current=!1,i.current=!1},onInteractOutside:s=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=s.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}}))}),r5=y.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=t,a=ia(nu,r),l=y.useRef(null),c=Pt(e,l);return h8(),y.createElement(y.Fragment,null,y.createElement(v8,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s},y.createElement(Yg,Te({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":n5(a.open)},o,{ref:c,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),mB="DialogClose",gB=y.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=ia(mB,r);return y.createElement(Ue.button,Te({type:"button"},n,{ref:e,onClick:ke(t.onClick,()=>i.onOpenChange(!1))}))});function n5(t){return t?"open":"closed"}const xB=cB,bB=uB,wB=dB,AB=vB,EB=gB;var SB=ur({defaultClassName:"_1vqx0w91 _1vqx0w90 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]}),CB=ur({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]});const kB=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:i,...s}=t;return K.jsx(G,{className:CB({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...s,children:K.jsx(G,{className:SB({direction:n}),background:"backgroundPrimary",...i,children:e})})};function TB(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}function PB(t,e){var r=t;for(var n of e){if(!(n in r))throw new Error("Path ".concat(e.join(" -> ")," does not exist in object"));r=r[n]}return r}function i5(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n=t.constructor();for(var i in t){var s=t[i],o=[...r,i];typeof s=="string"||typeof s=="number"||s==null?n[i]=e(s,o):typeof s=="object"&&!Array.isArray(s)?n[i]=i5(s,e,o):console.warn('Skipping invalid key "'.concat(o.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(s)?"Array":typeof s,'"'))}return n}function uE(t,e,r){t.style.setProperty(TB(e),r)}function dE(t,e,r){if(typeof r=="object"){var n=e;i5(r,(a,l)=>{a!=null&&uE(t,PB(n,l),String(a))})}else{var i=e;for(var s in i){var o=i[s];o!=null&&uE(t,s,i[s])}}}const ox=["dark","light"],s5="dark",RB="data-theme",hE="@sequence.theme",_B=t=>ox.includes(t),IB=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),o5=t=>t?`${hE}.${t}`:hE,OB=t=>{const e=localStorage.getItem(o5(t));return e&&ox.includes(e)?e:s5},a5=y.createContext(null),MB=t=>{const[e,r]=y.useState(t.theme||s5);y.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),y.useEffect(()=>{t.theme||r(OB(t.scope))},[t.theme,t.scope]),y.useEffect(()=>{t.theme&&r(t.theme)},[t.theme]),y.useEffect(()=>{const i=document.querySelector(t.root||":root");i&&(_B(e)?(i.setAttribute(RB,e),dE(i,jA,{colors:vD[e]})):IB(e)&&dE(i,jA,{colors:e}))},[e,t.root]);const n=y.useMemo(()=>({theme:e,root:t.root,setTheme:i=>{ox.includes(i)&&(localStorage.setItem(o5(t.scope),i),r(i))}}),[e,t.root,t.scope]);return K.jsx(a5.Provider,{value:n,children:t.children})},NB=()=>{const t=y.useContext(a5);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t};var DB="_5b32m91 _5b32m90 fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11nk fyvr1ko fyvr1oo fyvr1qo fyvr1mo",LB="_5b32m93 _5b32m92 fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",jB=ur({defaultClassName:"_5b32m95 _5b32m94 fyvr11d8 fyvr11dw fyvr11bg fyvr11by fyvr11c4 fyvr11cm fyvr11ls fyvr11m8 fyvr12ws fyvr12wm fyvr11h0 fyvr11i4 fyvr11hs fyvr11sd fyvr1mo fyvr1om",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]}),FB="_5b32m9b _5b32m9a fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11nk";const l5=t=>{const{autoHeight:e=!1,backdropColor:r="backgroundBackdrop",children:n,disableAnimation:i=!1,isDismissible:s=!0,onClose:o,scroll:a=!0,size:l="lg",overlayProps:c,contentProps:f}=t,{root:u}=NB(),[d,h]=y.useState(null);return y.useEffect(()=>{h(document.querySelector(u||"body"))},[u]),d?K.jsx(xB,{modal:!0,defaultOpen:!0,onOpenChange:o,children:K.jsx(bB,{forceMount:!0,container:d,children:K.jsxs(G,{className:DB,children:[K.jsx(G,{as:wB,asChild:!0,background:r,className:LB,forceMount:!0,children:K.jsx(_a.div,{initial:i?!1:{opacity:0},animate:i?!1:{opacity:1},exit:i?void 0:{opacity:0},transition:{type:"tween",ease:"linear"},...c},"modal-overlay")}),K.jsx(AB,{asChild:!0,className:jB({autoHeight:e,size:l}),forceMount:!0,onEscapeKeyDown:p=>{s?o==null||o():p.preventDefault()},onInteractOutside:p=>{s||p.preventDefault()},children:K.jsxs(_a.div,{initial:i?!1:{y:"100%",opacity:l==="sm"?0:1},animate:i?!1:{y:0,opacity:1},exit:i?void 0:{y:"100%",opacity:l==="sm"?0:1},transition:{type:"tween",ease:"easeOut"},...f,children:[a?K.jsx(kB,{children:n}):n,s&&K.jsx(EB,{asChild:!0,children:K.jsx(sv,{icon:eu,backdropFilter:"blur",size:"xs",className:FB,"aria-label":"Close"})})]},"modal-content")})]})})}):null};var BB="_1acm19y1 _1acm19y0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11od fyvr12s1 fyvr1g0 fyvr118g",$B=ur({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"_1acm19y6 _1acm19y2 fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"_1acm19y7 _1acm19y3 fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"_1acm19y8 _1acm19y4 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]}),UB=ur({defaultClassName:"_1acm19ya _1acm19y9 fyvr1wg fyvr1yc fyvr1t4 fyvr1v0 fyvr12wp fyvr12wj fyvr11gw fyvr11od fyvr12s1 fyvr12o1 fyvr128 fyvr15o",variantClassNames:{numeric:{false:"_1acm19yb _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",true:"_1acm19yc _1qxj1ib9 _1qxj1ibc _1qxj1ib2 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8"}},defaultVariants:{},compoundVariants:[]});const Mr=y.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",leftIcon:f,rightIcon:u,name:d,controls:h,type:p="text",numeric:m=!1,...x}=t;return K.jsx(el,{description:s,disabled:o,display:"grid",id:a??d,label:l,labelLocation:c,children:K.jsx(G,{width:"full",children:K.jsxs(G,{className:Mn(BB,$B({borderRadius:i})),children:[f&&K.jsx(f,{size:"sm"}),K.jsx(G,{as:r,autoComplete:n,spellCheck:"false",className:UB({numeric:m}),disabled:o,id:a??d,name:d,ref:e,type:p,...x}),u&&K.jsx(u,{size:"sm"}),h]})})})}),zB=RegExp("^\\d*(?:\\\\[.])?\\d*$");function VB(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}y.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:i,onBlur:s,...o}=t,a=c=>{let{value:f}=c.target;f=f.replace(/,/g,"."),f.startsWith(".")&&(f="0"+f),f.startsWith("0")&&(f=f.replace(/^0+(?=\d)/,"")),(f===""||zB.test(VB(f)))&&(i==null||i({...c,target:{...c.target,value:f}}))},l=c=>{const{value:f}=c.target;let u=f;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),s==null||s(c),u!==f&&(i==null||i({...c,target:{...c.target,value:u}}))};return K.jsx(Mr,{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})});var HB="y5zf971 _1qxj1ib9 _1qxj1ibc _1qxj1ib2 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8 _4efw240";const qB=t=>{const{value:e,digits:r=6,group:n,onChange:i,onConfirm:s,disabled:o=!1}=t,a=y.useMemo(()=>vE(0,r).map(()=>y.createRef()),[r]);y.useEffect(()=>{var d,h;(h=(d=a[0])==null?void 0:d.current)==null||h.focus()},[a]);const l=(d,h)=>{var p,m;/^\d$/.test(h)||(h="");const x=[...e];x[d]=h,h!==""&&((m=(p=a[d+1])==null?void 0:p.current)==null||m.focus()),i(x)},c=()=>e.join("").length===r,f=(d,h)=>{var p,m;const x=a[d].current,b=(p=a[d-1])==null?void 0:p.current,w=(m=a[d+1])==null?void 0:m.current;switch(h.key){case"Backspace":h.preventDefault(),x&&(x.value="",l(d,"")),b==null||b.focus();break;case"ArrowLeft":h.preventDefault(),b==null||b.focus();break;case"ArrowRight":h.preventDefault(),w==null||w.focus();break;case"Enter":h.preventDefault(),c()&&(s==null||s());break;default:(x==null?void 0:x.value)===h.key&&(h.preventDefault(),l(d,h.key))}},u=(d,h)=>{var p,m;const b=h.clipboardData.getData("text/plain").replace(/\D/g,"");new RegExp(`^\\d{${r}}$`).test(b)&&((m=(p=a[0])==null?void 0:p.current)==null||m.focus(),i(b.split("")),setTimeout(()=>{var A,R;(R=(A=a[a.length-1])==null?void 0:A.current)==null||R.focus()}))};return K.jsx(G,{gap:"2",children:vE(0,r).map(d=>K.jsxs(y.Fragment,{children:[!!n&&d>0&&d%n===0&&K.jsx("span",{}),K.jsx(G,{as:"input",className:HB,value:e[d]||"",ref:a[d],type:"text",inputMode:"numeric",maxLength:1,disabled:o,onFocus:h=>h.target.select(),onPaste:h=>u(d,h),onChange:h=>l(d,h.target.value),onKeyDown:h=>{f(d,h)}})]},d))})},vE=(t,e)=>Array.from({length:e-t},(r,n)=>n+t);ur({defaultClassName:"_1jujggt1",variantClassNames:{size:{sm:"_1jujggt2",normal:"_1jujggt3",md:"_1jujggt4",lg:"_1jujggt5",xl:"_1jujggt6"}},defaultVariants:{},compoundVariants:[]});const c5="Progress",ov=100,[WB,Tse]=ln(c5),[GB,Pse]=WB(c5),KB=y.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:i,getValueLabel:s=YB,...o}=t,a=jy(i)?i:ov,l=f5(n,a)?n:null,c=t0(l)?s(l,a):void 0;return y.createElement(GB,{scope:r,value:l,max:a},y.createElement(Ue.div,Gt({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":t0(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":QB(l,a),"data-value":l??void 0,"data-max":a},o,{ref:e})))});KB.propTypes={max(t,e,r){const n=t[e],i=String(n);return n&&!jy(n)?new Error(JB(i,r)):null},value(t,e,r){const n=t[e],i=String(n),s=jy(t.max)?t.max:ov;return n!=null&&!f5(n,s)?new Error(XB(i,r)):null}};function YB(t,e){return`${Math.round(t/e*100)}%`}function QB(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function t0(t){return typeof t=="number"}function jy(t){return t0(t)&&!isNaN(t)&&t>0}function f5(t,e){return t0(t)&&!isNaN(t)&&t<=e&&t>=0}function JB(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ov}\`.`}function XB(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: +`)},SF=0,cl=[];function CF(t){var e=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),i=y.useState(SF++)[0],s=y.useState(function(){return $8()})[0],o=y.useRef(t);y.useEffect(function(){o.current=t},[t]),y.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var m=Gj([t.lockRef.current],(t.shards||[]).map(lA),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=y.useCallback(function(m,x){if("touches"in m&&m.touches.length===2)return!o.current.allowPinchZoom;var b=xd(m),w=r.current,E="deltaX"in m?m.deltaX:w[0]-b[0],R="deltaY"in m?m.deltaY:w[1]-b[1],N,I=m.target,F=Math.abs(E)>Math.abs(R)?"h":"v";if("touches"in m&&F==="h"&&I.type==="range")return!1;var j=oA(F,I);if(!j)return!0;if(j?N=F:(N=F==="v"?"h":"v",j=oA(F,I)),!j)return!1;if(!n.current&&"changedTouches"in m&&(E||R)&&(n.current=N),!N)return!0;var U=n.current||N;return wF(U,x,m,U==="h"?E:R,!0)},[]),l=y.useCallback(function(m){var x=m;if(!(!cl.length||cl[cl.length-1]!==s)){var b="deltaY"in x?aA(x):xd(x),w=e.current.filter(function(N){return N.name===x.type&&N.target===x.target&&EF(N.delta,b)})[0];if(w&&w.should){x.cancelable&&x.preventDefault();return}if(!w){var E=(o.current.shards||[]).map(lA).filter(Boolean).filter(function(N){return N.contains(x.target)}),R=E.length>0?a(x,E[0]):!o.current.noIsolation;R&&x.cancelable&&x.preventDefault()}}},[]),c=y.useCallback(function(m,x,b,w){var E={name:m,delta:x,target:b,should:w};e.current.push(E),setTimeout(function(){e.current=e.current.filter(function(R){return R!==E})},1)},[]),f=y.useCallback(function(m){r.current=xd(m),n.current=void 0},[]),u=y.useCallback(function(m){c(m.type,aA(m),m.target,a(m,t.lockRef.current))},[]),d=y.useCallback(function(m){c(m.type,xd(m),m.target,a(m,t.lockRef.current))},[]);y.useEffect(function(){return cl.push(s),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",l,ll),document.addEventListener("touchmove",l,ll),document.addEventListener("touchstart",f,ll),function(){cl=cl.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,ll),document.removeEventListener("touchmove",l,ll),document.removeEventListener("touchstart",f,ll)}},[]);var h=t.removeScrollBar,p=t.inert;return y.createElement(y.Fragment,null,p?y.createElement(s,{styles:AF(i)}):null,h?y.createElement(vF,{gapMode:"margin"}):null)}const kF=rF(B8,CF);var ix=y.forwardRef(function(t,e){return y.createElement(iv,ts({},t,{ref:e,sideCar:kF}))});ix.classNames=iv.classNames;const TF=["Enter"," "],sv="Menu",[PF,wse,RF]=tv(sv),[tl,q8]=ln(sv,[RF,Ec,Ac]);Ec();const _F=Ac();tl(sv);const[Ese,IF]=tl(sv),OF="MenuPortal";tl(OF,{forceMount:void 0});const MF="MenuContent",[Ase,H8]=tl(MF),Dy="MenuItem",cA="menu.itemSelect",W8=y.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...i}=t,s=y.useRef(null),o=IF(Dy,t.__scopeMenu),a=H8(Dy,t.__scopeMenu),l=Rt(e,s),c=y.useRef(!1),f=()=>{const u=s.current;if(!r&&u){const d=new CustomEvent(cA,{bubbles:!0,cancelable:!0});u.addEventListener(cA,h=>n==null?void 0:n(h),{once:!0}),Hg(u,d),d.defaultPrevented?c.current=!1:o.onClose()}};return y.createElement(NF,Te({},i,{ref:l,disabled:r,onClick:ke(t.onClick,f),onPointerDown:u=>{var d;(d=t.onPointerDown)===null||d===void 0||d.call(t,u),c.current=!0},onPointerUp:ke(t.onPointerUp,u=>{var d;c.current||(d=u.currentTarget)===null||d===void 0||d.click()}),onKeyDown:ke(t.onKeyDown,u=>{const d=a.searchRef.current!=="";r||d&&u.key===" "||TF.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),NF=y.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...s}=t,o=H8(Dy,r),a=_F(r),l=y.useRef(null),c=Rt(e,l),[f,u]=y.useState(!1),[d,h]=y.useState("");return y.useEffect(()=>{const p=l.current;if(p){var m;h(((m=p.textContent)!==null&&m!==void 0?m:"").trim())}},[s.children]),y.createElement(PF.ItemSlot,{scope:r,disabled:n,textValue:i??d},y.createElement(N8,Te({asChild:!0},a,{focusable:!n}),y.createElement(Ue.div,Te({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},s,{ref:c,onPointerMove:ke(t.onPointerMove,fA(p=>{n?o.onItemLeave(p):(o.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus())})),onPointerLeave:ke(t.onPointerLeave,fA(p=>o.onItemLeave(p))),onFocus:ke(t.onFocus,()=>u(!0)),onBlur:ke(t.onBlur,()=>u(!1))}))))}),DF=y.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...i}=t;return y.createElement(K8,{scope:t.__scopeMenu,checked:r},y.createElement(W8,Te({role:"menuitemcheckbox","aria-checked":e0(r)?"mixed":r},i,{ref:e,"data-state":sx(r),onSelect:ke(i.onSelect,()=>n==null?void 0:n(e0(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),LF="MenuRadioGroup",[Sse,jF]=tl(LF,{value:void 0,onValueChange:()=>{}}),FF="MenuRadioItem",BF=y.forwardRef((t,e)=>{const{value:r,...n}=t,i=jF(FF,t.__scopeMenu),s=r===i.value;return y.createElement(K8,{scope:t.__scopeMenu,checked:s},y.createElement(W8,Te({role:"menuitemradio","aria-checked":s},n,{ref:e,"data-state":sx(s),onSelect:ke(n.onSelect,()=>{var o;return(o=i.onValueChange)===null||o===void 0?void 0:o.call(i,r)},{checkForDefaultPrevented:!1})})))}),G8="MenuItemIndicator",[K8,$F]=tl(G8,{checked:!1}),UF=y.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...i}=t,s=$F(G8,r);return y.createElement(so,{present:n||e0(s.checked)||s.checked===!0},y.createElement(Ue.span,Te({},i,{ref:e,"data-state":sx(s.checked)})))}),zF="MenuSub";tl(zF);function e0(t){return t==="indeterminate"}function sx(t){return e0(t)?"indeterminate":t?"checked":"unchecked"}function fA(t){return e=>e.pointerType==="mouse"?t(e):void 0}const VF=DF,qF=BF,HF=UF,Y8="DropdownMenu",[WF,Cse]=ln(Y8,[q8]),ox=q8();WF(Y8);const GF=y.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=ox(r);return y.createElement(VF,Te({},i,n,{ref:e}))}),KF=y.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=ox(r);return y.createElement(qF,Te({},i,n,{ref:e}))}),YF=y.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=ox(r);return y.createElement(HF,Te({},i,n,{ref:e}))}),QF=GF,JF=KF,Q8=YF;var J8="_1k2mbvi4 _1k2mbvi3 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12ws fyvr12wm fyvr11h0 fyvr11ko fyvr11jw fyvr12v7 fyvr11n4 fyvr11hw fyvr12s7",X8="_1k2mbvi5";const XF=({children:t})=>Y.jsx(Q8,{className:X8,children:t});y.forwardRef(({className:t,children:e,...r},n)=>Y.jsxs(QF,{className:Mn(J8,t),...r,ref:n,children:[Y.jsx(XF,{children:Y.jsx(Wg,{size:"xs"})}),Y.jsx(me,{variant:"small",children:e})]}));y.forwardRef(({className:t,children:e,...r},n)=>Y.jsxs(JF,{className:Mn(J8,t),...r,ref:n,children:[Y.jsx(Q8,{className:X8,children:Y.jsx(me,{children:"•"})}),Y.jsx(me,{variant:"small",children:e})]}));const ov=y.forwardRef((t,e)=>{const{icon:r,size:n="md",...i}=t;return Y.jsx(Tt,{leftIcon:r,size:n,flexShrink:"0",ref:e,...i})}),ZF=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var eB="_1hq71vk1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _1hq71vk0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12n7 fyvr12fv fyvr1217 fyvr128j fyvr12np fyvr12gd fyvr121p fyvr1291 fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",tB=ur({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"_1hq71vk6 _1hq71vk2 fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"_1hq71vk7 _1hq71vk3 fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"_1hq71vk8 _1hq71vk4 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]}),rB="_1hq71vka _1hq71vk9 fyvr12wp fyvr12wj fyvr11ho fyvr12vj fyvr1ko fyvr1oo fyvr1mo fyvr1qo";const nB={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*, video/*",pdf:".pdf,application/pdf",mp4:".mp4,video/mp4"};y.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:i=!1,id:s,label:o="",labelLocation:a="hidden",name:l,onValueChange:c,placeholder:f="Upload a file",validExtensions:u,...d}=t,h=y.useRef(null),p=ZF(h,e),[m,x]=y.useState(null),b=E=>{const R=E.currentTarget.files;if(!R||!R[0])return;const N=R[0],I=N.name,F=N.size/1e3;x({name:I,size:F,extension:I.split(".").pop()??""}),c==null||c(N)},w=u.map(E=>nB[E]).join(",");return Y.jsx(el,{description:n,disabled:i,display:"grid",id:s??l,label:o,labelLocation:a,children:Y.jsxs(G,{width:"full",minWidth:"0",justifyContent:m?"space-between":"flex-start",gap:"2",color:m?"text100":"text50",className:Mn(eB,tB({borderRadius:r})),children:[m?Y.jsxs(G,{flexDirection:"row",gap:"2",alignItems:"center",minWidth:"0",children:[Y.jsx(me,{ellipsis:!0,children:m.name}),Y.jsxs(me,{color:"text50",variant:"xsmall",whiteSpace:"nowrap",children:[m.size.toFixed(2)," kb"]})]}):Y.jsx(me,{ellipsis:!0,children:f}),Y.jsx(G,{accept:w,as:"input",className:rB,cursor:"pointer",disabled:i,id:s??l,name:l,onChange:b,ref:p,type:"file",...d}),m&&Y.jsx(ov,{cursor:"pointer",icon:eu,size:"xs",onClick:E=>{var R;E.preventDefault(),E.stopPropagation(),(R=h.current)!=null&&R.value&&(h.current.value=""),c==null||c(null),x(null)},zIndex:"10"})]})})});var iB=ur({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const Ly=1e3,ql=64,_1=ql/2,I1=(t,e=Ly)=>t%e/(Ly/ql),ma=(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)},sB=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),i=t%360,s=(t+120)%360,o=r%360;return{id:ma(n),a:`hsl(${i}deg 100% 40%)`,b:`hsl(${s}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}},oB=(t,e)=>{const r=[];for(let n=0;n{const s=ql/10+I1(n.r,Ly*1.5/(i+1));return{...sB(n.a,n.b,n.c),x:I1(n.x),y:I1(n.y),r:s}})};y.memo(t=>{const{className:e,address:r,size:n="md",complexity:i=1,...s}=t,o=oB(r,i);return Y.jsxs(G,{as:"svg",className:Mn(e,iB({size:n})),viewBox:`0 0 ${ql} ${ql}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...s,children:[Y.jsxs("defs",{children:[Y.jsx("clipPath",{id:"circle-clip",children:Y.jsx("circle",{cx:_1,cy:_1,r:_1})}),Y.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[Y.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Y.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),Y.jsx("feGaussianBlur",{stdDeviation:ql/10,result:"effect1_foregroundBlur"})]}),Y.jsxs("linearGradient",{id:`gradient-background-${o[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[Y.jsx("stop",{offset:"0",stopColor:o[0].c}),Y.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map(a=>Y.jsxs(y.Fragment,{children:[Y.jsxs("radialGradient",{id:`gradient-primary-${a.id}`,children:[Y.jsx("stop",{offset:"0",stopColor:a.a}),Y.jsx("stop",{offset:"1",stopColor:a.b})]}),Y.jsxs("radialGradient",{id:`gradient-secondary-${a.id}`,children:[Y.jsx("stop",{offset:"0",stopColor:a.c}),Y.jsx("stop",{offset:"1",stopColor:a.b})]})]},a.id))]}),Y.jsxs("g",{clipPath:"url(#circle-clip)",children:[Y.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${o[0].id})`}),Y.jsx("g",{filter:"url(#blur)",children:o.map(a=>Y.jsxs(y.Fragment,{children:[Y.jsx("circle",{fill:`url(#gradient-primary-${a.id})`,cx:a.x,cy:a.y,r:a.r}),Y.jsx("circle",{fill:`url(#gradient-secondary-${a.id})`,cx:a.y,cy:a.x,r:a.r/2})]},a.id))})]})]})});const aB=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[i,s]=y.useState(!1),o=a=>{s(!0),r==null||r(a)};return Y.jsx(G,{as:_a.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:i?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},Z8="Dialog",[e5,kse]=ln(Z8),[lB,ia]=e5(Z8),cB=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:i,onOpenChange:s,modal:o=!0}=t,a=y.useRef(null),l=y.useRef(null),[c=!1,f]=Qs({prop:n,defaultProp:i,onChange:s});return y.createElement(lB,{scope:e,triggerRef:a,contentRef:l,contentId:$o(),titleId:$o(),descriptionId:$o(),open:c,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(u=>!u),[f]),modal:o},r)},t5="DialogPortal",[fB,r5]=e5(t5,{forceMount:void 0}),uB=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:i}=t,s=ia(t5,e);return y.createElement(fB,{scope:e,forceMount:r},y.Children.map(n,o=>y.createElement(so,{present:r||s.open},y.createElement(I8,{asChild:!0,container:i},o))))},jy="DialogOverlay",dB=y.forwardRef((t,e)=>{const r=r5(jy,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=ia(jy,t.__scopeDialog);return s.modal?y.createElement(so,{present:n||s.open},y.createElement(hB,Te({},i,{ref:e}))):null}),hB=y.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=ia(jy,r);return y.createElement(ix,{as:oc,allowPinchZoom:!0,shards:[i.contentRef]},y.createElement(Ue.div,Te({"data-state":i5(i.open)},n,{ref:e,style:{pointerEvents:"auto",...n.style}})))}),nu="DialogContent",vB=y.forwardRef((t,e)=>{const r=r5(nu,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=ia(nu,t.__scopeDialog);return y.createElement(so,{present:n||s.open},s.modal?y.createElement(pB,Te({},i,{ref:e})):y.createElement(yB,Te({},i,{ref:e})))}),pB=y.forwardRef((t,e)=>{const r=ia(nu,t.__scopeDialog),n=y.useRef(null),i=Rt(e,r.contentRef,n);return y.useEffect(()=>{const s=n.current;if(s)return L8(s)},[]),y.createElement(n5,Te({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ke(t.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=r.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:ke(t.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:ke(t.onFocusOutside,s=>s.preventDefault())}))}),yB=y.forwardRef((t,e)=>{const r=ia(nu,t.__scopeDialog),n=y.useRef(!1),i=y.useRef(!1);return y.createElement(n5,Te({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,s),!s.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),s.preventDefault()}n.current=!1,i.current=!1},onInteractOutside:s=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=s.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}}))}),n5=y.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=t,a=ia(nu,r),l=y.useRef(null),c=Rt(e,l);return v8(),y.createElement(y.Fragment,null,y.createElement(p8,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s},y.createElement(Qg,Te({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":i5(a.open)},o,{ref:c,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),mB="DialogClose",gB=y.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=ia(mB,r);return y.createElement(Ue.button,Te({type:"button"},n,{ref:e,onClick:ke(t.onClick,()=>i.onOpenChange(!1))}))});function i5(t){return t?"open":"closed"}const xB=cB,bB=uB,wB=dB,EB=vB,AB=gB;var SB=ur({defaultClassName:"_1vqx0w91 _1vqx0w90 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]}),CB=ur({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]});const kB=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:i,...s}=t;return Y.jsx(G,{className:CB({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...s,children:Y.jsx(G,{className:SB({direction:n}),background:"backgroundPrimary",...i,children:e})})};function TB(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}function PB(t,e){var r=t;for(var n of e){if(!(n in r))throw new Error("Path ".concat(e.join(" -> ")," does not exist in object"));r=r[n]}return r}function s5(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n=t.constructor();for(var i in t){var s=t[i],o=[...r,i];typeof s=="string"||typeof s=="number"||s==null?n[i]=e(s,o):typeof s=="object"&&!Array.isArray(s)?n[i]=s5(s,e,o):console.warn('Skipping invalid key "'.concat(o.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(s)?"Array":typeof s,'"'))}return n}function uA(t,e,r){t.style.setProperty(TB(e),r)}function dA(t,e,r){if(typeof r=="object"){var n=e;s5(r,(a,l)=>{a!=null&&uA(t,PB(n,l),String(a))})}else{var i=e;for(var s in i){var o=i[s];o!=null&&uA(t,s,i[s])}}}const ax=["dark","light"],o5="dark",RB="data-theme",hA="@sequence.theme",_B=t=>ax.includes(t),IB=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),a5=t=>t?`${hA}.${t}`:hA,OB=t=>{const e=localStorage.getItem(a5(t));return e&&ax.includes(e)?e:o5},l5=y.createContext(null),MB=t=>{const[e,r]=y.useState(t.theme||o5);y.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),y.useEffect(()=>{t.theme||r(OB(t.scope))},[t.theme,t.scope]),y.useEffect(()=>{t.theme&&r(t.theme)},[t.theme]),y.useEffect(()=>{const i=document.querySelector(t.root||":root");i&&(_B(e)?(i.setAttribute(RB,e),dA(i,jE,{colors:vD[e]})):IB(e)&&dA(i,jE,{colors:e}))},[e,t.root]);const n=y.useMemo(()=>({theme:e,root:t.root,setTheme:i=>{ax.includes(i)&&(localStorage.setItem(a5(t.scope),i),r(i))}}),[e,t.root,t.scope]);return Y.jsx(l5.Provider,{value:n,children:t.children})},NB=()=>{const t=y.useContext(l5);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t};var DB="_5b32m91 _5b32m90 fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11nk fyvr1ko fyvr1oo fyvr1qo fyvr1mo",LB="_5b32m93 _5b32m92 fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",jB=ur({defaultClassName:"_5b32m95 _5b32m94 fyvr11d8 fyvr11dw fyvr11bg fyvr11by fyvr11c4 fyvr11cm fyvr11ls fyvr11m8 fyvr12ws fyvr12wm fyvr11h0 fyvr11i4 fyvr11hs fyvr11sd fyvr1mo fyvr1om",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]}),FB="_5b32m9b _5b32m9a fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11nk";const c5=t=>{const{autoHeight:e=!1,backdropColor:r="backgroundBackdrop",children:n,disableAnimation:i=!1,isDismissible:s=!0,onClose:o,scroll:a=!0,size:l="lg",overlayProps:c,contentProps:f}=t,{root:u}=NB(),[d,h]=y.useState(null);return y.useEffect(()=>{h(document.querySelector(u||"body"))},[u]),d?Y.jsx(xB,{modal:!0,defaultOpen:!0,onOpenChange:o,children:Y.jsx(bB,{forceMount:!0,container:d,children:Y.jsxs(G,{className:DB,children:[Y.jsx(G,{as:wB,asChild:!0,background:r,className:LB,forceMount:!0,children:Y.jsx(_a.div,{initial:i?!1:{opacity:0},animate:i?!1:{opacity:1},exit:i?void 0:{opacity:0},transition:{type:"tween",ease:"linear"},...c},"modal-overlay")}),Y.jsx(EB,{asChild:!0,className:jB({autoHeight:e,size:l}),forceMount:!0,onEscapeKeyDown:p=>{s?o==null||o():p.preventDefault()},onInteractOutside:p=>{s||p.preventDefault()},children:Y.jsxs(_a.div,{initial:i?!1:{y:"100%",opacity:l==="sm"?0:1},animate:i?!1:{y:0,opacity:1},exit:i?void 0:{y:"100%",opacity:l==="sm"?0:1},transition:{type:"tween",ease:"easeOut"},...f,children:[a?Y.jsx(kB,{children:n}):n,s&&Y.jsx(AB,{asChild:!0,children:Y.jsx(ov,{icon:eu,backdropFilter:"blur",size:"xs",className:FB,"aria-label":"Close"})})]},"modal-content")})]})})}):null};var BB="_1acm19y1 _1acm19y0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11od fyvr12s1 fyvr1g0 fyvr118g",$B=ur({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"_1acm19y6 _1acm19y2 fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"_1acm19y7 _1acm19y3 fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"_1acm19y8 _1acm19y4 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]}),UB=ur({defaultClassName:"_1acm19ya _1acm19y9 fyvr1wg fyvr1yc fyvr1t4 fyvr1v0 fyvr12wp fyvr12wj fyvr11gw fyvr11od fyvr12s1 fyvr12o1 fyvr128 fyvr15o",variantClassNames:{numeric:{false:"_1acm19yb _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",true:"_1acm19yc _1qxj1ib9 _1qxj1ibc _1qxj1ib2 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8"}},defaultVariants:{},compoundVariants:[]});const Mr=y.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",leftIcon:f,rightIcon:u,name:d,controls:h,type:p="text",numeric:m=!1,...x}=t;return Y.jsx(el,{description:s,disabled:o,display:"grid",id:a??d,label:l,labelLocation:c,children:Y.jsx(G,{width:"full",children:Y.jsxs(G,{className:Mn(BB,$B({borderRadius:i})),children:[f&&Y.jsx(f,{size:"sm"}),Y.jsx(G,{as:r,autoComplete:n,spellCheck:"false",className:UB({numeric:m}),disabled:o,id:a??d,name:d,ref:e,type:p,...x}),u&&Y.jsx(u,{size:"sm"}),h]})})})}),zB=RegExp("^\\d*(?:\\\\[.])?\\d*$");function VB(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}y.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:i,onBlur:s,...o}=t,a=c=>{let{value:f}=c.target;f=f.replace(/,/g,"."),f.startsWith(".")&&(f="0"+f),f.startsWith("0")&&(f=f.replace(/^0+(?=\d)/,"")),(f===""||zB.test(VB(f)))&&(i==null||i({...c,target:{...c.target,value:f}}))},l=c=>{const{value:f}=c.target;let u=f;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),s==null||s(c),u!==f&&(i==null||i({...c,target:{...c.target,value:u}}))};return Y.jsx(Mr,{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})});var qB="y5zf971 _1qxj1ib9 _1qxj1ibc _1qxj1ib2 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8 _4efw240";const HB=t=>{const{value:e,digits:r=6,group:n,onChange:i,onConfirm:s,disabled:o=!1}=t,a=y.useMemo(()=>vA(0,r).map(()=>y.createRef()),[r]);y.useEffect(()=>{var d,h;(h=(d=a[0])==null?void 0:d.current)==null||h.focus()},[a]);const l=(d,h)=>{var p,m;/^\d$/.test(h)||(h="");const x=[...e];x[d]=h,h!==""&&((m=(p=a[d+1])==null?void 0:p.current)==null||m.focus()),i(x)},c=()=>e.join("").length===r,f=(d,h)=>{var p,m;const x=a[d].current,b=(p=a[d-1])==null?void 0:p.current,w=(m=a[d+1])==null?void 0:m.current;switch(h.key){case"Backspace":h.preventDefault(),x&&(x.value="",l(d,"")),b==null||b.focus();break;case"ArrowLeft":h.preventDefault(),b==null||b.focus();break;case"ArrowRight":h.preventDefault(),w==null||w.focus();break;case"Enter":h.preventDefault(),c()&&(s==null||s());break;default:(x==null?void 0:x.value)===h.key&&(h.preventDefault(),l(d,h.key))}},u=(d,h)=>{var p,m;const b=h.clipboardData.getData("text/plain").replace(/\D/g,"");new RegExp(`^\\d{${r}}$`).test(b)&&((m=(p=a[0])==null?void 0:p.current)==null||m.focus(),i(b.split("")),setTimeout(()=>{var E,R;(R=(E=a[a.length-1])==null?void 0:E.current)==null||R.focus()}))};return Y.jsx(G,{gap:"2",children:vA(0,r).map(d=>Y.jsxs(y.Fragment,{children:[!!n&&d>0&&d%n===0&&Y.jsx("span",{}),Y.jsx(G,{as:"input",className:qB,value:e[d]||"",ref:a[d],type:"text",inputMode:"numeric",maxLength:1,disabled:o,onFocus:h=>h.target.select(),onPaste:h=>u(d,h),onChange:h=>l(d,h.target.value),onKeyDown:h=>{f(d,h)}})]},d))})},vA=(t,e)=>Array.from({length:e-t},(r,n)=>n+t);ur({defaultClassName:"_1jujggt1",variantClassNames:{size:{sm:"_1jujggt2",normal:"_1jujggt3",md:"_1jujggt4",lg:"_1jujggt5",xl:"_1jujggt6"}},defaultVariants:{},compoundVariants:[]});const f5="Progress",av=100,[WB,Tse]=ln(f5),[GB,Pse]=WB(f5),KB=y.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:i,getValueLabel:s=YB,...o}=t,a=Fy(i)?i:av,l=u5(n,a)?n:null,c=t0(l)?s(l,a):void 0;return y.createElement(GB,{scope:r,value:l,max:a},y.createElement(Ue.div,Gt({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":t0(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":QB(l,a),"data-value":l??void 0,"data-max":a},o,{ref:e})))});KB.propTypes={max(t,e,r){const n=t[e],i=String(n);return n&&!Fy(n)?new Error(JB(i,r)):null},value(t,e,r){const n=t[e],i=String(n),s=Fy(t.max)?t.max:av;return n!=null&&!u5(n,s)?new Error(XB(i,r)):null}};function YB(t,e){return`${Math.round(t/e*100)}%`}function QB(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function t0(t){return typeof t=="number"}function Fy(t){return t0(t)&&!isNaN(t)&&t>0}function u5(t,e){return t0(t)&&!isNaN(t)&&t<=e&&t>=0}function JB(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${av}\`.`}function XB(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 ${ov} if no \`max\` prop is set) + - less than the value passed to \`max\` (or ${av} if no \`max\` prop is set) - \`null\` if the progress is indeterminate. -Defaulting to \`null\`.`}const u5="Radio",[ZB,d5]=ln(u5),[e$,t$]=ZB(u5),r$=y.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:i=!1,required:s,disabled:o,value:a="on",onCheck:l,...c}=t,[f,u]=y.useState(null),d=Pt(e,m=>u(m)),h=y.useRef(!1),p=f?!!f.closest("form"):!0;return y.createElement(e$,{scope:r,checked:i,disabled:o},y.createElement(Ue.button,Gt({type:"button",role:"radio","aria-checked":i,"data-state":h5(i),"data-disabled":o?"":void 0,disabled:o,value:a},c,{ref:d,onClick:ke(t.onClick,m=>{i||l==null||l(),p&&(h.current=m.isPropagationStopped(),h.current||m.stopPropagation())})})),p&&y.createElement(s$,{control:f,bubbles:!h.current,name:n,value:a,checked:i,required:s,disabled:o,style:{transform:"translateX(-100%)"}}))}),n$="RadioIndicator",i$=y.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...i}=t,s=t$(n$,r);return y.createElement(so,{present:n||s.checked},y.createElement(Ue.span,Gt({"data-state":h5(s.checked),"data-disabled":s.disabled?"":void 0},i,{ref:e})))}),s$=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=y.useRef(null),o=J0(r),a=X0(e);return y.useEffect(()=>{const l=s.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(d)}},[o,r,n]),y.createElement("input",Gt({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 h5(t){return t?"checked":"unchecked"}const o$=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],v5="RadioGroup",[a$,Rse]=ln(v5,[Ec,d5]),p5=Ec(),y5=d5(),[l$,c$]=a$(v5),f$=y.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:f=!0,onValueChange:u,...d}=t,h=p5(r),p=Kg(c),[m,x]=Qs({prop:s,defaultProp:i,onChange:u});return y.createElement(l$,{scope:r,name:n,required:o,disabled:a,value:m,onValueChange:x},y.createElement(Vj,Gt({asChild:!0},h,{orientation:l,dir:p,loop:f}),y.createElement(Ue.div,Gt({role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:p},d,{ref:e}))))}),u$="RadioGroupItem",d$=y.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...i}=t,s=c$(u$,r),o=s.disabled||n,a=p5(r),l=y5(r),c=y.useRef(null),f=Pt(e,c),u=s.value===i.value,d=y.useRef(!1);return y.useEffect(()=>{const h=m=>{o$.includes(m.key)&&(d.current=!0)},p=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",p),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",p)}},[]),y.createElement(M8,Gt({asChild:!0},a,{focusable:!o,active:u}),y.createElement(r$,Gt({disabled:o,required:s.required,checked:u},l,i,{name:s.name,ref:f,onCheck:()=>s.onValueChange(i.value),onKeyDown:ke(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:ke(i.onFocus,()=>{var h;d.current&&((h=c.current)===null||h===void 0||h.click())})})))}),h$=y.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,i=y5(r);return y.createElement(i$,Gt({},i,n,{ref:e}))}),v$=f$,p$=d$,y$=h$;var m$=ur({defaultClassName:"io59uy3 io59uy0 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr1so fyvr1uk fyvr1wg fyvr1yc fyvr12nd fyvr12g1 fyvr121d fyvr128p fyvr12nj fyvr12g7 fyvr121j fyvr128v fyvr11od fyvr12v7 fyvr12v3 fyvr12vz fyvr12vr _4efw240",variantClassNames:{size:{sm:"io59uy4 io59uy1 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy5 io59uy2 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]}),g$=ur({defaultClassName:"io59uy8 io59uy7 io59uy6 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12s1",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]});const x$=t=>{const{id:e,label:r,size:n="sm",value:i,disabled:s}=t;return K.jsx(G,{alignItems:"center",children:K.jsx(el,{disabled:s,display:"flex",id:e,label:r,labelLocation:"right",children:K.jsx(p$,{className:m$({size:n}),value:i,id:e,disabled:s,children:K.jsx(y$,{className:g$({size:n})})})})})};y.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:i="2",name:s,options:o,size:a="sm",...l}=t;return K.jsx(v$,{disabled:n,name:s,ref:e,...l,children:K.jsx(G,{flexDirection:r,gap:i,children:o.map(({label:c,value:f,disabled:u})=>K.jsx(x$,{id:`${s}-${f}`,label:c,size:a,value:f,disabled:u},f))})})});function pE(t,[e,r]){return Math.min(r,Math.max(e,t))}const ax=y.forwardRef((t,e)=>y.createElement(Ue.span,Te({},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}}))),b$=[" ","Enter","ArrowUp","ArrowDown"],w$=[" ","Enter"],av="Select",[lv,lx,A$]=ev(av),[Sc,_se]=ln(av,[A$,Ac]),cx=Ac(),[E$,rl]=Sc(av),[S$,C$]=Sc(av),k$=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:l,dir:c,name:f,autoComplete:u,disabled:d,required:h}=t,p=cx(e),[m,x]=y.useState(null),[b,w]=y.useState(null),[A,R]=y.useState(!1),N=Kg(c),[I=!1,F]=Qs({prop:n,defaultProp:i,onChange:s}),[j,U]=Qs({prop:o,defaultProp:a,onChange:l}),Y=y.useRef(null),J=m?!!m.closest("form"):!0,[Z,M]=y.useState(new Set),v=Array.from(Z).map(T=>T.props.value).join(";");return y.createElement(Tj,p,y.createElement(E$,{required:h,scope:e,trigger:m,onTriggerChange:x,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:A,onValueNodeHasChildrenChange:R,contentId:$o(),value:j,onValueChange:U,open:I,onOpenChange:F,dir:N,triggerPointerDownPosRef:Y,disabled:d},y.createElement(lv.Provider,{scope:e},y.createElement(S$,{scope:t.__scopeSelect,onNativeOptionAdd:y.useCallback(T=>{M(S=>new Set(S).add(T))},[]),onNativeOptionRemove:y.useCallback(T=>{M(S=>{const C=new Set(S);return C.delete(T),C})},[])},r)),J?y.createElement(x5,{key:v,"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:u,value:j,onChange:T=>U(T.target.value),disabled:d},j===void 0?y.createElement("option",{value:""}):null,Array.from(Z)):null))},T$="SelectTrigger",P$=y.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...i}=t,s=cx(r),o=rl(T$,r),a=o.disabled||n,l=Pt(e,o.onTriggerChange),c=lx(r),[f,u,d]=b5(p=>{const m=c().filter(w=>!w.disabled),x=m.find(w=>w.value===o.value),b=w5(m,p,x);b!==void 0&&o.onValueChange(b.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return y.createElement(Pj,Te({asChild:!0},s),y.createElement(Ue.button,Te({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":g5(o.value)?"":void 0},i,{ref:l,onClick:ke(i.onClick,p=>{p.currentTarget.focus()}),onPointerDown:ke(i.onPointerDown,p=>{const m=p.target;m.hasPointerCapture(p.pointerId)&&m.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&(h(),o.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)},p.preventDefault())}),onKeyDown:ke(i.onKeyDown,p=>{const m=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&u(p.key),!(m&&p.key===" ")&&b$.includes(p.key)&&(h(),p.preventDefault())})})))}),R$="SelectValue",_$=y.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,children:s,placeholder:o="",...a}=t,l=rl(R$,r),{onValueNodeHasChildrenChange:c}=l,f=s!==void 0,u=Pt(e,l.onValueNodeChange);return Kn(()=>{c(f)},[c,f]),y.createElement(Ue.span,Te({},a,{ref:u,style:{pointerEvents:"none"}}),g5(l.value)?y.createElement(y.Fragment,null,o):s)}),I$=y.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...i}=t;return y.createElement(Ue.span,Te({"aria-hidden":!0},i,{ref:e}),n||"▼")}),lc="SelectContent",O$=y.forwardRef((t,e)=>{const r=rl(lc,t.__scopeSelect),[n,i]=y.useState();if(Kn(()=>{i(new DocumentFragment)},[]),!r.open){const s=n;return s?io.createPortal(y.createElement(m5,{scope:t.__scopeSelect},y.createElement(lv.Slot,{scope:t.__scopeSelect},y.createElement("div",null,t.children))),s):null}return y.createElement(M$,Te({},t,{ref:e}))}),Rs=10,[m5,cv]=Sc(lc),M$=y.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:m,avoidCollisions:x,...b}=t,w=rl(lc,r),[A,R]=y.useState(null),[N,I]=y.useState(null),F=Pt(e,V=>R(V)),[j,U]=y.useState(null),[Y,J]=y.useState(null),Z=lx(r),[M,v]=y.useState(!1),T=y.useRef(!1);y.useEffect(()=>{if(A)return D8(A)},[A]),h8();const S=y.useCallback(V=>{const[q,...X]=Z().map(te=>te.ref.current),[le]=X.slice(-1),ne=document.activeElement;for(const te of V)if(te===ne||(te==null||te.scrollIntoView({block:"nearest"}),te===q&&N&&(N.scrollTop=0),te===le&&N&&(N.scrollTop=N.scrollHeight),te==null||te.focus(),document.activeElement!==ne))return},[Z,N]),C=y.useCallback(()=>S([j,A]),[S,j,A]);y.useEffect(()=>{M&&C()},[M,C]);const{onOpenChange:P,triggerPointerDownPosRef:O}=w;y.useEffect(()=>{if(A){let V={x:0,y:0};const q=le=>{var ne,te,Ie,pe;V={x:Math.abs(Math.round(le.pageX)-((ne=(te=O.current)===null||te===void 0?void 0:te.x)!==null&&ne!==void 0?ne:0)),y:Math.abs(Math.round(le.pageY)-((Ie=(pe=O.current)===null||pe===void 0?void 0:pe.y)!==null&&Ie!==void 0?Ie:0))}},X=le=>{V.x<=10&&V.y<=10?le.preventDefault():A.contains(le.target)||P(!1),document.removeEventListener("pointermove",q),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",q),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",X,{capture:!0})}}},[A,P,O]),y.useEffect(()=>{const V=()=>P(!1);return window.addEventListener("blur",V),window.addEventListener("resize",V),()=>{window.removeEventListener("blur",V),window.removeEventListener("resize",V)}},[P]);const[L,E]=b5(V=>{const q=Z().filter(ne=>!ne.disabled),X=q.find(ne=>ne.ref.current===document.activeElement),le=w5(q,V,X);le&&setTimeout(()=>le.ref.current.focus())}),g=y.useCallback((V,q,X)=>{const le=!T.current&&!X;(w.value!==void 0&&w.value===q||le)&&(U(V),le&&(T.current=!0))},[w.value]),_=y.useCallback(()=>A==null?void 0:A.focus(),[A]),B=y.useCallback((V,q,X)=>{const le=!T.current&&!X;(w.value!==void 0&&w.value===q||le)&&J(V)},[w.value]),k=n==="popper"?yE:N$,$=k===yE?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:m,avoidCollisions:x}:{};return y.createElement(m5,{scope:r,content:A,viewport:N,onViewportChange:I,itemRefCallback:g,selectedItem:j,onItemLeave:_,itemTextRefCallback:B,focusSelectedItem:C,selectedItemText:Y,position:n,isPositioned:M,searchRef:L},y.createElement(nx,{as:oc,allowPinchZoom:!0},y.createElement(v8,{asChild:!0,trapped:w.open,onMountAutoFocus:V=>{V.preventDefault()},onUnmountAutoFocus:ke(i,V=>{var q;(q=w.trigger)===null||q===void 0||q.focus({preventScroll:!0}),V.preventDefault()})},y.createElement(Yg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:V=>V.preventDefault(),onDismiss:()=>w.onOpenChange(!1)},y.createElement(k,Te({role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:V=>V.preventDefault()},b,$,{onPlaced:()=>v(!0),ref:F,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:ke(b.onKeyDown,V=>{const q=V.ctrlKey||V.altKey||V.metaKey;if(V.key==="Tab"&&V.preventDefault(),!q&&V.key.length===1&&E(V.key),["ArrowUp","ArrowDown","Home","End"].includes(V.key)){let le=Z().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);if(["ArrowUp","End"].includes(V.key)&&(le=le.slice().reverse()),["ArrowUp","ArrowDown"].includes(V.key)){const ne=V.target,te=le.indexOf(ne);le=le.slice(te+1)}setTimeout(()=>S(le)),V.preventDefault()}})}))))))}),N$=y.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...i}=t,s=rl(lc,r),o=cv(lc,r),[a,l]=y.useState(null),[c,f]=y.useState(null),u=Pt(e,F=>f(F)),d=lx(r),h=y.useRef(!1),p=y.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:b,focusSelectedItem:w}=o,A=y.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&c&&m&&x&&b){const F=s.trigger.getBoundingClientRect(),j=c.getBoundingClientRect(),U=s.valueNode.getBoundingClientRect(),Y=b.getBoundingClientRect();if(s.dir!=="rtl"){const ne=Y.left-j.left,te=U.left-ne,Ie=F.left-te,pe=F.width+Ie,Se=Math.max(pe,j.width),sr=window.innerWidth-Rs,Xe=pE(te,[Rs,sr-Se]);a.style.minWidth=pe+"px",a.style.left=Xe+"px"}else{const ne=j.right-Y.right,te=window.innerWidth-U.right-ne,Ie=window.innerWidth-F.right-te,pe=F.width+Ie,Se=Math.max(pe,j.width),sr=window.innerWidth-Rs,Xe=pE(te,[Rs,sr-Se]);a.style.minWidth=pe+"px",a.style.right=Xe+"px"}const J=d(),Z=window.innerHeight-Rs*2,M=m.scrollHeight,v=window.getComputedStyle(c),T=parseInt(v.borderTopWidth,10),S=parseInt(v.paddingTop,10),C=parseInt(v.borderBottomWidth,10),P=parseInt(v.paddingBottom,10),O=T+S+M+P+C,L=Math.min(x.offsetHeight*5,O),E=window.getComputedStyle(m),g=parseInt(E.paddingTop,10),_=parseInt(E.paddingBottom,10),B=F.top+F.height/2-Rs,k=Z-B,$=x.offsetHeight/2,V=x.offsetTop+$,q=T+S+V,X=O-q;if(q<=B){const ne=x===J[J.length-1].ref.current;a.style.bottom="0px";const te=c.clientHeight-m.offsetTop-m.offsetHeight,Ie=Math.max(k,$+(ne?_:0)+te+C),pe=q+Ie;a.style.height=pe+"px"}else{const ne=x===J[0].ref.current;a.style.top="0px";const Ie=Math.max(B,T+m.offsetTop+(ne?g:0)+$)+X;a.style.height=Ie+"px",m.scrollTop=q-B+m.offsetTop}a.style.margin=`${Rs}px 0`,a.style.minHeight=L+"px",a.style.maxHeight=Z+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[d,s.trigger,s.valueNode,a,c,m,x,b,s.dir,n]);Kn(()=>A(),[A]);const[R,N]=y.useState();Kn(()=>{c&&N(window.getComputedStyle(c).zIndex)},[c]);const I=y.useCallback(F=>{F&&p.current===!0&&(A(),w==null||w(),p.current=!1)},[A,w]);return y.createElement(D$,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:I},y.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R}},y.createElement(Ue.div,Te({},i,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),yE=y.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=Rs,...s}=t,o=cx(r);return y.createElement(Rj,Te({},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)"}}))}),[D$,L$]=Sc(lc,{}),mE="SelectViewport",j$=y.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=cv(mE,r),s=L$(mE,r),o=Pt(e,i.onViewportChange),a=y.useRef(0);return y.createElement(y.Fragment,null,y.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}"}}),y.createElement(lv.Slot,{scope:r},y.createElement(Ue.div,Te({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:ke(n.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:u}=s;if(u!=null&&u.current&&f){const d=Math.abs(a.current-c.scrollTop);if(d>0){const h=window.innerHeight-Rs*2,p=parseFloat(f.style.minHeight),m=parseFloat(f.style.height),x=Math.max(p,m);if(x0?A:0,f.style.justifyContent="flex-end")}}}a.current=c.scrollTop})}))))}),F$="SelectGroup",[B$,Ise]=Sc(F$),$$=y.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=$o();return y.createElement(B$,{scope:r,id:i},y.createElement(Ue.div,Te({role:"group","aria-labelledby":i},n,{ref:e})))}),Fy="SelectItem",[U$,z$]=Sc(Fy),V$=y.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:s,...o}=t,a=rl(Fy,r),l=cv(Fy,r),c=a.value===n,[f,u]=y.useState(s??""),[d,h]=y.useState(!1),p=Pt(e,b=>{var w;return(w=l.itemRefCallback)===null||w===void 0?void 0:w.call(l,b,n,i)}),m=$o(),x=()=>{i||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return y.createElement(U$,{scope:r,value:n,disabled:i,textId:m,isSelected:c,onItemTextChange:y.useCallback(b=>{u(w=>{var A;return w||((A=b==null?void 0:b.textContent)!==null&&A!==void 0?A:"").trim()})},[])},y.createElement(lv.ItemSlot,{scope:r,value:n,disabled:i,textValue:f},y.createElement(Ue.div,Te({role:"option","aria-labelledby":m,"data-highlighted":d?"":void 0,"aria-selected":c&&d,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},o,{ref:p,onFocus:ke(o.onFocus,()=>h(!0)),onBlur:ke(o.onBlur,()=>h(!1)),onPointerUp:ke(o.onPointerUp,x),onPointerMove:ke(o.onPointerMove,b=>{if(i){var w;(w=l.onItemLeave)===null||w===void 0||w.call(l)}else b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ke(o.onPointerLeave,b=>{if(b.currentTarget===document.activeElement){var w;(w=l.onItemLeave)===null||w===void 0||w.call(l)}}),onKeyDown:ke(o.onKeyDown,b=>{var w;((w=l.searchRef)===null||w===void 0?void 0:w.current)!==""&&b.key===" "||(w$.includes(b.key)&&x(),b.key===" "&&b.preventDefault())})}))))}),bd="SelectItemText",H$=y.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,...s}=t,o=rl(bd,r),a=cv(bd,r),l=z$(bd,r),c=C$(bd,r),[f,u]=y.useState(null),d=Pt(e,b=>u(b),l.onItemTextChange,b=>{var w;return(w=a.itemTextRefCallback)===null||w===void 0?void 0:w.call(a,b,l.value,l.disabled)}),h=f==null?void 0:f.textContent,p=y.useMemo(()=>y.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},h),[l.disabled,l.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:x}=c;return Kn(()=>(m(p),()=>x(p)),[m,x,p]),y.createElement(y.Fragment,null,y.createElement(Ue.span,Te({id:l.textId},s,{ref:d})),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?io.createPortal(s.children,o.valueNode):null)});function g5(t){return t===""||t===void 0}const x5=y.forwardRef((t,e)=>{const{value:r,...n}=t,i=y.useRef(null),s=Pt(e,i),o=J0(r);return y.useEffect(()=>{const a=i.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&f){const u=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(u)}},[o,r]),y.createElement(ax,{asChild:!0},y.createElement("select",Te({},n,{ref:s,defaultValue:r})))});x5.displayName="BubbleSelect";function b5(t){const e=In(t),r=y.useRef(""),n=y.useRef(0),i=y.useCallback(o=>{const a=r.current+o;e(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),s=y.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,s]}function w5(t,e,r){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,s=r?t.indexOf(r):-1;let o=q$(t,Math.max(s,0));i.length===1&&(o=o.filter(c=>c!==r));const l=o.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==r?l:void 0}function q$(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const W$=k$,G$=P$,K$=_$,Y$=I$,Q$=O$,J$=j$,X$=$$,Z$=V$,eU=H$;var tU="gohwum1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 gohwum0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11od fyvr11hc fyvr11f4 fyvr12s1 fyvr118c fyvr11jw fyvr11n4 fyvr12v7 fyvr12o1",rU=ur({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"gohwum6 gohwum2 fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"gohwum7 gohwum3 fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"gohwum8 gohwum4 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]}),nU="gohwuma gohwum9 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11tv fyvr12s1 fyvr11nl",iU="gohwume _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 gohwumd fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12ws fyvr12wt fyvr12wm fyvr12wn fyvr11h0 fyvr11jw fyvr11ko fyvr12v7 fyvr12v3 fyvr12s1 fyvr12w1 fyvr12vr";const sU=y.forwardRef(({children:t,className:e,...r},n)=>K.jsx(Z$,{className:Mn(iU,e),...r,ref:n,children:K.jsx(eU,{children:t})})),fv=y.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:i,label:s="",description:o,labelLocation:a="hidden",name:l,options:c,placeholder:f,...u}=t;return K.jsx(el,{disabled:n,display:"grid",id:i??l,label:s,labelLocation:a,description:o,whiteSpace:"nowrap",children:K.jsxs(W$,{disabled:n,name:l,...u,children:[K.jsxs(G$,{id:i??l,className:Mn(tU,rU({borderRadius:r})),ref:e,children:[K.jsx(K$,{placeholder:f}),K.jsx(G,{as:Y$,display:"inline-flex",children:K.jsx(a8,{})})]}),K.jsx(Q$,{className:nU,children:K.jsx(J$,{children:K.jsx(X$,{children:c.map(({value:d,label:h,...p})=>K.jsx(sU,{value:d,...p,children:h},d))})})})]})})});y.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:i="Search",name:s="search",value:o,...a}=t,l=o?K.jsx(sv,{icon:eu,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return K.jsx(Mr,{ref:e,name:s,leftIcon:tL,controls:r||l,placeholder:i,value:o,onChange:c=>n==null?void 0:n(c),...a})});var oU=ur({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});const Rn=y.forwardRef((t,e)=>{const{size:r="md",...n}=t;return K.jsx(G,{className:oU({size:r}),color:"text50",ref:e,...n,children:K.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[K.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),K.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});y.forwardRef(({children:t},e)=>K.jsx(G,{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 A5="Switch",[aU,Ose]=ln(A5),[lU,cU]=aU(A5),fU=y.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,d]=y.useState(null),h=Pt(e,w=>d(w)),p=y.useRef(!1),m=u?!!u.closest("form"):!0,[x=!1,b]=Qs({prop:i,defaultProp:s,onChange:c});return y.createElement(lU,{scope:r,checked:x,disabled:a},y.createElement(Ue.button,Gt({type:"button",role:"switch","aria-checked":x,"aria-required":o,"data-state":E5(x),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:h,onClick:ke(t.onClick,w=>{b(A=>!A),m&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})})),m&&y.createElement(hU,{control:u,bubbles:!p.current,name:n,value:l,checked:x,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),uU="SwitchThumb",dU=y.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,i=cU(uU,r);return y.createElement(Ue.span,Gt({"data-state":E5(i.checked),"data-disabled":i.disabled?"":void 0},n,{ref:e}))}),hU=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=y.useRef(null),o=J0(r),a=X0(e);return y.useEffect(()=>{const l=s.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(d)}},[o,r,n]),y.createElement("input",Gt({type:"checkbox","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function E5(t){return t?"checked":"unchecked"}const vU=fU,pU=dU;var yU="_1lp2u8e1 _1lp2u8e0 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr1ss fyvr1uo fyvr1wk fyvr1yg fyvr11t1 fyvr11hw fyvr12v7 fyvr12o1 _4efw240",mU="_1lp2u8e3 _1lp2u8e2 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ho fyvr1ko fyvr1oo fyvr1k fyvr140 fyvr11o1";const gU=t=>{const{disabled:e,label:r,labelLocation:n="left",description:i,id:s,name:o,...a}=t;return K.jsx(el,{disabled:e,display:"flex",id:s??o,label:r,labelLocation:n,description:i,whiteSpace:"nowrap",children:K.jsx(vU,{className:yU,disabled:e,...a,children:K.jsx(G,{position:"relative",width:"full",height:"full",children:K.jsx(pU,{className:mU})})})})};ur({defaultClassName:"nwwh3z8",variantClassNames:{variant:{pill:"nwwh3z9",line:"nwwh3za nwwh3z1 fyvr11g0"},active:{true:"nwwh3zb nwwh3z2 fyvr12w5",false:"nwwh3zc"},disabled:{true:"nwwh3zd nwwh3z3 fyvr12vp"}},defaultVariants:{},compoundVariants:[[{active:!0,variant:"pill"},"nwwh3z4 fyvr11u7 fyvr12sj"],[{active:!1,variant:"pill"},"nwwh3z5 fyvr11od fyvr12s7"],[{active:!0,variant:"line"},"nwwh3z6 fyvr12s1"],[{active:!1,variant:"line"},"nwwh3z7 fyvr12s7"]]});const S5="Tabs",[xU,Mse]=ln(S5,[Ec]);Ec();xU(S5);var bU="_1ppqbnx1 _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc _1ppqbnx0 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n9";y.forwardRef((t,e)=>{const{icon:r,label:n,...i}=t;return K.jsxs(G,{className:bU,ref:e,background:"buttonGlass",color:"text80",...i,children:[r&&K.jsx(r,{size:"xs"}),K.jsx(me,{children:n})]})});const C5="ToastProvider",[fx,wU,AU]=ev("Toast"),[k5,Nse]=ln("Toast",[AU]),[EU,uv]=k5(C5),T5=t=>{const{__scopeToast:e,label:r="Notification",duration:n=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:o}=t,[a,l]=y.useState(null),[c,f]=y.useState(0),u=y.useRef(!1),d=y.useRef(!1);return y.createElement(fx.Provider,{scope:e},y.createElement(EU,{scope:e,label:r,duration:n,swipeDirection:i,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:y.useCallback(()=>f(h=>h+1),[]),onToastRemove:y.useCallback(()=>f(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:u,isClosePausedRef:d},o))};T5.propTypes={label(t){if(t.label&&typeof t.label=="string"&&!t.label.trim()){const e=`Invalid prop \`label\` supplied to \`${C5}\`. Expected non-empty \`string\`.`;return new Error(e)}return null}};const SU="ToastViewport",CU=["F8"],By="toast.viewportPause",$y="toast.viewportResume",kU=y.forwardRef((t,e)=>{const{__scopeToast:r,hotkey:n=CU,label:i="Notifications ({hotkey})",...s}=t,o=uv(SU,r),a=wU(r),l=y.useRef(null),c=y.useRef(null),f=y.useRef(null),u=y.useRef(null),d=Pt(e,u,o.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=o.toastCount>0;y.useEffect(()=>{const x=b=>{var w;n.every(R=>b[R]||b.code===R)&&((w=u.current)===null||w===void 0||w.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),y.useEffect(()=>{const x=l.current,b=u.current;if(p&&x&&b){const w=()=>{if(!o.isClosePausedRef.current){const I=new CustomEvent(By);b.dispatchEvent(I),o.isClosePausedRef.current=!0}},A=()=>{if(o.isClosePausedRef.current){const I=new CustomEvent($y);b.dispatchEvent(I),o.isClosePausedRef.current=!1}},R=I=>{!x.contains(I.relatedTarget)&&A()},N=()=>{x.contains(document.activeElement)||A()};return x.addEventListener("focusin",w),x.addEventListener("focusout",R),x.addEventListener("pointermove",w),x.addEventListener("pointerleave",N),window.addEventListener("blur",w),window.addEventListener("focus",A),()=>{x.removeEventListener("focusin",w),x.removeEventListener("focusout",R),x.removeEventListener("pointermove",w),x.removeEventListener("pointerleave",N),window.removeEventListener("blur",w),window.removeEventListener("focus",A)}}},[p,o.isClosePausedRef]);const m=y.useCallback(({tabbingDirection:x})=>{const w=a().map(A=>{const R=A.ref.current,N=[R,...VU(R)];return x==="forwards"?N:N.reverse()});return(x==="forwards"?w.reverse():w).flat()},[a]);return y.useEffect(()=>{const x=u.current;if(x){const b=w=>{const A=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!A){const j=document.activeElement,U=w.shiftKey;if(w.target===x&&U){var N;(N=c.current)===null||N===void 0||N.focus();return}const Z=m({tabbingDirection:U?"backwards":"forwards"}),M=Z.findIndex(v=>v===j);if(I1(Z.slice(M+1)))w.preventDefault();else{var I,F;U?(I=c.current)===null||I===void 0||I.focus():(F=f.current)===null||F===void 0||F.focus()}}};return x.addEventListener("keydown",b),()=>x.removeEventListener("keydown",b)}},[a,m]),y.createElement(RL,{ref:l,role:"region","aria-label":i.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:p?void 0:"none"}},p&&y.createElement(gE,{ref:c,onFocusFromOutsideViewport:()=>{const x=m({tabbingDirection:"forwards"});I1(x)}}),y.createElement(fx.Slot,{scope:r},y.createElement(Ue.ol,Te({tabIndex:-1},s,{ref:d}))),p&&y.createElement(gE,{ref:f,onFocusFromOutsideViewport:()=>{const x=m({tabbingDirection:"backwards"});I1(x)}}))}),TU="ToastFocusProxy",gE=y.forwardRef((t,e)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...i}=t,s=uv(TU,r);return y.createElement(ax,Te({"aria-hidden":!0,tabIndex:0},i,{ref:e,style:{position:"fixed"},onFocus:o=>{var a;const l=o.relatedTarget;!((a=s.viewport)!==null&&a!==void 0&&a.contains(l))&&n()}}))}),dv="Toast",PU="toast.swipeStart",RU="toast.swipeMove",_U="toast.swipeCancel",IU="toast.swipeEnd",OU=y.forwardRef((t,e)=>{const{forceMount:r,open:n,defaultOpen:i,onOpenChange:s,...o}=t,[a=!0,l]=Qs({prop:n,defaultProp:i,onChange:s});return y.createElement(so,{present:r||a},y.createElement(P5,Te({open:a},o,{ref:e,onClose:()=>l(!1),onPause:In(t.onPause),onResume:In(t.onResume),onSwipeStart:ke(t.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ke(t.onSwipeMove,c=>{const{x:f,y:u}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${u}px`)}),onSwipeCancel:ke(t.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ke(t.onSwipeEnd,c=>{const{x:f,y:u}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${u}px`),l(!1)})})))}),[MU,NU]=k5(dv,{onClose(){}}),P5=y.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:f,onSwipeMove:u,onSwipeCancel:d,onSwipeEnd:h,...p}=t,m=uv(dv,r),[x,b]=y.useState(null),w=Pt(e,v=>b(v)),A=y.useRef(null),R=y.useRef(null),N=i||m.duration,I=y.useRef(0),F=y.useRef(N),j=y.useRef(0),{onToastAdd:U,onToastRemove:Y}=m,J=In(()=>{var v;(x==null?void 0:x.contains(document.activeElement))&&((v=m.viewport)===null||v===void 0||v.focus()),o()}),Z=y.useCallback(v=>{!v||v===1/0||(window.clearTimeout(j.current),I.current=new Date().getTime(),j.current=window.setTimeout(J,v))},[J]);y.useEffect(()=>{const v=m.viewport;if(v){const T=()=>{Z(F.current),c==null||c()},S=()=>{const C=new Date().getTime()-I.current;F.current=F.current-C,window.clearTimeout(j.current),l==null||l()};return v.addEventListener(By,S),v.addEventListener($y,T),()=>{v.removeEventListener(By,S),v.removeEventListener($y,T)}}},[m.viewport,N,l,c,Z]),y.useEffect(()=>{s&&!m.isClosePausedRef.current&&Z(N)},[s,N,m.isClosePausedRef,Z]),y.useEffect(()=>(U(),()=>Y()),[U,Y]);const M=y.useMemo(()=>x?I5(x):null,[x]);return m.viewport?y.createElement(y.Fragment,null,M&&y.createElement(DU,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},M),y.createElement(MU,{scope:r,onClose:J},io.createPortal(y.createElement(fx.ItemSlot,{scope:r},y.createElement(PL,{asChild:!0,onEscapeKeyDown:ke(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||J(),m.isFocusedToastEscapeKeyDownRef.current=!1})},y.createElement(Ue.li,Te({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection},p,{ref:w,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ke(t.onKeyDown,v=>{v.key==="Escape"&&(a==null||a(v.nativeEvent),v.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,J()))}),onPointerDown:ke(t.onPointerDown,v=>{v.button===0&&(A.current={x:v.clientX,y:v.clientY})}),onPointerMove:ke(t.onPointerMove,v=>{if(!A.current)return;const T=v.clientX-A.current.x,S=v.clientY-A.current.y,C=!!R.current,P=["left","right"].includes(m.swipeDirection),O=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,L=P?O(0,T):0,E=P?0:O(0,S),g=v.pointerType==="touch"?10:2,_={x:L,y:E},B={originalEvent:v,delta:_};C?(R.current=_,wd(RU,u,B,{discrete:!1})):xE(_,m.swipeDirection,g)?(R.current=_,wd(PU,f,B,{discrete:!1}),v.target.setPointerCapture(v.pointerId)):(Math.abs(T)>g||Math.abs(S)>g)&&(A.current=null)}),onPointerUp:ke(t.onPointerUp,v=>{const T=R.current,S=v.target;if(S.hasPointerCapture(v.pointerId)&&S.releasePointerCapture(v.pointerId),R.current=null,A.current=null,T){const C=v.currentTarget,P={originalEvent:v,delta:T};xE(T,m.swipeDirection,m.swipeThreshold)?wd(IU,h,P,{discrete:!0}):wd(_U,d,P,{discrete:!0}),C.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})))),m.viewport))):null});P5.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${dv}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const DU=t=>{const{__scopeToast:e,children:r,...n}=t,i=uv(dv,e),[s,o]=y.useState(!1),[a,l]=y.useState(!1);return UU(()=>o(!0)),y.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:y.createElement(_8,{asChild:!0},y.createElement(ax,n,s&&y.createElement(y.Fragment,null,i.label," ",r)))},LU=y.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return y.createElement(Ue.div,Te({},n,{ref:e}))}),jU=y.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return y.createElement(Ue.div,Te({},n,{ref:e}))}),FU="ToastAction",BU=y.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?y.createElement(_5,{altText:r,asChild:!0},y.createElement(R5,Te({},n,{ref:e}))):null});BU.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${FU}\``)}};const $U="ToastClose",R5=y.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,i=NU($U,r);return y.createElement(_5,{asChild:!0},y.createElement(Ue.button,Te({type:"button"},n,{ref:e,onClick:ke(t.onClick,i.onClose)})))}),_5=y.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...i}=t;return y.createElement(Ue.div,Te({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},i,{ref:e}))});function I5(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),zU(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(...I5(n))}}),e}function wd(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?Hg(i,s):i.dispatchEvent(s)}const xE=(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 UU(t=()=>{}){const e=In(t);Kn(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function zU(t){return t.nodeType===t.ELEMENT_NODE}function VU(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 I1(t){const e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}const HU=T5,qU=kU,WU=OU,GU=LU,KU=jU,YU=R5;var QU="_6wut8v1 _6wut8v0 fyvr12wp fyvr12wj fyvr11hs fyvr1qo fyvr1mo fyvr128 fyvr118g fyvr11i4 fyvr11h0",JU=ur({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});const O5=y.createContext(null),XU=t=>{const{children:e,...r}=t,[n,i]=y.useState(new Set);return K.jsxs(HU,{...r,children:[K.jsxs(O5.Provider,{value:i,children:[e,K.jsx(Vg,{children:Array.from(n).map(s=>K.jsx(ez,{...s},s.id))})]}),K.jsx(ZU,{})]})},ZU=()=>K.jsx(qU,{className:QU}),ez=t=>{const{id:e,variant:r,title:n,description:i,icon:s,isDismissible:o=!0,...a}=t,l=()=>{if(s)return K.jsx(s,{});switch(r){case"success":return K.jsx(G,{background:"positive",color:"black",borderRadius:"circle",width:"8",height:"8",placeItems:"center",minWidth:"0",flexShrink:"0",children:K.jsx(qg,{})});case"error":return K.jsx(G,{background:"negative",color:"black",borderRadius:"circle",width:"8",height:"8",placeItems:"center",minWidth:"0",flexShrink:"0",children:K.jsx(eu,{})});default:return null}};return K.jsx(WU,{className:JU({variant:r}),open:!0,forceMount:!0,asChild:!0,...a,children:K.jsxs(ID,{as:_a.li,layoutId:e,layout:!0,initial:{x:"100%"},animate:{x:0},exit:{y:"100%",opacity:0},borderRadius:"md",background:"buttonGlass",backdropFilter:"blur",position:"relative",width:"full",justifyContent:"space-between",children:[K.jsxs(G,{gap:"3",alignItems:"center",children:[l(),K.jsxs(G,{flexDirection:"column",gap:"1",children:[n&&K.jsx(GU,{children:K.jsx(me,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:n})}),K.jsx(KU,{children:K.jsx(me,{as:"div",variant:"normal",fontWeight:"medium",color:"text50",children:i})})]})]}),o&&K.jsx(YU,{"aria-label":"Close",asChild:!0,children:K.jsx(sv,{icon:eu,size:"xs"})})]})})},M5=()=>{const t=y.useContext(O5);return e=>{const r={...e,id:Math.random().toString(36).slice(2,12),onOpenChange:n=>{n||t(i=>(i.delete(r),new Set([...i])))}};t(n=>new Set([...n,r]))}};var tz="_15pztn1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _15pztn0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11od fyvr12s1 fyvr12o1 fyvr12wj fyvr128 fyvr11h0",rz="_15pztn2";y.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",name:f,rows:u,resize:d=!1,...h}=t;return K.jsx(el,{description:s,disabled:o,display:"grid",id:a??f,label:l,labelLocation:c,children:K.jsx(G,{as:r,autoComplete:n,spellCheck:"false",className:Mn(tz,d&&rz),disabled:o,id:a??f,name:f,ref:e,rows:u,borderRadius:i,...h})})});var nz=ur({defaultClassName:"bnrreb5 bnrreb0 fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"bnrreb6",sm:"bnrreb7",md:"bnrreb8",lg:"bnrreb9",xl:"bnrreba"},borderRadius:{circle:"bnrrebb bnrreb1 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"bnrrebc bnrreb2 fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"bnrrebd bnrreb3 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"bnrrebe bnrreb4 fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]}),iz="bnrrebf",sz="bnrrebh bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11sj fyvr128 fyvr15o fyvr11h0";const oz=y.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:i,src:s,symbol:o,size:a="md",...l}=t;return K.jsx(G,{className:Mn(r,nz({borderRadius:e,size:a})),style:i,flexShrink:"0",...l,children:s?K.jsx(aB,{className:iz,disableAnimation:n,src:s}):K.jsx(me,{className:sz,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})}),[hv,Dse]=ln("Tooltip",[Ac]);Ac();const az="TooltipProvider";hv(az);const N5="Tooltip";hv(N5);const lz="TooltipPortal";hv(lz,{forceMount:void 0});hv(N5,{isInside:!1});/** - * @remix-run/router v1.18.0 +Defaulting to \`null\`.`}const d5="Radio",[ZB,h5]=ln(d5),[e$,t$]=ZB(d5),r$=y.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:i=!1,required:s,disabled:o,value:a="on",onCheck:l,...c}=t,[f,u]=y.useState(null),d=Rt(e,m=>u(m)),h=y.useRef(!1),p=f?!!f.closest("form"):!0;return y.createElement(e$,{scope:r,checked:i,disabled:o},y.createElement(Ue.button,Gt({type:"button",role:"radio","aria-checked":i,"data-state":v5(i),"data-disabled":o?"":void 0,disabled:o,value:a},c,{ref:d,onClick:ke(t.onClick,m=>{i||l==null||l(),p&&(h.current=m.isPropagationStopped(),h.current||m.stopPropagation())})})),p&&y.createElement(s$,{control:f,bubbles:!h.current,name:n,value:a,checked:i,required:s,disabled:o,style:{transform:"translateX(-100%)"}}))}),n$="RadioIndicator",i$=y.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...i}=t,s=t$(n$,r);return y.createElement(so,{present:n||s.checked},y.createElement(Ue.span,Gt({"data-state":v5(s.checked),"data-disabled":s.disabled?"":void 0},i,{ref:e})))}),s$=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=y.useRef(null),o=X0(r),a=Z0(e);return y.useEffect(()=>{const l=s.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(d)}},[o,r,n]),y.createElement("input",Gt({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 v5(t){return t?"checked":"unchecked"}const o$=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],p5="RadioGroup",[a$,Rse]=ln(p5,[Ac,h5]),y5=Ac(),m5=h5(),[l$,c$]=a$(p5),f$=y.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:f=!0,onValueChange:u,...d}=t,h=y5(r),p=Yg(c),[m,x]=Qs({prop:s,defaultProp:i,onChange:u});return y.createElement(l$,{scope:r,name:n,required:o,disabled:a,value:m,onValueChange:x},y.createElement(Vj,Gt({asChild:!0},h,{orientation:l,dir:p,loop:f}),y.createElement(Ue.div,Gt({role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:p},d,{ref:e}))))}),u$="RadioGroupItem",d$=y.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...i}=t,s=c$(u$,r),o=s.disabled||n,a=y5(r),l=m5(r),c=y.useRef(null),f=Rt(e,c),u=s.value===i.value,d=y.useRef(!1);return y.useEffect(()=>{const h=m=>{o$.includes(m.key)&&(d.current=!0)},p=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",p),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",p)}},[]),y.createElement(N8,Gt({asChild:!0},a,{focusable:!o,active:u}),y.createElement(r$,Gt({disabled:o,required:s.required,checked:u},l,i,{name:s.name,ref:f,onCheck:()=>s.onValueChange(i.value),onKeyDown:ke(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:ke(i.onFocus,()=>{var h;d.current&&((h=c.current)===null||h===void 0||h.click())})})))}),h$=y.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,i=m5(r);return y.createElement(i$,Gt({},i,n,{ref:e}))}),v$=f$,p$=d$,y$=h$;var m$=ur({defaultClassName:"io59uy3 io59uy0 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr1so fyvr1uk fyvr1wg fyvr1yc fyvr12nd fyvr12g1 fyvr121d fyvr128p fyvr12nj fyvr12g7 fyvr121j fyvr128v fyvr11od fyvr12v7 fyvr12v3 fyvr12vz fyvr12vr _4efw240",variantClassNames:{size:{sm:"io59uy4 io59uy1 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy5 io59uy2 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]}),g$=ur({defaultClassName:"io59uy8 io59uy7 io59uy6 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12s1",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]});const x$=t=>{const{id:e,label:r,size:n="sm",value:i,disabled:s}=t;return Y.jsx(G,{alignItems:"center",children:Y.jsx(el,{disabled:s,display:"flex",id:e,label:r,labelLocation:"right",children:Y.jsx(p$,{className:m$({size:n}),value:i,id:e,disabled:s,children:Y.jsx(y$,{className:g$({size:n})})})})})};y.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:i="2",name:s,options:o,size:a="sm",...l}=t;return Y.jsx(v$,{disabled:n,name:s,ref:e,...l,children:Y.jsx(G,{flexDirection:r,gap:i,children:o.map(({label:c,value:f,disabled:u})=>Y.jsx(x$,{id:`${s}-${f}`,label:c,size:a,value:f,disabled:u},f))})})});function pA(t,[e,r]){return Math.min(r,Math.max(e,t))}const lx=y.forwardRef((t,e)=>y.createElement(Ue.span,Te({},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}}))),b$=[" ","Enter","ArrowUp","ArrowDown"],w$=[" ","Enter"],lv="Select",[cv,cx,E$]=tv(lv),[Sc,_se]=ln(lv,[E$,Ec]),fx=Ec(),[A$,rl]=Sc(lv),[S$,C$]=Sc(lv),k$=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:l,dir:c,name:f,autoComplete:u,disabled:d,required:h}=t,p=fx(e),[m,x]=y.useState(null),[b,w]=y.useState(null),[E,R]=y.useState(!1),N=Yg(c),[I=!1,F]=Qs({prop:n,defaultProp:i,onChange:s}),[j,U]=Qs({prop:o,defaultProp:a,onChange:l}),K=y.useRef(null),J=m?!!m.closest("form"):!0,[Z,M]=y.useState(new Set),v=Array.from(Z).map(T=>T.props.value).join(";");return y.createElement(Tj,p,y.createElement(A$,{required:h,scope:e,trigger:m,onTriggerChange:x,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:E,onValueNodeHasChildrenChange:R,contentId:$o(),value:j,onValueChange:U,open:I,onOpenChange:F,dir:N,triggerPointerDownPosRef:K,disabled:d},y.createElement(cv.Provider,{scope:e},y.createElement(S$,{scope:t.__scopeSelect,onNativeOptionAdd:y.useCallback(T=>{M(S=>new Set(S).add(T))},[]),onNativeOptionRemove:y.useCallback(T=>{M(S=>{const C=new Set(S);return C.delete(T),C})},[])},r)),J?y.createElement(b5,{key:v,"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:u,value:j,onChange:T=>U(T.target.value),disabled:d},j===void 0?y.createElement("option",{value:""}):null,Array.from(Z)):null))},T$="SelectTrigger",P$=y.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...i}=t,s=fx(r),o=rl(T$,r),a=o.disabled||n,l=Rt(e,o.onTriggerChange),c=cx(r),[f,u,d]=w5(p=>{const m=c().filter(w=>!w.disabled),x=m.find(w=>w.value===o.value),b=E5(m,p,x);b!==void 0&&o.onValueChange(b.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return y.createElement(Pj,Te({asChild:!0},s),y.createElement(Ue.button,Te({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":x5(o.value)?"":void 0},i,{ref:l,onClick:ke(i.onClick,p=>{p.currentTarget.focus()}),onPointerDown:ke(i.onPointerDown,p=>{const m=p.target;m.hasPointerCapture(p.pointerId)&&m.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&(h(),o.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)},p.preventDefault())}),onKeyDown:ke(i.onKeyDown,p=>{const m=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&u(p.key),!(m&&p.key===" ")&&b$.includes(p.key)&&(h(),p.preventDefault())})})))}),R$="SelectValue",_$=y.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,children:s,placeholder:o="",...a}=t,l=rl(R$,r),{onValueNodeHasChildrenChange:c}=l,f=s!==void 0,u=Rt(e,l.onValueNodeChange);return Kn(()=>{c(f)},[c,f]),y.createElement(Ue.span,Te({},a,{ref:u,style:{pointerEvents:"none"}}),x5(l.value)?y.createElement(y.Fragment,null,o):s)}),I$=y.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...i}=t;return y.createElement(Ue.span,Te({"aria-hidden":!0},i,{ref:e}),n||"▼")}),lc="SelectContent",O$=y.forwardRef((t,e)=>{const r=rl(lc,t.__scopeSelect),[n,i]=y.useState();if(Kn(()=>{i(new DocumentFragment)},[]),!r.open){const s=n;return s?io.createPortal(y.createElement(g5,{scope:t.__scopeSelect},y.createElement(cv.Slot,{scope:t.__scopeSelect},y.createElement("div",null,t.children))),s):null}return y.createElement(M$,Te({},t,{ref:e}))}),Rs=10,[g5,fv]=Sc(lc),M$=y.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:m,avoidCollisions:x,...b}=t,w=rl(lc,r),[E,R]=y.useState(null),[N,I]=y.useState(null),F=Rt(e,V=>R(V)),[j,U]=y.useState(null),[K,J]=y.useState(null),Z=cx(r),[M,v]=y.useState(!1),T=y.useRef(!1);y.useEffect(()=>{if(E)return L8(E)},[E]),v8();const S=y.useCallback(V=>{const[H,...X]=Z().map(te=>te.ref.current),[le]=X.slice(-1),ne=document.activeElement;for(const te of V)if(te===ne||(te==null||te.scrollIntoView({block:"nearest"}),te===H&&N&&(N.scrollTop=0),te===le&&N&&(N.scrollTop=N.scrollHeight),te==null||te.focus(),document.activeElement!==ne))return},[Z,N]),C=y.useCallback(()=>S([j,E]),[S,j,E]);y.useEffect(()=>{M&&C()},[M,C]);const{onOpenChange:P,triggerPointerDownPosRef:O}=w;y.useEffect(()=>{if(E){let V={x:0,y:0};const H=le=>{var ne,te,Ie,pe;V={x:Math.abs(Math.round(le.pageX)-((ne=(te=O.current)===null||te===void 0?void 0:te.x)!==null&&ne!==void 0?ne:0)),y:Math.abs(Math.round(le.pageY)-((Ie=(pe=O.current)===null||pe===void 0?void 0:pe.y)!==null&&Ie!==void 0?Ie:0))}},X=le=>{V.x<=10&&V.y<=10?le.preventDefault():E.contains(le.target)||P(!1),document.removeEventListener("pointermove",H),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",H),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",H),document.removeEventListener("pointerup",X,{capture:!0})}}},[E,P,O]),y.useEffect(()=>{const V=()=>P(!1);return window.addEventListener("blur",V),window.addEventListener("resize",V),()=>{window.removeEventListener("blur",V),window.removeEventListener("resize",V)}},[P]);const[L,A]=w5(V=>{const H=Z().filter(ne=>!ne.disabled),X=H.find(ne=>ne.ref.current===document.activeElement),le=E5(H,V,X);le&&setTimeout(()=>le.ref.current.focus())}),g=y.useCallback((V,H,X)=>{const le=!T.current&&!X;(w.value!==void 0&&w.value===H||le)&&(U(V),le&&(T.current=!0))},[w.value]),_=y.useCallback(()=>E==null?void 0:E.focus(),[E]),B=y.useCallback((V,H,X)=>{const le=!T.current&&!X;(w.value!==void 0&&w.value===H||le)&&J(V)},[w.value]),k=n==="popper"?yA:N$,$=k===yA?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:m,avoidCollisions:x}:{};return y.createElement(g5,{scope:r,content:E,viewport:N,onViewportChange:I,itemRefCallback:g,selectedItem:j,onItemLeave:_,itemTextRefCallback:B,focusSelectedItem:C,selectedItemText:K,position:n,isPositioned:M,searchRef:L},y.createElement(ix,{as:oc,allowPinchZoom:!0},y.createElement(p8,{asChild:!0,trapped:w.open,onMountAutoFocus:V=>{V.preventDefault()},onUnmountAutoFocus:ke(i,V=>{var H;(H=w.trigger)===null||H===void 0||H.focus({preventScroll:!0}),V.preventDefault()})},y.createElement(Qg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:V=>V.preventDefault(),onDismiss:()=>w.onOpenChange(!1)},y.createElement(k,Te({role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:V=>V.preventDefault()},b,$,{onPlaced:()=>v(!0),ref:F,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:ke(b.onKeyDown,V=>{const H=V.ctrlKey||V.altKey||V.metaKey;if(V.key==="Tab"&&V.preventDefault(),!H&&V.key.length===1&&A(V.key),["ArrowUp","ArrowDown","Home","End"].includes(V.key)){let le=Z().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);if(["ArrowUp","End"].includes(V.key)&&(le=le.slice().reverse()),["ArrowUp","ArrowDown"].includes(V.key)){const ne=V.target,te=le.indexOf(ne);le=le.slice(te+1)}setTimeout(()=>S(le)),V.preventDefault()}})}))))))}),N$=y.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...i}=t,s=rl(lc,r),o=fv(lc,r),[a,l]=y.useState(null),[c,f]=y.useState(null),u=Rt(e,F=>f(F)),d=cx(r),h=y.useRef(!1),p=y.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:b,focusSelectedItem:w}=o,E=y.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&c&&m&&x&&b){const F=s.trigger.getBoundingClientRect(),j=c.getBoundingClientRect(),U=s.valueNode.getBoundingClientRect(),K=b.getBoundingClientRect();if(s.dir!=="rtl"){const ne=K.left-j.left,te=U.left-ne,Ie=F.left-te,pe=F.width+Ie,Se=Math.max(pe,j.width),sr=window.innerWidth-Rs,Xe=pA(te,[Rs,sr-Se]);a.style.minWidth=pe+"px",a.style.left=Xe+"px"}else{const ne=j.right-K.right,te=window.innerWidth-U.right-ne,Ie=window.innerWidth-F.right-te,pe=F.width+Ie,Se=Math.max(pe,j.width),sr=window.innerWidth-Rs,Xe=pA(te,[Rs,sr-Se]);a.style.minWidth=pe+"px",a.style.right=Xe+"px"}const J=d(),Z=window.innerHeight-Rs*2,M=m.scrollHeight,v=window.getComputedStyle(c),T=parseInt(v.borderTopWidth,10),S=parseInt(v.paddingTop,10),C=parseInt(v.borderBottomWidth,10),P=parseInt(v.paddingBottom,10),O=T+S+M+P+C,L=Math.min(x.offsetHeight*5,O),A=window.getComputedStyle(m),g=parseInt(A.paddingTop,10),_=parseInt(A.paddingBottom,10),B=F.top+F.height/2-Rs,k=Z-B,$=x.offsetHeight/2,V=x.offsetTop+$,H=T+S+V,X=O-H;if(H<=B){const ne=x===J[J.length-1].ref.current;a.style.bottom="0px";const te=c.clientHeight-m.offsetTop-m.offsetHeight,Ie=Math.max(k,$+(ne?_:0)+te+C),pe=H+Ie;a.style.height=pe+"px"}else{const ne=x===J[0].ref.current;a.style.top="0px";const Ie=Math.max(B,T+m.offsetTop+(ne?g:0)+$)+X;a.style.height=Ie+"px",m.scrollTop=H-B+m.offsetTop}a.style.margin=`${Rs}px 0`,a.style.minHeight=L+"px",a.style.maxHeight=Z+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[d,s.trigger,s.valueNode,a,c,m,x,b,s.dir,n]);Kn(()=>E(),[E]);const[R,N]=y.useState();Kn(()=>{c&&N(window.getComputedStyle(c).zIndex)},[c]);const I=y.useCallback(F=>{F&&p.current===!0&&(E(),w==null||w(),p.current=!1)},[E,w]);return y.createElement(D$,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:I},y.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R}},y.createElement(Ue.div,Te({},i,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),yA=y.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=Rs,...s}=t,o=fx(r);return y.createElement(Rj,Te({},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)"}}))}),[D$,L$]=Sc(lc,{}),mA="SelectViewport",j$=y.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=fv(mA,r),s=L$(mA,r),o=Rt(e,i.onViewportChange),a=y.useRef(0);return y.createElement(y.Fragment,null,y.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}"}}),y.createElement(cv.Slot,{scope:r},y.createElement(Ue.div,Te({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:ke(n.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:u}=s;if(u!=null&&u.current&&f){const d=Math.abs(a.current-c.scrollTop);if(d>0){const h=window.innerHeight-Rs*2,p=parseFloat(f.style.minHeight),m=parseFloat(f.style.height),x=Math.max(p,m);if(x0?E:0,f.style.justifyContent="flex-end")}}}a.current=c.scrollTop})}))))}),F$="SelectGroup",[B$,Ise]=Sc(F$),$$=y.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=$o();return y.createElement(B$,{scope:r,id:i},y.createElement(Ue.div,Te({role:"group","aria-labelledby":i},n,{ref:e})))}),By="SelectItem",[U$,z$]=Sc(By),V$=y.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:s,...o}=t,a=rl(By,r),l=fv(By,r),c=a.value===n,[f,u]=y.useState(s??""),[d,h]=y.useState(!1),p=Rt(e,b=>{var w;return(w=l.itemRefCallback)===null||w===void 0?void 0:w.call(l,b,n,i)}),m=$o(),x=()=>{i||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return y.createElement(U$,{scope:r,value:n,disabled:i,textId:m,isSelected:c,onItemTextChange:y.useCallback(b=>{u(w=>{var E;return w||((E=b==null?void 0:b.textContent)!==null&&E!==void 0?E:"").trim()})},[])},y.createElement(cv.ItemSlot,{scope:r,value:n,disabled:i,textValue:f},y.createElement(Ue.div,Te({role:"option","aria-labelledby":m,"data-highlighted":d?"":void 0,"aria-selected":c&&d,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},o,{ref:p,onFocus:ke(o.onFocus,()=>h(!0)),onBlur:ke(o.onBlur,()=>h(!1)),onPointerUp:ke(o.onPointerUp,x),onPointerMove:ke(o.onPointerMove,b=>{if(i){var w;(w=l.onItemLeave)===null||w===void 0||w.call(l)}else b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ke(o.onPointerLeave,b=>{if(b.currentTarget===document.activeElement){var w;(w=l.onItemLeave)===null||w===void 0||w.call(l)}}),onKeyDown:ke(o.onKeyDown,b=>{var w;((w=l.searchRef)===null||w===void 0?void 0:w.current)!==""&&b.key===" "||(w$.includes(b.key)&&x(),b.key===" "&&b.preventDefault())})}))))}),bd="SelectItemText",q$=y.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,...s}=t,o=rl(bd,r),a=fv(bd,r),l=z$(bd,r),c=C$(bd,r),[f,u]=y.useState(null),d=Rt(e,b=>u(b),l.onItemTextChange,b=>{var w;return(w=a.itemTextRefCallback)===null||w===void 0?void 0:w.call(a,b,l.value,l.disabled)}),h=f==null?void 0:f.textContent,p=y.useMemo(()=>y.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},h),[l.disabled,l.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:x}=c;return Kn(()=>(m(p),()=>x(p)),[m,x,p]),y.createElement(y.Fragment,null,y.createElement(Ue.span,Te({id:l.textId},s,{ref:d})),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?io.createPortal(s.children,o.valueNode):null)});function x5(t){return t===""||t===void 0}const b5=y.forwardRef((t,e)=>{const{value:r,...n}=t,i=y.useRef(null),s=Rt(e,i),o=X0(r);return y.useEffect(()=>{const a=i.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&f){const u=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(u)}},[o,r]),y.createElement(lx,{asChild:!0},y.createElement("select",Te({},n,{ref:s,defaultValue:r})))});b5.displayName="BubbleSelect";function w5(t){const e=In(t),r=y.useRef(""),n=y.useRef(0),i=y.useCallback(o=>{const a=r.current+o;e(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),s=y.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,s]}function E5(t,e,r){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,s=r?t.indexOf(r):-1;let o=H$(t,Math.max(s,0));i.length===1&&(o=o.filter(c=>c!==r));const l=o.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==r?l:void 0}function H$(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const W$=k$,G$=P$,K$=_$,Y$=I$,Q$=O$,J$=j$,X$=$$,Z$=V$,eU=q$;var tU="gohwum1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 gohwum0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11od fyvr11hc fyvr11f4 fyvr12s1 fyvr118c fyvr11jw fyvr11n4 fyvr12v7 fyvr12o1",rU=ur({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"gohwum6 gohwum2 fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"gohwum7 gohwum3 fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"gohwum8 gohwum4 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]}),nU="gohwuma gohwum9 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11tv fyvr12s1 fyvr11nl",iU="gohwume _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 gohwumd fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12ws fyvr12wt fyvr12wm fyvr12wn fyvr11h0 fyvr11jw fyvr11ko fyvr12v7 fyvr12v3 fyvr12s1 fyvr12w1 fyvr12vr";const sU=y.forwardRef(({children:t,className:e,...r},n)=>Y.jsx(Z$,{className:Mn(iU,e),...r,ref:n,children:Y.jsx(eU,{children:t})})),uv=y.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:i,label:s="",description:o,labelLocation:a="hidden",name:l,options:c,placeholder:f,...u}=t;return Y.jsx(el,{disabled:n,display:"grid",id:i??l,label:s,labelLocation:a,description:o,whiteSpace:"nowrap",children:Y.jsxs(W$,{disabled:n,name:l,...u,children:[Y.jsxs(G$,{id:i??l,className:Mn(tU,rU({borderRadius:r})),ref:e,children:[Y.jsx(K$,{placeholder:f}),Y.jsx(G,{as:Y$,display:"inline-flex",children:Y.jsx(l8,{})})]}),Y.jsx(Q$,{className:nU,children:Y.jsx(J$,{children:Y.jsx(X$,{children:c.map(({value:d,label:h,...p})=>Y.jsx(sU,{value:d,...p,children:h},d))})})})]})})});y.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:i="Search",name:s="search",value:o,...a}=t,l=o?Y.jsx(ov,{icon:eu,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return Y.jsx(Mr,{ref:e,name:s,leftIcon:tL,controls:r||l,placeholder:i,value:o,onChange:c=>n==null?void 0:n(c),...a})});var oU=ur({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});const Rn=y.forwardRef((t,e)=>{const{size:r="md",...n}=t;return Y.jsx(G,{className:oU({size:r}),color:"text50",ref:e,...n,children:Y.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[Y.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),Y.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});y.forwardRef(({children:t},e)=>Y.jsx(G,{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 A5="Switch",[aU,Ose]=ln(A5),[lU,cU]=aU(A5),fU=y.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,d]=y.useState(null),h=Rt(e,w=>d(w)),p=y.useRef(!1),m=u?!!u.closest("form"):!0,[x=!1,b]=Qs({prop:i,defaultProp:s,onChange:c});return y.createElement(lU,{scope:r,checked:x,disabled:a},y.createElement(Ue.button,Gt({type:"button",role:"switch","aria-checked":x,"aria-required":o,"data-state":S5(x),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:h,onClick:ke(t.onClick,w=>{b(E=>!E),m&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})})),m&&y.createElement(hU,{control:u,bubbles:!p.current,name:n,value:l,checked:x,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),uU="SwitchThumb",dU=y.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,i=cU(uU,r);return y.createElement(Ue.span,Gt({"data-state":S5(i.checked),"data-disabled":i.disabled?"":void 0},n,{ref:e}))}),hU=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=y.useRef(null),o=X0(r),a=Z0(e);return y.useEffect(()=>{const l=s.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(d)}},[o,r,n]),y.createElement("input",Gt({type:"checkbox","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function S5(t){return t?"checked":"unchecked"}const vU=fU,pU=dU;var yU="_1lp2u8e1 _1lp2u8e0 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr1ss fyvr1uo fyvr1wk fyvr1yg fyvr11t1 fyvr11hw fyvr12v7 fyvr12o1 _4efw240",mU="_1lp2u8e3 _1lp2u8e2 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ho fyvr1ko fyvr1oo fyvr1k fyvr140 fyvr11o1";const gU=t=>{const{disabled:e,label:r,labelLocation:n="left",description:i,id:s,name:o,...a}=t;return Y.jsx(el,{disabled:e,display:"flex",id:s??o,label:r,labelLocation:n,description:i,whiteSpace:"nowrap",children:Y.jsx(vU,{className:yU,disabled:e,...a,children:Y.jsx(G,{position:"relative",width:"full",height:"full",children:Y.jsx(pU,{className:mU})})})})};ur({defaultClassName:"nwwh3z8",variantClassNames:{variant:{pill:"nwwh3z9",line:"nwwh3za nwwh3z1 fyvr11g0"},active:{true:"nwwh3zb nwwh3z2 fyvr12w5",false:"nwwh3zc"},disabled:{true:"nwwh3zd nwwh3z3 fyvr12vp"}},defaultVariants:{},compoundVariants:[[{active:!0,variant:"pill"},"nwwh3z4 fyvr11u7 fyvr12sj"],[{active:!1,variant:"pill"},"nwwh3z5 fyvr11od fyvr12s7"],[{active:!0,variant:"line"},"nwwh3z6 fyvr12s1"],[{active:!1,variant:"line"},"nwwh3z7 fyvr12s7"]]});const C5="Tabs",[xU,Mse]=ln(C5,[Ac]);Ac();xU(C5);var bU="_1ppqbnx1 _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc _1ppqbnx0 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n9";y.forwardRef((t,e)=>{const{icon:r,label:n,...i}=t;return Y.jsxs(G,{className:bU,ref:e,background:"buttonGlass",color:"text80",...i,children:[r&&Y.jsx(r,{size:"xs"}),Y.jsx(me,{children:n})]})});const k5="ToastProvider",[ux,wU,EU]=tv("Toast"),[T5,Nse]=ln("Toast",[EU]),[AU,dv]=T5(k5),P5=t=>{const{__scopeToast:e,label:r="Notification",duration:n=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:o}=t,[a,l]=y.useState(null),[c,f]=y.useState(0),u=y.useRef(!1),d=y.useRef(!1);return y.createElement(ux.Provider,{scope:e},y.createElement(AU,{scope:e,label:r,duration:n,swipeDirection:i,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:y.useCallback(()=>f(h=>h+1),[]),onToastRemove:y.useCallback(()=>f(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:u,isClosePausedRef:d},o))};P5.propTypes={label(t){if(t.label&&typeof t.label=="string"&&!t.label.trim()){const e=`Invalid prop \`label\` supplied to \`${k5}\`. Expected non-empty \`string\`.`;return new Error(e)}return null}};const SU="ToastViewport",CU=["F8"],$y="toast.viewportPause",Uy="toast.viewportResume",kU=y.forwardRef((t,e)=>{const{__scopeToast:r,hotkey:n=CU,label:i="Notifications ({hotkey})",...s}=t,o=dv(SU,r),a=wU(r),l=y.useRef(null),c=y.useRef(null),f=y.useRef(null),u=y.useRef(null),d=Rt(e,u,o.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=o.toastCount>0;y.useEffect(()=>{const x=b=>{var w;n.every(R=>b[R]||b.code===R)&&((w=u.current)===null||w===void 0||w.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),y.useEffect(()=>{const x=l.current,b=u.current;if(p&&x&&b){const w=()=>{if(!o.isClosePausedRef.current){const I=new CustomEvent($y);b.dispatchEvent(I),o.isClosePausedRef.current=!0}},E=()=>{if(o.isClosePausedRef.current){const I=new CustomEvent(Uy);b.dispatchEvent(I),o.isClosePausedRef.current=!1}},R=I=>{!x.contains(I.relatedTarget)&&E()},N=()=>{x.contains(document.activeElement)||E()};return x.addEventListener("focusin",w),x.addEventListener("focusout",R),x.addEventListener("pointermove",w),x.addEventListener("pointerleave",N),window.addEventListener("blur",w),window.addEventListener("focus",E),()=>{x.removeEventListener("focusin",w),x.removeEventListener("focusout",R),x.removeEventListener("pointermove",w),x.removeEventListener("pointerleave",N),window.removeEventListener("blur",w),window.removeEventListener("focus",E)}}},[p,o.isClosePausedRef]);const m=y.useCallback(({tabbingDirection:x})=>{const w=a().map(E=>{const R=E.ref.current,N=[R,...VU(R)];return x==="forwards"?N:N.reverse()});return(x==="forwards"?w.reverse():w).flat()},[a]);return y.useEffect(()=>{const x=u.current;if(x){const b=w=>{const E=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!E){const j=document.activeElement,U=w.shiftKey;if(w.target===x&&U){var N;(N=c.current)===null||N===void 0||N.focus();return}const Z=m({tabbingDirection:U?"backwards":"forwards"}),M=Z.findIndex(v=>v===j);if(O1(Z.slice(M+1)))w.preventDefault();else{var I,F;U?(I=c.current)===null||I===void 0||I.focus():(F=f.current)===null||F===void 0||F.focus()}}};return x.addEventListener("keydown",b),()=>x.removeEventListener("keydown",b)}},[a,m]),y.createElement(RL,{ref:l,role:"region","aria-label":i.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:p?void 0:"none"}},p&&y.createElement(gA,{ref:c,onFocusFromOutsideViewport:()=>{const x=m({tabbingDirection:"forwards"});O1(x)}}),y.createElement(ux.Slot,{scope:r},y.createElement(Ue.ol,Te({tabIndex:-1},s,{ref:d}))),p&&y.createElement(gA,{ref:f,onFocusFromOutsideViewport:()=>{const x=m({tabbingDirection:"backwards"});O1(x)}}))}),TU="ToastFocusProxy",gA=y.forwardRef((t,e)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...i}=t,s=dv(TU,r);return y.createElement(lx,Te({"aria-hidden":!0,tabIndex:0},i,{ref:e,style:{position:"fixed"},onFocus:o=>{var a;const l=o.relatedTarget;!((a=s.viewport)!==null&&a!==void 0&&a.contains(l))&&n()}}))}),hv="Toast",PU="toast.swipeStart",RU="toast.swipeMove",_U="toast.swipeCancel",IU="toast.swipeEnd",OU=y.forwardRef((t,e)=>{const{forceMount:r,open:n,defaultOpen:i,onOpenChange:s,...o}=t,[a=!0,l]=Qs({prop:n,defaultProp:i,onChange:s});return y.createElement(so,{present:r||a},y.createElement(R5,Te({open:a},o,{ref:e,onClose:()=>l(!1),onPause:In(t.onPause),onResume:In(t.onResume),onSwipeStart:ke(t.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ke(t.onSwipeMove,c=>{const{x:f,y:u}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${u}px`)}),onSwipeCancel:ke(t.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ke(t.onSwipeEnd,c=>{const{x:f,y:u}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${u}px`),l(!1)})})))}),[MU,NU]=T5(hv,{onClose(){}}),R5=y.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:f,onSwipeMove:u,onSwipeCancel:d,onSwipeEnd:h,...p}=t,m=dv(hv,r),[x,b]=y.useState(null),w=Rt(e,v=>b(v)),E=y.useRef(null),R=y.useRef(null),N=i||m.duration,I=y.useRef(0),F=y.useRef(N),j=y.useRef(0),{onToastAdd:U,onToastRemove:K}=m,J=In(()=>{var v;(x==null?void 0:x.contains(document.activeElement))&&((v=m.viewport)===null||v===void 0||v.focus()),o()}),Z=y.useCallback(v=>{!v||v===1/0||(window.clearTimeout(j.current),I.current=new Date().getTime(),j.current=window.setTimeout(J,v))},[J]);y.useEffect(()=>{const v=m.viewport;if(v){const T=()=>{Z(F.current),c==null||c()},S=()=>{const C=new Date().getTime()-I.current;F.current=F.current-C,window.clearTimeout(j.current),l==null||l()};return v.addEventListener($y,S),v.addEventListener(Uy,T),()=>{v.removeEventListener($y,S),v.removeEventListener(Uy,T)}}},[m.viewport,N,l,c,Z]),y.useEffect(()=>{s&&!m.isClosePausedRef.current&&Z(N)},[s,N,m.isClosePausedRef,Z]),y.useEffect(()=>(U(),()=>K()),[U,K]);const M=y.useMemo(()=>x?O5(x):null,[x]);return m.viewport?y.createElement(y.Fragment,null,M&&y.createElement(DU,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},M),y.createElement(MU,{scope:r,onClose:J},io.createPortal(y.createElement(ux.ItemSlot,{scope:r},y.createElement(PL,{asChild:!0,onEscapeKeyDown:ke(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||J(),m.isFocusedToastEscapeKeyDownRef.current=!1})},y.createElement(Ue.li,Te({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection},p,{ref:w,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ke(t.onKeyDown,v=>{v.key==="Escape"&&(a==null||a(v.nativeEvent),v.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,J()))}),onPointerDown:ke(t.onPointerDown,v=>{v.button===0&&(E.current={x:v.clientX,y:v.clientY})}),onPointerMove:ke(t.onPointerMove,v=>{if(!E.current)return;const T=v.clientX-E.current.x,S=v.clientY-E.current.y,C=!!R.current,P=["left","right"].includes(m.swipeDirection),O=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,L=P?O(0,T):0,A=P?0:O(0,S),g=v.pointerType==="touch"?10:2,_={x:L,y:A},B={originalEvent:v,delta:_};C?(R.current=_,wd(RU,u,B,{discrete:!1})):xA(_,m.swipeDirection,g)?(R.current=_,wd(PU,f,B,{discrete:!1}),v.target.setPointerCapture(v.pointerId)):(Math.abs(T)>g||Math.abs(S)>g)&&(E.current=null)}),onPointerUp:ke(t.onPointerUp,v=>{const T=R.current,S=v.target;if(S.hasPointerCapture(v.pointerId)&&S.releasePointerCapture(v.pointerId),R.current=null,E.current=null,T){const C=v.currentTarget,P={originalEvent:v,delta:T};xA(T,m.swipeDirection,m.swipeThreshold)?wd(IU,h,P,{discrete:!0}):wd(_U,d,P,{discrete:!0}),C.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})))),m.viewport))):null});R5.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${hv}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const DU=t=>{const{__scopeToast:e,children:r,...n}=t,i=dv(hv,e),[s,o]=y.useState(!1),[a,l]=y.useState(!1);return UU(()=>o(!0)),y.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:y.createElement(I8,{asChild:!0},y.createElement(lx,n,s&&y.createElement(y.Fragment,null,i.label," ",r)))},LU=y.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return y.createElement(Ue.div,Te({},n,{ref:e}))}),jU=y.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return y.createElement(Ue.div,Te({},n,{ref:e}))}),FU="ToastAction",BU=y.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?y.createElement(I5,{altText:r,asChild:!0},y.createElement(_5,Te({},n,{ref:e}))):null});BU.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${FU}\``)}};const $U="ToastClose",_5=y.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,i=NU($U,r);return y.createElement(I5,{asChild:!0},y.createElement(Ue.button,Te({type:"button"},n,{ref:e,onClick:ke(t.onClick,i.onClose)})))}),I5=y.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...i}=t;return y.createElement(Ue.div,Te({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},i,{ref:e}))});function O5(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),zU(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(...O5(n))}}),e}function wd(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?Hg(i,s):i.dispatchEvent(s)}const xA=(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 UU(t=()=>{}){const e=In(t);Kn(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function zU(t){return t.nodeType===t.ELEMENT_NODE}function VU(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 O1(t){const e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}const qU=P5,HU=kU,WU=OU,GU=LU,KU=jU,YU=_5;var QU="_6wut8v1 _6wut8v0 fyvr12wp fyvr12wj fyvr11hs fyvr1qo fyvr1mo fyvr128 fyvr118g fyvr11i4 fyvr11h0",JU=ur({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});const M5=y.createContext(null),XU=t=>{const{children:e,...r}=t,[n,i]=y.useState(new Set);return Y.jsxs(qU,{...r,children:[Y.jsxs(M5.Provider,{value:i,children:[e,Y.jsx(qg,{children:Array.from(n).map(s=>Y.jsx(ez,{...s},s.id))})]}),Y.jsx(ZU,{})]})},ZU=()=>Y.jsx(HU,{className:QU}),ez=t=>{const{id:e,variant:r,title:n,description:i,icon:s,isDismissible:o=!0,...a}=t,l=()=>{if(s)return Y.jsx(s,{});switch(r){case"success":return Y.jsx(G,{background:"positive",color:"black",borderRadius:"circle",width:"8",height:"8",placeItems:"center",minWidth:"0",flexShrink:"0",children:Y.jsx(Wg,{})});case"error":return Y.jsx(G,{background:"negative",color:"black",borderRadius:"circle",width:"8",height:"8",placeItems:"center",minWidth:"0",flexShrink:"0",children:Y.jsx(eu,{})});default:return null}};return Y.jsx(WU,{className:JU({variant:r}),open:!0,forceMount:!0,asChild:!0,...a,children:Y.jsxs(ID,{as:_a.li,layoutId:e,layout:!0,initial:{x:"100%"},animate:{x:0},exit:{y:"100%",opacity:0},borderRadius:"md",background:"buttonGlass",backdropFilter:"blur",position:"relative",width:"full",justifyContent:"space-between",children:[Y.jsxs(G,{gap:"3",alignItems:"center",children:[l(),Y.jsxs(G,{flexDirection:"column",gap:"1",children:[n&&Y.jsx(GU,{children:Y.jsx(me,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:n})}),Y.jsx(KU,{children:Y.jsx(me,{as:"div",variant:"normal",fontWeight:"medium",color:"text50",children:i})})]})]}),o&&Y.jsx(YU,{"aria-label":"Close",asChild:!0,children:Y.jsx(ov,{icon:eu,size:"xs"})})]})})},N5=()=>{const t=y.useContext(M5);return e=>{const r={...e,id:Math.random().toString(36).slice(2,12),onOpenChange:n=>{n||t(i=>(i.delete(r),new Set([...i])))}};t(n=>new Set([...n,r]))}};var tz="_15pztn1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _15pztn0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11od fyvr12s1 fyvr12o1 fyvr12wj fyvr128 fyvr11h0",rz="_15pztn2";y.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",name:f,rows:u,resize:d=!1,...h}=t;return Y.jsx(el,{description:s,disabled:o,display:"grid",id:a??f,label:l,labelLocation:c,children:Y.jsx(G,{as:r,autoComplete:n,spellCheck:"false",className:Mn(tz,d&&rz),disabled:o,id:a??f,name:f,ref:e,rows:u,borderRadius:i,...h})})});var nz=ur({defaultClassName:"bnrreb5 bnrreb0 fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"bnrreb6",sm:"bnrreb7",md:"bnrreb8",lg:"bnrreb9",xl:"bnrreba"},borderRadius:{circle:"bnrrebb bnrreb1 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"bnrrebc bnrreb2 fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"bnrrebd bnrreb3 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"bnrrebe bnrreb4 fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]}),iz="bnrrebf",sz="bnrrebh bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11sj fyvr128 fyvr15o fyvr11h0";const oz=y.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:i,src:s,symbol:o,size:a="md",...l}=t;return Y.jsx(G,{className:Mn(r,nz({borderRadius:e,size:a})),style:i,flexShrink:"0",...l,children:s?Y.jsx(aB,{className:iz,disableAnimation:n,src:s}):Y.jsx(me,{className:sz,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})}),[vv,Dse]=ln("Tooltip",[Ec]);Ec();const az="TooltipProvider";vv(az);const D5="Tooltip";vv(D5);const lz="TooltipPortal";vv(lz,{forceMount:void 0});vv(D5,{isInside:!1});/** + * @remix-run/router v1.19.0 * * Copyright (c) Remix Software Inc. * @@ -112,10 +112,10 @@ Defaulting to \`null\`.`}const u5="Radio",[ZB,d5]=ln(u5),[e$,t$]=ZB(u5),r$=y.for * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Xt(){return Xt=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function za(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function fz(){return Math.random().toString(36).substr(2,8)}function wE(t,e){return{usr:t.state,key:t.key,idx:e}}function iu(t,e,r,n){return r===void 0&&(r=null),Xt({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?bs(e):e,{state:r,key:e&&e.key||n||fz()})}function Du(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function bs(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function uz(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:s=!1}=n,o=i.history,a=vr.Pop,l=null,c=f();c==null&&(c=0,o.replaceState(Xt({},o.state,{idx:c}),""));function f(){return(o.state||{idx:null}).idx}function u(){a=vr.Pop;let x=f(),b=x==null?null:x-c;c=x,l&&l({action:a,location:m.location,delta:b})}function d(x,b){a=vr.Push;let w=iu(m.location,x,b);r&&r(w,x),c=f()+1;let A=wE(w,c),R=m.createHref(w);try{o.pushState(A,"",R)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;i.location.assign(R)}s&&l&&l({action:a,location:m.location,delta:1})}function h(x,b){a=vr.Replace;let w=iu(m.location,x,b);r&&r(w,x),c=f();let A=wE(w,c),R=m.createHref(w);o.replaceState(A,"",R),s&&l&&l({action:a,location:m.location,delta:0})}function p(x){let b=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof x=="string"?x:Du(x);return w=w.replace(/ $/,"%20"),qe(b,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,b)}let m={get action(){return a},get location(){return t(i,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(bE,u),l=x,()=>{i.removeEventListener(bE,u),l=null}},createHref(x){return e(i,x)},createURL:p,encodeLocation(x){let b=p(x);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:d,replace:h,go(x){return o.go(x)}};return m}var $t;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})($t||($t={}));const dz=new Set(["lazy","caseSensitive","path","id","index","children"]);function hz(t){return t.index===!0}function su(t,e,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),t.map((i,s)=>{let o=[...r,String(s)],a=typeof i.id=="string"?i.id:o.join("-");if(qe(i.index!==!0||!i.children,"Cannot specify children on an index route"),qe(!n[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),hz(i)){let l=Xt({},i,e(i),{id:a});return n[a]=l,l}else{let l=Xt({},i,e(i),{id:a,children:void 0});return n[a]=l,i.children&&(l.children=su(i.children,e,o,n)),l}})}function ga(t,e,r){return r===void 0&&(r="/"),nh(t,e,r,!1)}function nh(t,e,r,n){let i=typeof e=="string"?bs(e):e,s=Lu(i.pathname||"/",r);if(s==null)return null;let o=D5(t);pz(o);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(qe(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=Oa([n,l.relativePath]),f=r.concat(l);s.children&&s.children.length>0&&(qe(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),D5(s.children,e,f,c)),!(s.path==null&&!s.index)&&e.push({path:c,score:Az(c,s.index),routesMeta:f})};return t.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of L5(s.path))i(s,o,l)}),e}function L5(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return i?[s,""]:[s];let o=L5(n.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function pz(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:Ez(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const yz=/^:[\w-]+$/,mz=3,gz=2,xz=1,bz=10,wz=-2,AE=t=>t==="*";function Az(t,e){let r=t.split("/"),n=r.length;return r.some(AE)&&(n+=wz),e&&(n+=gz),r.filter(i=>!AE(i)).reduce((i,s)=>i+(yz.test(s)?mz:s===""?xz:bz),n)}function Ez(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function Sz(t,e,r){r===void 0&&(r=!1);let{routesMeta:n}=t,i={},s="/",o=[];for(let a=0;a{let{paramName:d,isOptional:h}=f;if(d==="*"){let m=a[u]||"";o=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const p=a[u];return h&&!p?c[d]=void 0:c[d]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:t}}function Cz(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),za(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function kz(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return za(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Lu(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function Tz(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?bs(t):t;return{pathname:r?r.startsWith("/")?r:Pz(r,e):e,search:Oz(n),hash:Mz(i)}}function Pz(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function O1(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function j5(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function Rz(t,e){let r=j5(t);return e?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function _z(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=bs(t):(i=Xt({},t),qe(!i.pathname||!i.pathname.includes("?"),O1("?","pathname","search",i)),qe(!i.pathname||!i.pathname.includes("#"),O1("#","pathname","hash",i)),qe(!i.search||!i.search.includes("#"),O1("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=r;else{let u=e.length-1;if(!n&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),u-=1;i.pathname=d.join("/")}a=u>=0?e[u]:"/"}let l=Tz(i,a),c=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}const Oa=t=>t.join("/").replace(/\/\/+/g,"/"),Iz=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Oz=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Mz=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class ux{constructor(e,r,n,i){i===void 0&&(i=!1),this.status=e,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function vv(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const F5=["post","put","patch","delete"],Nz=new Set(F5),Dz=["get",...F5],Lz=new Set(Dz),jz=new Set([301,302,303,307,308]),Fz=new Set([307,308]),M1={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Bz={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Wc={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},dx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$z=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),B5="remix-router-transitions";function Uz(t){const e=t.window?t.window:typeof window<"u"?window:void 0,r=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",n=!r;qe(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(t.mapRouteProperties)i=t.mapRouteProperties;else if(t.detectErrorBoundary){let z=t.detectErrorBoundary;i=H=>({hasErrorBoundary:z(H)})}else i=$z;let s={},o=su(t.routes,i,void 0,s),a,l=t.basename||"/",c=t.unstable_dataStrategy||Wz,f=t.unstable_patchRoutesOnMiss,u=Xt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},t.future),d=null,h=new Set,p=null,m=null,x=null,b=t.hydrationData!=null,w=ga(o,t.history.location,l),A=null;if(w==null&&!f){let z=hn(404,{pathname:t.history.location.pathname}),{matches:H,route:W}=ME(o);w=H,A={[W.id]:z}}w&&f&&!t.hydrationData&&dt(w,o,t.history.location.pathname).active&&(w=null);let R;if(!w)R=!1,w=[];else if(w.some(z=>z.route.lazy))R=!1;else if(!w.some(z=>z.route.loader))R=!0;else if(u.v7_partialHydration){let z=t.hydrationData?t.hydrationData.loaderData:null,H=t.hydrationData?t.hydrationData.errors:null,W=re=>re.route.loader?typeof re.route.loader=="function"&&re.route.loader.hydrate===!0?!1:z&&z[re.route.id]!==void 0||H&&H[re.route.id]!==void 0:!0;if(H){let re=w.findIndex(fe=>H[fe.route.id]!==void 0);R=w.slice(0,re+1).every(W)}else R=w.every(W)}else R=t.hydrationData!=null;let N,I={historyAction:t.history.action,location:t.history.location,matches:w,initialized:R,navigation:M1,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||A,fetchers:new Map,blockers:new Map},F=vr.Pop,j=!1,U,Y=!1,J=new Map,Z=null,M=!1,v=!1,T=[],S=[],C=new Map,P=0,O=-1,L=new Map,E=new Set,g=new Map,_=new Map,B=new Set,k=new Map,$=new Map,V=new Map,q=!1;function X(){if(d=t.history.listen(z=>{let{action:H,location:W,delta:re}=z;if(q){q=!1;return}za($.size===0||re!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let fe=zi({currentLocation:I.location,nextLocation:W,historyAction:H});if(fe&&re!=null){q=!0,t.history.go(re*-1),ot(fe,{state:"blocked",location:W,proceed(){ot(fe,{state:"proceeding",proceed:void 0,reset:void 0,location:W}),t.history.go(re)},reset(){let ve=new Map(I.blockers);ve.set(fe,Wc),te({blockers:ve})}});return}return sr(H,W)}),r){sV(e,J);let z=()=>oV(e,J);e.addEventListener("pagehide",z),Z=()=>e.removeEventListener("pagehide",z)}return I.initialized||sr(vr.Pop,I.location,{initialHydration:!0}),N}function le(){d&&d(),Z&&Z(),h.clear(),U&&U.abort(),I.fetchers.forEach((z,H)=>ri(H)),I.blockers.forEach((z,H)=>wt(H))}function ne(z){return h.add(z),()=>h.delete(z)}function te(z,H){H===void 0&&(H={}),I=Xt({},I,z);let W=[],re=[];u.v7_fetcherPersist&&I.fetchers.forEach((fe,ve)=>{fe.state==="idle"&&(B.has(ve)?re.push(ve):W.push(ve))}),[...h].forEach(fe=>fe(I,{deletedFetchers:re,unstable_viewTransitionOpts:H.viewTransitionOpts,unstable_flushSync:H.flushSync===!0})),u.v7_fetcherPersist&&(W.forEach(fe=>I.fetchers.delete(fe)),re.forEach(fe=>ri(fe)))}function Ie(z,H,W){var re,fe;let{flushSync:ve}=W===void 0?{}:W,Ee=I.actionData!=null&&I.navigation.formMethod!=null&&_i(I.navigation.formMethod)&&I.navigation.state==="loading"&&((re=z.state)==null?void 0:re._isRedirect)!==!0,ae;H.actionData?Object.keys(H.actionData).length>0?ae=H.actionData:ae=null:Ee?ae=I.actionData:ae=null;let ge=H.loaderData?IE(I.loaderData,H.loaderData,H.matches||[],H.errors):I.loaderData,we=I.blockers;we.size>0&&(we=new Map(we),we.forEach((Be,Ve)=>we.set(Ve,Wc)));let ye=j===!0||I.navigation.formMethod!=null&&_i(I.navigation.formMethod)&&((fe=z.state)==null?void 0:fe._isRedirect)!==!0;a&&(o=a,a=void 0),M||F===vr.Pop||(F===vr.Push?t.history.push(z,z.state):F===vr.Replace&&t.history.replace(z,z.state));let Ce;if(F===vr.Pop){let Be=J.get(I.location.pathname);Be&&Be.has(z.pathname)?Ce={currentLocation:I.location,nextLocation:z}:J.has(z.pathname)&&(Ce={currentLocation:z,nextLocation:I.location})}else if(Y){let Be=J.get(I.location.pathname);Be?Be.add(z.pathname):(Be=new Set([z.pathname]),J.set(I.location.pathname,Be)),Ce={currentLocation:I.location,nextLocation:z}}te(Xt({},H,{actionData:ae,loaderData:ge,historyAction:F,location:z,initialized:!0,navigation:M1,revalidation:"idle",restoreScrollPosition:Et(z,H.matches||I.matches),preventScrollReset:ye,blockers:we}),{viewTransitionOpts:Ce,flushSync:ve===!0}),F=vr.Pop,j=!1,Y=!1,M=!1,v=!1,T=[],S=[]}async function pe(z,H){if(typeof z=="number"){t.history.go(z);return}let W=Uy(I.location,I.matches,l,u.v7_prependBasename,z,u.v7_relativeSplatPath,H==null?void 0:H.fromRouteId,H==null?void 0:H.relative),{path:re,submission:fe,error:ve}=SE(u.v7_normalizeFormMethod,!1,W,H),Ee=I.location,ae=iu(I.location,re,H&&H.state);ae=Xt({},ae,t.history.encodeLocation(ae));let ge=H&&H.replace!=null?H.replace:void 0,we=vr.Push;ge===!0?we=vr.Replace:ge===!1||fe!=null&&_i(fe.formMethod)&&fe.formAction===I.location.pathname+I.location.search&&(we=vr.Replace);let ye=H&&"preventScrollReset"in H?H.preventScrollReset===!0:void 0,Ce=(H&&H.unstable_flushSync)===!0,Be=zi({currentLocation:Ee,nextLocation:ae,historyAction:we});if(Be){ot(Be,{state:"blocked",location:ae,proceed(){ot(Be,{state:"proceeding",proceed:void 0,reset:void 0,location:ae}),pe(z,H)},reset(){let Ve=new Map(I.blockers);Ve.set(Be,Wc),te({blockers:Ve})}});return}return await sr(we,ae,{submission:fe,pendingError:ve,preventScrollReset:ye,replace:H&&H.replace,enableViewTransition:H&&H.unstable_viewTransition,flushSync:Ce})}function Se(){if(ft(),te({revalidation:"loading"}),I.navigation.state!=="submitting"){if(I.navigation.state==="idle"){sr(I.historyAction,I.location,{startUninterruptedRevalidation:!0});return}sr(F||I.historyAction,I.navigation.location,{overrideNavigation:I.navigation})}}async function sr(z,H,W){U&&U.abort(),U=null,F=z,M=(W&&W.startUninterruptedRevalidation)===!0,Ss(I.location,I.matches),j=(W&&W.preventScrollReset)===!0,Y=(W&&W.enableViewTransition)===!0;let re=a||o,fe=W&&W.overrideNavigation,ve=ga(re,H,l),Ee=(W&&W.flushSync)===!0,ae=dt(ve,re,H.pathname);if(ae.active&&ae.matches&&(ve=ae.matches),!ve){let{error:Fe,notFoundMatches:Lt,route:ht}=ut(H.pathname);Ie(H,{matches:Lt,loaderData:{},errors:{[ht.id]:Fe}},{flushSync:Ee});return}if(I.initialized&&!v&&Xz(I.location,H)&&!(W&&W.submission&&_i(W.submission.formMethod))){Ie(H,{matches:ve},{flushSync:Ee});return}U=new AbortController;let ge=fl(t.history,H,U.signal,W&&W.submission),we;if(W&&W.pendingError)we=[Nl(ve).route.id,{type:$t.error,error:W.pendingError}];else if(W&&W.submission&&_i(W.submission.formMethod)){let Fe=await Xe(ge,H,W.submission,ve,ae.active,{replace:W.replace,flushSync:Ee});if(Fe.shortCircuited)return;if(Fe.pendingActionResult){let[Lt,ht]=Fe.pendingActionResult;if(Fn(ht)&&vv(ht.error)&&ht.error.status===404){U=null,Ie(H,{matches:Fe.matches,loaderData:{},errors:{[Lt]:ht.error}});return}}ve=Fe.matches||ve,we=Fe.pendingActionResult,fe=N1(H,W.submission),Ee=!1,ae.active=!1,ge=fl(t.history,ge.url,ge.signal)}let{shortCircuited:ye,matches:Ce,loaderData:Be,errors:Ve}=await lt(ge,H,ve,ae.active,fe,W&&W.submission,W&&W.fetcherSubmission,W&&W.replace,W&&W.initialHydration===!0,Ee,we);ye||(U=null,Ie(H,Xt({matches:Ce||ve},OE(we),{loaderData:Be,errors:Ve})))}async function Xe(z,H,W,re,fe,ve){ve===void 0&&(ve={}),ft();let Ee=nV(H,W);if(te({navigation:Ee},{flushSync:ve.flushSync===!0}),fe){let we=await ni(re,H.pathname,z.signal);if(we.type==="aborted")return{shortCircuited:!0};if(we.type==="error"){let{boundaryId:ye,error:Ce}=at(H.pathname,we);return{matches:we.partialMatches,pendingActionResult:[ye,{type:$t.error,error:Ce}]}}else if(we.matches)re=we.matches;else{let{notFoundMatches:ye,error:Ce,route:Be}=ut(H.pathname);return{matches:ye,pendingActionResult:[Be.id,{type:$t.error,error:Ce}]}}}let ae,ge=ff(re,H);if(!ge.route.action&&!ge.route.lazy)ae={type:$t.error,error:hn(405,{method:z.method,pathname:H.pathname,routeId:ge.route.id})};else if(ae=(await Nn("action",z,[ge],re))[0],z.signal.aborted)return{shortCircuited:!0};if(Sa(ae)){let we;return ve&&ve.replace!=null?we=ve.replace:we=PE(ae.response.headers.get("Location"),new URL(z.url),l)===I.location.pathname+I.location.search,await it(z,ae,{submission:W,replace:we}),{shortCircuited:!0}}if(Ea(ae))throw hn(400,{type:"defer-action"});if(Fn(ae)){let we=Nl(re,ge.route.id);return(ve&&ve.replace)!==!0&&(F=vr.Push),{matches:re,pendingActionResult:[we.route.id,ae]}}return{matches:re,pendingActionResult:[ge.route.id,ae]}}async function lt(z,H,W,re,fe,ve,Ee,ae,ge,we,ye){let Ce=fe||N1(H,ve),Be=ve||Ee||LE(Ce),Ve=!M&&(!u.v7_partialHydration||!ge);if(re){if(Ve){let jt=ti(ye);te(Xt({navigation:Ce},jt!==void 0?{actionData:jt}:{}),{flushSync:we})}let Oe=await ni(W,H.pathname,z.signal);if(Oe.type==="aborted")return{shortCircuited:!0};if(Oe.type==="error"){let{boundaryId:jt,error:zr}=at(H.pathname,Oe);return{matches:Oe.partialMatches,loaderData:{},errors:{[jt]:zr}}}else if(Oe.matches)W=Oe.matches;else{let{error:jt,notFoundMatches:zr,route:St}=ut(H.pathname);return{matches:zr,loaderData:{},errors:{[St.id]:jt}}}}let Fe=a||o,[Lt,ht]=CE(t.history,I,W,Be,H,u.v7_partialHydration&&ge===!0,u.v7_skipActionErrorRevalidation,v,T,S,B,g,E,Fe,l,ye);if(wi(Oe=>!(W&&W.some(jt=>jt.route.id===Oe))||Lt&&Lt.some(jt=>jt.route.id===Oe)),O=++P,Lt.length===0&&ht.length===0){let Oe=xt();return Ie(H,Xt({matches:W,loaderData:{},errors:ye&&Fn(ye[1])?{[ye[0]]:ye[1].error}:null},OE(ye),Oe?{fetchers:new Map(I.fetchers)}:{}),{flushSync:we}),{shortCircuited:!0}}if(Ve){let Oe={};if(!re){Oe.navigation=Ce;let jt=ti(ye);jt!==void 0&&(Oe.actionData=jt)}ht.length>0&&(Oe.fetchers=ct(ht)),te(Oe,{flushSync:we})}ht.forEach(Oe=>{C.has(Oe.key)&&Ye(Oe.key),Oe.controller&&C.set(Oe.key,Oe.controller)});let Cs=()=>ht.forEach(Oe=>Ye(Oe.key));U&&U.signal.addEventListener("abort",Cs);let{loaderResults:ii,fetcherResults:Vi}=await mt(I.matches,W,Lt,ht,z);if(z.signal.aborted)return{shortCircuited:!0};U&&U.signal.removeEventListener("abort",Cs),ht.forEach(Oe=>C.delete(Oe.key));let Hi=NE([...ii,...Vi]);if(Hi){if(Hi.idx>=Lt.length){let Oe=ht[Hi.idx-Lt.length].key;E.add(Oe)}return await it(z,Hi.result,{replace:ae}),{shortCircuited:!0}}let{loaderData:qi,errors:wn}=_E(I,W,Lt,ii,ye,ht,Vi,k);k.forEach((Oe,jt)=>{Oe.subscribe(zr=>{(zr||Oe.done)&&k.delete(jt)})}),u.v7_partialHydration&&ge&&I.errors&&Object.entries(I.errors).filter(Oe=>{let[jt]=Oe;return!Lt.some(zr=>zr.route.id===jt)}).forEach(Oe=>{let[jt,zr]=Oe;wn=Object.assign(wn||{},{[jt]:zr})});let lo=xt(),co=bt(O),fo=lo||co||ht.length>0;return Xt({matches:W,loaderData:qi,errors:wn},fo?{fetchers:new Map(I.fetchers)}:{})}function ti(z){if(z&&!Fn(z[1]))return{[z[0]]:z[1].data};if(I.actionData)return Object.keys(I.actionData).length===0?null:I.actionData}function ct(z){return z.forEach(H=>{let W=I.fetchers.get(H.key),re=Gc(void 0,W?W.data:void 0);I.fetchers.set(H.key,re)}),new Map(I.fetchers)}function tt(z,H,W,re){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");C.has(z)&&Ye(z);let fe=(re&&re.unstable_flushSync)===!0,ve=a||o,Ee=Uy(I.location,I.matches,l,u.v7_prependBasename,W,u.v7_relativeSplatPath,H,re==null?void 0:re.relative),ae=ga(ve,Ee,l),ge=dt(ae,ve,Ee);if(ge.active&&ge.matches&&(ae=ge.matches),!ae){Ge(z,H,hn(404,{pathname:Ee}),{flushSync:fe});return}let{path:we,submission:ye,error:Ce}=SE(u.v7_normalizeFormMethod,!0,Ee,re);if(Ce){Ge(z,H,Ce,{flushSync:fe});return}let Be=ff(ae,we);if(j=(re&&re.preventScrollReset)===!0,ye&&_i(ye.formMethod)){As(z,H,we,Be,ae,ge.active,fe,ye);return}g.set(z,{routeId:H,path:we}),Rt(z,H,we,Be,ae,ge.active,fe,ye)}async function As(z,H,W,re,fe,ve,Ee,ae){ft(),g.delete(z);function ge(St){if(!St.route.action&&!St.route.lazy){let Dn=hn(405,{method:ae.formMethod,pathname:W,routeId:H});return Ge(z,H,Dn,{flushSync:Ee}),!0}return!1}if(!ve&&ge(re))return;let we=I.fetchers.get(z);Xr(z,iV(ae,we),{flushSync:Ee});let ye=new AbortController,Ce=fl(t.history,W,ye.signal,ae);if(ve){let St=await ni(fe,W,Ce.signal);if(St.type==="aborted")return;if(St.type==="error"){let{error:Dn}=at(W,St);Ge(z,H,Dn,{flushSync:Ee});return}else if(St.matches){if(fe=St.matches,re=ff(fe,W),ge(re))return}else{Ge(z,H,hn(404,{pathname:W}),{flushSync:Ee});return}}C.set(z,ye);let Be=P,Fe=(await Nn("action",Ce,[re],fe))[0];if(Ce.signal.aborted){C.get(z)===ye&&C.delete(z);return}if(u.v7_fetcherPersist&&B.has(z)){if(Sa(Fe)||Fn(Fe)){Xr(z,go(void 0));return}}else{if(Sa(Fe))if(C.delete(z),O>Be){Xr(z,go(void 0));return}else return E.add(z),Xr(z,Gc(ae)),it(Ce,Fe,{fetcherSubmission:ae});if(Fn(Fe)){Ge(z,H,Fe.error);return}}if(Ea(Fe))throw hn(400,{type:"defer-action"});let Lt=I.navigation.location||I.location,ht=fl(t.history,Lt,ye.signal),Cs=a||o,ii=I.navigation.state!=="idle"?ga(Cs,I.navigation.location,l):I.matches;qe(ii,"Didn't find any matches after fetcher action");let Vi=++P;L.set(z,Vi);let Hi=Gc(ae,Fe.data);I.fetchers.set(z,Hi);let[qi,wn]=CE(t.history,I,ii,ae,Lt,!1,u.v7_skipActionErrorRevalidation,v,T,S,B,g,E,Cs,l,[re.route.id,Fe]);wn.filter(St=>St.key!==z).forEach(St=>{let Dn=St.key,Ew=I.fetchers.get(Dn),AP=Gc(void 0,Ew?Ew.data:void 0);I.fetchers.set(Dn,AP),C.has(Dn)&&Ye(Dn),St.controller&&C.set(Dn,St.controller)}),te({fetchers:new Map(I.fetchers)});let lo=()=>wn.forEach(St=>Ye(St.key));ye.signal.addEventListener("abort",lo);let{loaderResults:co,fetcherResults:fo}=await mt(I.matches,ii,qi,wn,ht);if(ye.signal.aborted)return;ye.signal.removeEventListener("abort",lo),L.delete(z),C.delete(z),wn.forEach(St=>C.delete(St.key));let Oe=NE([...co,...fo]);if(Oe){if(Oe.idx>=qi.length){let St=wn[Oe.idx-qi.length].key;E.add(St)}return it(ht,Oe.result)}let{loaderData:jt,errors:zr}=_E(I,I.matches,qi,co,void 0,wn,fo,k);if(I.fetchers.has(z)){let St=go(Fe.data);I.fetchers.set(z,St)}bt(Vi),I.navigation.state==="loading"&&Vi>O?(qe(F,"Expected pending action"),U&&U.abort(),Ie(I.navigation.location,{matches:ii,loaderData:jt,errors:zr,fetchers:new Map(I.fetchers)})):(te({errors:zr,loaderData:IE(I.loaderData,jt,ii,zr),fetchers:new Map(I.fetchers)}),v=!1)}async function Rt(z,H,W,re,fe,ve,Ee,ae){let ge=I.fetchers.get(z);Xr(z,Gc(ae,ge?ge.data:void 0),{flushSync:Ee});let we=new AbortController,ye=fl(t.history,W,we.signal);if(ve){let Fe=await ni(fe,W,ye.signal);if(Fe.type==="aborted")return;if(Fe.type==="error"){let{error:Lt}=at(W,Fe);Ge(z,H,Lt,{flushSync:Ee});return}else if(Fe.matches)fe=Fe.matches,re=ff(fe,W);else{Ge(z,H,hn(404,{pathname:W}),{flushSync:Ee});return}}C.set(z,we);let Ce=P,Ve=(await Nn("loader",ye,[re],fe))[0];if(Ea(Ve)&&(Ve=await H5(Ve,ye.signal,!0)||Ve),C.get(z)===we&&C.delete(z),!ye.signal.aborted){if(B.has(z)){Xr(z,go(void 0));return}if(Sa(Ve))if(O>Ce){Xr(z,go(void 0));return}else{E.add(z),await it(ye,Ve);return}if(Fn(Ve)){Ge(z,H,Ve.error);return}qe(!Ea(Ve),"Unhandled fetcher deferred data"),Xr(z,go(Ve.data))}}async function it(z,H,W){let{submission:re,fetcherSubmission:fe,replace:ve}=W===void 0?{}:W;H.response.headers.has("X-Remix-Revalidate")&&(v=!0);let Ee=H.response.headers.get("Location");qe(Ee,"Expected a Location header on the redirect Response"),Ee=PE(Ee,new URL(z.url),l);let ae=iu(I.location,Ee,{_isRedirect:!0});if(r){let Ve=!1;if(H.response.headers.has("X-Remix-Reload-Document"))Ve=!0;else if(dx.test(Ee)){const Fe=t.history.createURL(Ee);Ve=Fe.origin!==e.location.origin||Lu(Fe.pathname,l)==null}if(Ve){ve?e.location.replace(Ee):e.location.assign(Ee);return}}U=null;let ge=ve===!0?vr.Replace:vr.Push,{formMethod:we,formAction:ye,formEncType:Ce}=I.navigation;!re&&!fe&&we&&ye&&Ce&&(re=LE(I.navigation));let Be=re||fe;if(Fz.has(H.response.status)&&Be&&_i(Be.formMethod))await sr(ge,ae,{submission:Xt({},Be,{formAction:Ee}),preventScrollReset:j});else{let Ve=N1(ae,re);await sr(ge,ae,{overrideNavigation:Ve,fetcherSubmission:fe,preventScrollReset:j})}}async function Nn(z,H,W,re){try{let fe=await Gz(c,z,H,W,re,s,i);return await Promise.all(fe.map((ve,Ee)=>{if(eV(ve)){let ae=ve.result;return{type:$t.redirect,response:Qz(ae,H,W[Ee].route.id,re,l,u.v7_relativeSplatPath)}}return Yz(ve)}))}catch(fe){return W.map(()=>({type:$t.error,error:fe}))}}async function mt(z,H,W,re,fe){let[ve,...Ee]=await Promise.all([W.length?Nn("loader",fe,W,H):[],...re.map(ae=>{if(ae.matches&&ae.match&&ae.controller){let ge=fl(t.history,ae.path,ae.controller.signal);return Nn("loader",ge,[ae.match],ae.matches).then(we=>we[0])}else return Promise.resolve({type:$t.error,error:hn(404,{pathname:ae.path})})})]);return await Promise.all([DE(z,W,ve,ve.map(()=>fe.signal),!1,I.loaderData),DE(z,re.map(ae=>ae.match),Ee,re.map(ae=>ae.controller?ae.controller.signal:null),!0)]),{loaderResults:ve,fetcherResults:Ee}}function ft(){v=!0,T.push(...wi()),g.forEach((z,H)=>{C.has(H)&&(S.push(H),Ye(H))})}function Xr(z,H,W){W===void 0&&(W={}),I.fetchers.set(z,H),te({fetchers:new Map(I.fetchers)},{flushSync:(W&&W.flushSync)===!0})}function Ge(z,H,W,re){re===void 0&&(re={});let fe=Nl(I.matches,H);ri(z),te({errors:{[fe.route.id]:W},fetchers:new Map(I.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function gt(z){return u.v7_fetcherPersist&&(_.set(z,(_.get(z)||0)+1),B.has(z)&&B.delete(z)),I.fetchers.get(z)||Bz}function ri(z){let H=I.fetchers.get(z);C.has(z)&&!(H&&H.state==="loading"&&L.has(z))&&Ye(z),g.delete(z),L.delete(z),E.delete(z),B.delete(z),I.fetchers.delete(z)}function _t(z){if(u.v7_fetcherPersist){let H=(_.get(z)||0)-1;H<=0?(_.delete(z),B.add(z)):_.set(z,H)}else ri(z);te({fetchers:new Map(I.fetchers)})}function Ye(z){let H=C.get(z);qe(H,"Expected fetch controller: "+z),H.abort(),C.delete(z)}function Ui(z){for(let H of z){let W=gt(H),re=go(W.data);I.fetchers.set(H,re)}}function xt(){let z=[],H=!1;for(let W of E){let re=I.fetchers.get(W);qe(re,"Expected fetcher: "+W),re.state==="loading"&&(E.delete(W),z.push(W),H=!0)}return Ui(z),H}function bt(z){let H=[];for(let[W,re]of L)if(re0}function Es(z,H){let W=I.blockers.get(z)||Wc;return $.get(z)!==H&&$.set(z,H),W}function wt(z){I.blockers.delete(z),$.delete(z)}function ot(z,H){let W=I.blockers.get(z)||Wc;qe(W.state==="unblocked"&&H.state==="blocked"||W.state==="blocked"&&H.state==="blocked"||W.state==="blocked"&&H.state==="proceeding"||W.state==="blocked"&&H.state==="unblocked"||W.state==="proceeding"&&H.state==="unblocked","Invalid blocker state transition: "+W.state+" -> "+H.state);let re=new Map(I.blockers);re.set(z,H),te({blockers:re})}function zi(z){let{currentLocation:H,nextLocation:W,historyAction:re}=z;if($.size===0)return;$.size>1&&za(!1,"A router only supports one blocker at a time");let fe=Array.from($.entries()),[ve,Ee]=fe[fe.length-1],ae=I.blockers.get(ve);if(!(ae&&ae.state==="proceeding")&&Ee({currentLocation:H,nextLocation:W,historyAction:re}))return ve}function ut(z){let H=hn(404,{pathname:z}),W=a||o,{matches:re,route:fe}=ME(W);return wi(),{notFoundMatches:re,route:fe,error:H}}function at(z,H){return{boundaryId:Nl(H.partialMatches).route.id,error:hn(400,{type:"route-discovery",pathname:z,message:H.error!=null&&"message"in H.error?H.error:String(H.error)})}}function wi(z){let H=[];return k.forEach((W,re)=>{(!z||z(re))&&(W.cancel(),H.push(re),k.delete(re))}),H}function It(z,H,W){if(p=z,x=H,m=W||null,!b&&I.navigation===M1){b=!0;let re=Et(I.location,I.matches);re!=null&&te({restoreScrollPosition:re})}return()=>{p=null,x=null,m=null}}function At(z,H){return m&&m(z,H.map(re=>vz(re,I.loaderData)))||z.key}function Ss(z,H){if(p&&x){let W=At(z,H);p[W]=x()}}function Et(z,H){if(p){let W=At(z,H),re=p[W];if(typeof re=="number")return re}return null}function dt(z,H,W){if(f)if(z){let re=z[z.length-1].route;if(re.path&&(re.path==="*"||re.path.endsWith("/*")))return{active:!0,matches:nh(H,W,l,!0)}}else return{active:!0,matches:nh(H,W,l,!0)||[]};return{active:!1,matches:null}}async function ni(z,H,W){let re=z,fe=re.length>0?re[re.length-1].route:null;for(;;){let ve=a==null,Ee=a||o;try{await qz(f,H,re,Ee,s,i,V,W)}catch(ye){return{type:"error",error:ye,partialMatches:re}}finally{ve&&(o=[...o])}if(W.aborted)return{type:"aborted"};let ae=ga(Ee,H,l),ge=!1;if(ae){let ye=ae[ae.length-1].route;if(ye.index)return{type:"success",matches:ae};if(ye.path&&ye.path.length>0)if(ye.path==="*")ge=!0;else return{type:"success",matches:ae}}let we=nh(Ee,H,l,!0);if(!we||re.map(ye=>ye.route.id).join("-")===we.map(ye=>ye.route.id).join("-"))return{type:"success",matches:ge?ae:null};if(re=we,fe=re[re.length-1].route,fe.path==="*")return{type:"success",matches:re}}}function Ot(z){s={},a=su(z,i,void 0,s)}function Mt(z,H){let W=a==null;U5(z,H,a||o,s,i),W&&(o=[...o],te({}))}return N={get basename(){return l},get future(){return u},get state(){return I},get routes(){return o},get window(){return e},initialize:X,subscribe:ne,enableScrollRestoration:It,navigate:pe,fetch:tt,revalidate:Se,createHref:z=>t.history.createHref(z),encodeLocation:z=>t.history.encodeLocation(z),getFetcher:gt,deleteFetcher:_t,dispose:le,getBlocker:Es,deleteBlocker:wt,patchRoutes:Mt,_internalFetchControllers:C,_internalActiveDeferreds:k,_internalSetRoutes:Ot},N}function zz(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function Uy(t,e,r,n,i,s,o,a){let l,c;if(o){l=[];for(let u of e)if(l.push(u),u.route.id===o){c=u;break}}else l=e,c=e[e.length-1];let f=_z(i||".",Rz(l,s),Lu(t.pathname,r)||t.pathname,a==="path");return i==null&&(f.search=t.search,f.hash=t.hash),(i==null||i===""||i===".")&&c&&c.route.index&&!hx(f.search)&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(f.pathname=f.pathname==="/"?r:Oa([r,f.pathname])),Du(f)}function SE(t,e,r,n){if(!n||!zz(n))return{path:r};if(n.formMethod&&!rV(n.formMethod))return{path:r,error:hn(405,{method:n.formMethod})};let i=()=>({path:r,error:hn(400,{type:"invalid-body"})}),s=n.formMethod||"get",o=t?s.toUpperCase():s.toLowerCase(),a=z5(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!_i(o))return i();let d=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((h,p)=>{let[m,x]=p;return""+h+m+"="+x+` -`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:d}}}else if(n.formEncType==="application/json"){if(!_i(o))return i();try{let d=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:a,formEncType:n.formEncType,formData:void 0,json:d,text:void 0}}}catch{return i()}}}qe(typeof FormData=="function","FormData is not available in this environment");let l,c;if(n.formData)l=zy(n.formData),c=n.formData;else if(n.body instanceof FormData)l=zy(n.body),c=n.body;else if(n.body instanceof URLSearchParams)l=n.body,c=RE(l);else if(n.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(n.body),c=RE(l)}catch{return i()}let f={formMethod:o,formAction:a,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(_i(f.formMethod))return{path:r,submission:f};let u=bs(r);return e&&u.search&&hx(u.search)&&l.append("index",""),u.search="?"+l,{path:Du(u),submission:f}}function Vz(t,e){let r=t;if(e){let n=t.findIndex(i=>i.route.id===e);n>=0&&(r=t.slice(0,n))}return r}function CE(t,e,r,n,i,s,o,a,l,c,f,u,d,h,p,m){let x=m?Fn(m[1])?m[1].error:m[1].data:void 0,b=t.createURL(e.location),w=t.createURL(i),A=m&&Fn(m[1])?m[0]:void 0,R=A?Vz(r,A):r,N=m?m[1].statusCode:void 0,I=o&&N&&N>=400,F=R.filter((U,Y)=>{let{route:J}=U;if(J.lazy)return!0;if(J.loader==null)return!1;if(s)return typeof J.loader!="function"||J.loader.hydrate?!0:e.loaderData[J.id]===void 0&&(!e.errors||e.errors[J.id]===void 0);if(Hz(e.loaderData,e.matches[Y],U)||l.some(v=>v===U.route.id))return!0;let Z=e.matches[Y],M=U;return kE(U,Xt({currentUrl:b,currentParams:Z.params,nextUrl:w,nextParams:M.params},n,{actionResult:x,actionStatus:N,defaultShouldRevalidate:I?!1:a||b.pathname+b.search===w.pathname+w.search||b.search!==w.search||$5(Z,M)}))}),j=[];return u.forEach((U,Y)=>{if(s||!r.some(T=>T.route.id===U.routeId)||f.has(Y))return;let J=ga(h,U.path,p);if(!J){j.push({key:Y,routeId:U.routeId,path:U.path,matches:null,match:null,controller:null});return}let Z=e.fetchers.get(Y),M=ff(J,U.path),v=!1;d.has(Y)?v=!1:c.includes(Y)?v=!0:Z&&Z.state!=="idle"&&Z.data===void 0?v=a:v=kE(M,Xt({currentUrl:b,currentParams:e.matches[e.matches.length-1].params,nextUrl:w,nextParams:r[r.length-1].params},n,{actionResult:x,actionStatus:N,defaultShouldRevalidate:I?!1:a})),v&&j.push({key:Y,routeId:U.routeId,path:U.path,matches:J,match:M,controller:new AbortController})}),[F,j]}function Hz(t,e,r){let n=!e||r.route.id!==e.route.id,i=t[r.route.id]===void 0;return n||i}function $5(t,e){let r=t.route.path;return t.pathname!==e.pathname||r!=null&&r.endsWith("*")&&t.params["*"]!==e.params["*"]}function kE(t,e){if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate(e);if(typeof r=="boolean")return r}return e.defaultShouldRevalidate}async function qz(t,e,r,n,i,s,o,a){let l=[e,...r.map(c=>c.route.id)].join("-");try{let c=o.get(l);c||(c=t({path:e,matches:r,patch:(f,u)=>{a.aborted||U5(f,u,n,i,s)}}),o.set(l,c)),c&&Zz(c)&&await c}finally{o.delete(l)}}function U5(t,e,r,n,i){if(t){var s;let o=n[t];qe(o,"No route found to patch children into: routeId = "+t);let a=su(e,i,[t,"patch",String(((s=o.children)==null?void 0:s.length)||"0")],n);o.children?o.children.push(...a):o.children=a}else{let o=su(e,i,["patch",String(r.length||"0")],n);r.push(...o)}}async function TE(t,e,r){if(!t.lazy)return;let n=await t.lazy();if(!t.lazy)return;let i=r[t.id];qe(i,"No route found in manifest");let s={};for(let o in n){let l=i[o]!==void 0&&o!=="hasErrorBoundary";za(!l,'Route "'+i.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!dz.has(o)&&(s[o]=n[o])}Object.assign(i,s),Object.assign(i,Xt({},e(i),{lazy:void 0}))}function Wz(t){return Promise.all(t.matches.map(e=>e.resolve()))}async function Gz(t,e,r,n,i,s,o,a){let l=n.reduce((u,d)=>u.add(d.route.id),new Set),c=new Set,f=await t({matches:i.map(u=>{let d=l.has(u.route.id);return Xt({},u,{shouldLoad:d,resolve:p=>(c.add(u.route.id),d?Kz(e,r,u,s,o,p,a):Promise.resolve({type:$t.data,result:void 0}))})}),request:r,params:i[0].params,context:a});return i.forEach(u=>qe(c.has(u.route.id),'`match.resolve()` was not called for route id "'+u.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),f.filter((u,d)=>l.has(i[d].route.id))}async function Kz(t,e,r,n,i,s,o){let a,l,c=f=>{let u,d=new Promise((m,x)=>u=x);l=()=>u(),e.signal.addEventListener("abort",l);let h=m=>typeof f!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+r.route.id+"]"))):f({request:e,params:r.params,context:o},...m!==void 0?[m]:[]),p;return s?p=s(m=>h(m)):p=(async()=>{try{return{type:"data",result:await h()}}catch(m){return{type:"error",result:m}}})(),Promise.race([p,d])};try{let f=r.route[t];if(r.route.lazy)if(f){let u,[d]=await Promise.all([c(f).catch(h=>{u=h}),TE(r.route,i,n)]);if(u!==void 0)throw u;a=d}else if(await TE(r.route,i,n),f=r.route[t],f)a=await c(f);else if(t==="action"){let u=new URL(e.url),d=u.pathname+u.search;throw hn(405,{method:e.method,pathname:d,routeId:r.route.id})}else return{type:$t.data,result:void 0};else if(f)a=await c(f);else{let u=new URL(e.url),d=u.pathname+u.search;throw hn(404,{pathname:d})}qe(a.result!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(f){return{type:$t.error,result:f}}finally{l&&e.signal.removeEventListener("abort",l)}return a}async function Yz(t){let{result:e,type:r,status:n}=t;if(V5(e)){let o;try{let a=e.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?e.body==null?o=null:o=await e.json():o=await e.text()}catch(a){return{type:$t.error,error:a}}return r===$t.error?{type:$t.error,error:new ux(e.status,e.statusText,o),statusCode:e.status,headers:e.headers}:{type:$t.data,data:o,statusCode:e.status,headers:e.headers}}if(r===$t.error)return{type:$t.error,error:e,statusCode:vv(e)?e.status:n};if(tV(e)){var i,s;return{type:$t.deferred,deferredData:e,statusCode:(i=e.init)==null?void 0:i.status,headers:((s=e.init)==null?void 0:s.headers)&&new Headers(e.init.headers)}}return{type:$t.data,data:e,statusCode:n}}function Qz(t,e,r,n,i,s){let o=t.headers.get("Location");if(qe(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!dx.test(o)){let a=n.slice(0,n.findIndex(l=>l.route.id===r)+1);o=Uy(new URL(e.url),a,i,!0,o,s),t.headers.set("Location",o)}return t}function PE(t,e,r){if(dx.test(t)){let n=t,i=n.startsWith("//")?new URL(e.protocol+n):new URL(n),s=Lu(i.pathname,r)!=null;if(i.origin===e.origin&&s)return i.pathname+i.search+i.hash}return t}function fl(t,e,r,n){let i=t.createURL(z5(e)).toString(),s={signal:r};if(n&&_i(n.formMethod)){let{formMethod:o,formEncType:a}=n;s.method=o.toUpperCase(),a==="application/json"?(s.headers=new Headers({"Content-Type":a}),s.body=JSON.stringify(n.json)):a==="text/plain"?s.body=n.text:a==="application/x-www-form-urlencoded"&&n.formData?s.body=zy(n.formData):s.body=n.formData}return new Request(i,s)}function zy(t){let e=new URLSearchParams;for(let[r,n]of t.entries())e.append(r,typeof n=="string"?n:n.name);return e}function RE(t){let e=new FormData;for(let[r,n]of t.entries())e.append(r,n);return e}function Jz(t,e,r,n,i,s){let o={},a=null,l,c=!1,f={},u=n&&Fn(n[1])?n[1].error:void 0;return r.forEach((d,h)=>{let p=e[h].route.id;if(qe(!Sa(d),"Cannot handle redirect results in processLoaderData"),Fn(d)){let m=d.error;if(u!==void 0&&(m=u,u=void 0),a=a||{},s)a[p]=m;else{let x=Nl(t,p);a[x.route.id]==null&&(a[x.route.id]=m)}o[p]=void 0,c||(c=!0,l=vv(d.error)?d.error.status:500),d.headers&&(f[p]=d.headers)}else Ea(d)?(i.set(p,d.deferredData),o[p]=d.deferredData.data,d.statusCode!=null&&d.statusCode!==200&&!c&&(l=d.statusCode),d.headers&&(f[p]=d.headers)):(o[p]=d.data,d.statusCode&&d.statusCode!==200&&!c&&(l=d.statusCode),d.headers&&(f[p]=d.headers))}),u!==void 0&&n&&(a={[n[0]]:u},o[n[0]]=void 0),{loaderData:o,errors:a,statusCode:l||200,loaderHeaders:f}}function _E(t,e,r,n,i,s,o,a){let{loaderData:l,errors:c}=Jz(e,r,n,i,a,!1);for(let f=0;fn.route.id===e)+1):[...t]).reverse().find(n=>n.route.hasErrorBoundary===!0)||t[0]}function ME(t){let e=t.length===1?t[0]:t.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function hn(t,e){let{pathname:r,routeId:n,method:i,type:s,message:o}=e===void 0?{}:e,a="Unknown Server Error",l="Unknown @remix-run/router error";return t===400?(a="Bad Request",s==="route-discovery"?l='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error: -`+o):i&&r&&n?l="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":s==="defer-action"?l="defer() is not supported in actions":s==="invalid-body"&&(l="Unable to encode submission body")):t===403?(a="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):t===404?(a="Not Found",l='No route matches URL "'+r+'"'):t===405&&(a="Method Not Allowed",i&&r&&n?l="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(l='Invalid request method "'+i.toUpperCase()+'"')),new ux(t||500,a,new Error(l),!0)}function NE(t){for(let e=t.length-1;e>=0;e--){let r=t[e];if(Sa(r))return{result:r,idx:e}}}function z5(t){let e=typeof t=="string"?bs(t):t;return Du(Xt({},e,{hash:""}))}function Xz(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function Zz(t){return typeof t=="object"&&t!=null&&"then"in t}function eV(t){return V5(t.result)&&jz.has(t.result.status)}function Ea(t){return t.type===$t.deferred}function Fn(t){return t.type===$t.error}function Sa(t){return(t&&t.type)===$t.redirect}function tV(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function V5(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function rV(t){return Lz.has(t.toLowerCase())}function _i(t){return Nz.has(t.toLowerCase())}async function DE(t,e,r,n,i,s){for(let o=0;ou.route.id===l.route.id),f=c!=null&&!$5(c,l)&&(s&&s[l.route.id])!==void 0;if(Ea(a)&&(i||f)){let u=n[o];qe(u,"Expected an AbortSignal for revalidating fetcher deferred result"),await H5(a,u,i).then(d=>{d&&(r[o]=d||r[o])})}}}async function H5(t,e,r){if(r===void 0&&(r=!1),!await t.deferredData.resolveData(e)){if(r)try{return{type:$t.data,data:t.deferredData.unwrappedData}}catch(i){return{type:$t.error,error:i}}return{type:$t.data,data:t.deferredData.data}}}function hx(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function ff(t,e){let r=typeof e=="string"?bs(e).search:e.search;if(t[t.length-1].route.index&&hx(r||""))return t[t.length-1];let n=j5(t);return n[n.length-1]}function LE(t){let{formMethod:e,formAction:r,formEncType:n,text:i,formData:s,json:o}=t;if(!(!e||!r||!n)){if(i!=null)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:void 0,text:i};if(s!=null)return{formMethod:e,formAction:r,formEncType:n,formData:s,json:void 0,text:void 0};if(o!==void 0)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function N1(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function nV(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Gc(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function iV(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function go(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function sV(t,e){try{let r=t.sessionStorage.getItem(B5);if(r){let n=JSON.parse(r);for(let[i,s]of Object.entries(n||{}))s&&Array.isArray(s)&&e.set(i,new Set(s||[]))}}catch{}}function oV(t,e){if(e.size>0){let r={};for(let[n,i]of e)r[n]=[...i];try{t.sessionStorage.setItem(B5,JSON.stringify(r))}catch(n){za(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** - * React Router v6.25.1 + */function Xt(){return Xt=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function za(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function fz(){return Math.random().toString(36).substr(2,8)}function wA(t,e){return{usr:t.state,key:t.key,idx:e}}function iu(t,e,r,n){return r===void 0&&(r=null),Xt({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?bs(e):e,{state:r,key:e&&e.key||n||fz()})}function Du(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function bs(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function uz(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:s=!1}=n,o=i.history,a=vr.Pop,l=null,c=f();c==null&&(c=0,o.replaceState(Xt({},o.state,{idx:c}),""));function f(){return(o.state||{idx:null}).idx}function u(){a=vr.Pop;let x=f(),b=x==null?null:x-c;c=x,l&&l({action:a,location:m.location,delta:b})}function d(x,b){a=vr.Push;let w=iu(m.location,x,b);r&&r(w,x),c=f()+1;let E=wA(w,c),R=m.createHref(w);try{o.pushState(E,"",R)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;i.location.assign(R)}s&&l&&l({action:a,location:m.location,delta:1})}function h(x,b){a=vr.Replace;let w=iu(m.location,x,b);r&&r(w,x),c=f();let E=wA(w,c),R=m.createHref(w);o.replaceState(E,"",R),s&&l&&l({action:a,location:m.location,delta:0})}function p(x){let b=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof x=="string"?x:Du(x);return w=w.replace(/ $/,"%20"),He(b,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,b)}let m={get action(){return a},get location(){return t(i,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(bA,u),l=x,()=>{i.removeEventListener(bA,u),l=null}},createHref(x){return e(i,x)},createURL:p,encodeLocation(x){let b=p(x);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:d,replace:h,go(x){return o.go(x)}};return m}var kt;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(kt||(kt={}));const dz=new Set(["lazy","caseSensitive","path","id","index","children"]);function hz(t){return t.index===!0}function su(t,e,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),t.map((i,s)=>{let o=[...r,String(s)],a=typeof i.id=="string"?i.id:o.join("-");if(He(i.index!==!0||!i.children,"Cannot specify children on an index route"),He(!n[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),hz(i)){let l=Xt({},i,e(i),{id:a});return n[a]=l,l}else{let l=Xt({},i,e(i),{id:a,children:void 0});return n[a]=l,i.children&&(l.children=su(i.children,e,o,n)),l}})}function ga(t,e,r){return r===void 0&&(r="/"),nh(t,e,r,!1)}function nh(t,e,r,n){let i=typeof e=="string"?bs(e):e,s=Lu(i.pathname||"/",r);if(s==null)return null;let o=L5(t);pz(o);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(He(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=Oa([n,l.relativePath]),f=r.concat(l);s.children&&s.children.length>0&&(He(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),L5(s.children,e,f,c)),!(s.path==null&&!s.index)&&e.push({path:c,score:Ez(c,s.index),routesMeta:f})};return t.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of j5(s.path))i(s,o,l)}),e}function j5(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return i?[s,""]:[s];let o=j5(n.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function pz(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:Az(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const yz=/^:[\w-]+$/,mz=3,gz=2,xz=1,bz=10,wz=-2,EA=t=>t==="*";function Ez(t,e){let r=t.split("/"),n=r.length;return r.some(EA)&&(n+=wz),e&&(n+=gz),r.filter(i=>!EA(i)).reduce((i,s)=>i+(yz.test(s)?mz:s===""?xz:bz),n)}function Az(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function Sz(t,e,r){r===void 0&&(r=!1);let{routesMeta:n}=t,i={},s="/",o=[];for(let a=0;a{let{paramName:d,isOptional:h}=f;if(d==="*"){let m=a[u]||"";o=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const p=a[u];return h&&!p?c[d]=void 0:c[d]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:t}}function Cz(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),za(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function kz(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return za(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Lu(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function Tz(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?bs(t):t;return{pathname:r?r.startsWith("/")?r:Pz(r,e):e,search:Oz(n),hash:Mz(i)}}function Pz(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function M1(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function F5(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function Rz(t,e){let r=F5(t);return e?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function _z(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=bs(t):(i=Xt({},t),He(!i.pathname||!i.pathname.includes("?"),M1("?","pathname","search",i)),He(!i.pathname||!i.pathname.includes("#"),M1("#","pathname","hash",i)),He(!i.search||!i.search.includes("#"),M1("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=r;else{let u=e.length-1;if(!n&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),u-=1;i.pathname=d.join("/")}a=u>=0?e[u]:"/"}let l=Tz(i,a),c=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}const Oa=t=>t.join("/").replace(/\/\/+/g,"/"),Iz=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Oz=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Mz=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class r0{constructor(e,r,n,i){i===void 0&&(i=!1),this.status=e,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function pv(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const B5=["post","put","patch","delete"],Nz=new Set(B5),Dz=["get",...B5],Lz=new Set(Dz),jz=new Set([301,302,303,307,308]),Fz=new Set([307,308]),N1={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Bz={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Wc={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},dx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$z=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),$5="remix-router-transitions";function Uz(t){const e=t.window?t.window:typeof window<"u"?window:void 0,r=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",n=!r;He(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(t.mapRouteProperties)i=t.mapRouteProperties;else if(t.detectErrorBoundary){let z=t.detectErrorBoundary;i=q=>({hasErrorBoundary:z(q)})}else i=$z;let s={},o=su(t.routes,i,void 0,s),a,l=t.basename||"/",c=t.unstable_dataStrategy||Wz,f=t.unstable_patchRoutesOnMiss,u=Xt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},t.future),d=null,h=new Set,p=null,m=null,x=null,b=t.hydrationData!=null,w=ga(o,t.history.location,l),E=null;if(w==null&&!f){let z=hn(404,{pathname:t.history.location.pathname}),{matches:q,route:W}=MA(o);w=q,E={[W.id]:z}}w&&!t.hydrationData&<(w,o,t.history.location.pathname).active&&(w=null);let R;if(w)if(w.some(z=>z.route.lazy))R=!1;else if(!w.some(z=>z.route.loader))R=!0;else if(u.v7_partialHydration){let z=t.hydrationData?t.hydrationData.loaderData:null,q=t.hydrationData?t.hydrationData.errors:null,W=re=>re.route.loader?typeof re.route.loader=="function"&&re.route.loader.hydrate===!0?!1:z&&z[re.route.id]!==void 0||q&&q[re.route.id]!==void 0:!0;if(q){let re=w.findIndex(fe=>q[fe.route.id]!==void 0);R=w.slice(0,re+1).every(W)}else R=w.every(W)}else R=t.hydrationData!=null;else if(R=!1,w=[],u.v7_partialHydration){let z=lt(null,o,t.history.location.pathname);z.active&&z.matches&&(w=z.matches)}let N,I={historyAction:t.history.action,location:t.history.location,matches:w,initialized:R,navigation:N1,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||E,fetchers:new Map,blockers:new Map},F=vr.Pop,j=!1,U,K=!1,J=new Map,Z=null,M=!1,v=!1,T=[],S=new Set,C=new Map,P=0,O=-1,L=new Map,A=new Set,g=new Map,_=new Map,B=new Set,k=new Map,$=new Map,V=new Map,H=!1;function X(){if(d=t.history.listen(z=>{let{action:q,location:W,delta:re}=z;if(H){H=!1;return}za($.size===0||re!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let fe=zi({currentLocation:I.location,nextLocation:W,historyAction:q});if(fe&&re!=null){H=!0,t.history.go(re*-1),ot(fe,{state:"blocked",location:W,proceed(){ot(fe,{state:"proceeding",proceed:void 0,reset:void 0,location:W}),t.history.go(re)},reset(){let ve=new Map(I.blockers);ve.set(fe,Wc),te({blockers:ve})}});return}return sr(q,W)}),r){sV(e,J);let z=()=>oV(e,J);e.addEventListener("pagehide",z),Z=()=>e.removeEventListener("pagehide",z)}return I.initialized||sr(vr.Pop,I.location,{initialHydration:!0}),N}function le(){d&&d(),Z&&Z(),h.clear(),U&&U.abort(),I.fetchers.forEach((z,q)=>ni(q)),I.blockers.forEach((z,q)=>wt(q))}function ne(z){return h.add(z),()=>h.delete(z)}function te(z,q){q===void 0&&(q={}),I=Xt({},I,z);let W=[],re=[];u.v7_fetcherPersist&&I.fetchers.forEach((fe,ve)=>{fe.state==="idle"&&(B.has(ve)?re.push(ve):W.push(ve))}),[...h].forEach(fe=>fe(I,{deletedFetchers:re,unstable_viewTransitionOpts:q.viewTransitionOpts,unstable_flushSync:q.flushSync===!0})),u.v7_fetcherPersist&&(W.forEach(fe=>I.fetchers.delete(fe)),re.forEach(fe=>ni(fe)))}function Ie(z,q,W){var re,fe;let{flushSync:ve}=W===void 0?{}:W,Ae=I.actionData!=null&&I.navigation.formMethod!=null&&Ii(I.navigation.formMethod)&&I.navigation.state==="loading"&&((re=z.state)==null?void 0:re._isRedirect)!==!0,ae;q.actionData?Object.keys(q.actionData).length>0?ae=q.actionData:ae=null:Ae?ae=I.actionData:ae=null;let ge=q.loaderData?IA(I.loaderData,q.loaderData,q.matches||[],q.errors):I.loaderData,we=I.blockers;we.size>0&&(we=new Map(we),we.forEach((Be,Ve)=>we.set(Ve,Wc)));let ye=j===!0||I.navigation.formMethod!=null&&Ii(I.navigation.formMethod)&&((fe=z.state)==null?void 0:fe._isRedirect)!==!0;a&&(o=a,a=void 0),M||F===vr.Pop||(F===vr.Push?t.history.push(z,z.state):F===vr.Replace&&t.history.replace(z,z.state));let Ce;if(F===vr.Pop){let Be=J.get(I.location.pathname);Be&&Be.has(z.pathname)?Ce={currentLocation:I.location,nextLocation:z}:J.has(z.pathname)&&(Ce={currentLocation:z,nextLocation:I.location})}else if(K){let Be=J.get(I.location.pathname);Be?Be.add(z.pathname):(Be=new Set([z.pathname]),J.set(I.location.pathname,Be)),Ce={currentLocation:I.location,nextLocation:z}}te(Xt({},q,{actionData:ae,loaderData:ge,historyAction:F,location:z,initialized:!0,navigation:N1,revalidation:"idle",restoreScrollPosition:At(z,q.matches||I.matches),preventScrollReset:ye,blockers:we}),{viewTransitionOpts:Ce,flushSync:ve===!0}),F=vr.Pop,j=!1,K=!1,M=!1,v=!1,T=[]}async function pe(z,q){if(typeof z=="number"){t.history.go(z);return}let W=zy(I.location,I.matches,l,u.v7_prependBasename,z,u.v7_relativeSplatPath,q==null?void 0:q.fromRouteId,q==null?void 0:q.relative),{path:re,submission:fe,error:ve}=SA(u.v7_normalizeFormMethod,!1,W,q),Ae=I.location,ae=iu(I.location,re,q&&q.state);ae=Xt({},ae,t.history.encodeLocation(ae));let ge=q&&q.replace!=null?q.replace:void 0,we=vr.Push;ge===!0?we=vr.Replace:ge===!1||fe!=null&&Ii(fe.formMethod)&&fe.formAction===I.location.pathname+I.location.search&&(we=vr.Replace);let ye=q&&"preventScrollReset"in q?q.preventScrollReset===!0:void 0,Ce=(q&&q.unstable_flushSync)===!0,Be=zi({currentLocation:Ae,nextLocation:ae,historyAction:we});if(Be){ot(Be,{state:"blocked",location:ae,proceed(){ot(Be,{state:"proceeding",proceed:void 0,reset:void 0,location:ae}),pe(z,q)},reset(){let Ve=new Map(I.blockers);Ve.set(Be,Wc),te({blockers:Ve})}});return}return await sr(we,ae,{submission:fe,pendingError:ve,preventScrollReset:ye,replace:q&&q.replace,enableViewTransition:q&&q.unstable_viewTransition,flushSync:Ce})}function Se(){if(ut(),te({revalidation:"loading"}),I.navigation.state!=="submitting"){if(I.navigation.state==="idle"){sr(I.historyAction,I.location,{startUninterruptedRevalidation:!0});return}sr(F||I.historyAction,I.navigation.location,{overrideNavigation:I.navigation})}}async function sr(z,q,W){U&&U.abort(),U=null,F=z,M=(W&&W.startUninterruptedRevalidation)===!0,Ss(I.location,I.matches),j=(W&&W.preventScrollReset)===!0,K=(W&&W.enableViewTransition)===!0;let re=a||o,fe=W&&W.overrideNavigation,ve=ga(re,q,l),Ae=(W&&W.flushSync)===!0,ae=lt(ve,re,q.pathname);if(ae.active&&ae.matches&&(ve=ae.matches),!ve){let{error:Fe,notFoundMatches:jt,route:ht}=dt(q.pathname);Ie(q,{matches:jt,loaderData:{},errors:{[ht.id]:Fe}},{flushSync:Ae});return}if(I.initialized&&!v&&Xz(I.location,q)&&!(W&&W.submission&&Ii(W.submission.formMethod))){Ie(q,{matches:ve},{flushSync:Ae});return}U=new AbortController;let ge=fl(t.history,q,U.signal,W&&W.submission),we;if(W&&W.pendingError)we=[Nl(ve).route.id,{type:kt.error,error:W.pendingError}];else if(W&&W.submission&&Ii(W.submission.formMethod)){let Fe=await Xe(ge,q,W.submission,ve,ae.active,{replace:W.replace,flushSync:Ae});if(Fe.shortCircuited)return;if(Fe.pendingActionResult){let[jt,ht]=Fe.pendingActionResult;if(Fn(ht)&&pv(ht.error)&&ht.error.status===404){U=null,Ie(q,{matches:Fe.matches,loaderData:{},errors:{[jt]:ht.error}});return}}ve=Fe.matches||ve,we=Fe.pendingActionResult,fe=D1(q,W.submission),Ae=!1,ae.active=!1,ge=fl(t.history,ge.url,ge.signal)}let{shortCircuited:ye,matches:Ce,loaderData:Be,errors:Ve}=await ct(ge,q,ve,ae.active,fe,W&&W.submission,W&&W.fetcherSubmission,W&&W.replace,W&&W.initialHydration===!0,Ae,we);ye||(U=null,Ie(q,Xt({matches:Ce||ve},OA(we),{loaderData:Be,errors:Ve})))}async function Xe(z,q,W,re,fe,ve){ve===void 0&&(ve={}),ut();let Ae=nV(q,W);if(te({navigation:Ae},{flushSync:ve.flushSync===!0}),fe){let we=await ii(re,q.pathname,z.signal);if(we.type==="aborted")return{shortCircuited:!0};if(we.type==="error"){let{boundaryId:ye,error:Ce}=at(q.pathname,we);return{matches:we.partialMatches,pendingActionResult:[ye,{type:kt.error,error:Ce}]}}else if(we.matches)re=we.matches;else{let{notFoundMatches:ye,error:Ce,route:Be}=dt(q.pathname);return{matches:ye,pendingActionResult:[Be.id,{type:kt.error,error:Ce}]}}}let ae,ge=ff(re,q);if(!ge.route.action&&!ge.route.lazy)ae={type:kt.error,error:hn(405,{method:z.method,pathname:q.pathname,routeId:ge.route.id})};else if(ae=(await Nn("action",z,[ge],re))[0],z.signal.aborted)return{shortCircuited:!0};if(Sa(ae)){let we;return ve&&ve.replace!=null?we=ve.replace:we=PA(ae.response.headers.get("Location"),new URL(z.url),l)===I.location.pathname+I.location.search,await it(z,ae,{submission:W,replace:we}),{shortCircuited:!0}}if(Aa(ae))throw hn(400,{type:"defer-action"});if(Fn(ae)){let we=Nl(re,ge.route.id);return(ve&&ve.replace)!==!0&&(F=vr.Push),{matches:re,pendingActionResult:[we.route.id,ae]}}return{matches:re,pendingActionResult:[ge.route.id,ae]}}async function ct(z,q,W,re,fe,ve,Ae,ae,ge,we,ye){let Ce=fe||D1(q,ve),Be=ve||Ae||jA(Ce),Ve=!M&&(!u.v7_partialHydration||!ge);if(re){if(Ve){let Ft=ri(ye);te(Xt({navigation:Ce},Ft!==void 0?{actionData:Ft}:{}),{flushSync:we})}let Oe=await ii(W,q.pathname,z.signal);if(Oe.type==="aborted")return{shortCircuited:!0};if(Oe.type==="error"){let{boundaryId:Ft,error:zr}=at(q.pathname,Oe);return{matches:Oe.partialMatches,loaderData:{},errors:{[Ft]:zr}}}else if(Oe.matches)W=Oe.matches;else{let{error:Ft,notFoundMatches:zr,route:St}=dt(q.pathname);return{matches:zr,loaderData:{},errors:{[St.id]:Ft}}}}let Fe=a||o,[jt,ht]=CA(t.history,I,W,Be,q,u.v7_partialHydration&&ge===!0,u.v7_skipActionErrorRevalidation,v,T,S,B,g,A,Fe,l,ye);if(Ei(Oe=>!(W&&W.some(Ft=>Ft.route.id===Oe))||jt&&jt.some(Ft=>Ft.route.id===Oe)),O=++P,jt.length===0&&ht.length===0){let Oe=xt();return Ie(q,Xt({matches:W,loaderData:{},errors:ye&&Fn(ye[1])?{[ye[0]]:ye[1].error}:null},OA(ye),Oe?{fetchers:new Map(I.fetchers)}:{}),{flushSync:we}),{shortCircuited:!0}}if(Ve){let Oe={};if(!re){Oe.navigation=Ce;let Ft=ri(ye);Ft!==void 0&&(Oe.actionData=Ft)}ht.length>0&&(Oe.fetchers=ft(ht)),te(Oe,{flushSync:we})}ht.forEach(Oe=>{C.has(Oe.key)&&Ye(Oe.key),Oe.controller&&C.set(Oe.key,Oe.controller)});let Cs=()=>ht.forEach(Oe=>Ye(Oe.key));U&&U.signal.addEventListener("abort",Cs);let{loaderResults:si,fetcherResults:Vi}=await mt(I.matches,W,jt,ht,z);if(z.signal.aborted)return{shortCircuited:!0};U&&U.signal.removeEventListener("abort",Cs),ht.forEach(Oe=>C.delete(Oe.key));let qi=NA([...si,...Vi]);if(qi){if(qi.idx>=jt.length){let Oe=ht[qi.idx-jt.length].key;A.add(Oe)}return await it(z,qi.result,{replace:ae}),{shortCircuited:!0}}let{loaderData:Hi,errors:wn}=_A(I,W,jt,si,ye,ht,Vi,k);k.forEach((Oe,Ft)=>{Oe.subscribe(zr=>{(zr||Oe.done)&&k.delete(Ft)})}),u.v7_partialHydration&&ge&&I.errors&&Object.entries(I.errors).filter(Oe=>{let[Ft]=Oe;return!jt.some(zr=>zr.route.id===Ft)}).forEach(Oe=>{let[Ft,zr]=Oe;wn=Object.assign(wn||{},{[Ft]:zr})});let lo=xt(),co=bt(O),fo=lo||co||ht.length>0;return Xt({matches:W,loaderData:Hi,errors:wn},fo?{fetchers:new Map(I.fetchers)}:{})}function ri(z){if(z&&!Fn(z[1]))return{[z[0]]:z[1].data};if(I.actionData)return Object.keys(I.actionData).length===0?null:I.actionData}function ft(z){return z.forEach(q=>{let W=I.fetchers.get(q.key),re=Gc(void 0,W?W.data:void 0);I.fetchers.set(q.key,re)}),new Map(I.fetchers)}function tt(z,q,W,re){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");C.has(z)&&Ye(z);let fe=(re&&re.unstable_flushSync)===!0,ve=a||o,Ae=zy(I.location,I.matches,l,u.v7_prependBasename,W,u.v7_relativeSplatPath,q,re==null?void 0:re.relative),ae=ga(ve,Ae,l),ge=lt(ae,ve,Ae);if(ge.active&&ge.matches&&(ae=ge.matches),!ae){Ge(z,q,hn(404,{pathname:Ae}),{flushSync:fe});return}let{path:we,submission:ye,error:Ce}=SA(u.v7_normalizeFormMethod,!0,Ae,re);if(Ce){Ge(z,q,Ce,{flushSync:fe});return}let Be=ff(ae,we);if(j=(re&&re.preventScrollReset)===!0,ye&&Ii(ye.formMethod)){Es(z,q,we,Be,ae,ge.active,fe,ye);return}g.set(z,{routeId:q,path:we}),_t(z,q,we,Be,ae,ge.active,fe,ye)}async function Es(z,q,W,re,fe,ve,Ae,ae){ut(),g.delete(z);function ge(St){if(!St.route.action&&!St.route.lazy){let Dn=hn(405,{method:ae.formMethod,pathname:W,routeId:q});return Ge(z,q,Dn,{flushSync:Ae}),!0}return!1}if(!ve&&ge(re))return;let we=I.fetchers.get(z);Xr(z,iV(ae,we),{flushSync:Ae});let ye=new AbortController,Ce=fl(t.history,W,ye.signal,ae);if(ve){let St=await ii(fe,W,Ce.signal);if(St.type==="aborted")return;if(St.type==="error"){let{error:Dn}=at(W,St);Ge(z,q,Dn,{flushSync:Ae});return}else if(St.matches){if(fe=St.matches,re=ff(fe,W),ge(re))return}else{Ge(z,q,hn(404,{pathname:W}),{flushSync:Ae});return}}C.set(z,ye);let Be=P,Fe=(await Nn("action",Ce,[re],fe))[0];if(Ce.signal.aborted){C.get(z)===ye&&C.delete(z);return}if(u.v7_fetcherPersist&&B.has(z)){if(Sa(Fe)||Fn(Fe)){Xr(z,go(void 0));return}}else{if(Sa(Fe))if(C.delete(z),O>Be){Xr(z,go(void 0));return}else return A.add(z),Xr(z,Gc(ae)),it(Ce,Fe,{fetcherSubmission:ae});if(Fn(Fe)){Ge(z,q,Fe.error);return}}if(Aa(Fe))throw hn(400,{type:"defer-action"});let jt=I.navigation.location||I.location,ht=fl(t.history,jt,ye.signal),Cs=a||o,si=I.navigation.state!=="idle"?ga(Cs,I.navigation.location,l):I.matches;He(si,"Didn't find any matches after fetcher action");let Vi=++P;L.set(z,Vi);let qi=Gc(ae,Fe.data);I.fetchers.set(z,qi);let[Hi,wn]=CA(t.history,I,si,ae,jt,!1,u.v7_skipActionErrorRevalidation,v,T,S,B,g,A,Cs,l,[re.route.id,Fe]);wn.filter(St=>St.key!==z).forEach(St=>{let Dn=St.key,Aw=I.fetchers.get(Dn),EP=Gc(void 0,Aw?Aw.data:void 0);I.fetchers.set(Dn,EP),C.has(Dn)&&Ye(Dn),St.controller&&C.set(Dn,St.controller)}),te({fetchers:new Map(I.fetchers)});let lo=()=>wn.forEach(St=>Ye(St.key));ye.signal.addEventListener("abort",lo);let{loaderResults:co,fetcherResults:fo}=await mt(I.matches,si,Hi,wn,ht);if(ye.signal.aborted)return;ye.signal.removeEventListener("abort",lo),L.delete(z),C.delete(z),wn.forEach(St=>C.delete(St.key));let Oe=NA([...co,...fo]);if(Oe){if(Oe.idx>=Hi.length){let St=wn[Oe.idx-Hi.length].key;A.add(St)}return it(ht,Oe.result)}let{loaderData:Ft,errors:zr}=_A(I,I.matches,Hi,co,void 0,wn,fo,k);if(I.fetchers.has(z)){let St=go(Fe.data);I.fetchers.set(z,St)}bt(Vi),I.navigation.state==="loading"&&Vi>O?(He(F,"Expected pending action"),U&&U.abort(),Ie(I.navigation.location,{matches:si,loaderData:Ft,errors:zr,fetchers:new Map(I.fetchers)})):(te({errors:zr,loaderData:IA(I.loaderData,Ft,si,zr),fetchers:new Map(I.fetchers)}),v=!1)}async function _t(z,q,W,re,fe,ve,Ae,ae){let ge=I.fetchers.get(z);Xr(z,Gc(ae,ge?ge.data:void 0),{flushSync:Ae});let we=new AbortController,ye=fl(t.history,W,we.signal);if(ve){let Fe=await ii(fe,W,ye.signal);if(Fe.type==="aborted")return;if(Fe.type==="error"){let{error:jt}=at(W,Fe);Ge(z,q,jt,{flushSync:Ae});return}else if(Fe.matches)fe=Fe.matches,re=ff(fe,W);else{Ge(z,q,hn(404,{pathname:W}),{flushSync:Ae});return}}C.set(z,we);let Ce=P,Ve=(await Nn("loader",ye,[re],fe))[0];if(Aa(Ve)&&(Ve=await H5(Ve,ye.signal,!0)||Ve),C.get(z)===we&&C.delete(z),!ye.signal.aborted){if(B.has(z)){Xr(z,go(void 0));return}if(Sa(Ve))if(O>Ce){Xr(z,go(void 0));return}else{A.add(z),await it(ye,Ve);return}if(Fn(Ve)){Ge(z,q,Ve.error);return}He(!Aa(Ve),"Unhandled fetcher deferred data"),Xr(z,go(Ve.data))}}async function it(z,q,W){let{submission:re,fetcherSubmission:fe,replace:ve}=W===void 0?{}:W;q.response.headers.has("X-Remix-Revalidate")&&(v=!0);let Ae=q.response.headers.get("Location");He(Ae,"Expected a Location header on the redirect Response"),Ae=PA(Ae,new URL(z.url),l);let ae=iu(I.location,Ae,{_isRedirect:!0});if(r){let Ve=!1;if(q.response.headers.has("X-Remix-Reload-Document"))Ve=!0;else if(dx.test(Ae)){const Fe=t.history.createURL(Ae);Ve=Fe.origin!==e.location.origin||Lu(Fe.pathname,l)==null}if(Ve){ve?e.location.replace(Ae):e.location.assign(Ae);return}}U=null;let ge=ve===!0||q.response.headers.has("X-Remix-Replace")?vr.Replace:vr.Push,{formMethod:we,formAction:ye,formEncType:Ce}=I.navigation;!re&&!fe&&we&&ye&&Ce&&(re=jA(I.navigation));let Be=re||fe;if(Fz.has(q.response.status)&&Be&&Ii(Be.formMethod))await sr(ge,ae,{submission:Xt({},Be,{formAction:Ae}),preventScrollReset:j});else{let Ve=D1(ae,re);await sr(ge,ae,{overrideNavigation:Ve,fetcherSubmission:fe,preventScrollReset:j})}}async function Nn(z,q,W,re){try{let fe=await Gz(c,z,q,W,re,s,i);return await Promise.all(fe.map((ve,Ae)=>{if(eV(ve)){let ae=ve.result;return{type:kt.redirect,response:Qz(ae,q,W[Ae].route.id,re,l,u.v7_relativeSplatPath)}}return Yz(ve)}))}catch(fe){return W.map(()=>({type:kt.error,error:fe}))}}async function mt(z,q,W,re,fe){let[ve,...Ae]=await Promise.all([W.length?Nn("loader",fe,W,q):[],...re.map(ae=>{if(ae.matches&&ae.match&&ae.controller){let ge=fl(t.history,ae.path,ae.controller.signal);return Nn("loader",ge,[ae.match],ae.matches).then(we=>we[0])}else return Promise.resolve({type:kt.error,error:hn(404,{pathname:ae.path})})})]);return await Promise.all([LA(z,W,ve,ve.map(()=>fe.signal),!1,I.loaderData),LA(z,re.map(ae=>ae.match),Ae,re.map(ae=>ae.controller?ae.controller.signal:null),!0)]),{loaderResults:ve,fetcherResults:Ae}}function ut(){v=!0,T.push(...Ei()),g.forEach((z,q)=>{C.has(q)&&(S.add(q),Ye(q))})}function Xr(z,q,W){W===void 0&&(W={}),I.fetchers.set(z,q),te({fetchers:new Map(I.fetchers)},{flushSync:(W&&W.flushSync)===!0})}function Ge(z,q,W,re){re===void 0&&(re={});let fe=Nl(I.matches,q);ni(z),te({errors:{[fe.route.id]:W},fetchers:new Map(I.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function gt(z){return u.v7_fetcherPersist&&(_.set(z,(_.get(z)||0)+1),B.has(z)&&B.delete(z)),I.fetchers.get(z)||Bz}function ni(z){let q=I.fetchers.get(z);C.has(z)&&!(q&&q.state==="loading"&&L.has(z))&&Ye(z),g.delete(z),L.delete(z),A.delete(z),B.delete(z),S.delete(z),I.fetchers.delete(z)}function It(z){if(u.v7_fetcherPersist){let q=(_.get(z)||0)-1;q<=0?(_.delete(z),B.add(z)):_.set(z,q)}else ni(z);te({fetchers:new Map(I.fetchers)})}function Ye(z){let q=C.get(z);He(q,"Expected fetch controller: "+z),q.abort(),C.delete(z)}function Ui(z){for(let q of z){let W=gt(q),re=go(W.data);I.fetchers.set(q,re)}}function xt(){let z=[],q=!1;for(let W of A){let re=I.fetchers.get(W);He(re,"Expected fetcher: "+W),re.state==="loading"&&(A.delete(W),z.push(W),q=!0)}return Ui(z),q}function bt(z){let q=[];for(let[W,re]of L)if(re0}function As(z,q){let W=I.blockers.get(z)||Wc;return $.get(z)!==q&&$.set(z,q),W}function wt(z){I.blockers.delete(z),$.delete(z)}function ot(z,q){let W=I.blockers.get(z)||Wc;He(W.state==="unblocked"&&q.state==="blocked"||W.state==="blocked"&&q.state==="blocked"||W.state==="blocked"&&q.state==="proceeding"||W.state==="blocked"&&q.state==="unblocked"||W.state==="proceeding"&&q.state==="unblocked","Invalid blocker state transition: "+W.state+" -> "+q.state);let re=new Map(I.blockers);re.set(z,q),te({blockers:re})}function zi(z){let{currentLocation:q,nextLocation:W,historyAction:re}=z;if($.size===0)return;$.size>1&&za(!1,"A router only supports one blocker at a time");let fe=Array.from($.entries()),[ve,Ae]=fe[fe.length-1],ae=I.blockers.get(ve);if(!(ae&&ae.state==="proceeding")&&Ae({currentLocation:q,nextLocation:W,historyAction:re}))return ve}function dt(z){let q=hn(404,{pathname:z}),W=a||o,{matches:re,route:fe}=MA(W);return Ei(),{notFoundMatches:re,route:fe,error:q}}function at(z,q){return{boundaryId:Nl(q.partialMatches).route.id,error:hn(400,{type:"route-discovery",pathname:z,message:q.error!=null&&"message"in q.error?q.error:String(q.error)})}}function Ei(z){let q=[];return k.forEach((W,re)=>{(!z||z(re))&&(W.cancel(),q.push(re),k.delete(re))}),q}function Ot(z,q,W){if(p=z,x=q,m=W||null,!b&&I.navigation===N1){b=!0;let re=At(I.location,I.matches);re!=null&&te({restoreScrollPosition:re})}return()=>{p=null,x=null,m=null}}function Et(z,q){return m&&m(z,q.map(re=>vz(re,I.loaderData)))||z.key}function Ss(z,q){if(p&&x){let W=Et(z,q);p[W]=x()}}function At(z,q){if(p){let W=Et(z,q),re=p[W];if(typeof re=="number")return re}return null}function lt(z,q,W){if(f)if(z){let re=z[z.length-1].route;if(re.path&&(re.path==="*"||re.path.endsWith("/*")))return{active:!0,matches:nh(q,W,l,!0)}}else return{active:!0,matches:nh(q,W,l,!0)||[]};return{active:!1,matches:null}}async function ii(z,q,W){let re=z,fe=re.length>0?re[re.length-1].route:null;for(;;){let ve=a==null,Ae=a||o;try{await Hz(f,q,re,Ae,s,i,V,W)}catch(ye){return{type:"error",error:ye,partialMatches:re}}finally{ve&&(o=[...o])}if(W.aborted)return{type:"aborted"};let ae=ga(Ae,q,l),ge=!1;if(ae){let ye=ae[ae.length-1].route;if(ye.index)return{type:"success",matches:ae};if(ye.path&&ye.path.length>0)if(ye.path==="*")ge=!0;else return{type:"success",matches:ae}}let we=nh(Ae,q,l,!0);if(!we||re.map(ye=>ye.route.id).join("-")===we.map(ye=>ye.route.id).join("-"))return{type:"success",matches:ge?ae:null};if(re=we,fe=re[re.length-1].route,fe.path==="*")return{type:"success",matches:re}}}function Mt(z){s={},a=su(z,i,void 0,s)}function Nt(z,q){let W=a==null;z5(z,q,a||o,s,i),W&&(o=[...o],te({}))}return N={get basename(){return l},get future(){return u},get state(){return I},get routes(){return o},get window(){return e},initialize:X,subscribe:ne,enableScrollRestoration:Ot,navigate:pe,fetch:tt,revalidate:Se,createHref:z=>t.history.createHref(z),encodeLocation:z=>t.history.encodeLocation(z),getFetcher:gt,deleteFetcher:It,dispose:le,getBlocker:As,deleteBlocker:wt,patchRoutes:Nt,_internalFetchControllers:C,_internalActiveDeferreds:k,_internalSetRoutes:Mt},N}function zz(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function zy(t,e,r,n,i,s,o,a){let l,c;if(o){l=[];for(let u of e)if(l.push(u),u.route.id===o){c=u;break}}else l=e,c=e[e.length-1];let f=_z(i||".",Rz(l,s),Lu(t.pathname,r)||t.pathname,a==="path");return i==null&&(f.search=t.search,f.hash=t.hash),(i==null||i===""||i===".")&&c&&c.route.index&&!hx(f.search)&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(f.pathname=f.pathname==="/"?r:Oa([r,f.pathname])),Du(f)}function SA(t,e,r,n){if(!n||!zz(n))return{path:r};if(n.formMethod&&!rV(n.formMethod))return{path:r,error:hn(405,{method:n.formMethod})};let i=()=>({path:r,error:hn(400,{type:"invalid-body"})}),s=n.formMethod||"get",o=t?s.toUpperCase():s.toLowerCase(),a=V5(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Ii(o))return i();let d=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((h,p)=>{let[m,x]=p;return""+h+m+"="+x+` +`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:d}}}else if(n.formEncType==="application/json"){if(!Ii(o))return i();try{let d=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:a,formEncType:n.formEncType,formData:void 0,json:d,text:void 0}}}catch{return i()}}}He(typeof FormData=="function","FormData is not available in this environment");let l,c;if(n.formData)l=Vy(n.formData),c=n.formData;else if(n.body instanceof FormData)l=Vy(n.body),c=n.body;else if(n.body instanceof URLSearchParams)l=n.body,c=RA(l);else if(n.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(n.body),c=RA(l)}catch{return i()}let f={formMethod:o,formAction:a,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Ii(f.formMethod))return{path:r,submission:f};let u=bs(r);return e&&u.search&&hx(u.search)&&l.append("index",""),u.search="?"+l,{path:Du(u),submission:f}}function Vz(t,e){let r=t;if(e){let n=t.findIndex(i=>i.route.id===e);n>=0&&(r=t.slice(0,n))}return r}function CA(t,e,r,n,i,s,o,a,l,c,f,u,d,h,p,m){let x=m?Fn(m[1])?m[1].error:m[1].data:void 0,b=t.createURL(e.location),w=t.createURL(i),E=m&&Fn(m[1])?m[0]:void 0,R=E?Vz(r,E):r,N=m?m[1].statusCode:void 0,I=o&&N&&N>=400,F=R.filter((U,K)=>{let{route:J}=U;if(J.lazy)return!0;if(J.loader==null)return!1;if(s)return typeof J.loader!="function"||J.loader.hydrate?!0:e.loaderData[J.id]===void 0&&(!e.errors||e.errors[J.id]===void 0);if(qz(e.loaderData,e.matches[K],U)||l.some(v=>v===U.route.id))return!0;let Z=e.matches[K],M=U;return kA(U,Xt({currentUrl:b,currentParams:Z.params,nextUrl:w,nextParams:M.params},n,{actionResult:x,actionStatus:N,defaultShouldRevalidate:I?!1:a||b.pathname+b.search===w.pathname+w.search||b.search!==w.search||U5(Z,M)}))}),j=[];return u.forEach((U,K)=>{if(s||!r.some(T=>T.route.id===U.routeId)||f.has(K))return;let J=ga(h,U.path,p);if(!J){j.push({key:K,routeId:U.routeId,path:U.path,matches:null,match:null,controller:null});return}let Z=e.fetchers.get(K),M=ff(J,U.path),v=!1;d.has(K)?v=!1:c.has(K)?(c.delete(K),v=!0):Z&&Z.state!=="idle"&&Z.data===void 0?v=a:v=kA(M,Xt({currentUrl:b,currentParams:e.matches[e.matches.length-1].params,nextUrl:w,nextParams:r[r.length-1].params},n,{actionResult:x,actionStatus:N,defaultShouldRevalidate:I?!1:a})),v&&j.push({key:K,routeId:U.routeId,path:U.path,matches:J,match:M,controller:new AbortController})}),[F,j]}function qz(t,e,r){let n=!e||r.route.id!==e.route.id,i=t[r.route.id]===void 0;return n||i}function U5(t,e){let r=t.route.path;return t.pathname!==e.pathname||r!=null&&r.endsWith("*")&&t.params["*"]!==e.params["*"]}function kA(t,e){if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate(e);if(typeof r=="boolean")return r}return e.defaultShouldRevalidate}async function Hz(t,e,r,n,i,s,o,a){let l=[e,...r.map(c=>c.route.id)].join("-");try{let c=o.get(l);c||(c=t({path:e,matches:r,patch:(f,u)=>{a.aborted||z5(f,u,n,i,s)}}),o.set(l,c)),c&&Zz(c)&&await c}finally{o.delete(l)}}function z5(t,e,r,n,i){if(t){var s;let o=n[t];He(o,"No route found to patch children into: routeId = "+t);let a=su(e,i,[t,"patch",String(((s=o.children)==null?void 0:s.length)||"0")],n);o.children?o.children.push(...a):o.children=a}else{let o=su(e,i,["patch",String(r.length||"0")],n);r.push(...o)}}async function TA(t,e,r){if(!t.lazy)return;let n=await t.lazy();if(!t.lazy)return;let i=r[t.id];He(i,"No route found in manifest");let s={};for(let o in n){let l=i[o]!==void 0&&o!=="hasErrorBoundary";za(!l,'Route "'+i.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!dz.has(o)&&(s[o]=n[o])}Object.assign(i,s),Object.assign(i,Xt({},e(i),{lazy:void 0}))}function Wz(t){return Promise.all(t.matches.map(e=>e.resolve()))}async function Gz(t,e,r,n,i,s,o,a){let l=n.reduce((u,d)=>u.add(d.route.id),new Set),c=new Set,f=await t({matches:i.map(u=>{let d=l.has(u.route.id);return Xt({},u,{shouldLoad:d,resolve:p=>(c.add(u.route.id),d?Kz(e,r,u,s,o,p,a):Promise.resolve({type:kt.data,result:void 0}))})}),request:r,params:i[0].params,context:a});return i.forEach(u=>He(c.has(u.route.id),'`match.resolve()` was not called for route id "'+u.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),f.filter((u,d)=>l.has(i[d].route.id))}async function Kz(t,e,r,n,i,s,o){let a,l,c=f=>{let u,d=new Promise((m,x)=>u=x);l=()=>u(),e.signal.addEventListener("abort",l);let h=m=>typeof f!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+r.route.id+"]"))):f({request:e,params:r.params,context:o},...m!==void 0?[m]:[]),p;return s?p=s(m=>h(m)):p=(async()=>{try{return{type:"data",result:await h()}}catch(m){return{type:"error",result:m}}})(),Promise.race([p,d])};try{let f=r.route[t];if(r.route.lazy)if(f){let u,[d]=await Promise.all([c(f).catch(h=>{u=h}),TA(r.route,i,n)]);if(u!==void 0)throw u;a=d}else if(await TA(r.route,i,n),f=r.route[t],f)a=await c(f);else if(t==="action"){let u=new URL(e.url),d=u.pathname+u.search;throw hn(405,{method:e.method,pathname:d,routeId:r.route.id})}else return{type:kt.data,result:void 0};else if(f)a=await c(f);else{let u=new URL(e.url),d=u.pathname+u.search;throw hn(404,{pathname:d})}He(a.result!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(f){return{type:kt.error,result:f}}finally{l&&e.signal.removeEventListener("abort",l)}return a}async function Yz(t){let{result:e,type:r}=t;if(q5(e)){let c;try{let f=e.headers.get("Content-Type");f&&/\bapplication\/json\b/.test(f)?e.body==null?c=null:c=await e.json():c=await e.text()}catch(f){return{type:kt.error,error:f}}return r===kt.error?{type:kt.error,error:new r0(e.status,e.statusText,c),statusCode:e.status,headers:e.headers}:{type:kt.data,data:c,statusCode:e.status,headers:e.headers}}if(r===kt.error){if(DA(e)){var n;if(e.data instanceof Error){var i;return{type:kt.error,error:e.data,statusCode:(i=e.init)==null?void 0:i.status}}e=new r0(((n=e.init)==null?void 0:n.status)||500,void 0,e.data)}return{type:kt.error,error:e,statusCode:pv(e)?e.status:void 0}}if(tV(e)){var s,o;return{type:kt.deferred,deferredData:e,statusCode:(s=e.init)==null?void 0:s.status,headers:((o=e.init)==null?void 0:o.headers)&&new Headers(e.init.headers)}}if(DA(e)){var a,l;return{type:kt.data,data:e.data,statusCode:(a=e.init)==null?void 0:a.status,headers:(l=e.init)!=null&&l.headers?new Headers(e.init.headers):void 0}}return{type:kt.data,data:e}}function Qz(t,e,r,n,i,s){let o=t.headers.get("Location");if(He(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!dx.test(o)){let a=n.slice(0,n.findIndex(l=>l.route.id===r)+1);o=zy(new URL(e.url),a,i,!0,o,s),t.headers.set("Location",o)}return t}function PA(t,e,r){if(dx.test(t)){let n=t,i=n.startsWith("//")?new URL(e.protocol+n):new URL(n),s=Lu(i.pathname,r)!=null;if(i.origin===e.origin&&s)return i.pathname+i.search+i.hash}return t}function fl(t,e,r,n){let i=t.createURL(V5(e)).toString(),s={signal:r};if(n&&Ii(n.formMethod)){let{formMethod:o,formEncType:a}=n;s.method=o.toUpperCase(),a==="application/json"?(s.headers=new Headers({"Content-Type":a}),s.body=JSON.stringify(n.json)):a==="text/plain"?s.body=n.text:a==="application/x-www-form-urlencoded"&&n.formData?s.body=Vy(n.formData):s.body=n.formData}return new Request(i,s)}function Vy(t){let e=new URLSearchParams;for(let[r,n]of t.entries())e.append(r,typeof n=="string"?n:n.name);return e}function RA(t){let e=new FormData;for(let[r,n]of t.entries())e.append(r,n);return e}function Jz(t,e,r,n,i,s){let o={},a=null,l,c=!1,f={},u=n&&Fn(n[1])?n[1].error:void 0;return r.forEach((d,h)=>{let p=e[h].route.id;if(He(!Sa(d),"Cannot handle redirect results in processLoaderData"),Fn(d)){let m=d.error;if(u!==void 0&&(m=u,u=void 0),a=a||{},s)a[p]=m;else{let x=Nl(t,p);a[x.route.id]==null&&(a[x.route.id]=m)}o[p]=void 0,c||(c=!0,l=pv(d.error)?d.error.status:500),d.headers&&(f[p]=d.headers)}else Aa(d)?(i.set(p,d.deferredData),o[p]=d.deferredData.data,d.statusCode!=null&&d.statusCode!==200&&!c&&(l=d.statusCode),d.headers&&(f[p]=d.headers)):(o[p]=d.data,d.statusCode&&d.statusCode!==200&&!c&&(l=d.statusCode),d.headers&&(f[p]=d.headers))}),u!==void 0&&n&&(a={[n[0]]:u},o[n[0]]=void 0),{loaderData:o,errors:a,statusCode:l||200,loaderHeaders:f}}function _A(t,e,r,n,i,s,o,a){let{loaderData:l,errors:c}=Jz(e,r,n,i,a,!1);for(let f=0;fn.route.id===e)+1):[...t]).reverse().find(n=>n.route.hasErrorBoundary===!0)||t[0]}function MA(t){let e=t.length===1?t[0]:t.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function hn(t,e){let{pathname:r,routeId:n,method:i,type:s,message:o}=e===void 0?{}:e,a="Unknown Server Error",l="Unknown @remix-run/router error";return t===400?(a="Bad Request",s==="route-discovery"?l='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error: +`+o):i&&r&&n?l="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":s==="defer-action"?l="defer() is not supported in actions":s==="invalid-body"&&(l="Unable to encode submission body")):t===403?(a="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):t===404?(a="Not Found",l='No route matches URL "'+r+'"'):t===405&&(a="Method Not Allowed",i&&r&&n?l="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(l='Invalid request method "'+i.toUpperCase()+'"')),new r0(t||500,a,new Error(l),!0)}function NA(t){for(let e=t.length-1;e>=0;e--){let r=t[e];if(Sa(r))return{result:r,idx:e}}}function V5(t){let e=typeof t=="string"?bs(t):t;return Du(Xt({},e,{hash:""}))}function Xz(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function Zz(t){return typeof t=="object"&&t!=null&&"then"in t}function eV(t){return q5(t.result)&&jz.has(t.result.status)}function Aa(t){return t.type===kt.deferred}function Fn(t){return t.type===kt.error}function Sa(t){return(t&&t.type)===kt.redirect}function DA(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function tV(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function q5(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function rV(t){return Lz.has(t.toLowerCase())}function Ii(t){return Nz.has(t.toLowerCase())}async function LA(t,e,r,n,i,s){for(let o=0;ou.route.id===l.route.id),f=c!=null&&!U5(c,l)&&(s&&s[l.route.id])!==void 0;if(Aa(a)&&(i||f)){let u=n[o];He(u,"Expected an AbortSignal for revalidating fetcher deferred result"),await H5(a,u,i).then(d=>{d&&(r[o]=d||r[o])})}}}async function H5(t,e,r){if(r===void 0&&(r=!1),!await t.deferredData.resolveData(e)){if(r)try{return{type:kt.data,data:t.deferredData.unwrappedData}}catch(i){return{type:kt.error,error:i}}return{type:kt.data,data:t.deferredData.data}}}function hx(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function ff(t,e){let r=typeof e=="string"?bs(e).search:e.search;if(t[t.length-1].route.index&&hx(r||""))return t[t.length-1];let n=F5(t);return n[n.length-1]}function jA(t){let{formMethod:e,formAction:r,formEncType:n,text:i,formData:s,json:o}=t;if(!(!e||!r||!n)){if(i!=null)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:void 0,text:i};if(s!=null)return{formMethod:e,formAction:r,formEncType:n,formData:s,json:void 0,text:void 0};if(o!==void 0)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function D1(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function nV(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Gc(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function iV(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function go(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function sV(t,e){try{let r=t.sessionStorage.getItem($5);if(r){let n=JSON.parse(r);for(let[i,s]of Object.entries(n||{}))s&&Array.isArray(s)&&e.set(i,new Set(s||[]))}}catch{}}function oV(t,e){if(e.size>0){let r={};for(let[n,i]of e)r[n]=[...i];try{t.sessionStorage.setItem($5,JSON.stringify(r))}catch(n){za(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** + * React Router v6.26.0 * * Copyright (c) Remix Software Inc. * @@ -123,8 +123,8 @@ Defaulting to \`null\`.`}const u5="Radio",[ZB,d5]=ln(u5),[e$,t$]=ZB(u5),r$=y.for * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function r0(){return r0=Object.assign?Object.assign.bind():function(t){for(var e=1;eObject.assign({},x,{params:Object.assign({},a,x.params),pathname:Oa([l,i.encodeLocation?i.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:Oa([l,i.encodeLocation?i.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),s,r,n);return e&&m?y.createElement(pv.Provider,{value:{location:r0({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:vr.Pop}},m):m}function cV(){let t=mV(),e=vv(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},s=null;return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},e),r?y.createElement("pre",{style:i},r):null,s)}const fV=y.createElement(cV,null);class uV extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?y.createElement(yv.Provider,{value:this.props.routeContext},y.createElement(K5.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function dV(t){let{routeContext:e,match:r,children:n}=t,i=y.useContext(q5);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(yv.Provider,{value:e},n)}function hV(t,e,r,n){var i;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var s;if((s=r)!=null&&s.errors)t=r.matches;else return null}let o=t,a=(i=r)==null?void 0:i.errors;if(a!=null){let f=o.findIndex(u=>u.route.id&&(a==null?void 0:a[u.route.id])!==void 0);f>=0||qe(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((f,u,d)=>{let h,p=!1,m=null,x=null;r&&(h=a&&u.route.id?a[u.route.id]:void 0,m=u.route.errorElement||fV,l&&(c<0&&d===0?(gV("route-fallback",!1),p=!0,x=null):c===d&&(p=!0,x=u.route.hydrateFallbackElement||null)));let b=e.concat(o.slice(0,d+1)),w=()=>{let A;return h?A=m:p?A=x:u.route.Component?A=y.createElement(u.route.Component,null):u.route.element?A=u.route.element:A=f,y.createElement(dV,{match:u,routeContext:{outlet:f,matches:b,isDataRoute:r!=null},children:A})};return r&&(u.route.ErrorBoundary||u.route.errorElement||d===0)?y.createElement(uV,{location:r.location,revalidation:r.revalidation,component:m,error:h,children:w(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):w()},null)}var Vy=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Vy||{});function vV(t){let e=y.useContext(W5);return e||qe(!1),e}function pV(t){let e=y.useContext(yv);return e||qe(!1),e}function yV(t){let e=pV(),r=e.matches[e.matches.length-1];return r.route.id||qe(!1),r.route.id}function mV(){var t;let e=y.useContext(K5),r=vV(Vy.UseRouteError),n=yV(Vy.UseRouteError);return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}const jE={};function gV(t,e,r){!e&&!jE[t]&&(jE[t]=!0)}function xV(t){let{basename:e="/",children:r=null,location:n,navigationType:i=vr.Pop,navigator:s,static:o=!1,future:a}=t;vx()&&qe(!1);let l=e.replace(/^\/*/,"/"),c=y.useMemo(()=>({basename:l,navigator:s,static:o,future:r0({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof n=="string"&&(n=bs(n));let{pathname:f="/",search:u="",hash:d="",state:h=null,key:p="default"}=n,m=y.useMemo(()=>{let x=Lu(f,l);return x==null?null:{location:{pathname:x,search:u,hash:d,state:h,key:p},navigationType:i}},[l,f,u,d,h,p,i]);return m==null?null:y.createElement(G5.Provider,{value:c},y.createElement(pv.Provider,{children:r,value:m}))}new Promise(()=>{});function bV(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:y.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:y.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:y.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** - * React Router DOM v6.25.1 + */function n0(){return n0=Object.assign?Object.assign.bind():function(t){for(var e=1;eObject.assign({},x,{params:Object.assign({},a,x.params),pathname:Oa([l,i.encodeLocation?i.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:Oa([l,i.encodeLocation?i.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),s,r,n);return e&&m?y.createElement(yv.Provider,{value:{location:n0({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:vr.Pop}},m):m}function cV(){let t=mV(),e=pv(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},s=null;return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},e),r?y.createElement("pre",{style:i},r):null,s)}const fV=y.createElement(cV,null);class uV extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?y.createElement(mv.Provider,{value:this.props.routeContext},y.createElement(Y5.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function dV(t){let{routeContext:e,match:r,children:n}=t,i=y.useContext(W5);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(mv.Provider,{value:e},n)}function hV(t,e,r,n){var i;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var s;if(!r)return null;if(r.errors)t=r.matches;else if((s=n)!=null&&s.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,a=(i=r)==null?void 0:i.errors;if(a!=null){let f=o.findIndex(u=>u.route.id&&(a==null?void 0:a[u.route.id])!==void 0);f>=0||He(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((f,u,d)=>{let h,p=!1,m=null,x=null;r&&(h=a&&u.route.id?a[u.route.id]:void 0,m=u.route.errorElement||fV,l&&(c<0&&d===0?(gV("route-fallback",!1),p=!0,x=null):c===d&&(p=!0,x=u.route.hydrateFallbackElement||null)));let b=e.concat(o.slice(0,d+1)),w=()=>{let E;return h?E=m:p?E=x:u.route.Component?E=y.createElement(u.route.Component,null):u.route.element?E=u.route.element:E=f,y.createElement(dV,{match:u,routeContext:{outlet:f,matches:b,isDataRoute:r!=null},children:E})};return r&&(u.route.ErrorBoundary||u.route.errorElement||d===0)?y.createElement(uV,{location:r.location,revalidation:r.revalidation,component:m,error:h,children:w(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):w()},null)}var qy=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(qy||{});function vV(t){let e=y.useContext(G5);return e||He(!1),e}function pV(t){let e=y.useContext(mv);return e||He(!1),e}function yV(t){let e=pV(),r=e.matches[e.matches.length-1];return r.route.id||He(!1),r.route.id}function mV(){var t;let e=y.useContext(Y5),r=vV(qy.UseRouteError),n=yV(qy.UseRouteError);return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}const FA={};function gV(t,e,r){!e&&!FA[t]&&(FA[t]=!0)}function xV(t){let{basename:e="/",children:r=null,location:n,navigationType:i=vr.Pop,navigator:s,static:o=!1,future:a}=t;vx()&&He(!1);let l=e.replace(/^\/*/,"/"),c=y.useMemo(()=>({basename:l,navigator:s,static:o,future:n0({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof n=="string"&&(n=bs(n));let{pathname:f="/",search:u="",hash:d="",state:h=null,key:p="default"}=n,m=y.useMemo(()=>{let x=Lu(f,l);return x==null?null:{location:{pathname:x,search:u,hash:d,state:h,key:p},navigationType:i}},[l,f,u,d,h,p,i]);return m==null?null:y.createElement(K5.Provider,{value:c},y.createElement(yv.Provider,{children:r,value:m}))}new Promise(()=>{});function bV(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:y.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:y.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:y.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** + * React Router DOM v6.26.0 * * Copyright (c) Remix Software Inc. * @@ -132,7 +132,7 @@ Defaulting to \`null\`.`}const u5="Radio",[ZB,d5]=ln(u5),[e$,t$]=ZB(u5),r$=y.for * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function n0(){return n0=Object.assign?Object.assign.bind():function(t){for(var e=1;e{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function IV(t){let{fallbackElement:e,router:r,future:n}=t,[i,s]=y.useState(r.state),[o,a]=y.useState(),[l,c]=y.useState({isTransitioning:!1}),[f,u]=y.useState(),[d,h]=y.useState(),[p,m]=y.useState(),x=y.useRef(new Map),{v7_startTransition:b}=n||{},w=y.useCallback(j=>{b?RV(j):j()},[b]),A=y.useCallback((j,U)=>{let{deletedFetchers:Y,unstable_flushSync:J,unstable_viewTransitionOpts:Z}=U;Y.forEach(v=>x.current.delete(v)),j.fetchers.forEach((v,T)=>{v.data!==void 0&&x.current.set(T,v.data)});let M=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!Z||M){J?Kc(()=>s(j)):w(()=>s(j));return}if(J){Kc(()=>{d&&(f&&f.resolve(),d.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})});let v=r.window.document.startViewTransition(()=>{Kc(()=>s(j))});v.finished.finally(()=>{Kc(()=>{u(void 0),h(void 0),a(void 0),c({isTransitioning:!1})})}),Kc(()=>h(v));return}d?(f&&f.resolve(),d.skipTransition(),m({state:j,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})):(a(j),c({isTransitioning:!0,flushSync:!1,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation}))},[r.window,d,f,x,w]);y.useLayoutEffect(()=>r.subscribe(A),[r,A]),y.useEffect(()=>{l.isTransitioning&&!l.flushSync&&u(new _V)},[l]),y.useEffect(()=>{if(f&&o&&r.window){let j=o,U=f.promise,Y=r.window.document.startViewTransition(async()=>{w(()=>s(j)),await U});Y.finished.finally(()=>{u(void 0),h(void 0),a(void 0),c({isTransitioning:!1})}),h(Y)}},[w,o,f,r.window]),y.useEffect(()=>{f&&o&&i.location.key===o.location.key&&f.resolve()},[f,d,i.location,o]),y.useEffect(()=>{!l.isTransitioning&&p&&(a(p.state),c({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}),m(void 0))},[l.isTransitioning,p]),y.useEffect(()=>{},[]);let R=y.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:j=>r.navigate(j),push:(j,U,Y)=>r.navigate(j,{state:U,preventScrollReset:Y==null?void 0:Y.preventScrollReset}),replace:(j,U,Y)=>r.navigate(j,{replace:!0,state:U,preventScrollReset:Y==null?void 0:Y.preventScrollReset})}),[r]),N=r.basename||"/",I=y.useMemo(()=>({router:r,navigator:R,static:!1,basename:N}),[r,R,N]),F=y.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return y.createElement(y.Fragment,null,y.createElement(q5.Provider,{value:I},y.createElement(W5.Provider,{value:i},y.createElement(kV.Provider,{value:x.current},y.createElement(CV.Provider,{value:l},y.createElement(xV,{basename:N,location:i.location,navigationType:i.historyAction,navigator:R,future:F},i.initialized||r.future.v7_partialHydration?y.createElement(OV,{routes:r.routes,future:r.future,state:i}):e))))),null)}const OV=y.memo(MV);function MV(t){let{routes:e,future:r,state:n}=t;return lV(e,void 0,n,r)}var $E;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})($E||($E={}));var UE;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(UE||(UE={}));function NV(t={}){const{nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n}=t,[i,s]=y.useState(!1),o=y.useRef(r);o.current=r;const a=y.useRef(n);return a.current=n,y.useEffect(()=>{const l=document.createElement("script");return l.src="https://accounts.google.com/gsi/client",l.async=!0,l.defer=!0,l.nonce=e,l.onload=()=>{var c;s(!0),(c=o.current)===null||c===void 0||c.call(o)},l.onerror=()=>{var c;s(!1),(c=a.current)===null||c===void 0||c.call(a)},document.body.appendChild(l),()=>{document.body.removeChild(l)}},[e]),i}const Y5=y.createContext(null);function DV({clientId:t,nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n,children:i}){const s=NV({nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n}),o=y.useMemo(()=>({clientId:t,scriptLoadedSuccessfully:s}),[t,s]);return pr.createElement(Y5.Provider,{value:o},i)}function Q5(){const t=y.useContext(Y5);if(!t)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return t}function LV(t){var e;return(e=t==null?void 0:t.clientId)!==null&&e!==void 0?e:t==null?void 0:t.client_id}const jV={large:40,medium:32,small:20};function J5({onSuccess:t,onError:e,useOneTap:r,promptMomentNotification:n,type:i="standard",theme:s="outline",size:o="large",text:a,shape:l,logo_alignment:c,width:f,locale:u,click_listener:d,containerProps:h,...p}){const m=y.useRef(null),{clientId:x,scriptLoadedSuccessfully:b}=Q5(),w=y.useRef(t);w.current=t;const A=y.useRef(e);A.current=e;const R=y.useRef(n);return R.current=n,y.useEffect(()=>{var N,I,F,j,U,Y,J,Z,M;if(b)return(F=(I=(N=window==null?void 0:window.google)===null||N===void 0?void 0:N.accounts)===null||I===void 0?void 0:I.id)===null||F===void 0||F.initialize({client_id:x,callback:v=>{var T;if(!(v!=null&&v.credential))return(T=A.current)===null||T===void 0?void 0:T.call(A);const{credential:S,select_by:C}=v;w.current({credential:S,clientId:LV(v),select_by:C})},...p}),(Y=(U=(j=window==null?void 0:window.google)===null||j===void 0?void 0:j.accounts)===null||U===void 0?void 0:U.id)===null||Y===void 0||Y.renderButton(m.current,{type:i,theme:s,size:o,text:a,shape:l,logo_alignment:c,width:f,locale:u,click_listener:d}),r&&((M=(Z=(J=window==null?void 0:window.google)===null||J===void 0?void 0:J.accounts)===null||Z===void 0?void 0:Z.id)===null||M===void 0||M.prompt(R.current)),()=>{var v,T,S;r&&((S=(T=(v=window==null?void 0:window.google)===null||v===void 0?void 0:v.accounts)===null||T===void 0?void 0:T.id)===null||S===void 0||S.cancel())}},[x,b,r,i,s,o,a,l,c,f,u]),pr.createElement("div",{...h,ref:m,style:{height:jV[o],...h==null?void 0:h.style}})}function FV(){var t,e,r;(r=(e=(t=window==null?void 0:window.google)===null||t===void 0?void 0:t.accounts)===null||e===void 0?void 0:e.id)===null||r===void 0||r.disableAutoSelect()}function X5({flow:t="implicit",scope:e="",onSuccess:r,onError:n,onNonOAuthError:i,overrideScope:s,state:o,...a}){const{clientId:l,scriptLoadedSuccessfully:c}=Q5(),f=y.useRef(),u=y.useRef(r);u.current=r;const d=y.useRef(n);d.current=n;const h=y.useRef(i);h.current=i,y.useEffect(()=>{var x;if(!c)return;const b=t==="implicit"?"initTokenClient":"initCodeClient",w=(x=window==null?void 0:window.google)===null||x===void 0?void 0:x.accounts.oauth2[b]({client_id:l,scope:s?e:`openid profile email ${e}`,callback:A=>{var R,N;if(A.error)return(R=d.current)===null||R===void 0?void 0:R.call(d,A);(N=u.current)===null||N===void 0||N.call(u,A)},error_callback:A=>{var R;(R=h.current)===null||R===void 0||R.call(h,A)},state:o,...a});f.current=w},[l,c,t,e,o]);const p=y.useCallback(x=>{var b;return(b=f.current)===null||b===void 0?void 0:b.requestAccessToken(x)},[]),m=y.useCallback(()=>{var x;return(x=f.current)===null||x===void 0?void 0:x.requestCode()},[]);return t==="implicit"?p:m}var Z5={},mv={},ju={};Object.defineProperty(ju,"__esModule",{value:!0});ju.default=void 0;var BV=y;function $V(t){(0,BV.useEffect)(function(){if(t){var e=document.querySelectorAll('script[src="'.concat(t,'"]'))[0];e||(e=document.createElement("script"),e.src=t,e.async=!0,document.body.appendChild(e))}},[t])}var UV=$V;ju.default=UV;var Fu={},gv={};Object.defineProperty(gv,"__esModule",{value:!0});gv.default=void 0;var zV=function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{pollFrequency:1e3,retries:100,parent:window},n=r.pollFrequency,i=n===void 0?1e3:n,s=r.retries,o=s===void 0?100:s,a=r.parent,l=a===void 0?window:a;if(l&&l.hasOwnProperty(e))return Promise.resolve(l[e]);if(!o)return Promise.resolve(void 0);var c=o-1;return new Promise(function(f){return setTimeout(f,typeof i=="function"?i({retries:c}):i)}).then(function(){return t(e,{pollFrequency:i,parent:l,retries:c})})},VV=zV;gv.default=VV;Object.defineProperty(Fu,"__esModule",{value:!0});Fu.default=void 0;var HV=qV(gv);function qV(t){return t&&t.__esModule?t:{default:t}}var WV="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js",GV=function(e){var r=e.authOptions,n=e.onSuccess,i=e.onError;return(0,HV.default)("AppleID").then(function(){return window.AppleID||console.error(new Error("Error loading apple script")),window.AppleID.auth.init(r),window.AppleID.auth.signIn().then(function(s){return n&&n(s),s}).catch(function(s){return i?i(s):console.error(s),null})}).catch(function(s){return i?i(s):console.error(s),null})},KV={APPLE_SCRIPT_SRC:WV,signIn:GV};Fu.default=KV;Object.defineProperty(mv,"__esModule",{value:!0});mv.default=void 0;var Gi=px(y),YV=px(ju),zE=px(Fu),QV=["onSuccess","onError","skipScript","authOptions","iconProps","render","uiType","className","noDefaultStyle","buttonExtraChildren"];function px(t){return t&&t.__esModule?t:{default:t}}function i0(){return i0=Object.assign||function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function eH(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s=0)&&(r[i]=t[i]);return r}var tH=` + */function i0(){return i0=Object.assign?Object.assign.bind():function(t){for(var e=1;e{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function IV(t){let{fallbackElement:e,router:r,future:n}=t,[i,s]=y.useState(r.state),[o,a]=y.useState(),[l,c]=y.useState({isTransitioning:!1}),[f,u]=y.useState(),[d,h]=y.useState(),[p,m]=y.useState(),x=y.useRef(new Map),{v7_startTransition:b}=n||{},w=y.useCallback(j=>{b?RV(j):j()},[b]),E=y.useCallback((j,U)=>{let{deletedFetchers:K,unstable_flushSync:J,unstable_viewTransitionOpts:Z}=U;K.forEach(v=>x.current.delete(v)),j.fetchers.forEach((v,T)=>{v.data!==void 0&&x.current.set(T,v.data)});let M=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!Z||M){J?Kc(()=>s(j)):w(()=>s(j));return}if(J){Kc(()=>{d&&(f&&f.resolve(),d.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})});let v=r.window.document.startViewTransition(()=>{Kc(()=>s(j))});v.finished.finally(()=>{Kc(()=>{u(void 0),h(void 0),a(void 0),c({isTransitioning:!1})})}),Kc(()=>h(v));return}d?(f&&f.resolve(),d.skipTransition(),m({state:j,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})):(a(j),c({isTransitioning:!0,flushSync:!1,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation}))},[r.window,d,f,x,w]);y.useLayoutEffect(()=>r.subscribe(E),[r,E]),y.useEffect(()=>{l.isTransitioning&&!l.flushSync&&u(new _V)},[l]),y.useEffect(()=>{if(f&&o&&r.window){let j=o,U=f.promise,K=r.window.document.startViewTransition(async()=>{w(()=>s(j)),await U});K.finished.finally(()=>{u(void 0),h(void 0),a(void 0),c({isTransitioning:!1})}),h(K)}},[w,o,f,r.window]),y.useEffect(()=>{f&&o&&i.location.key===o.location.key&&f.resolve()},[f,d,i.location,o]),y.useEffect(()=>{!l.isTransitioning&&p&&(a(p.state),c({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}),m(void 0))},[l.isTransitioning,p]),y.useEffect(()=>{},[]);let R=y.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:j=>r.navigate(j),push:(j,U,K)=>r.navigate(j,{state:U,preventScrollReset:K==null?void 0:K.preventScrollReset}),replace:(j,U,K)=>r.navigate(j,{replace:!0,state:U,preventScrollReset:K==null?void 0:K.preventScrollReset})}),[r]),N=r.basename||"/",I=y.useMemo(()=>({router:r,navigator:R,static:!1,basename:N}),[r,R,N]),F=y.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return y.createElement(y.Fragment,null,y.createElement(W5.Provider,{value:I},y.createElement(G5.Provider,{value:i},y.createElement(kV.Provider,{value:x.current},y.createElement(CV.Provider,{value:l},y.createElement(xV,{basename:N,location:i.location,navigationType:i.historyAction,navigator:R,future:F},i.initialized||r.future.v7_partialHydration?y.createElement(OV,{routes:r.routes,future:r.future,state:i}):e))))),null)}const OV=y.memo(MV);function MV(t){let{routes:e,future:r,state:n}=t;return lV(e,void 0,n,r)}var UA;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(UA||(UA={}));var zA;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(zA||(zA={}));function NV(t={}){const{nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n}=t,[i,s]=y.useState(!1),o=y.useRef(r);o.current=r;const a=y.useRef(n);return a.current=n,y.useEffect(()=>{const l=document.createElement("script");return l.src="https://accounts.google.com/gsi/client",l.async=!0,l.defer=!0,l.nonce=e,l.onload=()=>{var c;s(!0),(c=o.current)===null||c===void 0||c.call(o)},l.onerror=()=>{var c;s(!1),(c=a.current)===null||c===void 0||c.call(a)},document.body.appendChild(l),()=>{document.body.removeChild(l)}},[e]),i}const Q5=y.createContext(null);function DV({clientId:t,nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n,children:i}){const s=NV({nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n}),o=y.useMemo(()=>({clientId:t,scriptLoadedSuccessfully:s}),[t,s]);return pr.createElement(Q5.Provider,{value:o},i)}function J5(){const t=y.useContext(Q5);if(!t)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return t}function LV(t){var e;return(e=t==null?void 0:t.clientId)!==null&&e!==void 0?e:t==null?void 0:t.client_id}const jV={large:40,medium:32,small:20};function X5({onSuccess:t,onError:e,useOneTap:r,promptMomentNotification:n,type:i="standard",theme:s="outline",size:o="large",text:a,shape:l,logo_alignment:c,width:f,locale:u,click_listener:d,containerProps:h,...p}){const m=y.useRef(null),{clientId:x,scriptLoadedSuccessfully:b}=J5(),w=y.useRef(t);w.current=t;const E=y.useRef(e);E.current=e;const R=y.useRef(n);return R.current=n,y.useEffect(()=>{var N,I,F,j,U,K,J,Z,M;if(b)return(F=(I=(N=window==null?void 0:window.google)===null||N===void 0?void 0:N.accounts)===null||I===void 0?void 0:I.id)===null||F===void 0||F.initialize({client_id:x,callback:v=>{var T;if(!(v!=null&&v.credential))return(T=E.current)===null||T===void 0?void 0:T.call(E);const{credential:S,select_by:C}=v;w.current({credential:S,clientId:LV(v),select_by:C})},...p}),(K=(U=(j=window==null?void 0:window.google)===null||j===void 0?void 0:j.accounts)===null||U===void 0?void 0:U.id)===null||K===void 0||K.renderButton(m.current,{type:i,theme:s,size:o,text:a,shape:l,logo_alignment:c,width:f,locale:u,click_listener:d}),r&&((M=(Z=(J=window==null?void 0:window.google)===null||J===void 0?void 0:J.accounts)===null||Z===void 0?void 0:Z.id)===null||M===void 0||M.prompt(R.current)),()=>{var v,T,S;r&&((S=(T=(v=window==null?void 0:window.google)===null||v===void 0?void 0:v.accounts)===null||T===void 0?void 0:T.id)===null||S===void 0||S.cancel())}},[x,b,r,i,s,o,a,l,c,f,u]),pr.createElement("div",{...h,ref:m,style:{height:jV[o],...h==null?void 0:h.style}})}function FV(){var t,e,r;(r=(e=(t=window==null?void 0:window.google)===null||t===void 0?void 0:t.accounts)===null||e===void 0?void 0:e.id)===null||r===void 0||r.disableAutoSelect()}function Z5({flow:t="implicit",scope:e="",onSuccess:r,onError:n,onNonOAuthError:i,overrideScope:s,state:o,...a}){const{clientId:l,scriptLoadedSuccessfully:c}=J5(),f=y.useRef(),u=y.useRef(r);u.current=r;const d=y.useRef(n);d.current=n;const h=y.useRef(i);h.current=i,y.useEffect(()=>{var x;if(!c)return;const b=t==="implicit"?"initTokenClient":"initCodeClient",w=(x=window==null?void 0:window.google)===null||x===void 0?void 0:x.accounts.oauth2[b]({client_id:l,scope:s?e:`openid profile email ${e}`,callback:E=>{var R,N;if(E.error)return(R=d.current)===null||R===void 0?void 0:R.call(d,E);(N=u.current)===null||N===void 0||N.call(u,E)},error_callback:E=>{var R;(R=h.current)===null||R===void 0||R.call(h,E)},state:o,...a});f.current=w},[l,c,t,e,o]);const p=y.useCallback(x=>{var b;return(b=f.current)===null||b===void 0?void 0:b.requestAccessToken(x)},[]),m=y.useCallback(()=>{var x;return(x=f.current)===null||x===void 0?void 0:x.requestCode()},[]);return t==="implicit"?p:m}var e7={},gv={},ju={};Object.defineProperty(ju,"__esModule",{value:!0});ju.default=void 0;var BV=y;function $V(t){(0,BV.useEffect)(function(){if(t){var e=document.querySelectorAll('script[src="'.concat(t,'"]'))[0];e||(e=document.createElement("script"),e.src=t,e.async=!0,document.body.appendChild(e))}},[t])}var UV=$V;ju.default=UV;var Fu={},xv={};Object.defineProperty(xv,"__esModule",{value:!0});xv.default=void 0;var zV=function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{pollFrequency:1e3,retries:100,parent:window},n=r.pollFrequency,i=n===void 0?1e3:n,s=r.retries,o=s===void 0?100:s,a=r.parent,l=a===void 0?window:a;if(l&&l.hasOwnProperty(e))return Promise.resolve(l[e]);if(!o)return Promise.resolve(void 0);var c=o-1;return new Promise(function(f){return setTimeout(f,typeof i=="function"?i({retries:c}):i)}).then(function(){return t(e,{pollFrequency:i,parent:l,retries:c})})},VV=zV;xv.default=VV;Object.defineProperty(Fu,"__esModule",{value:!0});Fu.default=void 0;var qV=HV(xv);function HV(t){return t&&t.__esModule?t:{default:t}}var WV="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js",GV=function(e){var r=e.authOptions,n=e.onSuccess,i=e.onError;return(0,qV.default)("AppleID").then(function(){return window.AppleID||console.error(new Error("Error loading apple script")),window.AppleID.auth.init(r),window.AppleID.auth.signIn().then(function(s){return n&&n(s),s}).catch(function(s){return i?i(s):console.error(s),null})}).catch(function(s){return i?i(s):console.error(s),null})},KV={APPLE_SCRIPT_SRC:WV,signIn:GV};Fu.default=KV;Object.defineProperty(gv,"__esModule",{value:!0});gv.default=void 0;var Gi=px(y),YV=px(ju),VA=px(Fu),QV=["onSuccess","onError","skipScript","authOptions","iconProps","render","uiType","className","noDefaultStyle","buttonExtraChildren"];function px(t){return t&&t.__esModule?t:{default:t}}function s0(){return s0=Object.assign||function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function eq(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s=0)&&(r[i]=t[i]);return r}var tq=` .react-apple-signin-auth-btn { background-color: transparent; border: none; @@ -158,46 +158,46 @@ Defaulting to \`null\`.`}const u5="Radio",[ZB,d5]=ln(u5),[e$,t$]=ZB(u5),r$=y.for background-color: #000; color: #FFF; border-color: #FFF; -}`.replace(/ {2}|\n/g,""),rH=function(e){var r=e.onSuccess,n=e.onError,i=e.skipScript,s=i===void 0?!1:i,o=e.authOptions,a=e.iconProps,l=e.render,c=e.uiType,f=c===void 0?"dark":c,u=e.className,d=e.noDefaultStyle,h=d===void 0?!1:d,p=e.buttonExtraChildren,m=p===void 0?"Continue with Apple":p,x=ZV(e,QV);(0,YV.default)(s?null:zE.default.APPLE_SCRIPT_SRC);var b=function(R){R&&(R.preventDefault(),R.stopPropagation()),zE.default.signIn({authOptions:o,onSuccess:r,onError:n})},w=JV({children:Gi.default.createElement(Gi.default.Fragment,null,Gi.default.createElement("svg",i0({width:"24px",height:"44px",viewBox:"0 0 24 44"},a),Gi.default.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},Gi.default.createElement("rect",{fill:f==="light"?"#FFF":"#000",x:"0",y:"0",width:"24",height:"44"}),Gi.default.createElement("path",{d:"M12.2337427,16.9879688 C12.8896607,16.9879688 13.7118677,16.5445313 14.2014966,15.9532812 C14.6449341,15.4174609 14.968274,14.6691602 14.968274,13.9208594 C14.968274,13.8192383 14.9590357,13.7176172 14.9405591,13.6344727 C14.2107349,13.6621875 13.3330982,14.1241016 12.8065162,14.7430664 C12.3907935,15.2142188 12.012024,15.9532812 12.012024,16.7108203 C12.012024,16.8216797 12.0305005,16.9325391 12.0397388,16.9694922 C12.0859302,16.9787305 12.1598365,16.9879688 12.2337427,16.9879688 Z M9.92417241,28.1662891 C10.8202857,28.1662891 11.2175318,27.5658008 12.3353638,27.5658008 C13.4716724,27.5658008 13.721106,28.1478125 14.7188404,28.1478125 C15.6980982,28.1478125 16.3540162,27.2424609 16.972981,26.3555859 C17.6658521,25.339375 17.9522388,24.3416406 17.9707154,24.2954492 C17.9060474,24.2769727 16.0306763,23.5101953 16.0306763,21.3576758 C16.0306763,19.491543 17.5088013,18.6508594 17.5919459,18.5861914 C16.612688,17.1819727 15.1253248,17.1450195 14.7188404,17.1450195 C13.6194849,17.1450195 12.7233716,17.8101758 12.1598365,17.8101758 C11.5501099,17.8101758 10.7463794,17.1819727 9.79483648,17.1819727 C7.98413335,17.1819727 6.14571538,18.6785742 6.14571538,21.5054883 C6.14571538,23.2607617 6.8293482,25.1176563 7.67003179,26.3186328 C8.39061773,27.3348438 9.01882085,28.1662891 9.92417241,28.1662891 Z",fill:f==="light"?"#000":"#FFF",fillRule:"nonzero"}))),m),onClick:b},x);return l?l(w):Gi.default.createElement(Gi.default.Fragment,null,Gi.default.createElement("button",i0({className:"".concat(h?"":"react-apple-signin-auth-btn react-apple-signin-auth-btn-".concat(f)).concat(u?" ".concat(u):""),type:"button","aria-label":"Signin with apple ID"},w)),h?null:Gi.default.createElement("style",null,tH))},nH=rH;mv.default=nH;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"appleAuthHelpers",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"useScript",{enumerable:!0,get:function(){return n.default}}),t.default=void 0;var e=i(mv),r=i(Fu),n=i(ju);function i(o){return o&&o.__esModule?o:{default:o}}var s=e.default;t.default=s})(Z5);const e7=ro(Z5);var iH="_1csw4y80 _1qxj1ib9 _1qxj1ibc _1qxj1ib2 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8";const t7=t=>{const{value:e,digits:r=6,onChange:n,disabled:i=!1}=t,s=y.useMemo(()=>HE(0,r).map(()=>y.createRef()),[]);y.useEffect(()=>{var c,f;(f=(c=s[0])==null?void 0:c.current)==null||f.focus()},[]);const o=(c,f)=>{var d,h;/^\d$/.test(f)||(f="");const u=[...e];u[c]=f,f!==""&&((h=(d=s[c+1])==null?void 0:d.current)==null||h.focus()),n(u)},a=(c,f)=>{var p,m;const u=s[c].current,d=(p=s[c-1])==null?void 0:p.current,h=(m=s[c+1])==null?void 0:m.current;switch(f.key){case"Backspace":f.preventDefault(),u&&(u.value="",o(c,"")),d==null||d.focus();break;case"ArrowLeft":f.preventDefault(),d==null||d.focus();break;case"ArrowRight":f.preventDefault(),h==null||h.focus();break;default:(u==null?void 0:u.value)===f.key&&(f.preventDefault(),o(c,f.key))}},l=(c,f)=>{var h,p;const d=f.clipboardData.getData("text/plain").replace(/\D/g,"");/^\d{6}$/.test(d)&&((p=(h=s[0])==null?void 0:h.current)==null||p.focus(),n(d.split("")),setTimeout(()=>{var m,x;(x=(m=s[s.length-1])==null?void 0:m.current)==null||x.focus()}))};return D.jsx(G,{gap:"2",children:HE(0,r).map(c=>D.jsxs(y.Fragment,{children:[c===r/2&&D.jsx("span",{}),D.jsx(G,{as:"input",className:iH,value:e[c]||"",ref:s[c],type:"text",inputMode:"numeric",maxLength:1,disabled:i,onFocus:f=>f.target.select(),onPaste:f=>l(c,f),onChange:f=>o(c,f.target.value),onKeyDown:f=>{a(c,f)}})]},c))})},HE=(t,e)=>Array.from({length:e-t},(r,n)=>n+t),r7=()=>D.jsxs(G,{gap:"2",flexDirection:"column",borderStyle:"solid",width:"1/3",padding:"4",borderWidth:"thin",borderColor:"borderNormal",borderRadius:"sm",children:[D.jsx(me,{variant:"xlarge",fontWeight:"bold",color:"gnosisLight",children:"Demo App"}),D.jsx(me,{variant:"normal",marginLeft:"auto",color:"polygonLight",children:"Showcasing WaaS"})]});var yx={exports:{}};const sH={},oH=Object.freeze(Object.defineProperty({__proto__:null,default:sH},Symbol.toStringTag,{value:"Module"})),aH=EP(oH);yx.exports;(function(t){(function(e,r){function n(M,v){if(!M)throw new Error(v||"Assertion failed")}function i(M,v){M.super_=v;var T=function(){};T.prototype=v.prototype,M.prototype=new T,M.prototype.constructor=M}function s(M,v,T){if(s.isBN(M))return M;this.negative=0,this.words=null,this.length=0,this.red=null,M!==null&&((v==="le"||v==="be")&&(T=v,v=10),this._init(M||0,v||10,T||"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=aH.Buffer}catch{}s.isBN=function(v){return v instanceof s?!0:v!==null&&typeof v=="object"&&v.constructor.wordSize===s.wordSize&&Array.isArray(v.words)},s.max=function(v,T){return v.cmp(T)>0?v:T},s.min=function(v,T){return v.cmp(T)<0?v:T},s.prototype._init=function(v,T,S){if(typeof v=="number")return this._initNumber(v,T,S);if(typeof v=="object")return this._initArray(v,T,S);T==="hex"&&(T=16),n(T===(T|0)&&T>=2&&T<=36),v=v.toString().replace(/\s+/g,"");var C=0;v[0]==="-"&&(C++,this.negative=1),C=0;C-=3)O=v[C]|v[C-1]<<8|v[C-2]<<16,this.words[P]|=O<>>26-L&67108863,L+=24,L>=26&&(L-=26,P++);else if(S==="le")for(C=0,P=0;C>>26-L&67108863,L+=24,L>=26&&(L-=26,P++);return this._strip()};function a(M,v){var T=M.charCodeAt(v);if(T>=48&&T<=57)return T-48;if(T>=65&&T<=70)return T-55;if(T>=97&&T<=102)return T-87;n(!1,"Invalid character in "+M)}function l(M,v,T){var S=a(M,T);return T-1>=v&&(S|=a(M,T-1)<<4),S}s.prototype._parseHex=function(v,T,S){this.length=Math.ceil((v.length-T)/6),this.words=new Array(this.length);for(var C=0;C=T;C-=2)L=l(v,T,C)<=18?(P-=18,O+=1,this.words[O]|=L>>>26):P+=8;else{var E=v.length-T;for(C=E%2===0?T+1:T;C=18?(P-=18,O+=1,this.words[O]|=L>>>26):P+=8}this._strip()};function c(M,v,T,S){for(var C=0,P=0,O=Math.min(M.length,T),L=v;L=49?P=E-49+10:E>=17?P=E-17+10:P=E,n(E>=0&&P1&&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 d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[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],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(v,T){v=v||10,T=T|0||1;var S;if(v===16||v==="hex"){S="";for(var C=0,P=0,O=0;O>>24-C&16777215,C+=2,C>=26&&(C-=26,O--),P!==0||O!==this.length-1?S=d[6-E.length]+E+S:S=E+S}for(P!==0&&(S=P.toString(16)+S);S.length%T!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}if(v===(v|0)&&v>=2&&v<=36){var g=h[v],_=p[v];S="";var B=this.clone();for(B.negative=0;!B.isZero();){var k=B.modrn(_).toString(v);B=B.idivn(_),B.isZero()?S=k+S:S=d[g-k.length]+k+S}for(this.isZero()&&(S="0"+S);S.length%T!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var v=this.words[0];return this.length===2?v+=this.words[1]*67108864:this.length===3&&this.words[2]===1?v+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-v:v},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(v,T){return this.toArrayLike(o,v,T)}),s.prototype.toArray=function(v,T){return this.toArrayLike(Array,v,T)};var m=function(v,T){return v.allocUnsafe?v.allocUnsafe(T):new v(T)};s.prototype.toArrayLike=function(v,T,S){this._strip();var C=this.byteLength(),P=S||Math.max(1,C);n(C<=P,"byte array longer than desired length"),n(P>0,"Requested array length <= 0");var O=m(v,P),L=T==="le"?"LE":"BE";return this["_toArrayLike"+L](O,C),O},s.prototype._toArrayLikeLE=function(v,T){for(var S=0,C=0,P=0,O=0;P>8&255),S>16&255),O===6?(S>24&255),C=0,O=0):(C=L>>>24,O+=2)}if(S=0&&(v[S--]=L>>8&255),S>=0&&(v[S--]=L>>16&255),O===6?(S>=0&&(v[S--]=L>>24&255),C=0,O=0):(C=L>>>24,O+=2)}if(S>=0)for(v[S--]=C;S>=0;)v[S--]=0},Math.clz32?s.prototype._countBits=function(v){return 32-Math.clz32(v)}:s.prototype._countBits=function(v){var T=v,S=0;return T>=4096&&(S+=13,T>>>=13),T>=64&&(S+=7,T>>>=7),T>=8&&(S+=4,T>>>=4),T>=2&&(S+=2,T>>>=2),S+T},s.prototype._zeroBits=function(v){if(v===0)return 26;var T=v,S=0;return T&8191||(S+=13,T>>>=13),T&127||(S+=7,T>>>=7),T&15||(S+=4,T>>>=4),T&3||(S+=2,T>>>=2),T&1||S++,S},s.prototype.bitLength=function(){var v=this.words[this.length-1],T=this._countBits(v);return(this.length-1)*26+T};function x(M){for(var v=new Array(M.bitLength()),T=0;T>>C&1}return v}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var v=0,T=0;Tv.length?this.clone().ior(v):v.clone().ior(this)},s.prototype.uor=function(v){return this.length>v.length?this.clone().iuor(v):v.clone().iuor(this)},s.prototype.iuand=function(v){var T;this.length>v.length?T=v:T=this;for(var S=0;Sv.length?this.clone().iand(v):v.clone().iand(this)},s.prototype.uand=function(v){return this.length>v.length?this.clone().iuand(v):v.clone().iuand(this)},s.prototype.iuxor=function(v){var T,S;this.length>v.length?(T=this,S=v):(T=v,S=this);for(var C=0;Cv.length?this.clone().ixor(v):v.clone().ixor(this)},s.prototype.uxor=function(v){return this.length>v.length?this.clone().iuxor(v):v.clone().iuxor(this)},s.prototype.inotn=function(v){n(typeof v=="number"&&v>=0);var T=Math.ceil(v/26)|0,S=v%26;this._expand(T),S>0&&T--;for(var C=0;C0&&(this.words[C]=~this.words[C]&67108863>>26-S),this._strip()},s.prototype.notn=function(v){return this.clone().inotn(v)},s.prototype.setn=function(v,T){n(typeof v=="number"&&v>=0);var S=v/26|0,C=v%26;return this._expand(S+1),T?this.words[S]=this.words[S]|1<v.length?(S=this,C=v):(S=v,C=this);for(var P=0,O=0;O>>26;for(;P!==0&&O>>26;if(this.length=S.length,P!==0)this.words[this.length]=P,this.length++;else if(S!==this)for(;Ov.length?this.clone().iadd(v):v.clone().iadd(this)},s.prototype.isub=function(v){if(v.negative!==0){v.negative=0;var T=this.iadd(v);return v.negative=1,T._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(v),this.negative=1,this._normSign();var S=this.cmp(v);if(S===0)return this.negative=0,this.length=1,this.words[0]=0,this;var C,P;S>0?(C=this,P=v):(C=v,P=this);for(var O=0,L=0;L>26,this.words[L]=T&67108863;for(;O!==0&&L>26,this.words[L]=T&67108863;if(O===0&&L>>26,B=E&67108863,k=Math.min(g,v.length-1),$=Math.max(0,g-M.length+1);$<=k;$++){var V=g-$|0;C=M.words[V]|0,P=v.words[$]|0,O=C*P+B,_+=O/67108864|0,B=O&67108863}T.words[g]=B|0,E=_|0}return E!==0?T.words[g]=E|0:T.length--,T._strip()}var w=function(v,T,S){var C=v.words,P=T.words,O=S.words,L=0,E,g,_,B=C[0]|0,k=B&8191,$=B>>>13,V=C[1]|0,q=V&8191,X=V>>>13,le=C[2]|0,ne=le&8191,te=le>>>13,Ie=C[3]|0,pe=Ie&8191,Se=Ie>>>13,sr=C[4]|0,Xe=sr&8191,lt=sr>>>13,ti=C[5]|0,ct=ti&8191,tt=ti>>>13,As=C[6]|0,Rt=As&8191,it=As>>>13,Nn=C[7]|0,mt=Nn&8191,ft=Nn>>>13,Xr=C[8]|0,Ge=Xr&8191,gt=Xr>>>13,ri=C[9]|0,_t=ri&8191,Ye=ri>>>13,Ui=P[0]|0,xt=Ui&8191,bt=Ui>>>13,Es=P[1]|0,wt=Es&8191,ot=Es>>>13,zi=P[2]|0,ut=zi&8191,at=zi>>>13,wi=P[3]|0,It=wi&8191,At=wi>>>13,Ss=P[4]|0,Et=Ss&8191,dt=Ss>>>13,ni=P[5]|0,Ot=ni&8191,Mt=ni>>>13,z=P[6]|0,H=z&8191,W=z>>>13,re=P[7]|0,fe=re&8191,ve=re>>>13,Ee=P[8]|0,ae=Ee&8191,ge=Ee>>>13,we=P[9]|0,ye=we&8191,Ce=we>>>13;S.negative=v.negative^T.negative,S.length=19,E=Math.imul(k,xt),g=Math.imul(k,bt),g=g+Math.imul($,xt)|0,_=Math.imul($,bt);var Be=(L+E|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(Be>>>26)|0,Be&=67108863,E=Math.imul(q,xt),g=Math.imul(q,bt),g=g+Math.imul(X,xt)|0,_=Math.imul(X,bt),E=E+Math.imul(k,wt)|0,g=g+Math.imul(k,ot)|0,g=g+Math.imul($,wt)|0,_=_+Math.imul($,ot)|0;var Ve=(L+E|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,E=Math.imul(ne,xt),g=Math.imul(ne,bt),g=g+Math.imul(te,xt)|0,_=Math.imul(te,bt),E=E+Math.imul(q,wt)|0,g=g+Math.imul(q,ot)|0,g=g+Math.imul(X,wt)|0,_=_+Math.imul(X,ot)|0,E=E+Math.imul(k,ut)|0,g=g+Math.imul(k,at)|0,g=g+Math.imul($,ut)|0,_=_+Math.imul($,at)|0;var Fe=(L+E|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,E=Math.imul(pe,xt),g=Math.imul(pe,bt),g=g+Math.imul(Se,xt)|0,_=Math.imul(Se,bt),E=E+Math.imul(ne,wt)|0,g=g+Math.imul(ne,ot)|0,g=g+Math.imul(te,wt)|0,_=_+Math.imul(te,ot)|0,E=E+Math.imul(q,ut)|0,g=g+Math.imul(q,at)|0,g=g+Math.imul(X,ut)|0,_=_+Math.imul(X,at)|0,E=E+Math.imul(k,It)|0,g=g+Math.imul(k,At)|0,g=g+Math.imul($,It)|0,_=_+Math.imul($,At)|0;var Lt=(L+E|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,E=Math.imul(Xe,xt),g=Math.imul(Xe,bt),g=g+Math.imul(lt,xt)|0,_=Math.imul(lt,bt),E=E+Math.imul(pe,wt)|0,g=g+Math.imul(pe,ot)|0,g=g+Math.imul(Se,wt)|0,_=_+Math.imul(Se,ot)|0,E=E+Math.imul(ne,ut)|0,g=g+Math.imul(ne,at)|0,g=g+Math.imul(te,ut)|0,_=_+Math.imul(te,at)|0,E=E+Math.imul(q,It)|0,g=g+Math.imul(q,At)|0,g=g+Math.imul(X,It)|0,_=_+Math.imul(X,At)|0,E=E+Math.imul(k,Et)|0,g=g+Math.imul(k,dt)|0,g=g+Math.imul($,Et)|0,_=_+Math.imul($,dt)|0;var ht=(L+E|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(ht>>>26)|0,ht&=67108863,E=Math.imul(ct,xt),g=Math.imul(ct,bt),g=g+Math.imul(tt,xt)|0,_=Math.imul(tt,bt),E=E+Math.imul(Xe,wt)|0,g=g+Math.imul(Xe,ot)|0,g=g+Math.imul(lt,wt)|0,_=_+Math.imul(lt,ot)|0,E=E+Math.imul(pe,ut)|0,g=g+Math.imul(pe,at)|0,g=g+Math.imul(Se,ut)|0,_=_+Math.imul(Se,at)|0,E=E+Math.imul(ne,It)|0,g=g+Math.imul(ne,At)|0,g=g+Math.imul(te,It)|0,_=_+Math.imul(te,At)|0,E=E+Math.imul(q,Et)|0,g=g+Math.imul(q,dt)|0,g=g+Math.imul(X,Et)|0,_=_+Math.imul(X,dt)|0,E=E+Math.imul(k,Ot)|0,g=g+Math.imul(k,Mt)|0,g=g+Math.imul($,Ot)|0,_=_+Math.imul($,Mt)|0;var Cs=(L+E|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(Cs>>>26)|0,Cs&=67108863,E=Math.imul(Rt,xt),g=Math.imul(Rt,bt),g=g+Math.imul(it,xt)|0,_=Math.imul(it,bt),E=E+Math.imul(ct,wt)|0,g=g+Math.imul(ct,ot)|0,g=g+Math.imul(tt,wt)|0,_=_+Math.imul(tt,ot)|0,E=E+Math.imul(Xe,ut)|0,g=g+Math.imul(Xe,at)|0,g=g+Math.imul(lt,ut)|0,_=_+Math.imul(lt,at)|0,E=E+Math.imul(pe,It)|0,g=g+Math.imul(pe,At)|0,g=g+Math.imul(Se,It)|0,_=_+Math.imul(Se,At)|0,E=E+Math.imul(ne,Et)|0,g=g+Math.imul(ne,dt)|0,g=g+Math.imul(te,Et)|0,_=_+Math.imul(te,dt)|0,E=E+Math.imul(q,Ot)|0,g=g+Math.imul(q,Mt)|0,g=g+Math.imul(X,Ot)|0,_=_+Math.imul(X,Mt)|0,E=E+Math.imul(k,H)|0,g=g+Math.imul(k,W)|0,g=g+Math.imul($,H)|0,_=_+Math.imul($,W)|0;var ii=(L+E|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(ii>>>26)|0,ii&=67108863,E=Math.imul(mt,xt),g=Math.imul(mt,bt),g=g+Math.imul(ft,xt)|0,_=Math.imul(ft,bt),E=E+Math.imul(Rt,wt)|0,g=g+Math.imul(Rt,ot)|0,g=g+Math.imul(it,wt)|0,_=_+Math.imul(it,ot)|0,E=E+Math.imul(ct,ut)|0,g=g+Math.imul(ct,at)|0,g=g+Math.imul(tt,ut)|0,_=_+Math.imul(tt,at)|0,E=E+Math.imul(Xe,It)|0,g=g+Math.imul(Xe,At)|0,g=g+Math.imul(lt,It)|0,_=_+Math.imul(lt,At)|0,E=E+Math.imul(pe,Et)|0,g=g+Math.imul(pe,dt)|0,g=g+Math.imul(Se,Et)|0,_=_+Math.imul(Se,dt)|0,E=E+Math.imul(ne,Ot)|0,g=g+Math.imul(ne,Mt)|0,g=g+Math.imul(te,Ot)|0,_=_+Math.imul(te,Mt)|0,E=E+Math.imul(q,H)|0,g=g+Math.imul(q,W)|0,g=g+Math.imul(X,H)|0,_=_+Math.imul(X,W)|0,E=E+Math.imul(k,fe)|0,g=g+Math.imul(k,ve)|0,g=g+Math.imul($,fe)|0,_=_+Math.imul($,ve)|0;var Vi=(L+E|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,E=Math.imul(Ge,xt),g=Math.imul(Ge,bt),g=g+Math.imul(gt,xt)|0,_=Math.imul(gt,bt),E=E+Math.imul(mt,wt)|0,g=g+Math.imul(mt,ot)|0,g=g+Math.imul(ft,wt)|0,_=_+Math.imul(ft,ot)|0,E=E+Math.imul(Rt,ut)|0,g=g+Math.imul(Rt,at)|0,g=g+Math.imul(it,ut)|0,_=_+Math.imul(it,at)|0,E=E+Math.imul(ct,It)|0,g=g+Math.imul(ct,At)|0,g=g+Math.imul(tt,It)|0,_=_+Math.imul(tt,At)|0,E=E+Math.imul(Xe,Et)|0,g=g+Math.imul(Xe,dt)|0,g=g+Math.imul(lt,Et)|0,_=_+Math.imul(lt,dt)|0,E=E+Math.imul(pe,Ot)|0,g=g+Math.imul(pe,Mt)|0,g=g+Math.imul(Se,Ot)|0,_=_+Math.imul(Se,Mt)|0,E=E+Math.imul(ne,H)|0,g=g+Math.imul(ne,W)|0,g=g+Math.imul(te,H)|0,_=_+Math.imul(te,W)|0,E=E+Math.imul(q,fe)|0,g=g+Math.imul(q,ve)|0,g=g+Math.imul(X,fe)|0,_=_+Math.imul(X,ve)|0,E=E+Math.imul(k,ae)|0,g=g+Math.imul(k,ge)|0,g=g+Math.imul($,ae)|0,_=_+Math.imul($,ge)|0;var Hi=(L+E|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(Hi>>>26)|0,Hi&=67108863,E=Math.imul(_t,xt),g=Math.imul(_t,bt),g=g+Math.imul(Ye,xt)|0,_=Math.imul(Ye,bt),E=E+Math.imul(Ge,wt)|0,g=g+Math.imul(Ge,ot)|0,g=g+Math.imul(gt,wt)|0,_=_+Math.imul(gt,ot)|0,E=E+Math.imul(mt,ut)|0,g=g+Math.imul(mt,at)|0,g=g+Math.imul(ft,ut)|0,_=_+Math.imul(ft,at)|0,E=E+Math.imul(Rt,It)|0,g=g+Math.imul(Rt,At)|0,g=g+Math.imul(it,It)|0,_=_+Math.imul(it,At)|0,E=E+Math.imul(ct,Et)|0,g=g+Math.imul(ct,dt)|0,g=g+Math.imul(tt,Et)|0,_=_+Math.imul(tt,dt)|0,E=E+Math.imul(Xe,Ot)|0,g=g+Math.imul(Xe,Mt)|0,g=g+Math.imul(lt,Ot)|0,_=_+Math.imul(lt,Mt)|0,E=E+Math.imul(pe,H)|0,g=g+Math.imul(pe,W)|0,g=g+Math.imul(Se,H)|0,_=_+Math.imul(Se,W)|0,E=E+Math.imul(ne,fe)|0,g=g+Math.imul(ne,ve)|0,g=g+Math.imul(te,fe)|0,_=_+Math.imul(te,ve)|0,E=E+Math.imul(q,ae)|0,g=g+Math.imul(q,ge)|0,g=g+Math.imul(X,ae)|0,_=_+Math.imul(X,ge)|0,E=E+Math.imul(k,ye)|0,g=g+Math.imul(k,Ce)|0,g=g+Math.imul($,ye)|0,_=_+Math.imul($,Ce)|0;var qi=(L+E|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(qi>>>26)|0,qi&=67108863,E=Math.imul(_t,wt),g=Math.imul(_t,ot),g=g+Math.imul(Ye,wt)|0,_=Math.imul(Ye,ot),E=E+Math.imul(Ge,ut)|0,g=g+Math.imul(Ge,at)|0,g=g+Math.imul(gt,ut)|0,_=_+Math.imul(gt,at)|0,E=E+Math.imul(mt,It)|0,g=g+Math.imul(mt,At)|0,g=g+Math.imul(ft,It)|0,_=_+Math.imul(ft,At)|0,E=E+Math.imul(Rt,Et)|0,g=g+Math.imul(Rt,dt)|0,g=g+Math.imul(it,Et)|0,_=_+Math.imul(it,dt)|0,E=E+Math.imul(ct,Ot)|0,g=g+Math.imul(ct,Mt)|0,g=g+Math.imul(tt,Ot)|0,_=_+Math.imul(tt,Mt)|0,E=E+Math.imul(Xe,H)|0,g=g+Math.imul(Xe,W)|0,g=g+Math.imul(lt,H)|0,_=_+Math.imul(lt,W)|0,E=E+Math.imul(pe,fe)|0,g=g+Math.imul(pe,ve)|0,g=g+Math.imul(Se,fe)|0,_=_+Math.imul(Se,ve)|0,E=E+Math.imul(ne,ae)|0,g=g+Math.imul(ne,ge)|0,g=g+Math.imul(te,ae)|0,_=_+Math.imul(te,ge)|0,E=E+Math.imul(q,ye)|0,g=g+Math.imul(q,Ce)|0,g=g+Math.imul(X,ye)|0,_=_+Math.imul(X,Ce)|0;var wn=(L+E|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(wn>>>26)|0,wn&=67108863,E=Math.imul(_t,ut),g=Math.imul(_t,at),g=g+Math.imul(Ye,ut)|0,_=Math.imul(Ye,at),E=E+Math.imul(Ge,It)|0,g=g+Math.imul(Ge,At)|0,g=g+Math.imul(gt,It)|0,_=_+Math.imul(gt,At)|0,E=E+Math.imul(mt,Et)|0,g=g+Math.imul(mt,dt)|0,g=g+Math.imul(ft,Et)|0,_=_+Math.imul(ft,dt)|0,E=E+Math.imul(Rt,Ot)|0,g=g+Math.imul(Rt,Mt)|0,g=g+Math.imul(it,Ot)|0,_=_+Math.imul(it,Mt)|0,E=E+Math.imul(ct,H)|0,g=g+Math.imul(ct,W)|0,g=g+Math.imul(tt,H)|0,_=_+Math.imul(tt,W)|0,E=E+Math.imul(Xe,fe)|0,g=g+Math.imul(Xe,ve)|0,g=g+Math.imul(lt,fe)|0,_=_+Math.imul(lt,ve)|0,E=E+Math.imul(pe,ae)|0,g=g+Math.imul(pe,ge)|0,g=g+Math.imul(Se,ae)|0,_=_+Math.imul(Se,ge)|0,E=E+Math.imul(ne,ye)|0,g=g+Math.imul(ne,Ce)|0,g=g+Math.imul(te,ye)|0,_=_+Math.imul(te,Ce)|0;var lo=(L+E|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(lo>>>26)|0,lo&=67108863,E=Math.imul(_t,It),g=Math.imul(_t,At),g=g+Math.imul(Ye,It)|0,_=Math.imul(Ye,At),E=E+Math.imul(Ge,Et)|0,g=g+Math.imul(Ge,dt)|0,g=g+Math.imul(gt,Et)|0,_=_+Math.imul(gt,dt)|0,E=E+Math.imul(mt,Ot)|0,g=g+Math.imul(mt,Mt)|0,g=g+Math.imul(ft,Ot)|0,_=_+Math.imul(ft,Mt)|0,E=E+Math.imul(Rt,H)|0,g=g+Math.imul(Rt,W)|0,g=g+Math.imul(it,H)|0,_=_+Math.imul(it,W)|0,E=E+Math.imul(ct,fe)|0,g=g+Math.imul(ct,ve)|0,g=g+Math.imul(tt,fe)|0,_=_+Math.imul(tt,ve)|0,E=E+Math.imul(Xe,ae)|0,g=g+Math.imul(Xe,ge)|0,g=g+Math.imul(lt,ae)|0,_=_+Math.imul(lt,ge)|0,E=E+Math.imul(pe,ye)|0,g=g+Math.imul(pe,Ce)|0,g=g+Math.imul(Se,ye)|0,_=_+Math.imul(Se,Ce)|0;var co=(L+E|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(co>>>26)|0,co&=67108863,E=Math.imul(_t,Et),g=Math.imul(_t,dt),g=g+Math.imul(Ye,Et)|0,_=Math.imul(Ye,dt),E=E+Math.imul(Ge,Ot)|0,g=g+Math.imul(Ge,Mt)|0,g=g+Math.imul(gt,Ot)|0,_=_+Math.imul(gt,Mt)|0,E=E+Math.imul(mt,H)|0,g=g+Math.imul(mt,W)|0,g=g+Math.imul(ft,H)|0,_=_+Math.imul(ft,W)|0,E=E+Math.imul(Rt,fe)|0,g=g+Math.imul(Rt,ve)|0,g=g+Math.imul(it,fe)|0,_=_+Math.imul(it,ve)|0,E=E+Math.imul(ct,ae)|0,g=g+Math.imul(ct,ge)|0,g=g+Math.imul(tt,ae)|0,_=_+Math.imul(tt,ge)|0,E=E+Math.imul(Xe,ye)|0,g=g+Math.imul(Xe,Ce)|0,g=g+Math.imul(lt,ye)|0,_=_+Math.imul(lt,Ce)|0;var fo=(L+E|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(fo>>>26)|0,fo&=67108863,E=Math.imul(_t,Ot),g=Math.imul(_t,Mt),g=g+Math.imul(Ye,Ot)|0,_=Math.imul(Ye,Mt),E=E+Math.imul(Ge,H)|0,g=g+Math.imul(Ge,W)|0,g=g+Math.imul(gt,H)|0,_=_+Math.imul(gt,W)|0,E=E+Math.imul(mt,fe)|0,g=g+Math.imul(mt,ve)|0,g=g+Math.imul(ft,fe)|0,_=_+Math.imul(ft,ve)|0,E=E+Math.imul(Rt,ae)|0,g=g+Math.imul(Rt,ge)|0,g=g+Math.imul(it,ae)|0,_=_+Math.imul(it,ge)|0,E=E+Math.imul(ct,ye)|0,g=g+Math.imul(ct,Ce)|0,g=g+Math.imul(tt,ye)|0,_=_+Math.imul(tt,Ce)|0;var Oe=(L+E|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,E=Math.imul(_t,H),g=Math.imul(_t,W),g=g+Math.imul(Ye,H)|0,_=Math.imul(Ye,W),E=E+Math.imul(Ge,fe)|0,g=g+Math.imul(Ge,ve)|0,g=g+Math.imul(gt,fe)|0,_=_+Math.imul(gt,ve)|0,E=E+Math.imul(mt,ae)|0,g=g+Math.imul(mt,ge)|0,g=g+Math.imul(ft,ae)|0,_=_+Math.imul(ft,ge)|0,E=E+Math.imul(Rt,ye)|0,g=g+Math.imul(Rt,Ce)|0,g=g+Math.imul(it,ye)|0,_=_+Math.imul(it,Ce)|0;var jt=(L+E|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(jt>>>26)|0,jt&=67108863,E=Math.imul(_t,fe),g=Math.imul(_t,ve),g=g+Math.imul(Ye,fe)|0,_=Math.imul(Ye,ve),E=E+Math.imul(Ge,ae)|0,g=g+Math.imul(Ge,ge)|0,g=g+Math.imul(gt,ae)|0,_=_+Math.imul(gt,ge)|0,E=E+Math.imul(mt,ye)|0,g=g+Math.imul(mt,Ce)|0,g=g+Math.imul(ft,ye)|0,_=_+Math.imul(ft,Ce)|0;var zr=(L+E|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(zr>>>26)|0,zr&=67108863,E=Math.imul(_t,ae),g=Math.imul(_t,ge),g=g+Math.imul(Ye,ae)|0,_=Math.imul(Ye,ge),E=E+Math.imul(Ge,ye)|0,g=g+Math.imul(Ge,Ce)|0,g=g+Math.imul(gt,ye)|0,_=_+Math.imul(gt,Ce)|0;var St=(L+E|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(St>>>26)|0,St&=67108863,E=Math.imul(_t,ye),g=Math.imul(_t,Ce),g=g+Math.imul(Ye,ye)|0,_=Math.imul(Ye,Ce);var Dn=(L+E|0)+((g&8191)<<13)|0;return L=(_+(g>>>13)|0)+(Dn>>>26)|0,Dn&=67108863,O[0]=Be,O[1]=Ve,O[2]=Fe,O[3]=Lt,O[4]=ht,O[5]=Cs,O[6]=ii,O[7]=Vi,O[8]=Hi,O[9]=qi,O[10]=wn,O[11]=lo,O[12]=co,O[13]=fo,O[14]=Oe,O[15]=jt,O[16]=zr,O[17]=St,O[18]=Dn,L!==0&&(O[19]=L,S.length++),S};Math.imul||(w=b);function A(M,v,T){T.negative=v.negative^M.negative,T.length=M.length+v.length;for(var S=0,C=0,P=0;P>>26)|0,C+=O>>>26,O&=67108863}T.words[P]=L,S=O,O=C}return S!==0?T.words[P]=S:T.length--,T._strip()}function R(M,v,T){return A(M,v,T)}s.prototype.mulTo=function(v,T){var S,C=this.length+v.length;return this.length===10&&v.length===10?S=w(this,v,T):C<63?S=b(this,v,T):C<1024?S=A(this,v,T):S=R(this,v,T),S},s.prototype.mul=function(v){var T=new s(null);return T.words=new Array(this.length+v.length),this.mulTo(v,T)},s.prototype.mulf=function(v){var T=new s(null);return T.words=new Array(this.length+v.length),R(this,v,T)},s.prototype.imul=function(v){return this.clone().mulTo(v,this)},s.prototype.imuln=function(v){var T=v<0;T&&(v=-v),n(typeof v=="number"),n(v<67108864);for(var S=0,C=0;C>=26,S+=P/67108864|0,S+=O>>>26,this.words[C]=O&67108863}return S!==0&&(this.words[C]=S,this.length++),T?this.ineg():this},s.prototype.muln=function(v){return this.clone().imuln(v)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(v){var T=x(v);if(T.length===0)return new s(1);for(var S=this,C=0;C=0);var T=v%26,S=(v-T)/26,C=67108863>>>26-T<<26-T,P;if(T!==0){var O=0;for(P=0;P>>26-T}O&&(this.words[P]=O,this.length++)}if(S!==0){for(P=this.length-1;P>=0;P--)this.words[P+S]=this.words[P];for(P=0;P=0);var C;T?C=(T-T%26)/26:C=0;var P=v%26,O=Math.min((v-P)/26,this.length),L=67108863^67108863>>>P<O)for(this.length-=O,g=0;g=0&&(_!==0||g>=C);g--){var B=this.words[g]|0;this.words[g]=_<<26-P|B>>>P,_=B&L}return E&&_!==0&&(E.words[E.length++]=_),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(v,T,S){return n(this.negative===0),this.iushrn(v,T,S)},s.prototype.shln=function(v){return this.clone().ishln(v)},s.prototype.ushln=function(v){return this.clone().iushln(v)},s.prototype.shrn=function(v){return this.clone().ishrn(v)},s.prototype.ushrn=function(v){return this.clone().iushrn(v)},s.prototype.testn=function(v){n(typeof v=="number"&&v>=0);var T=v%26,S=(v-T)/26,C=1<=0);var T=v%26,S=(v-T)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=S)return this;if(T!==0&&S++,this.length=Math.min(S,this.length),T!==0){var C=67108863^67108863>>>T<=67108864;T++)this.words[T]-=67108864,T===this.length-1?this.words[T+1]=1:this.words[T+1]++;return this.length=Math.max(this.length,T+1),this},s.prototype.isubn=function(v){if(n(typeof v=="number"),n(v<67108864),v<0)return this.iaddn(-v);if(this.negative!==0)return this.negative=0,this.iaddn(v),this.negative=1,this;if(this.words[0]-=v,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var T=0;T>26)-(E/67108864|0),this.words[P+S]=O&67108863}for(;P>26,this.words[P+S]=O&67108863;if(L===0)return this._strip();for(n(L===-1),L=0,P=0;P>26,this.words[P]=O&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(v,T){var S=this.length-v.length,C=this.clone(),P=v,O=P.words[P.length-1]|0,L=this._countBits(O);S=26-L,S!==0&&(P=P.ushln(S),C.iushln(S),O=P.words[P.length-1]|0);var E=C.length-P.length,g;if(T!=="mod"){g=new s(null),g.length=E+1,g.words=new Array(g.length);for(var _=0;_=0;k--){var $=(C.words[P.length+k]|0)*67108864+(C.words[P.length+k-1]|0);for($=Math.min($/O|0,67108863),C._ishlnsubmul(P,$,k);C.negative!==0;)$--,C.negative=0,C._ishlnsubmul(P,1,k),C.isZero()||(C.negative^=1);g&&(g.words[k]=$)}return g&&g._strip(),C._strip(),T!=="div"&&S!==0&&C.iushrn(S),{div:g||null,mod:C}},s.prototype.divmod=function(v,T,S){if(n(!v.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var C,P,O;return this.negative!==0&&v.negative===0?(O=this.neg().divmod(v,T),T!=="mod"&&(C=O.div.neg()),T!=="div"&&(P=O.mod.neg(),S&&P.negative!==0&&P.iadd(v)),{div:C,mod:P}):this.negative===0&&v.negative!==0?(O=this.divmod(v.neg(),T),T!=="mod"&&(C=O.div.neg()),{div:C,mod:O.mod}):this.negative&v.negative?(O=this.neg().divmod(v.neg(),T),T!=="div"&&(P=O.mod.neg(),S&&P.negative!==0&&P.isub(v)),{div:O.div,mod:P}):v.length>this.length||this.cmp(v)<0?{div:new s(0),mod:this}:v.length===1?T==="div"?{div:this.divn(v.words[0]),mod:null}:T==="mod"?{div:null,mod:new s(this.modrn(v.words[0]))}:{div:this.divn(v.words[0]),mod:new s(this.modrn(v.words[0]))}:this._wordDiv(v,T)},s.prototype.div=function(v){return this.divmod(v,"div",!1).div},s.prototype.mod=function(v){return this.divmod(v,"mod",!1).mod},s.prototype.umod=function(v){return this.divmod(v,"mod",!0).mod},s.prototype.divRound=function(v){var T=this.divmod(v);if(T.mod.isZero())return T.div;var S=T.div.negative!==0?T.mod.isub(v):T.mod,C=v.ushrn(1),P=v.andln(1),O=S.cmp(C);return O<0||P===1&&O===0?T.div:T.div.negative!==0?T.div.isubn(1):T.div.iaddn(1)},s.prototype.modrn=function(v){var T=v<0;T&&(v=-v),n(v<=67108863);for(var S=(1<<26)%v,C=0,P=this.length-1;P>=0;P--)C=(S*C+(this.words[P]|0))%v;return T?-C:C},s.prototype.modn=function(v){return this.modrn(v)},s.prototype.idivn=function(v){var T=v<0;T&&(v=-v),n(v<=67108863);for(var S=0,C=this.length-1;C>=0;C--){var P=(this.words[C]|0)+S*67108864;this.words[C]=P/v|0,S=P%v}return this._strip(),T?this.ineg():this},s.prototype.divn=function(v){return this.clone().idivn(v)},s.prototype.egcd=function(v){n(v.negative===0),n(!v.isZero());var T=this,S=v.clone();T.negative!==0?T=T.umod(v):T=T.clone();for(var C=new s(1),P=new s(0),O=new s(0),L=new s(1),E=0;T.isEven()&&S.isEven();)T.iushrn(1),S.iushrn(1),++E;for(var g=S.clone(),_=T.clone();!T.isZero();){for(var B=0,k=1;!(T.words[0]&k)&&B<26;++B,k<<=1);if(B>0)for(T.iushrn(B);B-- >0;)(C.isOdd()||P.isOdd())&&(C.iadd(g),P.isub(_)),C.iushrn(1),P.iushrn(1);for(var $=0,V=1;!(S.words[0]&V)&&$<26;++$,V<<=1);if($>0)for(S.iushrn($);$-- >0;)(O.isOdd()||L.isOdd())&&(O.iadd(g),L.isub(_)),O.iushrn(1),L.iushrn(1);T.cmp(S)>=0?(T.isub(S),C.isub(O),P.isub(L)):(S.isub(T),O.isub(C),L.isub(P))}return{a:O,b:L,gcd:S.iushln(E)}},s.prototype._invmp=function(v){n(v.negative===0),n(!v.isZero());var T=this,S=v.clone();T.negative!==0?T=T.umod(v):T=T.clone();for(var C=new s(1),P=new s(0),O=S.clone();T.cmpn(1)>0&&S.cmpn(1)>0;){for(var L=0,E=1;!(T.words[0]&E)&&L<26;++L,E<<=1);if(L>0)for(T.iushrn(L);L-- >0;)C.isOdd()&&C.iadd(O),C.iushrn(1);for(var g=0,_=1;!(S.words[0]&_)&&g<26;++g,_<<=1);if(g>0)for(S.iushrn(g);g-- >0;)P.isOdd()&&P.iadd(O),P.iushrn(1);T.cmp(S)>=0?(T.isub(S),C.isub(P)):(S.isub(T),P.isub(C))}var B;return T.cmpn(1)===0?B=C:B=P,B.cmpn(0)<0&&B.iadd(v),B},s.prototype.gcd=function(v){if(this.isZero())return v.abs();if(v.isZero())return this.abs();var T=this.clone(),S=v.clone();T.negative=0,S.negative=0;for(var C=0;T.isEven()&&S.isEven();C++)T.iushrn(1),S.iushrn(1);do{for(;T.isEven();)T.iushrn(1);for(;S.isEven();)S.iushrn(1);var P=T.cmp(S);if(P<0){var O=T;T=S,S=O}else if(P===0||S.cmpn(1)===0)break;T.isub(S)}while(!0);return S.iushln(C)},s.prototype.invm=function(v){return this.egcd(v).a.umod(v)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(v){return this.words[0]&v},s.prototype.bincn=function(v){n(typeof v=="number");var T=v%26,S=(v-T)/26,C=1<>>26,L&=67108863,this.words[O]=L}return P!==0&&(this.words[O]=P,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(v){var T=v<0;if(this.negative!==0&&!T)return-1;if(this.negative===0&&T)return 1;this._strip();var S;if(this.length>1)S=1;else{T&&(v=-v),n(v<=67108863,"Number is too big");var C=this.words[0]|0;S=C===v?0:Cv.length)return 1;if(this.length=0;S--){var C=this.words[S]|0,P=v.words[S]|0;if(C!==P){CP&&(T=1);break}}return T},s.prototype.gtn=function(v){return this.cmpn(v)===1},s.prototype.gt=function(v){return this.cmp(v)===1},s.prototype.gten=function(v){return this.cmpn(v)>=0},s.prototype.gte=function(v){return this.cmp(v)>=0},s.prototype.ltn=function(v){return this.cmpn(v)===-1},s.prototype.lt=function(v){return this.cmp(v)===-1},s.prototype.lten=function(v){return this.cmpn(v)<=0},s.prototype.lte=function(v){return this.cmp(v)<=0},s.prototype.eqn=function(v){return this.cmpn(v)===0},s.prototype.eq=function(v){return this.cmp(v)===0},s.red=function(v){return new J(v)},s.prototype.toRed=function(v){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),v.convertTo(this)._forceRed(v)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(v){return this.red=v,this},s.prototype.forceRed=function(v){return n(!this.red,"Already a number in reduction context"),this._forceRed(v)},s.prototype.redAdd=function(v){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,v)},s.prototype.redIAdd=function(v){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,v)},s.prototype.redSub=function(v){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,v)},s.prototype.redISub=function(v){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,v)},s.prototype.redShl=function(v){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,v)},s.prototype.redMul=function(v){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.mul(this,v)},s.prototype.redIMul=function(v){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.imul(this,v)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(v){return n(this.red&&!v.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,v)};var N={k256:null,p224:null,p192:null,p25519:null};function I(M,v){this.name=M,this.p=new s(v,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}I.prototype._tmp=function(){var v=new s(null);return v.words=new Array(Math.ceil(this.n/13)),v},I.prototype.ireduce=function(v){var T=v,S;do this.split(T,this.tmp),T=this.imulK(T),T=T.iadd(this.tmp),S=T.bitLength();while(S>this.n);var C=S0?T.isub(this.p):T.strip!==void 0?T.strip():T._strip(),T},I.prototype.split=function(v,T){v.iushrn(this.n,0,T)},I.prototype.imulK=function(v){return v.imul(this.k)};function F(){I.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(F,I),F.prototype.split=function(v,T){for(var S=4194303,C=Math.min(v.length,9),P=0;P>>22,O=L}O>>>=22,v.words[P-10]=O,O===0&&v.length>10?v.length-=10:v.length-=9},F.prototype.imulK=function(v){v.words[v.length]=0,v.words[v.length+1]=0,v.length+=2;for(var T=0,S=0;S>>=26,v.words[S]=P,T=C}return T!==0&&(v.words[v.length++]=T),v},s._prime=function(v){if(N[v])return N[v];var T;if(v==="k256")T=new F;else if(v==="p224")T=new j;else if(v==="p192")T=new U;else if(v==="p25519")T=new Y;else throw new Error("Unknown prime "+v);return N[v]=T,T};function J(M){if(typeof M=="string"){var v=s._prime(M);this.m=v.p,this.prime=v}else n(M.gtn(1),"modulus must be greater than 1"),this.m=M,this.prime=null}J.prototype._verify1=function(v){n(v.negative===0,"red works only with positives"),n(v.red,"red works only with red numbers")},J.prototype._verify2=function(v,T){n((v.negative|T.negative)===0,"red works only with positives"),n(v.red&&v.red===T.red,"red works only with red numbers")},J.prototype.imod=function(v){return this.prime?this.prime.ireduce(v)._forceRed(this):(f(v,v.umod(this.m)._forceRed(this)),v)},J.prototype.neg=function(v){return v.isZero()?v.clone():this.m.sub(v)._forceRed(this)},J.prototype.add=function(v,T){this._verify2(v,T);var S=v.add(T);return S.cmp(this.m)>=0&&S.isub(this.m),S._forceRed(this)},J.prototype.iadd=function(v,T){this._verify2(v,T);var S=v.iadd(T);return S.cmp(this.m)>=0&&S.isub(this.m),S},J.prototype.sub=function(v,T){this._verify2(v,T);var S=v.sub(T);return S.cmpn(0)<0&&S.iadd(this.m),S._forceRed(this)},J.prototype.isub=function(v,T){this._verify2(v,T);var S=v.isub(T);return S.cmpn(0)<0&&S.iadd(this.m),S},J.prototype.shl=function(v,T){return this._verify1(v),this.imod(v.ushln(T))},J.prototype.imul=function(v,T){return this._verify2(v,T),this.imod(v.imul(T))},J.prototype.mul=function(v,T){return this._verify2(v,T),this.imod(v.mul(T))},J.prototype.isqr=function(v){return this.imul(v,v.clone())},J.prototype.sqr=function(v){return this.mul(v,v)},J.prototype.sqrt=function(v){if(v.isZero())return v.clone();var T=this.m.andln(3);if(n(T%2===1),T===3){var S=this.m.add(new s(1)).iushrn(2);return this.pow(v,S)}for(var C=this.m.subn(1),P=0;!C.isZero()&&C.andln(1)===0;)P++,C.iushrn(1);n(!C.isZero());var O=new s(1).toRed(this),L=O.redNeg(),E=this.m.subn(1).iushrn(1),g=this.m.bitLength();for(g=new s(2*g*g).toRed(this);this.pow(g,E).cmp(L)!==0;)g.redIAdd(L);for(var _=this.pow(g,C),B=this.pow(v,C.addn(1).iushrn(1)),k=this.pow(v,C),$=P;k.cmp(O)!==0;){for(var V=k,q=0;V.cmp(O)!==0;q++)V=V.redSqr();n(q<$);var X=this.pow(_,new s(1).iushln($-q-1));B=B.redMul(X),_=X.redSqr(),k=k.redMul(_),$=q}return B},J.prototype.invm=function(v){var T=v._invmp(this.m);return T.negative!==0?(T.negative=0,this.imod(T).redNeg()):this.imod(T)},J.prototype.pow=function(v,T){if(T.isZero())return new s(1).toRed(this);if(T.cmpn(1)===0)return v.clone();var S=4,C=new Array(1<=0;P--){for(var _=T.words[P],B=g-1;B>=0;B--){var k=_>>B&1;if(O!==C[0]&&(O=this.sqr(O)),k===0&&L===0){E=0;continue}L<<=1,L|=k,E++,!(E!==S&&(P!==0||B!==0))&&(O=this.mul(O,C[L]),E=0,L=0)}g=26}return O},J.prototype.convertTo=function(v){var T=v.umod(this.m);return T===v?T.clone():T},J.prototype.convertFrom=function(v){var T=v.clone();return T.red=null,T},s.mont=function(v){return new Z(v)};function Z(M){J.call(this,M),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(Z,J),Z.prototype.convertTo=function(v){return this.imod(v.ushln(this.shift))},Z.prototype.convertFrom=function(v){var T=this.imod(v.mul(this.rinv));return T.red=null,T},Z.prototype.imul=function(v,T){if(v.isZero()||T.isZero())return v.words[0]=0,v.length=1,v;var S=v.imul(T),C=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),P=S.isub(C).iushrn(this.shift),O=P;return P.cmp(this.m)>=0?O=P.isub(this.m):P.cmpn(0)<0&&(O=P.iadd(this.m)),O._forceRed(this)},Z.prototype.mul=function(v,T){if(v.isZero()||T.isZero())return new s(0)._forceRed(this);var S=v.mul(T),C=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),P=S.isub(C).iushrn(this.shift),O=P;return P.cmp(this.m)>=0?O=P.isub(this.m):P.cmpn(0)<0&&(O=P.iadd(this.m)),O._forceRed(this)},Z.prototype.invm=function(v){var T=this.imod(v._invmp(this.m).mul(this.r2));return T._forceRed(this)}})(t,mk)})(yx);var lH=yx.exports;const Le=ro(lH),cH="logger/5.7.0";let qE=!1,WE=!1;const ih={debug:1,default:2,info:2,warning:3,error:4,off:5};let GE=ih.default,D1=null;function fH(){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 KE=fH();var Hy;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(Hy||(Hy={}));var Pi;(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"})(Pi||(Pi={}));const YE="0123456789abcdef";let Q=class Rr{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();ih[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(GE>ih[n])&&console.log.apply(console,r)}debug(...e){this._log(Rr.levels.DEBUG,e)}info(...e){this._log(Rr.levels.INFO,e)}warn(...e){this._log(Rr.levels.WARNING,e)}makeError(e,r,n){if(WE)return this.makeError("censored error",r,{});r||(r=Rr.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(l=>{const c=n[l];try{if(c instanceof Uint8Array){let f="";for(let u=0;u>4],f+=YE[c[u]&15];i.push(l+"=Uint8Array(0x"+f+")")}else i.push(l+"="+JSON.stringify(c))}catch{i.push(l+"="+JSON.stringify(n[l].toString()))}}),i.push(`code=${r}`),i.push(`version=${this.version}`);const s=e;let o="";switch(r){case Pi.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 Pi.CALL_EXCEPTION:case Pi.INSUFFICIENT_FUNDS:case Pi.MISSING_NEW:case Pi.NONCE_EXPIRED:case Pi.REPLACEMENT_UNDERPRICED:case Pi.TRANSACTION_REPLACED:case Pi.UNPREDICTABLE_GAS_LIMIT:o=r;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const a=new Error(e);return a.reason=s,a.code=r,Object.keys(n).forEach(function(l){a[l]=n[l]}),a}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,Rr.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,i){e||this.throwError(r,n,i)}assertArgument(e,r,n,i){e||this.throwArgumentError(r,n,i)}checkNormalize(e){KE&&this.throwError("platform missing String.prototype.normalize",Rr.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:KE})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,Rr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,Rr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,Rr.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",Rr.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",Rr.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",Rr.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return D1||(D1=new Rr(cH)),D1}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",Rr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),qE){if(!e)return;this.globalLogger().throwError("error censorship permanent",Rr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}WE=!!e,qE=!!r}static setLogLevel(e){const r=ih[e.toLowerCase()];if(r==null){Rr.globalLogger().warn("invalid log level - "+e);return}GE=r}static from(e){return new Rr(e)}};Q.errors=Pi;Q.levels=Hy;const uH="bytes/5.7.0",or=new Q(uH);function n7(t){return!!t.toHexString}function ql(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return ql(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function xv(t){return Ze(t)&&!(t.length%2)||Cc(t)}function QE(t){return typeof t=="number"&&t==t&&t%1===0}function Cc(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!QE(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function de(t,e){if(e||(e={}),typeof t=="number"){or.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),ql(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),n7(t)&&(t=t.toHexString()),Ze(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":or.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;ide(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),ql(n)}function Hs(t){let e=de(t);if(e.length===0)return e;let r=0;for(;re&&or.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),ql(r)}function Ze(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const L1="0123456789abcdef";function he(t,e){if(e||(e={}),typeof t=="number"){or.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=L1[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),n7(t))return t.toHexString();if(Ze(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":or.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Cc(t)){let r="0x";for(let n=0;n>4]+L1[i&15]}return r}return or.throwArgumentError("invalid hexlify value","value",t)}function Va(t){if(typeof t!="string")t=he(t);else if(!Ze(t)||t.length%2)return null;return(t.length-2)/2}function Ir(t,e,r){return typeof t!="string"?t=he(t):(!Ze(t)||t.length%2)&&or.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function Sn(t){let e="0x";return t.forEach(r=>{e+=he(r).substring(2)}),e}function mx(t){const e=hH(he(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function hH(t){typeof t!="string"&&(t=he(t)),Ze(t)||or.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&or.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function kc(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(xv(t)){let r=de(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=he(r.slice(0,32)),e.s=he(r.slice(32,64))):r.length===65?(e.r=he(r.slice(0,32)),e.s=he(r.slice(32,64)),e.v=r[64]):or.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:or.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=he(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=dH(de(e._vs),32);e._vs=he(i);const s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&or.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const o=he(i);e.s==null?e.s=o:e.s!==o&&or.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?or.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&&or.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!Ze(e.r)?or.throwArgumentError("signature missing or invalid r","signature",t):e.r=Ht(e.r,32),e.s==null||!Ze(e.s)?or.throwArgumentError("signature missing or invalid s","signature",t):e.s=Ht(e.s,32);const r=de(e.s);r[0]>=128&&or.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=he(r);e._vs&&(Ze(e._vs)||or.throwArgumentError("signature invalid _vs","signature",t),e._vs=Ht(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&or.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function JE(t){return t=kc(t),he(wr([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const i7="bignumber/5.7.0";var s0=Le.BN;const _s=new Q(i7),j1={},XE=9007199254740991;function vH(t){return t!=null&&(ce.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Ze(t)||typeof t=="bigint"||Cc(t))}let ZE=!1;class ce{constructor(e,r){e!==j1&&_s.throwError("cannot call constructor directly; use BigNumber.from",Q.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return An(He(this).fromTwos(e))}toTwos(e){return An(He(this).toTwos(e))}abs(){return this._hex[0]==="-"?ce.from(this._hex.substring(1)):this}add(e){return An(He(this).add(He(e)))}sub(e){return An(He(this).sub(He(e)))}div(e){return ce.from(e).isZero()&&oi("division-by-zero","div"),An(He(this).div(He(e)))}mul(e){return An(He(this).mul(He(e)))}mod(e){const r=He(e);return r.isNeg()&&oi("division-by-zero","mod"),An(He(this).umod(r))}pow(e){const r=He(e);return r.isNeg()&&oi("negative-power","pow"),An(He(this).pow(r))}and(e){const r=He(e);return(this.isNegative()||r.isNeg())&&oi("unbound-bitwise-result","and"),An(He(this).and(r))}or(e){const r=He(e);return(this.isNegative()||r.isNeg())&&oi("unbound-bitwise-result","or"),An(He(this).or(r))}xor(e){const r=He(e);return(this.isNegative()||r.isNeg())&&oi("unbound-bitwise-result","xor"),An(He(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&oi("negative-width","mask"),An(He(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&oi("negative-width","shl"),An(He(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&oi("negative-width","shr"),An(He(this).shrn(e))}eq(e){return He(this).eq(He(e))}lt(e){return He(this).lt(He(e))}lte(e){return He(this).lte(He(e))}gt(e){return He(this).gt(He(e))}gte(e){return He(this).gte(He(e))}isNegative(){return this._hex[0]==="-"}isZero(){return He(this).isZero()}toNumber(){try{return He(this).toNumber()}catch{oi("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return _s.throwError("this platform does not support BigInt",Q.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?ZE||(ZE=!0,_s.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?_s.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",Q.errors.UNEXPECTED_ARGUMENT,{}):_s.throwError("BigNumber.toString does not accept parameters",Q.errors.UNEXPECTED_ARGUMENT,{})),He(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof ce)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new ce(j1,ou(e)):e.match(/^-?[0-9]+$/)?new ce(j1,ou(new s0(e))):_s.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&oi("underflow","BigNumber.from",e),(e>=XE||e<=-XE)&&oi("overflow","BigNumber.from",e),ce.from(String(e));const r=e;if(typeof r=="bigint")return ce.from(r.toString());if(Cc(r))return ce.from(he(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return ce.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(Ze(n)||n[0]==="-"&&Ze(n.substring(1))))return ce.from(n)}return _s.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function ou(t){if(typeof t!="string")return ou(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&_s.throwArgumentError("invalid hex","value",t),t=ou(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 An(t){return ce.from(ou(t))}function He(t){const e=ce.from(t).toHexString();return e[0]==="-"?new s0("-"+e.substring(3),16):new s0(e.substring(2),16)}function oi(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),_s.throwError(t,Q.errors.NUMERIC_FAULT,n)}function pH(t){return new s0(t,36).toString(16)}const mn=new Q(i7),Tf={},s7=ce.from(0),o7=ce.from(-1);function a7(t,e,r,n){const i={fault:e,operation:r};return n!==void 0&&(i.value=n),mn.throwError(t,Q.errors.NUMERIC_FAULT,i)}let Pf="0";for(;Pf.length<256;)Pf+=Pf;function gx(t){if(typeof t!="number")try{t=ce.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+Pf.substring(0,t):mn.throwArgumentError("invalid decimal size","decimals",t)}function sh(t,e){e==null&&(e=0);const r=gx(e);t=ce.from(t);const n=t.lt(s7);n&&(t=t.mul(o7));let i=t.mod(r).toString();for(;i.length2&&mn.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&&a7("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?l:(typeof e[o]!==a&&mn.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&&mn.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&mn.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new Wl(Tf,r,n,i)}}class qr{constructor(e,r,n,i){e!==Tf&&mn.throwError("cannot use FixedNumber constructor; use FixedNumber.from",Q.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&mn.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=Yi(this._value,this.format.decimals),n=Yi(e._value,e.format.decimals);return qr.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=Yi(this._value,this.format.decimals),n=Yi(e._value,e.format.decimals);return qr.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=Yi(this._value,this.format.decimals),n=Yi(e._value,e.format.decimals);return qr.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=Yi(this._value,this.format.decimals),n=Yi(e._value,e.format.decimals);return qr.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=qr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(eS.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=qr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(eS.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)&&mn.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=qr.from("1"+Pf.substring(0,e),this.format),i=yH.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&&mn.throwArgumentError("invalid byte width","width",e);const r=ce.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return Ht(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return qr.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!vH(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),qr.fromString(sh(e,r),Wl.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=Wl.from(r),i=Yi(e,n.decimals);!n.signed&&i.lt(s7)&&a7("unsigned value cannot be negative","overflow","value",e);let s=null;n.signed?s=i.toTwos(n.width).toHexString():(s=i.toHexString(),s=Ht(s,n.width/8));const o=sh(i,n.decimals);return new qr(Tf,s,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=Wl.from(r);if(de(e).length>n.width/8)throw new Error("overflow");let i=ce.from(e);n.signed&&(i=i.fromTwos(n.width));const s=i.toTwos((n.signed?0:1)+n.width).toHexString(),o=sh(i,n.decimals);return new qr(Tf,s,o,n)}static from(e,r){if(typeof e=="string")return qr.fromString(e,r);if(Cc(e))return qr.fromBytes(e,r);try{return qr.fromValue(e,0,r)}catch(n){if(n.code!==Q.errors.INVALID_ARGUMENT)throw n}return mn.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const eS=qr.from(1),yH=qr.from("0.5"),mH="properties/5.7.0";var gH=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const o0=new Q(mH);function se(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function os(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 yr(t){return gH(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 l7(t,e){(!t||typeof t!="object")&&o0.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||o0.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function Nr(t){const e={};for(const r in t)e[r]=t[r];return e}const xH={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function c7(t){if(t==null||xH[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;rHa(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&se(e,r,Ha(n))}return e}return o0.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function Ha(t){return bH(t)}class nl{constructor(e){for(const r in e)this[r]=Ha(e[r])}}const Bu="abi/5.7.0",Ke=new Q(Bu),qa={};let tS={calldata:!0,memory:!0,storage:!0},wH={calldata:!0,memory:!0};function Ad(t,e){if(t==="bytes"||t==="string"){if(tS[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&wH[e])return!0;return(tS[e]||e==="payable")&&Ke.throwArgumentError("invalid modifier","name",e),!1}function AH(t,e){let r=t;function n(a){Ke.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!==nt.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===nt.full?", ":",")+")"):r+=this.type,e!==nt.sighash&&(this.indexed===!0&&(r+=" indexed"),e===nt.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?Fr.fromString(e,r):Fr.fromObject(e)}static fromObject(e){return Fr.isParamType(e)?e:new Fr(qa,{name:e.name||null,type:yl(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(Fr.fromObject):null})}static fromString(e,r){function n(i){return Fr.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(AH(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function au(t,e){return CH(t).map(r=>Fr.fromString(r,e))}class $s{constructor(e,r){e!==qa&&Ke.throwError("use a static from method",Q.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),oh(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return $s.isFragment(e)?e:typeof e=="string"?$s.fromString(e):$s.fromObject(e)}static fromObject(e){if($s.isFragment(e))return e;switch(e.type){case"function":return ns.fromObject(e);case"event":return Ds.fromObject(e);case"constructor":return rs.fromObject(e);case"error":return ko.fromObject(e);case"fallback":case"receive":return null}return Ke.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"?Ds.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?ns.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?rs.fromString(e.trim()):e.split(" ")[0]==="error"?ko.fromString(e.substring(5).trim()):Ke.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class Ds extends $s{format(e){if(e||(e=nt.sighash),nt[e]||Ke.throwArgumentError("invalid format type","format",e),e===nt.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!==nt.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===nt.full?", ":",")+") ",e!==nt.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?Ds.fromString(e):Ds.fromObject(e)}static fromObject(e){if(Ds.isEventFragment(e))return e;e.type!=="event"&&Ke.throwArgumentError("invalid event object","value",e);const r={name:lu(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(Fr.fromObject):[],type:"event"};return new Ds(qa,r)}static fromString(e){let r=e.match(cu);r||Ke.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:Ke.warn("unknown modifier: "+i)}}),Ds.fromObject({name:r[1].trim(),anonymous:n,inputs:au(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function f7(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&Ke.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||Ke.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=ce.from(r[1]),r[0]):t}function u7(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 d7(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&&Ke.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&Ke.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"&&Ke.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&&Ke.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"&&Ke.throwArgumentError("unable to determine stateMutability","value",t),e}class rs extends $s{format(e){if(e||(e=nt.sighash),nt[e]||Ke.throwArgumentError("invalid format type","format",e),e===nt.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===nt.sighash&&Ke.throwError("cannot format a constructor for sighash",Q.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===nt.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?rs.fromString(e):rs.fromObject(e)}static fromObject(e){if(rs.isConstructorFragment(e))return e;e.type!=="constructor"&&Ke.throwArgumentError("invalid constructor object","value",e);let r=d7(e);r.constant&&Ke.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(Fr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?ce.from(e.gas):null};return new rs(qa,n)}static fromString(e){let r={type:"constructor"};e=f7(e,r);let n=e.match(cu);return(!n||n[1].trim()!=="constructor")&&Ke.throwArgumentError("invalid constructor string","value",e),r.inputs=au(n[2].trim(),!1),u7(n[3].trim(),r),rs.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class ns extends rs{format(e){if(e||(e=nt.sighash),nt[e]||Ke.throwArgumentError("invalid format type","format",e),e===nt.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!==nt.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===nt.full?", ":",")+") ",e!==nt.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"?ns.fromString(e):ns.fromObject(e)}static fromObject(e){if(ns.isFunctionFragment(e))return e;e.type!=="function"&&Ke.throwArgumentError("invalid function object","value",e);let r=d7(e);const n={type:e.type,name:lu(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(Fr.fromObject):[],outputs:e.outputs?e.outputs.map(Fr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?ce.from(e.gas):null};return new ns(qa,n)}static fromString(e){let r={type:"function"};e=f7(e,r);let n=e.split(" returns ");n.length>2&&Ke.throwArgumentError("invalid function string","value",e);let i=n[0].match(cu);if(i||Ke.throwArgumentError("invalid function signature","value",e),r.name=i[1].trim(),r.name&&lu(r.name),r.inputs=au(i[2],!1),u7(i[3].trim(),r),n.length>1){let s=n[1].match(cu);(s[1].trim()!=""||s[3].trim()!="")&&Ke.throwArgumentError("unexpected tokens","value",e),r.outputs=au(s[2],!1)}else r.outputs=[];return ns.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function rS(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Ke.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class ko extends $s{format(e){if(e||(e=nt.sighash),nt[e]||Ke.throwArgumentError("invalid format type","format",e),e===nt.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==nt.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===nt.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?ko.fromString(e):ko.fromObject(e)}static fromObject(e){if(ko.isErrorFragment(e))return e;e.type!=="error"&&Ke.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:lu(e.name),inputs:e.inputs?e.inputs.map(Fr.fromObject):[]};return rS(new ko(qa,r))}static fromString(e){let r={type:"error"},n=e.match(cu);return n||Ke.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&lu(r.name),r.inputs=au(n[2],!1),rS(ko.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function yl(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const SH=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function lu(t){return(!t||!t.match(SH))&&Ke.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const cu=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function CH(t){t=t.trim();let e=[],r="",n=0;for(let i=0;ithis.wordSize&&xx.throwError("value out-of-bounds",Q.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=wr([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 a0{constructor(e,r,n,i){se(this,"_data",de(e)),se(this,"wordSize",r||32),se(this,"_coerceFunc",n),se(this,"allowLoose",i),this._offset=0}get data(){return he(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):a0.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:xx.throwError("data out-of-bounds",Q.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new a0(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 ce.from(this.readBytes(this.wordSize))}}var h7={exports:{}};/** +}`.replace(/ {2}|\n/g,""),rq=function(e){var r=e.onSuccess,n=e.onError,i=e.skipScript,s=i===void 0?!1:i,o=e.authOptions,a=e.iconProps,l=e.render,c=e.uiType,f=c===void 0?"dark":c,u=e.className,d=e.noDefaultStyle,h=d===void 0?!1:d,p=e.buttonExtraChildren,m=p===void 0?"Continue with Apple":p,x=ZV(e,QV);(0,YV.default)(s?null:VA.default.APPLE_SCRIPT_SRC);var b=function(R){R&&(R.preventDefault(),R.stopPropagation()),VA.default.signIn({authOptions:o,onSuccess:r,onError:n})},w=JV({children:Gi.default.createElement(Gi.default.Fragment,null,Gi.default.createElement("svg",s0({width:"24px",height:"44px",viewBox:"0 0 24 44"},a),Gi.default.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},Gi.default.createElement("rect",{fill:f==="light"?"#FFF":"#000",x:"0",y:"0",width:"24",height:"44"}),Gi.default.createElement("path",{d:"M12.2337427,16.9879688 C12.8896607,16.9879688 13.7118677,16.5445313 14.2014966,15.9532812 C14.6449341,15.4174609 14.968274,14.6691602 14.968274,13.9208594 C14.968274,13.8192383 14.9590357,13.7176172 14.9405591,13.6344727 C14.2107349,13.6621875 13.3330982,14.1241016 12.8065162,14.7430664 C12.3907935,15.2142188 12.012024,15.9532812 12.012024,16.7108203 C12.012024,16.8216797 12.0305005,16.9325391 12.0397388,16.9694922 C12.0859302,16.9787305 12.1598365,16.9879688 12.2337427,16.9879688 Z M9.92417241,28.1662891 C10.8202857,28.1662891 11.2175318,27.5658008 12.3353638,27.5658008 C13.4716724,27.5658008 13.721106,28.1478125 14.7188404,28.1478125 C15.6980982,28.1478125 16.3540162,27.2424609 16.972981,26.3555859 C17.6658521,25.339375 17.9522388,24.3416406 17.9707154,24.2954492 C17.9060474,24.2769727 16.0306763,23.5101953 16.0306763,21.3576758 C16.0306763,19.491543 17.5088013,18.6508594 17.5919459,18.5861914 C16.612688,17.1819727 15.1253248,17.1450195 14.7188404,17.1450195 C13.6194849,17.1450195 12.7233716,17.8101758 12.1598365,17.8101758 C11.5501099,17.8101758 10.7463794,17.1819727 9.79483648,17.1819727 C7.98413335,17.1819727 6.14571538,18.6785742 6.14571538,21.5054883 C6.14571538,23.2607617 6.8293482,25.1176563 7.67003179,26.3186328 C8.39061773,27.3348438 9.01882085,28.1662891 9.92417241,28.1662891 Z",fill:f==="light"?"#000":"#FFF",fillRule:"nonzero"}))),m),onClick:b},x);return l?l(w):Gi.default.createElement(Gi.default.Fragment,null,Gi.default.createElement("button",s0({className:"".concat(h?"":"react-apple-signin-auth-btn react-apple-signin-auth-btn-".concat(f)).concat(u?" ".concat(u):""),type:"button","aria-label":"Signin with apple ID"},w)),h?null:Gi.default.createElement("style",null,tq))},nq=rq;gv.default=nq;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"appleAuthHelpers",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"useScript",{enumerable:!0,get:function(){return n.default}}),t.default=void 0;var e=i(gv),r=i(Fu),n=i(ju);function i(o){return o&&o.__esModule?o:{default:o}}var s=e.default;t.default=s})(e7);const t7=ro(e7);var iq="_1csw4y80 _1qxj1ib9 _1qxj1ibc _1qxj1ib2 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8";const r7=t=>{const{value:e,digits:r=6,onChange:n,disabled:i=!1}=t,s=y.useMemo(()=>HA(0,r).map(()=>y.createRef()),[]);y.useEffect(()=>{var c,f;(f=(c=s[0])==null?void 0:c.current)==null||f.focus()},[]);const o=(c,f)=>{var d,h;/^\d$/.test(f)||(f="");const u=[...e];u[c]=f,f!==""&&((h=(d=s[c+1])==null?void 0:d.current)==null||h.focus()),n(u)},a=(c,f)=>{var p,m;const u=s[c].current,d=(p=s[c-1])==null?void 0:p.current,h=(m=s[c+1])==null?void 0:m.current;switch(f.key){case"Backspace":f.preventDefault(),u&&(u.value="",o(c,"")),d==null||d.focus();break;case"ArrowLeft":f.preventDefault(),d==null||d.focus();break;case"ArrowRight":f.preventDefault(),h==null||h.focus();break;default:(u==null?void 0:u.value)===f.key&&(f.preventDefault(),o(c,f.key))}},l=(c,f)=>{var h,p;const d=f.clipboardData.getData("text/plain").replace(/\D/g,"");/^\d{6}$/.test(d)&&((p=(h=s[0])==null?void 0:h.current)==null||p.focus(),n(d.split("")),setTimeout(()=>{var m,x;(x=(m=s[s.length-1])==null?void 0:m.current)==null||x.focus()}))};return D.jsx(G,{gap:"2",children:HA(0,r).map(c=>D.jsxs(y.Fragment,{children:[c===r/2&&D.jsx("span",{}),D.jsx(G,{as:"input",className:iq,value:e[c]||"",ref:s[c],type:"text",inputMode:"numeric",maxLength:1,disabled:i,onFocus:f=>f.target.select(),onPaste:f=>l(c,f),onChange:f=>o(c,f.target.value),onKeyDown:f=>{a(c,f)}})]},c))})},HA=(t,e)=>Array.from({length:e-t},(r,n)=>n+t),n7=()=>D.jsxs(G,{gap:"2",flexDirection:"column",borderStyle:"solid",width:"1/3",padding:"4",borderWidth:"thin",borderColor:"borderNormal",borderRadius:"sm",children:[D.jsx(me,{variant:"xlarge",fontWeight:"bold",color:"gnosisLight",children:"Demo App"}),D.jsx(me,{variant:"normal",marginLeft:"auto",color:"polygonLight",children:"Showcasing WaaS"})]});var yx={exports:{}};const sq={},oq=Object.freeze(Object.defineProperty({__proto__:null,default:sq},Symbol.toStringTag,{value:"Module"})),aq=AP(oq);yx.exports;(function(t){(function(e,r){function n(M,v){if(!M)throw new Error(v||"Assertion failed")}function i(M,v){M.super_=v;var T=function(){};T.prototype=v.prototype,M.prototype=new T,M.prototype.constructor=M}function s(M,v,T){if(s.isBN(M))return M;this.negative=0,this.words=null,this.length=0,this.red=null,M!==null&&((v==="le"||v==="be")&&(T=v,v=10),this._init(M||0,v||10,T||"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=aq.Buffer}catch{}s.isBN=function(v){return v instanceof s?!0:v!==null&&typeof v=="object"&&v.constructor.wordSize===s.wordSize&&Array.isArray(v.words)},s.max=function(v,T){return v.cmp(T)>0?v:T},s.min=function(v,T){return v.cmp(T)<0?v:T},s.prototype._init=function(v,T,S){if(typeof v=="number")return this._initNumber(v,T,S);if(typeof v=="object")return this._initArray(v,T,S);T==="hex"&&(T=16),n(T===(T|0)&&T>=2&&T<=36),v=v.toString().replace(/\s+/g,"");var C=0;v[0]==="-"&&(C++,this.negative=1),C=0;C-=3)O=v[C]|v[C-1]<<8|v[C-2]<<16,this.words[P]|=O<>>26-L&67108863,L+=24,L>=26&&(L-=26,P++);else if(S==="le")for(C=0,P=0;C>>26-L&67108863,L+=24,L>=26&&(L-=26,P++);return this._strip()};function a(M,v){var T=M.charCodeAt(v);if(T>=48&&T<=57)return T-48;if(T>=65&&T<=70)return T-55;if(T>=97&&T<=102)return T-87;n(!1,"Invalid character in "+M)}function l(M,v,T){var S=a(M,T);return T-1>=v&&(S|=a(M,T-1)<<4),S}s.prototype._parseHex=function(v,T,S){this.length=Math.ceil((v.length-T)/6),this.words=new Array(this.length);for(var C=0;C=T;C-=2)L=l(v,T,C)<=18?(P-=18,O+=1,this.words[O]|=L>>>26):P+=8;else{var A=v.length-T;for(C=A%2===0?T+1:T;C=18?(P-=18,O+=1,this.words[O]|=L>>>26):P+=8}this._strip()};function c(M,v,T,S){for(var C=0,P=0,O=Math.min(M.length,T),L=v;L=49?P=A-49+10:A>=17?P=A-17+10:P=A,n(A>=0&&P1&&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 d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[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],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(v,T){v=v||10,T=T|0||1;var S;if(v===16||v==="hex"){S="";for(var C=0,P=0,O=0;O>>24-C&16777215,C+=2,C>=26&&(C-=26,O--),P!==0||O!==this.length-1?S=d[6-A.length]+A+S:S=A+S}for(P!==0&&(S=P.toString(16)+S);S.length%T!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}if(v===(v|0)&&v>=2&&v<=36){var g=h[v],_=p[v];S="";var B=this.clone();for(B.negative=0;!B.isZero();){var k=B.modrn(_).toString(v);B=B.idivn(_),B.isZero()?S=k+S:S=d[g-k.length]+k+S}for(this.isZero()&&(S="0"+S);S.length%T!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var v=this.words[0];return this.length===2?v+=this.words[1]*67108864:this.length===3&&this.words[2]===1?v+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-v:v},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(v,T){return this.toArrayLike(o,v,T)}),s.prototype.toArray=function(v,T){return this.toArrayLike(Array,v,T)};var m=function(v,T){return v.allocUnsafe?v.allocUnsafe(T):new v(T)};s.prototype.toArrayLike=function(v,T,S){this._strip();var C=this.byteLength(),P=S||Math.max(1,C);n(C<=P,"byte array longer than desired length"),n(P>0,"Requested array length <= 0");var O=m(v,P),L=T==="le"?"LE":"BE";return this["_toArrayLike"+L](O,C),O},s.prototype._toArrayLikeLE=function(v,T){for(var S=0,C=0,P=0,O=0;P>8&255),S>16&255),O===6?(S>24&255),C=0,O=0):(C=L>>>24,O+=2)}if(S=0&&(v[S--]=L>>8&255),S>=0&&(v[S--]=L>>16&255),O===6?(S>=0&&(v[S--]=L>>24&255),C=0,O=0):(C=L>>>24,O+=2)}if(S>=0)for(v[S--]=C;S>=0;)v[S--]=0},Math.clz32?s.prototype._countBits=function(v){return 32-Math.clz32(v)}:s.prototype._countBits=function(v){var T=v,S=0;return T>=4096&&(S+=13,T>>>=13),T>=64&&(S+=7,T>>>=7),T>=8&&(S+=4,T>>>=4),T>=2&&(S+=2,T>>>=2),S+T},s.prototype._zeroBits=function(v){if(v===0)return 26;var T=v,S=0;return T&8191||(S+=13,T>>>=13),T&127||(S+=7,T>>>=7),T&15||(S+=4,T>>>=4),T&3||(S+=2,T>>>=2),T&1||S++,S},s.prototype.bitLength=function(){var v=this.words[this.length-1],T=this._countBits(v);return(this.length-1)*26+T};function x(M){for(var v=new Array(M.bitLength()),T=0;T>>C&1}return v}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var v=0,T=0;Tv.length?this.clone().ior(v):v.clone().ior(this)},s.prototype.uor=function(v){return this.length>v.length?this.clone().iuor(v):v.clone().iuor(this)},s.prototype.iuand=function(v){var T;this.length>v.length?T=v:T=this;for(var S=0;Sv.length?this.clone().iand(v):v.clone().iand(this)},s.prototype.uand=function(v){return this.length>v.length?this.clone().iuand(v):v.clone().iuand(this)},s.prototype.iuxor=function(v){var T,S;this.length>v.length?(T=this,S=v):(T=v,S=this);for(var C=0;Cv.length?this.clone().ixor(v):v.clone().ixor(this)},s.prototype.uxor=function(v){return this.length>v.length?this.clone().iuxor(v):v.clone().iuxor(this)},s.prototype.inotn=function(v){n(typeof v=="number"&&v>=0);var T=Math.ceil(v/26)|0,S=v%26;this._expand(T),S>0&&T--;for(var C=0;C0&&(this.words[C]=~this.words[C]&67108863>>26-S),this._strip()},s.prototype.notn=function(v){return this.clone().inotn(v)},s.prototype.setn=function(v,T){n(typeof v=="number"&&v>=0);var S=v/26|0,C=v%26;return this._expand(S+1),T?this.words[S]=this.words[S]|1<v.length?(S=this,C=v):(S=v,C=this);for(var P=0,O=0;O>>26;for(;P!==0&&O>>26;if(this.length=S.length,P!==0)this.words[this.length]=P,this.length++;else if(S!==this)for(;Ov.length?this.clone().iadd(v):v.clone().iadd(this)},s.prototype.isub=function(v){if(v.negative!==0){v.negative=0;var T=this.iadd(v);return v.negative=1,T._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(v),this.negative=1,this._normSign();var S=this.cmp(v);if(S===0)return this.negative=0,this.length=1,this.words[0]=0,this;var C,P;S>0?(C=this,P=v):(C=v,P=this);for(var O=0,L=0;L>26,this.words[L]=T&67108863;for(;O!==0&&L>26,this.words[L]=T&67108863;if(O===0&&L>>26,B=A&67108863,k=Math.min(g,v.length-1),$=Math.max(0,g-M.length+1);$<=k;$++){var V=g-$|0;C=M.words[V]|0,P=v.words[$]|0,O=C*P+B,_+=O/67108864|0,B=O&67108863}T.words[g]=B|0,A=_|0}return A!==0?T.words[g]=A|0:T.length--,T._strip()}var w=function(v,T,S){var C=v.words,P=T.words,O=S.words,L=0,A,g,_,B=C[0]|0,k=B&8191,$=B>>>13,V=C[1]|0,H=V&8191,X=V>>>13,le=C[2]|0,ne=le&8191,te=le>>>13,Ie=C[3]|0,pe=Ie&8191,Se=Ie>>>13,sr=C[4]|0,Xe=sr&8191,ct=sr>>>13,ri=C[5]|0,ft=ri&8191,tt=ri>>>13,Es=C[6]|0,_t=Es&8191,it=Es>>>13,Nn=C[7]|0,mt=Nn&8191,ut=Nn>>>13,Xr=C[8]|0,Ge=Xr&8191,gt=Xr>>>13,ni=C[9]|0,It=ni&8191,Ye=ni>>>13,Ui=P[0]|0,xt=Ui&8191,bt=Ui>>>13,As=P[1]|0,wt=As&8191,ot=As>>>13,zi=P[2]|0,dt=zi&8191,at=zi>>>13,Ei=P[3]|0,Ot=Ei&8191,Et=Ei>>>13,Ss=P[4]|0,At=Ss&8191,lt=Ss>>>13,ii=P[5]|0,Mt=ii&8191,Nt=ii>>>13,z=P[6]|0,q=z&8191,W=z>>>13,re=P[7]|0,fe=re&8191,ve=re>>>13,Ae=P[8]|0,ae=Ae&8191,ge=Ae>>>13,we=P[9]|0,ye=we&8191,Ce=we>>>13;S.negative=v.negative^T.negative,S.length=19,A=Math.imul(k,xt),g=Math.imul(k,bt),g=g+Math.imul($,xt)|0,_=Math.imul($,bt);var Be=(L+A|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(Be>>>26)|0,Be&=67108863,A=Math.imul(H,xt),g=Math.imul(H,bt),g=g+Math.imul(X,xt)|0,_=Math.imul(X,bt),A=A+Math.imul(k,wt)|0,g=g+Math.imul(k,ot)|0,g=g+Math.imul($,wt)|0,_=_+Math.imul($,ot)|0;var Ve=(L+A|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,A=Math.imul(ne,xt),g=Math.imul(ne,bt),g=g+Math.imul(te,xt)|0,_=Math.imul(te,bt),A=A+Math.imul(H,wt)|0,g=g+Math.imul(H,ot)|0,g=g+Math.imul(X,wt)|0,_=_+Math.imul(X,ot)|0,A=A+Math.imul(k,dt)|0,g=g+Math.imul(k,at)|0,g=g+Math.imul($,dt)|0,_=_+Math.imul($,at)|0;var Fe=(L+A|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,A=Math.imul(pe,xt),g=Math.imul(pe,bt),g=g+Math.imul(Se,xt)|0,_=Math.imul(Se,bt),A=A+Math.imul(ne,wt)|0,g=g+Math.imul(ne,ot)|0,g=g+Math.imul(te,wt)|0,_=_+Math.imul(te,ot)|0,A=A+Math.imul(H,dt)|0,g=g+Math.imul(H,at)|0,g=g+Math.imul(X,dt)|0,_=_+Math.imul(X,at)|0,A=A+Math.imul(k,Ot)|0,g=g+Math.imul(k,Et)|0,g=g+Math.imul($,Ot)|0,_=_+Math.imul($,Et)|0;var jt=(L+A|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(jt>>>26)|0,jt&=67108863,A=Math.imul(Xe,xt),g=Math.imul(Xe,bt),g=g+Math.imul(ct,xt)|0,_=Math.imul(ct,bt),A=A+Math.imul(pe,wt)|0,g=g+Math.imul(pe,ot)|0,g=g+Math.imul(Se,wt)|0,_=_+Math.imul(Se,ot)|0,A=A+Math.imul(ne,dt)|0,g=g+Math.imul(ne,at)|0,g=g+Math.imul(te,dt)|0,_=_+Math.imul(te,at)|0,A=A+Math.imul(H,Ot)|0,g=g+Math.imul(H,Et)|0,g=g+Math.imul(X,Ot)|0,_=_+Math.imul(X,Et)|0,A=A+Math.imul(k,At)|0,g=g+Math.imul(k,lt)|0,g=g+Math.imul($,At)|0,_=_+Math.imul($,lt)|0;var ht=(L+A|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(ht>>>26)|0,ht&=67108863,A=Math.imul(ft,xt),g=Math.imul(ft,bt),g=g+Math.imul(tt,xt)|0,_=Math.imul(tt,bt),A=A+Math.imul(Xe,wt)|0,g=g+Math.imul(Xe,ot)|0,g=g+Math.imul(ct,wt)|0,_=_+Math.imul(ct,ot)|0,A=A+Math.imul(pe,dt)|0,g=g+Math.imul(pe,at)|0,g=g+Math.imul(Se,dt)|0,_=_+Math.imul(Se,at)|0,A=A+Math.imul(ne,Ot)|0,g=g+Math.imul(ne,Et)|0,g=g+Math.imul(te,Ot)|0,_=_+Math.imul(te,Et)|0,A=A+Math.imul(H,At)|0,g=g+Math.imul(H,lt)|0,g=g+Math.imul(X,At)|0,_=_+Math.imul(X,lt)|0,A=A+Math.imul(k,Mt)|0,g=g+Math.imul(k,Nt)|0,g=g+Math.imul($,Mt)|0,_=_+Math.imul($,Nt)|0;var Cs=(L+A|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(Cs>>>26)|0,Cs&=67108863,A=Math.imul(_t,xt),g=Math.imul(_t,bt),g=g+Math.imul(it,xt)|0,_=Math.imul(it,bt),A=A+Math.imul(ft,wt)|0,g=g+Math.imul(ft,ot)|0,g=g+Math.imul(tt,wt)|0,_=_+Math.imul(tt,ot)|0,A=A+Math.imul(Xe,dt)|0,g=g+Math.imul(Xe,at)|0,g=g+Math.imul(ct,dt)|0,_=_+Math.imul(ct,at)|0,A=A+Math.imul(pe,Ot)|0,g=g+Math.imul(pe,Et)|0,g=g+Math.imul(Se,Ot)|0,_=_+Math.imul(Se,Et)|0,A=A+Math.imul(ne,At)|0,g=g+Math.imul(ne,lt)|0,g=g+Math.imul(te,At)|0,_=_+Math.imul(te,lt)|0,A=A+Math.imul(H,Mt)|0,g=g+Math.imul(H,Nt)|0,g=g+Math.imul(X,Mt)|0,_=_+Math.imul(X,Nt)|0,A=A+Math.imul(k,q)|0,g=g+Math.imul(k,W)|0,g=g+Math.imul($,q)|0,_=_+Math.imul($,W)|0;var si=(L+A|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(si>>>26)|0,si&=67108863,A=Math.imul(mt,xt),g=Math.imul(mt,bt),g=g+Math.imul(ut,xt)|0,_=Math.imul(ut,bt),A=A+Math.imul(_t,wt)|0,g=g+Math.imul(_t,ot)|0,g=g+Math.imul(it,wt)|0,_=_+Math.imul(it,ot)|0,A=A+Math.imul(ft,dt)|0,g=g+Math.imul(ft,at)|0,g=g+Math.imul(tt,dt)|0,_=_+Math.imul(tt,at)|0,A=A+Math.imul(Xe,Ot)|0,g=g+Math.imul(Xe,Et)|0,g=g+Math.imul(ct,Ot)|0,_=_+Math.imul(ct,Et)|0,A=A+Math.imul(pe,At)|0,g=g+Math.imul(pe,lt)|0,g=g+Math.imul(Se,At)|0,_=_+Math.imul(Se,lt)|0,A=A+Math.imul(ne,Mt)|0,g=g+Math.imul(ne,Nt)|0,g=g+Math.imul(te,Mt)|0,_=_+Math.imul(te,Nt)|0,A=A+Math.imul(H,q)|0,g=g+Math.imul(H,W)|0,g=g+Math.imul(X,q)|0,_=_+Math.imul(X,W)|0,A=A+Math.imul(k,fe)|0,g=g+Math.imul(k,ve)|0,g=g+Math.imul($,fe)|0,_=_+Math.imul($,ve)|0;var Vi=(L+A|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,A=Math.imul(Ge,xt),g=Math.imul(Ge,bt),g=g+Math.imul(gt,xt)|0,_=Math.imul(gt,bt),A=A+Math.imul(mt,wt)|0,g=g+Math.imul(mt,ot)|0,g=g+Math.imul(ut,wt)|0,_=_+Math.imul(ut,ot)|0,A=A+Math.imul(_t,dt)|0,g=g+Math.imul(_t,at)|0,g=g+Math.imul(it,dt)|0,_=_+Math.imul(it,at)|0,A=A+Math.imul(ft,Ot)|0,g=g+Math.imul(ft,Et)|0,g=g+Math.imul(tt,Ot)|0,_=_+Math.imul(tt,Et)|0,A=A+Math.imul(Xe,At)|0,g=g+Math.imul(Xe,lt)|0,g=g+Math.imul(ct,At)|0,_=_+Math.imul(ct,lt)|0,A=A+Math.imul(pe,Mt)|0,g=g+Math.imul(pe,Nt)|0,g=g+Math.imul(Se,Mt)|0,_=_+Math.imul(Se,Nt)|0,A=A+Math.imul(ne,q)|0,g=g+Math.imul(ne,W)|0,g=g+Math.imul(te,q)|0,_=_+Math.imul(te,W)|0,A=A+Math.imul(H,fe)|0,g=g+Math.imul(H,ve)|0,g=g+Math.imul(X,fe)|0,_=_+Math.imul(X,ve)|0,A=A+Math.imul(k,ae)|0,g=g+Math.imul(k,ge)|0,g=g+Math.imul($,ae)|0,_=_+Math.imul($,ge)|0;var qi=(L+A|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(qi>>>26)|0,qi&=67108863,A=Math.imul(It,xt),g=Math.imul(It,bt),g=g+Math.imul(Ye,xt)|0,_=Math.imul(Ye,bt),A=A+Math.imul(Ge,wt)|0,g=g+Math.imul(Ge,ot)|0,g=g+Math.imul(gt,wt)|0,_=_+Math.imul(gt,ot)|0,A=A+Math.imul(mt,dt)|0,g=g+Math.imul(mt,at)|0,g=g+Math.imul(ut,dt)|0,_=_+Math.imul(ut,at)|0,A=A+Math.imul(_t,Ot)|0,g=g+Math.imul(_t,Et)|0,g=g+Math.imul(it,Ot)|0,_=_+Math.imul(it,Et)|0,A=A+Math.imul(ft,At)|0,g=g+Math.imul(ft,lt)|0,g=g+Math.imul(tt,At)|0,_=_+Math.imul(tt,lt)|0,A=A+Math.imul(Xe,Mt)|0,g=g+Math.imul(Xe,Nt)|0,g=g+Math.imul(ct,Mt)|0,_=_+Math.imul(ct,Nt)|0,A=A+Math.imul(pe,q)|0,g=g+Math.imul(pe,W)|0,g=g+Math.imul(Se,q)|0,_=_+Math.imul(Se,W)|0,A=A+Math.imul(ne,fe)|0,g=g+Math.imul(ne,ve)|0,g=g+Math.imul(te,fe)|0,_=_+Math.imul(te,ve)|0,A=A+Math.imul(H,ae)|0,g=g+Math.imul(H,ge)|0,g=g+Math.imul(X,ae)|0,_=_+Math.imul(X,ge)|0,A=A+Math.imul(k,ye)|0,g=g+Math.imul(k,Ce)|0,g=g+Math.imul($,ye)|0,_=_+Math.imul($,Ce)|0;var Hi=(L+A|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(Hi>>>26)|0,Hi&=67108863,A=Math.imul(It,wt),g=Math.imul(It,ot),g=g+Math.imul(Ye,wt)|0,_=Math.imul(Ye,ot),A=A+Math.imul(Ge,dt)|0,g=g+Math.imul(Ge,at)|0,g=g+Math.imul(gt,dt)|0,_=_+Math.imul(gt,at)|0,A=A+Math.imul(mt,Ot)|0,g=g+Math.imul(mt,Et)|0,g=g+Math.imul(ut,Ot)|0,_=_+Math.imul(ut,Et)|0,A=A+Math.imul(_t,At)|0,g=g+Math.imul(_t,lt)|0,g=g+Math.imul(it,At)|0,_=_+Math.imul(it,lt)|0,A=A+Math.imul(ft,Mt)|0,g=g+Math.imul(ft,Nt)|0,g=g+Math.imul(tt,Mt)|0,_=_+Math.imul(tt,Nt)|0,A=A+Math.imul(Xe,q)|0,g=g+Math.imul(Xe,W)|0,g=g+Math.imul(ct,q)|0,_=_+Math.imul(ct,W)|0,A=A+Math.imul(pe,fe)|0,g=g+Math.imul(pe,ve)|0,g=g+Math.imul(Se,fe)|0,_=_+Math.imul(Se,ve)|0,A=A+Math.imul(ne,ae)|0,g=g+Math.imul(ne,ge)|0,g=g+Math.imul(te,ae)|0,_=_+Math.imul(te,ge)|0,A=A+Math.imul(H,ye)|0,g=g+Math.imul(H,Ce)|0,g=g+Math.imul(X,ye)|0,_=_+Math.imul(X,Ce)|0;var wn=(L+A|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(wn>>>26)|0,wn&=67108863,A=Math.imul(It,dt),g=Math.imul(It,at),g=g+Math.imul(Ye,dt)|0,_=Math.imul(Ye,at),A=A+Math.imul(Ge,Ot)|0,g=g+Math.imul(Ge,Et)|0,g=g+Math.imul(gt,Ot)|0,_=_+Math.imul(gt,Et)|0,A=A+Math.imul(mt,At)|0,g=g+Math.imul(mt,lt)|0,g=g+Math.imul(ut,At)|0,_=_+Math.imul(ut,lt)|0,A=A+Math.imul(_t,Mt)|0,g=g+Math.imul(_t,Nt)|0,g=g+Math.imul(it,Mt)|0,_=_+Math.imul(it,Nt)|0,A=A+Math.imul(ft,q)|0,g=g+Math.imul(ft,W)|0,g=g+Math.imul(tt,q)|0,_=_+Math.imul(tt,W)|0,A=A+Math.imul(Xe,fe)|0,g=g+Math.imul(Xe,ve)|0,g=g+Math.imul(ct,fe)|0,_=_+Math.imul(ct,ve)|0,A=A+Math.imul(pe,ae)|0,g=g+Math.imul(pe,ge)|0,g=g+Math.imul(Se,ae)|0,_=_+Math.imul(Se,ge)|0,A=A+Math.imul(ne,ye)|0,g=g+Math.imul(ne,Ce)|0,g=g+Math.imul(te,ye)|0,_=_+Math.imul(te,Ce)|0;var lo=(L+A|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(lo>>>26)|0,lo&=67108863,A=Math.imul(It,Ot),g=Math.imul(It,Et),g=g+Math.imul(Ye,Ot)|0,_=Math.imul(Ye,Et),A=A+Math.imul(Ge,At)|0,g=g+Math.imul(Ge,lt)|0,g=g+Math.imul(gt,At)|0,_=_+Math.imul(gt,lt)|0,A=A+Math.imul(mt,Mt)|0,g=g+Math.imul(mt,Nt)|0,g=g+Math.imul(ut,Mt)|0,_=_+Math.imul(ut,Nt)|0,A=A+Math.imul(_t,q)|0,g=g+Math.imul(_t,W)|0,g=g+Math.imul(it,q)|0,_=_+Math.imul(it,W)|0,A=A+Math.imul(ft,fe)|0,g=g+Math.imul(ft,ve)|0,g=g+Math.imul(tt,fe)|0,_=_+Math.imul(tt,ve)|0,A=A+Math.imul(Xe,ae)|0,g=g+Math.imul(Xe,ge)|0,g=g+Math.imul(ct,ae)|0,_=_+Math.imul(ct,ge)|0,A=A+Math.imul(pe,ye)|0,g=g+Math.imul(pe,Ce)|0,g=g+Math.imul(Se,ye)|0,_=_+Math.imul(Se,Ce)|0;var co=(L+A|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(co>>>26)|0,co&=67108863,A=Math.imul(It,At),g=Math.imul(It,lt),g=g+Math.imul(Ye,At)|0,_=Math.imul(Ye,lt),A=A+Math.imul(Ge,Mt)|0,g=g+Math.imul(Ge,Nt)|0,g=g+Math.imul(gt,Mt)|0,_=_+Math.imul(gt,Nt)|0,A=A+Math.imul(mt,q)|0,g=g+Math.imul(mt,W)|0,g=g+Math.imul(ut,q)|0,_=_+Math.imul(ut,W)|0,A=A+Math.imul(_t,fe)|0,g=g+Math.imul(_t,ve)|0,g=g+Math.imul(it,fe)|0,_=_+Math.imul(it,ve)|0,A=A+Math.imul(ft,ae)|0,g=g+Math.imul(ft,ge)|0,g=g+Math.imul(tt,ae)|0,_=_+Math.imul(tt,ge)|0,A=A+Math.imul(Xe,ye)|0,g=g+Math.imul(Xe,Ce)|0,g=g+Math.imul(ct,ye)|0,_=_+Math.imul(ct,Ce)|0;var fo=(L+A|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(fo>>>26)|0,fo&=67108863,A=Math.imul(It,Mt),g=Math.imul(It,Nt),g=g+Math.imul(Ye,Mt)|0,_=Math.imul(Ye,Nt),A=A+Math.imul(Ge,q)|0,g=g+Math.imul(Ge,W)|0,g=g+Math.imul(gt,q)|0,_=_+Math.imul(gt,W)|0,A=A+Math.imul(mt,fe)|0,g=g+Math.imul(mt,ve)|0,g=g+Math.imul(ut,fe)|0,_=_+Math.imul(ut,ve)|0,A=A+Math.imul(_t,ae)|0,g=g+Math.imul(_t,ge)|0,g=g+Math.imul(it,ae)|0,_=_+Math.imul(it,ge)|0,A=A+Math.imul(ft,ye)|0,g=g+Math.imul(ft,Ce)|0,g=g+Math.imul(tt,ye)|0,_=_+Math.imul(tt,Ce)|0;var Oe=(L+A|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,A=Math.imul(It,q),g=Math.imul(It,W),g=g+Math.imul(Ye,q)|0,_=Math.imul(Ye,W),A=A+Math.imul(Ge,fe)|0,g=g+Math.imul(Ge,ve)|0,g=g+Math.imul(gt,fe)|0,_=_+Math.imul(gt,ve)|0,A=A+Math.imul(mt,ae)|0,g=g+Math.imul(mt,ge)|0,g=g+Math.imul(ut,ae)|0,_=_+Math.imul(ut,ge)|0,A=A+Math.imul(_t,ye)|0,g=g+Math.imul(_t,Ce)|0,g=g+Math.imul(it,ye)|0,_=_+Math.imul(it,Ce)|0;var Ft=(L+A|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,A=Math.imul(It,fe),g=Math.imul(It,ve),g=g+Math.imul(Ye,fe)|0,_=Math.imul(Ye,ve),A=A+Math.imul(Ge,ae)|0,g=g+Math.imul(Ge,ge)|0,g=g+Math.imul(gt,ae)|0,_=_+Math.imul(gt,ge)|0,A=A+Math.imul(mt,ye)|0,g=g+Math.imul(mt,Ce)|0,g=g+Math.imul(ut,ye)|0,_=_+Math.imul(ut,Ce)|0;var zr=(L+A|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(zr>>>26)|0,zr&=67108863,A=Math.imul(It,ae),g=Math.imul(It,ge),g=g+Math.imul(Ye,ae)|0,_=Math.imul(Ye,ge),A=A+Math.imul(Ge,ye)|0,g=g+Math.imul(Ge,Ce)|0,g=g+Math.imul(gt,ye)|0,_=_+Math.imul(gt,Ce)|0;var St=(L+A|0)+((g&8191)<<13)|0;L=(_+(g>>>13)|0)+(St>>>26)|0,St&=67108863,A=Math.imul(It,ye),g=Math.imul(It,Ce),g=g+Math.imul(Ye,ye)|0,_=Math.imul(Ye,Ce);var Dn=(L+A|0)+((g&8191)<<13)|0;return L=(_+(g>>>13)|0)+(Dn>>>26)|0,Dn&=67108863,O[0]=Be,O[1]=Ve,O[2]=Fe,O[3]=jt,O[4]=ht,O[5]=Cs,O[6]=si,O[7]=Vi,O[8]=qi,O[9]=Hi,O[10]=wn,O[11]=lo,O[12]=co,O[13]=fo,O[14]=Oe,O[15]=Ft,O[16]=zr,O[17]=St,O[18]=Dn,L!==0&&(O[19]=L,S.length++),S};Math.imul||(w=b);function E(M,v,T){T.negative=v.negative^M.negative,T.length=M.length+v.length;for(var S=0,C=0,P=0;P>>26)|0,C+=O>>>26,O&=67108863}T.words[P]=L,S=O,O=C}return S!==0?T.words[P]=S:T.length--,T._strip()}function R(M,v,T){return E(M,v,T)}s.prototype.mulTo=function(v,T){var S,C=this.length+v.length;return this.length===10&&v.length===10?S=w(this,v,T):C<63?S=b(this,v,T):C<1024?S=E(this,v,T):S=R(this,v,T),S},s.prototype.mul=function(v){var T=new s(null);return T.words=new Array(this.length+v.length),this.mulTo(v,T)},s.prototype.mulf=function(v){var T=new s(null);return T.words=new Array(this.length+v.length),R(this,v,T)},s.prototype.imul=function(v){return this.clone().mulTo(v,this)},s.prototype.imuln=function(v){var T=v<0;T&&(v=-v),n(typeof v=="number"),n(v<67108864);for(var S=0,C=0;C>=26,S+=P/67108864|0,S+=O>>>26,this.words[C]=O&67108863}return S!==0&&(this.words[C]=S,this.length++),T?this.ineg():this},s.prototype.muln=function(v){return this.clone().imuln(v)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(v){var T=x(v);if(T.length===0)return new s(1);for(var S=this,C=0;C=0);var T=v%26,S=(v-T)/26,C=67108863>>>26-T<<26-T,P;if(T!==0){var O=0;for(P=0;P>>26-T}O&&(this.words[P]=O,this.length++)}if(S!==0){for(P=this.length-1;P>=0;P--)this.words[P+S]=this.words[P];for(P=0;P=0);var C;T?C=(T-T%26)/26:C=0;var P=v%26,O=Math.min((v-P)/26,this.length),L=67108863^67108863>>>P<O)for(this.length-=O,g=0;g=0&&(_!==0||g>=C);g--){var B=this.words[g]|0;this.words[g]=_<<26-P|B>>>P,_=B&L}return A&&_!==0&&(A.words[A.length++]=_),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(v,T,S){return n(this.negative===0),this.iushrn(v,T,S)},s.prototype.shln=function(v){return this.clone().ishln(v)},s.prototype.ushln=function(v){return this.clone().iushln(v)},s.prototype.shrn=function(v){return this.clone().ishrn(v)},s.prototype.ushrn=function(v){return this.clone().iushrn(v)},s.prototype.testn=function(v){n(typeof v=="number"&&v>=0);var T=v%26,S=(v-T)/26,C=1<=0);var T=v%26,S=(v-T)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=S)return this;if(T!==0&&S++,this.length=Math.min(S,this.length),T!==0){var C=67108863^67108863>>>T<=67108864;T++)this.words[T]-=67108864,T===this.length-1?this.words[T+1]=1:this.words[T+1]++;return this.length=Math.max(this.length,T+1),this},s.prototype.isubn=function(v){if(n(typeof v=="number"),n(v<67108864),v<0)return this.iaddn(-v);if(this.negative!==0)return this.negative=0,this.iaddn(v),this.negative=1,this;if(this.words[0]-=v,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var T=0;T>26)-(A/67108864|0),this.words[P+S]=O&67108863}for(;P>26,this.words[P+S]=O&67108863;if(L===0)return this._strip();for(n(L===-1),L=0,P=0;P>26,this.words[P]=O&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(v,T){var S=this.length-v.length,C=this.clone(),P=v,O=P.words[P.length-1]|0,L=this._countBits(O);S=26-L,S!==0&&(P=P.ushln(S),C.iushln(S),O=P.words[P.length-1]|0);var A=C.length-P.length,g;if(T!=="mod"){g=new s(null),g.length=A+1,g.words=new Array(g.length);for(var _=0;_=0;k--){var $=(C.words[P.length+k]|0)*67108864+(C.words[P.length+k-1]|0);for($=Math.min($/O|0,67108863),C._ishlnsubmul(P,$,k);C.negative!==0;)$--,C.negative=0,C._ishlnsubmul(P,1,k),C.isZero()||(C.negative^=1);g&&(g.words[k]=$)}return g&&g._strip(),C._strip(),T!=="div"&&S!==0&&C.iushrn(S),{div:g||null,mod:C}},s.prototype.divmod=function(v,T,S){if(n(!v.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var C,P,O;return this.negative!==0&&v.negative===0?(O=this.neg().divmod(v,T),T!=="mod"&&(C=O.div.neg()),T!=="div"&&(P=O.mod.neg(),S&&P.negative!==0&&P.iadd(v)),{div:C,mod:P}):this.negative===0&&v.negative!==0?(O=this.divmod(v.neg(),T),T!=="mod"&&(C=O.div.neg()),{div:C,mod:O.mod}):this.negative&v.negative?(O=this.neg().divmod(v.neg(),T),T!=="div"&&(P=O.mod.neg(),S&&P.negative!==0&&P.isub(v)),{div:O.div,mod:P}):v.length>this.length||this.cmp(v)<0?{div:new s(0),mod:this}:v.length===1?T==="div"?{div:this.divn(v.words[0]),mod:null}:T==="mod"?{div:null,mod:new s(this.modrn(v.words[0]))}:{div:this.divn(v.words[0]),mod:new s(this.modrn(v.words[0]))}:this._wordDiv(v,T)},s.prototype.div=function(v){return this.divmod(v,"div",!1).div},s.prototype.mod=function(v){return this.divmod(v,"mod",!1).mod},s.prototype.umod=function(v){return this.divmod(v,"mod",!0).mod},s.prototype.divRound=function(v){var T=this.divmod(v);if(T.mod.isZero())return T.div;var S=T.div.negative!==0?T.mod.isub(v):T.mod,C=v.ushrn(1),P=v.andln(1),O=S.cmp(C);return O<0||P===1&&O===0?T.div:T.div.negative!==0?T.div.isubn(1):T.div.iaddn(1)},s.prototype.modrn=function(v){var T=v<0;T&&(v=-v),n(v<=67108863);for(var S=(1<<26)%v,C=0,P=this.length-1;P>=0;P--)C=(S*C+(this.words[P]|0))%v;return T?-C:C},s.prototype.modn=function(v){return this.modrn(v)},s.prototype.idivn=function(v){var T=v<0;T&&(v=-v),n(v<=67108863);for(var S=0,C=this.length-1;C>=0;C--){var P=(this.words[C]|0)+S*67108864;this.words[C]=P/v|0,S=P%v}return this._strip(),T?this.ineg():this},s.prototype.divn=function(v){return this.clone().idivn(v)},s.prototype.egcd=function(v){n(v.negative===0),n(!v.isZero());var T=this,S=v.clone();T.negative!==0?T=T.umod(v):T=T.clone();for(var C=new s(1),P=new s(0),O=new s(0),L=new s(1),A=0;T.isEven()&&S.isEven();)T.iushrn(1),S.iushrn(1),++A;for(var g=S.clone(),_=T.clone();!T.isZero();){for(var B=0,k=1;!(T.words[0]&k)&&B<26;++B,k<<=1);if(B>0)for(T.iushrn(B);B-- >0;)(C.isOdd()||P.isOdd())&&(C.iadd(g),P.isub(_)),C.iushrn(1),P.iushrn(1);for(var $=0,V=1;!(S.words[0]&V)&&$<26;++$,V<<=1);if($>0)for(S.iushrn($);$-- >0;)(O.isOdd()||L.isOdd())&&(O.iadd(g),L.isub(_)),O.iushrn(1),L.iushrn(1);T.cmp(S)>=0?(T.isub(S),C.isub(O),P.isub(L)):(S.isub(T),O.isub(C),L.isub(P))}return{a:O,b:L,gcd:S.iushln(A)}},s.prototype._invmp=function(v){n(v.negative===0),n(!v.isZero());var T=this,S=v.clone();T.negative!==0?T=T.umod(v):T=T.clone();for(var C=new s(1),P=new s(0),O=S.clone();T.cmpn(1)>0&&S.cmpn(1)>0;){for(var L=0,A=1;!(T.words[0]&A)&&L<26;++L,A<<=1);if(L>0)for(T.iushrn(L);L-- >0;)C.isOdd()&&C.iadd(O),C.iushrn(1);for(var g=0,_=1;!(S.words[0]&_)&&g<26;++g,_<<=1);if(g>0)for(S.iushrn(g);g-- >0;)P.isOdd()&&P.iadd(O),P.iushrn(1);T.cmp(S)>=0?(T.isub(S),C.isub(P)):(S.isub(T),P.isub(C))}var B;return T.cmpn(1)===0?B=C:B=P,B.cmpn(0)<0&&B.iadd(v),B},s.prototype.gcd=function(v){if(this.isZero())return v.abs();if(v.isZero())return this.abs();var T=this.clone(),S=v.clone();T.negative=0,S.negative=0;for(var C=0;T.isEven()&&S.isEven();C++)T.iushrn(1),S.iushrn(1);do{for(;T.isEven();)T.iushrn(1);for(;S.isEven();)S.iushrn(1);var P=T.cmp(S);if(P<0){var O=T;T=S,S=O}else if(P===0||S.cmpn(1)===0)break;T.isub(S)}while(!0);return S.iushln(C)},s.prototype.invm=function(v){return this.egcd(v).a.umod(v)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(v){return this.words[0]&v},s.prototype.bincn=function(v){n(typeof v=="number");var T=v%26,S=(v-T)/26,C=1<>>26,L&=67108863,this.words[O]=L}return P!==0&&(this.words[O]=P,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(v){var T=v<0;if(this.negative!==0&&!T)return-1;if(this.negative===0&&T)return 1;this._strip();var S;if(this.length>1)S=1;else{T&&(v=-v),n(v<=67108863,"Number is too big");var C=this.words[0]|0;S=C===v?0:Cv.length)return 1;if(this.length=0;S--){var C=this.words[S]|0,P=v.words[S]|0;if(C!==P){CP&&(T=1);break}}return T},s.prototype.gtn=function(v){return this.cmpn(v)===1},s.prototype.gt=function(v){return this.cmp(v)===1},s.prototype.gten=function(v){return this.cmpn(v)>=0},s.prototype.gte=function(v){return this.cmp(v)>=0},s.prototype.ltn=function(v){return this.cmpn(v)===-1},s.prototype.lt=function(v){return this.cmp(v)===-1},s.prototype.lten=function(v){return this.cmpn(v)<=0},s.prototype.lte=function(v){return this.cmp(v)<=0},s.prototype.eqn=function(v){return this.cmpn(v)===0},s.prototype.eq=function(v){return this.cmp(v)===0},s.red=function(v){return new J(v)},s.prototype.toRed=function(v){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),v.convertTo(this)._forceRed(v)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(v){return this.red=v,this},s.prototype.forceRed=function(v){return n(!this.red,"Already a number in reduction context"),this._forceRed(v)},s.prototype.redAdd=function(v){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,v)},s.prototype.redIAdd=function(v){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,v)},s.prototype.redSub=function(v){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,v)},s.prototype.redISub=function(v){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,v)},s.prototype.redShl=function(v){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,v)},s.prototype.redMul=function(v){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.mul(this,v)},s.prototype.redIMul=function(v){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.imul(this,v)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(v){return n(this.red&&!v.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,v)};var N={k256:null,p224:null,p192:null,p25519:null};function I(M,v){this.name=M,this.p=new s(v,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}I.prototype._tmp=function(){var v=new s(null);return v.words=new Array(Math.ceil(this.n/13)),v},I.prototype.ireduce=function(v){var T=v,S;do this.split(T,this.tmp),T=this.imulK(T),T=T.iadd(this.tmp),S=T.bitLength();while(S>this.n);var C=S0?T.isub(this.p):T.strip!==void 0?T.strip():T._strip(),T},I.prototype.split=function(v,T){v.iushrn(this.n,0,T)},I.prototype.imulK=function(v){return v.imul(this.k)};function F(){I.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(F,I),F.prototype.split=function(v,T){for(var S=4194303,C=Math.min(v.length,9),P=0;P>>22,O=L}O>>>=22,v.words[P-10]=O,O===0&&v.length>10?v.length-=10:v.length-=9},F.prototype.imulK=function(v){v.words[v.length]=0,v.words[v.length+1]=0,v.length+=2;for(var T=0,S=0;S>>=26,v.words[S]=P,T=C}return T!==0&&(v.words[v.length++]=T),v},s._prime=function(v){if(N[v])return N[v];var T;if(v==="k256")T=new F;else if(v==="p224")T=new j;else if(v==="p192")T=new U;else if(v==="p25519")T=new K;else throw new Error("Unknown prime "+v);return N[v]=T,T};function J(M){if(typeof M=="string"){var v=s._prime(M);this.m=v.p,this.prime=v}else n(M.gtn(1),"modulus must be greater than 1"),this.m=M,this.prime=null}J.prototype._verify1=function(v){n(v.negative===0,"red works only with positives"),n(v.red,"red works only with red numbers")},J.prototype._verify2=function(v,T){n((v.negative|T.negative)===0,"red works only with positives"),n(v.red&&v.red===T.red,"red works only with red numbers")},J.prototype.imod=function(v){return this.prime?this.prime.ireduce(v)._forceRed(this):(f(v,v.umod(this.m)._forceRed(this)),v)},J.prototype.neg=function(v){return v.isZero()?v.clone():this.m.sub(v)._forceRed(this)},J.prototype.add=function(v,T){this._verify2(v,T);var S=v.add(T);return S.cmp(this.m)>=0&&S.isub(this.m),S._forceRed(this)},J.prototype.iadd=function(v,T){this._verify2(v,T);var S=v.iadd(T);return S.cmp(this.m)>=0&&S.isub(this.m),S},J.prototype.sub=function(v,T){this._verify2(v,T);var S=v.sub(T);return S.cmpn(0)<0&&S.iadd(this.m),S._forceRed(this)},J.prototype.isub=function(v,T){this._verify2(v,T);var S=v.isub(T);return S.cmpn(0)<0&&S.iadd(this.m),S},J.prototype.shl=function(v,T){return this._verify1(v),this.imod(v.ushln(T))},J.prototype.imul=function(v,T){return this._verify2(v,T),this.imod(v.imul(T))},J.prototype.mul=function(v,T){return this._verify2(v,T),this.imod(v.mul(T))},J.prototype.isqr=function(v){return this.imul(v,v.clone())},J.prototype.sqr=function(v){return this.mul(v,v)},J.prototype.sqrt=function(v){if(v.isZero())return v.clone();var T=this.m.andln(3);if(n(T%2===1),T===3){var S=this.m.add(new s(1)).iushrn(2);return this.pow(v,S)}for(var C=this.m.subn(1),P=0;!C.isZero()&&C.andln(1)===0;)P++,C.iushrn(1);n(!C.isZero());var O=new s(1).toRed(this),L=O.redNeg(),A=this.m.subn(1).iushrn(1),g=this.m.bitLength();for(g=new s(2*g*g).toRed(this);this.pow(g,A).cmp(L)!==0;)g.redIAdd(L);for(var _=this.pow(g,C),B=this.pow(v,C.addn(1).iushrn(1)),k=this.pow(v,C),$=P;k.cmp(O)!==0;){for(var V=k,H=0;V.cmp(O)!==0;H++)V=V.redSqr();n(H<$);var X=this.pow(_,new s(1).iushln($-H-1));B=B.redMul(X),_=X.redSqr(),k=k.redMul(_),$=H}return B},J.prototype.invm=function(v){var T=v._invmp(this.m);return T.negative!==0?(T.negative=0,this.imod(T).redNeg()):this.imod(T)},J.prototype.pow=function(v,T){if(T.isZero())return new s(1).toRed(this);if(T.cmpn(1)===0)return v.clone();var S=4,C=new Array(1<=0;P--){for(var _=T.words[P],B=g-1;B>=0;B--){var k=_>>B&1;if(O!==C[0]&&(O=this.sqr(O)),k===0&&L===0){A=0;continue}L<<=1,L|=k,A++,!(A!==S&&(P!==0||B!==0))&&(O=this.mul(O,C[L]),A=0,L=0)}g=26}return O},J.prototype.convertTo=function(v){var T=v.umod(this.m);return T===v?T.clone():T},J.prototype.convertFrom=function(v){var T=v.clone();return T.red=null,T},s.mont=function(v){return new Z(v)};function Z(M){J.call(this,M),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(Z,J),Z.prototype.convertTo=function(v){return this.imod(v.ushln(this.shift))},Z.prototype.convertFrom=function(v){var T=this.imod(v.mul(this.rinv));return T.red=null,T},Z.prototype.imul=function(v,T){if(v.isZero()||T.isZero())return v.words[0]=0,v.length=1,v;var S=v.imul(T),C=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),P=S.isub(C).iushrn(this.shift),O=P;return P.cmp(this.m)>=0?O=P.isub(this.m):P.cmpn(0)<0&&(O=P.iadd(this.m)),O._forceRed(this)},Z.prototype.mul=function(v,T){if(v.isZero()||T.isZero())return new s(0)._forceRed(this);var S=v.mul(T),C=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),P=S.isub(C).iushrn(this.shift),O=P;return P.cmp(this.m)>=0?O=P.isub(this.m):P.cmpn(0)<0&&(O=P.iadd(this.m)),O._forceRed(this)},Z.prototype.invm=function(v){var T=this.imod(v._invmp(this.m).mul(this.r2));return T._forceRed(this)}})(t,gk)})(yx);var lq=yx.exports;const Le=ro(lq),cq="logger/5.7.0";let WA=!1,GA=!1;const ih={debug:1,default:2,info:2,warning:3,error:4,off:5};let KA=ih.default,L1=null;function fq(){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 YA=fq();var Hy;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(Hy||(Hy={}));var Ri;(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"})(Ri||(Ri={}));const QA="0123456789abcdef";let Q=class Rr{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();ih[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(KA>ih[n])&&console.log.apply(console,r)}debug(...e){this._log(Rr.levels.DEBUG,e)}info(...e){this._log(Rr.levels.INFO,e)}warn(...e){this._log(Rr.levels.WARNING,e)}makeError(e,r,n){if(GA)return this.makeError("censored error",r,{});r||(r=Rr.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(l=>{const c=n[l];try{if(c instanceof Uint8Array){let f="";for(let u=0;u>4],f+=QA[c[u]&15];i.push(l+"=Uint8Array(0x"+f+")")}else i.push(l+"="+JSON.stringify(c))}catch{i.push(l+"="+JSON.stringify(n[l].toString()))}}),i.push(`code=${r}`),i.push(`version=${this.version}`);const s=e;let o="";switch(r){case Ri.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 Ri.CALL_EXCEPTION:case Ri.INSUFFICIENT_FUNDS:case Ri.MISSING_NEW:case Ri.NONCE_EXPIRED:case Ri.REPLACEMENT_UNDERPRICED:case Ri.TRANSACTION_REPLACED:case Ri.UNPREDICTABLE_GAS_LIMIT:o=r;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const a=new Error(e);return a.reason=s,a.code=r,Object.keys(n).forEach(function(l){a[l]=n[l]}),a}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,Rr.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,i){e||this.throwError(r,n,i)}assertArgument(e,r,n,i){e||this.throwArgumentError(r,n,i)}checkNormalize(e){YA&&this.throwError("platform missing String.prototype.normalize",Rr.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:YA})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,Rr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,Rr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,Rr.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",Rr.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",Rr.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",Rr.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return L1||(L1=new Rr(cq)),L1}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",Rr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),WA){if(!e)return;this.globalLogger().throwError("error censorship permanent",Rr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}GA=!!e,WA=!!r}static setLogLevel(e){const r=ih[e.toLowerCase()];if(r==null){Rr.globalLogger().warn("invalid log level - "+e);return}KA=r}static from(e){return new Rr(e)}};Q.errors=Ri;Q.levels=Hy;const uq="bytes/5.7.0",or=new Q(uq);function i7(t){return!!t.toHexString}function Hl(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return Hl(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function bv(t){return Ze(t)&&!(t.length%2)||Cc(t)}function JA(t){return typeof t=="number"&&t==t&&t%1===0}function Cc(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!JA(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function de(t,e){if(e||(e={}),typeof t=="number"){or.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),Hl(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),i7(t)&&(t=t.toHexString()),Ze(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":or.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;ide(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),Hl(n)}function qs(t){let e=de(t);if(e.length===0)return e;let r=0;for(;re&&or.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),Hl(r)}function Ze(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const j1="0123456789abcdef";function he(t,e){if(e||(e={}),typeof t=="number"){or.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=j1[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(Ze(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":or.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Cc(t)){let r="0x";for(let n=0;n>4]+j1[i&15]}return r}return or.throwArgumentError("invalid hexlify value","value",t)}function Va(t){if(typeof t!="string")t=he(t);else if(!Ze(t)||t.length%2)return null;return(t.length-2)/2}function Ir(t,e,r){return typeof t!="string"?t=he(t):(!Ze(t)||t.length%2)&&or.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function Sn(t){let e="0x";return t.forEach(r=>{e+=he(r).substring(2)}),e}function mx(t){const e=hq(he(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function hq(t){typeof t!="string"&&(t=he(t)),Ze(t)||or.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&or.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function kc(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(bv(t)){let r=de(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=he(r.slice(0,32)),e.s=he(r.slice(32,64))):r.length===65?(e.r=he(r.slice(0,32)),e.s=he(r.slice(32,64)),e.v=r[64]):or.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:or.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=he(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=dq(de(e._vs),32);e._vs=he(i);const s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&or.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const o=he(i);e.s==null?e.s=o:e.s!==o&&or.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?or.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&&or.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!Ze(e.r)?or.throwArgumentError("signature missing or invalid r","signature",t):e.r=qt(e.r,32),e.s==null||!Ze(e.s)?or.throwArgumentError("signature missing or invalid s","signature",t):e.s=qt(e.s,32);const r=de(e.s);r[0]>=128&&or.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=he(r);e._vs&&(Ze(e._vs)||or.throwArgumentError("signature invalid _vs","signature",t),e._vs=qt(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&or.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function XA(t){return t=kc(t),he(Er([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const s7="bignumber/5.7.0";var o0=Le.BN;const _s=new Q(s7),F1={},ZA=9007199254740991;function vq(t){return t!=null&&(ce.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Ze(t)||typeof t=="bigint"||Cc(t))}let eS=!1;class ce{constructor(e,r){e!==F1&&_s.throwError("cannot call constructor directly; use BigNumber.from",Q.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return En(qe(this).fromTwos(e))}toTwos(e){return En(qe(this).toTwos(e))}abs(){return this._hex[0]==="-"?ce.from(this._hex.substring(1)):this}add(e){return En(qe(this).add(qe(e)))}sub(e){return En(qe(this).sub(qe(e)))}div(e){return ce.from(e).isZero()&&ai("division-by-zero","div"),En(qe(this).div(qe(e)))}mul(e){return En(qe(this).mul(qe(e)))}mod(e){const r=qe(e);return r.isNeg()&&ai("division-by-zero","mod"),En(qe(this).umod(r))}pow(e){const r=qe(e);return r.isNeg()&&ai("negative-power","pow"),En(qe(this).pow(r))}and(e){const r=qe(e);return(this.isNegative()||r.isNeg())&&ai("unbound-bitwise-result","and"),En(qe(this).and(r))}or(e){const r=qe(e);return(this.isNegative()||r.isNeg())&&ai("unbound-bitwise-result","or"),En(qe(this).or(r))}xor(e){const r=qe(e);return(this.isNegative()||r.isNeg())&&ai("unbound-bitwise-result","xor"),En(qe(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&ai("negative-width","mask"),En(qe(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&ai("negative-width","shl"),En(qe(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&ai("negative-width","shr"),En(qe(this).shrn(e))}eq(e){return qe(this).eq(qe(e))}lt(e){return qe(this).lt(qe(e))}lte(e){return qe(this).lte(qe(e))}gt(e){return qe(this).gt(qe(e))}gte(e){return qe(this).gte(qe(e))}isNegative(){return this._hex[0]==="-"}isZero(){return qe(this).isZero()}toNumber(){try{return qe(this).toNumber()}catch{ai("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return _s.throwError("this platform does not support BigInt",Q.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?eS||(eS=!0,_s.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?_s.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",Q.errors.UNEXPECTED_ARGUMENT,{}):_s.throwError("BigNumber.toString does not accept parameters",Q.errors.UNEXPECTED_ARGUMENT,{})),qe(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof ce)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new ce(F1,ou(e)):e.match(/^-?[0-9]+$/)?new ce(F1,ou(new o0(e))):_s.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&ai("underflow","BigNumber.from",e),(e>=ZA||e<=-ZA)&&ai("overflow","BigNumber.from",e),ce.from(String(e));const r=e;if(typeof r=="bigint")return ce.from(r.toString());if(Cc(r))return ce.from(he(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return ce.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(Ze(n)||n[0]==="-"&&Ze(n.substring(1))))return ce.from(n)}return _s.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function ou(t){if(typeof t!="string")return ou(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&_s.throwArgumentError("invalid hex","value",t),t=ou(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 En(t){return ce.from(ou(t))}function qe(t){const e=ce.from(t).toHexString();return e[0]==="-"?new o0("-"+e.substring(3),16):new o0(e.substring(2),16)}function ai(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),_s.throwError(t,Q.errors.NUMERIC_FAULT,n)}function pq(t){return new o0(t,36).toString(16)}const mn=new Q(s7),Tf={},o7=ce.from(0),a7=ce.from(-1);function l7(t,e,r,n){const i={fault:e,operation:r};return n!==void 0&&(i.value=n),mn.throwError(t,Q.errors.NUMERIC_FAULT,i)}let Pf="0";for(;Pf.length<256;)Pf+=Pf;function gx(t){if(typeof t!="number")try{t=ce.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+Pf.substring(0,t):mn.throwArgumentError("invalid decimal size","decimals",t)}function sh(t,e){e==null&&(e=0);const r=gx(e);t=ce.from(t);const n=t.lt(o7);n&&(t=t.mul(a7));let i=t.mod(r).toString();for(;i.length2&&mn.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&&l7("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?l:(typeof e[o]!==a&&mn.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&&mn.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&mn.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new Wl(Tf,r,n,i)}}class Hr{constructor(e,r,n,i){e!==Tf&&mn.throwError("cannot use FixedNumber constructor; use FixedNumber.from",Q.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&mn.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=Yi(this._value,this.format.decimals),n=Yi(e._value,e.format.decimals);return Hr.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=Yi(this._value,this.format.decimals),n=Yi(e._value,e.format.decimals);return Hr.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=Yi(this._value,this.format.decimals),n=Yi(e._value,e.format.decimals);return Hr.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=Yi(this._value,this.format.decimals),n=Yi(e._value,e.format.decimals);return Hr.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=Hr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(tS.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=Hr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(tS.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)&&mn.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=Hr.from("1"+Pf.substring(0,e),this.format),i=yq.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&&mn.throwArgumentError("invalid byte width","width",e);const r=ce.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return qt(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return Hr.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!vq(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),Hr.fromString(sh(e,r),Wl.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=Wl.from(r),i=Yi(e,n.decimals);!n.signed&&i.lt(o7)&&l7("unsigned value cannot be negative","overflow","value",e);let s=null;n.signed?s=i.toTwos(n.width).toHexString():(s=i.toHexString(),s=qt(s,n.width/8));const o=sh(i,n.decimals);return new Hr(Tf,s,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=Wl.from(r);if(de(e).length>n.width/8)throw new Error("overflow");let i=ce.from(e);n.signed&&(i=i.fromTwos(n.width));const s=i.toTwos((n.signed?0:1)+n.width).toHexString(),o=sh(i,n.decimals);return new Hr(Tf,s,o,n)}static from(e,r){if(typeof e=="string")return Hr.fromString(e,r);if(Cc(e))return Hr.fromBytes(e,r);try{return Hr.fromValue(e,0,r)}catch(n){if(n.code!==Q.errors.INVALID_ARGUMENT)throw n}return mn.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const tS=Hr.from(1),yq=Hr.from("0.5"),mq="properties/5.7.0";var gq=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const a0=new Q(mq);function se(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function os(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 yr(t){return gq(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 c7(t,e){(!t||typeof t!="object")&&a0.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||a0.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function Nr(t){const e={};for(const r in t)e[r]=t[r];return e}const xq={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function f7(t){if(t==null||xq[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;rqa(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&se(e,r,qa(n))}return e}return a0.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function qa(t){return bq(t)}class nl{constructor(e){for(const r in e)this[r]=qa(e[r])}}const Bu="abi/5.7.0",Ke=new Q(Bu),Ha={};let rS={calldata:!0,memory:!0,storage:!0},wq={calldata:!0,memory:!0};function Ed(t,e){if(t==="bytes"||t==="string"){if(rS[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&wq[e])return!0;return(rS[e]||e==="payable")&&Ke.throwArgumentError("invalid modifier","name",e),!1}function Eq(t,e){let r=t;function n(a){Ke.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!==nt.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===nt.full?", ":",")+")"):r+=this.type,e!==nt.sighash&&(this.indexed===!0&&(r+=" indexed"),e===nt.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?Fr.fromString(e,r):Fr.fromObject(e)}static fromObject(e){return Fr.isParamType(e)?e:new Fr(Ha,{name:e.name||null,type:yl(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(Fr.fromObject):null})}static fromString(e,r){function n(i){return Fr.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(Eq(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function au(t,e){return Cq(t).map(r=>Fr.fromString(r,e))}class $s{constructor(e,r){e!==Ha&&Ke.throwError("use a static from method",Q.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),oh(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return $s.isFragment(e)?e:typeof e=="string"?$s.fromString(e):$s.fromObject(e)}static fromObject(e){if($s.isFragment(e))return e;switch(e.type){case"function":return ns.fromObject(e);case"event":return Ds.fromObject(e);case"constructor":return rs.fromObject(e);case"error":return ko.fromObject(e);case"fallback":case"receive":return null}return Ke.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"?Ds.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?ns.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?rs.fromString(e.trim()):e.split(" ")[0]==="error"?ko.fromString(e.substring(5).trim()):Ke.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class Ds extends $s{format(e){if(e||(e=nt.sighash),nt[e]||Ke.throwArgumentError("invalid format type","format",e),e===nt.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!==nt.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===nt.full?", ":",")+") ",e!==nt.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?Ds.fromString(e):Ds.fromObject(e)}static fromObject(e){if(Ds.isEventFragment(e))return e;e.type!=="event"&&Ke.throwArgumentError("invalid event object","value",e);const r={name:lu(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(Fr.fromObject):[],type:"event"};return new Ds(Ha,r)}static fromString(e){let r=e.match(cu);r||Ke.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:Ke.warn("unknown modifier: "+i)}}),Ds.fromObject({name:r[1].trim(),anonymous:n,inputs:au(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&&Ke.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||Ke.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=ce.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&&Ke.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&Ke.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"&&Ke.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&&Ke.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"&&Ke.throwArgumentError("unable to determine stateMutability","value",t),e}class rs extends $s{format(e){if(e||(e=nt.sighash),nt[e]||Ke.throwArgumentError("invalid format type","format",e),e===nt.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===nt.sighash&&Ke.throwError("cannot format a constructor for sighash",Q.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===nt.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?rs.fromString(e):rs.fromObject(e)}static fromObject(e){if(rs.isConstructorFragment(e))return e;e.type!=="constructor"&&Ke.throwArgumentError("invalid constructor object","value",e);let r=h7(e);r.constant&&Ke.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(Fr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?ce.from(e.gas):null};return new rs(Ha,n)}static fromString(e){let r={type:"constructor"};e=u7(e,r);let n=e.match(cu);return(!n||n[1].trim()!=="constructor")&&Ke.throwArgumentError("invalid constructor string","value",e),r.inputs=au(n[2].trim(),!1),d7(n[3].trim(),r),rs.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class ns extends rs{format(e){if(e||(e=nt.sighash),nt[e]||Ke.throwArgumentError("invalid format type","format",e),e===nt.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!==nt.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===nt.full?", ":",")+") ",e!==nt.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"?ns.fromString(e):ns.fromObject(e)}static fromObject(e){if(ns.isFunctionFragment(e))return e;e.type!=="function"&&Ke.throwArgumentError("invalid function object","value",e);let r=h7(e);const n={type:e.type,name:lu(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(Fr.fromObject):[],outputs:e.outputs?e.outputs.map(Fr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?ce.from(e.gas):null};return new ns(Ha,n)}static fromString(e){let r={type:"function"};e=u7(e,r);let n=e.split(" returns ");n.length>2&&Ke.throwArgumentError("invalid function string","value",e);let i=n[0].match(cu);if(i||Ke.throwArgumentError("invalid function signature","value",e),r.name=i[1].trim(),r.name&&lu(r.name),r.inputs=au(i[2],!1),d7(i[3].trim(),r),n.length>1){let s=n[1].match(cu);(s[1].trim()!=""||s[3].trim()!="")&&Ke.throwArgumentError("unexpected tokens","value",e),r.outputs=au(s[2],!1)}else r.outputs=[];return ns.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function nS(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Ke.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class ko extends $s{format(e){if(e||(e=nt.sighash),nt[e]||Ke.throwArgumentError("invalid format type","format",e),e===nt.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==nt.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===nt.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?ko.fromString(e):ko.fromObject(e)}static fromObject(e){if(ko.isErrorFragment(e))return e;e.type!=="error"&&Ke.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:lu(e.name),inputs:e.inputs?e.inputs.map(Fr.fromObject):[]};return nS(new ko(Ha,r))}static fromString(e){let r={type:"error"},n=e.match(cu);return n||Ke.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&lu(r.name),r.inputs=au(n[2],!1),nS(ko.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function yl(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const Sq=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function lu(t){return(!t||!t.match(Sq))&&Ke.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const cu=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function Cq(t){t=t.trim();let e=[],r="",n=0;for(let i=0;ithis.wordSize&&xx.throwError("value out-of-bounds",Q.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=Er([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 l0{constructor(e,r,n,i){se(this,"_data",de(e)),se(this,"wordSize",r||32),se(this,"_coerceFunc",n),se(this,"allowLoose",i),this._offset=0}get data(){return he(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):l0.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:xx.throwError("data out-of-bounds",Q.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new l0(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 ce.from(this.readBytes(this.wordSize))}}var v7={exports:{}};/** * [js-sha3]{@link https://github.com/emn178/js-sha3} * * @version 0.8.0 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2015-2018 * @license MIT - */(function(t){(function(){var e="input is invalid type",r="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var s=!n&&typeof self=="object",o=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?i=mk:s&&(i=self);var a=!i.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,l=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",c="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],u=[4,1024,262144,67108864],d=[1,256,65536,16777216],h=[6,1536,393216,100663296],p=[0,8,16,24],m=[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],x=[224,256,384,512],b=[128,256],w=["hex","buffer","arrayBuffer","array","digest"],A={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(k){return Object.prototype.toString.call(k)==="[object Array]"}),l&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(k){return typeof k=="object"&&k.buffer&&k.buffer.constructor===ArrayBuffer});for(var R=function(k,$,V){return function(q){return new g(k,$,k).update(q)[V]()}},N=function(k,$,V){return function(q,X){return new g(k,$,X).update(q)[V]()}},I=function(k,$,V){return function(q,X,le,ne){return v["cshake"+k].update(q,X,le,ne)[V]()}},F=function(k,$,V){return function(q,X,le,ne){return v["kmac"+k].update(q,X,le,ne)[V]()}},j=function(k,$,V,q){for(var X=0;X>5,this.byteCount=this.blockCount<<2,this.outputBlocks=V>>5,this.extraBytes=(V&31)>>3;for(var q=0;q<50;++q)this.s[q]=0}g.prototype.update=function(k){if(this.finalized)throw new Error(r);var $,V=typeof k;if(V!=="string"){if(V==="object"){if(k===null)throw new Error(e);if(l&&k.constructor===ArrayBuffer)k=new Uint8Array(k);else if(!Array.isArray(k)&&(!l||!ArrayBuffer.isView(k)))throw new Error(e)}else throw new Error(e);$=!0}for(var q=this.blocks,X=this.byteCount,le=k.length,ne=this.blockCount,te=0,Ie=this.s,pe,Se;te>2]|=k[te]<>2]|=Se<>2]|=(192|Se>>6)<>2]|=(128|Se&63)<=57344?(q[pe>>2]|=(224|Se>>12)<>2]|=(128|Se>>6&63)<>2]|=(128|Se&63)<>2]|=(240|Se>>18)<>2]|=(128|Se>>12&63)<>2]|=(128|Se>>6&63)<>2]|=(128|Se&63)<=X){for(this.start=pe-X,this.block=q[ne],pe=0;pe>8,V=k&255;V>0;)X.unshift(V),k=k>>8,V=k&255,++q;return $?X.push(q):X.unshift(q),this.update(X),X.length},g.prototype.encodeString=function(k){var $,V=typeof k;if(V!=="string"){if(V==="object"){if(k===null)throw new Error(e);if(l&&k.constructor===ArrayBuffer)k=new Uint8Array(k);else if(!Array.isArray(k)&&(!l||!ArrayBuffer.isView(k)))throw new Error(e)}else throw new Error(e);$=!0}var q=0,X=k.length;if($)q=X;else for(var le=0;le=57344?q+=3:(ne=65536+((ne&1023)<<10|k.charCodeAt(++le)&1023),q+=4)}return q+=this.encode(q*8),this.update(k),q},g.prototype.bytepad=function(k,$){for(var V=this.encode($),q=0;q>2]|=this.padding[$&3],this.lastByteIndex===this.byteCount)for(k[0]=k[V],$=1;$>4&15]+c[te&15]+c[te>>12&15]+c[te>>8&15]+c[te>>20&15]+c[te>>16&15]+c[te>>28&15]+c[te>>24&15];le%k===0&&(B($),X=0)}return q&&(te=$[X],ne+=c[te>>4&15]+c[te&15],q>1&&(ne+=c[te>>12&15]+c[te>>8&15]),q>2&&(ne+=c[te>>20&15]+c[te>>16&15])),ne},g.prototype.arrayBuffer=function(){this.finalize();var k=this.blockCount,$=this.s,V=this.outputBlocks,q=this.extraBytes,X=0,le=0,ne=this.outputBits>>3,te;q?te=new ArrayBuffer(V+1<<2):te=new ArrayBuffer(ne);for(var Ie=new Uint32Array(te);le>8&255,ne[te+2]=Ie>>16&255,ne[te+3]=Ie>>24&255;le%k===0&&B($)}return q&&(te=le<<2,Ie=$[X],ne[te]=Ie&255,q>1&&(ne[te+1]=Ie>>8&255),q>2&&(ne[te+2]=Ie>>16&255)),ne};function _(k,$,V){g.call(this,k,$,V)}_.prototype=new g,_.prototype.finalize=function(){return this.encode(this.outputBits,!0),g.prototype.finalize.call(this)};var B=function(k){var $,V,q,X,le,ne,te,Ie,pe,Se,sr,Xe,lt,ti,ct,tt,As,Rt,it,Nn,mt,ft,Xr,Ge,gt,ri,_t,Ye,Ui,xt,bt,Es,wt,ot,zi,ut,at,wi,It,At,Ss,Et,dt,ni,Ot,Mt,z,H,W,re,fe,ve,Ee,ae,ge,we,ye,Ce,Be,Ve,Fe,Lt,ht;for(q=0;q<48;q+=2)X=k[0]^k[10]^k[20]^k[30]^k[40],le=k[1]^k[11]^k[21]^k[31]^k[41],ne=k[2]^k[12]^k[22]^k[32]^k[42],te=k[3]^k[13]^k[23]^k[33]^k[43],Ie=k[4]^k[14]^k[24]^k[34]^k[44],pe=k[5]^k[15]^k[25]^k[35]^k[45],Se=k[6]^k[16]^k[26]^k[36]^k[46],sr=k[7]^k[17]^k[27]^k[37]^k[47],Xe=k[8]^k[18]^k[28]^k[38]^k[48],lt=k[9]^k[19]^k[29]^k[39]^k[49],$=Xe^(ne<<1|te>>>31),V=lt^(te<<1|ne>>>31),k[0]^=$,k[1]^=V,k[10]^=$,k[11]^=V,k[20]^=$,k[21]^=V,k[30]^=$,k[31]^=V,k[40]^=$,k[41]^=V,$=X^(Ie<<1|pe>>>31),V=le^(pe<<1|Ie>>>31),k[2]^=$,k[3]^=V,k[12]^=$,k[13]^=V,k[22]^=$,k[23]^=V,k[32]^=$,k[33]^=V,k[42]^=$,k[43]^=V,$=ne^(Se<<1|sr>>>31),V=te^(sr<<1|Se>>>31),k[4]^=$,k[5]^=V,k[14]^=$,k[15]^=V,k[24]^=$,k[25]^=V,k[34]^=$,k[35]^=V,k[44]^=$,k[45]^=V,$=Ie^(Xe<<1|lt>>>31),V=pe^(lt<<1|Xe>>>31),k[6]^=$,k[7]^=V,k[16]^=$,k[17]^=V,k[26]^=$,k[27]^=V,k[36]^=$,k[37]^=V,k[46]^=$,k[47]^=V,$=Se^(X<<1|le>>>31),V=sr^(le<<1|X>>>31),k[8]^=$,k[9]^=V,k[18]^=$,k[19]^=V,k[28]^=$,k[29]^=V,k[38]^=$,k[39]^=V,k[48]^=$,k[49]^=V,ti=k[0],ct=k[1],Mt=k[11]<<4|k[10]>>>28,z=k[10]<<4|k[11]>>>28,Ye=k[20]<<3|k[21]>>>29,Ui=k[21]<<3|k[20]>>>29,Ve=k[31]<<9|k[30]>>>23,Fe=k[30]<<9|k[31]>>>23,Et=k[40]<<18|k[41]>>>14,dt=k[41]<<18|k[40]>>>14,ot=k[2]<<1|k[3]>>>31,zi=k[3]<<1|k[2]>>>31,tt=k[13]<<12|k[12]>>>20,As=k[12]<<12|k[13]>>>20,H=k[22]<<10|k[23]>>>22,W=k[23]<<10|k[22]>>>22,xt=k[33]<<13|k[32]>>>19,bt=k[32]<<13|k[33]>>>19,Lt=k[42]<<2|k[43]>>>30,ht=k[43]<<2|k[42]>>>30,ae=k[5]<<30|k[4]>>>2,ge=k[4]<<30|k[5]>>>2,ut=k[14]<<6|k[15]>>>26,at=k[15]<<6|k[14]>>>26,Rt=k[25]<<11|k[24]>>>21,it=k[24]<<11|k[25]>>>21,re=k[34]<<15|k[35]>>>17,fe=k[35]<<15|k[34]>>>17,Es=k[45]<<29|k[44]>>>3,wt=k[44]<<29|k[45]>>>3,Ge=k[6]<<28|k[7]>>>4,gt=k[7]<<28|k[6]>>>4,we=k[17]<<23|k[16]>>>9,ye=k[16]<<23|k[17]>>>9,wi=k[26]<<25|k[27]>>>7,It=k[27]<<25|k[26]>>>7,Nn=k[36]<<21|k[37]>>>11,mt=k[37]<<21|k[36]>>>11,ve=k[47]<<24|k[46]>>>8,Ee=k[46]<<24|k[47]>>>8,ni=k[8]<<27|k[9]>>>5,Ot=k[9]<<27|k[8]>>>5,ri=k[18]<<20|k[19]>>>12,_t=k[19]<<20|k[18]>>>12,Ce=k[29]<<7|k[28]>>>25,Be=k[28]<<7|k[29]>>>25,At=k[38]<<8|k[39]>>>24,Ss=k[39]<<8|k[38]>>>24,ft=k[48]<<14|k[49]>>>18,Xr=k[49]<<14|k[48]>>>18,k[0]=ti^~tt&Rt,k[1]=ct^~As&it,k[10]=Ge^~ri&Ye,k[11]=gt^~_t&Ui,k[20]=ot^~ut&wi,k[21]=zi^~at&It,k[30]=ni^~Mt&H,k[31]=Ot^~z&W,k[40]=ae^~we&Ce,k[41]=ge^~ye&Be,k[2]=tt^~Rt&Nn,k[3]=As^~it&mt,k[12]=ri^~Ye&xt,k[13]=_t^~Ui&bt,k[22]=ut^~wi&At,k[23]=at^~It&Ss,k[32]=Mt^~H&re,k[33]=z^~W&fe,k[42]=we^~Ce&Ve,k[43]=ye^~Be&Fe,k[4]=Rt^~Nn&ft,k[5]=it^~mt&Xr,k[14]=Ye^~xt&Es,k[15]=Ui^~bt&wt,k[24]=wi^~At&Et,k[25]=It^~Ss&dt,k[34]=H^~re&ve,k[35]=W^~fe&Ee,k[44]=Ce^~Ve&Lt,k[45]=Be^~Fe&ht,k[6]=Nn^~ft&ti,k[7]=mt^~Xr&ct,k[16]=xt^~Es&Ge,k[17]=bt^~wt>,k[26]=At^~Et&ot,k[27]=Ss^~dt&zi,k[36]=re^~ve&ni,k[37]=fe^~Ee&Ot,k[46]=Ve^~Lt&ae,k[47]=Fe^~ht&ge,k[8]=ft^~ti&tt,k[9]=Xr^~ct&As,k[18]=Es^~Ge&ri,k[19]=wt^~gt&_t,k[28]=Et^~ot&ut,k[29]=dt^~zi&at,k[38]=ve^~ni&Mt,k[39]=Ee^~Ot&z,k[48]=Lt^~ae&we,k[49]=ht^~ge&ye,k[0]^=m[q],k[1]^=m[q+1]};if(a)t.exports=v;else for(S=0;S>=8;return e}function iS(t,e,r){let n=0;for(let i=0;ie+1+n&&Xi.throwError("child data too short",Q.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function p7(t,e){if(t.length===0&&Xi.throwError("data too short",Q.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&Xi.throwError("data short segment too short",Q.errors.BUFFER_OVERRUN,{});const n=iS(t,e+1,r);return e+1+r+n>t.length&&Xi.throwError("data long segment too short",Q.errors.BUFFER_OVERRUN,{}),sS(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&Xi.throwError("data array too short",Q.errors.BUFFER_OVERRUN,{}),sS(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&Xi.throwError("data array too short",Q.errors.BUFFER_OVERRUN,{});const n=iS(t,e+1,r);e+1+r+n>t.length&&Xi.throwError("data array too short",Q.errors.BUFFER_OVERRUN,{});const i=he(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&&Xi.throwError("data too short",Q.errors.BUFFER_OVERRUN,{});const n=he(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:he(t[e])}}function bx(t){const e=de(t),r=p7(e,0);return r.consumed!==e.length&&Xi.throwArgumentError("invalid rlp data","data",t),r.result}const _H="address/5.7.0",Dl=new Q(_H);function oS(t){Ze(t,20)||Dl.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=de(Je(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 IH=9007199254740991;function OH(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const wx={};for(let t=0;t<10;t++)wx[String(t)]=String(t);for(let t=0;t<26;t++)wx[String.fromCharCode(65+t)]=String(10+t);const aS=Math.floor(OH(IH));function MH(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>wx[n]).join("");for(;e.length>=aS;){let n=e.substring(0,aS);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 ir(t){let e=null;if(typeof t!="string"&&Dl.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=oS(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Dl.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)!==MH(t)&&Dl.throwArgumentError("bad icap checksum","address",t),e=pH(t.substring(4));e.length<40;)e="0"+e;e=oS("0x"+e)}else Dl.throwArgumentError("invalid address","address",t);return e}function NH(t){try{return ir(t),!0}catch{}return!1}function y7(t){let e=null;try{e=ir(t.from)}catch{Dl.throwArgumentError("missing from address","transaction",t)}const r=Hs(de(ce.from(t.nonce).toHexString()));return ir(Ir(Je(cc([e,r])),12))}class DH extends ao{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=ir(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return ir(Ht(e.readValue().toHexString(),20))}}class LH extends ao{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 Ll=new Q(Bu);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(c=>{const f=c.localName;return f||Ll.throwError("cannot encode object for signature with missing names",Q.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]&&Ll.throwError("cannot encode object for signature with duplicate names",Q.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]=!0,r[f]})}else Ll.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&Ll.throwArgumentError("types/value length mismatch","tuple",r);let i=new qy(t.wordSize),s=new qy(t.wordSize),o=[];e.forEach((l,c)=>{let f=n[c];if(l.dynamic){let u=s.length;l.encode(s,f);let d=i.writeUpdatableValue();o.push(h=>{d(h+u)})}else l.encode(i,f)}),o.forEach(l=>{l(i.length)});let a=t.appendWriter(i);return a+=t.appendWriter(s),a}function g7(t,e){let r=[],n=t.subReader(0);e.forEach(s=>{let o=null;if(s.dynamic){let a=t.readValue(),l=n.subReader(a.toNumber());try{o=s.decode(l)}catch(c){if(c.code===Q.errors.BUFFER_OVERRUN)throw c;o=c,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(t)}catch(a){if(a.code===Q.errors.BUFFER_OVERRUN)throw a;o=a,o.baseType=s.name,o.name=s.localName,o.type=s.type}o!=null&&r.push(o)});const i=e.reduce((s,o)=>{const a=o.localName;return a&&(s[a]||(s[a]=0),s[a]++),s},{});e.forEach((s,o)=>{let a=s.localName;if(!a||i[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;const l=r[o];l instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw l}}):r[a]=l});for(let s=0;s{throw o}})}return Object.freeze(r)}class jH extends ao{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&&Ll.throwError("insufficient data length",Q.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let i=0;i>6===2;o++)s++;return s}return t===Bn.OVERRUN?r.length-e-1:0}function YH(t,e,r,n,i){return t===Bn.OVERLONG?(n.push(i),0):(n.push(65533),A7(t,e,r))}const QH=Object.freeze({error:KH,ignore:A7,replace:YH});function E7(t,e){e==null&&(e=QH.error),t=de(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(Bn.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(Bn.BAD_PREFIX,n-1,t,r);continue}if(n-1+s>=t.length){n+=e(Bn.OVERRUN,n-1,t,r);continue}let a=i&(1<<8-s-1)-1;for(let l=0;l1114111){n+=e(Bn.OUT_OF_RANGE,n-1-s,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(Bn.UTF16_SURROGATE,n-1-s,t,r,a);continue}if(a<=o){n+=e(Bn.OVERLONG,n-1-s,t,r,a);continue}r.push(a)}}return r}function Tt(t,e=Qo.current){e!=Qo.current&&(w7.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 de(r)}function JH(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function $u(t,e){return JH(E7(t,e))}function XH(t,e=Qo.current){return E7(Tt(t,e))}class ZH extends x7{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,Tt(r))}decode(e){return $u(super.decode(e))}}class Ed extends ao{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,g7(e,this.coders))}}const Sd=new Q(Bu),eq=new RegExp(/^bytes([0-9]*)$/),tq=new RegExp(/^(u?int)([0-9]*)$/);class rq{constructor(e){se(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new DH(e.name);case"bool":return new FH(e.name);case"string":return new ZH(e.name);case"bytes":return new BH(e.name);case"array":return new jH(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new Ed((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new UH(e.name)}let r=e.type.match(tq);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&Sd.throwArgumentError("invalid "+r[1]+" bit length","param",e),new WH(n/8,r[1]==="int",e.name)}if(r=e.type.match(eq),r){let n=parseInt(r[1]);return(n===0||n>32)&&Sd.throwArgumentError("invalid bytes length","param",e),new $H(n,e.name)}return Sd.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new a0(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new qy(this._getWordSize())}getDefaultValue(e){const r=e.map(i=>this._getCoder(Fr.from(i)));return new Ed(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&Sd.throwError("types/values length mismatch",Q.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(o=>this._getCoder(Fr.from(o))),i=new Ed(n,"_"),s=this._getWriter();return i.encode(s,r),s.data}decode(e,r,n){const i=e.map(o=>this._getCoder(Fr.from(o)));return new Ed(i,"_").decode(this._getReader(de(r),n))}}const nq=new rq;function Ca(t){return Je(Tt(t))}const S7="hash/5.7.0";function C7(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 iq(t){const e={};for(let r=0;r>--l&1}const u=31,d=Math.pow(2,u),h=d>>>1,p=h>>1,m=d-1;let x=0;for(let N=0;N1;){let Y=I+F>>>1;N>>1|f(),j=j<<1^h,U=(U^h)<<1|h|1;w=j,A=1+U-j}let R=n-4;return b.map(N=>{switch(N-R){case 3:return R+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return R+256+(t[a++]<<8|t[a++]);case 1:return R+t[a++];default:return N-1}})}function oq(t){let e=0;return()=>t[e++]}function aq(t){return oq(sq(t))}function lq(t){return t&1?~t>>1:t>>1}function cq(t,e){let r=Array(t);for(let n=0;ne[o]):r}function uq(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(hq(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(vq(r,t))}return iq(T7(e))}function dq(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function P7(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;in[o].push(s));return n}function hq(t,e){let r=1+e(),n=e(),i=dq(e),s=P7(i.length,1+t,e);return T7(s.map((o,a)=>{const l=o[0],c=o.slice(1);return Array(i[a]).fill(void 0).map((f,u)=>{let d=u*n;return[l+u*r,c.map(h=>h+d)]})}))}function vq(t,e){let r=1+e();return P7(r,1+t,e).map(i=>[i[0],i.slice(1)])}function pq(t){let e=l0(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let c=l0(t,e);if(c.length==0)break;n.push({set:new Set(c),node:r()})}n.sort((c,f)=>f.set.size-c.set.size);let i=t(),s=i%3;i=i/3|0;let o=!!(i&1);i>>=1;let a=i==1,l=i==2;return{branches:n,valid:s,fe0f:o,save:a,check:l}}}function yq(){return aq(C7("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const bv=yq(),mq=new Set(l0(bv)),gq=new Set(l0(bv)),xq=uq(bv),bq=pq(bv),cS=45,fS=95;function R7(t){return XH(t)}function wq(t){return t.filter(e=>e!=65039)}function _7(t){for(let e of t.split(".")){let r=R7(e);try{for(let n=r.lastIndexOf(fS)-1;n>=0;n--)if(r[n]!==fS)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===cS&&r[3]===cS)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function Aq(t){return _7(Eq(t,wq))}function Eq(t,e){let r=R7(t).reverse(),n=[];for(;r.length;){let i=Cq(r);if(i){n.push(...e(i));continue}let s=r.pop();if(mq.has(s)){n.push(s);continue}if(gq.has(s))continue;let o=xq[s];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${s.toString(16).toUpperCase()}`)}return _7(Sq(String.fromCodePoint(...n)))}function Sq(t){return t.normalize("NFC")}function Cq(t,e){var r;let n=bq,i,s,o=[],a=t.length;for(e&&(e.length=0);a;){let l=t[--a];if(n=(r=n.branches.find(c=>c.set.has(l)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)s=l;else if(n.check&&l===s)break;o.push(l),n.fe0f&&(o.push(65039),a>0&&t[a-1]==65039&&a--),n.valid&&(i=o.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return i}const kq=new Q(S7),I7=new Uint8Array(32);I7.fill(0);function uS(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function O7(t){const e=Tt(Aq(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(uS(e.slice(n))),r}function ah(t){typeof t!="string"&&kq.throwArgumentError("invalid ENS name; not a string","name",t);let e=I7;const r=O7(t);for(;r.length;)e=Je(wr([e,Je(r.pop())]));return he(e)}function Tq(t){return he(wr(O7(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 Pq=`Ethereum Signed Message: -`;function Rq(t){return typeof t=="string"&&(t=Tt(t)),Je(wr([Tt(Pq),Tt(String(t.length)),t]))}var _q=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Jt=new Q(S7),M7=new Uint8Array(32);M7.fill(0);const Iq=ce.from(-1),N7=ce.from(0),D7=ce.from(1),Oq=ce.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Mq(t){const e=de(t),r=e.length%32;return r?Sn([e,M7.slice(r)]):he(e)}const Nq=Ht(D7.toHexString(),32),Dq=Ht(N7.toHexString(),32),dS={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},F1=["name","version","chainId","verifyingContract","salt"];function hS(t){return function(e){return typeof e!="string"&&Jt.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const Lq={name:hS("name"),version:hS("version"),chainId:function(t){try{return ce.from(t).toString()}catch{}return Jt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return ir(t).toLowerCase()}catch{}return Jt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=de(t);if(e.length!==32)throw new Error("bad length");return he(e)}catch{}return Jt.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function B1(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))&&Jt.throwArgumentError("invalid numeric width","type",t);const i=Oq.mask(r?n-1:n),s=r?i.add(D7).mul(Iq):N7;return function(o){const a=ce.from(o);return(a.lt(s)||a.gt(i))&&Jt.throwArgumentError(`value out-of-bounds for ${t}`,"value",o),Ht(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))&&Jt.throwArgumentError("invalid bytes width","type",t),function(n){return de(n).length!==r&&Jt.throwArgumentError(`invalid length for ${t}`,"value",n),Mq(n)}}}switch(t){case"address":return function(e){return Ht(ir(e),32)};case"bool":return function(e){return e?Nq:Dq};case"bytes":return function(e){return Je(e)};case"string":return function(e){return Ca(e)}}return null}function vS(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class pn{constructor(e){se(this,"types",Object.freeze(Ha(e))),se(this,"_encoderCache",{}),se(this,"_types",{});const r={},n={},i={};Object.keys(e).forEach(a=>{r[a]={},n[a]=[],i[a]={}});for(const a in e){const l={};e[a].forEach(c=>{l[c.name]&&Jt.throwArgumentError(`duplicate variable name ${JSON.stringify(c.name)} in ${JSON.stringify(a)}`,"types",e),l[c.name]=!0;const f=c.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===a&&Jt.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!B1(f)&&(n[f]||Jt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),n[f].push(a),r[a][f]=!0)})}const s=Object.keys(n).filter(a=>n[a].length===0);s.length===0?Jt.throwArgumentError("missing primary type","types",e):s.length>1&&Jt.throwArgumentError(`ambiguous primary types or unused types: ${s.map(a=>JSON.stringify(a)).join(", ")}`,"types",e),se(this,"primaryType",s[0]);function o(a,l){l[a]&&Jt.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),l[a]=!0,Object.keys(r[a]).forEach(c=>{n[c]&&(o(c,l),Object.keys(l).forEach(f=>{i[f][c]=!0}))}),delete l[a]}o(this.primaryType,{});for(const a in i){const l=Object.keys(i[a]);l.sort(),this._types[a]=vS(a,e[a])+l.map(c=>vS(c,e[c])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=B1(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&&Jt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let l=a.map(s);return this._types[i]&&(l=l.map(Je)),Je(Sn(l))}}const n=this.types[e];if(n){const i=Ca(this._types[e]);return s=>{const o=n.map(({name:a,type:l})=>{const c=this.getEncoder(l)(s[a]);return this._types[l]?Je(c):c});return o.unshift(i),Sn(o)}}return Jt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||Jt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Je(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(B1(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&&Jt.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),{}):Jt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new pn(e)}static getPrimaryType(e){return pn.from(e).primaryType}static hashStruct(e,r,n){return pn.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const i=dS[n];i||Jt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>F1.indexOf(n.name)-F1.indexOf(i.name)),pn.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Sn(["0x1901",pn.hashDomain(e),pn.from(r).hash(n)])}static hash(e,r,n){return Je(pn.encode(e,r,n))}static resolveNames(e,r,n,i){return _q(this,void 0,void 0,function*(){e=Nr(e);const s={};e.verifyingContract&&!Ze(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const o=pn.from(r);o.visit(n,(a,l)=>(a==="address"&&!Ze(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){pn.hashDomain(e);const i={},s=[];F1.forEach(l=>{const c=e[l];c!=null&&(i[l]=Lq[l](c),s.push({name:l,type:dS[l]}))});const o=pn.from(r),a=Nr(r);return a.EIP712Domain?Jt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):a.EIP712Domain=s,o.encode(n),{types:a,domain:i,primaryType:o.primaryType,message:o.visit(n,(l,c)=>{if(l.match(/^bytes(\d*)/))return he(de(c));if(l.match(/^u?int/))return ce.from(c).toString();switch(l){case"address":return c.toLowerCase();case"bool":return!!c;case"string":return typeof c!="string"&&Jt.throwArgumentError("invalid string","value",c),c}return Jt.throwArgumentError("unsupported type","type",l)})}}}const Qt=new Q(Bu);class jq extends nl{}class Fq extends nl{}class Bq extends nl{}class Wy extends nl{static isIndexed(e){return!!(e&&e._isIndexed)}}const $q={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function pS(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class yS{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,se(this,"fragments",r.map(n=>$s.from(n)).filter(n=>n!=null)),se(this,"_abiCoder",os(new.target,"getAbiCoder")()),se(this,"functions",{}),se(this,"errors",{}),se(this,"events",{}),se(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){Qt.warn("duplicate definition - constructor");return}se(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]){Qt.warn("duplicate definition - "+s);return}i[s]=n}),this.deploy||se(this,"deploy",rs.from({payable:!1,type:"constructor"})),se(this,"_isInterface",!0)}format(e){e||(e=nt.full),e===nt.sighash&&Qt.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===nt.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return nq}static getAddress(e){return ir(e)}static getSighash(e){return Ir(Ca(e.format()),0,4)}static getEventTopic(e){return Ca(e.format())}getFunction(e){if(Ze(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];Qt.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?Qt.throwArgumentError("no matching function","name",n):i.length>1&&Qt.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const r=this.functions[ns.fromString(e).format()];return r||Qt.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(Ze(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];Qt.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?Qt.throwArgumentError("no matching event","name",n):i.length>1&&Qt.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const r=this.events[Ds.fromString(e).format()];return r||Qt.throwArgumentError("no matching event","signature",e),r}getError(e){if(Ze(e)){const n=os(this.constructor,"getSighash");for(const i in this.errors){const s=this.errors[i];if(e===n(s))return this.errors[i]}Qt.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?Qt.throwArgumentError("no matching error","name",n):i.length>1&&Qt.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const r=this.errors[ns.fromString(e).format()];return r||Qt.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 os(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),os(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=de(r);return he(n.slice(0,4))!==this.getSighash(e)&&Qt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",he(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),he(wr([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=de(r);return he(n.slice(0,4))!==this.getSighash(e)&&Qt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",he(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),he(wr([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=de(r),i=null,s="",o=null,a=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const c=he(n.slice(0,4)),f=$q[c];if(f)o=this._abiCoder.decode(f.inputs,n.slice(4)),a=f.name,l=f.signature,f.reason&&(i=o[0]),a==="Error"?s=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:a==="Panic"&&(s=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const u=this.getError(c);o=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,l=u.format()}catch{}break}}return Qt.throwError("call revert exception"+s,Q.errors.CALL_EXCEPTION,{method:e.format(),data:he(r),errorArgs:o,errorName:a,errorSignature:l,reason:i})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),he(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&Qt.throwError("too many arguments for "+e.format(),Q.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(s,o)=>s.type==="string"?Ca(o):s.type==="bytes"?Je(he(o)):(s.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),s.type.match(/^u?int/)&&(o=ce.from(o).toHexString()),s.type==="address"&&this._abiCoder.encode(["address"],[o]),Ht(he(o),32));for(r.forEach((s,o)=>{let a=e.inputs[o];if(!a.indexed){s!=null&&Qt.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"?Qt.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&&Qt.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(Ca(l));else if(o.type==="bytes")n.push(Je(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 d=this.getEventTopic(e);(!Ze(n[0],32)||n[0].toLowerCase()!==d)&&Qt.throwError("fragment/topic mismatch",Q.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:d,value:n[0]}),n=n.slice(1)}let i=[],s=[],o=[];e.inputs.forEach((d,h)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(i.push(Fr.fromObject({type:"bytes32",name:d.name})),o.push(!0)):(i.push(d),o.push(!1)):(s.push(d),o.push(!1))});let a=n!=null?this._abiCoder.decode(i,wr(n)):null,l=this._abiCoder.decode(s,r,!0),c=[],f=0,u=0;e.inputs.forEach((d,h)=>{if(d.indexed)if(a==null)c[h]=new Wy({_isIndexed:!0,hash:null});else if(o[h])c[h]=new Wy({_isIndexed:!0,hash:a[u++]});else try{c[h]=a[u++]}catch(p){c[h]=p}else try{c[h]=l[f++]}catch(p){c[h]=p}if(d.name&&c[d.name]==null){const p=c[h];p instanceof Error?Object.defineProperty(c,d.name,{enumerable:!0,get:()=>{throw pS(`property ${JSON.stringify(d.name)}`,p)}}):c[d.name]=p}});for(let d=0;d{throw pS(`index ${d}`,h)}})}return Object.freeze(c)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new Fq({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:ce.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new jq({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=he(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new Bq({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 Uq="abstract-provider/5.7.0";var zq=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Vq=new Q(Uq);class Hq extends nl{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class Uu{constructor(){Vq.checkAbstract(new.target,Uu),se(this,"_isProvider",!0)}getFeeData(){return zq(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield yr({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=ce.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 qq="abstract-signer/5.7.0";var Ei=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const ai=new Q(qq),Wq=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Gq=[Q.errors.INSUFFICIENT_FUNDS,Q.errors.NONCE_EXPIRED,Q.errors.REPLACEMENT_UNDERPRICED];class Tc{constructor(){ai.checkAbstract(new.target,Tc),se(this,"_isSigner",!0)}getBalance(e){return Ei(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Ei(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Ei(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield yr(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return Ei(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield yr(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return Ei(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 Ei(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Ei(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Ei(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Ei(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)Wq.indexOf(n)===-1&&ai.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=Nr(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()&&ai.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return Ei(this,void 0,void 0,function*(){const r=yield yr(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>Ei(this,void 0,void 0,function*(){if(i==null)return null;const s=yield this.resolveName(i);return s==null&&ai.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)?ai.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&ai.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&&ai.throwError("network does not support EIP-1559",Q.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):ai.throwError("failed to get consistent fee data",Q.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(i=>{if(Gq.indexOf(i.code)>=0)throw i;return ai.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Q.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&ai.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield yr(r)})}_checkProvider(e){this.provider||ai.throwError("missing provider",Q.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}class Ex extends Tc{constructor(e,r){super(),se(this,"address",e),se(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{ai.throwError(e,Q.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new Ex(this.address,e)}}var L7={},We={},zu=j7;function j7(t,e){if(!t)throw new Error(e||"Assertion failed")}j7.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var Gy={exports:{}};typeof Object.create=="function"?Gy.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Gy.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 Kq=Gy.exports,Yq=zu,Qq=Kq;We.inherits=Qq;function Jq(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function Xq(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):Jq(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}We.htonl=F7;function eW(t,e){for(var r="",n=0;n>>0}return s}We.join32=tW;function rW(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}We.split32=rW;function nW(t,e){return t>>>e|t<<32-e}We.rotr32=nW;function iW(t,e){return t<>>32-e}We.rotl32=iW;function sW(t,e){return t+e>>>0}We.sum32=sW;function oW(t,e,r){return t+e+r>>>0}We.sum32_3=oW;function aW(t,e,r,n){return t+e+r+n>>>0}We.sum32_4=aW;function lW(t,e,r,n,i){return t+e+r+n+i>>>0}We.sum32_5=lW;function cW(t,e,r,n){var i=t[e],s=t[e+1],o=n+s>>>0,a=(o>>0,t[e+1]=o}We.sum64=cW;function fW(t,e,r,n){var i=e+n>>>0,s=(i>>0}We.sum64_hi=fW;function uW(t,e,r,n){var i=e+n;return i>>>0}We.sum64_lo=uW;function dW(t,e,r,n,i,s,o,a){var l=0,c=e;c=c+n>>>0,l+=c>>0,l+=c>>0,l+=c>>0}We.sum64_4_hi=dW;function hW(t,e,r,n,i,s,o,a){var l=e+n+s+a;return l>>>0}We.sum64_4_lo=hW;function vW(t,e,r,n,i,s,o,a,l,c){var f=0,u=e;u=u+n>>>0,f+=u>>0,f+=u>>0,f+=u>>0,f+=u>>0}We.sum64_5_hi=vW;function pW(t,e,r,n,i,s,o,a,l,c){var f=e+n+s+a+c;return f>>>0}We.sum64_5_lo=pW;function yW(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}We.rotr64_hi=yW;function mW(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}We.rotr64_lo=mW;function gW(t,e,r){return t>>>r}We.shr64_hi=gW;function xW(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}We.shr64_lo=xW;var Pc={},mS=We,bW=zu;function wv(){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}Pc.BlockHash=wv;wv.prototype.update=function(e,r){if(e=mS.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=mS.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}ws.g0_256=CW;function kW(t){return us(t,17)^us(t,19)^t>>>10}ws.g1_256=kW;var fc=We,TW=Pc,PW=ws,$1=fc.rotl32,Yc=fc.sum32,RW=fc.sum32_5,_W=PW.ft_1,H7=TW.BlockHash,IW=[1518500249,1859775393,2400959708,3395469782];function ys(){if(!(this instanceof ys))return new ys;H7.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}fc.inherits(ys,H7);var OW=ys;ys.blockSize=512;ys.outSize=160;ys.hmacStrength=80;ys.padLength=64;ys.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()),xG(e.length<=this.blockSize);for(var r=e.length;r>8,d=f&255;u?l.push(u,d):l.push(d)}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(d>>1)-1?m=(d>>1)-x:m=x,h.isubn(m)):m=0,u[p]=m,h.iushrn(1)}return u}r.getNAF=n;function i(l,c){var f=[[],[]];l=l.clone(),c=c.clone();for(var u=0,d=0,h;l.cmpn(-u)>0||c.cmpn(-d)>0;){var p=l.andln(3)+u&3,m=c.andln(3)+d&3;p===3&&(p=-1),m===3&&(m=-1);var x;p&1?(h=l.andln(7)+u&7,(h===3||h===5)&&m===2?x=-p:x=p):x=0,f[0].push(x);var b;m&1?(h=c.andln(7)+d&7,(h===3||h===5)&&p===2?b=-m:b=m):b=0,f[1].push(b),2*u===x+1&&(u=1-u),2*d===b+1&&(d=1-d),l.iushrn(1),c.iushrn(1)}return f}r.getJSF=i;function s(l,c,f){var u="_"+c;l.prototype[c]=function(){return this[u]!==void 0?this[u]:this[u]=f.call(this)}}r.cachedProperty=s;function o(l){return typeof l=="string"?r.toArray(l,"hex"):l}r.parseBytes=o;function a(l){return new Le(l,"hex","le")}r.intFromLE=a}),c0=Xn.getNAF,AG=Xn.getJSF,f0=Xn.assert;function sa(t,e){this.type=t,this.p=new Le(e.p,16),this.red=e.prime?Le.red(e.prime):Le.mont(this.p),this.zero=new Le(0).toRed(this.red),this.one=new Le(1).toRed(this.red),this.two=new Le(2).toRed(this.red),this.n=e.n&&new Le(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 il=sa;sa.prototype.point=function(){throw new Error("Not implemented")};sa.prototype.validate=function(){throw new Error("Not implemented")};sa.prototype._fixedNafMul=function(e,r){f0(e.precomputed);var n=e._getDoubles(),i=c0(r,1,this._bitLength),s=(1<=a;c--)l=(l<<1)+i[c];o.push(l)}for(var f=this.jpoint(null,null,null),u=this.jpoint(null,null,null),d=s;d>0;d--){for(a=0;a=0;l--){for(var c=0;l>=0&&o[l]===0;l--)c++;if(l>=0&&c++,a=a.dblp(c),l<0)break;var f=o[l];f0(f!==0),e.type==="affine"?f>0?a=a.mixedAdd(s[f-1>>1]):a=a.mixedAdd(s[-f-1>>1].neg()):f>0?a=a.add(s[f-1>>1]):a=a.add(s[-f-1>>1].neg())}return e.type==="affine"?a.toP():a};sa.prototype._wnafMulAdd=function(e,r,n,i,s){var o=this._wnafT1,a=this._wnafT2,l=this._wnafT3,c=0,f,u,d;for(f=0;f=1;f-=2){var p=f-1,m=f;if(o[p]!==1||o[m]!==1){l[p]=c0(n[p],o[p],this._bitLength),l[m]=c0(n[m],o[m],this._bitLength),c=Math.max(l[p].length,c),c=Math.max(l[m].length,c);continue}var x=[r[p],null,null,r[m]];r[p].y.cmp(r[m].y)===0?(x[1]=r[p].add(r[m]),x[2]=r[p].toJ().mixedAdd(r[m].neg())):r[p].y.cmp(r[m].y.redNeg())===0?(x[1]=r[p].toJ().mixedAdd(r[m]),x[2]=r[p].add(r[m].neg())):(x[1]=r[p].toJ().mixedAdd(r[m]),x[2]=r[p].toJ().mixedAdd(r[m].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],w=AG(n[p],n[m]);for(c=Math.max(w[0].length,c),l[p]=new Array(c),l[m]=new Array(c),u=0;u=0;f--){for(var F=0;f>=0;){var j=!0;for(u=0;u=0&&F++,N=N.dblp(F),f<0)break;for(u=0;u0?d=a[u][U-1>>1]:U<0&&(d=a[u][-U-1>>1].neg()),d.type==="affine"?N=N.mixedAdd(d):N=N.add(d))}}for(f=0;f=Math.ceil((e.bitLength()+1)/r.step):!1};xi.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&&(h=c,p=f),u.negative&&(u=u.neg(),d=d.neg()),h.negative&&(h=h.neg(),p=p.neg()),[{a:u,b:d},{a:h,b:p}]};bi.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],s=i.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=s.mul(n.a),l=o.mul(i.a),c=s.mul(n.b),f=o.mul(i.b),u=e.sub(a).sub(l),d=c.add(f).neg();return{k1:u,k2:d}};bi.prototype.pointFromX=function(e,r){e=new Le(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)};bi.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};bi.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,s=this._endoWnafT2,o=0;o":""};Ur.prototype.isInfinity=function(){return this.inf};Ur.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)};Ur.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)};Ur.prototype.getX=function(){return this.x.fromRed()};Ur.prototype.getY=function(){return this.y.fromRed()};Ur.prototype.mul=function(e){return e=new Le(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)};Ur.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)};Ur.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)};Ur.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)};Ur.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};Ur.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 Yr(t,e,r,n){il.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Le(0)):(this.x=new Le(e,16),this.y=new Le(r,16),this.z=new Le(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}Cx(Yr,il.BasePoint);bi.prototype.jpoint=function(e,r,n){return new Yr(this,e,r,n)};Yr.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)};Yr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Yr.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),s=e.x.redMul(n),o=this.y.redMul(r.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),l=i.redSub(s),c=o.redSub(a);if(l.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),u=f.redMul(l),d=i.redMul(f),h=c.redSqr().redIAdd(u).redISub(d).redISub(d),p=c.redMul(d.redISub(h)).redISub(o.redMul(u)),m=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(h,p,m)};Yr.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),s=this.y,o=e.y.redMul(r).redMul(this.z),a=n.redSub(i),l=s.redSub(o);if(a.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),f=c.redMul(a),u=n.redMul(c),d=l.redSqr().redIAdd(f).redISub(u).redISub(u),h=l.redMul(u.redISub(d)).redISub(s.redMul(f)),p=this.z.redMul(a);return this.curve.jpoint(d,h,p)};Yr.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}};Yr.prototype.inspect=function(){return this.isInfinity()?"":""};Yr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var lh=Ic(function(t,e){var r=e;r.base=il,r.short=SG,r.mont=null,r.edwards=null}),ch=Ic(function(t,e){var r=e,n=Xn.assert;function i(a){a.type==="short"?this.curve=new lh.short(a):a.type==="edwards"?this.curve=new lh.edwards(a):this.curve=new lh.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=i;function s(a,l){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){var c=new i(l);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:c}),c}})}s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:jn.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:jn.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:jn.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:jn.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:jn.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:jn.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:jn.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:jn.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function Jo(t){if(!(this instanceof Jo))return new Jo(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=Mi.toArray(t.entropy,t.entropyEnc||"hex"),r=Mi.toArray(t.nonce,t.nonceEnc||"hex"),n=Mi.toArray(t.pers,t.persEnc||"hex");Sx(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var r9=Jo;Jo.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};Jo.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=Mi.toArray(n,i||"hex"),this._update(n));for(var s=[];s.length"};var CG=Xn.assert;function Av(t,e){if(t instanceof Av)return t;this._importDER(t,e)||(CG(t.r&&t.s,"Signature without r or s"),this.r=new Le(t.r,16),this.s=new Le(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Ev=Av;function kG(){this.place=0}function V1(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 wS(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)}Av.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=wS(r),n=wS(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];H1(i,r.length),i=i.concat(r),i.push(2),H1(i,n.length);var s=i.concat(n),o=[48];return H1(o,s.length),o=o.concat(s),Xn.encode(o,e)};var TG=function(){throw new Error("unsupported")},n9=Xn.assert;function gi(t){if(!(this instanceof gi))return new gi(t);typeof t=="string"&&(n9(Object.prototype.hasOwnProperty.call(ch,t),"Unknown curve "+t),t=ch[t]),t instanceof ch.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 PG=gi;gi.prototype.keyPair=function(e){return new kx(this,e)};gi.prototype.keyFromPrivate=function(e,r){return kx.fromPrivate(this,e,r)};gi.prototype.keyFromPublic=function(e,r){return kx.fromPublic(this,e,r)};gi.prototype.genKeyPair=function(e){e||(e={});for(var r=new r9({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||TG(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new Le(2));;){var s=new Le(r.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}};gi.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};gi.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 Le(e,16));for(var s=this.n.byteLength(),o=r.getPrivate().toArray("be",s),a=e.toArray("be",s),l=new r9({hash:this.hash,entropy:o,nonce:a,pers:i.pers,persEnc:i.persEnc||"utf8"}),c=this.n.sub(new Le(1)),f=0;;f++){var u=i.k?i.k(f):new Le(l.generate(this.n.byteLength()));if(u=this._truncateToN(u,!0),!(u.cmpn(1)<=0||u.cmp(c)>=0)){var d=this.g.mul(u);if(!d.isInfinity()){var h=d.getX(),p=h.umod(this.n);if(p.cmpn(0)!==0){var m=u.invm(this.n).mul(p.mul(r.getPrivate()).iadd(e));if(m=m.umod(this.n),m.cmpn(0)!==0){var x=(d.getY().isOdd()?1:0)|(h.cmp(p)!==0?2:0);return i.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),x^=1),new Ev({r:p,s:m,recoveryParam:x})}}}}}};gi.prototype.verify=function(e,r,n,i){e=this._truncateToN(new Le(e,16)),n=this.keyFromPublic(n,i),r=new Ev(r,"hex");var s=r.r,o=r.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a=o.invm(this.n),l=a.mul(e).umod(this.n),c=a.mul(s).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.eqXToP(s)):(f=this.g.mulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.getX().umod(this.n).cmp(s)===0)};gi.prototype.recoverPubKey=function(t,e,r,n){n9((3&r)===r,"The recovery param is more than two bits"),e=new Ev(e,n);var i=this.n,s=new Le(t),o=e.r,a=e.s,l=r&1,c=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");c?o=this.curve.pointFromX(o.add(this.curve.n),l):o=this.curve.pointFromX(o,l);var f=e.r.invm(i),u=i.sub(s).mul(f).umod(i),d=a.mul(f).umod(i);return this.g.mulAdd(u,o,d)};gi.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Ev(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 RG=Ic(function(t,e){var r=e;r.version="6.5.4",r.utils=Xn,r.rand=function(){throw new Error("unsupported")},r.curve=lh,r.curves=ch,r.ec=PG,r.eddsa=null}),_G=RG.ec;const IG="signing-key/5.7.0",Jy=new Q(IG);let q1=null;function Zi(){return q1||(q1=new _G("secp256k1")),q1}class Gl{constructor(e){se(this,"curve","secp256k1"),se(this,"privateKey",he(e)),Va(this.privateKey)!==32&&Jy.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=Zi().keyFromPrivate(de(this.privateKey));se(this,"publicKey","0x"+r.getPublic(!1,"hex")),se(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),se(this,"_isSigningKey",!0)}_addPoint(e){const r=Zi().keyFromPublic(de(this.publicKey)),n=Zi().keyFromPublic(de(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=Zi().keyFromPrivate(de(this.privateKey)),n=de(e);n.length!==32&&Jy.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return kc({recoveryParam:i.recoveryParam,r:Ht("0x"+i.r.toString(16),32),s:Ht("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=Zi().keyFromPrivate(de(this.privateKey)),n=Zi().keyFromPublic(de(i9(e)));return Ht("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function OG(t,e){const r=kc(e),n={r:de(r.r),s:de(r.s)};return"0x"+Zi().recoverPubKey(de(t),n,r.recoveryParam).encode("hex",!1)}function i9(t,e){const r=de(t);if(r.length===32){const n=new Gl(r);return e?"0x"+Zi().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?he(r):"0x"+Zi().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+Zi().keyFromPublic(r).getPublic(!0,"hex"):he(r)}return Jy.throwArgumentError("invalid public or private key","key","[REDACTED]")}const MG="transactions/5.7.0",sn=new Q(MG);var AS;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(AS||(AS={}));function Tx(t){return t==="0x"?null:ir(t)}function nn(t){return t==="0x"?b7:ce.from(t)}const NG=[{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"}],DG={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function Ma(t){const e=i9(t);return ir(Ir(Je(Ir(e,1)),12))}function s9(t,e){return Ma(OG(de(t),e))}function $n(t,e){const r=Hs(ce.from(t).toHexString());return r.length>32&&sn.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function W1(t,e){return{address:ir(t),storageKeys:(e||[]).map((r,n)=>(Va(r)!==32&&sn.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function Oc(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&sn.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),W1(r[0],r[1])):W1(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,s)=>(i[s]=!0,i),{});return W1(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function o9(t){return Oc(t).map(e=>[e.address,e.storageKeys])}function a9(t,e){if(t.gasPrice!=null){const n=ce.from(t.gasPrice),i=ce.from(t.maxFeePerGas||0);n.eq(i)||sn.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const r=[$n(t.chainId||0,"chainId"),$n(t.nonce||0,"nonce"),$n(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),$n(t.maxFeePerGas||0,"maxFeePerGas"),$n(t.gasLimit||0,"gasLimit"),t.to!=null?ir(t.to):"0x",$n(t.value||0,"value"),t.data||"0x",o9(t.accessList||[])];if(e){const n=kc(e);r.push($n(n.recoveryParam,"recoveryParam")),r.push(Hs(n.r)),r.push(Hs(n.s))}return Sn(["0x02",cc(r)])}function l9(t,e){const r=[$n(t.chainId||0,"chainId"),$n(t.nonce||0,"nonce"),$n(t.gasPrice||0,"gasPrice"),$n(t.gasLimit||0,"gasLimit"),t.to!=null?ir(t.to):"0x",$n(t.value||0,"value"),t.data||"0x",o9(t.accessList||[])];if(e){const n=kc(e);r.push($n(n.recoveryParam,"recoveryParam")),r.push(Hs(n.r)),r.push(Hs(n.s))}return Sn(["0x01",cc(r)])}function LG(t,e){l7(t,DG);const r=[];NG.forEach(function(o){let a=t[o.name]||[];const l={};o.numeric&&(l.hexPad="left"),a=de(he(a,l)),o.length&&a.length!==o.length&&a.length>0&&sn.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a),o.maxLength&&(a=Hs(a),a.length>o.maxLength&&sn.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a)),r.push(he(a))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&sn.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!xv(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(he(n)),r.push("0x"),r.push("0x")),!e)return cc(r);const i=kc(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&&sn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==s&&sn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(he(s)),r.push(Hs(de(i.r))),r.push(Hs(de(i.s))),cc(r)}function ES(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&sn.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),LG(t,e);switch(t.type){case 1:return l9(t,e);case 2:return a9(t,e)}return sn.throwError(`unsupported transaction type: ${t.type}`,Q.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function c9(t,e,r){try{const n=nn(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{sn.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=Ht(e[1],32),t.s=Ht(e[2],32);try{const n=Je(r(t));t.from=s9(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function jG(t){const e=bx(t.slice(1));e.length!==9&&e.length!==12&&sn.throwArgumentError("invalid component count for transaction type: 2","payload",he(t));const r=nn(e[2]),n=nn(e[3]),i={type:2,chainId:nn(e[0]).toNumber(),nonce:nn(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:nn(e[4]),to:Tx(e[5]),value:nn(e[6]),data:e[7],accessList:Oc(e[8])};return e.length===9||(i.hash=Je(t),c9(i,e.slice(9),a9)),i}function FG(t){const e=bx(t.slice(1));e.length!==8&&e.length!==11&&sn.throwArgumentError("invalid component count for transaction type: 1","payload",he(t));const r={type:1,chainId:nn(e[0]).toNumber(),nonce:nn(e[1]).toNumber(),gasPrice:nn(e[2]),gasLimit:nn(e[3]),to:Tx(e[4]),value:nn(e[5]),data:e[6],accessList:Oc(e[7])};return e.length===8||(r.hash=Je(t),c9(r,e.slice(8),l9)),r}function BG(t){const e=bx(t);e.length!==9&&e.length!==6&&sn.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:nn(e[0]).toNumber(),gasPrice:nn(e[1]),gasLimit:nn(e[2]),to:Tx(e[3]),value:nn(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=ce.from(e[6]).toNumber()}catch{return r}if(r.r=Ht(e[7],32),r.s=Ht(e[8],32),ce.from(r.r).isZero()&&ce.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(he(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);const s=Je(cc(i));try{r.from=s9(s,{r:he(r.r),s:he(r.s),recoveryParam:n})}catch{}r.hash=Je(t)}return r.type=null,r}function $G(t){const e=de(t);if(e[0]>127)return BG(e);switch(e[0]){case 1:return FG(e);case 2:return jG(e)}return sn.throwError(`unsupported transaction type: ${e[0]}`,Q.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const UG="contracts/5.7.0";var Ga=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const mr=new Q(UG);function u0(t,e){return Ga(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&mr.throwArgumentError("invalid address or ENS name","name",r);try{return ir(r)}catch{}t||mr.throwError("a provider or signer is needed to resolve ENS names",Q.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&mr.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function fh(t,e,r){return Ga(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,i)=>fh(t,Array.isArray(e)?e[i]:e[n.name],n))):r.type==="address"?yield u0(t,e):r.type==="tuple"?yield fh(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>fh(t,n,r.arrayChildren))):Promise.reject(mr.makeError("invalid value for array",Q.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Sv(t,e,r){return Ga(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=Nr(r.pop())),mr.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=yr({override:u0(t.signer,n.from),signer:t.signer.getAddress()}).then(c=>Ga(this,void 0,void 0,function*(){return ir(c.signer)!==c.override&&mr.throwError("Contract with a Signer cannot override from",Q.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),c.override})):n.from=t.signer.getAddress():n.from&&(n.from=u0(t.provider,n.from));const i=yield yr({args:fh(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:yr(n)||{}}),s=t.interface.encodeFunctionData(e,i.args),o={data:s,to:i.address},a=i.overrides;if(a.nonce!=null&&(o.nonce=ce.from(a.nonce).toNumber()),a.gasLimit!=null&&(o.gasLimit=ce.from(a.gasLimit)),a.gasPrice!=null&&(o.gasPrice=ce.from(a.gasPrice)),a.maxFeePerGas!=null&&(o.maxFeePerGas=ce.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=ce.from(a.maxPriorityFeePerGas)),a.from!=null&&(o.from=a.from),a.type!=null&&(o.type=a.type),a.accessList!=null&&(o.accessList=Oc(a.accessList)),o.gasLimit==null&&e.gas!=null){let c=21e3;const f=de(s);for(let u=0;un[c]!=null);return l.length&&mr.throwError(`cannot override ${l.map(c=>JSON.stringify(c)).join(",")}`,Q.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),o})}function zG(t,e){return function(...r){return Sv(t,e,r)}}function VG(t,e){const r=t.signer||t.provider;return function(...n){return Ga(this,void 0,void 0,function*(){r||mr.throwError("estimate require a provider or signer",Q.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield Sv(t,e,n);return yield r.estimateGas(i)})}}function HG(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(i=>(i.events=i.logs.map(s=>{let o=Ha(s),a=null;try{a=t.interface.parseLog(s)}catch{}return a&&(o.args=a.args,o.decode=(l,c)=>t.interface.decodeEventLog(a.eventFragment,l,c),o.event=a.name,o.eventSignature=a.signature),o.removeListener=()=>t.provider,o.getBlock=()=>t.provider.getBlock(i.blockHash),o.getTransaction=()=>t.provider.getTransaction(i.transactionHash),o.getTransactionReceipt=()=>Promise.resolve(i),o}),i))}function f9(t,e,r){const n=t.signer||t.provider;return function(...i){return Ga(this,void 0,void 0,function*(){let s;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const l=Nr(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 Sv(t,e,i),a=yield n.call(o,s);try{let l=t.interface.decodeFunctionResult(e,a);return r&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===Q.errors.CALL_EXCEPTION&&(l.address=t.address,l.args=i,l.transaction=o),l}})}}function qG(t,e){return function(...r){return Ga(this,void 0,void 0,function*(){t.signer||mr.throwError("sending a transaction requires a signer",Q.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield Sv(t,e,r),i=yield t.signer.sendTransaction(n);return HG(t,i),i})}}function SS(t,e,r){return e.constant?f9(t,e,r):qG(t,e)}function u9(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 fu{constructor(e,r){se(this,"tag",e),se(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 WG extends fu{constructor(){super("error",null)}}class CS extends fu{constructor(e,r,n,i){const s={address:e};let o=r.getEventTopic(n);i?(o!==i[0]&&mr.throwArgumentError("topic mismatch","topics",i),s.topics=i.slice()):s.topics=[o],super(u9(s),s),se(this,"address",e),se(this,"interface",r),se(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=kH(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class kS extends fu{constructor(e,r){super("*",{address:e}),se(this,"address",e),se(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 GG{constructor(e,r,n){se(this,"interface",os(new.target,"getInterface")(r)),n==null?(se(this,"provider",null),se(this,"signer",null)):Tc.isSigner(n)?(se(this,"provider",n.provider||null),se(this,"signer",n)):Uu.isProvider(n)?(se(this,"provider",n),se(this,"signer",null)):mr.throwArgumentError("invalid signer or provider","signerOrProvider",n),se(this,"callStatic",{}),se(this,"estimateGas",{}),se(this,"functions",{}),se(this,"populateTransaction",{}),se(this,"filters",{});{const o={};Object.keys(this.interface.events).forEach(a=>{const l=this.interface.events[a];se(this.filters,a,(...c)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,c)})),o[l.name]||(o[l.name]=[]),o[l.name].push(a)}),Object.keys(o).forEach(a=>{const l=o[a];l.length===1?se(this.filters,a,this.filters[l[0]]):mr.warn(`Duplicate definition of ${a} (${l.join(", ")})`)})}if(se(this,"_runningEvents",{}),se(this,"_wrappedEmits",{}),e==null&&mr.throwArgumentError("invalid contract address or ENS name","addressOrName",e),se(this,"address",e),this.provider)se(this,"resolvedAddress",u0(this.provider,e));else try{se(this,"resolvedAddress",Promise.resolve(ir(e)))}catch{mr.throwError("provider is required to use ENS name as contract address",Q.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(o=>{});const i={},s={};Object.keys(this.interface.functions).forEach(o=>{const a=this.interface.functions[o];if(s[o]){mr.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&&se(this,o,SS(this,a,!0)),this.functions[o]==null&&se(this.functions,o,SS(this,a,!1)),this.callStatic[o]==null&&se(this.callStatic,o,f9(this,a,!0)),this.populateTransaction[o]==null&&se(this.populateTransaction,o,zG(this,a)),this.estimateGas[o]==null&&se(this.estimateGas,o,VG(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&&se(this,o,this[l])}catch{}this.functions[o]==null&&se(this.functions,o,this.functions[l]),this.callStatic[o]==null&&se(this.callStatic,o,this.callStatic[l]),this.populateTransaction[o]==null&&se(this.populateTransaction,o,this.populateTransaction[l]),this.estimateGas[o]==null&&se(this.estimateGas,o,this.estimateGas[l])})}static getContractAddress(e){return y7(e)}static getInterface(e){return yS.isInterface(e)?e:new yS(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"&&mr.throwError("contract not deployed",Q.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||mr.throwError("sending a transactions require a signer",Q.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=Nr(e||{});return["from","to"].forEach(function(n){r[n]!=null&&mr.throwError("cannot override "+n,Q.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new Ex(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&se(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return Wy.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 WG);if(e==="event")return this._normalizeRunningEvent(new fu("event",null));if(e==="*")return this._normalizeRunningEvent(new kS(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new CS(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 CS(this.address,this.interface,i,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new fu(u9(r),r))}return this._normalizeRunningEvent(new kS(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=Ha(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||mr.throwError("events require a provider or a signer with a provider",Q.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const i=s=>{let o=this._wrapEvent(e,s,r);if(o.decodeError==null)try{const a=e.getEmit(o);this.emit(e.filter,...a)}catch(a){o.decodeError=a.error}e.filter!=null&&this.emit("event",o),o.decodeError!=null&&this.emit("error",o.decodeError,o)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,r,n){const i=this._getRunningEvent(e),s=Nr(i.filter);return typeof r=="string"&&Ze(r,32)?(n!=null&&mr.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 KG extends GG{}class d9{constructor(e){se(this,"alphabet",e),se(this,"base",e.length),se(this,"_alphabetMap",{}),se(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 d=de(d0(i,t,l));s||(s=d.length,f=new Uint8Array(s),o=Math.ceil(n/s),c=n-(o-1)*s),f.set(d);for(let m=1;m>5,this.byteCount=this.blockCount<<2,this.outputBlocks=V>>5,this.extraBytes=(V&31)>>3;for(var H=0;H<50;++H)this.s[H]=0}g.prototype.update=function(k){if(this.finalized)throw new Error(r);var $,V=typeof k;if(V!=="string"){if(V==="object"){if(k===null)throw new Error(e);if(l&&k.constructor===ArrayBuffer)k=new Uint8Array(k);else if(!Array.isArray(k)&&(!l||!ArrayBuffer.isView(k)))throw new Error(e)}else throw new Error(e);$=!0}for(var H=this.blocks,X=this.byteCount,le=k.length,ne=this.blockCount,te=0,Ie=this.s,pe,Se;te>2]|=k[te]<>2]|=Se<>2]|=(192|Se>>6)<>2]|=(128|Se&63)<=57344?(H[pe>>2]|=(224|Se>>12)<>2]|=(128|Se>>6&63)<>2]|=(128|Se&63)<>2]|=(240|Se>>18)<>2]|=(128|Se>>12&63)<>2]|=(128|Se>>6&63)<>2]|=(128|Se&63)<=X){for(this.start=pe-X,this.block=H[ne],pe=0;pe>8,V=k&255;V>0;)X.unshift(V),k=k>>8,V=k&255,++H;return $?X.push(H):X.unshift(H),this.update(X),X.length},g.prototype.encodeString=function(k){var $,V=typeof k;if(V!=="string"){if(V==="object"){if(k===null)throw new Error(e);if(l&&k.constructor===ArrayBuffer)k=new Uint8Array(k);else if(!Array.isArray(k)&&(!l||!ArrayBuffer.isView(k)))throw new Error(e)}else throw new Error(e);$=!0}var H=0,X=k.length;if($)H=X;else for(var le=0;le=57344?H+=3:(ne=65536+((ne&1023)<<10|k.charCodeAt(++le)&1023),H+=4)}return H+=this.encode(H*8),this.update(k),H},g.prototype.bytepad=function(k,$){for(var V=this.encode($),H=0;H>2]|=this.padding[$&3],this.lastByteIndex===this.byteCount)for(k[0]=k[V],$=1;$>4&15]+c[te&15]+c[te>>12&15]+c[te>>8&15]+c[te>>20&15]+c[te>>16&15]+c[te>>28&15]+c[te>>24&15];le%k===0&&(B($),X=0)}return H&&(te=$[X],ne+=c[te>>4&15]+c[te&15],H>1&&(ne+=c[te>>12&15]+c[te>>8&15]),H>2&&(ne+=c[te>>20&15]+c[te>>16&15])),ne},g.prototype.arrayBuffer=function(){this.finalize();var k=this.blockCount,$=this.s,V=this.outputBlocks,H=this.extraBytes,X=0,le=0,ne=this.outputBits>>3,te;H?te=new ArrayBuffer(V+1<<2):te=new ArrayBuffer(ne);for(var Ie=new Uint32Array(te);le>8&255,ne[te+2]=Ie>>16&255,ne[te+3]=Ie>>24&255;le%k===0&&B($)}return H&&(te=le<<2,Ie=$[X],ne[te]=Ie&255,H>1&&(ne[te+1]=Ie>>8&255),H>2&&(ne[te+2]=Ie>>16&255)),ne};function _(k,$,V){g.call(this,k,$,V)}_.prototype=new g,_.prototype.finalize=function(){return this.encode(this.outputBits,!0),g.prototype.finalize.call(this)};var B=function(k){var $,V,H,X,le,ne,te,Ie,pe,Se,sr,Xe,ct,ri,ft,tt,Es,_t,it,Nn,mt,ut,Xr,Ge,gt,ni,It,Ye,Ui,xt,bt,As,wt,ot,zi,dt,at,Ei,Ot,Et,Ss,At,lt,ii,Mt,Nt,z,q,W,re,fe,ve,Ae,ae,ge,we,ye,Ce,Be,Ve,Fe,jt,ht;for(H=0;H<48;H+=2)X=k[0]^k[10]^k[20]^k[30]^k[40],le=k[1]^k[11]^k[21]^k[31]^k[41],ne=k[2]^k[12]^k[22]^k[32]^k[42],te=k[3]^k[13]^k[23]^k[33]^k[43],Ie=k[4]^k[14]^k[24]^k[34]^k[44],pe=k[5]^k[15]^k[25]^k[35]^k[45],Se=k[6]^k[16]^k[26]^k[36]^k[46],sr=k[7]^k[17]^k[27]^k[37]^k[47],Xe=k[8]^k[18]^k[28]^k[38]^k[48],ct=k[9]^k[19]^k[29]^k[39]^k[49],$=Xe^(ne<<1|te>>>31),V=ct^(te<<1|ne>>>31),k[0]^=$,k[1]^=V,k[10]^=$,k[11]^=V,k[20]^=$,k[21]^=V,k[30]^=$,k[31]^=V,k[40]^=$,k[41]^=V,$=X^(Ie<<1|pe>>>31),V=le^(pe<<1|Ie>>>31),k[2]^=$,k[3]^=V,k[12]^=$,k[13]^=V,k[22]^=$,k[23]^=V,k[32]^=$,k[33]^=V,k[42]^=$,k[43]^=V,$=ne^(Se<<1|sr>>>31),V=te^(sr<<1|Se>>>31),k[4]^=$,k[5]^=V,k[14]^=$,k[15]^=V,k[24]^=$,k[25]^=V,k[34]^=$,k[35]^=V,k[44]^=$,k[45]^=V,$=Ie^(Xe<<1|ct>>>31),V=pe^(ct<<1|Xe>>>31),k[6]^=$,k[7]^=V,k[16]^=$,k[17]^=V,k[26]^=$,k[27]^=V,k[36]^=$,k[37]^=V,k[46]^=$,k[47]^=V,$=Se^(X<<1|le>>>31),V=sr^(le<<1|X>>>31),k[8]^=$,k[9]^=V,k[18]^=$,k[19]^=V,k[28]^=$,k[29]^=V,k[38]^=$,k[39]^=V,k[48]^=$,k[49]^=V,ri=k[0],ft=k[1],Nt=k[11]<<4|k[10]>>>28,z=k[10]<<4|k[11]>>>28,Ye=k[20]<<3|k[21]>>>29,Ui=k[21]<<3|k[20]>>>29,Ve=k[31]<<9|k[30]>>>23,Fe=k[30]<<9|k[31]>>>23,At=k[40]<<18|k[41]>>>14,lt=k[41]<<18|k[40]>>>14,ot=k[2]<<1|k[3]>>>31,zi=k[3]<<1|k[2]>>>31,tt=k[13]<<12|k[12]>>>20,Es=k[12]<<12|k[13]>>>20,q=k[22]<<10|k[23]>>>22,W=k[23]<<10|k[22]>>>22,xt=k[33]<<13|k[32]>>>19,bt=k[32]<<13|k[33]>>>19,jt=k[42]<<2|k[43]>>>30,ht=k[43]<<2|k[42]>>>30,ae=k[5]<<30|k[4]>>>2,ge=k[4]<<30|k[5]>>>2,dt=k[14]<<6|k[15]>>>26,at=k[15]<<6|k[14]>>>26,_t=k[25]<<11|k[24]>>>21,it=k[24]<<11|k[25]>>>21,re=k[34]<<15|k[35]>>>17,fe=k[35]<<15|k[34]>>>17,As=k[45]<<29|k[44]>>>3,wt=k[44]<<29|k[45]>>>3,Ge=k[6]<<28|k[7]>>>4,gt=k[7]<<28|k[6]>>>4,we=k[17]<<23|k[16]>>>9,ye=k[16]<<23|k[17]>>>9,Ei=k[26]<<25|k[27]>>>7,Ot=k[27]<<25|k[26]>>>7,Nn=k[36]<<21|k[37]>>>11,mt=k[37]<<21|k[36]>>>11,ve=k[47]<<24|k[46]>>>8,Ae=k[46]<<24|k[47]>>>8,ii=k[8]<<27|k[9]>>>5,Mt=k[9]<<27|k[8]>>>5,ni=k[18]<<20|k[19]>>>12,It=k[19]<<20|k[18]>>>12,Ce=k[29]<<7|k[28]>>>25,Be=k[28]<<7|k[29]>>>25,Et=k[38]<<8|k[39]>>>24,Ss=k[39]<<8|k[38]>>>24,ut=k[48]<<14|k[49]>>>18,Xr=k[49]<<14|k[48]>>>18,k[0]=ri^~tt&_t,k[1]=ft^~Es&it,k[10]=Ge^~ni&Ye,k[11]=gt^~It&Ui,k[20]=ot^~dt&Ei,k[21]=zi^~at&Ot,k[30]=ii^~Nt&q,k[31]=Mt^~z&W,k[40]=ae^~we&Ce,k[41]=ge^~ye&Be,k[2]=tt^~_t&Nn,k[3]=Es^~it&mt,k[12]=ni^~Ye&xt,k[13]=It^~Ui&bt,k[22]=dt^~Ei&Et,k[23]=at^~Ot&Ss,k[32]=Nt^~q&re,k[33]=z^~W&fe,k[42]=we^~Ce&Ve,k[43]=ye^~Be&Fe,k[4]=_t^~Nn&ut,k[5]=it^~mt&Xr,k[14]=Ye^~xt&As,k[15]=Ui^~bt&wt,k[24]=Ei^~Et&At,k[25]=Ot^~Ss<,k[34]=q^~re&ve,k[35]=W^~fe&Ae,k[44]=Ce^~Ve&jt,k[45]=Be^~Fe&ht,k[6]=Nn^~ut&ri,k[7]=mt^~Xr&ft,k[16]=xt^~As&Ge,k[17]=bt^~wt>,k[26]=Et^~At&ot,k[27]=Ss^~lt&zi,k[36]=re^~ve&ii,k[37]=fe^~Ae&Mt,k[46]=Ve^~jt&ae,k[47]=Fe^~ht&ge,k[8]=ut^~ri&tt,k[9]=Xr^~ft&Es,k[18]=As^~Ge&ni,k[19]=wt^~gt&It,k[28]=At^~ot&dt,k[29]=lt^~zi&at,k[38]=ve^~ii&Nt,k[39]=Ae^~Mt&z,k[48]=jt^~ae&we,k[49]=ht^~ge&ye,k[0]^=m[H],k[1]^=m[H+1]};if(a)t.exports=v;else for(S=0;S>=8;return e}function sS(t,e,r){let n=0;for(let i=0;ie+1+n&&Xi.throwError("child data too short",Q.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function y7(t,e){if(t.length===0&&Xi.throwError("data too short",Q.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&Xi.throwError("data short segment too short",Q.errors.BUFFER_OVERRUN,{});const n=sS(t,e+1,r);return e+1+r+n>t.length&&Xi.throwError("data long segment too short",Q.errors.BUFFER_OVERRUN,{}),oS(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&Xi.throwError("data array too short",Q.errors.BUFFER_OVERRUN,{}),oS(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&Xi.throwError("data array too short",Q.errors.BUFFER_OVERRUN,{});const n=sS(t,e+1,r);e+1+r+n>t.length&&Xi.throwError("data array too short",Q.errors.BUFFER_OVERRUN,{});const i=he(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&&Xi.throwError("data too short",Q.errors.BUFFER_OVERRUN,{});const n=he(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:he(t[e])}}function bx(t){const e=de(t),r=y7(e,0);return r.consumed!==e.length&&Xi.throwArgumentError("invalid rlp data","data",t),r.result}const _q="address/5.7.0",Dl=new Q(_q);function aS(t){Ze(t,20)||Dl.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=de(Je(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 Iq=9007199254740991;function Oq(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const wx={};for(let t=0;t<10;t++)wx[String(t)]=String(t);for(let t=0;t<26;t++)wx[String.fromCharCode(65+t)]=String(10+t);const lS=Math.floor(Oq(Iq));function Mq(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>wx[n]).join("");for(;e.length>=lS;){let n=e.substring(0,lS);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 ir(t){let e=null;if(typeof t!="string"&&Dl.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=aS(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Dl.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)!==Mq(t)&&Dl.throwArgumentError("bad icap checksum","address",t),e=pq(t.substring(4));e.length<40;)e="0"+e;e=aS("0x"+e)}else Dl.throwArgumentError("invalid address","address",t);return e}function Nq(t){try{return ir(t),!0}catch{}return!1}function m7(t){let e=null;try{e=ir(t.from)}catch{Dl.throwArgumentError("missing from address","transaction",t)}const r=qs(de(ce.from(t.nonce).toHexString()));return ir(Ir(Je(cc([e,r])),12))}class Dq extends ao{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=ir(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return ir(qt(e.readValue().toHexString(),20))}}class Lq extends ao{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 Ll=new Q(Bu);function g7(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let l={};n=e.map(c=>{const f=c.localName;return f||Ll.throwError("cannot encode object for signature with missing names",Q.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]&&Ll.throwError("cannot encode object for signature with duplicate names",Q.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]=!0,r[f]})}else Ll.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&Ll.throwArgumentError("types/value length mismatch","tuple",r);let i=new Wy(t.wordSize),s=new Wy(t.wordSize),o=[];e.forEach((l,c)=>{let f=n[c];if(l.dynamic){let u=s.length;l.encode(s,f);let d=i.writeUpdatableValue();o.push(h=>{d(h+u)})}else l.encode(i,f)}),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(c){if(c.code===Q.errors.BUFFER_OVERRUN)throw c;o=c,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(t)}catch(a){if(a.code===Q.errors.BUFFER_OVERRUN)throw a;o=a,o.baseType=s.name,o.name=s.localName,o.type=s.type}o!=null&&r.push(o)});const i=e.reduce((s,o)=>{const a=o.localName;return a&&(s[a]||(s[a]=0),s[a]++),s},{});e.forEach((s,o)=>{let a=s.localName;if(!a||i[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;const l=r[o];l instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw l}}):r[a]=l});for(let s=0;s{throw o}})}return Object.freeze(r)}class jq extends ao{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&&Ll.throwError("insufficient data length",Q.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let i=0;i>6===2;o++)s++;return s}return t===Bn.OVERRUN?r.length-e-1:0}function Yq(t,e,r,n,i){return t===Bn.OVERLONG?(n.push(i),0):(n.push(65533),A7(t,e,r))}const Qq=Object.freeze({error:Kq,ignore:A7,replace:Yq});function S7(t,e){e==null&&(e=Qq.error),t=de(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(Bn.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(Bn.BAD_PREFIX,n-1,t,r);continue}if(n-1+s>=t.length){n+=e(Bn.OVERRUN,n-1,t,r);continue}let a=i&(1<<8-s-1)-1;for(let l=0;l1114111){n+=e(Bn.OUT_OF_RANGE,n-1-s,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(Bn.UTF16_SURROGATE,n-1-s,t,r,a);continue}if(a<=o){n+=e(Bn.OVERLONG,n-1-s,t,r,a);continue}r.push(a)}}return r}function Pt(t,e=Qo.current){e!=Qo.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 de(r)}function Jq(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function $u(t,e){return Jq(S7(t,e))}function Xq(t,e=Qo.current){return S7(Pt(t,e))}class Zq extends b7{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,Pt(r))}decode(e){return $u(super.decode(e))}}class Ad extends ao{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 g7(e,this.coders,r)}decode(e){return e.coerce(this.name,x7(e,this.coders))}}const Sd=new Q(Bu),eH=new RegExp(/^bytes([0-9]*)$/),tH=new RegExp(/^(u?int)([0-9]*)$/);class rH{constructor(e){se(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Dq(e.name);case"bool":return new Fq(e.name);case"string":return new Zq(e.name);case"bytes":return new Bq(e.name);case"array":return new jq(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new Ad((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new Uq(e.name)}let r=e.type.match(tH);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&Sd.throwArgumentError("invalid "+r[1]+" bit length","param",e),new Wq(n/8,r[1]==="int",e.name)}if(r=e.type.match(eH),r){let n=parseInt(r[1]);return(n===0||n>32)&&Sd.throwArgumentError("invalid bytes length","param",e),new $q(n,e.name)}return Sd.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new l0(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new Wy(this._getWordSize())}getDefaultValue(e){const r=e.map(i=>this._getCoder(Fr.from(i)));return new Ad(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&Sd.throwError("types/values length mismatch",Q.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(o=>this._getCoder(Fr.from(o))),i=new Ad(n,"_"),s=this._getWriter();return i.encode(s,r),s.data}decode(e,r,n){const i=e.map(o=>this._getCoder(Fr.from(o)));return new Ad(i,"_").decode(this._getReader(de(r),n))}}const nH=new rH;function Ca(t){return Je(Pt(t))}const C7="hash/5.7.0";function k7(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 iH(t){const e={};for(let r=0;r>--l&1}const u=31,d=Math.pow(2,u),h=d>>>1,p=h>>1,m=d-1;let x=0;for(let N=0;N1;){let K=I+F>>>1;N>>1|f(),j=j<<1^h,U=(U^h)<<1|h|1;w=j,E=1+U-j}let R=n-4;return b.map(N=>{switch(N-R){case 3:return R+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return R+256+(t[a++]<<8|t[a++]);case 1:return R+t[a++];default:return N-1}})}function oH(t){let e=0;return()=>t[e++]}function aH(t){return oH(sH(t))}function lH(t){return t&1?~t>>1:t>>1}function cH(t,e){let r=Array(t);for(let n=0;ne[o]):r}function uH(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(hH(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(vH(r,t))}return iH(P7(e))}function dH(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function R7(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;in[o].push(s));return n}function hH(t,e){let r=1+e(),n=e(),i=dH(e),s=R7(i.length,1+t,e);return P7(s.map((o,a)=>{const l=o[0],c=o.slice(1);return Array(i[a]).fill(void 0).map((f,u)=>{let d=u*n;return[l+u*r,c.map(h=>h+d)]})}))}function vH(t,e){let r=1+e();return R7(r,1+t,e).map(i=>[i[0],i.slice(1)])}function pH(t){let e=c0(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let c=c0(t,e);if(c.length==0)break;n.push({set:new Set(c),node:r()})}n.sort((c,f)=>f.set.size-c.set.size);let i=t(),s=i%3;i=i/3|0;let o=!!(i&1);i>>=1;let a=i==1,l=i==2;return{branches:n,valid:s,fe0f:o,save:a,check:l}}}function yH(){return aH(k7("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const wv=yH(),mH=new Set(c0(wv)),gH=new Set(c0(wv)),xH=uH(wv),bH=pH(wv),fS=45,uS=95;function _7(t){return Xq(t)}function wH(t){return t.filter(e=>e!=65039)}function I7(t){for(let e of t.split(".")){let r=_7(e);try{for(let n=r.lastIndexOf(uS)-1;n>=0;n--)if(r[n]!==uS)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===fS&&r[3]===fS)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function EH(t){return I7(AH(t,wH))}function AH(t,e){let r=_7(t).reverse(),n=[];for(;r.length;){let i=CH(r);if(i){n.push(...e(i));continue}let s=r.pop();if(mH.has(s)){n.push(s);continue}if(gH.has(s))continue;let o=xH[s];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${s.toString(16).toUpperCase()}`)}return I7(SH(String.fromCodePoint(...n)))}function SH(t){return t.normalize("NFC")}function CH(t,e){var r;let n=bH,i,s,o=[],a=t.length;for(e&&(e.length=0);a;){let l=t[--a];if(n=(r=n.branches.find(c=>c.set.has(l)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)s=l;else if(n.check&&l===s)break;o.push(l),n.fe0f&&(o.push(65039),a>0&&t[a-1]==65039&&a--),n.valid&&(i=o.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return i}const kH=new Q(C7),O7=new Uint8Array(32);O7.fill(0);function dS(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function M7(t){const e=Pt(EH(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(dS(e.slice(n))),r}function ah(t){typeof t!="string"&&kH.throwArgumentError("invalid ENS name; not a string","name",t);let e=O7;const r=M7(t);for(;r.length;)e=Je(Er([e,Je(r.pop())]));return he(e)}function TH(t){return he(Er(M7(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 PH=`Ethereum Signed Message: +`;function RH(t){return typeof t=="string"&&(t=Pt(t)),Je(Er([Pt(PH),Pt(String(t.length)),t]))}var _H=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Jt=new Q(C7),N7=new Uint8Array(32);N7.fill(0);const IH=ce.from(-1),D7=ce.from(0),L7=ce.from(1),OH=ce.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function MH(t){const e=de(t),r=e.length%32;return r?Sn([e,N7.slice(r)]):he(e)}const NH=qt(L7.toHexString(),32),DH=qt(D7.toHexString(),32),hS={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},B1=["name","version","chainId","verifyingContract","salt"];function vS(t){return function(e){return typeof e!="string"&&Jt.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const LH={name:vS("name"),version:vS("version"),chainId:function(t){try{return ce.from(t).toString()}catch{}return Jt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return ir(t).toLowerCase()}catch{}return Jt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=de(t);if(e.length!==32)throw new Error("bad length");return he(e)}catch{}return Jt.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function $1(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))&&Jt.throwArgumentError("invalid numeric width","type",t);const i=OH.mask(r?n-1:n),s=r?i.add(L7).mul(IH):D7;return function(o){const a=ce.from(o);return(a.lt(s)||a.gt(i))&&Jt.throwArgumentError(`value out-of-bounds for ${t}`,"value",o),qt(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))&&Jt.throwArgumentError("invalid bytes width","type",t),function(n){return de(n).length!==r&&Jt.throwArgumentError(`invalid length for ${t}`,"value",n),MH(n)}}}switch(t){case"address":return function(e){return qt(ir(e),32)};case"bool":return function(e){return e?NH:DH};case"bytes":return function(e){return Je(e)};case"string":return function(e){return Ca(e)}}return null}function pS(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class pn{constructor(e){se(this,"types",Object.freeze(qa(e))),se(this,"_encoderCache",{}),se(this,"_types",{});const r={},n={},i={};Object.keys(e).forEach(a=>{r[a]={},n[a]=[],i[a]={}});for(const a in e){const l={};e[a].forEach(c=>{l[c.name]&&Jt.throwArgumentError(`duplicate variable name ${JSON.stringify(c.name)} in ${JSON.stringify(a)}`,"types",e),l[c.name]=!0;const f=c.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===a&&Jt.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!$1(f)&&(n[f]||Jt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),n[f].push(a),r[a][f]=!0)})}const s=Object.keys(n).filter(a=>n[a].length===0);s.length===0?Jt.throwArgumentError("missing primary type","types",e):s.length>1&&Jt.throwArgumentError(`ambiguous primary types or unused types: ${s.map(a=>JSON.stringify(a)).join(", ")}`,"types",e),se(this,"primaryType",s[0]);function o(a,l){l[a]&&Jt.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),l[a]=!0,Object.keys(r[a]).forEach(c=>{n[c]&&(o(c,l),Object.keys(l).forEach(f=>{i[f][c]=!0}))}),delete l[a]}o(this.primaryType,{});for(const a in i){const l=Object.keys(i[a]);l.sort(),this._types[a]=pS(a,e[a])+l.map(c=>pS(c,e[c])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=$1(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&&Jt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let l=a.map(s);return this._types[i]&&(l=l.map(Je)),Je(Sn(l))}}const n=this.types[e];if(n){const i=Ca(this._types[e]);return s=>{const o=n.map(({name:a,type:l})=>{const c=this.getEncoder(l)(s[a]);return this._types[l]?Je(c):c});return o.unshift(i),Sn(o)}}return Jt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||Jt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Je(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($1(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&&Jt.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),{}):Jt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new pn(e)}static getPrimaryType(e){return pn.from(e).primaryType}static hashStruct(e,r,n){return pn.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const i=hS[n];i||Jt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>B1.indexOf(n.name)-B1.indexOf(i.name)),pn.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Sn(["0x1901",pn.hashDomain(e),pn.from(r).hash(n)])}static hash(e,r,n){return Je(pn.encode(e,r,n))}static resolveNames(e,r,n,i){return _H(this,void 0,void 0,function*(){e=Nr(e);const s={};e.verifyingContract&&!Ze(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const o=pn.from(r);o.visit(n,(a,l)=>(a==="address"&&!Ze(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){pn.hashDomain(e);const i={},s=[];B1.forEach(l=>{const c=e[l];c!=null&&(i[l]=LH[l](c),s.push({name:l,type:hS[l]}))});const o=pn.from(r),a=Nr(r);return a.EIP712Domain?Jt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):a.EIP712Domain=s,o.encode(n),{types:a,domain:i,primaryType:o.primaryType,message:o.visit(n,(l,c)=>{if(l.match(/^bytes(\d*)/))return he(de(c));if(l.match(/^u?int/))return ce.from(c).toString();switch(l){case"address":return c.toLowerCase();case"bool":return!!c;case"string":return typeof c!="string"&&Jt.throwArgumentError("invalid string","value",c),c}return Jt.throwArgumentError("unsupported type","type",l)})}}}const Qt=new Q(Bu);class jH extends nl{}class FH extends nl{}class BH extends nl{}class Gy extends nl{static isIndexed(e){return!!(e&&e._isIndexed)}}const $H={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function yS(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class mS{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,se(this,"fragments",r.map(n=>$s.from(n)).filter(n=>n!=null)),se(this,"_abiCoder",os(new.target,"getAbiCoder")()),se(this,"functions",{}),se(this,"errors",{}),se(this,"events",{}),se(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){Qt.warn("duplicate definition - constructor");return}se(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]){Qt.warn("duplicate definition - "+s);return}i[s]=n}),this.deploy||se(this,"deploy",rs.from({payable:!1,type:"constructor"})),se(this,"_isInterface",!0)}format(e){e||(e=nt.full),e===nt.sighash&&Qt.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===nt.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return nH}static getAddress(e){return ir(e)}static getSighash(e){return Ir(Ca(e.format()),0,4)}static getEventTopic(e){return Ca(e.format())}getFunction(e){if(Ze(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];Qt.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?Qt.throwArgumentError("no matching function","name",n):i.length>1&&Qt.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const r=this.functions[ns.fromString(e).format()];return r||Qt.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(Ze(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];Qt.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?Qt.throwArgumentError("no matching event","name",n):i.length>1&&Qt.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const r=this.events[Ds.fromString(e).format()];return r||Qt.throwArgumentError("no matching event","signature",e),r}getError(e){if(Ze(e)){const n=os(this.constructor,"getSighash");for(const i in this.errors){const s=this.errors[i];if(e===n(s))return this.errors[i]}Qt.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?Qt.throwArgumentError("no matching error","name",n):i.length>1&&Qt.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const r=this.errors[ns.fromString(e).format()];return r||Qt.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 os(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),os(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=de(r);return he(n.slice(0,4))!==this.getSighash(e)&&Qt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",he(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),he(Er([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=de(r);return he(n.slice(0,4))!==this.getSighash(e)&&Qt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",he(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),he(Er([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=de(r),i=null,s="",o=null,a=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const c=he(n.slice(0,4)),f=$H[c];if(f)o=this._abiCoder.decode(f.inputs,n.slice(4)),a=f.name,l=f.signature,f.reason&&(i=o[0]),a==="Error"?s=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:a==="Panic"&&(s=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const u=this.getError(c);o=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,l=u.format()}catch{}break}}return Qt.throwError("call revert exception"+s,Q.errors.CALL_EXCEPTION,{method:e.format(),data:he(r),errorArgs:o,errorName:a,errorSignature:l,reason:i})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),he(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&Qt.throwError("too many arguments for "+e.format(),Q.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(s,o)=>s.type==="string"?Ca(o):s.type==="bytes"?Je(he(o)):(s.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),s.type.match(/^u?int/)&&(o=ce.from(o).toHexString()),s.type==="address"&&this._abiCoder.encode(["address"],[o]),qt(he(o),32));for(r.forEach((s,o)=>{let a=e.inputs[o];if(!a.indexed){s!=null&&Qt.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"?Qt.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&&Qt.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(Ca(l));else if(o.type==="bytes")n.push(Je(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 d=this.getEventTopic(e);(!Ze(n[0],32)||n[0].toLowerCase()!==d)&&Qt.throwError("fragment/topic mismatch",Q.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:d,value:n[0]}),n=n.slice(1)}let i=[],s=[],o=[];e.inputs.forEach((d,h)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(i.push(Fr.fromObject({type:"bytes32",name:d.name})),o.push(!0)):(i.push(d),o.push(!1)):(s.push(d),o.push(!1))});let a=n!=null?this._abiCoder.decode(i,Er(n)):null,l=this._abiCoder.decode(s,r,!0),c=[],f=0,u=0;e.inputs.forEach((d,h)=>{if(d.indexed)if(a==null)c[h]=new Gy({_isIndexed:!0,hash:null});else if(o[h])c[h]=new Gy({_isIndexed:!0,hash:a[u++]});else try{c[h]=a[u++]}catch(p){c[h]=p}else try{c[h]=l[f++]}catch(p){c[h]=p}if(d.name&&c[d.name]==null){const p=c[h];p instanceof Error?Object.defineProperty(c,d.name,{enumerable:!0,get:()=>{throw yS(`property ${JSON.stringify(d.name)}`,p)}}):c[d.name]=p}});for(let d=0;d{throw yS(`index ${d}`,h)}})}return Object.freeze(c)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new FH({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:ce.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new jH({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=he(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new BH({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 UH="abstract-provider/5.7.0";var zH=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const VH=new Q(UH);class qH extends nl{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class Uu{constructor(){VH.checkAbstract(new.target,Uu),se(this,"_isProvider",!0)}getFeeData(){return zH(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield yr({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=ce.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 HH="abstract-signer/5.7.0";var Si=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const li=new Q(HH),WH=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],GH=[Q.errors.INSUFFICIENT_FUNDS,Q.errors.NONCE_EXPIRED,Q.errors.REPLACEMENT_UNDERPRICED];class Tc{constructor(){li.checkAbstract(new.target,Tc),se(this,"_isSigner",!0)}getBalance(e){return Si(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Si(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Si(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield yr(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return Si(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield yr(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return Si(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 Si(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Si(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Si(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Si(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)WH.indexOf(n)===-1&&li.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=Nr(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()&&li.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return Si(this,void 0,void 0,function*(){const r=yield yr(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>Si(this,void 0,void 0,function*(){if(i==null)return null;const s=yield this.resolveName(i);return s==null&&li.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)?li.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&li.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&&li.throwError("network does not support EIP-1559",Q.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):li.throwError("failed to get consistent fee data",Q.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(i=>{if(GH.indexOf(i.code)>=0)throw i;return li.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Q.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&li.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield yr(r)})}_checkProvider(e){this.provider||li.throwError("missing provider",Q.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}class Ax extends Tc{constructor(e,r){super(),se(this,"address",e),se(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{li.throwError(e,Q.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new Ax(this.address,e)}}var j7={},We={},zu=F7;function F7(t,e){if(!t)throw new Error(e||"Assertion failed")}F7.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var Ky={exports:{}};typeof Object.create=="function"?Ky.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Ky.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 KH=Ky.exports,YH=zu,QH=KH;We.inherits=QH;function JH(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function XH(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):JH(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}We.htonl=B7;function eW(t,e){for(var r="",n=0;n>>0}return s}We.join32=tW;function rW(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}We.split32=rW;function nW(t,e){return t>>>e|t<<32-e}We.rotr32=nW;function iW(t,e){return t<>>32-e}We.rotl32=iW;function sW(t,e){return t+e>>>0}We.sum32=sW;function oW(t,e,r){return t+e+r>>>0}We.sum32_3=oW;function aW(t,e,r,n){return t+e+r+n>>>0}We.sum32_4=aW;function lW(t,e,r,n,i){return t+e+r+n+i>>>0}We.sum32_5=lW;function cW(t,e,r,n){var i=t[e],s=t[e+1],o=n+s>>>0,a=(o>>0,t[e+1]=o}We.sum64=cW;function fW(t,e,r,n){var i=e+n>>>0,s=(i>>0}We.sum64_hi=fW;function uW(t,e,r,n){var i=e+n;return i>>>0}We.sum64_lo=uW;function dW(t,e,r,n,i,s,o,a){var l=0,c=e;c=c+n>>>0,l+=c>>0,l+=c>>0,l+=c>>0}We.sum64_4_hi=dW;function hW(t,e,r,n,i,s,o,a){var l=e+n+s+a;return l>>>0}We.sum64_4_lo=hW;function vW(t,e,r,n,i,s,o,a,l,c){var f=0,u=e;u=u+n>>>0,f+=u>>0,f+=u>>0,f+=u>>0,f+=u>>0}We.sum64_5_hi=vW;function pW(t,e,r,n,i,s,o,a,l,c){var f=e+n+s+a+c;return f>>>0}We.sum64_5_lo=pW;function yW(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}We.rotr64_hi=yW;function mW(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}We.rotr64_lo=mW;function gW(t,e,r){return t>>>r}We.shr64_hi=gW;function xW(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}We.shr64_lo=xW;var Pc={},gS=We,bW=zu;function Ev(){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}Pc.BlockHash=Ev;Ev.prototype.update=function(e,r){if(e=gS.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=gS.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}ws.g0_256=CW;function kW(t){return us(t,17)^us(t,19)^t>>>10}ws.g1_256=kW;var fc=We,TW=Pc,PW=ws,U1=fc.rotl32,Yc=fc.sum32,RW=fc.sum32_5,_W=PW.ft_1,H7=TW.BlockHash,IW=[1518500249,1859775393,2400959708,3395469782];function ys(){if(!(this instanceof ys))return new ys;H7.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}fc.inherits(ys,H7);var OW=ys;ys.blockSize=512;ys.outSize=160;ys.hmacStrength=80;ys.padLength=64;ys.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()),xG(e.length<=this.blockSize);for(var r=e.length;r>8,d=f&255;u?l.push(u,d):l.push(d)}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(d>>1)-1?m=(d>>1)-x:m=x,h.isubn(m)):m=0,u[p]=m,h.iushrn(1)}return u}r.getNAF=n;function i(l,c){var f=[[],[]];l=l.clone(),c=c.clone();for(var u=0,d=0,h;l.cmpn(-u)>0||c.cmpn(-d)>0;){var p=l.andln(3)+u&3,m=c.andln(3)+d&3;p===3&&(p=-1),m===3&&(m=-1);var x;p&1?(h=l.andln(7)+u&7,(h===3||h===5)&&m===2?x=-p:x=p):x=0,f[0].push(x);var b;m&1?(h=c.andln(7)+d&7,(h===3||h===5)&&p===2?b=-m:b=m):b=0,f[1].push(b),2*u===x+1&&(u=1-u),2*d===b+1&&(d=1-d),l.iushrn(1),c.iushrn(1)}return f}r.getJSF=i;function s(l,c,f){var u="_"+c;l.prototype[c]=function(){return this[u]!==void 0?this[u]:this[u]=f.call(this)}}r.cachedProperty=s;function o(l){return typeof l=="string"?r.toArray(l,"hex"):l}r.parseBytes=o;function a(l){return new Le(l,"hex","le")}r.intFromLE=a}),f0=Zn.getNAF,EG=Zn.getJSF,u0=Zn.assert;function sa(t,e){this.type=t,this.p=new Le(e.p,16),this.red=e.prime?Le.red(e.prime):Le.mont(this.p),this.zero=new Le(0).toRed(this.red),this.one=new Le(1).toRed(this.red),this.two=new Le(2).toRed(this.red),this.n=e.n&&new Le(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 il=sa;sa.prototype.point=function(){throw new Error("Not implemented")};sa.prototype.validate=function(){throw new Error("Not implemented")};sa.prototype._fixedNafMul=function(e,r){u0(e.precomputed);var n=e._getDoubles(),i=f0(r,1,this._bitLength),s=(1<=a;c--)l=(l<<1)+i[c];o.push(l)}for(var f=this.jpoint(null,null,null),u=this.jpoint(null,null,null),d=s;d>0;d--){for(a=0;a=0;l--){for(var c=0;l>=0&&o[l]===0;l--)c++;if(l>=0&&c++,a=a.dblp(c),l<0)break;var f=o[l];u0(f!==0),e.type==="affine"?f>0?a=a.mixedAdd(s[f-1>>1]):a=a.mixedAdd(s[-f-1>>1].neg()):f>0?a=a.add(s[f-1>>1]):a=a.add(s[-f-1>>1].neg())}return e.type==="affine"?a.toP():a};sa.prototype._wnafMulAdd=function(e,r,n,i,s){var o=this._wnafT1,a=this._wnafT2,l=this._wnafT3,c=0,f,u,d;for(f=0;f=1;f-=2){var p=f-1,m=f;if(o[p]!==1||o[m]!==1){l[p]=f0(n[p],o[p],this._bitLength),l[m]=f0(n[m],o[m],this._bitLength),c=Math.max(l[p].length,c),c=Math.max(l[m].length,c);continue}var x=[r[p],null,null,r[m]];r[p].y.cmp(r[m].y)===0?(x[1]=r[p].add(r[m]),x[2]=r[p].toJ().mixedAdd(r[m].neg())):r[p].y.cmp(r[m].y.redNeg())===0?(x[1]=r[p].toJ().mixedAdd(r[m]),x[2]=r[p].add(r[m].neg())):(x[1]=r[p].toJ().mixedAdd(r[m]),x[2]=r[p].toJ().mixedAdd(r[m].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],w=EG(n[p],n[m]);for(c=Math.max(w[0].length,c),l[p]=new Array(c),l[m]=new Array(c),u=0;u=0;f--){for(var F=0;f>=0;){var j=!0;for(u=0;u=0&&F++,N=N.dblp(F),f<0)break;for(u=0;u0?d=a[u][U-1>>1]:U<0&&(d=a[u][-U-1>>1].neg()),d.type==="affine"?N=N.mixedAdd(d):N=N.add(d))}}for(f=0;f=Math.ceil((e.bitLength()+1)/r.step):!1};bi.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&&(h=c,p=f),u.negative&&(u=u.neg(),d=d.neg()),h.negative&&(h=h.neg(),p=p.neg()),[{a:u,b:d},{a:h,b:p}]};wi.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],s=i.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=s.mul(n.a),l=o.mul(i.a),c=s.mul(n.b),f=o.mul(i.b),u=e.sub(a).sub(l),d=c.add(f).neg();return{k1:u,k2:d}};wi.prototype.pointFromX=function(e,r){e=new Le(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)};wi.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};wi.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,s=this._endoWnafT2,o=0;o":""};Ur.prototype.isInfinity=function(){return this.inf};Ur.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)};Ur.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)};Ur.prototype.getX=function(){return this.x.fromRed()};Ur.prototype.getY=function(){return this.y.fromRed()};Ur.prototype.mul=function(e){return e=new Le(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)};Ur.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)};Ur.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)};Ur.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)};Ur.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};Ur.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 Yr(t,e,r,n){il.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Le(0)):(this.x=new Le(e,16),this.y=new Le(r,16),this.z=new Le(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}Cx(Yr,il.BasePoint);wi.prototype.jpoint=function(e,r,n){return new Yr(this,e,r,n)};Yr.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)};Yr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Yr.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),s=e.x.redMul(n),o=this.y.redMul(r.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),l=i.redSub(s),c=o.redSub(a);if(l.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),u=f.redMul(l),d=i.redMul(f),h=c.redSqr().redIAdd(u).redISub(d).redISub(d),p=c.redMul(d.redISub(h)).redISub(o.redMul(u)),m=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(h,p,m)};Yr.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),s=this.y,o=e.y.redMul(r).redMul(this.z),a=n.redSub(i),l=s.redSub(o);if(a.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),f=c.redMul(a),u=n.redMul(c),d=l.redSqr().redIAdd(f).redISub(u).redISub(u),h=l.redMul(u.redISub(d)).redISub(s.redMul(f)),p=this.z.redMul(a);return this.curve.jpoint(d,h,p)};Yr.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}};Yr.prototype.inspect=function(){return this.isInfinity()?"":""};Yr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var lh=Ic(function(t,e){var r=e;r.base=il,r.short=SG,r.mont=null,r.edwards=null}),ch=Ic(function(t,e){var r=e,n=Zn.assert;function i(a){a.type==="short"?this.curve=new lh.short(a):a.type==="edwards"?this.curve=new lh.edwards(a):this.curve=new lh.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=i;function s(a,l){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){var c=new i(l);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:c}),c}})}s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:jn.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:jn.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:jn.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:jn.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:jn.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:jn.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:jn.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:jn.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function Jo(t){if(!(this instanceof Jo))return new Jo(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=Ni.toArray(t.entropy,t.entropyEnc||"hex"),r=Ni.toArray(t.nonce,t.nonceEnc||"hex"),n=Ni.toArray(t.pers,t.persEnc||"hex");Sx(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var n9=Jo;Jo.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};Jo.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=Ni.toArray(n,i||"hex"),this._update(n));for(var s=[];s.length"};var CG=Zn.assert;function Av(t,e){if(t instanceof Av)return t;this._importDER(t,e)||(CG(t.r&&t.s,"Signature without r or s"),this.r=new Le(t.r,16),this.s=new Le(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Sv=Av;function kG(){this.place=0}function q1(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 ES(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)}Av.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=ES(r),n=ES(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];H1(i,r.length),i=i.concat(r),i.push(2),H1(i,n.length);var s=i.concat(n),o=[48];return H1(o,s.length),o=o.concat(s),Zn.encode(o,e)};var TG=function(){throw new Error("unsupported")},i9=Zn.assert;function xi(t){if(!(this instanceof xi))return new xi(t);typeof t=="string"&&(i9(Object.prototype.hasOwnProperty.call(ch,t),"Unknown curve "+t),t=ch[t]),t instanceof ch.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 PG=xi;xi.prototype.keyPair=function(e){return new kx(this,e)};xi.prototype.keyFromPrivate=function(e,r){return kx.fromPrivate(this,e,r)};xi.prototype.keyFromPublic=function(e,r){return kx.fromPublic(this,e,r)};xi.prototype.genKeyPair=function(e){e||(e={});for(var r=new n9({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||TG(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new Le(2));;){var s=new Le(r.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}};xi.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};xi.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 Le(e,16));for(var s=this.n.byteLength(),o=r.getPrivate().toArray("be",s),a=e.toArray("be",s),l=new n9({hash:this.hash,entropy:o,nonce:a,pers:i.pers,persEnc:i.persEnc||"utf8"}),c=this.n.sub(new Le(1)),f=0;;f++){var u=i.k?i.k(f):new Le(l.generate(this.n.byteLength()));if(u=this._truncateToN(u,!0),!(u.cmpn(1)<=0||u.cmp(c)>=0)){var d=this.g.mul(u);if(!d.isInfinity()){var h=d.getX(),p=h.umod(this.n);if(p.cmpn(0)!==0){var m=u.invm(this.n).mul(p.mul(r.getPrivate()).iadd(e));if(m=m.umod(this.n),m.cmpn(0)!==0){var x=(d.getY().isOdd()?1:0)|(h.cmp(p)!==0?2:0);return i.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),x^=1),new Sv({r:p,s:m,recoveryParam:x})}}}}}};xi.prototype.verify=function(e,r,n,i){e=this._truncateToN(new Le(e,16)),n=this.keyFromPublic(n,i),r=new Sv(r,"hex");var s=r.r,o=r.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a=o.invm(this.n),l=a.mul(e).umod(this.n),c=a.mul(s).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.eqXToP(s)):(f=this.g.mulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.getX().umod(this.n).cmp(s)===0)};xi.prototype.recoverPubKey=function(t,e,r,n){i9((3&r)===r,"The recovery param is more than two bits"),e=new Sv(e,n);var i=this.n,s=new Le(t),o=e.r,a=e.s,l=r&1,c=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");c?o=this.curve.pointFromX(o.add(this.curve.n),l):o=this.curve.pointFromX(o,l);var f=e.r.invm(i),u=i.sub(s).mul(f).umod(i),d=a.mul(f).umod(i);return this.g.mulAdd(u,o,d)};xi.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Sv(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 RG=Ic(function(t,e){var r=e;r.version="6.5.4",r.utils=Zn,r.rand=function(){throw new Error("unsupported")},r.curve=lh,r.curves=ch,r.ec=PG,r.eddsa=null}),_G=RG.ec;const IG="signing-key/5.7.0",Xy=new Q(IG);let W1=null;function Zi(){return W1||(W1=new _G("secp256k1")),W1}class Gl{constructor(e){se(this,"curve","secp256k1"),se(this,"privateKey",he(e)),Va(this.privateKey)!==32&&Xy.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=Zi().keyFromPrivate(de(this.privateKey));se(this,"publicKey","0x"+r.getPublic(!1,"hex")),se(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),se(this,"_isSigningKey",!0)}_addPoint(e){const r=Zi().keyFromPublic(de(this.publicKey)),n=Zi().keyFromPublic(de(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=Zi().keyFromPrivate(de(this.privateKey)),n=de(e);n.length!==32&&Xy.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return kc({recoveryParam:i.recoveryParam,r:qt("0x"+i.r.toString(16),32),s:qt("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=Zi().keyFromPrivate(de(this.privateKey)),n=Zi().keyFromPublic(de(s9(e)));return qt("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function OG(t,e){const r=kc(e),n={r:de(r.r),s:de(r.s)};return"0x"+Zi().recoverPubKey(de(t),n,r.recoveryParam).encode("hex",!1)}function s9(t,e){const r=de(t);if(r.length===32){const n=new Gl(r);return e?"0x"+Zi().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?he(r):"0x"+Zi().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+Zi().keyFromPublic(r).getPublic(!0,"hex"):he(r)}return Xy.throwArgumentError("invalid public or private key","key","[REDACTED]")}const MG="transactions/5.7.0",sn=new Q(MG);var AS;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(AS||(AS={}));function Tx(t){return t==="0x"?null:ir(t)}function nn(t){return t==="0x"?w7:ce.from(t)}const NG=[{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"}],DG={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function Ma(t){const e=s9(t);return ir(Ir(Je(Ir(e,1)),12))}function o9(t,e){return Ma(OG(de(t),e))}function $n(t,e){const r=qs(ce.from(t).toHexString());return r.length>32&&sn.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function G1(t,e){return{address:ir(t),storageKeys:(e||[]).map((r,n)=>(Va(r)!==32&&sn.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function Oc(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&sn.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),G1(r[0],r[1])):G1(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,s)=>(i[s]=!0,i),{});return G1(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function a9(t){return Oc(t).map(e=>[e.address,e.storageKeys])}function l9(t,e){if(t.gasPrice!=null){const n=ce.from(t.gasPrice),i=ce.from(t.maxFeePerGas||0);n.eq(i)||sn.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const r=[$n(t.chainId||0,"chainId"),$n(t.nonce||0,"nonce"),$n(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),$n(t.maxFeePerGas||0,"maxFeePerGas"),$n(t.gasLimit||0,"gasLimit"),t.to!=null?ir(t.to):"0x",$n(t.value||0,"value"),t.data||"0x",a9(t.accessList||[])];if(e){const n=kc(e);r.push($n(n.recoveryParam,"recoveryParam")),r.push(qs(n.r)),r.push(qs(n.s))}return Sn(["0x02",cc(r)])}function c9(t,e){const r=[$n(t.chainId||0,"chainId"),$n(t.nonce||0,"nonce"),$n(t.gasPrice||0,"gasPrice"),$n(t.gasLimit||0,"gasLimit"),t.to!=null?ir(t.to):"0x",$n(t.value||0,"value"),t.data||"0x",a9(t.accessList||[])];if(e){const n=kc(e);r.push($n(n.recoveryParam,"recoveryParam")),r.push(qs(n.r)),r.push(qs(n.s))}return Sn(["0x01",cc(r)])}function LG(t,e){c7(t,DG);const r=[];NG.forEach(function(o){let a=t[o.name]||[];const l={};o.numeric&&(l.hexPad="left"),a=de(he(a,l)),o.length&&a.length!==o.length&&a.length>0&&sn.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a),o.maxLength&&(a=qs(a),a.length>o.maxLength&&sn.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a)),r.push(he(a))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&sn.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!bv(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(he(n)),r.push("0x"),r.push("0x")),!e)return cc(r);const i=kc(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&&sn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==s&&sn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(he(s)),r.push(qs(de(i.r))),r.push(qs(de(i.s))),cc(r)}function SS(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&sn.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),LG(t,e);switch(t.type){case 1:return c9(t,e);case 2:return l9(t,e)}return sn.throwError(`unsupported transaction type: ${t.type}`,Q.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function f9(t,e,r){try{const n=nn(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{sn.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=qt(e[1],32),t.s=qt(e[2],32);try{const n=Je(r(t));t.from=o9(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function jG(t){const e=bx(t.slice(1));e.length!==9&&e.length!==12&&sn.throwArgumentError("invalid component count for transaction type: 2","payload",he(t));const r=nn(e[2]),n=nn(e[3]),i={type:2,chainId:nn(e[0]).toNumber(),nonce:nn(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:nn(e[4]),to:Tx(e[5]),value:nn(e[6]),data:e[7],accessList:Oc(e[8])};return e.length===9||(i.hash=Je(t),f9(i,e.slice(9),l9)),i}function FG(t){const e=bx(t.slice(1));e.length!==8&&e.length!==11&&sn.throwArgumentError("invalid component count for transaction type: 1","payload",he(t));const r={type:1,chainId:nn(e[0]).toNumber(),nonce:nn(e[1]).toNumber(),gasPrice:nn(e[2]),gasLimit:nn(e[3]),to:Tx(e[4]),value:nn(e[5]),data:e[6],accessList:Oc(e[7])};return e.length===8||(r.hash=Je(t),f9(r,e.slice(8),c9)),r}function BG(t){const e=bx(t);e.length!==9&&e.length!==6&&sn.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:nn(e[0]).toNumber(),gasPrice:nn(e[1]),gasLimit:nn(e[2]),to:Tx(e[3]),value:nn(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=ce.from(e[6]).toNumber()}catch{return r}if(r.r=qt(e[7],32),r.s=qt(e[8],32),ce.from(r.r).isZero()&&ce.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(he(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);const s=Je(cc(i));try{r.from=o9(s,{r:he(r.r),s:he(r.s),recoveryParam:n})}catch{}r.hash=Je(t)}return r.type=null,r}function $G(t){const e=de(t);if(e[0]>127)return BG(e);switch(e[0]){case 1:return FG(e);case 2:return jG(e)}return sn.throwError(`unsupported transaction type: ${e[0]}`,Q.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const UG="contracts/5.7.0";var Ga=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const mr=new Q(UG);function d0(t,e){return Ga(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&mr.throwArgumentError("invalid address or ENS name","name",r);try{return ir(r)}catch{}t||mr.throwError("a provider or signer is needed to resolve ENS names",Q.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&mr.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function fh(t,e,r){return Ga(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,i)=>fh(t,Array.isArray(e)?e[i]:e[n.name],n))):r.type==="address"?yield d0(t,e):r.type==="tuple"?yield fh(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>fh(t,n,r.arrayChildren))):Promise.reject(mr.makeError("invalid value for array",Q.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Cv(t,e,r){return Ga(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=Nr(r.pop())),mr.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=yr({override:d0(t.signer,n.from),signer:t.signer.getAddress()}).then(c=>Ga(this,void 0,void 0,function*(){return ir(c.signer)!==c.override&&mr.throwError("Contract with a Signer cannot override from",Q.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),c.override})):n.from=t.signer.getAddress():n.from&&(n.from=d0(t.provider,n.from));const i=yield yr({args:fh(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:yr(n)||{}}),s=t.interface.encodeFunctionData(e,i.args),o={data:s,to:i.address},a=i.overrides;if(a.nonce!=null&&(o.nonce=ce.from(a.nonce).toNumber()),a.gasLimit!=null&&(o.gasLimit=ce.from(a.gasLimit)),a.gasPrice!=null&&(o.gasPrice=ce.from(a.gasPrice)),a.maxFeePerGas!=null&&(o.maxFeePerGas=ce.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=ce.from(a.maxPriorityFeePerGas)),a.from!=null&&(o.from=a.from),a.type!=null&&(o.type=a.type),a.accessList!=null&&(o.accessList=Oc(a.accessList)),o.gasLimit==null&&e.gas!=null){let c=21e3;const f=de(s);for(let u=0;un[c]!=null);return l.length&&mr.throwError(`cannot override ${l.map(c=>JSON.stringify(c)).join(",")}`,Q.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),o})}function zG(t,e){return function(...r){return Cv(t,e,r)}}function VG(t,e){const r=t.signer||t.provider;return function(...n){return Ga(this,void 0,void 0,function*(){r||mr.throwError("estimate require a provider or signer",Q.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield Cv(t,e,n);return yield r.estimateGas(i)})}}function qG(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(i=>(i.events=i.logs.map(s=>{let o=qa(s),a=null;try{a=t.interface.parseLog(s)}catch{}return a&&(o.args=a.args,o.decode=(l,c)=>t.interface.decodeEventLog(a.eventFragment,l,c),o.event=a.name,o.eventSignature=a.signature),o.removeListener=()=>t.provider,o.getBlock=()=>t.provider.getBlock(i.blockHash),o.getTransaction=()=>t.provider.getTransaction(i.transactionHash),o.getTransactionReceipt=()=>Promise.resolve(i),o}),i))}function u9(t,e,r){const n=t.signer||t.provider;return function(...i){return Ga(this,void 0,void 0,function*(){let s;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const l=Nr(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 Cv(t,e,i),a=yield n.call(o,s);try{let l=t.interface.decodeFunctionResult(e,a);return r&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===Q.errors.CALL_EXCEPTION&&(l.address=t.address,l.args=i,l.transaction=o),l}})}}function HG(t,e){return function(...r){return Ga(this,void 0,void 0,function*(){t.signer||mr.throwError("sending a transaction requires a signer",Q.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield Cv(t,e,r),i=yield t.signer.sendTransaction(n);return qG(t,i),i})}}function CS(t,e,r){return e.constant?u9(t,e,r):HG(t,e)}function d9(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 fu{constructor(e,r){se(this,"tag",e),se(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 WG extends fu{constructor(){super("error",null)}}class kS extends fu{constructor(e,r,n,i){const s={address:e};let o=r.getEventTopic(n);i?(o!==i[0]&&mr.throwArgumentError("topic mismatch","topics",i),s.topics=i.slice()):s.topics=[o],super(d9(s),s),se(this,"address",e),se(this,"interface",r),se(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=kq(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class TS extends fu{constructor(e,r){super("*",{address:e}),se(this,"address",e),se(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 GG{constructor(e,r,n){se(this,"interface",os(new.target,"getInterface")(r)),n==null?(se(this,"provider",null),se(this,"signer",null)):Tc.isSigner(n)?(se(this,"provider",n.provider||null),se(this,"signer",n)):Uu.isProvider(n)?(se(this,"provider",n),se(this,"signer",null)):mr.throwArgumentError("invalid signer or provider","signerOrProvider",n),se(this,"callStatic",{}),se(this,"estimateGas",{}),se(this,"functions",{}),se(this,"populateTransaction",{}),se(this,"filters",{});{const o={};Object.keys(this.interface.events).forEach(a=>{const l=this.interface.events[a];se(this.filters,a,(...c)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,c)})),o[l.name]||(o[l.name]=[]),o[l.name].push(a)}),Object.keys(o).forEach(a=>{const l=o[a];l.length===1?se(this.filters,a,this.filters[l[0]]):mr.warn(`Duplicate definition of ${a} (${l.join(", ")})`)})}if(se(this,"_runningEvents",{}),se(this,"_wrappedEmits",{}),e==null&&mr.throwArgumentError("invalid contract address or ENS name","addressOrName",e),se(this,"address",e),this.provider)se(this,"resolvedAddress",d0(this.provider,e));else try{se(this,"resolvedAddress",Promise.resolve(ir(e)))}catch{mr.throwError("provider is required to use ENS name as contract address",Q.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(o=>{});const i={},s={};Object.keys(this.interface.functions).forEach(o=>{const a=this.interface.functions[o];if(s[o]){mr.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&&se(this,o,CS(this,a,!0)),this.functions[o]==null&&se(this.functions,o,CS(this,a,!1)),this.callStatic[o]==null&&se(this.callStatic,o,u9(this,a,!0)),this.populateTransaction[o]==null&&se(this.populateTransaction,o,zG(this,a)),this.estimateGas[o]==null&&se(this.estimateGas,o,VG(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&&se(this,o,this[l])}catch{}this.functions[o]==null&&se(this.functions,o,this.functions[l]),this.callStatic[o]==null&&se(this.callStatic,o,this.callStatic[l]),this.populateTransaction[o]==null&&se(this.populateTransaction,o,this.populateTransaction[l]),this.estimateGas[o]==null&&se(this.estimateGas,o,this.estimateGas[l])})}static getContractAddress(e){return m7(e)}static getInterface(e){return mS.isInterface(e)?e:new mS(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"&&mr.throwError("contract not deployed",Q.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||mr.throwError("sending a transactions require a signer",Q.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=Nr(e||{});return["from","to"].forEach(function(n){r[n]!=null&&mr.throwError("cannot override "+n,Q.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new Ax(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&se(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return Gy.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 WG);if(e==="event")return this._normalizeRunningEvent(new fu("event",null));if(e==="*")return this._normalizeRunningEvent(new TS(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new kS(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 kS(this.address,this.interface,i,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new fu(d9(r),r))}return this._normalizeRunningEvent(new TS(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=qa(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||mr.throwError("events require a provider or a signer with a provider",Q.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const i=s=>{let o=this._wrapEvent(e,s,r);if(o.decodeError==null)try{const a=e.getEmit(o);this.emit(e.filter,...a)}catch(a){o.decodeError=a.error}e.filter!=null&&this.emit("event",o),o.decodeError!=null&&this.emit("error",o.decodeError,o)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,r,n){const i=this._getRunningEvent(e),s=Nr(i.filter);return typeof r=="string"&&Ze(r,32)?(n!=null&&mr.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 KG extends GG{}class h9{constructor(e){se(this,"alphabet",e),se(this,"base",e.length),se(this,"_alphabetMap",{}),se(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 d=de(h0(i,t,l));s||(s=d.length,f=new Uint8Array(s),o=Math.ceil(n/s),c=n-(o-1)*s),f.set(d);for(let m=1;m=256)throw new Error("Depth too large!");return PS(wr([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",he(this.depth),this.parentFingerprint,Ht(he(this.index),4),this.chainCode,this.privateKey!=null?wr(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new fi(ul,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&~Jc));const n=new Uint8Array(37);if(e&Jc){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(de(this.privateKey),1),r&&(r+="'")}else n.set(de(this.publicKey));for(let u=24;u>=0;u-=8)n[33+(u>>3)]=e>>24-u&255;const i=de(d0(du.sha512,this.chainCode,n)),s=i.slice(0,32),o=i.slice(32);let a=null,l=null;this.privateKey?a=kd(ce.from(s).add(this.privateKey).mod(nK)):l=new Gl(he(s))._addPoint(this.publicKey);let c=r;const f=this.mnemonic;return f&&(c=Object.freeze({phrase:f.phrase,path:r,locale:f.locale||"en"})),new fi(ul,a,l,this.fingerprint,kd(o),e,this.depth+1,c)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let i=0;i=Jc)throw new Error("invalid path index - "+s);n=n._derive(Jc+o)}else if(s.match(/^[0-9]+$/)){const o=parseInt(s);if(o>=Jc)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=de(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=de(d0(du.sha512,iK,n));return new fi(ul,kd(i.slice(0,32)),null,"0x00000000",kd(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=Rx(n),e=_x(p9(e,n),n),fi._fromSeed(oK(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return fi._fromSeed(e,null)}static fromExtendedKey(e){const r=uu.decode(e);(r.length!==82||PS(r.slice(0,78))!==e)&&h0.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=he(r.slice(5,9)),s=parseInt(he(r.slice(9,13)).substring(2),16),o=he(r.slice(13,45)),a=r.slice(45,78);switch(he(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new fi(ul,null,he(a),i,o,s,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new fi(ul,he(a.slice(1)),null,i,o,s,n,null)}return h0.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function oK(t,e){e||(e="");const r=Tt("mnemonic"+e,Qo.NFKD);return Px(Tt(t,Qo.NFKD),r,2048,64,"sha512")}function p9(t,e){e=Rx(e),h0.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=de(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let c=0;c>3]|=1<<7-i%8),i++}const s=32*r.length/3,o=r.length/3,a=v9(o);if((de(Ka(n.slice(0,s/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return he(n.slice(0,s/8))}function _x(t,e){if(e=Rx(e),t=de(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]&sK(8-n)),n+=3);const i=t.length/4,s=de(Ka(t))[0]&v9(i);return r[r.length-1]<<=i,r[r.length-1]|=s>>8-i,e.join(r.map(o=>e.getWord(o)))}const aK="random/5.7.0",Zy=new Q(aK);function lK(){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 RS=lK();let uh=RS.crypto||RS.msCrypto;(!uh||!uh.getRandomValues)&&(Zy.warn("WARNING: Missing strong random number source"),uh={getRandomValues:function(t){return Zy.throwError("no secure random source avaialble",Q.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function uf(t){(t<=0||t>1024||t%1||t!=t)&&Zy.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return uh.getRandomValues(e),de(e)}var y9={exports:{}};(function(t,e){(function(r){function n(E){return parseInt(E)===E}function i(E){if(!n(E.length))return!1;for(var g=0;g255)return!1;return!0}function s(E,g){if(E.buffer&&ArrayBuffer.isView(E)&&E.name==="Uint8Array")return g&&(E.slice?E=E.slice():E=Array.prototype.slice.call(E)),E;if(Array.isArray(E)){if(!i(E))throw new Error("Array contains invalid value: "+E);return new Uint8Array(E)}if(n(E.length)&&i(E))return new Uint8Array(E);throw new Error("unsupported array-like object")}function o(E){return new Uint8Array(E)}function a(E,g,_,B,k){(B!=null||k!=null)&&(E.slice?E=E.slice(B,k):E=Array.prototype.slice.call(E,B,k)),g.set(E,_)}var l=function(){function E(_){var B=[],k=0;for(_=encodeURI(_);k<_.length;){var $=_.charCodeAt(k++);$===37?(B.push(parseInt(_.substr(k,2),16)),k+=2):B.push($)}return s(B)}function g(_){for(var B=[],k=0;k<_.length;){var $=_[k];$<128?(B.push(String.fromCharCode($)),k++):$>191&&$<224?(B.push(String.fromCharCode(($&31)<<6|_[k+1]&63)),k+=2):(B.push(String.fromCharCode(($&15)<<12|(_[k+1]&63)<<6|_[k+2]&63)),k+=3)}return B.join("")}return{toBytes:E,fromBytes:g}}(),c=function(){function E(B){for(var k=[],$=0;$>4]+g[V&15])}return k.join("")}return{toBytes:E,fromBytes:_}}(),f={16:10,24:12,32:14},u=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],d=[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],h=[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],p=[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],m=[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],x=[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],b=[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],w=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],A=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],R=[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],N=[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],I=[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],F=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],j=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],U=[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 Y(E){for(var g=[],_=0;_>2,this._Ke[$][g%4]=k[g],this._Kd[E-$][g%4]=k[g];for(var V=0,q=B,X;q<_;){if(X=k[B-1],k[0]^=d[X>>16&255]<<24^d[X>>8&255]<<16^d[X&255]<<8^d[X>>24&255]^u[V]<<24,V+=1,B!=8)for(var g=1;g>8&255]<<8^d[X>>16&255]<<16^d[X>>24&255]<<24;for(var g=B/2+1;g>2,ne=q%4,this._Ke[le][ne]=k[g],this._Kd[E-le][ne]=k[g++],q++}for(var le=1;le>24&255]^F[X>>16&255]^j[X>>8&255]^U[X&255]},J.prototype.encrypt=function(E){if(E.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var g=this._Ke.length-1,_=[0,0,0,0],B=Y(E),k=0;k<4;k++)B[k]^=this._Ke[0][k];for(var $=1;$>24&255]^m[B[(k+1)%4]>>16&255]^x[B[(k+2)%4]>>8&255]^b[B[(k+3)%4]&255]^this._Ke[$][k];B=_.slice()}for(var V=o(16),q,k=0;k<4;k++)q=this._Ke[g][k],V[4*k]=(d[B[k]>>24&255]^q>>24)&255,V[4*k+1]=(d[B[(k+1)%4]>>16&255]^q>>16)&255,V[4*k+2]=(d[B[(k+2)%4]>>8&255]^q>>8)&255,V[4*k+3]=(d[B[(k+3)%4]&255]^q)&255;return V},J.prototype.decrypt=function(E){if(E.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var g=this._Kd.length-1,_=[0,0,0,0],B=Y(E),k=0;k<4;k++)B[k]^=this._Kd[0][k];for(var $=1;$>24&255]^A[B[(k+3)%4]>>16&255]^R[B[(k+2)%4]>>8&255]^N[B[(k+1)%4]&255]^this._Kd[$][k];B=_.slice()}for(var V=o(16),q,k=0;k<4;k++)q=this._Kd[g][k],V[4*k]=(h[B[k]>>24&255]^q>>24)&255,V[4*k+1]=(h[B[(k+3)%4]>>16&255]^q>>16)&255,V[4*k+2]=(h[B[(k+2)%4]>>8&255]^q>>8)&255,V[4*k+3]=(h[B[(k+1)%4]&255]^q)&255;return V};var Z=function(E){if(!(this instanceof Z))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new J(E)};Z.prototype.encrypt=function(E){if(E=s(E),E.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var g=o(E.length),_=o(16),B=0;B=0;--g)this._counter[g]=E%256,E=E>>8},S.prototype.setBytes=function(E){if(E=s(E,!0),E.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=E},S.prototype.increment=function(){for(var E=15;E>=0;E--)if(this._counter[E]===255)this._counter[E]=0;else{this._counter[E]++;break}};var C=function(E,g){if(!(this instanceof C))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",g instanceof S||(g=new S(g)),this._counter=g,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new J(E)};C.prototype.encrypt=function(E){for(var g=s(E,!0),_=0;_16)throw new Error("PKCS#7 padding byte out of range");for(var _=E.length-g,B=0;B=64;){let L=b,E=w,g=A,_=R,B=N,k=I,$=F,V=j,q,X,le,ne,te;for(X=0;X<16;X++)le=P+X*4,U[X]=(C[le]&255)<<24|(C[le+1]&255)<<16|(C[le+2]&255)<<8|C[le+3]&255;for(X=16;X<64;X++)q=U[X-2],ne=(q>>>17|q<<32-17)^(q>>>19|q<<32-19)^q>>>10,q=U[X-15],te=(q>>>7|q<<32-7)^(q>>>18|q<<32-18)^q>>>3,U[X]=(ne+U[X-7]|0)+(te+U[X-16]|0)|0;for(X=0;X<64;X++)ne=(((B>>>6|B<<32-6)^(B>>>11|B<<32-11)^(B>>>25|B<<32-25))+(B&k^~B&$)|0)+(V+(x[X]+U[X]|0)|0)|0,te=((L>>>2|L<<32-2)^(L>>>13|L<<32-13)^(L>>>22|L<<32-22))+(L&E^L&g^E&g)|0,V=$,$=k,k=B,B=_+ne|0,_=g,g=E,E=L,L=ne+te|0;b=b+L|0,w=w+E|0,A=A+g|0,R=R+_|0,N=N+B|0,I=I+k|0,F=F+$|0,j=j+V|0,P+=64,O-=64}}Y(m);let J,Z=m.length%64,M=m.length/536870912|0,v=m.length<<3,T=Z<56?56:120,S=m.slice(m.length-Z,m.length);for(S.push(128),J=Z+1;J>>24&255),S.push(M>>>16&255),S.push(M>>>8&255),S.push(M>>>0&255),S.push(v>>>24&255),S.push(v>>>16&255),S.push(v>>>8&255),S.push(v>>>0&255),Y(S),[b>>>24&255,b>>>16&255,b>>>8&255,b>>>0&255,w>>>24&255,w>>>16&255,w>>>8&255,w>>>0&255,A>>>24&255,A>>>16&255,A>>>8&255,A>>>0&255,R>>>24&255,R>>>16&255,R>>>8&255,R>>>0&255,N>>>24&255,N>>>16&255,N>>>8&255,N>>>0&255,I>>>24&255,I>>>16&255,I>>>8&255,I>>>0&255,F>>>24&255,F>>>16&255,F>>>8&255,F>>>0&255,j>>>24&255,j>>>16&255,j>>>8&255,j>>>0&255]}function s(m,x,b){m=m.length<=64?m:i(m);const w=64+x.length+4,A=new Array(w),R=new Array(64);let N,I=[];for(N=0;N<64;N++)A[N]=54;for(N=0;N=w-4;j--){if(A[j]++,A[j]<=255)return;A[j]=0}}for(;b>=32;)F(),I=I.concat(i(R.concat(i(A)))),b-=32;return b>0&&(F(),I=I.concat(i(R.concat(i(A))).slice(0,b))),I}function o(m,x,b,w,A){let R;for(f(m,(2*b-1)*16,A,0,16),R=0;R<2*b;R++)c(m,R*16,A,16),l(A,w),f(A,0,m,x+R*16,16);for(R=0;R>>32-x}function l(m,x){f(m,0,x,0,16);for(let b=8;b>0;b-=2)x[4]^=a(x[0]+x[12],7),x[8]^=a(x[4]+x[0],9),x[12]^=a(x[8]+x[4],13),x[0]^=a(x[12]+x[8],18),x[9]^=a(x[5]+x[1],7),x[13]^=a(x[9]+x[5],9),x[1]^=a(x[13]+x[9],13),x[5]^=a(x[1]+x[13],18),x[14]^=a(x[10]+x[6],7),x[2]^=a(x[14]+x[10],9),x[6]^=a(x[2]+x[14],13),x[10]^=a(x[6]+x[2],18),x[3]^=a(x[15]+x[11],7),x[7]^=a(x[3]+x[15],9),x[11]^=a(x[7]+x[3],13),x[15]^=a(x[11]+x[7],18),x[1]^=a(x[0]+x[3],7),x[2]^=a(x[1]+x[0],9),x[3]^=a(x[2]+x[1],13),x[0]^=a(x[3]+x[2],18),x[6]^=a(x[5]+x[4],7),x[7]^=a(x[6]+x[5],9),x[4]^=a(x[7]+x[6],13),x[5]^=a(x[4]+x[7],18),x[11]^=a(x[10]+x[9],7),x[8]^=a(x[11]+x[10],9),x[9]^=a(x[8]+x[11],13),x[10]^=a(x[9]+x[8],18),x[12]^=a(x[15]+x[14],7),x[13]^=a(x[12]+x[15],9),x[14]^=a(x[13]+x[12],13),x[15]^=a(x[14]+x[13],18);for(let b=0;b<16;++b)m[b]+=x[b]}function c(m,x,b,w){for(let A=0;A=256)return!1}return!0}function d(m,x){if(typeof m!="number"||m%1)throw new Error("invalid "+x);return m}function h(m,x,b,w,A,R,N){if(b=d(b,"N"),w=d(w,"r"),A=d(A,"p"),R=d(R,"dkLen"),b===0||b&b-1)throw new Error("N must be power of 2");if(b>2147483647/128/w)throw new Error("N too large");if(w>2147483647/128/A)throw new Error("r too large");if(!u(m))throw new Error("password must be an array or buffer");if(m=Array.prototype.slice.call(m),!u(x))throw new Error("salt must be an array or buffer");x=Array.prototype.slice.call(x);let I=s(m,x,A*128*w);const F=new Uint32Array(A*32*w);for(let B=0;BE&&(B=E);for(let $=0;$E&&(B=E);for(let $=0;$>0&255),I.push(F[$]>>8&255),I.push(F[$]>>16&255),I.push(F[$]>>24&255);const k=s(m,I,R);return N&&N(null,1,k),k}N&&g(_)};if(!N)for(;;){const B=_();if(B!=null)return B}_()}const p={scrypt:function(m,x,b,w,A,R,N){return new Promise(function(I,F){let j=0;N&&N(0),h(m,x,b,w,A,R,function(U,Y,J){if(U)F(U);else if(J)N&&j!==1&&N(1),I(new Uint8Array(J));else if(N&&Y!==j)return j=Y,N(Y)})})},syncScrypt:function(m,x,b,w,A,R){return new Uint8Array(h(m,x,b,w,A,R))}};t.exports=p})()})(w9);var hK=w9.exports;const Ox=ro(hK);var vK=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const em=new Q(m9);function _S(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class pK extends nl{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function yK(t,e,r){if(gr(t,"crypto/cipher")==="aes-128-ctr"){const i=Na(gr(t,"crypto/cipherparams/iv")),s=new as.Counter(i),o=new as.ModeOfOperation.ctr(e,s);return de(o.decrypt(r))}return null}function A9(t,e){const r=Na(gr(t,"crypto/ciphertext"));if(he(Je(wr([e.slice(16,32),r]))).substring(2)!==gr(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const i=yK(t,e.slice(0,16),r);i||em.throwError("unsupported cipher",Q.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const s=e.slice(32,64),o=Ma(i);if(t.address){let l=t.address.toLowerCase();if(l.substring(0,2)!=="0x"&&(l="0x"+l),ir(l)!==o)throw new Error("address mismatch")}const a={_isKeystoreAccount:!0,address:o,privateKey:he(i)};if(gr(t,"x-ethers/version")==="0.1"){const l=Na(gr(t,"x-ethers/mnemonicCiphertext")),c=Na(gr(t,"x-ethers/mnemonicCounter")),f=new as.Counter(c),u=new as.ModeOfOperation.ctr(s,f),d=gr(t,"x-ethers/path")||hu,h=gr(t,"x-ethers/locale")||"en",p=de(u.decrypt(l));try{const m=_x(p,h),x=fi.fromMnemonic(m,null,h).derivePath(d);if(x.privateKey!=a.privateKey)throw new Error("mnemonic mismatch");a.mnemonic=x.mnemonic}catch(m){if(m.code!==Q.errors.INVALID_ARGUMENT||m.argument!=="wordlist")throw m}}return new pK(a)}function E9(t,e,r,n,i){return de(Px(t,e,r,n,i))}function mK(t,e,r,n,i){return Promise.resolve(E9(t,e,r,n,i))}function S9(t,e,r,n,i){const s=Ix(e),o=gr(t,"crypto/kdf");if(o&&typeof o=="string"){const a=function(l,c){return em.throwArgumentError("invalid key-derivation function parameters",l,c)};if(o.toLowerCase()==="scrypt"){const l=Na(gr(t,"crypto/kdfparams/salt")),c=parseInt(gr(t,"crypto/kdfparams/n")),f=parseInt(gr(t,"crypto/kdfparams/r")),u=parseInt(gr(t,"crypto/kdfparams/p"));(!c||!f||!u)&&a("kdf",o),c&c-1&&a("N",c);const d=parseInt(gr(t,"crypto/kdfparams/dklen"));return d!==32&&a("dklen",d),n(s,l,c,f,u,64,i)}else if(o.toLowerCase()==="pbkdf2"){const l=Na(gr(t,"crypto/kdfparams/salt"));let c=null;const f=gr(t,"crypto/kdfparams/prf");f==="hmac-sha256"?c="sha256":f==="hmac-sha512"?c="sha512":a("prf",f);const u=parseInt(gr(t,"crypto/kdfparams/c")),d=parseInt(gr(t,"crypto/kdfparams/dklen"));return d!==32&&a("dklen",d),r(s,l,u,d,c)}}return em.throwArgumentError("unsupported key-derivation function","kdf",o)}function gK(t,e){const r=JSON.parse(t),n=S9(r,e,E9,Ox.syncScrypt);return A9(r,n)}function xK(t,e,r){return vK(this,void 0,void 0,function*(){const n=JSON.parse(t),i=yield S9(n,e,mK,Ox.scrypt,r);return A9(n,i)})}function bK(t,e,r,n){try{if(ir(t.address)!==Ma(t.privateKey))throw new Error("address/privateKey mismatch");if(_S(t)){const x=t.mnemonic;if(fi.fromMnemonic(x.phrase,null,x.locale).derivePath(x.path||hu).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(x){return Promise.reject(x)}typeof r=="function"&&!n&&(n=r,r={}),r||(r={});const i=de(t.privateKey),s=Ix(e);let o=null,a=null,l=null;if(_S(t)){const x=t.mnemonic;o=de(p9(x.phrase,x.locale||"en")),a=x.path||hu,l=x.locale||"en"}let c=r.client;c||(c="ethers.js");let f=null;r.salt?f=de(r.salt):f=uf(32);let u=null;if(r.iv){if(u=de(r.iv),u.length!==16)throw new Error("invalid iv")}else u=uf(16);let d=null;if(r.uuid){if(d=de(r.uuid),d.length!==16)throw new Error("invalid uuid")}else d=uf(16);let h=1<<17,p=8,m=1;return r.scrypt&&(r.scrypt.N&&(h=r.scrypt.N),r.scrypt.r&&(p=r.scrypt.r),r.scrypt.p&&(m=r.scrypt.p)),Ox.scrypt(s,f,h,p,m,64,n).then(x=>{x=de(x);const b=x.slice(0,16),w=x.slice(16,32),A=x.slice(32,64),R=new as.Counter(u),N=new as.ModeOfOperation.ctr(b,R),I=de(N.encrypt(i)),F=Je(wr([w,I])),j={address:t.address.substring(2).toLowerCase(),id:fK(d),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:he(u).substring(2)},ciphertext:he(I).substring(2),kdf:"scrypt",kdfparams:{salt:he(f).substring(2),n:h,dklen:32,p:m,r:p},mac:F.substring(2)}};if(o){const U=uf(16),Y=new as.Counter(U),J=new as.ModeOfOperation.ctr(A,Y),Z=de(J.encrypt(o)),M=new Date,v=M.getUTCFullYear()+"-"+Xc(M.getUTCMonth()+1,2)+"-"+Xc(M.getUTCDate(),2)+"T"+Xc(M.getUTCHours(),2)+"-"+Xc(M.getUTCMinutes(),2)+"-"+Xc(M.getUTCSeconds(),2)+".0Z";j["x-ethers"]={client:c,gethFilename:"UTC--"+v+"--"+j.address,mnemonicCounter:he(U).substring(2),mnemonicCiphertext:he(Z).substring(2),path:a,locale:l,version:"0.1"}}return JSON.stringify(j)})}function wK(t,e,r){if(x9(t)){r&&r(0);const n=g9(t,e);return r&&r(1),Promise.resolve(n)}return b9(t)?xK(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function AK(t,e){if(x9(t))return g9(t,e);if(b9(t))return gK(t,e);throw new Error("invalid JSON wallet")}const EK="wallet/5.7.0";var IS=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const dl=new Q(EK);function SK(t){return t!=null&&Ze(t.privateKey,32)&&t.address!=null}function CK(t){const e=t.mnemonic;return e&&e.phrase}class Ls extends Tc{constructor(e,r){if(super(),SK(e)){const n=new Gl(e.privateKey);if(se(this,"_signingKey",()=>n),se(this,"address",Ma(this.publicKey)),this.address!==ir(e.address)&&dl.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),CK(e)){const i=e.mnemonic;se(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||hu,locale:i.locale||"en"}));const s=this.mnemonic,o=fi.fromMnemonic(s.phrase,null,s.locale).derivePath(s.path);Ma(o.privateKey)!==this.address&&dl.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else se(this,"_mnemonic",()=>null)}else{if(Gl.isSigningKey(e))e.curve!=="secp256k1"&&dl.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),se(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const n=new Gl(e);se(this,"_signingKey",()=>n)}se(this,"_mnemonic",()=>null),se(this,"address",Ma(this.publicKey))}r&&!Uu.isProvider(r)&&dl.throwArgumentError("invalid provider","provider",r),se(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 Ls(this,e)}signTransaction(e){return yr(e).then(r=>{r.from!=null&&(ir(r.from)!==this.address&&dl.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);const n=this._signingKey().signDigest(Je(ES(r)));return ES(r,n)})}signMessage(e){return IS(this,void 0,void 0,function*(){return JE(this._signingKey().signDigest(Rq(e)))})}_signTypedData(e,r,n){return IS(this,void 0,void 0,function*(){const i=yield pn.resolveNames(e,r,n,s=>(this.provider==null&&dl.throwError("cannot resolve ENS names without a provider",Q.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:s}),this.provider.resolveName(s)));return JE(this._signingKey().signDigest(pn.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={}),bK(this,e,r,n)}static createRandom(e){let r=uf(16);e||(e={}),e.extraEntropy&&(r=de(Ir(Je(wr([r,e.extraEntropy])),0,16)));const n=_x(r,e.locale);return Ls.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return wK(e,r,n).then(i=>new Ls(i))}static fromEncryptedJsonSync(e,r){return new Ls(AK(e,r))}static fromMnemonic(e,r,n){return r||(r=hu),new Ls(fi.fromMnemonic(e,null,n).derivePath(r))}}const kK="networks/5.7.1",OS=new Q(kK);function TK(t){return t&&typeof t.renetwork=="function"}function Ms(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 Ms(r)},e}function v0(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return v0(t,n)},r}const MS={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Ms("homestead")},NS={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Ms("ropsten")},DS={chainId:63,name:"classicMordor",_defaultProvider:v0("https://www.ethercluster.com/mordor","classicMordor")},Td={unspecified:{chainId:0,name:"unspecified"},homestead:MS,mainnet:MS,morden:{chainId:2,name:"morden"},ropsten:NS,testnet:NS,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Ms("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Ms("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Ms("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Ms("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:v0("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:DS,classicTestnet:DS,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:v0("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Ms("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Ms("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 PK(t){if(t==null)return null;if(typeof t=="number"){for(const n in Td){const i=Td[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=Td[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=Td[t.name];if(!e)return typeof t.chainId!="number"&&OS.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&OS.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(TK(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 RK="web/5.7.1";var _K=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};function IK(t,e){return _K(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:de(new Uint8Array(i))}})}var OK=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Ci=new Q(RK);function LS(t){return new Promise(e=>{setTimeout(e,t)})}function vo(t,e){if(t==null)return null;if(typeof t=="string")return t;if(xv(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return $u(t)}catch{}return he(t)}return t}function MK(t){return Tt(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function NK(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;Ci.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;Ci.assertArgument(s>0&&s%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",s);const o=typeof t=="object"?!!t.errorPassThrough:!1,a={};let l=null;const c={method:"GET"};let f=!1,u=2*60*1e3;if(typeof t=="string")l=t;else if(typeof t=="object"){if((t==null||t.url==null)&&Ci.throwArgumentError("missing URL","connection.url",t),l=t.url,typeof t.timeout=="number"&&t.timeout>0&&(u=t.timeout),t.headers)for(const b in t.headers)a[b.toLowerCase()]={key:b,value:String(t.headers[b])},["if-none-match","if-modified-since"].indexOf(b.toLowerCase())>=0&&(f=!0);if(c.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){l.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&Ci.throwError("basic authentication requires a secure https url",Q.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:t.user,password:"[REDACTED]"});const b=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+k7(Tt(b))}}t.skipFetchSetup!=null&&(c.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(c.fetchOptions=Nr(t.fetchOptions))}const d=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),h=l?l.match(d):null;if(h)try{const b={statusCode:200,statusMessage:"OK",headers:{"content-type":h[1]||"text/plain"},body:h[2]?C7(h[3]):MK(h[3])};let w=b.body;return r&&(w=r(b.body,b)),Promise.resolve(w)}catch(b){Ci.throwError("processing response error",Q.errors.SERVER_ERROR,{body:vo(h[1],h[2]),error:b,requestBody:null,requestMethod:"GET",url:l})}e&&(c.method="POST",c.body=e,a["content-type"]==null&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),a["content-length"]==null&&(a["content-length"]={key:"Content-Length",value:String(e.length)}));const p={};Object.keys(a).forEach(b=>{const w=a[b];p[w.key]=w.value}),c.headers=p;const m=function(){let b=null;return{promise:new Promise(function(R,N){u&&(b=setTimeout(()=>{b!=null&&(b=null,N(Ci.makeError("timeout",Q.errors.TIMEOUT,{requestBody:vo(c.body,p["content-type"]),requestMethod:c.method,timeout:u,url:l})))},u))}),cancel:function(){b!=null&&(clearTimeout(b),b=null)}}}(),x=function(){return OK(this,void 0,void 0,function*(){for(let b=0;b=300)&&(m.cancel(),Ci.throwError("bad response",Q.errors.SERVER_ERROR,{status:w.statusCode,headers:w.headers,body:vo(A,w.headers?w.headers["content-type"]:null),requestBody:vo(c.body,p["content-type"]),requestMethod:c.method,url:l})),r)try{const R=yield r(A,w);return m.cancel(),R}catch(R){if(R.throttleRetry&&b{let a=null;if(s!=null)try{a=JSON.parse($u(s))}catch(l){Ci.throwError("invalid JSON",Q.errors.SERVER_ERROR,{body:s,error:l})}return r&&(a=r(a,o)),a},i=null;if(e!=null){i=Tt(e);const s=typeof t=="string"?{url:t}:Nr(t);s.headers?Object.keys(s.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(s.headers=Nr(s.headers),s.headers["content-type"]="application/json"):s.headers={"content-type":"application/json"},t=s}return NK(t,i,n)}function df(t,e){return e||(e={}),e=Nr(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let i=null,s=!1;const o=()=>s?!1:(s=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{o()&&n(new Error("timeout"))},e.timeout));const a=e.retryLimit;let l=0;function c(){return t().then(function(f){if(f!==void 0)o()&&r(f);else if(e.oncePoll)e.oncePoll.once("poll",c);else if(e.onceBlock)e.onceBlock.once("block",c);else if(!s){if(l++,l>a){o()&&n(new Error("retry limit reached"));return}let u=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));ue.ceiling&&(u=e.ceiling),setTimeout(c,u)}return null},function(f){o()&&n(f)})}c()})}var p0="qpzry9x8gf2tvdw0s3jn54khce6mua7l",tm={};for(var Pd=0;Pd>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 C9(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=Kl(e)^n>>5}for(e=Kl(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=C9(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=Kl(n)^o,i+=p0.charAt(o)}for(s=0;s<6;++s)n=Kl(n);for(n^=1,s=0;s<6;++s){var a=n>>(5-s)*5&31;i+=p0.charAt(a)}return i}function k9(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=C9(s);if(typeof a=="string")return a;for(var l=[],c=0;c=o.length)&&l.push(u)}return a!==1?"Invalid checksum for "+t:{prefix:s,words:l}}function LK(){var t=k9.apply(null,arguments);if(typeof t=="object")return t}function jK(t){var e=k9.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Cv(t,e,r,n){for(var i=0,s=0,o=(1<=r;)s-=r,a.push(i>>s&o);if(n)s>0&&a.push(i<=e)return"Excess padding";if(i<this.data(u,!0);return e.transaction={hash:o,type:c,accessList:be.allowNull(this.accessList.bind(this),null),blockHash:be.allowNull(o,null),blockNumber:be.allowNull(l,null),transactionIndex:be.allowNull(l,null),confirmations:be.allowNull(l,null),from:r,gasPrice:be.allowNull(n),maxPriorityFeePerGas:be.allowNull(n),maxFeePerGas:be.allowNull(n),gasLimit:n,to:be.allowNull(r,null),value:n,nonce:l,data:s,r:be.allowNull(this.uint256),s:be.allowNull(this.uint256),v:be.allowNull(l),creates:be.allowNull(r,null),raw:be.allowNull(s)},e.transactionRequest={from:be.allowNull(r),nonce:be.allowNull(l),gasLimit:be.allowNull(n),gasPrice:be.allowNull(n),maxPriorityFeePerGas:be.allowNull(n),maxFeePerGas:be.allowNull(n),to:be.allowNull(r),value:be.allowNull(n),data:be.allowNull(f),type:be.allowNull(l),accessList:be.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:o,address:r,topics:be.arrayOf(o),data:s,logIndex:l,blockHash:o},e.receipt={to:be.allowNull(this.address,null),from:be.allowNull(this.address,null),contractAddress:be.allowNull(r,null),transactionIndex:l,root:be.allowNull(a),gasUsed:n,logsBloom:be.allowNull(s),blockHash:o,transactionHash:o,logs:be.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:be.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:be.allowNull(n),status:be.allowNull(l),type:c},e.block={hash:be.allowNull(o),parentHash:o,number:l,timestamp:l,nonce:be.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:be.allowNull(r),extraData:s,transactions:be.allowNull(be.arrayOf(o)),baseFeePerGas:be.allowNull(n)},e.blockWithTransactions=Nr(e.block),e.blockWithTransactions.transactions=be.allowNull(be.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:be.allowNull(i,void 0),toBlock:be.allowNull(i,void 0),blockHash:be.allowNull(o,void 0),address:be.allowNull(r,void 0),topics:be.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:be.allowNull(l),blockHash:be.allowNull(o),transactionIndex:l,removed:be.allowNull(this.boolean.bind(this)),address:r,data:be.allowFalsish(s,"0x"),topics:be.arrayOf(o),transactionHash:o,logIndex:l},e}accessList(e){return Oc(e||[])}number(e){return e==="0x"?0:ce.from(e).toNumber()}type(e){return e==="0x"||e==null?0:ce.from(e).toNumber()}bigNumber(e){return ce.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),Ze(e))?e.toLowerCase():Zc.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 ir(e)}callAddress(e){if(!Ze(e,32))return null;const r=ir(Ir(e,12));return r===Ax?null:r}contractAddress(e){return y7(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"||Ze(e))return mx(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return Va(n)!==32?Zc.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=ce.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!Ze(e))throw new Error("invalid uint256");return Ht(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=be.check(r,e);return i._difficulty=n==null?null:ce.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return be.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&ce.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=be.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;Ze(n)&&(n=ce.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),Ze(n)&&(n=ce.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 $G(e)}receiptLog(e){return be.check(this.formats.receiptLog,e)}receipt(e){const r=be.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=ce.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&Zc.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):Zc.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&Zc.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 be.check(this.formats.filter,e)}filterLog(e){return be.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const i in e)try{const s=e[i](r[i]);s!==void 0&&(n[i]=s)}catch(s){throw s.checkKey=i,s.checkValue=r[i],s}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(i){n.push(e(i))}),n}}}var Me=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const $e=new Q(Nx),VK=10;function FS(t){return t==null?"null":(Va(t)!==32&&$e.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function BS(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[FS(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return FS(e)}).join("&")}function HK(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 hl(t){if(typeof t=="string"){if(t=t.toLowerCase(),Va(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+BS(t);if(Hq.isForkEvent(t))throw $e.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+BS(t.topics||[])}throw new Error("invalid event - "+t)}function ef(){return new Date().getTime()}function $S(t){return new Promise(e=>{setTimeout(e,t)})}const qK=["block","network","pending","poll"];let WK=class{constructor(e,r,n){se(this,"tag",e),se(this,"listener",r),se(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=HK(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||qK.indexOf(this.tag)>=0}};const GK={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 K1(t){return Ht(ce.from(t).toHexString(),32)}function US(t){return uu.encode(wr([t,Ir(Ka(Ka(t)),0,4)]))}const T9=new RegExp("^(ipfs)://(.*)$","i"),zS=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),T9,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function dh(t,e){try{return $u(vu(t,e))}catch{}return null}function vu(t,e){if(t==="0x")return null;const r=ce.from(Ir(t,e,e+32)).toNumber(),n=ce.from(Ir(t,r,r+32)).toNumber();return Ir(t,r+32,r+32+n)}function Y1(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):$e.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function VS(t){const e=de(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 KK(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function P9(t){const e=[];let r=0;for(let n=0;nce.from(e).eq(1)).catch(e=>{if(e.code===Q.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return Me(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Sn([e,ah(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=Sn(["0x9061b923",P9([Tq(this.name),n.data])]));try{let s=yield this.provider.call(n);return de(s).length%32===4&&$e.throwError("resolver threw error",Q.errors.CALL_EXCEPTION,{transaction:n,data:s}),i&&(s=vu(s,0)),s}catch(s){if(s.code===Q.errors.CALL_EXCEPTION)return null;throw s}})}_fetchBytes(e,r){return Me(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?vu(n,0):null})}_getAddress(e,r){const n=GK[String(e)];if(n==null&&$e.throwError(`unsupported coin type: ${e}`,Q.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=de(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 US(wr([[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 US(wr([[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=jS.toWords(i.slice(2));return a.unshift(o),jS.encode(n.prefix,a)}}return null}getAddress(e){return Me(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===qH?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===Q.errors.CALL_EXCEPTION)return null;throw i}const r=yield this._fetchBytes("0xf1cb7e06",K1(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&$e.throwError("invalid or unsupported coin data",Q.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return Me(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;no[l])}return $e.throwError("invalid or unsupported content hash data",Q.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return Me(this,void 0,void 0,function*(){let r=Tt(e);r=wr([K1(64),K1(r.length),r]),r.length%32!==0&&(r=wr([r,Ht("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",he(r));return n==null||n==="0x"?null:$u(n)})}}let Q1=null,YK=1;class QK extends Uu{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),se(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=os(new.target,"getNetwork")(e);r?(se(this,"_network",r),this.emit("network",r,null)):$e.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return Me(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||$e.throwError("no network detected",Q.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:se(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return df(()=>this._ready().then(e=>e,e=>{if(!(e.code===Q.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Q1==null&&(Q1=new be),Q1}static getNetwork(e){return PK(e??"homestead")}ccipReadFetch(e,r,n){return Me(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const i=e.to.toLowerCase(),s=r.toLowerCase(),o=[];for(let a=0;a=0?null:JSON.stringify({data:s,sender:i}),u=yield Mx({url:c,errorPassThrough:!0},f,(h,p)=>(h.status=p.statusCode,h));if(u.data)return u.data;const d=u.message||"unknown error";if(u.status>=400&&u.status<500)return $e.throwError(`response not found during CCIP fetch: ${d}`,Q.errors.SERVER_ERROR,{url:l,errorMessage:d});o.push(d)}return $e.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,Q.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return Me(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const s=yield i;if(ef()-s.respTime<=e)return s.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=ef(),n=yr({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=ef();return i=ce.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return Me(this,void 0,void 0,function*(){const e=YK++,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)$e.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",$e.makeError("network block skew detected",Q.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;const s=this._emitted[i];s!=="pending"&&n-s>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{const s=i.hash;let o=this.getTransactionReceipt(s).then(a=>(!a||a.blockNumber==null||(this._emitted["t:"+s]=a.blockNumber,this.emit(s,a)),null)).catch(a=>{this.emit("error",a)});r.push(o);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);const s=i.filter;s.fromBlock=i._lastBlockNumber+1,s.toBlock=n;const o=s.toBlock-this._maxFilterBlockRange;o>s.fromBlock&&(s.fromBlock=o),s.fromBlock<0&&(s.fromBlock=0);const a=this.getLogs(s).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(c=>{c.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=c.blockNumber),this._emitted["b:"+c.blockHash]=c.blockNumber,this._emitted["t:"+c.transactionHash]=c.blockNumber,this.emit(s,c)})}).catch(l=>{this.emit("error",l),i._inflight=!1});r.push(a)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return Me(this,void 0,void 0,function*(){return $e.throwError("provider does not support network detection",Q.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return Me(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,e),yield $S(0),this._network;const n=$e.makeError("underlying network changed",Q.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=ef();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return Me(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return Me(this,void 0,void 0,function*(){const s=yield this.getTransactionReceipt(e);return(s?s.confirmations:0)>=r?s:new Promise((o,a)=>{const l=[];let c=!1;const f=function(){return c?!0:(c=!0,l.forEach(d=>{d()}),!1)},u=d=>{d.confirmations{this.removeListener(e,u)}),i){let d=i.startBlock,h=null;const p=m=>Me(this,void 0,void 0,function*(){c||(yield $S(1e3),this.getTransactionCount(i.from).then(x=>Me(this,void 0,void 0,function*(){if(!c){if(x<=i.nonce)d=m;else{{const b=yield this.getTransaction(e);if(b&&b.blockNumber!=null)return}for(h==null&&(h=d-3,h{c||this.once("block",p)}))});if(c)return;this.once("block",p),l.push(()=>{this.removeListener("block",p)})}if(typeof n=="number"&&n>0){const d=setTimeout(()=>{f()||a($e.makeError("timeout exceeded",Q.errors.TIMEOUT,{timeout:n}))},n);d.unref&&d.unref(),l.push(()=>{clearTimeout(d)})}})})}getBlockNumber(){return Me(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return Me(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return ce.from(e)}catch(r){return $e.throwError("bad result from backend",Q.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return Me(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield yr({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return ce.from(i)}catch(s){return $e.throwError("bad result from backend",Q.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:s})}})}getTransactionCount(e,r){return Me(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield yr({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return ce.from(i).toNumber()}catch(s){return $e.throwError("bad result from backend",Q.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:s})}})}getCode(e,r){return Me(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield yr({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return he(i)}catch(s){return $e.throwError("bad result from backend",Q.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:s})}})}getStorageAt(e,r,n){return Me(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield yr({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>mx(o))}),s=yield this.perform("getStorageAt",i);try{return he(s)}catch(o){return $e.throwError("bad result from backend",Q.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:s,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&Va(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&$e.throwError("Transaction hash mismatch from Provider.sendTransaction.",Q.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(s,o)=>Me(this,void 0,void 0,function*(){s==null&&(s=1),o==null&&(o=0);let a;s!==0&&n!=null&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const l=yield this._waitForTransaction(e.hash,s,o,a);return l==null&&s===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&$e.throwError("transaction failed",Q.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return Me(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(s=>he(s)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const s=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,s,i)}catch(s){throw s.transaction=n,s.transactionHash=n.hash,s}})}_getTransactionRequest(e){return Me(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?this._getAddress(s):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?ce.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?he(s):null))}),this.formatter.transactionRequest(yield yr(n))})}_getFilter(e){return Me(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield yr(r))})}_call(e,r,n){return Me(this,void 0,void 0,function*(){n>=VK&&$e.throwError("CCIP read exceeded maximum redirections",Q.errors.SERVER_ERROR,{redirects:n,transaction:e});const i=e.to,s=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&i!=null&&s.substring(0,10)==="0x556f1830"&&Va(s)%32===4)try{const o=Ir(s,4),a=Ir(o,0,32);ce.from(a).eq(i)||$e.throwError("CCIP Read sender did not match",Q.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:s});const l=[],c=ce.from(Ir(o,32,64)).toNumber(),f=ce.from(Ir(o,c,c+32)).toNumber(),u=Ir(o,c+32);for(let b=0;bMe(this,void 0,void 0,function*(){const s=yield this.perform("getBlock",i);if(s==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let o=null;for(let l=0;lthis._wrapTransaction(l)),a}return this.formatter.block(s)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return Me(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return df(()=>Me(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return Me(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return df(()=>Me(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return i}),{oncePoll:this})})}getLogs(e){return Me(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield yr({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),be.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return Me(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return Me(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&$e.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return Me(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const i=new HS(this,n,e);return r!==e&&!(yield i.supportsWildcard())?null:i}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return Me(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||$e.throwError("network does not support ENS",Q.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+ah(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return Me(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(Ze(e))throw n}typeof e!="string"&&$e.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return Me(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const i=dh(yield this.call({to:n,data:"0x691f3431"+ah(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return Me(this,void 0,void 0,function*(){let r=null;if(Ze(e)){const s=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(s,"getAvatar");if(!o)return null;r=new HS(this,o,s);try{const a=yield r.getAvatar();if(a)return a.url}catch(a){if(a.code!==Q.errors.CALL_EXCEPTION)throw a}try{const a=dh(yield this.call({to:o,data:"0x691f3431"+ah(s).substring(2)}),0);r=yield this.getResolver(a)}catch(a){if(a.code!==Q.errors.CALL_EXCEPTION)throw a;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return $e.throwError(e+" not implemented",Q.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const i=new WK(hl(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=hl(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=hl(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=hl(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=hl(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=hl(e);this._events=this._events.filter(i=>i.tag!==n?!0:(r.push(i),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var Is=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Er=new Q(Nx),JK=["call","estimateGas"];function _f(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=Ze(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=_f(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return _f(JSON.parse(t),e)}catch{}return null}function R9(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const s=_f(e,!0);if(s)return s.data;Er.throwError("missing revert data in call exception; Transaction reverted without a reason string",Q.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let s=_f(e.body,!1);s==null&&(s=_f(e,!1)),s&&Er.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Q.errors.UNPREDICTABLE_GAS_LIMIT,{reason:s.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===Q.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Er.throwError("insufficient funds for intrinsic transaction cost",Q.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&Er.throwError("nonce has already been used",Q.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Er.throwError("replacement fee too low",Q.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&Er.throwError("legacy pre-eip-155 transactions not supported",Q.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),JK.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Er.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Q.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function qS(t){return new Promise(function(e){setTimeout(e,t)})}function XK(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 tf(t){return t&&t.toLowerCase()}const rm={};class _9 extends Tc{constructor(e,r,n){if(super(),e!==rm)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");se(this,"provider",r),n==null&&(n=0),typeof n=="string"?(se(this,"_address",this.provider.formatter.address(n)),se(this,"_index",null)):typeof n=="number"?(se(this,"_index",n),se(this,"_address",null)):Er.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Er.throwError("cannot alter JSON-RPC Signer connection",Q.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new ZK(rm,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&&Er.throwError("unknown account #"+this._index,Q.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Nr(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=Nr(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Is(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&Er.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),yr({tx:yr(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Er.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)&&Er.throwError("user rejected transaction",Q.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),R9("sendTransaction",o,s)))})}signTransaction(e){return Er.throwError("signing transactions is unsupported",Q.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Is(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 df(()=>Is(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 Is(this,void 0,void 0,function*(){const r=typeof e=="string"?Tt(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[he(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Er.throwError("user rejected signing",Q.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return Is(this,void 0,void 0,function*(){const r=typeof e=="string"?Tt(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),he(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Er.throwError("user rejected signing",Q.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return Is(this,void 0,void 0,function*(){const i=yield pn.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(pn.getPayload(i.domain,r,i.value))])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&Er.throwError("user rejected signing",Q.errors.ACTION_REJECTED,{action:"_signTypedData",from:s,messageData:{domain:i.domain,types:r,value:i.value}}),o}})}unlock(e){return Is(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class ZK extends _9{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 eY={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let I9=class extends QK{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=os(this.constructor,"defaultUrl")()),typeof e=="string"?se(this,"connection",Object.freeze({url:e})):se(this,"connection",Object.freeze(Nr(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 Is(this,void 0,void 0,function*(){yield qS(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=os(this.constructor,"getNetwork");try{return r(ce.from(e).toNumber())}catch(n){return Er.throwError("could not detect network",Q.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Er.throwError("could not detect network",Q.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new _9(rm,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:Ha(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const s=Mx(this.connection,JSON.stringify(n),XK).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",[tf(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[tf(r.address),r.blockTag]];case"getCode":return["eth_getCode",[tf(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[tf(r.address),Ht(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",[os(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[os(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=tf(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return Is(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=r.transaction;if(i&&i.type!=null&&ce.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const s=yield this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(r=Nr(r),r.transaction=Nr(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&Er.throwError(e+" not implemented",Q.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return R9(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 qS(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=Nr(eY);if(r)for(const s in r)r[s]&&(n[s]=!0);l7(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(s){if(e[s]==null)return;const o=mx(ce.from(e[s]));s==="gasLimit"&&(s="gas"),i[s]=o}),["from","to","data"].forEach(function(s){e[s]!=null&&(i[s]=he(e[s]))}),e.accessList&&(i.accessList=Oc(e.accessList)),i}};const tY="units/5.7.0",rY=new Q(tY),O9=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Dx(t,e){if(typeof e=="string"){const r=O9.indexOf(e);r!==-1&&(e=3*r)}return sh(t,e??18)}function pu(t,e){if(typeof t!="string"&&rY.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=O9.indexOf(e);r!==-1&&(e=3*r)}return Yi(t,e??18)}function nY(t){return Dx(t,18)}function WS(t){return pu(t,18)}const iY="1.10.0";function sY(t){var e="";return r(t),e;function r(i){if(i===null||typeof i!="object"||i.toJSON!=null)e+=JSON.stringify(i);else if(Array.isArray(i)){e+="[";var s=!1;i.forEach(function(a){s&&(e+=","),s=!0,a===void 0&&(a=null),r(a)}),e+="]"}else{e+="{";var o=Object.keys(i).filter(function(a){return i[a]!==void 0}).sort();o.forEach(function(a,l){return n(i,a,l)}),e+="}"}}function n(i,s,o){o>0&&(e+=","),e+=JSON.stringify(s),e+=":",r(i[s])}}let ee=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.SEPOLIA=11155111]="SEPOLIA",t[t.POLYGON=137]="POLYGON",t[t.POLYGON_MUMBAI=80001]="POLYGON_MUMBAI",t[t.POLYGON_ZKEVM=1101]="POLYGON_ZKEVM",t[t.POLYGON_AMOY=80002]="POLYGON_AMOY",t[t.BSC=56]="BSC",t[t.BSC_TESTNET=97]="BSC_TESTNET",t[t.OPTIMISM=10]="OPTIMISM",t[t.OPTIMISM_KOVAN=69]="OPTIMISM_KOVAN",t[t.OPTIMISM_GOERLI=420]="OPTIMISM_GOERLI",t[t.OPTIMISM_SEPOLIA=11155420]="OPTIMISM_SEPOLIA",t[t.ARBITRUM=42161]="ARBITRUM",t[t.ARBITRUM_GOERLI=421613]="ARBITRUM_GOERLI",t[t.ARBITRUM_SEPOLIA=421614]="ARBITRUM_SEPOLIA",t[t.ARBITRUM_NOVA=42170]="ARBITRUM_NOVA",t[t.AVALANCHE=43114]="AVALANCHE",t[t.AVALANCHE_TESTNET=43113]="AVALANCHE_TESTNET",t[t.GNOSIS=100]="GNOSIS",t[t.BASE=8453]="BASE",t[t.BASE_GOERLI=84531]="BASE_GOERLI",t[t.BASE_SEPOLIA=84532]="BASE_SEPOLIA",t[t.HOMEVERSE_TESTNET=40875]="HOMEVERSE_TESTNET",t[t.HOMEVERSE=19011]="HOMEVERSE",t[t.XAI=660279]="XAI",t[t.XAI_SEPOLIA=37714555429]="XAI_SEPOLIA",t[t.ASTAR_ZKEVM=3776]="ASTAR_ZKEVM",t[t.ASTAR_ZKYOTO=6038361]="ASTAR_ZKYOTO",t[t.XR_SEPOLIA=2730]="XR_SEPOLIA",t[t.TELOS=40]="TELOS",t[t.HARDHAT=31337]="HARDHAT",t[t.HARDHAT_2=31338]="HARDHAT_2",t}({}),Qe=function(t){return t.MAINNET="mainnet",t.TESTNET="testnet",t}({});const st={[ee.MAINNET]:{chainId:ee.MAINNET,type:Qe.MAINNET,name:"mainnet",title:"Ethereum",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.MAINNET}.webp`,blockExplorer:{name:"Etherscan",rootUrl:"https://etherscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[ee.ROPSTEN]:{chainId:ee.ROPSTEN,type:Qe.TESTNET,name:"ropsten",title:"Ropsten",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.ROPSTEN}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Ropsten)",rootUrl:"https://ropsten.etherscan.io/"},nativeToken:{symbol:"roETH",name:"Ropsten Ether",decimals:18},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",deprecated:!0},[ee.RINKEBY]:{chainId:ee.RINKEBY,type:Qe.TESTNET,name:"rinkeby",title:"Rinkeby",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.RINKEBY}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Rinkeby)",rootUrl:"https://rinkeby.etherscan.io/"},nativeToken:{symbol:"rETH",name:"Rinkeby Ether",decimals:18},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",deprecated:!0},[ee.GOERLI]:{chainId:ee.GOERLI,type:Qe.TESTNET,name:"goerli",title:"Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.GOERLI}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Goerli)",rootUrl:"https://goerli.etherscan.io/"},nativeToken:{symbol:"gETH",name:"Goerli Ether",decimals:18},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",deprecated:!0},[ee.KOVAN]:{chainId:ee.KOVAN,type:Qe.TESTNET,name:"kovan",title:"Kovan",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.KOVAN}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Kovan)",rootUrl:"https://kovan.etherscan.io/"},nativeToken:{symbol:"kETH",name:"Kovan Ether",decimals:18},deprecated:!0},[ee.SEPOLIA]:{chainId:ee.SEPOLIA,type:Qe.TESTNET,name:"sepolia",title:"Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Sepolia)",rootUrl:"https://sepolia.etherscan.io/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[ee.POLYGON]:{chainId:ee.POLYGON,type:Qe.MAINNET,name:"polygon",title:"Polygon",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.POLYGON}.webp`,blockExplorer:{name:"Polygonscan",rootUrl:"https://polygonscan.com/"},nativeToken:{symbol:"MATIC",name:"Polygon",decimals:18}},[ee.POLYGON_MUMBAI]:{chainId:ee.POLYGON_MUMBAI,type:Qe.TESTNET,name:"mumbai",title:"Polygon Mumbai",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.POLYGON_MUMBAI}.webp`,testnet:!0,blockExplorer:{name:"Polygonscan (Mumbai)",rootUrl:"https://mumbai.polygonscan.com/"},nativeToken:{symbol:"mMATIC",name:"Mumbai Polygon",decimals:18},deprecated:!0},[ee.POLYGON_AMOY]:{chainId:ee.POLYGON_AMOY,type:Qe.TESTNET,name:"amoy",title:"Polygon Amoy",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.POLYGON_AMOY}.webp`,testnet:!0,blockExplorer:{name:"OKLink (Amoy)",rootUrl:"https://www.oklink.com/amoy/"},nativeToken:{symbol:"aMATIC",name:"Amoy Polygon",decimals:18}},[ee.POLYGON_ZKEVM]:{chainId:ee.POLYGON_ZKEVM,type:Qe.MAINNET,name:"polygon-zkevm",title:"Polygon zkEVM",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.POLYGON_ZKEVM}.webp`,blockExplorer:{name:"Polygonscan (zkEVM)",rootUrl:"https://zkevm.polygonscan.com/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[ee.BSC]:{chainId:ee.BSC,type:Qe.MAINNET,name:"bsc",title:"BNB Smart Chain",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.BSC}.webp`,blockExplorer:{name:"BSCScan",rootUrl:"https://bscscan.com/"},nativeToken:{symbol:"BNB",name:"BNB",decimals:18}},[ee.BSC_TESTNET]:{chainId:ee.BSC_TESTNET,type:Qe.TESTNET,name:"bsc-testnet",title:"BNB Smart Chain Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.BSC_TESTNET}.webp`,testnet:!0,blockExplorer:{name:"BSCScan (Testnet)",rootUrl:"https://testnet.bscscan.com/"},nativeToken:{symbol:"tBNB",name:"Testnet BNB",decimals:18}},[ee.OPTIMISM]:{chainId:ee.OPTIMISM,type:Qe.MAINNET,name:"optimism",title:"Optimism",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.OPTIMISM}.webp`,blockExplorer:{name:"Etherscan (Optimism)",rootUrl:"https://optimistic.etherscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[ee.OPTIMISM_KOVAN]:{chainId:ee.OPTIMISM_KOVAN,type:Qe.TESTNET,name:"optimism-kovan",title:"Optimism Kovan",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.OPTIMISM_KOVAN}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Optimism Kovan)",rootUrl:"https://kovan-optimistic.etherscan.io/"},nativeToken:{symbol:"kETH",name:"Kovan Ether",decimals:18},deprecated:!0},[ee.OPTIMISM_GOERLI]:{chainId:ee.OPTIMISM_GOERLI,type:Qe.TESTNET,name:"optimism-goerli",title:"Optimism Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.OPTIMISM_GOERLI}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Optimism Goerli)",rootUrl:"https://goerli-optimistic.etherscan.io/"},nativeToken:{symbol:"gETH",name:"Goerli Ether",decimals:18},deprecated:!0},[ee.OPTIMISM_SEPOLIA]:{chainId:ee.OPTIMISM_SEPOLIA,type:Qe.TESTNET,name:"optimism-sepolia",title:"Optimism Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.OPTIMISM_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Optimism Sepolia)",rootUrl:"https://sepolia-optimistic.etherscan.io/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[ee.ARBITRUM]:{chainId:ee.ARBITRUM,type:Qe.MAINNET,name:"arbitrum",title:"Arbitrum One",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.ARBITRUM}.webp`,blockExplorer:{name:"Arbiscan",rootUrl:"https://arbiscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[ee.ARBITRUM_GOERLI]:{chainId:ee.ARBITRUM_GOERLI,type:Qe.TESTNET,name:"arbitrum-goerli",title:"Arbitrum Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.ARBITRUM_GOERLI}.webp`,testnet:!0,blockExplorer:{name:"Arbiscan (Goerli Testnet)",rootUrl:"https://testnet.arbiscan.io/"},nativeToken:{symbol:"gETH",name:"Goerli Ether",decimals:18},deprecated:!0},[ee.ARBITRUM_SEPOLIA]:{chainId:ee.ARBITRUM_SEPOLIA,type:Qe.TESTNET,name:"arbitrum-sepolia",title:"Arbitrum Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.ARBITRUM_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Arbiscan (Sepolia Testnet)",rootUrl:"https://sepolia.arbiscan.io/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[ee.ARBITRUM_NOVA]:{chainId:ee.ARBITRUM_NOVA,type:Qe.MAINNET,name:"arbitrum-nova",title:"Arbitrum Nova",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.ARBITRUM_NOVA}.webp`,blockExplorer:{name:"Arbiscan Nova",rootUrl:"https://nova.arbiscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[ee.AVALANCHE]:{chainId:ee.AVALANCHE,type:Qe.MAINNET,name:"avalanche",title:"Avalanche",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.AVALANCHE}.webp`,blockExplorer:{name:"Snowtrace",rootUrl:"https://subnets.avax.network/c-chain/"},nativeToken:{symbol:"AVAX",name:"AVAX",decimals:18}},[ee.AVALANCHE_TESTNET]:{chainId:ee.AVALANCHE_TESTNET,type:Qe.TESTNET,name:"avalanche-testnet",title:"Avalanche Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.AVALANCHE_TESTNET}.webp`,testnet:!0,blockExplorer:{name:"Snowtrace (Testnet)",rootUrl:"https://subnets-test.avax.network/c-chain/"},nativeToken:{symbol:"tAVAX",name:"Testnet AVAX",decimals:18}},[ee.GNOSIS]:{chainId:ee.GNOSIS,type:Qe.MAINNET,name:"gnosis",title:"Gnosis Chain",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.GNOSIS}.webp`,blockExplorer:{name:"Gnosis Chain Explorer",rootUrl:"https://blockscout.com/xdai/mainnet/"},nativeToken:{symbol:"XDAI",name:"XDAI",decimals:18}},[ee.BASE]:{chainId:ee.BASE,type:Qe.MAINNET,name:"base",title:"Base (Coinbase)",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.BASE}.webp`,blockExplorer:{name:"Base Explorer",rootUrl:"https://basescan.org/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[ee.BASE_GOERLI]:{chainId:ee.BASE_GOERLI,type:Qe.TESTNET,name:"base-goerli",title:"Base Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.BASE_GOERLI}.webp`,testnet:!0,blockExplorer:{name:"Base Goerli Explorer",rootUrl:"https://goerli.basescan.org/"},nativeToken:{symbol:"gETH",name:"Goerli Ether",decimals:18},deprecated:!0},[ee.BASE_SEPOLIA]:{chainId:ee.BASE_SEPOLIA,type:Qe.TESTNET,name:"base-sepolia",title:"Base Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.BASE_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Base Sepolia Explorer",rootUrl:"https://base-sepolia.blockscout.com/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[ee.HOMEVERSE]:{chainId:ee.HOMEVERSE,type:Qe.MAINNET,name:"homeverse",title:"Oasys Homeverse",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.HOMEVERSE}.webp`,blockExplorer:{name:"Oasys Homeverse Explorer",rootUrl:"https://explorer.oasys.homeverse.games/"},nativeToken:{symbol:"OAS",name:"OAS",decimals:18}},[ee.HOMEVERSE_TESTNET]:{chainId:ee.HOMEVERSE_TESTNET,type:Qe.TESTNET,name:"homeverse-testnet",title:"Oasys Homeverse Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.HOMEVERSE_TESTNET}.webp`,testnet:!0,blockExplorer:{name:"Oasys Homeverse Explorer (Testnet)",rootUrl:"https://explorer.testnet.oasys.homeverse.games/"},nativeToken:{symbol:"tOAS",name:"Testnet OAS",decimals:18}},[ee.XAI]:{chainId:ee.XAI,type:Qe.MAINNET,name:"xai",title:"Xai",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.XAI}.webp`,blockExplorer:{name:"Xai Explorer",rootUrl:"https://explorer.xai-chain.net/"},nativeToken:{symbol:"XAI",name:"XAI",decimals:18}},[ee.XAI_SEPOLIA]:{chainId:ee.XAI_SEPOLIA,type:Qe.TESTNET,name:"xai-sepolia",title:"Xai Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.XAI_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Xai Sepolia Explorer",rootUrl:"https://testnet-explorer-v2.xai-chain.net/"},nativeToken:{symbol:"sXAI",name:"Sepolia XAI",decimals:18}},[ee.ASTAR_ZKEVM]:{chainId:ee.ASTAR_ZKEVM,type:Qe.MAINNET,name:"astar-zkevm",title:"Astar zkEVM",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.ASTAR_ZKEVM}.webp`,blockExplorer:{name:"Astar zkEVM Explorer",rootUrl:"https://astar-zkevm.explorer.startale.com/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[ee.ASTAR_ZKYOTO]:{chainId:ee.ASTAR_ZKYOTO,type:Qe.TESTNET,name:"astar-zkyoto",title:"Astar zKyoto Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.ASTAR_ZKYOTO}.webp`,testnet:!0,blockExplorer:{name:"Astar zKyoto Explorer",rootUrl:"https://astar-zkyoto.blockscout.com/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[ee.XR_SEPOLIA]:{chainId:ee.XR_SEPOLIA,type:Qe.TESTNET,name:"xr-sepolia",title:"XR Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.XR_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"XR Sepolia Explorer",rootUrl:"https://xr-sepolia-testnet.explorer.caldera.xyz/"},nativeToken:{symbol:"tXR",name:"Sepolia XR",decimals:18}},[ee.TELOS]:{chainId:ee.TELOS,type:Qe.MAINNET,name:"telos",title:"Telos",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.TELOS}.webp`,blockExplorer:{name:"Telos Explorer",rootUrl:"https://explorer.telos.net/network/"},nativeToken:{symbol:"TLOS",name:"TLOS",decimals:18}},[ee.HARDHAT]:{chainId:ee.HARDHAT,name:"hardhat",title:"Hardhat (local testnet)",nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[ee.HARDHAT_2]:{chainId:ee.HARDHAT_2,name:"hardhat2",title:"Hardhat (local testnet)",nativeToken:{symbol:"ETH",name:"Ether",decimals:18}}};function nm(){return nm=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(c=>c.chainId).sort(),s=i.filter((c,f)=>i.indexOf(c)!==f);if(s.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${s}`);return!1}n.forEach(c=>c.name=c.name.toLowerCase());const o=n.map(c=>c.name).sort(),a=o.filter((c,f)=>o.indexOf(c)!==f);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let c=0;c(aY(t,!0,e),t),cY=t=>lY(uY(t)),fY=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=ce.from(e).toNumber();return t.find(n=>n.chainId===r)}else return t.find(r=>r.name===e||`${r.chainId}`===e);else{if(typeof e=="number")return t.find(r=>r.chainId===e);if(e.chainId)return t.find(r=>r.chainId===e.chainId);if(ce.isBigNumber(e)){const r=e.toNumber();return t.find(n=>n.chainId===r)}else return}},uY=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},Lx=(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})):"",M9=t=>Lx("https://${network}-indexer.sequence.app",{network:t}),dY=t=>Lx("https://${network}-relayer.sequence.app",{network:t}),hY=t=>Lx("https://nodes.sequence.app/${network}",{network:t});function GS(t){return fY(vY,t)}const Ct=t=>{const e=hY(t);return{rpcUrl:e,relayer:{url:dY(t),provider:{url:e}},indexerUrl:M9(t)}},vY=cY([rt({},st[ee.POLYGON],Ct("polygon"),{isDefaultChain:!0,isAuthChain:!0}),rt({},st[ee.MAINNET],Ct("mainnet")),rt({},st[ee.BSC],Ct("bsc")),rt({},st[ee.AVALANCHE],Ct("avalanche")),rt({},st[ee.ARBITRUM],Ct("arbitrum")),rt({},st[ee.ARBITRUM_NOVA],Ct("arbitrum-nova")),rt({},st[ee.OPTIMISM],Ct("optimism")),rt({},st[ee.OPTIMISM_SEPOLIA],Ct("optimism-sepolia")),rt({},st[ee.POLYGON_ZKEVM],Ct("polygon-zkevm")),rt({},st[ee.GNOSIS],Ct("gnosis")),rt({},st[ee.RINKEBY],Ct("rinkeby"),{disabled:!0}),rt({},st[ee.GOERLI],Ct("goerli"),{disabled:!0}),rt({},st[ee.SEPOLIA],Ct("sepolia")),rt({},st[ee.POLYGON_MUMBAI],Ct("mumbai"),{disabled:!0}),rt({},st[ee.POLYGON_AMOY],Ct("amoy")),rt({},st[ee.BSC_TESTNET],Ct("bsc-testnet")),rt({},st[ee.ARBITRUM_SEPOLIA],Ct("arbitrum-sepolia")),rt({},st[ee.BASE],Ct("base")),rt({},st[ee.BASE_SEPOLIA],Ct("base-sepolia")),rt({},st[ee.HOMEVERSE],Ct("homeverse")),rt({},st[ee.HOMEVERSE_TESTNET],Ct("homeverse-testnet")),rt({},st[ee.XAI],Ct("xai")),rt({},st[ee.XAI_SEPOLIA],Ct("xai-sepolia")),rt({},st[ee.AVALANCHE_TESTNET],Ct("avalanche-testnet")),rt({},st[ee.ASTAR_ZKEVM],Ct("astar-zkevm")),rt({},st[ee.ASTAR_ZKYOTO],Ct("astar-zkyoto")),rt({},st[ee.XR_SEPOLIA],Ct("xr-sepolia")),rt({},st[ee.TELOS],Ct("telos")),rt({},st[ee.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),rt({},st[ee.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]),pY=(t,e)=>e.some(r=>t instanceof r);let KS,YS;function yY(){return KS||(KS=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function mY(){return YS||(YS=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const N9=new WeakMap,im=new WeakMap,D9=new WeakMap,J1=new WeakMap,jx=new WeakMap;function gY(t){const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{r(Uo(t.result)),i()},o=()=>{n(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&N9.set(r,t)}).catch(()=>{}),jx.set(e,t),e}function xY(t){if(im.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)});im.set(t,e)}let sm={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return im.get(t);if(e==="objectStoreNames")return t.objectStoreNames||D9.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Uo(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 bY(t){sm=t(sm)}function wY(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(X1(this),e,...r);return D9.set(n,e.sort?e.sort():[e]),Uo(n)}:mY().includes(t)?function(...e){return t.apply(X1(this),e),Uo(N9.get(this))}:function(...e){return Uo(t.apply(X1(this),e))}}function AY(t){return typeof t=="function"?wY(t):(t instanceof IDBTransaction&&xY(t),pY(t,yY())?new Proxy(t,sm):t)}function Uo(t){if(t instanceof IDBRequest)return gY(t);if(J1.has(t))return J1.get(t);const e=AY(t);return e!==t&&(J1.set(t,e),jx.set(e,t)),e}const X1=t=>jx.get(t);function EY(t,e,{blocked:r,upgrade:n,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),a=Uo(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Uo(o.result),l.oldVersion,l.newVersion,Uo(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),a.then(l=>{s&&l.addEventListener("close",()=>s()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}const SY=["get","getKey","getAll","getAllKeys","count"],CY=["put","add","delete","clear"],Z1=new Map;function QS(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Z1.get(e))return Z1.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,i=CY.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||SY.includes(r)))return;const s=async function(o,...a){const l=this.transaction(o,i?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(a.shift())),(await Promise.all([c[r](...a),i&&l.done]))[0]};return Z1.set(e,s),s}bY(t=>({...t,get:(e,r,n)=>QS(e,r)||t.get(e,r,n),has:(e,r)=>!!QS(e,r)||t.has(e,r)}));const kY=t=>{let e=t.httpHandler;return{setHttpHandler(r){e=r},httpHandler(){return e},updateHttpClientConfig(r,n){e.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return e.httpHandlerConfigs()}}},TY=t=>({httpHandler:t.httpHandler()});var JS;(function(t){t.HEADER="header",t.QUERY="query"})(JS||(JS={}));var XS;(function(t){t.HEADER="header",t.QUERY="query"})(XS||(XS={}));var yu;(function(t){t.HTTP="http",t.HTTPS="https"})(yu||(yu={}));var y0;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(y0||(y0={}));var ZS;(function(t){t[t.HEADER=0]="HEADER",t[t.TRAILER=1]="TRAILER"})(ZS||(ZS={}));const om="__smithy_context";var eC;(function(t){t.PROFILE="profile",t.SSO_SESSION="sso-session",t.SERVICES="services"})(eC||(eC={}));var tC;(function(t){t.HTTP_0_9="http/0.9",t.HTTP_1_0="http/1.0",t.TDS_8_0="tds/8.0"})(tC||(tC={}));class $i{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const r=new $i({...e,headers:{...e.headers}});return r.query&&(r.query=PY(r.query)),r}static isInstance(e){if(!e)return!1;const r=e;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query=="object"&&typeof r.headers=="object"}clone(){return $i.clone(this)}}function PY(t){return Object.keys(t).reduce((e,r)=>{const n=t[r];return{...e,[r]:Array.isArray(n)?[...n]:n}},{})}class m0{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const r=e;return typeof r.statusCode=="number"&&typeof r.headers=="object"}}const RY=t=>e=>async r=>{if(!$i.isInstance(r.request))return e(r);const{request:n}=r,{handlerProtocol:i=""}=t.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let s=n.hostname;n.port!=null&&(s+=`:${n.port}`),n.headers.host=s}return e(r)},_Y={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},IY=t=>({applyToStack:e=>{e.add(RY(t),_Y)}}),OY=()=>(t,e)=>async r=>{var n,i;try{const s=await t(r),{clientName:o,commandName:a,logger:l,dynamoDbDocumentClientOptions:c={}}=e,{overrideInputFilterSensitiveLog:f,overrideOutputFilterSensitiveLog:u}=c,d=f??e.inputFilterSensitiveLog,h=u??e.outputFilterSensitiveLog,{$metadata:p,...m}=s.output;return(n=l==null?void 0:l.info)==null||n.call(l,{clientName:o,commandName:a,input:d(r.input),output:h(m),metadata:p}),s}catch(s){const{clientName:o,commandName:a,logger:l,dynamoDbDocumentClientOptions:c={}}=e,{overrideInputFilterSensitiveLog:f}=c,u=f??e.inputFilterSensitiveLog;throw(i=l==null?void 0:l.error)==null||i.call(l,{clientName:o,commandName:a,input:u(r.input),error:s,metadata:s.$metadata}),s}},MY={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},NY=t=>({applyToStack:e=>{e.add(OY(),MY)}}),rC="X-Amzn-Trace-Id",DY="AWS_LAMBDA_FUNCTION_NAME",LY="_X_AMZN_TRACE_ID",jY=t=>e=>async r=>{const{request:n}=r;if(!$i.isInstance(n)||t.runtime!=="node"||n.headers.hasOwnProperty(rC))return e(r);const i=process.env[DY],s=process.env[LY],o=a=>typeof a=="string"&&a.length>0;return o(i)&&o(s)&&(n.headers[rC]=s),e({...r,request:n})},FY={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},BY=t=>({applyToStack:e=>{e.add(jY(t),FY)}});function $Y(t){return{...t,customUserAgent:typeof t.customUserAgent=="string"?[[t.customUserAgent]]:t.customUserAgent}}const UY=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),L9=t=>UY.test(t)||t.startsWith("[")&&t.endsWith("]"),zY=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Fx=(t,e=!1)=>{if(!e)return zY.test(t);const r=t.split(".");for(const n of r)if(!Fx(n))return!1;return!0},g0={},mu="endpoints";function Xo(t){return typeof t!="object"||t==null?t:"ref"in t?`$${Xo(t.ref)}`:"fn"in t?`${t.fn}(${(t.argv||[]).map(Xo).join(", ")})`:JSON.stringify(t,null,2)}class Yn extends Error{constructor(e){super(e),this.name="EndpointError"}}const VY=(t,e)=>t===e,HY=t=>{const e=t.split("."),r=[];for(const n of e){const i=n.indexOf("[");if(i!==-1){if(n.indexOf("]")!==n.length-1)throw new Yn(`Path: '${t}' does not end with ']'`);const s=n.slice(i+1,-1);if(Number.isNaN(parseInt(s)))throw new Yn(`Invalid array index: '${s}' in path: '${t}'`);i!==0&&r.push(n.slice(0,i)),r.push(s)}else r.push(n)}return r},j9=(t,e)=>HY(e).reduce((r,n)=>{if(typeof r!="object")throw new Yn(`Index '${n}' in '${e}' not found in '${JSON.stringify(t)}'`);return Array.isArray(r)?r[parseInt(n)]:r[n]},t),qY=t=>t!=null,WY=t=>!t,ep={[yu.HTTP]:80,[yu.HTTPS]:443},GY=t=>{const e=(()=>{try{if(t instanceof URL)return t;if(typeof t=="object"&&"hostname"in t){const{hostname:d,port:h,protocol:p="",path:m="",query:x={}}=t,b=new URL(`${p}//${d}${h?`:${h}`:""}${m}`);return b.search=Object.entries(x).map(([w,A])=>`${w}=${A}`).join("&"),b}return new URL(t)}catch{return null}})();if(!e)return console.error(`Unable to parse ${JSON.stringify(t)} as a whatwg URL.`),null;const r=e.href,{host:n,hostname:i,pathname:s,protocol:o,search:a}=e;if(a)return null;const l=o.slice(0,-1);if(!Object.values(yu).includes(l))return null;const c=L9(i),f=r.includes(`${n}:${ep[l]}`)||typeof t=="string"&&t.includes(`${n}:${ep[l]}`),u=`${n}${f?`:${ep[l]}`:""}`;return{scheme:l,authority:u,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:c}},KY=(t,e)=>t===e,YY=(t,e,r,n)=>e>=r||t.lengthencodeURIComponent(t).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),JY={booleanEquals:VY,getAttr:j9,isSet:qY,isValidHostLabel:Fx,not:WY,parseURL:GY,stringEquals:KY,substring:YY,uriEncode:QY},F9=(t,e)=>{const r=[],n={...e.endpointParams,...e.referenceRecord};let i=0;for(;i({...e.endpointParams,...e.referenceRecord})[t],kv=(t,e,r)=>{if(typeof t=="string")return F9(t,r);if(t.fn)return B9(t,r);if(t.ref)return XY(t,r);throw new Yn(`'${e}': ${String(t)} is not a string, function or reference.`)},B9=({fn:t,argv:e},r)=>{const n=e.map(s=>["boolean","number"].includes(typeof s)?s:kv(s,"arg",r)),i=t.split(".");return i[0]in g0&&i[1]!=null?g0[i[0]][i[1]](...n):JY[t](...n)},ZY=({assign:t,...e},r)=>{var i,s;if(t&&t in r.referenceRecord)throw new Yn(`'${t}' is already defined in Reference Record.`);const n=B9(e,r);return(s=(i=r.logger)==null?void 0:i.debug)==null||s.call(i,`${mu} evaluateCondition: ${Xo(e)} = ${Xo(n)}`),{result:n===""?!0:!!n,...t!=null&&{toAssign:{name:t,value:n}}}},Bx=(t=[],e)=>{var n,i;const r={};for(const s of t){const{result:o,toAssign:a}=ZY(s,{...e,referenceRecord:{...e.referenceRecord,...r}});if(!o)return{result:o};a&&(r[a.name]=a.value,(i=(n=e.logger)==null?void 0:n.debug)==null||i.call(n,`${mu} assign: ${a.name} := ${Xo(a.value)}`))}return{result:!0,referenceRecord:r}},eQ=(t,e)=>Object.entries(t).reduce((r,[n,i])=>({...r,[n]:i.map(s=>{const o=kv(s,"Header value entry",e);if(typeof o!="string")throw new Yn(`Header '${n}' value '${o}' is not a string`);return o})}),{}),$9=(t,e)=>{if(Array.isArray(t))return t.map(r=>$9(r,e));switch(typeof t){case"string":return F9(t,e);case"object":if(t===null)throw new Yn(`Unexpected endpoint property: ${t}`);return U9(t,e);case"boolean":return t;default:throw new Yn(`Unexpected endpoint property type: ${typeof t}`)}},U9=(t,e)=>Object.entries(t).reduce((r,[n,i])=>({...r,[n]:$9(i,e)}),{}),tQ=(t,e)=>{const r=kv(t,"Endpoint URL",e);if(typeof r=="string")try{return new URL(r)}catch(n){throw console.error(`Failed to construct URL with ${r}`,n),n}throw new Yn(`Endpoint URL must be a string, got ${typeof r}`)},rQ=(t,e)=>{var f,u;const{conditions:r,endpoint:n}=t,{result:i,referenceRecord:s}=Bx(r,e);if(!i)return;const o={...e,referenceRecord:{...e.referenceRecord,...s}},{url:a,properties:l,headers:c}=n;return(u=(f=e.logger)==null?void 0:f.debug)==null||u.call(f,`${mu} Resolving endpoint from template: ${Xo(n)}`),{...c!=null&&{headers:eQ(c,o)},...l!=null&&{properties:U9(l,o)},url:tQ(a,o)}},nQ=(t,e)=>{const{conditions:r,error:n}=t,{result:i,referenceRecord:s}=Bx(r,e);if(i)throw new Yn(kv(n,"Error",{...e,referenceRecord:{...e.referenceRecord,...s}}))},iQ=(t,e)=>{const{conditions:r,rules:n}=t,{result:i,referenceRecord:s}=Bx(r,e);if(i)return z9(n,{...e,referenceRecord:{...e.referenceRecord,...s}})},z9=(t,e)=>{for(const r of t)if(r.type==="endpoint"){const n=rQ(r,e);if(n)return n}else if(r.type==="error")nQ(r,e);else if(r.type==="tree"){const n=iQ(r,e);if(n)return n}else throw new Yn(`Unknown endpoint rule: ${r}`);throw new Yn("Rules evaluation failed")},sQ=(t,e)=>{var c,f,u,d,h;const{endpointParams:r,logger:n}=e,{parameters:i,rules:s}=t;(f=(c=e.logger)==null?void 0:c.debug)==null||f.call(c,`${mu} Initial EndpointParams: ${Xo(r)}`);const o=Object.entries(i).filter(([,p])=>p.default!=null).map(([p,m])=>[p,m.default]);if(o.length>0)for(const[p,m]of o)r[p]=r[p]??m;const a=Object.entries(i).filter(([,p])=>p.required).map(([p])=>p);for(const p of a)if(r[p]==null)throw new Yn(`Missing required parameter: '${p}'`);const l=z9(s,{endpointParams:r,logger:n,referenceRecord:{}});if((u=e.endpointParams)!=null&&u.Endpoint)try{const p=new URL(e.endpointParams.Endpoint),{protocol:m,port:x}=p;l.url.protocol=m,l.url.port=x}catch{}return(h=(d=e.logger)==null?void 0:d.debug)==null||h.call(d,`${mu} Resolved endpoint: ${Xo(l)}`),l},V9=(t,e=!1)=>{if(e){for(const r of t.split("."))if(!V9(r))return!1;return!0}return!(!Fx(t)||t.length<3||t.length>63||t!==t.toLowerCase()||L9(t))},oQ=t=>{const e=t.split(":");if(e.length<6)return null;const[r,n,i,s,o,...a]=e;return r!=="arn"||n===""||i===""||a[0]===""?null:{partition:n,service:i,region:s,accountId:o,resourceId:a[0].includes("/")?a[0].split("/"):a}},aQ=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],lQ="1.1",cQ={partitions:aQ,version:lQ};let fQ=cQ;const uQ=t=>{const{partitions:e}=fQ;for(const n of e){const{regions:i,outputs:s}=n;for(const[o,a]of Object.entries(i))if(o===t)return{...s,...a}}for(const n of e){const{regionRegex:i,outputs:s}=n;if(new RegExp(i).test(t))return{...s}}const r=e.find(n=>n.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},H9={isVirtualHostableS3Bucket:V9,parseArn:oQ,partition:uQ};g0.aws=H9;const nC="user-agent",tp="x-amz-user-agent",iC=" ",rp="/",dQ=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,hQ=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,sC="-",vQ=t=>(e,r)=>async n=>{var u,d;const{request:i}=n;if(!$i.isInstance(i))return e(n);const{headers:s}=i,o=((u=r==null?void 0:r.userAgent)==null?void 0:u.map(np))||[],a=(await t.defaultUserAgentProvider()).map(np),l=((d=t==null?void 0:t.customUserAgent)==null?void 0:d.map(np))||[],c=[].concat([...a,...o,...l]).join(iC),f=[...a.filter(h=>h.startsWith("aws-sdk-")),...l].join(iC);return t.runtime!=="browser"?(f&&(s[tp]=s[tp]?`${s[nC]} ${f}`:f),s[nC]=c):s[tp]=c,e({...n,request:i})},np=t=>{var o;const e=t[0].split(rp).map(a=>a.replace(dQ,sC)).join(rp),r=(o=t[1])==null?void 0:o.replace(hQ,sC),n=e.indexOf(rp),i=e.substring(0,n);let s=e.substring(n+1);return i==="api"&&(s=s.toLowerCase()),[i,s,r].filter(a=>a&&a.length>0).reduce((a,l,c)=>{switch(c){case 0:return l;case 1:return`${a}/${l}`;default:return`${a}#${l}`}},"")},pQ={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},yQ=t=>({applyToStack:e=>{e.add(vQ(t),pQ)}});var oC;(function(t){t.ENV="env",t.CONFIG="shared config entry"})(oC||(oC={}));const mQ=!1,gQ=!1,Tv=t=>t[om]||(t[om]={}),zo=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},q9=t=>typeof t=="string"&&(t.startsWith("fips-")||t.endsWith("-fips")),aC=t=>q9(t)?["fips-aws-global","aws-fips"].includes(t)?"us-east-1":t.replace(/fips-(dkr-|prod-)?|-fips/,""):t,xQ=t=>{const{region:e,useFipsEndpoint:r}=t;if(!e)throw new Error("Region is missing");return{...t,region:async()=>{if(typeof e=="string")return aC(e);const n=await e();return aC(n)},useFipsEndpoint:async()=>{const n=typeof e=="string"?e:await e();return q9(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()}}};function bQ(t){const e=new Map;for(const r of t)e.set(r.schemeId,r);return e}const wQ=(t,e)=>(r,n)=>async i=>{var c;const s=t.httpAuthSchemeProvider(await e.httpAuthSchemeParametersProvider(t,n,i.input)),o=bQ(t.httpAuthSchemes),a=Tv(n),l=[];for(const f of s){const u=o.get(f.schemeId);if(!u){l.push(`HttpAuthScheme \`${f.schemeId}\` was not enabled for this service.`);continue}const d=u.identityProvider(await e.identityProviderConfigProvider(t));if(!d){l.push(`HttpAuthScheme \`${f.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:h={},signingProperties:p={}}=((c=f.propertiesExtractor)==null?void 0:c.call(f,t,n))||{};f.identityProperties=Object.assign(f.identityProperties||{},h),f.signingProperties=Object.assign(f.signingProperties||{},p),a.selectedHttpAuthScheme={httpAuthOption:f,identity:await d(f.identityProperties),signer:u.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(l.join(` -`));return r(i)},AQ=async t=>{const e=(t==null?void 0:t.Bucket)||"";if(typeof t.Bucket=="string"&&(t.Bucket=e.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),TQ(e)){if(t.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!kQ(e)||e.indexOf(".")!==-1&&!String(t.Endpoint).startsWith("http:")||e.toLowerCase()!==e||e.length<3)&&(t.ForcePathStyle=!0);return t.DisableMultiRegionAccessPoints&&(t.disableMultiRegionAccessPoints=!0,t.DisableMRAP=!0),t},EQ=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,SQ=/(\d+\.){3}\d+/,CQ=/\.\./,kQ=t=>EQ.test(t)&&!SQ.test(t)&&!CQ.test(t),TQ=t=>{const[e,r,n,,,i]=t.split(":"),s=e==="arn"&&t.split(":").length>=6,o=!!(s&&r&&n&&i);if(s&&!o)throw new Error(`Invalid ARN: ${t} was an invalid ARN.`);return o},PQ=(t,e,r)=>{const n=async()=>{const i=r[t]??r[e];return typeof i=="function"?i():i};return t==="credentialScope"||e==="CredentialScope"?async()=>{const i=typeof r.credentials=="function"?await r.credentials():r.credentials;return(i==null?void 0:i.credentialScope)??(i==null?void 0:i.CredentialScope)}:t==="endpoint"||e==="endpoint"?async()=>{const i=await n();if(i&&typeof i=="object"){if("url"in i)return i.url.href;if("hostname"in i){const{protocol:s,hostname:o,port:a,path:l}=i;return`${s}//${o}${a?":"+a:""}${l}`}}return i}:n},RQ=async t=>{};function _Q(t){const e={};if(t=t.replace(/^\?/,""),t)for(const r of t.split("&")){let[n,i=null]=r.split("=");n=decodeURIComponent(n),i&&(i=decodeURIComponent(i)),n in e?Array.isArray(e[n])?e[n].push(i):e[n]=[e[n],i]:e[n]=i}return e}const x0=t=>{if(typeof t=="string")return x0(new URL(t));const{hostname:e,pathname:r,port:n,protocol:i,search:s}=t;let o;return s&&(o=_Q(s)),{hostname:e,port:n?parseInt(n):void 0,protocol:i,path:r,query:o}},W9=t=>typeof t=="object"?"url"in t?x0(t.url):t:x0(t),IQ=async(t,e,r,n)=>{if(!r.endpoint){const o=await RQ(r.serviceId||"");o&&(r.endpoint=()=>Promise.resolve(W9(o)))}const i=await OQ(t,e,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(i,n)},OQ=async(t,e,r)=>{var s;const n={},i=((s=e==null?void 0:e.getEndpointParameterInstructions)==null?void 0:s.call(e))||{};for(const[o,a]of Object.entries(i))switch(a.type){case"staticContextParams":n[o]=a.value;break;case"contextParams":n[o]=t[a.name];break;case"clientContextParams":case"builtInParams":n[o]=await PQ(a.name,o,r)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(i).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await AQ(n),n},MQ=({config:t,instructions:e})=>(r,n)=>async i=>{var a,l,c;const s=await IQ(i.input,{getEndpointParameterInstructions(){return e}},{...t},n);n.endpointV2=s,n.authSchemes=(a=s.properties)==null?void 0:a.authSchemes;const o=(l=n.authSchemes)==null?void 0:l[0];if(o){n.signing_region=o.signingRegion,n.signing_service=o.signingName;const f=Tv(n),u=(c=f==null?void 0:f.selectedHttpAuthScheme)==null?void 0:c.httpAuthOption;u&&(u.signingProperties=Object.assign(u.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return r({...i})},NQ=(t,e)=>r=>async n=>{const{response:i}=await r(n);try{const s=await e(i,t);return{response:i,output:s}}catch(s){if(Object.defineProperty(s,"$response",{value:i}),!("$metadata"in s)){const o="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";s.message+=` - `+o,typeof s.$responseBodyText<"u"&&s.$response&&(s.$response.body=s.$responseBodyText)}throw s}},DQ=(t,e)=>(r,n)=>async i=>{var a;const s=(a=n.endpointV2)!=null&&a.url&&t.urlParser?async()=>t.urlParser(n.endpointV2.url):t.endpoint;if(!s)throw new Error("No valid endpoint provider available.");const o=await e(i.input,{...t,endpoint:s});return r({...i,request:o})},LQ={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},$x={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Ux(t,e,r){return{applyToStack:n=>{n.add(NQ(t,r),LQ),n.add(DQ(t,e),$x)}}}const G9={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:$x.name},zx=(t,e)=>({applyToStack:r=>{r.addRelativeTo(MQ({config:t,instructions:e}),G9)}}),jQ=t=>{const e=t.tls??!0,{endpoint:r}=t,n=r!=null?async()=>W9(await zo(r)()):void 0;return{...t,endpoint:n,tls:e,isCustomEndpoint:!!r,useDualstackEndpoint:zo(t.useDualstackEndpoint??!1),useFipsEndpoint:zo(t.useFipsEndpoint??!1)}},FQ={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:G9.name},BQ=(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(wQ(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),FQ)}});$x.name;const $Q=t=>e=>{throw e},UQ=(t,e)=>{},zQ=t=>(e,r)=>async n=>{if(!$i.isInstance(n.request))return e(n);const s=Tv(r).selectedHttpAuthScheme;if(!s)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:o={}},identity:a,signer:l}=s,c=await e({...n,request:await l.sign(n.request,a,o)}).catch((l.errorHandler||$Q)(o));return(l.successHandler||UQ)(c.response,o),c};var hc;(function(t){t.STANDARD="standard",t.ADAPTIVE="adaptive"})(hc||(hc={}));const b0=3,VQ=hc.STANDARD,HQ=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],qQ=["TimeoutError","RequestTimeout","RequestTimeoutException"],WQ=[500,502,503,504],GQ=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],KQ=t=>{var e;return(e=t.$metadata)==null?void 0:e.clockSkewCorrected},K9=t=>{var e,r;return((e=t.$metadata)==null?void 0:e.httpStatusCode)===429||HQ.includes(t.name)||((r=t.$retryable)==null?void 0:r.throttling)==!0},Y9=t=>{var e;return KQ(t)||qQ.includes(t.name)||GQ.includes((t==null?void 0:t.code)||"")||WQ.includes(((e=t.$metadata)==null?void 0:e.httpStatusCode)||0)},YQ=t=>{var e;if(((e=t.$metadata)==null?void 0:e.httpStatusCode)!==void 0){const r=t.$metadata.httpStatusCode;return 500<=r&&r<=599&&!Y9(t)}return!1};class QQ{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(e==null?void 0:e.beta)??.7,this.minCapacity=(e==null?void 0:e.minCapacity)??1,this.minFillRate=(e==null?void 0:e.minFillRate)??.5,this.scaleConstant=(e==null?void 0:e.scaleConstant)??.4,this.smooth=(e==null?void 0:e.smooth)??.8;const r=this.getCurrentTimeInSeconds();this.lastThrottleTime=r,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const r=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise(n=>setTimeout(n,r))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}const r=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+r),this.lastTimestamp=e}updateClientSendingRate(e){let r;if(this.updateMeasuredRate(),K9(e)){const i=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=i,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(i),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),r=Math.floor(e*2)/2;if(this.requestCount++,r>this.lastTxRateBucket){const n=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(n*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPrecise(e){return parseFloat(e.toFixed(8))}}const am=100,Q9=20*1e3,JQ=500,lC=500,XQ=5,ZQ=10,eJ=1,tJ="amz-sdk-invocation-id",rJ="amz-sdk-request",nJ=()=>{let t=am;return{computeNextBackoffDelay:n=>Math.floor(Math.min(Q9,Math.random()*2**n*t)),setDelayBase:n=>{t=n}}},cC=({retryDelay:t,retryCount:e,retryCost:r})=>({getRetryCount:()=>e,getRetryDelay:()=>Math.min(Q9,t),getRetryCost:()=>r});class J9{constructor(e){this.maxAttempts=e,this.mode=hc.STANDARD,this.capacity=lC,this.retryBackoffStrategy=nJ(),this.maxAttemptsProvider=typeof e=="function"?e:async()=>e}async acquireInitialRetryToken(e){return cC({retryDelay:am,retryCount:0})}async refreshRetryTokenForRetry(e,r){const n=await this.getMaxAttempts();if(this.shouldRetry(e,r,n)){const i=r.errorType;this.retryBackoffStrategy.setDelayBase(i==="THROTTLING"?JQ:am);const s=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),o=r.retryAfterHint?Math.max(r.retryAfterHint.getTime()-Date.now()||0,s):s,a=this.getCapacityCost(i);return this.capacity-=a,cC({retryDelay:o,retryCount:e.getRetryCount()+1,retryCost:a})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(lC,this.capacity+(e.getRetryCost()??eJ))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${b0}`),b0}}shouldRetry(e,r,n){return e.getRetryCount()+1=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(e){return e==="TRANSIENT"?ZQ:XQ}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class iJ{constructor(e,r){this.maxAttemptsProvider=e,this.mode=hc.ADAPTIVE;const{rateLimiter:n}=r??{};this.rateLimiter=n??new QQ,this.standardRetryStrategy=new J9(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,r){return this.rateLimiter.updateClientSendingRate(r),this.standardRetryStrategy.refreshRetryTokenForRetry(e,r)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}let Rd;const sJ=new Uint8Array(16);function oJ(){if(!Rd&&(Rd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Rd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Rd(sJ)}const Vr=[];for(let t=0;t<256;++t)Vr.push((t+256).toString(16).slice(1));function aJ(t,e=0){return Vr[t[e+0]]+Vr[t[e+1]]+Vr[t[e+2]]+Vr[t[e+3]]+"-"+Vr[t[e+4]]+Vr[t[e+5]]+"-"+Vr[t[e+6]]+Vr[t[e+7]]+"-"+Vr[t[e+8]]+Vr[t[e+9]]+"-"+Vr[t[e+10]]+Vr[t[e+11]]+Vr[t[e+12]]+Vr[t[e+13]]+Vr[t[e+14]]+Vr[t[e+15]]}const lJ=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),fC={randomUUID:lJ};function cJ(t,e,r){if(fC.randomUUID&&!e&&!t)return fC.randomUUID();t=t||{};const n=t.random||(t.rng||oJ)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let i=0;i<16;++i)e[r+i]=n[i];return e}return aJ(n)}const fJ=t=>t instanceof Error?t:t instanceof Object?Object.assign(new Error,t):typeof t=="string"?new Error(t):new Error(`AWS SDK error wrapper for ${t}`),uJ=t=>{const{retryStrategy:e}=t,r=zo(t.maxAttempts??b0);return{...t,maxAttempts:r,retryStrategy:async()=>e||(await zo(t.retryMode)()===hc.ADAPTIVE?new iJ(r):new J9(r))}};class X9{trace(){}debug(){}info(){}warn(){}error(){}}const ua=(t,e)=>{const r=[];if(t&&r.push(t),e)for(const n of e)r.push(n);return r},po=(t,e)=>`${t||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`,w0=()=>{let t=[],e=[],r=!1;const n=new Set,i=u=>u.sort((d,h)=>uC[h.step]-uC[d.step]||dC[h.priority||"normal"]-dC[d.priority||"normal"]),s=u=>{let d=!1;const h=p=>{const m=ua(p.name,p.aliases);if(m.includes(u)){d=!0;for(const x of m)n.delete(x);return!1}return!0};return t=t.filter(h),e=e.filter(h),d},o=u=>{let d=!1;const h=p=>{if(p.middleware===u){d=!0;for(const m of ua(p.name,p.aliases))n.delete(m);return!1}return!0};return t=t.filter(h),e=e.filter(h),d},a=u=>{var d;return t.forEach(h=>{u.add(h.middleware,{...h})}),e.forEach(h=>{u.addRelativeTo(h.middleware,{...h})}),(d=u.identifyOnResolve)==null||d.call(u,f.identifyOnResolve()),u},l=u=>{const d=[];return u.before.forEach(h=>{h.before.length===0&&h.after.length===0?d.push(h):d.push(...l(h))}),d.push(u),u.after.reverse().forEach(h=>{h.before.length===0&&h.after.length===0?d.push(h):d.push(...l(h))}),d},c=(u=!1)=>{const d=[],h=[],p={};return t.forEach(x=>{const b={...x,before:[],after:[]};for(const w of ua(b.name,b.aliases))p[w]=b;d.push(b)}),e.forEach(x=>{const b={...x,before:[],after:[]};for(const w of ua(b.name,b.aliases))p[w]=b;h.push(b)}),h.forEach(x=>{if(x.toMiddleware){const b=p[x.toMiddleware];if(b===void 0){if(u)return;throw new Error(`${x.toMiddleware} is not found when adding ${po(x.name,x.aliases)} middleware ${x.relation} ${x.toMiddleware}`)}x.relation==="after"&&b.after.push(x),x.relation==="before"&&b.before.push(x)}}),i(d).map(l).reduce((x,b)=>(x.push(...b),x),[])},f={add:(u,d={})=>{const{name:h,override:p,aliases:m}=d,x={step:"initialize",priority:"normal",middleware:u,...d},b=ua(h,m);if(b.length>0){if(b.some(w=>n.has(w))){if(!p)throw new Error(`Duplicate middleware name '${po(h,m)}'`);for(const w of b){const A=t.findIndex(N=>{var I;return N.name===w||((I=N.aliases)==null?void 0:I.some(F=>F===w))});if(A===-1)continue;const R=t[A];if(R.step!==x.step||x.priority!==R.priority)throw new Error(`"${po(R.name,R.aliases)}" middleware with ${R.priority} priority in ${R.step} step cannot be overridden by "${po(h,m)}" middleware with ${x.priority} priority in ${x.step} step.`);t.splice(A,1)}}for(const w of b)n.add(w)}t.push(x)},addRelativeTo:(u,d)=>{const{name:h,override:p,aliases:m}=d,x={middleware:u,...d},b=ua(h,m);if(b.length>0){if(b.some(w=>n.has(w))){if(!p)throw new Error(`Duplicate middleware name '${po(h,m)}'`);for(const w of b){const A=e.findIndex(N=>{var I;return N.name===w||((I=N.aliases)==null?void 0:I.some(F=>F===w))});if(A===-1)continue;const R=e[A];if(R.toMiddleware!==x.toMiddleware||R.relation!==x.relation)throw new Error(`"${po(R.name,R.aliases)}" middleware ${R.relation} "${R.toMiddleware}" middleware cannot be overridden by "${po(h,m)}" middleware ${x.relation} "${x.toMiddleware}" middleware.`);e.splice(A,1)}}for(const w of b)n.add(w)}e.push(x)},clone:()=>a(w0()),use:u=>{u.applyToStack(f)},remove:u=>typeof u=="string"?s(u):o(u),removeByTag:u=>{let d=!1;const h=p=>{const{tags:m,name:x,aliases:b}=p;if(m&&m.includes(u)){const w=ua(x,b);for(const A of w)n.delete(A);return d=!0,!1}return!0};return t=t.filter(h),e=e.filter(h),d},concat:u=>{var h;const d=a(w0());return d.use(u),d.identifyOnResolve(r||d.identifyOnResolve()||(((h=u.identifyOnResolve)==null?void 0:h.call(u))??!1)),d},applyToStack:a,identify:()=>c(!0).map(u=>{const d=u.step??u.relation+" "+u.toMiddleware;return po(u.name,u.aliases)+" - "+d}),identifyOnResolve(u){return typeof u=="boolean"&&(r=u),r},resolve:(u,d)=>{for(const h of c().map(p=>p.middleware).reverse())u=h(u,d);return r&&console.log(f.identify()),u}};return f},uC={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},dC={high:3,normal:2,low:1};class dJ{constructor(e){this.middlewareStack=w0(),this.config=e}send(e,r,n){const i=typeof r!="function"?r:void 0,s=typeof r=="function"?r:n,o=e.resolveMiddleware(this.middlewareStack,this.config,i);if(s)o(e).then(a=>s(null,a.output),a=>s(a)).catch(()=>{});else return o(e).then(a=>a.output)}destroy(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()}}const Zo={},Mc=new Array(64);for(let t=0,e="A".charCodeAt(0),r="Z".charCodeAt(0);t+e<=r;t++){const n=String.fromCharCode(t+e);Zo[n]=t,Mc[t]=n}for(let t=0,e="a".charCodeAt(0),r="z".charCodeAt(0);t+e<=r;t++){const n=String.fromCharCode(t+e),i=t+26;Zo[n]=i,Mc[i]=n}for(let t=0;t<10;t++){Zo[t.toString(10)]=t+52;const e=t.toString(10),r=t+52;Zo[e]=r,Mc[r]=e}Zo["+"]=62;Mc[62]="+";Zo["/"]=63;Mc[63]="/";const Yl=6,If=8,hJ=63,Vx=t=>{let e=t.length/4*3;t.slice(-2)==="=="?e-=2:t.slice(-1)==="="&&e--;const r=new ArrayBuffer(e),n=new DataView(r);for(let i=0;i>=Yl;const a=i/4*3;s>>=o%If;const l=Math.floor(o/If);for(let c=0;c>f)}}return new Uint8Array(r)},vc=t=>new TextEncoder().encode(t),Of=t=>typeof t=="string"?vc(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),Z9=t=>{if(typeof t=="string")return t;if(typeof t!="object"||typeof t.byteOffset!="number"||typeof t.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(t)};function eT(t){let e;typeof t=="string"?e=vc(t):e=t;const r=typeof e=="object"&&typeof e.length=="number",n=typeof e=="object"&&typeof e.byteOffset=="number"&&typeof e.byteLength=="number";if(!r&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let s=0;s>f]}i+="==".slice(0,4-l)}return i}function vJ(t,e="utf-8"){return e==="base64"?eT(t):Z9(t)}function pJ(t,e){return e==="base64"?Da.mutate(Vx(t)):Da.mutate(vc(t))}class Da extends Uint8Array{static fromString(e,r="utf-8"){switch(typeof e){case"string":return pJ(e,r);default:throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}}static mutate(e){return Object.setPrototypeOf(e,Da.prototype),e}transformToString(e="utf-8"){return vJ(this,e)}}const Ro=t=>encodeURIComponent(t).replace(/[!'()*]/g,yJ),yJ=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function mJ(t){const e=[];for(let r of Object.keys(t).sort()){const n=t[r];if(r=Ro(r),Array.isArray(n))for(let i=0,s=n.length;i{t&&setTimeout(()=>{const n=new Error(`Request did not complete within ${t} ms`);n.name="TimeoutError",r(n)},t)})}const ip={supported:void 0};class Hx{static create(e){return typeof(e==null?void 0:e.handle)=="function"?e:new Hx(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(r=>r||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),ip.supported===void 0&&(ip.supported=typeof Request<"u"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(e,{abortSignal:r}={}){this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,i=this.config.keepAlive===!0,s=this.config.credentials;if(r!=null&&r.aborted){const b=new Error("Request aborted");return b.name="AbortError",Promise.reject(b)}let o=e.path;const a=mJ(e.query||{});a&&(o+=`?${a}`),e.fragment&&(o+=`#${e.fragment}`);let l="";if(e.username!=null||e.password!=null){const b=e.username??"",w=e.password??"";l=`${b}:${w}@`}const{port:c,method:f}=e,u=`${e.protocol}//${l}${e.hostname}${c?`:${c}`:""}${o}`,d=f==="GET"||f==="HEAD"?void 0:e.body,h={body:d,headers:new Headers(e.headers),method:f,credentials:s};d&&(h.duplex="half"),typeof AbortController<"u"&&(h.signal=r),ip.supported&&(h.keepalive=i);let p=null;const m=new Request(u,h),x=[fetch(m).then(b=>{const w=b.headers,A={};for(const N of w.entries())A[N[0]]=N[1];return b.body!=null?{response:new m0({headers:A,reason:b.statusText,statusCode:b.status,body:b.body})}:b.blob().then(N=>({response:new m0({headers:A,reason:b.statusText,statusCode:b.status,body:N})}))}),gJ(n)];return r&&x.push(new Promise((b,w)=>{const A=()=>{const R=new Error("Request aborted");R.name="AbortError",w(R)};if(typeof r.addEventListener=="function"){const R=r;R.addEventListener("abort",A,{once:!0}),p=()=>R.removeEventListener("abort",A)}else r.onabort=A})),Promise.race(x).finally(p)}updateHttpClientConfig(e,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=r,n))}httpHandlerConfigs(){return this.config??{}}}const xJ=t=>typeof Blob=="function"&&t instanceof Blob?bJ(t):wJ(t);async function bJ(t){const e=await AJ(t),r=Vx(e);return new Uint8Array(r)}async function wJ(t){const e=[],r=t.getReader();let n=!1,i=0;for(;!n;){const{done:a,value:l}=await r.read();l&&(e.push(l),i+=l.length),n=a}const s=new Uint8Array(i);let o=0;for(const a of e)s.set(a,o),o+=a.length;return s}function AJ(t){return new Promise((e,r)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));const i=n.result??"",s=i.indexOf(","),o=s>-1?s+1:i.length;e(i.substring(o))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(t)})}const tT={},lm={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),tT[t]=e,lm[e]=t}function EJ(t){if(t.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const e=new Uint8Array(t.length/2);for(let r=0;r{if(t instanceof Uint8Array)return Da.mutate(t);if(!t)return Da.mutate(new Uint8Array);const r=e.streamCollector(t);return Da.mutate(await r)};class Pv{constructor(){this.middlewareStack=w0()}static classBuilder(){return new CJ}resolveMiddlewareWithContext(e,r,n,{middlewareFn:i,clientName:s,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:l,smithyContext:c,additionalContext:f,CommandCtor:u}){for(const x of i.bind(this)(u,e,r,n))this.middlewareStack.use(x);const d=e.concat(this.middlewareStack),{logger:h}=r,p={logger:h,clientName:s,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:l,[om]:{...c},...f},{requestHandler:m}=r;return d.resolve(x=>m.handle(x.request,n||{}),p)}}class CJ{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,r,n={}){return this._smithyContext={service:e,operation:r,...n},this}c(e={}){return this._additionalContext=e,this}n(e,r){return this._clientName=e,this._commandName=r,this}f(e=n=>n,r=n=>n){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=r,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let r;return r=class extends Pv{static getEndpointParameterInstructions(){return e._ep}constructor(...[n]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=n??{},e._init(this)}resolveMiddleware(n,i,s){return this.resolveMiddlewareWithContext(n,i,s,{CommandCtor:r,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Br="***SensitiveInformation***";class qx extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,qx.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}const je=(t,e={})=>{Object.entries(e).filter(([,n])=>n!==void 0).forEach(([n,i])=>{(t[n]==null||t[n]==="")&&(t[n]=i)});const r=t.message||t.Message||"UnknownError";return t.message=r,delete t.Message,t},kJ=({output:t,parsedBody:e,exceptionCtor:r,errorCode:n})=>{const i=PJ(t),s=i.httpStatusCode?i.httpStatusCode+"":void 0,o=new r({name:(e==null?void 0:e.code)||(e==null?void 0:e.Code)||n||s||"UnknownError",$fault:"client",$metadata:i});throw je(o,e)},TJ=t=>({output:e,parsedBody:r,errorCode:n})=>{kJ({output:e,parsedBody:r,exceptionCtor:t,errorCode:n})},PJ=t=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}),RJ=t=>{switch(t){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},_J=t=>{const e=[];for(const r in y0){const n=y0[r];t[n]!==void 0&&e.push({algorithmId:()=>n,checksumConstructor:()=>t[n]})}return{_checksumAlgorithms:e,addChecksumAlgorithm(r){this._checksumAlgorithms.push(r)},checksumAlgorithms(){return this._checksumAlgorithms}}},IJ=t=>{const e={};return t.checksumAlgorithms().forEach(r=>{e[r.algorithmId()]=r.checksumConstructor()}),e},OJ=t=>{let e=t.retryStrategy;return{setRetryStrategy(r){e=r},retryStrategy(){return e}}},MJ=t=>{const e={};return e.retryStrategy=t.retryStrategy(),e},NJ=t=>({..._J(t),...OJ(t)}),DJ=t=>({...IJ(t),...MJ(t)}),cm=function(){const t=Object.getPrototypeOf(this).constructor,e=Function.bind.apply(String,[null,...arguments]),r=new e;return Object.setPrototypeOf(r,t.prototype),r};cm.prototype=Object.create(String.prototype,{constructor:{value:cm,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(cm,String);const _e=t=>{if(t==null)return{};if(Array.isArray(t))return t.filter(e=>e!=null).map(_e);if(typeof t=="object"){const e={};for(const r of Object.keys(t))t[r]!=null&&(e[r]=_e(t[r]));return e}return t},LJ=t=>(t==null?void 0:t.body)instanceof ReadableStream,jJ=t=>(e,r)=>async n=>{var o;let i=await t.retryStrategy();const s=await t.maxAttempts();if(FJ(i)){i=i;let a=await i.acquireInitialRetryToken(r.partition_id),l=new Error,c=0,f=0;const{request:u}=n,d=$i.isInstance(u);for(d&&(u.headers[tJ]=cJ());;)try{d&&(u.headers[rJ]=`attempt=${c+1}; max=${s}`);const{response:h,output:p}=await e(n);return i.recordSuccess(a),p.$metadata.attempts=c+1,p.$metadata.totalRetryDelay=f,{response:h,output:p}}catch(h){const p=BJ(h);if(l=fJ(h),d&&LJ(u))throw(o=r.logger instanceof X9?console:r.logger)==null||o.warn("An error was encountered in a non-retryable streaming request."),l;try{a=await i.refreshRetryTokenForRetry(a,p)}catch{throw l.$metadata||(l.$metadata={}),l.$metadata.attempts=c+1,l.$metadata.totalRetryDelay=f,l}c=a.getRetryCount();const m=a.getRetryDelay();f+=m,await new Promise(x=>setTimeout(x,m))}}else return i=i,i!=null&&i.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(e,n)},FJ=t=>typeof t.acquireInitialRetryToken<"u"&&typeof t.refreshRetryTokenForRetry<"u"&&typeof t.recordSuccess<"u",BJ=t=>{const e={error:t,errorType:$J(t)},r=zJ(t.$response);return r&&(e.retryAfterHint=r),e},$J=t=>K9(t)?"THROTTLING":Y9(t)?"TRANSIENT":YQ(t)?"SERVER_ERROR":"CLIENT_ERROR",rT={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},UJ=t=>({applyToStack:e=>{e.add(jJ(t),rT)}}),zJ=t=>{if(!m0.isInstance(t))return;const e=Object.keys(t.headers).find(s=>s.toLowerCase()==="retry-after");if(!e)return;const r=t.headers[e],n=Number(r);return Number.isNaN(n)?new Date(r):new Date(n*1e3)},VJ={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:rT.name},HJ=t=>({applyToStack:e=>{e.addRelativeTo(zQ(),VJ)}});class qJ{constructor(e){this.authSchemes=new Map;for(const[r,n]of Object.entries(e))n!==void 0&&this.authSchemes.set(r,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}class WJ{async sign(e,r,n){return e}}const GJ=t=>e=>nT(e)&&e.expiration.getTime()-Date.now()t.expiration!==void 0,QJ=(t,e,r)=>{if(t===void 0)return;const n=typeof t!="function"?async()=>Promise.resolve(t):t;let i,s,o,a=!1;const l=async c=>{s||(s=n(c));try{i=await s,o=!0,a=!1}finally{s=void 0}return i};return e===void 0?async c=>((!o||c!=null&&c.forceRefresh)&&(i=await l(c)),i):async c=>((!o||c!=null&&c.forceRefresh)&&(i=await l(c)),a?i:r(i)?(e(i)&&await l(c),i):(a=!0,i))},_d=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},hC="content-length";function JJ(t){return e=>async r=>{const n=r.request;if($i.isInstance(n)){const{body:i,headers:s}=n;if(i&&Object.keys(s).map(o=>o.toLowerCase()).indexOf(hC)===-1)try{const o=t(i);n.headers={...n.headers,[hC]:String(o)}}catch{}}return e({...r,request:n})}}const XJ={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},ZJ=t=>({applyToStack:e=>{e.add(JJ(t.bodyLengthChecker),XJ)}}),vC=t=>{var e,r;return m0.isInstance(t)?((e=t.headers)==null?void 0:e.date)??((r=t.headers)==null?void 0:r.Date):void 0},iT=t=>new Date(Date.now()+t),eX=(t,e)=>Math.abs(iT(e).getTime()-t)>=3e5,pC=(t,e)=>{const r=Date.parse(t);return eX(r,e)?r-Date.now():e},Mf=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},tX=async t=>{var l,c,f;const e=Mf("context",t.context),r=Mf("config",t.config),n=(f=(c=(l=e.endpointV2)==null?void 0:l.properties)==null?void 0:c.authSchemes)==null?void 0:f[0],s=await Mf("signer",r.signer)(n),o=t==null?void 0:t.signingRegion,a=t==null?void 0:t.signingName;return{config:r,signer:s,signingRegion:o,signingName:a}};class rX{async sign(e,r,n){if(!$i.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:i,signer:s,signingRegion:o,signingName:a}=await tX(n);return await s.sign(e,{signingDate:iT(i.systemClockOffset),signingRegion:o,signingService:a})}errorHandler(e){return r=>{const n=r.ServerTime??vC(r.$response);if(n){const i=Mf("config",e.config),s=i.systemClockOffset;i.systemClockOffset=pC(n,i.systemClockOffset),i.systemClockOffset!==s&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(e,r){const n=vC(e);if(n){const i=Mf("config",r.config);i.systemClockOffset=pC(n,i.systemClockOffset)}}}const nX="X-Amz-Algorithm",iX="X-Amz-Credential",sT="X-Amz-Date",sX="X-Amz-SignedHeaders",oX="X-Amz-Expires",oT="X-Amz-Signature",aT="X-Amz-Security-Token",lT="authorization",cT=sT.toLowerCase(),aX="date",lX=[lT,cT,aX],cX=oT.toLowerCase(),fm="x-amz-content-sha256",fX=aT.toLowerCase(),uX={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},dX=/^proxy-/,hX=/^sec-/,sp="AWS4-HMAC-SHA256",vX="AWS4-HMAC-SHA256-PAYLOAD",pX="UNSIGNED-PAYLOAD",yX=50,fT="aws4_request",mX=60*60*24*7,Id={},op=[],ap=(t,e,r)=>`${t}/${e}/${r}/${fT}`,gX=async(t,e,r,n,i)=>{const s=await yC(t,e.secretAccessKey,e.accessKeyId),o=`${r}:${n}:${i}:${ka(s)}:${e.sessionToken}`;if(o in Id)return Id[o];for(op.push(o);op.length>yX;)delete Id[op.shift()];let a=`AWS4${e.secretAccessKey}`;for(const l of[r,n,i,fT])a=await yC(t,a,l);return Id[o]=a},yC=(t,e,r)=>{const n=new t(e);return n.update(Of(r)),n.digest()},mC=({headers:t},e,r)=>{const n={};for(const i of Object.keys(t).sort()){if(t[i]==null)continue;const s=i.toLowerCase();(s in uX||e!=null&&e.has(s)||dX.test(s)||hX.test(s))&&(!r||r&&!r.has(s))||(n[s]=t[i].trim().replace(/\s+/g," "))}return n},xX=({query:t={}})=>{const e=[],r={};for(const n of Object.keys(t).sort()){if(n.toLowerCase()===cX)continue;e.push(n);const i=t[n];typeof i=="string"?r[n]=`${Ro(n)}=${Ro(i)}`:Array.isArray(i)&&(r[n]=i.slice(0).reduce((s,o)=>s.concat([`${Ro(n)}=${Ro(o)}`]),[]).sort().join("&"))}return e.map(n=>r[n]).filter(n=>n).join("&")},bX=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]",lp=async({headers:t,body:e},r)=>{for(const n of Object.keys(t))if(n.toLowerCase()===fm)return t[n];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||bX(e)){const n=new r;return n.update(Of(e)),ka(await n.digest())}return pX};class wX{format(e){const r=[];for(const s of Object.keys(e)){const o=vc(s);r.push(Uint8Array.from([o.byteLength]),o,this.formatHeaderValue(e[s]))}const n=new Uint8Array(r.reduce((s,o)=>s+o.byteLength,0));let i=0;for(const s of r)n.set(s,i),i+=s.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,e.value,!1),new Uint8Array(r.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(e.value.bytes,1),i;case"binary":const s=new DataView(new ArrayBuffer(3+e.value.byteLength));s.setUint8(0,6),s.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(s.buffer);return o.set(e.value,3),o;case"string":const a=vc(e.value),l=new DataView(new ArrayBuffer(3+a.byteLength));l.setUint8(0,7),l.setUint16(1,a.byteLength,!1);const c=new Uint8Array(l.buffer);return c.set(a,3),c;case"timestamp":const f=new Uint8Array(9);return f[0]=8,f.set(Wx.fromNumber(e.value.valueOf()).bytes,1),f;case"uuid":if(!AX.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const u=new Uint8Array(17);return u[0]=9,u.set(EJ(e.value.replace(/\-/g,"")),1),u}}}var gC;(function(t){t[t.boolTrue=0]="boolTrue",t[t.boolFalse=1]="boolFalse",t[t.byte=2]="byte",t[t.short=3]="short",t[t.integer=4]="integer",t[t.long=5]="long",t[t.byteArray=6]="byteArray",t[t.string=7]="string",t[t.timestamp=8]="timestamp",t[t.uuid=9]="uuid"})(gC||(gC={}));const AX=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Wx{constructor(e){if(this.bytes=e,e.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776e3||e<-9223372036854776e3)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const r=new Uint8Array(8);for(let n=7,i=Math.abs(Math.round(e));n>-1&&i>0;n--,i/=256)r[n]=i;return e<0&&xC(r),new Wx(r)}valueOf(){const e=this.bytes.slice(0),r=e[0]&128;return r&&xC(e),parseInt(ka(e),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function xC(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const EX=(t,e)=>{t=t.toLowerCase();for(const r of Object.keys(e))if(t===r.toLowerCase())return!0;return!1},uT=({headers:t,query:e,...r})=>({...r,headers:{...t},query:e?SX(e):void 0}),SX=t=>Object.keys(t).reduce((e,r)=>{const n=t[r];return{...e,[r]:Array.isArray(n)?[...n]:n}},{}),CX=(t,e={})=>{var i;const{headers:r,query:n={}}=typeof t.clone=="function"?t.clone():uT(t);for(const s of Object.keys(r)){const o=s.toLowerCase();o.slice(0,6)==="x-amz-"&&!((i=e.unhoistableHeaders)!=null&&i.has(o))&&(n[s]=r[s],delete r[s])}return{...t,headers:r,query:n}},bC=t=>{t=typeof t.clone=="function"?t.clone():uT(t);for(const e of Object.keys(t.headers))lX.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t},kX=t=>TX(t).toISOString().replace(/\.\d{3}Z$/,"Z"),TX=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class wC{constructor({applyChecksum:e,credentials:r,region:n,service:i,sha256:s,uriEscapePath:o=!0}){this.headerFormatter=new wX,this.service=i,this.sha256=s,this.uriEscapePath=o,this.applyChecksum=typeof e=="boolean"?e:!0,this.regionProvider=zo(n),this.credentialProvider=zo(r)}async presign(e,r={}){const{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:s,unhoistableHeaders:o,signableHeaders:a,signingRegion:l,signingService:c}=r,f=await this.credentialProvider();this.validateResolvedCredentials(f);const u=l??await this.regionProvider(),{longDate:d,shortDate:h}=Od(n);if(i>mX)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const p=ap(h,u,c??this.service),m=CX(bC(e),{unhoistableHeaders:o});f.sessionToken&&(m.query[aT]=f.sessionToken),m.query[nX]=sp,m.query[iX]=`${f.accessKeyId}/${p}`,m.query[sT]=d,m.query[oX]=i.toString(10);const x=mC(m,s,a);return m.query[sX]=AC(x),m.query[oT]=await this.getSignature(d,p,this.getSigningKey(f,u,h,c),this.createCanonicalRequest(m,x,await lp(e,this.sha256))),m}async sign(e,r){return typeof e=="string"?this.signString(e,r):e.headers&&e.payload?this.signEvent(e,r):e.message?this.signMessage(e,r):this.signRequest(e,r)}async signEvent({headers:e,payload:r},{signingDate:n=new Date,priorSignature:i,signingRegion:s,signingService:o}){const a=s??await this.regionProvider(),{shortDate:l,longDate:c}=Od(n),f=ap(l,a,o??this.service),u=await lp({headers:{},body:r},this.sha256),d=new this.sha256;d.update(e);const h=ka(await d.digest()),p=[vX,c,f,i,h,u].join(` -`);return this.signString(p,{signingDate:n,signingRegion:a,signingService:o})}async signMessage(e,{signingDate:r=new Date,signingRegion:n,signingService:i}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:r,signingRegion:n,signingService:i,priorSignature:e.priorSignature}).then(o=>({message:e.message,signature:o}))}async signString(e,{signingDate:r=new Date,signingRegion:n,signingService:i}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const o=n??await this.regionProvider(),{shortDate:a}=Od(r),l=new this.sha256(await this.getSigningKey(s,o,a,i));return l.update(Of(e)),ka(await l.digest())}async signRequest(e,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:s,signingService:o}={}){const a=await this.credentialProvider();this.validateResolvedCredentials(a);const l=s??await this.regionProvider(),c=bC(e),{longDate:f,shortDate:u}=Od(r),d=ap(u,l,o??this.service);c.headers[cT]=f,a.sessionToken&&(c.headers[fX]=a.sessionToken);const h=await lp(c,this.sha256);!EX(fm,c.headers)&&this.applyChecksum&&(c.headers[fm]=h);const p=mC(c,i,n),m=await this.getSignature(f,d,this.getSigningKey(a,l,u,o),this.createCanonicalRequest(c,p,h));return c.headers[lT]=`${sp} Credential=${a.accessKeyId}/${d}, SignedHeaders=${AC(p)}, Signature=${m}`,c}createCanonicalRequest(e,r,n){const i=Object.keys(r).sort();return`${e.method} +`)}static register(e,r){r||(r=e.locale)}}const eK="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let Rf=null;function PS(t){if(Rf==null&&(Rf=eK.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),Vu.check(t)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw Rf=null,new Error("BIP39 Wordlist for en (English) FAILED")}class tK extends Vu{constructor(){super("en")}getWord(e){return PS(this),Rf[e]}getWordIndex(e){return PS(this),Rf.indexOf(e)}}const v9=new tK;Vu.register(v9);const Zy={en:v9},rK="hdnode/5.7.0",v0=new Q(rK),nK=ce.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),iK=Pt("Bitcoin seed"),Jc=2147483648;function p9(t){return(1<=256)throw new Error("Depth too large!");return RS(Er([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",he(this.depth),this.parentFingerprint,qt(he(this.index),4),this.chainCode,this.privateKey!=null?Er(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new ui(ul,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&~Jc));const n=new Uint8Array(37);if(e&Jc){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(de(this.privateKey),1),r&&(r+="'")}else n.set(de(this.publicKey));for(let u=24;u>=0;u-=8)n[33+(u>>3)]=e>>24-u&255;const i=de(h0(du.sha512,this.chainCode,n)),s=i.slice(0,32),o=i.slice(32);let a=null,l=null;this.privateKey?a=kd(ce.from(s).add(this.privateKey).mod(nK)):l=new Gl(he(s))._addPoint(this.publicKey);let c=r;const f=this.mnemonic;return f&&(c=Object.freeze({phrase:f.phrase,path:r,locale:f.locale||"en"})),new ui(ul,a,l,this.fingerprint,kd(o),e,this.depth+1,c)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let i=0;i=Jc)throw new Error("invalid path index - "+s);n=n._derive(Jc+o)}else if(s.match(/^[0-9]+$/)){const o=parseInt(s);if(o>=Jc)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=de(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=de(h0(du.sha512,iK,n));return new ui(ul,kd(i.slice(0,32)),null,"0x00000000",kd(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=Rx(n),e=_x(y9(e,n),n),ui._fromSeed(oK(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return ui._fromSeed(e,null)}static fromExtendedKey(e){const r=uu.decode(e);(r.length!==82||RS(r.slice(0,78))!==e)&&v0.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=he(r.slice(5,9)),s=parseInt(he(r.slice(9,13)).substring(2),16),o=he(r.slice(13,45)),a=r.slice(45,78);switch(he(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new ui(ul,null,he(a),i,o,s,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new ui(ul,he(a.slice(1)),null,i,o,s,n,null)}return v0.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function oK(t,e){e||(e="");const r=Pt("mnemonic"+e,Qo.NFKD);return Px(Pt(t,Qo.NFKD),r,2048,64,"sha512")}function y9(t,e){e=Rx(e),v0.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=de(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let c=0;c>3]|=1<<7-i%8),i++}const s=32*r.length/3,o=r.length/3,a=p9(o);if((de(Ka(n.slice(0,s/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return he(n.slice(0,s/8))}function _x(t,e){if(e=Rx(e),t=de(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]&sK(8-n)),n+=3);const i=t.length/4,s=de(Ka(t))[0]&p9(i);return r[r.length-1]<<=i,r[r.length-1]|=s>>8-i,e.join(r.map(o=>e.getWord(o)))}const aK="random/5.7.0",em=new Q(aK);function lK(){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 _S=lK();let uh=_S.crypto||_S.msCrypto;(!uh||!uh.getRandomValues)&&(em.warn("WARNING: Missing strong random number source"),uh={getRandomValues:function(t){return em.throwError("no secure random source avaialble",Q.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function uf(t){(t<=0||t>1024||t%1||t!=t)&&em.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return uh.getRandomValues(e),de(e)}var m9={exports:{}};(function(t,e){(function(r){function n(A){return parseInt(A)===A}function i(A){if(!n(A.length))return!1;for(var g=0;g255)return!1;return!0}function s(A,g){if(A.buffer&&ArrayBuffer.isView(A)&&A.name==="Uint8Array")return g&&(A.slice?A=A.slice():A=Array.prototype.slice.call(A)),A;if(Array.isArray(A)){if(!i(A))throw new Error("Array contains invalid value: "+A);return new Uint8Array(A)}if(n(A.length)&&i(A))return new Uint8Array(A);throw new Error("unsupported array-like object")}function o(A){return new Uint8Array(A)}function a(A,g,_,B,k){(B!=null||k!=null)&&(A.slice?A=A.slice(B,k):A=Array.prototype.slice.call(A,B,k)),g.set(A,_)}var l=function(){function A(_){var B=[],k=0;for(_=encodeURI(_);k<_.length;){var $=_.charCodeAt(k++);$===37?(B.push(parseInt(_.substr(k,2),16)),k+=2):B.push($)}return s(B)}function g(_){for(var B=[],k=0;k<_.length;){var $=_[k];$<128?(B.push(String.fromCharCode($)),k++):$>191&&$<224?(B.push(String.fromCharCode(($&31)<<6|_[k+1]&63)),k+=2):(B.push(String.fromCharCode(($&15)<<12|(_[k+1]&63)<<6|_[k+2]&63)),k+=3)}return B.join("")}return{toBytes:A,fromBytes:g}}(),c=function(){function A(B){for(var k=[],$=0;$>4]+g[V&15])}return k.join("")}return{toBytes:A,fromBytes:_}}(),f={16:10,24:12,32:14},u=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],d=[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],h=[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],p=[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],m=[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],x=[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],b=[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],w=[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],R=[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],N=[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],I=[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],F=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],j=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],U=[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 K(A){for(var g=[],_=0;_>2,this._Ke[$][g%4]=k[g],this._Kd[A-$][g%4]=k[g];for(var V=0,H=B,X;H<_;){if(X=k[B-1],k[0]^=d[X>>16&255]<<24^d[X>>8&255]<<16^d[X&255]<<8^d[X>>24&255]^u[V]<<24,V+=1,B!=8)for(var g=1;g>8&255]<<8^d[X>>16&255]<<16^d[X>>24&255]<<24;for(var g=B/2+1;g>2,ne=H%4,this._Ke[le][ne]=k[g],this._Kd[A-le][ne]=k[g++],H++}for(var le=1;le>24&255]^F[X>>16&255]^j[X>>8&255]^U[X&255]},J.prototype.encrypt=function(A){if(A.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var g=this._Ke.length-1,_=[0,0,0,0],B=K(A),k=0;k<4;k++)B[k]^=this._Ke[0][k];for(var $=1;$>24&255]^m[B[(k+1)%4]>>16&255]^x[B[(k+2)%4]>>8&255]^b[B[(k+3)%4]&255]^this._Ke[$][k];B=_.slice()}for(var V=o(16),H,k=0;k<4;k++)H=this._Ke[g][k],V[4*k]=(d[B[k]>>24&255]^H>>24)&255,V[4*k+1]=(d[B[(k+1)%4]>>16&255]^H>>16)&255,V[4*k+2]=(d[B[(k+2)%4]>>8&255]^H>>8)&255,V[4*k+3]=(d[B[(k+3)%4]&255]^H)&255;return V},J.prototype.decrypt=function(A){if(A.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var g=this._Kd.length-1,_=[0,0,0,0],B=K(A),k=0;k<4;k++)B[k]^=this._Kd[0][k];for(var $=1;$>24&255]^E[B[(k+3)%4]>>16&255]^R[B[(k+2)%4]>>8&255]^N[B[(k+1)%4]&255]^this._Kd[$][k];B=_.slice()}for(var V=o(16),H,k=0;k<4;k++)H=this._Kd[g][k],V[4*k]=(h[B[k]>>24&255]^H>>24)&255,V[4*k+1]=(h[B[(k+3)%4]>>16&255]^H>>16)&255,V[4*k+2]=(h[B[(k+2)%4]>>8&255]^H>>8)&255,V[4*k+3]=(h[B[(k+1)%4]&255]^H)&255;return V};var Z=function(A){if(!(this instanceof Z))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new J(A)};Z.prototype.encrypt=function(A){if(A=s(A),A.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var g=o(A.length),_=o(16),B=0;B=0;--g)this._counter[g]=A%256,A=A>>8},S.prototype.setBytes=function(A){if(A=s(A,!0),A.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=A},S.prototype.increment=function(){for(var A=15;A>=0;A--)if(this._counter[A]===255)this._counter[A]=0;else{this._counter[A]++;break}};var C=function(A,g){if(!(this instanceof C))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",g instanceof S||(g=new S(g)),this._counter=g,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new J(A)};C.prototype.encrypt=function(A){for(var g=s(A,!0),_=0;_16)throw new Error("PKCS#7 padding byte out of range");for(var _=A.length-g,B=0;B=64;){let L=b,A=w,g=E,_=R,B=N,k=I,$=F,V=j,H,X,le,ne,te;for(X=0;X<16;X++)le=P+X*4,U[X]=(C[le]&255)<<24|(C[le+1]&255)<<16|(C[le+2]&255)<<8|C[le+3]&255;for(X=16;X<64;X++)H=U[X-2],ne=(H>>>17|H<<32-17)^(H>>>19|H<<32-19)^H>>>10,H=U[X-15],te=(H>>>7|H<<32-7)^(H>>>18|H<<32-18)^H>>>3,U[X]=(ne+U[X-7]|0)+(te+U[X-16]|0)|0;for(X=0;X<64;X++)ne=(((B>>>6|B<<32-6)^(B>>>11|B<<32-11)^(B>>>25|B<<32-25))+(B&k^~B&$)|0)+(V+(x[X]+U[X]|0)|0)|0,te=((L>>>2|L<<32-2)^(L>>>13|L<<32-13)^(L>>>22|L<<32-22))+(L&A^L&g^A&g)|0,V=$,$=k,k=B,B=_+ne|0,_=g,g=A,A=L,L=ne+te|0;b=b+L|0,w=w+A|0,E=E+g|0,R=R+_|0,N=N+B|0,I=I+k|0,F=F+$|0,j=j+V|0,P+=64,O-=64}}K(m);let J,Z=m.length%64,M=m.length/536870912|0,v=m.length<<3,T=Z<56?56:120,S=m.slice(m.length-Z,m.length);for(S.push(128),J=Z+1;J>>24&255),S.push(M>>>16&255),S.push(M>>>8&255),S.push(M>>>0&255),S.push(v>>>24&255),S.push(v>>>16&255),S.push(v>>>8&255),S.push(v>>>0&255),K(S),[b>>>24&255,b>>>16&255,b>>>8&255,b>>>0&255,w>>>24&255,w>>>16&255,w>>>8&255,w>>>0&255,E>>>24&255,E>>>16&255,E>>>8&255,E>>>0&255,R>>>24&255,R>>>16&255,R>>>8&255,R>>>0&255,N>>>24&255,N>>>16&255,N>>>8&255,N>>>0&255,I>>>24&255,I>>>16&255,I>>>8&255,I>>>0&255,F>>>24&255,F>>>16&255,F>>>8&255,F>>>0&255,j>>>24&255,j>>>16&255,j>>>8&255,j>>>0&255]}function s(m,x,b){m=m.length<=64?m:i(m);const w=64+x.length+4,E=new Array(w),R=new Array(64);let N,I=[];for(N=0;N<64;N++)E[N]=54;for(N=0;N=w-4;j--){if(E[j]++,E[j]<=255)return;E[j]=0}}for(;b>=32;)F(),I=I.concat(i(R.concat(i(E)))),b-=32;return b>0&&(F(),I=I.concat(i(R.concat(i(E))).slice(0,b))),I}function o(m,x,b,w,E){let R;for(f(m,(2*b-1)*16,E,0,16),R=0;R<2*b;R++)c(m,R*16,E,16),l(E,w),f(E,0,m,x+R*16,16);for(R=0;R>>32-x}function l(m,x){f(m,0,x,0,16);for(let b=8;b>0;b-=2)x[4]^=a(x[0]+x[12],7),x[8]^=a(x[4]+x[0],9),x[12]^=a(x[8]+x[4],13),x[0]^=a(x[12]+x[8],18),x[9]^=a(x[5]+x[1],7),x[13]^=a(x[9]+x[5],9),x[1]^=a(x[13]+x[9],13),x[5]^=a(x[1]+x[13],18),x[14]^=a(x[10]+x[6],7),x[2]^=a(x[14]+x[10],9),x[6]^=a(x[2]+x[14],13),x[10]^=a(x[6]+x[2],18),x[3]^=a(x[15]+x[11],7),x[7]^=a(x[3]+x[15],9),x[11]^=a(x[7]+x[3],13),x[15]^=a(x[11]+x[7],18),x[1]^=a(x[0]+x[3],7),x[2]^=a(x[1]+x[0],9),x[3]^=a(x[2]+x[1],13),x[0]^=a(x[3]+x[2],18),x[6]^=a(x[5]+x[4],7),x[7]^=a(x[6]+x[5],9),x[4]^=a(x[7]+x[6],13),x[5]^=a(x[4]+x[7],18),x[11]^=a(x[10]+x[9],7),x[8]^=a(x[11]+x[10],9),x[9]^=a(x[8]+x[11],13),x[10]^=a(x[9]+x[8],18),x[12]^=a(x[15]+x[14],7),x[13]^=a(x[12]+x[15],9),x[14]^=a(x[13]+x[12],13),x[15]^=a(x[14]+x[13],18);for(let b=0;b<16;++b)m[b]+=x[b]}function c(m,x,b,w){for(let E=0;E=256)return!1}return!0}function d(m,x){if(typeof m!="number"||m%1)throw new Error("invalid "+x);return m}function h(m,x,b,w,E,R,N){if(b=d(b,"N"),w=d(w,"r"),E=d(E,"p"),R=d(R,"dkLen"),b===0||b&b-1)throw new Error("N must be power of 2");if(b>2147483647/128/w)throw new Error("N too large");if(w>2147483647/128/E)throw new Error("r too large");if(!u(m))throw new Error("password must be an array or buffer");if(m=Array.prototype.slice.call(m),!u(x))throw new Error("salt must be an array or buffer");x=Array.prototype.slice.call(x);let I=s(m,x,E*128*w);const F=new Uint32Array(E*32*w);for(let B=0;BA&&(B=A);for(let $=0;$A&&(B=A);for(let $=0;$>0&255),I.push(F[$]>>8&255),I.push(F[$]>>16&255),I.push(F[$]>>24&255);const k=s(m,I,R);return N&&N(null,1,k),k}N&&g(_)};if(!N)for(;;){const B=_();if(B!=null)return B}_()}const p={scrypt:function(m,x,b,w,E,R,N){return new Promise(function(I,F){let j=0;N&&N(0),h(m,x,b,w,E,R,function(U,K,J){if(U)F(U);else if(J)N&&j!==1&&N(1),I(new Uint8Array(J));else if(N&&K!==j)return j=K,N(K)})})},syncScrypt:function(m,x,b,w,E,R){return new Uint8Array(h(m,x,b,w,E,R))}};t.exports=p})()})(E9);var hK=E9.exports;const Ox=ro(hK);var vK=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const tm=new Q(g9);function IS(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class pK extends nl{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function yK(t,e,r){if(gr(t,"crypto/cipher")==="aes-128-ctr"){const i=Na(gr(t,"crypto/cipherparams/iv")),s=new as.Counter(i),o=new as.ModeOfOperation.ctr(e,s);return de(o.decrypt(r))}return null}function A9(t,e){const r=Na(gr(t,"crypto/ciphertext"));if(he(Je(Er([e.slice(16,32),r]))).substring(2)!==gr(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const i=yK(t,e.slice(0,16),r);i||tm.throwError("unsupported cipher",Q.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const s=e.slice(32,64),o=Ma(i);if(t.address){let l=t.address.toLowerCase();if(l.substring(0,2)!=="0x"&&(l="0x"+l),ir(l)!==o)throw new Error("address mismatch")}const a={_isKeystoreAccount:!0,address:o,privateKey:he(i)};if(gr(t,"x-ethers/version")==="0.1"){const l=Na(gr(t,"x-ethers/mnemonicCiphertext")),c=Na(gr(t,"x-ethers/mnemonicCounter")),f=new as.Counter(c),u=new as.ModeOfOperation.ctr(s,f),d=gr(t,"x-ethers/path")||hu,h=gr(t,"x-ethers/locale")||"en",p=de(u.decrypt(l));try{const m=_x(p,h),x=ui.fromMnemonic(m,null,h).derivePath(d);if(x.privateKey!=a.privateKey)throw new Error("mnemonic mismatch");a.mnemonic=x.mnemonic}catch(m){if(m.code!==Q.errors.INVALID_ARGUMENT||m.argument!=="wordlist")throw m}}return new pK(a)}function S9(t,e,r,n,i){return de(Px(t,e,r,n,i))}function mK(t,e,r,n,i){return Promise.resolve(S9(t,e,r,n,i))}function C9(t,e,r,n,i){const s=Ix(e),o=gr(t,"crypto/kdf");if(o&&typeof o=="string"){const a=function(l,c){return tm.throwArgumentError("invalid key-derivation function parameters",l,c)};if(o.toLowerCase()==="scrypt"){const l=Na(gr(t,"crypto/kdfparams/salt")),c=parseInt(gr(t,"crypto/kdfparams/n")),f=parseInt(gr(t,"crypto/kdfparams/r")),u=parseInt(gr(t,"crypto/kdfparams/p"));(!c||!f||!u)&&a("kdf",o),c&c-1&&a("N",c);const d=parseInt(gr(t,"crypto/kdfparams/dklen"));return d!==32&&a("dklen",d),n(s,l,c,f,u,64,i)}else if(o.toLowerCase()==="pbkdf2"){const l=Na(gr(t,"crypto/kdfparams/salt"));let c=null;const f=gr(t,"crypto/kdfparams/prf");f==="hmac-sha256"?c="sha256":f==="hmac-sha512"?c="sha512":a("prf",f);const u=parseInt(gr(t,"crypto/kdfparams/c")),d=parseInt(gr(t,"crypto/kdfparams/dklen"));return d!==32&&a("dklen",d),r(s,l,u,d,c)}}return tm.throwArgumentError("unsupported key-derivation function","kdf",o)}function gK(t,e){const r=JSON.parse(t),n=C9(r,e,S9,Ox.syncScrypt);return A9(r,n)}function xK(t,e,r){return vK(this,void 0,void 0,function*(){const n=JSON.parse(t),i=yield C9(n,e,mK,Ox.scrypt,r);return A9(n,i)})}function bK(t,e,r,n){try{if(ir(t.address)!==Ma(t.privateKey))throw new Error("address/privateKey mismatch");if(IS(t)){const x=t.mnemonic;if(ui.fromMnemonic(x.phrase,null,x.locale).derivePath(x.path||hu).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(x){return Promise.reject(x)}typeof r=="function"&&!n&&(n=r,r={}),r||(r={});const i=de(t.privateKey),s=Ix(e);let o=null,a=null,l=null;if(IS(t)){const x=t.mnemonic;o=de(y9(x.phrase,x.locale||"en")),a=x.path||hu,l=x.locale||"en"}let c=r.client;c||(c="ethers.js");let f=null;r.salt?f=de(r.salt):f=uf(32);let u=null;if(r.iv){if(u=de(r.iv),u.length!==16)throw new Error("invalid iv")}else u=uf(16);let d=null;if(r.uuid){if(d=de(r.uuid),d.length!==16)throw new Error("invalid uuid")}else d=uf(16);let h=1<<17,p=8,m=1;return r.scrypt&&(r.scrypt.N&&(h=r.scrypt.N),r.scrypt.r&&(p=r.scrypt.r),r.scrypt.p&&(m=r.scrypt.p)),Ox.scrypt(s,f,h,p,m,64,n).then(x=>{x=de(x);const b=x.slice(0,16),w=x.slice(16,32),E=x.slice(32,64),R=new as.Counter(u),N=new as.ModeOfOperation.ctr(b,R),I=de(N.encrypt(i)),F=Je(Er([w,I])),j={address:t.address.substring(2).toLowerCase(),id:fK(d),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:he(u).substring(2)},ciphertext:he(I).substring(2),kdf:"scrypt",kdfparams:{salt:he(f).substring(2),n:h,dklen:32,p:m,r:p},mac:F.substring(2)}};if(o){const U=uf(16),K=new as.Counter(U),J=new as.ModeOfOperation.ctr(E,K),Z=de(J.encrypt(o)),M=new Date,v=M.getUTCFullYear()+"-"+Xc(M.getUTCMonth()+1,2)+"-"+Xc(M.getUTCDate(),2)+"T"+Xc(M.getUTCHours(),2)+"-"+Xc(M.getUTCMinutes(),2)+"-"+Xc(M.getUTCSeconds(),2)+".0Z";j["x-ethers"]={client:c,gethFilename:"UTC--"+v+"--"+j.address,mnemonicCounter:he(U).substring(2),mnemonicCiphertext:he(Z).substring(2),path:a,locale:l,version:"0.1"}}return JSON.stringify(j)})}function wK(t,e,r){if(b9(t)){r&&r(0);const n=x9(t,e);return r&&r(1),Promise.resolve(n)}return w9(t)?xK(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function EK(t,e){if(b9(t))return x9(t,e);if(w9(t))return gK(t,e);throw new Error("invalid JSON wallet")}const AK="wallet/5.7.0";var OS=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const dl=new Q(AK);function SK(t){return t!=null&&Ze(t.privateKey,32)&&t.address!=null}function CK(t){const e=t.mnemonic;return e&&e.phrase}class Ls extends Tc{constructor(e,r){if(super(),SK(e)){const n=new Gl(e.privateKey);if(se(this,"_signingKey",()=>n),se(this,"address",Ma(this.publicKey)),this.address!==ir(e.address)&&dl.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),CK(e)){const i=e.mnemonic;se(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||hu,locale:i.locale||"en"}));const s=this.mnemonic,o=ui.fromMnemonic(s.phrase,null,s.locale).derivePath(s.path);Ma(o.privateKey)!==this.address&&dl.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else se(this,"_mnemonic",()=>null)}else{if(Gl.isSigningKey(e))e.curve!=="secp256k1"&&dl.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),se(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const n=new Gl(e);se(this,"_signingKey",()=>n)}se(this,"_mnemonic",()=>null),se(this,"address",Ma(this.publicKey))}r&&!Uu.isProvider(r)&&dl.throwArgumentError("invalid provider","provider",r),se(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 Ls(this,e)}signTransaction(e){return yr(e).then(r=>{r.from!=null&&(ir(r.from)!==this.address&&dl.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);const n=this._signingKey().signDigest(Je(SS(r)));return SS(r,n)})}signMessage(e){return OS(this,void 0,void 0,function*(){return XA(this._signingKey().signDigest(RH(e)))})}_signTypedData(e,r,n){return OS(this,void 0,void 0,function*(){const i=yield pn.resolveNames(e,r,n,s=>(this.provider==null&&dl.throwError("cannot resolve ENS names without a provider",Q.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:s}),this.provider.resolveName(s)));return XA(this._signingKey().signDigest(pn.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={}),bK(this,e,r,n)}static createRandom(e){let r=uf(16);e||(e={}),e.extraEntropy&&(r=de(Ir(Je(Er([r,e.extraEntropy])),0,16)));const n=_x(r,e.locale);return Ls.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return wK(e,r,n).then(i=>new Ls(i))}static fromEncryptedJsonSync(e,r){return new Ls(EK(e,r))}static fromMnemonic(e,r,n){return r||(r=hu),new Ls(ui.fromMnemonic(e,null,n).derivePath(r))}}const kK="networks/5.7.1",MS=new Q(kK);function TK(t){return t&&typeof t.renetwork=="function"}function Ms(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 Ms(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 NS={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Ms("homestead")},DS={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Ms("ropsten")},LS={chainId:63,name:"classicMordor",_defaultProvider:p0("https://www.ethercluster.com/mordor","classicMordor")},Td={unspecified:{chainId:0,name:"unspecified"},homestead:NS,mainnet:NS,morden:{chainId:2,name:"morden"},ropsten:DS,testnet:DS,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Ms("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Ms("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Ms("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Ms("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:p0("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:LS,classicTestnet:LS,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:p0("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Ms("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Ms("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 PK(t){if(t==null)return null;if(typeof t=="number"){for(const n in Td){const i=Td[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=Td[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=Td[t.name];if(!e)return typeof t.chainId!="number"&&MS.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&MS.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(TK(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 RK="web/5.7.1";var _K=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};function IK(t,e){return _K(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:de(new Uint8Array(i))}})}var OK=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const ki=new Q(RK);function jS(t){return new Promise(e=>{setTimeout(e,t)})}function vo(t,e){if(t==null)return null;if(typeof t=="string")return t;if(bv(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return $u(t)}catch{}return he(t)}return t}function MK(t){return Pt(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function NK(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;ki.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;ki.assertArgument(s>0&&s%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",s);const o=typeof t=="object"?!!t.errorPassThrough:!1,a={};let l=null;const c={method:"GET"};let f=!1,u=2*60*1e3;if(typeof t=="string")l=t;else if(typeof t=="object"){if((t==null||t.url==null)&&ki.throwArgumentError("missing URL","connection.url",t),l=t.url,typeof t.timeout=="number"&&t.timeout>0&&(u=t.timeout),t.headers)for(const b in t.headers)a[b.toLowerCase()]={key:b,value:String(t.headers[b])},["if-none-match","if-modified-since"].indexOf(b.toLowerCase())>=0&&(f=!0);if(c.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){l.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&ki.throwError("basic authentication requires a secure https url",Q.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:t.user,password:"[REDACTED]"});const b=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+T7(Pt(b))}}t.skipFetchSetup!=null&&(c.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(c.fetchOptions=Nr(t.fetchOptions))}const d=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),h=l?l.match(d):null;if(h)try{const b={statusCode:200,statusMessage:"OK",headers:{"content-type":h[1]||"text/plain"},body:h[2]?k7(h[3]):MK(h[3])};let w=b.body;return r&&(w=r(b.body,b)),Promise.resolve(w)}catch(b){ki.throwError("processing response error",Q.errors.SERVER_ERROR,{body:vo(h[1],h[2]),error:b,requestBody:null,requestMethod:"GET",url:l})}e&&(c.method="POST",c.body=e,a["content-type"]==null&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),a["content-length"]==null&&(a["content-length"]={key:"Content-Length",value:String(e.length)}));const p={};Object.keys(a).forEach(b=>{const w=a[b];p[w.key]=w.value}),c.headers=p;const m=function(){let b=null;return{promise:new Promise(function(R,N){u&&(b=setTimeout(()=>{b!=null&&(b=null,N(ki.makeError("timeout",Q.errors.TIMEOUT,{requestBody:vo(c.body,p["content-type"]),requestMethod:c.method,timeout:u,url:l})))},u))}),cancel:function(){b!=null&&(clearTimeout(b),b=null)}}}(),x=function(){return OK(this,void 0,void 0,function*(){for(let b=0;b=300)&&(m.cancel(),ki.throwError("bad response",Q.errors.SERVER_ERROR,{status:w.statusCode,headers:w.headers,body:vo(E,w.headers?w.headers["content-type"]:null),requestBody:vo(c.body,p["content-type"]),requestMethod:c.method,url:l})),r)try{const R=yield r(E,w);return m.cancel(),R}catch(R){if(R.throttleRetry&&b{let a=null;if(s!=null)try{a=JSON.parse($u(s))}catch(l){ki.throwError("invalid JSON",Q.errors.SERVER_ERROR,{body:s,error:l})}return r&&(a=r(a,o)),a},i=null;if(e!=null){i=Pt(e);const s=typeof t=="string"?{url:t}:Nr(t);s.headers?Object.keys(s.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(s.headers=Nr(s.headers),s.headers["content-type"]="application/json"):s.headers={"content-type":"application/json"},t=s}return NK(t,i,n)}function df(t,e){return e||(e={}),e=Nr(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let i=null,s=!1;const o=()=>s?!1:(s=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{o()&&n(new Error("timeout"))},e.timeout));const a=e.retryLimit;let l=0;function c(){return t().then(function(f){if(f!==void 0)o()&&r(f);else if(e.oncePoll)e.oncePoll.once("poll",c);else if(e.onceBlock)e.onceBlock.once("block",c);else if(!s){if(l++,l>a){o()&&n(new Error("retry limit reached"));return}let u=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));ue.ceiling&&(u=e.ceiling),setTimeout(c,u)}return null},function(f){o()&&n(f)})}c()})}var y0="qpzry9x8gf2tvdw0s3jn54khce6mua7l",rm={};for(var Pd=0;Pd>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 k9(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=Kl(e)^n>>5}for(e=Kl(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=k9(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=Kl(n)^o,i+=y0.charAt(o)}for(s=0;s<6;++s)n=Kl(n);for(n^=1,s=0;s<6;++s){var a=n>>(5-s)*5&31;i+=y0.charAt(a)}return i}function T9(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=k9(s);if(typeof a=="string")return a;for(var l=[],c=0;c=o.length)&&l.push(u)}return a!==1?"Invalid checksum for "+t:{prefix:s,words:l}}function LK(){var t=T9.apply(null,arguments);if(typeof t=="object")return t}function jK(t){var e=T9.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function kv(t,e,r,n){for(var i=0,s=0,o=(1<=r;)s-=r,a.push(i>>s&o);if(n)s>0&&a.push(i<=e)return"Excess padding";if(i<this.data(u,!0);return e.transaction={hash:o,type:c,accessList:be.allowNull(this.accessList.bind(this),null),blockHash:be.allowNull(o,null),blockNumber:be.allowNull(l,null),transactionIndex:be.allowNull(l,null),confirmations:be.allowNull(l,null),from:r,gasPrice:be.allowNull(n),maxPriorityFeePerGas:be.allowNull(n),maxFeePerGas:be.allowNull(n),gasLimit:n,to:be.allowNull(r,null),value:n,nonce:l,data:s,r:be.allowNull(this.uint256),s:be.allowNull(this.uint256),v:be.allowNull(l),creates:be.allowNull(r,null),raw:be.allowNull(s)},e.transactionRequest={from:be.allowNull(r),nonce:be.allowNull(l),gasLimit:be.allowNull(n),gasPrice:be.allowNull(n),maxPriorityFeePerGas:be.allowNull(n),maxFeePerGas:be.allowNull(n),to:be.allowNull(r),value:be.allowNull(n),data:be.allowNull(f),type:be.allowNull(l),accessList:be.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:o,address:r,topics:be.arrayOf(o),data:s,logIndex:l,blockHash:o},e.receipt={to:be.allowNull(this.address,null),from:be.allowNull(this.address,null),contractAddress:be.allowNull(r,null),transactionIndex:l,root:be.allowNull(a),gasUsed:n,logsBloom:be.allowNull(s),blockHash:o,transactionHash:o,logs:be.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:be.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:be.allowNull(n),status:be.allowNull(l),type:c},e.block={hash:be.allowNull(o),parentHash:o,number:l,timestamp:l,nonce:be.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:be.allowNull(r),extraData:s,transactions:be.allowNull(be.arrayOf(o)),baseFeePerGas:be.allowNull(n)},e.blockWithTransactions=Nr(e.block),e.blockWithTransactions.transactions=be.allowNull(be.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:be.allowNull(i,void 0),toBlock:be.allowNull(i,void 0),blockHash:be.allowNull(o,void 0),address:be.allowNull(r,void 0),topics:be.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:be.allowNull(l),blockHash:be.allowNull(o),transactionIndex:l,removed:be.allowNull(this.boolean.bind(this)),address:r,data:be.allowFalsish(s,"0x"),topics:be.arrayOf(o),transactionHash:o,logIndex:l},e}accessList(e){return Oc(e||[])}number(e){return e==="0x"?0:ce.from(e).toNumber()}type(e){return e==="0x"||e==null?0:ce.from(e).toNumber()}bigNumber(e){return ce.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),Ze(e))?e.toLowerCase():Zc.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 ir(e)}callAddress(e){if(!Ze(e,32))return null;const r=ir(Ir(e,12));return r===Ex?null:r}contractAddress(e){return m7(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"||Ze(e))return mx(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return Va(n)!==32?Zc.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=ce.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!Ze(e))throw new Error("invalid uint256");return qt(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=be.check(r,e);return i._difficulty=n==null?null:ce.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return be.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&ce.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=be.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;Ze(n)&&(n=ce.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),Ze(n)&&(n=ce.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 $G(e)}receiptLog(e){return be.check(this.formats.receiptLog,e)}receipt(e){const r=be.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=ce.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&Zc.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):Zc.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&Zc.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 be.check(this.formats.filter,e)}filterLog(e){return be.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const i in e)try{const s=e[i](r[i]);s!==void 0&&(n[i]=s)}catch(s){throw s.checkKey=i,s.checkValue=r[i],s}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(i){n.push(e(i))}),n}}}var Me=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const $e=new Q(Nx),VK=10;function BS(t){return t==null?"null":(Va(t)!==32&&$e.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function $S(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[BS(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return BS(e)}).join("&")}function qK(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 hl(t){if(typeof t=="string"){if(t=t.toLowerCase(),Va(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+$S(t);if(qH.isForkEvent(t))throw $e.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+$S(t.topics||[])}throw new Error("invalid event - "+t)}function ef(){return new Date().getTime()}function US(t){return new Promise(e=>{setTimeout(e,t)})}const HK=["block","network","pending","poll"];let WK=class{constructor(e,r,n){se(this,"tag",e),se(this,"listener",r),se(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=qK(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||HK.indexOf(this.tag)>=0}};const GK={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 Y1(t){return qt(ce.from(t).toHexString(),32)}function zS(t){return uu.encode(Er([t,Ir(Ka(Ka(t)),0,4)]))}const P9=new RegExp("^(ipfs)://(.*)$","i"),VS=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),P9,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function dh(t,e){try{return $u(vu(t,e))}catch{}return null}function vu(t,e){if(t==="0x")return null;const r=ce.from(Ir(t,e,e+32)).toNumber(),n=ce.from(Ir(t,r,r+32)).toNumber();return Ir(t,r+32,r+32+n)}function Q1(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):$e.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function qS(t){const e=de(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 KK(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function R9(t){const e=[];let r=0;for(let n=0;nce.from(e).eq(1)).catch(e=>{if(e.code===Q.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return Me(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Sn([e,ah(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=Sn(["0x9061b923",R9([TH(this.name),n.data])]));try{let s=yield this.provider.call(n);return de(s).length%32===4&&$e.throwError("resolver threw error",Q.errors.CALL_EXCEPTION,{transaction:n,data:s}),i&&(s=vu(s,0)),s}catch(s){if(s.code===Q.errors.CALL_EXCEPTION)return null;throw s}})}_fetchBytes(e,r){return Me(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?vu(n,0):null})}_getAddress(e,r){const n=GK[String(e)];if(n==null&&$e.throwError(`unsupported coin type: ${e}`,Q.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=de(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 zS(Er([[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 zS(Er([[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=FS.toWords(i.slice(2));return a.unshift(o),FS.encode(n.prefix,a)}}return null}getAddress(e){return Me(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===Hq?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===Q.errors.CALL_EXCEPTION)return null;throw i}const r=yield this._fetchBytes("0xf1cb7e06",Y1(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&$e.throwError("invalid or unsupported coin data",Q.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return Me(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;no[l])}return $e.throwError("invalid or unsupported content hash data",Q.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return Me(this,void 0,void 0,function*(){let r=Pt(e);r=Er([Y1(64),Y1(r.length),r]),r.length%32!==0&&(r=Er([r,qt("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",he(r));return n==null||n==="0x"?null:$u(n)})}}let J1=null,YK=1;class QK extends Uu{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),se(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=os(new.target,"getNetwork")(e);r?(se(this,"_network",r),this.emit("network",r,null)):$e.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return Me(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||$e.throwError("no network detected",Q.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:se(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return df(()=>this._ready().then(e=>e,e=>{if(!(e.code===Q.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return J1==null&&(J1=new be),J1}static getNetwork(e){return PK(e??"homestead")}ccipReadFetch(e,r,n){return Me(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const i=e.to.toLowerCase(),s=r.toLowerCase(),o=[];for(let a=0;a=0?null:JSON.stringify({data:s,sender:i}),u=yield Mx({url:c,errorPassThrough:!0},f,(h,p)=>(h.status=p.statusCode,h));if(u.data)return u.data;const d=u.message||"unknown error";if(u.status>=400&&u.status<500)return $e.throwError(`response not found during CCIP fetch: ${d}`,Q.errors.SERVER_ERROR,{url:l,errorMessage:d});o.push(d)}return $e.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,Q.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return Me(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const s=yield i;if(ef()-s.respTime<=e)return s.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=ef(),n=yr({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=ef();return i=ce.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return Me(this,void 0,void 0,function*(){const e=YK++,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)$e.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",$e.makeError("network block skew detected",Q.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;const s=this._emitted[i];s!=="pending"&&n-s>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{const s=i.hash;let o=this.getTransactionReceipt(s).then(a=>(!a||a.blockNumber==null||(this._emitted["t:"+s]=a.blockNumber,this.emit(s,a)),null)).catch(a=>{this.emit("error",a)});r.push(o);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);const s=i.filter;s.fromBlock=i._lastBlockNumber+1,s.toBlock=n;const o=s.toBlock-this._maxFilterBlockRange;o>s.fromBlock&&(s.fromBlock=o),s.fromBlock<0&&(s.fromBlock=0);const a=this.getLogs(s).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(c=>{c.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=c.blockNumber),this._emitted["b:"+c.blockHash]=c.blockNumber,this._emitted["t:"+c.transactionHash]=c.blockNumber,this.emit(s,c)})}).catch(l=>{this.emit("error",l),i._inflight=!1});r.push(a)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return Me(this,void 0,void 0,function*(){return $e.throwError("provider does not support network detection",Q.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return Me(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,e),yield US(0),this._network;const n=$e.makeError("underlying network changed",Q.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=ef();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return Me(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return Me(this,void 0,void 0,function*(){const s=yield this.getTransactionReceipt(e);return(s?s.confirmations:0)>=r?s:new Promise((o,a)=>{const l=[];let c=!1;const f=function(){return c?!0:(c=!0,l.forEach(d=>{d()}),!1)},u=d=>{d.confirmations{this.removeListener(e,u)}),i){let d=i.startBlock,h=null;const p=m=>Me(this,void 0,void 0,function*(){c||(yield US(1e3),this.getTransactionCount(i.from).then(x=>Me(this,void 0,void 0,function*(){if(!c){if(x<=i.nonce)d=m;else{{const b=yield this.getTransaction(e);if(b&&b.blockNumber!=null)return}for(h==null&&(h=d-3,h{c||this.once("block",p)}))});if(c)return;this.once("block",p),l.push(()=>{this.removeListener("block",p)})}if(typeof n=="number"&&n>0){const d=setTimeout(()=>{f()||a($e.makeError("timeout exceeded",Q.errors.TIMEOUT,{timeout:n}))},n);d.unref&&d.unref(),l.push(()=>{clearTimeout(d)})}})})}getBlockNumber(){return Me(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return Me(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return ce.from(e)}catch(r){return $e.throwError("bad result from backend",Q.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return Me(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield yr({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return ce.from(i)}catch(s){return $e.throwError("bad result from backend",Q.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:s})}})}getTransactionCount(e,r){return Me(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield yr({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return ce.from(i).toNumber()}catch(s){return $e.throwError("bad result from backend",Q.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:s})}})}getCode(e,r){return Me(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield yr({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return he(i)}catch(s){return $e.throwError("bad result from backend",Q.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:s})}})}getStorageAt(e,r,n){return Me(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield yr({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>mx(o))}),s=yield this.perform("getStorageAt",i);try{return he(s)}catch(o){return $e.throwError("bad result from backend",Q.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:s,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&Va(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&$e.throwError("Transaction hash mismatch from Provider.sendTransaction.",Q.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(s,o)=>Me(this,void 0,void 0,function*(){s==null&&(s=1),o==null&&(o=0);let a;s!==0&&n!=null&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const l=yield this._waitForTransaction(e.hash,s,o,a);return l==null&&s===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&$e.throwError("transaction failed",Q.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return Me(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(s=>he(s)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const s=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,s,i)}catch(s){throw s.transaction=n,s.transactionHash=n.hash,s}})}_getTransactionRequest(e){return Me(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?this._getAddress(s):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?ce.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?he(s):null))}),this.formatter.transactionRequest(yield yr(n))})}_getFilter(e){return Me(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield yr(r))})}_call(e,r,n){return Me(this,void 0,void 0,function*(){n>=VK&&$e.throwError("CCIP read exceeded maximum redirections",Q.errors.SERVER_ERROR,{redirects:n,transaction:e});const i=e.to,s=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&i!=null&&s.substring(0,10)==="0x556f1830"&&Va(s)%32===4)try{const o=Ir(s,4),a=Ir(o,0,32);ce.from(a).eq(i)||$e.throwError("CCIP Read sender did not match",Q.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:s});const l=[],c=ce.from(Ir(o,32,64)).toNumber(),f=ce.from(Ir(o,c,c+32)).toNumber(),u=Ir(o,c+32);for(let b=0;bMe(this,void 0,void 0,function*(){const s=yield this.perform("getBlock",i);if(s==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let o=null;for(let l=0;lthis._wrapTransaction(l)),a}return this.formatter.block(s)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return Me(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return df(()=>Me(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return Me(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return df(()=>Me(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return i}),{oncePoll:this})})}getLogs(e){return Me(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield yr({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),be.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return Me(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return Me(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&$e.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return Me(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const i=new HS(this,n,e);return r!==e&&!(yield i.supportsWildcard())?null:i}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return Me(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||$e.throwError("network does not support ENS",Q.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+ah(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return Me(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(Ze(e))throw n}typeof e!="string"&&$e.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return Me(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const i=dh(yield this.call({to:n,data:"0x691f3431"+ah(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return Me(this,void 0,void 0,function*(){let r=null;if(Ze(e)){const s=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(s,"getAvatar");if(!o)return null;r=new HS(this,o,s);try{const a=yield r.getAvatar();if(a)return a.url}catch(a){if(a.code!==Q.errors.CALL_EXCEPTION)throw a}try{const a=dh(yield this.call({to:o,data:"0x691f3431"+ah(s).substring(2)}),0);r=yield this.getResolver(a)}catch(a){if(a.code!==Q.errors.CALL_EXCEPTION)throw a;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return $e.throwError(e+" not implemented",Q.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const i=new WK(hl(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=hl(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=hl(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=hl(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=hl(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=hl(e);this._events=this._events.filter(i=>i.tag!==n?!0:(r.push(i),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var Is=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(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Sr=new Q(Nx),JK=["call","estimateGas"];function _f(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=Ze(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=_f(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return _f(JSON.parse(t),e)}catch{}return null}function _9(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const s=_f(e,!0);if(s)return s.data;Sr.throwError("missing revert data in call exception; Transaction reverted without a reason string",Q.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let s=_f(e.body,!1);s==null&&(s=_f(e,!1)),s&&Sr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Q.errors.UNPREDICTABLE_GAS_LIMIT,{reason:s.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===Q.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Sr.throwError("insufficient funds for intrinsic transaction cost",Q.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&Sr.throwError("nonce has already been used",Q.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Sr.throwError("replacement fee too low",Q.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&Sr.throwError("legacy pre-eip-155 transactions not supported",Q.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),JK.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Sr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Q.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function WS(t){return new Promise(function(e){setTimeout(e,t)})}function XK(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 tf(t){return t&&t.toLowerCase()}const nm={};class I9 extends Tc{constructor(e,r,n){if(super(),e!==nm)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");se(this,"provider",r),n==null&&(n=0),typeof n=="string"?(se(this,"_address",this.provider.formatter.address(n)),se(this,"_index",null)):typeof n=="number"?(se(this,"_index",n),se(this,"_address",null)):Sr.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Sr.throwError("cannot alter JSON-RPC Signer connection",Q.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new ZK(nm,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&&Sr.throwError("unknown account #"+this._index,Q.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Nr(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=Nr(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Is(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&Sr.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),yr({tx:yr(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Sr.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)&&Sr.throwError("user rejected transaction",Q.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),_9("sendTransaction",o,s)))})}signTransaction(e){return Sr.throwError("signing transactions is unsupported",Q.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Is(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 df(()=>Is(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 Is(this,void 0,void 0,function*(){const r=typeof e=="string"?Pt(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[he(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Sr.throwError("user rejected signing",Q.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return Is(this,void 0,void 0,function*(){const r=typeof e=="string"?Pt(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),he(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Sr.throwError("user rejected signing",Q.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return Is(this,void 0,void 0,function*(){const i=yield pn.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(pn.getPayload(i.domain,r,i.value))])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&Sr.throwError("user rejected signing",Q.errors.ACTION_REJECTED,{action:"_signTypedData",from:s,messageData:{domain:i.domain,types:r,value:i.value}}),o}})}unlock(e){return Is(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class ZK extends I9{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 eY={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let O9=class extends QK{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=os(this.constructor,"defaultUrl")()),typeof e=="string"?se(this,"connection",Object.freeze({url:e})):se(this,"connection",Object.freeze(Nr(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 Is(this,void 0,void 0,function*(){yield WS(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=os(this.constructor,"getNetwork");try{return r(ce.from(e).toNumber())}catch(n){return Sr.throwError("could not detect network",Q.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Sr.throwError("could not detect network",Q.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new I9(nm,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:qa(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const s=Mx(this.connection,JSON.stringify(n),XK).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",[tf(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[tf(r.address),r.blockTag]];case"getCode":return["eth_getCode",[tf(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[tf(r.address),qt(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",[os(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[os(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=tf(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return Is(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=r.transaction;if(i&&i.type!=null&&ce.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const s=yield this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(r=Nr(r),r.transaction=Nr(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&Sr.throwError(e+" not implemented",Q.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return _9(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 WS(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=Nr(eY);if(r)for(const s in r)r[s]&&(n[s]=!0);c7(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(s){if(e[s]==null)return;const o=mx(ce.from(e[s]));s==="gasLimit"&&(s="gas"),i[s]=o}),["from","to","data"].forEach(function(s){e[s]!=null&&(i[s]=he(e[s]))}),e.accessList&&(i.accessList=Oc(e.accessList)),i}};const tY="units/5.7.0",rY=new Q(tY),M9=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Dx(t,e){if(typeof e=="string"){const r=M9.indexOf(e);r!==-1&&(e=3*r)}return sh(t,e??18)}function pu(t,e){if(typeof t!="string"&&rY.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=M9.indexOf(e);r!==-1&&(e=3*r)}return Yi(t,e??18)}function nY(t){return Dx(t,18)}function GS(t){return pu(t,18)}const iY="1.10.0";function sY(t){var e="";return r(t),e;function r(i){if(i===null||typeof i!="object"||i.toJSON!=null)e+=JSON.stringify(i);else if(Array.isArray(i)){e+="[";var s=!1;i.forEach(function(a){s&&(e+=","),s=!0,a===void 0&&(a=null),r(a)}),e+="]"}else{e+="{";var o=Object.keys(i).filter(function(a){return i[a]!==void 0}).sort();o.forEach(function(a,l){return n(i,a,l)}),e+="}"}}function n(i,s,o){o>0&&(e+=","),e+=JSON.stringify(s),e+=":",r(i[s])}}let ee=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.SEPOLIA=11155111]="SEPOLIA",t[t.POLYGON=137]="POLYGON",t[t.POLYGON_MUMBAI=80001]="POLYGON_MUMBAI",t[t.POLYGON_ZKEVM=1101]="POLYGON_ZKEVM",t[t.POLYGON_AMOY=80002]="POLYGON_AMOY",t[t.BSC=56]="BSC",t[t.BSC_TESTNET=97]="BSC_TESTNET",t[t.OPTIMISM=10]="OPTIMISM",t[t.OPTIMISM_KOVAN=69]="OPTIMISM_KOVAN",t[t.OPTIMISM_GOERLI=420]="OPTIMISM_GOERLI",t[t.OPTIMISM_SEPOLIA=11155420]="OPTIMISM_SEPOLIA",t[t.ARBITRUM=42161]="ARBITRUM",t[t.ARBITRUM_GOERLI=421613]="ARBITRUM_GOERLI",t[t.ARBITRUM_SEPOLIA=421614]="ARBITRUM_SEPOLIA",t[t.ARBITRUM_NOVA=42170]="ARBITRUM_NOVA",t[t.AVALANCHE=43114]="AVALANCHE",t[t.AVALANCHE_TESTNET=43113]="AVALANCHE_TESTNET",t[t.GNOSIS=100]="GNOSIS",t[t.BASE=8453]="BASE",t[t.BASE_GOERLI=84531]="BASE_GOERLI",t[t.BASE_SEPOLIA=84532]="BASE_SEPOLIA",t[t.HOMEVERSE_TESTNET=40875]="HOMEVERSE_TESTNET",t[t.HOMEVERSE=19011]="HOMEVERSE",t[t.XAI=660279]="XAI",t[t.XAI_SEPOLIA=37714555429]="XAI_SEPOLIA",t[t.ASTAR_ZKEVM=3776]="ASTAR_ZKEVM",t[t.ASTAR_ZKYOTO=6038361]="ASTAR_ZKYOTO",t[t.XR_SEPOLIA=2730]="XR_SEPOLIA",t[t.TELOS=40]="TELOS",t[t.HARDHAT=31337]="HARDHAT",t[t.HARDHAT_2=31338]="HARDHAT_2",t}({}),Qe=function(t){return t.MAINNET="mainnet",t.TESTNET="testnet",t}({});const st={[ee.MAINNET]:{chainId:ee.MAINNET,type:Qe.MAINNET,name:"mainnet",title:"Ethereum",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.MAINNET}.webp`,blockExplorer:{name:"Etherscan",rootUrl:"https://etherscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},[ee.ROPSTEN]:{chainId:ee.ROPSTEN,type:Qe.TESTNET,name:"ropsten",title:"Ropsten",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.ROPSTEN}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Ropsten)",rootUrl:"https://ropsten.etherscan.io/"},nativeToken:{symbol:"roETH",name:"Ropsten Ether",decimals:18},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",deprecated:!0},[ee.RINKEBY]:{chainId:ee.RINKEBY,type:Qe.TESTNET,name:"rinkeby",title:"Rinkeby",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.RINKEBY}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Rinkeby)",rootUrl:"https://rinkeby.etherscan.io/"},nativeToken:{symbol:"rETH",name:"Rinkeby Ether",decimals:18},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",deprecated:!0},[ee.GOERLI]:{chainId:ee.GOERLI,type:Qe.TESTNET,name:"goerli",title:"Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.GOERLI}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Goerli)",rootUrl:"https://goerli.etherscan.io/"},nativeToken:{symbol:"gETH",name:"Goerli Ether",decimals:18},ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",deprecated:!0},[ee.KOVAN]:{chainId:ee.KOVAN,type:Qe.TESTNET,name:"kovan",title:"Kovan",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.KOVAN}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Kovan)",rootUrl:"https://kovan.etherscan.io/"},nativeToken:{symbol:"kETH",name:"Kovan Ether",decimals:18},deprecated:!0},[ee.SEPOLIA]:{chainId:ee.SEPOLIA,type:Qe.TESTNET,name:"sepolia",title:"Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Sepolia)",rootUrl:"https://sepolia.etherscan.io/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[ee.POLYGON]:{chainId:ee.POLYGON,type:Qe.MAINNET,name:"polygon",title:"Polygon",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.POLYGON}.webp`,blockExplorer:{name:"Polygonscan",rootUrl:"https://polygonscan.com/"},nativeToken:{symbol:"MATIC",name:"Polygon",decimals:18}},[ee.POLYGON_MUMBAI]:{chainId:ee.POLYGON_MUMBAI,type:Qe.TESTNET,name:"mumbai",title:"Polygon Mumbai",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.POLYGON_MUMBAI}.webp`,testnet:!0,blockExplorer:{name:"Polygonscan (Mumbai)",rootUrl:"https://mumbai.polygonscan.com/"},nativeToken:{symbol:"mMATIC",name:"Mumbai Polygon",decimals:18},deprecated:!0},[ee.POLYGON_AMOY]:{chainId:ee.POLYGON_AMOY,type:Qe.TESTNET,name:"amoy",title:"Polygon Amoy",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.POLYGON_AMOY}.webp`,testnet:!0,blockExplorer:{name:"OKLink (Amoy)",rootUrl:"https://www.oklink.com/amoy/"},nativeToken:{symbol:"aMATIC",name:"Amoy Polygon",decimals:18}},[ee.POLYGON_ZKEVM]:{chainId:ee.POLYGON_ZKEVM,type:Qe.MAINNET,name:"polygon-zkevm",title:"Polygon zkEVM",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.POLYGON_ZKEVM}.webp`,blockExplorer:{name:"Polygonscan (zkEVM)",rootUrl:"https://zkevm.polygonscan.com/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[ee.BSC]:{chainId:ee.BSC,type:Qe.MAINNET,name:"bsc",title:"BNB Smart Chain",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.BSC}.webp`,blockExplorer:{name:"BSCScan",rootUrl:"https://bscscan.com/"},nativeToken:{symbol:"BNB",name:"BNB",decimals:18}},[ee.BSC_TESTNET]:{chainId:ee.BSC_TESTNET,type:Qe.TESTNET,name:"bsc-testnet",title:"BNB Smart Chain Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.BSC_TESTNET}.webp`,testnet:!0,blockExplorer:{name:"BSCScan (Testnet)",rootUrl:"https://testnet.bscscan.com/"},nativeToken:{symbol:"tBNB",name:"Testnet BNB",decimals:18}},[ee.OPTIMISM]:{chainId:ee.OPTIMISM,type:Qe.MAINNET,name:"optimism",title:"Optimism",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.OPTIMISM}.webp`,blockExplorer:{name:"Etherscan (Optimism)",rootUrl:"https://optimistic.etherscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[ee.OPTIMISM_KOVAN]:{chainId:ee.OPTIMISM_KOVAN,type:Qe.TESTNET,name:"optimism-kovan",title:"Optimism Kovan",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.OPTIMISM_KOVAN}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Optimism Kovan)",rootUrl:"https://kovan-optimistic.etherscan.io/"},nativeToken:{symbol:"kETH",name:"Kovan Ether",decimals:18},deprecated:!0},[ee.OPTIMISM_GOERLI]:{chainId:ee.OPTIMISM_GOERLI,type:Qe.TESTNET,name:"optimism-goerli",title:"Optimism Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.OPTIMISM_GOERLI}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Optimism Goerli)",rootUrl:"https://goerli-optimistic.etherscan.io/"},nativeToken:{symbol:"gETH",name:"Goerli Ether",decimals:18},deprecated:!0},[ee.OPTIMISM_SEPOLIA]:{chainId:ee.OPTIMISM_SEPOLIA,type:Qe.TESTNET,name:"optimism-sepolia",title:"Optimism Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.OPTIMISM_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Etherscan (Optimism Sepolia)",rootUrl:"https://sepolia-optimistic.etherscan.io/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[ee.ARBITRUM]:{chainId:ee.ARBITRUM,type:Qe.MAINNET,name:"arbitrum",title:"Arbitrum One",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.ARBITRUM}.webp`,blockExplorer:{name:"Arbiscan",rootUrl:"https://arbiscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[ee.ARBITRUM_GOERLI]:{chainId:ee.ARBITRUM_GOERLI,type:Qe.TESTNET,name:"arbitrum-goerli",title:"Arbitrum Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.ARBITRUM_GOERLI}.webp`,testnet:!0,blockExplorer:{name:"Arbiscan (Goerli Testnet)",rootUrl:"https://testnet.arbiscan.io/"},nativeToken:{symbol:"gETH",name:"Goerli Ether",decimals:18},deprecated:!0},[ee.ARBITRUM_SEPOLIA]:{chainId:ee.ARBITRUM_SEPOLIA,type:Qe.TESTNET,name:"arbitrum-sepolia",title:"Arbitrum Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.ARBITRUM_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Arbiscan (Sepolia Testnet)",rootUrl:"https://sepolia.arbiscan.io/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[ee.ARBITRUM_NOVA]:{chainId:ee.ARBITRUM_NOVA,type:Qe.MAINNET,name:"arbitrum-nova",title:"Arbitrum Nova",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.ARBITRUM_NOVA}.webp`,blockExplorer:{name:"Arbiscan Nova",rootUrl:"https://nova.arbiscan.io/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[ee.AVALANCHE]:{chainId:ee.AVALANCHE,type:Qe.MAINNET,name:"avalanche",title:"Avalanche",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.AVALANCHE}.webp`,blockExplorer:{name:"Snowtrace",rootUrl:"https://subnets.avax.network/c-chain/"},nativeToken:{symbol:"AVAX",name:"AVAX",decimals:18}},[ee.AVALANCHE_TESTNET]:{chainId:ee.AVALANCHE_TESTNET,type:Qe.TESTNET,name:"avalanche-testnet",title:"Avalanche Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.AVALANCHE_TESTNET}.webp`,testnet:!0,blockExplorer:{name:"Snowtrace (Testnet)",rootUrl:"https://subnets-test.avax.network/c-chain/"},nativeToken:{symbol:"tAVAX",name:"Testnet AVAX",decimals:18}},[ee.GNOSIS]:{chainId:ee.GNOSIS,type:Qe.MAINNET,name:"gnosis",title:"Gnosis Chain",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.GNOSIS}.webp`,blockExplorer:{name:"Gnosis Chain Explorer",rootUrl:"https://blockscout.com/xdai/mainnet/"},nativeToken:{symbol:"XDAI",name:"XDAI",decimals:18}},[ee.BASE]:{chainId:ee.BASE,type:Qe.MAINNET,name:"base",title:"Base (Coinbase)",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.BASE}.webp`,blockExplorer:{name:"Base Explorer",rootUrl:"https://basescan.org/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[ee.BASE_GOERLI]:{chainId:ee.BASE_GOERLI,type:Qe.TESTNET,name:"base-goerli",title:"Base Goerli",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.BASE_GOERLI}.webp`,testnet:!0,blockExplorer:{name:"Base Goerli Explorer",rootUrl:"https://goerli.basescan.org/"},nativeToken:{symbol:"gETH",name:"Goerli Ether",decimals:18},deprecated:!0},[ee.BASE_SEPOLIA]:{chainId:ee.BASE_SEPOLIA,type:Qe.TESTNET,name:"base-sepolia",title:"Base Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.BASE_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Base Sepolia Explorer",rootUrl:"https://base-sepolia.blockscout.com/"},nativeToken:{symbol:"sETH",name:"Sepolia Ether",decimals:18}},[ee.HOMEVERSE]:{chainId:ee.HOMEVERSE,type:Qe.MAINNET,name:"homeverse",title:"Oasys Homeverse",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.HOMEVERSE}.webp`,blockExplorer:{name:"Oasys Homeverse Explorer",rootUrl:"https://explorer.oasys.homeverse.games/"},nativeToken:{symbol:"OAS",name:"OAS",decimals:18}},[ee.HOMEVERSE_TESTNET]:{chainId:ee.HOMEVERSE_TESTNET,type:Qe.TESTNET,name:"homeverse-testnet",title:"Oasys Homeverse Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.HOMEVERSE_TESTNET}.webp`,testnet:!0,blockExplorer:{name:"Oasys Homeverse Explorer (Testnet)",rootUrl:"https://explorer.testnet.oasys.homeverse.games/"},nativeToken:{symbol:"tOAS",name:"Testnet OAS",decimals:18}},[ee.XAI]:{chainId:ee.XAI,type:Qe.MAINNET,name:"xai",title:"Xai",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.XAI}.webp`,blockExplorer:{name:"Xai Explorer",rootUrl:"https://explorer.xai-chain.net/"},nativeToken:{symbol:"XAI",name:"XAI",decimals:18}},[ee.XAI_SEPOLIA]:{chainId:ee.XAI_SEPOLIA,type:Qe.TESTNET,name:"xai-sepolia",title:"Xai Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.XAI_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"Xai Sepolia Explorer",rootUrl:"https://testnet-explorer-v2.xai-chain.net/"},nativeToken:{symbol:"sXAI",name:"Sepolia XAI",decimals:18}},[ee.ASTAR_ZKEVM]:{chainId:ee.ASTAR_ZKEVM,type:Qe.MAINNET,name:"astar-zkevm",title:"Astar zkEVM",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.ASTAR_ZKEVM}.webp`,blockExplorer:{name:"Astar zkEVM Explorer",rootUrl:"https://astar-zkevm.explorer.startale.com/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[ee.ASTAR_ZKYOTO]:{chainId:ee.ASTAR_ZKYOTO,type:Qe.TESTNET,name:"astar-zkyoto",title:"Astar zKyoto Testnet",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.ASTAR_ZKYOTO}.webp`,testnet:!0,blockExplorer:{name:"Astar zKyoto Explorer",rootUrl:"https://astar-zkyoto.blockscout.com/"},nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[ee.XR_SEPOLIA]:{chainId:ee.XR_SEPOLIA,type:Qe.TESTNET,name:"xr-sepolia",title:"XR Sepolia",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.XR_SEPOLIA}.webp`,testnet:!0,blockExplorer:{name:"XR Sepolia Explorer",rootUrl:"https://xr-sepolia-testnet.explorer.caldera.xyz/"},nativeToken:{symbol:"tXR",name:"Sepolia XR",decimals:18}},[ee.TELOS]:{chainId:ee.TELOS,type:Qe.MAINNET,name:"telos",title:"Telos",logoURI:`https://assets.sequence.info/images/networks/medium/${ee.TELOS}.webp`,blockExplorer:{name:"Telos Explorer",rootUrl:"https://explorer.telos.net/network/"},nativeToken:{symbol:"TLOS",name:"TLOS",decimals:18}},[ee.HARDHAT]:{chainId:ee.HARDHAT,name:"hardhat",title:"Hardhat (local testnet)",nativeToken:{symbol:"ETH",name:"Ether",decimals:18}},[ee.HARDHAT_2]:{chainId:ee.HARDHAT_2,name:"hardhat2",title:"Hardhat (local testnet)",nativeToken:{symbol:"ETH",name:"Ether",decimals:18}}};function im(){return im=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(c=>c.chainId).sort(),s=i.filter((c,f)=>i.indexOf(c)!==f);if(s.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${s}`);return!1}n.forEach(c=>c.name=c.name.toLowerCase());const o=n.map(c=>c.name).sort(),a=o.filter((c,f)=>o.indexOf(c)!==f);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let c=0;c(aY(t,!0,e),t),cY=t=>lY(uY(t)),fY=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=ce.from(e).toNumber();return t.find(n=>n.chainId===r)}else return t.find(r=>r.name===e||`${r.chainId}`===e);else{if(typeof e=="number")return t.find(r=>r.chainId===e);if(e.chainId)return t.find(r=>r.chainId===e.chainId);if(ce.isBigNumber(e)){const r=e.toNumber();return t.find(n=>n.chainId===r)}else return}},uY=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},Lx=(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})):"",N9=t=>Lx("https://${network}-indexer.sequence.app",{network:t}),dY=t=>Lx("https://${network}-relayer.sequence.app",{network:t}),hY=t=>Lx("https://nodes.sequence.app/${network}",{network:t});function KS(t){return fY(vY,t)}const Ct=t=>{const e=hY(t);return{rpcUrl:e,relayer:{url:dY(t),provider:{url:e}},indexerUrl:N9(t)}},vY=cY([rt({},st[ee.POLYGON],Ct("polygon"),{isDefaultChain:!0,isAuthChain:!0}),rt({},st[ee.MAINNET],Ct("mainnet")),rt({},st[ee.BSC],Ct("bsc")),rt({},st[ee.AVALANCHE],Ct("avalanche")),rt({},st[ee.ARBITRUM],Ct("arbitrum")),rt({},st[ee.ARBITRUM_NOVA],Ct("arbitrum-nova")),rt({},st[ee.OPTIMISM],Ct("optimism")),rt({},st[ee.OPTIMISM_SEPOLIA],Ct("optimism-sepolia")),rt({},st[ee.POLYGON_ZKEVM],Ct("polygon-zkevm")),rt({},st[ee.GNOSIS],Ct("gnosis")),rt({},st[ee.RINKEBY],Ct("rinkeby"),{disabled:!0}),rt({},st[ee.GOERLI],Ct("goerli"),{disabled:!0}),rt({},st[ee.SEPOLIA],Ct("sepolia")),rt({},st[ee.POLYGON_MUMBAI],Ct("mumbai"),{disabled:!0}),rt({},st[ee.POLYGON_AMOY],Ct("amoy")),rt({},st[ee.BSC_TESTNET],Ct("bsc-testnet")),rt({},st[ee.ARBITRUM_SEPOLIA],Ct("arbitrum-sepolia")),rt({},st[ee.BASE],Ct("base")),rt({},st[ee.BASE_SEPOLIA],Ct("base-sepolia")),rt({},st[ee.HOMEVERSE],Ct("homeverse")),rt({},st[ee.HOMEVERSE_TESTNET],Ct("homeverse-testnet")),rt({},st[ee.XAI],Ct("xai")),rt({},st[ee.XAI_SEPOLIA],Ct("xai-sepolia")),rt({},st[ee.AVALANCHE_TESTNET],Ct("avalanche-testnet")),rt({},st[ee.ASTAR_ZKEVM],Ct("astar-zkevm")),rt({},st[ee.ASTAR_ZKYOTO],Ct("astar-zkyoto")),rt({},st[ee.XR_SEPOLIA],Ct("xr-sepolia")),rt({},st[ee.TELOS],Ct("telos")),rt({},st[ee.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),rt({},st[ee.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]),pY=(t,e)=>e.some(r=>t instanceof r);let YS,QS;function yY(){return YS||(YS=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function mY(){return QS||(QS=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const D9=new WeakMap,sm=new WeakMap,L9=new WeakMap,X1=new WeakMap,jx=new WeakMap;function gY(t){const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{r(Uo(t.result)),i()},o=()=>{n(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&D9.set(r,t)}).catch(()=>{}),jx.set(e,t),e}function xY(t){if(sm.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)});sm.set(t,e)}let om={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return sm.get(t);if(e==="objectStoreNames")return t.objectStoreNames||L9.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Uo(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 bY(t){om=t(om)}function wY(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(Z1(this),e,...r);return L9.set(n,e.sort?e.sort():[e]),Uo(n)}:mY().includes(t)?function(...e){return t.apply(Z1(this),e),Uo(D9.get(this))}:function(...e){return Uo(t.apply(Z1(this),e))}}function EY(t){return typeof t=="function"?wY(t):(t instanceof IDBTransaction&&xY(t),pY(t,yY())?new Proxy(t,om):t)}function Uo(t){if(t instanceof IDBRequest)return gY(t);if(X1.has(t))return X1.get(t);const e=EY(t);return e!==t&&(X1.set(t,e),jx.set(e,t)),e}const Z1=t=>jx.get(t);function AY(t,e,{blocked:r,upgrade:n,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),a=Uo(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Uo(o.result),l.oldVersion,l.newVersion,Uo(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),a.then(l=>{s&&l.addEventListener("close",()=>s()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}const SY=["get","getKey","getAll","getAllKeys","count"],CY=["put","add","delete","clear"],ep=new Map;function JS(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(ep.get(e))return ep.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,i=CY.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||SY.includes(r)))return;const s=async function(o,...a){const l=this.transaction(o,i?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(a.shift())),(await Promise.all([c[r](...a),i&&l.done]))[0]};return ep.set(e,s),s}bY(t=>({...t,get:(e,r,n)=>JS(e,r)||t.get(e,r,n),has:(e,r)=>!!JS(e,r)||t.has(e,r)}));const kY=t=>{let e=t.httpHandler;return{setHttpHandler(r){e=r},httpHandler(){return e},updateHttpClientConfig(r,n){e.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return e.httpHandlerConfigs()}}},TY=t=>({httpHandler:t.httpHandler()});var XS;(function(t){t.HEADER="header",t.QUERY="query"})(XS||(XS={}));var ZS;(function(t){t.HEADER="header",t.QUERY="query"})(ZS||(ZS={}));var yu;(function(t){t.HTTP="http",t.HTTPS="https"})(yu||(yu={}));var m0;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(m0||(m0={}));var eC;(function(t){t[t.HEADER=0]="HEADER",t[t.TRAILER=1]="TRAILER"})(eC||(eC={}));const am="__smithy_context";var tC;(function(t){t.PROFILE="profile",t.SSO_SESSION="sso-session",t.SERVICES="services"})(tC||(tC={}));var rC;(function(t){t.HTTP_0_9="http/0.9",t.HTTP_1_0="http/1.0",t.TDS_8_0="tds/8.0"})(rC||(rC={}));class Yn{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const r=new Yn({...e,headers:{...e.headers}});return r.query&&(r.query=PY(r.query)),r}static isInstance(e){if(!e)return!1;const r=e;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query=="object"&&typeof r.headers=="object"}clone(){return Yn.clone(this)}}function PY(t){return Object.keys(t).reduce((e,r)=>{const n=t[r];return{...e,[r]:Array.isArray(n)?[...n]:n}},{})}class g0{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const r=e;return typeof r.statusCode=="number"&&typeof r.headers=="object"}}const RY=t=>e=>async r=>{if(!Yn.isInstance(r.request))return e(r);const{request:n}=r,{handlerProtocol:i=""}=t.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let s=n.hostname;n.port!=null&&(s+=`:${n.port}`),n.headers.host=s}return e(r)},_Y={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},IY=t=>({applyToStack:e=>{e.add(RY(t),_Y)}}),OY=()=>(t,e)=>async r=>{var n,i;try{const s=await t(r),{clientName:o,commandName:a,logger:l,dynamoDbDocumentClientOptions:c={}}=e,{overrideInputFilterSensitiveLog:f,overrideOutputFilterSensitiveLog:u}=c,d=f??e.inputFilterSensitiveLog,h=u??e.outputFilterSensitiveLog,{$metadata:p,...m}=s.output;return(n=l==null?void 0:l.info)==null||n.call(l,{clientName:o,commandName:a,input:d(r.input),output:h(m),metadata:p}),s}catch(s){const{clientName:o,commandName:a,logger:l,dynamoDbDocumentClientOptions:c={}}=e,{overrideInputFilterSensitiveLog:f}=c,u=f??e.inputFilterSensitiveLog;throw(i=l==null?void 0:l.error)==null||i.call(l,{clientName:o,commandName:a,input:u(r.input),error:s,metadata:s.$metadata}),s}},MY={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},NY=t=>({applyToStack:e=>{e.add(OY(),MY)}}),nC="X-Amzn-Trace-Id",DY="AWS_LAMBDA_FUNCTION_NAME",LY="_X_AMZN_TRACE_ID",jY=t=>e=>async r=>{const{request:n}=r;if(!Yn.isInstance(n)||t.runtime!=="node"||n.headers.hasOwnProperty(nC))return e(r);const i=process.env[DY],s=process.env[LY],o=a=>typeof a=="string"&&a.length>0;return o(i)&&o(s)&&(n.headers[nC]=s),e({...r,request:n})},FY={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},BY=t=>({applyToStack:e=>{e.add(jY(t),FY)}});function $Y(t){return{...t,customUserAgent:typeof t.customUserAgent=="string"?[[t.customUserAgent]]:t.customUserAgent}}const UY=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),j9=t=>UY.test(t)||t.startsWith("[")&&t.endsWith("]"),zY=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Fx=(t,e=!1)=>{if(!e)return zY.test(t);const r=t.split(".");for(const n of r)if(!Fx(n))return!1;return!0},x0={},mu="endpoints";function Xo(t){return typeof t!="object"||t==null?t:"ref"in t?`$${Xo(t.ref)}`:"fn"in t?`${t.fn}(${(t.argv||[]).map(Xo).join(", ")})`:JSON.stringify(t,null,2)}class Qn extends Error{constructor(e){super(e),this.name="EndpointError"}}const VY=(t,e)=>t===e,qY=t=>{const e=t.split("."),r=[];for(const n of e){const i=n.indexOf("[");if(i!==-1){if(n.indexOf("]")!==n.length-1)throw new Qn(`Path: '${t}' does not end with ']'`);const s=n.slice(i+1,-1);if(Number.isNaN(parseInt(s)))throw new Qn(`Invalid array index: '${s}' in path: '${t}'`);i!==0&&r.push(n.slice(0,i)),r.push(s)}else r.push(n)}return r},F9=(t,e)=>qY(e).reduce((r,n)=>{if(typeof r!="object")throw new Qn(`Index '${n}' in '${e}' not found in '${JSON.stringify(t)}'`);return Array.isArray(r)?r[parseInt(n)]:r[n]},t),HY=t=>t!=null,WY=t=>!t,tp={[yu.HTTP]:80,[yu.HTTPS]:443},GY=t=>{const e=(()=>{try{if(t instanceof URL)return t;if(typeof t=="object"&&"hostname"in t){const{hostname:d,port:h,protocol:p="",path:m="",query:x={}}=t,b=new URL(`${p}//${d}${h?`:${h}`:""}${m}`);return b.search=Object.entries(x).map(([w,E])=>`${w}=${E}`).join("&"),b}return new URL(t)}catch{return null}})();if(!e)return console.error(`Unable to parse ${JSON.stringify(t)} as a whatwg URL.`),null;const r=e.href,{host:n,hostname:i,pathname:s,protocol:o,search:a}=e;if(a)return null;const l=o.slice(0,-1);if(!Object.values(yu).includes(l))return null;const c=j9(i),f=r.includes(`${n}:${tp[l]}`)||typeof t=="string"&&t.includes(`${n}:${tp[l]}`),u=`${n}${f?`:${tp[l]}`:""}`;return{scheme:l,authority:u,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:c}},KY=(t,e)=>t===e,YY=(t,e,r,n)=>e>=r||t.lengthencodeURIComponent(t).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),JY={booleanEquals:VY,getAttr:F9,isSet:HY,isValidHostLabel:Fx,not:WY,parseURL:GY,stringEquals:KY,substring:YY,uriEncode:QY},B9=(t,e)=>{const r=[],n={...e.endpointParams,...e.referenceRecord};let i=0;for(;i({...e.endpointParams,...e.referenceRecord})[t],Tv=(t,e,r)=>{if(typeof t=="string")return B9(t,r);if(t.fn)return $9(t,r);if(t.ref)return XY(t,r);throw new Qn(`'${e}': ${String(t)} is not a string, function or reference.`)},$9=({fn:t,argv:e},r)=>{const n=e.map(s=>["boolean","number"].includes(typeof s)?s:Tv(s,"arg",r)),i=t.split(".");return i[0]in x0&&i[1]!=null?x0[i[0]][i[1]](...n):JY[t](...n)},ZY=({assign:t,...e},r)=>{var i,s;if(t&&t in r.referenceRecord)throw new Qn(`'${t}' is already defined in Reference Record.`);const n=$9(e,r);return(s=(i=r.logger)==null?void 0:i.debug)==null||s.call(i,`${mu} evaluateCondition: ${Xo(e)} = ${Xo(n)}`),{result:n===""?!0:!!n,...t!=null&&{toAssign:{name:t,value:n}}}},Bx=(t=[],e)=>{var n,i;const r={};for(const s of t){const{result:o,toAssign:a}=ZY(s,{...e,referenceRecord:{...e.referenceRecord,...r}});if(!o)return{result:o};a&&(r[a.name]=a.value,(i=(n=e.logger)==null?void 0:n.debug)==null||i.call(n,`${mu} assign: ${a.name} := ${Xo(a.value)}`))}return{result:!0,referenceRecord:r}},eQ=(t,e)=>Object.entries(t).reduce((r,[n,i])=>({...r,[n]:i.map(s=>{const o=Tv(s,"Header value entry",e);if(typeof o!="string")throw new Qn(`Header '${n}' value '${o}' is not a string`);return o})}),{}),U9=(t,e)=>{if(Array.isArray(t))return t.map(r=>U9(r,e));switch(typeof t){case"string":return B9(t,e);case"object":if(t===null)throw new Qn(`Unexpected endpoint property: ${t}`);return z9(t,e);case"boolean":return t;default:throw new Qn(`Unexpected endpoint property type: ${typeof t}`)}},z9=(t,e)=>Object.entries(t).reduce((r,[n,i])=>({...r,[n]:U9(i,e)}),{}),tQ=(t,e)=>{const r=Tv(t,"Endpoint URL",e);if(typeof r=="string")try{return new URL(r)}catch(n){throw console.error(`Failed to construct URL with ${r}`,n),n}throw new Qn(`Endpoint URL must be a string, got ${typeof r}`)},rQ=(t,e)=>{var f,u;const{conditions:r,endpoint:n}=t,{result:i,referenceRecord:s}=Bx(r,e);if(!i)return;const o={...e,referenceRecord:{...e.referenceRecord,...s}},{url:a,properties:l,headers:c}=n;return(u=(f=e.logger)==null?void 0:f.debug)==null||u.call(f,`${mu} Resolving endpoint from template: ${Xo(n)}`),{...c!=null&&{headers:eQ(c,o)},...l!=null&&{properties:z9(l,o)},url:tQ(a,o)}},nQ=(t,e)=>{const{conditions:r,error:n}=t,{result:i,referenceRecord:s}=Bx(r,e);if(i)throw new Qn(Tv(n,"Error",{...e,referenceRecord:{...e.referenceRecord,...s}}))},iQ=(t,e)=>{const{conditions:r,rules:n}=t,{result:i,referenceRecord:s}=Bx(r,e);if(i)return V9(n,{...e,referenceRecord:{...e.referenceRecord,...s}})},V9=(t,e)=>{for(const r of t)if(r.type==="endpoint"){const n=rQ(r,e);if(n)return n}else if(r.type==="error")nQ(r,e);else if(r.type==="tree"){const n=iQ(r,e);if(n)return n}else throw new Qn(`Unknown endpoint rule: ${r}`);throw new Qn("Rules evaluation failed")},sQ=(t,e)=>{var c,f,u,d,h;const{endpointParams:r,logger:n}=e,{parameters:i,rules:s}=t;(f=(c=e.logger)==null?void 0:c.debug)==null||f.call(c,`${mu} Initial EndpointParams: ${Xo(r)}`);const o=Object.entries(i).filter(([,p])=>p.default!=null).map(([p,m])=>[p,m.default]);if(o.length>0)for(const[p,m]of o)r[p]=r[p]??m;const a=Object.entries(i).filter(([,p])=>p.required).map(([p])=>p);for(const p of a)if(r[p]==null)throw new Qn(`Missing required parameter: '${p}'`);const l=V9(s,{endpointParams:r,logger:n,referenceRecord:{}});if((u=e.endpointParams)!=null&&u.Endpoint)try{const p=new URL(e.endpointParams.Endpoint),{protocol:m,port:x}=p;l.url.protocol=m,l.url.port=x}catch{}return(h=(d=e.logger)==null?void 0:d.debug)==null||h.call(d,`${mu} Resolved endpoint: ${Xo(l)}`),l},q9=(t,e=!1)=>{if(e){for(const r of t.split("."))if(!q9(r))return!1;return!0}return!(!Fx(t)||t.length<3||t.length>63||t!==t.toLowerCase()||j9(t))},oQ=t=>{const e=t.split(":");if(e.length<6)return null;const[r,n,i,s,o,...a]=e;return r!=="arn"||n===""||i===""||a[0]===""?null:{partition:n,service:i,region:s,accountId:o,resourceId:a[0].includes("/")?a[0].split("/"):a}},aQ=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],lQ="1.1",cQ={partitions:aQ,version:lQ};let fQ=cQ;const uQ=t=>{const{partitions:e}=fQ;for(const n of e){const{regions:i,outputs:s}=n;for(const[o,a]of Object.entries(i))if(o===t)return{...s,...a}}for(const n of e){const{regionRegex:i,outputs:s}=n;if(new RegExp(i).test(t))return{...s}}const r=e.find(n=>n.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},H9={isVirtualHostableS3Bucket:q9,parseArn:oQ,partition:uQ};x0.aws=H9;const iC="user-agent",rp="x-amz-user-agent",sC=" ",np="/",dQ=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,hQ=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,oC="-",vQ=t=>(e,r)=>async n=>{var u,d;const{request:i}=n;if(!Yn.isInstance(i))return e(n);const{headers:s}=i,o=((u=r==null?void 0:r.userAgent)==null?void 0:u.map(ip))||[],a=(await t.defaultUserAgentProvider()).map(ip),l=((d=t==null?void 0:t.customUserAgent)==null?void 0:d.map(ip))||[],c=[].concat([...a,...o,...l]).join(sC),f=[...a.filter(h=>h.startsWith("aws-sdk-")),...l].join(sC);return t.runtime!=="browser"?(f&&(s[rp]=s[rp]?`${s[iC]} ${f}`:f),s[iC]=c):s[rp]=c,e({...n,request:i})},ip=t=>{var o;const e=t[0].split(np).map(a=>a.replace(dQ,oC)).join(np),r=(o=t[1])==null?void 0:o.replace(hQ,oC),n=e.indexOf(np),i=e.substring(0,n);let s=e.substring(n+1);return i==="api"&&(s=s.toLowerCase()),[i,s,r].filter(a=>a&&a.length>0).reduce((a,l,c)=>{switch(c){case 0:return l;case 1:return`${a}/${l}`;default:return`${a}#${l}`}},"")},pQ={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},yQ=t=>({applyToStack:e=>{e.add(vQ(t),pQ)}});var aC;(function(t){t.ENV="env",t.CONFIG="shared config entry"})(aC||(aC={}));const mQ=!1,gQ=!1,Pv=t=>t[am]||(t[am]={}),zo=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},W9=t=>typeof t=="string"&&(t.startsWith("fips-")||t.endsWith("-fips")),lC=t=>W9(t)?["fips-aws-global","aws-fips"].includes(t)?"us-east-1":t.replace(/fips-(dkr-|prod-)?|-fips/,""):t,xQ=t=>{const{region:e,useFipsEndpoint:r}=t;if(!e)throw new Error("Region is missing");return{...t,region:async()=>{if(typeof e=="string")return lC(e);const n=await e();return lC(n)},useFipsEndpoint:async()=>{const n=typeof e=="string"?e:await e();return W9(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()}}};function bQ(t){const e=new Map;for(const r of t)e.set(r.schemeId,r);return e}const wQ=(t,e)=>(r,n)=>async i=>{var c;const s=t.httpAuthSchemeProvider(await e.httpAuthSchemeParametersProvider(t,n,i.input)),o=bQ(t.httpAuthSchemes),a=Pv(n),l=[];for(const f of s){const u=o.get(f.schemeId);if(!u){l.push(`HttpAuthScheme \`${f.schemeId}\` was not enabled for this service.`);continue}const d=u.identityProvider(await e.identityProviderConfigProvider(t));if(!d){l.push(`HttpAuthScheme \`${f.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:h={},signingProperties:p={}}=((c=f.propertiesExtractor)==null?void 0:c.call(f,t,n))||{};f.identityProperties=Object.assign(f.identityProperties||{},h),f.signingProperties=Object.assign(f.signingProperties||{},p),a.selectedHttpAuthScheme={httpAuthOption:f,identity:await d(f.identityProperties),signer:u.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(l.join(` +`));return r(i)},EQ=async t=>{const e=(t==null?void 0:t.Bucket)||"";if(typeof t.Bucket=="string"&&(t.Bucket=e.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),TQ(e)){if(t.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!kQ(e)||e.indexOf(".")!==-1&&!String(t.Endpoint).startsWith("http:")||e.toLowerCase()!==e||e.length<3)&&(t.ForcePathStyle=!0);return t.DisableMultiRegionAccessPoints&&(t.disableMultiRegionAccessPoints=!0,t.DisableMRAP=!0),t},AQ=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,SQ=/(\d+\.){3}\d+/,CQ=/\.\./,kQ=t=>AQ.test(t)&&!SQ.test(t)&&!CQ.test(t),TQ=t=>{const[e,r,n,,,i]=t.split(":"),s=e==="arn"&&t.split(":").length>=6,o=!!(s&&r&&n&&i);if(s&&!o)throw new Error(`Invalid ARN: ${t} was an invalid ARN.`);return o},PQ=(t,e,r)=>{const n=async()=>{const i=r[t]??r[e];return typeof i=="function"?i():i};return t==="credentialScope"||e==="CredentialScope"?async()=>{const i=typeof r.credentials=="function"?await r.credentials():r.credentials;return(i==null?void 0:i.credentialScope)??(i==null?void 0:i.CredentialScope)}:t==="accountId"||e==="AccountId"?async()=>{const i=typeof r.credentials=="function"?await r.credentials():r.credentials;return(i==null?void 0:i.accountId)??(i==null?void 0:i.AccountId)}:t==="endpoint"||e==="endpoint"?async()=>{const i=await n();if(i&&typeof i=="object"){if("url"in i)return i.url.href;if("hostname"in i){const{protocol:s,hostname:o,port:a,path:l}=i;return`${s}//${o}${a?":"+a:""}${l}`}}return i}:n},RQ=async t=>{};function _Q(t){const e={};if(t=t.replace(/^\?/,""),t)for(const r of t.split("&")){let[n,i=null]=r.split("=");n=decodeURIComponent(n),i&&(i=decodeURIComponent(i)),n in e?Array.isArray(e[n])?e[n].push(i):e[n]=[e[n],i]:e[n]=i}return e}const b0=t=>{if(typeof t=="string")return b0(new URL(t));const{hostname:e,pathname:r,port:n,protocol:i,search:s}=t;let o;return s&&(o=_Q(s)),{hostname:e,port:n?parseInt(n):void 0,protocol:i,path:r,query:o}},G9=t=>typeof t=="object"?"url"in t?b0(t.url):t:b0(t),IQ=async(t,e,r,n)=>{if(!r.endpoint){const o=await RQ(r.serviceId||"");o&&(r.endpoint=()=>Promise.resolve(G9(o)))}const i=await OQ(t,e,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(i,n)},OQ=async(t,e,r)=>{var s;const n={},i=((s=e==null?void 0:e.getEndpointParameterInstructions)==null?void 0:s.call(e))||{};for(const[o,a]of Object.entries(i))switch(a.type){case"staticContextParams":n[o]=a.value;break;case"contextParams":n[o]=t[a.name];break;case"clientContextParams":case"builtInParams":n[o]=await PQ(a.name,o,r)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(i).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await EQ(n),n},MQ=({config:t,instructions:e})=>(r,n)=>async i=>{var a,l,c;const s=await IQ(i.input,{getEndpointParameterInstructions(){return e}},{...t},n);n.endpointV2=s,n.authSchemes=(a=s.properties)==null?void 0:a.authSchemes;const o=(l=n.authSchemes)==null?void 0:l[0];if(o){n.signing_region=o.signingRegion,n.signing_service=o.signingName;const f=Pv(n),u=(c=f==null?void 0:f.selectedHttpAuthScheme)==null?void 0:c.httpAuthOption;u&&(u.signingProperties=Object.assign(u.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return r({...i})},NQ=(t,e)=>r=>async n=>{const{response:i}=await r(n);try{const s=await e(i,t);return{response:i,output:s}}catch(s){if(Object.defineProperty(s,"$response",{value:i}),!("$metadata"in s)){const o="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";s.message+=` + `+o,typeof s.$responseBodyText<"u"&&s.$response&&(s.$response.body=s.$responseBodyText)}throw s}},DQ=(t,e)=>(r,n)=>async i=>{var a;const s=(a=n.endpointV2)!=null&&a.url&&t.urlParser?async()=>t.urlParser(n.endpointV2.url):t.endpoint;if(!s)throw new Error("No valid endpoint provider available.");const o=await e(i.input,{...t,endpoint:s});return r({...i,request:o})},LQ={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},$x={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Ux(t,e,r){return{applyToStack:n=>{n.add(NQ(t,r),LQ),n.add(DQ(t,e),$x)}}}const K9={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:$x.name},zx=(t,e)=>({applyToStack:r=>{r.addRelativeTo(MQ({config:t,instructions:e}),K9)}}),jQ=t=>{const e=t.tls??!0,{endpoint:r}=t,n=r!=null?async()=>G9(await zo(r)()):void 0;return{...t,endpoint:n,tls:e,isCustomEndpoint:!!r,useDualstackEndpoint:zo(t.useDualstackEndpoint??!1),useFipsEndpoint:zo(t.useFipsEndpoint??!1)}},FQ={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:K9.name},BQ=(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(wQ(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),FQ)}});$x.name;const $Q=t=>e=>{throw e},UQ=(t,e)=>{},zQ=t=>(e,r)=>async n=>{if(!Yn.isInstance(n.request))return e(n);const s=Pv(r).selectedHttpAuthScheme;if(!s)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:o={}},identity:a,signer:l}=s,c=await e({...n,request:await l.sign(n.request,a,o)}).catch((l.errorHandler||$Q)(o));return(l.successHandler||UQ)(c.response,o),c};var hc;(function(t){t.STANDARD="standard",t.ADAPTIVE="adaptive"})(hc||(hc={}));const w0=3,VQ=hc.STANDARD,qQ=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],HQ=["TimeoutError","RequestTimeout","RequestTimeoutException"],WQ=[500,502,503,504],GQ=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],KQ=t=>{var e;return(e=t.$metadata)==null?void 0:e.clockSkewCorrected},Y9=t=>{var e,r;return((e=t.$metadata)==null?void 0:e.httpStatusCode)===429||qQ.includes(t.name)||((r=t.$retryable)==null?void 0:r.throttling)==!0},Q9=t=>{var e;return KQ(t)||HQ.includes(t.name)||GQ.includes((t==null?void 0:t.code)||"")||WQ.includes(((e=t.$metadata)==null?void 0:e.httpStatusCode)||0)},YQ=t=>{var e;if(((e=t.$metadata)==null?void 0:e.httpStatusCode)!==void 0){const r=t.$metadata.httpStatusCode;return 500<=r&&r<=599&&!Q9(t)}return!1};class QQ{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(e==null?void 0:e.beta)??.7,this.minCapacity=(e==null?void 0:e.minCapacity)??1,this.minFillRate=(e==null?void 0:e.minFillRate)??.5,this.scaleConstant=(e==null?void 0:e.scaleConstant)??.4,this.smooth=(e==null?void 0:e.smooth)??.8;const r=this.getCurrentTimeInSeconds();this.lastThrottleTime=r,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const r=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise(n=>setTimeout(n,r))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}const r=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+r),this.lastTimestamp=e}updateClientSendingRate(e){let r;if(this.updateMeasuredRate(),Y9(e)){const i=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=i,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(i),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),r=Math.floor(e*2)/2;if(this.requestCount++,r>this.lastTxRateBucket){const n=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(n*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPrecise(e){return parseFloat(e.toFixed(8))}}const lm=100,J9=20*1e3,JQ=500,cC=500,XQ=5,ZQ=10,eJ=1,tJ="amz-sdk-invocation-id",rJ="amz-sdk-request",nJ=()=>{let t=lm;return{computeNextBackoffDelay:n=>Math.floor(Math.min(J9,Math.random()*2**n*t)),setDelayBase:n=>{t=n}}},fC=({retryDelay:t,retryCount:e,retryCost:r})=>({getRetryCount:()=>e,getRetryDelay:()=>Math.min(J9,t),getRetryCost:()=>r});class X9{constructor(e){this.maxAttempts=e,this.mode=hc.STANDARD,this.capacity=cC,this.retryBackoffStrategy=nJ(),this.maxAttemptsProvider=typeof e=="function"?e:async()=>e}async acquireInitialRetryToken(e){return fC({retryDelay:lm,retryCount:0})}async refreshRetryTokenForRetry(e,r){const n=await this.getMaxAttempts();if(this.shouldRetry(e,r,n)){const i=r.errorType;this.retryBackoffStrategy.setDelayBase(i==="THROTTLING"?JQ:lm);const s=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),o=r.retryAfterHint?Math.max(r.retryAfterHint.getTime()-Date.now()||0,s):s,a=this.getCapacityCost(i);return this.capacity-=a,fC({retryDelay:o,retryCount:e.getRetryCount()+1,retryCost:a})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(cC,this.capacity+(e.getRetryCost()??eJ))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${w0}`),w0}}shouldRetry(e,r,n){return e.getRetryCount()+1=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(e){return e==="TRANSIENT"?ZQ:XQ}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class iJ{constructor(e,r){this.maxAttemptsProvider=e,this.mode=hc.ADAPTIVE;const{rateLimiter:n}=r??{};this.rateLimiter=n??new QQ,this.standardRetryStrategy=new X9(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,r){return this.rateLimiter.updateClientSendingRate(r),this.standardRetryStrategy.refreshRetryTokenForRetry(e,r)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}let Rd;const sJ=new Uint8Array(16);function oJ(){if(!Rd&&(Rd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Rd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Rd(sJ)}const Vr=[];for(let t=0;t<256;++t)Vr.push((t+256).toString(16).slice(1));function aJ(t,e=0){return Vr[t[e+0]]+Vr[t[e+1]]+Vr[t[e+2]]+Vr[t[e+3]]+"-"+Vr[t[e+4]]+Vr[t[e+5]]+"-"+Vr[t[e+6]]+Vr[t[e+7]]+"-"+Vr[t[e+8]]+Vr[t[e+9]]+"-"+Vr[t[e+10]]+Vr[t[e+11]]+Vr[t[e+12]]+Vr[t[e+13]]+Vr[t[e+14]]+Vr[t[e+15]]}const lJ=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),uC={randomUUID:lJ};function cJ(t,e,r){if(uC.randomUUID&&!e&&!t)return uC.randomUUID();t=t||{};const n=t.random||(t.rng||oJ)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let i=0;i<16;++i)e[r+i]=n[i];return e}return aJ(n)}const fJ=t=>t instanceof Error?t:t instanceof Object?Object.assign(new Error,t):typeof t=="string"?new Error(t):new Error(`AWS SDK error wrapper for ${t}`),uJ=t=>{const{retryStrategy:e}=t,r=zo(t.maxAttempts??w0);return{...t,maxAttempts:r,retryStrategy:async()=>e||(await zo(t.retryMode)()===hc.ADAPTIVE?new iJ(r):new X9(r))}};class Z9{trace(){}debug(){}info(){}warn(){}error(){}}const ua=(t,e)=>{const r=[];if(t&&r.push(t),e)for(const n of e)r.push(n);return r},po=(t,e)=>`${t||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`,E0=()=>{let t=[],e=[],r=!1;const n=new Set,i=u=>u.sort((d,h)=>dC[h.step]-dC[d.step]||hC[h.priority||"normal"]-hC[d.priority||"normal"]),s=u=>{let d=!1;const h=p=>{const m=ua(p.name,p.aliases);if(m.includes(u)){d=!0;for(const x of m)n.delete(x);return!1}return!0};return t=t.filter(h),e=e.filter(h),d},o=u=>{let d=!1;const h=p=>{if(p.middleware===u){d=!0;for(const m of ua(p.name,p.aliases))n.delete(m);return!1}return!0};return t=t.filter(h),e=e.filter(h),d},a=u=>{var d;return t.forEach(h=>{u.add(h.middleware,{...h})}),e.forEach(h=>{u.addRelativeTo(h.middleware,{...h})}),(d=u.identifyOnResolve)==null||d.call(u,f.identifyOnResolve()),u},l=u=>{const d=[];return u.before.forEach(h=>{h.before.length===0&&h.after.length===0?d.push(h):d.push(...l(h))}),d.push(u),u.after.reverse().forEach(h=>{h.before.length===0&&h.after.length===0?d.push(h):d.push(...l(h))}),d},c=(u=!1)=>{const d=[],h=[],p={};return t.forEach(x=>{const b={...x,before:[],after:[]};for(const w of ua(b.name,b.aliases))p[w]=b;d.push(b)}),e.forEach(x=>{const b={...x,before:[],after:[]};for(const w of ua(b.name,b.aliases))p[w]=b;h.push(b)}),h.forEach(x=>{if(x.toMiddleware){const b=p[x.toMiddleware];if(b===void 0){if(u)return;throw new Error(`${x.toMiddleware} is not found when adding ${po(x.name,x.aliases)} middleware ${x.relation} ${x.toMiddleware}`)}x.relation==="after"&&b.after.push(x),x.relation==="before"&&b.before.push(x)}}),i(d).map(l).reduce((x,b)=>(x.push(...b),x),[])},f={add:(u,d={})=>{const{name:h,override:p,aliases:m}=d,x={step:"initialize",priority:"normal",middleware:u,...d},b=ua(h,m);if(b.length>0){if(b.some(w=>n.has(w))){if(!p)throw new Error(`Duplicate middleware name '${po(h,m)}'`);for(const w of b){const E=t.findIndex(N=>{var I;return N.name===w||((I=N.aliases)==null?void 0:I.some(F=>F===w))});if(E===-1)continue;const R=t[E];if(R.step!==x.step||x.priority!==R.priority)throw new Error(`"${po(R.name,R.aliases)}" middleware with ${R.priority} priority in ${R.step} step cannot be overridden by "${po(h,m)}" middleware with ${x.priority} priority in ${x.step} step.`);t.splice(E,1)}}for(const w of b)n.add(w)}t.push(x)},addRelativeTo:(u,d)=>{const{name:h,override:p,aliases:m}=d,x={middleware:u,...d},b=ua(h,m);if(b.length>0){if(b.some(w=>n.has(w))){if(!p)throw new Error(`Duplicate middleware name '${po(h,m)}'`);for(const w of b){const E=e.findIndex(N=>{var I;return N.name===w||((I=N.aliases)==null?void 0:I.some(F=>F===w))});if(E===-1)continue;const R=e[E];if(R.toMiddleware!==x.toMiddleware||R.relation!==x.relation)throw new Error(`"${po(R.name,R.aliases)}" middleware ${R.relation} "${R.toMiddleware}" middleware cannot be overridden by "${po(h,m)}" middleware ${x.relation} "${x.toMiddleware}" middleware.`);e.splice(E,1)}}for(const w of b)n.add(w)}e.push(x)},clone:()=>a(E0()),use:u=>{u.applyToStack(f)},remove:u=>typeof u=="string"?s(u):o(u),removeByTag:u=>{let d=!1;const h=p=>{const{tags:m,name:x,aliases:b}=p;if(m&&m.includes(u)){const w=ua(x,b);for(const E of w)n.delete(E);return d=!0,!1}return!0};return t=t.filter(h),e=e.filter(h),d},concat:u=>{var h;const d=a(E0());return d.use(u),d.identifyOnResolve(r||d.identifyOnResolve()||(((h=u.identifyOnResolve)==null?void 0:h.call(u))??!1)),d},applyToStack:a,identify:()=>c(!0).map(u=>{const d=u.step??u.relation+" "+u.toMiddleware;return po(u.name,u.aliases)+" - "+d}),identifyOnResolve(u){return typeof u=="boolean"&&(r=u),r},resolve:(u,d)=>{for(const h of c().map(p=>p.middleware).reverse())u=h(u,d);return r&&console.log(f.identify()),u}};return f},dC={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},hC={high:3,normal:2,low:1};class dJ{constructor(e){this.middlewareStack=E0(),this.config=e}send(e,r,n){const i=typeof r!="function"?r:void 0,s=typeof r=="function"?r:n,o=e.resolveMiddleware(this.middlewareStack,this.config,i);if(s)o(e).then(a=>s(null,a.output),a=>s(a)).catch(()=>{});else return o(e).then(a=>a.output)}destroy(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()}}const Zo={},Mc=new Array(64);for(let t=0,e="A".charCodeAt(0),r="Z".charCodeAt(0);t+e<=r;t++){const n=String.fromCharCode(t+e);Zo[n]=t,Mc[t]=n}for(let t=0,e="a".charCodeAt(0),r="z".charCodeAt(0);t+e<=r;t++){const n=String.fromCharCode(t+e),i=t+26;Zo[n]=i,Mc[i]=n}for(let t=0;t<10;t++){Zo[t.toString(10)]=t+52;const e=t.toString(10),r=t+52;Zo[e]=r,Mc[r]=e}Zo["+"]=62;Mc[62]="+";Zo["/"]=63;Mc[63]="/";const Yl=6,If=8,hJ=63,Vx=t=>{let e=t.length/4*3;t.slice(-2)==="=="?e-=2:t.slice(-1)==="="&&e--;const r=new ArrayBuffer(e),n=new DataView(r);for(let i=0;i>=Yl;const a=i/4*3;s>>=o%If;const l=Math.floor(o/If);for(let c=0;c>f)}}return new Uint8Array(r)},vc=t=>new TextEncoder().encode(t),Of=t=>typeof t=="string"?vc(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),eT=t=>{if(typeof t=="string")return t;if(typeof t!="object"||typeof t.byteOffset!="number"||typeof t.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(t)};function tT(t){let e;typeof t=="string"?e=vc(t):e=t;const r=typeof e=="object"&&typeof e.length=="number",n=typeof e=="object"&&typeof e.byteOffset=="number"&&typeof e.byteLength=="number";if(!r&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let s=0;s>f]}i+="==".slice(0,4-l)}return i}function vJ(t,e="utf-8"){return e==="base64"?tT(t):eT(t)}function pJ(t,e){return e==="base64"?Da.mutate(Vx(t)):Da.mutate(vc(t))}class Da extends Uint8Array{static fromString(e,r="utf-8"){switch(typeof e){case"string":return pJ(e,r);default:throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}}static mutate(e){return Object.setPrototypeOf(e,Da.prototype),e}transformToString(e="utf-8"){return vJ(this,e)}}const Ro=t=>encodeURIComponent(t).replace(/[!'()*]/g,yJ),yJ=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function mJ(t){const e=[];for(let r of Object.keys(t).sort()){const n=t[r];if(r=Ro(r),Array.isArray(n))for(let i=0,s=n.length;i{t&&setTimeout(()=>{const n=new Error(`Request did not complete within ${t} ms`);n.name="TimeoutError",r(n)},t)})}const sp={supported:void 0};class qx{static create(e){return typeof(e==null?void 0:e.handle)=="function"?e:new qx(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(r=>r||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),sp.supported===void 0&&(sp.supported=typeof Request<"u"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(e,{abortSignal:r}={}){this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,i=this.config.keepAlive===!0,s=this.config.credentials;if(r!=null&&r.aborted){const b=new Error("Request aborted");return b.name="AbortError",Promise.reject(b)}let o=e.path;const a=mJ(e.query||{});a&&(o+=`?${a}`),e.fragment&&(o+=`#${e.fragment}`);let l="";if(e.username!=null||e.password!=null){const b=e.username??"",w=e.password??"";l=`${b}:${w}@`}const{port:c,method:f}=e,u=`${e.protocol}//${l}${e.hostname}${c?`:${c}`:""}${o}`,d=f==="GET"||f==="HEAD"?void 0:e.body,h={body:d,headers:new Headers(e.headers),method:f,credentials:s};d&&(h.duplex="half"),typeof AbortController<"u"&&(h.signal=r),sp.supported&&(h.keepalive=i);let p=()=>{};const m=new Request(u,h),x=[fetch(m).then(b=>{const w=b.headers,E={};for(const N of w.entries())E[N[0]]=N[1];return b.body!=null?{response:new g0({headers:E,reason:b.statusText,statusCode:b.status,body:b.body})}:b.blob().then(N=>({response:new g0({headers:E,reason:b.statusText,statusCode:b.status,body:N})}))}),gJ(n)];return r&&x.push(new Promise((b,w)=>{const E=()=>{const R=new Error("Request aborted");R.name="AbortError",w(R)};if(typeof r.addEventListener=="function"){const R=r;R.addEventListener("abort",E,{once:!0}),p=()=>R.removeEventListener("abort",E)}else r.onabort=E})),Promise.race(x).finally(p)}updateHttpClientConfig(e,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=r,n))}httpHandlerConfigs(){return this.config??{}}}const xJ=t=>typeof Blob=="function"&&t instanceof Blob?bJ(t):wJ(t);async function bJ(t){const e=await EJ(t),r=Vx(e);return new Uint8Array(r)}async function wJ(t){const e=[],r=t.getReader();let n=!1,i=0;for(;!n;){const{done:a,value:l}=await r.read();l&&(e.push(l),i+=l.length),n=a}const s=new Uint8Array(i);let o=0;for(const a of e)s.set(a,o),o+=a.length;return s}function EJ(t){return new Promise((e,r)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));const i=n.result??"",s=i.indexOf(","),o=s>-1?s+1:i.length;e(i.substring(o))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(t)})}const rT={},cm={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),rT[t]=e,cm[e]=t}function AJ(t){if(t.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const e=new Uint8Array(t.length/2);for(let r=0;r{if(t instanceof Uint8Array)return Da.mutate(t);if(!t)return Da.mutate(new Uint8Array);const r=e.streamCollector(t);return Da.mutate(await r)};class Rv{constructor(){this.middlewareStack=E0()}static classBuilder(){return new CJ}resolveMiddlewareWithContext(e,r,n,{middlewareFn:i,clientName:s,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:l,smithyContext:c,additionalContext:f,CommandCtor:u}){for(const x of i.bind(this)(u,e,r,n))this.middlewareStack.use(x);const d=e.concat(this.middlewareStack),{logger:h}=r,p={logger:h,clientName:s,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:l,[am]:{commandInstance:this,...c},...f},{requestHandler:m}=r;return d.resolve(x=>m.handle(x.request,n||{}),p)}}class CJ{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,r,n={}){return this._smithyContext={service:e,operation:r,...n},this}c(e={}){return this._additionalContext=e,this}n(e,r){return this._clientName=e,this._commandName=r,this}f(e=n=>n,r=n=>n){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=r,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let r;return r=class extends Rv{static getEndpointParameterInstructions(){return e._ep}constructor(...[n]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=n??{},e._init(this)}resolveMiddleware(n,i,s){return this.resolveMiddlewareWithContext(n,i,s,{CommandCtor:r,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Br="***SensitiveInformation***";class Hx extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,Hx.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}const je=(t,e={})=>{Object.entries(e).filter(([,n])=>n!==void 0).forEach(([n,i])=>{(t[n]==null||t[n]==="")&&(t[n]=i)});const r=t.message||t.Message||"UnknownError";return t.message=r,delete t.Message,t},kJ=({output:t,parsedBody:e,exceptionCtor:r,errorCode:n})=>{const i=PJ(t),s=i.httpStatusCode?i.httpStatusCode+"":void 0,o=new r({name:(e==null?void 0:e.code)||(e==null?void 0:e.Code)||n||s||"UnknownError",$fault:"client",$metadata:i});throw je(o,e)},TJ=t=>({output:e,parsedBody:r,errorCode:n})=>{kJ({output:e,parsedBody:r,exceptionCtor:t,errorCode:n})},PJ=t=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}),RJ=t=>{switch(t){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},_J=t=>{const e=[];for(const r in m0){const n=m0[r];t[n]!==void 0&&e.push({algorithmId:()=>n,checksumConstructor:()=>t[n]})}return{_checksumAlgorithms:e,addChecksumAlgorithm(r){this._checksumAlgorithms.push(r)},checksumAlgorithms(){return this._checksumAlgorithms}}},IJ=t=>{const e={};return t.checksumAlgorithms().forEach(r=>{e[r.algorithmId()]=r.checksumConstructor()}),e},OJ=t=>{let e=t.retryStrategy;return{setRetryStrategy(r){e=r},retryStrategy(){return e}}},MJ=t=>{const e={};return e.retryStrategy=t.retryStrategy(),e},NJ=t=>({..._J(t),...OJ(t)}),DJ=t=>({...IJ(t),...MJ(t)}),fm=function(){const t=Object.getPrototypeOf(this).constructor,e=Function.bind.apply(String,[null,...arguments]),r=new e;return Object.setPrototypeOf(r,t.prototype),r};fm.prototype=Object.create(String.prototype,{constructor:{value:fm,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(fm,String);const _e=t=>{if(t==null)return{};if(Array.isArray(t))return t.filter(e=>e!=null).map(_e);if(typeof t=="object"){const e={};for(const r of Object.keys(t))t[r]!=null&&(e[r]=_e(t[r]));return e}return t},LJ=t=>(t==null?void 0:t.body)instanceof ReadableStream,jJ=t=>(e,r)=>async n=>{var o;let i=await t.retryStrategy();const s=await t.maxAttempts();if(FJ(i)){i=i;let a=await i.acquireInitialRetryToken(r.partition_id),l=new Error,c=0,f=0;const{request:u}=n,d=Yn.isInstance(u);for(d&&(u.headers[tJ]=cJ());;)try{d&&(u.headers[rJ]=`attempt=${c+1}; max=${s}`);const{response:h,output:p}=await e(n);return i.recordSuccess(a),p.$metadata.attempts=c+1,p.$metadata.totalRetryDelay=f,{response:h,output:p}}catch(h){const p=BJ(h);if(l=fJ(h),d&&LJ(u))throw(o=r.logger instanceof Z9?console:r.logger)==null||o.warn("An error was encountered in a non-retryable streaming request."),l;try{a=await i.refreshRetryTokenForRetry(a,p)}catch{throw l.$metadata||(l.$metadata={}),l.$metadata.attempts=c+1,l.$metadata.totalRetryDelay=f,l}c=a.getRetryCount();const m=a.getRetryDelay();f+=m,await new Promise(x=>setTimeout(x,m))}}else return i=i,i!=null&&i.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(e,n)},FJ=t=>typeof t.acquireInitialRetryToken<"u"&&typeof t.refreshRetryTokenForRetry<"u"&&typeof t.recordSuccess<"u",BJ=t=>{const e={error:t,errorType:$J(t)},r=zJ(t.$response);return r&&(e.retryAfterHint=r),e},$J=t=>Y9(t)?"THROTTLING":Q9(t)?"TRANSIENT":YQ(t)?"SERVER_ERROR":"CLIENT_ERROR",nT={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},UJ=t=>({applyToStack:e=>{e.add(jJ(t),nT)}}),zJ=t=>{if(!g0.isInstance(t))return;const e=Object.keys(t.headers).find(s=>s.toLowerCase()==="retry-after");if(!e)return;const r=t.headers[e],n=Number(r);return Number.isNaN(n)?new Date(r):new Date(n*1e3)},VJ={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:nT.name},qJ=t=>({applyToStack:e=>{e.addRelativeTo(zQ(),VJ)}});class HJ{constructor(e){this.authSchemes=new Map;for(const[r,n]of Object.entries(e))n!==void 0&&this.authSchemes.set(r,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}class WJ{async sign(e,r,n){return e}}const GJ=t=>e=>iT(e)&&e.expiration.getTime()-Date.now()t.expiration!==void 0,QJ=(t,e,r)=>{if(t===void 0)return;const n=typeof t!="function"?async()=>Promise.resolve(t):t;let i,s,o,a=!1;const l=async c=>{s||(s=n(c));try{i=await s,o=!0,a=!1}finally{s=void 0}return i};return e===void 0?async c=>((!o||c!=null&&c.forceRefresh)&&(i=await l(c)),i):async c=>((!o||c!=null&&c.forceRefresh)&&(i=await l(c)),a?i:r(i)?(e(i)&&await l(c),i):(a=!0,i))},_d=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},vC="content-length";function JJ(t){return e=>async r=>{const n=r.request;if(Yn.isInstance(n)){const{body:i,headers:s}=n;if(i&&Object.keys(s).map(o=>o.toLowerCase()).indexOf(vC)===-1)try{const o=t(i);n.headers={...n.headers,[vC]:String(o)}}catch{}}return e({...r,request:n})}}const XJ={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},ZJ=t=>({applyToStack:e=>{e.add(JJ(t.bodyLengthChecker),XJ)}}),pC=t=>{var e,r;return g0.isInstance(t)?((e=t.headers)==null?void 0:e.date)??((r=t.headers)==null?void 0:r.Date):void 0},sT=t=>new Date(Date.now()+t),eX=(t,e)=>Math.abs(sT(e).getTime()-t)>=3e5,yC=(t,e)=>{const r=Date.parse(t);return eX(r,e)?r-Date.now():e},Mf=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},tX=async t=>{var c,f,u;const e=Mf("context",t.context),r=Mf("config",t.config),n=(u=(f=(c=e.endpointV2)==null?void 0:c.properties)==null?void 0:f.authSchemes)==null?void 0:u[0],s=await Mf("signer",r.signer)(n),o=t==null?void 0:t.signingRegion,a=t==null?void 0:t.signingRegionSet,l=t==null?void 0:t.signingName;return{config:r,signer:s,signingRegion:o,signingRegionSet:a,signingName:l}};class rX{async sign(e,r,n){var u;if(!Yn.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await tX(n),{config:s,signer:o}=i;let{signingRegion:a,signingName:l}=i;const c=n.context;if(((u=c==null?void 0:c.authSchemes)==null?void 0:u.length)??0>1){const[d,h]=c.authSchemes;(d==null?void 0:d.name)==="sigv4a"&&(h==null?void 0:h.name)==="sigv4"&&(a=(h==null?void 0:h.signingRegion)??a,l=(h==null?void 0:h.signingName)??l)}return await o.sign(e,{signingDate:sT(s.systemClockOffset),signingRegion:a,signingService:l})}errorHandler(e){return r=>{const n=r.ServerTime??pC(r.$response);if(n){const i=Mf("config",e.config),s=i.systemClockOffset;i.systemClockOffset=yC(n,i.systemClockOffset),i.systemClockOffset!==s&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(e,r){const n=pC(e);if(n){const i=Mf("config",r.config);i.systemClockOffset=yC(n,i.systemClockOffset)}}}const nX="X-Amz-Algorithm",iX="X-Amz-Credential",oT="X-Amz-Date",sX="X-Amz-SignedHeaders",oX="X-Amz-Expires",aT="X-Amz-Signature",lT="X-Amz-Security-Token",cT="authorization",fT=oT.toLowerCase(),aX="date",lX=[cT,fT,aX],cX=aT.toLowerCase(),um="x-amz-content-sha256",fX=lT.toLowerCase(),uX={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},dX=/^proxy-/,hX=/^sec-/,op="AWS4-HMAC-SHA256",vX="AWS4-HMAC-SHA256-PAYLOAD",pX="UNSIGNED-PAYLOAD",yX=50,uT="aws4_request",mX=60*60*24*7,Id={},ap=[],lp=(t,e,r)=>`${t}/${e}/${r}/${uT}`,gX=async(t,e,r,n,i)=>{const s=await mC(t,e.secretAccessKey,e.accessKeyId),o=`${r}:${n}:${i}:${ka(s)}:${e.sessionToken}`;if(o in Id)return Id[o];for(ap.push(o);ap.length>yX;)delete Id[ap.shift()];let a=`AWS4${e.secretAccessKey}`;for(const l of[r,n,i,uT])a=await mC(t,a,l);return Id[o]=a},mC=(t,e,r)=>{const n=new t(e);return n.update(Of(r)),n.digest()},gC=({headers:t},e,r)=>{const n={};for(const i of Object.keys(t).sort()){if(t[i]==null)continue;const s=i.toLowerCase();(s in uX||e!=null&&e.has(s)||dX.test(s)||hX.test(s))&&(!r||r&&!r.has(s))||(n[s]=t[i].trim().replace(/\s+/g," "))}return n},xX=({query:t={}})=>{const e=[],r={};for(const n of Object.keys(t).sort()){if(n.toLowerCase()===cX)continue;e.push(n);const i=t[n];typeof i=="string"?r[n]=`${Ro(n)}=${Ro(i)}`:Array.isArray(i)&&(r[n]=i.slice(0).reduce((s,o)=>s.concat([`${Ro(n)}=${Ro(o)}`]),[]).sort().join("&"))}return e.map(n=>r[n]).filter(n=>n).join("&")},bX=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]",cp=async({headers:t,body:e},r)=>{for(const n of Object.keys(t))if(n.toLowerCase()===um)return t[n];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||bX(e)){const n=new r;return n.update(Of(e)),ka(await n.digest())}return pX};class wX{format(e){const r=[];for(const s of Object.keys(e)){const o=vc(s);r.push(Uint8Array.from([o.byteLength]),o,this.formatHeaderValue(e[s]))}const n=new Uint8Array(r.reduce((s,o)=>s+o.byteLength,0));let i=0;for(const s of r)n.set(s,i),i+=s.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,e.value,!1),new Uint8Array(r.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(e.value.bytes,1),i;case"binary":const s=new DataView(new ArrayBuffer(3+e.value.byteLength));s.setUint8(0,6),s.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(s.buffer);return o.set(e.value,3),o;case"string":const a=vc(e.value),l=new DataView(new ArrayBuffer(3+a.byteLength));l.setUint8(0,7),l.setUint16(1,a.byteLength,!1);const c=new Uint8Array(l.buffer);return c.set(a,3),c;case"timestamp":const f=new Uint8Array(9);return f[0]=8,f.set(Wx.fromNumber(e.value.valueOf()).bytes,1),f;case"uuid":if(!EX.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const u=new Uint8Array(17);return u[0]=9,u.set(AJ(e.value.replace(/\-/g,"")),1),u}}}var xC;(function(t){t[t.boolTrue=0]="boolTrue",t[t.boolFalse=1]="boolFalse",t[t.byte=2]="byte",t[t.short=3]="short",t[t.integer=4]="integer",t[t.long=5]="long",t[t.byteArray=6]="byteArray",t[t.string=7]="string",t[t.timestamp=8]="timestamp",t[t.uuid=9]="uuid"})(xC||(xC={}));const EX=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Wx{constructor(e){if(this.bytes=e,e.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776e3||e<-9223372036854776e3)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const r=new Uint8Array(8);for(let n=7,i=Math.abs(Math.round(e));n>-1&&i>0;n--,i/=256)r[n]=i;return e<0&&bC(r),new Wx(r)}valueOf(){const e=this.bytes.slice(0),r=e[0]&128;return r&&bC(e),parseInt(ka(e),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function bC(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const AX=(t,e)=>{t=t.toLowerCase();for(const r of Object.keys(e))if(t===r.toLowerCase())return!0;return!1},SX=(t,e={})=>{var i;const{headers:r,query:n={}}=Yn.clone(t);for(const s of Object.keys(r)){const o=s.toLowerCase();o.slice(0,6)==="x-amz-"&&!((i=e.unhoistableHeaders)!=null&&i.has(o))&&(n[s]=r[s],delete r[s])}return{...t,headers:r,query:n}},wC=t=>{t=Yn.clone(t);for(const e of Object.keys(t.headers))lX.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t},CX=t=>kX(t).toISOString().replace(/\.\d{3}Z$/,"Z"),kX=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class EC{constructor({applyChecksum:e,credentials:r,region:n,service:i,sha256:s,uriEscapePath:o=!0}){this.headerFormatter=new wX,this.service=i,this.sha256=s,this.uriEscapePath=o,this.applyChecksum=typeof e=="boolean"?e:!0,this.regionProvider=zo(n),this.credentialProvider=zo(r)}async presign(e,r={}){const{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:s,unhoistableHeaders:o,signableHeaders:a,signingRegion:l,signingService:c}=r,f=await this.credentialProvider();this.validateResolvedCredentials(f);const u=l??await this.regionProvider(),{longDate:d,shortDate:h}=Od(n);if(i>mX)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const p=lp(h,u,c??this.service),m=SX(wC(e),{unhoistableHeaders:o});f.sessionToken&&(m.query[lT]=f.sessionToken),m.query[nX]=op,m.query[iX]=`${f.accessKeyId}/${p}`,m.query[oT]=d,m.query[oX]=i.toString(10);const x=gC(m,s,a);return m.query[sX]=AC(x),m.query[aT]=await this.getSignature(d,p,this.getSigningKey(f,u,h,c),this.createCanonicalRequest(m,x,await cp(e,this.sha256))),m}async sign(e,r){return typeof e=="string"?this.signString(e,r):e.headers&&e.payload?this.signEvent(e,r):e.message?this.signMessage(e,r):this.signRequest(e,r)}async signEvent({headers:e,payload:r},{signingDate:n=new Date,priorSignature:i,signingRegion:s,signingService:o}){const a=s??await this.regionProvider(),{shortDate:l,longDate:c}=Od(n),f=lp(l,a,o??this.service),u=await cp({headers:{},body:r},this.sha256),d=new this.sha256;d.update(e);const h=ka(await d.digest()),p=[vX,c,f,i,h,u].join(` +`);return this.signString(p,{signingDate:n,signingRegion:a,signingService:o})}async signMessage(e,{signingDate:r=new Date,signingRegion:n,signingService:i}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:r,signingRegion:n,signingService:i,priorSignature:e.priorSignature}).then(o=>({message:e.message,signature:o}))}async signString(e,{signingDate:r=new Date,signingRegion:n,signingService:i}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const o=n??await this.regionProvider(),{shortDate:a}=Od(r),l=new this.sha256(await this.getSigningKey(s,o,a,i));return l.update(Of(e)),ka(await l.digest())}async signRequest(e,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:s,signingService:o}={}){const a=await this.credentialProvider();this.validateResolvedCredentials(a);const l=s??await this.regionProvider(),c=wC(e),{longDate:f,shortDate:u}=Od(r),d=lp(u,l,o??this.service);c.headers[fT]=f,a.sessionToken&&(c.headers[fX]=a.sessionToken);const h=await cp(c,this.sha256);!AX(um,c.headers)&&this.applyChecksum&&(c.headers[um]=h);const p=gC(c,i,n),m=await this.getSignature(f,d,this.getSigningKey(a,l,u,o),this.createCanonicalRequest(c,p,h));return c.headers[cT]=`${op} Credential=${a.accessKeyId}/${d}, SignedHeaders=${AC(p)}, Signature=${m}`,c}createCanonicalRequest(e,r,n){const i=Object.keys(r).sort();return`${e.method} ${this.getCanonicalPath(e)} ${xX(e)} ${i.map(s=>`${s}:${r[s]}`).join(` `)} ${i.join(";")} -${n}`}async createStringToSign(e,r,n){const i=new this.sha256;i.update(Of(n));const s=await i.digest();return`${sp} +${n}`}async createStringToSign(e,r,n){const i=new this.sha256;i.update(Of(n));const s=await i.digest();return`${op} ${e} ${r} -${ka(s)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const r=[];for(const s of e.split("/"))(s==null?void 0:s.length)!==0&&s!=="."&&(s===".."?r.pop():r.push(s));const n=`${e!=null&&e.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&(e!=null&&e.endsWith("/"))?"/":""}`;return Ro(n).replace(/%2F/g,"/")}return e}async getSignature(e,r,n,i){const s=await this.createStringToSign(e,r,i),o=new this.sha256(await n);return o.update(Of(s)),ka(await o.digest())}getSigningKey(e,r,n,i){return gX(this.sha256,e,n,r,i||this.service)}validateResolvedCredentials(e){if(typeof e!="object"||typeof e.accessKeyId!="string"||typeof e.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}}const Od=t=>{const e=kX(t).replace(/[\-:]/g,"");return{longDate:e,shortDate:e.slice(0,8)}},AC=t=>Object.keys(t).sort().join(";"),PX=t=>{let e;t.credentials&&(e=QJ(t.credentials,YJ,nT)),e||(t.credentialDefaultProvider?e=_d(t.credentialDefaultProvider(Object.assign({},t,{parentClientConfig:t}))):e=async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:r=!0,systemClockOffset:n=t.systemClockOffset||0,sha256:i}=t;let s;return t.signer?s=_d(t.signer):t.regionInfoProvider?s=()=>_d(t.region)().then(async o=>[await t.regionInfoProvider(o,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},o]).then(([o,a])=>{const{signingRegion:l,signingService:c}=o;t.signingRegion=t.signingRegion||l||a,t.signingName=t.signingName||c||t.serviceId;const f={...t,credentials:e,region:t.signingRegion,service:t.signingName,sha256:i,uriEscapePath:r},u=t.signerConstructor||wC;return new u(f)}):s=async o=>{o=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await _d(t.region)(),properties:{}},o);const a=o.signingRegion,l=o.signingName;t.signingRegion=t.signingRegion||a,t.signingName=t.signingName||l||t.serviceId;const c={...t,credentials:e,region:t.signingRegion,service:t.signingName,sha256:i,uriEscapePath:r},f=t.signerConstructor||wC;return new f(c)},{...t,systemClockOffset:n,signingEscapePath:r,credentials:e,signer:s}},RX=(t,e)=>SJ(t,e).then(r=>e.utf8Encoder(r)),Rv=(t,e)=>RX(t,e).then(r=>{if(r.length)try{return JSON.parse(r)}catch(n){throw(n==null?void 0:n.name)==="SyntaxError"&&Object.defineProperty(n,"$responseBodyText",{value:r}),n}return{}}),_X=async(t,e)=>{const r=await Rv(t,e);return r.message=r.message??r.Message,r},IX=(t,e)=>{const r=(s,o)=>Object.keys(s).find(a=>a.toLowerCase()===o.toLowerCase()),n=s=>{let o=s;return typeof o=="number"&&(o=o.toString()),o.indexOf(",")>=0&&(o=o.split(",")[0]),o.indexOf(":")>=0&&(o=o.split(":")[0]),o.indexOf("#")>=0&&(o=o.split("#")[1]),o},i=r(t.headers,"x-amzn-errortype");if(i!==void 0)return n(t.headers[i]);if(e.code!==void 0)return n(e.code);if(e.__type!==void 0)return n(e.__type)},OX=async(t,e,r)=>({operation:Tv(e).operation,region:await zo(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function MX(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-idp",region:t.region},propertiesExtractor:(e,r)=>({signingProperties:{config:e,context:r}})}}function Ft(t){return{schemeId:"smithy.api#noAuth"}}const NX=t=>{const e=[];switch(t.operation){case"AssociateSoftwareToken":{e.push(Ft());break}case"ChangePassword":{e.push(Ft());break}case"ConfirmDevice":{e.push(Ft());break}case"ConfirmForgotPassword":{e.push(Ft());break}case"ConfirmSignUp":{e.push(Ft());break}case"DeleteUser":{e.push(Ft());break}case"DeleteUserAttributes":{e.push(Ft());break}case"ForgetDevice":{e.push(Ft());break}case"ForgotPassword":{e.push(Ft());break}case"GetDevice":{e.push(Ft());break}case"GetUser":{e.push(Ft());break}case"GetUserAttributeVerificationCode":{e.push(Ft());break}case"GlobalSignOut":{e.push(Ft());break}case"InitiateAuth":{e.push(Ft());break}case"ListDevices":{e.push(Ft());break}case"ResendConfirmationCode":{e.push(Ft());break}case"RespondToAuthChallenge":{e.push(Ft());break}case"RevokeToken":{e.push(Ft());break}case"SetUserMFAPreference":{e.push(Ft());break}case"SetUserSettings":{e.push(Ft());break}case"SignUp":{e.push(Ft());break}case"UpdateAuthEventFeedback":{e.push(Ft());break}case"UpdateDeviceStatus":{e.push(Ft());break}case"UpdateUserAttributes":{e.push(Ft());break}case"VerifySoftwareToken":{e.push(Ft());break}case"VerifyUserAttribute":{e.push(Ft());break}default:e.push(MX(t))}return e},DX=t=>({...PX(t)}),LX=t=>({...t,useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"}),Gx={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},jX="@aws-sdk/client-cognito-identity-provider",FX="AWS SDK for JavaScript Cognito Identity Provider Client for Node.js, Browser and React Native",BX="3.616.0",$X={build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-cognito-identity-provider","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo cognito-identity-provider"},UX="./dist-cjs/index.js",zX="./dist-types/index.d.ts",VX="./dist-es/index.js",HX=!1,qX={"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.616.0","@aws-sdk/client-sts":"3.616.0","@aws-sdk/core":"3.616.0","@aws-sdk/credential-provider-node":"3.616.0","@aws-sdk/middleware-host-header":"3.616.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.616.0","@aws-sdk/middleware-user-agent":"3.616.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.614.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.2.7","@smithy/fetch-http-handler":"^3.2.2","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.4","@smithy/middleware-endpoint":"^3.0.5","@smithy/middleware-retry":"^3.0.10","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.3","@smithy/protocol-http":"^4.0.4","@smithy/smithy-client":"^3.1.8","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.10","@smithy/util-defaults-mode-node":"^3.0.10","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},WX={"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},GX={node:">=16.0.0"},KX={"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},YX=["dist-*/**"],QX={name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},JX="Apache-2.0",XX={"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},ZX="https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-cognito-identity-provider",eZ={type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-cognito-identity-provider"},tZ={name:jX,description:FX,version:BX,scripts:$X,main:UX,types:zX,module:VX,sideEffects:HX,dependencies:qX,devDependencies:WX,engines:GX,typesVersions:KX,files:YX,author:QX,license:JX,browser:XX,"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:ZX,repository:eZ},rZ=t=>new TextEncoder().encode(t);var nZ=typeof Buffer<"u"&&Buffer.from?function(t){return Buffer.from(t,"utf8")}:rZ;function gu(t){return t instanceof Uint8Array?t:typeof t=="string"?nZ(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}function um(t){return typeof t=="string"?t.length===0:t.byteLength===0}var dT={name:"SHA-256"},EC={name:"HMAC",hash:dT},iZ=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const sZ={};function hh(){return typeof window<"u"?window:typeof self<"u"?self:sZ}var oZ=function(){function t(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return t.prototype.update=function(e){if(!um(e)){var r=gu(e),n=new Uint8Array(this.toHash.byteLength+r.byteLength);n.set(this.toHash,0),n.set(r,this.toHash.byteLength),this.toHash=n}},t.prototype.digest=function(){var e=this;return this.key?this.key.then(function(r){return hh().crypto.subtle.sign(EC,r,e.toHash).then(function(n){return new Uint8Array(n)})}):um(this.toHash)?Promise.resolve(iZ):Promise.resolve().then(function(){return hh().crypto.subtle.digest(dT,e.toHash)}).then(function(r){return Promise.resolve(new Uint8Array(r))})},t.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(r,n){hh().crypto.subtle.importKey("raw",gu(e.secret),EC,!1,["sign"]).then(r,n)}),this.key.catch(function(){}))},t}();function aZ(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})}function lZ(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(f){return l([c,f])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]dZ)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[r++],n--,this.bufferLength===ci&&(this.hashBuffer(),this.bufferLength=0)},t.prototype.digest=function(){if(!this.finished){var e=this.bytesHashed*8,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(r.setUint8(this.bufferLength++,128),n%ci>=ci-8){for(var i=this.bufferLength;i>>24&255,s[i*4+1]=this.state[i]>>>16&255,s[i*4+2]=this.state[i]>>>8&255,s[i*4+3]=this.state[i]>>>0&255;return s},t.prototype.hashBuffer=function(){for(var e=this,r=e.buffer,n=e.state,i=n[0],s=n[1],o=n[2],a=n[3],l=n[4],c=n[5],f=n[6],u=n[7],d=0;d>>17|h<<15)^(h>>>19|h<<13)^h>>>10;h=this.temp[d-15];var m=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[d]=(p+this.temp[d-7]|0)+(m+this.temp[d-16]|0)}var x=(((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&c^~l&f)|0)+(u+(fZ[d]+this.temp[d]|0)|0)|0,b=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&s^i&o^s&o)|0;u=f,f=c,c=l,l=a+x|0,a=o,o=s,s=i,i=x+b|0}n[0]+=i,n[1]+=s,n[2]+=o,n[3]+=a,n[4]+=l,n[5]+=c,n[6]+=f,n[7]+=u},t}(),hZ=function(){function t(e){this.secret=e,this.hash=new vh,this.reset()}return t.prototype.update=function(e){if(!(um(e)||this.error))try{this.hash.update(gu(e))}catch(r){this.error=r}},t.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},t.prototype.digest=function(){return aZ(this,void 0,void 0,function(){return lZ(this,function(e){return[2,this.digestSync()]})})},t.prototype.reset=function(){if(this.hash=new vh,this.secret){this.outer=new vh;var e=vZ(this.secret),r=new Uint8Array(ci);r.set(e);for(var n=0;nci){var r=new vh;r.update(e),e=r.digest()}var n=new Uint8Array(ci);return n.set(e),n}var pZ=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function yZ(t){if(mZ(t)&&typeof t.crypto.subtle=="object"){var e=t.crypto.subtle;return gZ(e)}return!1}function mZ(t){if(typeof t=="object"&&typeof t.crypto=="object"){var e=t.crypto.getRandomValues;return typeof e=="function"}return!1}function gZ(t){return t&&pZ.every(function(e){return typeof t[e]=="function"})}var xZ=function(){function t(e){yZ(hh())?this.hash=new oZ(e):this.hash=new hZ(e)}return t.prototype.update=function(e,r){this.hash.update(gu(e))},t.prototype.digest=function(){return this.hash.digest()},t.prototype.reset=function(){this.hash.reset()},t}();const bZ={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},hT={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},dr={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},dn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},xo={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class oe{static getFirstMatch(e,r){const n=r.match(e);return n&&n.length>0&&n[1]||""}static getSecondMatch(e,r){const n=r.match(e);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(e,r,n){if(e.test(r))return n}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){const r=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(r.push(0),r[0]===10)switch(r[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){const r=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(r.push(0),!(r[0]===1&&r[1]<5)){if(r[0]===1&&r[1]<6)return"Cupcake";if(r[0]===1&&r[1]>=6)return"Donut";if(r[0]===2&&r[1]<2)return"Eclair";if(r[0]===2&&r[1]===2)return"Froyo";if(r[0]===2&&r[1]>2)return"Gingerbread";if(r[0]===3)return"Honeycomb";if(r[0]===4&&r[1]<1)return"Ice Cream Sandwich";if(r[0]===4&&r[1]<4)return"Jelly Bean";if(r[0]===4&&r[1]>=4)return"KitKat";if(r[0]===5)return"Lollipop";if(r[0]===6)return"Marshmallow";if(r[0]===7)return"Nougat";if(r[0]===8)return"Oreo";if(r[0]===9)return"Pie"}}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,r,n=!1){const i=oe.getVersionPrecision(e),s=oe.getVersionPrecision(r);let o=Math.max(i,s),a=0;const l=oe.map([e,r],c=>{const f=o-oe.getVersionPrecision(c),u=c+new Array(f+1).join(".0");return oe.map(u.split("."),d=>new Array(20-d.length).join("0")+d).reverse()});for(n&&(a=o-Math.min(i,s)),o-=1;o>=a;){if(l[0][o]>l[1][o])return 1;if(l[0][o]===l[1][o]){if(o===a)return 0;o-=1}else if(l[0][o]{n[l]=o[l]})}return e}static getBrowserAlias(e){return bZ[e]}static getBrowserTypeByAlias(e){return hT[e]||""}}const Nt=/version\/(\d+(\.?_?\d+)+)/i,wZ=[{test:[/googlebot/i],describe(t){const e={name:"Googlebot"},r=oe.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||oe.getFirstMatch(Nt,t);return r&&(e.version=r),e}},{test:[/opera/i],describe(t){const e={name:"Opera"},r=oe.getFirstMatch(Nt,t)||oe.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opr\/|opios/i],describe(t){const e={name:"Opera"},r=oe.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||oe.getFirstMatch(Nt,t);return r&&(e.version=r),e}},{test:[/SamsungBrowser/i],describe(t){const e={name:"Samsung Internet for Android"},r=oe.getFirstMatch(Nt,t)||oe.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Whale/i],describe(t){const e={name:"NAVER Whale Browser"},r=oe.getFirstMatch(Nt,t)||oe.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MZBrowser/i],describe(t){const e={name:"MZ Browser"},r=oe.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||oe.getFirstMatch(Nt,t);return r&&(e.version=r),e}},{test:[/focus/i],describe(t){const e={name:"Focus"},r=oe.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||oe.getFirstMatch(Nt,t);return r&&(e.version=r),e}},{test:[/swing/i],describe(t){const e={name:"Swing"},r=oe.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||oe.getFirstMatch(Nt,t);return r&&(e.version=r),e}},{test:[/coast/i],describe(t){const e={name:"Opera Coast"},r=oe.getFirstMatch(Nt,t)||oe.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(t){const e={name:"Opera Touch"},r=oe.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||oe.getFirstMatch(Nt,t);return r&&(e.version=r),e}},{test:[/yabrowser/i],describe(t){const e={name:"Yandex Browser"},r=oe.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||oe.getFirstMatch(Nt,t);return r&&(e.version=r),e}},{test:[/ucbrowser/i],describe(t){const e={name:"UC Browser"},r=oe.getFirstMatch(Nt,t)||oe.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Maxthon|mxios/i],describe(t){const e={name:"Maxthon"},r=oe.getFirstMatch(Nt,t)||oe.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/epiphany/i],describe(t){const e={name:"Epiphany"},r=oe.getFirstMatch(Nt,t)||oe.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/puffin/i],describe(t){const e={name:"Puffin"},r=oe.getFirstMatch(Nt,t)||oe.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sleipnir/i],describe(t){const e={name:"Sleipnir"},r=oe.getFirstMatch(Nt,t)||oe.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/k-meleon/i],describe(t){const e={name:"K-Meleon"},r=oe.getFirstMatch(Nt,t)||oe.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/micromessenger/i],describe(t){const e={name:"WeChat"},r=oe.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||oe.getFirstMatch(Nt,t);return r&&(e.version=r),e}},{test:[/qqbrowser/i],describe(t){const e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},r=oe.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||oe.getFirstMatch(Nt,t);return r&&(e.version=r),e}},{test:[/msie|trident/i],describe(t){const e={name:"Internet Explorer"},r=oe.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/\sedg\//i],describe(t){const e={name:"Microsoft Edge"},r=oe.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/edg([ea]|ios)/i],describe(t){const e={name:"Microsoft Edge"},r=oe.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/vivaldi/i],describe(t){const e={name:"Vivaldi"},r=oe.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/seamonkey/i],describe(t){const e={name:"SeaMonkey"},r=oe.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sailfish/i],describe(t){const e={name:"Sailfish"},r=oe.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return r&&(e.version=r),e}},{test:[/silk/i],describe(t){const e={name:"Amazon Silk"},r=oe.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/phantom/i],describe(t){const e={name:"PhantomJS"},r=oe.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/slimerjs/i],describe(t){const e={name:"SlimerJS"},r=oe.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e={name:"BlackBerry"},r=oe.getFirstMatch(Nt,t)||oe.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(web|hpw)[o0]s/i],describe(t){const e={name:"WebOS Browser"},r=oe.getFirstMatch(Nt,t)||oe.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/bada/i],describe(t){const e={name:"Bada"},r=oe.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/tizen/i],describe(t){const e={name:"Tizen"},r=oe.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||oe.getFirstMatch(Nt,t);return r&&(e.version=r),e}},{test:[/qupzilla/i],describe(t){const e={name:"QupZilla"},r=oe.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||oe.getFirstMatch(Nt,t);return r&&(e.version=r),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){const e={name:"Firefox"},r=oe.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/electron/i],describe(t){const e={name:"Electron"},r=oe.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MiuiBrowser/i],describe(t){const e={name:"Miui"},r=oe.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/chromium/i],describe(t){const e={name:"Chromium"},r=oe.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||oe.getFirstMatch(Nt,t);return r&&(e.version=r),e}},{test:[/chrome|crios|crmo/i],describe(t){const e={name:"Chrome"},r=oe.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/GSA/i],describe(t){const e={name:"Google Search"},r=oe.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){const e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe(t){const e={name:"Android Browser"},r=oe.getFirstMatch(Nt,t);return r&&(e.version=r),e}},{test:[/playstation 4/i],describe(t){const e={name:"PlayStation 4"},r=oe.getFirstMatch(Nt,t);return r&&(e.version=r),e}},{test:[/safari|applewebkit/i],describe(t){const e={name:"Safari"},r=oe.getFirstMatch(Nt,t);return r&&(e.version=r),e}},{test:[/.*/i],describe(t){const e=/^(.*)\/(.*) /,r=/^(.*)\/(.*)[ \t]\((.*)/,i=t.search("\\(")!==-1?r:e;return{name:oe.getFirstMatch(i,t),version:oe.getSecondMatch(i,t)}}}],AZ=[{test:[/Roku\/DVP/],describe(t){const e=oe.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:dn.Roku,version:e}}},{test:[/windows phone/i],describe(t){const e=oe.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:dn.WindowsPhone,version:e}}},{test:[/windows /i],describe(t){const e=oe.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),r=oe.getWindowsVersionName(e);return{name:dn.Windows,version:e,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){const e={name:dn.iOS},r=oe.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return r&&(e.version=r),e}},{test:[/macintosh/i],describe(t){const e=oe.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),r=oe.getMacOSVersionName(e),n={name:dn.MacOS,version:e};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe(t){const e=oe.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:dn.iOS,version:e}}},{test(t){const e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe(t){const e=oe.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),r=oe.getAndroidVersionName(e),n={name:dn.Android,version:e};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe(t){const e=oe.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),r={name:dn.WebOS};return e&&e.length&&(r.version=e),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e=oe.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||oe.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||oe.getFirstMatch(/\bbb(\d+)/i,t);return{name:dn.BlackBerry,version:e}}},{test:[/bada/i],describe(t){const e=oe.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:dn.Bada,version:e}}},{test:[/tizen/i],describe(t){const e=oe.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:dn.Tizen,version:e}}},{test:[/linux/i],describe(){return{name:dn.Linux}}},{test:[/CrOS/],describe(){return{name:dn.ChromeOS}}},{test:[/PlayStation 4/],describe(t){const e=oe.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:dn.PlayStation4,version:e}}}],EZ=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(t){const e=oe.getFirstMatch(/(can-l01)/i,t)&&"Nova",r={type:dr.mobile,vendor:"Huawei"};return e&&(r.model=e),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:dr.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:dr.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:dr.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:dr.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:dr.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:dr.tablet}}},{test(t){const e=t.test(/ipod|iphone/i),r=t.test(/like (ipod|iphone)/i);return e&&!r},describe(t){const e=oe.getFirstMatch(/(ipod|iphone)/i,t);return{type:dr.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:dr.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:dr.mobile}}},{test(t){return t.getBrowserName(!0)==="blackberry"},describe(){return{type:dr.mobile,vendor:"BlackBerry"}}},{test(t){return t.getBrowserName(!0)==="bada"},describe(){return{type:dr.mobile}}},{test(t){return t.getBrowserName()==="windows phone"},describe(){return{type:dr.mobile,vendor:"Microsoft"}}},{test(t){const e=Number(String(t.getOSVersion()).split(".")[0]);return t.getOSName(!0)==="android"&&e>=3},describe(){return{type:dr.tablet}}},{test(t){return t.getOSName(!0)==="android"},describe(){return{type:dr.mobile}}},{test(t){return t.getOSName(!0)==="macos"},describe(){return{type:dr.desktop,vendor:"Apple"}}},{test(t){return t.getOSName(!0)==="windows"},describe(){return{type:dr.desktop}}},{test(t){return t.getOSName(!0)==="linux"},describe(){return{type:dr.desktop}}},{test(t){return t.getOSName(!0)==="playstation 4"},describe(){return{type:dr.tv}}},{test(t){return t.getOSName(!0)==="roku"},describe(){return{type:dr.tv}}}],SZ=[{test(t){return t.getBrowserName(!0)==="microsoft edge"},describe(t){if(/\sedg\//i.test(t))return{name:xo.Blink};const r=oe.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:xo.EdgeHTML,version:r}}},{test:[/trident/i],describe(t){const e={name:xo.Trident},r=oe.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){return t.test(/presto/i)},describe(t){const e={name:xo.Presto},r=oe.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){const e=t.test(/gecko/i),r=t.test(/like gecko/i);return e&&!r},describe(t){const e={name:xo.Gecko},r=oe.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:xo.Blink}}},{test:[/(apple)?webkit/i],describe(t){const e={name:xo.WebKit},r=oe.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}}];class SC{constructor(e,r=!1){if(e==null||e==="")throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},r!==!0&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const e=oe.find(wZ,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const e=oe.find(AZ,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){const{name:r}=this.getOS();return e?String(r).toLowerCase()||"":r||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){const{type:r}=this.getPlatform();return e?String(r).toLowerCase()||"":r||""}parsePlatform(){this.parsedResult.platform={};const e=oe.find(EZ,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const e=oe.find(SZ,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return oe.assign({},this.parsedResult)}satisfies(e){const r={};let n=0;const i={};let s=0;if(Object.keys(e).forEach(a=>{const l=e[a];typeof l=="string"?(i[a]=l,s+=1):typeof l=="object"&&(r[a]=l,n+=1)}),n>0){const a=Object.keys(r),l=oe.find(a,f=>this.isOS(f));if(l){const f=this.satisfies(r[l]);if(f!==void 0)return f}const c=oe.find(a,f=>this.isPlatform(f));if(c){const f=this.satisfies(r[c]);if(f!==void 0)return f}}if(s>0){const a=Object.keys(i),l=oe.find(a,c=>this.isBrowser(c,!0));if(l!==void 0)return this.compareVersion(i[l])}}isBrowser(e,r=!1){const n=this.getBrowserName().toLowerCase();let i=e.toLowerCase();const s=oe.getBrowserTypeByAlias(i);return r&&s&&(i=s.toLowerCase()),i===n}compareVersion(e){let r=[0],n=e,i=!1;const s=this.getBrowserVersion();if(typeof s=="string")return e[0]===">"||e[0]==="<"?(n=e.substr(1),e[1]==="="?(i=!0,n=e.substr(2)):r=[],e[0]===">"?r.push(1):r.push(-1)):e[0]==="="?n=e.substr(1):e[0]==="~"&&(i=!0,n=e.substr(1)),r.indexOf(oe.compareVersions(s,n,i))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,r=!1){return this.isBrowser(e,r)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(r=>this.is(r))}}/*! +${ka(s)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const r=[];for(const s of e.split("/"))(s==null?void 0:s.length)!==0&&s!=="."&&(s===".."?r.pop():r.push(s));const n=`${e!=null&&e.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&(e!=null&&e.endsWith("/"))?"/":""}`;return Ro(n).replace(/%2F/g,"/")}return e}async getSignature(e,r,n,i){const s=await this.createStringToSign(e,r,i),o=new this.sha256(await n);return o.update(Of(s)),ka(await o.digest())}getSigningKey(e,r,n,i){return gX(this.sha256,e,n,r,i||this.service)}validateResolvedCredentials(e){if(typeof e!="object"||typeof e.accessKeyId!="string"||typeof e.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}}const Od=t=>{const e=CX(t).replace(/[\-:]/g,"");return{longDate:e,shortDate:e.slice(0,8)}},AC=t=>Object.keys(t).sort().join(";"),TX=t=>{let e;t.credentials&&(e=QJ(t.credentials,YJ,iT)),e||(t.credentialDefaultProvider?e=_d(t.credentialDefaultProvider(Object.assign({},t,{parentClientConfig:t}))):e=async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:r=!0,systemClockOffset:n=t.systemClockOffset||0,sha256:i}=t;let s;return t.signer?s=_d(t.signer):t.regionInfoProvider?s=()=>_d(t.region)().then(async o=>[await t.regionInfoProvider(o,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},o]).then(([o,a])=>{const{signingRegion:l,signingService:c}=o;t.signingRegion=t.signingRegion||l||a,t.signingName=t.signingName||c||t.serviceId;const f={...t,credentials:e,region:t.signingRegion,service:t.signingName,sha256:i,uriEscapePath:r},u=t.signerConstructor||EC;return new u(f)}):s=async o=>{o=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await _d(t.region)(),properties:{}},o);const a=o.signingRegion,l=o.signingName;t.signingRegion=t.signingRegion||a,t.signingName=t.signingName||l||t.serviceId;const c={...t,credentials:e,region:t.signingRegion,service:t.signingName,sha256:i,uriEscapePath:r},f=t.signerConstructor||EC;return new f(c)},{...t,systemClockOffset:n,signingEscapePath:r,credentials:e,signer:s}},PX=(t,e)=>SJ(t,e).then(r=>e.utf8Encoder(r)),_v=(t,e)=>PX(t,e).then(r=>{if(r.length)try{return JSON.parse(r)}catch(n){throw(n==null?void 0:n.name)==="SyntaxError"&&Object.defineProperty(n,"$responseBodyText",{value:r}),n}return{}}),RX=async(t,e)=>{const r=await _v(t,e);return r.message=r.message??r.Message,r},_X=(t,e)=>{const r=(s,o)=>Object.keys(s).find(a=>a.toLowerCase()===o.toLowerCase()),n=s=>{let o=s;return typeof o=="number"&&(o=o.toString()),o.indexOf(",")>=0&&(o=o.split(",")[0]),o.indexOf(":")>=0&&(o=o.split(":")[0]),o.indexOf("#")>=0&&(o=o.split("#")[1]),o},i=r(t.headers,"x-amzn-errortype");if(i!==void 0)return n(t.headers[i]);if(e.code!==void 0)return n(e.code);if(e.__type!==void 0)return n(e.__type)},IX=async(t,e,r)=>({operation:Pv(e).operation,region:await zo(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function OX(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-idp",region:t.region},propertiesExtractor:(e,r)=>({signingProperties:{config:e,context:r}})}}function Bt(t){return{schemeId:"smithy.api#noAuth"}}const MX=t=>{const e=[];switch(t.operation){case"AssociateSoftwareToken":{e.push(Bt());break}case"ChangePassword":{e.push(Bt());break}case"ConfirmDevice":{e.push(Bt());break}case"ConfirmForgotPassword":{e.push(Bt());break}case"ConfirmSignUp":{e.push(Bt());break}case"DeleteUser":{e.push(Bt());break}case"DeleteUserAttributes":{e.push(Bt());break}case"ForgetDevice":{e.push(Bt());break}case"ForgotPassword":{e.push(Bt());break}case"GetDevice":{e.push(Bt());break}case"GetUser":{e.push(Bt());break}case"GetUserAttributeVerificationCode":{e.push(Bt());break}case"GlobalSignOut":{e.push(Bt());break}case"InitiateAuth":{e.push(Bt());break}case"ListDevices":{e.push(Bt());break}case"ResendConfirmationCode":{e.push(Bt());break}case"RespondToAuthChallenge":{e.push(Bt());break}case"RevokeToken":{e.push(Bt());break}case"SetUserMFAPreference":{e.push(Bt());break}case"SetUserSettings":{e.push(Bt());break}case"SignUp":{e.push(Bt());break}case"UpdateAuthEventFeedback":{e.push(Bt());break}case"UpdateDeviceStatus":{e.push(Bt());break}case"UpdateUserAttributes":{e.push(Bt());break}case"VerifySoftwareToken":{e.push(Bt());break}case"VerifyUserAttribute":{e.push(Bt());break}default:e.push(OX(t))}return e},NX=t=>({...TX(t)}),DX=t=>({...t,useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"}),Gx={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},LX="@aws-sdk/client-cognito-identity-provider",jX="AWS SDK for JavaScript Cognito Identity Provider Client for Node.js, Browser and React Native",FX="3.624.0",BX={build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-cognito-identity-provider","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo cognito-identity-provider"},$X="./dist-cjs/index.js",UX="./dist-types/index.d.ts",zX="./dist-es/index.js",VX=!1,qX={"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.624.0","@aws-sdk/client-sts":"3.624.0","@aws-sdk/core":"3.624.0","@aws-sdk/credential-provider-node":"3.624.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.620.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.614.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.3.2","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.14","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.1.12","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.14","@smithy/util-defaults-mode-node":"^3.0.14","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},HX={"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},WX={node:">=16.0.0"},GX={"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},KX=["dist-*/**"],YX={name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},QX="Apache-2.0",JX={"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},XX="https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-cognito-identity-provider",ZX={type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-cognito-identity-provider"},eZ={name:LX,description:jX,version:FX,scripts:BX,main:$X,types:UX,module:zX,sideEffects:VX,dependencies:qX,devDependencies:HX,engines:WX,typesVersions:GX,files:KX,author:YX,license:QX,browser:JX,"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:XX,repository:ZX},tZ=t=>new TextEncoder().encode(t);var rZ=typeof Buffer<"u"&&Buffer.from?function(t){return Buffer.from(t,"utf8")}:tZ;function gu(t){return t instanceof Uint8Array?t:typeof t=="string"?rZ(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}function dm(t){return typeof t=="string"?t.length===0:t.byteLength===0}var dT={name:"SHA-256"},SC={name:"HMAC",hash:dT},nZ=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const iZ={};function hh(){return typeof window<"u"?window:typeof self<"u"?self:iZ}var sZ=function(){function t(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return t.prototype.update=function(e){if(!dm(e)){var r=gu(e),n=new Uint8Array(this.toHash.byteLength+r.byteLength);n.set(this.toHash,0),n.set(r,this.toHash.byteLength),this.toHash=n}},t.prototype.digest=function(){var e=this;return this.key?this.key.then(function(r){return hh().crypto.subtle.sign(SC,r,e.toHash).then(function(n){return new Uint8Array(n)})}):dm(this.toHash)?Promise.resolve(nZ):Promise.resolve().then(function(){return hh().crypto.subtle.digest(dT,e.toHash)}).then(function(r){return Promise.resolve(new Uint8Array(r))})},t.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(r,n){hh().crypto.subtle.importKey("raw",gu(e.secret),SC,!1,["sign"]).then(r,n)}),this.key.catch(function(){}))},t}();function oZ(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})}function aZ(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(f){return l([c,f])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]uZ)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[r++],n--,this.bufferLength===fi&&(this.hashBuffer(),this.bufferLength=0)},t.prototype.digest=function(){if(!this.finished){var e=this.bytesHashed*8,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(r.setUint8(this.bufferLength++,128),n%fi>=fi-8){for(var i=this.bufferLength;i>>24&255,s[i*4+1]=this.state[i]>>>16&255,s[i*4+2]=this.state[i]>>>8&255,s[i*4+3]=this.state[i]>>>0&255;return s},t.prototype.hashBuffer=function(){for(var e=this,r=e.buffer,n=e.state,i=n[0],s=n[1],o=n[2],a=n[3],l=n[4],c=n[5],f=n[6],u=n[7],d=0;d>>17|h<<15)^(h>>>19|h<<13)^h>>>10;h=this.temp[d-15];var m=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[d]=(p+this.temp[d-7]|0)+(m+this.temp[d-16]|0)}var x=(((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&c^~l&f)|0)+(u+(cZ[d]+this.temp[d]|0)|0)|0,b=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&s^i&o^s&o)|0;u=f,f=c,c=l,l=a+x|0,a=o,o=s,s=i,i=x+b|0}n[0]+=i,n[1]+=s,n[2]+=o,n[3]+=a,n[4]+=l,n[5]+=c,n[6]+=f,n[7]+=u},t}(),dZ=function(){function t(e){this.secret=e,this.hash=new vh,this.reset()}return t.prototype.update=function(e){if(!(dm(e)||this.error))try{this.hash.update(gu(e))}catch(r){this.error=r}},t.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},t.prototype.digest=function(){return oZ(this,void 0,void 0,function(){return aZ(this,function(e){return[2,this.digestSync()]})})},t.prototype.reset=function(){if(this.hash=new vh,this.secret){this.outer=new vh;var e=hZ(this.secret),r=new Uint8Array(fi);r.set(e);for(var n=0;nfi){var r=new vh;r.update(e),e=r.digest()}var n=new Uint8Array(fi);return n.set(e),n}var vZ=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function pZ(t){if(yZ(t)&&typeof t.crypto.subtle=="object"){var e=t.crypto.subtle;return mZ(e)}return!1}function yZ(t){if(typeof t=="object"&&typeof t.crypto=="object"){var e=t.crypto.getRandomValues;return typeof e=="function"}return!1}function mZ(t){return t&&vZ.every(function(e){return typeof t[e]=="function"})}var gZ=function(){function t(e){pZ(hh())?this.hash=new sZ(e):this.hash=new dZ(e)}return t.prototype.update=function(e,r){this.hash.update(gu(e))},t.prototype.digest=function(){return this.hash.digest()},t.prototype.reset=function(){this.hash.reset()},t}();const xZ={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},hT={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},dr={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},dn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},xo={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class oe{static getFirstMatch(e,r){const n=r.match(e);return n&&n.length>0&&n[1]||""}static getSecondMatch(e,r){const n=r.match(e);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(e,r,n){if(e.test(r))return n}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){const r=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(r.push(0),r[0]===10)switch(r[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){const r=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(r.push(0),!(r[0]===1&&r[1]<5)){if(r[0]===1&&r[1]<6)return"Cupcake";if(r[0]===1&&r[1]>=6)return"Donut";if(r[0]===2&&r[1]<2)return"Eclair";if(r[0]===2&&r[1]===2)return"Froyo";if(r[0]===2&&r[1]>2)return"Gingerbread";if(r[0]===3)return"Honeycomb";if(r[0]===4&&r[1]<1)return"Ice Cream Sandwich";if(r[0]===4&&r[1]<4)return"Jelly Bean";if(r[0]===4&&r[1]>=4)return"KitKat";if(r[0]===5)return"Lollipop";if(r[0]===6)return"Marshmallow";if(r[0]===7)return"Nougat";if(r[0]===8)return"Oreo";if(r[0]===9)return"Pie"}}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,r,n=!1){const i=oe.getVersionPrecision(e),s=oe.getVersionPrecision(r);let o=Math.max(i,s),a=0;const l=oe.map([e,r],c=>{const f=o-oe.getVersionPrecision(c),u=c+new Array(f+1).join(".0");return oe.map(u.split("."),d=>new Array(20-d.length).join("0")+d).reverse()});for(n&&(a=o-Math.min(i,s)),o-=1;o>=a;){if(l[0][o]>l[1][o])return 1;if(l[0][o]===l[1][o]){if(o===a)return 0;o-=1}else if(l[0][o]{n[l]=o[l]})}return e}static getBrowserAlias(e){return xZ[e]}static getBrowserTypeByAlias(e){return hT[e]||""}}const Dt=/version\/(\d+(\.?_?\d+)+)/i,bZ=[{test:[/googlebot/i],describe(t){const e={name:"Googlebot"},r=oe.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||oe.getFirstMatch(Dt,t);return r&&(e.version=r),e}},{test:[/opera/i],describe(t){const e={name:"Opera"},r=oe.getFirstMatch(Dt,t)||oe.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opr\/|opios/i],describe(t){const e={name:"Opera"},r=oe.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||oe.getFirstMatch(Dt,t);return r&&(e.version=r),e}},{test:[/SamsungBrowser/i],describe(t){const e={name:"Samsung Internet for Android"},r=oe.getFirstMatch(Dt,t)||oe.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Whale/i],describe(t){const e={name:"NAVER Whale Browser"},r=oe.getFirstMatch(Dt,t)||oe.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MZBrowser/i],describe(t){const e={name:"MZ Browser"},r=oe.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||oe.getFirstMatch(Dt,t);return r&&(e.version=r),e}},{test:[/focus/i],describe(t){const e={name:"Focus"},r=oe.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||oe.getFirstMatch(Dt,t);return r&&(e.version=r),e}},{test:[/swing/i],describe(t){const e={name:"Swing"},r=oe.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||oe.getFirstMatch(Dt,t);return r&&(e.version=r),e}},{test:[/coast/i],describe(t){const e={name:"Opera Coast"},r=oe.getFirstMatch(Dt,t)||oe.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(t){const e={name:"Opera Touch"},r=oe.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||oe.getFirstMatch(Dt,t);return r&&(e.version=r),e}},{test:[/yabrowser/i],describe(t){const e={name:"Yandex Browser"},r=oe.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||oe.getFirstMatch(Dt,t);return r&&(e.version=r),e}},{test:[/ucbrowser/i],describe(t){const e={name:"UC Browser"},r=oe.getFirstMatch(Dt,t)||oe.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Maxthon|mxios/i],describe(t){const e={name:"Maxthon"},r=oe.getFirstMatch(Dt,t)||oe.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/epiphany/i],describe(t){const e={name:"Epiphany"},r=oe.getFirstMatch(Dt,t)||oe.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/puffin/i],describe(t){const e={name:"Puffin"},r=oe.getFirstMatch(Dt,t)||oe.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sleipnir/i],describe(t){const e={name:"Sleipnir"},r=oe.getFirstMatch(Dt,t)||oe.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/k-meleon/i],describe(t){const e={name:"K-Meleon"},r=oe.getFirstMatch(Dt,t)||oe.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/micromessenger/i],describe(t){const e={name:"WeChat"},r=oe.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||oe.getFirstMatch(Dt,t);return r&&(e.version=r),e}},{test:[/qqbrowser/i],describe(t){const e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},r=oe.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||oe.getFirstMatch(Dt,t);return r&&(e.version=r),e}},{test:[/msie|trident/i],describe(t){const e={name:"Internet Explorer"},r=oe.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/\sedg\//i],describe(t){const e={name:"Microsoft Edge"},r=oe.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/edg([ea]|ios)/i],describe(t){const e={name:"Microsoft Edge"},r=oe.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/vivaldi/i],describe(t){const e={name:"Vivaldi"},r=oe.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/seamonkey/i],describe(t){const e={name:"SeaMonkey"},r=oe.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sailfish/i],describe(t){const e={name:"Sailfish"},r=oe.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return r&&(e.version=r),e}},{test:[/silk/i],describe(t){const e={name:"Amazon Silk"},r=oe.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/phantom/i],describe(t){const e={name:"PhantomJS"},r=oe.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/slimerjs/i],describe(t){const e={name:"SlimerJS"},r=oe.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e={name:"BlackBerry"},r=oe.getFirstMatch(Dt,t)||oe.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(web|hpw)[o0]s/i],describe(t){const e={name:"WebOS Browser"},r=oe.getFirstMatch(Dt,t)||oe.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/bada/i],describe(t){const e={name:"Bada"},r=oe.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/tizen/i],describe(t){const e={name:"Tizen"},r=oe.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||oe.getFirstMatch(Dt,t);return r&&(e.version=r),e}},{test:[/qupzilla/i],describe(t){const e={name:"QupZilla"},r=oe.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||oe.getFirstMatch(Dt,t);return r&&(e.version=r),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){const e={name:"Firefox"},r=oe.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/electron/i],describe(t){const e={name:"Electron"},r=oe.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MiuiBrowser/i],describe(t){const e={name:"Miui"},r=oe.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/chromium/i],describe(t){const e={name:"Chromium"},r=oe.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||oe.getFirstMatch(Dt,t);return r&&(e.version=r),e}},{test:[/chrome|crios|crmo/i],describe(t){const e={name:"Chrome"},r=oe.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/GSA/i],describe(t){const e={name:"Google Search"},r=oe.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){const e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe(t){const e={name:"Android Browser"},r=oe.getFirstMatch(Dt,t);return r&&(e.version=r),e}},{test:[/playstation 4/i],describe(t){const e={name:"PlayStation 4"},r=oe.getFirstMatch(Dt,t);return r&&(e.version=r),e}},{test:[/safari|applewebkit/i],describe(t){const e={name:"Safari"},r=oe.getFirstMatch(Dt,t);return r&&(e.version=r),e}},{test:[/.*/i],describe(t){const e=/^(.*)\/(.*) /,r=/^(.*)\/(.*)[ \t]\((.*)/,i=t.search("\\(")!==-1?r:e;return{name:oe.getFirstMatch(i,t),version:oe.getSecondMatch(i,t)}}}],wZ=[{test:[/Roku\/DVP/],describe(t){const e=oe.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:dn.Roku,version:e}}},{test:[/windows phone/i],describe(t){const e=oe.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:dn.WindowsPhone,version:e}}},{test:[/windows /i],describe(t){const e=oe.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),r=oe.getWindowsVersionName(e);return{name:dn.Windows,version:e,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){const e={name:dn.iOS},r=oe.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return r&&(e.version=r),e}},{test:[/macintosh/i],describe(t){const e=oe.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),r=oe.getMacOSVersionName(e),n={name:dn.MacOS,version:e};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe(t){const e=oe.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:dn.iOS,version:e}}},{test(t){const e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe(t){const e=oe.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),r=oe.getAndroidVersionName(e),n={name:dn.Android,version:e};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe(t){const e=oe.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),r={name:dn.WebOS};return e&&e.length&&(r.version=e),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e=oe.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||oe.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||oe.getFirstMatch(/\bbb(\d+)/i,t);return{name:dn.BlackBerry,version:e}}},{test:[/bada/i],describe(t){const e=oe.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:dn.Bada,version:e}}},{test:[/tizen/i],describe(t){const e=oe.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:dn.Tizen,version:e}}},{test:[/linux/i],describe(){return{name:dn.Linux}}},{test:[/CrOS/],describe(){return{name:dn.ChromeOS}}},{test:[/PlayStation 4/],describe(t){const e=oe.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:dn.PlayStation4,version:e}}}],EZ=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(t){const e=oe.getFirstMatch(/(can-l01)/i,t)&&"Nova",r={type:dr.mobile,vendor:"Huawei"};return e&&(r.model=e),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:dr.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:dr.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:dr.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:dr.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:dr.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:dr.tablet}}},{test(t){const e=t.test(/ipod|iphone/i),r=t.test(/like (ipod|iphone)/i);return e&&!r},describe(t){const e=oe.getFirstMatch(/(ipod|iphone)/i,t);return{type:dr.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:dr.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:dr.mobile}}},{test(t){return t.getBrowserName(!0)==="blackberry"},describe(){return{type:dr.mobile,vendor:"BlackBerry"}}},{test(t){return t.getBrowserName(!0)==="bada"},describe(){return{type:dr.mobile}}},{test(t){return t.getBrowserName()==="windows phone"},describe(){return{type:dr.mobile,vendor:"Microsoft"}}},{test(t){const e=Number(String(t.getOSVersion()).split(".")[0]);return t.getOSName(!0)==="android"&&e>=3},describe(){return{type:dr.tablet}}},{test(t){return t.getOSName(!0)==="android"},describe(){return{type:dr.mobile}}},{test(t){return t.getOSName(!0)==="macos"},describe(){return{type:dr.desktop,vendor:"Apple"}}},{test(t){return t.getOSName(!0)==="windows"},describe(){return{type:dr.desktop}}},{test(t){return t.getOSName(!0)==="linux"},describe(){return{type:dr.desktop}}},{test(t){return t.getOSName(!0)==="playstation 4"},describe(){return{type:dr.tv}}},{test(t){return t.getOSName(!0)==="roku"},describe(){return{type:dr.tv}}}],AZ=[{test(t){return t.getBrowserName(!0)==="microsoft edge"},describe(t){if(/\sedg\//i.test(t))return{name:xo.Blink};const r=oe.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:xo.EdgeHTML,version:r}}},{test:[/trident/i],describe(t){const e={name:xo.Trident},r=oe.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){return t.test(/presto/i)},describe(t){const e={name:xo.Presto},r=oe.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){const e=t.test(/gecko/i),r=t.test(/like gecko/i);return e&&!r},describe(t){const e={name:xo.Gecko},r=oe.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:xo.Blink}}},{test:[/(apple)?webkit/i],describe(t){const e={name:xo.WebKit},r=oe.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}}];class CC{constructor(e,r=!1){if(e==null||e==="")throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},r!==!0&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const e=oe.find(bZ,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const e=oe.find(wZ,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){const{name:r}=this.getOS();return e?String(r).toLowerCase()||"":r||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){const{type:r}=this.getPlatform();return e?String(r).toLowerCase()||"":r||""}parsePlatform(){this.parsedResult.platform={};const e=oe.find(EZ,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const e=oe.find(AZ,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return oe.assign({},this.parsedResult)}satisfies(e){const r={};let n=0;const i={};let s=0;if(Object.keys(e).forEach(a=>{const l=e[a];typeof l=="string"?(i[a]=l,s+=1):typeof l=="object"&&(r[a]=l,n+=1)}),n>0){const a=Object.keys(r),l=oe.find(a,f=>this.isOS(f));if(l){const f=this.satisfies(r[l]);if(f!==void 0)return f}const c=oe.find(a,f=>this.isPlatform(f));if(c){const f=this.satisfies(r[c]);if(f!==void 0)return f}}if(s>0){const a=Object.keys(i),l=oe.find(a,c=>this.isBrowser(c,!0));if(l!==void 0)return this.compareVersion(i[l])}}isBrowser(e,r=!1){const n=this.getBrowserName().toLowerCase();let i=e.toLowerCase();const s=oe.getBrowserTypeByAlias(i);return r&&s&&(i=s.toLowerCase()),i===n}compareVersion(e){let r=[0],n=e,i=!1;const s=this.getBrowserVersion();if(typeof s=="string")return e[0]===">"||e[0]==="<"?(n=e.substr(1),e[1]==="="?(i=!0,n=e.substr(2)):r=[],e[0]===">"?r.push(1):r.push(-1)):e[0]==="="?n=e.substr(1):e[0]==="~"&&(i=!0,n=e.substr(1)),r.indexOf(oe.compareVersions(s,n,i))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,r=!1){return this.isBrowser(e,r)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(r=>this.is(r))}}/*! * Bowser - a browser detector * https://github.com/lancedikson/bowser * MIT License | (c) Dustin Diaz 2012-2015 * MIT License | (c) Denis Demchenko 2015-2019 - */class vT{static getParser(e,r=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new SC(e,r)}static parse(e){return new SC(e).getResult()}static get BROWSER_MAP(){return hT}static get ENGINE_MAP(){return xo}static get OS_MAP(){return dn}static get PLATFORMS_MAP(){return dr}}const CZ=({serviceId:t,clientVersion:e})=>async()=>{var i,s,o,a,l;const r=typeof window<"u"&&((i=window==null?void 0:window.navigator)!=null&&i.userAgent)?vT.parse(window.navigator.userAgent):void 0,n=[["aws-sdk-js",e],["ua","2.0"],[`os/${((s=r==null?void 0:r.os)==null?void 0:s.name)||"other"}`,(o=r==null?void 0:r.os)==null?void 0:o.version],["lang/js"],["md/browser",`${((a=r==null?void 0:r.browser)==null?void 0:a.name)??"unknown"}_${((l=r==null?void 0:r.browser)==null?void 0:l.version)??"unknown"}`]];return t&&n.push([`api/${t}`,e]),n},kZ=t=>()=>Promise.reject(t),CC=typeof TextEncoder=="function"?new TextEncoder:null,TZ=t=>{if(typeof t=="string"){if(CC)return CC.encode(t).byteLength;let e=t.length;for(let r=e-1;r>=0;r--){const n=t.charCodeAt(r);n>127&&n<=2047?e++:n>2047&&n<=65535&&(e+=2),n>=56320&&n<=57343&&r--}return e}else{if(typeof t.byteLength=="number")return t.byteLength;if(typeof t.size=="number")return t.size}throw new Error(`Body Length computation failed for ${t}`)},pT="required",is="fn",ss="argv",Nc="ref",kC=!0,TC="isSet",xu="booleanEquals",vl="error",rf="endpoint",ks="tree",Kx="PartitionResult",PC={[pT]:!1,type:"String"},RC={[pT]:!0,default:!1,type:"Boolean"},_C={[Nc]:"Endpoint"},yT={[is]:xu,[ss]:[{[Nc]:"UseFIPS"},!0]},mT={[is]:xu,[ss]:[{[Nc]:"UseDualStack"},!0]},Ki={},IC={[is]:"getAttr",[ss]:[{[Nc]:Kx},"supportsFIPS"]},OC={[is]:xu,[ss]:[!0,{[is]:"getAttr",[ss]:[{[Nc]:Kx},"supportsDualStack"]}]},MC=[yT],NC=[mT],DC=[{[Nc]:"Region"}],PZ={version:"1.0",parameters:{Region:PC,UseDualStack:RC,UseFIPS:RC,Endpoint:PC},rules:[{conditions:[{[is]:TC,[ss]:[_C]}],rules:[{conditions:MC,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:vl},{conditions:NC,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:vl},{endpoint:{url:_C,properties:Ki,headers:Ki},type:rf}],type:ks},{conditions:[{[is]:TC,[ss]:DC}],rules:[{conditions:[{[is]:"aws.partition",[ss]:DC,assign:Kx}],rules:[{conditions:[yT,mT],rules:[{conditions:[{[is]:xu,[ss]:[kC,IC]},OC],rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ki,headers:Ki},type:rf}],type:ks},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:vl}],type:ks},{conditions:MC,rules:[{conditions:[{[is]:xu,[ss]:[IC,kC]}],rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ki,headers:Ki},type:rf}],type:ks},{error:"FIPS is enabled but this partition does not support FIPS",type:vl}],type:ks},{conditions:NC,rules:[{conditions:[OC],rules:[{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ki,headers:Ki},type:rf}],type:ks},{error:"DualStack is enabled but this partition does not support DualStack",type:vl}],type:ks},{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",properties:Ki,headers:Ki},type:rf}],type:ks}],type:ks},{error:"Invalid Configuration: Missing Region",type:vl}]},RZ=PZ,_Z=(t,e={})=>sQ(RZ,{endpointParams:t,logger:e.logger});g0.aws=H9;const IZ=t=>({apiVersion:"2016-04-18",base64Decoder:(t==null?void 0:t.base64Decoder)??Vx,base64Encoder:(t==null?void 0:t.base64Encoder)??eT,disableHostPrefix:(t==null?void 0:t.disableHostPrefix)??!1,endpointProvider:(t==null?void 0:t.endpointProvider)??_Z,extensions:(t==null?void 0:t.extensions)??[],httpAuthSchemeProvider:(t==null?void 0:t.httpAuthSchemeProvider)??NX,httpAuthSchemes:(t==null?void 0:t.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new rX},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new WJ}],logger:(t==null?void 0:t.logger)??new X9,serviceId:(t==null?void 0:t.serviceId)??"Cognito Identity Provider",urlParser:(t==null?void 0:t.urlParser)??x0,utf8Decoder:(t==null?void 0:t.utf8Decoder)??vc,utf8Encoder:(t==null?void 0:t.utf8Encoder)??Z9}),OZ=(t,e,r)=>{let n,i,s,o=!1;const a=async()=>{i||(i=t());try{n=await i,s=!0,o=!1}finally{i=void 0}return n};return e===void 0?async l=>((!s||l!=null&&l.forceRefresh)&&(n=await a()),n):async l=>((!s||l!=null&&l.forceRefresh)&&(n=await a()),o?n:r&&!r(n)?(o=!0,n):(e(n)&&await a(),n))},MZ=["in-region","cross-region","mobile","standard","legacy"],NZ=({defaultsMode:t}={})=>OZ(async()=>{const e=typeof t=="function"?await t():t;switch(e==null?void 0:e.toLowerCase()){case"auto":return Promise.resolve(DZ()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(e==null?void 0:e.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${MZ.join(", ")}, got ${e}`)}}),DZ=()=>{var r,n;const t=typeof window<"u"&&((r=window==null?void 0:window.navigator)!=null&&r.userAgent)?vT.parse(window.navigator.userAgent):void 0,e=(n=t==null?void 0:t.platform)==null?void 0:n.type;return e==="tablet"||e==="mobile"},LZ=t=>{const e=NZ(t),r=()=>e().then(RJ),n=IZ(t);return{...n,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:(t==null?void 0:t.bodyLengthChecker)??TZ,credentialDefaultProvider:(t==null?void 0:t.credentialDefaultProvider)??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:(t==null?void 0:t.defaultUserAgentProvider)??CZ({serviceId:n.serviceId,clientVersion:tZ.version}),maxAttempts:(t==null?void 0:t.maxAttempts)??b0,region:(t==null?void 0:t.region)??kZ("Region is missing"),requestHandler:Hx.create((t==null?void 0:t.requestHandler)??r),retryMode:(t==null?void 0:t.retryMode)??(async()=>(await r()).retryMode||VQ),sha256:(t==null?void 0:t.sha256)??xZ,streamCollector:(t==null?void 0:t.streamCollector)??xJ,useDualstackEndpoint:(t==null?void 0:t.useDualstackEndpoint)??(()=>Promise.resolve(mQ)),useFipsEndpoint:(t==null?void 0:t.useFipsEndpoint)??(()=>Promise.resolve(gQ))}},jZ=t=>{let e=async()=>{if(t.region===void 0)throw new Error("Region is missing from runtimeConfig");const r=t.region;return typeof r=="string"?r:r()};return{setRegion(r){e=r},region(){return e}}},FZ=t=>({region:t.region()}),BZ=t=>{const e=t.httpAuthSchemes;let r=t.httpAuthSchemeProvider,n=t.credentials;return{setHttpAuthScheme(i){const s=e.findIndex(o=>o.schemeId===i.schemeId);s===-1?e.push(i):e.splice(s,1,i)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(i){r=i},httpAuthSchemeProvider(){return r},setCredentials(i){n=i},credentials(){return n}}},$Z=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),Md=t=>t,UZ=(t,e)=>{const r={...Md(jZ(t)),...Md(NJ(t)),...Md(kY(t)),...Md(BZ(t))};return e.forEach(n=>n.configure(r)),{...t,...FZ(r),...DJ(r),...TY(r),...$Z(r)}};class zZ extends dJ{constructor(...[e]){const r=LZ(e||{}),n=LX(r),i=xQ(n),s=jQ(i),o=s,a=$Y(o),l=uJ(a),c=DX(l),f=UZ(c,(e==null?void 0:e.extensions)||[]);super(f),this.config=f,this.middlewareStack.use(IY(this.config)),this.middlewareStack.use(NY(this.config)),this.middlewareStack.use(BY(this.config)),this.middlewareStack.use(yQ(this.config)),this.middlewareStack.use(UJ(this.config)),this.middlewareStack.use(ZJ(this.config)),this.middlewareStack.use(BQ(this.config,{httpAuthSchemeParametersProvider:this.getDefaultHttpAuthSchemeParametersProvider(),identityProviderConfigProvider:this.getIdentityProviderConfigProvider()})),this.middlewareStack.use(HJ(this.config))}destroy(){super.destroy()}getDefaultHttpAuthSchemeParametersProvider(){return OX}getIdentityProviderConfigProvider(){return async e=>new qJ({"aws.auth#sigv4":e.credentials})}}class Ne extends qx{constructor(e){super(e),Object.setPrototypeOf(this,Ne.prototype)}}class Yx extends Ne{constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),this.name="InternalErrorException",this.$fault="server",Object.setPrototypeOf(this,Yx.prototype)}}class Qx extends Ne{constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),this.name="InvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,Qx.prototype)}}class Jx extends Ne{constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,Jx.prototype)}}class Xx extends Ne{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Xx.prototype)}}class Zx extends Ne{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,Zx.prototype)}}class eb extends Ne{constructor(e){super({name:"UserImportInProgressException",$fault:"client",...e}),this.name="UserImportInProgressException",this.$fault="client",Object.setPrototypeOf(this,eb.prototype)}}class tb extends Ne{constructor(e){super({name:"UserNotFoundException",$fault:"client",...e}),this.name="UserNotFoundException",this.$fault="client",Object.setPrototypeOf(this,tb.prototype)}}class rb extends Ne{constructor(e){super({name:"InvalidLambdaResponseException",$fault:"client",...e}),this.name="InvalidLambdaResponseException",this.$fault="client",Object.setPrototypeOf(this,rb.prototype)}}class nb extends Ne{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,nb.prototype)}}class ib extends Ne{constructor(e){super({name:"TooManyFailedAttemptsException",$fault:"client",...e}),this.name="TooManyFailedAttemptsException",this.$fault="client",Object.setPrototypeOf(this,ib.prototype)}}class sb extends Ne{constructor(e){super({name:"UnexpectedLambdaException",$fault:"client",...e}),this.name="UnexpectedLambdaException",this.$fault="client",Object.setPrototypeOf(this,sb.prototype)}}class _v extends Ne{constructor(e){super({name:"UserLambdaValidationException",$fault:"client",...e}),this.name="UserLambdaValidationException",this.$fault="client",Object.setPrototypeOf(this,_v.prototype)}}class ob extends Ne{constructor(e){super({name:"CodeDeliveryFailureException",$fault:"client",...e}),this.name="CodeDeliveryFailureException",this.$fault="client",Object.setPrototypeOf(this,ob.prototype)}}class ab extends Ne{constructor(e){super({name:"InvalidPasswordException",$fault:"client",...e}),this.name="InvalidPasswordException",this.$fault="client",Object.setPrototypeOf(this,ab.prototype)}}class lb extends Ne{constructor(e){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...e}),this.name="InvalidSmsRoleAccessPolicyException",this.$fault="client",Object.setPrototypeOf(this,lb.prototype)}}class cb extends Ne{constructor(e){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...e}),this.name="InvalidSmsRoleTrustRelationshipException",this.$fault="client",Object.setPrototypeOf(this,cb.prototype)}}class fb extends Ne{constructor(e){super({name:"PreconditionNotMetException",$fault:"client",...e}),this.name="PreconditionNotMetException",this.$fault="client",Object.setPrototypeOf(this,fb.prototype)}}class ub extends Ne{constructor(e){super({name:"UnsupportedUserStateException",$fault:"client",...e}),this.name="UnsupportedUserStateException",this.$fault="client",Object.setPrototypeOf(this,ub.prototype)}}class db extends Ne{constructor(e){super({name:"UsernameExistsException",$fault:"client",...e}),this.name="UsernameExistsException",this.$fault="client",Object.setPrototypeOf(this,db.prototype)}}class hb extends Ne{constructor(e){super({name:"AliasExistsException",$fault:"client",...e}),this.name="AliasExistsException",this.$fault="client",Object.setPrototypeOf(this,hb.prototype)}}class vb extends Ne{constructor(e){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...e}),this.name="InvalidUserPoolConfigurationException",this.$fault="client",Object.setPrototypeOf(this,vb.prototype)}}class pb extends Ne{constructor(e){super({name:"MFAMethodNotFoundException",$fault:"client",...e}),this.name="MFAMethodNotFoundException",this.$fault="client",Object.setPrototypeOf(this,pb.prototype)}}class yb extends Ne{constructor(e){super({name:"PasswordResetRequiredException",$fault:"client",...e}),this.name="PasswordResetRequiredException",this.$fault="client",Object.setPrototypeOf(this,yb.prototype)}}class mb extends Ne{constructor(e){super({name:"UserNotConfirmedException",$fault:"client",...e}),this.name="UserNotConfirmedException",this.$fault="client",Object.setPrototypeOf(this,mb.prototype)}}class gb extends Ne{constructor(e){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...e}),this.name="UserPoolAddOnNotEnabledException",this.$fault="client",Object.setPrototypeOf(this,gb.prototype)}}class xb extends Ne{constructor(e){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...e}),this.name="InvalidEmailRoleAccessPolicyException",this.$fault="client",Object.setPrototypeOf(this,xb.prototype)}}class bb extends Ne{constructor(e){super({name:"CodeMismatchException",$fault:"client",...e}),this.name="CodeMismatchException",this.$fault="client",Object.setPrototypeOf(this,bb.prototype)}}class wb extends Ne{constructor(e){super({name:"ExpiredCodeException",$fault:"client",...e}),this.name="ExpiredCodeException",this.$fault="client",Object.setPrototypeOf(this,wb.prototype)}}class Ab extends Ne{constructor(e){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...e}),this.name="SoftwareTokenMFANotFoundException",this.$fault="client",Object.setPrototypeOf(this,Ab.prototype)}}class Eb extends Ne{constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),this.name="ConcurrentModificationException",this.$fault="client",Object.setPrototypeOf(this,Eb.prototype)}}class Sb extends Ne{constructor(e){super({name:"ForbiddenException",$fault:"client",...e}),this.name="ForbiddenException",this.$fault="client",Object.setPrototypeOf(this,Sb.prototype)}}class Cb extends Ne{constructor(e){super({name:"GroupExistsException",$fault:"client",...e}),this.name="GroupExistsException",this.$fault="client",Object.setPrototypeOf(this,Cb.prototype)}}class kb extends Ne{constructor(e){super({name:"DuplicateProviderException",$fault:"client",...e}),this.name="DuplicateProviderException",this.$fault="client",Object.setPrototypeOf(this,kb.prototype)}}class Tb extends Ne{constructor(e){super({name:"UserPoolTaggingException",$fault:"client",...e}),this.name="UserPoolTaggingException",this.$fault="client",Object.setPrototypeOf(this,Tb.prototype)}}class Pb extends Ne{constructor(e){super({name:"InvalidOAuthFlowException",$fault:"client",...e}),this.name="InvalidOAuthFlowException",this.$fault="client",Object.setPrototypeOf(this,Pb.prototype)}}class Rb extends Ne{constructor(e){super({name:"ScopeDoesNotExistException",$fault:"client",...e}),this.name="ScopeDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,Rb.prototype)}}class _b extends Ne{constructor(e){super({name:"UnsupportedIdentityProviderException",$fault:"client",...e}),this.name="UnsupportedIdentityProviderException",this.$fault="client",Object.setPrototypeOf(this,_b.prototype)}}class Ib extends Ne{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,Ib.prototype)}}class Ob extends Ne{constructor(e){super({name:"UnsupportedOperationException",$fault:"client",...e}),this.name="UnsupportedOperationException",this.$fault="client",Object.setPrototypeOf(this,Ob.prototype)}}class Mb extends Ne{constructor(e){super({name:"UnsupportedTokenTypeException",$fault:"client",...e}),this.name="UnsupportedTokenTypeException",this.$fault="client",Object.setPrototypeOf(this,Mb.prototype)}}const LC=t=>({...t,...t.Value&&{Value:Br}}),gT=t=>({...t,...t.AccessToken&&{AccessToken:Br},...t.RefreshToken&&{RefreshToken:Br},...t.IdToken&&{IdToken:Br}}),VZ=t=>({...t,...t.AuthParameters&&{AuthParameters:Br},...t.ClientId&&{ClientId:Br},...t.UserContextData&&{UserContextData:Br}}),HZ=t=>({...t,...t.Session&&{Session:Br},...t.AuthenticationResult&&{AuthenticationResult:gT(t.AuthenticationResult)}}),qZ=t=>({...t,...t.ClientId&&{ClientId:Br},...t.Session&&{Session:Br},...t.ChallengeResponses&&{ChallengeResponses:Br},...t.UserContextData&&{UserContextData:Br}}),WZ=t=>({...t,...t.Session&&{Session:Br},...t.AuthenticationResult&&{AuthenticationResult:gT(t.AuthenticationResult)}});class Nb extends Ne{constructor(e){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...e}),this.name="EnableSoftwareTokenMFAException",this.$fault="client",Object.setPrototypeOf(this,Nb.prototype)}}const GZ=t=>({...t,...t.ClientId&&{ClientId:Br},...t.SecretHash&&{SecretHash:Br},...t.Username&&{Username:Br},...t.Password&&{Password:Br},...t.UserAttributes&&{UserAttributes:t.UserAttributes.map(e=>LC(e))},...t.ValidationData&&{ValidationData:t.ValidationData.map(e=>LC(e))},...t.UserContextData&&{UserContextData:Br}}),KZ=async(t,e)=>{const r=jb("InitiateAuth");let n;return n=JSON.stringify(_e(t)),Lb(e,r,"/",void 0,n)},YZ=async(t,e)=>{const r=jb("RespondToAuthChallenge");let n;return n=JSON.stringify(_e(t)),Lb(e,r,"/",void 0,n)},QZ=async(t,e)=>{const r=jb("SignUp");let n;return n=JSON.stringify(_e(t)),Lb(e,r,"/",void 0,n)},JZ=async(t,e)=>{if(t.statusCode>=300)return Db(t,e);const r=await Rv(t.body,e);let n={};return n=_e(r),{$metadata:De(t),...n}},XZ=async(t,e)=>{if(t.statusCode>=300)return Db(t,e);const r=await Rv(t.body,e);let n={};return n=_e(r),{$metadata:De(t),...n}},ZZ=async(t,e)=>{if(t.statusCode>=300)return Db(t,e);const r=await Rv(t.body,e);let n={};return n=_e(r),{$metadata:De(t),...n}},Db=async(t,e)=>{const r={...t,body:await _X(t.body,e)},n=IX(t,r.body);switch(n){case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await cee(r);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await hee(r);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await bee(r);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await Eee(r);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await Tee(r);case"UserImportInProgressException":case"com.amazonaws.cognitoidentityprovider#UserImportInProgressException":throw await Nee(r);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await Fee(r);case"InvalidLambdaResponseException":case"com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException":throw await uee(r);case"LimitExceededException":case"com.amazonaws.cognitoidentityprovider#LimitExceededException":throw await gee(r);case"TooManyFailedAttemptsException":case"com.amazonaws.cognitoidentityprovider#TooManyFailedAttemptsException":throw await kee(r);case"UnexpectedLambdaException":case"com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException":throw await Ree(r);case"UserLambdaValidationException":case"com.amazonaws.cognitoidentityprovider#UserLambdaValidationException":throw await Dee(r);case"CodeDeliveryFailureException":case"com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException":throw await tee(r);case"InvalidPasswordException":case"com.amazonaws.cognitoidentityprovider#InvalidPasswordException":throw await vee(r);case"InvalidSmsRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException":throw await pee(r);case"InvalidSmsRoleTrustRelationshipException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException":throw await yee(r);case"PreconditionNotMetException":case"com.amazonaws.cognitoidentityprovider#PreconditionNotMetException":throw await Aee(r);case"UnsupportedUserStateException":case"com.amazonaws.cognitoidentityprovider#UnsupportedUserStateException":throw await Mee(r);case"UsernameExistsException":case"com.amazonaws.cognitoidentityprovider#UsernameExistsException":throw await Lee(r);case"AliasExistsException":case"com.amazonaws.cognitoidentityprovider#AliasExistsException":throw await eee(r);case"InvalidUserPoolConfigurationException":case"com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException":throw await mee(r);case"MFAMethodNotFoundException":case"com.amazonaws.cognitoidentityprovider#MFAMethodNotFoundException":throw await xee(r);case"PasswordResetRequiredException":case"com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException":throw await wee(r);case"UserNotConfirmedException":case"com.amazonaws.cognitoidentityprovider#UserNotConfirmedException":throw await jee(r);case"UserPoolAddOnNotEnabledException":case"com.amazonaws.cognitoidentityprovider#UserPoolAddOnNotEnabledException":throw await Bee(r);case"InvalidEmailRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException":throw await fee(r);case"CodeMismatchException":case"com.amazonaws.cognitoidentityprovider#CodeMismatchException":throw await ree(r);case"ExpiredCodeException":case"com.amazonaws.cognitoidentityprovider#ExpiredCodeException":throw await oee(r);case"SoftwareTokenMFANotFoundException":case"com.amazonaws.cognitoidentityprovider#SoftwareTokenMFANotFoundException":throw await Cee(r);case"ConcurrentModificationException":case"com.amazonaws.cognitoidentityprovider#ConcurrentModificationException":throw await nee(r);case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await aee(r);case"GroupExistsException":case"com.amazonaws.cognitoidentityprovider#GroupExistsException":throw await lee(r);case"DuplicateProviderException":case"com.amazonaws.cognitoidentityprovider#DuplicateProviderException":throw await iee(r);case"UserPoolTaggingException":case"com.amazonaws.cognitoidentityprovider#UserPoolTaggingException":throw await $ee(r);case"InvalidOAuthFlowException":case"com.amazonaws.cognitoidentityprovider#InvalidOAuthFlowException":throw await dee(r);case"ScopeDoesNotExistException":case"com.amazonaws.cognitoidentityprovider#ScopeDoesNotExistException":throw await See(r);case"UnsupportedIdentityProviderException":case"com.amazonaws.cognitoidentityprovider#UnsupportedIdentityProviderException":throw await _ee(r);case"UnauthorizedException":case"com.amazonaws.cognitoidentityprovider#UnauthorizedException":throw await Pee(r);case"UnsupportedOperationException":case"com.amazonaws.cognitoidentityprovider#UnsupportedOperationException":throw await Iee(r);case"UnsupportedTokenTypeException":case"com.amazonaws.cognitoidentityprovider#UnsupportedTokenTypeException":throw await Oee(r);case"EnableSoftwareTokenMFAException":case"com.amazonaws.cognitoidentityprovider#EnableSoftwareTokenMFAException":throw await see(r);default:const i=r.body;return Uee({output:t,parsedBody:i,errorCode:n})}},eee=async(t,e)=>{const r=t.body,n=_e(r),i=new hb({$metadata:De(t),...n});return je(i,r)},tee=async(t,e)=>{const r=t.body,n=_e(r),i=new ob({$metadata:De(t),...n});return je(i,r)},ree=async(t,e)=>{const r=t.body,n=_e(r),i=new bb({$metadata:De(t),...n});return je(i,r)},nee=async(t,e)=>{const r=t.body,n=_e(r),i=new Eb({$metadata:De(t),...n});return je(i,r)},iee=async(t,e)=>{const r=t.body,n=_e(r),i=new kb({$metadata:De(t),...n});return je(i,r)},see=async(t,e)=>{const r=t.body,n=_e(r),i=new Nb({$metadata:De(t),...n});return je(i,r)},oee=async(t,e)=>{const r=t.body,n=_e(r),i=new wb({$metadata:De(t),...n});return je(i,r)},aee=async(t,e)=>{const r=t.body,n=_e(r),i=new Sb({$metadata:De(t),...n});return je(i,r)},lee=async(t,e)=>{const r=t.body,n=_e(r),i=new Cb({$metadata:De(t),...n});return je(i,r)},cee=async(t,e)=>{const r=t.body,n=_e(r),i=new Yx({$metadata:De(t),...n});return je(i,r)},fee=async(t,e)=>{const r=t.body,n=_e(r),i=new xb({$metadata:De(t),...n});return je(i,r)},uee=async(t,e)=>{const r=t.body,n=_e(r),i=new rb({$metadata:De(t),...n});return je(i,r)},dee=async(t,e)=>{const r=t.body,n=_e(r),i=new Pb({$metadata:De(t),...n});return je(i,r)},hee=async(t,e)=>{const r=t.body,n=_e(r),i=new Qx({$metadata:De(t),...n});return je(i,r)},vee=async(t,e)=>{const r=t.body,n=_e(r),i=new ab({$metadata:De(t),...n});return je(i,r)},pee=async(t,e)=>{const r=t.body,n=_e(r),i=new lb({$metadata:De(t),...n});return je(i,r)},yee=async(t,e)=>{const r=t.body,n=_e(r),i=new cb({$metadata:De(t),...n});return je(i,r)},mee=async(t,e)=>{const r=t.body,n=_e(r),i=new vb({$metadata:De(t),...n});return je(i,r)},gee=async(t,e)=>{const r=t.body,n=_e(r),i=new nb({$metadata:De(t),...n});return je(i,r)},xee=async(t,e)=>{const r=t.body,n=_e(r),i=new pb({$metadata:De(t),...n});return je(i,r)},bee=async(t,e)=>{const r=t.body,n=_e(r),i=new Jx({$metadata:De(t),...n});return je(i,r)},wee=async(t,e)=>{const r=t.body,n=_e(r),i=new yb({$metadata:De(t),...n});return je(i,r)},Aee=async(t,e)=>{const r=t.body,n=_e(r),i=new fb({$metadata:De(t),...n});return je(i,r)},Eee=async(t,e)=>{const r=t.body,n=_e(r),i=new Xx({$metadata:De(t),...n});return je(i,r)},See=async(t,e)=>{const r=t.body,n=_e(r),i=new Rb({$metadata:De(t),...n});return je(i,r)},Cee=async(t,e)=>{const r=t.body,n=_e(r),i=new Ab({$metadata:De(t),...n});return je(i,r)},kee=async(t,e)=>{const r=t.body,n=_e(r),i=new ib({$metadata:De(t),...n});return je(i,r)},Tee=async(t,e)=>{const r=t.body,n=_e(r),i=new Zx({$metadata:De(t),...n});return je(i,r)},Pee=async(t,e)=>{const r=t.body,n=_e(r),i=new Ib({$metadata:De(t),...n});return je(i,r)},Ree=async(t,e)=>{const r=t.body,n=_e(r),i=new sb({$metadata:De(t),...n});return je(i,r)},_ee=async(t,e)=>{const r=t.body,n=_e(r),i=new _b({$metadata:De(t),...n});return je(i,r)},Iee=async(t,e)=>{const r=t.body,n=_e(r),i=new Ob({$metadata:De(t),...n});return je(i,r)},Oee=async(t,e)=>{const r=t.body,n=_e(r),i=new Mb({$metadata:De(t),...n});return je(i,r)},Mee=async(t,e)=>{const r=t.body,n=_e(r),i=new ub({$metadata:De(t),...n});return je(i,r)},Nee=async(t,e)=>{const r=t.body,n=_e(r),i=new eb({$metadata:De(t),...n});return je(i,r)},Dee=async(t,e)=>{const r=t.body,n=_e(r),i=new _v({$metadata:De(t),...n});return je(i,r)},Lee=async(t,e)=>{const r=t.body,n=_e(r),i=new db({$metadata:De(t),...n});return je(i,r)},jee=async(t,e)=>{const r=t.body,n=_e(r),i=new mb({$metadata:De(t),...n});return je(i,r)},Fee=async(t,e)=>{const r=t.body,n=_e(r),i=new tb({$metadata:De(t),...n});return je(i,r)},Bee=async(t,e)=>{const r=t.body,n=_e(r),i=new gb({$metadata:De(t),...n});return je(i,r)},$ee=async(t,e)=>{const r=t.body,n=_e(r),i=new Tb({$metadata:De(t),...n});return je(i,r)},De=t=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}),Uee=TJ(Ne),Lb=async(t,e,r,n,i)=>{const{hostname:s,protocol:o="https",port:a,path:l}=await t.endpoint(),c={protocol:o,hostname:s,port:a,method:"POST",path:l.endsWith("/")?l.slice(0,-1)+r:l+r,headers:e};return n!==void 0&&(c.hostname=n),i!==void 0&&(c.body=i),new $i(c)};function jb(t){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${t}`}}class zee extends Pv.classBuilder().ep({...Gx}).m(function(e,r,n,i){return[Ux(n,this.serialize,this.deserialize),zx(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").f(VZ,HZ).ser(KZ).de(JZ).build(){}class Vee extends Pv.classBuilder().ep({...Gx}).m(function(e,r,n,i){return[Ux(n,this.serialize,this.deserialize),zx(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","RespondToAuthChallenge",{}).n("CognitoIdentityProviderClient","RespondToAuthChallengeCommand").f(qZ,WZ).ser(YZ).de(XZ).build(){}class Hee extends Pv.classBuilder().ep({...Gx}).m(function(e,r,n,i){return[Ux(n,this.serialize,this.deserialize),zx(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","SignUp",{}).n("CognitoIdentityProviderClient","SignUpCommand").f(GZ,void 0).ser(QZ).de(ZZ).build(){}class hf extends Error{}hf.prototype.name="InvalidTokenError";function qee(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function Wee(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return qee(e)}catch{return atob(e)}}function xT(t,e){if(typeof t!="string")throw new hf("Invalid token specified: must be a string");e||(e={});const r=e.header===!0?0:1,n=t.split(".")[r];if(typeof n!="string")throw new hf(`Invalid token specified: missing part #${r+1}`);let i;try{i=Wee(n)}catch(s){throw new hf(`Invalid token specified: invalid base64 for part #${r+1} (${s.message})`)}try{return JSON.parse(i)}catch(s){throw new hf(`Invalid token specified: invalid json for part #${r+1} (${s.message})`)}}function Dr(){return Dr=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}const Gee=["signatures"],Kee=1,Yee=`${Kee} (Web ${iY})`;function fn(t,e,r){const n=Math.floor(Date.now()/1e3),i=n+e;return{version:Yee,issuedAt:n,expiresAt:i,name:t,data:r}}async function Qee(t,e){const r=Jee(e),n=await t.sign(new Uint8Array(r));return Dr({},e,{signatures:[{sessionId:await t.sessionId(),signature:n}]})}function Jee(t){const{version:e,issuedAt:r,expiresAt:n,name:i,data:s}=t,a=Tt(sY({version:e,issuedAt:r,expiresAt:n,name:i,data:s}));return de(Je(a))}function Xee(t,e){const r=cn(t,Gee),n=t.expiresAt-t.issuedAt;return r.issuedAt=Math.floor(e.getTime()/1e3),r.expiresAt=r.issuedAt+n,r}let un=function(t){return t.initiateAuth="initiateAuth",t.openSession="openSession",t.closeSession="closeSession",t.validateSession="validateSession",t.finishValidateSession="finishValidateSession",t.listSessions="listSessions",t.getSession="getSession",t.sessionAuthProof="sessionAuthProof",t.feeOptions="feeOptions",t.signMessage="signMessage",t.sendTransaction="sendTransaction",t.getTransactionReceipt="getTransactionReceipt",t.federateAccount="federateAccount",t.removeAccount="removeAccount",t.listAccounts="listAccounts",t.getIdToken="getIdToken",t}({}),Hu=function(t){return t.authInitiated="authInitiated",t.sessionOpened="sessionOpened",t.sessionClosed="sessionClosed",t.sessionList="sessionList",t.validationRequired="validationRequired",t.validationStarted="validationStarted",t.validationFinished="validationFinished",t.sessionAuthProof="sessionAuthProof",t.signedMessage="signedMessage",t.feeOptions="feeOptions",t.transactionReceipt="transactionReceipt",t.transactionFailed="transactionFailed",t.getSessionResponse="getSessionResponse",t.accountList="accountList",t.accountFederated="accountFederated",t.accountRemoved="accountRemoved",t.idToken="idToken",t}({}),cp=function(t){return t.unknown="unknown",t.erc20Token="erc20Token",t.erc1155Token="erc1155Token",t}({}),Sr=function(t){return t.None="None",t.Guest="Guest",t.OIDC="OIDC",t.Email="Email",t.PlayFab="PlayFab",t.Stytch="Stytch",t}({});function Zee({wallet:t,chainId:e,message:r,lifespan:n}){return fn(un.signMessage,n,{wallet:t,network:e.toString(),message:r.startsWith("0x")?r:he(Tt(r))})}const ete=["lifespan"],tte=["lifespan"],rte=["lifespan"],nte=["lifespan"],ite=["lifespan"],ste=["lifespan"],ote=["lifespan"],ate=["lifespan"];async function nf(t){let{lifespan:e}=t,r=cn(t,ete);return fn(un.initiateAuth,e,r)}async function jC(t){let{lifespan:e}=t,r=cn(t,tte);return fn(un.openSession,e,r)}async function lte(t){let{lifespan:e}=t,r=cn(t,rte);return fn(un.validateSession,e,r)}function cte(t){let{lifespan:e}=t,r=cn(t,nte);return fn(un.finishValidateSession,e,r)}function FC(t){let{lifespan:e}=t,r=cn(t,ite);return fn(un.closeSession,e,r)}function fte(t){let{lifespan:e}=t,r=cn(t,ste);return fn(un.listSessions,e,r)}function ute(t){let{lifespan:e}=t,r=cn(t,ote);return fn(un.getSession,e,r)}function dte(t){let{lifespan:e}=t,r=cn(t,ate);return fn(un.sessionAuthProof,e,r)}const hte=["token","to","value"],vte=["token","to","id","safe","data"],pte=["token","to","values","data"],yte=["to","value","abi","func","args"];function mte({lifespan:t,wallet:e,identifier:r,chainId:n,transactions:i}){return fn(un.feeOptions,t,{identifier:r,wallet:e,network:n.toString(),transactions:i.map(s=>{if(!s.to||s.to===Ax)throw new Error("Contract creation not supported");return wT(s)?{type:"transaction",to:s.to,value:ce.from(s.value||0).toHexString(),data:he(s.data||[])}:s})})}function qu({lifespan:t,wallet:e,identifier:r,chainId:n,transactions:i,transactionsFeeQuote:s,transactionsFeeOption:o}){return fn(un.sendTransaction,t,{identifier:r,wallet:e,network:n.toString(),transactions:gte(i,o).map(a=>{if(!a.to||a.to===Ax)throw new Error("Contract creation not supported");return wT(a)?{type:"transaction",to:a.to,value:ce.from(a.value||0).toHexString(),data:he(a.data||[])}:a}),transactionsFeeQuote:s})}function gte(t,e){const r=[...t];if(e)switch(e.token.type){case cp.unknown:r.push({to:e.to,value:e.value});break;case cp.erc20Token:if(!e.token.contractAddress)throw new Error("contract address is required");r.push(Fb({tokenAddress:e.token.contractAddress,to:e.to,value:e.value}));break;case cp.erc1155Token:if(!e.token.contractAddress)throw new Error("contract address is required");if(!e.token.tokenID)throw new Error("token ID is required");r.push(Bb({tokenAddress:e.token.contractAddress,to:e.to,vals:[{id:e.token.tokenID,amount:e.value}]}));break}return r}function xte({lifespan:t,chainId:e,wallet:r,metaTxHash:n}){return fn(un.getTransactionReceipt,t,{wallet:r,network:e.toString(),metaTxHash:n})}function bte(t){let{token:e,to:r,value:n}=t,i=cn(t,hte);return qu(Dr({transactions:[Fb({tokenAddress:e,to:r,value:n.toString()})]},i))}function wte(t){let{token:e,to:r,id:n,safe:i,data:s}=t,o=cn(t,vte);return qu(Dr({transactions:[Ste({tokenAddress:e,to:r,id:n,data:s,safe:i})]},o))}function Ate(t){let{token:e,to:r,values:n,data:i}=t,s=cn(t,pte);const o=n.map(a=>({id:a.id,amount:ce.from(a.amount).toString()}));return qu(Dr({transactions:[Bb({tokenAddress:e,to:r,vals:o,data:i})]},s))}function Ete(t){let{to:e,value:r,abi:n,func:i,args:s}=t,o=cn(t,yte);return qu(Dr({transactions:[bT({to:e,value:ce.from(r).toString(),data:{abi:n,func:i,args:s}})]},o))}function Fb(t){const e=t,r=t;if(e.token!==void 0)return{type:"erc20send",tokenAddress:e.token,to:e.to,value:e.value.toString()};if(r.tokenAddress!==void 0)return Dr({type:"erc20send"},r);throw new Error("Invalid ERC20 transaction")}function Ste(t){const e=t,r=t;if(e.token!==void 0)return{type:"erc721send",tokenAddress:e.token,to:e.to,id:e.id,data:e.data,safe:e.safe};if(r.tokenAddress!==void 0)return Dr({type:"erc721send"},r);throw new Error("Invalid ERC721 transaction")}function Bb(t){const e=t,r=t;if(e.values!==void 0)return{type:"erc1155send",vals:e.values.map(n=>({id:n.id,amount:ce.from(n.amount).toString()})),tokenAddress:e.token,to:e.to,data:e.data};if(r.vals!==void 0)return{type:"erc1155send",vals:r.vals.map(n=>({id:n.id,amount:ce.from(n.amount).toString()})),tokenAddress:r.tokenAddress,to:r.to,data:r.data};throw new Error("Invalid ERC1155 transaction")}function bT(t){const e=t,r=t;if(e.abi!==void 0)return{type:"delayedEncode",to:e.to,value:ce.from(e.value).toString(),data:{abi:e.abi,func:e.func,args:e.args}};if(r.data!==void 0)return{type:"delayedEncode",to:r.to,value:r.value,data:r.data};throw new Error("Invalid delayed encode transaction")}function Cte(t){if(t.length===0)throw new Error("No packets provided");const e=t[0].data.network,r=t[0].data.wallet,n=t[0].expiresAt-t[0].issuedAt,i=t[0].data.identifier,s=t[0].data.transactionsFeeQuote;if(!t.every(o=>o.data.network===e))throw new Error("All packets must have the same chainId");if(!t.every(o=>o.data.wallet===r))throw new Error("All packets must have the same wallet");return fn(un.sendTransaction,n,{network:e,wallet:r,identifier:i,transactions:t.flatMap(o=>o.data.transactions),transactionsFeeQuote:s})}function wT(t){return!["transaction","erc20send","erc721send","erc1155send","delayedEncode"].includes(t.type)}class ph{constructor(e,r,n){this.store=e,this.key=r,this.defaultValue=n}async get(){const e=await this.store.get(this.key);return e||this.defaultValue}async set(e){e?await this.store.set(this.key,e):await this.store.set(this.key,null)}}class AT{constructor(){this.store=void 0,A0.isAvailable()?this.store=new A0:this.store=new kte}async get(e){return this.store.get(e)}async set(e,r){return this.store.set(e,r)}}class A0{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(!A0.isAvailable())throw new Error("No localStorage")}async get(e){return window.localStorage.getItem(e)}async set(e,r){r?window.localStorage.setItem(e,r):window.localStorage.removeItem(e)}}class kte{constructor(){this.store={},this.store={}}async get(e){return this.store[e]||null}async set(e,r){r?this.store[e]=r:delete this.store[e]}}const dm="seq-waas-session-p256k1",hm="seq-waas-session";async function ET(t,e){const r=await e.get(dm,hm,t);if(!r)throw new Error("No private key found");const n=new Ls(r);return{sessionId(){return n.getAddress()},sign(i){return n.signMessage(i)},clear:async()=>{await e.delete(dm,hm,t)}}}async function Tte(t,e){const n=await new Ls(t).getAddress();return await e.set(dm,hm,n,t),ET(n,e)}async function Pte(t){const e=Ls.createRandom();return Tte(e.privateKey,t)}let ST=function(t){return t[t.ECDSAP256K1=0]="ECDSAP256K1",t[t.ECDSAP256R1=1]="ECDSAP256R1",t}({});const vm="seq-waas-session-p256r1",pm="seq-waas-session";async function CT(t,e,r){const n=await r.get(vm,pm,t);if(!n||!n.privateKey)throw new Error("No private key found");const i=new TextEncoder;return{sessionId:async()=>{const s=await e.exportKey("raw",n.publicKey),o=new Uint8Array(s.byteLength+1);return o[0]=ST.ECDSAP256R1,o.set(new Uint8Array(s),1),he(o)},sign:async s=>{typeof s=="string"&&(s.startsWith("0x")?(s=s.slice(2),s=de(s)):s=i.encode(s));const o=await e.sign({name:"ECDSA",hash:{name:"SHA-256"}},n.privateKey,s);return he(new Uint8Array(o))},clear:async()=>{await r.delete(vm,pm,t)}}}async function Rte(t,e,r){const n=await Ite(e,t.publicKey);return await r.set(vm,pm,n,t),CT(n,e,r)}async function _te(t,e){const r=await t.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign","verify"]);return Rte(r,t,e)}async function Ite(t,e){const r=await t.exportKey("raw",e),n=new Uint8Array(r.byteLength+1);return n[0]=ST.ECDSAP256R1,n.set(new Uint8Array(r),1),he(n)}async function ym(t,e,r){if(!r)throw new Error("No secure store available");return e?CT(t,e,r):ET(t,r)}async function Ote(t,e){if(!e)throw new Error("No secure store available");return t?_te(t,e):Pte(e)}const Mte=["lifespan"],Nte=["lifespan"],Dte=["lifespan"];function Lte(t){let{lifespan:e}=t,r=cn(t,Mte);return fn(un.listAccounts,e,r)}function jte(t){let{lifespan:e}=t,r=cn(t,Nte);return fn(un.federateAccount,e,r)}function Fte(t){let{lifespan:e}=t,r=cn(t,Dte);return fn(un.removeAccount,e,r)}const mm=Object.entries(st).reduce((t,[e,r])=>(t[r.name]=r.chainId,t),{}),Bte=Object.entries(mm).reduce((t,[e,r])=>(t[r]=e,t),{});function fp(t){const e=typeof t=="number"?t:parseInt(t);if(e in Bte)return e;const r=t.toString().toLowerCase();if(r in mm)return mm[r];throw new Error(`Unknown network: ${t}`)}const kT=()=>TT()?new $te:null;function TT(){return typeof window=="object"&&typeof window.crypto=="object"&&typeof window.crypto.subtle=="object"}class $te{constructor(){if(!TT())throw new Error("window.crypto.subtle is not available")}async generateKey(e,r,n){return window.crypto.subtle.generateKey(e,r,n)}async exportKey(e,r){const n=await window.crypto.subtle.exportKey(e,r);return new Uint8Array(n)}async digest(e,r){const n=await window.crypto.subtle.digest(e,r);return new Uint8Array(n)}async sign(e,r,n){const i=await window.crypto.subtle.sign(e,r,n);return new Uint8Array(i)}async verify(e,r,n,i){return window.crypto.subtle.verify(e,r,n,i)}getRandomValues(e){const r=new Uint8Array(e);return window.crypto.getRandomValues(r)}}const PT=()=>RT()?new Ute:null;function RT(){return typeof indexedDB=="object"}class Ute{constructor(){if(this.db=void 0,!RT())throw new Error("IndexedDB is not available");this.db=null}async openDB(e,r,n){return this.db?this.db:(this.db=await EY(e,1,{upgrade(i){i.createObjectStore(r)}}),this.db)}async get(e,r,n){const i=await this.openDB(e,r,1),s=i.transaction(r,"readonly"),o=await i.get(r,n);return await s.done,o}async set(e,r,n,i){const s=await this.openDB(e,r,1),o=s.transaction(r,"readwrite");return await s.put(r,i,n),await o.done,!0}async delete(e,r,n){const i=await this.openDB(e,r,1),s=i.transaction(r,"readwrite");return await i.delete(r,n),await s.done,!0}}const zte="@0xsequence.waas.wallet",Vte="@0xsequence.waas.session_id",Hte="@0xsequence.waas.status",Tr=5*60;class qte{constructor(e={network:1},r=new AT,n=kT(),i=PT()){this.config=e,this.store=r,this.cryptoBackend=n,this.secureStoreBackend=i,this.status=void 0,this.sessionId=void 0,this.wallet=void 0,this.sessionObservers=[],this.gettingSessionIdPromise=void 0,this.status=new ph(this.store,Hte,"signed-out"),this.sessionId=new ph(this.store,Vte,void 0),this.wallet=new ph(this.store,zte,void 0)}async getAddress(){return this.getWalletAddress()}async getWalletAddress(){if(!await this.isSignedIn())throw new Error("Not signed in");const e=await this.wallet.get();if(!e)throw new Error("No wallet");return e}async commonArgs(e){var r;return Dr({},e,{identifier:e==null?void 0:e.identifier,wallet:await this.getWalletAddress(),lifespan:(r=e==null?void 0:e.lifespan)!=null?r:Tr,chainId:fp(e.network||this.config.network)})}async signIntent(e){const r=await this.getSessionId();if(r===void 0)throw new Error("session not open");const n=await ym(r,this.cryptoBackend,this.secureStoreBackend);return Qee(n,e)}async signUsingSessionKey(e){const r=await this.getSessionId();if(!r)throw new Error("session not open");return(await ym(r,this.cryptoBackend,this.secureStoreBackend)).sign(e)}async getSessionId(){var e=this;if(this.gettingSessionIdPromise)return this.gettingSessionIdPromise;const r=async function(){let i=await e.sessionId.get();return i||(i=await(await Ote(e.cryptoBackend,e.secureStoreBackend)).sessionId(),await e.sessionId.set(i),e.signalObservers(e.sessionObservers,i)),e.gettingSessionIdPromise=void 0,i};return this.gettingSessionIdPromise=r(),this.gettingSessionIdPromise}async signInWithIdToken(e){if(await this.status.get()!=="signed-out")throw await this.completeSignOut(),new Error("you are already signed in");const n=await this.getSessionId(),i=await jC({sessionId:n,identityType:Sr.None,idToken:e,lifespan:Tr});return await this.status.set("pending"),this.signIntent(i)}async initiateGuestAuth(){const e=await this.getSessionId(),r=await nf({sessionId:e,identityType:Sr.Guest,verifier:e,lifespan:Tr});return this.signIntent(r)}async initiateEmailAuth(e){const r=await this.getSessionId(),n=await nf({sessionId:r,identityType:Sr.Email,verifier:`${e};${r}`,lifespan:Tr});return this.signIntent(n)}async initiateIdTokenAuth(e,r){const n=await this.getSessionId(),i=Je(Tt(e)),s=await nf({sessionId:n,identityType:Sr.OIDC,verifier:`${i};${r}`,lifespan:Tr});return this.signIntent(s)}async initiateStytchAuth(e,r){const n=await this.getSessionId(),i=Je(Tt(e)),s=await nf({sessionId:n,identityType:Sr.Stytch,verifier:`${i};${r}`,lifespan:Tr});return this.signIntent(s)}async initiatePlayFabAuth(e,r){const n=await this.getSessionId(),i=Je(Tt(r)),s=await nf({sessionId:n,identityType:Sr.PlayFab,verifier:`${e}|${i}`,lifespan:Tr});return this.signIntent(s)}async completeAuth(e,r){const n=await this.getSessionId(),i=await jC(Dr({},r,{sessionId:n,lifespan:Tr},e));return await this.status.set("pending"),this.signIntent(i)}onSessionStateChanged(e){return this.sessionObservers.push(e),()=>{this.sessionObservers=this.sessionObservers.filter(r=>r!=e)}}async signOut({lifespan:e,sessionId:r}={}){if(r=r||await this.sessionId.get(),!r)throw new Error("session not open");const n=FC({lifespan:e||Tr,sessionId:r});return this.signIntent(n)}async signOutSession(e){const r=FC({lifespan:Tr,sessionId:e});return this.signIntent(r)}async listSessions(){const e=fte({lifespan:Tr,wallet:await this.getWalletAddress()});return this.signIntent(e)}async completeSignOut(){await Promise.all([this.status.set("signed-out"),this.wallet.set(void 0),this.sessionId.set(void 0)]),this.signalObservers(this.sessionObservers,null)}async completeSignIn(e){if(e.result)return this.completeSignIn(e.result);const r=await this.status.get();if(e.code!=="sessionOpened")throw new Error("Invalid receipt");if(r!=="pending")throw new Error("No pending sign in");return await Promise.all([this.status.set("signed-in"),this.wallet.set(e.data.wallet)]),e.data.wallet}async isSignedIn(){return await this.status.get()==="signed-in"}async sessionAuthProof(e){var r;const n=dte({lifespan:(r=e.lifespan)!=null?r:Tr,network:fp(e.network||this.config.network).toString(),wallet:await this.getWalletAddress(),nonce:e.nonce});return this.signIntent(n)}async signMessage(e){var r;const n=Zee(Dr({chainId:fp(e.network||this.config.network)},e,{lifespan:(r=e.lifespan)!=null?r:Tr,wallet:await this.getWalletAddress()}));return this.signIntent(n)}async sendTransaction(e){const r=qu(await this.commonArgs(e));return this.signIntent(r)}async getTransactionReceipt(e){const r=xte(await this.commonArgs(e));return this.signIntent(r)}async sendERC20(e){if(e.token.toLowerCase()===e.to.toLowerCase())throw new Error("Cannot burn tokens using sendERC20");const r=bte(await this.commonArgs(e));return this.signIntent(r)}async sendERC721(e){if(e.token.toLowerCase()===e.to.toLowerCase())throw new Error("Cannot burn tokens using sendERC721");const r=wte(await this.commonArgs(e));return this.signIntent(r)}async sendERC1155(e){if(e.token.toLowerCase()===e.to.toLowerCase())throw new Error("Cannot burn tokens using sendERC1155");const r=Ate(await this.commonArgs(e));return this.signIntent(r)}async callContract(e){const r=Ete(await this.commonArgs(e));return this.signIntent(r)}async feeOptions(e){const r=mte(await this.commonArgs(e));return this.signIntent(r)}async validateSession({deviceMetadata:e}){const r=await this.sessionId.get();if(!r)throw new Error("session not open");const n=await lte({lifespan:Tr,sessionId:r,deviceMetadata:e,wallet:await this.getWalletAddress()});return this.signIntent(n)}async getSession(){const e=await this.sessionId.get();if(!e)throw new Error("session not open");const r=ute({sessionId:e,wallet:await this.getWalletAddress(),lifespan:Tr});return this.signIntent(r)}async finishValidateSession(e,r){const n=await this.sessionId.get();if(!n)throw new Error("session not open");const i=await this.getWalletAddress(),s=cte({sessionId:n,wallet:i,lifespan:Tr,salt:e,challenge:r});return this.signIntent(s)}async listAccounts(){const e=Lte({wallet:await this.getWalletAddress(),lifespan:Tr});return this.signIntent(e)}async linkAccount(e){const r=await this.sessionId.get();if(!r)throw new Error("session not open");const n=jte(Dr({wallet:await this.getWalletAddress(),lifespan:Tr,sessionId:r},e));return this.signIntent(n)}async removeAccount({accountId:e}){const r=Fte({wallet:await this.getWalletAddress(),lifespan:Tr,accountId:e});return this.signIntent(r)}async batch(e){const r=Cte(e);return this.signIntent(r)}signalObservers(e,r){e.forEach(n=>n(r))}async updateIntentTime(e,r){const n=Xee(e,r);return this.signIntent(n)}}class Wte{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/WaasAuthenticator/",this.registerSession=(n,i,s)=>this.fetch(this.url("RegisterSession"),up(n,i,s)).then(o=>dp(o).then(a=>({session:a.session,response:a.response})),o=>{throw yh.new({cause:`fetch(): ${o.message||""}`})}),this.sendIntent=(n,i,s)=>this.fetch(this.url("SendIntent"),up(n,i,s)).then(o=>dp(o).then(a=>({response:a.response})),o=>{throw yh.new({cause:`fetch(): ${o.message||""}`})}),this.chainList=(n,i)=>this.fetch(this.url("ChainList"),up({},n,i)).then(s=>dp(s).then(o=>({chains:o.chains})),s=>{throw yh.new({cause:`fetch(): ${s.message||""}`})}),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const up=(t={},e={},r=null)=>({method:"POST",headers:Dr({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),dp=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let i="";throw n instanceof Error&&(i=n.message),LT.new({status:t.status,cause:`JSON.parse(): ${i}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(nre[n]||kr).new(r)}return r});let kr=class _T extends Error{constructor(e,r,n,i,s){super(n),this.name=void 0,this.code=void 0,this.message=void 0,this.status=void 0,this.cause=void 0,this.msg=void 0,this.name=e||"WebrpcError",this.code=typeof r=="number"?r:0,this.message=n||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof i=="number"?i:0,this.cause=s,Object.setPrototypeOf(this,_T.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}},Gte=class IT extends kr{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,IT.prototype)}},yh=class OT extends kr{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,OT.prototype)}},Kte=class MT extends kr{constructor(e="WebrpcBadRoute",r=-2,n="bad route",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,MT.prototype)}},Yte=class NT extends kr{constructor(e="WebrpcBadMethod",r=-3,n="bad method",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,NT.prototype)}},Qte=class DT extends kr{constructor(e="WebrpcBadRequest",r=-4,n="bad request",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,DT.prototype)}},LT=class jT extends kr{constructor(e="WebrpcBadResponse",r=-5,n="bad response",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,jT.prototype)}},Jte=class FT extends kr{constructor(e="WebrpcServerPanic",r=-6,n="server panic",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,FT.prototype)}},Xte=class BT extends kr{constructor(e="WebrpcInternalError",r=-7,n="internal error",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,BT.prototype)}},Zte=class $T extends kr{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,$T.prototype)}},ere=class UT extends kr{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,UT.prototype)}},tre=class zT extends kr{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,zT.prototype)}},rre=class VT extends kr{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,VT.prototype)}};class $b extends kr{constructor(e="TenantNotFound",r=1001,n="Tenant not found",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,$b.prototype)}}class bu extends kr{constructor(e="EmailAlreadyInUse",r=7e3,n="Could not create account as the email is already in use",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,bu.prototype)}}class Ub extends kr{constructor(e="AccountAlreadyLinked",r=7001,n="Could not link account as it is linked to another wallet",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Ub.prototype)}}class zb extends kr{constructor(e="ProofVerificationFailed",r=7002,n="The authentication proof could not be verified",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,zb.prototype)}}class Vb extends kr{constructor(e="AnswerIncorrect",r=7003,n="The provided answer is incorrect",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Vb.prototype)}}class Hb extends kr{constructor(e="ChallengeExpired",r=7004,n="The challenge has expired",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Hb.prototype)}}const nre={0:Gte,[-1]:yh,[-2]:Kte,[-3]:Yte,[-4]:Qte,[-5]:LT,[-6]:Jte,[-7]:Xte,[-8]:Zte,[-9]:ere,[-10]:tre,1e3:rre,1001:$b,7e3:bu,7001:Ub,7002:zb,7003:Vb,7004:Hb};function Nd(t){return typeof t=="object"&&t.code===Hu.authInitiated&&typeof t.data=="object"&&typeof t.data.sessionId=="string"&&typeof t.data.identityType=="string"&&typeof t.data.expiresIn=="number"}function Wu(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="transactionReceipt"&&typeof t.data=="object"&&typeof t.data.txHash=="string"&&typeof t.data.receipt=="object"&&typeof t.data.request=="object"}function HT(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="transactionReceipt"&&typeof t.data=="object"&&typeof t.data.metaTxHash=="string"&&!t.data.txHash&&typeof t.data.request=="object"}function ire(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="transactionFailed"&&typeof t.data=="object"&&typeof t.data.request=="object"&&Array.isArray(t.data.simulations)&&typeof t.data.error=="string"}function BC(t){return Wu(t)||ire(t)||HT(t)}function sre(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="signedMessage"&&typeof t.data=="object"&&typeof t.data.message=="string"&&typeof t.data.signature=="string"}function ore(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="sessionAuthProof"&&typeof t.data=="object"&&typeof t.data.sessionId=="string"&&typeof t.data.network=="string"&&typeof t.data.wallet=="string"&&typeof t.data.message=="string"&&typeof t.data.signature=="string"}function are(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="feeOptions"&&typeof t.data=="object"&&Array.isArray(t.data.feeOptions)}function lre(t){return typeof t=="object"&&t.code===Hu.validationRequired&&typeof t.data=="object"&&typeof t.data.sessionId=="string"}function cre(t){return typeof t=="object"&&t.code===Hu.validationFinished&&typeof t.data=="object"}function fre(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="sessionClosed"}function ure(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="getSessionResponse"&&typeof t.data=="object"&&typeof t.data.session=="string"&&typeof t.data.wallet=="string"}function dre(t){return typeof t=="object"&&t.code===Hu.accountFederated&&typeof t.data=="object"&&typeof t.data.account=="object"}function hre(t){return typeof t=="object"&&t.code===Hu.accountList&&typeof t.data=="object"}function $C(t){var e,r;return!!(t instanceof kr&&((e=t.cause)!=null&&e.endsWith("intent is invalid: intent expired")||(r=t.cause)!=null&&r.endsWith("intent is invalid: intent issued in the future")))}class vre{constructor(e,r){this.region=e,this.clientId=r,this.cognitoMemo=void 0}cognito(){return this.cognitoMemo||(this.cognitoMemo=new zZ({region:this.region})),this.cognitoMemo}signUp(e){return e=e.toLowerCase().trim(),this.cognito().send(new Hee({ClientId:this.clientId,Username:e,Password:"aB1%"+pre(14),UserAttributes:[{Name:"email",Value:e}]}))}signIn(e){return e=e.toLowerCase().trim(),this.cognito().send(new zee({AuthFlow:"CUSTOM_AUTH",ClientId:this.clientId,AuthParameters:{USERNAME:e}}))}async initiateAuth({email:e}){let r;e=e.toLowerCase().trim();try{r=await this.signIn(e)}catch(n){if(n instanceof _v&&n.message.includes("user not found"))await this.signUp(e),r=await this.signIn(e);else throw n}if(!r.Session)throw new Error("response session is empty");return{instance:r.Session,email:e}}async finalizeAuth({instance:e,email:r,answer:n,sessionHash:i}){r=r.toLowerCase().trim();const s=await this.cognito().send(new Vee({ClientId:this.clientId,Session:e,ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:{USERNAME:r,ANSWER:n},ClientMetadata:{SESSION_HASH:i}}));if(!s.AuthenticationResult||!s.AuthenticationResult.IdToken)throw new Error("AuthenticationResult.IdToken is empty");return{idToken:s.AuthenticationResult.IdToken}}}function pre(t){return Array.from(yre(t)).map(e=>e.toString(16).padStart(2,"0")).join("")}function yre(t){const e=new Uint8Array(t);if(typeof window=="object"&&typeof window.crypto=="object")return window.crypto.getRandomValues(e);{console.warn("window.crypto.getRandomValues is not available. Falling back to less secure Math.random().");const r=new Uint8Array(t);for(let n=0;n{this.validationRequiredCallback=this.validationRequiredCallback.filter(r=>r!==e)}}onEmailConflict(e){return this.emailConflictCallback.push(e),()=>{this.emailConflictCallback=this.emailConflictCallback.filter(r=>r!==e)}}onEmailAuthCodeRequired(e){return this.emailAuthCodeRequiredCallback.push(e),()=>{this.emailAuthCodeRequiredCallback=this.emailAuthCodeRequiredCallback.filter(r=>r!==e)}}async handleValidationRequired({onValidationRequired:e}={}){var r;if(!(e?e():!0))return!1;const i=await this.waas.validateSession({deviceMetadata:(r=await this.deviceName.get())!=null?r:"Unknown device"}),s=await this.sendIntent(i);this.validationRequiredSalt=s.data.salt;for(const o of this.validationRequiredCallback)o();return this.waitForSessionValid()}headers(){return{"X-Access-Key":this.config.projectAccessKey}}async sendIntent(e){if(!await this.waas.getSessionId())throw new Error("session not open");try{return(await this.client.sendIntent({intent:e},this.headers())).response}catch(n){if($C(n)&&this.lastDate){const i=await this.waas.updateIntentTime(e,this.lastDate);return(await this.client.sendIntent({intent:i},this.headers())).response}throw n}}async isSignedIn(){return this.waas.isSignedIn()}signIn(e,r){var n=this;const i="email"in e;return i&&this.emailAuthCodeRequiredCallback.length==0?Promise.reject("Missing emailAuthCodeRequired callback"):new Promise(async function(s,o){const a=await n.initAuth(e),l=async function(f){try{const u=await n.completeAuth(a.withAnswer(f),{sessionName:r});s(u)}catch(u){if(u instanceof bu){const d=async function(){try{const m=await n.completeAuth(a.withAnswer(f),{sessionName:r,forceCreateAccount:!0});s(m)}catch(m){o(m)}},h={type:Sr.None,email:"",issuer:""};if(u.cause){const p=u.cause.split("|");p.length>=3&&(h.type=p[0],h.email=p[1],h.issuer=p[2])}for(const p of n.emailConflictCallback)p(h,d)}else o(u)}};if(i)for(const c of n.emailAuthCodeRequiredCallback)c(l);else l("")})}async initAuth(e){if("guest"in e&&e.guest)return this.initGuestAuth();if("idToken"in e)return this.initIdTokenAuth(e.idToken);if("email"in e)return this.initEmailAuth(e.email);if("playFabTitleId"in e)return this.initPlayFabAuth(e.playFabTitleId,e.playFabSessionTicket);throw new Error("invalid identity")}async initGuestAuth(){const e=await this.waas.getSessionId(),r=await this.waas.initiateGuestAuth(),n=await this.sendIntent(r);if(!Nd(n))throw new Error(`Invalid response: ${JSON.stringify(n)}`);return new mre(e,n.data.challenge)}async initIdTokenAuth(e){var r;const n=xT(e),i=((r=n.iss)==null?void 0:r.startsWith("stytch.com/"))||!1,s=i?await this.waas.initiateStytchAuth(e,n.exp):await this.waas.initiateIdTokenAuth(e,n.exp),o=await this.sendIntent(s);if(!Nd(o))throw new Error(`Invalid response: ${JSON.stringify(o)}`);return i?new gre(e):new qT(e)}async initEmailAuth(e){const r=await this.waas.getSessionId(),n=await this.waas.initiateEmailAuth(e),i=await this.sendIntent(n);if(!Nd(i))throw new Error(`Invalid response: ${JSON.stringify(i)}`);return new qb(e,r,i.data.challenge)}async initPlayFabAuth(e,r){const n=await this.waas.initiatePlayFabAuth(e,r),i=await this.sendIntent(n);if(!Nd(i))throw new Error(`Invalid response: ${JSON.stringify(i)}`);return new xre(e,r)}async completeAuth(e,r){r||(r={}),r.sessionName||(r.sessionName="session name");const n=await this.waas.completeAuth(e.getIntentParams(),{forceCreateAccount:r.forceCreateAccount});try{const i=await this.registerSession(n,r.sessionName);return await this.waas.completeSignIn({code:"sessionOpened",data:{sessionId:i.session.id,wallet:i.response.data.wallet}}),{sessionId:i.session.id,wallet:i.response.data.wallet,email:i.session.identity.email}}catch(i){throw i instanceof bu||await this.waas.completeSignOut(),i}}async registerSession(e,r){try{return await this.client.registerSession({intent:e,friendlyName:r},this.headers())}catch(n){if($C(n)&&this.lastDate){const i=await this.waas.updateIntentTime(e,this.lastDate);return await this.client.registerSession({intent:i,friendlyName:r},this.headers())}throw n}}async refreshSession(){throw new Error("Not implemented")}async getSessionId(){return this.waas.getSessionId()}async getSessionHash(){const e=(await this.waas.getSessionId()).toLowerCase();return Je(Tt(e))}async dropSession({sessionId:e,strict:r}={}){const n=await this.waas.getSessionId();if(!n)throw new Error("session not open");const i=e||n;try{const s=await this.waas.signOutSession(i),o=await this.sendIntent(s);if(!fre(o))throw new Error(`Invalid response: ${JSON.stringify(o)}`)}catch(s){if(r)throw s;console.error(s)}if(i===n){if(!this.secureStoreBackend)throw new Error("No secure store available");(await ym(n,this.cryptoBackend,this.secureStoreBackend)).clear(),await this.waas.completeSignOut(),await this.deviceName.set(void 0)}}async listSessions(){const e=await this.waas.getSessionId();if(!e)throw new Error("session not open");const r=await this.waas.listSessions();return(await this.sendIntent(r)).data.map(i=>Dr({},i,{isThis:i.id===e}))}async getAddress(){return this.waas.getAddress()}async validateSession(e){return await this.isSessionValid()?!0:this.handleValidationRequired(e)}async finishValidateSession(e){const r=await this.waas.finishValidateSession(this.validationRequiredSalt,e),n=await this.sendIntent(r);if(!cre(n))throw new Error(`Invalid response: ${JSON.stringify(n)}`);return this.validationRequiredSalt="",n.data.isValid}async isSessionValid(){const e=await this.waas.getSession(),r=await this.sendIntent(e);if(!ure(r))throw new Error(`Invalid response: ${JSON.stringify(r)}`);return r.data.validated}async waitForSessionValid(e=6e5,r=2e3){const n=Date.now();for(;Date.now()-nsetTimeout(i,r))}return!1}async sessionAuthProof({nonce:e,network:r,validation:n}){const i=await this.waas.sessionAuthProof({nonce:e,network:r});return await this.trySendIntent({validation:n},i,ore)}async listAccounts(){const e=await this.waas.listAccounts(),r=await this.sendIntent(e);if(!hre(r))throw new Error(`Invalid response: ${JSON.stringify(r)}`);return r.data}async linkAccount(e){const r=await this.waas.linkAccount(e.getIntentParams()),n=await this.sendIntent(r);if(!dre(n))throw new Error(`Invalid response: ${JSON.stringify(n)}`);return n.data}async removeAccount(e){const r=await this.waas.removeAccount({accountId:e});await this.sendIntent(r)}async useIdentifier(e){if(e.identifier)return e;const r=`ts-sdk-${Date.now()}-${await this.waas.getSessionId()}`;return Dr({},e,{identifier:r})}async trySendIntent(e,r,n){const i=await this.sendIntent(r);if(n(i))return i;if(lre(i)&&await this.handleValidationRequired(e.validation)){const o=await this.sendIntent(r);if(n(o))return o}throw new Error(JSON.stringify(i))}async signMessage(e){const r=await this.waas.signMessage(await this.useIdentifier(e));return this.trySendIntent(e,r,sre)}async trySendTransactionIntent(e,r){let n=await this.trySendIntent(r,e,BC);for(;HT(n);){await new Promise(o=>setTimeout(o,1e3));const i={metaTxHash:n.data.metaTxHash,network:e.data.network,identifier:e.data.identifier,validation:r.validation},s=await this.waas.getTransactionReceipt(await this.useIdentifier(i));n=await this.trySendIntent(i,s,BC)}return n}async sendTransaction(e){const r=await this.waas.sendTransaction(await this.useIdentifier(e));return this.trySendTransactionIntent(r,e)}async sendERC20(e){const r=await this.waas.sendERC20(await this.useIdentifier(e));return this.trySendTransactionIntent(r,e)}async sendERC721(e){const r=await this.waas.sendERC721(await this.useIdentifier(e));return this.trySendTransactionIntent(r,e)}async sendERC1155(e){const r=await this.waas.sendERC1155(await this.useIdentifier(e));return this.trySendTransactionIntent(r,e)}async callContract(e){const r=await this.waas.callContract(await this.useIdentifier(e));return this.trySendTransactionIntent(r,e)}async feeOptions(e){const r=await this.waas.feeOptions(await this.useIdentifier(e));return this.trySendIntent(e,r,are)}async networkList(){const e=[],r=await this.client.chainList({"X-Access-Key":this.config.projectAccessKey});for(const n of r.chains)e.push({id:n.id,name:n.name,isEnabled:n.isEnabled});return e}onSessionStateChanged(e){return this.waas.onSessionStateChanged(e)}async fetch(e,r){const n=await window.fetch(e,r),i=n.headers.get("date");return i&&(this.lastDate=new Date(i)),n}}const Ere=t=>{if(t.type===Sr.PlayFab)return"PlayFab login";if(t.type===Sr.Email)return"Email login";if(t.type===Sr.OIDC)switch(t.issuer){case"https://accounts.google.com":return"Google login";case"https://appleid.apple.com":return"Apple login";default:return"Unknown account type"}return"Unknown account type"},Sre=t=>{const{onCancel:e,onConfirm:r}=t;return D.jsxs(G,{style:{maxWidth:"600px"},flexDirection:"column",paddingX:"10",paddingY:"4",alignItems:"center",gap:"4",children:[D.jsx(G,{children:D.jsx(me,{variant:"large",color:"text100",fontWeight:"bold",children:"Email already in use"})}),D.jsx(G,{height:"full",children:D.jsxs(me,{as:"div",variant:"normal",color:"text50",textAlign:"center",children:["Another account with this email address ",D.jsxs(me,{color:"text80",children:["(",t.info.email,")"]})," already exists with account type ",D.jsxs(me,{color:"text80",children:["(",Ere(t.info),")"]}),". You can cancel this or force create a new account."]})}),D.jsxs(G,{flexDirection:"row",gap:"3",marginTop:"6",marginBottom:"2",children:[D.jsx(kt,{label:"Cancel",onClick:e}),D.jsx(kt,{variant:"primary",label:"Create new account",onClick:r})]})]})},Cre=({KEYS_TO_EXCLUDE:t=[]}={})=>{const e=(r,n)=>typeof r!=typeof n?!1:r===null||n===null?r===n:typeof r=="object"?Object.keys(r).length!==Object.keys(n).length||Object.keys(r).some(i=>!(i in n))?!1:Object.entries(r).filter(([i])=>!t.includes(i)).every(([i,s])=>e(s,n[i])):r===n;return e},kre=Cre(),Tre=(t,e)=>t===e?e:Object.keys(t).reduce((r,n)=>(n in e&&kre(t[n],e[n])&&(r[n]=t[n]),r),Object.assign({},e)),Pre=t=>{const e=y.useRef(!0),[r,n]=y.useState(t);y.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]);const i=y.useCallback(s=>{e.current&&n(s)},[]);return[r,i]},WT=(t,e="StytchProvider")=>`${t} can only be used inside <${e}>.`,Rre="You cannot render a inside another .",_re=`The @stytch/react library is not meant for use with serverside environments like NextJS. + */class vT{static getParser(e,r=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new CC(e,r)}static parse(e){return new CC(e).getResult()}static get BROWSER_MAP(){return hT}static get ENGINE_MAP(){return xo}static get OS_MAP(){return dn}static get PLATFORMS_MAP(){return dr}}const SZ=({serviceId:t,clientVersion:e})=>async()=>{var i,s,o,a,l;const r=typeof window<"u"&&((i=window==null?void 0:window.navigator)!=null&&i.userAgent)?vT.parse(window.navigator.userAgent):void 0,n=[["aws-sdk-js",e],["ua","2.0"],[`os/${((s=r==null?void 0:r.os)==null?void 0:s.name)||"other"}`,(o=r==null?void 0:r.os)==null?void 0:o.version],["lang/js"],["md/browser",`${((a=r==null?void 0:r.browser)==null?void 0:a.name)??"unknown"}_${((l=r==null?void 0:r.browser)==null?void 0:l.version)??"unknown"}`]];return t&&n.push([`api/${t}`,e]),n},CZ=t=>()=>Promise.reject(t),kC=typeof TextEncoder=="function"?new TextEncoder:null,kZ=t=>{if(typeof t=="string"){if(kC)return kC.encode(t).byteLength;let e=t.length;for(let r=e-1;r>=0;r--){const n=t.charCodeAt(r);n>127&&n<=2047?e++:n>2047&&n<=65535&&(e+=2),n>=56320&&n<=57343&&r--}return e}else{if(typeof t.byteLength=="number")return t.byteLength;if(typeof t.size=="number")return t.size}throw new Error(`Body Length computation failed for ${t}`)},pT="required",is="fn",ss="argv",Nc="ref",TC=!0,PC="isSet",xu="booleanEquals",vl="error",rf="endpoint",ks="tree",Kx="PartitionResult",RC={[pT]:!1,type:"String"},_C={[pT]:!0,default:!1,type:"Boolean"},IC={[Nc]:"Endpoint"},yT={[is]:xu,[ss]:[{[Nc]:"UseFIPS"},!0]},mT={[is]:xu,[ss]:[{[Nc]:"UseDualStack"},!0]},Ki={},OC={[is]:"getAttr",[ss]:[{[Nc]:Kx},"supportsFIPS"]},MC={[is]:xu,[ss]:[!0,{[is]:"getAttr",[ss]:[{[Nc]:Kx},"supportsDualStack"]}]},NC=[yT],DC=[mT],LC=[{[Nc]:"Region"}],TZ={version:"1.0",parameters:{Region:RC,UseDualStack:_C,UseFIPS:_C,Endpoint:RC},rules:[{conditions:[{[is]:PC,[ss]:[IC]}],rules:[{conditions:NC,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:vl},{conditions:DC,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:vl},{endpoint:{url:IC,properties:Ki,headers:Ki},type:rf}],type:ks},{conditions:[{[is]:PC,[ss]:LC}],rules:[{conditions:[{[is]:"aws.partition",[ss]:LC,assign:Kx}],rules:[{conditions:[yT,mT],rules:[{conditions:[{[is]:xu,[ss]:[TC,OC]},MC],rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ki,headers:Ki},type:rf}],type:ks},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:vl}],type:ks},{conditions:NC,rules:[{conditions:[{[is]:xu,[ss]:[OC,TC]}],rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ki,headers:Ki},type:rf}],type:ks},{error:"FIPS is enabled but this partition does not support FIPS",type:vl}],type:ks},{conditions:DC,rules:[{conditions:[MC],rules:[{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ki,headers:Ki},type:rf}],type:ks},{error:"DualStack is enabled but this partition does not support DualStack",type:vl}],type:ks},{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",properties:Ki,headers:Ki},type:rf}],type:ks}],type:ks},{error:"Invalid Configuration: Missing Region",type:vl}]},PZ=TZ,RZ=(t,e={})=>sQ(PZ,{endpointParams:t,logger:e.logger});x0.aws=H9;const _Z=t=>({apiVersion:"2016-04-18",base64Decoder:(t==null?void 0:t.base64Decoder)??Vx,base64Encoder:(t==null?void 0:t.base64Encoder)??tT,disableHostPrefix:(t==null?void 0:t.disableHostPrefix)??!1,endpointProvider:(t==null?void 0:t.endpointProvider)??RZ,extensions:(t==null?void 0:t.extensions)??[],httpAuthSchemeProvider:(t==null?void 0:t.httpAuthSchemeProvider)??MX,httpAuthSchemes:(t==null?void 0:t.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new rX},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new WJ}],logger:(t==null?void 0:t.logger)??new Z9,serviceId:(t==null?void 0:t.serviceId)??"Cognito Identity Provider",urlParser:(t==null?void 0:t.urlParser)??b0,utf8Decoder:(t==null?void 0:t.utf8Decoder)??vc,utf8Encoder:(t==null?void 0:t.utf8Encoder)??eT}),IZ=(t,e,r)=>{let n,i,s,o=!1;const a=async()=>{i||(i=t());try{n=await i,s=!0,o=!1}finally{i=void 0}return n};return e===void 0?async l=>((!s||l!=null&&l.forceRefresh)&&(n=await a()),n):async l=>((!s||l!=null&&l.forceRefresh)&&(n=await a()),o?n:r&&!r(n)?(o=!0,n):(e(n)&&await a(),n))},OZ=["in-region","cross-region","mobile","standard","legacy"],MZ=({defaultsMode:t}={})=>IZ(async()=>{const e=typeof t=="function"?await t():t;switch(e==null?void 0:e.toLowerCase()){case"auto":return Promise.resolve(NZ()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(e==null?void 0:e.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${OZ.join(", ")}, got ${e}`)}}),NZ=()=>{var r,n;const t=typeof window<"u"&&((r=window==null?void 0:window.navigator)!=null&&r.userAgent)?vT.parse(window.navigator.userAgent):void 0,e=(n=t==null?void 0:t.platform)==null?void 0:n.type;return e==="tablet"||e==="mobile"},DZ=t=>{const e=MZ(t),r=()=>e().then(RJ),n=_Z(t);return{...n,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:(t==null?void 0:t.bodyLengthChecker)??kZ,credentialDefaultProvider:(t==null?void 0:t.credentialDefaultProvider)??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:(t==null?void 0:t.defaultUserAgentProvider)??SZ({serviceId:n.serviceId,clientVersion:eZ.version}),maxAttempts:(t==null?void 0:t.maxAttempts)??w0,region:(t==null?void 0:t.region)??CZ("Region is missing"),requestHandler:qx.create((t==null?void 0:t.requestHandler)??r),retryMode:(t==null?void 0:t.retryMode)??(async()=>(await r()).retryMode||VQ),sha256:(t==null?void 0:t.sha256)??gZ,streamCollector:(t==null?void 0:t.streamCollector)??xJ,useDualstackEndpoint:(t==null?void 0:t.useDualstackEndpoint)??(()=>Promise.resolve(mQ)),useFipsEndpoint:(t==null?void 0:t.useFipsEndpoint)??(()=>Promise.resolve(gQ))}},LZ=t=>{let e=async()=>{if(t.region===void 0)throw new Error("Region is missing from runtimeConfig");const r=t.region;return typeof r=="string"?r:r()};return{setRegion(r){e=r},region(){return e}}},jZ=t=>({region:t.region()}),FZ=t=>{const e=t.httpAuthSchemes;let r=t.httpAuthSchemeProvider,n=t.credentials;return{setHttpAuthScheme(i){const s=e.findIndex(o=>o.schemeId===i.schemeId);s===-1?e.push(i):e.splice(s,1,i)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(i){r=i},httpAuthSchemeProvider(){return r},setCredentials(i){n=i},credentials(){return n}}},BZ=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),Md=t=>t,$Z=(t,e)=>{const r={...Md(LZ(t)),...Md(NJ(t)),...Md(kY(t)),...Md(FZ(t))};return e.forEach(n=>n.configure(r)),{...t,...jZ(r),...DJ(r),...TY(r),...BZ(r)}};class UZ extends dJ{constructor(...[e]){const r=DZ(e||{}),n=DX(r),i=$Y(n),s=uJ(i),o=xQ(s),a=o,l=jQ(a),c=NX(l),f=$Z(c,(e==null?void 0:e.extensions)||[]);super(f),this.config=f,this.middlewareStack.use(yQ(this.config)),this.middlewareStack.use(UJ(this.config)),this.middlewareStack.use(ZJ(this.config)),this.middlewareStack.use(IY(this.config)),this.middlewareStack.use(NY(this.config)),this.middlewareStack.use(BY(this.config)),this.middlewareStack.use(BQ(this.config,{httpAuthSchemeParametersProvider:IX,identityProviderConfigProvider:async u=>new HJ({"aws.auth#sigv4":u.credentials})})),this.middlewareStack.use(qJ(this.config))}destroy(){super.destroy()}}class Ne extends Hx{constructor(e){super(e),Object.setPrototypeOf(this,Ne.prototype)}}class Yx extends Ne{constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),this.name="InternalErrorException",this.$fault="server",Object.setPrototypeOf(this,Yx.prototype)}}class Qx extends Ne{constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),this.name="InvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,Qx.prototype)}}class Jx extends Ne{constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,Jx.prototype)}}class Xx extends Ne{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Xx.prototype)}}class Zx extends Ne{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,Zx.prototype)}}class eb extends Ne{constructor(e){super({name:"UserImportInProgressException",$fault:"client",...e}),this.name="UserImportInProgressException",this.$fault="client",Object.setPrototypeOf(this,eb.prototype)}}class tb extends Ne{constructor(e){super({name:"UserNotFoundException",$fault:"client",...e}),this.name="UserNotFoundException",this.$fault="client",Object.setPrototypeOf(this,tb.prototype)}}class rb extends Ne{constructor(e){super({name:"InvalidLambdaResponseException",$fault:"client",...e}),this.name="InvalidLambdaResponseException",this.$fault="client",Object.setPrototypeOf(this,rb.prototype)}}class nb extends Ne{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,nb.prototype)}}class ib extends Ne{constructor(e){super({name:"TooManyFailedAttemptsException",$fault:"client",...e}),this.name="TooManyFailedAttemptsException",this.$fault="client",Object.setPrototypeOf(this,ib.prototype)}}class sb extends Ne{constructor(e){super({name:"UnexpectedLambdaException",$fault:"client",...e}),this.name="UnexpectedLambdaException",this.$fault="client",Object.setPrototypeOf(this,sb.prototype)}}class Iv extends Ne{constructor(e){super({name:"UserLambdaValidationException",$fault:"client",...e}),this.name="UserLambdaValidationException",this.$fault="client",Object.setPrototypeOf(this,Iv.prototype)}}class ob extends Ne{constructor(e){super({name:"CodeDeliveryFailureException",$fault:"client",...e}),this.name="CodeDeliveryFailureException",this.$fault="client",Object.setPrototypeOf(this,ob.prototype)}}class ab extends Ne{constructor(e){super({name:"InvalidPasswordException",$fault:"client",...e}),this.name="InvalidPasswordException",this.$fault="client",Object.setPrototypeOf(this,ab.prototype)}}class lb extends Ne{constructor(e){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...e}),this.name="InvalidSmsRoleAccessPolicyException",this.$fault="client",Object.setPrototypeOf(this,lb.prototype)}}class cb extends Ne{constructor(e){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...e}),this.name="InvalidSmsRoleTrustRelationshipException",this.$fault="client",Object.setPrototypeOf(this,cb.prototype)}}class fb extends Ne{constructor(e){super({name:"PreconditionNotMetException",$fault:"client",...e}),this.name="PreconditionNotMetException",this.$fault="client",Object.setPrototypeOf(this,fb.prototype)}}class ub extends Ne{constructor(e){super({name:"UnsupportedUserStateException",$fault:"client",...e}),this.name="UnsupportedUserStateException",this.$fault="client",Object.setPrototypeOf(this,ub.prototype)}}class db extends Ne{constructor(e){super({name:"UsernameExistsException",$fault:"client",...e}),this.name="UsernameExistsException",this.$fault="client",Object.setPrototypeOf(this,db.prototype)}}class hb extends Ne{constructor(e){super({name:"AliasExistsException",$fault:"client",...e}),this.name="AliasExistsException",this.$fault="client",Object.setPrototypeOf(this,hb.prototype)}}class vb extends Ne{constructor(e){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...e}),this.name="InvalidUserPoolConfigurationException",this.$fault="client",Object.setPrototypeOf(this,vb.prototype)}}class pb extends Ne{constructor(e){super({name:"MFAMethodNotFoundException",$fault:"client",...e}),this.name="MFAMethodNotFoundException",this.$fault="client",Object.setPrototypeOf(this,pb.prototype)}}class yb extends Ne{constructor(e){super({name:"PasswordResetRequiredException",$fault:"client",...e}),this.name="PasswordResetRequiredException",this.$fault="client",Object.setPrototypeOf(this,yb.prototype)}}class mb extends Ne{constructor(e){super({name:"UserNotConfirmedException",$fault:"client",...e}),this.name="UserNotConfirmedException",this.$fault="client",Object.setPrototypeOf(this,mb.prototype)}}class gb extends Ne{constructor(e){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...e}),this.name="UserPoolAddOnNotEnabledException",this.$fault="client",Object.setPrototypeOf(this,gb.prototype)}}class xb extends Ne{constructor(e){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...e}),this.name="InvalidEmailRoleAccessPolicyException",this.$fault="client",Object.setPrototypeOf(this,xb.prototype)}}class bb extends Ne{constructor(e){super({name:"CodeMismatchException",$fault:"client",...e}),this.name="CodeMismatchException",this.$fault="client",Object.setPrototypeOf(this,bb.prototype)}}class wb extends Ne{constructor(e){super({name:"ExpiredCodeException",$fault:"client",...e}),this.name="ExpiredCodeException",this.$fault="client",Object.setPrototypeOf(this,wb.prototype)}}class Eb extends Ne{constructor(e){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...e}),this.name="SoftwareTokenMFANotFoundException",this.$fault="client",Object.setPrototypeOf(this,Eb.prototype)}}class Ab extends Ne{constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),this.name="ConcurrentModificationException",this.$fault="client",Object.setPrototypeOf(this,Ab.prototype)}}class Sb extends Ne{constructor(e){super({name:"ForbiddenException",$fault:"client",...e}),this.name="ForbiddenException",this.$fault="client",Object.setPrototypeOf(this,Sb.prototype)}}class Cb extends Ne{constructor(e){super({name:"GroupExistsException",$fault:"client",...e}),this.name="GroupExistsException",this.$fault="client",Object.setPrototypeOf(this,Cb.prototype)}}class kb extends Ne{constructor(e){super({name:"DuplicateProviderException",$fault:"client",...e}),this.name="DuplicateProviderException",this.$fault="client",Object.setPrototypeOf(this,kb.prototype)}}class Tb extends Ne{constructor(e){super({name:"UserPoolTaggingException",$fault:"client",...e}),this.name="UserPoolTaggingException",this.$fault="client",Object.setPrototypeOf(this,Tb.prototype)}}class Pb extends Ne{constructor(e){super({name:"InvalidOAuthFlowException",$fault:"client",...e}),this.name="InvalidOAuthFlowException",this.$fault="client",Object.setPrototypeOf(this,Pb.prototype)}}class Rb extends Ne{constructor(e){super({name:"ScopeDoesNotExistException",$fault:"client",...e}),this.name="ScopeDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,Rb.prototype)}}class _b extends Ne{constructor(e){super({name:"UnsupportedIdentityProviderException",$fault:"client",...e}),this.name="UnsupportedIdentityProviderException",this.$fault="client",Object.setPrototypeOf(this,_b.prototype)}}class Ib extends Ne{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,Ib.prototype)}}class Ob extends Ne{constructor(e){super({name:"UnsupportedOperationException",$fault:"client",...e}),this.name="UnsupportedOperationException",this.$fault="client",Object.setPrototypeOf(this,Ob.prototype)}}class Mb extends Ne{constructor(e){super({name:"UnsupportedTokenTypeException",$fault:"client",...e}),this.name="UnsupportedTokenTypeException",this.$fault="client",Object.setPrototypeOf(this,Mb.prototype)}}const jC=t=>({...t,...t.Value&&{Value:Br}}),gT=t=>({...t,...t.AccessToken&&{AccessToken:Br},...t.RefreshToken&&{RefreshToken:Br},...t.IdToken&&{IdToken:Br}}),zZ=t=>({...t,...t.AuthParameters&&{AuthParameters:Br},...t.ClientId&&{ClientId:Br},...t.UserContextData&&{UserContextData:Br}}),VZ=t=>({...t,...t.Session&&{Session:Br},...t.AuthenticationResult&&{AuthenticationResult:gT(t.AuthenticationResult)}}),qZ=t=>({...t,...t.ClientId&&{ClientId:Br},...t.Session&&{Session:Br},...t.ChallengeResponses&&{ChallengeResponses:Br},...t.UserContextData&&{UserContextData:Br}}),HZ=t=>({...t,...t.Session&&{Session:Br},...t.AuthenticationResult&&{AuthenticationResult:gT(t.AuthenticationResult)}});class Nb extends Ne{constructor(e){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...e}),this.name="EnableSoftwareTokenMFAException",this.$fault="client",Object.setPrototypeOf(this,Nb.prototype)}}const WZ=t=>({...t,...t.ClientId&&{ClientId:Br},...t.SecretHash&&{SecretHash:Br},...t.Username&&{Username:Br},...t.Password&&{Password:Br},...t.UserAttributes&&{UserAttributes:t.UserAttributes.map(e=>jC(e))},...t.ValidationData&&{ValidationData:t.ValidationData.map(e=>jC(e))},...t.UserContextData&&{UserContextData:Br}}),GZ=async(t,e)=>{const r=jb("InitiateAuth");let n;return n=JSON.stringify(_e(t)),Lb(e,r,"/",void 0,n)},KZ=async(t,e)=>{const r=jb("RespondToAuthChallenge");let n;return n=JSON.stringify(_e(t)),Lb(e,r,"/",void 0,n)},YZ=async(t,e)=>{const r=jb("SignUp");let n;return n=JSON.stringify(_e(t)),Lb(e,r,"/",void 0,n)},QZ=async(t,e)=>{if(t.statusCode>=300)return Db(t,e);const r=await _v(t.body,e);let n={};return n=_e(r),{$metadata:De(t),...n}},JZ=async(t,e)=>{if(t.statusCode>=300)return Db(t,e);const r=await _v(t.body,e);let n={};return n=_e(r),{$metadata:De(t),...n}},XZ=async(t,e)=>{if(t.statusCode>=300)return Db(t,e);const r=await _v(t.body,e);let n={};return n=_e(r),{$metadata:De(t),...n}},Db=async(t,e)=>{const r={...t,body:await RX(t.body,e)},n=_X(t,r.body);switch(n){case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await lee(r);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await dee(r);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await xee(r);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await Eee(r);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await kee(r);case"UserImportInProgressException":case"com.amazonaws.cognitoidentityprovider#UserImportInProgressException":throw await Mee(r);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await jee(r);case"InvalidLambdaResponseException":case"com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException":throw await fee(r);case"LimitExceededException":case"com.amazonaws.cognitoidentityprovider#LimitExceededException":throw await mee(r);case"TooManyFailedAttemptsException":case"com.amazonaws.cognitoidentityprovider#TooManyFailedAttemptsException":throw await Cee(r);case"UnexpectedLambdaException":case"com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException":throw await Pee(r);case"UserLambdaValidationException":case"com.amazonaws.cognitoidentityprovider#UserLambdaValidationException":throw await Nee(r);case"CodeDeliveryFailureException":case"com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException":throw await eee(r);case"InvalidPasswordException":case"com.amazonaws.cognitoidentityprovider#InvalidPasswordException":throw await hee(r);case"InvalidSmsRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException":throw await vee(r);case"InvalidSmsRoleTrustRelationshipException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException":throw await pee(r);case"PreconditionNotMetException":case"com.amazonaws.cognitoidentityprovider#PreconditionNotMetException":throw await wee(r);case"UnsupportedUserStateException":case"com.amazonaws.cognitoidentityprovider#UnsupportedUserStateException":throw await Oee(r);case"UsernameExistsException":case"com.amazonaws.cognitoidentityprovider#UsernameExistsException":throw await Dee(r);case"AliasExistsException":case"com.amazonaws.cognitoidentityprovider#AliasExistsException":throw await ZZ(r);case"InvalidUserPoolConfigurationException":case"com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException":throw await yee(r);case"MFAMethodNotFoundException":case"com.amazonaws.cognitoidentityprovider#MFAMethodNotFoundException":throw await gee(r);case"PasswordResetRequiredException":case"com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException":throw await bee(r);case"UserNotConfirmedException":case"com.amazonaws.cognitoidentityprovider#UserNotConfirmedException":throw await Lee(r);case"UserPoolAddOnNotEnabledException":case"com.amazonaws.cognitoidentityprovider#UserPoolAddOnNotEnabledException":throw await Fee(r);case"InvalidEmailRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException":throw await cee(r);case"CodeMismatchException":case"com.amazonaws.cognitoidentityprovider#CodeMismatchException":throw await tee(r);case"ExpiredCodeException":case"com.amazonaws.cognitoidentityprovider#ExpiredCodeException":throw await see(r);case"SoftwareTokenMFANotFoundException":case"com.amazonaws.cognitoidentityprovider#SoftwareTokenMFANotFoundException":throw await See(r);case"ConcurrentModificationException":case"com.amazonaws.cognitoidentityprovider#ConcurrentModificationException":throw await ree(r);case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await oee(r);case"GroupExistsException":case"com.amazonaws.cognitoidentityprovider#GroupExistsException":throw await aee(r);case"DuplicateProviderException":case"com.amazonaws.cognitoidentityprovider#DuplicateProviderException":throw await nee(r);case"UserPoolTaggingException":case"com.amazonaws.cognitoidentityprovider#UserPoolTaggingException":throw await Bee(r);case"InvalidOAuthFlowException":case"com.amazonaws.cognitoidentityprovider#InvalidOAuthFlowException":throw await uee(r);case"ScopeDoesNotExistException":case"com.amazonaws.cognitoidentityprovider#ScopeDoesNotExistException":throw await Aee(r);case"UnsupportedIdentityProviderException":case"com.amazonaws.cognitoidentityprovider#UnsupportedIdentityProviderException":throw await Ree(r);case"UnauthorizedException":case"com.amazonaws.cognitoidentityprovider#UnauthorizedException":throw await Tee(r);case"UnsupportedOperationException":case"com.amazonaws.cognitoidentityprovider#UnsupportedOperationException":throw await _ee(r);case"UnsupportedTokenTypeException":case"com.amazonaws.cognitoidentityprovider#UnsupportedTokenTypeException":throw await Iee(r);case"EnableSoftwareTokenMFAException":case"com.amazonaws.cognitoidentityprovider#EnableSoftwareTokenMFAException":throw await iee(r);default:const i=r.body;return $ee({output:t,parsedBody:i,errorCode:n})}},ZZ=async(t,e)=>{const r=t.body,n=_e(r),i=new hb({$metadata:De(t),...n});return je(i,r)},eee=async(t,e)=>{const r=t.body,n=_e(r),i=new ob({$metadata:De(t),...n});return je(i,r)},tee=async(t,e)=>{const r=t.body,n=_e(r),i=new bb({$metadata:De(t),...n});return je(i,r)},ree=async(t,e)=>{const r=t.body,n=_e(r),i=new Ab({$metadata:De(t),...n});return je(i,r)},nee=async(t,e)=>{const r=t.body,n=_e(r),i=new kb({$metadata:De(t),...n});return je(i,r)},iee=async(t,e)=>{const r=t.body,n=_e(r),i=new Nb({$metadata:De(t),...n});return je(i,r)},see=async(t,e)=>{const r=t.body,n=_e(r),i=new wb({$metadata:De(t),...n});return je(i,r)},oee=async(t,e)=>{const r=t.body,n=_e(r),i=new Sb({$metadata:De(t),...n});return je(i,r)},aee=async(t,e)=>{const r=t.body,n=_e(r),i=new Cb({$metadata:De(t),...n});return je(i,r)},lee=async(t,e)=>{const r=t.body,n=_e(r),i=new Yx({$metadata:De(t),...n});return je(i,r)},cee=async(t,e)=>{const r=t.body,n=_e(r),i=new xb({$metadata:De(t),...n});return je(i,r)},fee=async(t,e)=>{const r=t.body,n=_e(r),i=new rb({$metadata:De(t),...n});return je(i,r)},uee=async(t,e)=>{const r=t.body,n=_e(r),i=new Pb({$metadata:De(t),...n});return je(i,r)},dee=async(t,e)=>{const r=t.body,n=_e(r),i=new Qx({$metadata:De(t),...n});return je(i,r)},hee=async(t,e)=>{const r=t.body,n=_e(r),i=new ab({$metadata:De(t),...n});return je(i,r)},vee=async(t,e)=>{const r=t.body,n=_e(r),i=new lb({$metadata:De(t),...n});return je(i,r)},pee=async(t,e)=>{const r=t.body,n=_e(r),i=new cb({$metadata:De(t),...n});return je(i,r)},yee=async(t,e)=>{const r=t.body,n=_e(r),i=new vb({$metadata:De(t),...n});return je(i,r)},mee=async(t,e)=>{const r=t.body,n=_e(r),i=new nb({$metadata:De(t),...n});return je(i,r)},gee=async(t,e)=>{const r=t.body,n=_e(r),i=new pb({$metadata:De(t),...n});return je(i,r)},xee=async(t,e)=>{const r=t.body,n=_e(r),i=new Jx({$metadata:De(t),...n});return je(i,r)},bee=async(t,e)=>{const r=t.body,n=_e(r),i=new yb({$metadata:De(t),...n});return je(i,r)},wee=async(t,e)=>{const r=t.body,n=_e(r),i=new fb({$metadata:De(t),...n});return je(i,r)},Eee=async(t,e)=>{const r=t.body,n=_e(r),i=new Xx({$metadata:De(t),...n});return je(i,r)},Aee=async(t,e)=>{const r=t.body,n=_e(r),i=new Rb({$metadata:De(t),...n});return je(i,r)},See=async(t,e)=>{const r=t.body,n=_e(r),i=new Eb({$metadata:De(t),...n});return je(i,r)},Cee=async(t,e)=>{const r=t.body,n=_e(r),i=new ib({$metadata:De(t),...n});return je(i,r)},kee=async(t,e)=>{const r=t.body,n=_e(r),i=new Zx({$metadata:De(t),...n});return je(i,r)},Tee=async(t,e)=>{const r=t.body,n=_e(r),i=new Ib({$metadata:De(t),...n});return je(i,r)},Pee=async(t,e)=>{const r=t.body,n=_e(r),i=new sb({$metadata:De(t),...n});return je(i,r)},Ree=async(t,e)=>{const r=t.body,n=_e(r),i=new _b({$metadata:De(t),...n});return je(i,r)},_ee=async(t,e)=>{const r=t.body,n=_e(r),i=new Ob({$metadata:De(t),...n});return je(i,r)},Iee=async(t,e)=>{const r=t.body,n=_e(r),i=new Mb({$metadata:De(t),...n});return je(i,r)},Oee=async(t,e)=>{const r=t.body,n=_e(r),i=new ub({$metadata:De(t),...n});return je(i,r)},Mee=async(t,e)=>{const r=t.body,n=_e(r),i=new eb({$metadata:De(t),...n});return je(i,r)},Nee=async(t,e)=>{const r=t.body,n=_e(r),i=new Iv({$metadata:De(t),...n});return je(i,r)},Dee=async(t,e)=>{const r=t.body,n=_e(r),i=new db({$metadata:De(t),...n});return je(i,r)},Lee=async(t,e)=>{const r=t.body,n=_e(r),i=new mb({$metadata:De(t),...n});return je(i,r)},jee=async(t,e)=>{const r=t.body,n=_e(r),i=new tb({$metadata:De(t),...n});return je(i,r)},Fee=async(t,e)=>{const r=t.body,n=_e(r),i=new gb({$metadata:De(t),...n});return je(i,r)},Bee=async(t,e)=>{const r=t.body,n=_e(r),i=new Tb({$metadata:De(t),...n});return je(i,r)},De=t=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}),$ee=TJ(Ne),Lb=async(t,e,r,n,i)=>{const{hostname:s,protocol:o="https",port:a,path:l}=await t.endpoint(),c={protocol:o,hostname:s,port:a,method:"POST",path:l.endsWith("/")?l.slice(0,-1)+r:l+r,headers:e};return n!==void 0&&(c.hostname=n),i!==void 0&&(c.body=i),new Yn(c)};function jb(t){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${t}`}}class Uee extends Rv.classBuilder().ep({...Gx}).m(function(e,r,n,i){return[Ux(n,this.serialize,this.deserialize),zx(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").f(zZ,VZ).ser(GZ).de(QZ).build(){}class zee extends Rv.classBuilder().ep({...Gx}).m(function(e,r,n,i){return[Ux(n,this.serialize,this.deserialize),zx(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","RespondToAuthChallenge",{}).n("CognitoIdentityProviderClient","RespondToAuthChallengeCommand").f(qZ,HZ).ser(KZ).de(JZ).build(){}class Vee extends Rv.classBuilder().ep({...Gx}).m(function(e,r,n,i){return[Ux(n,this.serialize,this.deserialize),zx(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","SignUp",{}).n("CognitoIdentityProviderClient","SignUpCommand").f(WZ,void 0).ser(YZ).de(XZ).build(){}class hf extends Error{}hf.prototype.name="InvalidTokenError";function qee(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function Hee(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return qee(e)}catch{return atob(e)}}function xT(t,e){if(typeof t!="string")throw new hf("Invalid token specified: must be a string");e||(e={});const r=e.header===!0?0:1,n=t.split(".")[r];if(typeof n!="string")throw new hf(`Invalid token specified: missing part #${r+1}`);let i;try{i=Hee(n)}catch(s){throw new hf(`Invalid token specified: invalid base64 for part #${r+1} (${s.message})`)}try{return JSON.parse(i)}catch(s){throw new hf(`Invalid token specified: invalid json for part #${r+1} (${s.message})`)}}function Dr(){return Dr=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}const Wee=["signatures"],Gee=1,Kee=`${Gee} (Web ${iY})`;function fn(t,e,r){const n=Math.floor(Date.now()/1e3),i=n+e;return{version:Kee,issuedAt:n,expiresAt:i,name:t,data:r}}async function Yee(t,e){const r=Qee(e),n=await t.sign(new Uint8Array(r));return Dr({},e,{signatures:[{sessionId:await t.sessionId(),signature:n}]})}function Qee(t){const{version:e,issuedAt:r,expiresAt:n,name:i,data:s}=t,a=Pt(sY({version:e,issuedAt:r,expiresAt:n,name:i,data:s}));return de(Je(a))}function Jee(t,e){const r=cn(t,Wee),n=t.expiresAt-t.issuedAt;return r.issuedAt=Math.floor(e.getTime()/1e3),r.expiresAt=r.issuedAt+n,r}let un=function(t){return t.initiateAuth="initiateAuth",t.openSession="openSession",t.closeSession="closeSession",t.validateSession="validateSession",t.finishValidateSession="finishValidateSession",t.listSessions="listSessions",t.getSession="getSession",t.sessionAuthProof="sessionAuthProof",t.feeOptions="feeOptions",t.signMessage="signMessage",t.sendTransaction="sendTransaction",t.getTransactionReceipt="getTransactionReceipt",t.federateAccount="federateAccount",t.removeAccount="removeAccount",t.listAccounts="listAccounts",t.getIdToken="getIdToken",t}({}),qu=function(t){return t.authInitiated="authInitiated",t.sessionOpened="sessionOpened",t.sessionClosed="sessionClosed",t.sessionList="sessionList",t.validationRequired="validationRequired",t.validationStarted="validationStarted",t.validationFinished="validationFinished",t.sessionAuthProof="sessionAuthProof",t.signedMessage="signedMessage",t.feeOptions="feeOptions",t.transactionReceipt="transactionReceipt",t.transactionFailed="transactionFailed",t.getSessionResponse="getSessionResponse",t.accountList="accountList",t.accountFederated="accountFederated",t.accountRemoved="accountRemoved",t.idToken="idToken",t}({}),fp=function(t){return t.unknown="unknown",t.erc20Token="erc20Token",t.erc1155Token="erc1155Token",t}({}),wr=function(t){return t.None="None",t.Guest="Guest",t.OIDC="OIDC",t.Email="Email",t.PlayFab="PlayFab",t.Stytch="Stytch",t}({});function Xee({wallet:t,chainId:e,message:r,lifespan:n}){return fn(un.signMessage,n,{wallet:t,network:e.toString(),message:r.startsWith("0x")?r:he(Pt(r))})}const Zee=["lifespan"],ete=["lifespan"],tte=["lifespan"],rte=["lifespan"],nte=["lifespan"],ite=["lifespan"],ste=["lifespan"],ote=["lifespan"];async function nf(t){let{lifespan:e}=t,r=cn(t,Zee);return fn(un.initiateAuth,e,r)}async function FC(t){let{lifespan:e}=t,r=cn(t,ete);return fn(un.openSession,e,r)}async function ate(t){let{lifespan:e}=t,r=cn(t,tte);return fn(un.validateSession,e,r)}function lte(t){let{lifespan:e}=t,r=cn(t,rte);return fn(un.finishValidateSession,e,r)}function BC(t){let{lifespan:e}=t,r=cn(t,nte);return fn(un.closeSession,e,r)}function cte(t){let{lifespan:e}=t,r=cn(t,ite);return fn(un.listSessions,e,r)}function fte(t){let{lifespan:e}=t,r=cn(t,ste);return fn(un.getSession,e,r)}function ute(t){let{lifespan:e}=t,r=cn(t,ote);return fn(un.sessionAuthProof,e,r)}const dte=["token","to","value"],hte=["token","to","id","safe","data"],vte=["token","to","values","data"],pte=["to","value","abi","func","args"];function yte({lifespan:t,wallet:e,identifier:r,chainId:n,transactions:i}){return fn(un.feeOptions,t,{identifier:r,wallet:e,network:n.toString(),transactions:i.map(s=>{if(!s.to||s.to===Ex)throw new Error("Contract creation not supported");return wT(s)?{type:"transaction",to:s.to,value:ce.from(s.value||0).toHexString(),data:he(s.data||[])}:s})})}function Hu({lifespan:t,wallet:e,identifier:r,chainId:n,transactions:i,transactionsFeeQuote:s,transactionsFeeOption:o}){return fn(un.sendTransaction,t,{identifier:r,wallet:e,network:n.toString(),transactions:mte(i,o).map(a=>{if(!a.to||a.to===Ex)throw new Error("Contract creation not supported");return wT(a)?{type:"transaction",to:a.to,value:ce.from(a.value||0).toHexString(),data:he(a.data||[])}:a}),transactionsFeeQuote:s})}function mte(t,e){const r=[...t];if(e)switch(e.token.type){case fp.unknown:r.push({to:e.to,value:e.value});break;case fp.erc20Token:if(!e.token.contractAddress)throw new Error("contract address is required");r.push(Fb({tokenAddress:e.token.contractAddress,to:e.to,value:e.value}));break;case fp.erc1155Token:if(!e.token.contractAddress)throw new Error("contract address is required");if(!e.token.tokenID)throw new Error("token ID is required");r.push(Bb({tokenAddress:e.token.contractAddress,to:e.to,vals:[{id:e.token.tokenID,amount:e.value}]}));break}return r}function gte({lifespan:t,chainId:e,wallet:r,metaTxHash:n}){return fn(un.getTransactionReceipt,t,{wallet:r,network:e.toString(),metaTxHash:n})}function xte(t){let{token:e,to:r,value:n}=t,i=cn(t,dte);return Hu(Dr({transactions:[Fb({tokenAddress:e,to:r,value:n.toString()})]},i))}function bte(t){let{token:e,to:r,id:n,safe:i,data:s}=t,o=cn(t,hte);return Hu(Dr({transactions:[Ate({tokenAddress:e,to:r,id:n,data:s,safe:i})]},o))}function wte(t){let{token:e,to:r,values:n,data:i}=t,s=cn(t,vte);const o=n.map(a=>({id:a.id,amount:ce.from(a.amount).toString()}));return Hu(Dr({transactions:[Bb({tokenAddress:e,to:r,vals:o,data:i})]},s))}function Ete(t){let{to:e,value:r,abi:n,func:i,args:s}=t,o=cn(t,pte);return Hu(Dr({transactions:[bT({to:e,value:ce.from(r).toString(),data:{abi:n,func:i,args:s}})]},o))}function Fb(t){const e=t,r=t;if(e.token!==void 0)return{type:"erc20send",tokenAddress:e.token,to:e.to,value:e.value.toString()};if(r.tokenAddress!==void 0)return Dr({type:"erc20send"},r);throw new Error("Invalid ERC20 transaction")}function Ate(t){const e=t,r=t;if(e.token!==void 0)return{type:"erc721send",tokenAddress:e.token,to:e.to,id:e.id,data:e.data,safe:e.safe};if(r.tokenAddress!==void 0)return Dr({type:"erc721send"},r);throw new Error("Invalid ERC721 transaction")}function Bb(t){const e=t,r=t;if(e.values!==void 0)return{type:"erc1155send",vals:e.values.map(n=>({id:n.id,amount:ce.from(n.amount).toString()})),tokenAddress:e.token,to:e.to,data:e.data};if(r.vals!==void 0)return{type:"erc1155send",vals:r.vals.map(n=>({id:n.id,amount:ce.from(n.amount).toString()})),tokenAddress:r.tokenAddress,to:r.to,data:r.data};throw new Error("Invalid ERC1155 transaction")}function bT(t){const e=t,r=t;if(e.abi!==void 0)return{type:"delayedEncode",to:e.to,value:ce.from(e.value).toString(),data:{abi:e.abi,func:e.func,args:e.args}};if(r.data!==void 0)return{type:"delayedEncode",to:r.to,value:r.value,data:r.data};throw new Error("Invalid delayed encode transaction")}function Ste(t){if(t.length===0)throw new Error("No packets provided");const e=t[0].data.network,r=t[0].data.wallet,n=t[0].expiresAt-t[0].issuedAt,i=t[0].data.identifier,s=t[0].data.transactionsFeeQuote;if(!t.every(o=>o.data.network===e))throw new Error("All packets must have the same chainId");if(!t.every(o=>o.data.wallet===r))throw new Error("All packets must have the same wallet");return fn(un.sendTransaction,n,{network:e,wallet:r,identifier:i,transactions:t.flatMap(o=>o.data.transactions),transactionsFeeQuote:s})}function wT(t){return!["transaction","erc20send","erc721send","erc1155send","delayedEncode"].includes(t.type)}class ph{constructor(e,r,n){this.store=e,this.key=r,this.defaultValue=n}async get(){const e=await this.store.get(this.key);return e||this.defaultValue}async set(e){e?await this.store.set(this.key,e):await this.store.set(this.key,null)}}class ET{constructor(){this.store=void 0,A0.isAvailable()?this.store=new A0:this.store=new Cte}async get(e){return this.store.get(e)}async set(e,r){return this.store.set(e,r)}}class A0{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(!A0.isAvailable())throw new Error("No localStorage")}async get(e){return window.localStorage.getItem(e)}async set(e,r){r?window.localStorage.setItem(e,r):window.localStorage.removeItem(e)}}class Cte{constructor(){this.store={},this.store={}}async get(e){return this.store[e]||null}async set(e,r){r?this.store[e]=r:delete this.store[e]}}const hm="seq-waas-session-p256k1",vm="seq-waas-session";async function AT(t,e){const r=await e.get(hm,vm,t);if(!r)throw new Error("No private key found");const n=new Ls(r);return{sessionId(){return n.getAddress()},sign(i){return n.signMessage(i)},clear:async()=>{await e.delete(hm,vm,t)}}}async function kte(t,e){const n=await new Ls(t).getAddress();return await e.set(hm,vm,n,t),AT(n,e)}async function Tte(t){const e=Ls.createRandom();return kte(e.privateKey,t)}let ST=function(t){return t[t.ECDSAP256K1=0]="ECDSAP256K1",t[t.ECDSAP256R1=1]="ECDSAP256R1",t}({});const pm="seq-waas-session-p256r1",ym="seq-waas-session";async function CT(t,e,r){const n=await r.get(pm,ym,t);if(!n||!n.privateKey)throw new Error("No private key found");const i=new TextEncoder;return{sessionId:async()=>{const s=await e.exportKey("raw",n.publicKey),o=new Uint8Array(s.byteLength+1);return o[0]=ST.ECDSAP256R1,o.set(new Uint8Array(s),1),he(o)},sign:async s=>{typeof s=="string"&&(s.startsWith("0x")?(s=s.slice(2),s=de(s)):s=i.encode(s));const o=await e.sign({name:"ECDSA",hash:{name:"SHA-256"}},n.privateKey,s);return he(new Uint8Array(o))},clear:async()=>{await r.delete(pm,ym,t)}}}async function Pte(t,e,r){const n=await _te(e,t.publicKey);return await r.set(pm,ym,n,t),CT(n,e,r)}async function Rte(t,e){const r=await t.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign","verify"]);return Pte(r,t,e)}async function _te(t,e){const r=await t.exportKey("raw",e),n=new Uint8Array(r.byteLength+1);return n[0]=ST.ECDSAP256R1,n.set(new Uint8Array(r),1),he(n)}async function mm(t,e,r){if(!r)throw new Error("No secure store available");return e?CT(t,e,r):AT(t,r)}async function Ite(t,e){if(!e)throw new Error("No secure store available");return t?Rte(t,e):Tte(e)}const Ote=["lifespan"],Mte=["lifespan"],Nte=["lifespan"];function Dte(t){let{lifespan:e}=t,r=cn(t,Ote);return fn(un.listAccounts,e,r)}function Lte(t){let{lifespan:e}=t,r=cn(t,Mte);return fn(un.federateAccount,e,r)}function jte(t){let{lifespan:e}=t,r=cn(t,Nte);return fn(un.removeAccount,e,r)}const gm=Object.entries(st).reduce((t,[e,r])=>(t[r.name]=r.chainId,t),{}),Fte=Object.entries(gm).reduce((t,[e,r])=>(t[r]=e,t),{});function up(t){const e=typeof t=="number"?t:parseInt(t);if(e in Fte)return e;const r=t.toString().toLowerCase();if(r in gm)return gm[r];throw new Error(`Unknown network: ${t}`)}const kT=()=>TT()?new Bte:null;function TT(){return typeof window=="object"&&typeof window.crypto=="object"&&typeof window.crypto.subtle=="object"}class Bte{constructor(){if(!TT())throw new Error("window.crypto.subtle is not available")}async generateKey(e,r,n){return window.crypto.subtle.generateKey(e,r,n)}async exportKey(e,r){const n=await window.crypto.subtle.exportKey(e,r);return new Uint8Array(n)}async digest(e,r){const n=await window.crypto.subtle.digest(e,r);return new Uint8Array(n)}async sign(e,r,n){const i=await window.crypto.subtle.sign(e,r,n);return new Uint8Array(i)}async verify(e,r,n,i){return window.crypto.subtle.verify(e,r,n,i)}getRandomValues(e){const r=new Uint8Array(e);return window.crypto.getRandomValues(r)}}const PT=()=>RT()?new $te:null;function RT(){return typeof indexedDB=="object"}class $te{constructor(){if(this.db=void 0,!RT())throw new Error("IndexedDB is not available");this.db=null}async openDB(e,r,n){return this.db?this.db:(this.db=await AY(e,1,{upgrade(i){i.createObjectStore(r)}}),this.db)}async get(e,r,n){const i=await this.openDB(e,r,1),s=i.transaction(r,"readonly"),o=await i.get(r,n);return await s.done,o}async set(e,r,n,i){const s=await this.openDB(e,r,1),o=s.transaction(r,"readwrite");return await s.put(r,i,n),await o.done,!0}async delete(e,r,n){const i=await this.openDB(e,r,1),s=i.transaction(r,"readwrite");return await i.delete(r,n),await s.done,!0}}const Ute="@0xsequence.waas.wallet",zte="@0xsequence.waas.session_id",Vte="@0xsequence.waas.status",Tr=5*60;class qte{constructor(e={network:1},r=new ET,n=kT(),i=PT()){this.config=e,this.store=r,this.cryptoBackend=n,this.secureStoreBackend=i,this.status=void 0,this.sessionId=void 0,this.wallet=void 0,this.sessionObservers=[],this.gettingSessionIdPromise=void 0,this.status=new ph(this.store,Vte,"signed-out"),this.sessionId=new ph(this.store,zte,void 0),this.wallet=new ph(this.store,Ute,void 0)}async getAddress(){return this.getWalletAddress()}async getWalletAddress(){if(!await this.isSignedIn())throw new Error("Not signed in");const e=await this.wallet.get();if(!e)throw new Error("No wallet");return e}async commonArgs(e){var r;return Dr({},e,{identifier:e==null?void 0:e.identifier,wallet:await this.getWalletAddress(),lifespan:(r=e==null?void 0:e.lifespan)!=null?r:Tr,chainId:up(e.network||this.config.network)})}async signIntent(e){const r=await this.getSessionId();if(r===void 0)throw new Error("session not open");const n=await mm(r,this.cryptoBackend,this.secureStoreBackend);return Yee(n,e)}async signUsingSessionKey(e){const r=await this.getSessionId();if(!r)throw new Error("session not open");return(await mm(r,this.cryptoBackend,this.secureStoreBackend)).sign(e)}async getSessionId(){var e=this;if(this.gettingSessionIdPromise)return this.gettingSessionIdPromise;const r=async function(){let i=await e.sessionId.get();return i||(i=await(await Ite(e.cryptoBackend,e.secureStoreBackend)).sessionId(),await e.sessionId.set(i),e.signalObservers(e.sessionObservers,i)),e.gettingSessionIdPromise=void 0,i};return this.gettingSessionIdPromise=r(),this.gettingSessionIdPromise}async signInWithIdToken(e){if(await this.status.get()!=="signed-out")throw await this.completeSignOut(),new Error("you are already signed in");const n=await this.getSessionId(),i=await FC({sessionId:n,identityType:wr.None,idToken:e,lifespan:Tr});return await this.status.set("pending"),this.signIntent(i)}async initiateGuestAuth(){const e=await this.getSessionId(),r=await nf({sessionId:e,identityType:wr.Guest,verifier:e,lifespan:Tr});return this.signIntent(r)}async initiateEmailAuth(e){const r=await this.getSessionId(),n=await nf({sessionId:r,identityType:wr.Email,verifier:`${e};${r}`,lifespan:Tr});return this.signIntent(n)}async initiateIdTokenAuth(e,r){const n=await this.getSessionId(),i=Je(Pt(e)),s=await nf({sessionId:n,identityType:wr.OIDC,verifier:`${i};${r}`,lifespan:Tr});return this.signIntent(s)}async initiateStytchAuth(e,r){const n=await this.getSessionId(),i=Je(Pt(e)),s=await nf({sessionId:n,identityType:wr.Stytch,verifier:`${i};${r}`,lifespan:Tr});return this.signIntent(s)}async initiatePlayFabAuth(e,r){const n=await this.getSessionId(),i=Je(Pt(r)),s=await nf({sessionId:n,identityType:wr.PlayFab,verifier:`${e}|${i}`,lifespan:Tr});return this.signIntent(s)}async completeAuth(e,r){const n=await this.getSessionId(),i=await FC(Dr({},r,{sessionId:n,lifespan:Tr},e));return await this.status.set("pending"),this.signIntent(i)}onSessionStateChanged(e){return this.sessionObservers.push(e),()=>{this.sessionObservers=this.sessionObservers.filter(r=>r!=e)}}async signOut({lifespan:e,sessionId:r}={}){if(r=r||await this.sessionId.get(),!r)throw new Error("session not open");const n=BC({lifespan:e||Tr,sessionId:r});return this.signIntent(n)}async signOutSession(e){const r=BC({lifespan:Tr,sessionId:e});return this.signIntent(r)}async listSessions(){const e=cte({lifespan:Tr,wallet:await this.getWalletAddress()});return this.signIntent(e)}async completeSignOut(){await Promise.all([this.status.set("signed-out"),this.wallet.set(void 0),this.sessionId.set(void 0)]),this.signalObservers(this.sessionObservers,null)}async completeSignIn(e){if(e.result)return this.completeSignIn(e.result);const r=await this.status.get();if(e.code!=="sessionOpened")throw new Error("Invalid receipt");if(r!=="pending")throw new Error("No pending sign in");return await Promise.all([this.status.set("signed-in"),this.wallet.set(e.data.wallet)]),e.data.wallet}async isSignedIn(){return await this.status.get()==="signed-in"}async sessionAuthProof(e){var r;const n=ute({lifespan:(r=e.lifespan)!=null?r:Tr,network:up(e.network||this.config.network).toString(),wallet:await this.getWalletAddress(),nonce:e.nonce});return this.signIntent(n)}async signMessage(e){var r;const n=Xee(Dr({chainId:up(e.network||this.config.network)},e,{lifespan:(r=e.lifespan)!=null?r:Tr,wallet:await this.getWalletAddress()}));return this.signIntent(n)}async sendTransaction(e){const r=Hu(await this.commonArgs(e));return this.signIntent(r)}async getTransactionReceipt(e){const r=gte(await this.commonArgs(e));return this.signIntent(r)}async sendERC20(e){if(e.token.toLowerCase()===e.to.toLowerCase())throw new Error("Cannot burn tokens using sendERC20");const r=xte(await this.commonArgs(e));return this.signIntent(r)}async sendERC721(e){if(e.token.toLowerCase()===e.to.toLowerCase())throw new Error("Cannot burn tokens using sendERC721");const r=bte(await this.commonArgs(e));return this.signIntent(r)}async sendERC1155(e){if(e.token.toLowerCase()===e.to.toLowerCase())throw new Error("Cannot burn tokens using sendERC1155");const r=wte(await this.commonArgs(e));return this.signIntent(r)}async callContract(e){const r=Ete(await this.commonArgs(e));return this.signIntent(r)}async feeOptions(e){const r=yte(await this.commonArgs(e));return this.signIntent(r)}async validateSession({deviceMetadata:e}){const r=await this.sessionId.get();if(!r)throw new Error("session not open");const n=await ate({lifespan:Tr,sessionId:r,deviceMetadata:e,wallet:await this.getWalletAddress()});return this.signIntent(n)}async getSession(){const e=await this.sessionId.get();if(!e)throw new Error("session not open");const r=fte({sessionId:e,wallet:await this.getWalletAddress(),lifespan:Tr});return this.signIntent(r)}async finishValidateSession(e,r){const n=await this.sessionId.get();if(!n)throw new Error("session not open");const i=await this.getWalletAddress(),s=lte({sessionId:n,wallet:i,lifespan:Tr,salt:e,challenge:r});return this.signIntent(s)}async listAccounts(){const e=Dte({wallet:await this.getWalletAddress(),lifespan:Tr});return this.signIntent(e)}async linkAccount(e){const r=await this.sessionId.get();if(!r)throw new Error("session not open");const n=Lte(Dr({wallet:await this.getWalletAddress(),lifespan:Tr,sessionId:r},e));return this.signIntent(n)}async removeAccount({accountId:e}){const r=jte({wallet:await this.getWalletAddress(),lifespan:Tr,accountId:e});return this.signIntent(r)}async batch(e){const r=Ste(e);return this.signIntent(r)}signalObservers(e,r){e.forEach(n=>n(r))}async updateIntentTime(e,r){const n=Jee(e,r);return this.signIntent(n)}}class Hte{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/WaasAuthenticator/",this.registerSession=(n,i,s)=>this.fetch(this.url("RegisterSession"),dp(n,i,s)).then(o=>hp(o).then(a=>({session:a.session,response:a.response})),o=>{throw yh.new({cause:`fetch(): ${o.message||""}`})}),this.sendIntent=(n,i,s)=>this.fetch(this.url("SendIntent"),dp(n,i,s)).then(o=>hp(o).then(a=>({response:a.response})),o=>{throw yh.new({cause:`fetch(): ${o.message||""}`})}),this.chainList=(n,i)=>this.fetch(this.url("ChainList"),dp({},n,i)).then(s=>hp(s).then(o=>({chains:o.chains})),s=>{throw yh.new({cause:`fetch(): ${s.message||""}`})}),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const dp=(t={},e={},r=null)=>({method:"POST",headers:Dr({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),hp=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let i="";throw n instanceof Error&&(i=n.message),LT.new({status:t.status,cause:`JSON.parse(): ${i}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(rre[n]||kr).new(r)}return r});let kr=class _T extends Error{constructor(e,r,n,i,s){super(n),this.name=void 0,this.code=void 0,this.message=void 0,this.status=void 0,this.cause=void 0,this.msg=void 0,this.name=e||"WebrpcError",this.code=typeof r=="number"?r:0,this.message=n||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof i=="number"?i:0,this.cause=s,Object.setPrototypeOf(this,_T.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}},Wte=class IT extends kr{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,IT.prototype)}},yh=class OT extends kr{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,OT.prototype)}},Gte=class MT extends kr{constructor(e="WebrpcBadRoute",r=-2,n="bad route",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,MT.prototype)}},Kte=class NT extends kr{constructor(e="WebrpcBadMethod",r=-3,n="bad method",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,NT.prototype)}},Yte=class DT extends kr{constructor(e="WebrpcBadRequest",r=-4,n="bad request",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,DT.prototype)}},LT=class jT extends kr{constructor(e="WebrpcBadResponse",r=-5,n="bad response",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,jT.prototype)}},Qte=class FT extends kr{constructor(e="WebrpcServerPanic",r=-6,n="server panic",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,FT.prototype)}},Jte=class BT extends kr{constructor(e="WebrpcInternalError",r=-7,n="internal error",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,BT.prototype)}},Xte=class $T extends kr{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,$T.prototype)}},Zte=class UT extends kr{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,UT.prototype)}},ere=class zT extends kr{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,zT.prototype)}},tre=class VT extends kr{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,VT.prototype)}};class $b extends kr{constructor(e="TenantNotFound",r=1001,n="Tenant not found",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,$b.prototype)}}class bu extends kr{constructor(e="EmailAlreadyInUse",r=7e3,n="Could not create account as the email is already in use",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,bu.prototype)}}class Ub extends kr{constructor(e="AccountAlreadyLinked",r=7001,n="Could not link account as it is linked to another wallet",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Ub.prototype)}}class zb extends kr{constructor(e="ProofVerificationFailed",r=7002,n="The authentication proof could not be verified",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,zb.prototype)}}class Vb extends kr{constructor(e="AnswerIncorrect",r=7003,n="The provided answer is incorrect",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Vb.prototype)}}class qb extends kr{constructor(e="ChallengeExpired",r=7004,n="The challenge has expired",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,qb.prototype)}}const rre={0:Wte,[-1]:yh,[-2]:Gte,[-3]:Kte,[-4]:Yte,[-5]:LT,[-6]:Qte,[-7]:Jte,[-8]:Xte,[-9]:Zte,[-10]:ere,1e3:tre,1001:$b,7e3:bu,7001:Ub,7002:zb,7003:Vb,7004:qb};function Nd(t){return typeof t=="object"&&t.code===qu.authInitiated&&typeof t.data=="object"&&typeof t.data.sessionId=="string"&&typeof t.data.identityType=="string"&&typeof t.data.expiresIn=="number"}function Wu(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="transactionReceipt"&&typeof t.data=="object"&&typeof t.data.txHash=="string"&&typeof t.data.receipt=="object"&&typeof t.data.request=="object"}function qT(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="transactionReceipt"&&typeof t.data=="object"&&typeof t.data.metaTxHash=="string"&&!t.data.txHash&&typeof t.data.request=="object"}function nre(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="transactionFailed"&&typeof t.data=="object"&&typeof t.data.request=="object"&&Array.isArray(t.data.simulations)&&typeof t.data.error=="string"}function $C(t){return Wu(t)||nre(t)||qT(t)}function ire(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="signedMessage"&&typeof t.data=="object"&&typeof t.data.message=="string"&&typeof t.data.signature=="string"}function sre(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="sessionAuthProof"&&typeof t.data=="object"&&typeof t.data.sessionId=="string"&&typeof t.data.network=="string"&&typeof t.data.wallet=="string"&&typeof t.data.message=="string"&&typeof t.data.signature=="string"}function ore(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="feeOptions"&&typeof t.data=="object"&&Array.isArray(t.data.feeOptions)}function are(t){return typeof t=="object"&&t.code===qu.validationRequired&&typeof t.data=="object"&&typeof t.data.sessionId=="string"}function lre(t){return typeof t=="object"&&t.code===qu.validationFinished&&typeof t.data=="object"}function cre(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="sessionClosed"}function fre(t){return typeof t=="object"&&typeof t.code=="string"&&t.code==="getSessionResponse"&&typeof t.data=="object"&&typeof t.data.session=="string"&&typeof t.data.wallet=="string"}function ure(t){return typeof t=="object"&&t.code===qu.accountFederated&&typeof t.data=="object"&&typeof t.data.account=="object"}function dre(t){return typeof t=="object"&&t.code===qu.accountList&&typeof t.data=="object"}function UC(t){var e,r;return!!(t instanceof kr&&((e=t.cause)!=null&&e.endsWith("intent is invalid: intent expired")||(r=t.cause)!=null&&r.endsWith("intent is invalid: intent issued in the future")))}class hre{constructor(e,r){this.region=e,this.clientId=r,this.cognitoMemo=void 0}cognito(){return this.cognitoMemo||(this.cognitoMemo=new UZ({region:this.region})),this.cognitoMemo}signUp(e){return e=e.toLowerCase().trim(),this.cognito().send(new Vee({ClientId:this.clientId,Username:e,Password:"aB1%"+vre(14),UserAttributes:[{Name:"email",Value:e}]}))}signIn(e){return e=e.toLowerCase().trim(),this.cognito().send(new Uee({AuthFlow:"CUSTOM_AUTH",ClientId:this.clientId,AuthParameters:{USERNAME:e}}))}async initiateAuth({email:e}){let r;e=e.toLowerCase().trim();try{r=await this.signIn(e)}catch(n){if(n instanceof Iv&&n.message.includes("user not found"))await this.signUp(e),r=await this.signIn(e);else throw n}if(!r.Session)throw new Error("response session is empty");return{instance:r.Session,email:e}}async finalizeAuth({instance:e,email:r,answer:n,sessionHash:i}){r=r.toLowerCase().trim();const s=await this.cognito().send(new zee({ClientId:this.clientId,Session:e,ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:{USERNAME:r,ANSWER:n},ClientMetadata:{SESSION_HASH:i}}));if(!s.AuthenticationResult||!s.AuthenticationResult.IdToken)throw new Error("AuthenticationResult.IdToken is empty");return{idToken:s.AuthenticationResult.IdToken}}}function vre(t){return Array.from(pre(t)).map(e=>e.toString(16).padStart(2,"0")).join("")}function pre(t){const e=new Uint8Array(t);if(typeof window=="object"&&typeof window.crypto=="object")return window.crypto.getRandomValues(e);{console.warn("window.crypto.getRandomValues is not available. Falling back to less secure Math.random().");const r=new Uint8Array(t);for(let n=0;n{this.validationRequiredCallback=this.validationRequiredCallback.filter(r=>r!==e)}}onEmailConflict(e){return this.emailConflictCallback.push(e),()=>{this.emailConflictCallback=this.emailConflictCallback.filter(r=>r!==e)}}onEmailAuthCodeRequired(e){return this.emailAuthCodeRequiredCallback.push(e),()=>{this.emailAuthCodeRequiredCallback=this.emailAuthCodeRequiredCallback.filter(r=>r!==e)}}async handleValidationRequired({onValidationRequired:e}={}){var r;if(!(e?e():!0))return!1;const i=await this.waas.validateSession({deviceMetadata:(r=await this.deviceName.get())!=null?r:"Unknown device"}),s=await this.sendIntent(i);this.validationRequiredSalt=s.data.salt;for(const o of this.validationRequiredCallback)o();return this.waitForSessionValid()}headers(){return{"X-Access-Key":this.config.projectAccessKey}}async sendIntent(e){if(!await this.waas.getSessionId())throw new Error("session not open");try{return(await this.client.sendIntent({intent:e},this.headers())).response}catch(n){if(UC(n)&&this.lastDate){const i=await this.waas.updateIntentTime(e,this.lastDate);return(await this.client.sendIntent({intent:i},this.headers())).response}throw n}}async isSignedIn(){return this.waas.isSignedIn()}signIn(e,r){var n=this;const i="email"in e;return i&&this.emailAuthCodeRequiredCallback.length==0?Promise.reject("Missing emailAuthCodeRequired callback"):new Promise(async function(s,o){const a=await n.initAuth(e),l=async function(f){try{const u=await n.completeAuth(a.withAnswer(f),{sessionName:r});s(u)}catch(u){if(u instanceof bu){const d=async function(){try{const m=await n.completeAuth(a.withAnswer(f),{sessionName:r,forceCreateAccount:!0});s(m)}catch(m){o(m)}},h={type:wr.None,email:"",issuer:""};if(u.cause){const p=u.cause.split("|");p.length>=3&&(h.type=p[0],h.email=p[1],h.issuer=p[2])}for(const p of n.emailConflictCallback)p(h,d)}else o(u)}};if(i)for(const c of n.emailAuthCodeRequiredCallback)c(l);else l("")})}async initAuth(e){if("guest"in e&&e.guest)return this.initGuestAuth();if("idToken"in e)return this.initIdTokenAuth(e.idToken);if("email"in e)return this.initEmailAuth(e.email);if("playFabTitleId"in e)return this.initPlayFabAuth(e.playFabTitleId,e.playFabSessionTicket);throw new Error("invalid identity")}async initGuestAuth(){const e=await this.waas.getSessionId(),r=await this.waas.initiateGuestAuth(),n=await this.sendIntent(r);if(!Nd(n))throw new Error(`Invalid response: ${JSON.stringify(n)}`);return new yre(e,n.data.challenge)}async initIdTokenAuth(e){var r;const n=xT(e),i=((r=n.iss)==null?void 0:r.startsWith("stytch.com/"))||!1,s=i?await this.waas.initiateStytchAuth(e,n.exp):await this.waas.initiateIdTokenAuth(e,n.exp),o=await this.sendIntent(s);if(!Nd(o))throw new Error(`Invalid response: ${JSON.stringify(o)}`);return i?new mre(e):new HT(e)}async initEmailAuth(e){const r=await this.waas.getSessionId(),n=await this.waas.initiateEmailAuth(e),i=await this.sendIntent(n);if(!Nd(i))throw new Error(`Invalid response: ${JSON.stringify(i)}`);return new Hb(e,r,i.data.challenge)}async initPlayFabAuth(e,r){const n=await this.waas.initiatePlayFabAuth(e,r),i=await this.sendIntent(n);if(!Nd(i))throw new Error(`Invalid response: ${JSON.stringify(i)}`);return new gre(e,r)}async completeAuth(e,r){r||(r={}),r.sessionName||(r.sessionName="session name");const n=await this.waas.completeAuth(e.getIntentParams(),{forceCreateAccount:r.forceCreateAccount});try{const i=await this.registerSession(n,r.sessionName);return await this.waas.completeSignIn({code:"sessionOpened",data:{sessionId:i.session.id,wallet:i.response.data.wallet}}),{sessionId:i.session.id,wallet:i.response.data.wallet,email:i.session.identity.email}}catch(i){throw i instanceof bu||await this.waas.completeSignOut(),i}}async registerSession(e,r){try{return await this.client.registerSession({intent:e,friendlyName:r},this.headers())}catch(n){if(UC(n)&&this.lastDate){const i=await this.waas.updateIntentTime(e,this.lastDate);return await this.client.registerSession({intent:i,friendlyName:r},this.headers())}throw n}}async refreshSession(){throw new Error("Not implemented")}async getSessionId(){return this.waas.getSessionId()}async getSessionHash(){const e=(await this.waas.getSessionId()).toLowerCase();return Je(Pt(e))}async dropSession({sessionId:e,strict:r}={}){const n=await this.waas.getSessionId();if(!n)throw new Error("session not open");const i=e||n;try{const s=await this.waas.signOutSession(i),o=await this.sendIntent(s);if(!cre(o))throw new Error(`Invalid response: ${JSON.stringify(o)}`)}catch(s){if(r)throw s;console.error(s)}if(i===n){if(!this.secureStoreBackend)throw new Error("No secure store available");(await mm(n,this.cryptoBackend,this.secureStoreBackend)).clear(),await this.waas.completeSignOut(),await this.deviceName.set(void 0)}}async listSessions(){const e=await this.waas.getSessionId();if(!e)throw new Error("session not open");const r=await this.waas.listSessions();return(await this.sendIntent(r)).data.map(i=>Dr({},i,{isThis:i.id===e}))}async getAddress(){return this.waas.getAddress()}async validateSession(e){return await this.isSessionValid()?!0:this.handleValidationRequired(e)}async finishValidateSession(e){const r=await this.waas.finishValidateSession(this.validationRequiredSalt,e),n=await this.sendIntent(r);if(!lre(n))throw new Error(`Invalid response: ${JSON.stringify(n)}`);return this.validationRequiredSalt="",n.data.isValid}async isSessionValid(){const e=await this.waas.getSession(),r=await this.sendIntent(e);if(!fre(r))throw new Error(`Invalid response: ${JSON.stringify(r)}`);return r.data.validated}async waitForSessionValid(e=6e5,r=2e3){const n=Date.now();for(;Date.now()-nsetTimeout(i,r))}return!1}async sessionAuthProof({nonce:e,network:r,validation:n}){const i=await this.waas.sessionAuthProof({nonce:e,network:r});return await this.trySendIntent({validation:n},i,sre)}async listAccounts(){const e=await this.waas.listAccounts(),r=await this.sendIntent(e);if(!dre(r))throw new Error(`Invalid response: ${JSON.stringify(r)}`);return r.data}async linkAccount(e){const r=await this.waas.linkAccount(e.getIntentParams()),n=await this.sendIntent(r);if(!ure(n))throw new Error(`Invalid response: ${JSON.stringify(n)}`);return n.data}async removeAccount(e){const r=await this.waas.removeAccount({accountId:e});await this.sendIntent(r)}async useIdentifier(e){if(e.identifier)return e;const r=`ts-sdk-${Date.now()}-${await this.waas.getSessionId()}`;return Dr({},e,{identifier:r})}async trySendIntent(e,r,n){const i=await this.sendIntent(r);if(n(i))return i;if(are(i)&&await this.handleValidationRequired(e.validation)){const o=await this.sendIntent(r);if(n(o))return o}throw new Error(JSON.stringify(i))}async signMessage(e){const r=await this.waas.signMessage(await this.useIdentifier(e));return this.trySendIntent(e,r,ire)}async trySendTransactionIntent(e,r){let n=await this.trySendIntent(r,e,$C);for(;qT(n);){await new Promise(o=>setTimeout(o,1e3));const i={metaTxHash:n.data.metaTxHash,network:e.data.network,identifier:e.data.identifier,validation:r.validation},s=await this.waas.getTransactionReceipt(await this.useIdentifier(i));n=await this.trySendIntent(i,s,$C)}return n}async sendTransaction(e){const r=await this.waas.sendTransaction(await this.useIdentifier(e));return this.trySendTransactionIntent(r,e)}async sendERC20(e){const r=await this.waas.sendERC20(await this.useIdentifier(e));return this.trySendTransactionIntent(r,e)}async sendERC721(e){const r=await this.waas.sendERC721(await this.useIdentifier(e));return this.trySendTransactionIntent(r,e)}async sendERC1155(e){const r=await this.waas.sendERC1155(await this.useIdentifier(e));return this.trySendTransactionIntent(r,e)}async callContract(e){const r=await this.waas.callContract(await this.useIdentifier(e));return this.trySendTransactionIntent(r,e)}async feeOptions(e){const r=await this.waas.feeOptions(await this.useIdentifier(e));return this.trySendIntent(e,r,ore)}async networkList(){const e=[],r=await this.client.chainList({"X-Access-Key":this.config.projectAccessKey});for(const n of r.chains)e.push({id:n.id,name:n.name,isEnabled:n.isEnabled});return e}onSessionStateChanged(e){return this.waas.onSessionStateChanged(e)}async fetch(e,r){const n=await window.fetch(e,r),i=n.headers.get("date");return i&&(this.lastDate=new Date(i)),n}}const Ere=t=>{if(t.type===wr.PlayFab)return"PlayFab login";if(t.type===wr.Email)return"Email login";if(t.type===wr.OIDC){if(t.issuer.includes("cognito-idp"))return"Email v1 login";switch(t.issuer){case"https://accounts.google.com":return"Google login";case"https://appleid.apple.com":return"Apple login";default:return"Unknown account type"}}return"Unknown account type"},Are=t=>{const{onCancel:e,onConfirm:r}=t;return D.jsxs(G,{style:{maxWidth:"600px"},flexDirection:"column",paddingX:"10",paddingY:"4",alignItems:"center",gap:"4",children:[D.jsx(G,{children:D.jsx(me,{variant:"large",color:"text100",fontWeight:"bold",children:"Email already in use"})}),D.jsx(G,{height:"full",children:D.jsxs(me,{as:"div",variant:"normal",color:"text50",textAlign:"center",children:["Another account with this email address ",D.jsxs(me,{color:"text80",children:["(",t.info.email,")"]})," already exists with account type ",D.jsxs(me,{color:"text80",children:["(",Ere(t.info),")"]}),". You can cancel this or force create a new account."]})}),D.jsxs(G,{flexDirection:"row",gap:"3",marginTop:"6",marginBottom:"2",children:[D.jsx(Tt,{label:"Cancel",onClick:e}),D.jsx(Tt,{variant:"primary",label:"Create new account",onClick:r})]})]})},Sre=({KEYS_TO_EXCLUDE:t=[]}={})=>{const e=(r,n)=>typeof r!=typeof n?!1:r===null||n===null?r===n:typeof r=="object"?Object.keys(r).length!==Object.keys(n).length||Object.keys(r).some(i=>!(i in n))?!1:Object.entries(r).filter(([i])=>!t.includes(i)).every(([i,s])=>e(s,n[i])):r===n;return e},Cre=Sre(),kre=(t,e)=>t===e?e:Object.keys(t).reduce((r,n)=>(n in e&&Cre(t[n],e[n])&&(r[n]=t[n]),r),Object.assign({},e)),Tre=t=>{const e=y.useRef(!0),[r,n]=y.useState(t);y.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]);const i=y.useCallback(s=>{e.current&&n(s)},[]);return[r,i]},WT=(t,e="StytchProvider")=>`${t} can only be used inside <${e}>.`,Pre="You cannot render a inside another .",Rre=`The @stytch/react library is not meant for use with serverside environments like NextJS. Use the @stytch/nextjs library instead - npm remove @stytch/react && npm install @stytch/nextjs -`;function E0(t,e){if(!t)throw new Error(e)}const Ire={user:null,fromCache:!1},Ore={session:null,fromCache:!1},Wb=y.createContext({isMounted:!1}),Mre=y.createContext(Ire),GT=y.createContext(Ore),KT=()=>y.useContext(Wb).isMounted,Nre=()=>(E0(KT(),WT("useStytchSession")),y.useContext(GT)),Dre=()=>{const t=y.useContext(Wb);return E0(t.isMounted,WT("useStytch")),t.client},Lre=({stytch:t,children:e})=>{E0(!KT(),Rre),E0(typeof window<"u",_re);const r=y.useMemo(()=>({client:t,isMounted:!0}),[t]),[{user:n,session:i},s]=Pre({session:t.session.getInfo(),user:t.user.getInfo()});return y.useEffect(()=>t.onStateChange(()=>{s(o=>{const a={session:t.session.getInfo(),user:t.user.getInfo()};return Tre(o,a)})}),[s,t]),pr.createElement(Wb.Provider,{value:r},pr.createElement(Mre.Provider,{value:n},pr.createElement(GT.Provider,{value:i},e)))};function S0(){return S0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),Bt({},n,i)).then(s=>Kt(s).then(o=>({status:o.status})),s=>{throw Dt.new({cause:`fetch(): ${s.message||""}`})}),this.version=(n,i)=>this.fetch(this.url("Version"),Bt({},n,i)).then(s=>Kt(s).then(o=>({version:o.version})),s=>{throw Dt.new({cause:`fetch(): ${s.message||""}`})}),this.runtimeStatus=(n,i)=>this.fetch(this.url("RuntimeStatus"),Bt({},n,i)).then(s=>Kt(s).then(o=>({status:o.status})),s=>{throw Dt.new({cause:`fetch(): ${s.message||""}`})}),this.getChainID=(n,i)=>this.fetch(this.url("GetChainID"),Bt({},n,i)).then(s=>Kt(s).then(o=>({chainID:o.chainID})),s=>{throw Dt.new({cause:`fetch(): ${s.message||""}`})}),this.getEtherBalance=(n,i,s)=>this.fetch(this.url("GetEtherBalance"),Bt(n,i,s)).then(o=>Kt(o).then(a=>({balance:a.balance})),o=>{throw Dt.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenBalances=(n,i,s)=>this.fetch(this.url("GetTokenBalances"),Bt(n,i,s)).then(o=>Kt(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw Dt.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenSupplies=(n,i,s)=>this.fetch(this.url("GetTokenSupplies"),Bt(n,i,s)).then(o=>Kt(o).then(a=>({page:a.page,contractType:a.contractType,tokenIDs:a.tokenIDs})),o=>{throw Dt.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenSuppliesMap=(n,i,s)=>this.fetch(this.url("GetTokenSuppliesMap"),Bt(n,i,s)).then(o=>Kt(o).then(a=>({supplies:a.supplies})),o=>{throw Dt.new({cause:`fetch(): ${o.message||""}`})}),this.getBalanceUpdates=(n,i,s)=>this.fetch(this.url("GetBalanceUpdates"),Bt(n,i,s)).then(o=>Kt(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw Dt.new({cause:`fetch(): ${o.message||""}`})}),this.getTransactionHistory=(n,i,s)=>this.fetch(this.url("GetTransactionHistory"),Bt(n,i,s)).then(o=>Kt(o).then(a=>({page:a.page,transactions:a.transactions})),o=>{throw Dt.new({cause:`fetch(): ${o.message||""}`})}),this.syncBalance=(n,i,s)=>this.fetch(this.url("SyncBalance"),Bt(n,i,s)).then(o=>Kt(o).then(a=>({})),o=>{throw Dt.new({cause:`fetch(): ${o.message||""}`})}),this.fetchTransactionReceipt=(n,i,s)=>this.fetch(this.url("FetchTransactionReceipt"),Bt(n,i,s)).then(o=>Kt(o).then(a=>({receipt:a.receipt})),o=>{throw Dt.new({cause:`fetch(): ${o.message||""}`})}),this.getOrderbookOrders=(n,i,s)=>this.fetch(this.url("GetOrderbookOrders"),Bt(n,i,s)).then(o=>Kt(o).then(a=>({page:a.page,orders:a.orders})),o=>{throw Dt.new({cause:`fetch(): ${o.message||""}`})}),this.getTopOrders=(n,i,s)=>this.fetch(this.url("GetTopOrders"),Bt(n,i,s)).then(o=>Kt(o).then(a=>({orders:a.orders})),o=>{throw Dt.new({cause:`fetch(): ${o.message||""}`})}),this.fetchTransactionReceiptWithFilter=(n,i,s)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),Bt(n,i,s)).then(o=>Kt(o).then(a=>({receipt:a.receipt})),o=>{throw Dt.new({cause:`fetch(): ${o.message||""}`})}),this.getAllWebhookListeners=(n,i,s)=>this.fetch(this.url("GetAllWebhookListeners"),Bt(n,i,s)).then(o=>Kt(o).then(a=>({listeners:a.listeners})),o=>{throw Dt.new({cause:`fetch(): ${o.message||""}`})}),this.getWebhookListener=(n,i,s)=>this.fetch(this.url("GetWebhookListener"),Bt(n,i,s)).then(o=>Kt(o).then(a=>({listener:a.listener})),o=>{throw Dt.new({cause:`fetch(): ${o.message||""}`})}),this.addWebhookListener=(n,i,s)=>this.fetch(this.url("AddWebhookListener"),Bt(n,i,s)).then(o=>Kt(o).then(a=>({status:a.status,listener:a.listener})),o=>{throw Dt.new({cause:`fetch(): ${o.message||""}`})}),this.updateWebhookListener=(n,i,s)=>this.fetch(this.url("UpdateWebhookListener"),Bt(n,i,s)).then(o=>Kt(o).then(a=>({status:a.status})),o=>{throw Dt.new({cause:`fetch(): ${o.message||""}`})}),this.removeWebhookListener=(n,i,s)=>this.fetch(this.url("RemoveWebhookListener"),Bt(n,i,s)).then(o=>Kt(o).then(a=>({status:a.status})),o=>{throw Dt.new({cause:`fetch(): ${o.message||""}`})}),this.toggleWebhookListener=(n,i,s)=>this.fetch(this.url("ToggleWebhookListener"),Bt(n,i,s)).then(o=>Kt(o).then(a=>({webhookListener:a.webhookListener})),o=>{throw Dt.new({cause:`fetch(): ${o.message||""}`})}),this.pauseAllWebhookListeners=(n,i,s)=>this.fetch(this.url("PauseAllWebhookListeners"),Bt(n,i,s)).then(o=>Kt(o).then(a=>({status:a.status})),o=>{throw Dt.new({cause:`fetch(): ${o.message||""}`})}),this.resumeAllWebhookListeners=(n,i,s)=>this.fetch(this.url("ResumeAllWebhookListeners"),Bt(n,i,s)).then(o=>Kt(o).then(a=>({status:a.status})),o=>{throw Dt.new({cause:`fetch(): ${o.message||""}`})}),this.subscribeReceipts=(n,i)=>{const s=()=>this.fetch(this.url("SubscribeReceipts"),Bt(n,i.headers,i.signal)).then(async function(o){await hp(o,i,s)},o=>{i.onError(o,s)});return s()},this.subscribeEvents=(n,i)=>{const s=()=>this.fetch(this.url("SubscribeEvents"),Bt(n,i.headers,i.signal)).then(async function(o){await hp(o,i,s)},o=>{i.onError(o,s)});return s()},this.subscribeBalanceUpdates=(n,i)=>{const s=()=>this.fetch(this.url("SubscribeBalanceUpdates"),Bt(n,i.headers,i.signal)).then(async function(o){await hp(o,i,s)},o=>{i.onError(o,s)});return s()},this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const hp=async(t,e,r)=>{const{onMessage:n,onOpen:i,onClose:s,onError:o}=e;if(!t.ok){try{await Kt(t)}catch(h){o(h,r)}return}if(!t.body){o(pc.new({status:t.status,cause:"Invalid response, missing body"}),r);return}i&&i();const a=t.body.getReader(),l=new TextDecoder;let c="",f=Date.now();const u=(10+1)*1e3;let d;try{for(d=setInterval(()=>{if(Date.now()-f>u)throw Ql.new({cause:"Stream timed out"})},u);;){let h,p;try{({value:h,done:p}=await a.read()),f=Date.now(),c+=l.decode(h,{stream:!0})}catch(x){let b="";x instanceof Error&&(b=x.message),x instanceof DOMException&&x.name==="AbortError"?o(Dt.new({message:"AbortError",cause:`AbortError: ${b}`}),()=>{throw new Error("Abort signal cannot be used to reconnect")}):o(Ql.new({cause:`reader.read(): ${b}`}),r);return}let m=c.split(` -`);for(let x=0;x({method:"POST",headers:S0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),Kt=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let i="";throw n instanceof Error&&(i=n.message),pc.new({status:t.status,cause:`JSON.parse(): ${i}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(YT[n]||yt).new(r)}return r});class yt extends Error{constructor(e,r,n,i,s){super(n),this.name=void 0,this.code=void 0,this.message=void 0,this.status=void 0,this.cause=void 0,this.msg=void 0,this.name=e||"WebrpcError",this.code=typeof r=="number"?r:0,this.message=n||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof i=="number"?i:0,this.cause=s,Object.setPrototypeOf(this,yt.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}}class Gb extends yt{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Gb.prototype)}}class Dt extends yt{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Dt.prototype)}}class Kb extends yt{constructor(e="WebrpcBadRoute",r=-2,n="bad route",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Kb.prototype)}}class Yb extends yt{constructor(e="WebrpcBadMethod",r=-3,n="bad method",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Yb.prototype)}}class Qb extends yt{constructor(e="WebrpcBadRequest",r=-4,n="bad request",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Qb.prototype)}}class pc extends yt{constructor(e="WebrpcBadResponse",r=-5,n="bad response",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,pc.prototype)}}class Jb extends yt{constructor(e="WebrpcServerPanic",r=-6,n="server panic",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Jb.prototype)}}class Xb extends yt{constructor(e="WebrpcInternalError",r=-7,n="internal error",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Xb.prototype)}}class Zb extends yt{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Zb.prototype)}}class Ql extends yt{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Ql.prototype)}}class ew extends yt{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,ew.prototype)}}class tw extends yt{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,tw.prototype)}}class rw extends yt{constructor(e="PermissionDenied",r=1001,n="Permission denied",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,rw.prototype)}}class nw extends yt{constructor(e="SessionExpired",r=1002,n="Session expired",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,nw.prototype)}}class iw extends yt{constructor(e="MethodNotFound",r=1003,n="Method not found",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,iw.prototype)}}class sw extends yt{constructor(e="RequestConflict",r=1004,n="Conflict with target resource",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,sw.prototype)}}class ow extends yt{constructor(e="Aborted",r=1005,n="Request aborted",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,ow.prototype)}}class aw extends yt{constructor(e="Timeout",r=2e3,n="Request timed out",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,aw.prototype)}}class lw extends yt{constructor(e="InvalidArgument",r=2001,n="Invalid argument",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,lw.prototype)}}class cw extends yt{constructor(e="Unavailable",r=2002,n="Unavailable resource",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,cw.prototype)}}class fw extends yt{constructor(e="QueryFailed",r=2003,n="Query failed",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,fw.prototype)}}class uw extends yt{constructor(e="ResourceExhausted",r=2004,n="Resource exhausted",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,uw.prototype)}}class dw extends yt{constructor(e="NotFound",r=3e3,n="Resource not found",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,dw.prototype)}}class hw extends yt{constructor(e="ProjectNotFound",r=3002,n="Project not found",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,hw.prototype)}}class vw extends yt{constructor(e="MetadataCallFailed",r=3003,n="Metadata service call failed",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,vw.prototype)}}const YT={0:Gb,[-1]:Dt,[-2]:Kb,[-3]:Yb,[-4]:Qb,[-5]:pc,[-6]:Jb,[-7]:Xb,[-8]:Zb,[-9]:Ql,[-10]:ew,1e3:tw,1001:rw,1002:nw,1003:iw,1004:sw,1005:ow,2e3:aw,2001:lw,2002:cw,2003:fw,2004:uw,3e3:dw,3002:hw,3003:vw},UC=typeof global=="object"?global.fetch:window.fetch;class QT extends jre{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,UC),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(i,s)=>{const o={},a=this.jwtAuth,l=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),l&&l.length>0&&(o["X-Access-Key"]=l),s.headers=S0({},s.headers,o),UC(i,s)},this.fetch=this._fetch}}const zC=[..."🐶🐱🐭🐹🐰🦊🐻🐼🐨🐯🦁🐮🐷🐽🐸🐵🙈🙉🙊🐒🐔🐧🐦🐤🐣🐥🦆🦅🦉🦇🐺🐗🐴🦄🐝🐛🦋🐌🐞🐜🦟🦗🕷🕸🦂🐢🐍🦎🦖🦕🐙🦑🦐🦞🦀🐡🐠🐟🐬🐳🐋🦈🐊🐅🐆🦓🦍🦧🐘🦛🦏🐪🐫🦒🦘🐃🐂🐄🐎🐖🐏🐑🦙🐐🦌🐕🐩🦮🐈🐓🦃🦚🦜🦢🦩🕊🐇🦝🦨🦡🦦🦥🐁🐀🐿🦔🐾🐉🐲🌵🎄🌲🌳🌴🌱🌿🍀🎍🎋🍃👣🍂🍁🍄🐚🌾💐🌷🌹🥀🌺🌸🌼🌻🌞🌝🍏🍎🍐🍊🍋🍌🍉🍇🍓🍈🥭🍍🥥🥝🍅🥑🥦🥬🥒🌶🌽🥕🧄🧅🥔🍠🥐🥯🍞🥖🥨🧀🥚🍳🧈🥞🧇🥓🥩🍗🍖🦴🌭🍔🍟🍕🥪🥙🧆🌮🌯🥗🥘🥫🍝🍜🍲🍛🍣🍱🥟🦪🍤🍙🍚🍘🍥🥠🥮🍢🍡🍧🍨🍦🥧🧁🍰🎂🍮🍭🍬🍫🍿🍩🍪🌰🥜👀👂👃👄👅👆👇👈👉👊👋👌👍👎👏👐👑👒👓🎯🎰🎱🎲🎳👾👯👺👻👽🏂🏃🏄"];function Eo(){const e=Xy.en,r=zC[Math.floor(Math.random()*zC.length)],n=e.getWord(Math.floor(Math.random()*2048)),i=e.getWord(Math.floor(Math.random()*2048));return`${r} ${n} ${i}`}function Fre(){const t=Dre(),{session:e}=Nre(),[r,n]=y.useState(""),i=y.useRef(null);y.useEffect(()=>{const o=new URLSearchParams(window.location.search);o.get("stytch_token_type")==="magic_links"&&(async()=>{if(e){const a=t.session.getTokens();console.log({tokens:a});const l=await Re.signIn({idToken:a.session_jwt},Eo());console.log(`Wallet address: ${l}`),Ii.navigate("/")}else await new Promise(a=>setTimeout(a,5e3)),await t.magicLinks.authenticate(o.get("token")||"",{session_duration_minutes:5})})()},[t,e]);const s=async o=>{await t.magicLinks.email.loginOrCreate(o,{})};return D.jsxs(G,{children:[D.jsx(G,{marginBottom:"4",children:D.jsx(me,{variant:"large",color:"text100",fontWeight:"bold",children:"Stytch login"})}),D.jsxs(G,{marginTop:"5",marginBottom:"4",children:[D.jsx(G,{marginTop:"6",children:D.jsx(Mr,{name:"stytchEmail",type:"email",onChange:o=>{n(o.target.value)},ref:i,onKeyDown:o=>{r&&o.key==="Enter"&&s(r)},value:r,placeholder:"hello@example.com",required:!0})}),D.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:D.jsx(kt,{variant:"primary",label:"Continue",onClick:()=>s(r),"data-id":"continueButton"})})]})]})}function Bre({onSuccess:t}){const[e,r]=y.useState(""),[n,i]=y.useState(),[s,o]=y.useState(!1),[a,l]=y.useState("");return{inProgress:s||!!a,loading:s,error:n,initiateAuth:async u=>{o(!0);try{const{instance:d}=await Re.email.initiateAuth({email:u});l(d),r(u)}catch(d){console.error(d),i(d.message||"Unknown error")}finally{o(!1)}},sendChallengeAnswer:a?async u=>{o(!0);try{const d=await Re.getSessionHash(),h=await Re.email.finalizeAuth({instance:a,answer:u,email:e,sessionHash:d});if(!("idToken"in h))throw new Error("invalid identity returned by finalizeAuth");t(h.idToken)}catch(d){i(d.message||"Unknown error")}finally{o(!1)}}:void 0}}const mh=t=>t.name==="AccountAlreadyLinked";function JT({onSuccess:t,sessionName:e,linkAccount:r=!1}){const n=M5(),[i,s]=y.useState(),[o,a]=y.useState(!1),[l,c]=y.useState(!1),[f,u]=y.useState(),[d,h]=y.useState();return y.useEffect(()=>Re.onEmailAuthCodeRequired(async b=>{a(!1),u(()=>b)}),[Re,a,u]),{inProgress:l,initiateAuth:async b=>{a(!0),c(!0);try{if(r){const w=await Re.initAuth({email:b});h(w),a(!1)}else{const w=await Re.signIn({email:b},e);t(w)}}catch(w){s(w.message||"Unknown error")}finally{r||(a(!1),c(!1))}},loading:o,error:i,sendChallengeAnswer:l?async b=>{if(r&&d){try{await Re.linkAccount(d.withAnswer(b))}catch(w){mh(w)&&n({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}a(!1),c(!1);return}f&&await f(b)}:void 0,cancel:()=>{c(!1),a(!1),h(void 0),u(null)}}}function $re(){var E;const[t,e]=y.useState(""),r=y.useRef(null),n=(E=r.current)==null?void 0:E.validity.valid,[i,s]=y.useState(!1),[o,a]=y.useState([]),[l,c]=y.useState(!0),[f,u]=y.useState(),[d,h]=y.useState(!1),p=y.useRef(null);Re.onEmailConflict(async(g,_)=>{p.current=_,u(g),h(!0)});const m=X5({flow:"implicit",onSuccess:g=>{window.PlayFabClientSDK.LoginWithGoogleAccount({AccessToken:g.access_token,CreateAccount:!0,TitleId:"8F854"},async(_,B)=>{if(_)try{const k=await Re.signIn({playFabTitleId:"8F854",playFabSessionTicket:_.data.SessionTicket},Eo());console.log("Sequence response:",k),Ii.navigate("/")}catch{console.error("Error: "+JSON.stringify(B))}else B&&console.error("Error: "+JSON.stringify(B))})}}),{inProgress:x,loading:b,initiateAuth:w,sendChallengeAnswer:A,cancel:R}=JT({sessionName:Eo(),onSuccess:async({wallet:g})=>{console.log(`Wallet address: ${g}`),Ii.navigate("/")}}),{inProgress:N,loading:I,initiateAuth:F,sendChallengeAnswer:j}=Bre({onSuccess:async g=>{const _=await Re.signIn({idToken:g},Eo());console.log(`Wallet address: ${_}`),Ii.navigate("/")}}),U=l?x:N,Y=l?b:I,J=l?w:F,Z=l?A:j;y.useEffect(()=>{(async()=>await Re.isSignedIn()&&Ii.navigate("/"))()},[]);const M=async g=>{const _=await Re.signIn({idToken:g.credential},Eo());console.log(`Wallet address: ${_.wallet}`),console.log(`Email address: ${_.email}`),Ii.navigate("/")},v="https://"+window.location.host+(window.location.host.includes("github.io")?"/demo-waas-auth":""),T=async g=>{const _=await Re.signIn({idToken:g.authorization.id_token},Eo());console.log(`Wallet address: ${_.wallet}`),console.log(`Email address: ${_.email}`),Ii.navigate("/")},S=async()=>{const g=await Re.signIn({guest:!0},Eo());console.log(`Wallet address: ${g.wallet}`),Ii.navigate("/")},C=new URLSearchParams(window.location.search),P=C.get("env")==="dev",[O,L]=y.useState(P);return D.jsxs(D.Fragment,{children:[D.jsxs(G,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[D.jsxs(G,{marginBottom:"16",flexDirection:"row",children:[D.jsx(r7,{}),D.jsx(G,{marginLeft:"auto",children:D.jsx(gU,{label:"Use dev env",checked:O,onCheckedChange:()=>{O?(C.delete("env"),window.location.search=C.toString()):(C.set("env","dev"),window.location.search=C.toString()),L(!O)}})})]}),D.jsx(G,{gap:"4",children:D.jsx(kt,{label:"Guest login",onClick:S})}),D.jsx(Lr,{background:"buttonGlass"}),D.jsxs(G,{marginTop:"6",children:[D.jsx(me,{variant:"large",color:"text100",fontWeight:"bold",children:"Email Login"}),D.jsx(G,{marginTop:"4",children:D.jsx(l8,{label:"Use v2 email login",checked:l,onCheckedChange:()=>{c(!l)}})})]}),Z?D.jsxs(G,{flexDirection:"column",children:[D.jsx(G,{marginTop:"6",children:D.jsx(me,{marginTop:"5",variant:"normal",color:"text80",children:"Enter code received in email."})}),D.jsx(G,{marginTop:"4",children:D.jsx(t7,{value:o,digits:6,onChange:a})}),D.jsx(G,{gap:"2",marginY:"4",children:Y?D.jsx(Rn,{}):D.jsx(kt,{variant:"primary",disabled:o.includes(""),label:"Verify",onClick:()=>Z(o.join("")),"data-id":"verifyButton"})})]}):D.jsxs(G,{marginTop:"5",marginBottom:"4",children:[D.jsxs(me,{variant:"normal",color:"text80",children:["Enter your email to recieve a code to login and create your wallet. ",D.jsx("br",{}),"Please check your spam folder if you don't see it in your inbox."]}),D.jsxs(G,{marginTop:"6",children:[D.jsx(Mr,{name:"email",type:"email",onChange:g=>{e(g.target.value)},ref:r,onKeyDown:g=>{t&&g.key==="Enter"&&J(t)},onBlur:()=>s(!!t&&!n),value:t,placeholder:"hello@example.com",required:!0,"data-id":"loginEmail"}),i&&D.jsx(me,{as:"p",variant:"small",color:"negative",marginY:"2",children:"Invalid email address"})]}),D.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:Y?D.jsx(Rn,{}):D.jsx(kt,{variant:"primary",disabled:!n,label:"Continue",onClick:()=>J(t),"data-id":"continueButton"})})]}),D.jsx(Lr,{background:"buttonGlass"}),D.jsx(G,{paddingY:"4",gap:"4",flexDirection:"column",width:"full",children:!U&&D.jsxs(D.Fragment,{children:[D.jsx(G,{marginBottom:"2",children:D.jsx(me,{variant:"large",color:"text100",fontWeight:"bold",children:"Social Login"})}),D.jsxs(G,{gap:"4",flexDirection:"column",width:"fit",children:[D.jsx(G,{children:D.jsx(J5,{onSuccess:M,shape:"circle",width:230},"google")}),D.jsx(e7,{authOptions:{clientId:"com.horizon.sequence.waas",scope:"openid email",redirectURI:v,usePopup:!0},onError:g=>console.error(g),onSuccess:T,uiType:"dark"},"apple")]}),D.jsx(Lr,{background:"buttonGlass",width:"full"}),D.jsxs(G,{children:[D.jsx(G,{marginBottom:"4",children:D.jsx(me,{variant:"large",color:"text100",fontWeight:"bold",children:"Playfab login"})}),D.jsx(G,{children:D.jsx(kt,{label:"Login with Google (through Playfab)",onClick:m})})]}),{}.VITE_STYTCH_PUBLIC_TOKEN&&D.jsx(Fre,{})]})})]}),d&&f&&D.jsx(l5,{size:"small",onClose:()=>h(!1),children:D.jsx(Sre,{info:f,onCancel:()=>{h(!1),u(void 0),U&&(a([]),R(),e(""))},onConfirm:async()=>{var g;h(!1),u(void 0),await((g=p.current)==null?void 0:g.call(p))}})})]})}async function Ov({transactions:t,network:e}){const r=await Re.feeOptions({transactions:t,network:e==null?void 0:e.id});return r.data.feeQuote&&r.data.feeOptions?{feeQuote:r.data.feeQuote,feeOptions:r.data.feeOptions,isSponsored:!1}:{feeQuote:r.data.feeQuote,feeOptions:r.data.feeOptions,isSponsored:!0}}function Mv(t){var s;const{feeOptions:e,onSelected:r}=t,[n,i]=y.useState();return y.useEffect(()=>{e&&e.length>0&&(i(e[0]),r(e[0]))},[e]),y.useEffect(()=>{n&&r(n)},[n]),e?D.jsxs(G,{marginTop:"5",children:[D.jsx(me,{variant:"normal",fontWeight:"bold",children:"Fee options:"}),D.jsx(G,{marginTop:"3"}),D.jsx(fv,{name:"chainId",labelLocation:"top",onValueChange:o=>{const a=e.find(l=>l.token.name===o);a&&i(a)},value:(s=n==null?void 0:n.token)==null?void 0:s.name,options:[...e.map(o=>{var a,l,c;return{label:D.jsx(G,{alignItems:"center",gap:"2",children:D.jsxs(me,{children:[(a=o==null?void 0:o.token)==null?void 0:a.name," ",Dx(o==null?void 0:o.value,(l=o==null?void 0:o.token)==null?void 0:l.decimals)]})}),value:String((c=o==null?void 0:o.token)==null?void 0:c.name)}})]})]}):D.jsx(G,{})}const Ure="3XwfKaFvrgRIZ6om79SxYoTAAAAAAAAAA";function zre(t){const[e,r]=y.useState(),[n,i]=y.useState("ETH"),[s,o]=y.useState(""),[a,l]=y.useState(""),[c,f]=y.useState(""),[u,d]=y.useState(),[h,p]=y.useState(!1),[m,x]=y.useState(),[b,w]=y.useState(),[A,R]=y.useState(),[N,I]=y.useState(),[F,j]=y.useState(!1);y.useEffect(()=>{U()},[]),y.useEffect(()=>{var Z,M;if(t.network){const v=GS(t.network.name);if(v){const T=v.name in{polygon:1,mumbai:1}?"MATIC":"ETH";i(T),U(),(Z=v.blockExplorer)!=null&&Z.rootUrl&&o((M=v.blockExplorer)==null?void 0:M.rootUrl)}}},[t.network]);const U=async()=>{if(!t.network)return;const Z=GS(t.network.name);if(!Z)return;const M=await Re.getAddress(),T=await new QT(M9(Z.name),Ure).getEtherBalance({accountAddress:M});r(ce.from(T.balance.balanceWei))},Y=async(Z,M)=>{const v=await Ov({transactions:[{to:Z,value:WS(M)}],network:t.network});if(v.feeQuote&&v.feeOptions){w(v.feeOptions),I(v.feeQuote),console.log("feeOptions",v);return}j(!0),console.log("tx sponsored")},J=async(Z,M)=>{var v;try{x(void 0),p(!0);const T=await Re.sendTransaction({transactions:[{to:Z,value:WS(M)}],network:(v=t.network)==null?void 0:v.id,transactionsFeeOption:A,transactionsFeeQuote:N});Wu(T)?d(T.data.txHash):x(T.data.error),p(!1)}catch(T){console.error(T),p(!1)}finally{I(void 0),w(void 0),R(void 0),j(!1)}};return D.jsxs(G,{children:[D.jsxs(me,{variant:"normal",color:"text100",fontWeight:"bold",children:["Native token balance: ",nY(e||0)," ",n]}),D.jsx(kt,{marginLeft:"2",size:"xs",label:"Fetch",onClick:U}),D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{name:"sendNativeTokenTo",type:"text",onChange:Z=>{l(Z.target.value)},value:a,placeholder:"To address 0x...",required:!0,"data-id":"nativeTokenSendAddress"})}),D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{name:"sendNativeTokenAmount",type:"text",onChange:Z=>{f(Z.target.value)},value:c,placeholder:"Amount",required:!0,"data-id":"nativeTokenSendAmount"})}),m&&D.jsxs(G,{marginTop:"3",children:["Transaction failed: ",m]}),D.jsx(Mv,{feeOptions:b,onSelected:R}),F&&D.jsx(G,{marginTop:"5",children:D.jsx(me,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),h?D.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:D.jsx(Rn,{})}):D.jsxs(G,{children:[D.jsx(kt,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:a===""&&c==="",onClick:()=>Y(a,c)}),D.jsx(kt,{marginTop:"5",label:"Send native token",disabled:a===""&&c==="",onClick:()=>J(a,c)})]}),u&&D.jsxs(G,{marginTop:"3",children:[D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Send native token transaction hash:"}),D.jsx("br",{}),D.jsx("a",{href:`${s}tx/${u}`,target:"_blank",rel:"noopener noreferrer",children:u})]})]})}function Vre(){const[t,e]=y.useState(),[r,n]=y.useState(),[i,s]=y.useState(!0),[o,a]=y.useState(),l=async c=>{s(!0),e(void 0);try{await Re.dropSession({sessionId:c}),e(await Re.listSessions())}catch(f){a(f.message),e(await Re.listSessions())}s(!1)};return y.useEffect(()=>{Promise.all([Re.listSessions(),Re.getSessionId()]).then(([c,f])=>{e(c),n(f),s(!1)}).catch(c=>{a(c.message),s(!1)})},[]),D.jsxs(G,{children:[D.jsxs(G,{marginBottom:"5",children:[D.jsx(G,{marginBottom:"5",children:D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Your open sessions:"})}),t&&D.jsx(D.Fragment,{children:t.map(c=>D.jsx(G,{children:D.jsxs(me,{variant:"normal",color:"text100",fontWeight:"normal",children:[c.friendlyName,!c.isThis&&D.jsx("a",{style:{marginLeft:"7px",textDecoration:"underline",cursor:"pointer"},onClick:()=>l(c.id),children:"x"}),c.isThis&&D.jsx(D.Fragment,{children:" (current)"})]})},c.id))}),i&&D.jsx(Rn,{})]}),o&&D.jsxs(me,{variant:"normal",color:"text100",fontWeight:"bold",children:["Error loading sessions: ",o]})]})}function Hre(t){const[e,r]=y.useState(""),[n,i]=y.useState(),s=async()=>{var a;const o=await Re.signMessage({message:e,network:(a=t.network)==null?void 0:a.id});i(o.data.signature)};return D.jsxs(G,{children:[D.jsx(Mr,{name:"signMessageText",type:"text",onChange:o=>{r(o.target.value),n!=""&&i("")},value:e,placeholder:"Enter a message to sign",required:!0,"data-id":"signMessageInput"}),D.jsx(kt,{marginTop:"5",label:"Sign message",disabled:e==="",onClick:()=>s()}),n&&n!==""&&D.jsxs(G,{flexDirection:"column",marginTop:"5",children:[D.jsxs(me,{variant:"normal",color:"text100",fontWeight:"bold",children:["Signature for ",e,":"]}),D.jsx(G,{children:D.jsx(me,{as:"p",wordBreak:"break-word",children:n})})]})]})}function qre(t){const[e,r]=y.useState(""),[n,i]=y.useState(""),[s,o]=y.useState(""),[a,l]=y.useState(""),[c,f]=y.useState(),[u,d]=y.useState(!1),[h,p]=y.useState(),[m,x]=y.useState(),[b,w]=y.useState(),[A,R]=y.useState(),[N,I]=y.useState(!1),F=async()=>{const U=await Ov({transactions:[bT({to:e,abi:n,func:s,args:JSON.parse(a),value:"0"})],network:t.network});if(U.feeQuote&&U.feeOptions){x(U.feeOptions),R(U.feeQuote),console.log("feeOptions",U);return}I(!0),console.log("tx sponsored")},j=async()=>{var U;try{p(void 0),d(!0);const Y=await Re.callContract({network:(U=t.network)==null?void 0:U.id,to:e,abi:n,func:s,args:JSON.parse(a),value:0,transactionsFeeOption:b,transactionsFeeQuote:A});Wu(Y)?f(Y.data.txHash):p(Y.data.error),d(!1)}catch(Y){console.error(Y),d(!1)}};return D.jsxs(G,{children:[D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{name:"callContractAddress",type:"text",onChange:U=>{r(U.target.value)},value:e,placeholder:"Contract address 0x...",required:!0,"data-id":"nativeTokenSendAddress"})}),D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{name:"callContractAbi",type:"text",onChange:U=>{i(U.target.value)},value:n,placeholder:"Contract ABI or function ABI, e.g. [{...}] or [{...}, {...}] or transfer(address,uint256)",required:!0,"data-id":"nativeTokenSendAmount"})}),D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{name:"callContractMethod",type:"text",onChange:U=>{o(U.target.value)},value:s,placeholder:"Method name, e.g. transfer",required:!0,"data-id":"nativeTokenSendAmount"})}),D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{name:"callContractArgs",type:"text",onChange:U=>{l(U.target.value)},value:a,placeholder:'Method args, e.g. [0x..., 1000] or named { "to": "0x...", "amount": "1000" }',required:!0,"data-id":"nativeTokenSendAmount"})}),D.jsx(Mv,{feeOptions:m,onSelected:w}),N&&D.jsx(G,{marginTop:"5",children:D.jsx(me,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),h&&D.jsxs(G,{marginTop:"3",children:["Transaction failed: ",h]}),u?D.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:D.jsx(Rn,{})}):D.jsxs(G,{children:[D.jsx(kt,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:e===""&&n===""&&s===""&&a==="",onClick:()=>F()}),D.jsx(kt,{marginTop:"5",label:"Call contract",disabled:e===""&&n===""&&s===""&&a==="",onClick:()=>j()})]}),c&&D.jsxs(G,{marginTop:"3",children:[D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Send native token transaction hash:"}),D.jsx("br",{}),D.jsx("a",{href:`https://polygonscan.com/tx/${c}`,target:"_blank",rel:"noopener noreferrer",children:c})]})]})}const VC=[{label:"Custom Token",value:"Custom"},{label:"USDC Old",value:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"},{label:"USDC New",value:"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"},{label:"DAI",value:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063"}];function Wre(t){const[e,r]=y.useState(VC[0].value),[n,i]=y.useState(""),[s,o]=y.useState(!0),[a,l]=y.useState("---"),[c,f]=y.useState(""),[u,d]=y.useState(""),[h,p]=y.useState(""),[m,x]=y.useState(""),[b,w]=y.useState(!1),[A,R]=y.useState(0),[N,I]=y.useState(),[F,j]=y.useState(),[U,Y]=y.useState(),[J,Z]=y.useState(!1);y.useEffect(()=>{M(n)},[n]);const M=async C=>{var L;if(!NH(C)){l("---");return}l("...");const P=new I9(`https://nodes.sequence.app/${(L=t.network)==null?void 0:L.name}`),O=new KG(C,["function balanceOf(address) view returns (uint256)","function decimals() view returns (uint8)","function symbol() view returns (string)"],P);try{const[E,g,_]=await Promise.all([O.balanceOf(Re.getAddress()),O.decimals(),O.symbol()]);R(g),l(`${Dx(E,g)} ${_}`)}catch{l("---")}},v=async()=>{const C=await Ov({transactions:[Fb({token:n,to:c,value:pu(u,A).toString()})],network:t.network});if(C.feeQuote&&C.feeOptions){I(C.feeOptions),Y(C.feeQuote),console.log("feeOptions",C);return}Z(!0),console.log("tx sponsored")},T=async()=>{var C;try{x(""),w(!0);const P=await Re.sendERC20({token:n,to:c,value:pu(u,A),network:(C=t.network)==null?void 0:C.id,transactionsFeeOption:F,transactionsFeeQuote:U});Wu(P)?p(P.data.txHash):x(P.data.error)}catch(P){console.error(P)}finally{w(!1)}},S=C=>{r(C),C==="Custom"?(i(""),o(!0)):(i(C),o(!1))};return D.jsxs(G,{children:[D.jsxs(G,{marginTop:"5",children:[D.jsx(fv,{name:"token",options:VC,value:e??"",onValueChange:C=>S(C)}),D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{type:"text",value:n,disabled:!s,onChange:C=>i(C.target.value),placeholder:"Custom ERC20 Contract Address"})})]}),D.jsxs(G,{marginTop:"3",children:[D.jsxs(me,{variant:"normal",color:"text100",children:["Token Balance: ",a]}),D.jsx(kt,{marginLeft:"2",size:"xs",label:"Fetch",onClick:()=>M(n)})]}),D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{type:"text",value:c,onChange:C=>f(C.target.value),placeholder:"Destination Address"})}),D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{type:"text",value:u,onChange:C=>d(C.target.value),placeholder:"Amount"})}),m&&D.jsx(G,{marginTop:"3",children:D.jsxs(me,{color:"error",children:["Error: ",m]})}),D.jsx(Mv,{feeOptions:N,onSelected:j}),J&&D.jsx(G,{marginTop:"5",children:D.jsx(me,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),b?D.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:D.jsx(Rn,{})}):D.jsxs(G,{children:[D.jsx(kt,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:n===""&&c==="",onClick:()=>v()}),D.jsx(kt,{marginTop:"5",label:"Send Token",onClick:T})]}),h&&D.jsxs(G,{marginTop:"3",children:[D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Transaction Hash:"}),D.jsx("a",{href:`https://polygonscan.com/tx/${h}`,target:"_blank",rel:"noopener noreferrer",children:h})]})]})}const Gre="3XwfKaFvrgRIZ6om79SxYoTAAAAAAAAAA";function Kre(t){var a;const[e,r]=y.useState(""),[n,i]=y.useState("");y.useEffect(()=>{t.onChange(t.index,e,n)},[e,n]);const s={display:"flex",gap:"10px",marginBottom:"10px"},o={flex:1};return D.jsxs(G,{style:s,children:[D.jsx(G,{style:o,children:D.jsx(fv,{name:`sendERC1155TokenId${t.index}`,value:e,disabled:!t.options,onValueChange:l=>{r(l)},options:((a=t.options)==null?void 0:a.balances.map(l=>{var c;return{label:`${((c=l.tokenMetadata)==null?void 0:c.name)||"Unknown"} - ${l.balance}`,value:l.tokenID}}))||[],placeholder:"Select a token"})}),D.jsx(G,{style:o,children:D.jsx(Mr,{type:"text",value:e,onChange:l=>r(l.target.value),placeholder:"Token ID"})}),D.jsx(G,{style:o,children:D.jsx(Mr,{type:"text",value:n,onChange:l=>i(l.target.value),placeholder:"Amount"})}),D.jsx(G,{style:o,children:D.jsx(kt,{label:"Remove",onClick:()=>t.removeTokenEntry(t.index)})})]})}function Yre(t){const[e,r]=y.useState(""),[n,i]=y.useState([]),[s,o]=y.useState(""),[a,l]=y.useState(""),[c,f]=y.useState(""),[u,d]=y.useState(!1),[h,p]=y.useState(void 0),[m,x]=y.useState(),[b,w]=y.useState(),[A,R]=y.useState(),[N,I]=y.useState(!1),F=()=>{i([...n,{tokenId:"",amount:""}])},j=async()=>{if(!e||!t.network)return;const M=t.network.name,v=new QT("https://"+M+"-indexer.sequence.app",Gre),T=e,S=await Re.getAddress(),C=!0;p(await v.getTokenBalances({contractAddress:T,accountAddress:S,includeMetadata:C}))};y.useEffect(()=>{j()},[e]);const U=(M,v)=>{const T=[...n];T[M]=v,i(T)},Y=M=>{const v=[...n];v.splice(M,1),i(v)},J=async()=>{const M=await Ov({transactions:[Bb({to:s,token:e,values:n.map(v=>({id:v.tokenId,amount:pu(v.amount,0)}))})],network:t.network});if(M.feeQuote&&M.feeOptions){x(M.feeOptions),R(M.feeQuote),console.log("feeOptions",M);return}I(!0),console.log("tx sponsored")},Z=async()=>{var M;try{f(""),d(!0);const v=await Re.sendERC1155({to:s,token:e,values:n.map(T=>({id:T.tokenId,amount:pu(T.amount,0)})),network:(M=t.network)==null?void 0:M.id,transactionsFeeOption:b,transactionsFeeQuote:A});Wu(v)?l(v.data.txHash):f(v.data.error)}catch(v){console.error(v)}finally{d(!1)}};return D.jsxs(G,{children:[D.jsx(G,{marginBottom:"5",children:D.jsx(Mr,{type:"text",value:e,onChange:M=>r(M.target.value),placeholder:"Token Contract Address"})}),D.jsx(G,{marginBottom:"5",children:D.jsx(kt,{label:"Fetch metadata",onClick:()=>j()})}),n.map((M,v)=>D.jsx(G,{marginBottom:"3",children:D.jsx(Kre,{index:v,options:h,onChange:(T,S,C)=>U(T,{tokenId:S,amount:C}),removeTokenEntry:Y})},v)),D.jsx(kt,{label:"Add Token",onClick:F}),D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{type:"text",value:s,onChange:M=>o(M.target.value),placeholder:"Destination Address"})}),c&&D.jsx(G,{marginTop:"3",children:D.jsxs(me,{color:"error",children:["Error: ",c]})}),D.jsx(Mv,{feeOptions:m,onSelected:w}),N&&D.jsx(G,{marginTop:"5",children:D.jsx(me,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),u?D.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:D.jsx(Rn,{})}):D.jsxs(G,{children:[D.jsx(kt,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:e===""&&s===""&&n.length!==0,onClick:()=>J()}),D.jsx(kt,{marginTop:"5",label:"Send Tokens",onClick:Z})]}),a&&D.jsxs(G,{marginTop:"3",children:[D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Transaction Hash:"}),D.jsx("a",{href:`https://polygonscan.com/tx/${a}`,target:"_blank",rel:"noopener noreferrer",children:a})]})]})}function Qre(t){var p,m;const[e,r]=y.useState(),[n,i]=y.useState(),[s,o]=y.useState(),[a,l]=y.useState(),[c,f]=y.useState(!1),[u,d]=y.useState(),h=async()=>{var x;try{d(void 0),f(!0);const w=await(await fetch("https://demo-waas-wallet-link-server.tpin.workers.dev/generateNonce",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({walletAddress:t.walletAddress})})).json();o(w.verificationUrl),l(w.nonce);const A=await Re.sessionAuthProof({nonce:w.nonce,network:(x=t.network)==null?void 0:x.name});i(A.data.sessionId),r(A.data.signature),f(!1)}catch(b){console.error(b),f(!1)}};return D.jsxs(G,{children:[u&&D.jsxs(G,{marginTop:"3",children:["Transaction failed: ",u]}),c?D.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:D.jsx(Rn,{})}):D.jsx(G,{children:D.jsx(kt,{marginTop:"5",label:"Generate EOA Link",disabled:a!==void 0,onClick:()=>h()})}),a&&D.jsxs(G,{marginTop:"3",children:[D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Verification Link:"}),D.jsx("br",{}),D.jsxs("a",{href:`${s}?nonce=${a}&signature=${e}&sessionId=${n}&chainId=${(p=t.network)==null?void 0:p.id}`,target:"_blank",rel:"noopener noreferrer",children:[s,"?nonce=",a,"&signature=",e,"&sessionId=",n,"&chainId=",(m=t.network)==null?void 0:m.id]})]})]})}const Dd="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAADaRJREFUeJztXWlsFdcVRmpa8SNSVTVSEmWpqiZR1LT8iBQpSUPVqEJV/vUHqhBK1ffGENJsCiGEJM6bwWwGh0DYF2MIW9gxizEYsGMIYglxjAuFQkMwipHfzDyvD9vYBqb3zHvjDs+z3Fneu+c++0ifogAen3vPN+d+524zYkSeWUS69rMCURlVICmvCqI6VxCVLQTVBOcIGglaCDoJtAzAn6kEPxB8R3CIYDPBLPKccRMK479l3bZhszAhJj9FgvQ2wQ6CBoI+i+CGhaQgqed0UknKRCEW/xXr9g8509/w6Yl/pN/sG1kMNi0gq2wvkNS/RqTmkaz7Jy/NFPTDBF0Igm6HdoJ9w2QIyUiKfTY9DmMOuh3iBKujYvwp1v3InZE3aCzpvDoEQQwLxyErsO5X9EY6apKQUuGsA5YtnCcichzrfkZn6Tc+nwM/TAQri4ry86Qz6hEEhBWqBUl+lnUccm4RSfmFkBJ3txEEgTV6CMqGTNVAGhsRUjNurDseG64Lovwy6/hkzQjD7yeN3Imgo7FjQ95lg/RY34Sgc3nBFUGKP806bqEYacxUIbvz8/mKHlIpRFnHz7fB9K2QEnqsO5JvxORFpC/vYx1PT5ZW+d8y77z8QRU3ukCQmn9DHL6KoNPyDfXRIuVB1vF1NJKuRgnDJV42cV2INePcgzAc/CFMAl6DX7KuTZu3to25H1yTAOpVHoMPkFtua7Vnu7V/zlKZ++KHBMw1QXp27xqCzvCM8uouDezkuR5t9c4O5v74xNmI1HQ/o+DrdT6Xpd778xNad8/dAQJAFvhgQYK5Xz5RxWSeQOB4kqf+Uq9mmEGAPTU3tQKJvW++EJOLcxx8dSrzRvsECD+zGQQAFK/hUhCmICljcxL89MIOt3P7auttWwIcPtmlvTWHS0EI6BEk+cmsBj8t+rhd1dtX26VlmpkAgFJ+BSHgUlanjMkv2IOgkb4wbWHLgPBzIoAuCMm/Ze1vAMzLVvDHIWicb5iFnxsB9n7FsSAkIMP0C6EGP536uZzsAWQKPzcCADidITTQGOpQQB64FUGjfCNT+NEQgHNBCKXhrHCCLykvCxyrfivhR0OAPBCE/aFUBeRBpxE0xhfshB8tAXgXhFFRqQwa/EmsGxEE5/5jLfy8EIB7QRiTnw9CAG6Pay3Y0O4afBoC5IEgrBtyb/9rRc7CzysBjp7q5lsQSsqYIfX2uwk/rwQAlO3mWhB6ywIFkvoqAqd9AYRfb5+z8PNDAMCHn3MsCL1oAfIDZ1g77BcXvncXfn4JwLcglCtog/8ce2f9YdnWDk/B90oAAMwqsm6nf8R/TUMALjd6wL4+WuEXhADVZ7q1t4s5FYQx+WPH4Kfn/NuZO+oDB47TC78gBACs39vJvL0+oThuH+NV/IHwu+395fdNAMBHizgVhDHlT07pv4q5gz5w8Yc+f9EPQID9tTe1idPZt9075JVO6Z+7+/hW7uj0HfwgBAB8+gWXgrDdchjgMf37FX5hEQAE4TtzOdxObjUMkL8oZ+6YRxw84U/4hUUAwMb9HArCmCxaEYCrzZ5BhF+YBAB8soQ7QXj53uBL6hMInPKEIMIvbALwKAgLRPVh09uvTmbtkBcEFX5hEwAwnzNBGBWVV8zpfwdrh2gRhvDLBgG4E4QxuchMgH8zd4gSVSe7Qwt+mATgUBAeTtf/bXDKtweBQ64oXBKO8AOD5zTe6NOndWEHcFgk4EgQ9ujzAQVS4ncInKFCGMIP9gpcbuzVjtelAgYHQmeubNVWbu/QKo7dHGqC8HGoAP6OwBFXlO4MJvySXXe081d6tWPf3hswIEDRitYBLN7crh8VD0IC2I/Iur8oMRrG/7kIHHEECL9E+x1fgVeIYKy/dEs7ZhOsTAIYAFW/vSqpffVNXgvC8UCALQgccUTNGW/C7+5dTWuS+7WzF9wFnh0BDMwta9M27OvUffBCgk0VPAhCuRAIcJi9I/YQl7VSCz9D2HlR9m4EMDCntE0/KeRFMOIXhGopEOAce0fscfmau/DLFHZeQEsAA14EI2xSgS3qrPvQAYeAAI0IHLHEuj3Ows9O2GWTAF4F4+ebUAvCBiBACwJHBgGEX3vSWvi5CbtcEYBGMMKfvTsPrSBsAgJYfUiZOWrP9vgWdrkmgJtg3Hwgybw/bZAYgcCJQTALPz/CjhUBnASjRNrEul+tgJIA/73eF0jYsSaAlWCs/LpLe30mvu3k6AgAwiqosMNCgEzBOGMlviyAjgAwjw4ptNrjxAtmAkwneO/TBMpjZWhF4BuzVa2svJN7AsDWtUkz2PenDXQRiPr2rw8WtGi7jwZfpcs1AWJLWrQ3Z+Mb8zPQyMU9AJA6Z61u03cBYycApHuo+zGmewvUAQG+Q+AIFWBYWL6tAy0BIFtxtBcAUAkEOIrAkQHAmLlqh/NtHCCodh4JZ1gIgwCFi1u0N1y+OgJzG/CdAtb9m4ElKI+Dl1ff1OcCIJ06/Tv4+6DDQhACTF/eqq/7Fzj4CDpgU0VSW1uO8YoZeRpsCZ/F3pF7MYGk0as/9ml9/Zp2or7HcXMFpFyosf2WjX4JMPWzhGO6n5D26+jpbm3/sZsoJ4GiojIOtoSNZ+2IFaaYPuvSkbyjbTnoPJ8Ow8KXB5JZJwCke7dgwr+DpWDjd3y8GO2+gBdHEBY8jcARS6wtv3c5uEm+7TosxJa2ahXH6YcFWgKI5LluN4NMLknoRDU/f9FmvMvB0Zj6KGwLv09AvC38m/O3Bi0Hn/7XLe3dEudhATZm0gwLNASYQrLLBJd0D3P+kO7NzwYtMwFvOdhqOhuo1CFwyBJvzlG11o7B+wJu9d7VJ4gmzbB/K+GNhU0lfgkAt4A4PR8wu9R6fuLoqS7M+wAAh8wng1BvDIW1gTs2m4JhWChZ55xmYQyGt5GWAJDu3W4Gff8zKEXtNQf4zLrfXFBoPh08EYFDjjjsciSs7mKvnqrtft5ukclMAJpFm9dIRlizq0OrcdguDlkH/UxgTPnz/wkQUx9j7pALYJxtvNHvSAIoG/fXdjmm7cxFJoMANIs2sPWrymVXMAwHPHyKloj/BzIviLjG2ik3QJBg7HczOEQCoszpWcYi08xVra6LNvB77YaQTCAu+cxosLohZD0Cx1yxfh/9ETG4NvYjh/t9IU07pWogxhd7O6lPBy3dgrfky4A0mADT1b8hcIwKsCOY1mBYgAC6qXkzYLiB7dxHTtHPJyAv+e5BNKY8N4gA6fkALm4JtSsNnQxmE0t3uR/XgkWbfbXeFppgF/B7DgIUGeIRqfmngwiQHgb2InCQCgs3ttuWhk5mt8j0VnFq0cbPYdDiMvQlnxnzLYPP2zAAqPZ4aNQw8yITpPtlW9sHzeLRAg6B8pL6AZbpn8dhAABl249x59LQyWBYOHLa/3IyzPbxUPKZ8L1t+jcNA2UIHKUGrM719dN/ISTTghw4+WQpFyXfAEjtP9kx+CkCJLi7MxCOXuWaACu2cVPyDSAixh92JUA6C5xg7axXeP1UTBACQMnnpaxEgo1UwQeLSuoYBA57AiwPey0N/RKAo5JvAI7izyYLXGDttFcs+ZLuY5FBCMDpFfE1noKvZwExPg6B456Reaw8TAJsPZjkquQzEBXlFz0TgNcsAKVhPEF/myQtAaDk4/Trod7f/oEswKEWAMB2bdrSkJYA0nJ8J3tp4PvtN2WBr1k3wg9gqTcsArgdVEGMNYGCrxNASsCu4X4EjfGMi1fD+Xz86/yVfICkEJPdPxRJY1FRWYqgQZ5hPlvglwBT8B3nogKJ2dRQgg8WkRT4ohja6+Sc4FYaOhGAozt/M9HgOufv1YiY+AuChvmC1dkCNwJsO8RnyQcgsXom1OAbRh6+hnXj/ABW7OxKQysCQMn3zlwux30IfiwrwQcjaWUk+SVXWDfSD+zOFlgRwO34GVaQcf9U6Kk/09JVAdqjZE6ARRw3AuA8xk2FZCQWfySrwTeMpJkoggZ7hnHs3I4AWI9x04C8/WNyEnzDBFFdxLrRfpBZGpoJAPv/WfvnM/juGz3CNtg+RjIBl18bNx87NwiA/FZvh+DL6yLStZ/knAApEujzA/WsO8EPjNIQCLDrCLclX2XWRZ87CZofFDicJDLOFsBdxJyWfA3RIuXnTINvWERUH+eRBFAalqzjcoNHQ0SUH3CPTA6NVxJwCHzBN2yYBEM4+IbBZITAqTBEjko0Y76bwZQxryUiRqRKPWUk67h6stQ8gVrMuvN4B0zyMKvzwzDC3rECp2sHjJGMSjme3s2WCZL6JGnQJQSdygX0Vb1cLezkylK6QFnIunOxA7ZyMZ/dy6aRIeEPwnCpaIUG0je/Zx2fnFi6SpgpDGsDQG9K6OXxW29nQkx5hnTALgRBYIXNeTfW+zGSDcYQoL2vOAuoicaUUaz7HZ0NASLUBD6qNRSMjImjSWftRhCwsLBl+I33YRFRfoKQIUY6MI4giJ5A/G7SxZ3Y/BDrfuTe0nMIowmWC7hvMYuTFF9C3vYXuJ6+xWwGGUhnzxFwzC7WE3+mDQedkUVF9SESgFcESS0iwagV4FRs9oINz64gKIT79snb/kvW7R82C4tKLY8RQvyREGO8HixRXUH+e0iQYLZNH5sTFmN2IgozlKnP51SSn1kF39WDT6uR/3+JEO2RfHzD/wfDh9DPtZjXuwAAAABJRU5ErkJggg==",HC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAADYlJREFUeJztnQuUlVUVx0cGeSlqJJRWdkcQERQln4SKmUgRGqCt1BIrUMtXaTJpCWZCttQ0ExhTi0fIQ1vioPEYW/kAREdQMwVU1CyFSBLlqbz+7f8939gd5t7vfHfu980+996z1/qtNWvBd75z9t73PPbZ53wVFSUmqEy1QetUD2GoMEqYIDwkLBZWCquFjcI2AQH8e4OwRlgR/N9aYbxQLQyTcnsJbbXb5yVD0C7VSoxTJQwXJgpLhS0Zho0bll0v1KTfWSnvrki10tZDWYkoff/A4LOEdcKuBA1uY1dQh1lBnfbX1k9JCvZM7SPKHSHUCdsVDW6DdVsgjBRH3Udbb0Uvosi+wuSEu/Wk2CxMFfpp67GoRBTWQegNMwnTNmJc1AZtaq+tX2clMPwg4c8w46q20eLmXWGeMESGh7219e2McGklShkYGH6zA4ZKmq3CfGGAtL2dtv7VRBTAJVwf4T6YNbi2YVoaxiKmBToor6WkeH5nafQYmMCLtiG0WZ3WRWWqi7ZdEhdpZGuw6zORtp0OKN8VdghLYIaF1tp2SkRgInZjhfccULirrBfGUVfa9opNUJHaQ7x6sDRqVeDp2kp2nR2BrgZTd9r2K0jQKr20Gy1sckCxxQYnideJDoszdiCV50RvOvxYXwi7Ah0W1wRRKtxVWOiAAkuFRUI3bbtGEhnv2e3Pc0BppcZc6lbbvqEi41UnmP1ybWWVKvXUsbads0pg/GUOKKnUWeacE3jjl7ETBGO+7/ZbnmfU5wRSiW7g5ERfGeUKJ9tddYxfmeoCszzRVkK5w+V255Y1fqtUe5gAhXbjPYbpLTYcpGP7DFHqZuN6GsNo6+gW2TuQF50BE6fWbrSnMdxvGZy08bmlu8qBxnqyQ9sks5UcJHNwr9pv6boLbTM2kaQSmEye9Q400hMOE24GxGt8s+Rb4kDjPNFgyl08S0OY7N3r4bv+YoKrAibdFp5tDJO2vNqBRnnygxnXfQozfmWqHUzevnZjPM2Dtmv+nQYwEz+/5i9eeOBmYHN//XvDHGHSboSnMHjkLv8wMXiI0Zxj026ApzB43nJQvr9+bvb4vL7SIb9eQByAZ9nfdaDinnjgcfve+XT/pXQ5g8dQG9X4/RyorCcZ+kZxgKkOVNSTDJPCjV+Zvo2rHG7pKFd42VbHsF//SAcq6UmWEWEOUOdABT3JUpfL+LyB0+VLGD3xQBs3vdEU5qpT7cp5Wobh2RxglgMVi8Ze3YGTzgIu+Rlw4x3APdOBmbXArIeBKQ8At9wFXHwNcMwgoF23wt7VXp7v9WXg6EH5c8QA4IAv6OurKTMbG78infTh9uWMe1YBZ34PqF0AbNyMyPL2GuD2e4Dep+f/TjrPtAejvyuXbNgEPPkMcMcfgP5nA227autzHW9az1z+MdvX3Tz/7v2BiVOBd/7dPANs2w68/CpQPQ74xOHR3/vZY4GVrxfuAA2ycyfw+lvAbXcDPU4Rp1bTKW1dldn9uzn+85fynauAt96OxwC7dgHzHwcOOj7a+/t+Pb/eJh957U3g3Eull1HrDYZnOkCNurF3h93vDbcDH34Uv/IXLwU6H2mvw3d/HP+7M+X9DcDwH5nhreV1PDHTAZ5VN3gmVMj1vwa270hO+XffZ1d8zdTk3t8g//gXcPhpGnp+tsH4vKzZnfv42x8CnH1xMr/8TOG84Pgzc9djr0OBRfXJ1qFBxt2poest/L4SHaCXutEz+er5ZuYeRThBmyHLvytvAL59BXDRT4AJU4A33or2/L0zctfjkJNk7vFO+PP1L5iZ/e7cOcnUa/lr0eqx5Dlg38M09N2DDjBM3egNdDoCeOwpu8I2yrJqzK0ySz8OaHNw4zI4s2aX+tRSezlcVeQaBk79JvCRpRcacXV4ew48xjiCTeiwVV/U0PlQOkC1uuEbOOsie9f/0TaZnF1lH7+/dgGw9UO78j/VJ/vz7FXChKsDrhJsbeo9wF4H9niH9tfQ+Sg6wHh1w5MOMvbPedSurJo/Rps1c6n36hv28nqe2vRZ9iL3zQ5/7hUZfj53nL0e+/W014Gxgaq+Gnqf4E76F38p/1kXrij+6hiciVJep8OB5/5uV/5hX8r+7DLLswueiBbR697fXgfOJfbtqaH32XSAxerGJxdcaQI1YTKnLnp5+/cGXnjZrvxssXo6hS3q+Jt7o9XjvMvtdZg2W0vvi+gAK9SNT7ihY5PLR0cvj5Oq1y2rgS1bsw8np50LbN8e/iwdNko9Fjxub9cPfqql9xV0AP3PtuzXC1j6ol1R2cbrXBw3GNiwMby851/O/ix3E8OEq5Djz7DXwTaRpKyVYe8IlUAQWU0H0P9gExWw1jL+r16bX5nnXmZXPreOsz1rmzyuXBU+F+GMftL99vdTZs7R3B3cSAfYpvTy/zP0Qvv4/8Aj+ZV5s+VXTLnqF02f42zcJpyMcuL29PNNefOf9rY0CPcCTj5bU/fbKtSNT24ab1fW1TdGL6/twcCjC+1lnvKNps+ec2k048Uht96ltRH0MfoOQGPVPWlX1slnRS/zoBPMdmuYcKMp29Lrlt/FYlurzHsM+GRv9R+f/hAQJemCxurYI3qZJw6zRwGfeyn7s088HZuNc8ojfwE+7USqWHoI0L0A4liZrX9gma2/9Ep+ZV4xxm4Ebhrt/hwnY0klgFDWfwBc+6v8nDlZNtABdO//OecSu+KYlxe1PI6p9z9iL5Nj/e7P9vlK4UbeXTghZALK968FUirh3jDW0AFWqlbi57fZlcjkkKjlMT7/imVIYW7egUc3fZbbyTbhErC2Ljf3P2z2K/hLHzLCla4+F8v1Q8ETI2TdZFuu5YKZw7Yo3t+WZ392/GR7XUaM0jZanCymAzykWonJD9iVPvrWaGVxbH1wnr28sb/N/vxCSwbQ1q3mPIK+4eKilg4wQbUSzM2zCY1qK4eJIRdWm/h+mDCfoPvJTZ9nKhrz98OEiRsHqyRuJMV4OsAo1UpwfLcJjcrYfq4yeFKISSK27WTKrDnZy+BJHptwici8BX3DxUW1fkpYesyOkP3L7FmmUDPOzi1cTuK4OTRouDkStnmLvYxNssQ7MscJIc7SbcJ8P32jxckwngrqoVqJz59gn7U3CGfvTJ/iKR8mXK5Za8/by5Sxd+Sux+9n2p8//4faBoubnvz+TxtopoU3nAGgcZMSrgoYSwjLunlxRXgZDFaFDUPFB23e1o2DIQccHS0buLnGZ/p3p5Azgfw329LRtgVcfDybeTJoonqFODZzizVO4byAJ4OZbh727lPPsZc1969m40pbT/FR497h0K4nAlP/FG02HyY7ZFL5/EvAeZeZFYLtvdfcZC9T5/ROkmQcDnXpePjehwJHDTThVOb05TM3WPeeGUp4OQQPZUR9py0CyPjA6d/S10187KLN3b4ggpNDRt1urjERuv++39Qw3GhhVg1TuDnO83hYl6PyfxeTQGcEN4zsDlO2qn8J7KNydCsp1tHmxXdFDI3wmWNM2hbjAB26q2fUFCmNr4hxah7gaQmyXhLlr4krD7JfExc4waMOVNCTLAuyGj9wgBEOVNCTLCPDHKAjXLotxBM3m3kheE4HCJxgsgMV9STDlFDjBw7Q14GKepKhn9UBAidw484AT5xE+2RM4AD8aJRbkUFPIfADYHl9NKoDzKfGtCvuiYe5QvvIDhA4wSD4z8eUAvz455C8jO97gZJiPj8DnLcDBE4wEC5cIOFpLjz3OaBZxg8cgNfI+s/HFy/T5NffrtkOEDhBH7hwj5AnX3jot09Bxg8cgMkiY4SdDjTKE40dgc1a2S0czQk6Q/sQqScflkjX3yUW42c4wQDhPQca5wlnPQqZ+OV0gMpUayl4LEz3ot1IT3Zom3G0VewOkHaC1uns4VUONNSTHdqmym7JQpygMjVYXrLJgcZ6GsM1/+BEjZ92gIrUHvKi0fCrApegLa6jbRJ3gLQTVKbDxNMdaLjHMB2t8tzsKdgJzNJwoQONL3cWxb7ky8MJugrzHFBCucJt3m4qxv/YCcxw8IwDyig36ql7VeM3iIw/naRCyxxQSrmwjDrXtnsj8U5QxsZvkMAJ6h1QUqlS76zxGySYE8x1QFmlxjxnxnybSGW7gcsTfaWVClxud9W2a14iFe4izIArN48UJ4zwMeDWWduezRJGp8AQpfY3CYoT7reMFh0WR7efS4K9A24gcafKbyXb2ZHWFTfdWiq23xICs5U8DiZhQVvJrsKEG+ZcJLulqyVBUgkzi5bA9waZcKxfnNZNUskcLgk3L2CSFnU/V+MGawJdFOdEr7kCk23MlPNpKM9J4oag7dRBPNm7xSg8uAAzLMyHOcembZik4XlLHrkbKG1vq61/Z4Tn10QpQ2CiiO86YKi4WRcYnodui3tpl6SIchg74P0EpXRJRW3QJm/4fEQU1k+YguI8ps7LtiYJfbX1WPTCm61EkSOFBXD7MkvWrQ7mur2O2norSYG50ZTX2s6EGVc19xp2BXWYma5TZY4bOL0kI+lbzs1V93SIGpgvnyR5zyHLZr7DxOCdVWhXxks4F4VLK6EnzNfQqoXxMJMwRtqWwwReuAbP/Go6/2YsgoGpFTBb2bNhvqnIz+oNFXpIuW202xe3/A+tK4X9ikt4nQAAAABJRU5ErkJggg==",Jre="/demo-waas-auth/assets/100-cf3a0cbf.png",Xre="/demo-waas-auth/assets/1101-1d0b8ff9.png",qC="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",WC="/demo-waas-auth/assets/250-2aa72264.png",GC="/demo-waas-auth/assets/42161-90b816d4.png",Zre="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAAXNSR0IB2cksfwAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAkxQTFRF////AAAA74Ig8Iwx8ZA4//7974Qj74Mh///+//////78////74Mi//v4//////z5/vfx74Um//37////////////////////////////////////////8ZE774Yn8Y42/fLn////////8Isw////86FW/evc/OXR////+dGt/vPp8Igq++HK+9u/976M8pZE/ezd8Icp+dOx/vbu9KZg/vr2/OjW9a9w9Kll+ti5/e/j/vnz8pxO//r3////8Y838pZD////////////////8Iwy////851Q////+MWX+cyk+tWz+97E8ZI9////8Y0z////////////8ptM/fDk9rZ9972J+93C86Nb8ZM+9riB/OXQ+c+p/OfU/OnY8ZRB////9Kdi9a5u////9axr////////////////////////////////////9Kpn////98KS86Rd/////////vfw/////OPN////859U98GQ////////9rmB+9/G9bJ298CO+Mqg/e3f9bR686JZ8plI9a1t+dKv9bJ18ZA6/vXs8Igs+Mui/e7h/OrZ+Mmf+c6n8phI8Iov86Ve////////+MaZ////8Ikt////+tm7+c2l////++LM98OT8pdG////////+Mid9ruF855S////////////////+Mib////9rN49rd++tq997yG+ta3////98OV////////++DI////////9rV7+tW19bBy/vPq9rqD9Ktp////8ppK////////////////////////Mj9/0QAAAMR0Uk5T/wD/////////Af/+///9/////5/W9TQF4uDZ6MT/////x1L/Av///5b////////////////////////////Q///vCh77/6X/uP//////p/8SDgb/////////////////J///UP8QSyRsVr4rDZr/Wf//bwz/9/9N///8L///////////////////////////////h7H/5P9d///c////j+n////zMuxm/6D//////5v/WFv/MCz///////9U/2M11GLeOHwhNZoAAAr/SURBVHicxVv3Y1RFEJ67JCSXkII50iFwhhCKUmKQFnqJdEKQKiCdkBAIJQooIIIiRQVUekdEEATEiv0fc9+7u52Z93b3vVyJkx9yezs3872dfbvzbYFAAhJ6/vTcgtZJZVP37s/L2793atmk1gXnnj6vScQWdNf3lq2zJvUFpfSdNGvrllA6AUzbtqA8T+08LnnlC15MSw+A5gtNmid3tUTTheaUAygp/tqf96h8XXw3lQBCLwYWdMe9JQVVEV+d0geA0B8V3fUelYq/fUDwBtCRoHtLwtuSBlAyMHH3lgz8ISkAbfdnJOcfYH/x4sQBbPsyWfeWfBlJEMC0Wd3u+mrJm7U7EQD/lqfGvSX/lHQfQKfPYc+f9N3aTQA1xal0b0lxaXcALE7y5VNJ1Sb/AKYnMfboJTzdL4B1ZenwD1C2zh+A55Xp8Q9Qud0PgHVp8y8QuNvABWB6mto/KmWufuAEsDgt/Q8lvMgMoCYN7x+XqmYjgJSPP255bALQmX7/APf0AP5N6fivk71/6gBMS+H8Z5LyxRoAs3rGP8B9NYBtpvyjZUlmTOaPBMhfHi9l/pylUt83JV4/ZQ/A0InxUr81dnWXCkCbMf/6IChlPMAlLAUHq9R3yer+jQAHUbvWrq5cpABw39hq86WJiTnUfjD4qkK7sb+sfl8UR8jStVh71bkBlBjz3zHo8CZAQ38CoF+uW/04Vj8EWJMtS2/EFAruugCYh8AHaFF0gSFBKmPc6m9jBIoAfnVGQMjAGgeADqN/WCtN/J5D7Vty1aXd8JWsXC+Kn8nSCuyxGziAkHkOIhH4QrwDnzAA813qo7FyHMCR3rK0E3UulzIAf5gb4Du0eJrZt2WNU32srBolIvCqOlpPKACPBoBrrBF5BILB7x3auZ/Lqh2i+LsqAmI8LCUAImb/I7Ops/zPg1w+c6g/wqq5AAMwAu8ytc0EgEcWQCKwhtmPyUiuvkNW9BLD4Luot4qpDUQAJR4k8ENpYq1oxN9cAG4y7RxsobGiOFGWJr/E9PJKJACPNGR8L9qIhS+7APAYPMSK0WIewAi86bB7PQ6g2WP96RBaFAP/Ky7/jhisxwj8ArBTFwGAO20xABfM/mGJNJGZRe2jnCTaWQvl18tF8bYsVb/kNByJAWgy+ycREBNP7sKgW2YT9WX49RCAX/rI0kqX5fNRANM8EjHeiMQ+Su/xqP46RmAowDeoNNxlecYmG8A2s3+YLU1k5FL72TfR+BypnfOx/HKQKA6SpZcL3aa7bAALzP6HYgS+ExGYLEvLsyYzX1F5hqg+BThhioCdokMg5JGKfo8WrwAMx9Jq0h97D4irf4QK4rs5WHpPYftGqQCwxWP9+x1pYqboxu+jxRb6Rg6Jq/eTX90WpaOyNCxfZXy7ALDV7L8esx/RiFkY4XdyIIe/cZbsw2lDRKAIf/yt0nqHAOCRjB9mjUgiIOzDMYzB0Kj6UlQ4xSIwT2m9TgCYZAZAurFoxB9lKfsIsFFxtK2ds0J+sUQUz8rSqEal9XAAQuZRgERgKdDkeIlIzei88LatPhgjcAZgAqZOr6vNF7TBc3MDnGQReAtL0dEXZ94+9VaZROAIS15f0dg/AE/NAJABWI3I7QPLDewYTJHFEaL0miwNm6CxH4FzRv8No6QNi2Hw5FhIPsbAmvs5A2gY5hUBgE4wj4Or8QmXAdRiSSTH0AI0P+xTxF4ZwQDmYumizkE7tBoBkG7cwBiGSI4f9a5lHGgcTR5HZNHkuM8enYMmML6F+RgBqxFJhIX9jVZHz8dm3giEBYoIFOI7sEProQKMq3KEAVx0RiB3ZvAaOGMgebBgAD+xxtHIVPFnEM7x3kSLIjm+GLRTMRID8aqNicVgfpYzOdZIAew1+CcczGpfzvHWi/+HxWCDUfpIjISxKInkNTdDVrxmesj9hjrejU+x5DirOhgdbpfLb61+ujL68S1ncqwX02SMDCCbczxhf57130rFPmUxGGx/mJxFJ6peJxIEUMhHGaQn/YT9n+1PlwD24GwhYhCdLQQDyMIfnzX5N4VgHD6bxfFYchxLx6x0GOfLrxpji0kieX0Pf3zcCMDQCTdiI9Y7k+NY6tdbjIZnsEJM+vvEv+rCeAvZMsAIQP8a5vJGRI5nMYx4YiBSsSJsmqXRjEBEILdafjlI6wGs11A/EBEGcJwlx8J+znxineQsjXZWeoVFYLX5+fVDMWEAguN9gRb3AVyJf7ZSMcIPhlvBySh0Jsd6qdBPRoSDHWWPubCQpmZDWOPcsrrnQdFCmBzP1jmwpUk/Hc8LUif1nGHgoLgLKHdaKLrHaTFmrMLEYI7OgS3t+oSEMIABLo5HXhAxyrzBK8G5smuQTm1KxhkAoScZFsNwDBG4CHEr+muMwESjf5GS6ZJSzgAmYAQ+sGoLZ8qyNdM4l2HIuuJJjf2YHIAaTVr+rTSR3cKS4yjDwBhY6TBZiLIXz1dieaTafEzydmuJCUbgdg6d8j6JMgyebZzCGByyajF5/TDHCCCspWacAUxwcbxCXA7+DegqjrV4PgbfgW+M/m1qpiannAHw5NgWknEWGdaxapXWpXRo6TnhYKBkGHxBupavpcpZ5Jo5AjY9Vy5QkAiI1LcRU9/1cY18jMExoJsiK2jz7FTYJlJZqluiId24lnG8h1KFtEqDczVXdlHFZgaVdnuN6IWihjMAJccj/UKkYqd5DGKZ6lrllhpKl26ZjjAAi2Hg4u8x1JnAmZ+Slro3U5jElukUC5W3EMBplhw/IkqctpGtOdxVUm7poZzXLtVil5rCGUYRUSLrL8vi6bAtZ+LE+GPX4iyXiG6xmjCAqywCY6kWmR9+BDb6QWzoVG0pErmzW7dczxmAJgJ0Dc5KxfjO3iUfEZDL9YG7jg0LzgCQYWTXMzW+gLYKS3OibCHTIwK4YRGoYhUkAodsFhyXXdxAEcZgqSsLOypzA51UhXSbVmRgN3M8vohKJvDo/vYVMwC6aVXDtu0IA2AbFNlOjsdTMZLCzLHYwkJzBC7TbbvA36SGMwDCMHY5bdSj5q+imMlicNbjHWAbl4GaMNZcxSfZx5JjN8PA/RjrcZFIWIvnhYpddSLhZr55TXYtMMmuzqXJMS7JS+FshW/WeIhj85rsXZ7Adj3INigGued2B2PGaB318l/l3L4P/BDn6YQBPPPkeNhf+/EYDDX7z5PHjfEIR3w4JO9WPmMYLQpDhLPzVGyuGYDiCEdgcfQQC+FgD8CTYbSwGDjYgl6Uh1gCETs5HF+dEZO1p0RxRLw0+ZnS1IN4fYa1MXt4Zrw0Vqkdl80BFYCeO8hUHFID2P1Pz/jXHuUKlPTIYbYZ7Jg1P87nsYOWGjEc5+uRA411IROA0ipvC8lJq+MSkPNQ66awt41k5C+PQ63//7He9B5svrHF5U5xtHt72hDcUBwu79HD7e7n1x3vT0tP/Mv38f5AYFEa3sZWZ/83AQg0P061/zrNJUDtJZd7pt2sbsuMe7qLkPprPn+m8JhzeQLXfESKZD5n2w0x3fYyXvXqSsmIULnZdA/VfNltUV3St73y6tS93x8AwdyTvPFQldx1PyGhDZcTdx/e4Hnn0seVz9InCb4Pl5/4uHzr69Jr6eYqj+NWCqnarLldlgAAISXX73TH+53rJT6vYPu/+NwWOe/z/ueM8xHDDceEAQjZ1PX4hpf3yvYu9bW6VAAQUrq9oy6sGRzywnUd230FPgkAtrQdiHS2N1VMjQEpmFrR1N4ZOeC/3Yn8B7wav52rP1r9AAAAAElFTkSuQmCC",KC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAADQNJREFUeJztnXuMVNUdxxEUi0obW9BCNDH+YYymWAKNFRLDYxcUBZaXqOCL2hRkBWEp8miVhZalKKa4dLXyShQfQBugFKWRRzYIAhGQRwEBK7LgnnntY2b2NbMzp7/fvRcc1tmZuefee37nzsw3+fyjYfb3O7/f3Lnnd875nQ4dslBs4KCbgPuAUcAcYBWwHTgInAIuAAzwAwHAC1wEzgCHgZ3AOqAUmADcD3QHrqH2La82MoL9IFAMrDWCGAe4A1QDm4ykGgbcSu1/zgkGvRPQF5hhfKtbHAp2JmCiHQIWAgVAF+rxyUp5Bg7qCIP7AFBmPL6pAp6OILAGGA7cSD1urhcM4m1ACbAPaFQgwJnSCpwElgC/BDpSj6VrBIN1DXA3UAF8p0Aw7XgqbAEGANdSj6+yMgL/K2Az0KBA4Jx4KuwHxgOdqcdbGXn0wPcCtgHNCgTKaWJMn2qOAK6jHn9SMf03vjxLv/GZPBE+BvqwXKsvgMNdgClArQKBoAansctZrtQUwNHeTH8EUg+8aniAMUAn6hg5InDsBmA6UK/AYKsK/izg7KcHdbxsFTjUjekvedQD7BZOA32p42aLwJFC4FsFBtVthJn+xHTnTwLTy7fzWW6+4dsFrjVsALpSx9OUwODOwArm3KpcrrEX6EYd14zE9OXZLQoMWrZxFriLOr4pBQbeDFQqMFjZShXQizrOScX0qt5+BQYp28GdTP2p432VwKCewAEFBidXwCToRx13TUyf43+mwKDkGpeA3tTBx7f9TQoMRq5yDuhJFXyc57+pwCDkOrjTWX6dAP7oXObyeb5n2CPcWzSKs8EF5LZYBJeV5VUMmb4NO6qA42IUFPJgRQWP+Xw8HgrxlkOHuP/pZ+jtssY8WcG/g+lLl9QOCxMsL+c8FuOJipw+zb3DR5DbZgFcSRztdPDxpW+PAs4K45v4FI/5AzyZwuveJ7fPInjC6Xango8vffMUcFKcQYN547+2Jg0+KhYIcP+zz9HbaQ1cdrf/pRA+tB8QUsBBYQJTXuDxhoZ2EwDVtHMnuZ02MNXu4Hdlbi/2wLe/5ejRlMG/rJrpL9Hbaw0fcI+dCVCigFOWqH3l1YyCj4p89VU2TA3XMzvOH8CH3Mn02jO1Q8J4hgzlrVVVGScAqv6118nttgiePxhpMfgD8dDGhwo4Y4nQ6tWmgo+KB4NaoYjadot8A/zYyrcfDy1EFHBEGO/IorQvfu0pvG4duf028IJo8K9leomR2gFLNG5tf9qX9ikQiXD/M8+S+2ARLNqZ304G/2go06tL1A4Ig9O+thU/s2o+cIDcDxtYajb42IVjpwKGW6Ll8GFLwdfU2sprZs8m98UieMz+Z2YSAJsauPqkbu38P8AzPG49AUCRU6e0OgK1TxYpMZMA7n7zLyjk0a//Z0vwL6v+9WX0flkDTxv9JJPg/4K5/NRucMXfbA0+Kub1ct/jT5D7ZgGsC0zKJAEWKGCsML4nntSC5YS01UJ3/xTgrK79XgTwP38EHFXAUDEgOA0bNzoSfBRuHvE/N4neT3GwX1H7G0mZ3vzQtYWfwOQpPN7U5FgCoJo+/dTtT4HSVAng2k2ensIh2pzdaWFV0TvuMXJ/LfA5S9atDP7j9cBxBQwUombWLMtFn0xV+/Iccn8tgMfO+yRLAOxjR9l2VRjPQw/z6LmvpQQfFVy+nNxni7ycLAFKFTBMiNA770gLPgr/HrXPFjmQLAFc2bjJO2KktpdPpurfeIPcb4vEqwcOuiUx+D9XwCghGjdvkRp8VM2MmeR+28CIttM/aoNM45swUXitX1S4UQT3GFD7bgOliQkwXwGDzDG4gDfv+Uxq8FHhDz+i990eKhMTYKsCBpmi9tUFnEejUoOvrQc8Np7cd5vAGd/1HaoHaM2afQoYlDGeh4fxyPHjUoOPCr39NrnvNnMvfvt7KGCIKeqXLZNW9Lms6Pnz3DtqNLnvNjMGE6C/AoZkjLeoiMfq6qQGHzeW1P7xFXLfHWAxJsAkBQzJmPD7H8gNPgiPj7t8Aag9tmIC/EUBQzLCN3GitlNXquBFMzC1mNx3hziCCfBPBQxJD57tO3hQbvA5Lv/uoPfdOaoxAVxx6LNm5kzbNnlmKiwyZdG0LxkRTID/KmBISvBsX/TMWanBR4VWryH33WkwAVS+iFEj+Nfl0oMfq6nR6g3UvstIAD+1EanAIMT8fukJUFdWRu67rAQIUhuRioYNG6QHv+XLLy31B8A+RNhkAjeqUI9fJgmg7JWs3rHjeLyxUXoCBKZNE7MZkqZp+3+ufE6svp7XTJtOPo7uTICCQq1fj2w17RCf9uG5gbbCdwnfU0/Tj2eKBFDyJ6CmZJZ2MFOmsMQsehxcK1I1Nyf93MZPPtESmnpM20sA5V4C8bfTlpO9JhV+T6whhGfoQ7x53+ftf3AsxmvnzCUf1/YSQLkbvbA/j2y1XqjS+wYL2Fu3aFH6z6+6yD2PPEo+tskS4AS1EYlgEFo9HgkhTxB8Q4NvlovZO7KIR89mUKSKx3mwfAX5+CZLAKVKwaGVq5wPeBthWzjRhlBm7I3V1qp2qiii1GIQzp/j4bCDoU6iaJTXzCwRs/fJCaY3pWqzDHWWlrXFoKUKGKINSvOePQ5FuX01790nVvTBOf8O89NUXM4OvChYZ7CfI8psCAkUF0tf68eTxP5Jk8TsnVosvCk1cuyYKtPCrWpsCSscwiMnTtgc3vQSbQ+P0z5L9sILYd3ixdTBRxYrcSqo7k9/lr7WjwtMops8ccZg1d7W6mruo38hHNvh0oCBeA8A2bZw7+gx2o5bqcIpmeAJX+8o+6apDes3UCfAveQHQ0Jr1toymGYUOXlSuCgTXr/eNjtiwSD3/+Z5quDrB0OMBCC5CQTP9sk+2att8Z4/X8hefPGz+yxiyxdfUCVAJfnhUJwTy1ZzZaXWTsa0vTDta9nvTAsaojMHC0iPh2t9fCVLm4MXi23xritd6NjqZOvFi9rMQnIMvj8eLr1BxKDBPJLh9S12qmHTJqEqHJaJnd6WFn73XZnBxws/b2mbANJaxGjfJsnC3Tmiq32hvzvfggb3EnjHjJWVAAfJmkThWj/FJs/QypVC9vrGP87jLS1SbGzavVtWAiRtEiWlTVxolfnrW6wqev5b4U2euJtHpgKTJzsdfLz674dt4owkcLRRpOfR4dqjWKpg2ie62ud//rfSm1BoO5KdTYDkjSITpoOOtYqtL1sidTBRTbt2CS+/Nm7fLt1eTNjA7xx9CixIGnwjARxtFt2w8R9Sx7Ll2DFL27DwQmkKOXhlXT1L1SzaSALH2sVji1Upgm8RFpk8Fm8DD38gvxcB1iocvJfgY7wKMF0COHdhBG6i2LXbsfYuOJXCOn/dwkW2rLfjO4vWi0jSSiXaH1zh2L7BzC6MMJLAuStjIAnw5apucRkPlpfzYMVbPPSWIPBv8TPqly7lNb+frR/ltvnKVzyZjGsA9Utf04IjbGs7BCsqtJXJutJSp28kOV2dyZUxRgK4/tKoPD/A1KVRWXFtXJ4r4LVxP804AYwkKGQuvzgyzxWWmQp+wlPA9VfH5tGuju1uOgGMJHD95dF5BC+P1hMgO66Pz2G+YVaujzeeAncCTAFn8pgD5/1FloKfkAQlCjiUxxwbgM52JUBXptgh0jwpwW3+99gS/IQk6Mf0tWRq5/KkZ6qtwTcSAA+QzFXAuTyp2QZ0tT0BjCToDOxRwMk8yfECtzsS/IQkuMP4Q9TO5rkarNqOdjT4CUnwIBBVwOk83zNPSvATkgDfB+IKOJ5HL9l3kpwA2qli1942nkUcZE699KVPAu2lcJMCg5CrnAN6kgQ/IQm6sXyRiIJLLN0GT1nCLAQOKDAouQKuzfSnjvtVAoNuA/YrMDjZjnrBvyww7GagUoFBylYuAr2o45xSYOBNwBYFBivbOAszr7uo45uRmD47WMHydQK72At0o46rKRl1AryWXs0LKdwBfoFwXZ9mnm+HmL67WLmW9C4gDEyHL5LcCp8TYnqtYJsCg+oWTgN9qeNmq8ChG4CXmH5ClXqAVQVX9CqAHtTxckzgXG/giAKDrRq4f39MtexFHQqBo12AKcypU8juAvsyLQdupY6LdDG9elgONCgQCNng4x6XcftUpzuzn80yDp/0Av7NJHQpUwDcr489GUcA11GPvzIyEuHXwGaWnU8E/Mbjgtm4fOBTCAYHE+Fupr8Nf6dA4KyCF3NiaRz7MCbvzpVXcjH9HWEmsI+5q6KI+yVPAkuY3myjI/VYulpGWfkBoIypXVXEb/tqYDhwI/W4ZaWY3regLzAD2M5oXxyxVn8IWAgUAF2oxyfnxPTlZ9ym/iKwFjjDnFuFrGb6Hsg5TG+qmXtzdzeI6YdZ7wNGGcFaZTwtcAftKeAC03fW+A2wCldlJA9O0bA/0jqmd1CfANwPdPcMyL75+v8BTjnTYDkmUekAAAAASUVORK5CYII=",YC="/demo-waas-auth/assets/56-06b98271.png",Pr={MAINNET:1,ROPSTEN:3,RINKEBY:4,GOERLI:5,KOVAN:42,POLYGON:137,POLYGON_MUMBAI:80001,POLYGON_ZKEVM:1101,BSC:56,BSC_TESTNET:97,OPTIMISM:10,OPTIMISM_TESTNET:69,ARBITRUM:42161,ARBITRUM_GOERLI:421613,ARBITRUM_NOVA:42170,AVALANCHE:43114,AVALANCHE_TESTNET:43113,FANTOM:250,FANTOM_TESTNET:4002,GNOSIS:100,AURORA:1313161554,AURORA_TESTNET:1313161556,BASE_GOERLI:84531,HOMEVERSE_TESTNET:40875},ene={[Pr.MAINNET]:Dd,[Pr.ROPSTEN]:Dd,[Pr.GOERLI]:Dd,[Pr.KOVAN]:Dd,[Pr.OPTIMISM]:HC,[Pr.OPTIMISM_TESTNET]:HC,[Pr.POLYGON]:qC,[Pr.POLYGON_MUMBAI]:qC,[Pr.POLYGON_ZKEVM]:Xre,[Pr.ARBITRUM]:GC,[Pr.ARBITRUM_NOVA]:Zre,[Pr.ARBITRUM_GOERLI]:GC,[Pr.GNOSIS]:Jre,[Pr.BSC]:YC,[Pr.BSC_TESTNET]:YC,[Pr.FANTOM]:WC,[Pr.FANTOM_TESTNET]:WC,[Pr.AVALANCHE]:KC,[Pr.AVALANCHE_TESTNET]:KC};function tne({onNetworkChange:t}){const[e,r]=y.useState(),[n,i]=y.useState([]);return y.useEffect(()=>{Re.networkList().then(s=>{i(s),r(s[0]),t(s[0])})},[]),n.length===0?D.jsx(G,{marginY:"5",children:D.jsx(Rn,{})}):D.jsxs(G,{marginBottom:"4",children:[D.jsx(G,{marginBottom:"4",children:D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Network to use with requests:"})}),D.jsx(G,{children:D.jsx(fv,{name:"chainId",labelLocation:"top",onValueChange:s=>{const o=n==null?void 0:n.find(a=>a.name===s);o&&(r(o),t(o))},value:e==null?void 0:e.name,options:[...n.map(s=>({label:D.jsxs(G,{alignItems:"center",gap:"2",children:[D.jsx(oz,{src:ene[s.id],size:"sm"}),D.jsx(me,{children:s.name})]}),value:String(s.name)}))]})})]})}function XT(t){if(t.type===Sr.Email)return D.jsxs(me,{variant:"normal",color:"text100",children:["(",t.email,")"]});if(t.type===Sr.Guest)return D.jsx(me,{variant:"normal",color:"text100",children:"Guest account"});if(t.type===Sr.PlayFab)return D.jsxs(me,{variant:"normal",color:"text100",children:["(",t.email,")"]});switch(t.issuer){case"https://accounts.google.com":return D.jsxs(G,{gap:"2",marginTop:"2",children:[D.jsx("img",{width:24,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABq9JREFUaEPVWWtsFFUU/s6d2S1F6IJgAQWiBQooEmiRR0NLCxQpLwUBQRI0JD4wGh9RedjVEkqERKMxmuAPjBgpWECJoNViaQFTKbitFiyUh5ogiykaSym07M7MkVmt3W13Z2Z3Fg3zbzPnfOf7zjl777l3CDf4Qzc4f8RNwKW80beofl8WaTSCwalgStYk6i6YGRqaIdEFBp8EUCs7HAe7l9RciEfybAlozr6zr18SS4hpCROPIlhLCANMQA2DtjhUtahbRd1vsYqJSUDjtJF3QOFVDF5KhIRYg+t+zLjKhA9Ildf3rPj+l2ixohLAeYMTmq52WcmElQC6RBvM2J5bCGJ9krNlA5WcvmoV27KAi7nDh7AmFQMYZRU8JjumGpKUB117j5+y4m9JQOOUEblg7AAhyQqobRtGE4ge6FF29GszLFMBrWuSl7ccSH6TYK/XzYh0fM8MnyCe6Cr78YiRr6EALscsMD5VTiQ1XP5k4K3gaGnYsdfed2XWPUoF0GISwOUYAUIVGF11AF9tkrdld1QiWsHsBUEA6ANQYhRyNrkyjz1mRl7HC1sB/go3QcYRCAwPDmoogvkKBH1OGn8qZKmse2ltQ7BvU3ZqbxaOXCaaA+Y5IAokpvNjLfNtfuEFlGM9gBXh4JXjSd7gdgrsswJbFPKvvGVvvddKlvVdW/FdzQfoSQLJ7T7RkQ9bAd6HoRCoBcMZiUxbJZhxXrB2v2tf3WErxDvaXJw6crzG2icE9AOiJx9eQAU2g7HUjJCvqldV875+C3qVHjtrZmv0/o/skf1liZclZR4ttNLzHbFCWoj3YwBUnAHBYUiKcRaEsZSDmGcYO6KDfUMF7MPqa+TXGYITfGCMoxx8Hy8SdnBCBZTjGIC7TAS8Tdl4xk7QePr+K4DLcBsEfjVpnUuQMYiyEJdZPh5C2gWUYwmAj0xAN1MOHrETOG0tD5eg3GYHAyTXH8mnwOIRLOA1IDAmGz1zKQe77ARPW6dsJMbjdjDAvNbjdrwSKqACO8GYZwjcAhfNQJOd4PERoBV53E69Y0IqcABAZkRyjEaajJ52yOu+8RGAgx63nBUqoAzVEBgdkSChjrJNVigL6uIk4JDHLU+ITgBQTzkYZoGjoUk8BGiMwzVuedwN20IaUFGTL+d0rMB2CMw3TJ+CHpSLi3aqEI8KgLUPPW7nw7EsowsoBzv+bwHMvK7a7cjvuIwuBqPoem9ko9e3ZJHqjPhfIg3LQWx888GY63HLgf2ofSM7gH5QYXYguXxttx58vabQCQV8s09WzgKRTmuBmzCGKid7Cuj3EAH6Dy5DLQTuNqnCO5SDp+20USTf9EL/GwA9b4jNVO1xS+ltNh2nUX2U0EeKyI8+TqvIpCmI6RQWCXh0oW+MYKoEkeFZhEHPVedLb4UXoE+kEn4yOk7+43gOEu6hLJyPRyXGreM+flYrCUgxxmOfJuT+Navp32m406GeK7AJjGVGQBpDW9o0dluV2mvF6QdKjEdwE4VDi6cPTTj3wgbH5ez7LCRjoydfXh5s11lAGQZB4MdrrRT21lknP/dixsE6v2uSfqgnxrzTi0oOWQjeyWTQ9rw80rQikOiR+OuqSueVjIxIOAxudSjykKoCCklYpGuVQgAvdwTTyc9vzCg/qrimtL9jDRA7JSgr6heW/mxFSMq2GalCoBDM80HtK2Gi1/2ds3nsmHAYxLzmO7ejoOO7SAK6gPEtqP0mOpD5PzMO1qmuSRFIthJQAqLdmqJ8fUZyebFwu6rbpr+X7mjq3XcAFJ7GpM5hFrlECLoPakcMWwmmaiSL8Z7HyW9JQGBJ3Y/hUHEYhG7BbWMlw3/bsMpMDURMYOoTnGkzjESvu8rZPDYwrAHcCCFP8KymE2ErYwTGZZisEfbMb8yoDG0bMwr233f1rjzkaM5IE4yZR9yOiNfsptfrT3yWNmtva/JOAkW8qbNPtzMCA82J3qcWH3t25h4jfFMBuvOQj++dqpHYSfjPPnA0aMyzflr0peG3AZ2bJQG64bCt02/3SbxNQPzTm9cj74AG7YAMx0MnF+45ZyWCZQE62OAv8hLoMr/IGlZFvh63EjaMDWuNBHr1FHV/t231soIUlYA2wJTi2QMF+V/6e8eO6sNFJ07MfAkkNkJWXj8zrzTkm8J1E9AGnFo0u7cqK4sIvBjAOIAkK0EZ8BP4G2baqjoTtv8yd1ejFb+ol9FoQFOKp7okSBOZxQgIpILRG+BuDKER1GaCaNAYpwTRD4mtSmXt0lL9bGH7iamFbEeNI8ANL+AvTa+pT4hOMw0AAAAASUVORK5CYII="}),D.jsxs(me,{variant:"normal",color:"text100",children:["Google (",t.email,")"]})]});case"https://appleid.apple.com":return D.jsxs(G,{gap:"2",children:[D.jsx("img",{width:24,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABMlJREFUaEPVmV1oXEUUx89/Ete6SUykWiv4QcRYymISc2fWdCPUVUQUpIqKPggaEa1Wqj7UPokg+hJfagM+iMX2QS0RjQSFIkLpQ2Oyd+7GtaTiB4rgB8ZqNKlJupvco6MbCHH33tnNzSaZ1zn3f/6/O3PnzMwFbfCGDe6f1gxgfHw8Njs7exMRXd/c3Hygra3tXDUvs+YAx48f39TU1LSPiJ4koq1F0y1Syj/XPYDWuouIjhJR2xKzc47jxAHwugZwXbcHwEdE1LzUKIBhx3F6qjFvnqnJFMpkMluFEGNLpsxSv3ullP3rGkBrbd78HctNMvNkoVC4JpVK/b5uATKZjBJCZEoZBPC44zivV2u+JlPI87x+Zn6qhMnDUsrelZivCYDW+nMium6pUWZ+U0r5KAB/IwCcIaLNxigz/yGEeNZxnMMrNb74/IpXoZGRkUvr6+vnyhUirfXbRDTDzCfi8fhgIpE4a5KPjo5uFkJcKf5rv3V2dn5fTS2oGEBrfRkRPUREdzFzJ4Dzi2/3VwAnieiDWCw21N7ePrls2sB13R11dXW7mPn2EtPqLAAN4Eh9ff27HR0df9mMkjWA2QI0NjY+T0RPA2gIEmfmcwCOEdHHzPyjECLFzPcS0dU2pojoDDPvVkq9FxZvBWAKERENCiG6wwQj7u+XUu4N0gwFGBsba1lYWBglomsjNmcr94KU8sVywYEAzCyy2eyHxTlrmzCyOGbOA9gnpTxYFYDrug8AeCcyRxUIMfNPRHS3UqpkFQ9dRgcGBupaW1tPAdheQd6oQqd939+RTCbHwwTLTqFsNnuL7/ufhAmsUv8eKeVrNtplAVzX7TPzz0YkyhhmNgWtTUpZsNEtC6C1Nvv3ThuRKGOY+RWl1HO2mkEjMAmgxVYoqjgA9ziO876tXkkAc2MwMzMzByC0Ttgmso1j5hvCVp6lWiUNFvc7ZhmreWPmLqWUmb5WrSRALpfbUigUfrFSiDiImW9VSlmvfiUBhoeHL4jFYjMRe7OSY+b9Sqk+q+CgWwnXdScAXGIrFFUcM3+qlErZ6pX9SD3PO8nM1kK2CW3ifN/vSSaTwzaxQXXggNn724isQsyp6enpZDqdngvTDgK4j4gGwgRWsf+Q4ziPhR38ywIUzwETRHTeKpoMlAZwdGpqqjdoJAILVSaTOSaEuG2tAExeZv4GwDNSSnO7978WCOB53p3/FJahtQQwuX3fn2hoaLgikUjkl3sJO5HB87wviGjbGkO8JKU0FwqVjYCJ1lqbQ/WrawgwPz8/39rd3f1DVQDFqvwVEV2+RhBvSSkfLJfbarfped7D5j6z1gDmUE9E25VS364IwNxOeJ53gohurCUEgD7HcfYH5bQaASPguu42AJ8R0aYaQXydz+c7UqnUbCQARYhHAByqAcAcM++0OdhYj8Ci6YAfFpFwMTMD6JVSHrERrBjAfA9a64MA9lgkWCCin33fjwkhtljG75ZSvmER+29IxQCLwlrrJ5j5ZQAXLUt2GoDZBA5OTU2dTqfT86Y/l8s15PP5nQDuN1fzRHThsue+NL+iKjmNrQigWOQuJiJzbX4VgO8AjHZ1deXC3l6xttxslkjz35iZc/F4fKjUViFMq+oRCBOuVf+GB/gb9M3GQJMHYpQAAAAASUVORK5CYII="}),D.jsxs(me,{variant:"normal",color:"text100",children:["Apple (",t.email,")"]})]});default:return"Unknown"}}function rne(){var Z;const t=M5(),[e,r]=y.useState(),[n,i]=y.useState(),[s,o]=y.useState(!0),[a,l]=y.useState(),[c,f]=y.useState(""),u=y.useRef(null),d=(Z=u.current)==null?void 0:Z.validity.valid,[h,p]=y.useState(!1),[m,x]=y.useState([]),[b,w]=y.useState(!0),{inProgress:A,loading:R,initiateAuth:N,sendChallengeAnswer:I}=JT({sessionName:Eo(),onSuccess:async({wallet:M})=>{console.log(`Wallet address: ${M}`)},linkAccount:!0}),F=async M=>{o(!0),i(void 0);try{await Re.removeAccount(M);const v=await Re.listAccounts();i(v.accounts)}catch(v){l(v.message);const T=await Re.listAccounts();i(T.accounts)}o(!1)},j=async M=>{const v=await Re.initAuth({idToken:M.credential});try{const T=await Re.linkAccount(v);i(S=>[...S||[],T.account])}catch(T){mh(T)&&t({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}},U="https://"+window.location.host+(window.location.host.includes("github.io")?"/demo-waas-auth":"/"),Y=async M=>{const v=await Re.initAuth({idToken:M.authorization.id_token});try{const T=await Re.linkAccount(v);i(S=>[...S||[],T.account])}catch(T){mh(T)&&t({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}},J=X5({flow:"implicit",onSuccess:M=>{window.PlayFabClientSDK.LoginWithGoogleAccount({AccessToken:M.access_token,CreateAccount:!0,TitleId:"8F854"},async(v,T)=>{if(v)try{const S=await Re.initAuth({playFabTitleId:"8F854",playFabSessionTicket:v.data.SessionTicket}),C=await Re.linkAccount(S);console.log("playfab account",JSON.stringify(C.account,null,2)),i(P=>[...P||[],C.account])}catch(S){console.error(S),mh(S)&&t({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}else T&&console.log("Error: "+JSON.stringify(T))})}});return y.useEffect(()=>{Re.listAccounts().then(M=>{i(M.accounts),M.currentAccountId&&r(M.accounts.find(v=>v.id===M.currentAccountId)),o(!1)}).catch(M=>{l(M.message),o(!1)})},[A]),D.jsxs(G,{children:[D.jsx(Lr,{background:"buttonGlass"}),D.jsxs(G,{marginBottom:"5",gap:"4",flexDirection:"column",children:[D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Your connected (linked) accounts"}),n&&D.jsx(D.Fragment,{children:n.map(M=>D.jsxs(G,{flexDirection:"row",alignItems:"center",gap:"2",children:[D.jsx(me,{variant:"normal",color:"text100",children:XT(M)}),M.id!==(e==null?void 0:e.id)&&D.jsx(kt,{size:"xs",label:"Remove",onClick:()=>F(M.id)}),M.id===(e==null?void 0:e.id)&&D.jsx(G,{children:D.jsx(me,{variant:"small",color:"text100",children:"(Account you logged in with)"})})]},M.id))}),s&&D.jsx(Rn,{})]}),D.jsx(Lr,{background:"buttonGlass"}),D.jsxs(G,{flexDirection:"column",gap:"2",width:"fit",children:[D.jsx(me,{variant:"large",color:"text100",fontWeight:"bold",marginBottom:"5",children:"Connect (link) another login method"}),D.jsx(J5,{onSuccess:j,shape:"circle",width:230}),D.jsx(Lr,{background:"buttonGlass",width:"full"}),D.jsx(e7,{authOptions:{clientId:"com.horizon.sequence.waas",scope:"openid email",redirectURI:U,usePopup:!0},onError:M=>console.error(M),onSuccess:Y,uiType:"dark"}),D.jsxs(D.Fragment,{children:[D.jsx(Lr,{background:"buttonGlass",width:"full"}),D.jsx(G,{marginTop:"2",children:D.jsx(G,{children:D.jsx(kt,{label:"Login with Google (through Playfab)",onClick:J})})})]}),D.jsx(Lr,{background:"buttonGlass",width:"full"}),D.jsxs(G,{marginTop:"2",children:[D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Email"}),D.jsx(G,{marginTop:"4",children:D.jsx(l8,{label:"Use v2 email login",disabled:!0,checked:b,onChange:()=>w(!b)})})]}),I?D.jsxs(G,{flexDirection:"column",children:[D.jsx(G,{marginTop:"3",children:D.jsx(me,{marginTop:"5",variant:"normal",color:"text80",children:"Enter code received in email."})}),D.jsx(G,{marginTop:"4",children:D.jsx(qB,{value:m,digits:6,onChange:x})}),D.jsx(G,{gap:"2",marginY:"4",children:R?D.jsx(Rn,{}):D.jsx(kt,{variant:"primary",disabled:m.includes(""),label:"Verify",onClick:()=>I(m.join("")),"data-id":"verifyButton"})})]}):D.jsxs(G,{marginBottom:"4",children:[D.jsxs(me,{variant:"normal",color:"text80",children:["Enter your email to recieve a code to login and create your wallet. ",D.jsx("br",{}),"Please check your spam folder if you don't see it in your inbox."]}),D.jsxs(G,{marginTop:"6",children:[D.jsx(Mr,{name:"email",type:"email",onChange:M=>{f(M.target.value)},ref:u,onKeyDown:M=>{c&&M.key==="Enter"&&N(c)},onBlur:()=>p(!!c&&!d),value:c,placeholder:"hello@example.com",required:!0,"data-id":"loginEmail"}),h&&D.jsx(me,{as:"p",variant:"small",color:"negative",marginY:"2",children:"Invalid email address"})]}),D.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:R?D.jsx(Rn,{}):D.jsx(kt,{variant:"primary",disabled:!d,label:"Continue",onClick:()=>N(c),"data-id":"continueButton"})})]})]}),a&&D.jsxs(me,{variant:"normal",color:"text100",fontWeight:"bold",children:["Error loading accounts: ",a]})]})}function nne(){const[t,e]=y.useState(),[r,n]=y.useState(),[i,s]=y.useState([]),[o,a]=y.useState(!1),[l,c]=y.useState(!1),[f,u]=y.useState(),[d,h]=y.useState();return y.useEffect(()=>{Re.getAddress().then(p=>{e(p)}).catch(p=>{n(p.message)}),Re.listAccounts().then(p=>{p.currentAccountId&&h(p.accounts.find(m=>m.id===p.currentAccountId))})},[]),y.useEffect(()=>{Re.isSignedIn().then(p=>{p||Ii.navigate("/login")})},[]),y.useEffect(()=>{const p=i.join("");p.length===6&&(c(!0),Re.finishValidateSession(p))},[i]),y.useEffect(()=>{const p=Re.onValidationRequired(()=>{a(!0),Re.waitForSessionValid(6e5,4e3).then(m=>{console.log("isValid",m),s([]),a(!1),c(!1)})});return()=>{p.then(m=>m())}},[]),D.jsxs(D.Fragment,{children:[D.jsx(Vg,{children:o&&D.jsx(l5,{children:D.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"1.2em",height:"50vh"},children:D.jsxs(G,{flexDirection:"column",alignItems:"center",children:[D.jsx(me,{marginBottom:"7",children:"Please enter the session verification code that was sent to your email"}),D.jsx(t7,{value:i,digits:6,onChange:s}),D.jsx(G,{marginTop:"5",children:l&&D.jsx(Rn,{})})]})})})}),D.jsxs(G,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[D.jsx(G,{marginBottom:"10",children:D.jsx(r7,{})}),D.jsxs(G,{marginBottom:"5",flexDirection:"row",children:[d&&D.jsxs(G,{flexDirection:"column",gap:"2",children:[D.jsxs(me,{marginTop:"1",variant:"normal",color:"text100",children:[d.type===Sr.Guest?"Guest account":`Logged in with account type ${d.type}`," "]}),d.type!==Sr.Guest&&XT(d)]}),D.jsx(kt,{marginLeft:"auto",label:"Log out",size:"xs",onClick:async()=>{try{await Re.dropSession({strict:!1})}catch(p){console.warn(`Could not drop session: ${p.message}`)}FV(),Ii.navigate("/login")}})]}),D.jsx(Lr,{background:"buttonGlass"}),D.jsx(G,{marginBottom:"5",children:D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Your wallet address:"})}),D.jsx(G,{marginBottom:"5",children:D.jsx(me,{variant:"normal",color:"text100",fontWeight:"normal",children:t?D.jsx(G,{children:D.jsx(me,{children:t})}):D.jsx(Rn,{})})}),D.jsx(G,{children:r&&D.jsxs(me,{children:["Error fetching wallet address: ",r]})}),D.jsx(Lr,{background:"buttonGlass"}),D.jsx(Vre,{}),D.jsx(Lr,{background:"buttonGlass"}),D.jsx(G,{marginBottom:"5",children:D.jsx(tne,{onNetworkChange:u})}),D.jsx(Lr,{background:"buttonGlass"}),D.jsxs(ol,{marginY:"3",label:"Send native token transaction",children:[D.jsx(Lr,{background:"buttonGlass"}),D.jsx(zre,{network:f})]}),D.jsxs(ol,{marginY:"3",label:"Send ERC20 transaction",children:[D.jsx(Lr,{background:"buttonGlass"}),D.jsx(Wre,{network:f})]}),D.jsxs(ol,{marginY:"3",label:"Send ERC1155 transaction",children:[D.jsx(Lr,{background:"buttonGlass"}),D.jsx(Yre,{network:f})]}),D.jsxs(ol,{marginY:"3",label:"Sign a message",children:[D.jsx(Lr,{background:"buttonGlass"}),D.jsx(Hre,{network:f})]}),D.jsxs(ol,{marginY:"3",label:"Call contracts",children:[D.jsx(Lr,{background:"buttonGlass"}),D.jsx(qre,{network:f})]}),D.jsxs(ol,{marginY:"3",label:"EOA Link",children:[D.jsx(Lr,{background:"buttonGlass"}),D.jsx(Qre,{network:f,walletAddress:t})]}),D.jsx(rne,{})]})]})}function ine(t,e,r){return e=rP(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gm(t,e){return ane(t)||one(t,e)||ZT(t,e)||sne()}function sne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function one(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,s,o,a=[],l=!0,c=!1;try{if(s=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=s.call(r)).done)&&(a.push(n.value),a.length!==e);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function ane(t){if(Array.isArray(t))return t}function lne(t){return une(t)||fne(t)||ZT(t)||cne()}function cne(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZT(t,e){if(t){if(typeof t=="string")return xm(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xm(t,e)}}function fne(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function une(t){if(Array.isArray(t))return xm(t)}function xm(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--L){var E=this.tryEntries[L],g=E.completion;if(E.tryLoc==="root")return O("end");if(E.tryLoc<=this.prev){var _=n.call(E,"catchLoc"),B=n.call(E,"finallyLoc");if(_&&B){if(this.prev=0;--O){var L=this.tryEntries[O];if(L.tryLoc<=this.prev&&n.call(L,"finallyLoc")&&this.prev=0;--P){var O=this.tryEntries[P];if(O.finallyLoc===C)return this.complete(O.completion,O.afterLoc),M(O),x}},catch:function(C){for(var P=this.tryEntries.length-1;P>=0;--P){var O=this.tryEntries[P];if(O.tryLoc===C){var L=O.completion;if(L.type==="throw"){var E=L.arg;M(O)}return E}}throw new Error("illegal catch attempt")},delegateYield:function(C,P,O){return this.delegate={iterator:T(C),resultName:P,nextLoc:O},this.method==="next"&&(this.arg=t),x}},e}function Li(t){"@babel/helpers - typeof";return Li=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Li(t)}function Zn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function QC(t,e){for(var r=0;ry.useContext(Wb).isMounted,Mre=()=>(S0(KT(),WT("useStytchSession")),y.useContext(GT)),Nre=()=>{const t=y.useContext(Wb);return S0(t.isMounted,WT("useStytch")),t.client},Dre=({stytch:t,children:e})=>{S0(!KT(),Pre),S0(typeof window<"u",Rre);const r=y.useMemo(()=>({client:t,isMounted:!0}),[t]),[{user:n,session:i},s]=Tre({session:t.session.getInfo(),user:t.user.getInfo()});return y.useEffect(()=>t.onStateChange(()=>{s(o=>{const a={session:t.session.getInfo(),user:t.user.getInfo()};return kre(o,a)})}),[s,t]),pr.createElement(Wb.Provider,{value:r},pr.createElement(Ore.Provider,{value:n},pr.createElement(GT.Provider,{value:i},e)))};function C0(){return C0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),$t({},n,i)).then(s=>Kt(s).then(o=>({status:o.status})),s=>{throw Lt.new({cause:`fetch(): ${s.message||""}`})}),this.version=(n,i)=>this.fetch(this.url("Version"),$t({},n,i)).then(s=>Kt(s).then(o=>({version:o.version})),s=>{throw Lt.new({cause:`fetch(): ${s.message||""}`})}),this.runtimeStatus=(n,i)=>this.fetch(this.url("RuntimeStatus"),$t({},n,i)).then(s=>Kt(s).then(o=>({status:o.status})),s=>{throw Lt.new({cause:`fetch(): ${s.message||""}`})}),this.getChainID=(n,i)=>this.fetch(this.url("GetChainID"),$t({},n,i)).then(s=>Kt(s).then(o=>({chainID:o.chainID})),s=>{throw Lt.new({cause:`fetch(): ${s.message||""}`})}),this.getEtherBalance=(n,i,s)=>this.fetch(this.url("GetEtherBalance"),$t(n,i,s)).then(o=>Kt(o).then(a=>({balance:a.balance})),o=>{throw Lt.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenBalances=(n,i,s)=>this.fetch(this.url("GetTokenBalances"),$t(n,i,s)).then(o=>Kt(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw Lt.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenSupplies=(n,i,s)=>this.fetch(this.url("GetTokenSupplies"),$t(n,i,s)).then(o=>Kt(o).then(a=>({page:a.page,contractType:a.contractType,tokenIDs:a.tokenIDs})),o=>{throw Lt.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenSuppliesMap=(n,i,s)=>this.fetch(this.url("GetTokenSuppliesMap"),$t(n,i,s)).then(o=>Kt(o).then(a=>({supplies:a.supplies})),o=>{throw Lt.new({cause:`fetch(): ${o.message||""}`})}),this.getBalanceUpdates=(n,i,s)=>this.fetch(this.url("GetBalanceUpdates"),$t(n,i,s)).then(o=>Kt(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw Lt.new({cause:`fetch(): ${o.message||""}`})}),this.getTransactionHistory=(n,i,s)=>this.fetch(this.url("GetTransactionHistory"),$t(n,i,s)).then(o=>Kt(o).then(a=>({page:a.page,transactions:a.transactions})),o=>{throw Lt.new({cause:`fetch(): ${o.message||""}`})}),this.syncBalance=(n,i,s)=>this.fetch(this.url("SyncBalance"),$t(n,i,s)).then(o=>Kt(o).then(a=>({})),o=>{throw Lt.new({cause:`fetch(): ${o.message||""}`})}),this.fetchTransactionReceipt=(n,i,s)=>this.fetch(this.url("FetchTransactionReceipt"),$t(n,i,s)).then(o=>Kt(o).then(a=>({receipt:a.receipt})),o=>{throw Lt.new({cause:`fetch(): ${o.message||""}`})}),this.getOrderbookOrders=(n,i,s)=>this.fetch(this.url("GetOrderbookOrders"),$t(n,i,s)).then(o=>Kt(o).then(a=>({page:a.page,orders:a.orders})),o=>{throw Lt.new({cause:`fetch(): ${o.message||""}`})}),this.getTopOrders=(n,i,s)=>this.fetch(this.url("GetTopOrders"),$t(n,i,s)).then(o=>Kt(o).then(a=>({orders:a.orders})),o=>{throw Lt.new({cause:`fetch(): ${o.message||""}`})}),this.fetchTransactionReceiptWithFilter=(n,i,s)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),$t(n,i,s)).then(o=>Kt(o).then(a=>({receipt:a.receipt})),o=>{throw Lt.new({cause:`fetch(): ${o.message||""}`})}),this.getAllWebhookListeners=(n,i,s)=>this.fetch(this.url("GetAllWebhookListeners"),$t(n,i,s)).then(o=>Kt(o).then(a=>({listeners:a.listeners})),o=>{throw Lt.new({cause:`fetch(): ${o.message||""}`})}),this.getWebhookListener=(n,i,s)=>this.fetch(this.url("GetWebhookListener"),$t(n,i,s)).then(o=>Kt(o).then(a=>({listener:a.listener})),o=>{throw Lt.new({cause:`fetch(): ${o.message||""}`})}),this.addWebhookListener=(n,i,s)=>this.fetch(this.url("AddWebhookListener"),$t(n,i,s)).then(o=>Kt(o).then(a=>({status:a.status,listener:a.listener})),o=>{throw Lt.new({cause:`fetch(): ${o.message||""}`})}),this.updateWebhookListener=(n,i,s)=>this.fetch(this.url("UpdateWebhookListener"),$t(n,i,s)).then(o=>Kt(o).then(a=>({status:a.status})),o=>{throw Lt.new({cause:`fetch(): ${o.message||""}`})}),this.removeWebhookListener=(n,i,s)=>this.fetch(this.url("RemoveWebhookListener"),$t(n,i,s)).then(o=>Kt(o).then(a=>({status:a.status})),o=>{throw Lt.new({cause:`fetch(): ${o.message||""}`})}),this.toggleWebhookListener=(n,i,s)=>this.fetch(this.url("ToggleWebhookListener"),$t(n,i,s)).then(o=>Kt(o).then(a=>({webhookListener:a.webhookListener})),o=>{throw Lt.new({cause:`fetch(): ${o.message||""}`})}),this.pauseAllWebhookListeners=(n,i,s)=>this.fetch(this.url("PauseAllWebhookListeners"),$t(n,i,s)).then(o=>Kt(o).then(a=>({status:a.status})),o=>{throw Lt.new({cause:`fetch(): ${o.message||""}`})}),this.resumeAllWebhookListeners=(n,i,s)=>this.fetch(this.url("ResumeAllWebhookListeners"),$t(n,i,s)).then(o=>Kt(o).then(a=>({status:a.status})),o=>{throw Lt.new({cause:`fetch(): ${o.message||""}`})}),this.subscribeReceipts=(n,i)=>{const s=()=>this.fetch(this.url("SubscribeReceipts"),$t(n,i.headers,i.signal)).then(async function(o){await vp(o,i,s)},o=>{i.onError(o,s)});return s()},this.subscribeEvents=(n,i)=>{const s=()=>this.fetch(this.url("SubscribeEvents"),$t(n,i.headers,i.signal)).then(async function(o){await vp(o,i,s)},o=>{i.onError(o,s)});return s()},this.subscribeBalanceUpdates=(n,i)=>{const s=()=>this.fetch(this.url("SubscribeBalanceUpdates"),$t(n,i.headers,i.signal)).then(async function(o){await vp(o,i,s)},o=>{i.onError(o,s)});return s()},this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const vp=async(t,e,r)=>{const{onMessage:n,onOpen:i,onClose:s,onError:o}=e;if(!t.ok){try{await Kt(t)}catch(h){o(h,r)}return}if(!t.body){o(pc.new({status:t.status,cause:"Invalid response, missing body"}),r);return}i&&i();const a=t.body.getReader(),l=new TextDecoder;let c="",f=Date.now();const u=(10+1)*1e3;let d;try{for(d=setInterval(()=>{if(Date.now()-f>u)throw Ql.new({cause:"Stream timed out"})},u);;){let h,p;try{({value:h,done:p}=await a.read()),f=Date.now(),c+=l.decode(h,{stream:!0})}catch(x){let b="";x instanceof Error&&(b=x.message),x instanceof DOMException&&x.name==="AbortError"?o(Lt.new({message:"AbortError",cause:`AbortError: ${b}`}),()=>{throw new Error("Abort signal cannot be used to reconnect")}):o(Ql.new({cause:`reader.read(): ${b}`}),r);return}let m=c.split(` +`);for(let x=0;x({method:"POST",headers:C0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),Kt=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let i="";throw n instanceof Error&&(i=n.message),pc.new({status:t.status,cause:`JSON.parse(): ${i}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(YT[n]||yt).new(r)}return r});class yt extends Error{constructor(e,r,n,i,s){super(n),this.name=void 0,this.code=void 0,this.message=void 0,this.status=void 0,this.cause=void 0,this.msg=void 0,this.name=e||"WebrpcError",this.code=typeof r=="number"?r:0,this.message=n||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof i=="number"?i:0,this.cause=s,Object.setPrototypeOf(this,yt.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}}class Gb extends yt{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Gb.prototype)}}class Lt extends yt{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Lt.prototype)}}class Kb extends yt{constructor(e="WebrpcBadRoute",r=-2,n="bad route",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Kb.prototype)}}class Yb extends yt{constructor(e="WebrpcBadMethod",r=-3,n="bad method",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Yb.prototype)}}class Qb extends yt{constructor(e="WebrpcBadRequest",r=-4,n="bad request",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Qb.prototype)}}class pc extends yt{constructor(e="WebrpcBadResponse",r=-5,n="bad response",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,pc.prototype)}}class Jb extends yt{constructor(e="WebrpcServerPanic",r=-6,n="server panic",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Jb.prototype)}}class Xb extends yt{constructor(e="WebrpcInternalError",r=-7,n="internal error",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Xb.prototype)}}class Zb extends yt{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Zb.prototype)}}class Ql extends yt{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Ql.prototype)}}class ew extends yt{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,ew.prototype)}}class tw extends yt{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,tw.prototype)}}class rw extends yt{constructor(e="PermissionDenied",r=1001,n="Permission denied",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,rw.prototype)}}class nw extends yt{constructor(e="SessionExpired",r=1002,n="Session expired",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,nw.prototype)}}class iw extends yt{constructor(e="MethodNotFound",r=1003,n="Method not found",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,iw.prototype)}}class sw extends yt{constructor(e="RequestConflict",r=1004,n="Conflict with target resource",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,sw.prototype)}}class ow extends yt{constructor(e="Aborted",r=1005,n="Request aborted",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,ow.prototype)}}class aw extends yt{constructor(e="Timeout",r=2e3,n="Request timed out",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,aw.prototype)}}class lw extends yt{constructor(e="InvalidArgument",r=2001,n="Invalid argument",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,lw.prototype)}}class cw extends yt{constructor(e="Unavailable",r=2002,n="Unavailable resource",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,cw.prototype)}}class fw extends yt{constructor(e="QueryFailed",r=2003,n="Query failed",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,fw.prototype)}}class uw extends yt{constructor(e="ResourceExhausted",r=2004,n="Resource exhausted",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,uw.prototype)}}class dw extends yt{constructor(e="NotFound",r=3e3,n="Resource not found",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,dw.prototype)}}class hw extends yt{constructor(e="ProjectNotFound",r=3002,n="Project not found",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,hw.prototype)}}class vw extends yt{constructor(e="MetadataCallFailed",r=3003,n="Metadata service call failed",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,vw.prototype)}}const YT={0:Gb,[-1]:Lt,[-2]:Kb,[-3]:Yb,[-4]:Qb,[-5]:pc,[-6]:Jb,[-7]:Xb,[-8]:Zb,[-9]:Ql,[-10]:ew,1e3:tw,1001:rw,1002:nw,1003:iw,1004:sw,1005:ow,2e3:aw,2001:lw,2002:cw,2003:fw,2004:uw,3e3:dw,3002:hw,3003:vw},zC=typeof global=="object"?global.fetch:window.fetch;class QT extends Lre{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,zC),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(i,s)=>{const o={},a=this.jwtAuth,l=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),l&&l.length>0&&(o["X-Access-Key"]=l),s.headers=C0({},s.headers,o),zC(i,s)},this.fetch=this._fetch}}const VC=[..."🐶🐱🐭🐹🐰🦊🐻🐼🐨🐯🦁🐮🐷🐽🐸🐵🙈🙉🙊🐒🐔🐧🐦🐤🐣🐥🦆🦅🦉🦇🐺🐗🐴🦄🐝🐛🦋🐌🐞🐜🦟🦗🕷🕸🦂🐢🐍🦎🦖🦕🐙🦑🦐🦞🦀🐡🐠🐟🐬🐳🐋🦈🐊🐅🐆🦓🦍🦧🐘🦛🦏🐪🐫🦒🦘🐃🐂🐄🐎🐖🐏🐑🦙🐐🦌🐕🐩🦮🐈🐓🦃🦚🦜🦢🦩🕊🐇🦝🦨🦡🦦🦥🐁🐀🐿🦔🐾🐉🐲🌵🎄🌲🌳🌴🌱🌿🍀🎍🎋🍃👣🍂🍁🍄🐚🌾💐🌷🌹🥀🌺🌸🌼🌻🌞🌝🍏🍎🍐🍊🍋🍌🍉🍇🍓🍈🥭🍍🥥🥝🍅🥑🥦🥬🥒🌶🌽🥕🧄🧅🥔🍠🥐🥯🍞🥖🥨🧀🥚🍳🧈🥞🧇🥓🥩🍗🍖🦴🌭🍔🍟🍕🥪🥙🧆🌮🌯🥗🥘🥫🍝🍜🍲🍛🍣🍱🥟🦪🍤🍙🍚🍘🍥🥠🥮🍢🍡🍧🍨🍦🥧🧁🍰🎂🍮🍭🍬🍫🍿🍩🍪🌰🥜👀👂👃👄👅👆👇👈👉👊👋👌👍👎👏👐👑👒👓🎯🎰🎱🎲🎳👾👯👺👻👽🏂🏃🏄"];function Ao(){const e=Zy.en,r=VC[Math.floor(Math.random()*VC.length)],n=e.getWord(Math.floor(Math.random()*2048)),i=e.getWord(Math.floor(Math.random()*2048));return`${r} ${n} ${i}`}function jre(){const t=Nre(),{session:e}=Mre(),[r,n]=y.useState(""),i=y.useRef(null);y.useEffect(()=>{const o=new URLSearchParams(window.location.search);o.get("stytch_token_type")==="magic_links"&&(async()=>{if(e){const a=t.session.getTokens();console.log({tokens:a});const l=await Re.signIn({idToken:a.session_jwt},Ao());console.log(`Wallet address: ${l}`),Oi.navigate("/")}else await new Promise(a=>setTimeout(a,5e3)),await t.magicLinks.authenticate(o.get("token")||"",{session_duration_minutes:5})})()},[t,e]);const s=async o=>{await t.magicLinks.email.loginOrCreate(o,{})};return D.jsxs(G,{children:[D.jsx(G,{marginBottom:"4",children:D.jsx(me,{variant:"large",color:"text100",fontWeight:"bold",children:"Stytch login"})}),D.jsxs(G,{marginTop:"5",marginBottom:"4",children:[D.jsx(G,{marginTop:"6",children:D.jsx(Mr,{name:"stytchEmail",type:"email",onChange:o=>{n(o.target.value)},ref:i,onKeyDown:o=>{r&&o.key==="Enter"&&s(r)},value:r,placeholder:"hello@example.com",required:!0})}),D.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:D.jsx(Tt,{variant:"primary",label:"Continue",onClick:()=>s(r),"data-id":"continueButton"})})]})]})}function Fre({onSuccess:t}){const[e,r]=y.useState(""),[n,i]=y.useState(),[s,o]=y.useState(!1),[a,l]=y.useState("");return{inProgress:s||!!a,loading:s,error:n,initiateAuth:async u=>{o(!0);try{const{instance:d}=await Re.email.initiateAuth({email:u});l(d),r(u)}catch(d){console.error(d),i(d.message||"Unknown error")}finally{o(!1)}},sendChallengeAnswer:a?async u=>{o(!0);try{const d=await Re.getSessionHash(),h=await Re.email.finalizeAuth({instance:a,answer:u,email:e,sessionHash:d});if(!("idToken"in h))throw new Error("invalid identity returned by finalizeAuth");t(h.idToken)}catch(d){i(d.message||"Unknown error")}finally{o(!1)}}:void 0}}const mh=t=>t.name==="AccountAlreadyLinked";function JT({onSuccess:t,sessionName:e,linkAccount:r=!1}){const n=N5(),[i,s]=y.useState(),[o,a]=y.useState(!1),[l,c]=y.useState(!1),[f,u]=y.useState(),[d,h]=y.useState();return y.useEffect(()=>Re.onEmailAuthCodeRequired(async b=>{a(!1),u(()=>b)}),[Re,a,u]),{inProgress:l,initiateAuth:async b=>{a(!0),c(!0);try{if(r){const w=await Re.initAuth({email:b});h(w),a(!1)}else{const w=await Re.signIn({email:b},e);t(w)}}catch(w){s(w.message||"Unknown error")}finally{r||(a(!1),c(!1))}},loading:o,error:i,sendChallengeAnswer:l?async b=>{if(r&&d){try{await Re.linkAccount(d.withAnswer(b))}catch(w){mh(w)&&n({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}a(!1),c(!1);return}f&&await f(b)}:void 0,cancel:()=>{c(!1),a(!1),h(void 0),u(null)}}}function Bre(){var A;const[t,e]=y.useState(""),r=y.useRef(null),n=(A=r.current)==null?void 0:A.validity.valid,[i,s]=y.useState(!1),[o,a]=y.useState([]),[l,c]=y.useState(!0),[f,u]=y.useState(),[d,h]=y.useState(!1),p=y.useRef(null);Re.onEmailConflict(async(g,_)=>{p.current=_,u(g),h(!0)});const m=Z5({flow:"implicit",onSuccess:g=>{window.PlayFabClientSDK.LoginWithGoogleAccount({AccessToken:g.access_token,CreateAccount:!0,TitleId:"8F854"},async(_,B)=>{if(_)try{const k=await Re.signIn({playFabTitleId:"8F854",playFabSessionTicket:_.data.SessionTicket},Ao());console.log("Sequence response:",k),Oi.navigate("/")}catch{console.error("Error: "+JSON.stringify(B))}else B&&console.error("Error: "+JSON.stringify(B))})}}),{inProgress:x,loading:b,initiateAuth:w,sendChallengeAnswer:E,cancel:R}=JT({sessionName:Ao(),onSuccess:async({wallet:g})=>{console.log(`Wallet address: ${g}`),Oi.navigate("/")}}),{inProgress:N,loading:I,initiateAuth:F,sendChallengeAnswer:j}=Fre({onSuccess:async g=>{const _=await Re.signIn({idToken:g},Ao());console.log(`Wallet address: ${_}`),Oi.navigate("/")}}),U=l?x:N,K=l?b:I,J=l?w:F,Z=l?E:j;y.useEffect(()=>{(async()=>await Re.isSignedIn()&&Oi.navigate("/"))()},[]);const M=async g=>{const _=await Re.signIn({idToken:g.credential},Ao());console.log(`Wallet address: ${_.wallet}`),console.log(`Email address: ${_.email}`),Oi.navigate("/")},v="https://"+window.location.host+(window.location.host.includes("github.io")?"/demo-waas-auth":""),T=async g=>{const _=await Re.signIn({idToken:g.authorization.id_token},Ao());console.log(`Wallet address: ${_.wallet}`),console.log(`Email address: ${_.email}`),Oi.navigate("/")},S=async()=>{const g=await Re.signIn({guest:!0},Ao());console.log(`Wallet address: ${g.wallet}`),Oi.navigate("/")},C=new URLSearchParams(window.location.search),P=C.get("env")==="dev",[O,L]=y.useState(P);return D.jsxs(D.Fragment,{children:[D.jsxs(G,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[D.jsxs(G,{marginBottom:"16",flexDirection:"row",children:[D.jsx(n7,{}),D.jsx(G,{marginLeft:"auto",children:D.jsx(gU,{label:"Use dev env",checked:O,onCheckedChange:()=>{O?(C.delete("env"),window.location.search=C.toString()):(C.set("env","dev"),window.location.search=C.toString()),L(!O)}})})]}),D.jsx(G,{gap:"4",children:D.jsx(Tt,{label:"Guest login",onClick:S})}),D.jsx(Lr,{background:"buttonGlass"}),D.jsxs(G,{marginTop:"6",children:[D.jsx(me,{variant:"large",color:"text100",fontWeight:"bold",children:"Email Login"}),D.jsx(G,{marginTop:"4",children:D.jsx(c8,{label:"Use v2 email login",checked:l,onCheckedChange:()=>{c(!l)}})})]}),Z?D.jsxs(G,{flexDirection:"column",children:[D.jsx(G,{marginTop:"6",children:D.jsx(me,{marginTop:"5",variant:"normal",color:"text80",children:"Enter code received in email."})}),D.jsx(G,{marginTop:"4",children:D.jsx(r7,{value:o,digits:6,onChange:a})}),D.jsx(G,{gap:"2",marginY:"4",children:K?D.jsx(Rn,{}):D.jsx(Tt,{variant:"primary",disabled:o.includes(""),label:"Verify",onClick:()=>Z(o.join("")),"data-id":"verifyButton"})})]}):D.jsxs(G,{marginTop:"5",marginBottom:"4",children:[D.jsxs(me,{variant:"normal",color:"text80",children:["Enter your email to recieve a code to login and create your wallet. ",D.jsx("br",{}),"Please check your spam folder if you don't see it in your inbox."]}),D.jsxs(G,{marginTop:"6",children:[D.jsx(Mr,{name:"email",type:"email",onChange:g=>{e(g.target.value)},ref:r,onKeyDown:g=>{t&&g.key==="Enter"&&J(t)},onBlur:()=>s(!!t&&!n),value:t,placeholder:"hello@example.com",required:!0,"data-id":"loginEmail"}),i&&D.jsx(me,{as:"p",variant:"small",color:"negative",marginY:"2",children:"Invalid email address"})]}),D.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:K?D.jsx(Rn,{}):D.jsx(Tt,{variant:"primary",disabled:!n,label:"Continue",onClick:()=>J(t),"data-id":"continueButton"})})]}),D.jsx(Lr,{background:"buttonGlass"}),D.jsx(G,{paddingY:"4",gap:"4",flexDirection:"column",width:"full",children:!U&&D.jsxs(D.Fragment,{children:[D.jsx(G,{marginBottom:"2",children:D.jsx(me,{variant:"large",color:"text100",fontWeight:"bold",children:"Social Login"})}),D.jsxs(G,{gap:"4",flexDirection:"column",width:"fit",children:[D.jsx(G,{children:D.jsx(X5,{onSuccess:M,shape:"circle",width:230},"google")}),D.jsx(t7,{authOptions:{clientId:"com.horizon.sequence.waas",scope:"openid email",redirectURI:v,usePopup:!0},onError:g=>console.error(g),onSuccess:T,uiType:"dark"},"apple")]}),D.jsx(Lr,{background:"buttonGlass",width:"full"}),D.jsxs(G,{children:[D.jsx(G,{marginBottom:"4",children:D.jsx(me,{variant:"large",color:"text100",fontWeight:"bold",children:"Playfab login"})}),D.jsx(G,{children:D.jsx(Tt,{label:"Login with Google (through Playfab)",onClick:m})})]}),{}.VITE_STYTCH_PUBLIC_TOKEN&&D.jsx(jre,{})]})})]}),d&&f&&D.jsx(c5,{size:"small",onClose:()=>h(!1),children:D.jsx(Are,{info:f,onCancel:()=>{h(!1),u(void 0),U&&(a([]),R(),e(""))},onConfirm:async()=>{var g;h(!1),u(void 0),await((g=p.current)==null?void 0:g.call(p))}})})]})}async function Mv({transactions:t,network:e}){const r=await Re.feeOptions({transactions:t,network:e==null?void 0:e.id});return r.data.feeQuote&&r.data.feeOptions?{feeQuote:r.data.feeQuote,feeOptions:r.data.feeOptions,isSponsored:!1}:{feeQuote:r.data.feeQuote,feeOptions:r.data.feeOptions,isSponsored:!0}}function Nv(t){var s;const{feeOptions:e,onSelected:r}=t,[n,i]=y.useState();return y.useEffect(()=>{e&&e.length>0&&(i(e[0]),r(e[0]))},[e]),y.useEffect(()=>{n&&r(n)},[n]),e?D.jsxs(G,{marginTop:"5",children:[D.jsx(me,{variant:"normal",fontWeight:"bold",children:"Fee options:"}),D.jsx(G,{marginTop:"3"}),D.jsx(uv,{name:"chainId",labelLocation:"top",onValueChange:o=>{const a=e.find(l=>l.token.name===o);a&&i(a)},value:(s=n==null?void 0:n.token)==null?void 0:s.name,options:[...e.map(o=>{var a,l,c;return{label:D.jsx(G,{alignItems:"center",gap:"2",children:D.jsxs(me,{children:[(a=o==null?void 0:o.token)==null?void 0:a.name," ",Dx(o==null?void 0:o.value,(l=o==null?void 0:o.token)==null?void 0:l.decimals)]})}),value:String((c=o==null?void 0:o.token)==null?void 0:c.name)}})]})]}):D.jsx(G,{})}const $re="3XwfKaFvrgRIZ6om79SxYoTAAAAAAAAAA";function Ure(t){const[e,r]=y.useState(),[n,i]=y.useState("ETH"),[s,o]=y.useState(""),[a,l]=y.useState(""),[c,f]=y.useState(""),[u,d]=y.useState(),[h,p]=y.useState(!1),[m,x]=y.useState(),[b,w]=y.useState(),[E,R]=y.useState(),[N,I]=y.useState(),[F,j]=y.useState(!1);y.useEffect(()=>{U()},[]),y.useEffect(()=>{var Z,M;if(t.network){const v=KS(t.network.name);if(v){const T=v.name in{polygon:1,mumbai:1}?"MATIC":"ETH";i(T),U(),(Z=v.blockExplorer)!=null&&Z.rootUrl&&o((M=v.blockExplorer)==null?void 0:M.rootUrl)}}},[t.network]);const U=async()=>{if(!t.network)return;const Z=KS(t.network.name);if(!Z)return;const M=await Re.getAddress(),T=await new QT(N9(Z.name),$re).getEtherBalance({accountAddress:M});r(ce.from(T.balance.balanceWei))},K=async(Z,M)=>{const v=await Mv({transactions:[{to:Z,value:GS(M)}],network:t.network});if(v.feeQuote&&v.feeOptions){w(v.feeOptions),I(v.feeQuote),console.log("feeOptions",v);return}j(!0),console.log("tx sponsored")},J=async(Z,M)=>{var v;try{x(void 0),p(!0);const T=await Re.sendTransaction({transactions:[{to:Z,value:GS(M)}],network:(v=t.network)==null?void 0:v.id,transactionsFeeOption:E,transactionsFeeQuote:N});Wu(T)?d(T.data.txHash):x(T.data.error),p(!1)}catch(T){console.error(T),p(!1)}finally{I(void 0),w(void 0),R(void 0),j(!1)}};return D.jsxs(G,{children:[D.jsxs(me,{variant:"normal",color:"text100",fontWeight:"bold",children:["Native token balance: ",nY(e||0)," ",n]}),D.jsx(Tt,{marginLeft:"2",size:"xs",label:"Fetch",onClick:U}),D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{name:"sendNativeTokenTo",type:"text",onChange:Z=>{l(Z.target.value)},value:a,placeholder:"To address 0x...",required:!0,"data-id":"nativeTokenSendAddress"})}),D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{name:"sendNativeTokenAmount",type:"text",onChange:Z=>{f(Z.target.value)},value:c,placeholder:"Amount",required:!0,"data-id":"nativeTokenSendAmount"})}),m&&D.jsxs(G,{marginTop:"3",children:["Transaction failed: ",m]}),D.jsx(Nv,{feeOptions:b,onSelected:R}),F&&D.jsx(G,{marginTop:"5",children:D.jsx(me,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),h?D.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:D.jsx(Rn,{})}):D.jsxs(G,{children:[D.jsx(Tt,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:a===""&&c==="",onClick:()=>K(a,c)}),D.jsx(Tt,{marginTop:"5",label:"Send native token",disabled:a===""&&c==="",onClick:()=>J(a,c)})]}),u&&D.jsxs(G,{marginTop:"3",children:[D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Send native token transaction hash:"}),D.jsx("br",{}),D.jsx("a",{href:`${s}tx/${u}`,target:"_blank",rel:"noopener noreferrer",children:u})]})]})}function zre(){const[t,e]=y.useState(),[r,n]=y.useState(),[i,s]=y.useState(!0),[o,a]=y.useState(),l=async c=>{s(!0),e(void 0);try{await Re.dropSession({sessionId:c}),e(await Re.listSessions())}catch(f){a(f.message),e(await Re.listSessions())}s(!1)};return y.useEffect(()=>{Promise.all([Re.listSessions(),Re.getSessionId()]).then(([c,f])=>{e(c),n(f),s(!1)}).catch(c=>{a(c.message),s(!1)})},[]),D.jsxs(G,{children:[D.jsxs(G,{marginBottom:"5",children:[D.jsx(G,{marginBottom:"5",children:D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Your open sessions:"})}),t&&D.jsx(D.Fragment,{children:t.map(c=>D.jsx(G,{children:D.jsxs(me,{variant:"normal",color:"text100",fontWeight:"normal",children:[c.friendlyName,!c.isThis&&D.jsx("a",{style:{marginLeft:"7px",textDecoration:"underline",cursor:"pointer"},onClick:()=>l(c.id),children:"x"}),c.isThis&&D.jsx(D.Fragment,{children:" (current)"})]})},c.id))}),i&&D.jsx(Rn,{})]}),o&&D.jsxs(me,{variant:"normal",color:"text100",fontWeight:"bold",children:["Error loading sessions: ",o]})]})}function Vre(t){const[e,r]=y.useState(""),[n,i]=y.useState(),s=async()=>{var a;const o=await Re.signMessage({message:e,network:(a=t.network)==null?void 0:a.id});i(o.data.signature)};return D.jsxs(G,{children:[D.jsx(Mr,{name:"signMessageText",type:"text",onChange:o=>{r(o.target.value),n!=""&&i("")},value:e,placeholder:"Enter a message to sign",required:!0,"data-id":"signMessageInput"}),D.jsx(Tt,{marginTop:"5",label:"Sign message",disabled:e==="",onClick:()=>s()}),n&&n!==""&&D.jsxs(G,{flexDirection:"column",marginTop:"5",children:[D.jsxs(me,{variant:"normal",color:"text100",fontWeight:"bold",children:["Signature for ",e,":"]}),D.jsx(G,{children:D.jsx(me,{as:"p",wordBreak:"break-word",children:n})})]})]})}function qre(t){const[e,r]=y.useState(""),[n,i]=y.useState(""),[s,o]=y.useState(""),[a,l]=y.useState(""),[c,f]=y.useState(),[u,d]=y.useState(!1),[h,p]=y.useState(),[m,x]=y.useState(),[b,w]=y.useState(),[E,R]=y.useState(),[N,I]=y.useState(!1),F=async()=>{const U=await Mv({transactions:[bT({to:e,abi:n,func:s,args:JSON.parse(a),value:"0"})],network:t.network});if(U.feeQuote&&U.feeOptions){x(U.feeOptions),R(U.feeQuote),console.log("feeOptions",U);return}I(!0),console.log("tx sponsored")},j=async()=>{var U;try{p(void 0),d(!0);const K=await Re.callContract({network:(U=t.network)==null?void 0:U.id,to:e,abi:n,func:s,args:JSON.parse(a),value:0,transactionsFeeOption:b,transactionsFeeQuote:E});Wu(K)?f(K.data.txHash):p(K.data.error),d(!1)}catch(K){console.error(K),d(!1)}};return D.jsxs(G,{children:[D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{name:"callContractAddress",type:"text",onChange:U=>{r(U.target.value)},value:e,placeholder:"Contract address 0x...",required:!0,"data-id":"nativeTokenSendAddress"})}),D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{name:"callContractAbi",type:"text",onChange:U=>{i(U.target.value)},value:n,placeholder:"Contract ABI or function ABI, e.g. [{...}] or [{...}, {...}] or transfer(address,uint256)",required:!0,"data-id":"nativeTokenSendAmount"})}),D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{name:"callContractMethod",type:"text",onChange:U=>{o(U.target.value)},value:s,placeholder:"Method name, e.g. transfer",required:!0,"data-id":"nativeTokenSendAmount"})}),D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{name:"callContractArgs",type:"text",onChange:U=>{l(U.target.value)},value:a,placeholder:'Method args, e.g. [0x..., 1000] or named { "to": "0x...", "amount": "1000" }',required:!0,"data-id":"nativeTokenSendAmount"})}),D.jsx(Nv,{feeOptions:m,onSelected:w}),N&&D.jsx(G,{marginTop:"5",children:D.jsx(me,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),h&&D.jsxs(G,{marginTop:"3",children:["Transaction failed: ",h]}),u?D.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:D.jsx(Rn,{})}):D.jsxs(G,{children:[D.jsx(Tt,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:e===""&&n===""&&s===""&&a==="",onClick:()=>F()}),D.jsx(Tt,{marginTop:"5",label:"Call contract",disabled:e===""&&n===""&&s===""&&a==="",onClick:()=>j()})]}),c&&D.jsxs(G,{marginTop:"3",children:[D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Send native token transaction hash:"}),D.jsx("br",{}),D.jsx("a",{href:`https://polygonscan.com/tx/${c}`,target:"_blank",rel:"noopener noreferrer",children:c})]})]})}const qC=[{label:"Custom Token",value:"Custom"},{label:"USDC Old",value:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"},{label:"USDC New",value:"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"},{label:"DAI",value:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063"}];function Hre(t){const[e,r]=y.useState(qC[0].value),[n,i]=y.useState(""),[s,o]=y.useState(!0),[a,l]=y.useState("---"),[c,f]=y.useState(""),[u,d]=y.useState(""),[h,p]=y.useState(""),[m,x]=y.useState(""),[b,w]=y.useState(!1),[E,R]=y.useState(0),[N,I]=y.useState(),[F,j]=y.useState(),[U,K]=y.useState(),[J,Z]=y.useState(!1);y.useEffect(()=>{M(n)},[n]);const M=async C=>{var L;if(!Nq(C)){l("---");return}l("...");const P=new O9(`https://nodes.sequence.app/${(L=t.network)==null?void 0:L.name}`),O=new KG(C,["function balanceOf(address) view returns (uint256)","function decimals() view returns (uint8)","function symbol() view returns (string)"],P);try{const[A,g,_]=await Promise.all([O.balanceOf(Re.getAddress()),O.decimals(),O.symbol()]);R(g),l(`${Dx(A,g)} ${_}`)}catch{l("---")}},v=async()=>{const C=await Mv({transactions:[Fb({token:n,to:c,value:pu(u,E).toString()})],network:t.network});if(C.feeQuote&&C.feeOptions){I(C.feeOptions),K(C.feeQuote),console.log("feeOptions",C);return}Z(!0),console.log("tx sponsored")},T=async()=>{var C;try{x(""),w(!0);const P=await Re.sendERC20({token:n,to:c,value:pu(u,E),network:(C=t.network)==null?void 0:C.id,transactionsFeeOption:F,transactionsFeeQuote:U});Wu(P)?p(P.data.txHash):x(P.data.error)}catch(P){console.error(P)}finally{w(!1)}},S=C=>{r(C),C==="Custom"?(i(""),o(!0)):(i(C),o(!1))};return D.jsxs(G,{children:[D.jsxs(G,{marginTop:"5",children:[D.jsx(uv,{name:"token",options:qC,value:e??"",onValueChange:C=>S(C)}),D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{type:"text",value:n,disabled:!s,onChange:C=>i(C.target.value),placeholder:"Custom ERC20 Contract Address"})})]}),D.jsxs(G,{marginTop:"3",children:[D.jsxs(me,{variant:"normal",color:"text100",children:["Token Balance: ",a]}),D.jsx(Tt,{marginLeft:"2",size:"xs",label:"Fetch",onClick:()=>M(n)})]}),D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{type:"text",value:c,onChange:C=>f(C.target.value),placeholder:"Destination Address"})}),D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{type:"text",value:u,onChange:C=>d(C.target.value),placeholder:"Amount"})}),m&&D.jsx(G,{marginTop:"3",children:D.jsxs(me,{color:"error",children:["Error: ",m]})}),D.jsx(Nv,{feeOptions:N,onSelected:j}),J&&D.jsx(G,{marginTop:"5",children:D.jsx(me,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),b?D.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:D.jsx(Rn,{})}):D.jsxs(G,{children:[D.jsx(Tt,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:n===""&&c==="",onClick:()=>v()}),D.jsx(Tt,{marginTop:"5",label:"Send Token",onClick:T})]}),h&&D.jsxs(G,{marginTop:"3",children:[D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Transaction Hash:"}),D.jsx("a",{href:`https://polygonscan.com/tx/${h}`,target:"_blank",rel:"noopener noreferrer",children:h})]})]})}const Wre="3XwfKaFvrgRIZ6om79SxYoTAAAAAAAAAA";function Gre(t){var a;const[e,r]=y.useState(""),[n,i]=y.useState("");y.useEffect(()=>{t.onChange(t.index,e,n)},[e,n]);const s={display:"flex",gap:"10px",marginBottom:"10px"},o={flex:1};return D.jsxs(G,{style:s,children:[D.jsx(G,{style:o,children:D.jsx(uv,{name:`sendERC1155TokenId${t.index}`,value:e,disabled:!t.options,onValueChange:l=>{r(l)},options:((a=t.options)==null?void 0:a.balances.map(l=>{var c;return{label:`${((c=l.tokenMetadata)==null?void 0:c.name)||"Unknown"} - ${l.balance}`,value:l.tokenID}}))||[],placeholder:"Select a token"})}),D.jsx(G,{style:o,children:D.jsx(Mr,{type:"text",value:e,onChange:l=>r(l.target.value),placeholder:"Token ID"})}),D.jsx(G,{style:o,children:D.jsx(Mr,{type:"text",value:n,onChange:l=>i(l.target.value),placeholder:"Amount"})}),D.jsx(G,{style:o,children:D.jsx(Tt,{label:"Remove",onClick:()=>t.removeTokenEntry(t.index)})})]})}function Kre(t){const[e,r]=y.useState(""),[n,i]=y.useState([]),[s,o]=y.useState(""),[a,l]=y.useState(""),[c,f]=y.useState(""),[u,d]=y.useState(!1),[h,p]=y.useState(void 0),[m,x]=y.useState(),[b,w]=y.useState(),[E,R]=y.useState(),[N,I]=y.useState(!1),F=()=>{i([...n,{tokenId:"",amount:""}])},j=async()=>{if(!e||!t.network)return;const M=t.network.name,v=new QT("https://"+M+"-indexer.sequence.app",Wre),T=e,S=await Re.getAddress(),C=!0;p(await v.getTokenBalances({contractAddress:T,accountAddress:S,includeMetadata:C}))};y.useEffect(()=>{j()},[e]);const U=(M,v)=>{const T=[...n];T[M]=v,i(T)},K=M=>{const v=[...n];v.splice(M,1),i(v)},J=async()=>{const M=await Mv({transactions:[Bb({to:s,token:e,values:n.map(v=>({id:v.tokenId,amount:pu(v.amount,0)}))})],network:t.network});if(M.feeQuote&&M.feeOptions){x(M.feeOptions),R(M.feeQuote),console.log("feeOptions",M);return}I(!0),console.log("tx sponsored")},Z=async()=>{var M;try{f(""),d(!0);const v=await Re.sendERC1155({to:s,token:e,values:n.map(T=>({id:T.tokenId,amount:pu(T.amount,0)})),network:(M=t.network)==null?void 0:M.id,transactionsFeeOption:b,transactionsFeeQuote:E});Wu(v)?l(v.data.txHash):f(v.data.error)}catch(v){console.error(v)}finally{d(!1)}};return D.jsxs(G,{children:[D.jsx(G,{marginBottom:"5",children:D.jsx(Mr,{type:"text",value:e,onChange:M=>r(M.target.value),placeholder:"Token Contract Address"})}),D.jsx(G,{marginBottom:"5",children:D.jsx(Tt,{label:"Fetch metadata",onClick:()=>j()})}),n.map((M,v)=>D.jsx(G,{marginBottom:"3",children:D.jsx(Gre,{index:v,options:h,onChange:(T,S,C)=>U(T,{tokenId:S,amount:C}),removeTokenEntry:K})},v)),D.jsx(Tt,{label:"Add Token",onClick:F}),D.jsx(G,{marginTop:"5",children:D.jsx(Mr,{type:"text",value:s,onChange:M=>o(M.target.value),placeholder:"Destination Address"})}),c&&D.jsx(G,{marginTop:"3",children:D.jsxs(me,{color:"error",children:["Error: ",c]})}),D.jsx(Nv,{feeOptions:m,onSelected:w}),N&&D.jsx(G,{marginTop:"5",children:D.jsx(me,{variant:"normal",fontWeight:"bold",children:"Fee options: Tx Sponsored!"})}),u?D.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:D.jsx(Rn,{})}):D.jsxs(G,{children:[D.jsx(Tt,{marginTop:"5",marginRight:"2",label:"Check fee options",disabled:e===""&&s===""&&n.length!==0,onClick:()=>J()}),D.jsx(Tt,{marginTop:"5",label:"Send Tokens",onClick:Z})]}),a&&D.jsxs(G,{marginTop:"3",children:[D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Transaction Hash:"}),D.jsx("a",{href:`https://polygonscan.com/tx/${a}`,target:"_blank",rel:"noopener noreferrer",children:a})]})]})}function Yre(t){var p,m;const[e,r]=y.useState(),[n,i]=y.useState(),[s,o]=y.useState(),[a,l]=y.useState(),[c,f]=y.useState(!1),[u,d]=y.useState(),h=async()=>{var x;try{d(void 0),f(!0);const w=await(await fetch("https://demo-waas-wallet-link-server.tpin.workers.dev/generateNonce",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({walletAddress:t.walletAddress})})).json();o(w.verificationUrl),l(w.nonce);const E=await Re.sessionAuthProof({nonce:w.nonce,network:(x=t.network)==null?void 0:x.name});i(E.data.sessionId),r(E.data.signature),f(!1)}catch(b){console.error(b),f(!1)}};return D.jsxs(G,{children:[u&&D.jsxs(G,{marginTop:"3",children:["Transaction failed: ",u]}),c?D.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:D.jsx(Rn,{})}):D.jsx(G,{children:D.jsx(Tt,{marginTop:"5",label:"Generate EOA Link",disabled:a!==void 0,onClick:()=>h()})}),a&&D.jsxs(G,{marginTop:"3",children:[D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Verification Link:"}),D.jsx("br",{}),D.jsxs("a",{href:`${s}?nonce=${a}&signature=${e}&sessionId=${n}&chainId=${(p=t.network)==null?void 0:p.id}`,target:"_blank",rel:"noopener noreferrer",children:[s,"?nonce=",a,"&signature=",e,"&sessionId=",n,"&chainId=",(m=t.network)==null?void 0:m.id]})]})]})}const Dd="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAADaRJREFUeJztXWlsFdcVRmpa8SNSVTVSEmWpqiZR1LT8iBQpSUPVqEJV/vUHqhBK1ffGENJsCiGEJM6bwWwGh0DYF2MIW9gxizEYsGMIYglxjAuFQkMwipHfzDyvD9vYBqb3zHvjDs+z3Fneu+c++0ifogAen3vPN+d+524zYkSeWUS69rMCURlVICmvCqI6VxCVLQTVBOcIGglaCDoJtAzAn6kEPxB8R3CIYDPBLPKccRMK479l3bZhszAhJj9FgvQ2wQ6CBoI+i+CGhaQgqed0UknKRCEW/xXr9g8509/w6Yl/pN/sG1kMNi0gq2wvkNS/RqTmkaz7Jy/NFPTDBF0Igm6HdoJ9w2QIyUiKfTY9DmMOuh3iBKujYvwp1v3InZE3aCzpvDoEQQwLxyErsO5X9EY6apKQUuGsA5YtnCcichzrfkZn6Tc+nwM/TAQri4ry86Qz6hEEhBWqBUl+lnUccm4RSfmFkBJ3txEEgTV6CMqGTNVAGhsRUjNurDseG64Lovwy6/hkzQjD7yeN3Imgo7FjQ95lg/RY34Sgc3nBFUGKP806bqEYacxUIbvz8/mKHlIpRFnHz7fB9K2QEnqsO5JvxORFpC/vYx1PT5ZW+d8y77z8QRU3ukCQmn9DHL6KoNPyDfXRIuVB1vF1NJKuRgnDJV42cV2INePcgzAc/CFMAl6DX7KuTZu3to25H1yTAOpVHoMPkFtua7Vnu7V/zlKZ++KHBMw1QXp27xqCzvCM8uouDezkuR5t9c4O5v74xNmI1HQ/o+DrdT6Xpd778xNad8/dAQJAFvhgQYK5Xz5RxWSeQOB4kqf+Uq9mmEGAPTU3tQKJvW++EJOLcxx8dSrzRvsECD+zGQQAFK/hUhCmICljcxL89MIOt3P7auttWwIcPtmlvTWHS0EI6BEk+cmsBj8t+rhd1dtX26VlmpkAgFJ+BSHgUlanjMkv2IOgkb4wbWHLgPBzIoAuCMm/Ze1vAMzLVvDHIWicb5iFnxsB9n7FsSAkIMP0C6EGP536uZzsAWQKPzcCADidITTQGOpQQB64FUGjfCNT+NEQgHNBCKXhrHCCLykvCxyrfivhR0OAPBCE/aFUBeRBpxE0xhfshB8tAXgXhFFRqQwa/EmsGxEE5/5jLfy8EIB7QRiTnw9CAG6Pay3Y0O4afBoC5IEgrBtyb/9rRc7CzysBjp7q5lsQSsqYIfX2uwk/rwQAlO3mWhB6ywIFkvoqAqd9AYRfb5+z8PNDAMCHn3MsCL1oAfIDZ1g77BcXvncXfn4JwLcglCtog/8ce2f9YdnWDk/B90oAAMwqsm6nf8R/TUMALjd6wL4+WuEXhADVZ7q1t4s5FYQx+WPH4Kfn/NuZO+oDB47TC78gBACs39vJvL0+oThuH+NV/IHwu+395fdNAMBHizgVhDHlT07pv4q5gz5w8Yc+f9EPQID9tTe1idPZt9075JVO6Z+7+/hW7uj0HfwgBAB8+gWXgrDdchjgMf37FX5hEQAE4TtzOdxObjUMkL8oZ+6YRxw84U/4hUUAwMb9HArCmCxaEYCrzZ5BhF+YBAB8soQ7QXj53uBL6hMInPKEIMIvbALwKAgLRPVh09uvTmbtkBcEFX5hEwAwnzNBGBWVV8zpfwdrh2gRhvDLBgG4E4QxuchMgH8zd4gSVSe7Qwt+mATgUBAeTtf/bXDKtweBQ64oXBKO8AOD5zTe6NOndWEHcFgk4EgQ9ujzAQVS4ncInKFCGMIP9gpcbuzVjtelAgYHQmeubNVWbu/QKo7dHGqC8HGoAP6OwBFXlO4MJvySXXe081d6tWPf3hswIEDRitYBLN7crh8VD0IC2I/Iur8oMRrG/7kIHHEECL9E+x1fgVeIYKy/dEs7ZhOsTAIYAFW/vSqpffVNXgvC8UCALQgccUTNGW/C7+5dTWuS+7WzF9wFnh0BDMwta9M27OvUffBCgk0VPAhCuRAIcJi9I/YQl7VSCz9D2HlR9m4EMDCntE0/KeRFMOIXhGopEOAce0fscfmau/DLFHZeQEsAA14EI2xSgS3qrPvQAYeAAI0IHLHEuj3Ows9O2GWTAF4F4+ebUAvCBiBACwJHBgGEX3vSWvi5CbtcEYBGMMKfvTsPrSBsAgJYfUiZOWrP9vgWdrkmgJtg3Hwgybw/bZAYgcCJQTALPz/CjhUBnASjRNrEul+tgJIA/73eF0jYsSaAlWCs/LpLe30mvu3k6AgAwiqosMNCgEzBOGMlviyAjgAwjw4ptNrjxAtmAkwneO/TBMpjZWhF4BuzVa2svJN7AsDWtUkz2PenDXQRiPr2rw8WtGi7jwZfpcs1AWJLWrQ3Z+Mb8zPQyMU9AJA6Z61u03cBYycApHuo+zGmewvUAQG+Q+AIFWBYWL6tAy0BIFtxtBcAUAkEOIrAkQHAmLlqh/NtHCCodh4JZ1gIgwCFi1u0N1y+OgJzG/CdAtb9m4ElKI+Dl1ff1OcCIJ06/Tv4+6DDQhACTF/eqq/7Fzj4CDpgU0VSW1uO8YoZeRpsCZ/F3pF7MYGk0as/9ml9/Zp2or7HcXMFpFyosf2WjX4JMPWzhGO6n5D26+jpbm3/sZsoJ4GiojIOtoSNZ+2IFaaYPuvSkbyjbTnoPJ8Ow8KXB5JZJwCke7dgwr+DpWDjd3y8GO2+gBdHEBY8jcARS6wtv3c5uEm+7TosxJa2ahXH6YcFWgKI5LluN4NMLknoRDU/f9FmvMvB0Zj6KGwLv09AvC38m/O3Bi0Hn/7XLe3dEudhATZm0gwLNASYQrLLBJd0D3P+kO7NzwYtMwFvOdhqOhuo1CFwyBJvzlG11o7B+wJu9d7VJ4gmzbB/K+GNhU0lfgkAt4A4PR8wu9R6fuLoqS7M+wAAh8wng1BvDIW1gTs2m4JhWChZ55xmYQyGt5GWAJDu3W4Gff8zKEXtNQf4zLrfXFBoPh08EYFDjjjsciSs7mKvnqrtft5ukclMAJpFm9dIRlizq0OrcdguDlkH/UxgTPnz/wkQUx9j7pALYJxtvNHvSAIoG/fXdjmm7cxFJoMANIs2sPWrymVXMAwHPHyKloj/BzIviLjG2ik3QJBg7HczOEQCoszpWcYi08xVra6LNvB77YaQTCAu+cxosLohZD0Cx1yxfh/9ETG4NvYjh/t9IU07pWogxhd7O6lPBy3dgrfky4A0mADT1b8hcIwKsCOY1mBYgAC6qXkzYLiB7dxHTtHPJyAv+e5BNKY8N4gA6fkALm4JtSsNnQxmE0t3uR/XgkWbfbXeFppgF/B7DgIUGeIRqfmngwiQHgb2InCQCgs3ttuWhk5mt8j0VnFq0cbPYdDiMvQlnxnzLYPP2zAAqPZ4aNQw8yITpPtlW9sHzeLRAg6B8pL6AZbpn8dhAABl249x59LQyWBYOHLa/3IyzPbxUPKZ8L1t+jcNA2UIHKUGrM719dN/ISTTghw4+WQpFyXfAEjtP9kx+CkCJLi7MxCOXuWaACu2cVPyDSAixh92JUA6C5xg7axXeP1UTBACQMnnpaxEgo1UwQeLSuoYBA57AiwPey0N/RKAo5JvAI7izyYLXGDttFcs+ZLuY5FBCMDpFfE1noKvZwExPg6B456Reaw8TAJsPZjkquQzEBXlFz0TgNcsAKVhPEF/myQtAaDk4/Trod7f/oEswKEWAMB2bdrSkJYA0nJ8J3tp4PvtN2WBr1k3wg9gqTcsArgdVEGMNYGCrxNASsCu4X4EjfGMi1fD+Xz86/yVfICkEJPdPxRJY1FRWYqgQZ5hPlvglwBT8B3nogKJ2dRQgg8WkRT4ohja6+Sc4FYaOhGAozt/M9HgOufv1YiY+AuChvmC1dkCNwJsO8RnyQcgsXom1OAbRh6+hnXj/ABW7OxKQysCQMn3zlwux30IfiwrwQcjaWUk+SVXWDfSD+zOFlgRwO34GVaQcf9U6Kk/09JVAdqjZE6ARRw3AuA8xk2FZCQWfySrwTeMpJkoggZ7hnHs3I4AWI9x04C8/WNyEnzDBFFdxLrRfpBZGpoJAPv/WfvnM/juGz3CNtg+RjIBl18bNx87NwiA/FZvh+DL6yLStZ/knAApEujzA/WsO8EPjNIQCLDrCLclX2XWRZ87CZofFDicJDLOFsBdxJyWfA3RIuXnTINvWERUH+eRBFAalqzjcoNHQ0SUH3CPTA6NVxJwCHzBN2yYBEM4+IbBZITAqTBEjko0Y76bwZQxryUiRqRKPWUk67h6stQ8gVrMuvN4B0zyMKvzwzDC3rECp2sHjJGMSjme3s2WCZL6JGnQJQSdygX0Vb1cLezkylK6QFnIunOxA7ZyMZ/dy6aRIeEPwnCpaIUG0je/Zx2fnFi6SpgpDGsDQG9K6OXxW29nQkx5hnTALgRBYIXNeTfW+zGSDcYQoL2vOAuoicaUUaz7HZ0NASLUBD6qNRSMjImjSWftRhCwsLBl+I33YRFRfoKQIUY6MI4giJ5A/G7SxZ3Y/BDrfuTe0nMIowmWC7hvMYuTFF9C3vYXuJ6+xWwGGUhnzxFwzC7WE3+mDQedkUVF9SESgFcESS0iwagV4FRs9oINz64gKIT79snb/kvW7R82C4tKLY8RQvyREGO8HixRXUH+e0iQYLZNH5sTFmN2IgozlKnP51SSn1kF39WDT6uR/3+JEO2RfHzD/wfDh9DPtZjXuwAAAABJRU5ErkJggg==",HC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAADYlJREFUeJztnQuUlVUVx0cGeSlqJJRWdkcQERQln4SKmUgRGqCt1BIrUMtXaTJpCWZCttQ0ExhTi0fIQ1vioPEYW/kAREdQMwVU1CyFSBLlqbz+7f8939gd5t7vfHfu980+996z1/qtNWvBd75z9t73PPbZ53wVFSUmqEy1QetUD2GoMEqYIDwkLBZWCquFjcI2AQH8e4OwRlgR/N9aYbxQLQyTcnsJbbXb5yVD0C7VSoxTJQwXJgpLhS0Zho0bll0v1KTfWSnvrki10tZDWYkoff/A4LOEdcKuBA1uY1dQh1lBnfbX1k9JCvZM7SPKHSHUCdsVDW6DdVsgjBRH3Udbb0Uvosi+wuSEu/Wk2CxMFfpp67GoRBTWQegNMwnTNmJc1AZtaq+tX2clMPwg4c8w46q20eLmXWGeMESGh7219e2McGklShkYGH6zA4ZKmq3CfGGAtL2dtv7VRBTAJVwf4T6YNbi2YVoaxiKmBToor6WkeH5nafQYmMCLtiG0WZ3WRWWqi7ZdEhdpZGuw6zORtp0OKN8VdghLYIaF1tp2SkRgInZjhfccULirrBfGUVfa9opNUJHaQ7x6sDRqVeDp2kp2nR2BrgZTd9r2K0jQKr20Gy1sckCxxQYnideJDoszdiCV50RvOvxYXwi7Ah0W1wRRKtxVWOiAAkuFRUI3bbtGEhnv2e3Pc0BppcZc6lbbvqEi41UnmP1ybWWVKvXUsbads0pg/GUOKKnUWeacE3jjl7ETBGO+7/ZbnmfU5wRSiW7g5ERfGeUKJ9tddYxfmeoCszzRVkK5w+V255Y1fqtUe5gAhXbjPYbpLTYcpGP7DFHqZuN6GsNo6+gW2TuQF50BE6fWbrSnMdxvGZy08bmlu8qBxnqyQ9sks5UcJHNwr9pv6boLbTM2kaQSmEye9Q400hMOE24GxGt8s+Rb4kDjPNFgyl08S0OY7N3r4bv+YoKrAibdFp5tDJO2vNqBRnnygxnXfQozfmWqHUzevnZjPM2Dtmv+nQYwEz+/5i9eeOBmYHN//XvDHGHSboSnMHjkLv8wMXiI0Zxj026ApzB43nJQvr9+bvb4vL7SIb9eQByAZ9nfdaDinnjgcfve+XT/pXQ5g8dQG9X4/RyorCcZ+kZxgKkOVNSTDJPCjV+Zvo2rHG7pKFd42VbHsF//SAcq6UmWEWEOUOdABT3JUpfL+LyB0+VLGD3xQBs3vdEU5qpT7cp5Wobh2RxglgMVi8Ze3YGTzgIu+Rlw4x3APdOBmbXArIeBKQ8At9wFXHwNcMwgoF23wt7VXp7v9WXg6EH5c8QA4IAv6OurKTMbG78infTh9uWMe1YBZ34PqF0AbNyMyPL2GuD2e4Dep+f/TjrPtAejvyuXbNgEPPkMcMcfgP5nA227autzHW9az1z+MdvX3Tz/7v2BiVOBd/7dPANs2w68/CpQPQ74xOHR3/vZY4GVrxfuAA2ycyfw+lvAbXcDPU4Rp1bTKW1dldn9uzn+85fynauAt96OxwC7dgHzHwcOOj7a+/t+Pb/eJh957U3g3Eull1HrDYZnOkCNurF3h93vDbcDH34Uv/IXLwU6H2mvw3d/HP+7M+X9DcDwH5nhreV1PDHTAZ5VN3gmVMj1vwa270hO+XffZ1d8zdTk3t8g//gXcPhpGnp+tsH4vKzZnfv42x8CnH1xMr/8TOG84Pgzc9djr0OBRfXJ1qFBxt2poest/L4SHaCXutEz+er5ZuYeRThBmyHLvytvAL59BXDRT4AJU4A33or2/L0zctfjkJNk7vFO+PP1L5iZ/e7cOcnUa/lr0eqx5Dlg38M09N2DDjBM3egNdDoCeOwpu8I2yrJqzK0ySz8OaHNw4zI4s2aX+tRSezlcVeQaBk79JvCRpRcacXV4ew48xjiCTeiwVV/U0PlQOkC1uuEbOOsie9f/0TaZnF1lH7+/dgGw9UO78j/VJ/vz7FXChKsDrhJsbeo9wF4H9niH9tfQ+Sg6wHh1w5MOMvbPedSurJo/Rps1c6n36hv28nqe2vRZ9iL3zQ5/7hUZfj53nL0e+/W014Gxgaq+Gnqf4E76F38p/1kXrij+6hiciVJep8OB5/5uV/5hX8r+7DLLswueiBbR697fXgfOJfbtqaH32XSAxerGJxdcaQI1YTKnLnp5+/cGXnjZrvxssXo6hS3q+Jt7o9XjvMvtdZg2W0vvi+gAK9SNT7ihY5PLR0cvj5Oq1y2rgS1bsw8np50LbN8e/iwdNko9Fjxub9cPfqql9xV0AP3PtuzXC1j6ol1R2cbrXBw3GNiwMby851/O/ix3E8OEq5Djz7DXwTaRpKyVYe8IlUAQWU0H0P9gExWw1jL+r16bX5nnXmZXPreOsz1rmzyuXBU+F+GMftL99vdTZs7R3B3cSAfYpvTy/zP0Qvv4/8Aj+ZV5s+VXTLnqF02f42zcJpyMcuL29PNNefOf9rY0CPcCTj5bU/fbKtSNT24ab1fW1TdGL6/twcCjC+1lnvKNps+ec2k048Uht96ltRH0MfoOQGPVPWlX1slnRS/zoBPMdmuYcKMp29Lrlt/FYlurzHsM+GRv9R+f/hAQJemCxurYI3qZJw6zRwGfeyn7s088HZuNc8ojfwE+7USqWHoI0L0A4liZrX9gma2/9Ep+ZV4xxm4Ebhrt/hwnY0klgFDWfwBc+6v8nDlZNtABdO//OecSu+KYlxe1PI6p9z9iL5Nj/e7P9vlK4UbeXTghZALK968FUirh3jDW0AFWqlbi57fZlcjkkKjlMT7/imVIYW7egUc3fZbbyTbhErC2Ljf3P2z2K/hLHzLCla4+F8v1Q8ETI2TdZFuu5YKZw7Yo3t+WZ392/GR7XUaM0jZanCymAzykWonJD9iVPvrWaGVxbH1wnr28sb/N/vxCSwbQ1q3mPIK+4eKilg4wQbUSzM2zCY1qK4eJIRdWm/h+mDCfoPvJTZ9nKhrz98OEiRsHqyRuJMV4OsAo1UpwfLcJjcrYfq4yeFKISSK27WTKrDnZy+BJHptwici8BX3DxUW1fkpYesyOkP3L7FmmUDPOzi1cTuK4OTRouDkStnmLvYxNssQ7MscJIc7SbcJ8P32jxckwngrqoVqJz59gn7U3CGfvTJ/iKR8mXK5Za8/by5Sxd+Sux+9n2p8//4faBoubnvz+TxtopoU3nAGgcZMSrgoYSwjLunlxRXgZDFaFDUPFB23e1o2DIQccHS0buLnGZ/p3p5Azgfw329LRtgVcfDybeTJoonqFODZzizVO4byAJ4OZbh727lPPsZc1969m40pbT/FR497h0K4nAlP/FG02HyY7ZFL5/EvAeZeZFYLtvdfcZC9T5/ROkmQcDnXpePjehwJHDTThVOb05TM3WPeeGUp4OQQPZUR9py0CyPjA6d/S10187KLN3b4ggpNDRt1urjERuv++39Qw3GhhVg1TuDnO83hYl6PyfxeTQGcEN4zsDlO2qn8J7KNydCsp1tHmxXdFDI3wmWNM2hbjAB26q2fUFCmNr4hxah7gaQmyXhLlr4krD7JfExc4waMOVNCTLAuyGj9wgBEOVNCTLCPDHKAjXLotxBM3m3kheE4HCJxgsgMV9STDlFDjBw7Q14GKepKhn9UBAidw484AT5xE+2RM4AD8aJRbkUFPIfADYHl9NKoDzKfGtCvuiYe5QvvIDhA4wSD4z8eUAvz455C8jO97gZJiPj8DnLcDBE4wEC5cIOFpLjz3OaBZxg8cgNfI+s/HFy/T5NffrtkOEDhBH7hwj5AnX3jot09Bxg8cgMkiY4SdDjTKE40dgc1a2S0czQk6Q/sQqScflkjX3yUW42c4wQDhPQca5wlnPQqZ+OV0gMpUayl4LEz3ot1IT3Zom3G0VewOkHaC1uns4VUONNSTHdqmym7JQpygMjVYXrLJgcZ6GsM1/+BEjZ92gIrUHvKi0fCrApegLa6jbRJ3gLQTVKbDxNMdaLjHMB2t8tzsKdgJzNJwoQONL3cWxb7ky8MJugrzHFBCucJt3m4qxv/YCcxw8IwDyig36ql7VeM3iIw/naRCyxxQSrmwjDrXtnsj8U5QxsZvkMAJ6h1QUqlS76zxGySYE8x1QFmlxjxnxnybSGW7gcsTfaWVClxud9W2a14iFe4izIArN48UJ4zwMeDWWduezRJGp8AQpfY3CYoT7reMFh0WR7efS4K9A24gcafKbyXb2ZHWFTfdWiq23xICs5U8DiZhQVvJrsKEG+ZcJLulqyVBUgkzi5bA9waZcKxfnNZNUskcLgk3L2CSFnU/V+MGawJdFOdEr7kCk23MlPNpKM9J4oag7dRBPNm7xSg8uAAzLMyHOcembZik4XlLHrkbKG1vq61/Z4Tn10QpQ2CiiO86YKi4WRcYnodui3tpl6SIchg74P0EpXRJRW3QJm/4fEQU1k+YguI8ps7LtiYJfbX1WPTCm61EkSOFBXD7MkvWrQ7mur2O2norSYG50ZTX2s6EGVc19xp2BXWYma5TZY4bOL0kI+lbzs1V93SIGpgvnyR5zyHLZr7DxOCdVWhXxks4F4VLK6EnzNfQqoXxMJMwRtqWwwReuAbP/Go6/2YsgoGpFTBb2bNhvqnIz+oNFXpIuW202xe3/A+tK4X9ikt4nQAAAABJRU5ErkJggg==",Qre="/demo-waas-auth/assets/100-cf3a0cbf.png",Jre="/demo-waas-auth/assets/1101-1d0b8ff9.png",WC="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",GC="/demo-waas-auth/assets/250-2aa72264.png",KC="/demo-waas-auth/assets/42161-90b816d4.png",Xre="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAAXNSR0IB2cksfwAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAkxQTFRF////AAAA74Ig8Iwx8ZA4//7974Qj74Mh///+//////78////74Mi//v4//////z5/vfx74Um//37////////////////////////////////////////8ZE774Yn8Y42/fLn////////8Isw////86FW/evc/OXR////+dGt/vPp8Igq++HK+9u/976M8pZE/ezd8Icp+dOx/vbu9KZg/vr2/OjW9a9w9Kll+ti5/e/j/vnz8pxO//r3////8Y838pZD////////////////8Iwy////851Q////+MWX+cyk+tWz+97E8ZI9////8Y0z////////////8ptM/fDk9rZ9972J+93C86Nb8ZM+9riB/OXQ+c+p/OfU/OnY8ZRB////9Kdi9a5u////9axr////////////////////////////////////9Kpn////98KS86Rd/////////vfw/////OPN////859U98GQ////////9rmB+9/G9bJ298CO+Mqg/e3f9bR686JZ8plI9a1t+dKv9bJ18ZA6/vXs8Igs+Mui/e7h/OrZ+Mmf+c6n8phI8Iov86Ve////////+MaZ////8Ikt////+tm7+c2l////++LM98OT8pdG////////+Mid9ruF855S////////////////+Mib////9rN49rd++tq997yG+ta3////98OV////////++DI////////9rV7+tW19bBy/vPq9rqD9Ktp////8ppK////////////////////////Mj9/0QAAAMR0Uk5T/wD/////////Af/+///9/////5/W9TQF4uDZ6MT/////x1L/Av///5b////////////////////////////Q///vCh77/6X/uP//////p/8SDgb/////////////////J///UP8QSyRsVr4rDZr/Wf//bwz/9/9N///8L///////////////////////////////h7H/5P9d///c////j+n////zMuxm/6D//////5v/WFv/MCz///////9U/2M11GLeOHwhNZoAAAr/SURBVHicxVv3Y1RFEJ67JCSXkII50iFwhhCKUmKQFnqJdEKQKiCdkBAIJQooIIIiRQVUekdEEATEiv0fc9+7u52Z93b3vVyJkx9yezs3872dfbvzbYFAAhJ6/vTcgtZJZVP37s/L2793atmk1gXnnj6vScQWdNf3lq2zJvUFpfSdNGvrllA6AUzbtqA8T+08LnnlC15MSw+A5gtNmid3tUTTheaUAygp/tqf96h8XXw3lQBCLwYWdMe9JQVVEV+d0geA0B8V3fUelYq/fUDwBtCRoHtLwtuSBlAyMHH3lgz8ISkAbfdnJOcfYH/x4sQBbPsyWfeWfBlJEMC0Wd3u+mrJm7U7EQD/lqfGvSX/lHQfQKfPYc+f9N3aTQA1xal0b0lxaXcALE7y5VNJ1Sb/AKYnMfboJTzdL4B1ZenwD1C2zh+A55Xp8Q9Qud0PgHVp8y8QuNvABWB6mto/KmWufuAEsDgt/Q8lvMgMoCYN7x+XqmYjgJSPP255bALQmX7/APf0AP5N6fivk71/6gBMS+H8Z5LyxRoAs3rGP8B9NYBtpvyjZUlmTOaPBMhfHi9l/pylUt83JV4/ZQ/A0InxUr81dnWXCkCbMf/6IChlPMAlLAUHq9R3yer+jQAHUbvWrq5cpABw39hq86WJiTnUfjD4qkK7sb+sfl8UR8jStVh71bkBlBjz3zHo8CZAQ38CoF+uW/04Vj8EWJMtS2/EFAruugCYh8AHaFF0gSFBKmPc6m9jBIoAfnVGQMjAGgeADqN/WCtN/J5D7Vty1aXd8JWsXC+Kn8nSCuyxGziAkHkOIhH4QrwDnzAA813qo7FyHMCR3rK0E3UulzIAf5gb4Du0eJrZt2WNU32srBolIvCqOlpPKACPBoBrrBF5BILB7x3auZ/Lqh2i+LsqAmI8LCUAImb/I7Ops/zPg1w+c6g/wqq5AAMwAu8ytc0EgEcWQCKwhtmPyUiuvkNW9BLD4Luot4qpDUQAJR4k8ENpYq1oxN9cAG4y7RxsobGiOFGWJr/E9PJKJACPNGR8L9qIhS+7APAYPMSK0WIewAi86bB7PQ6g2WP96RBaFAP/Ky7/jhisxwj8ArBTFwGAO20xABfM/mGJNJGZRe2jnCTaWQvl18tF8bYsVb/kNByJAWgy+ycREBNP7sKgW2YT9WX49RCAX/rI0kqX5fNRANM8EjHeiMQ+Su/xqP46RmAowDeoNNxlecYmG8A2s3+YLU1k5FL72TfR+BypnfOx/HKQKA6SpZcL3aa7bAALzP6HYgS+ExGYLEvLsyYzX1F5hqg+BThhioCdokMg5JGKfo8WrwAMx9Jq0h97D4irf4QK4rs5WHpPYftGqQCwxWP9+x1pYqboxu+jxRb6Rg6Jq/eTX90WpaOyNCxfZXy7ALDV7L8esx/RiFkY4XdyIIe/cZbsw2lDRKAIf/yt0nqHAOCRjB9mjUgiIOzDMYzB0Kj6UlQ4xSIwT2m9TgCYZAZAurFoxB9lKfsIsFFxtK2ds0J+sUQUz8rSqEal9XAAQuZRgERgKdDkeIlIzei88LatPhgjcAZgAqZOr6vNF7TBc3MDnGQReAtL0dEXZ94+9VaZROAIS15f0dg/AE/NAJABWI3I7QPLDewYTJHFEaL0miwNm6CxH4FzRv8No6QNi2Hw5FhIPsbAmvs5A2gY5hUBgE4wj4Or8QmXAdRiSSTH0AI0P+xTxF4ZwQDmYumizkE7tBoBkG7cwBiGSI4f9a5lHGgcTR5HZNHkuM8enYMmML6F+RgBqxFJhIX9jVZHz8dm3giEBYoIFOI7sEProQKMq3KEAVx0RiB3ZvAaOGMgebBgAD+xxtHIVPFnEM7x3kSLIjm+GLRTMRID8aqNicVgfpYzOdZIAew1+CcczGpfzvHWi/+HxWCDUfpIjISxKInkNTdDVrxmesj9hjrejU+x5DirOhgdbpfLb61+ujL68S1ncqwX02SMDCCbczxhf57130rFPmUxGGx/mJxFJ6peJxIEUMhHGaQn/YT9n+1PlwD24GwhYhCdLQQDyMIfnzX5N4VgHD6bxfFYchxLx6x0GOfLrxpji0kieX0Pf3zcCMDQCTdiI9Y7k+NY6tdbjIZnsEJM+vvEv+rCeAvZMsAIQP8a5vJGRI5nMYx4YiBSsSJsmqXRjEBEILdafjlI6wGs11A/EBEGcJwlx8J+znxineQsjXZWeoVFYLX5+fVDMWEAguN9gRb3AVyJf7ZSMcIPhlvBySh0Jsd6qdBPRoSDHWWPubCQpmZDWOPcsrrnQdFCmBzP1jmwpUk/Hc8LUif1nGHgoLgLKHdaKLrHaTFmrMLEYI7OgS3t+oSEMIABLo5HXhAxyrzBK8G5smuQTm1KxhkAoScZFsNwDBG4CHEr+muMwESjf5GS6ZJSzgAmYAQ+sGoLZ8qyNdM4l2HIuuJJjf2YHIAaTVr+rTSR3cKS4yjDwBhY6TBZiLIXz1dieaTafEzydmuJCUbgdg6d8j6JMgyebZzCGByyajF5/TDHCCCspWacAUxwcbxCXA7+DegqjrV4PgbfgW+M/m1qpiannAHw5NgWknEWGdaxapXWpXRo6TnhYKBkGHxBupavpcpZ5Jo5AjY9Vy5QkAiI1LcRU9/1cY18jMExoJsiK2jz7FTYJlJZqluiId24lnG8h1KFtEqDczVXdlHFZgaVdnuN6IWihjMAJccj/UKkYqd5DGKZ6lrllhpKl26ZjjAAi2Hg4u8x1JnAmZ+Slro3U5jElukUC5W3EMBplhw/IkqctpGtOdxVUm7poZzXLtVil5rCGUYRUSLrL8vi6bAtZ+LE+GPX4iyXiG6xmjCAqywCY6kWmR9+BDb6QWzoVG0pErmzW7dczxmAJgJ0Dc5KxfjO3iUfEZDL9YG7jg0LzgCQYWTXMzW+gLYKS3OibCHTIwK4YRGoYhUkAodsFhyXXdxAEcZgqSsLOypzA51UhXSbVmRgN3M8vohKJvDo/vYVMwC6aVXDtu0IA2AbFNlOjsdTMZLCzLHYwkJzBC7TbbvA36SGMwDCMHY5bdSj5q+imMlicNbjHWAbl4GaMNZcxSfZx5JjN8PA/RjrcZFIWIvnhYpddSLhZr55TXYtMMmuzqXJMS7JS+FshW/WeIhj85rsXZ7Adj3INigGued2B2PGaB318l/l3L4P/BDn6YQBPPPkeNhf+/EYDDX7z5PHjfEIR3w4JO9WPmMYLQpDhLPzVGyuGYDiCEdgcfQQC+FgD8CTYbSwGDjYgl6Uh1gCETs5HF+dEZO1p0RxRLw0+ZnS1IN4fYa1MXt4Zrw0Vqkdl80BFYCeO8hUHFID2P1Pz/jXHuUKlPTIYbYZ7Jg1P87nsYOWGjEc5+uRA411IROA0ipvC8lJq+MSkPNQ66awt41k5C+PQ63//7He9B5svrHF5U5xtHt72hDcUBwu79HD7e7n1x3vT0tP/Mv38f5AYFEa3sZWZ/83AQg0P061/zrNJUDtJZd7pt2sbsuMe7qLkPprPn+m8JhzeQLXfESKZD5n2w0x3fYyXvXqSsmIULnZdA/VfNltUV3St73y6tS93x8AwdyTvPFQldx1PyGhDZcTdx/e4Hnn0seVz9InCb4Pl5/4uHzr69Jr6eYqj+NWCqnarLldlgAAISXX73TH+53rJT6vYPu/+NwWOe/z/ueM8xHDDceEAQjZ1PX4hpf3yvYu9bW6VAAQUrq9oy6sGRzywnUd230FPgkAtrQdiHS2N1VMjQEpmFrR1N4ZOeC/3Yn8B7wav52rP1r9AAAAAElFTkSuQmCC",YC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAADQNJREFUeJztnXuMVNUdxxEUi0obW9BCNDH+YYymWAKNFRLDYxcUBZaXqOCL2hRkBWEp8miVhZalKKa4dLXyShQfQBugFKWRRzYIAhGQRwEBK7LgnnntY2b2NbMzp7/fvRcc1tmZuefee37nzsw3+fyjYfb3O7/f3Lnnd875nQ4dslBs4KCbgPuAUcAcYBWwHTgInAIuAAzwAwHAC1wEzgCHgZ3AOqAUmADcD3QHrqH2La82MoL9IFAMrDWCGAe4A1QDm4ykGgbcSu1/zgkGvRPQF5hhfKtbHAp2JmCiHQIWAgVAF+rxyUp5Bg7qCIP7AFBmPL6pAp6OILAGGA7cSD1urhcM4m1ACbAPaFQgwJnSCpwElgC/BDpSj6VrBIN1DXA3UAF8p0Aw7XgqbAEGANdSj6+yMgL/K2Az0KBA4Jx4KuwHxgOdqcdbGXn0wPcCtgHNCgTKaWJMn2qOAK6jHn9SMf03vjxLv/GZPBE+BvqwXKsvgMNdgClArQKBoAansctZrtQUwNHeTH8EUg+8aniAMUAn6hg5InDsBmA6UK/AYKsK/izg7KcHdbxsFTjUjekvedQD7BZOA32p42aLwJFC4FsFBtVthJn+xHTnTwLTy7fzWW6+4dsFrjVsALpSx9OUwODOwArm3KpcrrEX6EYd14zE9OXZLQoMWrZxFriLOr4pBQbeDFQqMFjZShXQizrOScX0qt5+BQYp28GdTP2p432VwKCewAEFBidXwCToRx13TUyf43+mwKDkGpeA3tTBx7f9TQoMRq5yDuhJFXyc57+pwCDkOrjTWX6dAP7oXObyeb5n2CPcWzSKs8EF5LZYBJeV5VUMmb4NO6qA42IUFPJgRQWP+Xw8HgrxlkOHuP/pZ+jtssY8WcG/g+lLl9QOCxMsL+c8FuOJipw+zb3DR5DbZgFcSRztdPDxpW+PAs4K45v4FI/5AzyZwuveJ7fPInjC6Xango8vffMUcFKcQYN547+2Jg0+KhYIcP+zz9HbaQ1cdrf/pRA+tB8QUsBBYQJTXuDxhoZ2EwDVtHMnuZ02MNXu4Hdlbi/2wLe/5ejRlMG/rJrpL9Hbaw0fcI+dCVCigFOWqH3l1YyCj4p89VU2TA3XMzvOH8CH3Mn02jO1Q8J4hgzlrVVVGScAqv6118nttgiePxhpMfgD8dDGhwo4Y4nQ6tWmgo+KB4NaoYjadot8A/zYyrcfDy1EFHBEGO/IorQvfu0pvG4duf028IJo8K9leomR2gFLNG5tf9qX9ikQiXD/M8+S+2ARLNqZ304G/2go06tL1A4Ig9O+thU/s2o+cIDcDxtYajb42IVjpwKGW6Ll8GFLwdfU2sprZs8m98UieMz+Z2YSAJsauPqkbu38P8AzPG49AUCRU6e0OgK1TxYpMZMA7n7zLyjk0a//Z0vwL6v+9WX0flkDTxv9JJPg/4K5/NRucMXfbA0+Kub1ct/jT5D7ZgGsC0zKJAEWKGCsML4nntSC5YS01UJ3/xTgrK79XgTwP38EHFXAUDEgOA0bNzoSfBRuHvE/N4neT3GwX1H7G0mZ3vzQtYWfwOQpPN7U5FgCoJo+/dTtT4HSVAng2k2ensIh2pzdaWFV0TvuMXJ/LfA5S9atDP7j9cBxBQwUombWLMtFn0xV+/Iccn8tgMfO+yRLAOxjR9l2VRjPQw/z6LmvpQQfFVy+nNxni7ycLAFKFTBMiNA770gLPgr/HrXPFjmQLAFc2bjJO2KktpdPpurfeIPcb4vEqwcOuiUx+D9XwCghGjdvkRp8VM2MmeR+28CIttM/aoNM45swUXitX1S4UQT3GFD7bgOliQkwXwGDzDG4gDfv+Uxq8FHhDz+i990eKhMTYKsCBpmi9tUFnEejUoOvrQc8Np7cd5vAGd/1HaoHaM2afQoYlDGeh4fxyPHjUoOPCr39NrnvNnMvfvt7KGCIKeqXLZNW9Lms6Pnz3DtqNLnvNjMGE6C/AoZkjLeoiMfq6qQGHzeW1P7xFXLfHWAxJsAkBQzJmPD7H8gNPgiPj7t8Aag9tmIC/EUBQzLCN3GitlNXquBFMzC1mNx3hziCCfBPBQxJD57tO3hQbvA5Lv/uoPfdOaoxAVxx6LNm5kzbNnlmKiwyZdG0LxkRTID/KmBISvBsX/TMWanBR4VWryH33WkwAVS+iFEj+Nfl0oMfq6nR6g3UvstIAD+1EanAIMT8fukJUFdWRu67rAQIUhuRioYNG6QHv+XLLy31B8A+RNhkAjeqUI9fJgmg7JWs3rHjeLyxUXoCBKZNE7MZkqZp+3+ufE6svp7XTJtOPo7uTICCQq1fj2w17RCf9uG5gbbCdwnfU0/Tj2eKBFDyJ6CmZJZ2MFOmsMQsehxcK1I1Nyf93MZPPtESmnpM20sA5V4C8bfTlpO9JhV+T6whhGfoQ7x53+ftf3AsxmvnzCUf1/YSQLkbvbA/j2y1XqjS+wYL2Fu3aFH6z6+6yD2PPEo+tskS4AS1EYlgEFo9HgkhTxB8Q4NvlovZO7KIR89mUKSKx3mwfAX5+CZLAKVKwaGVq5wPeBthWzjRhlBm7I3V1qp2qiii1GIQzp/j4bCDoU6iaJTXzCwRs/fJCaY3pWqzDHWWlrXFoKUKGKINSvOePQ5FuX01790nVvTBOf8O89NUXM4OvChYZ7CfI8psCAkUF0tf68eTxP5Jk8TsnVosvCk1cuyYKtPCrWpsCSscwiMnTtgc3vQSbQ+P0z5L9sILYd3ixdTBRxYrcSqo7k9/lr7WjwtMops8ccZg1d7W6mruo38hHNvh0oCBeA8A2bZw7+gx2o5bqcIpmeAJX+8o+6apDes3UCfAveQHQ0Jr1toymGYUOXlSuCgTXr/eNjtiwSD3/+Z5quDrB0OMBCC5CQTP9sk+2att8Z4/X8hefPGz+yxiyxdfUCVAJfnhUJwTy1ZzZaXWTsa0vTDta9nvTAsaojMHC0iPh2t9fCVLm4MXi23xritd6NjqZOvFi9rMQnIMvj8eLr1BxKDBPJLh9S12qmHTJqEqHJaJnd6WFn73XZnBxws/b2mbANJaxGjfJsnC3Tmiq32hvzvfggb3EnjHjJWVAAfJmkThWj/FJs/QypVC9vrGP87jLS1SbGzavVtWAiRtEiWlTVxolfnrW6wqev5b4U2euJtHpgKTJzsdfLz674dt4owkcLRRpOfR4dqjWKpg2ie62ud//rfSm1BoO5KdTYDkjSITpoOOtYqtL1sidTBRTbt2CS+/Nm7fLt1eTNjA7xx9CixIGnwjARxtFt2w8R9Sx7Ll2DFL27DwQmkKOXhlXT1L1SzaSALH2sVji1Upgm8RFpk8Fm8DD38gvxcB1iocvJfgY7wKMF0COHdhBG6i2LXbsfYuOJXCOn/dwkW2rLfjO4vWi0jSSiXaH1zh2L7BzC6MMJLAuStjIAnw5apucRkPlpfzYMVbPPSWIPBv8TPqly7lNb+frR/ltvnKVzyZjGsA9Utf04IjbGs7BCsqtJXJutJSp28kOV2dyZUxRgK4/tKoPD/A1KVRWXFtXJ4r4LVxP804AYwkKGQuvzgyzxWWmQp+wlPA9VfH5tGuju1uOgGMJHD95dF5BC+P1hMgO66Pz2G+YVaujzeeAncCTAFn8pgD5/1FloKfkAQlCjiUxxwbgM52JUBXptgh0jwpwW3+99gS/IQk6Mf0tWRq5/KkZ6qtwTcSAA+QzFXAuTyp2QZ0tT0BjCToDOxRwMk8yfECtzsS/IQkuMP4Q9TO5rkarNqOdjT4CUnwIBBVwOk83zNPSvATkgDfB+IKOJ5HL9l3kpwA2qli1942nkUcZE699KVPAu2lcJMCg5CrnAN6kgQ/IQm6sXyRiIJLLN0GT1nCLAQOKDAouQKuzfSnjvtVAoNuA/YrMDjZjnrBvyww7GagUoFBylYuAr2o45xSYOBNwBYFBivbOAszr7uo45uRmD47WMHydQK72At0o46rKRl1AryWXs0LKdwBfoFwXZ9mnm+HmL67WLmW9C4gDEyHL5LcCp8TYnqtYJsCg+oWTgN9qeNmq8ChG4CXmH5ClXqAVQVX9CqAHtTxckzgXG/giAKDrRq4f39MtexFHQqBo12AKcypU8juAvsyLQdupY6LdDG9elgONCgQCNng4x6XcftUpzuzn80yDp/0Av7NJHQpUwDcr489GUcA11GPvzIyEuHXwGaWnU8E/Mbjgtm4fOBTCAYHE+Fupr8Nf6dA4KyCF3NiaRz7MCbvzpVXcjH9HWEmsI+5q6KI+yVPAkuY3myjI/VYulpGWfkBoIypXVXEb/tqYDhwI/W4ZaWY3regLzAD2M5oXxyxVn8IWAgUAF2oxyfnxPTlZ9ym/iKwFjjDnFuFrGb6Hsg5TG+qmXtzdzeI6YdZ7wNGGcFaZTwtcAftKeAC03fW+A2wCldlJA9O0bA/0jqmd1CfANwPdPcMyL75+v8BTjnTYDkmUekAAAAASUVORK5CYII=",QC="/demo-waas-auth/assets/56-06b98271.png",Pr={MAINNET:1,ROPSTEN:3,RINKEBY:4,GOERLI:5,KOVAN:42,POLYGON:137,POLYGON_MUMBAI:80001,POLYGON_ZKEVM:1101,BSC:56,BSC_TESTNET:97,OPTIMISM:10,OPTIMISM_TESTNET:69,ARBITRUM:42161,ARBITRUM_GOERLI:421613,ARBITRUM_NOVA:42170,AVALANCHE:43114,AVALANCHE_TESTNET:43113,FANTOM:250,FANTOM_TESTNET:4002,GNOSIS:100,AURORA:1313161554,AURORA_TESTNET:1313161556,BASE_GOERLI:84531,HOMEVERSE_TESTNET:40875},Zre={[Pr.MAINNET]:Dd,[Pr.ROPSTEN]:Dd,[Pr.GOERLI]:Dd,[Pr.KOVAN]:Dd,[Pr.OPTIMISM]:HC,[Pr.OPTIMISM_TESTNET]:HC,[Pr.POLYGON]:WC,[Pr.POLYGON_MUMBAI]:WC,[Pr.POLYGON_ZKEVM]:Jre,[Pr.ARBITRUM]:KC,[Pr.ARBITRUM_NOVA]:Xre,[Pr.ARBITRUM_GOERLI]:KC,[Pr.GNOSIS]:Qre,[Pr.BSC]:QC,[Pr.BSC_TESTNET]:QC,[Pr.FANTOM]:GC,[Pr.FANTOM_TESTNET]:GC,[Pr.AVALANCHE]:YC,[Pr.AVALANCHE_TESTNET]:YC};function ene({onNetworkChange:t}){const[e,r]=y.useState(),[n,i]=y.useState([]);return y.useEffect(()=>{Re.networkList().then(s=>{i(s),r(s[0]),t(s[0])})},[]),n.length===0?D.jsx(G,{marginY:"5",children:D.jsx(Rn,{})}):D.jsxs(G,{marginBottom:"4",children:[D.jsx(G,{marginBottom:"4",children:D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Network to use with requests:"})}),D.jsx(G,{children:D.jsx(uv,{name:"chainId",labelLocation:"top",onValueChange:s=>{const o=n==null?void 0:n.find(a=>a.name===s);o&&(r(o),t(o))},value:e==null?void 0:e.name,options:[...n.map(s=>({label:D.jsxs(G,{alignItems:"center",gap:"2",children:[D.jsx(oz,{src:Zre[s.id],size:"sm"}),D.jsx(me,{children:s.name})]}),value:String(s.name)}))]})})]})}function XT(t){var e;if(t.type===wr.Email)return D.jsxs(me,{variant:"normal",color:"text100",children:["(",t.email,")"]});if(t.type===wr.Guest)return D.jsx(me,{variant:"normal",color:"text100",children:"Guest account"});if(t.type===wr.PlayFab)return D.jsxs(me,{variant:"normal",color:"text100",children:["(",t.email,")"]});if(t.type===wr.OIDC&&(e=t.issuer)!=null&&e.includes("cognito-idp"))return D.jsxs(me,{variant:"normal",color:"text100",children:["Email v1 (",t.email,")"]});switch(t.issuer){case"https://accounts.google.com":return D.jsxs(G,{gap:"2",marginTop:"2",children:[D.jsx("img",{width:24,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABq9JREFUaEPVWWtsFFUU/s6d2S1F6IJgAQWiBQooEmiRR0NLCxQpLwUBQRI0JD4wGh9RedjVEkqERKMxmuAPjBgpWECJoNViaQFTKbitFiyUh5ogiykaSym07M7MkVmt3W13Z2Z3Fg3zbzPnfOf7zjl777l3CDf4Qzc4f8RNwKW80beofl8WaTSCwalgStYk6i6YGRqaIdEFBp8EUCs7HAe7l9RciEfybAlozr6zr18SS4hpCROPIlhLCANMQA2DtjhUtahbRd1vsYqJSUDjtJF3QOFVDF5KhIRYg+t+zLjKhA9Ildf3rPj+l2ixohLAeYMTmq52WcmElQC6RBvM2J5bCGJ9krNlA5WcvmoV27KAi7nDh7AmFQMYZRU8JjumGpKUB117j5+y4m9JQOOUEblg7AAhyQqobRtGE4ge6FF29GszLFMBrWuSl7ccSH6TYK/XzYh0fM8MnyCe6Cr78YiRr6EALscsMD5VTiQ1XP5k4K3gaGnYsdfed2XWPUoF0GISwOUYAUIVGF11AF9tkrdld1QiWsHsBUEA6ANQYhRyNrkyjz1mRl7HC1sB/go3QcYRCAwPDmoogvkKBH1OGn8qZKmse2ltQ7BvU3ZqbxaOXCaaA+Y5IAokpvNjLfNtfuEFlGM9gBXh4JXjSd7gdgrsswJbFPKvvGVvvddKlvVdW/FdzQfoSQLJ7T7RkQ9bAd6HoRCoBcMZiUxbJZhxXrB2v2tf3WErxDvaXJw6crzG2icE9AOiJx9eQAU2g7HUjJCvqldV875+C3qVHjtrZmv0/o/skf1liZclZR4ttNLzHbFCWoj3YwBUnAHBYUiKcRaEsZSDmGcYO6KDfUMF7MPqa+TXGYITfGCMoxx8Hy8SdnBCBZTjGIC7TAS8Tdl4xk7QePr+K4DLcBsEfjVpnUuQMYiyEJdZPh5C2gWUYwmAj0xAN1MOHrETOG0tD5eg3GYHAyTXH8mnwOIRLOA1IDAmGz1zKQe77ARPW6dsJMbjdjDAvNbjdrwSKqACO8GYZwjcAhfNQJOd4PERoBV53E69Y0IqcABAZkRyjEaajJ52yOu+8RGAgx63nBUqoAzVEBgdkSChjrJNVigL6uIk4JDHLU+ITgBQTzkYZoGjoUk8BGiMwzVuedwN20IaUFGTL+d0rMB2CMw3TJ+CHpSLi3aqEI8KgLUPPW7nw7EsowsoBzv+bwHMvK7a7cjvuIwuBqPoem9ko9e3ZJHqjPhfIg3LQWx888GY63HLgf2ofSM7gH5QYXYguXxttx58vabQCQV8s09WzgKRTmuBmzCGKid7Cuj3EAH6Dy5DLQTuNqnCO5SDp+20USTf9EL/GwA9b4jNVO1xS+ltNh2nUX2U0EeKyI8+TqvIpCmI6RQWCXh0oW+MYKoEkeFZhEHPVedLb4UXoE+kEn4yOk7+43gOEu6hLJyPRyXGreM+flYrCUgxxmOfJuT+Navp32m406GeK7AJjGVGQBpDW9o0dluV2mvF6QdKjEdwE4VDi6cPTTj3wgbH5ez7LCRjoydfXh5s11lAGQZB4MdrrRT21lknP/dixsE6v2uSfqgnxrzTi0oOWQjeyWTQ9rw80rQikOiR+OuqSueVjIxIOAxudSjykKoCCklYpGuVQgAvdwTTyc9vzCg/qrimtL9jDRA7JSgr6heW/mxFSMq2GalCoBDM80HtK2Gi1/2ds3nsmHAYxLzmO7ejoOO7SAK6gPEtqP0mOpD5PzMO1qmuSRFIthJQAqLdmqJ8fUZyebFwu6rbpr+X7mjq3XcAFJ7GpM5hFrlECLoPakcMWwmmaiSL8Z7HyW9JQGBJ3Y/hUHEYhG7BbWMlw3/bsMpMDURMYOoTnGkzjESvu8rZPDYwrAHcCCFP8KymE2ErYwTGZZisEfbMb8yoDG0bMwr233f1rjzkaM5IE4yZR9yOiNfsptfrT3yWNmtva/JOAkW8qbNPtzMCA82J3qcWH3t25h4jfFMBuvOQj++dqpHYSfjPPnA0aMyzflr0peG3AZ2bJQG64bCt02/3SbxNQPzTm9cj74AG7YAMx0MnF+45ZyWCZQE62OAv8hLoMr/IGlZFvh63EjaMDWuNBHr1FHV/t231soIUlYA2wJTi2QMF+V/6e8eO6sNFJ07MfAkkNkJWXj8zrzTkm8J1E9AGnFo0u7cqK4sIvBjAOIAkK0EZ8BP4G2baqjoTtv8yd1ejFb+ol9FoQFOKp7okSBOZxQgIpILRG+BuDKER1GaCaNAYpwTRD4mtSmXt0lL9bGH7iamFbEeNI8ANL+AvTa+pT4hOMw0AAAAASUVORK5CYII="}),D.jsxs(me,{variant:"normal",color:"text100",children:["Google (",t.email,")"]})]});case"https://appleid.apple.com":return D.jsxs(G,{gap:"2",children:[D.jsx("img",{width:24,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABMlJREFUaEPVmV1oXEUUx89/Ete6SUykWiv4QcRYymISc2fWdCPUVUQUpIqKPggaEa1Wqj7UPokg+hJfagM+iMX2QS0RjQSFIkLpQ2Oyd+7GtaTiB4rgB8ZqNKlJupvco6MbCHH33tnNzSaZ1zn3f/6/O3PnzMwFbfCGDe6f1gxgfHw8Njs7exMRXd/c3Hygra3tXDUvs+YAx48f39TU1LSPiJ4koq1F0y1Syj/XPYDWuouIjhJR2xKzc47jxAHwugZwXbcHwEdE1LzUKIBhx3F6qjFvnqnJFMpkMluFEGNLpsxSv3ullP3rGkBrbd78HctNMvNkoVC4JpVK/b5uATKZjBJCZEoZBPC44zivV2u+JlPI87x+Zn6qhMnDUsrelZivCYDW+nMium6pUWZ+U0r5KAB/IwCcIaLNxigz/yGEeNZxnMMrNb74/IpXoZGRkUvr6+vnyhUirfXbRDTDzCfi8fhgIpE4a5KPjo5uFkJcKf5rv3V2dn5fTS2oGEBrfRkRPUREdzFzJ4Dzi2/3VwAnieiDWCw21N7ePrls2sB13R11dXW7mPn2EtPqLAAN4Eh9ff27HR0df9mMkjWA2QI0NjY+T0RPA2gIEmfmcwCOEdHHzPyjECLFzPcS0dU2pojoDDPvVkq9FxZvBWAKERENCiG6wwQj7u+XUu4N0gwFGBsba1lYWBglomsjNmcr94KU8sVywYEAzCyy2eyHxTlrmzCyOGbOA9gnpTxYFYDrug8AeCcyRxUIMfNPRHS3UqpkFQ9dRgcGBupaW1tPAdheQd6oQqd939+RTCbHwwTLTqFsNnuL7/ufhAmsUv8eKeVrNtplAVzX7TPzz0YkyhhmNgWtTUpZsNEtC6C1Nvv3ThuRKGOY+RWl1HO2mkEjMAmgxVYoqjgA9ziO876tXkkAc2MwMzMzByC0Ttgmso1j5hvCVp6lWiUNFvc7ZhmreWPmLqWUmb5WrSRALpfbUigUfrFSiDiImW9VSlmvfiUBhoeHL4jFYjMRe7OSY+b9Sqk+q+CgWwnXdScAXGIrFFUcM3+qlErZ6pX9SD3PO8nM1kK2CW3ifN/vSSaTwzaxQXXggNn724isQsyp6enpZDqdngvTDgK4j4gGwgRWsf+Q4ziPhR38ywIUzwETRHTeKpoMlAZwdGpqqjdoJAILVSaTOSaEuG2tAExeZv4GwDNSSnO7978WCOB53p3/FJahtQQwuX3fn2hoaLgikUjkl3sJO5HB87wviGjbGkO8JKU0FwqVjYCJ1lqbQ/WrawgwPz8/39rd3f1DVQDFqvwVEV2+RhBvSSkfLJfbarfped7D5j6z1gDmUE9E25VS364IwNxOeJ53gohurCUEgD7HcfYH5bQaASPguu42AJ8R0aYaQXydz+c7UqnUbCQARYhHAByqAcAcM++0OdhYj8Ci6YAfFpFwMTMD6JVSHrERrBjAfA9a64MA9lgkWCCin33fjwkhtljG75ZSvmER+29IxQCLwlrrJ5j5ZQAXLUt2GoDZBA5OTU2dTqfT86Y/l8s15PP5nQDuN1fzRHThsue+NL+iKjmNrQigWOQuJiJzbX4VgO8AjHZ1deXC3l6xttxslkjz35iZc/F4fKjUViFMq+oRCBOuVf+GB/gb9M3GQJMHYpQAAAAASUVORK5CYII="}),D.jsxs(me,{variant:"normal",color:"text100",children:["Apple (",t.email,")"]})]});default:return"Unknown"}}function tne(){var Z;const t=N5(),[e,r]=y.useState(),[n,i]=y.useState(),[s,o]=y.useState(!0),[a,l]=y.useState(),[c,f]=y.useState(""),u=y.useRef(null),d=(Z=u.current)==null?void 0:Z.validity.valid,[h,p]=y.useState(!1),[m,x]=y.useState([]),[b,w]=y.useState(!0),{inProgress:E,loading:R,initiateAuth:N,sendChallengeAnswer:I}=JT({sessionName:Ao(),onSuccess:async({wallet:M})=>{console.log(`Wallet address: ${M}`)},linkAccount:!0}),F=async M=>{o(!0),i(void 0);try{await Re.removeAccount(M);const v=await Re.listAccounts();i(v.accounts)}catch(v){l(v.message);const T=await Re.listAccounts();i(T.accounts)}o(!1)},j=async M=>{const v=await Re.initAuth({idToken:M.credential});try{const T=await Re.linkAccount(v);i(S=>[...S||[],T.account])}catch(T){mh(T)&&t({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}},U="https://"+window.location.host+(window.location.host.includes("github.io")?"/demo-waas-auth":"/"),K=async M=>{const v=await Re.initAuth({idToken:M.authorization.id_token});try{const T=await Re.linkAccount(v);i(S=>[...S||[],T.account])}catch(T){mh(T)&&t({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}},J=Z5({flow:"implicit",onSuccess:M=>{window.PlayFabClientSDK.LoginWithGoogleAccount({AccessToken:M.access_token,CreateAccount:!0,TitleId:"8F854"},async(v,T)=>{if(v)try{const S=await Re.initAuth({playFabTitleId:"8F854",playFabSessionTicket:v.data.SessionTicket}),C=await Re.linkAccount(S);console.log("playfab account",JSON.stringify(C.account,null,2)),i(P=>[...P||[],C.account])}catch(S){console.error(S),mh(S)&&t({title:"Account already linked",description:"This account is already linked to another wallet",variant:"error"})}else T&&console.log("Error: "+JSON.stringify(T))})}});return y.useEffect(()=>{Re.listAccounts().then(M=>{i(M.accounts),M.currentAccountId&&r(M.accounts.find(v=>v.id===M.currentAccountId)),o(!1)}).catch(M=>{l(M.message),o(!1)})},[E]),D.jsxs(G,{children:[D.jsx(Lr,{background:"buttonGlass"}),D.jsxs(G,{marginBottom:"5",gap:"4",flexDirection:"column",children:[D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Your connected (linked) accounts"}),n&&D.jsx(D.Fragment,{children:n.map(M=>D.jsxs(G,{flexDirection:"row",alignItems:"center",gap:"2",children:[D.jsx(me,{variant:"normal",color:"text100",children:XT(M)}),M.id!==(e==null?void 0:e.id)&&D.jsx(Tt,{size:"xs",label:"Remove",onClick:()=>F(M.id)}),M.id===(e==null?void 0:e.id)&&D.jsx(G,{children:D.jsx(me,{variant:"small",color:"text100",children:"(Account you logged in with)"})})]},M.id))}),s&&D.jsx(Rn,{})]}),D.jsx(Lr,{background:"buttonGlass"}),D.jsxs(G,{flexDirection:"column",gap:"2",width:"fit",children:[D.jsx(me,{variant:"large",color:"text100",fontWeight:"bold",marginBottom:"5",children:"Connect (link) another login method"}),D.jsx(X5,{onSuccess:j,shape:"circle",width:230}),D.jsx(Lr,{background:"buttonGlass",width:"full"}),D.jsx(t7,{authOptions:{clientId:"com.horizon.sequence.waas",scope:"openid email",redirectURI:U,usePopup:!0},onError:M=>console.error(M),onSuccess:K,uiType:"dark"}),D.jsxs(D.Fragment,{children:[D.jsx(Lr,{background:"buttonGlass",width:"full"}),D.jsx(G,{marginTop:"2",children:D.jsx(G,{children:D.jsx(Tt,{label:"Login with Google (through Playfab)",onClick:J})})})]}),D.jsx(Lr,{background:"buttonGlass",width:"full"}),D.jsxs(G,{marginTop:"2",children:[D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Email"}),D.jsx(G,{marginTop:"4",children:D.jsx(c8,{label:"Use v2 email login",disabled:!0,checked:b,onChange:()=>w(!b)})})]}),I?D.jsxs(G,{flexDirection:"column",children:[D.jsx(G,{marginTop:"3",children:D.jsx(me,{marginTop:"5",variant:"normal",color:"text80",children:"Enter code received in email."})}),D.jsx(G,{marginTop:"4",children:D.jsx(HB,{value:m,digits:6,onChange:x})}),D.jsx(G,{gap:"2",marginY:"4",children:R?D.jsx(Rn,{}):D.jsx(Tt,{variant:"primary",disabled:m.includes(""),label:"Verify",onClick:()=>I(m.join("")),"data-id":"verifyButton"})})]}):D.jsxs(G,{marginBottom:"4",children:[D.jsxs(me,{variant:"normal",color:"text80",children:["Enter your email to recieve a code to login and create your wallet. ",D.jsx("br",{}),"Please check your spam folder if you don't see it in your inbox."]}),D.jsxs(G,{marginTop:"6",children:[D.jsx(Mr,{name:"email",type:"email",onChange:M=>{f(M.target.value)},ref:u,onKeyDown:M=>{c&&M.key==="Enter"&&N(c)},onBlur:()=>p(!!c&&!d),value:c,placeholder:"hello@example.com",required:!0,"data-id":"loginEmail"}),h&&D.jsx(me,{as:"p",variant:"small",color:"negative",marginY:"2",children:"Invalid email address"})]}),D.jsx(G,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",children:R?D.jsx(Rn,{}):D.jsx(Tt,{variant:"primary",disabled:!d,label:"Continue",onClick:()=>N(c),"data-id":"continueButton"})})]})]}),a&&D.jsxs(me,{variant:"normal",color:"text100",fontWeight:"bold",children:["Error loading accounts: ",a]})]})}function rne(){const[t,e]=y.useState(),[r,n]=y.useState(),[i,s]=y.useState([]),[o,a]=y.useState(!1),[l,c]=y.useState(!1),[f,u]=y.useState(),[d,h]=y.useState();return y.useEffect(()=>{Re.getAddress().then(p=>{e(p)}).catch(p=>{n(p.message)}),Re.listAccounts().then(p=>{p.currentAccountId&&h(p.accounts.find(m=>m.id===p.currentAccountId))})},[]),y.useEffect(()=>{Re.isSignedIn().then(p=>{p||Oi.navigate("/login")})},[]),y.useEffect(()=>{const p=i.join("");p.length===6&&(c(!0),Re.finishValidateSession(p))},[i]),y.useEffect(()=>{const p=Re.onValidationRequired(()=>{a(!0),Re.waitForSessionValid(6e5,4e3).then(m=>{console.log("isValid",m),s([]),a(!1),c(!1)})});return()=>{p.then(m=>m())}},[]),D.jsxs(D.Fragment,{children:[D.jsx(qg,{children:o&&D.jsx(c5,{children:D.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"1.2em",height:"50vh"},children:D.jsxs(G,{flexDirection:"column",alignItems:"center",children:[D.jsx(me,{marginBottom:"7",children:"Please enter the session verification code that was sent to your email"}),D.jsx(r7,{value:i,digits:6,onChange:s}),D.jsx(G,{marginTop:"5",children:l&&D.jsx(Rn,{})})]})})})}),D.jsxs(G,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[D.jsx(G,{marginBottom:"10",children:D.jsx(n7,{})}),D.jsxs(G,{marginBottom:"5",flexDirection:"row",children:[d&&D.jsxs(G,{flexDirection:"column",gap:"2",children:[D.jsxs(me,{marginTop:"1",variant:"normal",color:"text100",children:[d.type===wr.Guest?"Guest account":`Logged in with account type ${d.type}`," "]}),d.type!==wr.Guest&&XT(d)]}),D.jsx(Tt,{marginLeft:"auto",label:"Log out",size:"xs",onClick:async()=>{try{await Re.dropSession({strict:!1})}catch(p){console.warn(`Could not drop session: ${p.message}`)}FV(),Oi.navigate("/login")}})]}),D.jsx(Lr,{background:"buttonGlass"}),D.jsx(G,{marginBottom:"5",children:D.jsx(me,{variant:"normal",color:"text100",fontWeight:"bold",children:"Your wallet address:"})}),D.jsx(G,{marginBottom:"5",children:D.jsx(me,{variant:"normal",color:"text100",fontWeight:"normal",children:t?D.jsx(G,{children:D.jsx(me,{children:t})}):D.jsx(Rn,{})})}),D.jsx(G,{children:r&&D.jsxs(me,{children:["Error fetching wallet address: ",r]})}),D.jsx(Lr,{background:"buttonGlass"}),D.jsx(zre,{}),D.jsx(Lr,{background:"buttonGlass"}),D.jsx(G,{marginBottom:"5",children:D.jsx(ene,{onNetworkChange:u})}),D.jsx(Lr,{background:"buttonGlass"}),D.jsxs(ol,{marginY:"3",label:"Send native token transaction",children:[D.jsx(Lr,{background:"buttonGlass"}),D.jsx(Ure,{network:f})]}),D.jsxs(ol,{marginY:"3",label:"Send ERC20 transaction",children:[D.jsx(Lr,{background:"buttonGlass"}),D.jsx(Hre,{network:f})]}),D.jsxs(ol,{marginY:"3",label:"Send ERC1155 transaction",children:[D.jsx(Lr,{background:"buttonGlass"}),D.jsx(Kre,{network:f})]}),D.jsxs(ol,{marginY:"3",label:"Sign a message",children:[D.jsx(Lr,{background:"buttonGlass"}),D.jsx(Vre,{network:f})]}),D.jsxs(ol,{marginY:"3",label:"Call contracts",children:[D.jsx(Lr,{background:"buttonGlass"}),D.jsx(qre,{network:f})]}),D.jsxs(ol,{marginY:"3",label:"EOA Link",children:[D.jsx(Lr,{background:"buttonGlass"}),D.jsx(Yre,{network:f,walletAddress:t})]}),D.jsx(tne,{})]})]})}function nne(t,e,r){return e=rP(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xm(t,e){return one(t)||sne(t,e)||ZT(t,e)||ine()}function ine(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sne(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,s,o,a=[],l=!0,c=!1;try{if(s=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=s.call(r)).done)&&(a.push(n.value),a.length!==e);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function one(t){if(Array.isArray(t))return t}function ane(t){return fne(t)||cne(t)||ZT(t)||lne()}function lne(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZT(t,e){if(t){if(typeof t=="string")return bm(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bm(t,e)}}function cne(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function fne(t){if(Array.isArray(t))return bm(t)}function bm(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--L){var A=this.tryEntries[L],g=A.completion;if(A.tryLoc==="root")return O("end");if(A.tryLoc<=this.prev){var _=n.call(A,"catchLoc"),B=n.call(A,"finallyLoc");if(_&&B){if(this.prev=0;--O){var L=this.tryEntries[O];if(L.tryLoc<=this.prev&&n.call(L,"finallyLoc")&&this.prev=0;--P){var O=this.tryEntries[P];if(O.finallyLoc===C)return this.complete(O.completion,O.afterLoc),M(O),x}},catch:function(C){for(var P=this.tryEntries.length-1;P>=0;--P){var O=this.tryEntries[P];if(O.tryLoc===C){var L=O.completion;if(L.type==="throw"){var A=L.arg;M(O)}return A}}throw new Error("illegal catch attempt")},delegateYield:function(C,P,O){return this.delegate={iterator:T(C),resultName:P,nextLoc:O},this.method==="next"&&(this.arg=t),x}},e}function ji(t){"@babel/helpers - typeof";return ji=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ji(t)}function ei(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function JC(t,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,o=!1,a;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return s=c.done,c},e:function(c){o=!0,a=c},f:function(){try{!s&&r.return!=null&&r.return()}finally{if(o)throw a}}}}function oP(t,e){if(t){if(typeof t=="string")return ok(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ok(t,e)}}function ok(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--L){var E=this.tryEntries[L],g=E.completion;if(E.tryLoc==="root")return O("end");if(E.tryLoc<=this.prev){var _=n.call(E,"catchLoc"),B=n.call(E,"finallyLoc");if(_&&B){if(this.prev=0;--O){var L=this.tryEntries[O];if(L.tryLoc<=this.prev&&n.call(L,"finallyLoc")&&this.prev=0;--P){var O=this.tryEntries[P];if(O.finallyLoc===C)return this.complete(O.completion,O.afterLoc),M(O),x}},catch:function(C){for(var P=this.tryEntries.length-1;P>=0;--P){var O=this.tryEntries[P];if(O.tryLoc===C){var L=O.completion;if(L.type==="throw"){var E=L.arg;M(O)}return E}}throw new Error("illegal catch attempt")},delegateYield:function(C,P,O){return this.delegate={iterator:T(C),resultName:P,nextLoc:O},this.method==="next"&&(this.arg=t),x}},e}function ak(t,e){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:0,r=(Hr[t[e+0]]+Hr[t[e+1]]+Hr[t[e+2]]+Hr[t[e+3]]+"-"+Hr[t[e+4]]+Hr[t[e+5]]+"-"+Hr[t[e+6]]+Hr[t[e+7]]+"-"+Hr[t[e+8]]+Hr[t[e+9]]+"-"+Hr[t[e+10]]+Hr[t[e+11]]+Hr[t[e+12]]+Hr[t[e+13]]+Hr[t[e+14]]+Hr[t[e+15]]).toLowerCase();if(!Vne(r))throw TypeError("Stringified UUID is invalid");return r}function ww(t,e,r){t=t||{};var n=t.random||(t.rng||Une)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Hne(n)}var jd={};function Aw(t,e){return Ae(this,void 0,void 0,ie().mark(function r(){return ie().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(jd[t]===void 0){i.next=2;break}return i.abrupt("return",jd[t]);case 2:return jd[t]=qne(t,e),i.abrupt("return",jd[t]);case 4:case"end":return i.stop()}},r)}))}function qne(t,e){return new Promise(function(r,n){var i=Gne(t);if(i&&i.dataset.loaded==="true")try{r(e())}catch(o){return n(new Error("".concat(t," already loaded, but module was not found in global scope: ").concat(o)))}var s=Kne(t);s.addEventListener("load",function(){s.dataset.loaded="true";try{r(e())}catch(o){n(new Error("".concat(t," was loaded, but module was not found in global scope: ").concat(o)))}}),s.addEventListener("error",function(o){n(new Error("".concat(t," could not be loaded: ").concat(o)))})})}var Wne=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]'))};function Gne(t){var e=Wne(t);if(e[0])return e[0]}function Kne(t){var e=document.createElement("script");return e.setAttribute("src",t),e.setAttribute("async","true"),e.setAttribute("defer","true"),document.head.appendChild(e),e}var pp=["[Stytch]"],Yne=!1,vs={debug:function(){return Yne},log:function(){for(var e,r=arguments.length,n=new Array(r),i=0;i=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,o=!1,a;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return s=c.done,c},e:function(c){o=!0,a=c},f:function(){try{!s&&r.return!=null&&r.return()}finally{if(o)throw a}}}}function oP(t,e){if(t){if(typeof t=="string")return ak(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ak(t,e)}}function ak(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--L){var A=this.tryEntries[L],g=A.completion;if(A.tryLoc==="root")return O("end");if(A.tryLoc<=this.prev){var _=n.call(A,"catchLoc"),B=n.call(A,"finallyLoc");if(_&&B){if(this.prev=0;--O){var L=this.tryEntries[O];if(L.tryLoc<=this.prev&&n.call(L,"finallyLoc")&&this.prev=0;--P){var O=this.tryEntries[P];if(O.finallyLoc===C)return this.complete(O.completion,O.afterLoc),M(O),x}},catch:function(C){for(var P=this.tryEntries.length-1;P>=0;--P){var O=this.tryEntries[P];if(O.tryLoc===C){var L=O.completion;if(L.type==="throw"){var A=L.arg;M(O)}return A}}throw new Error("illegal catch attempt")},delegateYield:function(C,P,O){return this.delegate={iterator:T(C),resultName:P,nextLoc:O},this.method==="next"&&(this.arg=t),x}},e}function lk(t,e){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:0,r=(qr[t[e+0]]+qr[t[e+1]]+qr[t[e+2]]+qr[t[e+3]]+"-"+qr[t[e+4]]+qr[t[e+5]]+"-"+qr[t[e+6]]+qr[t[e+7]]+"-"+qr[t[e+8]]+qr[t[e+9]]+"-"+qr[t[e+10]]+qr[t[e+11]]+qr[t[e+12]]+qr[t[e+13]]+qr[t[e+14]]+qr[t[e+15]]).toLowerCase();if(!zne(r))throw TypeError("Stringified UUID is invalid");return r}function ww(t,e,r){t=t||{};var n=t.random||(t.rng||$ne)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Vne(n)}var jd={};function Ew(t,e){return Ee(this,void 0,void 0,ie().mark(function r(){return ie().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(jd[t]===void 0){i.next=2;break}return i.abrupt("return",jd[t]);case 2:return jd[t]=qne(t,e),i.abrupt("return",jd[t]);case 4:case"end":return i.stop()}},r)}))}function qne(t,e){return new Promise(function(r,n){var i=Wne(t);if(i&&i.dataset.loaded==="true")try{r(e())}catch(o){return n(new Error("".concat(t," already loaded, but module was not found in global scope: ").concat(o)))}var s=Gne(t);s.addEventListener("load",function(){s.dataset.loaded="true";try{r(e())}catch(o){n(new Error("".concat(t," was loaded, but module was not found in global scope: ").concat(o)))}}),s.addEventListener("error",function(o){n(new Error("".concat(t," could not be loaded: ").concat(o)))})})}var Hne=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]'))};function Wne(t){var e=Hne(t);if(e[0])return e[0]}function Gne(t){var e=document.createElement("script");return e.setAttribute("src",t),e.setAttribute("async","true"),e.setAttribute("defer","true"),document.head.appendChild(e),e}var yp=["[Stytch]"],Kne=!1,vs={debug:function(){return Kne},log:function(){for(var e,r=arguments.length,n=new Array(r),i=0;i"u")throw new Error("The ".concat(e,` is not compatible with server-side environments. -If using nextjs, use the create`).concat(e," method instead.\n```\n").concat(r,"\n```\n"))},Xne=function(e){return e.includes("public-token-test")},Zne=function(){return"event-id-".concat(ww())},eie=function(){return"app-session-id-".concat(ww())},tie=function(){return"persistent-id-".concat(ww())},lr=function(e){var r={isObject:function(i,s){var o=xs(s)==="object"&&!Array.isArray(s)&&s!==null;if(!o)throw new pl(e,i+" must be an object.");return r},isOptionalObject:function(i,s){return typeof s>"u"?r:r.isObject(i,s)},isString:function(i,s){if(typeof s!="string")throw new pl(e,i+" must be a string.");return r},isOptionalString:function(i,s){return typeof s>"u"?r:r.isString(i,s)},isStringArray:function(i,s){if(!Array.isArray(s))throw new pl(e,i+" must be an array of strings.");var o=sP(s),a;try{for(o.s();!(a=o.n()).done;){var l=a.value;if(typeof l!="string")throw new pl(e,i+" must be an array of strings.")}}catch(c){o.e(c)}finally{o.f()}return r},isOptionalStringArray:function(i,s){return typeof s>"u"?r:r.isStringArray(i,s)},isNumber:function(i,s){if(typeof s!="number")throw new pl(e,i+" must be a number.");return r},isOptionalNumber:function(i,s){return typeof s>"u"?r:r.isNumber(i,s)},isBoolean:function(i,s){if(typeof s!="boolean")throw new pl(e,i+" must be a boolean.");return r},isOptionalBoolean:function(i,s){return typeof s>"u"?r:r.isBoolean(i,s)}};return r},Ji=function(e){var r=lP(e,["request_id","status_code"]);return r},xr=function(e){var r=lP(e,["__user"]);return r},rie=function(){return Aw("".concat(jne,"/telemetry.js"),function(){return window.GetTelemetryID})},nie=Qr(function t(e,r,n){var i=this,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){return Promise.resolve(void 0)};Jr(this,t),this.bootstrapPromise=n,this.isEnabled=function(){return Ae(i,void 0,void 0,ie().mark(function o(){return ie().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",this.state.then(function(c){return c.enabled}));case 1:case"end":return l.stop()}},o,this)}))},this.getTelemetryID=function(){return Ae(i,void 0,void 0,ie().mark(function o(){var a,l,c,f;return ie().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.state;case 2:if(a=d.sent,l=a.publicToken,c=a.enabled,f=a.dfpBackendURL,c){d.next=8;break}return d.abrupt("return",void 0);case 8:return d.next=10,window.GetTelemetryID(l,"".concat(f,"/submit"));case 10:return d.abrupt("return",d.sent);case 11:case"end":return d.stop()}},o,this)}))},this.getDFPTelemetryIDAndCaptcha=function(){return Ae(i,void 0,void 0,ie().mark(function o(){var a,l,c,f,u,d;return ie().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,this.state;case 2:if(a=p.sent,l=a.enabled,c=a.executeRecaptcha,f=a.mode,u=void 0,d=void 0,l){p.next=12;break}return p.next=11,c();case 11:d=p.sent;case 12:if(f!=="DECISIONING"){p.next=18;break}return p.next=15,this.getTelemetryID();case 15:u=p.sent,p.next=25;break;case 18:if(f!=="OBSERVATION"){p.next=25;break}return p.next=21,this.getTelemetryID();case 21:return u=p.sent,p.next=24,c();case 24:d=p.sent;case 25:return p.abrupt("return",{dfp_telemetry_id:u,captcha_token:d});case 26:case"end":return p.stop()}},o,this)}))},this.retryWithCaptchaAndDFP=function(o,a){return Ae(i,void 0,void 0,ie().mark(function l(){var c,f,u;return ie().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,this.state;case 2:if(c=h.sent,f=c.enabled,u=c.executeRecaptcha,!(o.type===k0.RequiredCatcha&&f)){h.next=14;break}if(!a.body){h.next=13;break}return h.next=9,this.getTelemetryID();case 9:return a.body.dfp_telemetry_id=h.sent,h.next=12,u();case 12:a.body.captcha_token=h.sent;case 13:return h.abrupt("return",a);case 14:throw new Error("Unable to query captcha and/or dfp telemetry ID");case 15:case"end":return h.stop()}},l,this)}))},this.state=n.then(function(o){return Ae(i,void 0,void 0,ie().mark(function a(){return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(o.runDFPProtectedAuth){c.next=2;break}return c.abrupt("return",{publicToken:e,dfpBackendURL:r,enabled:!1,loaded:!1,executeRecaptcha:s});case 2:return c.next=4,rie();case 4:return c.abrupt("return",{publicToken:e,dfpBackendURL:r,enabled:!0,mode:o.dfpProtectedAuthMode||"OBSERVATION",loaded:!0,executeRecaptcha:s});case 5:case"end":return c.stop()}},a)}))})}),Nv=function(){return{isEnabled:function(){return Ae(void 0,void 0,void 0,ie().mark(function r(){return ie().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",!1);case 1:case"end":return i.stop()}},r)}))},getTelemetryID:function(){return Ae(void 0,void 0,void 0,ie().mark(function r(){return ie().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",void 0);case 1:case"end":return i.stop()}},r)}))},getDFPTelemetryIDAndCaptcha:function(){return Ae(void 0,void 0,void 0,ie().mark(function r(){return ie().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",{dfp_telemetry_id:void 0,captcha_token:void 0});case 1:case"end":return i.stop()}},r)}))},retryWithCaptchaAndDFP:function(){return Ae(void 0,void 0,void 0,ie().mark(function r(){return ie().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:throw new Error("DFP protected auth is disabled");case 1:case"end":return i.stop()}},r)}))}}},iie=function(){function t(){Jr(this,t)}return Qr(t,null,[{key:"marshall",value:function(r){return Object.assign(Object.assign({},r),{name:r.name,message:r.message,stack:r.stack})}},{key:"inflate",value:function(r,n){var i=new r(n);return Object.assign(i,n),Object.setPrototypeOf(i,r.prototype),i}},{key:"unmarshall",value:function(r){if("name"in r)switch(r.name){case"SDKAPIUnreachableError":return t.inflate(mne,r);case"StytchSDKSchemaError":return t.inflate(gne,r);case"StytchAPIUnreachableError":return t.inflate(ml,r);case"StytchAPISchemaError":return t.inflate(nP,r);case"StytchSDKAPIError":return t.inflate(xne,r);case"StytchAPIError":return t.inflate(iP,r);case"TypeError":return t.inflate(TypeError,r);case"SyntaxError":return t.inflate(SyntaxError,r);case"ReferenceError":return t.inflate(ReferenceError,r);case"RangeError":return t.inflate(RangeError,r);case"EvalError":return t.inflate(EvalError,r);case"URIError":return t.inflate(URIError,r)}return t.inflate(Error,r)}}]),t}(),sie=15,oie=800,aie=function(){function t(e){Jr(this,t),this.maxBatchSize=e.maxBatchSize,this.logEventURL=e.logEventURL,setInterval(this.flush.bind(this),e.intervalDurationMs),this.batch=[]}return Qr(t,[{key:"logEvent",value:function(r,n){this.batch.push({telemetry:r,event:n}),this.batch.length>=this.maxBatchSize&&this.flush()}},{key:"flush",value:function(){return Ae(this,void 0,void 0,ie().mark(function r(){var n;return ie().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(this.batch.length){s.next=2;break}return s.abrupt("return");case 2:return n=this.batch,this.batch=[],s.prev=4,s.next=7,fetch(this.logEventURL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});case 7:s.next=11;break;case 9:s.prev=9,s.t0=s.catch(4);case 11:case"end":return s.stop()}},r,this,[[4,9]])}))}}]),t}(),lk;(function(t){t.LoginOrCreateEML="login_or_create_eml",t.LoginOrCreateOTP="login_or_create_otp",t.ResetPassword="reset_password"})(lk||(lk={}));var lie=Qr(function t(e,r){var n=this;Jr(this,t),this._networkClient=e,this._subscriptionService=r,this.get=function(){return Ae(n,void 0,void 0,ie().mark(function i(){var s,o;return ie().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this._networkClient.fetchSDK({url:"/users/me",errorMessage:"Failed to retrieve user info.",method:"GET"});case 2:return s=l.sent,o=Ji(s),this._subscriptionService.updateUser(o),l.abrupt("return",o);case 6:case"end":return l.stop()}},i,this)}))},this.getSync=function(){return n._subscriptionService.getUser()},this.getInfo=function(){return{user:n.getSync(),fromCache:n._subscriptionService.getFromCache()}},this.update=function(i){return Ae(n,void 0,void 0,ie().mark(function s(){var o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return lr("stytch.user.update").isOptionalObject("untrusted_metadata",i.untrusted_metadata),c.next=3,this._networkClient.fetchSDK({url:"/users/me",body:i,errorMessage:"Failed to update user.",method:"PUT"});case 3:return o=c.sent,a=Ji(o.__user),this._subscriptionService.updateUser(a),c.abrupt("return",xr(o));case 7:case"end":return c.stop()}},s,this)}))},this.deleteEmail=function(i){return Ae(n,void 0,void 0,ie().mark(function s(){var o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this._networkClient.fetchSDK({url:"/users/emails/".concat(i),errorMessage:"Failed to delete email.",method:"DELETE"});case 2:return o=c.sent,a=Ji(o.__user),this._subscriptionService.updateUser(a),c.abrupt("return",xr(o));case 6:case"end":return c.stop()}},s,this)}))},this.deletePhoneNumber=function(i){return Ae(n,void 0,void 0,ie().mark(function s(){var o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this._networkClient.fetchSDK({url:"/users/phone_numbers/".concat(i),errorMessage:"Failed to delete phone number.",method:"DELETE"});case 2:return o=c.sent,a=Ji(o.__user),this._subscriptionService.updateUser(a),c.abrupt("return",xr(o));case 6:case"end":return c.stop()}},s,this)}))},this.deleteTOTP=function(i){return Ae(n,void 0,void 0,ie().mark(function s(){var o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this._networkClient.fetchSDK({url:"/users/totps/".concat(i),errorMessage:"Failed to delete TOTP.",method:"DELETE"});case 2:return o=c.sent,a=Ji(o.__user),this._subscriptionService.updateUser(a),c.abrupt("return",xr(o));case 6:case"end":return c.stop()}},s,this)}))},this.deleteOAuthRegistration=function(i){return Ae(n,void 0,void 0,ie().mark(function s(){var o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this._networkClient.fetchSDK({url:"/users/oauth/".concat(i),errorMessage:"Failed to delete OAuth registration.",method:"DELETE"});case 2:return o=c.sent,a=Ji(o.__user),this._subscriptionService.updateUser(a),c.abrupt("return",xr(o));case 6:case"end":return c.stop()}},s,this)}))},this.deleteWebauthnRegistration=function(i){return Ae(n,void 0,void 0,ie().mark(function s(){var o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this._networkClient.fetchSDK({url:"/users/webauthn_registrations/".concat(i),errorMessage:"Failed to delete WebAuthn registration.",method:"DELETE"});case 2:return o=c.sent,a=Ji(o.__user),this._subscriptionService.updateUser(a),c.abrupt("return",xr(o));case 6:case"end":return c.stop()}},s,this)}))},this.deleteBiometricRegistration=function(i){return Ae(n,void 0,void 0,ie().mark(function s(){var o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this._networkClient.fetchSDK({url:"/users/biometric_registrations/".concat(i),errorMessage:"Failed to delete Biometric registration.",method:"DELETE"});case 2:return o=c.sent,a=Ji(o.__user),this._subscriptionService.updateUser(a),c.abrupt("return",xr(o));case 6:case"end":return c.stop()}},s,this)}))},this.onChange=function(i){var s=n._subscriptionService.getUser(),o=function(l){var c;(l==null?void 0:l.user)!==s&&(s=(c=l==null?void 0:l.user)!==null&&c!==void 0?c:null,i(s))};return n._subscriptionService.subscribeToState(o)}}),cie=function(){function t(e,r){var n=this;Jr(this,t),this._networkClient=e,this._subscriptionService=r,this.getSync=function(){return n._subscriptionService.getSession()},this.getInfo=function(){return{session:n.getSync(),fromCache:n._subscriptionService.getFromCache()}},this.onChange=function(i){var s=n._subscriptionService.getSession(),o=function(l){var c;(l==null?void 0:l.session)!==s&&(s=(c=l==null?void 0:l.session)!==null&&c!==void 0?c:null,i(s))};return n._subscriptionService.subscribeToState(o)},this.revoke=function(i){return Ae(n,void 0,void 0,ie().mark(function s(){var o;return ie().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.prev=0,l.next=3,this._networkClient.fetchSDK({url:"/sessions/revoke",errorMessage:"Error revoking session",method:"POST"});case 3:return o=l.sent,this._subscriptionService.destroyState(),l.abrupt("return",o);case 8:throw l.prev=8,l.t0=l.catch(0),i!=null&&i.forceClear?this._subscriptionService.destroyState():Am.includes(l.t0.error_type)&&this._subscriptionService.destroyState(),l.t0;case 12:case"end":return l.stop()}},s,this,[[0,8]])}))},this.authenticate=function(i){return Ae(n,void 0,void 0,ie().mark(function s(){var o=this,a,l,c,f;return ie().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return a=this._subscriptionService.getSession(),l=function(){var p;return(a==null?void 0:a.session_id)!==((p=o._subscriptionService.getSession())===null||p===void 0?void 0:p.session_id)},d.prev=2,c={session_duration_minutes:i==null?void 0:i.session_duration_minutes},d.next=6,this._networkClient.fetchSDK({url:"/sessions/authenticate",body:c,errorMessage:"Error authenticating session",method:"POST"});case 6:if(f=d.sent,!l()){d.next=9;break}return d.abrupt("return",this.authenticate(i));case 9:return this._subscriptionService.updateStateAndTokens({state:{session:f.session,user:f.user},session_token:f.session_token,session_jwt:f.session_jwt,intermediate_session_token:null}),d.abrupt("return",xr(f));case 13:if(d.prev=13,d.t0=d.catch(2),!l()){d.next=17;break}return d.abrupt("return",this.authenticate(i));case 17:throw Am.includes(d.t0.error_type)&&this._subscriptionService.destroySession(),d.t0;case 19:case"end":return d.stop()}},s,this,[[2,13]])}))}}return Qr(t,[{key:"getTokens",value:function(){return this._subscriptionService.getTokens()}},{key:"updateSession",value:function(r){var n;lr("stytch.session.updateSession").isString("session_token",r.session_token).isOptionalString("session_jwt",(n=r.session_jwt)!==null&&n!==void 0?n:void 0),this._subscriptionService.updateTokens(r)}}]),t}(),fie=Promise.resolve({pkceRequiredForEmailMagicLinks:!1}),uie=function(){function t(e,r,n,i){var s=this,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:fie,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Nv();Jr(this,t),this._networkClient=e,this._subscriptionService=r,this._pkceManager=n,this._passwordResetPKCEManager=i,this._config=o,this.dfpProtectedAuth=a,this.email={loginOrCreate:function(c){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ae(s,void 0,void 0,ie().mark(function u(){var d,h,p,m,x,b,w;return ie().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return R.next=2,this._config;case 2:if(d=R.sent,h=d.pkceRequiredForEmailMagicLinks,p=void 0,!h){R.next=9;break}return R.next=8,this.getCodeChallenge();case 8:p=R.sent;case 9:return R.next=11,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 11:return m=R.sent,x=m.dfp_telemetry_id,b=m.captcha_token,w=Object.assign(Object.assign({},f),{email:c,code_challenge:p,captcha_token:b,dfp_telemetry_id:x}),R.abrupt("return",this._networkClient.retriableFetchSDK({url:"/magic_links/email/login_or_create",body:w,errorMessage:"Failed to send magic link",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 16:case"end":return R.stop()}},u,this)}))},send:function(c){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ae(s,void 0,void 0,ie().mark(function u(){var d,h,p,m,x,b,w,A,R;return ie().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return I.next=2,this._config;case 2:if(d=I.sent,h=d.pkceRequiredForEmailMagicLinks,p=void 0,!h){I.next=9;break}return I.next=8,this.getCodeChallenge();case 8:p=I.sent;case 9:return I.next=11,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 11:return m=I.sent,x=m.dfp_telemetry_id,b=m.captcha_token,w=Object.assign(Object.assign({},f),{email:c,code_challenge:p,captcha_token:b,dfp_telemetry_id:x}),A=!!this._subscriptionService.getSession(),R=A?"/magic_links/email/send/secondary":"/magic_links/email/send/primary",I.abrupt("return",this._networkClient.retriableFetchSDK({url:R,body:w,errorMessage:"Failed to send magic link",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 18:case"end":return I.stop()}},u,this)}))}},this.authenticate=function(l,c){return Ae(s,void 0,void 0,ie().mark(function f(){var u,d;return ie().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return lr("stytch.magicLinks.authenticate").isString("Token",l).isNumber("session_duration_minutes",c.session_duration_minutes),p.next=3,this._passwordResetPKCEManager.getPKPair();case 3:if(u=p.sent,d=null,!(u!=null&&u.code_verifier)){p.next=19;break}return p.prev=6,p.next=9,this.handlePKCEForAuthenticate(this._passwordResetPKCEManager,Object.assign(Object.assign({},c),{token:l}));case 9:d=p.sent,p.next=19;break;case 12:if(p.prev=12,p.t0=p.catch(6),!p.t0.message.includes("pkce")){p.next=18;break}console.log("Authenticate with passwords pkce namespace failed. Falling back to authenticate with magic_links namespace."),p.next=19;break;case 18:throw p.t0;case 19:if(d){p.next=23;break}return p.next=22,this.handlePKCEForAuthenticate(this._pkceManager,Object.assign(Object.assign({},c),{token:l}));case 22:d=p.sent;case 23:return this._subscriptionService.updateStateAndTokens({state:{session:d.session,user:d.user},session_token:d.session_token,session_jwt:d.session_jwt,intermediate_session_token:null}),p.abrupt("return",xr(d));case 25:case"end":return p.stop()}},f,this,[[6,12]])}))}}return Qr(t,[{key:"getCodeChallenge",value:function(){return Ae(this,void 0,void 0,ie().mark(function r(){var n;return ie().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,this._pkceManager.getPKPair();case 2:if(n=s.sent,!n){s.next=5;break}return s.abrupt("return",n.code_challenge);case 5:return s.next=7,this._pkceManager.startPKCETransaction();case 7:return n=s.sent,s.abrupt("return",n.code_challenge);case 9:case"end":return s.stop()}},r,this)}))}},{key:"handlePKCEForAuthenticate",value:function(r,n){return Ae(this,void 0,void 0,ie().mark(function i(){var s,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,r.getPKPair();case 2:return s=c.sent,o=Object.assign({code_verifier:s==null?void 0:s.code_verifier},n),c.next=6,this._networkClient.fetchSDK({url:"/magic_links/authenticate",body:o,errorMessage:"Failed to authenticate token.",method:"POST"});case 6:return a=c.sent,r.clearPKPair(),c.abrupt("return",a);case 9:case"end":return c.stop()}},i,this)}))}}]),t}(),die=Qr(function t(e,r){var n=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return Promise.resolve(void 0)},s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Nv();Jr(this,t),this._networkClient=e,this._subscriptionService=r,this.executeRecaptcha=i,this.dfpProtectedAuth=s,this.sms={loginOrCreate:function(a,l){return Ae(n,void 0,void 0,ie().mark(function c(){var f,u,d,h;return ie().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return f=m.sent,u=f.dfp_telemetry_id,d=f.captcha_token,h=Object.assign(Object.assign({},l),{phone_number:a,captcha_token:d,dfp_telemetry_id:u}),m.abrupt("return",this._networkClient.retriableFetchSDK({url:"/otps/sms/login_or_create",body:h,errorMessage:"Failed to send one time passcode",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 7:case"end":return m.stop()}},c,this)}))},send:function(a,l){return Ae(n,void 0,void 0,ie().mark(function c(){var f,u,d,h,p,m;return ie().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return f=b.sent,u=f.dfp_telemetry_id,d=f.captcha_token,h=Object.assign(Object.assign({},l),{phone_number:a,captcha_token:d,dfp_telemetry_id:u}),p=!!this._subscriptionService.getSession(),m=p?"/otps/sms/send/secondary":"/otps/sms/send/primary",b.abrupt("return",this._networkClient.retriableFetchSDK({url:m,body:h,errorMessage:"Failed to send one time passcode",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 9:case"end":return b.stop()}},c,this)}))}},this.whatsapp={loginOrCreate:function(a,l){return Ae(n,void 0,void 0,ie().mark(function c(){var f,u,d,h;return ie().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return f=m.sent,u=f.dfp_telemetry_id,d=f.captcha_token,h=Object.assign(Object.assign({},l),{phone_number:a,dfp_telemetry_id:u,captcha_token:d}),m.abrupt("return",this._networkClient.retriableFetchSDK({url:"/otps/whatsapp/login_or_create",body:h,errorMessage:"Failed to send one time passcode",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 7:case"end":return m.stop()}},c,this)}))},send:function(a,l){return Ae(n,void 0,void 0,ie().mark(function c(){var f,u,d,h,p,m;return ie().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return f=b.sent,u=f.dfp_telemetry_id,d=f.captcha_token,h=Object.assign(Object.assign({},l),{phone_number:a,captcha_token:d,dfp_telemetry_id:u}),p=!!this._subscriptionService.getSession(),m=p?"/otps/whatsapp/send/secondary":"/otps/whatsapp/send/primary",b.abrupt("return",this._networkClient.retriableFetchSDK({url:m,body:h,errorMessage:"Failed to send one time passcode",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 9:case"end":return b.stop()}},c,this)}))}},this.email={loginOrCreate:function(a,l){return Ae(n,void 0,void 0,ie().mark(function c(){var f,u;return ie().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,this.executeRecaptcha();case 2:return f=h.sent,u=Object.assign(Object.assign({},l),{email:a,captcha_token:f}),h.abrupt("return",this._networkClient.fetchSDK({url:"/otps/email/login_or_create",body:u,errorMessage:"Failed to send one time passcode",method:"POST"}));case 5:case"end":return h.stop()}},c,this)}))},send:function(a,l){return Ae(n,void 0,void 0,ie().mark(function c(){var f,u,d,h;return ie().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.executeRecaptcha();case 2:return f=m.sent,u=Object.assign(Object.assign({},l),{email:a,captcha_token:f}),d=!!this._subscriptionService.getSession(),h=d?"/otps/email/send/secondary":"/otps/email/send/primary",m.abrupt("return",this._networkClient.fetchSDK({url:h,body:u,errorMessage:"Failed to send one time passcode",method:"POST"}));case 7:case"end":return m.stop()}},c,this)}))}},this.authenticate=function(o,a,l){return Ae(n,void 0,void 0,ie().mark(function c(){var f,u,d,h,p;return ie().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return lr("stytch.otps.authenticate").isString("Code",o).isNumber("session_duration_minutes",l.session_duration_minutes),x.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return f=x.sent,u=f.dfp_telemetry_id,d=f.captcha_token,h=Object.assign({token:o,method_id:a,dfp_telemetry_id:u,captcha_token:d},l),x.next=9,this._networkClient.retriableFetchSDK({url:"/otps/authenticate",body:h,errorMessage:"Failed to authenticate token.",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 9:return p=x.sent,this._subscriptionService.updateStateAndTokens({state:{session:p.session,user:p.user},session_token:p.session_token,session_jwt:p.session_jwt,intermediate_session_token:null}),x.abrupt("return",xr(p));case 12:case"end":return x.stop()}},c,this)}))}}),hie=function(){function t(e,r,n,i,s){Jr(this,t),this._networkClient=e,this._subscriptionService=r,this._pkceManager=n,this._dynamicConfig=i,this._config=s,this.google={start:this.startOAuthFlow(hr.Google)},this.apple={start:this.startOAuthFlow(hr.Apple)},this.microsoft={start:this.startOAuthFlow(hr.Microsoft)},this.github={start:this.startOAuthFlow(hr.Github)},this.gitlab={start:this.startOAuthFlow(hr.GitLab)},this.facebook={start:this.startOAuthFlow(hr.Facebook)},this.discord={start:this.startOAuthFlow(hr.Discord)},this.salesforce={start:this.startOAuthFlow(hr.Salesforce)},this.slack={start:this.startOAuthFlow(hr.Slack)},this.amazon={start:this.startOAuthFlow(hr.Amazon)},this.bitbucket={start:this.startOAuthFlow(hr.Bitbucket)},this.linkedin={start:this.startOAuthFlow(hr.LinkedIn)},this.coinbase={start:this.startOAuthFlow(hr.Coinbase)},this.twitch={start:this.startOAuthFlow(hr.Twitch)},this.twitter={start:this.startOAuthFlow(hr.Twitter)},this.tiktok={start:this.startOAuthFlow(hr.TikTok)},this.snapchat={start:this.startOAuthFlow(hr.Snapchat)},this.figma={start:this.startOAuthFlow(hr.Figma)},this.yahoo={start:this.startOAuthFlow(hr.Yahoo)}}return Qr(t,[{key:"authenticate",value:function(r,n){return Ae(this,void 0,void 0,ie().mark(function i(){var s,o;return ie().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return lr("stytch.oauth.authenticate").isString("Token",r).isNumber("session_duration_minutes",n.session_duration_minutes),l.next=3,this._pkceManager.getPKPair();case 3:return s=l.sent,s||vs.warn(`No code verifier found in local storage for OAuth flow. +If using nextjs, use the create`).concat(e," method instead.\n```\n").concat(r,"\n```\n"))},Jne=function(e){var r,n;return!((r=e==null?void 0:e.endpointOptions)===null||r===void 0)&&r.dfppaDomain?"https://"+e.endpointOptions.dfppaDomain:!((n=e==null?void 0:e.endpoints)===null||n===void 0)&&n.dfpBackendURL?e.endpoints.dfpBackendURL:Dne},Xne=function(e){return e.includes("public-token-test")},Zne=function(){return"event-id-".concat(ww())},eie=function(){return"app-session-id-".concat(ww())},tie=function(){return"persistent-id-".concat(ww())},lr=function(e){var r={isObject:function(i,s){var o=xs(s)==="object"&&!Array.isArray(s)&&s!==null;if(!o)throw new pl(e,i+" must be an object.");return r},isOptionalObject:function(i,s){return typeof s>"u"?r:r.isObject(i,s)},isString:function(i,s){if(typeof s!="string")throw new pl(e,i+" must be a string.");return r},isOptionalString:function(i,s){return typeof s>"u"?r:r.isString(i,s)},isStringArray:function(i,s){if(!Array.isArray(s))throw new pl(e,i+" must be an array of strings.");var o=sP(s),a;try{for(o.s();!(a=o.n()).done;){var l=a.value;if(typeof l!="string")throw new pl(e,i+" must be an array of strings.")}}catch(c){o.e(c)}finally{o.f()}return r},isOptionalStringArray:function(i,s){return typeof s>"u"?r:r.isStringArray(i,s)},isNumber:function(i,s){if(typeof s!="number")throw new pl(e,i+" must be a number.");return r},isOptionalNumber:function(i,s){return typeof s>"u"?r:r.isNumber(i,s)},isBoolean:function(i,s){if(typeof s!="boolean")throw new pl(e,i+" must be a boolean.");return r},isOptionalBoolean:function(i,s){return typeof s>"u"?r:r.isBoolean(i,s)}};return r},Ji=function(e){var r=lP(e,["request_id","status_code"]);return r},xr=function(e){var r=lP(e,["__user"]);return r},rie=function(){return Ew("".concat(Lne,"/telemetry.js"),function(){return window.GetTelemetryID})},nie=Qr(function t(e,r,n){var i=this,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){return Promise.resolve(void 0)};Jr(this,t),this.bootstrapPromise=n,this.isEnabled=function(){return Ee(i,void 0,void 0,ie().mark(function o(){return ie().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",this.state.then(function(c){return c.enabled}));case 1:case"end":return l.stop()}},o,this)}))},this.getTelemetryID=function(){return Ee(i,void 0,void 0,ie().mark(function o(){var a,l,c,f;return ie().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.state;case 2:if(a=d.sent,l=a.publicToken,c=a.enabled,f=a.dfpBackendURL,c){d.next=8;break}return d.abrupt("return",void 0);case 8:return d.next=10,window.GetTelemetryID(l,"".concat(f,"/submit"));case 10:return d.abrupt("return",d.sent);case 11:case"end":return d.stop()}},o,this)}))},this.getDFPTelemetryIDAndCaptcha=function(){return Ee(i,void 0,void 0,ie().mark(function o(){var a,l,c,f,u,d;return ie().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,this.state;case 2:if(a=p.sent,l=a.enabled,c=a.executeRecaptcha,f=a.mode,u=void 0,d=void 0,l){p.next=12;break}return p.next=11,c();case 11:d=p.sent;case 12:if(f!=="DECISIONING"){p.next=18;break}return p.next=15,this.getTelemetryID();case 15:u=p.sent,p.next=25;break;case 18:if(f!=="OBSERVATION"){p.next=25;break}return p.next=21,this.getTelemetryID();case 21:return u=p.sent,p.next=24,c();case 24:d=p.sent;case 25:return p.abrupt("return",{dfp_telemetry_id:u,captcha_token:d});case 26:case"end":return p.stop()}},o,this)}))},this.retryWithCaptchaAndDFP=function(o,a){return Ee(i,void 0,void 0,ie().mark(function l(){var c,f,u;return ie().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,this.state;case 2:if(c=h.sent,f=c.enabled,u=c.executeRecaptcha,!(o.type===T0.RequiredCatcha&&f)){h.next=14;break}if(!a.body){h.next=13;break}return h.next=9,this.getTelemetryID();case 9:return a.body.dfp_telemetry_id=h.sent,h.next=12,u();case 12:a.body.captcha_token=h.sent;case 13:return h.abrupt("return",a);case 14:throw new Error("Unable to query captcha and/or dfp telemetry ID");case 15:case"end":return h.stop()}},l,this)}))},this.state=n.then(function(o){return Ee(i,void 0,void 0,ie().mark(function a(){return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(o.runDFPProtectedAuth){c.next=2;break}return c.abrupt("return",{publicToken:e,dfpBackendURL:r,enabled:!1,loaded:!1,executeRecaptcha:s});case 2:return c.next=4,rie();case 4:return c.abrupt("return",{publicToken:e,dfpBackendURL:r,enabled:!0,mode:o.dfpProtectedAuthMode||"OBSERVATION",loaded:!0,executeRecaptcha:s});case 5:case"end":return c.stop()}},a)}))})}),Dv=function(){return{isEnabled:function(){return Ee(void 0,void 0,void 0,ie().mark(function r(){return ie().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",!1);case 1:case"end":return i.stop()}},r)}))},getTelemetryID:function(){return Ee(void 0,void 0,void 0,ie().mark(function r(){return ie().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",void 0);case 1:case"end":return i.stop()}},r)}))},getDFPTelemetryIDAndCaptcha:function(){return Ee(void 0,void 0,void 0,ie().mark(function r(){return ie().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",{dfp_telemetry_id:void 0,captcha_token:void 0});case 1:case"end":return i.stop()}},r)}))},retryWithCaptchaAndDFP:function(){return Ee(void 0,void 0,void 0,ie().mark(function r(){return ie().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:throw new Error("DFP protected auth is disabled");case 1:case"end":return i.stop()}},r)}))}}},iie=function(){function t(){Jr(this,t)}return Qr(t,null,[{key:"marshall",value:function(r){return Object.assign(Object.assign({},r),{name:r.name,message:r.message,stack:r.stack})}},{key:"inflate",value:function(r,n){var i=new r(n);return Object.assign(i,n),Object.setPrototypeOf(i,r.prototype),i}},{key:"unmarshall",value:function(r){if("name"in r)switch(r.name){case"SDKAPIUnreachableError":return t.inflate(yne,r);case"StytchSDKSchemaError":return t.inflate(mne,r);case"StytchAPIUnreachableError":return t.inflate(ml,r);case"StytchAPISchemaError":return t.inflate(nP,r);case"StytchSDKAPIError":return t.inflate(gne,r);case"StytchAPIError":return t.inflate(iP,r);case"TypeError":return t.inflate(TypeError,r);case"SyntaxError":return t.inflate(SyntaxError,r);case"ReferenceError":return t.inflate(ReferenceError,r);case"RangeError":return t.inflate(RangeError,r);case"EvalError":return t.inflate(EvalError,r);case"URIError":return t.inflate(URIError,r)}return t.inflate(Error,r)}}]),t}(),sie=15,oie=800,aie=function(){function t(e){Jr(this,t),this.maxBatchSize=e.maxBatchSize,this.logEventURL=e.logEventURL,setInterval(this.flush.bind(this),e.intervalDurationMs),this.batch=[]}return Qr(t,[{key:"logEvent",value:function(r,n){this.batch.push({telemetry:r,event:n}),this.batch.length>=this.maxBatchSize&&this.flush()}},{key:"flush",value:function(){return Ee(this,void 0,void 0,ie().mark(function r(){var n;return ie().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(this.batch.length){s.next=2;break}return s.abrupt("return");case 2:return n=this.batch,this.batch=[],s.prev=4,s.next=7,fetch(this.logEventURL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});case 7:s.next=11;break;case 9:s.prev=9,s.t0=s.catch(4);case 11:case"end":return s.stop()}},r,this,[[4,9]])}))}}]),t}(),ck;(function(t){t.LoginOrCreateEML="login_or_create_eml",t.LoginOrCreateOTP="login_or_create_otp",t.ResetPassword="reset_password"})(ck||(ck={}));var lie=Qr(function t(e,r){var n=this;Jr(this,t),this._networkClient=e,this._subscriptionService=r,this.get=function(){return Ee(n,void 0,void 0,ie().mark(function i(){var s,o;return ie().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this._networkClient.fetchSDK({url:"/users/me",errorMessage:"Failed to retrieve user info.",method:"GET"});case 2:return s=l.sent,o=Ji(s),this._subscriptionService.updateUser(o),l.abrupt("return",o);case 6:case"end":return l.stop()}},i,this)}))},this.getSync=function(){return n._subscriptionService.getUser()},this.getInfo=function(){return{user:n.getSync(),fromCache:n._subscriptionService.getFromCache()}},this.update=function(i){return Ee(n,void 0,void 0,ie().mark(function s(){var o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return lr("stytch.user.update").isOptionalObject("untrusted_metadata",i.untrusted_metadata),c.next=3,this._networkClient.fetchSDK({url:"/users/me",body:i,errorMessage:"Failed to update user.",method:"PUT"});case 3:return o=c.sent,a=Ji(o.__user),this._subscriptionService.updateUser(a),c.abrupt("return",xr(o));case 7:case"end":return c.stop()}},s,this)}))},this.deleteEmail=function(i){return Ee(n,void 0,void 0,ie().mark(function s(){var o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this._networkClient.fetchSDK({url:"/users/emails/".concat(i),errorMessage:"Failed to delete email.",method:"DELETE"});case 2:return o=c.sent,a=Ji(o.__user),this._subscriptionService.updateUser(a),c.abrupt("return",xr(o));case 6:case"end":return c.stop()}},s,this)}))},this.deletePhoneNumber=function(i){return Ee(n,void 0,void 0,ie().mark(function s(){var o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this._networkClient.fetchSDK({url:"/users/phone_numbers/".concat(i),errorMessage:"Failed to delete phone number.",method:"DELETE"});case 2:return o=c.sent,a=Ji(o.__user),this._subscriptionService.updateUser(a),c.abrupt("return",xr(o));case 6:case"end":return c.stop()}},s,this)}))},this.deleteTOTP=function(i){return Ee(n,void 0,void 0,ie().mark(function s(){var o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this._networkClient.fetchSDK({url:"/users/totps/".concat(i),errorMessage:"Failed to delete TOTP.",method:"DELETE"});case 2:return o=c.sent,a=Ji(o.__user),this._subscriptionService.updateUser(a),c.abrupt("return",xr(o));case 6:case"end":return c.stop()}},s,this)}))},this.deleteOAuthRegistration=function(i){return Ee(n,void 0,void 0,ie().mark(function s(){var o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this._networkClient.fetchSDK({url:"/users/oauth/".concat(i),errorMessage:"Failed to delete OAuth registration.",method:"DELETE"});case 2:return o=c.sent,a=Ji(o.__user),this._subscriptionService.updateUser(a),c.abrupt("return",xr(o));case 6:case"end":return c.stop()}},s,this)}))},this.deleteWebauthnRegistration=function(i){return Ee(n,void 0,void 0,ie().mark(function s(){var o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this._networkClient.fetchSDK({url:"/users/webauthn_registrations/".concat(i),errorMessage:"Failed to delete WebAuthn registration.",method:"DELETE"});case 2:return o=c.sent,a=Ji(o.__user),this._subscriptionService.updateUser(a),c.abrupt("return",xr(o));case 6:case"end":return c.stop()}},s,this)}))},this.deleteBiometricRegistration=function(i){return Ee(n,void 0,void 0,ie().mark(function s(){var o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this._networkClient.fetchSDK({url:"/users/biometric_registrations/".concat(i),errorMessage:"Failed to delete Biometric registration.",method:"DELETE"});case 2:return o=c.sent,a=Ji(o.__user),this._subscriptionService.updateUser(a),c.abrupt("return",xr(o));case 6:case"end":return c.stop()}},s,this)}))},this.onChange=function(i){var s=n._subscriptionService.getUser(),o=function(l){var c;(l==null?void 0:l.user)!==s&&(s=(c=l==null?void 0:l.user)!==null&&c!==void 0?c:null,i(s))};return n._subscriptionService.subscribeToState(o)}}),cie=function(){function t(e,r){var n=this;Jr(this,t),this._networkClient=e,this._subscriptionService=r,this.getSync=function(){return n._subscriptionService.getSession()},this.getInfo=function(){return{session:n.getSync(),fromCache:n._subscriptionService.getFromCache()}},this.onChange=function(i){var s=n._subscriptionService.getSession(),o=function(l){var c;(l==null?void 0:l.session)!==s&&(s=(c=l==null?void 0:l.session)!==null&&c!==void 0?c:null,i(s))};return n._subscriptionService.subscribeToState(o)},this.revoke=function(i){return Ee(n,void 0,void 0,ie().mark(function s(){var o;return ie().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.prev=0,l.next=3,this._networkClient.fetchSDK({url:"/sessions/revoke",errorMessage:"Error revoking session",method:"POST"});case 3:return o=l.sent,this._subscriptionService.destroyState(),l.abrupt("return",o);case 8:throw l.prev=8,l.t0=l.catch(0),i!=null&&i.forceClear?this._subscriptionService.destroyState():Am.includes(l.t0.error_type)&&this._subscriptionService.destroyState(),l.t0;case 12:case"end":return l.stop()}},s,this,[[0,8]])}))},this.authenticate=function(i){return Ee(n,void 0,void 0,ie().mark(function s(){var o=this,a,l,c,f;return ie().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return a=this._subscriptionService.getSession(),l=function(){var p;return(a==null?void 0:a.session_id)!==((p=o._subscriptionService.getSession())===null||p===void 0?void 0:p.session_id)},d.prev=2,c={session_duration_minutes:i==null?void 0:i.session_duration_minutes},d.next=6,this._networkClient.fetchSDK({url:"/sessions/authenticate",body:c,errorMessage:"Error authenticating session",method:"POST"});case 6:if(f=d.sent,!l()){d.next=9;break}return d.abrupt("return",this.authenticate(i));case 9:return this._subscriptionService.updateStateAndTokens({state:{session:f.session,user:f.user},session_token:f.session_token,session_jwt:f.session_jwt,intermediate_session_token:null}),d.abrupt("return",xr(f));case 13:if(d.prev=13,d.t0=d.catch(2),!l()){d.next=17;break}return d.abrupt("return",this.authenticate(i));case 17:throw Am.includes(d.t0.error_type)&&this._subscriptionService.destroySession(),d.t0;case 19:case"end":return d.stop()}},s,this,[[2,13]])}))}}return Qr(t,[{key:"getTokens",value:function(){return this._subscriptionService.getTokens()}},{key:"updateSession",value:function(r){var n;lr("stytch.session.updateSession").isString("session_token",r.session_token).isOptionalString("session_jwt",(n=r.session_jwt)!==null&&n!==void 0?n:void 0),this._subscriptionService.updateTokens(r)}}]),t}(),fie=Promise.resolve({pkceRequiredForEmailMagicLinks:!1}),uie=function(){function t(e,r,n,i){var s=this,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:fie,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Dv();Jr(this,t),this._networkClient=e,this._subscriptionService=r,this._pkceManager=n,this._passwordResetPKCEManager=i,this._config=o,this.dfpProtectedAuth=a,this.email={loginOrCreate:function(c){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ee(s,void 0,void 0,ie().mark(function u(){var d,h,p,m,x,b,w;return ie().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return R.next=2,this._config;case 2:if(d=R.sent,h=d.pkceRequiredForEmailMagicLinks,p=void 0,!h){R.next=9;break}return R.next=8,this.getCodeChallenge();case 8:p=R.sent;case 9:return R.next=11,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 11:return m=R.sent,x=m.dfp_telemetry_id,b=m.captcha_token,w=Object.assign(Object.assign({},f),{email:c,code_challenge:p,captcha_token:b,dfp_telemetry_id:x}),R.abrupt("return",this._networkClient.retriableFetchSDK({url:"/magic_links/email/login_or_create",body:w,errorMessage:"Failed to send magic link",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 16:case"end":return R.stop()}},u,this)}))},send:function(c){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ee(s,void 0,void 0,ie().mark(function u(){var d,h,p,m,x,b,w,E,R;return ie().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return I.next=2,this._config;case 2:if(d=I.sent,h=d.pkceRequiredForEmailMagicLinks,p=void 0,!h){I.next=9;break}return I.next=8,this.getCodeChallenge();case 8:p=I.sent;case 9:return I.next=11,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 11:return m=I.sent,x=m.dfp_telemetry_id,b=m.captcha_token,w=Object.assign(Object.assign({},f),{email:c,code_challenge:p,captcha_token:b,dfp_telemetry_id:x}),E=!!this._subscriptionService.getSession(),R=E?"/magic_links/email/send/secondary":"/magic_links/email/send/primary",I.abrupt("return",this._networkClient.retriableFetchSDK({url:R,body:w,errorMessage:"Failed to send magic link",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 18:case"end":return I.stop()}},u,this)}))}},this.authenticate=function(l,c){return Ee(s,void 0,void 0,ie().mark(function f(){var u,d;return ie().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return lr("stytch.magicLinks.authenticate").isString("Token",l).isNumber("session_duration_minutes",c.session_duration_minutes),p.next=3,this._passwordResetPKCEManager.getPKPair();case 3:if(u=p.sent,d=null,!(u!=null&&u.code_verifier)){p.next=19;break}return p.prev=6,p.next=9,this.handlePKCEForAuthenticate(this._passwordResetPKCEManager,Object.assign(Object.assign({},c),{token:l}));case 9:d=p.sent,p.next=19;break;case 12:if(p.prev=12,p.t0=p.catch(6),!p.t0.message.includes("pkce")){p.next=18;break}console.log("Authenticate with passwords pkce namespace failed. Falling back to authenticate with magic_links namespace."),p.next=19;break;case 18:throw p.t0;case 19:if(d){p.next=23;break}return p.next=22,this.handlePKCEForAuthenticate(this._pkceManager,Object.assign(Object.assign({},c),{token:l}));case 22:d=p.sent;case 23:return this._subscriptionService.updateStateAndTokens({state:{session:d.session,user:d.user},session_token:d.session_token,session_jwt:d.session_jwt,intermediate_session_token:null}),p.abrupt("return",xr(d));case 25:case"end":return p.stop()}},f,this,[[6,12]])}))}}return Qr(t,[{key:"getCodeChallenge",value:function(){return Ee(this,void 0,void 0,ie().mark(function r(){var n;return ie().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,this._pkceManager.getPKPair();case 2:if(n=s.sent,!n){s.next=5;break}return s.abrupt("return",n.code_challenge);case 5:return s.next=7,this._pkceManager.startPKCETransaction();case 7:return n=s.sent,s.abrupt("return",n.code_challenge);case 9:case"end":return s.stop()}},r,this)}))}},{key:"handlePKCEForAuthenticate",value:function(r,n){return Ee(this,void 0,void 0,ie().mark(function i(){var s,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,r.getPKPair();case 2:return s=c.sent,o=Object.assign({code_verifier:s==null?void 0:s.code_verifier},n),c.next=6,this._networkClient.fetchSDK({url:"/magic_links/authenticate",body:o,errorMessage:"Failed to authenticate token.",method:"POST"});case 6:return a=c.sent,r.clearPKPair(),c.abrupt("return",a);case 9:case"end":return c.stop()}},i,this)}))}}]),t}(),die=Qr(function t(e,r){var n=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return Promise.resolve(void 0)},s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Dv();Jr(this,t),this._networkClient=e,this._subscriptionService=r,this.executeRecaptcha=i,this.dfpProtectedAuth=s,this.sms={loginOrCreate:function(a,l){return Ee(n,void 0,void 0,ie().mark(function c(){var f,u,d,h;return ie().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return f=m.sent,u=f.dfp_telemetry_id,d=f.captcha_token,h=Object.assign(Object.assign({},l),{phone_number:a,captcha_token:d,dfp_telemetry_id:u}),m.abrupt("return",this._networkClient.retriableFetchSDK({url:"/otps/sms/login_or_create",body:h,errorMessage:"Failed to send one time passcode",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 7:case"end":return m.stop()}},c,this)}))},send:function(a,l){return Ee(n,void 0,void 0,ie().mark(function c(){var f,u,d,h,p,m;return ie().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return f=b.sent,u=f.dfp_telemetry_id,d=f.captcha_token,h=Object.assign(Object.assign({},l),{phone_number:a,captcha_token:d,dfp_telemetry_id:u}),p=!!this._subscriptionService.getSession(),m=p?"/otps/sms/send/secondary":"/otps/sms/send/primary",b.abrupt("return",this._networkClient.retriableFetchSDK({url:m,body:h,errorMessage:"Failed to send one time passcode",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 9:case"end":return b.stop()}},c,this)}))}},this.whatsapp={loginOrCreate:function(a,l){return Ee(n,void 0,void 0,ie().mark(function c(){var f,u,d,h;return ie().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return f=m.sent,u=f.dfp_telemetry_id,d=f.captcha_token,h=Object.assign(Object.assign({},l),{phone_number:a,dfp_telemetry_id:u,captcha_token:d}),m.abrupt("return",this._networkClient.retriableFetchSDK({url:"/otps/whatsapp/login_or_create",body:h,errorMessage:"Failed to send one time passcode",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 7:case"end":return m.stop()}},c,this)}))},send:function(a,l){return Ee(n,void 0,void 0,ie().mark(function c(){var f,u,d,h,p,m;return ie().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return f=b.sent,u=f.dfp_telemetry_id,d=f.captcha_token,h=Object.assign(Object.assign({},l),{phone_number:a,captcha_token:d,dfp_telemetry_id:u}),p=!!this._subscriptionService.getSession(),m=p?"/otps/whatsapp/send/secondary":"/otps/whatsapp/send/primary",b.abrupt("return",this._networkClient.retriableFetchSDK({url:m,body:h,errorMessage:"Failed to send one time passcode",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 9:case"end":return b.stop()}},c,this)}))}},this.email={loginOrCreate:function(a,l){return Ee(n,void 0,void 0,ie().mark(function c(){var f,u;return ie().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,this.executeRecaptcha();case 2:return f=h.sent,u=Object.assign(Object.assign({},l),{email:a,captcha_token:f}),h.abrupt("return",this._networkClient.fetchSDK({url:"/otps/email/login_or_create",body:u,errorMessage:"Failed to send one time passcode",method:"POST"}));case 5:case"end":return h.stop()}},c,this)}))},send:function(a,l){return Ee(n,void 0,void 0,ie().mark(function c(){var f,u,d,h;return ie().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this.executeRecaptcha();case 2:return f=m.sent,u=Object.assign(Object.assign({},l),{email:a,captcha_token:f}),d=!!this._subscriptionService.getSession(),h=d?"/otps/email/send/secondary":"/otps/email/send/primary",m.abrupt("return",this._networkClient.fetchSDK({url:h,body:u,errorMessage:"Failed to send one time passcode",method:"POST"}));case 7:case"end":return m.stop()}},c,this)}))}},this.authenticate=function(o,a,l){return Ee(n,void 0,void 0,ie().mark(function c(){var f,u,d,h,p;return ie().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return lr("stytch.otps.authenticate").isString("Code",o).isNumber("session_duration_minutes",l.session_duration_minutes),x.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return f=x.sent,u=f.dfp_telemetry_id,d=f.captcha_token,h=Object.assign({token:o,method_id:a,dfp_telemetry_id:u,captcha_token:d},l),x.next=9,this._networkClient.retriableFetchSDK({url:"/otps/authenticate",body:h,errorMessage:"Failed to authenticate token.",method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 9:return p=x.sent,this._subscriptionService.updateStateAndTokens({state:{session:p.session,user:p.user},session_token:p.session_token,session_jwt:p.session_jwt,intermediate_session_token:null}),x.abrupt("return",xr(p));case 12:case"end":return x.stop()}},c,this)}))}}),hie=function(){function t(e,r,n,i,s){Jr(this,t),this._networkClient=e,this._subscriptionService=r,this._pkceManager=n,this._dynamicConfig=i,this._config=s,this.google={start:this.startOAuthFlow(hr.Google)},this.apple={start:this.startOAuthFlow(hr.Apple)},this.microsoft={start:this.startOAuthFlow(hr.Microsoft)},this.github={start:this.startOAuthFlow(hr.Github)},this.gitlab={start:this.startOAuthFlow(hr.GitLab)},this.facebook={start:this.startOAuthFlow(hr.Facebook)},this.discord={start:this.startOAuthFlow(hr.Discord)},this.salesforce={start:this.startOAuthFlow(hr.Salesforce)},this.slack={start:this.startOAuthFlow(hr.Slack)},this.amazon={start:this.startOAuthFlow(hr.Amazon)},this.bitbucket={start:this.startOAuthFlow(hr.Bitbucket)},this.linkedin={start:this.startOAuthFlow(hr.LinkedIn)},this.coinbase={start:this.startOAuthFlow(hr.Coinbase)},this.twitch={start:this.startOAuthFlow(hr.Twitch)},this.twitter={start:this.startOAuthFlow(hr.Twitter)},this.tiktok={start:this.startOAuthFlow(hr.TikTok)},this.snapchat={start:this.startOAuthFlow(hr.Snapchat)},this.figma={start:this.startOAuthFlow(hr.Figma)},this.yahoo={start:this.startOAuthFlow(hr.Yahoo)}}return Qr(t,[{key:"authenticate",value:function(r,n){return Ee(this,void 0,void 0,ie().mark(function i(){var s,o;return ie().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return lr("stytch.oauth.authenticate").isString("Token",r).isNumber("session_duration_minutes",n.session_duration_minutes),l.next=3,this._pkceManager.getPKPair();case 3:return s=l.sent,s||vs.warn(`No code verifier found in local storage for OAuth flow. Consider using stytch.oauth.$provider.start() to add PKCE to your OAuth flows for added security. -See https://stytch.com/docs/oauth#guides_pkce for more information.`),l.next=7,this._networkClient.fetchSDK({url:"/oauth/authenticate",method:"POST",body:Object.assign({token:r,code_verifier:s==null?void 0:s.code_verifier},n),errorMessage:"Failed to authenticate token"});case 7:return o=l.sent,this._pkceManager.clearPKPair(),this._subscriptionService.updateStateAndTokens({state:{session:o.session,user:Ji(o.__user)},session_token:o.session_token,session_jwt:o.session_jwt,intermediate_session_token:null}),l.abrupt("return",xr(o));case 11:case"end":return l.stop()}},i,this)}))}},{key:"getBaseApiUrl",value:function(){return Ae(this,void 0,void 0,ie().mark(function r(){var n,i;return ie().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this._dynamicConfig;case 2:if(n=o.sent,i=n.cnameDomain,!i){o.next=6;break}return o.abrupt("return","https://".concat(i));case 6:if(!Xne(this._config.publicToken)){o.next=8;break}return o.abrupt("return",this._config.testAPIURL);case 8:return o.abrupt("return",this._config.liveAPIURL);case 9:case"end":return o.stop()}},r,this)}))}},{key:"startOAuthFlow",value:function(r){var n=this;return function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=i.login_redirect_url,o=i.signup_redirect_url,a=i.custom_scopes,l=i.provider_params;return Ae(n,void 0,void 0,ie().mark(function c(){var f,u,d,h,p,m,x;return ie().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this._dynamicConfig;case 2:return f=w.sent,u=f.cnameDomain,d=f.pkceRequiredForOAuth,w.next=7,this.getBaseApiUrl();case 7:if(h=w.sent,this._networkClient.logEvent({name:"start_oauth_flow",details:{provider_type:r,custom_scopes:a,cname_domain:u,pkce:d,provider_params:l}}),p=new URL("".concat(h,"/v1/public/oauth/").concat(r,"/start")),p.searchParams.set("public_token",this._config.publicToken),!d){w.next=18;break}return w.next=14,this._pkceManager.startPKCETransaction();case 14:m=w.sent,p.searchParams.set("code_challenge",m.code_challenge),w.next=19;break;case 18:this._pkceManager.clearPKPair();case 19:if(a&&(lr("startOAuthFlow").isStringArray("custom_scopes",a),p.searchParams.set("custom_scopes",a.join(" "))),l){lr("startOAuthFlow").isOptionalObject("provider_params",l);for(x in l)p.searchParams.set("provider_"+x,l[x])}s&&p.searchParams.set("login_redirect_url",s),o&&p.searchParams.set("signup_redirect_url",o),window.location.href=p.toString();case 24:case"end":return w.stop()}},c,this)}))}}}]),t}(),vie=function(){function t(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return Promise.resolve(void 0)},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Nv();Jr(this,t),this._networkClient=e,this._subscriptionService=r,this.executeRecaptcha=n,this.dfpProtectedAuth=i}return Qr(t,[{key:"authenticateStart",value:function(r){return Ae(this,void 0,void 0,ie().mark(function n(){var i,s,o;return ie().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return lr("stytch.cryptoWallets.authenticateStart").isString("crypto_wallet_address",r.crypto_wallet_address).isString("crypto_wallet_type",r.crypto_wallet_type),i=!!this._subscriptionService.getSession(),l.next=4,this.executeRecaptcha();case 4:return s=l.sent,o=i?"/crypto_wallets/authenticate/start/secondary":"/crypto_wallets/authenticate/start/primary",l.abrupt("return",this._networkClient.fetchSDK({url:o,method:"POST",errorMessage:"Failed to start wallet authentication.",body:{crypto_wallet_address:r.crypto_wallet_address,crypto_wallet_type:r.crypto_wallet_type,captcha_token:s}}));case 7:case"end":return l.stop()}},n,this)}))}},{key:"authenticate",value:function(r){return Ae(this,void 0,void 0,ie().mark(function n(){var i,s,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return lr("stytch.cryptoWallets.authenticate").isString("signature",r.signature).isString("crypto_wallet_address",r.crypto_wallet_address).isString("crypto_wallet_type",r.crypto_wallet_type).isNumber("session_duration_minutes",r.session_duration_minutes),c.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return i=c.sent,s=i.dfp_telemetry_id,o=i.captcha_token,c.next=8,this._networkClient.retriableFetchSDK({url:"/crypto_wallets/authenticate",method:"POST",errorMessage:"Failed to authenticate.",body:{session_duration_minutes:r.session_duration_minutes,crypto_wallet_address:r.crypto_wallet_address,crypto_wallet_type:r.crypto_wallet_type,signature:r.signature,captcha_token:o,dfp_telemetry_id:s},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=c.sent,this._subscriptionService.updateStateAndTokens({state:{session:a.session,user:Ji(a.__user)},session_token:a.session_token,session_jwt:a.session_jwt,intermediate_session_token:null}),c.abrupt("return",xr(a));case 11:case"end":return c.stop()}},n,this)}))}}]),t}(),pie=function(){function t(e,r,n){Jr(this,t),this._networkClient=e,this._subscriptionService=r,this.dfpProtectedAuth=n}return Qr(t,[{key:"create",value:function(r){return Ae(this,void 0,void 0,ie().mark(function n(){var i;return ie().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return lr("stytch.totps.create").isNumber("expiration_minutes",r.expiration_minutes),o.next=3,this._networkClient.fetchSDK({url:"/totps",method:"POST",errorMessage:"Failed to create TOTP",body:{expiration_minutes:r.expiration_minutes}});case 3:return i=o.sent,this._subscriptionService.updateUser(i.__user),o.abrupt("return",xr(i));case 6:case"end":return o.stop()}},n,this)}))}},{key:"authenticate",value:function(r){return Ae(this,void 0,void 0,ie().mark(function n(){var i,s,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return lr("stytch.totps.authenticate").isNumber("session_duration_minutes",r.session_duration_minutes).isString("totp_code",r.totp_code),c.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return i=c.sent,s=i.dfp_telemetry_id,o=i.captcha_token,c.next=8,this._networkClient.retriableFetchSDK({url:"/totps/authenticate",method:"POST",errorMessage:"Failed to authenticate TOTP",body:{session_duration_minutes:r.session_duration_minutes,totp_code:r.totp_code,captcha_token:o,dfp_telemetry_id:s},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=c.sent,this._subscriptionService.updateStateAndTokens({state:{session:a.session,user:a.__user},session_token:a.session_token,session_jwt:a.session_jwt,intermediate_session_token:null}),c.abrupt("return",xr(a));case 11:case"end":return c.stop()}},n,this)}))}},{key:"recoveryCodes",value:function(){return Ae(this,void 0,void 0,ie().mark(function r(){return ie().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",this._networkClient.fetchSDK({url:"/totps/recovery_codes",method:"POST",errorMessage:"Failed to retrieve recovery codes"}));case 1:case"end":return i.stop()}},r,this)}))}},{key:"recover",value:function(r){return Ae(this,void 0,void 0,ie().mark(function n(){var i,s,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return lr("stytch.totps.recover").isNumber("session_duration_minutes",r.session_duration_minutes).isString("recovery_code",r.recovery_code),c.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return i=c.sent,s=i.dfp_telemetry_id,o=i.captcha_token,c.next=8,this._networkClient.retriableFetchSDK({url:"/totps/recover",method:"POST",errorMessage:"Failed to recover TOTP",body:{session_duration_minutes:r.session_duration_minutes,recovery_code:r.recovery_code,captcha_token:o,dfp_telemetry_id:s},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=c.sent,this._subscriptionService.updateStateAndTokens({state:{session:a.session,user:a.__user},session_token:a.session_token,session_jwt:a.session_jwt,intermediate_session_token:null}),c.abrupt("return",xr(a));case 11:case"end":return c.stop()}},n,this)}))}}]),t}();function fP(t){for(var e="==".slice(0,(4-t.length%4)%4),r=t.replace(/-/g,"+").replace(/_/g,"/")+e,n=atob(r),i=new ArrayBuffer(n.length),s=new Uint8Array(i),o=0;o with `"webauthn"` in its `autocomplete` attribute was detected'),!1):!0}}return Qr(t,[{key:"register",value:function(r){var n,i;return Ae(this,void 0,void 0,ie().mark(function s(){var o,a,l,c,f;return ie().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return lr("stytch.webauthn.register").isOptionalString("domain",r==null?void 0:r.domain).isOptionalString("authenticator_type",r==null?void 0:r.authenticator_type).isOptionalBoolean("is_passkey",r==null?void 0:r.is_passkey).isOptionalNumber("session_duration_minutes",r==null?void 0:r.session_duration_minutes),d.next=3,this._networkClient.fetchSDK({url:"/webauthn/register/start",method:"POST",errorMessage:"Failed to start WebAuthn registration",body:{domain:(n=r==null?void 0:r.domain)!==null&&n!==void 0?n:window.location.hostname,authenticator_type:(i=r==null?void 0:r.authenticator_type)!==null&&i!==void 0?i:void 0,return_passkey_credential_options:r==null?void 0:r.is_passkey,user_agent:navigator.userAgent}});case 3:return o=d.sent,a=o.public_key_credential_creation_options,l=JSON.parse(a),d.next=8,Aie({publicKey:l});case 8:return c=d.sent,d.next=11,this._networkClient.fetchSDK({url:"/webauthn/register",method:"POST",errorMessage:"Failed to register WebAuthn device",body:{public_key_credential:JSON.stringify(c),session_duration_minutes:r==null?void 0:r.session_duration_minutes}});case 11:return f=d.sent,this._subscriptionService.updateStateAndTokens({state:{session:f.session,user:f.__user},session_token:f.session_token,session_jwt:f.session_jwt,intermediate_session_token:null}),d.abrupt("return",xr(f));case 14:case"end":return d.stop()}},s,this)}))}},{key:"authenticate",value:function(r){var n,i;return Ae(this,void 0,void 0,ie().mark(function s(){var o,a,l,c,f,u,d,h,p,m,x,b;return ie().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return lr("stytch.webauthn.authenticate").isOptionalString("domain",r.domain).isNumber("session_duration_minutes",r.session_duration_minutes).isOptionalBoolean("is_passkey",r.is_passkey).isOptionalObject("signal",r.signal),A.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:if(o=A.sent,a=o.dfp_telemetry_id,l=o.captcha_token,!r.conditional_mediation){A.next=14;break}return A.next=9,this.browserSupportsAutofill();case 9:if(A.sent){A.next=12;break}return console.error("Browser does not support WebAuthn autofill"),A.abrupt("return",null);case 12:if(this.checkEligibleInputs()){A.next=14;break}return A.abrupt("return",null);case 14:return c=!!this._subscriptionService.getSession(),f=c?"/webauthn/authenticate/start/secondary":"/webauthn/authenticate/start/primary",A.next=18,this._networkClient.fetchSDK({url:f,method:"POST",errorMessage:"Failed to start WebAuthn authentication",body:{domain:(n=r.domain)!==null&&n!==void 0?n:window.location.hostname,return_passkey_credential_options:r==null?void 0:r.is_passkey}});case 18:return u=A.sent,d=u.public_key_credential_request_options,h=new AbortController,p={publicKey:JSON.parse(d),signal:(i=r.signal)!==null&&i!==void 0?i:h.signal},m=Object.assign(Object.assign({},p),{mediation:"conditional"}),A.next=25,Cie(r.conditional_mediation?m:p);case 25:return x=A.sent,A.next=28,this._networkClient.retriableFetchSDK({url:"/webauthn/authenticate",method:"POST",errorMessage:"Failed to authenticate WebAuthn device",body:{public_key_credential:JSON.stringify(x),session_duration_minutes:r.session_duration_minutes,dfp_telemetry_id:a,captcha_token:l},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 28:return b=A.sent,this._subscriptionService.updateStateAndTokens({state:{session:b.session,user:b.__user},session_token:b.session_token,session_jwt:b.session_jwt,intermediate_session_token:null}),A.abrupt("return",xr(b));case 31:case"end":return A.stop()}},s,this)}))}},{key:"update",value:function(r){return Ae(this,void 0,void 0,ie().mark(function n(){var i;return ie().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return i="/webauthn/update/"+r.webauthn_registration_id,o.next=3,this._networkClient.fetchSDK({url:i,method:"PUT",errorMessage:"Failed to update WebAuthn Registration",body:{name:r.name}});case 3:return o.abrupt("return",o.sent);case 4:case"end":return o.stop()}},n,this)}))}},{key:"browserSupportsAutofill",value:function(){return Ae(this,void 0,void 0,ie().mark(function r(){var n;return ie().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(n=window.PublicKeyCredential,!(n===void 0||n.isConditionalMediationAvailable===void 0)){s.next=3;break}return s.abrupt("return",new Promise(function(o){return o(!1)}));case 3:return s.abrupt("return",n.isConditionalMediationAvailable());case 4:case"end":return s.stop()}},r)}))}}]),t}(),Tie=Promise.resolve({pkceRequiredForPasswordResets:!1}),Pie=function(){function t(e,r,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Tie,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Nv();Jr(this,t),this._networkClient=e,this._subscriptionService=r,this._pkceManager=n,this._config=i,this.dfpProtectedAuth=s}return Qr(t,[{key:"getCodeChallenge",value:function(){return Ae(this,void 0,void 0,ie().mark(function r(){var n,i,s;return ie().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this._config;case 2:if(n=a.sent,i=n.pkceRequiredForPasswordResets,i){a.next=6;break}return a.abrupt("return",void 0);case 6:return a.next=8,this._pkceManager.getPKPair();case 8:if(s=a.sent,!s){a.next=11;break}return a.abrupt("return",s.code_challenge);case 11:return a.next=13,this._pkceManager.startPKCETransaction();case 13:return s=a.sent,a.abrupt("return",s.code_challenge);case 15:case"end":return a.stop()}},r,this)}))}},{key:"create",value:function(r){return Ae(this,void 0,void 0,ie().mark(function n(){var i,s,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return lr("stytch.passwords.create").isString("password",r.password).isString("email",r.email).isNumber("session_duration_minutes",r.session_duration_minutes),c.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return i=c.sent,s=i.dfp_telemetry_id,o=i.captcha_token,c.next=8,this._networkClient.retriableFetchSDK({url:"/passwords",method:"POST",errorMessage:"Failed to create password.",body:{email:r.email,password:r.password,session_duration_minutes:r.session_duration_minutes,captcha_token:o,dfp_telemetry_id:s},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=c.sent,this._subscriptionService.updateStateAndTokens({state:{session:a.session,user:a.user},session_token:a.session_token,session_jwt:a.session_jwt,intermediate_session_token:null}),c.abrupt("return",xr(a));case 11:case"end":return c.stop()}},n,this)}))}},{key:"authenticate",value:function(r){return Ae(this,void 0,void 0,ie().mark(function n(){var i,s,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return lr("stytch.passwords.authenticate").isString("password",r.password).isString("email",r.email).isNumber("session_duration_minutes",r.session_duration_minutes),c.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return i=c.sent,s=i.dfp_telemetry_id,o=i.captcha_token,c.next=8,this._networkClient.retriableFetchSDK({url:"/passwords/authenticate",method:"POST",errorMessage:"Failed to authenticate password.",body:{email:r.email,password:r.password,session_duration_minutes:r.session_duration_minutes,captcha_token:o,dfp_telemetry_id:s},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=c.sent,this._subscriptionService.updateStateAndTokens({state:{session:a.session,user:a.user},session_token:a.session_token,session_jwt:a.session_jwt,intermediate_session_token:null}),c.abrupt("return",xr(a));case 11:case"end":return c.stop()}},n,this)}))}},{key:"resetByEmailStart",value:function(r){return Ae(this,void 0,void 0,ie().mark(function n(){var i,s,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return lr("stytch.passwords.resetByEmailStart").isString("email",r.email).isOptionalString("login_redirect_url",r.login_redirect_url).isOptionalString("reset_password_redirect_url",r.reset_password_redirect_url).isOptionalString("reset_password_template_id",r.reset_password_template_id).isOptionalNumber("reset_password_expiration_minutes",r.reset_password_expiration_minutes),c.next=3,this.getCodeChallenge();case 3:return i=c.sent,c.next=6,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 6:return s=c.sent,o=s.dfp_telemetry_id,a=s.captcha_token,c.abrupt("return",this._networkClient.retriableFetchSDK({url:"/passwords/email/reset/start",method:"POST",errorMessage:"Failed to start password reset flow.",body:{email:r.email,login_redirect_url:r.login_redirect_url,reset_password_redirect_url:r.reset_password_redirect_url,reset_password_expiration_minutes:r.reset_password_expiration_minutes,reset_password_template_id:r.reset_password_template_id,code_challenge:i,captcha_token:a,dfp_telemetry_id:o},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 10:case"end":return c.stop()}},n,this)}))}},{key:"resetByEmail",value:function(r){return Ae(this,void 0,void 0,ie().mark(function n(){var i,s,o,a,l,c;return ie().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return lr("stytch.passwords.resetByEmail").isString("token",r.token).isString("password",r.password).isNumber("session_duration_minutes",r.session_duration_minutes),u.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return i=u.sent,s=i.dfp_telemetry_id,o=i.captcha_token,u.next=8,this._pkceManager.getPKPair();case 8:return a=u.sent,l=a==null?void 0:a.code_verifier,u.next=12,this._networkClient.retriableFetchSDK({url:"/passwords/email/reset",method:"POST",errorMessage:"Failed to reset password.",body:{token:r.token,password:r.password,session_duration_minutes:r.session_duration_minutes,captcha_token:o,code_verifier:l,dfp_telemetry_id:s},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 12:return c=u.sent,this._pkceManager.clearPKPair(),this._subscriptionService.updateStateAndTokens({state:{session:c.session,user:c.user},session_token:c.session_token,session_jwt:c.session_jwt,intermediate_session_token:null}),u.abrupt("return",xr(c));case 16:case"end":return u.stop()}},n,this)}))}},{key:"resetByExistingPassword",value:function(r){return Ae(this,void 0,void 0,ie().mark(function n(){var i,s,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return lr("stytch.passwords.resetByExistingPassword").isString("email",r.email).isString("existing_password",r.existing_password).isString("new_password",r.new_password).isNumber("session_duration_minutes",r.session_duration_minutes),c.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return i=c.sent,s=i.dfp_telemetry_id,o=i.captcha_token,c.next=8,this._networkClient.retriableFetchSDK({url:"/passwords/existing_password/reset",method:"POST",errorMessage:"Failed to reset password.",body:{email:r.email,existing_password:r.existing_password,new_password:r.new_password,session_duration_minutes:r.session_duration_minutes,dfp_telemetry_id:s,captcha_token:o},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=c.sent,this._subscriptionService.updateStateAndTokens({state:{session:a.session,user:a.user},session_token:a.session_token,session_jwt:a.session_jwt,intermediate_session_token:null}),c.abrupt("return",xr(a));case 11:case"end":return c.stop()}},n,this)}))}},{key:"resetBySession",value:function(r){return Ae(this,void 0,void 0,ie().mark(function n(){var i,s,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return lr("stytch.passwords.resetBySession").isString("password",r.password),c.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return i=c.sent,s=i.dfp_telemetry_id,o=i.captcha_token,c.next=8,this._networkClient.retriableFetchSDK({url:"/passwords/session/reset",method:"POST",errorMessage:"Failed to reset by session.",body:{password:r.password,session_duration_minutes:r.session_duration_minutes,dfp_telemetry_id:s,captcha_token:o},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=c.sent,this._subscriptionService.updateStateAndTokens({state:{session:a.session,user:a.user},session_token:a.session_token,session_jwt:a.session_jwt,intermediate_session_token:null}),c.abrupt("return",a);case 11:case"end":return c.stop()}},n,this)}))}},{key:"strengthCheck",value:function(r){return Ae(this,void 0,void 0,ie().mark(function n(){return ie().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return lr("stytch.passwords.strengthCheck").isOptionalString("email",r.email).isString("password",r.password),s.abrupt("return",this._networkClient.fetchSDK({url:"/passwords/strength_check",method:"POST",errorMessage:"Failed to check password strength.",body:{email:r.email,password:r.password}}));case 2:case"end":return s.stop()}},n,this)}))}}]),t}();Promise.resolve({pkceRequiredForEmailMagicLinks:!1});Promise.resolve({pkceRequiredForPasswordResets:!1});var Rie=function(){function t(e){Jr(this,t),this.iframeURL=e,this.createIframe()}return Qr(t,[{key:"createIframe",value:function(){var r=document.querySelector('[src~="'.concat(this.iframeURL,'"]'));if(r?vs.warn("It looks like you're creating multiple copies of the Stytch client. This behavior is unsupported, and unintended side effects may occur. Make sure you are creating the Stytch client at the global level, and not inside a component's render function."):(r=document.createElement("iframe"),r.src=this.iframeURL,r.style.position="absolute",r.style.width="0",r.style.height="0",r.style.border="0",document.body.appendChild(r)),r.dataset.loaded==="true"){this.frame=Promise.resolve(r);return}this.frame=new Promise(function(n){r.addEventListener("load",function(){r.dataset.loaded="true",n(r)},{once:!0})})}},{key:"call",value:function(r,n){return Ae(this,void 0,void 0,ie().mark(function i(){var s=this,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.frame;case 2:return o=c.sent,a=new MessageChannel,c.abrupt("return",new Promise(function(f,u){var d;a.port1.onmessage=function(p){var m=p.data;a.port1.close(),m.success?f(m.payload):u(iie.unmarshall(m.error))};var h={method:r,args:n};(d=o.contentWindow)===null||d===void 0||d.postMessage(h,s.iframeURL,[a.port2])}));case 5:case"end":return c.stop()}},i,this)}))}}]),t}(),_ie=function(){function t(e,r){Jr(this,t),this._networkClient=e,this.dfpProtectedAuth=r}return Qr(t,[{key:"searchUser",value:function(r){var n=this;return this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha().then(function(i){var s=i.dfp_telemetry_id,o=i.captcha_token;return n._networkClient.fetchSDK({url:"/users/search",method:"POST",body:{email:r,dfp_telemetry_id:s,captcha_token:o},errorMessage:"Error searching for user ".concat(r)})})}},{key:"searchMember",value:function(r,n){return this._networkClient.fetchSDK({url:"/b2b/organizations/members/search",method:"POST",body:{email_address:r,organization_id:n},errorMessage:"Error searching for member ".concat(r)})}}]),t}(),Iie=function(e){return!!(e!=null&&e.session)},pP=function(){function t(e,r){var n=this;Jr(this,t),this._subscriptionService=e,this._headlessSessionClient=r,this._onDataChange=function(i){Iie(i)?n.scheduleBackgroundRefresh():n.cancelBackgroundRefresh()},this._reauthenticateWithBackoff=function(){return Ae(n,void 0,void 0,ie().mark(function i(){var s;return ie().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:s=0;case 1:return a.prev=2,a.next=5,this._headlessSessionClient.authenticate();case 5:return a.abrupt("return",a.sent);case 8:if(a.prev=8,a.t0=a.catch(2),!t.isUnrecoverableError(a.t0)){a.next=12;break}return a.abrupt("return",Promise.reject(a.t0));case 12:return s++,a.next=15,new Promise(function(l){return setTimeout(l,t.timeoutForAttempt(s))});case 15:a.next=1;break;case 17:case"end":return a.stop()}},i,this,[[2,8]])}))},this.timeout=null,this._subscriptionService.subscribeToState(this._onDataChange)}return Qr(t,[{key:"performBackgroundRefresh",value:function(){var r=this;this._reauthenticateWithBackoff().then(function(){r.scheduleBackgroundRefresh()}).catch(function(n){vs.warn("Session background refresh failed. Signalling to app that user is logged out.",{error:n}),r._subscriptionService.destroySession()})}},{key:"scheduleBackgroundRefresh",value:function(){var r=this;this.cancelBackgroundRefresh(),this.timeout=setTimeout(function(){r.performBackgroundRefresh()},t.REFRESH_INTERVAL_MS)}},{key:"cancelBackgroundRefresh",value:function(){this.timeout!==null&&(clearTimeout(this.timeout),this.timeout=null)}}],[{key:"timeoutForAttempt",value:function(r){r=Math.min(r,7);var n=Math.floor(Math.random()*350)-175,i=2e3*Math.pow(2,r);return n+i}},{key:"isUnrecoverableError",value:function(r){return Am.includes(r.error_type)}}]),t}();pP.REFRESH_INTERVAL_MS=1e3*60*3;var Oie=Qr(function t(e,r){var n=this;Jr(this,t),this._subscriptionService=e,this.emptyState=r,this.onStateChange=function(i){return n._subscriptionService.subscribeToState(function(s){i(s??n.emptyState)})}}),ck="bootstrap",mp=function(){return{displayWatermark:!1,cnameDomain:null,emailDomains:["stytch.com"],captchaSettings:{enabled:!1},pkceRequiredForEmailMagicLinks:!1,pkceRequiredForPasswordResets:!1,pkceRequiredForOAuth:!1,pkceRequiredForSso:!1,slugPattern:null,createOrganizationEnabled:!1,passwordConfig:null,runDFPProtectedAuth:!1,rbacPolicy:null}},Mie=function(){function t(e,r,n){var i=this;Zn(this,t),this._publicToken=e,this._networkClient=r,this._dataLayer=n,this._bootstrapDataPromise=this._networkClient.fetchSDK({url:"/projects/bootstrap/".concat(this._publicToken),method:"GET",errorMessage:"Error fetching bootstrap data for SDK for ".concat(this._publicToken)}).then(t.mapBootstrapData).then(function(s){return i._dataLayer.setItem(ck,JSON.stringify(s)),s}).catch(function(s){return vs.error(s),mp()})}return ei(t,[{key:"getSync",value:function(){var r=this._dataLayer.getItem(ck);if(r===null)return mp();try{return JSON.parse(r)}catch{return mp()}}},{key:"getAsync",value:function(){return this._bootstrapDataPromise}}],[{key:"mapBootstrapData",value:function(r){var n,i,s=r.password_config!==null?{ludsComplexity:r.password_config.luds_complexity,ludsMinimumCount:r.password_config.luds_minimum_count}:null;return{displayWatermark:!r.disable_sdk_watermark,captchaSettings:r.captcha_settings,cnameDomain:r.cname_domain,emailDomains:r.email_domains,pkceRequiredForEmailMagicLinks:r.pkce_required_for_email_magic_links,pkceRequiredForPasswordResets:r.pkce_required_for_password_resets,pkceRequiredForOAuth:r.pkce_required_for_oauth,pkceRequiredForSso:r.pkce_required_for_sso,slugPattern:r.slug_pattern,createOrganizationEnabled:r.create_organization_enabled,passwordConfig:s,runDFPProtectedAuth:(n=r.dfp_protected_auth_enabled)!==null&&n!==void 0?n:!1,dfpProtectedAuthMode:r.dfp_protected_auth_mode,rbacPolicy:(i=r.rbac_policy)!==null&&i!==void 0?i:null}}}]),t}();function ji(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})}var Nie=function(e){return Aw("https://www.google.com/recaptcha/enterprise.js?render=".concat(e),function(){return window.grecaptcha.enterprise})},Die=ei(function t(e){var r=this;Zn(this,t),this.bootstrapPromise=e,this.executeRecaptcha=function(){return ji(r,void 0,void 0,er().mark(function n(){var i,s,o,a;return er().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.state;case 2:if(i=c.sent,s=i.captchaClient,o=i.configured,a=i.siteKey,o){c.next=8;break}return c.abrupt("return",void 0);case 8:return c.next=10,new Promise(function(f){return s.ready(f)});case 10:return c.abrupt("return",s.execute(a,{action:"LOGIN"}));case 11:case"end":return c.stop()}},n,this)}))},this.state=e.then(function(n){return ji(r,void 0,void 0,er().mark(function i(){return er().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(n.captchaSettings.enabled){o.next=2;break}return o.abrupt("return",{configured:!1});case 2:return o.next=4,Nie(n.captchaSettings.siteKey);case 4:return o.t0=o.sent,o.t1=n.captchaSettings.siteKey,o.abrupt("return",{configured:!0,captchaClient:o.t0,siteKey:o.t1});case 7:case"end":return o.stop()}},i)}))})}),Lie=function(){function t(e){var r=this;Zn(this,t),this.iframeURL=e,this.oneTapStart=function(n){return r.call("oneTapStart",n)},this.oneTapSubmit=function(n){return r.call("oneTapSubmit",n)},this.parsedPhoneNumber=function(n){return r.call("parsedPhoneNumber",n)}}return ei(t,[{key:"frameClient",get:function(){var r;return this._frameClient=(r=this._frameClient)!==null&&r!==void 0?r:new Rie(this.iframeURL),this._frameClient}},{key:"call",value:function(r,n){return this.frameClient.call(r,[n])}}]),t}(),jie=function(t){yw(e,t);function e(r,n,i,s,o,a){var l;return Zn(this,e),l=pw(this,e,[r,n,i,s,o]),l._oneTap=a,l.startOneTap=function(c){return ji(tP(l),void 0,void 0,er().mark(function f(){var u,d,h;return er().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this._oneTap.createOneTapClient();case 2:if(u=m.sent,u.success){m.next=5;break}throw new Error("One Tap could not load: ".concat(u.reason));case 5:return d=u.client,h=this._oneTap.createOnSuccessHandler({signupRedirectUrl:c.signup_redirect_url,loginRedirectUrl:c.login_redirect_url,onSuccess:this._oneTap.RedirectOnSuccess}),m.abrupt("return",d.render({style:{position:Ta.floating},onOneTapCancelled:c.onOneTapCancelled,callback:h}));case 8:case"end":return m.stop()}},f,this)}))},l.googleOneTap={start:l.startOneTap},l}return ei(e)}(hie),Fie="4.14.0",Bie=function(){function t(e,r,n,i){Zn(this,t),this._publicToken=e,this._subscriptionDataLayer=r,this.baseURL=n,this.additionalTelemetryDataFn=i,this.updateSessionToken=function(){return null},this.eventLogger=new aie({maxBatchSize:sie,intervalDurationMs:oie,logEventURL:this.buildSDKUrl("/events")})}return ei(t,[{key:"logEvent",value:function(r){var n=r.name,i=r.details,s=r.error,o=s===void 0?{}:s;this.eventLogger.logEvent(this.createTelemetryBlob(),{public_token:this._publicToken,event_name:n,details:i,error_code:o.error_code,error_description:o.error_description,http_status_code:o.http_status_code})}},{key:"createTelemetryBlob",value:function(){return Object.assign(Object.assign({event_id:Zne(),app_session_id:eie(),persistent_id:tie(),client_sent_at:new Date().toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone},this.additionalTelemetryDataFn()),{app:{identifier:window.location.hostname},sdk:{identifier:"Stytch.js Javascript SDK",version:Fie}})}},{key:"fetchSDK",value:function(r){var n=r.url,i=r.body,s=r.errorMessage,o=r.method;return ji(this,void 0,void 0,er().mark(function a(){var l,c,f,u;return er().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return l=this._subscriptionDataLayer.readSessionCookie().session_token,c="Basic "+window.btoa(this._publicToken+":"+(l||this._publicToken)),f=window.btoa(JSON.stringify(this.createTelemetryBlob())),u=window.location.origin,h.abrupt("return",Sm({basicAuthHeader:c,body:i,errorMessage:s,finalURL:this.buildSDKUrl(n),method:o,xSDKClientHeader:f,xSDKParentHostHeader:u}));case 5:case"end":return h.stop()}},a,this)}))}},{key:"retriableFetchSDK",value:function(r){var n=r.url,i=r.body,s=r.errorMessage,o=r.method,a=r.retryCallback;return ji(this,void 0,void 0,er().mark(function l(){var c,f,u,d;return er().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return c=this._subscriptionDataLayer.readSessionCookie().session_token,f="Basic "+window.btoa(this._publicToken+":"+(c||this._publicToken)),u=window.btoa(JSON.stringify(this.createTelemetryBlob())),d=window.location.origin,p.abrupt("return",Bne({basicAuthHeader:f,body:i,errorMessage:s,finalURL:this.buildSDKUrl(n),method:o,xSDKClientHeader:u,xSDKParentHostHeader:d,retryCallback:a}));case 5:case"end":return p.stop()}},l,this)}))}},{key:"buildSDKUrl",value:function(r){return"".concat(this.baseURL,"/sdk/v1").concat(r)}}]),t}(),$ie=typeof window<"u"&&"IdentityCredential"in window,yP=function(e){return e===Ta.forceLegacyEmbedded?"force":e===Ta.embeddedOnly||e===Ta.embedded||e===Ta.floatingOrEmbedded},Uie=function(e){var r=yP(e);return r==="force"||r&&!$ie},zie=function(){function t(e,r){Zn(this,t),this._googleClient=e,this._clientId=r}return ei(t,[{key:"cancel",value:function(){this._googleClient.cancel()}},{key:"render",value:function(r){var n=r.callback,i=r.onOneTapCancelled,s=r.style;return ji(this,void 0,void 0,er().mark(function o(){var a=this,l,c,f;return er().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l=yP(s.position),c=Uie(s.position),f={client_id:this._clientId,callback:n,auto_select:!1,context:"use",itp_support:!0,use_fedcm_for_prompt:l!=="force"},c&&(f.prompt_parent_id="google-parent-prompt",f.cancel_on_tap_outside=!1),this._googleClient.initialize(f),d.abrupt("return",new Promise(function(h){a._googleClient.prompt(function(p){var m,x,b,w,A;if(p.isSkippedMoment()){var R=(x=(m=p.getSkippedReason)===null||m===void 0?void 0:m.call(p))!==null&&x!==void 0?x:"unknown_reason";return R==="user_cancel"&&(i==null||i()),h({success:!1,reason:R})}if(!p.isNotDisplayed&&c||!((b=p.isNotDisplayed)===null||b===void 0)&&b.call(p))return h({success:!1,reason:(A=(w=p.getNotDisplayedReason)===null||w===void 0?void 0:w.call(p))!==null&&A!==void 0?A:"unknown_reason"});if(!p.isDismissedMoment())return a.styleFrame(c),h({success:!0})})}));case 6:case"end":return d.stop()}},o,this)}))}},{key:"styleFrame",value:function(r){r&&Array.from(document.getElementsByTagName("iframe")).forEach(function(n){n.src.includes(aP)&&(n.style.width="100%")})}}]),t}(),Vie=function(){return Aw(Fne,function(){return window.google.accounts.id})},Hie=function(){function t(e,r){var n=this;Zn(this,t),this._publicToken=e,this.clientsideServices=r,this.createOnSuccessHandler=function(i){var s=i.loginRedirectUrl,o=i.signupRedirectUrl,a=i.onSuccess;return function(l){return ji(n,void 0,void 0,er().mark(function c(){var f,u,d;return er().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return f=l.credential,p.next=3,this.submitGoogleOneTapToken({credential:f,loginRedirectUrl:s,signupRedirectUrl:o});case 3:u=p.sent,d=u.redirect_url,a(d);case 6:case"end":return p.stop()}},c,this)}))}},this.RedirectOnSuccess=function(i){window.location.href=i}}return ei(t,[{key:"createOneTapClient",value:function(){return ji(this,void 0,void 0,er().mark(function r(){var n,i,s,o;return er().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.prev=0,l.next=3,this.fetchGoogleStart();case 3:i=l.sent,n=i.googleClientId,l.next=11;break;case 7:return l.prev=7,l.t0=l.catch(0),s=l.t0,l.abrupt("return",{success:!1,reason:s.error_type});case 11:if(n!==""){l.next=13;break}return l.abrupt("return",{success:!1,reason:"oauth_config_not_found"});case 13:return l.t1=zie,l.next=16,Vie();case 16:return l.t2=l.sent,l.t3=n,o=new l.t1(l.t2,l.t3),l.abrupt("return",{success:!0,client:o});case 20:case"end":return l.stop()}},r,this,[[0,7]])}))}},{key:"fetchGoogleStart",value:function(){return this.googleConfig?this.googleConfig:(this.googleConfig=this.clientsideServices.oneTapStart({publicToken:this._publicToken}),this.googleConfig)}},{key:"submitGoogleOneTapToken",value:function(r){var n=r.credential,i=r.loginRedirectUrl,s=r.signupRedirectUrl;return ji(this,void 0,void 0,er().mark(function o(){var a,l;return er().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.fetchGoogleStart();case 2:return a=f.sent,l=a.oauthCallbackId,f.abrupt("return",this.clientsideServices.oneTapSubmit({publicToken:this._publicToken,idToken:n,loginRedirectURL:i,oauthCallbackID:l,signupRedirectURL:s}));case 5:case"end":return f.stop()}},o,this)}))}}],[{key:"WillGoogleOneTapShowBannerForUA",value:function(r){var n=function(a,l){return a.indexOf(l)!==-1},i=n(r,"iPad")||n(r,"Android")&&!n(r,"Mobile")||n(r,"Silk"),s=n(r,"iPod")||n(r,"iPhone")||n(r,"Android")||n(r,"IEMobile");return!i&&s}},{key:"WillGoogleOneTapShowEmbedded",value:function(){return!t.WillGoogleOneTapShowBannerForUA(navigator.userAgent)}}]),t}(),qie="PKCE_VERIFIER";function Wie(t){var e=t.toString(16);return e.length===1&&(e="0"+e),e}function Gie(t){var e;return btoa((e=String.fromCharCode).call.apply(e,[null].concat(lne(new Uint8Array(t))))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}var gp=function(){function t(e,r){Zn(this,t),this._dataLayer=e,this.namespace=r}return ei(t,[{key:"key",value:function(){return qie+":"+this.namespace}},{key:"startPKCETransaction",value:function(){return ji(this,void 0,void 0,er().mark(function r(){var n;return er().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,t.createProofkeyPair();case 2:return n=s.sent,this._dataLayer.setItem(this.key(),JSON.stringify(n)),s.abrupt("return",n);case 5:case"end":return s.stop()}},r,this)}))}},{key:"getPKPair",value:function(){var r=this._dataLayer.getItem(this.key());if(r!==null)try{return JSON.parse(r)}catch{vs.warn("Found malformed Proof Key pair in localstorage.");return}}},{key:"clearPKPair",value:function(){return this._dataLayer.removeItem(this.key())}}],[{key:"createProofkeyPair",value:function(){return ji(this,void 0,void 0,er().mark(function r(){var n,i,s;return er().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return n=new Uint32Array(16),window.crypto.getRandomValues(n),i=Array.from(n).map(Wie).join(""),a.next=5,window.crypto.subtle.digest("SHA-256",new TextEncoder().encode(i));case 5:return s=a.sent,a.abrupt("return",{code_challenge:Gie(s),code_verifier:i});case 7:case"end":return a.stop()}},r)}))}}]),t}(),Kie=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.KEYS_TO_EXCLUDE,n=r===void 0?[]:r,i=function s(o,a){return Li(o)!==Li(a)?!1:o===null||a===null?o===a:Li(o)==="object"?Object.keys(o).length!==Object.keys(a).length||Object.keys(o).some(function(l){return!(l in a)})?!1:Object.entries(o).filter(function(l){var c=gm(l,1),f=c[0];return!n.includes(f)}).every(function(l){var c=gm(l,2),f=c[0],u=c[1];return s(u,a[f])}):o===a};return i},Yie=function(){return!!(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))},Qie=function(e){var r,n,i,s,o,a,l,c,f,u;return{cookieOptions:e==null?void 0:e.cookieOptions,endpoints:{sdkBackendURL:(n=(r=e==null?void 0:e.endpoints)===null||r===void 0?void 0:r.sdkBackendURL)!==null&&n!==void 0?n:Dne,testAPIURL:(s=(i=e==null?void 0:e.endpoints)===null||i===void 0?void 0:i.testAPIURL)!==null&&s!==void 0?s:One,liveAPIURL:(a=(o=e==null?void 0:e.endpoints)===null||o===void 0?void 0:o.liveAPIURL)!==null&&a!==void 0?a:Mne,dfpBackendURL:(c=(l=e==null?void 0:e.endpoints)===null||l===void 0?void 0:l.dfpBackendURL)!==null&&c!==void 0?c:Lne,clientsideServicesIframeURL:(u=(f=e==null?void 0:e.endpoints)===null||f===void 0?void 0:f.clientsideServicesIframeURL)!==null&&u!==void 0?u:Nne}}},Fd=function(e){var r=document.cookie?document.cookie.split("; "):[],n=r.filter(function(i){var s=i.split("="),o=gm(s,1),a=o[0];return e===a});return n.length>1},Jie="stytch_sdk_state_",Ts=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"".concat(Jie).concat(e).concat(r?"::".concat(r):"")};/*! js-cookie v3.0.1 | MIT */function Bd(t){for(var e=1;e"u")){o=Bd({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,o[l]!==!0&&(a+="="+o[l].split(";")[0]));return document.cookie=i+"="+t.write(s,i)+a}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var s=document.cookie?document.cookie.split("; "):[],o={},a=0;a1&&arguments[1]!==void 0?arguments[1]:!1,i=this._datalayer.state,s=r===null?null:Object.assign(Object.assign({},this._datalayer.state),r);this._datalayer.state=s;var o=this.getFromCache();this.setCacheRefreshed();var a=!uk(i,s);(o||a)&&(fk(this._datalayer.subscriptions,s),a&&!n&&this._datalayer.syncToLocalStorage())}},{key:"updateTokens",value:function(r){var n=r.session_token,i=r.session_jwt,s=this._datalayer.readSessionCookie(),o=Object.assign(Object.assign({},s),{session_token:n,session_jwt:i});n||i?(this._datalayer.writeSessionCookie(o),this._datalayer.removeISTCookie()):this._datalayer.removeSessionCookie()}},{key:"subscribeToState",value:function(r){return ose(this._datalayer.subscriptions,r)}},{key:"getState",value:function(){return this._datalayer.state}},{key:"destroy",value:function(){window.removeEventListener("storage",this._listen)}},{key:"syncFromDeviceStorage",value:function(){return null}},{key:"getFromCache",value:function(){return this.fromCache}},{key:"setCacheRefreshed",value:function(){this.fromCache=!1}}]),t}(),lse=function(t){yw(e,t);function e(){var r;return Zn(this,e),r=pw(this,e,arguments),r.updateUser=function(n){return r.updateState({user:n})},r.getUser=function(){var n,i;return(i=(n=r.getState())===null||n===void 0?void 0:n.user)!==null&&i!==void 0?i:null},r.getSession=function(){var n,i;return(i=(n=r.getState())===null||n===void 0?void 0:n.session)!==null&&i!==void 0?i:null},r}return ei(e)}(ase),cse=Symbol.for("stytch__internal_b2c"),fse=function(e,r){Object.assign(e,ine({},cse,r))},use=ei(function t(e,r){var n=this;Zn(this,t),Jne("StytchHeadlessClient"),Qne(e);var i=r,s=Qie(i);this._dataLayer=sse(e,i),this._subscriptionService=new lse(e,this._dataLayer),this._stateChangeClient=new Oie(this._subscriptionService,{}),this.onStateChange=function(){var p;return(p=n._stateChangeClient).onStateChange.apply(p,arguments)};var o=function(){var m,x,b,w;return{stytch_user_id:(x=(m=n._dataLayer.state)===null||m===void 0?void 0:m.user)===null||x===void 0?void 0:x.user_id,stytch_session_id:(w=(b=n._dataLayer.state)===null||b===void 0?void 0:b.session)===null||w===void 0?void 0:w.session_id}},a=new gp(this._dataLayer,"passwords");this._networkClient=new Bie(e,this._dataLayer,s.endpoints.sdkBackendURL,o);var l=new Mie(e,this._networkClient,this._dataLayer),c=new Die(l.getAsync()),f=new nie(e,s.endpoints.dfpBackendURL,l.getAsync(),c.executeRecaptcha),u=new Lie(s.endpoints.clientsideServicesIframeURL),d=new Hie(e,u),h=new _ie(this._networkClient,f);this.user=new lie(this._networkClient,this._subscriptionService),this.session=new cie(this._networkClient,this._subscriptionService),this.magicLinks=new uie(this._networkClient,this._subscriptionService,new gp(this._dataLayer,"magic_links"),a,l.getAsync(),f),this.otps=new die(this._networkClient,this._subscriptionService,c.executeRecaptcha,f),this.oauth=new jie(this._networkClient,this._subscriptionService,new gp(this._dataLayer,"oauth"),l.getAsync(),{publicToken:e,testAPIURL:s.endpoints.testAPIURL,liveAPIURL:s.endpoints.liveAPIURL},d),this.cryptoWallets=new vie(this._networkClient,this._subscriptionService,c.executeRecaptcha,f),this.totps=new pie(this._networkClient,this._subscriptionService,f),this.webauthn=new kie(this._networkClient,this._subscriptionService,f),this.passwords=new Pie(this._networkClient,this._subscriptionService,a,l.getAsync(),f),this._sessionManager=new pP(this._subscriptionService,this.session),this._dataLayer.readSessionCookie().session_token&&this._sessionManager.performBackgroundRefresh(),this._networkClient.logEvent({name:"sdk_instance_instantiated",details:{event_callback_registered:!1,error_callback_registered:!1,success_callback_registered:!1}}),fse(this,{bootstrap:l,clientsideServices:u,captcha:c,oneTap:d,searchManager:h,publicToken:e,dataLayer:this._dataLayer,networkClient:this._networkClient})});const dk={}.VITE_STYTCH_PUBLIC_TOKEN;function dse({children:t}){return dk?D.jsx(Lre,{stytch:new use(dk),children:t}):t}const hse="970987756660-35a6tc48hvi8cev9cnknp0iugv9poa23.apps.googleusercontent.com",hk="970987756660-6ibakd38eibf3cg9rq42hri7o0jn5va8.apps.googleusercontent.com",vse="AQAAAAAAAEGv4rUgioUNUbcdNZlvOZE72JI",pse="eyJwcm9qZWN0SWQiOjE2ODE1LCJlbWFpbFJlZ2lvbiI6ImNhLWNlbnRyYWwtMSIsImVtYWlsQ2xpZW50SWQiOiI2N2V2NXVvc3ZxMzVmcGI2OXI3NnJoYnVoIiwicnBjU2VydmVyIjoiaHR0cHM6Ly93YWFzLnNlcXVlbmNlLmFwcCJ9",vk="AQAAAAAAAAK2JvvZhWqZ51riasWBftkrVXE",pk="eyJwcm9qZWN0SWQiOjY5NCwicnBjU2VydmVyIjoiaHR0cHM6Ly9kZXYtd2Fhcy5zZXF1ZW5jZS5hcHAiLCJlbWFpbFJlZ2lvbiI6ImNhLWNlbnRyYWwtMSIsImVtYWlsQ2xpZW50SWQiOiI1NGF0bjV1cGk2M3FjNTlhMWVtM3ZiaHJzbiJ9";new I9("https://nodes.sequence.app/polygon");const Dv=new URLSearchParams(window.location.search),yse=Dv.get("env")??"prod";let xP=Dv.get("projectAccessKey")??vse,bP=Dv.get("waasConfigKey")??pse,wP=Dv.get("googleClientId")??hse;yse==="dev"&&(console.log("Using dev environment"),console.log(`Project Access Key: ${vk}`),console.log(`Waas Config Key: ${pk}`),console.log(`Google Client ID: ${hk}`),xP=vk,bP=pk,wP=hk);const Re=new Are({network:"polygon",projectAccessKey:xP,waasConfigKey:bP}),Ii=AV([{path:"/login",element:D.jsx($re,{})},{path:"/",element:D.jsx(nne,{})}]);wp.createRoot(document.getElementById("root")).render(D.jsx(pr.StrictMode,{children:D.jsx(MB,{children:D.jsx(XU,{children:D.jsx(DV,{clientId:wP,children:D.jsx(dse,{children:D.jsx(IV,{router:Ii})})})})})})); +See https://stytch.com/docs/oauth#guides_pkce for more information.`),l.next=7,this._networkClient.fetchSDK({url:"/oauth/authenticate",method:"POST",body:Object.assign({token:r,code_verifier:s==null?void 0:s.code_verifier},n),errorMessage:"Failed to authenticate token"});case 7:return o=l.sent,this._pkceManager.clearPKPair(),this._subscriptionService.updateStateAndTokens({state:{session:o.session,user:Ji(o.__user)},session_token:o.session_token,session_jwt:o.session_jwt,intermediate_session_token:null}),l.abrupt("return",xr(o));case 11:case"end":return l.stop()}},i,this)}))}},{key:"getBaseApiUrl",value:function(){return Ee(this,void 0,void 0,ie().mark(function r(){var n,i;return ie().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this._dynamicConfig;case 2:if(n=o.sent,i=n.cnameDomain,!i){o.next=6;break}return o.abrupt("return","https://".concat(i));case 6:if(!Xne(this._config.publicToken)){o.next=8;break}return o.abrupt("return",this._config.testAPIURL);case 8:return o.abrupt("return",this._config.liveAPIURL);case 9:case"end":return o.stop()}},r,this)}))}},{key:"startOAuthFlow",value:function(r){var n=this;return function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=i.login_redirect_url,o=i.signup_redirect_url,a=i.custom_scopes,l=i.provider_params;return Ee(n,void 0,void 0,ie().mark(function c(){var f,u,d,h,p,m,x;return ie().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this._dynamicConfig;case 2:return f=w.sent,u=f.cnameDomain,d=f.pkceRequiredForOAuth,w.next=7,this.getBaseApiUrl();case 7:if(h=w.sent,this._networkClient.logEvent({name:"start_oauth_flow",details:{provider_type:r,custom_scopes:a,cname_domain:u,pkce:d,provider_params:l}}),p=new URL("".concat(h,"/v1/public/oauth/").concat(r,"/start")),p.searchParams.set("public_token",this._config.publicToken),!d){w.next=18;break}return w.next=14,this._pkceManager.startPKCETransaction();case 14:m=w.sent,p.searchParams.set("code_challenge",m.code_challenge),w.next=19;break;case 18:this._pkceManager.clearPKPair();case 19:if(a&&(lr("startOAuthFlow").isStringArray("custom_scopes",a),p.searchParams.set("custom_scopes",a.join(" "))),l){lr("startOAuthFlow").isOptionalObject("provider_params",l);for(x in l)p.searchParams.set("provider_"+x,l[x])}s&&p.searchParams.set("login_redirect_url",s),o&&p.searchParams.set("signup_redirect_url",o),window.location.href=p.toString();case 24:case"end":return w.stop()}},c,this)}))}}}]),t}(),vie=function(){function t(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return Promise.resolve(void 0)},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Dv();Jr(this,t),this._networkClient=e,this._subscriptionService=r,this.executeRecaptcha=n,this.dfpProtectedAuth=i}return Qr(t,[{key:"authenticateStart",value:function(r){return Ee(this,void 0,void 0,ie().mark(function n(){var i,s,o;return ie().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return lr("stytch.cryptoWallets.authenticateStart").isString("crypto_wallet_address",r.crypto_wallet_address).isString("crypto_wallet_type",r.crypto_wallet_type),i=!!this._subscriptionService.getSession(),l.next=4,this.executeRecaptcha();case 4:return s=l.sent,o=i?"/crypto_wallets/authenticate/start/secondary":"/crypto_wallets/authenticate/start/primary",l.abrupt("return",this._networkClient.fetchSDK({url:o,method:"POST",errorMessage:"Failed to start wallet authentication.",body:{crypto_wallet_address:r.crypto_wallet_address,crypto_wallet_type:r.crypto_wallet_type,captcha_token:s}}));case 7:case"end":return l.stop()}},n,this)}))}},{key:"authenticate",value:function(r){return Ee(this,void 0,void 0,ie().mark(function n(){var i,s,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return lr("stytch.cryptoWallets.authenticate").isString("signature",r.signature).isString("crypto_wallet_address",r.crypto_wallet_address).isString("crypto_wallet_type",r.crypto_wallet_type).isNumber("session_duration_minutes",r.session_duration_minutes),c.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return i=c.sent,s=i.dfp_telemetry_id,o=i.captcha_token,c.next=8,this._networkClient.retriableFetchSDK({url:"/crypto_wallets/authenticate",method:"POST",errorMessage:"Failed to authenticate.",body:{session_duration_minutes:r.session_duration_minutes,crypto_wallet_address:r.crypto_wallet_address,crypto_wallet_type:r.crypto_wallet_type,signature:r.signature,captcha_token:o,dfp_telemetry_id:s},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=c.sent,this._subscriptionService.updateStateAndTokens({state:{session:a.session,user:Ji(a.__user)},session_token:a.session_token,session_jwt:a.session_jwt,intermediate_session_token:null}),c.abrupt("return",xr(a));case 11:case"end":return c.stop()}},n,this)}))}}]),t}(),pie=function(){function t(e,r,n){Jr(this,t),this._networkClient=e,this._subscriptionService=r,this.dfpProtectedAuth=n}return Qr(t,[{key:"create",value:function(r){return Ee(this,void 0,void 0,ie().mark(function n(){var i;return ie().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return lr("stytch.totps.create").isNumber("expiration_minutes",r.expiration_minutes),o.next=3,this._networkClient.fetchSDK({url:"/totps",method:"POST",errorMessage:"Failed to create TOTP",body:{expiration_minutes:r.expiration_minutes}});case 3:return i=o.sent,this._subscriptionService.updateUser(i.__user),o.abrupt("return",xr(i));case 6:case"end":return o.stop()}},n,this)}))}},{key:"authenticate",value:function(r){return Ee(this,void 0,void 0,ie().mark(function n(){var i,s,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return lr("stytch.totps.authenticate").isNumber("session_duration_minutes",r.session_duration_minutes).isString("totp_code",r.totp_code),c.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return i=c.sent,s=i.dfp_telemetry_id,o=i.captcha_token,c.next=8,this._networkClient.retriableFetchSDK({url:"/totps/authenticate",method:"POST",errorMessage:"Failed to authenticate TOTP",body:{session_duration_minutes:r.session_duration_minutes,totp_code:r.totp_code,captcha_token:o,dfp_telemetry_id:s},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=c.sent,this._subscriptionService.updateStateAndTokens({state:{session:a.session,user:a.__user},session_token:a.session_token,session_jwt:a.session_jwt,intermediate_session_token:null}),c.abrupt("return",xr(a));case 11:case"end":return c.stop()}},n,this)}))}},{key:"recoveryCodes",value:function(){return Ee(this,void 0,void 0,ie().mark(function r(){return ie().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",this._networkClient.fetchSDK({url:"/totps/recovery_codes",method:"POST",errorMessage:"Failed to retrieve recovery codes"}));case 1:case"end":return i.stop()}},r,this)}))}},{key:"recover",value:function(r){return Ee(this,void 0,void 0,ie().mark(function n(){var i,s,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return lr("stytch.totps.recover").isNumber("session_duration_minutes",r.session_duration_minutes).isString("recovery_code",r.recovery_code),c.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return i=c.sent,s=i.dfp_telemetry_id,o=i.captcha_token,c.next=8,this._networkClient.retriableFetchSDK({url:"/totps/recover",method:"POST",errorMessage:"Failed to recover TOTP",body:{session_duration_minutes:r.session_duration_minutes,recovery_code:r.recovery_code,captcha_token:o,dfp_telemetry_id:s},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=c.sent,this._subscriptionService.updateStateAndTokens({state:{session:a.session,user:a.__user},session_token:a.session_token,session_jwt:a.session_jwt,intermediate_session_token:null}),c.abrupt("return",xr(a));case 11:case"end":return c.stop()}},n,this)}))}}]),t}();function fP(t){for(var e="==".slice(0,(4-t.length%4)%4),r=t.replace(/-/g,"+").replace(/_/g,"/")+e,n=atob(r),i=new ArrayBuffer(n.length),s=new Uint8Array(i),o=0;o with `"webauthn"` in its `autocomplete` attribute was detected'),!1):!0}}return Qr(t,[{key:"register",value:function(r){var n,i;return Ee(this,void 0,void 0,ie().mark(function s(){var o,a,l,c,f;return ie().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return lr("stytch.webauthn.register").isOptionalString("domain",r==null?void 0:r.domain).isOptionalString("authenticator_type",r==null?void 0:r.authenticator_type).isOptionalBoolean("is_passkey",r==null?void 0:r.is_passkey).isOptionalNumber("session_duration_minutes",r==null?void 0:r.session_duration_minutes),d.next=3,this._networkClient.fetchSDK({url:"/webauthn/register/start",method:"POST",errorMessage:"Failed to start WebAuthn registration",body:{domain:(n=r==null?void 0:r.domain)!==null&&n!==void 0?n:window.location.hostname,authenticator_type:(i=r==null?void 0:r.authenticator_type)!==null&&i!==void 0?i:void 0,return_passkey_credential_options:r==null?void 0:r.is_passkey,user_agent:navigator.userAgent}});case 3:return o=d.sent,a=o.public_key_credential_creation_options,l=JSON.parse(a),d.next=8,Eie({publicKey:l});case 8:return c=d.sent,d.next=11,this._networkClient.fetchSDK({url:"/webauthn/register",method:"POST",errorMessage:"Failed to register WebAuthn device",body:{public_key_credential:JSON.stringify(c),session_duration_minutes:r==null?void 0:r.session_duration_minutes}});case 11:return f=d.sent,this._subscriptionService.updateStateAndTokens({state:{session:f.session,user:f.__user},session_token:f.session_token,session_jwt:f.session_jwt,intermediate_session_token:null}),d.abrupt("return",xr(f));case 14:case"end":return d.stop()}},s,this)}))}},{key:"authenticate",value:function(r){var n,i;return Ee(this,void 0,void 0,ie().mark(function s(){var o,a,l,c,f,u,d,h,p,m,x,b;return ie().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return lr("stytch.webauthn.authenticate").isOptionalString("domain",r.domain).isNumber("session_duration_minutes",r.session_duration_minutes).isOptionalBoolean("is_passkey",r.is_passkey).isOptionalObject("signal",r.signal),E.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:if(o=E.sent,a=o.dfp_telemetry_id,l=o.captcha_token,!r.conditional_mediation){E.next=14;break}return E.next=9,this.browserSupportsAutofill();case 9:if(E.sent){E.next=12;break}return console.error("Browser does not support WebAuthn autofill"),E.abrupt("return",null);case 12:if(this.checkEligibleInputs()){E.next=14;break}return E.abrupt("return",null);case 14:return c=!!this._subscriptionService.getSession(),f=c?"/webauthn/authenticate/start/secondary":"/webauthn/authenticate/start/primary",E.next=18,this._networkClient.fetchSDK({url:f,method:"POST",errorMessage:"Failed to start WebAuthn authentication",body:{domain:(n=r.domain)!==null&&n!==void 0?n:window.location.hostname,return_passkey_credential_options:r==null?void 0:r.is_passkey}});case 18:return u=E.sent,d=u.public_key_credential_request_options,h=new AbortController,p={publicKey:JSON.parse(d),signal:(i=r.signal)!==null&&i!==void 0?i:h.signal},m=Object.assign(Object.assign({},p),{mediation:"conditional"}),E.next=25,Cie(r.conditional_mediation?m:p);case 25:return x=E.sent,E.next=28,this._networkClient.retriableFetchSDK({url:"/webauthn/authenticate",method:"POST",errorMessage:"Failed to authenticate WebAuthn device",body:{public_key_credential:JSON.stringify(x),session_duration_minutes:r.session_duration_minutes,dfp_telemetry_id:a,captcha_token:l},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 28:return b=E.sent,this._subscriptionService.updateStateAndTokens({state:{session:b.session,user:b.__user},session_token:b.session_token,session_jwt:b.session_jwt,intermediate_session_token:null}),E.abrupt("return",xr(b));case 31:case"end":return E.stop()}},s,this)}))}},{key:"update",value:function(r){return Ee(this,void 0,void 0,ie().mark(function n(){var i;return ie().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return i="/webauthn/update/"+r.webauthn_registration_id,o.next=3,this._networkClient.fetchSDK({url:i,method:"PUT",errorMessage:"Failed to update WebAuthn Registration",body:{name:r.name}});case 3:return o.abrupt("return",o.sent);case 4:case"end":return o.stop()}},n,this)}))}},{key:"browserSupportsAutofill",value:function(){return Ee(this,void 0,void 0,ie().mark(function r(){var n;return ie().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(n=window.PublicKeyCredential,!(n===void 0||n.isConditionalMediationAvailable===void 0)){s.next=3;break}return s.abrupt("return",new Promise(function(o){return o(!1)}));case 3:return s.abrupt("return",n.isConditionalMediationAvailable());case 4:case"end":return s.stop()}},r)}))}}]),t}(),Tie=Promise.resolve({pkceRequiredForPasswordResets:!1}),Pie=function(){function t(e,r,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Tie,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Dv();Jr(this,t),this._networkClient=e,this._subscriptionService=r,this._pkceManager=n,this._config=i,this.dfpProtectedAuth=s}return Qr(t,[{key:"getCodeChallenge",value:function(){return Ee(this,void 0,void 0,ie().mark(function r(){var n,i,s;return ie().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this._config;case 2:if(n=a.sent,i=n.pkceRequiredForPasswordResets,i){a.next=6;break}return a.abrupt("return",void 0);case 6:return a.next=8,this._pkceManager.getPKPair();case 8:if(s=a.sent,!s){a.next=11;break}return a.abrupt("return",s.code_challenge);case 11:return a.next=13,this._pkceManager.startPKCETransaction();case 13:return s=a.sent,a.abrupt("return",s.code_challenge);case 15:case"end":return a.stop()}},r,this)}))}},{key:"create",value:function(r){return Ee(this,void 0,void 0,ie().mark(function n(){var i,s,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return lr("stytch.passwords.create").isString("password",r.password).isString("email",r.email).isNumber("session_duration_minutes",r.session_duration_minutes),c.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return i=c.sent,s=i.dfp_telemetry_id,o=i.captcha_token,c.next=8,this._networkClient.retriableFetchSDK({url:"/passwords",method:"POST",errorMessage:"Failed to create password.",body:{email:r.email,password:r.password,session_duration_minutes:r.session_duration_minutes,captcha_token:o,dfp_telemetry_id:s},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=c.sent,this._subscriptionService.updateStateAndTokens({state:{session:a.session,user:a.user},session_token:a.session_token,session_jwt:a.session_jwt,intermediate_session_token:null}),c.abrupt("return",xr(a));case 11:case"end":return c.stop()}},n,this)}))}},{key:"authenticate",value:function(r){return Ee(this,void 0,void 0,ie().mark(function n(){var i,s,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return lr("stytch.passwords.authenticate").isString("password",r.password).isString("email",r.email).isNumber("session_duration_minutes",r.session_duration_minutes),c.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return i=c.sent,s=i.dfp_telemetry_id,o=i.captcha_token,c.next=8,this._networkClient.retriableFetchSDK({url:"/passwords/authenticate",method:"POST",errorMessage:"Failed to authenticate password.",body:{email:r.email,password:r.password,session_duration_minutes:r.session_duration_minutes,captcha_token:o,dfp_telemetry_id:s},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=c.sent,this._subscriptionService.updateStateAndTokens({state:{session:a.session,user:a.user},session_token:a.session_token,session_jwt:a.session_jwt,intermediate_session_token:null}),c.abrupt("return",xr(a));case 11:case"end":return c.stop()}},n,this)}))}},{key:"resetByEmailStart",value:function(r){return Ee(this,void 0,void 0,ie().mark(function n(){var i,s,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return lr("stytch.passwords.resetByEmailStart").isString("email",r.email).isOptionalString("login_redirect_url",r.login_redirect_url).isOptionalString("reset_password_redirect_url",r.reset_password_redirect_url).isOptionalString("reset_password_template_id",r.reset_password_template_id).isOptionalNumber("reset_password_expiration_minutes",r.reset_password_expiration_minutes),c.next=3,this.getCodeChallenge();case 3:return i=c.sent,c.next=6,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 6:return s=c.sent,o=s.dfp_telemetry_id,a=s.captcha_token,c.abrupt("return",this._networkClient.retriableFetchSDK({url:"/passwords/email/reset/start",method:"POST",errorMessage:"Failed to start password reset flow.",body:{email:r.email,login_redirect_url:r.login_redirect_url,reset_password_redirect_url:r.reset_password_redirect_url,reset_password_expiration_minutes:r.reset_password_expiration_minutes,reset_password_template_id:r.reset_password_template_id,code_challenge:i,captcha_token:a,dfp_telemetry_id:o},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}));case 10:case"end":return c.stop()}},n,this)}))}},{key:"resetByEmail",value:function(r){return Ee(this,void 0,void 0,ie().mark(function n(){var i,s,o,a,l,c;return ie().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return lr("stytch.passwords.resetByEmail").isString("token",r.token).isString("password",r.password).isNumber("session_duration_minutes",r.session_duration_minutes),u.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return i=u.sent,s=i.dfp_telemetry_id,o=i.captcha_token,u.next=8,this._pkceManager.getPKPair();case 8:return a=u.sent,l=a==null?void 0:a.code_verifier,u.next=12,this._networkClient.retriableFetchSDK({url:"/passwords/email/reset",method:"POST",errorMessage:"Failed to reset password.",body:{token:r.token,password:r.password,session_duration_minutes:r.session_duration_minutes,captcha_token:o,code_verifier:l,dfp_telemetry_id:s},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 12:return c=u.sent,this._pkceManager.clearPKPair(),this._subscriptionService.updateStateAndTokens({state:{session:c.session,user:c.user},session_token:c.session_token,session_jwt:c.session_jwt,intermediate_session_token:null}),u.abrupt("return",xr(c));case 16:case"end":return u.stop()}},n,this)}))}},{key:"resetByExistingPassword",value:function(r){return Ee(this,void 0,void 0,ie().mark(function n(){var i,s,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return lr("stytch.passwords.resetByExistingPassword").isString("email",r.email).isString("existing_password",r.existing_password).isString("new_password",r.new_password).isNumber("session_duration_minutes",r.session_duration_minutes),c.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return i=c.sent,s=i.dfp_telemetry_id,o=i.captcha_token,c.next=8,this._networkClient.retriableFetchSDK({url:"/passwords/existing_password/reset",method:"POST",errorMessage:"Failed to reset password.",body:{email:r.email,existing_password:r.existing_password,new_password:r.new_password,session_duration_minutes:r.session_duration_minutes,dfp_telemetry_id:s,captcha_token:o},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=c.sent,this._subscriptionService.updateStateAndTokens({state:{session:a.session,user:a.user},session_token:a.session_token,session_jwt:a.session_jwt,intermediate_session_token:null}),c.abrupt("return",xr(a));case 11:case"end":return c.stop()}},n,this)}))}},{key:"resetBySession",value:function(r){return Ee(this,void 0,void 0,ie().mark(function n(){var i,s,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return lr("stytch.passwords.resetBySession").isString("password",r.password),c.next=3,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 3:return i=c.sent,s=i.dfp_telemetry_id,o=i.captcha_token,c.next=8,this._networkClient.retriableFetchSDK({url:"/passwords/session/reset",method:"POST",errorMessage:"Failed to reset by session.",body:{password:r.password,session_duration_minutes:r.session_duration_minutes,dfp_telemetry_id:s,captcha_token:o},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 8:return a=c.sent,this._subscriptionService.updateStateAndTokens({state:{session:a.session,user:a.user},session_token:a.session_token,session_jwt:a.session_jwt,intermediate_session_token:null}),c.abrupt("return",a);case 11:case"end":return c.stop()}},n,this)}))}},{key:"strengthCheck",value:function(r){return Ee(this,void 0,void 0,ie().mark(function n(){return ie().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return lr("stytch.passwords.strengthCheck").isOptionalString("email",r.email).isString("password",r.password),s.abrupt("return",this._networkClient.fetchSDK({url:"/passwords/strength_check",method:"POST",errorMessage:"Failed to check password strength.",body:{email:r.email,password:r.password}}));case 2:case"end":return s.stop()}},n,this)}))}}]),t}();Promise.resolve({pkceRequiredForEmailMagicLinks:!1});Promise.resolve({pkceRequiredForPasswordResets:!1});var Rie=function(){function t(e){Jr(this,t),this.iframeURL=e,this.createIframe()}return Qr(t,[{key:"createIframe",value:function(){var r=document.querySelector('[src~="'.concat(this.iframeURL,'"]'));if(r?vs.warn("It looks like you're creating multiple copies of the Stytch client. This behavior is unsupported, and unintended side effects may occur. Make sure you are creating the Stytch client at the global level, and not inside a component's render function."):(r=document.createElement("iframe"),r.src=this.iframeURL,r.style.position="absolute",r.style.width="0",r.style.height="0",r.style.border="0",document.body.appendChild(r)),r.dataset.loaded==="true"){this.frame=Promise.resolve(r);return}this.frame=new Promise(function(n){r.addEventListener("load",function(){r.dataset.loaded="true",n(r)},{once:!0})})}},{key:"call",value:function(r,n){return Ee(this,void 0,void 0,ie().mark(function i(){var s=this,o,a;return ie().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.frame;case 2:return o=c.sent,a=new MessageChannel,c.abrupt("return",new Promise(function(f,u){var d;a.port1.onmessage=function(p){var m=p.data;a.port1.close(),m.success?f(m.payload):u(iie.unmarshall(m.error))};var h={method:r,args:n};(d=o.contentWindow)===null||d===void 0||d.postMessage(h,s.iframeURL,[a.port2])}));case 5:case"end":return c.stop()}},i,this)}))}}]),t}(),_ie=function(){function t(e,r){Jr(this,t),this._networkClient=e,this.dfpProtectedAuth=r}return Qr(t,[{key:"searchUser",value:function(r){var n=this;return this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha().then(function(i){var s=i.dfp_telemetry_id,o=i.captcha_token;return n._networkClient.fetchSDK({url:"/users/search",method:"POST",body:{email:r,dfp_telemetry_id:s,captcha_token:o},errorMessage:"Error searching for user ".concat(r)})})}},{key:"searchMember",value:function(r,n){return this._networkClient.fetchSDK({url:"/b2b/organizations/members/search",method:"POST",body:{email_address:r,organization_id:n},errorMessage:"Error searching for member ".concat(r)})}}]),t}(),Iie=function(e){return!!(e!=null&&e.session)},pP=function(){function t(e,r){var n=this;Jr(this,t),this._subscriptionService=e,this._headlessSessionClient=r,this._onDataChange=function(i){Iie(i)?n.scheduleBackgroundRefresh():n.cancelBackgroundRefresh()},this._reauthenticateWithBackoff=function(){return Ee(n,void 0,void 0,ie().mark(function i(){var s;return ie().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:s=0;case 1:return a.prev=2,a.next=5,this._headlessSessionClient.authenticate();case 5:return a.abrupt("return",a.sent);case 8:if(a.prev=8,a.t0=a.catch(2),!t.isUnrecoverableError(a.t0)){a.next=12;break}return a.abrupt("return",Promise.reject(a.t0));case 12:return s++,a.next=15,new Promise(function(l){return setTimeout(l,t.timeoutForAttempt(s))});case 15:a.next=1;break;case 17:case"end":return a.stop()}},i,this,[[2,8]])}))},this.timeout=null,this._subscriptionService.subscribeToState(this._onDataChange)}return Qr(t,[{key:"performBackgroundRefresh",value:function(){var r=this;this._reauthenticateWithBackoff().then(function(){r.scheduleBackgroundRefresh()}).catch(function(n){vs.warn("Session background refresh failed. Signalling to app that user is logged out.",{error:n}),r._subscriptionService.destroySession()})}},{key:"scheduleBackgroundRefresh",value:function(){var r=this;this.cancelBackgroundRefresh(),this.timeout=setTimeout(function(){r.performBackgroundRefresh()},t.REFRESH_INTERVAL_MS)}},{key:"cancelBackgroundRefresh",value:function(){this.timeout!==null&&(clearTimeout(this.timeout),this.timeout=null)}}],[{key:"timeoutForAttempt",value:function(r){r=Math.min(r,7);var n=Math.floor(Math.random()*350)-175,i=2e3*Math.pow(2,r);return n+i}},{key:"isUnrecoverableError",value:function(r){return Am.includes(r.error_type)}}]),t}();pP.REFRESH_INTERVAL_MS=1e3*60*3;var Oie=Qr(function t(e,r){var n=this;Jr(this,t),this._subscriptionService=e,this.emptyState=r,this.onStateChange=function(i){return n._subscriptionService.subscribeToState(function(s){i(s??n.emptyState)})}}),fk="bootstrap",gp=function(){return{displayWatermark:!1,cnameDomain:null,emailDomains:["stytch.com"],captchaSettings:{enabled:!1},pkceRequiredForEmailMagicLinks:!1,pkceRequiredForPasswordResets:!1,pkceRequiredForOAuth:!1,pkceRequiredForSso:!1,slugPattern:null,createOrganizationEnabled:!1,passwordConfig:null,runDFPProtectedAuth:!1,rbacPolicy:null}},Mie=function(){function t(e,r,n){var i=this;ei(this,t),this._publicToken=e,this._networkClient=r,this._dataLayer=n,this._bootstrapDataPromise=this._networkClient.fetchSDK({url:"/projects/bootstrap/".concat(this._publicToken),method:"GET",errorMessage:"Error fetching bootstrap data for SDK for ".concat(this._publicToken)}).then(t.mapBootstrapData).then(function(s){return i._dataLayer.setItem(fk,JSON.stringify(s)),s}).catch(function(s){return vs.error(s),gp()})}return ti(t,[{key:"getSync",value:function(){var r=this._dataLayer.getItem(fk);if(r===null)return gp();try{return JSON.parse(r)}catch{return gp()}}},{key:"getAsync",value:function(){return this._bootstrapDataPromise}}],[{key:"mapBootstrapData",value:function(r){var n,i,s=r.password_config!==null?{ludsComplexity:r.password_config.luds_complexity,ludsMinimumCount:r.password_config.luds_minimum_count}:null;return{displayWatermark:!r.disable_sdk_watermark,captchaSettings:r.captcha_settings,cnameDomain:r.cname_domain,emailDomains:r.email_domains,pkceRequiredForEmailMagicLinks:r.pkce_required_for_email_magic_links,pkceRequiredForPasswordResets:r.pkce_required_for_password_resets,pkceRequiredForOAuth:r.pkce_required_for_oauth,pkceRequiredForSso:r.pkce_required_for_sso,slugPattern:r.slug_pattern,createOrganizationEnabled:r.create_organization_enabled,passwordConfig:s,runDFPProtectedAuth:(n=r.dfp_protected_auth_enabled)!==null&&n!==void 0?n:!1,dfpProtectedAuthMode:r.dfp_protected_auth_mode,rbacPolicy:(i=r.rbac_policy)!==null&&i!==void 0?i:null}}}]),t}();function Fi(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})}var Nie=function(e){return Ew("https://www.google.com/recaptcha/enterprise.js?render=".concat(e),function(){return window.grecaptcha.enterprise})},Die=ti(function t(e){var r=this;ei(this,t),this.bootstrapPromise=e,this.executeRecaptcha=function(){return Fi(r,void 0,void 0,er().mark(function n(){var i,s,o,a;return er().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.state;case 2:if(i=c.sent,s=i.captchaClient,o=i.configured,a=i.siteKey,o){c.next=8;break}return c.abrupt("return",void 0);case 8:return c.next=10,new Promise(function(f){return s.ready(f)});case 10:return c.abrupt("return",s.execute(a,{action:"LOGIN"}));case 11:case"end":return c.stop()}},n,this)}))},this.state=e.then(function(n){return Fi(r,void 0,void 0,er().mark(function i(){return er().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(n.captchaSettings.enabled){o.next=2;break}return o.abrupt("return",{configured:!1});case 2:return o.next=4,Nie(n.captchaSettings.siteKey);case 4:return o.t0=o.sent,o.t1=n.captchaSettings.siteKey,o.abrupt("return",{configured:!0,captchaClient:o.t0,siteKey:o.t1});case 7:case"end":return o.stop()}},i)}))})}),Lie=function(){function t(e){var r=this;ei(this,t),this.iframeURL=e,this.oneTapStart=function(n){return r.call("oneTapStart",n)},this.oneTapSubmit=function(n){return r.call("oneTapSubmit",n)},this.parsedPhoneNumber=function(n){return r.call("parsedPhoneNumber",n)}}return ti(t,[{key:"frameClient",get:function(){var r;return this._frameClient=(r=this._frameClient)!==null&&r!==void 0?r:new Rie(this.iframeURL),this._frameClient}},{key:"call",value:function(r,n){return this.frameClient.call(r,[n])}}]),t}(),jie=function(t){yw(e,t);function e(r,n,i,s,o,a){var l;return ei(this,e),l=pw(this,e,[r,n,i,s,o]),l._oneTap=a,l.startOneTap=function(c){return Fi(tP(l),void 0,void 0,er().mark(function f(){var u,d,h;return er().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,this._oneTap.createOneTapClient();case 2:if(u=m.sent,u.success){m.next=5;break}throw new Error("One Tap could not load: ".concat(u.reason));case 5:return d=u.client,h=this._oneTap.createOnSuccessHandler({signupRedirectUrl:c.signup_redirect_url,loginRedirectUrl:c.login_redirect_url,onSuccess:this._oneTap.RedirectOnSuccess}),m.abrupt("return",d.render({style:{position:Ta.floating},onOneTapCancelled:c.onOneTapCancelled,callback:h}));case 8:case"end":return m.stop()}},f,this)}))},l.googleOneTap={start:l.startOneTap},l}return ti(e)}(hie),Fie="4.16.2",Bie=function(){function t(e,r,n,i){ei(this,t),this._publicToken=e,this._subscriptionDataLayer=r,this.baseURL=n,this.additionalTelemetryDataFn=i,this.updateSessionToken=function(){return null},this.eventLogger=new aie({maxBatchSize:sie,intervalDurationMs:oie,logEventURL:this.buildSDKUrl("/events")})}return ti(t,[{key:"logEvent",value:function(r){var n=r.name,i=r.details,s=r.error,o=s===void 0?{}:s;this.eventLogger.logEvent(this.createTelemetryBlob(),{public_token:this._publicToken,event_name:n,details:i,error_code:o.error_code,error_description:o.error_description,http_status_code:o.http_status_code})}},{key:"createTelemetryBlob",value:function(){return Object.assign(Object.assign({event_id:Zne(),app_session_id:eie(),persistent_id:tie(),client_sent_at:new Date().toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone},this.additionalTelemetryDataFn()),{app:{identifier:window.location.hostname},sdk:{identifier:"Stytch.js Javascript SDK",version:Fie}})}},{key:"fetchSDK",value:function(r){var n=r.url,i=r.body,s=r.errorMessage,o=r.method;return Fi(this,void 0,void 0,er().mark(function a(){var l,c,f,u;return er().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return l=this._subscriptionDataLayer.readSessionCookie().session_token,c="Basic "+window.btoa(this._publicToken+":"+(l||this._publicToken)),f=window.btoa(JSON.stringify(this.createTelemetryBlob())),u=window.location.origin,h.abrupt("return",Cm({basicAuthHeader:c,body:i,errorMessage:s,finalURL:this.buildSDKUrl(n),method:o,xSDKClientHeader:f,xSDKParentHostHeader:u}));case 5:case"end":return h.stop()}},a,this)}))}},{key:"retriableFetchSDK",value:function(r){var n=r.url,i=r.body,s=r.errorMessage,o=r.method,a=r.retryCallback;return Fi(this,void 0,void 0,er().mark(function l(){var c,f,u,d;return er().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return c=this._subscriptionDataLayer.readSessionCookie().session_token,f="Basic "+window.btoa(this._publicToken+":"+(c||this._publicToken)),u=window.btoa(JSON.stringify(this.createTelemetryBlob())),d=window.location.origin,p.abrupt("return",Fne({basicAuthHeader:f,body:i,errorMessage:s,finalURL:this.buildSDKUrl(n),method:o,xSDKClientHeader:u,xSDKParentHostHeader:d,retryCallback:a}));case 5:case"end":return p.stop()}},l,this)}))}},{key:"buildSDKUrl",value:function(r){return"".concat(this.baseURL,"/sdk/v1").concat(r)}}]),t}(),$ie=typeof window<"u"&&"IdentityCredential"in window,yP=function(e){return e===Ta.forceLegacyEmbedded?"force":e===Ta.embeddedOnly||e===Ta.embedded||e===Ta.floatingOrEmbedded},Uie=function(e){var r=yP(e);return r==="force"||r&&!$ie},zie=function(){function t(e,r){ei(this,t),this._googleClient=e,this._clientId=r}return ti(t,[{key:"cancel",value:function(){this._googleClient.cancel()}},{key:"render",value:function(r){var n=r.callback,i=r.onOneTapCancelled,s=r.style;return Fi(this,void 0,void 0,er().mark(function o(){var a=this,l,c,f;return er().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l=yP(s.position),c=Uie(s.position),f={client_id:this._clientId,callback:n,auto_select:!1,context:"use",itp_support:!0,use_fedcm_for_prompt:l!=="force"},c&&(f.prompt_parent_id="google-parent-prompt",f.cancel_on_tap_outside=!1),this._googleClient.initialize(f),d.abrupt("return",new Promise(function(h){a._googleClient.prompt(function(p){var m,x,b,w,E;if(p.isSkippedMoment()){var R=(x=(m=p.getSkippedReason)===null||m===void 0?void 0:m.call(p))!==null&&x!==void 0?x:"unknown_reason";return R==="user_cancel"&&(i==null||i()),h({success:!1,reason:R})}if(!p.isNotDisplayed&&c||!((b=p.isNotDisplayed)===null||b===void 0)&&b.call(p))return h({success:!1,reason:(E=(w=p.getNotDisplayedReason)===null||w===void 0?void 0:w.call(p))!==null&&E!==void 0?E:"unknown_reason"});if(!p.isDismissedMoment())return a.styleFrame(c),h({success:!0})})}));case 6:case"end":return d.stop()}},o,this)}))}},{key:"styleFrame",value:function(r){r&&Array.from(document.getElementsByTagName("iframe")).forEach(function(n){n.src.includes(aP)&&(n.style.width="100%")})}}]),t}(),Vie=function(){return Ew(jne,function(){return window.google.accounts.id})},qie=function(){function t(e,r){var n=this;ei(this,t),this._publicToken=e,this.clientsideServices=r,this.createOnSuccessHandler=function(i){var s=i.loginRedirectUrl,o=i.signupRedirectUrl,a=i.onSuccess;return function(l){return Fi(n,void 0,void 0,er().mark(function c(){var f,u,d;return er().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return f=l.credential,p.next=3,this.submitGoogleOneTapToken({credential:f,loginRedirectUrl:s,signupRedirectUrl:o});case 3:u=p.sent,d=u.redirect_url,a(d);case 6:case"end":return p.stop()}},c,this)}))}},this.RedirectOnSuccess=function(i){window.location.href=i}}return ti(t,[{key:"createOneTapClient",value:function(){return Fi(this,void 0,void 0,er().mark(function r(){var n,i,s,o;return er().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.prev=0,l.next=3,this.fetchGoogleStart();case 3:i=l.sent,n=i.googleClientId,l.next=11;break;case 7:return l.prev=7,l.t0=l.catch(0),s=l.t0,l.abrupt("return",{success:!1,reason:s.error_type});case 11:if(n!==""){l.next=13;break}return l.abrupt("return",{success:!1,reason:"oauth_config_not_found"});case 13:return l.t1=zie,l.next=16,Vie();case 16:return l.t2=l.sent,l.t3=n,o=new l.t1(l.t2,l.t3),l.abrupt("return",{success:!0,client:o});case 20:case"end":return l.stop()}},r,this,[[0,7]])}))}},{key:"fetchGoogleStart",value:function(){return this.googleConfig?this.googleConfig:(this.googleConfig=this.clientsideServices.oneTapStart({publicToken:this._publicToken}),this.googleConfig)}},{key:"submitGoogleOneTapToken",value:function(r){var n=r.credential,i=r.loginRedirectUrl,s=r.signupRedirectUrl;return Fi(this,void 0,void 0,er().mark(function o(){var a,l;return er().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.fetchGoogleStart();case 2:return a=f.sent,l=a.oauthCallbackId,f.abrupt("return",this.clientsideServices.oneTapSubmit({publicToken:this._publicToken,idToken:n,loginRedirectURL:i,oauthCallbackID:l,signupRedirectURL:s}));case 5:case"end":return f.stop()}},o,this)}))}}],[{key:"WillGoogleOneTapShowBannerForUA",value:function(r){var n=function(a,l){return a.indexOf(l)!==-1},i=n(r,"iPad")||n(r,"Android")&&!n(r,"Mobile")||n(r,"Silk"),s=n(r,"iPod")||n(r,"iPhone")||n(r,"Android")||n(r,"IEMobile");return!i&&s}},{key:"WillGoogleOneTapShowEmbedded",value:function(){return!t.WillGoogleOneTapShowBannerForUA(navigator.userAgent)}}]),t}(),Hie="PKCE_VERIFIER";function Wie(t){var e=t.toString(16);return e.length===1&&(e="0"+e),e}function Gie(t){var e;return btoa((e=String.fromCharCode).call.apply(e,[null].concat(ane(new Uint8Array(t))))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}var xp=function(){function t(e,r){ei(this,t),this._dataLayer=e,this.namespace=r}return ti(t,[{key:"key",value:function(){return Hie+":"+this.namespace}},{key:"startPKCETransaction",value:function(){return Fi(this,void 0,void 0,er().mark(function r(){var n;return er().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,t.createProofkeyPair();case 2:return n=s.sent,this._dataLayer.setItem(this.key(),JSON.stringify(n)),s.abrupt("return",n);case 5:case"end":return s.stop()}},r,this)}))}},{key:"getPKPair",value:function(){var r=this._dataLayer.getItem(this.key());if(r!==null)try{return JSON.parse(r)}catch{vs.warn("Found malformed Proof Key pair in localstorage.");return}}},{key:"clearPKPair",value:function(){return this._dataLayer.removeItem(this.key())}}],[{key:"createProofkeyPair",value:function(){return Fi(this,void 0,void 0,er().mark(function r(){var n,i,s;return er().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return n=new Uint32Array(16),window.crypto.getRandomValues(n),i=Array.from(n).map(Wie).join(""),a.next=5,window.crypto.subtle.digest("SHA-256",new TextEncoder().encode(i));case 5:return s=a.sent,a.abrupt("return",{code_challenge:Gie(s),code_verifier:i});case 7:case"end":return a.stop()}},r)}))}}]),t}(),Kie=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.KEYS_TO_EXCLUDE,n=r===void 0?[]:r,i=function s(o,a){return ji(o)!==ji(a)?!1:o===null||a===null?o===a:ji(o)==="object"?Object.keys(o).length!==Object.keys(a).length||Object.keys(o).some(function(l){return!(l in a)})?!1:Object.entries(o).filter(function(l){var c=xm(l,1),f=c[0];return!n.includes(f)}).every(function(l){var c=xm(l,2),f=c[0],u=c[1];return s(u,a[f])}):o===a};return i},Yie=function(){return!!(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))},Qie=function(e){var r,n,i,s,o,a,l,c;return{cookieOptions:e==null?void 0:e.cookieOptions,endpoints:{sdkBackendURL:(n=(r=e==null?void 0:e.endpoints)===null||r===void 0?void 0:r.sdkBackendURL)!==null&&n!==void 0?n:Nne,testAPIURL:(s=(i=e==null?void 0:e.endpoints)===null||i===void 0?void 0:i.testAPIURL)!==null&&s!==void 0?s:Ine,liveAPIURL:(a=(o=e==null?void 0:e.endpoints)===null||o===void 0?void 0:o.liveAPIURL)!==null&&a!==void 0?a:One,dfpBackendURL:Jne(e),clientsideServicesIframeURL:(c=(l=e==null?void 0:e.endpoints)===null||l===void 0?void 0:l.clientsideServicesIframeURL)!==null&&c!==void 0?c:Mne}}},Fd=function(e){var r=document.cookie?document.cookie.split("; "):[],n=r.filter(function(i){var s=i.split("="),o=xm(s,1),a=o[0];return e===a});return n.length>1},Jie="stytch_sdk_state_",Ts=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"".concat(Jie).concat(e).concat(r?"::".concat(r):"")};/*! js-cookie v3.0.1 | MIT */function Bd(t){for(var e=1;e"u")){o=Bd({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,o[l]!==!0&&(a+="="+o[l].split(";")[0]));return document.cookie=i+"="+t.write(s,i)+a}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var s=document.cookie?document.cookie.split("; "):[],o={},a=0;a1&&arguments[1]!==void 0?arguments[1]:!1,i=this._datalayer.state,s=r===null?null:Object.assign(Object.assign({},this._datalayer.state),r);this._datalayer.state=s;var o=this.getFromCache();this.setCacheRefreshed();var a=!dk(i,s);(o||a)&&(uk(this._datalayer.subscriptions,s),a&&!n&&this._datalayer.syncToLocalStorage())}},{key:"updateTokens",value:function(r){var n=r.session_token,i=r.session_jwt,s=this._datalayer.readSessionCookie(),o=Object.assign(Object.assign({},s),{session_token:n,session_jwt:i});n||i?(this._datalayer.writeSessionCookie(o),this._datalayer.removeISTCookie()):this._datalayer.removeSessionCookie()}},{key:"subscribeToState",value:function(r){return ose(this._datalayer.subscriptions,r)}},{key:"getState",value:function(){return this._datalayer.state}},{key:"destroy",value:function(){window.removeEventListener("storage",this._listen)}},{key:"syncFromDeviceStorage",value:function(){return null}},{key:"getFromCache",value:function(){return this.fromCache}},{key:"setCacheRefreshed",value:function(){this.fromCache=!1}}]),t}(),lse=function(t){yw(e,t);function e(){var r;return ei(this,e),r=pw(this,e,arguments),r.updateUser=function(n){return r.updateState({user:n})},r.getUser=function(){var n,i;return(i=(n=r.getState())===null||n===void 0?void 0:n.user)!==null&&i!==void 0?i:null},r.getSession=function(){var n,i;return(i=(n=r.getState())===null||n===void 0?void 0:n.session)!==null&&i!==void 0?i:null},r}return ti(e)}(ase),cse=Symbol.for("stytch__internal_b2c"),fse=function(e,r){Object.assign(e,nne({},cse,r))},use=ti(function t(e,r){var n=this;ei(this,t),Qne("StytchHeadlessClient"),Yne(e);var i=r,s=Qie(i);this._dataLayer=sse(e,i),this._subscriptionService=new lse(e,this._dataLayer),this._stateChangeClient=new Oie(this._subscriptionService,{}),this.onStateChange=function(){var p;return(p=n._stateChangeClient).onStateChange.apply(p,arguments)};var o=function(){var m,x,b,w;return{stytch_user_id:(x=(m=n._dataLayer.state)===null||m===void 0?void 0:m.user)===null||x===void 0?void 0:x.user_id,stytch_session_id:(w=(b=n._dataLayer.state)===null||b===void 0?void 0:b.session)===null||w===void 0?void 0:w.session_id}},a=new xp(this._dataLayer,"passwords");this._networkClient=new Bie(e,this._dataLayer,s.endpoints.sdkBackendURL,o);var l=new Mie(e,this._networkClient,this._dataLayer),c=new Die(l.getAsync()),f=new nie(e,s.endpoints.dfpBackendURL,l.getAsync(),c.executeRecaptcha),u=new Lie(s.endpoints.clientsideServicesIframeURL),d=new qie(e,u),h=new _ie(this._networkClient,f);this.user=new lie(this._networkClient,this._subscriptionService),this.session=new cie(this._networkClient,this._subscriptionService),this.magicLinks=new uie(this._networkClient,this._subscriptionService,new xp(this._dataLayer,"magic_links"),a,l.getAsync(),f),this.otps=new die(this._networkClient,this._subscriptionService,c.executeRecaptcha,f),this.oauth=new jie(this._networkClient,this._subscriptionService,new xp(this._dataLayer,"oauth"),l.getAsync(),{publicToken:e,testAPIURL:s.endpoints.testAPIURL,liveAPIURL:s.endpoints.liveAPIURL},d),this.cryptoWallets=new vie(this._networkClient,this._subscriptionService,c.executeRecaptcha,f),this.totps=new pie(this._networkClient,this._subscriptionService,f),this.webauthn=new kie(this._networkClient,this._subscriptionService,f),this.passwords=new Pie(this._networkClient,this._subscriptionService,a,l.getAsync(),f),this._sessionManager=new pP(this._subscriptionService,this.session),this._dataLayer.readSessionCookie().session_token&&this._sessionManager.performBackgroundRefresh(),this._networkClient.logEvent({name:"sdk_instance_instantiated",details:{event_callback_registered:!1,error_callback_registered:!1,success_callback_registered:!1}}),fse(this,{bootstrap:l,clientsideServices:u,captcha:c,oneTap:d,searchManager:h,publicToken:e,dataLayer:this._dataLayer,networkClient:this._networkClient})});const hk={}.VITE_STYTCH_PUBLIC_TOKEN;function dse({children:t}){return hk?D.jsx(Dre,{stytch:new use(hk),children:t}):t}const hse="970987756660-35a6tc48hvi8cev9cnknp0iugv9poa23.apps.googleusercontent.com",vk="970987756660-6ibakd38eibf3cg9rq42hri7o0jn5va8.apps.googleusercontent.com",vse="AQAAAAAAAEGv4rUgioUNUbcdNZlvOZE72JI",pse="eyJwcm9qZWN0SWQiOjE2ODE1LCJlbWFpbFJlZ2lvbiI6ImNhLWNlbnRyYWwtMSIsImVtYWlsQ2xpZW50SWQiOiI2N2V2NXVvc3ZxMzVmcGI2OXI3NnJoYnVoIiwicnBjU2VydmVyIjoiaHR0cHM6Ly93YWFzLnNlcXVlbmNlLmFwcCJ9",pk="AQAAAAAAAAK2JvvZhWqZ51riasWBftkrVXE",yk="eyJwcm9qZWN0SWQiOjY5NCwicnBjU2VydmVyIjoiaHR0cHM6Ly9kZXYtd2Fhcy5zZXF1ZW5jZS5hcHAiLCJlbWFpbFJlZ2lvbiI6ImNhLWNlbnRyYWwtMSIsImVtYWlsQ2xpZW50SWQiOiI1NGF0bjV1cGk2M3FjNTlhMWVtM3ZiaHJzbiJ9";new O9("https://nodes.sequence.app/polygon");const Lv=new URLSearchParams(window.location.search),yse=Lv.get("env")??"prod";let xP=Lv.get("projectAccessKey")??vse,bP=Lv.get("waasConfigKey")??pse,wP=Lv.get("googleClientId")??hse;yse==="dev"&&(console.log("Using dev environment"),console.log(`Project Access Key: ${pk}`),console.log(`Waas Config Key: ${yk}`),console.log(`Google Client ID: ${vk}`),xP=pk,bP=yk,wP=vk);const Re=new wre({network:"polygon",projectAccessKey:xP,waasConfigKey:bP}),Oi=EV([{path:"/login",element:D.jsx(Bre,{})},{path:"/",element:D.jsx(rne,{})}]);Ep.createRoot(document.getElementById("root")).render(D.jsx(pr.StrictMode,{children:D.jsx(MB,{children:D.jsx(XU,{children:D.jsx(DV,{clientId:wP,children:D.jsx(dse,{children:D.jsx(IV,{router:Oi})})})})})})); diff --git a/index.html b/index.html index d562fc0..de63097 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ Demo Waas App - +